From 2745895064bc2c1ac36ff67b101200239712a1d4 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 1 Dec 2015 11:13:54 -0800 Subject: [PATCH 001/209] Alternate approach to fix super calls in async methods. --- src/compiler/checker.ts | 14 ++-- src/compiler/emitter.ts | 83 ++++++++++++++----- src/compiler/types.ts | 2 +- ...asyncArrowFunctionCapturesArguments_es6.js | 2 +- .../asyncAwaitIsolatedModules_es6.js | 2 +- tests/baselines/reference/asyncAwait_es6.js | 2 +- .../reference/asyncMethodWithSuper_es6.js | 27 ++++++ .../asyncMethodWithSuper_es6.symbols | 26 ++++++ .../reference/asyncMethodWithSuper_es6.types | 29 +++++++ tests/baselines/reference/asyncMultiFile.js | 2 +- .../reference/reachabilityChecks7.js | 2 +- .../reference/superSymbolIndexedAccess5.js | 2 +- .../reference/superSymbolIndexedAccess6.js | 2 +- .../async/es6/asyncMethodWithSuper_es6.ts | 13 +++ 14 files changed, 176 insertions(+), 32 deletions(-) create mode 100644 tests/baselines/reference/asyncMethodWithSuper_es6.js create mode 100644 tests/baselines/reference/asyncMethodWithSuper_es6.symbols create mode 100644 tests/baselines/reference/asyncMethodWithSuper_es6.types create mode 100644 tests/cases/conformance/async/es6/asyncMethodWithSuper_es6.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 9ed3ca55e19..21317bec3fb 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -6756,7 +6756,6 @@ namespace ts { if (node.parserContextFlags & ParserContextFlags.Await) { getNodeLinks(container).flags |= NodeCheckFlags.CaptureArguments; - getNodeLinks(node).flags |= NodeCheckFlags.LexicalArguments; } } @@ -6934,6 +6933,11 @@ namespace ts { getNodeLinks(node).flags |= nodeCheckFlag; + // Due to how we emit async functions, we need to specialize the emit for an async method that contains a `super` reference. + if (container.kind === SyntaxKind.MethodDeclaration && container.flags & NodeFlags.Async) { + getNodeLinks(container).flags |= NodeCheckFlags.AsyncMethodWithSuper; + } + if (needToCaptureLexicalThis) { // call expressions are allowed only in constructors so they should always capture correct 'this' // super property access expressions can also appear in arrow functions - @@ -9858,7 +9862,7 @@ namespace ts { return aggregatedTypes; } - /* + /* *TypeScript Specification 1.0 (6.3) - July 2014 * An explicitly typed function whose return type isn't the Void or the Any type * must have at least one return statement somewhere in its body. @@ -9884,15 +9888,15 @@ namespace ts { const hasExplicitReturn = func.flags & NodeFlags.HasExplicitReturn; if (returnType && !hasExplicitReturn) { - // minimal check: function has syntactic return type annotation and no explicit return statements in the body + // minimal check: function has syntactic return type annotation and no explicit return statements in the body // this function does not conform to the specification. - // NOTE: having returnType !== undefined is a precondition for entering this branch so func.type will always be present + // NOTE: having returnType !== undefined is a precondition for entering this branch so func.type will always be present error(func.type, Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value); } else if (compilerOptions.noImplicitReturns) { if (!returnType) { // If return type annotation is omitted check if function has any explicit return statements. - // If it does not have any - its inferred return type is void - don't do any checks. + // If it does not have any - its inferred return type is void - don't do any checks. // Otherwise get inferred return type from function body and report error only if it is not void / anytype const inferredReturnType = hasExplicitReturn ? getReturnTypeOfSignature(getSignatureFromDeclaration(func)) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 48f9dd32aaf..d6a709fc5e7 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -321,7 +321,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) { const awaiterHelper = ` var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) { return new Promise(function (resolve, reject) { - generator = generator.call(thisArg, _arguments); + generator = generator.apply(thisArg, _arguments); function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); } function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } @@ -1496,11 +1496,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } function emitExpressionIdentifier(node: Identifier) { - if (resolver.getNodeCheckFlags(node) & NodeCheckFlags.LexicalArguments) { - write("_arguments"); - return; - } - const container = resolver.getReferencedExportContainer(node); if (container) { if (container.kind === SyntaxKind.SourceFile) { @@ -2287,23 +2282,72 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write(")"); } + function isSuperPropertyAccess(node: Expression): node is PropertyAccessExpression { + return node.kind === SyntaxKind.PropertyAccessExpression + && (node).expression.kind === SyntaxKind.SuperKeyword; + } + + function isSuperElementAccess(node: Expression): node is ElementAccessExpression { + return node.kind === SyntaxKind.ElementAccessExpression + && (node).expression.kind === SyntaxKind.SuperKeyword; + } + + function isInAsyncMethodWithSuperInES6(node: CallExpression) { + if (languageVersion === ScriptTarget.ES6) { + const container = getSuperContainer(node, /*includeFunctions*/ false); + if (container && resolver.getNodeCheckFlags(container) & NodeCheckFlags.AsyncMethodWithSuper) { + return true; + } + } + + return false; + } + + function emitSuperAccessInAsyncMethod(node: Expression) { + write("_super("); + emit(node); + write(")"); + } + function emitCallExpression(node: CallExpression) { if (languageVersion < ScriptTarget.ES6 && hasSpreadElement(node.arguments)) { emitCallWithSpread(node); return; } + + const expression = node.expression; let superCall = false; - if (node.expression.kind === SyntaxKind.SuperKeyword) { - emitSuper(node.expression); + let isAsyncMethodWithSuper = false; + if (expression.kind === SyntaxKind.SuperKeyword) { + emitSuper(expression); superCall = true; } else { - emit(node.expression); - superCall = node.expression.kind === SyntaxKind.PropertyAccessExpression && (node.expression).expression.kind === SyntaxKind.SuperKeyword; + if (isSuperPropertyAccess(expression)) { + superCall = true; + if (isInAsyncMethodWithSuperInES6(node)) { + isAsyncMethodWithSuper = true; + const name = createSynthesizedNode(SyntaxKind.StringLiteral); + name.text = expression.name.text; + emitSuperAccessInAsyncMethod(name); + } + } + else if (isSuperElementAccess(expression)) { + superCall = true; + if (isInAsyncMethodWithSuperInES6(node)) { + isAsyncMethodWithSuper = true; + emitSuperAccessInAsyncMethod(expression.argumentExpression); + } + } + + if (!isAsyncMethodWithSuper) { + emit(expression); + } } - if (superCall && languageVersion < ScriptTarget.ES6) { + + if (superCall && (languageVersion < ScriptTarget.ES6 || isAsyncMethodWithSuper)) { write(".call("); - emitThis(node.expression); + emitThis(expression); if (node.arguments.length) { write(", "); emitCommaList(node.arguments); @@ -2980,7 +3024,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } else { // this is top level converted loop so we need to create an alias for 'this' here - // NOTE: + // NOTE: // if converted loops were all nested in arrow function then we'll always emit '_this' so convertedLoopState.thisName will not be set. // If it is set this means that all nested loops are not nested in arrow function and it is safe to capture 'this'. write(`var ${convertedLoopState.thisName} = this;`); @@ -4452,6 +4496,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write(" {"); increaseIndent(); writeLine(); + + if (resolver.getNodeCheckFlags(node) & NodeCheckFlags.AsyncMethodWithSuper) { + write("const _super = name => super[name];"); + writeLine(); + } + write("return"); } @@ -4472,12 +4522,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } // Emit the call to __awaiter. - if (hasLexicalArguments) { - write(", function* (_arguments)"); - } - else { - write(", function* ()"); - } + write(", function* ()"); // Emit the signature and body for the inner generator function. emitFunctionBody(node); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index f8b26ddaa6d..dc17b9de5ec 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2022,7 +2022,7 @@ namespace ts { SuperInstance = 0x00000100, // Instance 'super' reference SuperStatic = 0x00000200, // Static 'super' reference ContextChecked = 0x00000400, // Contextual types have been assigned - LexicalArguments = 0x00000800, + AsyncMethodWithSuper = 0x00000800, CaptureArguments = 0x00001000, // Lexical 'arguments' used in body (for async functions) // Values for enum members have been computed, and any errors have been reported for them. diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js index c24259cf0b5..fdaa365836d 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js +++ b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js @@ -11,6 +11,6 @@ class C { class C { method() { function other() { } - var fn = () => __awaiter(this, arguments, Promise, function* (_arguments) { return yield other.apply(this, _arguments); }); + var fn = () => __awaiter(this, arguments, Promise, function* () { return yield other.apply(this, arguments); }); } } diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es6.js b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.js index 7007c66ae28..9f3005e5861 100644 --- a/tests/baselines/reference/asyncAwaitIsolatedModules_es6.js +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.js @@ -42,7 +42,7 @@ module M { //// [asyncAwaitIsolatedModules_es6.js] var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) { return new Promise(function (resolve, reject) { - generator = generator.call(thisArg, _arguments); + generator = generator.apply(thisArg, _arguments); function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); } function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } diff --git a/tests/baselines/reference/asyncAwait_es6.js b/tests/baselines/reference/asyncAwait_es6.js index 155a44d339d..fb4dbf9955d 100644 --- a/tests/baselines/reference/asyncAwait_es6.js +++ b/tests/baselines/reference/asyncAwait_es6.js @@ -42,7 +42,7 @@ module M { //// [asyncAwait_es6.js] var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) { return new Promise(function (resolve, reject) { - generator = generator.call(thisArg, _arguments); + generator = generator.apply(thisArg, _arguments); function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); } function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } diff --git a/tests/baselines/reference/asyncMethodWithSuper_es6.js b/tests/baselines/reference/asyncMethodWithSuper_es6.js new file mode 100644 index 00000000000..315ce5fdb90 --- /dev/null +++ b/tests/baselines/reference/asyncMethodWithSuper_es6.js @@ -0,0 +1,27 @@ +//// [asyncMethodWithSuper_es6.ts] +class A { + x() { + } +} + +class B extends A { + async y() { + super.x(); + super["x"](); + } +} + +//// [asyncMethodWithSuper_es6.js] +class A { + x() { + } +} +class B extends A { + y() { + const _super = name => super[name]; + return __awaiter(this, void 0, Promise, function* () { + _super("x").call(this); + _super("x").call(this); + }); + } +} diff --git a/tests/baselines/reference/asyncMethodWithSuper_es6.symbols b/tests/baselines/reference/asyncMethodWithSuper_es6.symbols new file mode 100644 index 00000000000..2b7388702f1 --- /dev/null +++ b/tests/baselines/reference/asyncMethodWithSuper_es6.symbols @@ -0,0 +1,26 @@ +=== tests/cases/conformance/async/es6/asyncMethodWithSuper_es6.ts === +class A { +>A : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) + + x() { +>x : Symbol(x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) + } +} + +class B extends A { +>B : Symbol(B, Decl(asyncMethodWithSuper_es6.ts, 3, 1)) +>A : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) + + async y() { +>y : Symbol(y, Decl(asyncMethodWithSuper_es6.ts, 5, 19)) + + super.x(); +>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) +>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) +>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) + + super["x"](); +>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) +>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) + } +} diff --git a/tests/baselines/reference/asyncMethodWithSuper_es6.types b/tests/baselines/reference/asyncMethodWithSuper_es6.types new file mode 100644 index 00000000000..7786b417e81 --- /dev/null +++ b/tests/baselines/reference/asyncMethodWithSuper_es6.types @@ -0,0 +1,29 @@ +=== tests/cases/conformance/async/es6/asyncMethodWithSuper_es6.ts === +class A { +>A : A + + x() { +>x : () => void + } +} + +class B extends A { +>B : B +>A : A + + async y() { +>y : () => Promise + + super.x(); +>super.x() : void +>super.x : () => void +>super : A +>x : () => void + + super["x"](); +>super["x"]() : void +>super["x"] : () => void +>super : A +>"x" : string + } +} diff --git a/tests/baselines/reference/asyncMultiFile.js b/tests/baselines/reference/asyncMultiFile.js index e93dc586255..fa4a210c252 100644 --- a/tests/baselines/reference/asyncMultiFile.js +++ b/tests/baselines/reference/asyncMultiFile.js @@ -8,7 +8,7 @@ function g() { } //// [a.js] var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) { return new Promise(function (resolve, reject) { - generator = generator.call(thisArg, _arguments); + generator = generator.apply(thisArg, _arguments); function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); } function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } diff --git a/tests/baselines/reference/reachabilityChecks7.js b/tests/baselines/reference/reachabilityChecks7.js index c78f99953e9..f3a27dfdab8 100644 --- a/tests/baselines/reference/reachabilityChecks7.js +++ b/tests/baselines/reference/reachabilityChecks7.js @@ -33,7 +33,7 @@ let x1 = () => { use("Test"); } //// [reachabilityChecks7.js] var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) { return new Promise(function (resolve, reject) { - generator = generator.call(thisArg, _arguments); + generator = generator.apply(thisArg, _arguments); function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); } function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } diff --git a/tests/baselines/reference/superSymbolIndexedAccess5.js b/tests/baselines/reference/superSymbolIndexedAccess5.js index 64a8ac5094c..2626051706c 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess5.js +++ b/tests/baselines/reference/superSymbolIndexedAccess5.js @@ -34,7 +34,7 @@ var Bar = (function (_super) { _super.apply(this, arguments); } Bar.prototype[symbol] = function () { - return _super.prototype[symbol](); + return _super.prototype[symbol].call(this); }; return Bar; })(Foo); diff --git a/tests/baselines/reference/superSymbolIndexedAccess6.js b/tests/baselines/reference/superSymbolIndexedAccess6.js index e014cf47c1a..48834422e24 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess6.js +++ b/tests/baselines/reference/superSymbolIndexedAccess6.js @@ -34,7 +34,7 @@ var Bar = (function (_super) { _super.apply(this, arguments); } Bar[symbol] = function () { - return _super[symbol](); + return _super[symbol].call(this); }; return Bar; })(Foo); diff --git a/tests/cases/conformance/async/es6/asyncMethodWithSuper_es6.ts b/tests/cases/conformance/async/es6/asyncMethodWithSuper_es6.ts new file mode 100644 index 00000000000..2225200ef60 --- /dev/null +++ b/tests/cases/conformance/async/es6/asyncMethodWithSuper_es6.ts @@ -0,0 +1,13 @@ +// @target: ES6 +// @noEmitHelpers: true +class A { + x() { + } +} + +class B extends A { + async y() { + super.x(); + super["x"](); + } +} \ No newline at end of file From 67a4fe5d67261fbb65abee8e2a9318600e5c49bf Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 1 Dec 2015 14:29:37 -0800 Subject: [PATCH 002/209] Support for assignment/destructuring using super in an async method --- src/compiler/checker.ts | 17 +++- src/compiler/emitter.ts | 64 +++++++----- src/compiler/types.ts | 11 ++- .../reference/asyncMethodWithSuper_es6.js | 76 +++++++++++++- .../asyncMethodWithSuper_es6.symbols | 80 ++++++++++++++- .../reference/asyncMethodWithSuper_es6.types | 98 ++++++++++++++++++- .../async/es6/asyncMethodWithSuper_es6.ts | 41 +++++++- 7 files changed, 347 insertions(+), 40 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 21317bec3fb..0d24f7c89fe 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -6902,6 +6902,16 @@ namespace ts { return false; } + function isSuperPropertyAccess(node: Node) { + return node.kind === SyntaxKind.PropertyAccessExpression + && (node).expression.kind === SyntaxKind.SuperKeyword; + } + + function isSuperElementAccess(node: Node) { + return node.kind === SyntaxKind.ElementAccessExpression + && (node).expression.kind === SyntaxKind.SuperKeyword; + } + function checkSuperExpression(node: Node): Type { const isCallExpression = node.parent.kind === SyntaxKind.CallExpression && (node.parent).expression === node; const classDeclaration = getContainingClass(node); @@ -6935,7 +6945,12 @@ namespace ts { // Due to how we emit async functions, we need to specialize the emit for an async method that contains a `super` reference. if (container.kind === SyntaxKind.MethodDeclaration && container.flags & NodeFlags.Async) { - getNodeLinks(container).flags |= NodeCheckFlags.AsyncMethodWithSuper; + if ((isSuperPropertyAccess(node.parent) || isSuperElementAccess(node.parent)) && isAssignmentTarget(node.parent)) { + getNodeLinks(container).flags |= NodeCheckFlags.AsyncMethodWithSuperBinding; + } + else { + getNodeLinks(container).flags |= NodeCheckFlags.AsyncMethodWithSuper; + } } if (needToCaptureLexicalThis) { diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index d6a709fc5e7..5c1eaf67b0e 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -2126,6 +2126,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi return; } + if (languageVersion === ScriptTarget.ES6 && + node.expression.kind === SyntaxKind.SuperKeyword && + isInAsyncMethodWithSuperInES6(node)) { + const name = createSynthesizedNode(SyntaxKind.StringLiteral); + name.text = node.name.text; + emitSuperAccessInAsyncMethod(node.expression, name); + return; + } + emit(node.expression); const indentedBeforeDot = indentIfOnDifferentLines(node, node.expression, node.dotToken); @@ -2207,6 +2216,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi if (tryEmitConstantValue(node)) { return; } + + if (languageVersion === ScriptTarget.ES6 && + node.expression.kind === SyntaxKind.SuperKeyword && + isInAsyncMethodWithSuperInES6(node)) { + emitSuperAccessInAsyncMethod(node.expression, node.argumentExpression); + return; + } + emit(node.expression); write("["); emit(node.argumentExpression); @@ -2292,10 +2309,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi && (node).expression.kind === SyntaxKind.SuperKeyword; } - function isInAsyncMethodWithSuperInES6(node: CallExpression) { + function isInAsyncMethodWithSuperInES6(node: Node) { if (languageVersion === ScriptTarget.ES6) { const container = getSuperContainer(node, /*includeFunctions*/ false); - if (container && resolver.getNodeCheckFlags(container) & NodeCheckFlags.AsyncMethodWithSuper) { + if (container && resolver.getNodeCheckFlags(container) & (NodeCheckFlags.AsyncMethodWithSuper | NodeCheckFlags.AsyncMethodWithSuperBinding)) { return true; } } @@ -2303,10 +2320,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi return false; } - function emitSuperAccessInAsyncMethod(node: Expression) { + function emitSuperAccessInAsyncMethod(superNode: Node, argumentExpression: Expression) { + const container = getSuperContainer(superNode, /*includeFunctions*/ false); + const isSuperBinding = resolver.getNodeCheckFlags(container) & NodeCheckFlags.AsyncMethodWithSuperBinding; write("_super("); - emit(node); - write(")"); + emit(argumentExpression); + write(isSuperBinding ? ").value" : ")"); } function emitCallExpression(node: CallExpression) { @@ -2323,26 +2342,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi superCall = true; } else { - if (isSuperPropertyAccess(expression)) { - superCall = true; - if (isInAsyncMethodWithSuperInES6(node)) { - isAsyncMethodWithSuper = true; - const name = createSynthesizedNode(SyntaxKind.StringLiteral); - name.text = expression.name.text; - emitSuperAccessInAsyncMethod(name); - } - } - else if (isSuperElementAccess(expression)) { - superCall = true; - if (isInAsyncMethodWithSuperInES6(node)) { - isAsyncMethodWithSuper = true; - emitSuperAccessInAsyncMethod(expression.argumentExpression); - } - } - - if (!isAsyncMethodWithSuper) { - emit(expression); - } + superCall = isSuperPropertyAccess(expression) || isSuperElementAccess(expression); + isAsyncMethodWithSuper = superCall && isInAsyncMethodWithSuperInES6(node); + emit(expression); } if (superCall && (languageVersion < ScriptTarget.ES6 || isAsyncMethodWithSuper)) { @@ -4497,8 +4499,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi increaseIndent(); writeLine(); - if (resolver.getNodeCheckFlags(node) & NodeCheckFlags.AsyncMethodWithSuper) { - write("const _super = name => super[name];"); + if (resolver.getNodeCheckFlags(node) & NodeCheckFlags.AsyncMethodWithSuperBinding) { + writeLines(` +const _super = (function (geti, seti) { + const cache = Object.create(null); + return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } }); +})(name => super[name], (name, value) => super[name] = value);`); + writeLine(); + } + else if (resolver.getNodeCheckFlags(node) & NodeCheckFlags.AsyncMethodWithSuper) { + write(`const _super = name => super[name];`); writeLine(); } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index dc17b9de5ec..002543081f8 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2023,13 +2023,14 @@ namespace ts { SuperStatic = 0x00000200, // Static 'super' reference ContextChecked = 0x00000400, // Contextual types have been assigned AsyncMethodWithSuper = 0x00000800, - CaptureArguments = 0x00001000, // Lexical 'arguments' used in body (for async functions) + AsyncMethodWithSuperBinding = 0x00001000, + CaptureArguments = 0x00002000, // Lexical 'arguments' used in body (for async functions) // Values for enum members have been computed, and any errors have been reported for them. - EnumValuesComputed = 0x00002000, - BlockScopedBindingInLoop = 0x00004000, - LexicalModuleMergesWithClass = 0x00008000, // Instantiated lexical module declaration is merged with a previous class declaration. - LoopWithBlockScopedBindingCapturedInFunction = 0x00010000, // Loop that contains block scoped variable captured in closure + EnumValuesComputed = 0x00004000, + BlockScopedBindingInLoop = 0x00008000, + LexicalModuleMergesWithClass = 0x00010000, // Instantiated lexical module declaration is merged with a previous class declaration. + LoopWithBlockScopedBindingCapturedInFunction = 0x00020000, // Loop that contains block scoped variable captured in closure } /* @internal */ diff --git a/tests/baselines/reference/asyncMethodWithSuper_es6.js b/tests/baselines/reference/asyncMethodWithSuper_es6.js index 315ce5fdb90..74d4de79881 100644 --- a/tests/baselines/reference/asyncMethodWithSuper_es6.js +++ b/tests/baselines/reference/asyncMethodWithSuper_es6.js @@ -5,9 +5,48 @@ class A { } class B extends A { - async y() { + // async method with only call/get on 'super' does not require a binding + async simple() { + // call with property access super.x(); + + // call with element access super["x"](); + + // property access (read) + const a = super.x; + + // element access (read) + const b = super["x"]; + } + + // async method with assignment/destructuring on 'super' requires a binding + async advanced() { + const f = () => {}; + + // call with property access + super.x(); + + // call with element access + super["x"](); + + // property access (read) + const a = super.x; + + // element access (read) + const b = super["x"]; + + // property access (assign) + super.x = f; + + // element access (assign) + super["x"] = f; + + // destructuring assign with property access + ({ f: super.x } = { f }); + + // destructuring assign with element access + ({ f: super["x"] } = { f }); } } @@ -17,11 +56,44 @@ class A { } } class B extends A { - y() { + // async method with only call/get on 'super' does not require a binding + simple() { const _super = name => super[name]; return __awaiter(this, void 0, Promise, function* () { + // call with property access _super("x").call(this); + // call with element access _super("x").call(this); + // property access (read) + const a = _super("x"); + // element access (read) + const b = _super("x"); + }); + } + // async method with assignment/destructuring on 'super' requires a binding + advanced() { + const _super = (function (geti, seti) { + const cache = Object.create(null); + return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } }); + })(name => super[name], (name, value) => super[name] = value); + return __awaiter(this, void 0, Promise, function* () { + const f = () => { }; + // call with property access + _super("x").value.call(this); + // call with element access + _super("x").value.call(this); + // property access (read) + const a = _super("x").value; + // element access (read) + const b = _super("x").value; + // property access (assign) + _super("x").value = f; + // element access (assign) + _super("x").value = f; + // destructuring assign with property access + ({ f: _super("x").value } = { f }); + // destructuring assign with element access + ({ f: _super("x").value } = { f }); }); } } diff --git a/tests/baselines/reference/asyncMethodWithSuper_es6.symbols b/tests/baselines/reference/asyncMethodWithSuper_es6.symbols index 2b7388702f1..37937a061a8 100644 --- a/tests/baselines/reference/asyncMethodWithSuper_es6.symbols +++ b/tests/baselines/reference/asyncMethodWithSuper_es6.symbols @@ -11,16 +11,92 @@ class B extends A { >B : Symbol(B, Decl(asyncMethodWithSuper_es6.ts, 3, 1)) >A : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) - async y() { ->y : Symbol(y, Decl(asyncMethodWithSuper_es6.ts, 5, 19)) + // async method with only call/get on 'super' does not require a binding + async simple() { +>simple : Symbol(simple, Decl(asyncMethodWithSuper_es6.ts, 5, 19)) + // call with property access super.x(); >super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) >super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) >x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) + // call with element access super["x"](); >super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) >"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) + + // property access (read) + const a = super.x; +>a : Symbol(a, Decl(asyncMethodWithSuper_es6.ts, 15, 13)) +>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) +>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) +>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) + + // element access (read) + const b = super["x"]; +>b : Symbol(b, Decl(asyncMethodWithSuper_es6.ts, 18, 13)) +>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) +>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) + } + + // async method with assignment/destructuring on 'super' requires a binding + async advanced() { +>advanced : Symbol(advanced, Decl(asyncMethodWithSuper_es6.ts, 19, 5)) + + const f = () => {}; +>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 23, 13)) + + // call with property access + super.x(); +>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) +>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) +>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) + + // call with element access + super["x"](); +>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) +>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) + + // property access (read) + const a = super.x; +>a : Symbol(a, Decl(asyncMethodWithSuper_es6.ts, 32, 13)) +>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) +>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) +>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) + + // element access (read) + const b = super["x"]; +>b : Symbol(b, Decl(asyncMethodWithSuper_es6.ts, 35, 13)) +>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) +>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) + + // property access (assign) + super.x = f; +>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) +>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) +>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) +>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 23, 13)) + + // element access (assign) + super["x"] = f; +>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) +>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) +>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 23, 13)) + + // destructuring assign with property access + ({ f: super.x } = { f }); +>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 44, 10)) +>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) +>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) +>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) +>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 44, 27)) + + // destructuring assign with element access + ({ f: super["x"] } = { f }); +>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 47, 10)) +>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) +>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) +>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 47, 30)) } } diff --git a/tests/baselines/reference/asyncMethodWithSuper_es6.types b/tests/baselines/reference/asyncMethodWithSuper_es6.types index 7786b417e81..04c5b5a9baf 100644 --- a/tests/baselines/reference/asyncMethodWithSuper_es6.types +++ b/tests/baselines/reference/asyncMethodWithSuper_es6.types @@ -11,19 +11,113 @@ class B extends A { >B : B >A : A - async y() { ->y : () => Promise + // async method with only call/get on 'super' does not require a binding + async simple() { +>simple : () => Promise + // call with property access super.x(); >super.x() : void >super.x : () => void >super : A >x : () => void + // call with element access super["x"](); >super["x"]() : void >super["x"] : () => void >super : A >"x" : string + + // property access (read) + const a = super.x; +>a : () => void +>super.x : () => void +>super : A +>x : () => void + + // element access (read) + const b = super["x"]; +>b : () => void +>super["x"] : () => void +>super : A +>"x" : string + } + + // async method with assignment/destructuring on 'super' requires a binding + async advanced() { +>advanced : () => Promise + + const f = () => {}; +>f : () => void +>() => {} : () => void + + // call with property access + super.x(); +>super.x() : void +>super.x : () => void +>super : A +>x : () => void + + // call with element access + super["x"](); +>super["x"]() : void +>super["x"] : () => void +>super : A +>"x" : string + + // property access (read) + const a = super.x; +>a : () => void +>super.x : () => void +>super : A +>x : () => void + + // element access (read) + const b = super["x"]; +>b : () => void +>super["x"] : () => void +>super : A +>"x" : string + + // property access (assign) + super.x = f; +>super.x = f : () => void +>super.x : () => void +>super : A +>x : () => void +>f : () => void + + // element access (assign) + super["x"] = f; +>super["x"] = f : () => void +>super["x"] : () => void +>super : A +>"x" : string +>f : () => void + + // destructuring assign with property access + ({ f: super.x } = { f }); +>({ f: super.x } = { f }) : { f: () => void; } +>{ f: super.x } = { f } : { f: () => void; } +>{ f: super.x } : { f: () => void; } +>f : () => void +>super.x : () => void +>super : A +>x : () => void +>{ f } : { f: () => void; } +>f : () => void + + // destructuring assign with element access + ({ f: super["x"] } = { f }); +>({ f: super["x"] } = { f }) : { f: () => void; } +>{ f: super["x"] } = { f } : { f: () => void; } +>{ f: super["x"] } : { f: () => void; } +>f : () => void +>super["x"] : () => void +>super : A +>"x" : string +>{ f } : { f: () => void; } +>f : () => void } } diff --git a/tests/cases/conformance/async/es6/asyncMethodWithSuper_es6.ts b/tests/cases/conformance/async/es6/asyncMethodWithSuper_es6.ts index 2225200ef60..795fe7defb0 100644 --- a/tests/cases/conformance/async/es6/asyncMethodWithSuper_es6.ts +++ b/tests/cases/conformance/async/es6/asyncMethodWithSuper_es6.ts @@ -6,8 +6,47 @@ class A { } class B extends A { - async y() { + // async method with only call/get on 'super' does not require a binding + async simple() { + // call with property access super.x(); + + // call with element access super["x"](); + + // property access (read) + const a = super.x; + + // element access (read) + const b = super["x"]; + } + + // async method with assignment/destructuring on 'super' requires a binding + async advanced() { + const f = () => {}; + + // call with property access + super.x(); + + // call with element access + super["x"](); + + // property access (read) + const a = super.x; + + // element access (read) + const b = super["x"]; + + // property access (assign) + super.x = f; + + // element access (assign) + super["x"] = f; + + // destructuring assign with property access + ({ f: super.x } = { f }); + + // destructuring assign with element access + ({ f: super["x"] } = { f }); } } \ No newline at end of file From af7df838253b7b8489fcd9137e8f4220786d2be5 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Tue, 8 Dec 2015 08:57:10 -0800 Subject: [PATCH 003/209] Parse type predicates only in return types. --- src/compiler/parser.ts | 53 +++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index e4262458d30..10d4a47c3df 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -908,17 +908,19 @@ namespace ts { return result; } - // Invokes the provided callback then unconditionally restores the parser to the state it - // was in immediately prior to invoking the callback. The result of invoking the callback - // is returned from this function. + /** Invokes the provided callback then unconditionally restores the parser to the state it + * was in immediately prior to invoking the callback. The result of invoking the callback + * is returned from this function. + */ function lookAhead(callback: () => T): T { return speculationHelper(callback, /*isLookAhead*/ true); } - // Invokes the provided callback. If the callback returns something falsy, then it restores - // the parser to the state it was in immediately prior to invoking the callback. If the - // callback returns something truthy, then the parser state is not rolled back. The result - // of invoking the callback is returned from this function. + /** Invokes the provided callback. If the callback returns something falsy, then it restores + * the parser to the state it was in immediately prior to invoking the callback. If the + * callback returns something truthy, then the parser state is not rolled back. The result + * of invoking the callback is returned from this function. + */ function tryParse(callback: () => T): T { return speculationHelper(callback, /*isLookAhead*/ false); } @@ -1960,15 +1962,8 @@ namespace ts { // TYPES - function parseTypeReferenceOrTypePredicate(): TypeReferenceNode | TypePredicateNode { + function parseTypeReference(): TypeReferenceNode { const typeName = parseEntityName(/*allowReservedWords*/ false, Diagnostics.Type_expected); - if (typeName.kind === SyntaxKind.Identifier && token === SyntaxKind.IsKeyword && !scanner.hasPrecedingLineBreak()) { - nextToken(); - const node = createNode(SyntaxKind.TypePredicate, typeName.pos); - node.parameterName = typeName; - node.type = parseType(); - return finishNode(node); - } const node = createNode(SyntaxKind.TypeReference, typeName.pos); node.typeName = typeName; if (!scanner.hasPrecedingLineBreak() && token === SyntaxKind.LessThanToken) { @@ -2100,10 +2095,10 @@ namespace ts { if (returnTokenRequired) { parseExpected(returnToken); - signature.type = parseType(); + signature.type = parseTypeOrTypePredicate(); } else if (parseOptional(returnToken)) { - signature.type = parseType(); + signature.type = parseTypeOrTypePredicate(); } } @@ -2419,7 +2414,7 @@ namespace ts { case SyntaxKind.SymbolKeyword: // If these are followed by a dot, then parse these out as a dotted type reference instead. const node = tryParse(parseKeywordAndNoDot); - return node || parseTypeReferenceOrTypePredicate(); + return node || parseTypeReference(); case SyntaxKind.StringLiteral: return parseStringLiteralTypeNode(); case SyntaxKind.VoidKeyword: @@ -2435,7 +2430,7 @@ namespace ts { case SyntaxKind.OpenParenToken: return parseParenthesizedType(); default: - return parseTypeReferenceOrTypePredicate(); + return parseTypeReference(); } } @@ -2541,6 +2536,26 @@ namespace ts { } return false; } + + function parseTypeOrTypePredicate(): TypeNode { + const typePredicateVariable = tryParse(() => { + const id = parseIdentifier(); + if (token === SyntaxKind.IsKeyword && !scanner.hasPrecedingLineBreak()) { + nextToken(); + return id; + } + }); + const t = parseType(); + if(typePredicateVariable) { + const node = createNode(SyntaxKind.TypePredicate, typePredicateVariable.pos); + node.parameterName = typePredicateVariable; + node.type = t; + return finishNode(node); + } + else { + return t; + } + } function parseType(): TypeNode { // The rules about 'yield' only apply to actual code/expression contexts. They don't From fd311d4e274251208c9dc795b4d071f6ffebf822 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Tue, 8 Dec 2015 09:11:37 -0800 Subject: [PATCH 004/209] Fix lint --- src/compiler/parser.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 10d4a47c3df..1c41003a7a1 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -2536,7 +2536,7 @@ namespace ts { } return false; } - + function parseTypeOrTypePredicate(): TypeNode { const typePredicateVariable = tryParse(() => { const id = parseIdentifier(); @@ -2546,7 +2546,7 @@ namespace ts { } }); const t = parseType(); - if(typePredicateVariable) { + if (typePredicateVariable) { const node = createNode(SyntaxKind.TypePredicate, typePredicateVariable.pos); node.parameterName = typePredicateVariable; node.type = t; From 1b63040d3654585d075bb0f69fc0f5aae41fc20b Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Tue, 8 Dec 2015 09:13:41 -0800 Subject: [PATCH 005/209] Add tests and accept baselines --- .../reference/typeAssertions.errors.txt | 52 ++++++++++++++++++- tests/baselines/reference/typeAssertions.js | 22 ++++++++ .../typeAssertions/typeAssertions.ts | 9 ++++ 3 files changed, 82 insertions(+), 1 deletion(-) diff --git a/tests/baselines/reference/typeAssertions.errors.txt b/tests/baselines/reference/typeAssertions.errors.txt index a2ad28801c8..c7401e4fcf9 100644 --- a/tests/baselines/reference/typeAssertions.errors.txt +++ b/tests/baselines/reference/typeAssertions.errors.txt @@ -7,9 +7,23 @@ tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(37,13): err Property 'q' is missing in type 'SomeDerived'. tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(38,13): error TS2352: Neither type 'SomeBase' nor type 'SomeOther' is assignable to the other. Property 'q' is missing in type 'SomeBase'. +tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(44,5): error TS2304: Cannot find name 'numOrStr'. +tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(44,14): error TS1005: '>' expected. +tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(44,14): error TS2304: Cannot find name 'is'. +tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(44,17): error TS1005: ')' expected. +tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(44,17): error TS2304: Cannot find name 'string'. +tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(44,48): error TS1005: ';' expected. +tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(45,2): error TS2322: Type 'number | string' is not assignable to type 'string'. + Type 'number' is not assignable to type 'string'. +tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(48,32): error TS2304: Cannot find name 'numOrStr'. +tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(48,41): error TS1005: ')' expected. +tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(48,41): error TS2304: Cannot find name 'is'. +tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(48,44): error TS1005: ';' expected. +tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(48,44): error TS2304: Cannot find name 'string'. +tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(48,50): error TS1005: ';' expected. -==== tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts (5 errors) ==== +==== tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts (18 errors) ==== // Function call whose argument is a 1 arg generic function call with explicit type arguments function fn1(t: T) { } function fn2(t: any) { } @@ -64,5 +78,41 @@ tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(38,13): err !!! error TS2352: Property 'q' is missing in type 'SomeBase'. someOther = someOther; + // Type assertion cannot be a type-predicate type + var numOrStr: number | string; + var str: string; + if((numOrStr === undefined)) { // Error + ~~~~~~~~ +!!! error TS2304: Cannot find name 'numOrStr'. + ~~ +!!! error TS1005: '>' expected. + ~~ +!!! error TS2304: Cannot find name 'is'. + ~~~~~~ +!!! error TS1005: ')' expected. + ~~~~~~ +!!! error TS2304: Cannot find name 'string'. + ~ +!!! error TS1005: ';' expected. + str = numOrStr; // Error, no narrowing occurred + ~~~ +!!! error TS2322: Type 'number | string' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. + } + + if((numOrStr === undefined) as numOrStr is string) { // Error + ~~~~~~~~ +!!! error TS2304: Cannot find name 'numOrStr'. + ~~ +!!! error TS1005: ')' expected. + ~~ +!!! error TS2304: Cannot find name 'is'. + ~~~~~~ +!!! error TS1005: ';' expected. + ~~~~~~ +!!! error TS2304: Cannot find name 'string'. + ~ +!!! error TS1005: ';' expected. + } \ No newline at end of file diff --git a/tests/baselines/reference/typeAssertions.js b/tests/baselines/reference/typeAssertions.js index 3645e61f2ba..8bdd927c99e 100644 --- a/tests/baselines/reference/typeAssertions.js +++ b/tests/baselines/reference/typeAssertions.js @@ -39,6 +39,15 @@ someOther = someDerived; // Error someOther = someBase; // Error someOther = someOther; +// Type assertion cannot be a type-predicate type +var numOrStr: number | string; +var str: string; +if((numOrStr === undefined)) { // Error + str = numOrStr; // Error, no narrowing occurred +} + +if((numOrStr === undefined) as numOrStr is string) { // Error +} @@ -87,3 +96,16 @@ someDerived = someOther; // Error someOther = someDerived; // Error someOther = someBase; // Error someOther = someOther; +// Type assertion cannot be a type-predicate type +var numOrStr; +var str; +if (is) + string > (numOrStr === undefined); +{ + str = numOrStr; // Error, no narrowing occurred +} +if ((numOrStr === undefined)) + is; +string; +{ +} diff --git a/tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts b/tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts index 2acbbe53789..f30eafb3918 100644 --- a/tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts +++ b/tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts @@ -38,4 +38,13 @@ someOther = someDerived; // Error someOther = someBase; // Error someOther = someOther; +// Type assertion cannot be a type-predicate type +var numOrStr: number | string; +var str: string; +if((numOrStr === undefined)) { // Error + str = numOrStr; // Error, no narrowing occurred +} + +if((numOrStr === undefined) as numOrStr is string) { // Error +} From 47d267cdde0344ba6c0ec18cc871494fb46963bf Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Tue, 8 Dec 2015 09:36:46 -0800 Subject: [PATCH 006/209] Move type predicate checking to checkTypePredicate Also remove now-unused "Type predicate is only allowed as a return type" diagnostic. --- src/compiler/checker.ts | 130 +++++++++++++-------------- src/compiler/diagnosticMessages.json | 4 - 2 files changed, 60 insertions(+), 74 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 30d4818592b..66ba4fcee90 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -10985,7 +10985,61 @@ namespace ts { return -1; } - function isInLegalTypePredicatePosition(node: Node): boolean { + function checkTypePredicate(node: TypePredicateNode) { + const parent = getTypePredicateParent(node); + if (!parent) { + return; + } + const typePredicate = getSignatureFromDeclaration(parent).typePredicate; + if (typePredicate.parameterIndex >= 0) { + if (parent.parameters[typePredicate.parameterIndex].dotDotDotToken) { + error(node.parameterName, + Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); + } + else { + checkTypeAssignableTo(typePredicate.type, + getTypeOfNode(parent.parameters[typePredicate.parameterIndex]), + node.type); + } + } + else if (node.parameterName) { + let hasReportedError = false; + for (var param of parent.parameters) { + if (hasReportedError) { + break; + } + if (param.name.kind === SyntaxKind.ObjectBindingPattern || + param.name.kind === SyntaxKind.ArrayBindingPattern) { + + (function checkBindingPattern(pattern: BindingPattern) { + for (const element of pattern.elements) { + if (element.name.kind === SyntaxKind.Identifier && + (element.name).text === typePredicate.parameterName) { + + error(node.parameterName, + Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, + typePredicate.parameterName); + hasReportedError = true; + break; + } + else if (element.name.kind === SyntaxKind.ArrayBindingPattern || + element.name.kind === SyntaxKind.ObjectBindingPattern) { + + checkBindingPattern(element.name); + } + } + })(param.name); + } + } + if (!hasReportedError) { + error(node.parameterName, + Diagnostics.Cannot_find_parameter_0, + typePredicate.parameterName); + } + } + } + + function getTypePredicateParent(node: Node): SignatureDeclaration { switch (node.parent.kind) { case SyntaxKind.ArrowFunction: case SyntaxKind.CallSignature: @@ -10994,9 +11048,11 @@ namespace ts { case SyntaxKind.FunctionType: case SyntaxKind.MethodDeclaration: case SyntaxKind.MethodSignature: - return node === (node.parent).type; + const parent = node.parent; + if (node === parent.type) { + return parent; + } } - return false; } function checkSignatureDeclaration(node: SignatureDeclaration) { @@ -11015,67 +11071,7 @@ namespace ts { forEach(node.parameters, checkParameter); - if (node.type) { - if (node.type.kind === SyntaxKind.TypePredicate) { - const typePredicate = getSignatureFromDeclaration(node).typePredicate; - const typePredicateNode = node.type; - if (isInLegalTypePredicatePosition(typePredicateNode)) { - if (typePredicate.parameterIndex >= 0) { - if (node.parameters[typePredicate.parameterIndex].dotDotDotToken) { - error(typePredicateNode.parameterName, - Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); - } - else { - checkTypeAssignableTo(typePredicate.type, - getTypeOfNode(node.parameters[typePredicate.parameterIndex]), - typePredicateNode.type); - } - } - else if (typePredicateNode.parameterName) { - let hasReportedError = false; - for (var param of node.parameters) { - if (hasReportedError) { - break; - } - if (param.name.kind === SyntaxKind.ObjectBindingPattern || - param.name.kind === SyntaxKind.ArrayBindingPattern) { - - (function checkBindingPattern(pattern: BindingPattern) { - for (const element of pattern.elements) { - if (element.name.kind === SyntaxKind.Identifier && - (element.name).text === typePredicate.parameterName) { - - error(typePredicateNode.parameterName, - Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, - typePredicate.parameterName); - hasReportedError = true; - break; - } - else if (element.name.kind === SyntaxKind.ArrayBindingPattern || - element.name.kind === SyntaxKind.ObjectBindingPattern) { - - checkBindingPattern(element.name); - } - } - })(param.name); - } - } - if (!hasReportedError) { - error(typePredicateNode.parameterName, - Diagnostics.Cannot_find_parameter_0, - typePredicate.parameterName); - } - } - } - else { - error(typePredicateNode, - Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); - } - } - else { - checkSourceElement(node.type); - } - } + checkSourceElement(node.type); if (produceDiagnostics) { checkCollisionWithArgumentsInGeneratedCode(node); @@ -14217,12 +14213,6 @@ namespace ts { } } - function checkTypePredicate(node: TypePredicateNode) { - if (!isInLegalTypePredicatePosition(node)) { - error(node, Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); - } - } - function checkSourceElement(node: Node): void { if (!node) { return; diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 331568eae22..bc5a252b304 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -711,10 +711,6 @@ "category": "Error", "code": 1227 }, - "A type predicate is only allowed in return type position for functions and methods.": { - "category": "Error", - "code": 1228 - }, "A type predicate cannot reference a rest parameter.": { "category": "Error", "code": 1229 From 3306ee8a91ff8114238d5c990468e21cd0b21257 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Tue, 8 Dec 2015 09:39:25 -0800 Subject: [PATCH 007/209] Accept baselines --- .../typeGuardFunctionErrors.errors.txt | 107 +++++++++++++----- .../reference/typeGuardFunctionErrors.js | 16 ++- 2 files changed, 91 insertions(+), 32 deletions(-) diff --git a/tests/baselines/reference/typeGuardFunctionErrors.errors.txt b/tests/baselines/reference/typeGuardFunctionErrors.errors.txt index 92d9d21f0cc..470ad00bcf7 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.errors.txt +++ b/tests/baselines/reference/typeGuardFunctionErrors.errors.txt @@ -1,15 +1,21 @@ +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(2,7): error TS2300: Duplicate identifier 'A'. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(15,12): error TS2322: Type 'string' is not assignable to type 'boolean'. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(18,55): error TS2304: Cannot find name 'x'. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(18,57): error TS1144: '{' or ';' expected. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(18,57): error TS2304: Cannot find name 'is'. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(18,60): error TS1005: ';' expected. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(18,62): error TS1005: ';' expected. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(22,33): error TS2304: Cannot find name 'x'. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(26,33): error TS1225: Cannot find parameter 'x'. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(30,10): error TS2391: Function implementation is missing or not immediately following the declaration. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(31,5): error TS1131: Property or signature expected. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(31,5): error TS7027: Unreachable code detected. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(32,1): error TS1128: Declaration or statement expected. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(34,38): error TS1225: Cannot find parameter 'x'. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(38,51): error TS2322: Type 'B' is not assignable to type 'A'. Property 'propA' is missing in type 'B'. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(42,56): error TS2322: Type 'number' is not assignable to type 'string'. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(46,56): error TS2322: Type 'T[]' is not assignable to type 'string'. -tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(50,1): error TS7027: Unreachable code detected. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(60,7): error TS2339: Property 'propB' does not exist on type 'A'. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(65,7): error TS2339: Property 'propB' does not exist on type 'A'. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(70,7): error TS2339: Property 'propB' does not exist on type 'A'. @@ -22,27 +28,40 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(85,1): Type predicate 'p2 is A' is not assignable to 'p1 is A'. Parameter 'p2' is not in the same position as parameter 'p1'. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(91,1): error TS2322: Type '(p1: any, p2: any, p3: any) => p1 is A' is not assignable to type '(p1: any, p2: any) => p1 is A'. -tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(96,9): error TS1228: A type predicate is only allowed in return type position for functions and methods. -tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(97,16): error TS1228: A type predicate is only allowed in return type position for functions and methods. -tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(98,20): error TS1228: A type predicate is only allowed in return type position for functions and methods. -tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(104,25): error TS1228: A type predicate is only allowed in return type position for functions and methods. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(96,9): error TS2304: Cannot find name 'b'. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(96,11): error TS1005: '=' expected. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(96,11): error TS2304: Cannot find name 'is'. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(96,14): error TS1005: ',' expected. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(96,14): error TS2300: Duplicate identifier 'A'. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(97,16): error TS2304: Cannot find name 'b'. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(97,18): error TS1005: '=' expected. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(97,18): error TS2304: Cannot find name 'is'. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(97,21): error TS1005: ',' expected. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(98,20): error TS2304: Cannot find name 'b'. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(98,22): error TS1144: '{' or ';' expected. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(98,22): error TS2304: Cannot find name 'is'. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(98,25): error TS1005: ';' expected. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(98,27): error TS1005: ';' expected. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(105,16): error TS2322: Type 'boolean' is not assignable to type 'D'. Property 'm1' is missing in type 'Boolean'. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(105,16): error TS2409: Return type of constructor signature must be assignable to the instance type of the class -tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(107,20): error TS1228: A type predicate is only allowed in return type position for functions and methods. -tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(110,20): error TS1228: A type predicate is only allowed in return type position for functions and methods. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(111,16): error TS2408: Setters cannot return a value. -tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(116,18): error TS1228: A type predicate is only allowed in return type position for functions and methods. -tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(120,22): error TS1228: A type predicate is only allowed in return type position for functions and methods. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(120,22): error TS2304: Cannot find name 'p1'. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(120,25): error TS1005: ';' expected. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(120,25): error TS2304: Cannot find name 'is'. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(120,28): error TS1005: ';' expected. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(121,1): error TS1128: Declaration or statement expected. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(124,20): error TS1229: A type predicate cannot reference a rest parameter. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(129,34): error TS1230: A type predicate cannot reference element 'p1' in a binding pattern. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(133,34): error TS1230: A type predicate cannot reference element 'p1' in a binding pattern. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(137,39): error TS1230: A type predicate cannot reference element 'p1' in a binding pattern. -==== tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts (33 errors) ==== +==== tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts (50 errors) ==== class A { + ~ +!!! error TS2300: Duplicate identifier 'A'. propA: number; } @@ -61,6 +80,16 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(137,39 } function hasTypeGuardTypeInsideTypeGuardType(x): x is x is A { + ~ +!!! error TS2304: Cannot find name 'x'. + ~~ +!!! error TS1144: '{' or ';' expected. + ~~ +!!! error TS2304: Cannot find name 'is'. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1005: ';' expected. return true; } @@ -82,6 +111,8 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(137,39 return true; ~~~~~~ !!! error TS1131: Property or signature expected. + ~~~~~~ +!!! error TS7027: Unreachable code detected. } ~ !!! error TS1128: Declaration or statement expected. @@ -112,8 +143,6 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(137,39 } let a: A; - ~~~ -!!! error TS7027: Unreachable code detected. let b: B; declare function isB(p1): p1 is B; @@ -179,22 +208,42 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(137,39 // Type predicates in non-return type positions var b1: b is A; - ~~~~~~ -!!! error TS1228: A type predicate is only allowed in return type position for functions and methods. + ~ +!!! error TS2304: Cannot find name 'b'. + ~~ +!!! error TS1005: '=' expected. + ~~ +!!! error TS2304: Cannot find name 'is'. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS2300: Duplicate identifier 'A'. function b2(a: b is A) {}; - ~~~~~~ -!!! error TS1228: A type predicate is only allowed in return type position for functions and methods. + ~ +!!! error TS2304: Cannot find name 'b'. + ~~ +!!! error TS1005: '=' expected. + ~~ +!!! error TS2304: Cannot find name 'is'. + ~ +!!! error TS1005: ',' expected. function b3(): A | b is A { - ~~~~~~ -!!! error TS1228: A type predicate is only allowed in return type position for functions and methods. + ~ +!!! error TS2304: Cannot find name 'b'. + ~~ +!!! error TS1144: '{' or ';' expected. + ~~ +!!! error TS2304: Cannot find name 'is'. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1005: ';' expected. return true; }; // Non-compatiable type predicate positions for signature declarations class D { constructor(p1: A): p1 is C { - ~~~~~~~ -!!! error TS1228: A type predicate is only allowed in return type position for functions and methods. return true; ~~~~ !!! error TS2322: Type 'boolean' is not assignable to type 'D'. @@ -203,13 +252,9 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(137,39 !!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class } get m1(p1: A): p1 is C { - ~~~~~~~ -!!! error TS1228: A type predicate is only allowed in return type position for functions and methods. return true; } set m2(p1: A): p1 is C { - ~~~~~~~ -!!! error TS1228: A type predicate is only allowed in return type position for functions and methods. return true; ~~~~ !!! error TS2408: Setters cannot return a value. @@ -218,15 +263,21 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(137,39 interface I1 { new (p1: A): p1 is C; - ~~~~~~~ -!!! error TS1228: A type predicate is only allowed in return type position for functions and methods. } interface I2 { [index: number]: p1 is C; - ~~~~~~~ -!!! error TS1228: A type predicate is only allowed in return type position for functions and methods. + ~~ +!!! error TS2304: Cannot find name 'p1'. + ~~ +!!! error TS1005: ';' expected. + ~~ +!!! error TS2304: Cannot find name 'is'. + ~ +!!! error TS1005: ';' expected. } + ~ +!!! error TS1128: Declaration or statement expected. // Reference to rest parameter function b4(...a): a is A { diff --git a/tests/baselines/reference/typeGuardFunctionErrors.js b/tests/baselines/reference/typeGuardFunctionErrors.js index 4923f544345..1d1660fe924 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.js +++ b/tests/baselines/reference/typeGuardFunctionErrors.js @@ -171,7 +171,9 @@ var C = (function (_super) { function hasANonBooleanReturnStatement(x) { return ''; } -function hasTypeGuardTypeInsideTypeGuardType(x) { +is; +A; +{ return true; } function hasMissingIsKeyword() { @@ -224,10 +226,14 @@ assign3 = function (p1, p2, p3) { return true; }; // Type predicates in non-return type positions -var b1; -function b2(a) { } +var b1 = is, A; +function b2(a, A) { + if (a === void 0) { a = is; } +} ; -function b3() { +is; +A; +{ return true; } ; @@ -252,6 +258,8 @@ var D = (function () { }); return D; })(); +is; +C; // Reference to rest parameter function b4() { var a = []; From a4e21d78582a4aa47835f660a683bfbf49351de3 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Tue, 8 Dec 2015 12:52:19 -0800 Subject: [PATCH 008/209] Address comments --- src/compiler/checker.ts | 62 ++++++++++++++++++++++------------------- src/compiler/parser.ts | 6 ++-- 2 files changed, 37 insertions(+), 31 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 66ba4fcee90..fed9c026717 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -11004,37 +11004,19 @@ namespace ts { } else if (node.parameterName) { let hasReportedError = false; - for (var param of parent.parameters) { - if (hasReportedError) { - break; - } - if (param.name.kind === SyntaxKind.ObjectBindingPattern || - param.name.kind === SyntaxKind.ArrayBindingPattern) { - - (function checkBindingPattern(pattern: BindingPattern) { - for (const element of pattern.elements) { - if (element.name.kind === SyntaxKind.Identifier && - (element.name).text === typePredicate.parameterName) { - - error(node.parameterName, - Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, - typePredicate.parameterName); - hasReportedError = true; - break; - } - else if (element.name.kind === SyntaxKind.ArrayBindingPattern || - element.name.kind === SyntaxKind.ObjectBindingPattern) { - - checkBindingPattern(element.name); - } - } - })(param.name); + for (const param of parent.parameters) { + if ((param.name.kind === SyntaxKind.ObjectBindingPattern || + param.name.kind === SyntaxKind.ArrayBindingPattern) && + checkBindingPatternForTypePredicateVariable( + param.name, + node.parameterName, + typePredicate.parameterName)) { + hasReportedError = true; + break; } } if (!hasReportedError) { - error(node.parameterName, - Diagnostics.Cannot_find_parameter_0, - typePredicate.parameterName); + error(node.parameterName, Diagnostics.Cannot_find_parameter_0, typePredicate.parameterName); } } } @@ -11055,6 +11037,30 @@ namespace ts { } } + function checkBindingPatternForTypePredicateVariable( + pattern: BindingPattern, + predicateVariableNode: Node, + predicateVariableName: string) { + for (const element of pattern.elements) { + if (element.name.kind === SyntaxKind.Identifier && + (element.name).text === predicateVariableName) { + error(predicateVariableNode, + Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, + predicateVariableName); + return true; + } + else if (element.name.kind === SyntaxKind.ArrayBindingPattern || + element.name.kind === SyntaxKind.ObjectBindingPattern) { + if (checkBindingPatternForTypePredicateVariable( + element.name, + predicateVariableNode, + predicateVariableName)) { + return true; + } + } + } + } + function checkSignatureDeclaration(node: SignatureDeclaration) { // Grammar checking if (node.kind === SyntaxKind.IndexSignature) { diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 1c41003a7a1..e146e809122 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -2545,15 +2545,15 @@ namespace ts { return id; } }); - const t = parseType(); + const type = parseType(); if (typePredicateVariable) { const node = createNode(SyntaxKind.TypePredicate, typePredicateVariable.pos); node.parameterName = typePredicateVariable; - node.type = t; + node.type = type; return finishNode(node); } else { - return t; + return type; } } From f9846ff2bc2a253a0ff900b508c3cb25164225bb Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Tue, 8 Dec 2015 14:11:46 -0800 Subject: [PATCH 009/209] Address comments --- src/compiler/parser.ts | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index e146e809122..f28f82ed401 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -2538,13 +2538,11 @@ namespace ts { } function parseTypeOrTypePredicate(): TypeNode { - const typePredicateVariable = tryParse(() => { - const id = parseIdentifier(); - if (token === SyntaxKind.IsKeyword && !scanner.hasPrecedingLineBreak()) { - nextToken(); - return id; - } - }); + let typePredicateVariable: Identifier; + if (isIdentifier()) { + typePredicateVariable = tryParse(parseTypePredicatePrefix); + } + const type = parseType(); if (typePredicateVariable) { const node = createNode(SyntaxKind.TypePredicate, typePredicateVariable.pos); @@ -2557,6 +2555,14 @@ namespace ts { } } + function parseTypePredicatePrefix() { + const id = parseIdentifier(); + if (token === SyntaxKind.IsKeyword && !scanner.hasPrecedingLineBreak()) { + nextToken(); + return id; + } + } + function parseType(): TypeNode { // The rules about 'yield' only apply to actual code/expression contexts. They don't // apply to 'type' contexts. So we disable these parameters here before moving on. From 06badd0e0d334d5496a79a4b39f25d4cafffe053 Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 8 Dec 2015 18:53:37 -0800 Subject: [PATCH 010/209] Update tests --- tests/cases/fourslash/tsxCompletion11.ts | 7 ++++++ tests/cases/fourslash/tsxCompletion12.ts | 8 +++++++ tests/cases/fourslash/tsxCompletion13.ts | 8 +++++++ tests/cases/fourslash/tsxCompletion14.ts | 8 +++++++ tests/cases/fourslash/tsxCompletion15.ts | 9 +++++++ tests/cases/fourslash/tsxCompletion16.ts | 7 ++++++ tests/cases/fourslash/tsxCompletion17.ts | 8 +++++++ tests/cases/fourslash/tsxCompletion18.ts | 30 ++++++++++++++++++++++++ tests/cases/fourslash/tsxQuickInfo1.ts | 18 ++++++++++++++ tests/cases/fourslash/tsxQuickInfo2.ts | 24 +++++++++++++++++++ 10 files changed, 127 insertions(+) create mode 100644 tests/cases/fourslash/tsxCompletion11.ts create mode 100644 tests/cases/fourslash/tsxCompletion12.ts create mode 100644 tests/cases/fourslash/tsxCompletion13.ts create mode 100644 tests/cases/fourslash/tsxCompletion14.ts create mode 100644 tests/cases/fourslash/tsxCompletion15.ts create mode 100644 tests/cases/fourslash/tsxCompletion16.ts create mode 100644 tests/cases/fourslash/tsxCompletion17.ts create mode 100644 tests/cases/fourslash/tsxCompletion18.ts create mode 100644 tests/cases/fourslash/tsxQuickInfo1.ts create mode 100644 tests/cases/fourslash/tsxQuickInfo2.ts diff --git a/tests/cases/fourslash/tsxCompletion11.ts b/tests/cases/fourslash/tsxCompletion11.ts new file mode 100644 index 00000000000..70626a84791 --- /dev/null +++ b/tests/cases/fourslash/tsxCompletion11.ts @@ -0,0 +1,7 @@ +/// + +//@Filename: file.tsx +//// var x1 = + +//@Filename: file.tsx +//// var x1 =
+ +//@Filename: file.tsx +//// class MyElement {} +//// var x1 = + +//@Filename: file.tsx +//// class MyElement {} +//// var x1 = + +//@Filename: file.tsx +//// class MyElement {} +//// var x1 = + +//@Filename: file.tsx +//// var x1 = + +//@Filename: file.tsx +//// var x1 = + +//@Filename: file.tsx +//// var x =
+////

+//// +//// +//// + +goTo.marker("1"); +verify.memberListCount(1); +verify.completionListContains('h1'); + +goTo.marker("2"); +verify.memberListCount(1); +verify.completionListContains('div'); + +goTo.marker("3"); +verify.memberListCount(0); + +goTo.marker("4"); +verify.memberListCount(1); +verify.completionListContains('div'); + +goTo.marker("5"); +verify.memberListCount(0); + +goTo.marker("6"); +verify.memberListCount(1); +verify.completionListContains('div'); \ No newline at end of file diff --git a/tests/cases/fourslash/tsxQuickInfo1.ts b/tests/cases/fourslash/tsxQuickInfo1.ts new file mode 100644 index 00000000000..b1db1eb4a47 --- /dev/null +++ b/tests/cases/fourslash/tsxQuickInfo1.ts @@ -0,0 +1,18 @@ +/// + +//@Filename: file.tsx +//// var x1 = +//// class MyElement {} +//// var z = + +goTo.marker("1"); +verify.quickInfoIs("any", undefined); + +goTo.marker("2"); +verify.quickInfoIs("any", undefined);; + +goTo.marker("3"); +verify.quickInfoIs("class MyElement", undefined);; + +goTo.marker("4"); +verify.quickInfoIs("class MyElement", undefined);; \ No newline at end of file diff --git a/tests/cases/fourslash/tsxQuickInfo2.ts b/tests/cases/fourslash/tsxQuickInfo2.ts new file mode 100644 index 00000000000..0eb7a5100c4 --- /dev/null +++ b/tests/cases/fourslash/tsxQuickInfo2.ts @@ -0,0 +1,24 @@ +/// + +//@Filename: file.tsx +//// declare module JSX { +//// interface Element { } +//// interface IntrinsicElements { +//// div: any +//// } +//// } +//// var x1 = +//// class MyElement {} +//// var z = + +goTo.marker("1"); +verify.quickInfoIs("(property) JSX.IntrinsicElements.div: any", undefined); + +goTo.marker("2"); +verify.quickInfoIs("(property) JSX.IntrinsicElements.div: any", undefined);; + +goTo.marker("3"); +verify.quickInfoIs("class MyElement", undefined);; + +goTo.marker("4"); +verify.quickInfoIs("class MyElement", undefined);; \ No newline at end of file From 48894e5023d94770a8d2422d8f0d9d937372f5bd Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 8 Dec 2015 18:54:29 -0800 Subject: [PATCH 011/209] Don't include completion in opening tag, include name of opening in closing tag --- src/compiler/checker.ts | 8 ++++++-- src/compiler/types.ts | 3 ++- src/services/services.ts | 40 ++++++++++++++++++++++++++++++++-------- 3 files changed, 40 insertions(+), 11 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 30d4818592b..f02520b24fd 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -61,6 +61,7 @@ namespace ts { getTypeCount: () => typeCount, isUndefinedSymbol: symbol => symbol === undefinedSymbol, isArgumentsSymbol: symbol => symbol === argumentsSymbol, + isUnknownSymbol: symbol => symbol === unknownSymbol, getDiagnostics, getGlobalDiagnostics, @@ -7979,6 +7980,7 @@ namespace ts { if (compilerOptions.noImplicitAny) { error(node, Diagnostics.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists, JsxNames.IntrinsicElements); } + return unknownSymbol; } } @@ -14574,7 +14576,7 @@ namespace ts { return false; } - function getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[] { + function getSymbolsInScope(location: Node, meaning: SymbolFlags, includeAllGlobalSymbols: boolean): Symbol[] { const symbols: SymbolTable = {}; let memberFlags: NodeFlags = 0; @@ -14637,7 +14639,9 @@ namespace ts { location = location.parent; } - copySymbols(globals, meaning); + if (includeAllGlobalSymbols) { + copySymbols(globals, meaning); + } } /** diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 9411437c981..eb93ceee093 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1717,7 +1717,7 @@ namespace ts { getBaseTypes(type: InterfaceType): ObjectType[]; getReturnTypeOfSignature(signature: Signature): Type; - getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; + getSymbolsInScope(location: Node, meaning: SymbolFlags, includeAllGlobalSymbols: boolean): Symbol[]; getSymbolAtLocation(node: Node): Symbol; getShorthandAssignmentValueSymbol(location: Node): Symbol; getTypeAtLocation(node: Node): Type; @@ -1733,6 +1733,7 @@ namespace ts { isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; isUndefinedSymbol(symbol: Symbol): boolean; isArgumentsSymbol(symbol: Symbol): boolean; + isUnknownSymbol(symbol: Symbol): boolean; getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; diff --git a/src/services/services.ts b/src/services/services.ts index a9dda549ead..7e12a521a4d 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -3099,6 +3099,7 @@ namespace ts { } else if (kind === SyntaxKind.SlashToken && contextToken.parent.kind === SyntaxKind.JsxClosingElement) { isStartingCloseTag = true; + location = contextToken; } } } @@ -3113,7 +3114,9 @@ namespace ts { } else if (isRightOfOpenTag) { let tagSymbols = typeChecker.getJsxIntrinsicTagNames(); - if (tryGetGlobalSymbols()) { + // If the currect cursor is inside JSX opening tag, the only meaningful completions are those of JSX.IntrinsicElements or users defined React.Component + // If the services can't find those symbols, then show nothing instead of including all the global symbols in the completion list. + if (tryGetGlobalSymbols(/*includeAllGlobalSymbols*/false)) { symbols = tagSymbols.concat(symbols.filter(s => !!(s.flags & SymbolFlags.Value))); } else { @@ -3123,8 +3126,12 @@ namespace ts { isNewIdentifierLocation = false; } else if (isStartingCloseTag) { - let tagName = (contextToken.parent.parent).openingElement.tagName; - symbols = [typeChecker.getSymbolAtLocation(tagName)]; + const tagName = (contextToken.parent.parent).openingElement.tagName; + const tagSymbol = typeChecker.getSymbolAtLocation(tagName); + + if (!typeChecker.isUnknownSymbol(tagSymbol)) { + symbols = [tagSymbol]; + } isMemberCompletion = true; isNewIdentifierLocation = false; @@ -3133,7 +3140,7 @@ namespace ts { // For JavaScript or TypeScript, if we're not after a dot, then just try to get the // global symbols in scope. These results should be valid for either language as // the set of symbols that can be referenced from this location. - if (!tryGetGlobalSymbols()) { + if (!tryGetGlobalSymbols(/*includeAllGlobalSymbols*/true)) { return undefined; } } @@ -3193,7 +3200,7 @@ namespace ts { } } - function tryGetGlobalSymbols(): boolean { + function tryGetGlobalSymbols(includeAllGlobalSymbols: boolean): boolean { let objectLikeContainer: ObjectLiteralExpression | BindingPattern; let namedImportsOrExports: NamedImportsOrExports; let jsxContainer: JsxOpeningLikeElement; @@ -3264,7 +3271,7 @@ namespace ts { /// TODO filter meaning based on the current context let symbolMeanings = SymbolFlags.Type | SymbolFlags.Value | SymbolFlags.Namespace | SymbolFlags.Alias; - symbols = typeChecker.getSymbolsInScope(scopeNode, symbolMeanings); + symbols = typeChecker.getSymbolsInScope(scopeNode, symbolMeanings, includeAllGlobalSymbols); return true; } @@ -3831,7 +3838,23 @@ namespace ts { } else { if (!symbols || symbols.length === 0) { - return undefined; + if (sourceFile.languageVariant === LanguageVariant.JSX && + location.parent && location.parent.kind === SyntaxKind.JsxClosingElement) { + // In the TypeScript JSX element, if such element is not defined. When users query for completion at closing tag, + // instead of simply giving unknown value, the completion will return the tag-name of an associated opening-element. + // For example: + // var x =
completion list at "1" will contain "div" with type any + const tagName = (location.parent.parent).openingElement.tagName; + entries.push({ + name: (tagName).text, + kind: undefined, + kindModifiers: undefined, + sortText: "0", + }); + } + else { + return undefined; + } } getCompletionEntriesFromSymbols(symbols, entries); @@ -3907,6 +3930,7 @@ namespace ts { function getCompletionEntriesFromSymbols(symbols: Symbol[], entries: CompletionEntry[]): Map { let start = new Date().getTime(); let uniqueNames: Map = {}; + if (symbols) { for (let symbol of symbols) { let entry = createCompletionEntry(symbol, location); @@ -4439,7 +4463,7 @@ namespace ts { let typeChecker = program.getTypeChecker(); let symbol = typeChecker.getSymbolAtLocation(node); - if (!symbol) { + if (!symbol || typeChecker.isUnknownSymbol(symbol)) { // Try getting just type at this position and show switch (node.kind) { case SyntaxKind.Identifier: From 0c699ad474983302bdfd38b3c1925df92ca07dc1 Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 8 Dec 2015 18:54:52 -0800 Subject: [PATCH 012/209] Update baseline from returning with unknownSymbol --- .../jsxEmitAttributeWithPreserve.symbols | 1 + tests/baselines/reference/jsxHash.symbols | 34 +++++++++++++++ .../reference/jsxImportInAttribute.symbols | 1 + .../reference/jsxReactTestSuite.symbols | 42 +++++++++++++++++++ .../reference/keywordInJsxIdentifier.symbols | 4 ++ .../reference/tsxElementResolution13.symbols | 1 + .../reference/tsxElementResolution14.symbols | 1 + .../reference/tsxElementResolution5.symbols | 1 + .../reference/tsxExternalModuleEmit1.symbols | 2 + tests/baselines/reference/tsxNoJsx.symbols | 6 +-- .../baselines/reference/tsxTypeErrors.symbols | 4 ++ 11 files changed, 94 insertions(+), 3 deletions(-) diff --git a/tests/baselines/reference/jsxEmitAttributeWithPreserve.symbols b/tests/baselines/reference/jsxEmitAttributeWithPreserve.symbols index 4ffadb8e888..82eceb8e637 100644 --- a/tests/baselines/reference/jsxEmitAttributeWithPreserve.symbols +++ b/tests/baselines/reference/jsxEmitAttributeWithPreserve.symbols @@ -4,5 +4,6 @@ declare var React: any; >React : Symbol(React, Decl(jsxEmitAttributeWithPreserve.tsx, 1, 11)) +>foo : Symbol(unknown) >data : Symbol(unknown) diff --git a/tests/baselines/reference/jsxHash.symbols b/tests/baselines/reference/jsxHash.symbols index 8a6ad0849f0..ddba4832d2c 100644 --- a/tests/baselines/reference/jsxHash.symbols +++ b/tests/baselines/reference/jsxHash.symbols @@ -1,34 +1,68 @@ === tests/cases/compiler/jsxHash.tsx === var t02 = {0}#; >t02 : Symbol(t02, Decl(jsxHash.tsx, 0, 3)) +>a : Symbol(unknown) +>a : Symbol(unknown) var t03 = #{0}; >t03 : Symbol(t03, Decl(jsxHash.tsx, 1, 3)) +>a : Symbol(unknown) +>a : Symbol(unknown) var t04 = #{0}#; >t04 : Symbol(t04, Decl(jsxHash.tsx, 2, 3)) +>a : Symbol(unknown) +>a : Symbol(unknown) var t05 = #; >t05 : Symbol(t05, Decl(jsxHash.tsx, 3, 3)) +>a : Symbol(unknown) +>i : Symbol(unknown) +>i : Symbol(unknown) +>a : Symbol(unknown) var t06 = #; >t06 : Symbol(t06, Decl(jsxHash.tsx, 4, 3)) +>a : Symbol(unknown) +>i : Symbol(unknown) +>i : Symbol(unknown) +>a : Symbol(unknown) var t07 = ##; >t07 : Symbol(t07, Decl(jsxHash.tsx, 5, 3)) +>a : Symbol(unknown) +>i : Symbol(unknown) +>i : Symbol(unknown) +>a : Symbol(unknown) var t08 = #; >t08 : Symbol(t08, Decl(jsxHash.tsx, 6, 3)) +>a : Symbol(unknown) +>i : Symbol(unknown) +>i : Symbol(unknown) +>a : Symbol(unknown) var t09 = ##; >t09 : Symbol(t09, Decl(jsxHash.tsx, 7, 3)) +>a : Symbol(unknown) +>i : Symbol(unknown) +>i : Symbol(unknown) +>a : Symbol(unknown) var t10 = #; >t10 : Symbol(t10, Decl(jsxHash.tsx, 8, 3)) +>a : Symbol(unknown) +>i : Symbol(unknown) +>a : Symbol(unknown) var t11 = #; >t11 : Symbol(t11, Decl(jsxHash.tsx, 9, 3)) +>a : Symbol(unknown) +>i : Symbol(unknown) +>a : Symbol(unknown) var t12 = #; >t12 : Symbol(t12, Decl(jsxHash.tsx, 10, 3)) +>a : Symbol(unknown) +>a : Symbol(unknown) diff --git a/tests/baselines/reference/jsxImportInAttribute.symbols b/tests/baselines/reference/jsxImportInAttribute.symbols index 845001b22c0..252b5cc98e4 100644 --- a/tests/baselines/reference/jsxImportInAttribute.symbols +++ b/tests/baselines/reference/jsxImportInAttribute.symbols @@ -8,6 +8,7 @@ let x = Test; // emit test_1.default >Test : Symbol(Test, Decl(consumer.tsx, 1, 6)) ; // ? +>anything : Symbol(unknown) >attr : Symbol(unknown) >Test : Symbol(Test, Decl(consumer.tsx, 1, 6)) diff --git a/tests/baselines/reference/jsxReactTestSuite.symbols b/tests/baselines/reference/jsxReactTestSuite.symbols index b86054ac560..cca1dae915b 100644 --- a/tests/baselines/reference/jsxReactTestSuite.symbols +++ b/tests/baselines/reference/jsxReactTestSuite.symbols @@ -37,21 +37,36 @@ declare var hasOwnProperty:any; >hasOwnProperty : Symbol(hasOwnProperty, Decl(jsxReactTestSuite.tsx, 12, 11))
text
; +>div : Symbol(unknown) +>div : Symbol(unknown)
+>div : Symbol(unknown) + {this.props.children}
; +>div : Symbol(unknown)
+>div : Symbol(unknown) +

+>div : Symbol(unknown) +>br : Symbol(unknown) +>div : Symbol(unknown) + {foo}
{bar}
>Component : Symbol(Component, Decl(jsxReactTestSuite.tsx, 2, 11)) >foo : Symbol(foo, Decl(jsxReactTestSuite.tsx, 7, 11)) +>br : Symbol(unknown) >bar : Symbol(bar, Decl(jsxReactTestSuite.tsx, 8, 11)) >Component : Symbol(Component, Decl(jsxReactTestSuite.tsx, 2, 11))
+>br : Symbol(unknown) +
; +>div : Symbol(unknown) @@ -74,6 +89,8 @@ var x = >x : Symbol(x, Decl(jsxReactTestSuite.tsx, 10, 11), Decl(jsxReactTestSuite.tsx, 35, 3))
div : Symbol(unknown) + attr1={ >attr1 : Symbol(unknown) @@ -97,41 +114,64 @@ var x = >attr4 : Symbol(unknown)
; +>div : Symbol(unknown) (
+>div : Symbol(unknown) + {/* A comment at the beginning */} {/* A second comment at the beginning */} +>span : Symbol(unknown) + {/* A nested comment */} +>span : Symbol(unknown) + {/* A sandwiched comment */}
+>br : Symbol(unknown) + {/* A comment at the end */} {/* A second comment at the end */}
+>div : Symbol(unknown) + ); (
div : Symbol(unknown) + /* a multi-line comment */ attr1="foo"> >attr1 : Symbol(unknown) span : Symbol(unknown) + attr2="bar" >attr2 : Symbol(unknown) />
+>div : Symbol(unknown) + );
 
; +>div : Symbol(unknown) +>div : Symbol(unknown)
 
; +>div : Symbol(unknown) +>div : Symbol(unknown) testing; +>hasOwnProperty : Symbol(unknown) +>hasOwnProperty : Symbol(unknown) ; >Component : Symbol(Component, Decl(jsxReactTestSuite.tsx, 2, 11)) @@ -158,6 +198,7 @@ var x = >sound : Symbol(unknown) ; +>font-face : Symbol(unknown) ; >Component : Symbol(Component, Decl(jsxReactTestSuite.tsx, 2, 11)) @@ -165,6 +206,7 @@ var x = >y : Symbol(y, Decl(jsxReactTestSuite.tsx, 9, 11)) ; +>x-component : Symbol(unknown) ; >Component : Symbol(Component, Decl(jsxReactTestSuite.tsx, 2, 11)) diff --git a/tests/baselines/reference/keywordInJsxIdentifier.symbols b/tests/baselines/reference/keywordInJsxIdentifier.symbols index 874d7801a7f..3cb977bee81 100644 --- a/tests/baselines/reference/keywordInJsxIdentifier.symbols +++ b/tests/baselines/reference/keywordInJsxIdentifier.symbols @@ -4,14 +4,18 @@ declare var React: any; >React : Symbol(React, Decl(keywordInJsxIdentifier.tsx, 1, 11)) ; +>foo : Symbol(unknown) >class-id : Symbol(unknown) ; +>foo : Symbol(unknown) >class : Symbol(unknown) ; +>foo : Symbol(unknown) >class-id : Symbol(unknown) ; +>foo : Symbol(unknown) >class : Symbol(unknown) diff --git a/tests/baselines/reference/tsxElementResolution13.symbols b/tests/baselines/reference/tsxElementResolution13.symbols index 94758b291ac..4b6a5b4f4e7 100644 --- a/tests/baselines/reference/tsxElementResolution13.symbols +++ b/tests/baselines/reference/tsxElementResolution13.symbols @@ -22,5 +22,6 @@ var obj1: Obj1; >Obj1 : Symbol(Obj1, Decl(file.tsx, 3, 1)) ; // Error +>obj1 : Symbol(unknown) >x : Symbol(unknown) diff --git a/tests/baselines/reference/tsxElementResolution14.symbols b/tests/baselines/reference/tsxElementResolution14.symbols index 2400ef620eb..a605606b1ed 100644 --- a/tests/baselines/reference/tsxElementResolution14.symbols +++ b/tests/baselines/reference/tsxElementResolution14.symbols @@ -17,5 +17,6 @@ var obj1: Obj1; >Obj1 : Symbol(Obj1, Decl(file.tsx, 2, 1)) ; // OK +>obj1 : Symbol(unknown) >x : Symbol(unknown) diff --git a/tests/baselines/reference/tsxElementResolution5.symbols b/tests/baselines/reference/tsxElementResolution5.symbols index 461ffd78aaa..e0fc1147083 100644 --- a/tests/baselines/reference/tsxElementResolution5.symbols +++ b/tests/baselines/reference/tsxElementResolution5.symbols @@ -8,5 +8,6 @@ declare module JSX { // OK, but implicit any
; +>div : Symbol(unknown) >n : Symbol(unknown) diff --git a/tests/baselines/reference/tsxExternalModuleEmit1.symbols b/tests/baselines/reference/tsxExternalModuleEmit1.symbols index 5e8eb2fed4e..129edcca0d1 100644 --- a/tests/baselines/reference/tsxExternalModuleEmit1.symbols +++ b/tests/baselines/reference/tsxExternalModuleEmit1.symbols @@ -44,6 +44,8 @@ export class Button extends React.Component { >render : Symbol(render, Decl(button.tsx, 2, 55)) return ; +>button : Symbol(unknown) +>button : Symbol(unknown) } } diff --git a/tests/baselines/reference/tsxNoJsx.symbols b/tests/baselines/reference/tsxNoJsx.symbols index 6744c2edb10..4492e83cf10 100644 --- a/tests/baselines/reference/tsxNoJsx.symbols +++ b/tests/baselines/reference/tsxNoJsx.symbols @@ -1,5 +1,5 @@ === tests/cases/conformance/jsx/tsxNoJsx.tsx === -No type information for this code.; -No type information for this code. -No type information for this code. \ No newline at end of file +; +>nope : Symbol(unknown) + diff --git a/tests/baselines/reference/tsxTypeErrors.symbols b/tests/baselines/reference/tsxTypeErrors.symbols index 94399b95d1f..2b87e994477 100644 --- a/tests/baselines/reference/tsxTypeErrors.symbols +++ b/tests/baselines/reference/tsxTypeErrors.symbols @@ -3,11 +3,13 @@ // A built-in element (OK) var a1 =
; >a1 : Symbol(a1, Decl(tsxTypeErrors.tsx, 2, 3)) +>div : Symbol(unknown) >id : Symbol(unknown) // A built-in element with a mistyped property (error) var a2 = >a2 : Symbol(a2, Decl(tsxTypeErrors.tsx, 5, 3)) +>img : Symbol(unknown) >srce : Symbol(unknown) // A built-in element with a badly-typed attribute value (error) @@ -17,12 +19,14 @@ var thing = { oops: 100 }; var a3 =
>a3 : Symbol(a3, Decl(tsxTypeErrors.tsx, 9, 3)) +>div : Symbol(unknown) >id : Symbol(unknown) >thing : Symbol(thing, Decl(tsxTypeErrors.tsx, 8, 3)) // Mistyped html name (error) var e1 = >e1 : Symbol(e1, Decl(tsxTypeErrors.tsx, 12, 3)) +>imag : Symbol(unknown) >src : Symbol(unknown) // A custom type From e28272235c52b3fb0f2691ca92c435f6b4c95a8f Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 8 Dec 2015 13:35:27 -0800 Subject: [PATCH 013/209] Test case for destructuring of variable statement --- ...alidationDestructuringVariableStatement.js | 35 ++ ...ationDestructuringVariableStatement.js.map | 2 + ...structuringVariableStatement.sourcemap.txt | 373 ++++++++++++++++++ ...tionDestructuringVariableStatement.symbols | 69 ++++ ...dationDestructuringVariableStatement.types | 82 ++++ ...alidationDestructuringVariableStatement.ts | 20 + 6 files changed, 581 insertions(+) create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.types create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringVariableStatement.ts diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.js b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.js new file mode 100644 index 00000000000..4bd4feab384 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.js @@ -0,0 +1,35 @@ +//// [sourceMapValidationDestructuringVariableStatement.ts] +interface Robot { + name: string; + skill: string; +} +declare var console: { + log(msg: string): void; +} +var hello = "hello"; +var robotA: Robot = { name: "mower", skill: "mowing" }; +var robotB: Robot = { name: "trimmer", skill: "trimming" }; +var { name: nameA } = robotA; +var { name: nameB, skill: skillB } = robotB; +var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }; +if (nameA == nameB) { + console.log(skillB); +} +else { + console.log(nameC); +} + +//// [sourceMapValidationDestructuringVariableStatement.js] +var hello = "hello"; +var robotA = { name: "mower", skill: "mowing" }; +var robotB = { name: "trimmer", skill: "trimming" }; +var nameA = robotA.name; +var nameB = robotB.name, skillB = robotB.skill; +var _a = { name: "Edger", skill: "cutting edges" }, nameC = _a.name, skillC = _a.skill; +if (nameA == nameB) { + console.log(skillB); +} +else { + console.log(nameC); +} +//# sourceMappingURL=sourceMapValidationDestructuringVariableStatement.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.js.map new file mode 100644 index 00000000000..e46d89596d2 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.js.map @@ -0,0 +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;AAC3D,IAAY,KAAK,GAAK,MAAM,KAAA,CAAC;AAC7B,IAAY,KAAK,GAAoB,MAAM,OAAjB,MAAM,GAAK,MAAM,MAAA,CAAC;AAC5C,IAAI,KAAiC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,EAAlE,KAAK,YAAS,MAAM,WAA8C,CAAC;AAC/E,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AACD,IAAI,CAAC,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.sourcemap.txt new file mode 100644 index 00000000000..ff8d54e5e6a --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.sourcemap.txt @@ -0,0 +1,373 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringVariableStatement.js +mapUrl: sourceMapValidationDestructuringVariableStatement.js.map +sourceRoot: +sources: sourceMapValidationDestructuringVariableStatement.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatement.js +sourceFile:sourceMapValidationDestructuringVariableStatement.ts +------------------------------------------------------------------- +>>>var hello = "hello"; +1 > +2 >^^^^ +3 > ^^^^^ +4 > ^^^ +5 > ^^^^^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 >interface Robot { + > name: string; + > skill: string; + >} + >declare var console: { + > log(msg: string): void; + >} + > +2 >var +3 > hello +4 > = +5 > "hello" +6 > ; +1 >Emitted(1, 1) Source(8, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(8, 5) + SourceIndex(0) +3 >Emitted(1, 10) Source(8, 10) + SourceIndex(0) +4 >Emitted(1, 13) Source(8, 13) + SourceIndex(0) +5 >Emitted(1, 20) Source(8, 20) + SourceIndex(0) +6 >Emitted(1, 21) Source(8, 21) + SourceIndex(0) +--- +>>>var robotA = { name: "mower", skill: "mowing" }; +1-> +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^^ +6 > ^^^^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^ +11> ^^ +12> ^^^^^^^^ +13> ^^ +14> ^ +15> ^^^^^-> +1-> + > +2 >var +3 > robotA +4 > : Robot = +5 > { +6 > name +7 > : +8 > "mower" +9 > , +10> skill +11> : +12> "mowing" +13> } +14> ; +1->Emitted(2, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(9, 5) + SourceIndex(0) +3 >Emitted(2, 11) Source(9, 11) + SourceIndex(0) +4 >Emitted(2, 14) Source(9, 21) + SourceIndex(0) +5 >Emitted(2, 16) Source(9, 23) + SourceIndex(0) +6 >Emitted(2, 20) Source(9, 27) + SourceIndex(0) +7 >Emitted(2, 22) Source(9, 29) + SourceIndex(0) +8 >Emitted(2, 29) Source(9, 36) + SourceIndex(0) +9 >Emitted(2, 31) Source(9, 38) + SourceIndex(0) +10>Emitted(2, 36) Source(9, 43) + SourceIndex(0) +11>Emitted(2, 38) Source(9, 45) + SourceIndex(0) +12>Emitted(2, 46) Source(9, 53) + SourceIndex(0) +13>Emitted(2, 48) Source(9, 55) + SourceIndex(0) +14>Emitted(2, 49) Source(9, 56) + SourceIndex(0) +--- +>>>var robotB = { name: "trimmer", skill: "trimming" }; +1-> +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^^ +6 > ^^^^ +7 > ^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^ +1-> + > +2 >var +3 > robotB +4 > : Robot = +5 > { +6 > name +7 > : +8 > "trimmer" +9 > , +10> skill +11> : +12> "trimming" +13> } +14> ; +1->Emitted(3, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(10, 5) + SourceIndex(0) +3 >Emitted(3, 11) Source(10, 11) + SourceIndex(0) +4 >Emitted(3, 14) Source(10, 21) + SourceIndex(0) +5 >Emitted(3, 16) Source(10, 23) + SourceIndex(0) +6 >Emitted(3, 20) Source(10, 27) + SourceIndex(0) +7 >Emitted(3, 22) Source(10, 29) + SourceIndex(0) +8 >Emitted(3, 31) Source(10, 38) + SourceIndex(0) +9 >Emitted(3, 33) Source(10, 40) + SourceIndex(0) +10>Emitted(3, 38) Source(10, 45) + SourceIndex(0) +11>Emitted(3, 40) Source(10, 47) + SourceIndex(0) +12>Emitted(3, 50) Source(10, 57) + SourceIndex(0) +13>Emitted(3, 52) Source(10, 59) + SourceIndex(0) +14>Emitted(3, 53) Source(10, 60) + SourceIndex(0) +--- +>>>var nameA = robotA.name; +1 > +2 >^^^^ +3 > ^^^^^ +4 > ^^^ +5 > ^^^^^^ +6 > ^^^^^ +7 > ^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >var { name: +3 > nameA +4 > } = +5 > robotA +6 > +7 > ; +1 >Emitted(4, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(4, 5) Source(11, 13) + SourceIndex(0) +3 >Emitted(4, 10) Source(11, 18) + SourceIndex(0) +4 >Emitted(4, 13) Source(11, 23) + SourceIndex(0) +5 >Emitted(4, 19) Source(11, 29) + SourceIndex(0) +6 >Emitted(4, 24) Source(11, 29) + SourceIndex(0) +7 >Emitted(4, 25) Source(11, 30) + SourceIndex(0) +--- +>>>var nameB = robotB.name, skillB = robotB.skill; +1-> +2 >^^^^ +3 > ^^^^^ +4 > ^^^ +5 > ^^^^^^ +6 > ^^^^^^^ +7 > ^^^^^^ +8 > ^^^ +9 > ^^^^^^ +10> ^^^^^^ +11> ^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >var { name: +3 > nameB +4 > , skill: skillB } = +5 > robotB +6 > +7 > skillB +8 > } = +9 > robotB +10> +11> ; +1->Emitted(5, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(5, 5) Source(12, 13) + SourceIndex(0) +3 >Emitted(5, 10) Source(12, 18) + SourceIndex(0) +4 >Emitted(5, 13) Source(12, 38) + SourceIndex(0) +5 >Emitted(5, 19) Source(12, 44) + SourceIndex(0) +6 >Emitted(5, 26) Source(12, 27) + SourceIndex(0) +7 >Emitted(5, 32) Source(12, 33) + SourceIndex(0) +8 >Emitted(5, 35) Source(12, 38) + SourceIndex(0) +9 >Emitted(5, 41) Source(12, 44) + SourceIndex(0) +10>Emitted(5, 47) Source(12, 44) + SourceIndex(0) +11>Emitted(5, 48) Source(12, 45) + SourceIndex(0) +--- +>>>var _a = { name: "Edger", skill: "cutting edges" }, nameC = _a.name, skillC = _a.skill; +1-> +2 >^^^^ +3 > ^^^^^ +4 > ^^ +5 > ^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^ +9 > ^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^ +12> ^^ +13> ^^ +14> ^^^^^ +15> ^^^^^^^^^^^^ +16> ^^^^^^ +17> ^^^^^^^^^^^ +18> ^ +1-> + > +2 >var +3 > { name: nameC, skill: skillC } = +4 > { +5 > name +6 > : +7 > "Edger" +8 > , +9 > skill +10> : +11> "cutting edges" +12> } +13> +14> nameC +15> , skill: +16> skillC +17> } = { name: "Edger", skill: "cutting edges" } +18> ; +1->Emitted(6, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(6, 5) Source(13, 5) + SourceIndex(0) +3 >Emitted(6, 10) Source(13, 38) + SourceIndex(0) +4 >Emitted(6, 12) Source(13, 40) + SourceIndex(0) +5 >Emitted(6, 16) Source(13, 44) + SourceIndex(0) +6 >Emitted(6, 18) Source(13, 46) + SourceIndex(0) +7 >Emitted(6, 25) Source(13, 53) + SourceIndex(0) +8 >Emitted(6, 27) Source(13, 55) + SourceIndex(0) +9 >Emitted(6, 32) Source(13, 60) + SourceIndex(0) +10>Emitted(6, 34) Source(13, 62) + SourceIndex(0) +11>Emitted(6, 49) Source(13, 77) + SourceIndex(0) +12>Emitted(6, 51) Source(13, 79) + SourceIndex(0) +13>Emitted(6, 53) Source(13, 13) + SourceIndex(0) +14>Emitted(6, 58) Source(13, 18) + SourceIndex(0) +15>Emitted(6, 70) Source(13, 27) + SourceIndex(0) +16>Emitted(6, 76) Source(13, 33) + SourceIndex(0) +17>Emitted(6, 87) Source(13, 79) + SourceIndex(0) +18>Emitted(6, 88) Source(13, 80) + SourceIndex(0) +--- +>>>if (nameA == nameB) { +1 > +2 >^^ +3 > ^ +4 > ^ +5 > ^^^^^ +6 > ^^^^ +7 > ^^^^^ +8 > ^ +9 > ^ +10> ^ +11> ^^^^-> +1 > + > +2 >if +3 > +4 > ( +5 > nameA +6 > == +7 > nameB +8 > ) +9 > +10> { +1 >Emitted(7, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(7, 3) Source(14, 3) + SourceIndex(0) +3 >Emitted(7, 4) Source(14, 4) + SourceIndex(0) +4 >Emitted(7, 5) Source(14, 5) + SourceIndex(0) +5 >Emitted(7, 10) Source(14, 10) + SourceIndex(0) +6 >Emitted(7, 14) Source(14, 14) + SourceIndex(0) +7 >Emitted(7, 19) Source(14, 19) + SourceIndex(0) +8 >Emitted(7, 20) Source(14, 20) + SourceIndex(0) +9 >Emitted(7, 21) Source(14, 21) + SourceIndex(0) +10>Emitted(7, 22) Source(14, 22) + SourceIndex(0) +--- +>>> console.log(skillB); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1-> + > +2 > console +3 > . +4 > log +5 > ( +6 > skillB +7 > ) +8 > ; +1->Emitted(8, 5) Source(15, 5) + SourceIndex(0) +2 >Emitted(8, 12) Source(15, 12) + SourceIndex(0) +3 >Emitted(8, 13) Source(15, 13) + SourceIndex(0) +4 >Emitted(8, 16) Source(15, 16) + SourceIndex(0) +5 >Emitted(8, 17) Source(15, 17) + SourceIndex(0) +6 >Emitted(8, 23) Source(15, 23) + SourceIndex(0) +7 >Emitted(8, 24) Source(15, 24) + SourceIndex(0) +8 >Emitted(8, 25) Source(15, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^-> +1 > + > +2 >} +1 >Emitted(9, 1) Source(16, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(16, 2) + SourceIndex(0) +--- +>>>else { +1-> +2 >^^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >else +3 > +4 > { +1->Emitted(10, 1) Source(17, 1) + SourceIndex(0) +2 >Emitted(10, 5) Source(17, 5) + SourceIndex(0) +3 >Emitted(10, 6) Source(17, 6) + SourceIndex(0) +4 >Emitted(10, 7) Source(17, 7) + SourceIndex(0) +--- +>>> console.log(nameC); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1-> + > +2 > console +3 > . +4 > log +5 > ( +6 > nameC +7 > ) +8 > ; +1->Emitted(11, 5) Source(18, 5) + SourceIndex(0) +2 >Emitted(11, 12) Source(18, 12) + SourceIndex(0) +3 >Emitted(11, 13) Source(18, 13) + SourceIndex(0) +4 >Emitted(11, 16) Source(18, 16) + SourceIndex(0) +5 >Emitted(11, 17) Source(18, 17) + SourceIndex(0) +6 >Emitted(11, 22) Source(18, 22) + SourceIndex(0) +7 >Emitted(11, 23) Source(18, 23) + SourceIndex(0) +8 >Emitted(11, 24) Source(18, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(12, 1) Source(19, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(19, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatement.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.symbols b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.symbols new file mode 100644 index 00000000000..3d8e925d8b3 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.symbols @@ -0,0 +1,69 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatement.ts === +interface Robot { +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatement.ts, 0, 0)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatement.ts, 0, 17)) + + skill: string; +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringVariableStatement.ts, 1, 17)) +} +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatement.ts, 4, 11)) + + log(msg: string): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatement.ts, 4, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringVariableStatement.ts, 5, 8)) +} +var hello = "hello"; +>hello : Symbol(hello, Decl(sourceMapValidationDestructuringVariableStatement.ts, 7, 3)) + +var robotA: Robot = { name: "mower", skill: "mowing" }; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringVariableStatement.ts, 8, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatement.ts, 0, 0)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatement.ts, 8, 21)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringVariableStatement.ts, 8, 36)) + +var robotB: Robot = { name: "trimmer", skill: "trimming" }; +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatement.ts, 9, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatement.ts, 0, 0)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatement.ts, 9, 21)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringVariableStatement.ts, 9, 38)) + +var { name: nameA } = robotA; +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringVariableStatement.ts, 0, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringVariableStatement.ts, 10, 5)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringVariableStatement.ts, 8, 3)) + +var { name: nameB, skill: skillB } = robotB; +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringVariableStatement.ts, 0, 17)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatement.ts, 11, 5)) +>skill : Symbol(Robot.skill, Decl(sourceMapValidationDestructuringVariableStatement.ts, 1, 17)) +>skillB : Symbol(skillB, Decl(sourceMapValidationDestructuringVariableStatement.ts, 11, 18)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatement.ts, 9, 3)) + +var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }; +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatement.ts, 12, 38)) +>nameC : Symbol(nameC, Decl(sourceMapValidationDestructuringVariableStatement.ts, 12, 5)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringVariableStatement.ts, 12, 53)) +>skillC : Symbol(skillC, Decl(sourceMapValidationDestructuringVariableStatement.ts, 12, 18)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatement.ts, 12, 38)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringVariableStatement.ts, 12, 53)) + +if (nameA == nameB) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringVariableStatement.ts, 10, 5)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatement.ts, 11, 5)) + + console.log(skillB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatement.ts, 4, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatement.ts, 4, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatement.ts, 4, 22)) +>skillB : Symbol(skillB, Decl(sourceMapValidationDestructuringVariableStatement.ts, 11, 18)) +} +else { + console.log(nameC); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatement.ts, 4, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatement.ts, 4, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatement.ts, 4, 22)) +>nameC : Symbol(nameC, Decl(sourceMapValidationDestructuringVariableStatement.ts, 12, 5)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.types new file mode 100644 index 00000000000..82a2ffe88f6 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.types @@ -0,0 +1,82 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatement.ts === +interface Robot { +>Robot : Robot + + name: string; +>name : string + + skill: string; +>skill : string +} +declare var console: { +>console : { log(msg: string): void; } + + log(msg: string): void; +>log : (msg: string) => void +>msg : string +} +var hello = "hello"; +>hello : string +>"hello" : string + +var robotA: Robot = { name: "mower", skill: "mowing" }; +>robotA : Robot +>Robot : Robot +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string + +var robotB: Robot = { name: "trimmer", skill: "trimming" }; +>robotB : Robot +>Robot : Robot +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string + +var { name: nameA } = robotA; +>name : any +>nameA : string +>robotA : Robot + +var { name: nameB, skill: skillB } = robotB; +>name : any +>nameB : string +>skill : any +>skillB : string +>robotB : Robot + +var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }; +>name : any +>nameC : string +>skill : any +>skillC : string +>{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } +>name : string +>"Edger" : string +>skill : string +>"cutting edges" : string + +if (nameA == nameB) { +>nameA == nameB : boolean +>nameA : string +>nameB : string + + console.log(skillB); +>console.log(skillB) : void +>console.log : (msg: string) => void +>console : { log(msg: string): void; } +>log : (msg: string) => void +>skillB : string +} +else { + console.log(nameC); +>console.log(nameC) : void +>console.log : (msg: string) => void +>console : { log(msg: string): void; } +>log : (msg: string) => void +>nameC : string +} diff --git a/tests/cases/compiler/sourceMapValidationDestructuringVariableStatement.ts b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatement.ts new file mode 100644 index 00000000000..88e49498f60 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatement.ts @@ -0,0 +1,20 @@ +// @sourcemap: true +interface Robot { + name: string; + skill: string; +} +declare var console: { + log(msg: string): void; +} +var hello = "hello"; +var robotA: Robot = { name: "mower", skill: "mowing" }; +var robotB: Robot = { name: "trimmer", skill: "trimming" }; +var { name: nameA } = robotA; +var { name: nameB, skill: skillB } = robotB; +var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }; +if (nameA == nameB) { + console.log(skillB); +} +else { + console.log(nameC); +} \ No newline at end of file From 4ebf5695a70e813cea337add0585f84437e5ea4a Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 3 Dec 2015 14:20:25 -0800 Subject: [PATCH 014/209] Better sourcemaps for destructuring --- src/compiler/emitter.ts | 62 ++++++-- src/compiler/sourcemap.ts | 12 +- src/compiler/utilities.ts | 2 +- ...ationDestructuringVariableStatement.js.map | 2 +- ...structuringVariableStatement.sourcemap.txt | 142 ++++++------------ 5 files changed, 101 insertions(+), 119 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index a73d7374b59..ab5e6bfb774 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -464,8 +464,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi const writer = createTextWriter(newLine); const { write, writeTextOfNode, writeLine, increaseIndent, decreaseIndent } = writer; - const sourceMap = compilerOptions.sourceMap || compilerOptions.inlineSourceMap ? createSourceMapWriter(host, writer) : getNullSourceMapWriter(); - const { setSourceFile, emitStart, emitEnd, emitPos } = sourceMap; + let sourceMap = compilerOptions.sourceMap || compilerOptions.inlineSourceMap ? createSourceMapWriter(host, writer) : getNullSourceMapWriter(); + let { setSourceFile, emitStart, emitEnd, emitPos } = sourceMap; let currentSourceFile: SourceFile; let currentText: string; @@ -512,6 +512,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi /** If removeComments is true, no leading-comments needed to be emitted **/ const emitLeadingCommentsOfPosition = compilerOptions.removeComments ? function (pos: number) { } : emitLeadingCommentsOfPositionWorker; + const setSourceMapWriterEmit = compilerOptions.sourceMap || compilerOptions.inlineSourceMap ? changeSourceMapEmit : function (writer: SourceMapWriter) { }; + const moduleEmitDelegates: Map<(node: SourceFile, emitRelativePathAsModuleName?: boolean) => void> = { [ModuleKind.ES6]: emitES6Module, [ModuleKind.AMD]: emitAMDModule, @@ -2573,7 +2575,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi leftHandSideExpression.argumentExpression.kind !== SyntaxKind.StringLiteral) { const tempArgumentExpression = createAndRecordTempVariable(TempFlags._i); (synthesizedLHS).argumentExpression = tempArgumentExpression; - emitAssignment(tempArgumentExpression, leftHandSideExpression.argumentExpression, /*shouldEmitCommaBeforeAssignment*/ true); + emitAssignment(tempArgumentExpression, leftHandSideExpression.argumentExpression, /*shouldEmitCommaBeforeAssignment*/ true, leftHandSideExpression.expression); } else { (synthesizedLHS).argumentExpression = leftHandSideExpression.argumentExpression; @@ -3728,7 +3730,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi * @param value an expression as a right-hand-side operand of the assignment * @param shouldEmitCommaBeforeAssignment a boolean indicating whether to prefix an assignment with comma */ - function emitAssignment(name: Identifier, value: Expression, shouldEmitCommaBeforeAssignment: boolean) { + function emitAssignment(name: Identifier, value: Expression, shouldEmitCommaBeforeAssignment: boolean, nodeForSourceMap: TextRange) { if (shouldEmitCommaBeforeAssignment) { write(", "); } @@ -3744,15 +3746,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi const isVariableDeclarationOrBindingElement = name.parent && (name.parent.kind === SyntaxKind.VariableDeclaration || name.parent.kind === SyntaxKind.BindingElement); - if (isVariableDeclarationOrBindingElement) { - emitModuleMemberName(name.parent); - } - else { - emit(name); - } + emitStart(nodeForSourceMap); + withTemporaryNoSourceMap(() => { + if (isVariableDeclarationOrBindingElement) { + emitModuleMemberName(name.parent); + } + else { + emit(name); + } - write(" = "); - emit(value); + write(" = "); + emit(value); + }); + emitEnd(nodeForSourceMap, /*stopOverridingSpan*/true); if (exportChanged) { write(")"); @@ -3770,7 +3776,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi if (!canDefineTempVariablesInPlace) { recordTempDeclaration(identifier); } - emitAssignment(identifier, expression, shouldEmitCommaBeforeAssignment); + emitAssignment(identifier, expression, shouldEmitCommaBeforeAssignment, expression); return identifier; } @@ -3929,7 +3935,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emitArrayLiteralAssignment(target, value); } else { - emitAssignment(target, value, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0); + // TODO + emitAssignment(target, value, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0, { pos: -1, end: -1 }); emitCount++; } } @@ -3999,7 +4006,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } } else { - emitAssignment(target.name, value, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0); + let nodeForSourceMap: Node; + // If binding element is part of binding pattern with single element, use binding pattern + if (target.kind === SyntaxKind.BindingElement && (target.parent).elements.length === 1) { + nodeForSourceMap = (target.parent.parent.kind === SyntaxKind.VariableDeclaration || target.parent.parent.kind === SyntaxKind.Parameter) ? + target.parent.parent : // Set sourcemap as whole variable declaration + target.parent; // Only binding Pattern + } + else { + nodeForSourceMap = target; // Binding Element + } + emitAssignment(target.name, value, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0, nodeForSourceMap); emitCount++; } } @@ -7434,6 +7451,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } } + function changeSourceMapEmit(writer: SourceMapWriter) { + sourceMap = writer; + emitStart = writer.emitStart; + emitEnd = writer.emitEnd; + emitPos = writer.emitPos; + setSourceFile = writer.setSourceFile; + } + + function withTemporaryNoSourceMap(callback: () => void) { + const prevSourceMap = sourceMap; + setSourceMapWriterEmit(getNullSourceMapWriter()); + callback(); + setSourceMapWriterEmit(prevSourceMap); + } + function isSpecializedCommentHandling(node: Node): boolean { switch (node.kind) { // All of these entities are emitted in a specialized fashion. As such, we allow diff --git a/src/compiler/sourcemap.ts b/src/compiler/sourcemap.ts index d98dc233c16..982c37e3fe8 100644 --- a/src/compiler/sourcemap.ts +++ b/src/compiler/sourcemap.ts @@ -7,7 +7,7 @@ namespace ts { setSourceFile(sourceFile: SourceFile): void; emitPos(pos: number): void; emitStart(range: TextRange): void; - emitEnd(range: TextRange): void; + emitEnd(range: TextRange, stopOverridingSpan?: boolean): void; getText(): string; getSourceMappingURL(): string; initialize(filePath: string, sourceMapFilePath: string, sourceFiles: SourceFile[], isBundledEmit: boolean): void; @@ -23,7 +23,7 @@ namespace ts { getSourceMapData(): SourceMapData { return undefined; }, setSourceFile(sourceFile: SourceFile): void { }, emitStart(range: TextRange): void { }, - emitEnd(range: TextRange): void { }, + emitEnd(range: TextRange, stopOverridingSpan?: boolean): void { }, emitPos(pos: number): void { }, getText(): string { return undefined; }, getSourceMappingURL(): string { return undefined; }, @@ -39,6 +39,7 @@ namespace ts { const compilerOptions = host.getCompilerOptions(); let currentSourceFile: SourceFile; let sourceMapDir: string; // The directory in which sourcemap will be + let stopOverridingSpan = false; // Current source map file and its index in the sources list let sourceMapSourceIndex: number; @@ -220,8 +221,10 @@ namespace ts { sourceColumn: sourceLinePos.character, sourceIndex: sourceMapSourceIndex }; + + stopOverridingSpan = false; } - else { + else if (!stopOverridingSpan) { // Take the new pos instead since there is no change in emittedLine and column since last location lastRecordedSourceMapSpan.sourceLine = sourceLinePos.line; lastRecordedSourceMapSpan.sourceColumn = sourceLinePos.character; @@ -234,8 +237,9 @@ namespace ts { emitPos(range.pos !== -1 ? skipTrivia(currentSourceFile.text, rangeHasDecorators ? (range as Node).decorators.end : range.pos) : -1); } - function emitEnd(range: TextRange) { + function emitEnd(range: TextRange, stopOverridingEnd?: boolean) { emitPos(range.end); + stopOverridingSpan = stopOverridingEnd; } function setSourceFile(sourceFile: SourceFile) { diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 95bf4ff7fa3..0f0f50719c1 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1616,7 +1616,7 @@ namespace ts { return node.kind === SyntaxKind.QualifiedName; } - export function nodeIsSynthesized(node: Node): boolean { + export function nodeIsSynthesized(node: Node | TextRange): boolean { return node.pos === -1; } diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.js.map index e46d89596d2..b70ebc3bc1d 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;AAC3D,IAAY,KAAK,GAAK,MAAM,KAAA,CAAC;AAC7B,IAAY,KAAK,GAAoB,MAAM,OAAjB,MAAM,GAAK,MAAM,MAAA,CAAC;AAC5C,IAAI,KAAiC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,EAAlE,KAAK,YAAS,MAAM,WAA8C,CAAC;AAC/E,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AACD,IAAI,CAAC,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"} \ 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;AAC3D,IAAI,mBAAwB,CAAC;AAC7B,IAAM,mBAAW,EAAE,qBAAa,CAAY;AAC5C,IAAqC,8CAAyC,EAAxE,eAAW,EAAE,iBAAa,CAA+C;AAC/E,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AACD,IAAI,CAAC,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.sourcemap.txt index ff8d54e5e6a..36f31e00216 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.sourcemap.txt @@ -130,121 +130,67 @@ sourceFile:sourceMapValidationDestructuringVariableStatement.ts >>>var nameA = robotA.name; 1 > 2 >^^^^ -3 > ^^^^^ -4 > ^^^ -5 > ^^^^^^ -6 > ^^^^^ -7 > ^ -8 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -2 >var { name: -3 > nameA -4 > } = -5 > robotA -6 > -7 > ; +2 >var +3 > { name: nameA } = robotA +4 > ; 1 >Emitted(4, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(11, 13) + SourceIndex(0) -3 >Emitted(4, 10) Source(11, 18) + SourceIndex(0) -4 >Emitted(4, 13) Source(11, 23) + SourceIndex(0) -5 >Emitted(4, 19) Source(11, 29) + SourceIndex(0) -6 >Emitted(4, 24) Source(11, 29) + SourceIndex(0) -7 >Emitted(4, 25) Source(11, 30) + SourceIndex(0) +2 >Emitted(4, 5) Source(11, 5) + SourceIndex(0) +3 >Emitted(4, 24) Source(11, 29) + SourceIndex(0) +4 >Emitted(4, 25) Source(11, 30) + SourceIndex(0) --- >>>var nameB = robotB.name, skillB = robotB.skill; 1-> 2 >^^^^ -3 > ^^^^^ -4 > ^^^ -5 > ^^^^^^ -6 > ^^^^^^^ -7 > ^^^^^^ -8 > ^^^ -9 > ^^^^^^ -10> ^^^^^^ -11> ^ -12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^^^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -2 >var { name: -3 > nameB -4 > , skill: skillB } = -5 > robotB -6 > -7 > skillB -8 > } = -9 > robotB -10> -11> ; +2 >var { +3 > name: nameB +4 > , +5 > skill: skillB +6 > } = robotB; 1->Emitted(5, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(5, 5) Source(12, 13) + SourceIndex(0) -3 >Emitted(5, 10) Source(12, 18) + SourceIndex(0) -4 >Emitted(5, 13) Source(12, 38) + SourceIndex(0) -5 >Emitted(5, 19) Source(12, 44) + SourceIndex(0) -6 >Emitted(5, 26) Source(12, 27) + SourceIndex(0) -7 >Emitted(5, 32) Source(12, 33) + SourceIndex(0) -8 >Emitted(5, 35) Source(12, 38) + SourceIndex(0) -9 >Emitted(5, 41) Source(12, 44) + SourceIndex(0) -10>Emitted(5, 47) Source(12, 44) + SourceIndex(0) -11>Emitted(5, 48) Source(12, 45) + SourceIndex(0) +2 >Emitted(5, 5) Source(12, 7) + SourceIndex(0) +3 >Emitted(5, 24) Source(12, 18) + SourceIndex(0) +4 >Emitted(5, 26) Source(12, 20) + SourceIndex(0) +5 >Emitted(5, 47) Source(12, 33) + SourceIndex(0) +6 >Emitted(5, 48) Source(12, 45) + SourceIndex(0) --- >>>var _a = { name: "Edger", skill: "cutting edges" }, nameC = _a.name, skillC = _a.skill; 1-> 2 >^^^^ -3 > ^^^^^ -4 > ^^ -5 > ^^^^ -6 > ^^ -7 > ^^^^^^^ -8 > ^^ -9 > ^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^ -12> ^^ -13> ^^ -14> ^^^^^ -15> ^^^^^^^^^^^^ -16> ^^^^^^ -17> ^^^^^^^^^^^ -18> ^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^ 1-> > -2 >var -3 > { name: nameC, skill: skillC } = -4 > { -5 > name -6 > : -7 > "Edger" -8 > , -9 > skill -10> : -11> "cutting edges" -12> } -13> -14> nameC -15> , skill: -16> skillC -17> } = { name: "Edger", skill: "cutting edges" } -18> ; +2 >var { name: nameC, skill: skillC } = +3 > { name: "Edger", skill: "cutting edges" } +4 > +5 > name: nameC +6 > , +7 > skill: skillC +8 > } = { name: "Edger", skill: "cutting edges" }; 1->Emitted(6, 1) Source(13, 1) + SourceIndex(0) -2 >Emitted(6, 5) Source(13, 5) + SourceIndex(0) -3 >Emitted(6, 10) Source(13, 38) + SourceIndex(0) -4 >Emitted(6, 12) Source(13, 40) + SourceIndex(0) -5 >Emitted(6, 16) Source(13, 44) + SourceIndex(0) -6 >Emitted(6, 18) Source(13, 46) + SourceIndex(0) -7 >Emitted(6, 25) Source(13, 53) + SourceIndex(0) -8 >Emitted(6, 27) Source(13, 55) + SourceIndex(0) -9 >Emitted(6, 32) Source(13, 60) + SourceIndex(0) -10>Emitted(6, 34) Source(13, 62) + SourceIndex(0) -11>Emitted(6, 49) Source(13, 77) + SourceIndex(0) -12>Emitted(6, 51) Source(13, 79) + SourceIndex(0) -13>Emitted(6, 53) Source(13, 13) + SourceIndex(0) -14>Emitted(6, 58) Source(13, 18) + SourceIndex(0) -15>Emitted(6, 70) Source(13, 27) + SourceIndex(0) -16>Emitted(6, 76) Source(13, 33) + SourceIndex(0) -17>Emitted(6, 87) Source(13, 79) + SourceIndex(0) -18>Emitted(6, 88) Source(13, 80) + SourceIndex(0) +2 >Emitted(6, 5) Source(13, 38) + 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) +8 >Emitted(6, 88) Source(13, 80) + SourceIndex(0) --- >>>if (nameA == nameB) { 1 > From b497cbc63521d78ddeab17d07cf54578f170333b Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 3 Dec 2015 16:28:38 -0800 Subject: [PATCH 015/209] Test case for nested object binding pattern in variable statement --- ...ableStatementNestedObjectBindingPattern.js | 38 ++ ...StatementNestedObjectBindingPattern.js.map | 2 + ...ntNestedObjectBindingPattern.sourcemap.txt | 371 ++++++++++++++++++ ...tatementNestedObjectBindingPattern.symbols | 89 +++++ ...eStatementNestedObjectBindingPattern.types | 107 +++++ ...ableStatementNestedObjectBindingPattern.ts | 24 ++ 6 files changed, 631 insertions(+) create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.types create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js new file mode 100644 index 00000000000..4988514324b --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js @@ -0,0 +1,38 @@ +//// [sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts] +declare var console: { + log(msg: string): void; +} +interface Robot { + name: string; + skills: { + primary: string; + secondary: string; + }; +} +var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +var robotB: Robot = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }; + +var { skills: { primary: primaryA, secondary: secondaryA } } = robotA; +var { name: nameB, skills: { primary: primaryB, secondary: secondaryB } } = robotB; +var { name: nameC, skills: { primary: primaryB, secondary: secondaryB } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; + +if (nameB == nameB) { + console.log(nameC); +} +else { + console.log(nameC); +} + +//// [sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js] +var robotA = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +var robotB = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }; +var _a = robotA.skills, primaryA = _a.primary, secondaryA = _a.secondary; +var nameB = robotB.name, _b = robotB.skills, primaryB = _b.primary, secondaryB = _b.secondary; +var _c = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }, nameC = _c.name, _d = _c.skills, primaryB = _d.primary, secondaryB = _d.secondary; +if (nameB == nameB) { + console.log(nameC); +} +else { + console.log(nameC); +} +//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js.map new file mode 100644 index 00000000000..19d3843a9dc --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js.map @@ -0,0 +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;AAE9F,IAAI,oBAAY,qBAAiB,EAAE,yBAAqB,CAAc;AACtE,IAAM,mBAAW,sBAAY,qBAAiB,EAAE,yBAAqB,CAAc;AACnF,IAA4E,mFAA8E,EAApJ,eAAW,kBAAY,qBAAiB,EAAE,yBAAqB,CAAsF;AAE3J,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,IAAI,CAAC,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.sourcemap.txt new file mode 100644 index 00000000000..15045ba9e71 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.sourcemap.txt @@ -0,0 +1,371 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js +mapUrl: sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js.map +sourceRoot: +sources: sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js +sourceFile:sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts +------------------------------------------------------------------- +>>>var robotA = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^^ +6 > ^^^^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^^ +12> ^^ +13> ^^^^^^^ +14> ^^ +15> ^^^^^^^^ +16> ^^ +17> ^^^^^^^^^ +18> ^^ +19> ^^^^^^ +20> ^^ +21> ^^ +22> ^ +23> ^^^^^^^-> +1 >declare var console: { + > log(msg: string): void; + >} + >interface Robot { + > name: string; + > skills: { + > primary: string; + > secondary: string; + > }; + >} + > +2 >var +3 > robotA +4 > : Robot = +5 > { +6 > name +7 > : +8 > "mower" +9 > , +10> skills +11> : +12> { +13> primary +14> : +15> "mowing" +16> , +17> secondary +18> : +19> "none" +20> } +21> } +22> ; +1 >Emitted(1, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(11, 5) + SourceIndex(0) +3 >Emitted(1, 11) Source(11, 11) + SourceIndex(0) +4 >Emitted(1, 14) Source(11, 21) + SourceIndex(0) +5 >Emitted(1, 16) Source(11, 23) + SourceIndex(0) +6 >Emitted(1, 20) Source(11, 27) + SourceIndex(0) +7 >Emitted(1, 22) Source(11, 29) + SourceIndex(0) +8 >Emitted(1, 29) Source(11, 36) + SourceIndex(0) +9 >Emitted(1, 31) Source(11, 38) + SourceIndex(0) +10>Emitted(1, 37) Source(11, 44) + SourceIndex(0) +11>Emitted(1, 39) Source(11, 46) + SourceIndex(0) +12>Emitted(1, 41) Source(11, 48) + SourceIndex(0) +13>Emitted(1, 48) Source(11, 55) + SourceIndex(0) +14>Emitted(1, 50) Source(11, 57) + SourceIndex(0) +15>Emitted(1, 58) Source(11, 65) + SourceIndex(0) +16>Emitted(1, 60) Source(11, 67) + SourceIndex(0) +17>Emitted(1, 69) Source(11, 76) + SourceIndex(0) +18>Emitted(1, 71) Source(11, 78) + SourceIndex(0) +19>Emitted(1, 77) Source(11, 84) + SourceIndex(0) +20>Emitted(1, 79) Source(11, 86) + SourceIndex(0) +21>Emitted(1, 81) Source(11, 88) + SourceIndex(0) +22>Emitted(1, 82) Source(11, 89) + SourceIndex(0) +--- +>>>var robotB = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }; +1-> +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^^ +6 > ^^^^ +7 > ^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^^ +12> ^^ +13> ^^^^^^^ +14> ^^ +15> ^^^^^^^^^^ +16> ^^ +17> ^^^^^^^^^ +18> ^^ +19> ^^^^^^^^ +20> ^^ +21> ^^ +22> ^ +1-> + > +2 >var +3 > robotB +4 > : Robot = +5 > { +6 > name +7 > : +8 > "trimmer" +9 > , +10> skills +11> : +12> { +13> primary +14> : +15> "trimming" +16> , +17> secondary +18> : +19> "edging" +20> } +21> } +22> ; +1->Emitted(2, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(12, 5) + SourceIndex(0) +3 >Emitted(2, 11) Source(12, 11) + SourceIndex(0) +4 >Emitted(2, 14) Source(12, 21) + SourceIndex(0) +5 >Emitted(2, 16) Source(12, 23) + SourceIndex(0) +6 >Emitted(2, 20) Source(12, 27) + SourceIndex(0) +7 >Emitted(2, 22) Source(12, 29) + SourceIndex(0) +8 >Emitted(2, 31) Source(12, 38) + SourceIndex(0) +9 >Emitted(2, 33) Source(12, 40) + SourceIndex(0) +10>Emitted(2, 39) Source(12, 46) + SourceIndex(0) +11>Emitted(2, 41) Source(12, 48) + SourceIndex(0) +12>Emitted(2, 43) Source(12, 50) + SourceIndex(0) +13>Emitted(2, 50) Source(12, 57) + SourceIndex(0) +14>Emitted(2, 52) Source(12, 59) + SourceIndex(0) +15>Emitted(2, 62) Source(12, 69) + SourceIndex(0) +16>Emitted(2, 64) Source(12, 71) + SourceIndex(0) +17>Emitted(2, 73) Source(12, 80) + SourceIndex(0) +18>Emitted(2, 75) Source(12, 82) + SourceIndex(0) +19>Emitted(2, 83) Source(12, 90) + SourceIndex(0) +20>Emitted(2, 85) Source(12, 92) + SourceIndex(0) +21>Emitted(2, 87) Source(12, 94) + SourceIndex(0) +22>Emitted(2, 88) Source(12, 95) + SourceIndex(0) +--- +>>>var _a = robotA.skills, primaryA = _a.primary, secondaryA = _a.secondary; +1 > +2 >^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^ +8 > ^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >var +3 > { skills: { +4 > primary: primaryA +5 > , +6 > secondary: secondaryA +7 > } } = robotA; +1 >Emitted(3, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(14, 5) + SourceIndex(0) +3 >Emitted(3, 25) Source(14, 17) + SourceIndex(0) +4 >Emitted(3, 46) Source(14, 34) + SourceIndex(0) +5 >Emitted(3, 48) Source(14, 36) + SourceIndex(0) +6 >Emitted(3, 73) Source(14, 57) + SourceIndex(0) +7 >Emitted(3, 74) Source(14, 71) + SourceIndex(0) +--- +>>>var nameB = robotB.name, _b = robotB.skills, primaryB = _b.primary, secondaryB = _b.secondary; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >var { +3 > name: nameB +4 > , skills: { +5 > primary: primaryB +6 > , +7 > secondary: secondaryB +8 > } } = robotB; +1->Emitted(4, 1) Source(15, 1) + SourceIndex(0) +2 >Emitted(4, 5) Source(15, 7) + SourceIndex(0) +3 >Emitted(4, 24) Source(15, 18) + SourceIndex(0) +4 >Emitted(4, 46) Source(15, 30) + SourceIndex(0) +5 >Emitted(4, 67) Source(15, 47) + SourceIndex(0) +6 >Emitted(4, 69) Source(15, 49) + SourceIndex(0) +7 >Emitted(4, 94) Source(15, 70) + SourceIndex(0) +8 >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; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^ +6 > ^^^^^^^^^^^^^^^^^^ +7 > ^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^ +1-> + > +2 >var { name: nameC, skills: { primary: primaryB, secondary: secondaryB } } = +3 > { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } +4 > +5 > name: nameC +6 > , skills: { +7 > primary: primaryB +8 > , +9 > secondary: secondaryB +10> } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; +1->Emitted(5, 1) Source(16, 1) + SourceIndex(0) +2 >Emitted(5, 5) Source(16, 77) + SourceIndex(0) +3 >Emitted(5, 88) Source(16, 155) + SourceIndex(0) +4 >Emitted(5, 90) Source(16, 7) + SourceIndex(0) +5 >Emitted(5, 105) Source(16, 18) + SourceIndex(0) +6 >Emitted(5, 123) Source(16, 30) + SourceIndex(0) +7 >Emitted(5, 144) Source(16, 47) + SourceIndex(0) +8 >Emitted(5, 146) Source(16, 49) + SourceIndex(0) +9 >Emitted(5, 171) Source(16, 70) + SourceIndex(0) +10>Emitted(5, 172) Source(16, 156) + SourceIndex(0) +--- +>>>if (nameB == nameB) { +1 > +2 >^^ +3 > ^ +4 > ^ +5 > ^^^^^ +6 > ^^^^ +7 > ^^^^^ +8 > ^ +9 > ^ +10> ^ +11> ^^^-> +1 > + > + > +2 >if +3 > +4 > ( +5 > nameB +6 > == +7 > nameB +8 > ) +9 > +10> { +1 >Emitted(6, 1) Source(18, 1) + SourceIndex(0) +2 >Emitted(6, 3) Source(18, 3) + SourceIndex(0) +3 >Emitted(6, 4) Source(18, 4) + SourceIndex(0) +4 >Emitted(6, 5) Source(18, 5) + SourceIndex(0) +5 >Emitted(6, 10) Source(18, 10) + SourceIndex(0) +6 >Emitted(6, 14) Source(18, 14) + SourceIndex(0) +7 >Emitted(6, 19) Source(18, 19) + SourceIndex(0) +8 >Emitted(6, 20) Source(18, 20) + SourceIndex(0) +9 >Emitted(6, 21) Source(18, 21) + SourceIndex(0) +10>Emitted(6, 22) Source(18, 22) + SourceIndex(0) +--- +>>> console.log(nameC); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1-> + > +2 > console +3 > . +4 > log +5 > ( +6 > nameC +7 > ) +8 > ; +1->Emitted(7, 5) Source(19, 5) + SourceIndex(0) +2 >Emitted(7, 12) Source(19, 12) + SourceIndex(0) +3 >Emitted(7, 13) Source(19, 13) + SourceIndex(0) +4 >Emitted(7, 16) Source(19, 16) + SourceIndex(0) +5 >Emitted(7, 17) Source(19, 17) + SourceIndex(0) +6 >Emitted(7, 22) Source(19, 22) + SourceIndex(0) +7 >Emitted(7, 23) Source(19, 23) + SourceIndex(0) +8 >Emitted(7, 24) Source(19, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^-> +1 > + > +2 >} +1 >Emitted(8, 1) Source(20, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(20, 2) + SourceIndex(0) +--- +>>>else { +1-> +2 >^^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >else +3 > +4 > { +1->Emitted(9, 1) Source(21, 1) + SourceIndex(0) +2 >Emitted(9, 5) Source(21, 5) + SourceIndex(0) +3 >Emitted(9, 6) Source(21, 6) + SourceIndex(0) +4 >Emitted(9, 7) Source(21, 7) + SourceIndex(0) +--- +>>> console.log(nameC); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1-> + > +2 > console +3 > . +4 > log +5 > ( +6 > nameC +7 > ) +8 > ; +1->Emitted(10, 5) Source(22, 5) + SourceIndex(0) +2 >Emitted(10, 12) Source(22, 12) + SourceIndex(0) +3 >Emitted(10, 13) Source(22, 13) + SourceIndex(0) +4 >Emitted(10, 16) Source(22, 16) + SourceIndex(0) +5 >Emitted(10, 17) Source(22, 17) + SourceIndex(0) +6 >Emitted(10, 22) Source(22, 22) + SourceIndex(0) +7 >Emitted(10, 23) Source(22, 23) + SourceIndex(0) +8 >Emitted(10, 24) Source(22, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(11, 1) Source(23, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(23, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.symbols b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.symbols new file mode 100644 index 00000000000..09b66f24ad8 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.symbols @@ -0,0 +1,89 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 0, 11)) + + log(msg: string): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 1, 8)) +} +interface Robot { +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 2, 1)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 3, 17)) + + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 4, 17)) + + primary: string; +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 5, 13)) + + secondary: string; +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 6, 24)) + + }; +} +var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 10, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 10, 21)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 10, 36)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 10, 46)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 10, 65)) + +var robotB: Robot = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }; +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 11, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 11, 21)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 11, 38)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 11, 48)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 11, 69)) + +var { skills: { primary: primaryA, secondary: secondaryA } } = robotA; +>skills : Symbol(Robot.skills, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 4, 17)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 5, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 13, 15)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 6, 24)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 13, 34)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 10, 3)) + +var { name: nameB, skills: { primary: primaryB, secondary: secondaryB } } = robotB; +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 3, 17)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 14, 5)) +>skills : Symbol(Robot.skills, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 4, 17)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 5, 13)) +>primaryB : Symbol(primaryB, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 14, 28), Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 15, 28)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 6, 24)) +>secondaryB : Symbol(secondaryB, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 14, 47), Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 15, 47)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 11, 3)) + +var { name: nameC, skills: { primary: primaryB, secondary: secondaryB } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 15, 77)) +>nameC : Symbol(nameC, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 15, 5)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 15, 92)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 15, 102)) +>primaryB : Symbol(primaryB, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 14, 28), Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 15, 28)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 15, 121)) +>secondaryB : Symbol(secondaryB, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 14, 47), Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 15, 47)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 15, 77)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 15, 92)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 15, 102)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 15, 121)) + +if (nameB == nameB) { +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 14, 5)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 14, 5)) + + console.log(nameC); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 0, 22)) +>nameC : Symbol(nameC, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 15, 5)) +} +else { + console.log(nameC); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 0, 22)) +>nameC : Symbol(nameC, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts, 15, 5)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.types new file mode 100644 index 00000000000..1101b01b1a7 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.types @@ -0,0 +1,107 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts === +declare var console: { +>console : { log(msg: string): void; } + + log(msg: string): void; +>log : (msg: string) => void +>msg : string +} +interface Robot { +>Robot : Robot + + name: string; +>name : string + + skills: { +>skills : { primary: string; secondary: string; } + + primary: string; +>primary : string + + secondary: string; +>secondary : string + + }; +} +var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +>robotA : Robot +>Robot : Robot +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"mower" : string +>skills : { primary: string; secondary: string; } +>{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } +>primary : string +>"mowing" : string +>secondary : string +>"none" : string + +var robotB: Robot = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }; +>robotB : Robot +>Robot : Robot +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + +var { skills: { primary: primaryA, secondary: secondaryA } } = robotA; +>skills : any +>primary : any +>primaryA : string +>secondary : any +>secondaryA : string +>robotA : Robot + +var { name: nameB, skills: { primary: primaryB, secondary: secondaryB } } = robotB; +>name : any +>nameB : string +>skills : any +>primary : any +>primaryB : string +>secondary : any +>secondaryB : string +>robotB : Robot + +var { name: nameC, skills: { primary: primaryB, secondary: secondaryB } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; +>name : any +>nameC : string +>skills : any +>primary : any +>primaryB : string +>secondary : any +>secondaryB : string +>{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"Edger" : string +>skills : { primary: string; secondary: string; } +>{ primary: "edging", secondary: "branch trimming" } : { primary: string; secondary: string; } +>primary : string +>"edging" : string +>secondary : string +>"branch trimming" : string + +if (nameB == nameB) { +>nameB == nameB : boolean +>nameB : string +>nameB : string + + console.log(nameC); +>console.log(nameC) : void +>console.log : (msg: string) => void +>console : { log(msg: string): void; } +>log : (msg: string) => void +>nameC : string +} +else { + console.log(nameC); +>console.log(nameC) : void +>console.log : (msg: string) => void +>console : { log(msg: string): void; } +>log : (msg: string) => void +>nameC : string +} diff --git a/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts new file mode 100644 index 00000000000..a40e5f11ebb --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts @@ -0,0 +1,24 @@ +// @sourcemap: true +declare var console: { + log(msg: string): void; +} +interface Robot { + name: string; + skills: { + primary: string; + secondary: string; + }; +} +var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +var robotB: Robot = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }; + +var { skills: { primary: primaryA, secondary: secondaryA } } = robotA; +var { name: nameB, skills: { primary: primaryB, secondary: secondaryB } } = robotB; +var { name: nameC, skills: { primary: primaryB, secondary: secondaryB } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; + +if (nameB == nameB) { + console.log(nameC); +} +else { + console.log(nameC); +} \ No newline at end of file From 8af2160922aeadd7c2e024438fff88fda078cf05 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 3 Dec 2015 16:41:58 -0800 Subject: [PATCH 016/209] Make nested object literal destructuring pattern better --- src/compiler/emitter.ts | 9 +- src/compiler/sourcemap.ts | 9 ++ src/compiler/utilities.ts | 7 ++ ...StatementNestedObjectBindingPattern.js.map | 2 +- ...ntNestedObjectBindingPattern.sourcemap.txt | 113 ++++++++++-------- 5 files changed, 85 insertions(+), 55 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index ab5e6bfb774..d46d9d47210 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1979,16 +1979,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } function createPropertyAccessExpression(expression: Expression, name: Identifier): PropertyAccessExpression { - const result = createSynthesizedNode(SyntaxKind.PropertyAccessExpression); + const result = createSourceMappedSynthesizedNode(SyntaxKind.PropertyAccessExpression, name); result.expression = parenthesizeForAccess(expression); result.dotToken = createSynthesizedNode(SyntaxKind.DotToken); result.name = name; - return result; } function createElementAccessExpression(expression: Expression, argumentExpression: Expression): ElementAccessExpression { - const result = createSynthesizedNode(SyntaxKind.ElementAccessExpression); + const result = createSourceMappedSynthesizedNode(SyntaxKind.ElementAccessExpression, argumentExpression); result.expression = parenthesizeForAccess(expression); result.argumentExpression = argumentExpression; @@ -2016,7 +2015,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi return expr; } - const node = createSynthesizedNode(SyntaxKind.ParenthesizedExpression); + const node = createSourceMappedSynthesizedNode(SyntaxKind.ParenthesizedExpression, expr); node.expression = expr; return node; } @@ -3862,7 +3861,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi else { // We create a synthetic copy of the identifier in order to avoid the rewriting that might // otherwise occur when the identifier is emitted. - index = createSynthesizedNode(propName.kind); + index = createSourceMappedSynthesizedNode(propName.kind, propName); (index).text = (propName).text; } diff --git a/src/compiler/sourcemap.ts b/src/compiler/sourcemap.ts index 982c37e3fe8..680c48cfaa4 100644 --- a/src/compiler/sourcemap.ts +++ b/src/compiler/sourcemap.ts @@ -232,12 +232,21 @@ namespace ts { } } + function getSourceMapRange(range: TextRange) { + while ((range as SynthesizedNode).sourceMapNode) { + range = (range as SynthesizedNode).sourceMapNode; + } + return range; + } + function emitStart(range: TextRange) { + range = getSourceMapRange(range); const rangeHasDecorators = !!(range as Node).decorators; emitPos(range.pos !== -1 ? skipTrivia(currentSourceFile.text, rangeHasDecorators ? (range as Node).decorators.end : range.pos) : -1); } function emitEnd(range: TextRange, stopOverridingEnd?: boolean) { + range = getSourceMapRange(range); emitPos(range.end); stopOverridingSpan = stopOverridingEnd; } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 0f0f50719c1..03cdf26a4ad 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -12,6 +12,7 @@ namespace ts { leadingCommentRanges?: CommentRange[]; trailingCommentRanges?: CommentRange[]; startsOnNewLine: boolean; + sourceMapNode?: Node; } export function getDeclarationOfKind(symbol: Symbol, kind: SyntaxKind): Declaration { @@ -1626,6 +1627,12 @@ namespace ts { return node; } + export function createSourceMappedSynthesizedNode(kind: SyntaxKind, sourceMapNode: Node, startsOnNewLine?: boolean): Node { + const synthesizedNode = createSynthesizedNode(kind, startsOnNewLine); + synthesizedNode.sourceMapNode = sourceMapNode; + return synthesizedNode; + } + export function createSynthesizedNodeArray(): NodeArray { const array = >[]; array.pos = -1; diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js.map index 19d3843a9dc..6723a44d68b 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;AAE9F,IAAI,oBAAY,qBAAiB,EAAE,yBAAqB,CAAc;AACtE,IAAM,mBAAW,sBAAY,qBAAiB,EAAE,yBAAqB,CAAc;AACnF,IAA4E,mFAA8E,EAApJ,eAAW,kBAAY,qBAAiB,EAAE,yBAAqB,CAAsF;AAE3J,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,IAAI,CAAC,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"} \ 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;AAE9F,IAAM,kBAAM,EAAI,qBAAiB,EAAE,yBAAqB,CAAc;AACtE,IAAM,mBAAW,EAAE,kBAAM,EAAI,qBAAiB,EAAE,yBAAqB,CAAc;AACnF,IAA4E,mFAA8E,EAApJ,eAAW,EAAE,cAAM,EAAI,qBAAiB,EAAE,yBAAqB,CAAsF;AAE3J,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,IAAI,CAAC,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.sourcemap.txt index 15045ba9e71..085104bad32 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.sourcemap.txt @@ -159,56 +159,65 @@ sourceFile:sourceMapValidationDestructuringVariableStatementNestedObjectBindingP >>>var _a = robotA.skills, primaryA = _a.primary, secondaryA = _a.secondary; 1 > 2 >^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ -7 > ^ -8 > ^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^ +9 > ^^^^^^^^^^^^^^^^^^^^^^-> 1 > > > -2 >var -3 > { skills: { -4 > primary: primaryA -5 > , -6 > secondary: secondaryA -7 > } } = robotA; +2 >var { +3 > skills +4 > : { +5 > primary: primaryA +6 > , +7 > secondary: secondaryA +8 > } } = robotA; 1 >Emitted(3, 1) Source(14, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(14, 5) + SourceIndex(0) -3 >Emitted(3, 25) Source(14, 17) + SourceIndex(0) -4 >Emitted(3, 46) Source(14, 34) + SourceIndex(0) -5 >Emitted(3, 48) Source(14, 36) + SourceIndex(0) -6 >Emitted(3, 73) Source(14, 57) + SourceIndex(0) -7 >Emitted(3, 74) Source(14, 71) + SourceIndex(0) +2 >Emitted(3, 5) Source(14, 7) + SourceIndex(0) +3 >Emitted(3, 23) Source(14, 13) + 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) +8 >Emitted(3, 74) Source(14, 71) + SourceIndex(0) --- >>>var nameB = robotB.name, _b = robotB.skills, primaryB = _b.primary, secondaryB = _b.secondary; 1-> 2 >^^^^ 3 > ^^^^^^^^^^^^^^^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^ -8 > ^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >var { 3 > name: nameB -4 > , skills: { -5 > primary: primaryB -6 > , -7 > secondary: secondaryB -8 > } } = robotB; +4 > , +5 > skills +6 > : { +7 > primary: primaryB +8 > , +9 > secondary: secondaryB +10> } } = robotB; 1->Emitted(4, 1) Source(15, 1) + SourceIndex(0) 2 >Emitted(4, 5) Source(15, 7) + SourceIndex(0) 3 >Emitted(4, 24) Source(15, 18) + SourceIndex(0) -4 >Emitted(4, 46) Source(15, 30) + SourceIndex(0) -5 >Emitted(4, 67) Source(15, 47) + SourceIndex(0) -6 >Emitted(4, 69) Source(15, 49) + SourceIndex(0) -7 >Emitted(4, 94) Source(15, 70) + SourceIndex(0) -8 >Emitted(4, 95) Source(15, 84) + SourceIndex(0) +4 >Emitted(4, 26) Source(15, 20) + SourceIndex(0) +5 >Emitted(4, 44) Source(15, 26) + SourceIndex(0) +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) +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; 1-> @@ -216,32 +225,38 @@ sourceFile:sourceMapValidationDestructuringVariableStatementNestedObjectBindingP 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4 > ^^ 5 > ^^^^^^^^^^^^^^^ -6 > ^^^^^^^^^^^^^^^^^^ -7 > ^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ -10> ^ +6 > ^^ +7 > ^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^ 1-> > 2 >var { name: nameC, skills: { primary: primaryB, secondary: secondaryB } } = 3 > { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } 4 > 5 > name: nameC -6 > , skills: { -7 > primary: primaryB -8 > , -9 > secondary: secondaryB -10> } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; +6 > , +7 > skills +8 > : { +9 > primary: primaryB +10> , +11> secondary: secondaryB +12> } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; 1->Emitted(5, 1) Source(16, 1) + SourceIndex(0) 2 >Emitted(5, 5) Source(16, 77) + SourceIndex(0) 3 >Emitted(5, 88) Source(16, 155) + SourceIndex(0) 4 >Emitted(5, 90) Source(16, 7) + SourceIndex(0) 5 >Emitted(5, 105) Source(16, 18) + SourceIndex(0) -6 >Emitted(5, 123) Source(16, 30) + SourceIndex(0) -7 >Emitted(5, 144) Source(16, 47) + SourceIndex(0) -8 >Emitted(5, 146) Source(16, 49) + SourceIndex(0) -9 >Emitted(5, 171) Source(16, 70) + SourceIndex(0) -10>Emitted(5, 172) Source(16, 156) + SourceIndex(0) +6 >Emitted(5, 107) Source(16, 20) + SourceIndex(0) +7 >Emitted(5, 121) Source(16, 26) + SourceIndex(0) +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) +12>Emitted(5, 172) Source(16, 156) + SourceIndex(0) --- >>>if (nameB == nameB) { 1 > From 7acc51c7a728adabc86e8b08f4dfbfc04398da30 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 3 Dec 2015 16:42:14 -0800 Subject: [PATCH 017/209] Tests for parameter object binding pattern --- ...tructuringParameterObjectBindingPattern.js | 53 ++ ...turingParameterObjectBindingPattern.js.map | 2 + ...arameterObjectBindingPattern.sourcemap.txt | 472 ++++++++++++++++++ ...uringParameterObjectBindingPattern.symbols | 91 ++++ ...cturingParameterObjectBindingPattern.types | 113 +++++ ...tructuringParameterObjectBindingPattern.ts | 29 ++ 6 files changed, 760 insertions(+) create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.types create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringParameterObjectBindingPattern.ts diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.js b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.js new file mode 100644 index 00000000000..4a56f449ecc --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.js @@ -0,0 +1,53 @@ +//// [sourceMapValidationDestructuringParameterObjectBindingPattern.ts] +interface Robot { + name: string; + skill: string; +} +declare var console: { + log(msg: string): void; +} +var hello = "hello"; +var robotA: Robot = { name: "mower", skill: "mowing" }; + +function foo1({ name: nameA }: Robot) { + console.log(nameA); +} +function foo2({ name: nameB, skill: skillB }: Robot) { + console.log(nameB); +} +function foo3({ name }: Robot) { + console.log(name); +} + +foo1(robotA); +foo1({ name: "Edger", skill: "cutting edges" }); + +foo2(robotA); +foo2({ name: "Edger", skill: "cutting edges" }); + +foo3(robotA); +foo3({ name: "Edger", skill: "cutting edges" }); + + +//// [sourceMapValidationDestructuringParameterObjectBindingPattern.js] +var hello = "hello"; +var robotA = { name: "mower", skill: "mowing" }; +function foo1(_a) { + var nameA = _a.name; + console.log(nameA); +} +function foo2(_a) { + var nameB = _a.name, skillB = _a.skill; + console.log(nameB); +} +function foo3(_a) { + var name = _a.name; + console.log(name); +} +foo1(robotA); +foo1({ name: "Edger", skill: "cutting edges" }); +foo2(robotA); +foo2({ name: "Edger", skill: "cutting edges" }); +foo3(robotA); +foo3({ name: "Edger", skill: "cutting edges" }); +//# sourceMappingURL=sourceMapValidationDestructuringParameterObjectBindingPattern.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.js.map new file mode 100644 index 00000000000..9290f57f89d --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringParameterObjectBindingPattern.js.map] +{"version":3,"file":"sourceMapValidationDestructuringParameterObjectBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringParameterObjectBindingPattern.ts"],"names":[],"mappings":"AAOA,IAAI,KAAK,GAAG,OAAO,CAAC;AACpB,IAAI,MAAM,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AAEvD,cAAc,EAAsB;QAAtB,eAAsB;IAChC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,cAAc,EAAqC;QAAnC,eAAW,EAAE,iBAAa;IACtC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,cAAc,EAAe;QAAf,cAAe;IACzB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACtB,CAAC;AAED,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,CAAC;AAEhD,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,CAAC;AAEhD,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.sourcemap.txt new file mode 100644 index 00000000000..63eea72d8a0 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.sourcemap.txt @@ -0,0 +1,472 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringParameterObjectBindingPattern.js +mapUrl: sourceMapValidationDestructuringParameterObjectBindingPattern.js.map +sourceRoot: +sources: sourceMapValidationDestructuringParameterObjectBindingPattern.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringParameterObjectBindingPattern.js +sourceFile:sourceMapValidationDestructuringParameterObjectBindingPattern.ts +------------------------------------------------------------------- +>>>var hello = "hello"; +1 > +2 >^^^^ +3 > ^^^^^ +4 > ^^^ +5 > ^^^^^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 >interface Robot { + > name: string; + > skill: string; + >} + >declare var console: { + > log(msg: string): void; + >} + > +2 >var +3 > hello +4 > = +5 > "hello" +6 > ; +1 >Emitted(1, 1) Source(8, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(8, 5) + SourceIndex(0) +3 >Emitted(1, 10) Source(8, 10) + SourceIndex(0) +4 >Emitted(1, 13) Source(8, 13) + SourceIndex(0) +5 >Emitted(1, 20) Source(8, 20) + SourceIndex(0) +6 >Emitted(1, 21) Source(8, 21) + SourceIndex(0) +--- +>>>var robotA = { name: "mower", skill: "mowing" }; +1-> +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^^ +6 > ^^^^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^ +11> ^^ +12> ^^^^^^^^ +13> ^^ +14> ^ +1-> + > +2 >var +3 > robotA +4 > : Robot = +5 > { +6 > name +7 > : +8 > "mower" +9 > , +10> skill +11> : +12> "mowing" +13> } +14> ; +1->Emitted(2, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(9, 5) + SourceIndex(0) +3 >Emitted(2, 11) Source(9, 11) + SourceIndex(0) +4 >Emitted(2, 14) Source(9, 21) + SourceIndex(0) +5 >Emitted(2, 16) Source(9, 23) + SourceIndex(0) +6 >Emitted(2, 20) Source(9, 27) + SourceIndex(0) +7 >Emitted(2, 22) Source(9, 29) + SourceIndex(0) +8 >Emitted(2, 29) Source(9, 36) + SourceIndex(0) +9 >Emitted(2, 31) Source(9, 38) + SourceIndex(0) +10>Emitted(2, 36) Source(9, 43) + SourceIndex(0) +11>Emitted(2, 38) Source(9, 45) + SourceIndex(0) +12>Emitted(2, 46) Source(9, 53) + SourceIndex(0) +13>Emitted(2, 48) Source(9, 55) + SourceIndex(0) +14>Emitted(2, 49) Source(9, 56) + SourceIndex(0) +--- +>>>function foo1(_a) { +1 > +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^-> +1 > + > + > +2 >function foo1( +3 > { name: nameA }: Robot +1 >Emitted(3, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(3, 15) Source(11, 15) + SourceIndex(0) +3 >Emitted(3, 17) Source(11, 37) + SourceIndex(0) +--- +>>> var nameA = _a.name; +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^^ +3 > ^-> +1-> +2 > { name: nameA }: Robot +1->Emitted(4, 9) Source(11, 15) + SourceIndex(0) +2 >Emitted(4, 24) Source(11, 37) + SourceIndex(0) +--- +>>> console.log(nameA); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1->) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1->Emitted(5, 5) Source(12, 5) + SourceIndex(0) +2 >Emitted(5, 12) Source(12, 12) + SourceIndex(0) +3 >Emitted(5, 13) Source(12, 13) + SourceIndex(0) +4 >Emitted(5, 16) Source(12, 16) + SourceIndex(0) +5 >Emitted(5, 17) Source(12, 17) + SourceIndex(0) +6 >Emitted(5, 22) Source(12, 22) + SourceIndex(0) +7 >Emitted(5, 23) Source(12, 23) + SourceIndex(0) +8 >Emitted(5, 24) Source(12, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(6, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(13, 2) + SourceIndex(0) +--- +>>>function foo2(_a) { +1-> +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >function foo2( +3 > { name: nameB, skill: skillB }: Robot +1->Emitted(7, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(7, 15) Source(14, 15) + SourceIndex(0) +3 >Emitted(7, 17) Source(14, 52) + SourceIndex(0) +--- +>>> var nameB = _a.name, skillB = _a.skill; +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^ +1-> +2 > name: nameB +3 > , +4 > skill: skillB +1->Emitted(8, 9) Source(14, 17) + SourceIndex(0) +2 >Emitted(8, 24) Source(14, 28) + SourceIndex(0) +3 >Emitted(8, 26) Source(14, 30) + SourceIndex(0) +4 >Emitted(8, 43) Source(14, 43) + SourceIndex(0) +--- +>>> console.log(nameB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > }: Robot) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameB +7 > ) +8 > ; +1 >Emitted(9, 5) Source(15, 5) + SourceIndex(0) +2 >Emitted(9, 12) Source(15, 12) + SourceIndex(0) +3 >Emitted(9, 13) Source(15, 13) + SourceIndex(0) +4 >Emitted(9, 16) Source(15, 16) + SourceIndex(0) +5 >Emitted(9, 17) Source(15, 17) + SourceIndex(0) +6 >Emitted(9, 22) Source(15, 22) + SourceIndex(0) +7 >Emitted(9, 23) Source(15, 23) + SourceIndex(0) +8 >Emitted(9, 24) Source(15, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(10, 1) Source(16, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(16, 2) + SourceIndex(0) +--- +>>>function foo3(_a) { +1-> +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^-> +1-> + > +2 >function foo3( +3 > { name }: Robot +1->Emitted(11, 1) Source(17, 1) + SourceIndex(0) +2 >Emitted(11, 15) Source(17, 15) + SourceIndex(0) +3 >Emitted(11, 17) Source(17, 30) + SourceIndex(0) +--- +>>> var name = _a.name; +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^-> +1-> +2 > { name }: Robot +1->Emitted(12, 9) Source(17, 15) + SourceIndex(0) +2 >Emitted(12, 23) Source(17, 30) + SourceIndex(0) +--- +>>> console.log(name); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^ +7 > ^ +8 > ^ +1->) { + > +2 > console +3 > . +4 > log +5 > ( +6 > name +7 > ) +8 > ; +1->Emitted(13, 5) Source(18, 5) + SourceIndex(0) +2 >Emitted(13, 12) Source(18, 12) + SourceIndex(0) +3 >Emitted(13, 13) Source(18, 13) + SourceIndex(0) +4 >Emitted(13, 16) Source(18, 16) + SourceIndex(0) +5 >Emitted(13, 17) Source(18, 17) + SourceIndex(0) +6 >Emitted(13, 21) Source(18, 21) + SourceIndex(0) +7 >Emitted(13, 22) Source(18, 22) + SourceIndex(0) +8 >Emitted(13, 23) Source(18, 23) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(14, 1) Source(19, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(19, 2) + SourceIndex(0) +--- +>>>foo1(robotA); +1-> +2 >^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +2 >foo1 +3 > ( +4 > robotA +5 > ) +6 > ; +1->Emitted(15, 1) Source(21, 1) + SourceIndex(0) +2 >Emitted(15, 5) Source(21, 5) + SourceIndex(0) +3 >Emitted(15, 6) Source(21, 6) + SourceIndex(0) +4 >Emitted(15, 12) Source(21, 12) + SourceIndex(0) +5 >Emitted(15, 13) Source(21, 13) + SourceIndex(0) +6 >Emitted(15, 14) Source(21, 14) + SourceIndex(0) +--- +>>>foo1({ name: "Edger", skill: "cutting edges" }); +1-> +2 >^^^^ +3 > ^ +4 > ^^ +5 > ^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^ +9 > ^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^ +12> ^^ +13> ^ +14> ^ +1-> + > +2 >foo1 +3 > ( +4 > { +5 > name +6 > : +7 > "Edger" +8 > , +9 > skill +10> : +11> "cutting edges" +12> } +13> ) +14> ; +1->Emitted(16, 1) Source(22, 1) + SourceIndex(0) +2 >Emitted(16, 5) Source(22, 5) + SourceIndex(0) +3 >Emitted(16, 6) Source(22, 6) + SourceIndex(0) +4 >Emitted(16, 8) Source(22, 8) + SourceIndex(0) +5 >Emitted(16, 12) Source(22, 12) + SourceIndex(0) +6 >Emitted(16, 14) Source(22, 14) + SourceIndex(0) +7 >Emitted(16, 21) Source(22, 21) + SourceIndex(0) +8 >Emitted(16, 23) Source(22, 23) + SourceIndex(0) +9 >Emitted(16, 28) Source(22, 28) + SourceIndex(0) +10>Emitted(16, 30) Source(22, 30) + SourceIndex(0) +11>Emitted(16, 45) Source(22, 45) + SourceIndex(0) +12>Emitted(16, 47) Source(22, 47) + SourceIndex(0) +13>Emitted(16, 48) Source(22, 48) + SourceIndex(0) +14>Emitted(16, 49) Source(22, 49) + SourceIndex(0) +--- +>>>foo2(robotA); +1 > +2 >^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >foo2 +3 > ( +4 > robotA +5 > ) +6 > ; +1 >Emitted(17, 1) Source(24, 1) + SourceIndex(0) +2 >Emitted(17, 5) Source(24, 5) + SourceIndex(0) +3 >Emitted(17, 6) Source(24, 6) + SourceIndex(0) +4 >Emitted(17, 12) Source(24, 12) + SourceIndex(0) +5 >Emitted(17, 13) Source(24, 13) + SourceIndex(0) +6 >Emitted(17, 14) Source(24, 14) + SourceIndex(0) +--- +>>>foo2({ name: "Edger", skill: "cutting edges" }); +1-> +2 >^^^^ +3 > ^ +4 > ^^ +5 > ^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^ +9 > ^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^ +12> ^^ +13> ^ +14> ^ +1-> + > +2 >foo2 +3 > ( +4 > { +5 > name +6 > : +7 > "Edger" +8 > , +9 > skill +10> : +11> "cutting edges" +12> } +13> ) +14> ; +1->Emitted(18, 1) Source(25, 1) + SourceIndex(0) +2 >Emitted(18, 5) Source(25, 5) + SourceIndex(0) +3 >Emitted(18, 6) Source(25, 6) + SourceIndex(0) +4 >Emitted(18, 8) Source(25, 8) + SourceIndex(0) +5 >Emitted(18, 12) Source(25, 12) + SourceIndex(0) +6 >Emitted(18, 14) Source(25, 14) + SourceIndex(0) +7 >Emitted(18, 21) Source(25, 21) + SourceIndex(0) +8 >Emitted(18, 23) Source(25, 23) + SourceIndex(0) +9 >Emitted(18, 28) Source(25, 28) + SourceIndex(0) +10>Emitted(18, 30) Source(25, 30) + SourceIndex(0) +11>Emitted(18, 45) Source(25, 45) + SourceIndex(0) +12>Emitted(18, 47) Source(25, 47) + SourceIndex(0) +13>Emitted(18, 48) Source(25, 48) + SourceIndex(0) +14>Emitted(18, 49) Source(25, 49) + SourceIndex(0) +--- +>>>foo3(robotA); +1 > +2 >^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >foo3 +3 > ( +4 > robotA +5 > ) +6 > ; +1 >Emitted(19, 1) Source(27, 1) + SourceIndex(0) +2 >Emitted(19, 5) Source(27, 5) + SourceIndex(0) +3 >Emitted(19, 6) Source(27, 6) + SourceIndex(0) +4 >Emitted(19, 12) Source(27, 12) + SourceIndex(0) +5 >Emitted(19, 13) Source(27, 13) + SourceIndex(0) +6 >Emitted(19, 14) Source(27, 14) + SourceIndex(0) +--- +>>>foo3({ name: "Edger", skill: "cutting edges" }); +1-> +2 >^^^^ +3 > ^ +4 > ^^ +5 > ^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^ +9 > ^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^ +12> ^^ +13> ^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >foo3 +3 > ( +4 > { +5 > name +6 > : +7 > "Edger" +8 > , +9 > skill +10> : +11> "cutting edges" +12> } +13> ) +14> ; +1->Emitted(20, 1) Source(28, 1) + SourceIndex(0) +2 >Emitted(20, 5) Source(28, 5) + SourceIndex(0) +3 >Emitted(20, 6) Source(28, 6) + SourceIndex(0) +4 >Emitted(20, 8) Source(28, 8) + SourceIndex(0) +5 >Emitted(20, 12) Source(28, 12) + SourceIndex(0) +6 >Emitted(20, 14) Source(28, 14) + SourceIndex(0) +7 >Emitted(20, 21) Source(28, 21) + SourceIndex(0) +8 >Emitted(20, 23) Source(28, 23) + SourceIndex(0) +9 >Emitted(20, 28) Source(28, 28) + SourceIndex(0) +10>Emitted(20, 30) Source(28, 30) + SourceIndex(0) +11>Emitted(20, 45) Source(28, 45) + SourceIndex(0) +12>Emitted(20, 47) Source(28, 47) + SourceIndex(0) +13>Emitted(20, 48) Source(28, 48) + SourceIndex(0) +14>Emitted(20, 49) Source(28, 49) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringParameterObjectBindingPattern.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.symbols b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.symbols new file mode 100644 index 00000000000..9b810165c1b --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.symbols @@ -0,0 +1,91 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringParameterObjectBindingPattern.ts === +interface Robot { +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 0, 0)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 0, 17)) + + skill: string; +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 1, 17)) +} +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 4, 11)) + + log(msg: string): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 4, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 5, 8)) +} +var hello = "hello"; +>hello : Symbol(hello, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 7, 3)) + +var robotA: Robot = { name: "mower", skill: "mowing" }; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 8, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 0, 0)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 8, 21)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 8, 36)) + +function foo1({ name: nameA }: Robot) { +>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 8, 55)) +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 0, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 10, 15)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 0, 0)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 4, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 4, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 4, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 10, 15)) +} +function foo2({ name: nameB, skill: skillB }: Robot) { +>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 12, 1)) +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 0, 17)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 13, 15)) +>skill : Symbol(Robot.skill, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 1, 17)) +>skillB : Symbol(skillB, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 13, 28)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 0, 0)) + + console.log(nameB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 4, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 4, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 4, 22)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 13, 15)) +} +function foo3({ name }: Robot) { +>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 15, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 16, 15)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 0, 0)) + + console.log(name); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 4, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 4, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 4, 22)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 16, 15)) +} + +foo1(robotA); +>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 8, 55)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 8, 3)) + +foo1({ name: "Edger", skill: "cutting edges" }); +>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 8, 55)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 21, 6)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 21, 21)) + +foo2(robotA); +>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 12, 1)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 8, 3)) + +foo2({ name: "Edger", skill: "cutting edges" }); +>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 12, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 24, 6)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 24, 21)) + +foo3(robotA); +>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 15, 1)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 8, 3)) + +foo3({ name: "Edger", skill: "cutting edges" }); +>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 15, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 27, 6)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringParameterObjectBindingPattern.ts, 27, 21)) + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.types b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.types new file mode 100644 index 00000000000..894cd714c73 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.types @@ -0,0 +1,113 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringParameterObjectBindingPattern.ts === +interface Robot { +>Robot : Robot + + name: string; +>name : string + + skill: string; +>skill : string +} +declare var console: { +>console : { log(msg: string): void; } + + log(msg: string): void; +>log : (msg: string) => void +>msg : string +} +var hello = "hello"; +>hello : string +>"hello" : string + +var robotA: Robot = { name: "mower", skill: "mowing" }; +>robotA : Robot +>Robot : Robot +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string + +function foo1({ name: nameA }: Robot) { +>foo1 : ({ name: nameA }: Robot) => void +>name : any +>nameA : string +>Robot : Robot + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: string) => void +>console : { log(msg: string): void; } +>log : (msg: string) => void +>nameA : string +} +function foo2({ name: nameB, skill: skillB }: Robot) { +>foo2 : ({ name: nameB, skill: skillB }: Robot) => void +>name : any +>nameB : string +>skill : any +>skillB : string +>Robot : Robot + + console.log(nameB); +>console.log(nameB) : void +>console.log : (msg: string) => void +>console : { log(msg: string): void; } +>log : (msg: string) => void +>nameB : string +} +function foo3({ name }: Robot) { +>foo3 : ({ name }: Robot) => void +>name : string +>Robot : Robot + + console.log(name); +>console.log(name) : void +>console.log : (msg: string) => void +>console : { log(msg: string): void; } +>log : (msg: string) => void +>name : string +} + +foo1(robotA); +>foo1(robotA) : void +>foo1 : ({ name: nameA }: Robot) => void +>robotA : Robot + +foo1({ name: "Edger", skill: "cutting edges" }); +>foo1({ name: "Edger", skill: "cutting edges" }) : void +>foo1 : ({ name: nameA }: Robot) => void +>{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } +>name : string +>"Edger" : string +>skill : string +>"cutting edges" : string + +foo2(robotA); +>foo2(robotA) : void +>foo2 : ({ name: nameB, skill: skillB }: Robot) => void +>robotA : Robot + +foo2({ name: "Edger", skill: "cutting edges" }); +>foo2({ name: "Edger", skill: "cutting edges" }) : void +>foo2 : ({ name: nameB, skill: skillB }: Robot) => void +>{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } +>name : string +>"Edger" : string +>skill : string +>"cutting edges" : string + +foo3(robotA); +>foo3(robotA) : void +>foo3 : ({ name }: Robot) => void +>robotA : Robot + +foo3({ name: "Edger", skill: "cutting edges" }); +>foo3({ name: "Edger", skill: "cutting edges" }) : void +>foo3 : ({ name }: Robot) => void +>{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } +>name : string +>"Edger" : string +>skill : string +>"cutting edges" : string + diff --git a/tests/cases/compiler/sourceMapValidationDestructuringParameterObjectBindingPattern.ts b/tests/cases/compiler/sourceMapValidationDestructuringParameterObjectBindingPattern.ts new file mode 100644 index 00000000000..0f52806dd16 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringParameterObjectBindingPattern.ts @@ -0,0 +1,29 @@ +// @sourcemap: true +interface Robot { + name: string; + skill: string; +} +declare var console: { + log(msg: string): void; +} +var hello = "hello"; +var robotA: Robot = { name: "mower", skill: "mowing" }; + +function foo1({ name: nameA }: Robot) { + console.log(nameA); +} +function foo2({ name: nameB, skill: skillB }: Robot) { + console.log(nameB); +} +function foo3({ name }: Robot) { + console.log(name); +} + +foo1(robotA); +foo1({ name: "Edger", skill: "cutting edges" }); + +foo2(robotA); +foo2({ name: "Edger", skill: "cutting edges" }); + +foo3(robotA); +foo3({ name: "Edger", skill: "cutting edges" }); From ad73ab2c16a3a43d664b7fbc3d6516638c0c86c2 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 3 Dec 2015 16:51:11 -0800 Subject: [PATCH 018/209] Test cases for nested object binding pattern in parameter declaration --- ...ringParameterNestedObjectBindingPattern.js | 54 ++ ...ParameterNestedObjectBindingPattern.js.map | 2 + ...erNestedObjectBindingPattern.sourcemap.txt | 578 ++++++++++++++++++ ...arameterNestedObjectBindingPattern.symbols | 112 ++++ ...gParameterNestedObjectBindingPattern.types | 141 +++++ ...ringParameterNestedObjectBindingPattern.ts | 31 + 6 files changed, 918 insertions(+) create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.types create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.js b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.js new file mode 100644 index 00000000000..4c7c0d6307b --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.js @@ -0,0 +1,54 @@ +//// [sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts] +declare var console: { + log(msg: string): void; +} +interface Robot { + name: string; + skills: { + primary: string; + secondary: string; + }; +} +var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; + +function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) { + console.log(primaryA); +} +function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) { + console.log(secondaryB); +} +function foo3({ skills }: Robot) { + console.log(skills.primary); +} + +foo1(robotA); +foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); + +foo2(robotA); +foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); + +foo3(robotA); +foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); + + +//// [sourceMapValidationDestructuringParameterNestedObjectBindingPattern.js] +var robotA = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +function foo1(_a) { + var _b = _a.skills, primaryA = _b.primary, secondaryA = _b.secondary; + console.log(primaryA); +} +function foo2(_a) { + var nameC = _a.name, _b = _a.skills, primaryB = _b.primary, secondaryB = _b.secondary; + console.log(secondaryB); +} +function foo3(_a) { + var skills = _a.skills; + console.log(skills.primary); +} +foo1(robotA); +foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +foo2(robotA); +foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +foo3(robotA); +foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +//# sourceMappingURL=sourceMapValidationDestructuringParameterNestedObjectBindingPattern.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.js.map new file mode 100644 index 00000000000..7bc982e7e46 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringParameterNestedObjectBindingPattern.js.map] +{"version":3,"file":"sourceMapValidationDestructuringParameterNestedObjectBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringParameterNestedObjectBindingPattern.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;AAExF,cAAc,EAA+D;QAA7D,cAAM,EAAI,qBAAiB,EAAE,yBAAqB;IAC9D,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,cAAc,EAA4E;QAA1E,eAAW,EAAE,cAAM,EAAI,qBAAiB,EAAE,yBAAqB;IAC3E,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AAC5B,CAAC;AACD,cAAc,EAAiB;QAAjB,kBAAiB;IAC3B,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAChC,CAAC;AAED,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,iBAAiB,EAAE,EAAE,CAAC,CAAC;AAErF,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,iBAAiB,EAAE,EAAE,CAAC,CAAC;AAErF,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,iBAAiB,EAAE,EAAE,CAAC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.sourcemap.txt new file mode 100644 index 00000000000..720057d3f79 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.sourcemap.txt @@ -0,0 +1,578 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringParameterNestedObjectBindingPattern.js +mapUrl: sourceMapValidationDestructuringParameterNestedObjectBindingPattern.js.map +sourceRoot: +sources: sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.js +sourceFile:sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts +------------------------------------------------------------------- +>>>var robotA = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^^ +6 > ^^^^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^^ +12> ^^ +13> ^^^^^^^ +14> ^^ +15> ^^^^^^^^ +16> ^^ +17> ^^^^^^^^^ +18> ^^ +19> ^^^^^^ +20> ^^ +21> ^^ +22> ^ +1 >declare var console: { + > log(msg: string): void; + >} + >interface Robot { + > name: string; + > skills: { + > primary: string; + > secondary: string; + > }; + >} + > +2 >var +3 > robotA +4 > : Robot = +5 > { +6 > name +7 > : +8 > "mower" +9 > , +10> skills +11> : +12> { +13> primary +14> : +15> "mowing" +16> , +17> secondary +18> : +19> "none" +20> } +21> } +22> ; +1 >Emitted(1, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(11, 5) + SourceIndex(0) +3 >Emitted(1, 11) Source(11, 11) + SourceIndex(0) +4 >Emitted(1, 14) Source(11, 21) + SourceIndex(0) +5 >Emitted(1, 16) Source(11, 23) + SourceIndex(0) +6 >Emitted(1, 20) Source(11, 27) + SourceIndex(0) +7 >Emitted(1, 22) Source(11, 29) + SourceIndex(0) +8 >Emitted(1, 29) Source(11, 36) + SourceIndex(0) +9 >Emitted(1, 31) Source(11, 38) + SourceIndex(0) +10>Emitted(1, 37) Source(11, 44) + SourceIndex(0) +11>Emitted(1, 39) Source(11, 46) + SourceIndex(0) +12>Emitted(1, 41) Source(11, 48) + SourceIndex(0) +13>Emitted(1, 48) Source(11, 55) + SourceIndex(0) +14>Emitted(1, 50) Source(11, 57) + SourceIndex(0) +15>Emitted(1, 58) Source(11, 65) + SourceIndex(0) +16>Emitted(1, 60) Source(11, 67) + SourceIndex(0) +17>Emitted(1, 69) Source(11, 76) + SourceIndex(0) +18>Emitted(1, 71) Source(11, 78) + SourceIndex(0) +19>Emitted(1, 77) Source(11, 84) + SourceIndex(0) +20>Emitted(1, 79) Source(11, 86) + SourceIndex(0) +21>Emitted(1, 81) Source(11, 88) + SourceIndex(0) +22>Emitted(1, 82) Source(11, 89) + SourceIndex(0) +--- +>>>function foo1(_a) { +1 > +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >function foo1( +3 > { skills: { primary: primaryA, secondary: secondaryA } }: Robot +1 >Emitted(2, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(2, 15) Source(13, 15) + SourceIndex(0) +3 >Emitted(2, 17) Source(13, 78) + SourceIndex(0) +--- +>>> var _b = _a.skills, primaryA = _b.primary, secondaryA = _b.secondary; +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > skills +3 > : { +4 > primary: primaryA +5 > , +6 > secondary: secondaryA +1->Emitted(3, 9) Source(13, 17) + SourceIndex(0) +2 >Emitted(3, 23) Source(13, 23) + SourceIndex(0) +3 >Emitted(3, 25) Source(13, 27) + SourceIndex(0) +4 >Emitted(3, 46) Source(13, 44) + SourceIndex(0) +5 >Emitted(3, 48) Source(13, 46) + SourceIndex(0) +6 >Emitted(3, 73) Source(13, 67) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > } }: Robot) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(4, 5) Source(14, 5) + SourceIndex(0) +2 >Emitted(4, 12) Source(14, 12) + SourceIndex(0) +3 >Emitted(4, 13) Source(14, 13) + SourceIndex(0) +4 >Emitted(4, 16) Source(14, 16) + SourceIndex(0) +5 >Emitted(4, 17) Source(14, 17) + SourceIndex(0) +6 >Emitted(4, 25) Source(14, 25) + SourceIndex(0) +7 >Emitted(4, 26) Source(14, 26) + SourceIndex(0) +8 >Emitted(4, 27) Source(14, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(5, 1) Source(15, 1) + SourceIndex(0) +2 >Emitted(5, 2) Source(15, 2) + SourceIndex(0) +--- +>>>function foo2(_a) { +1-> +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >function foo2( +3 > { name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot +1->Emitted(6, 1) Source(16, 1) + SourceIndex(0) +2 >Emitted(6, 15) Source(16, 15) + SourceIndex(0) +3 >Emitted(6, 17) Source(16, 91) + SourceIndex(0) +--- +>>> var nameC = _a.name, _b = _a.skills, primaryB = _b.primary, secondaryB = _b.secondary; +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > name: nameC +3 > , +4 > skills +5 > : { +6 > primary: primaryB +7 > , +8 > secondary: secondaryB +1->Emitted(7, 9) Source(16, 17) + SourceIndex(0) +2 >Emitted(7, 24) Source(16, 28) + SourceIndex(0) +3 >Emitted(7, 26) Source(16, 30) + SourceIndex(0) +4 >Emitted(7, 40) Source(16, 36) + SourceIndex(0) +5 >Emitted(7, 42) Source(16, 40) + SourceIndex(0) +6 >Emitted(7, 63) Source(16, 57) + SourceIndex(0) +7 >Emitted(7, 65) Source(16, 59) + SourceIndex(0) +8 >Emitted(7, 90) Source(16, 80) + SourceIndex(0) +--- +>>> console.log(secondaryB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^ +7 > ^ +8 > ^ +1 > } }: Robot) { + > +2 > console +3 > . +4 > log +5 > ( +6 > secondaryB +7 > ) +8 > ; +1 >Emitted(8, 5) Source(17, 5) + SourceIndex(0) +2 >Emitted(8, 12) Source(17, 12) + SourceIndex(0) +3 >Emitted(8, 13) Source(17, 13) + SourceIndex(0) +4 >Emitted(8, 16) Source(17, 16) + SourceIndex(0) +5 >Emitted(8, 17) Source(17, 17) + SourceIndex(0) +6 >Emitted(8, 27) Source(17, 27) + SourceIndex(0) +7 >Emitted(8, 28) Source(17, 28) + SourceIndex(0) +8 >Emitted(8, 29) Source(17, 29) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(9, 1) Source(18, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(18, 2) + SourceIndex(0) +--- +>>>function foo3(_a) { +1-> +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^-> +1-> + > +2 >function foo3( +3 > { skills }: Robot +1->Emitted(10, 1) Source(19, 1) + SourceIndex(0) +2 >Emitted(10, 15) Source(19, 15) + SourceIndex(0) +3 >Emitted(10, 17) Source(19, 32) + SourceIndex(0) +--- +>>> var skills = _a.skills; +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^-> +1-> +2 > { skills }: Robot +1->Emitted(11, 9) Source(19, 15) + SourceIndex(0) +2 >Emitted(11, 27) Source(19, 32) + SourceIndex(0) +--- +>>> console.log(skills.primary); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^^^^^^^ +9 > ^ +10> ^ +1->) { + > +2 > console +3 > . +4 > log +5 > ( +6 > skills +7 > . +8 > primary +9 > ) +10> ; +1->Emitted(12, 5) Source(20, 5) + SourceIndex(0) +2 >Emitted(12, 12) Source(20, 12) + SourceIndex(0) +3 >Emitted(12, 13) Source(20, 13) + SourceIndex(0) +4 >Emitted(12, 16) Source(20, 16) + SourceIndex(0) +5 >Emitted(12, 17) Source(20, 17) + SourceIndex(0) +6 >Emitted(12, 23) Source(20, 23) + SourceIndex(0) +7 >Emitted(12, 24) Source(20, 24) + SourceIndex(0) +8 >Emitted(12, 31) Source(20, 31) + SourceIndex(0) +9 >Emitted(12, 32) Source(20, 32) + SourceIndex(0) +10>Emitted(12, 33) Source(20, 33) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(13, 1) Source(21, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(21, 2) + SourceIndex(0) +--- +>>>foo1(robotA); +1-> +2 >^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +2 >foo1 +3 > ( +4 > robotA +5 > ) +6 > ; +1->Emitted(14, 1) Source(23, 1) + SourceIndex(0) +2 >Emitted(14, 5) Source(23, 5) + SourceIndex(0) +3 >Emitted(14, 6) Source(23, 6) + SourceIndex(0) +4 >Emitted(14, 12) Source(23, 12) + SourceIndex(0) +5 >Emitted(14, 13) Source(23, 13) + SourceIndex(0) +6 >Emitted(14, 14) Source(23, 14) + SourceIndex(0) +--- +>>>foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +1-> +2 >^^^^ +3 > ^ +4 > ^^ +5 > ^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^ +9 > ^^^^^^ +10> ^^ +11> ^^ +12> ^^^^^^^ +13> ^^ +14> ^^^^^^^^ +15> ^^ +16> ^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^ +19> ^^ +20> ^^ +21> ^ +22> ^ +1-> + > +2 >foo1 +3 > ( +4 > { +5 > name +6 > : +7 > "Edger" +8 > , +9 > skills +10> : +11> { +12> primary +13> : +14> "edging" +15> , +16> secondary +17> : +18> "branch trimming" +19> } +20> } +21> ) +22> ; +1->Emitted(15, 1) Source(24, 1) + SourceIndex(0) +2 >Emitted(15, 5) Source(24, 5) + SourceIndex(0) +3 >Emitted(15, 6) Source(24, 6) + SourceIndex(0) +4 >Emitted(15, 8) Source(24, 8) + SourceIndex(0) +5 >Emitted(15, 12) Source(24, 12) + SourceIndex(0) +6 >Emitted(15, 14) Source(24, 14) + SourceIndex(0) +7 >Emitted(15, 21) Source(24, 21) + SourceIndex(0) +8 >Emitted(15, 23) Source(24, 23) + SourceIndex(0) +9 >Emitted(15, 29) Source(24, 29) + SourceIndex(0) +10>Emitted(15, 31) Source(24, 31) + SourceIndex(0) +11>Emitted(15, 33) Source(24, 33) + SourceIndex(0) +12>Emitted(15, 40) Source(24, 40) + SourceIndex(0) +13>Emitted(15, 42) Source(24, 42) + SourceIndex(0) +14>Emitted(15, 50) Source(24, 50) + SourceIndex(0) +15>Emitted(15, 52) Source(24, 52) + SourceIndex(0) +16>Emitted(15, 61) Source(24, 61) + SourceIndex(0) +17>Emitted(15, 63) Source(24, 63) + SourceIndex(0) +18>Emitted(15, 80) Source(24, 80) + SourceIndex(0) +19>Emitted(15, 82) Source(24, 82) + SourceIndex(0) +20>Emitted(15, 84) Source(24, 84) + SourceIndex(0) +21>Emitted(15, 85) Source(24, 85) + SourceIndex(0) +22>Emitted(15, 86) Source(24, 86) + SourceIndex(0) +--- +>>>foo2(robotA); +1 > +2 >^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >foo2 +3 > ( +4 > robotA +5 > ) +6 > ; +1 >Emitted(16, 1) Source(26, 1) + SourceIndex(0) +2 >Emitted(16, 5) Source(26, 5) + SourceIndex(0) +3 >Emitted(16, 6) Source(26, 6) + SourceIndex(0) +4 >Emitted(16, 12) Source(26, 12) + SourceIndex(0) +5 >Emitted(16, 13) Source(26, 13) + SourceIndex(0) +6 >Emitted(16, 14) Source(26, 14) + SourceIndex(0) +--- +>>>foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +1-> +2 >^^^^ +3 > ^ +4 > ^^ +5 > ^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^ +9 > ^^^^^^ +10> ^^ +11> ^^ +12> ^^^^^^^ +13> ^^ +14> ^^^^^^^^ +15> ^^ +16> ^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^ +19> ^^ +20> ^^ +21> ^ +22> ^ +1-> + > +2 >foo2 +3 > ( +4 > { +5 > name +6 > : +7 > "Edger" +8 > , +9 > skills +10> : +11> { +12> primary +13> : +14> "edging" +15> , +16> secondary +17> : +18> "branch trimming" +19> } +20> } +21> ) +22> ; +1->Emitted(17, 1) Source(27, 1) + SourceIndex(0) +2 >Emitted(17, 5) Source(27, 5) + SourceIndex(0) +3 >Emitted(17, 6) Source(27, 6) + SourceIndex(0) +4 >Emitted(17, 8) Source(27, 8) + SourceIndex(0) +5 >Emitted(17, 12) Source(27, 12) + SourceIndex(0) +6 >Emitted(17, 14) Source(27, 14) + SourceIndex(0) +7 >Emitted(17, 21) Source(27, 21) + SourceIndex(0) +8 >Emitted(17, 23) Source(27, 23) + SourceIndex(0) +9 >Emitted(17, 29) Source(27, 29) + SourceIndex(0) +10>Emitted(17, 31) Source(27, 31) + SourceIndex(0) +11>Emitted(17, 33) Source(27, 33) + SourceIndex(0) +12>Emitted(17, 40) Source(27, 40) + SourceIndex(0) +13>Emitted(17, 42) Source(27, 42) + SourceIndex(0) +14>Emitted(17, 50) Source(27, 50) + SourceIndex(0) +15>Emitted(17, 52) Source(27, 52) + SourceIndex(0) +16>Emitted(17, 61) Source(27, 61) + SourceIndex(0) +17>Emitted(17, 63) Source(27, 63) + SourceIndex(0) +18>Emitted(17, 80) Source(27, 80) + SourceIndex(0) +19>Emitted(17, 82) Source(27, 82) + SourceIndex(0) +20>Emitted(17, 84) Source(27, 84) + SourceIndex(0) +21>Emitted(17, 85) Source(27, 85) + SourceIndex(0) +22>Emitted(17, 86) Source(27, 86) + SourceIndex(0) +--- +>>>foo3(robotA); +1 > +2 >^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >foo3 +3 > ( +4 > robotA +5 > ) +6 > ; +1 >Emitted(18, 1) Source(29, 1) + SourceIndex(0) +2 >Emitted(18, 5) Source(29, 5) + SourceIndex(0) +3 >Emitted(18, 6) Source(29, 6) + SourceIndex(0) +4 >Emitted(18, 12) Source(29, 12) + SourceIndex(0) +5 >Emitted(18, 13) Source(29, 13) + SourceIndex(0) +6 >Emitted(18, 14) Source(29, 14) + SourceIndex(0) +--- +>>>foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +1-> +2 >^^^^ +3 > ^ +4 > ^^ +5 > ^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^ +9 > ^^^^^^ +10> ^^ +11> ^^ +12> ^^^^^^^ +13> ^^ +14> ^^^^^^^^ +15> ^^ +16> ^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^ +19> ^^ +20> ^^ +21> ^ +22> ^ +23> ^^^^^^^^^-> +1-> + > +2 >foo3 +3 > ( +4 > { +5 > name +6 > : +7 > "Edger" +8 > , +9 > skills +10> : +11> { +12> primary +13> : +14> "edging" +15> , +16> secondary +17> : +18> "branch trimming" +19> } +20> } +21> ) +22> ; +1->Emitted(19, 1) Source(30, 1) + SourceIndex(0) +2 >Emitted(19, 5) Source(30, 5) + SourceIndex(0) +3 >Emitted(19, 6) Source(30, 6) + SourceIndex(0) +4 >Emitted(19, 8) Source(30, 8) + SourceIndex(0) +5 >Emitted(19, 12) Source(30, 12) + SourceIndex(0) +6 >Emitted(19, 14) Source(30, 14) + SourceIndex(0) +7 >Emitted(19, 21) Source(30, 21) + SourceIndex(0) +8 >Emitted(19, 23) Source(30, 23) + SourceIndex(0) +9 >Emitted(19, 29) Source(30, 29) + SourceIndex(0) +10>Emitted(19, 31) Source(30, 31) + SourceIndex(0) +11>Emitted(19, 33) Source(30, 33) + SourceIndex(0) +12>Emitted(19, 40) Source(30, 40) + SourceIndex(0) +13>Emitted(19, 42) Source(30, 42) + SourceIndex(0) +14>Emitted(19, 50) Source(30, 50) + SourceIndex(0) +15>Emitted(19, 52) Source(30, 52) + SourceIndex(0) +16>Emitted(19, 61) Source(30, 61) + SourceIndex(0) +17>Emitted(19, 63) Source(30, 63) + SourceIndex(0) +18>Emitted(19, 80) Source(30, 80) + SourceIndex(0) +19>Emitted(19, 82) Source(30, 82) + SourceIndex(0) +20>Emitted(19, 84) Source(30, 84) + SourceIndex(0) +21>Emitted(19, 85) Source(30, 85) + SourceIndex(0) +22>Emitted(19, 86) Source(30, 86) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringParameterNestedObjectBindingPattern.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.symbols b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.symbols new file mode 100644 index 00000000000..3b2a89b2bda --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.symbols @@ -0,0 +1,112 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 0, 11)) + + log(msg: string): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 1, 8)) +} +interface Robot { +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 2, 1)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 3, 17)) + + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 4, 17)) + + primary: string; +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 5, 13)) + + secondary: string; +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 6, 24)) + + }; +} +var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 10, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 10, 21)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 10, 36)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 10, 46)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 10, 65)) + +function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) { +>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 10, 88)) +>skills : Symbol(Robot.skills, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 4, 17)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 5, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 12, 25)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 6, 24)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 12, 44)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 2, 1)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 12, 25)) +} +function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) { +>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 14, 1)) +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 3, 17)) +>nameC : Symbol(nameC, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 15, 15)) +>skills : Symbol(Robot.skills, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 4, 17)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 5, 13)) +>primaryB : Symbol(primaryB, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 15, 38)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 6, 24)) +>secondaryB : Symbol(secondaryB, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 15, 57)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 2, 1)) + + console.log(secondaryB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 0, 22)) +>secondaryB : Symbol(secondaryB, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 15, 57)) +} +function foo3({ skills }: Robot) { +>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 17, 1)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 18, 15)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 2, 1)) + + console.log(skills.primary); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 0, 22)) +>skills.primary : Symbol(primary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 5, 13)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 18, 15)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 5, 13)) +} + +foo1(robotA); +>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 10, 88)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 10, 3)) + +foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 10, 88)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 23, 6)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 23, 21)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 23, 31)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 23, 50)) + +foo2(robotA); +>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 14, 1)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 10, 3)) + +foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 14, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 26, 6)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 26, 21)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 26, 31)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 26, 50)) + +foo3(robotA); +>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 17, 1)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 10, 3)) + +foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 17, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 29, 6)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 29, 21)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 29, 31)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts, 29, 50)) + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.types b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.types new file mode 100644 index 00000000000..029e47cd3a0 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.types @@ -0,0 +1,141 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts === +declare var console: { +>console : { log(msg: string): void; } + + log(msg: string): void; +>log : (msg: string) => void +>msg : string +} +interface Robot { +>Robot : Robot + + name: string; +>name : string + + skills: { +>skills : { primary: string; secondary: string; } + + primary: string; +>primary : string + + secondary: string; +>secondary : string + + }; +} +var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +>robotA : Robot +>Robot : Robot +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"mower" : string +>skills : { primary: string; secondary: string; } +>{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } +>primary : string +>"mowing" : string +>secondary : string +>"none" : string + +function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) { +>foo1 : ({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) => void +>skills : any +>primary : any +>primaryA : string +>secondary : any +>secondaryA : string +>Robot : Robot + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: string) => void +>console : { log(msg: string): void; } +>log : (msg: string) => void +>primaryA : string +} +function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) { +>foo2 : ({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) => void +>name : any +>nameC : string +>skills : any +>primary : any +>primaryB : string +>secondary : any +>secondaryB : string +>Robot : Robot + + console.log(secondaryB); +>console.log(secondaryB) : void +>console.log : (msg: string) => void +>console : { log(msg: string): void; } +>log : (msg: string) => void +>secondaryB : string +} +function foo3({ skills }: Robot) { +>foo3 : ({ skills }: Robot) => void +>skills : { primary: string; secondary: string; } +>Robot : Robot + + console.log(skills.primary); +>console.log(skills.primary) : void +>console.log : (msg: string) => void +>console : { log(msg: string): void; } +>log : (msg: string) => void +>skills.primary : string +>skills : { primary: string; secondary: string; } +>primary : string +} + +foo1(robotA); +>foo1(robotA) : void +>foo1 : ({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) => void +>robotA : Robot + +foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +>foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) : void +>foo1 : ({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) => void +>{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"Edger" : string +>skills : { primary: string; secondary: string; } +>{ primary: "edging", secondary: "branch trimming" } : { primary: string; secondary: string; } +>primary : string +>"edging" : string +>secondary : string +>"branch trimming" : string + +foo2(robotA); +>foo2(robotA) : void +>foo2 : ({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) => void +>robotA : Robot + +foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +>foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) : void +>foo2 : ({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) => void +>{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"Edger" : string +>skills : { primary: string; secondary: string; } +>{ primary: "edging", secondary: "branch trimming" } : { primary: string; secondary: string; } +>primary : string +>"edging" : string +>secondary : string +>"branch trimming" : string + +foo3(robotA); +>foo3(robotA) : void +>foo3 : ({ skills }: Robot) => void +>robotA : Robot + +foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +>foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) : void +>foo3 : ({ skills }: Robot) => void +>{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"Edger" : string +>skills : { primary: string; secondary: string; } +>{ primary: "edging", secondary: "branch trimming" } : { primary: string; secondary: string; } +>primary : string +>"edging" : string +>secondary : string +>"branch trimming" : string + diff --git a/tests/cases/compiler/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts b/tests/cases/compiler/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts new file mode 100644 index 00000000000..062acd823ac --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts @@ -0,0 +1,31 @@ +// @sourcemap: true +declare var console: { + log(msg: string): void; +} +interface Robot { + name: string; + skills: { + primary: string; + secondary: string; + }; +} +var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; + +function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) { + console.log(primaryA); +} +function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) { + console.log(secondaryB); +} +function foo3({ skills }: Robot) { + console.log(skills.primary); +} + +foo1(robotA); +foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); + +foo2(robotA); +foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); + +foo3(robotA); +foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); From 0532e8cb1199e5d9768d47cd09719952491a4216 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 4 Dec 2015 13:07:47 -0800 Subject: [PATCH 019/209] Test cases for variable statement with array binding pattern --- ...ingVariableStatementArrayBindingPattern.js | 35 ++ ...ariableStatementArrayBindingPattern.js.map | 2 + ...StatementArrayBindingPattern.sourcemap.txt | 298 ++++++++++++++++++ ...riableStatementArrayBindingPattern.symbols | 57 ++++ ...VariableStatementArrayBindingPattern.types | 76 +++++ ...ingVariableStatementArrayBindingPattern.ts | 21 ++ 6 files changed, 489 insertions(+) create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.types create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js new file mode 100644 index 00000000000..fea40d4b900 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js @@ -0,0 +1,35 @@ +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts] +declare var console: { + log(msg: string): void; +} +type Robot = [number, string, string]; +var robotA: Robot = [1, "mower", "mowing"]; +var robotB: Robot = [2, "trimmer", "trimming"]; + + +let [, nameA] = robotA; +let [numberB] = robotB; +let [numberA2, nameA2, skillA2] = robotA; + +let [numberC2] = [3, "edging", "Trimming edges"]; +let [numberC, nameC, skillC] = [3, "edging", "Trimming edges"]; + +let [numberA3, ...robotAInfo] = robotA; + +if (nameA == nameA2) { + console.log(skillA2); +} + +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js] +var robotA = [1, "mower", "mowing"]; +var robotB = [2, "trimmer", "trimming"]; +var nameA = robotA[1]; +var numberB = robotB[0]; +var numberA2 = robotA[0], nameA2 = robotA[1], skillA2 = robotA[2]; +var numberC2 = [3, "edging", "Trimming edges"][0]; +var _a = [3, "edging", "Trimming edges"], numberC = _a[0], nameC = _a[1], skillC = _a[2]; +var numberA3 = robotA[0], robotAInfo = robotA.slice(1); +if (nameA == nameA2) { + console.log(skillA2); +} +//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js.map new file mode 100644 index 00000000000..e3912822214 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js.map @@ -0,0 +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;AAG/C,IAAO,iBAAK,CAAW;AACvB,IAAI,mBAAkB,CAAC;AACvB,IAAK,oBAAQ,EAAE,kBAAM,EAAE,mBAAO,CAAW;AAEzC,IAAI,6CAA4C,CAAC;AACjD,IAA+B,oCAA+B,EAAzD,eAAO,EAAE,aAAK,EAAE,cAAM,CAAoC;AAE/D,IAAK,oBAAQ,EAAE,4BAAa,CAAW;AAEvC,EAAE,CAAC,CAAC,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC;IAClB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt new file mode 100644 index 00000000000..519fcb1c334 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt @@ -0,0 +1,298 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js +mapUrl: sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js.map +sourceRoot: +sources: sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js +sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts +------------------------------------------------------------------- +>>>var robotA = [1, "mower", "mowing"]; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^^^^ +11> ^ +12> ^ +13> ^^^^^-> +1 >declare var console: { + > log(msg: string): void; + >} + >type Robot = [number, string, string]; + > +2 >var +3 > robotA +4 > : Robot = +5 > [ +6 > 1 +7 > , +8 > "mower" +9 > , +10> "mowing" +11> ] +12> ; +1 >Emitted(1, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(5, 5) + SourceIndex(0) +3 >Emitted(1, 11) Source(5, 11) + SourceIndex(0) +4 >Emitted(1, 14) Source(5, 21) + SourceIndex(0) +5 >Emitted(1, 15) Source(5, 22) + SourceIndex(0) +6 >Emitted(1, 16) Source(5, 23) + SourceIndex(0) +7 >Emitted(1, 18) Source(5, 25) + SourceIndex(0) +8 >Emitted(1, 25) Source(5, 32) + SourceIndex(0) +9 >Emitted(1, 27) Source(5, 34) + SourceIndex(0) +10>Emitted(1, 35) Source(5, 42) + SourceIndex(0) +11>Emitted(1, 36) Source(5, 43) + SourceIndex(0) +12>Emitted(1, 37) Source(5, 44) + SourceIndex(0) +--- +>>>var robotB = [2, "trimmer", "trimming"]; +1-> +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^ +11> ^ +12> ^ +1-> + > +2 >var +3 > robotB +4 > : Robot = +5 > [ +6 > 2 +7 > , +8 > "trimmer" +9 > , +10> "trimming" +11> ] +12> ; +1->Emitted(2, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(6, 5) + SourceIndex(0) +3 >Emitted(2, 11) Source(6, 11) + SourceIndex(0) +4 >Emitted(2, 14) Source(6, 21) + SourceIndex(0) +5 >Emitted(2, 15) Source(6, 22) + SourceIndex(0) +6 >Emitted(2, 16) Source(6, 23) + SourceIndex(0) +7 >Emitted(2, 18) Source(6, 25) + SourceIndex(0) +8 >Emitted(2, 27) Source(6, 34) + SourceIndex(0) +9 >Emitted(2, 29) Source(6, 36) + SourceIndex(0) +10>Emitted(2, 39) Source(6, 46) + SourceIndex(0) +11>Emitted(2, 40) Source(6, 47) + SourceIndex(0) +12>Emitted(2, 41) Source(6, 48) + SourceIndex(0) +--- +>>>var nameA = robotA[1]; +1 > +2 >^^^^ +3 > ^^^^^^^^^^^^^^^^^ +4 > ^ +5 > ^^^-> +1 > + > + > + > +2 >let [, +3 > nameA +4 > ] = robotA; +1 >Emitted(3, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(9, 8) + SourceIndex(0) +3 >Emitted(3, 22) Source(9, 13) + SourceIndex(0) +4 >Emitted(3, 23) Source(9, 24) + SourceIndex(0) +--- +>>>var numberB = robotB[0]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >let +3 > [numberB] = robotB +4 > ; +1->Emitted(4, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(4, 5) Source(10, 5) + SourceIndex(0) +3 >Emitted(4, 24) Source(10, 23) + SourceIndex(0) +4 >Emitted(4, 25) Source(10, 24) + SourceIndex(0) +--- +>>>var numberA2 = robotA[0], nameA2 = robotA[1], skillA2 = robotA[2]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^ +8 > ^ +1-> + > +2 >let [ +3 > numberA2 +4 > , +5 > nameA2 +6 > , +7 > skillA2 +8 > ] = robotA; +1->Emitted(5, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(5, 5) Source(11, 6) + SourceIndex(0) +3 >Emitted(5, 25) Source(11, 14) + SourceIndex(0) +4 >Emitted(5, 27) Source(11, 16) + SourceIndex(0) +5 >Emitted(5, 45) Source(11, 22) + SourceIndex(0) +6 >Emitted(5, 47) Source(11, 24) + SourceIndex(0) +7 >Emitted(5, 66) Source(11, 31) + SourceIndex(0) +8 >Emitted(5, 67) Source(11, 42) + SourceIndex(0) +--- +>>>var numberC2 = [3, "edging", "Trimming edges"][0]; +1 > +2 >^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >let +3 > [numberC2] = [3, "edging", "Trimming edges"] +4 > ; +1 >Emitted(6, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(6, 5) Source(13, 5) + SourceIndex(0) +3 >Emitted(6, 50) Source(13, 49) + SourceIndex(0) +4 >Emitted(6, 51) Source(13, 50) + SourceIndex(0) +--- +>>>var _a = [3, "edging", "Trimming edges"], numberC = _a[0], nameC = _a[1], skillC = _a[2]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^ +10> ^ +1-> + > +2 >let [numberC, nameC, skillC] = +3 > [3, "edging", "Trimming edges"] +4 > +5 > numberC +6 > , +7 > nameC +8 > , +9 > skillC +10> ] = [3, "edging", "Trimming edges"]; +1->Emitted(7, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(7, 5) Source(14, 32) + SourceIndex(0) +3 >Emitted(7, 41) Source(14, 63) + SourceIndex(0) +4 >Emitted(7, 43) Source(14, 6) + SourceIndex(0) +5 >Emitted(7, 58) Source(14, 13) + SourceIndex(0) +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) +10>Emitted(7, 90) Source(14, 64) + SourceIndex(0) +--- +>>>var numberA3 = robotA[0], robotAInfo = robotA.slice(1); +1 > +2 >^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^ +1 > + > + > +2 >let [ +3 > numberA3 +4 > , +5 > ...robotAInfo +6 > ] = robotA; +1 >Emitted(8, 1) Source(16, 1) + SourceIndex(0) +2 >Emitted(8, 5) Source(16, 6) + SourceIndex(0) +3 >Emitted(8, 25) Source(16, 14) + SourceIndex(0) +4 >Emitted(8, 27) Source(16, 16) + SourceIndex(0) +5 >Emitted(8, 55) Source(16, 29) + SourceIndex(0) +6 >Emitted(8, 56) Source(16, 40) + SourceIndex(0) +--- +>>>if (nameA == nameA2) { +1 > +2 >^^ +3 > ^ +4 > ^ +5 > ^^^^^ +6 > ^^^^ +7 > ^^^^^^ +8 > ^ +9 > ^ +10> ^ +11> ^^^^-> +1 > + > + > +2 >if +3 > +4 > ( +5 > nameA +6 > == +7 > nameA2 +8 > ) +9 > +10> { +1 >Emitted(9, 1) Source(18, 1) + SourceIndex(0) +2 >Emitted(9, 3) Source(18, 3) + SourceIndex(0) +3 >Emitted(9, 4) Source(18, 4) + SourceIndex(0) +4 >Emitted(9, 5) Source(18, 5) + SourceIndex(0) +5 >Emitted(9, 10) Source(18, 10) + SourceIndex(0) +6 >Emitted(9, 14) Source(18, 14) + SourceIndex(0) +7 >Emitted(9, 20) Source(18, 20) + SourceIndex(0) +8 >Emitted(9, 21) Source(18, 21) + SourceIndex(0) +9 >Emitted(9, 22) Source(18, 22) + SourceIndex(0) +10>Emitted(9, 23) Source(18, 23) + SourceIndex(0) +--- +>>> console.log(skillA2); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1-> + > +2 > console +3 > . +4 > log +5 > ( +6 > skillA2 +7 > ) +8 > ; +1->Emitted(10, 5) Source(19, 5) + SourceIndex(0) +2 >Emitted(10, 12) Source(19, 12) + SourceIndex(0) +3 >Emitted(10, 13) Source(19, 13) + SourceIndex(0) +4 >Emitted(10, 16) Source(19, 16) + SourceIndex(0) +5 >Emitted(10, 17) Source(19, 17) + SourceIndex(0) +6 >Emitted(10, 24) Source(19, 24) + SourceIndex(0) +7 >Emitted(10, 25) Source(19, 25) + SourceIndex(0) +8 >Emitted(10, 26) Source(19, 26) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(11, 1) Source(20, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(20, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.symbols b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.symbols new file mode 100644 index 00000000000..943f9e1c400 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.symbols @@ -0,0 +1,57 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 0, 11)) + + log(msg: string): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 1, 8)) +} +type Robot = [number, string, string]; +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 2, 1)) + +var robotA: Robot = [1, "mower", "mowing"]; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 4, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 2, 1)) + +var robotB: Robot = [2, "trimmer", "trimming"]; +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 5, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 2, 1)) + + +let [, nameA] = robotA; +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 8, 6)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 4, 3)) + +let [numberB] = robotB; +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 9, 5)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 5, 3)) + +let [numberA2, nameA2, skillA2] = robotA; +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 10, 5)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 10, 14)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 10, 22)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 4, 3)) + +let [numberC2] = [3, "edging", "Trimming edges"]; +>numberC2 : Symbol(numberC2, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 12, 5)) + +let [numberC, nameC, skillC] = [3, "edging", "Trimming edges"]; +>numberC : Symbol(numberC, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 13, 5)) +>nameC : Symbol(nameC, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 13, 13)) +>skillC : Symbol(skillC, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 13, 20)) + +let [numberA3, ...robotAInfo] = robotA; +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 15, 5)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 15, 14)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 4, 3)) + +if (nameA == nameA2) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 8, 6)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 10, 14)) + + console.log(skillA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 0, 22)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts, 10, 22)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.types new file mode 100644 index 00000000000..73006f4ec45 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.types @@ -0,0 +1,76 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts === +declare var console: { +>console : { log(msg: string): void; } + + log(msg: string): void; +>log : (msg: string) => void +>msg : string +} +type Robot = [number, string, string]; +>Robot : [number, string, string] + +var robotA: Robot = [1, "mower", "mowing"]; +>robotA : [number, string, string] +>Robot : [number, string, string] +>[1, "mower", "mowing"] : [number, string, string] +>1 : number +>"mower" : string +>"mowing" : string + +var robotB: Robot = [2, "trimmer", "trimming"]; +>robotB : [number, string, string] +>Robot : [number, string, string] +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + + +let [, nameA] = robotA; +> : undefined +>nameA : string +>robotA : [number, string, string] + +let [numberB] = robotB; +>numberB : number +>robotB : [number, string, string] + +let [numberA2, nameA2, skillA2] = robotA; +>numberA2 : number +>nameA2 : string +>skillA2 : string +>robotA : [number, string, string] + +let [numberC2] = [3, "edging", "Trimming edges"]; +>numberC2 : number +>[3, "edging", "Trimming edges"] : [number, string, string] +>3 : number +>"edging" : string +>"Trimming edges" : string + +let [numberC, nameC, skillC] = [3, "edging", "Trimming edges"]; +>numberC : number +>nameC : string +>skillC : string +>[3, "edging", "Trimming edges"] : [number, string, string] +>3 : number +>"edging" : string +>"Trimming edges" : string + +let [numberA3, ...robotAInfo] = robotA; +>numberA3 : number +>robotAInfo : (number | string)[] +>robotA : [number, string, string] + +if (nameA == nameA2) { +>nameA == nameA2 : boolean +>nameA : string +>nameA2 : string + + console.log(skillA2); +>console.log(skillA2) : void +>console.log : (msg: string) => void +>console : { log(msg: string): void; } +>log : (msg: string) => void +>skillA2 : string +} diff --git a/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts new file mode 100644 index 00000000000..3ac03143aa2 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts @@ -0,0 +1,21 @@ +// @sourcemap: true +declare var console: { + log(msg: string): void; +} +type Robot = [number, string, string]; +var robotA: Robot = [1, "mower", "mowing"]; +var robotB: Robot = [2, "trimmer", "trimming"]; + + +let [, nameA] = robotA; +let [numberB] = robotB; +let [numberA2, nameA2, skillA2] = robotA; + +let [numberC2] = [3, "edging", "Trimming edges"]; +let [numberC, nameC, skillC] = [3, "edging", "Trimming edges"]; + +let [numberA3, ...robotAInfo] = robotA; + +if (nameA == nameA2) { + console.log(skillA2); +} \ No newline at end of file From 7c618a494ddf0e755394297c9cdd8148ca3b5319 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 4 Dec 2015 13:18:31 -0800 Subject: [PATCH 020/209] Better the sourcemap for array binding pattern --- src/compiler/emitter.ts | 22 ++++++++++++++++++- ...ariableStatementArrayBindingPattern.js.map | 2 +- ...StatementArrayBindingPattern.sourcemap.txt | 10 ++++----- 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index d46d9d47210..1170ed7325a 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -4007,7 +4007,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi else { let nodeForSourceMap: Node; // If binding element is part of binding pattern with single element, use binding pattern - if (target.kind === SyntaxKind.BindingElement && (target.parent).elements.length === 1) { + if (target.kind === SyntaxKind.BindingElement && hasSingleBindingElement(target.parent)) { nodeForSourceMap = (target.parent.parent.kind === SyntaxKind.VariableDeclaration || target.parent.parent.kind === SyntaxKind.Parameter) ? target.parent.parent : // Set sourcemap as whole variable declaration target.parent; // Only binding Pattern @@ -4018,6 +4018,26 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emitAssignment(target.name, value, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0, nodeForSourceMap); emitCount++; } + + function hasSingleBindingElement(pattern: BindingPattern) { + if (pattern.kind === SyntaxKind.ObjectBindingPattern) { + return pattern.elements.length === 1; + } + + let hasFoundEmittingElement = false; + for (const element of pattern.elements) { + if (element.kind !== SyntaxKind.OmittedExpression) { + if (hasFoundEmittingElement) { + // More than one elements are going to be emitted + return false; + } + hasFoundEmittingElement = true; + } + } + + // If we found exactly one emitting element + return hasFoundEmittingElement; + } } } diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js.map index e3912822214..ff3efc97078 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;AAG/C,IAAO,iBAAK,CAAW;AACvB,IAAI,mBAAkB,CAAC;AACvB,IAAK,oBAAQ,EAAE,kBAAM,EAAE,mBAAO,CAAW;AAEzC,IAAI,6CAA4C,CAAC;AACjD,IAA+B,oCAA+B,EAAzD,eAAO,EAAE,aAAK,EAAE,cAAM,CAAoC;AAE/D,IAAK,oBAAQ,EAAE,4BAAa,CAAW;AAEvC,EAAE,CAAC,CAAC,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC;IAClB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC"} \ 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;AAG/C,IAAI,iBAAkB,CAAC;AACvB,IAAI,mBAAkB,CAAC;AACvB,IAAK,oBAAQ,EAAE,kBAAM,EAAE,mBAAO,CAAW;AAEzC,IAAI,6CAA4C,CAAC;AACjD,IAA+B,oCAA+B,EAAzD,eAAO,EAAE,aAAK,EAAE,cAAM,CAAoC;AAE/D,IAAK,oBAAQ,EAAE,4BAAa,CAAW;AAEvC,EAAE,CAAC,CAAC,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC;IAClB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt index 519fcb1c334..557043581c3 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt @@ -100,12 +100,12 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern. > > > -2 >let [, -3 > nameA -4 > ] = robotA; +2 >let +3 > [, nameA] = robotA +4 > ; 1 >Emitted(3, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(9, 8) + SourceIndex(0) -3 >Emitted(3, 22) Source(9, 13) + SourceIndex(0) +2 >Emitted(3, 5) Source(9, 5) + SourceIndex(0) +3 >Emitted(3, 22) Source(9, 23) + SourceIndex(0) 4 >Emitted(3, 23) Source(9, 24) + SourceIndex(0) --- >>>var numberB = robotB[0]; From 7945de4cd387bdd05da666c39a1d360bf904d29f Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 4 Dec 2015 13:19:33 -0800 Subject: [PATCH 021/209] Test case for nested array binding pattern --- ...ngVariableStatementArrayBindingPattern2.js | 34 ++ ...riableStatementArrayBindingPattern2.js.map | 2 + ...tatementArrayBindingPattern2.sourcemap.txt | 327 ++++++++++++++++++ ...iableStatementArrayBindingPattern2.symbols | 58 ++++ ...ariableStatementArrayBindingPattern2.types | 84 +++++ ...ngVariableStatementArrayBindingPattern2.ts | 20 ++ 6 files changed, 525 insertions(+) create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.types create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js new file mode 100644 index 00000000000..b93acc66a10 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js @@ -0,0 +1,34 @@ +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts] +declare var console: { + log(msg: string): void; +} +type MultiSkilledRobot = [string, [string, string]]; +var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; + +let [, skillA] = multiRobotA; +let [nameMB] = multiRobotB; +let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA; + +let [nameMC] = ["roomba", ["vaccum", "mopping"]]; +let [nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vaccum", "mopping"]]; + +let [...multiRobotAInfo] = multiRobotA; + +if (nameMB == nameMA) { + console.log(skillA[0] + skillA[1]); +} + +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js] +var multiRobotA = ["mower", ["mowing", ""]]; +var multiRobotB = ["trimmer", ["trimming", "edging"]]; +var skillA = multiRobotA[1]; +var nameMB = multiRobotB[0]; +var nameMA = multiRobotA[0], _a = multiRobotA[1], primarySkillA = _a[0], secondarySkillA = _a[1]; +var nameMC = ["roomba", ["vaccum", "mopping"]][0]; +var _b = ["roomba", ["vaccum", "mopping"]], nameMC2 = _b[0], _c = _b[1], primarySkillC = _c[0], secondarySkillC = _c[1]; +var multiRobotAInfo = multiRobotA.slice(0); +if (nameMB == nameMA) { + console.log(skillA[0] + skillA[1]); +} +//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js.map new file mode 100644 index 00000000000..6730b69d03b --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js.map @@ -0,0 +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;AAEzE,IAAI,uBAAwB,CAAC;AAC7B,IAAI,uBAAsB,CAAC;AAC3B,IAAK,uBAAM,uBAAG,qBAAa,EAAE,uBAAe,CAAiB;AAE7D,IAAI,6CAA4C,CAAC;AACjD,IAAkD,sCAAiC,EAA9E,eAAO,cAAG,qBAAa,EAAE,uBAAe,CAAuC;AAEpF,IAAI,sCAAkC,CAAC;AAEvC,EAAE,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC,CAAC;IACnB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt new file mode 100644 index 00000000000..2c8b903bf3c --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt @@ -0,0 +1,327 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js +mapUrl: sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js.map +sourceRoot: +sources: sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js +sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts +------------------------------------------------------------------- +>>>var multiRobotA = ["mower", ["mowing", ""]]; +1 > +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^ +10> ^^ +11> ^^ +12> ^ +13> ^ +14> ^ +15> ^^^^^^^^^^^-> +1 >declare var console: { + > log(msg: string): void; + >} + >type MultiSkilledRobot = [string, [string, string]]; + > +2 >var +3 > multiRobotA +4 > : MultiSkilledRobot = +5 > [ +6 > "mower" +7 > , +8 > [ +9 > "mowing" +10> , +11> "" +12> ] +13> ] +14> ; +1 >Emitted(1, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(5, 5) + SourceIndex(0) +3 >Emitted(1, 16) Source(5, 16) + SourceIndex(0) +4 >Emitted(1, 19) Source(5, 38) + SourceIndex(0) +5 >Emitted(1, 20) Source(5, 39) + SourceIndex(0) +6 >Emitted(1, 27) Source(5, 46) + SourceIndex(0) +7 >Emitted(1, 29) Source(5, 48) + SourceIndex(0) +8 >Emitted(1, 30) Source(5, 49) + SourceIndex(0) +9 >Emitted(1, 38) Source(5, 57) + SourceIndex(0) +10>Emitted(1, 40) Source(5, 59) + SourceIndex(0) +11>Emitted(1, 42) Source(5, 61) + SourceIndex(0) +12>Emitted(1, 43) Source(5, 62) + SourceIndex(0) +13>Emitted(1, 44) Source(5, 63) + SourceIndex(0) +14>Emitted(1, 45) Source(5, 64) + SourceIndex(0) +--- +>>>var multiRobotB = ["trimmer", ["trimming", "edging"]]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^ +12> ^ +13> ^ +14> ^ +1-> + > +2 >var +3 > multiRobotB +4 > : MultiSkilledRobot = +5 > [ +6 > "trimmer" +7 > , +8 > [ +9 > "trimming" +10> , +11> "edging" +12> ] +13> ] +14> ; +1->Emitted(2, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(6, 5) + SourceIndex(0) +3 >Emitted(2, 16) Source(6, 16) + SourceIndex(0) +4 >Emitted(2, 19) Source(6, 38) + SourceIndex(0) +5 >Emitted(2, 20) Source(6, 39) + SourceIndex(0) +6 >Emitted(2, 29) Source(6, 48) + SourceIndex(0) +7 >Emitted(2, 31) Source(6, 50) + SourceIndex(0) +8 >Emitted(2, 32) Source(6, 51) + SourceIndex(0) +9 >Emitted(2, 42) Source(6, 61) + SourceIndex(0) +10>Emitted(2, 44) Source(6, 63) + SourceIndex(0) +11>Emitted(2, 52) Source(6, 71) + SourceIndex(0) +12>Emitted(2, 53) Source(6, 72) + SourceIndex(0) +13>Emitted(2, 54) Source(6, 73) + SourceIndex(0) +14>Emitted(2, 55) Source(6, 74) + SourceIndex(0) +--- +>>>var skillA = multiRobotA[1]; +1 > +2 >^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^ +5 > ^-> +1 > + > + > +2 >let +3 > [, skillA] = multiRobotA +4 > ; +1 >Emitted(3, 1) Source(8, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(8, 5) + SourceIndex(0) +3 >Emitted(3, 28) Source(8, 29) + SourceIndex(0) +4 >Emitted(3, 29) Source(8, 30) + SourceIndex(0) +--- +>>>var nameMB = multiRobotB[0]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >let +3 > [nameMB] = multiRobotB +4 > ; +1->Emitted(4, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(4, 5) Source(9, 5) + SourceIndex(0) +3 >Emitted(4, 28) Source(9, 27) + SourceIndex(0) +4 >Emitted(4, 29) Source(9, 28) + SourceIndex(0) +--- +>>>var nameMA = multiRobotA[0], _a = multiRobotA[1], primarySkillA = _a[0], secondarySkillA = _a[1]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^ +1-> + > +2 >let [ +3 > nameMA +4 > , [ +5 > primarySkillA +6 > , +7 > secondarySkillA +8 > ]] = multiRobotA; +1->Emitted(5, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(5, 5) Source(10, 6) + SourceIndex(0) +3 >Emitted(5, 28) Source(10, 12) + SourceIndex(0) +4 >Emitted(5, 51) Source(10, 15) + SourceIndex(0) +5 >Emitted(5, 72) Source(10, 28) + SourceIndex(0) +6 >Emitted(5, 74) Source(10, 30) + SourceIndex(0) +7 >Emitted(5, 97) Source(10, 45) + SourceIndex(0) +8 >Emitted(5, 98) Source(10, 62) + SourceIndex(0) +--- +>>>var nameMC = ["roomba", ["vaccum", "mopping"]][0]; +1 > +2 >^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >let +3 > [nameMC] = ["roomba", ["vaccum", "mopping"]] +4 > ; +1 >Emitted(6, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(6, 5) Source(12, 5) + SourceIndex(0) +3 >Emitted(6, 50) Source(12, 49) + SourceIndex(0) +4 >Emitted(6, 51) Source(12, 50) + SourceIndex(0) +--- +>>>var _b = ["roomba", ["vaccum", "mopping"]], nameMC2 = _b[0], _c = _b[1], primarySkillC = _c[0], secondarySkillC = _c[1]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^ +6 > ^^^^^^^^^^^^^^ +7 > ^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^ +10> ^ +1-> + > +2 >let [nameMC2, [primarySkillC, secondarySkillC]] = +3 > ["roomba", ["vaccum", "mopping"]] +4 > +5 > nameMC2 +6 > , [ +7 > primarySkillC +8 > , +9 > secondarySkillC +10> ]] = ["roomba", ["vaccum", "mopping"]]; +1->Emitted(7, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(7, 5) Source(13, 51) + SourceIndex(0) +3 >Emitted(7, 43) Source(13, 84) + SourceIndex(0) +4 >Emitted(7, 45) Source(13, 6) + SourceIndex(0) +5 >Emitted(7, 60) Source(13, 13) + SourceIndex(0) +6 >Emitted(7, 74) Source(13, 16) + SourceIndex(0) +7 >Emitted(7, 95) Source(13, 29) + SourceIndex(0) +8 >Emitted(7, 97) Source(13, 31) + SourceIndex(0) +9 >Emitted(7, 120) Source(13, 46) + SourceIndex(0) +10>Emitted(7, 121) Source(13, 85) + SourceIndex(0) +--- +>>>var multiRobotAInfo = multiRobotA.slice(0); +1 > +2 >^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^ +1 > + > + > +2 >let +3 > [...multiRobotAInfo] = multiRobotA +4 > ; +1 >Emitted(8, 1) Source(15, 1) + SourceIndex(0) +2 >Emitted(8, 5) Source(15, 5) + SourceIndex(0) +3 >Emitted(8, 43) Source(15, 39) + SourceIndex(0) +4 >Emitted(8, 44) Source(15, 40) + SourceIndex(0) +--- +>>>if (nameMB == nameMA) { +1 > +2 >^^ +3 > ^ +4 > ^ +5 > ^^^^^^ +6 > ^^^^ +7 > ^^^^^^ +8 > ^ +9 > ^ +10> ^ +11> ^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >if +3 > +4 > ( +5 > nameMB +6 > == +7 > nameMA +8 > ) +9 > +10> { +1 >Emitted(9, 1) Source(17, 1) + SourceIndex(0) +2 >Emitted(9, 3) Source(17, 3) + SourceIndex(0) +3 >Emitted(9, 4) Source(17, 4) + SourceIndex(0) +4 >Emitted(9, 5) Source(17, 5) + SourceIndex(0) +5 >Emitted(9, 11) Source(17, 11) + SourceIndex(0) +6 >Emitted(9, 15) Source(17, 15) + SourceIndex(0) +7 >Emitted(9, 21) Source(17, 21) + SourceIndex(0) +8 >Emitted(9, 22) Source(17, 22) + SourceIndex(0) +9 >Emitted(9, 23) Source(17, 23) + SourceIndex(0) +10>Emitted(9, 24) Source(17, 24) + SourceIndex(0) +--- +>>> console.log(skillA[0] + skillA[1]); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +9 > ^ +10> ^^^ +11> ^^^^^^ +12> ^ +13> ^ +14> ^ +15> ^ +16> ^ +1-> + > +2 > console +3 > . +4 > log +5 > ( +6 > skillA +7 > [ +8 > 0 +9 > ] +10> + +11> skillA +12> [ +13> 1 +14> ] +15> ) +16> ; +1->Emitted(10, 5) Source(18, 5) + SourceIndex(0) +2 >Emitted(10, 12) Source(18, 12) + SourceIndex(0) +3 >Emitted(10, 13) Source(18, 13) + SourceIndex(0) +4 >Emitted(10, 16) Source(18, 16) + SourceIndex(0) +5 >Emitted(10, 17) Source(18, 17) + SourceIndex(0) +6 >Emitted(10, 23) Source(18, 23) + SourceIndex(0) +7 >Emitted(10, 24) Source(18, 24) + SourceIndex(0) +8 >Emitted(10, 25) Source(18, 25) + SourceIndex(0) +9 >Emitted(10, 26) Source(18, 26) + SourceIndex(0) +10>Emitted(10, 29) Source(18, 29) + SourceIndex(0) +11>Emitted(10, 35) Source(18, 35) + SourceIndex(0) +12>Emitted(10, 36) Source(18, 36) + SourceIndex(0) +13>Emitted(10, 37) Source(18, 37) + SourceIndex(0) +14>Emitted(10, 38) Source(18, 38) + SourceIndex(0) +15>Emitted(10, 39) Source(18, 39) + SourceIndex(0) +16>Emitted(10, 40) Source(18, 40) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(11, 1) Source(19, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(19, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.symbols b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.symbols new file mode 100644 index 00000000000..d2a61e2a5ef --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.symbols @@ -0,0 +1,58 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 0, 11)) + + log(msg: string): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 1, 8)) +} +type MultiSkilledRobot = [string, [string, string]]; +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 2, 1)) + +var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 4, 3)) +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 2, 1)) + +var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 5, 3)) +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 2, 1)) + +let [, skillA] = multiRobotA; +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 7, 6)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 4, 3)) + +let [nameMB] = multiRobotB; +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 8, 5)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 5, 3)) + +let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA; +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 9, 5)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 9, 14)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 9, 28)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 4, 3)) + +let [nameMC] = ["roomba", ["vaccum", "mopping"]]; +>nameMC : Symbol(nameMC, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 11, 5)) + +let [nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vaccum", "mopping"]]; +>nameMC2 : Symbol(nameMC2, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 12, 5)) +>primarySkillC : Symbol(primarySkillC, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 12, 15)) +>secondarySkillC : Symbol(secondarySkillC, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 12, 29)) + +let [...multiRobotAInfo] = multiRobotA; +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 14, 5)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 4, 3)) + +if (nameMB == nameMA) { +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 8, 5)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 9, 5)) + + console.log(skillA[0] + skillA[1]); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 0, 22)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 7, 6)) +>0 : Symbol(0) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts, 7, 6)) +>1 : Symbol(1) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.types new file mode 100644 index 00000000000..57d4b271c2f --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.types @@ -0,0 +1,84 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts === +declare var console: { +>console : { log(msg: string): void; } + + log(msg: string): void; +>log : (msg: string) => void +>msg : string +} +type MultiSkilledRobot = [string, [string, string]]; +>MultiSkilledRobot : [string, [string, string]] + +var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +>multiRobotA : [string, [string, string]] +>MultiSkilledRobot : [string, [string, string]] +>["mower", ["mowing", ""]] : [string, [string, string]] +>"mower" : string +>["mowing", ""] : [string, string] +>"mowing" : string +>"" : string + +var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +>multiRobotB : [string, [string, string]] +>MultiSkilledRobot : [string, [string, string]] +>["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>"trimmer" : string +>["trimming", "edging"] : [string, string] +>"trimming" : string +>"edging" : string + +let [, skillA] = multiRobotA; +> : undefined +>skillA : [string, string] +>multiRobotA : [string, [string, string]] + +let [nameMB] = multiRobotB; +>nameMB : string +>multiRobotB : [string, [string, string]] + +let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA; +>nameMA : string +>primarySkillA : string +>secondarySkillA : string +>multiRobotA : [string, [string, string]] + +let [nameMC] = ["roomba", ["vaccum", "mopping"]]; +>nameMC : string +>["roomba", ["vaccum", "mopping"]] : [string, string[]] +>"roomba" : string +>["vaccum", "mopping"] : string[] +>"vaccum" : string +>"mopping" : string + +let [nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vaccum", "mopping"]]; +>nameMC2 : string +>primarySkillC : string +>secondarySkillC : string +>["roomba", ["vaccum", "mopping"]] : [string, [string, string]] +>"roomba" : string +>["vaccum", "mopping"] : [string, string] +>"vaccum" : string +>"mopping" : string + +let [...multiRobotAInfo] = multiRobotA; +>multiRobotAInfo : (string | [string, string])[] +>multiRobotA : [string, [string, string]] + +if (nameMB == nameMA) { +>nameMB == nameMA : boolean +>nameMB : string +>nameMA : string + + console.log(skillA[0] + skillA[1]); +>console.log(skillA[0] + skillA[1]) : void +>console.log : (msg: string) => void +>console : { log(msg: string): void; } +>log : (msg: string) => void +>skillA[0] + skillA[1] : string +>skillA[0] : string +>skillA : [string, string] +>0 : number +>skillA[1] : string +>skillA : [string, string] +>1 : number +} diff --git a/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts new file mode 100644 index 00000000000..27497f2c220 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts @@ -0,0 +1,20 @@ +// @sourcemap: true +declare var console: { + log(msg: string): void; +} +type MultiSkilledRobot = [string, [string, string]]; +var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; + +let [, skillA] = multiRobotA; +let [nameMB] = multiRobotB; +let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA; + +let [nameMC] = ["roomba", ["vaccum", "mopping"]]; +let [nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vaccum", "mopping"]]; + +let [...multiRobotAInfo] = multiRobotA; + +if (nameMB == nameMA) { + console.log(skillA[0] + skillA[1]); +} \ No newline at end of file From de7626356c68df3bf2ba55616e80b8aebcdb6ca1 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 4 Dec 2015 13:41:10 -0800 Subject: [PATCH 022/209] Better the destructuring of nested array binding pattern --- src/compiler/emitter.ts | 6 +- ...riableStatementArrayBindingPattern2.js.map | 2 +- ...tatementArrayBindingPattern2.sourcemap.txt | 72 +++++++++++-------- 3 files changed, 46 insertions(+), 34 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 1170ed7325a..06272bbb3a7 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1986,8 +1986,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi return result; } - function createElementAccessExpression(expression: Expression, argumentExpression: Expression): ElementAccessExpression { - const result = createSourceMappedSynthesizedNode(SyntaxKind.ElementAccessExpression, argumentExpression); + function createElementAccessExpression(expression: Expression, argumentExpression: Expression, sourceMapNode?: Node): ElementAccessExpression { + const result = createSourceMappedSynthesizedNode(SyntaxKind.ElementAccessExpression, sourceMapNode || argumentExpression); result.expression = parenthesizeForAccess(expression); result.argumentExpression = argumentExpression; @@ -3996,7 +3996,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi else if (element.kind !== SyntaxKind.OmittedExpression) { if (!element.dotDotDotToken) { // Rewrite element to a declaration that accesses array element at index i - emitBindingElement(element, createElementAccessExpression(value, createNumericLiteral(i))); + emitBindingElement(element, createElementAccessExpression(value, createNumericLiteral(i), element)); } else if (i === numElements - 1) { emitBindingElement(element, createSliceCall(value, i)); diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js.map index 6730b69d03b..c588d92c53d 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;AAEzE,IAAI,uBAAwB,CAAC;AAC7B,IAAI,uBAAsB,CAAC;AAC3B,IAAK,uBAAM,uBAAG,qBAAa,EAAE,uBAAe,CAAiB;AAE7D,IAAI,6CAA4C,CAAC;AACjD,IAAkD,sCAAiC,EAA9E,eAAO,cAAG,qBAAa,EAAE,uBAAe,CAAuC;AAEpF,IAAI,sCAAkC,CAAC;AAEvC,EAAE,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC,CAAC;IACnB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvC,CAAC"} \ 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;AAEzE,IAAI,uBAAwB,CAAC;AAC7B,IAAI,uBAAsB,CAAC;AAC3B,IAAK,uBAAM,EAAE,mBAAgC,EAA/B,qBAAa,EAAE,uBAAe,CAAiB;AAE7D,IAAI,6CAA4C,CAAC;AACjD,IAAkD,sCAAiC,EAA9E,eAAO,EAAE,UAAgC,EAA/B,qBAAa,EAAE,uBAAe,CAAuC;AAEpF,IAAI,sCAAkC,CAAC;AAEvC,EAAE,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC,CAAC;IACnB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt index 2c8b903bf3c..a81a55e629a 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt @@ -139,28 +139,34 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern2 1-> 2 >^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^^^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^ -8 > ^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^ +10> ^ 1-> > 2 >let [ 3 > nameMA -4 > , [ -5 > primarySkillA -6 > , -7 > secondarySkillA -8 > ]] = multiRobotA; +4 > , +5 > [primarySkillA, secondarySkillA] +6 > +7 > primarySkillA +8 > , +9 > secondarySkillA +10> ]] = multiRobotA; 1->Emitted(5, 1) Source(10, 1) + SourceIndex(0) 2 >Emitted(5, 5) Source(10, 6) + SourceIndex(0) 3 >Emitted(5, 28) Source(10, 12) + SourceIndex(0) -4 >Emitted(5, 51) Source(10, 15) + SourceIndex(0) -5 >Emitted(5, 72) Source(10, 28) + SourceIndex(0) -6 >Emitted(5, 74) Source(10, 30) + SourceIndex(0) -7 >Emitted(5, 97) Source(10, 45) + SourceIndex(0) -8 >Emitted(5, 98) Source(10, 62) + SourceIndex(0) +4 >Emitted(5, 30) Source(10, 14) + SourceIndex(0) +5 >Emitted(5, 49) Source(10, 46) + SourceIndex(0) +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) +10>Emitted(5, 98) Source(10, 62) + SourceIndex(0) --- >>>var nameMC = ["roomba", ["vaccum", "mopping"]][0]; 1 > @@ -185,32 +191,38 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern2 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4 > ^^ 5 > ^^^^^^^^^^^^^^^ -6 > ^^^^^^^^^^^^^^ -7 > ^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^ -10> ^ +6 > ^^ +7 > ^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^ +12> ^ 1-> > 2 >let [nameMC2, [primarySkillC, secondarySkillC]] = 3 > ["roomba", ["vaccum", "mopping"]] 4 > 5 > nameMC2 -6 > , [ -7 > primarySkillC -8 > , -9 > secondarySkillC -10> ]] = ["roomba", ["vaccum", "mopping"]]; +6 > , +7 > [primarySkillC, secondarySkillC] +8 > +9 > primarySkillC +10> , +11> secondarySkillC +12> ]] = ["roomba", ["vaccum", "mopping"]]; 1->Emitted(7, 1) Source(13, 1) + SourceIndex(0) 2 >Emitted(7, 5) Source(13, 51) + SourceIndex(0) 3 >Emitted(7, 43) Source(13, 84) + SourceIndex(0) 4 >Emitted(7, 45) Source(13, 6) + SourceIndex(0) 5 >Emitted(7, 60) Source(13, 13) + SourceIndex(0) -6 >Emitted(7, 74) Source(13, 16) + SourceIndex(0) -7 >Emitted(7, 95) Source(13, 29) + SourceIndex(0) -8 >Emitted(7, 97) Source(13, 31) + SourceIndex(0) -9 >Emitted(7, 120) Source(13, 46) + SourceIndex(0) -10>Emitted(7, 121) Source(13, 85) + SourceIndex(0) +6 >Emitted(7, 62) Source(13, 15) + SourceIndex(0) +7 >Emitted(7, 72) Source(13, 47) + SourceIndex(0) +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) +12>Emitted(7, 121) Source(13, 85) + SourceIndex(0) --- >>>var multiRobotAInfo = multiRobotA.slice(0); 1 > From bdcdd67fb2ddcc25299396be7e65fe593871b414 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 4 Dec 2015 13:48:16 -0800 Subject: [PATCH 023/209] Test case for parameter array binding pattern --- ...tructuringParametertArrayBindingPattern.js | 62 ++ ...turingParametertArrayBindingPattern.js.map | 2 + ...arametertArrayBindingPattern.sourcemap.txt | 558 ++++++++++++++++++ ...uringParametertArrayBindingPattern.symbols | 94 +++ ...cturingParametertArrayBindingPattern.types | 127 ++++ ...tructuringParametertArrayBindingPattern.ts | 34 ++ 6 files changed, 877 insertions(+) create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.types create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPattern.ts diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.js b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.js new file mode 100644 index 00000000000..faa7b8dcde9 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.js @@ -0,0 +1,62 @@ +//// [sourceMapValidationDestructuringParametertArrayBindingPattern.ts] +declare var console: { + log(msg: any): void; +} +type Robot = [number, string, string]; +var robotA: Robot = [1, "mower", "mowing"]; + +function foo1([, nameA]: Robot) { + console.log(nameA); +} + +function foo2([numberB]: Robot) { + console.log(numberB); +} + +function foo3([numberA2, nameA2, skillA2]: Robot) { + console.log(nameA2); +} + +function foo4([numberA3, ...robotAInfo]: Robot) { + console.log(robotAInfo); +} + +foo1(robotA); +foo1([2, "trimmer", "trimming"]); + +foo2(robotA); +foo2([2, "trimmer", "trimming"]); + +foo3(robotA); +foo3([2, "trimmer", "trimming"]); + +foo4(robotA); +foo4([2, "trimmer", "trimming"]); + +//// [sourceMapValidationDestructuringParametertArrayBindingPattern.js] +var robotA = [1, "mower", "mowing"]; +function foo1(_a) { + var nameA = _a[1]; + console.log(nameA); +} +function foo2(_a) { + var numberB = _a[0]; + console.log(numberB); +} +function foo3(_a) { + var numberA2 = _a[0], nameA2 = _a[1], skillA2 = _a[2]; + console.log(nameA2); +} +function foo4(_a) { + var numberA3 = _a[0], robotAInfo = _a.slice(1); + console.log(robotAInfo); +} +foo1(robotA); +foo1([2, "trimmer", "trimming"]); +foo2(robotA); +foo2([2, "trimmer", "trimming"]); +foo3(robotA); +foo3([2, "trimmer", "trimming"]); +foo4(robotA); +foo4([2, "trimmer", "trimming"]); +//# sourceMappingURL=sourceMapValidationDestructuringParametertArrayBindingPattern.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.js.map new file mode 100644 index 00000000000..fe1498a5876 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringParametertArrayBindingPattern.js.map] +{"version":3,"file":"sourceMapValidationDestructuringParametertArrayBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringParametertArrayBindingPattern.ts"],"names":[],"mappings":"AAIA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAE3C,cAAc,EAAgB;QAAhB,aAAgB;IAC1B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AAED,cAAc,EAAgB;QAAhB,eAAgB;IAC1B,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC;AAED,cAAc,EAAkC;QAAjC,gBAAQ,EAAE,cAAM,EAAE,eAAO;IACpC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,cAAc,EAAgC;QAA/B,gBAAQ,EAAE,wBAAa;IAClC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AAC5B,CAAC;AAED,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AAEjC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AAEjC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AAEjC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.sourcemap.txt new file mode 100644 index 00000000000..345f8488718 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.sourcemap.txt @@ -0,0 +1,558 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringParametertArrayBindingPattern.js +mapUrl: sourceMapValidationDestructuringParametertArrayBindingPattern.js.map +sourceRoot: +sources: sourceMapValidationDestructuringParametertArrayBindingPattern.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPattern.js +sourceFile:sourceMapValidationDestructuringParametertArrayBindingPattern.ts +------------------------------------------------------------------- +>>>var robotA = [1, "mower", "mowing"]; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^^^^ +11> ^ +12> ^ +1 >declare var console: { + > log(msg: any): void; + >} + >type Robot = [number, string, string]; + > +2 >var +3 > robotA +4 > : Robot = +5 > [ +6 > 1 +7 > , +8 > "mower" +9 > , +10> "mowing" +11> ] +12> ; +1 >Emitted(1, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(5, 5) + SourceIndex(0) +3 >Emitted(1, 11) Source(5, 11) + SourceIndex(0) +4 >Emitted(1, 14) Source(5, 21) + SourceIndex(0) +5 >Emitted(1, 15) Source(5, 22) + SourceIndex(0) +6 >Emitted(1, 16) Source(5, 23) + SourceIndex(0) +7 >Emitted(1, 18) Source(5, 25) + SourceIndex(0) +8 >Emitted(1, 25) Source(5, 32) + SourceIndex(0) +9 >Emitted(1, 27) Source(5, 34) + SourceIndex(0) +10>Emitted(1, 35) Source(5, 42) + SourceIndex(0) +11>Emitted(1, 36) Source(5, 43) + SourceIndex(0) +12>Emitted(1, 37) Source(5, 44) + SourceIndex(0) +--- +>>>function foo1(_a) { +1 > +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^-> +1 > + > + > +2 >function foo1( +3 > [, nameA]: Robot +1 >Emitted(2, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(2, 15) Source(7, 15) + SourceIndex(0) +3 >Emitted(2, 17) Source(7, 31) + SourceIndex(0) +--- +>>> var nameA = _a[1]; +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^ +3 > ^^^-> +1-> +2 > [, nameA]: Robot +1->Emitted(3, 9) Source(7, 15) + SourceIndex(0) +2 >Emitted(3, 22) Source(7, 31) + SourceIndex(0) +--- +>>> console.log(nameA); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1->) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1->Emitted(4, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(4, 12) Source(8, 12) + SourceIndex(0) +3 >Emitted(4, 13) Source(8, 13) + SourceIndex(0) +4 >Emitted(4, 16) Source(8, 16) + SourceIndex(0) +5 >Emitted(4, 17) Source(8, 17) + SourceIndex(0) +6 >Emitted(4, 22) Source(8, 22) + SourceIndex(0) +7 >Emitted(4, 23) Source(8, 23) + SourceIndex(0) +8 >Emitted(4, 24) Source(8, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(5, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(5, 2) Source(9, 2) + SourceIndex(0) +--- +>>>function foo2(_a) { +1-> +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^-> +1-> + > + > +2 >function foo2( +3 > [numberB]: Robot +1->Emitted(6, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(6, 15) Source(11, 15) + SourceIndex(0) +3 >Emitted(6, 17) Source(11, 31) + SourceIndex(0) +--- +>>> var numberB = _a[0]; +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^^ +3 > ^^^-> +1-> +2 > [numberB]: Robot +1->Emitted(7, 9) Source(11, 15) + SourceIndex(0) +2 >Emitted(7, 24) Source(11, 31) + SourceIndex(0) +--- +>>> console.log(numberB); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1->) { + > +2 > console +3 > . +4 > log +5 > ( +6 > numberB +7 > ) +8 > ; +1->Emitted(8, 5) Source(12, 5) + SourceIndex(0) +2 >Emitted(8, 12) Source(12, 12) + SourceIndex(0) +3 >Emitted(8, 13) Source(12, 13) + SourceIndex(0) +4 >Emitted(8, 16) Source(12, 16) + SourceIndex(0) +5 >Emitted(8, 17) Source(12, 17) + SourceIndex(0) +6 >Emitted(8, 24) Source(12, 24) + SourceIndex(0) +7 >Emitted(8, 25) Source(12, 25) + SourceIndex(0) +8 >Emitted(8, 26) Source(12, 26) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(9, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(13, 2) + SourceIndex(0) +--- +>>>function foo3(_a) { +1-> +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +2 >function foo3( +3 > [numberA2, nameA2, skillA2]: Robot +1->Emitted(10, 1) Source(15, 1) + SourceIndex(0) +2 >Emitted(10, 15) Source(15, 15) + SourceIndex(0) +3 >Emitted(10, 17) Source(15, 49) + SourceIndex(0) +--- +>>> var numberA2 = _a[0], nameA2 = _a[1], skillA2 = _a[2]; +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^ +1-> +2 > numberA2 +3 > , +4 > nameA2 +5 > , +6 > skillA2 +1->Emitted(11, 9) Source(15, 16) + SourceIndex(0) +2 >Emitted(11, 25) Source(15, 24) + SourceIndex(0) +3 >Emitted(11, 27) Source(15, 26) + SourceIndex(0) +4 >Emitted(11, 41) Source(15, 32) + SourceIndex(0) +5 >Emitted(11, 43) Source(15, 34) + SourceIndex(0) +6 >Emitted(11, 58) Source(15, 41) + SourceIndex(0) +--- +>>> console.log(nameA2); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 >]: Robot) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA2 +7 > ) +8 > ; +1 >Emitted(12, 5) Source(16, 5) + SourceIndex(0) +2 >Emitted(12, 12) Source(16, 12) + SourceIndex(0) +3 >Emitted(12, 13) Source(16, 13) + SourceIndex(0) +4 >Emitted(12, 16) Source(16, 16) + SourceIndex(0) +5 >Emitted(12, 17) Source(16, 17) + SourceIndex(0) +6 >Emitted(12, 23) Source(16, 23) + SourceIndex(0) +7 >Emitted(12, 24) Source(16, 24) + SourceIndex(0) +8 >Emitted(12, 25) Source(16, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(13, 1) Source(17, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(17, 2) + SourceIndex(0) +--- +>>>function foo4(_a) { +1-> +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +2 >function foo4( +3 > [numberA3, ...robotAInfo]: Robot +1->Emitted(14, 1) Source(19, 1) + SourceIndex(0) +2 >Emitted(14, 15) Source(19, 15) + SourceIndex(0) +3 >Emitted(14, 17) Source(19, 47) + SourceIndex(0) +--- +>>> var numberA3 = _a[0], robotAInfo = _a.slice(1); +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > numberA3 +3 > , +4 > ...robotAInfo +1->Emitted(15, 9) Source(19, 16) + SourceIndex(0) +2 >Emitted(15, 25) Source(19, 24) + SourceIndex(0) +3 >Emitted(15, 27) Source(19, 26) + SourceIndex(0) +4 >Emitted(15, 51) Source(19, 39) + SourceIndex(0) +--- +>>> console.log(robotAInfo); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^ +7 > ^ +8 > ^ +1 >]: Robot) { + > +2 > console +3 > . +4 > log +5 > ( +6 > robotAInfo +7 > ) +8 > ; +1 >Emitted(16, 5) Source(20, 5) + SourceIndex(0) +2 >Emitted(16, 12) Source(20, 12) + SourceIndex(0) +3 >Emitted(16, 13) Source(20, 13) + SourceIndex(0) +4 >Emitted(16, 16) Source(20, 16) + SourceIndex(0) +5 >Emitted(16, 17) Source(20, 17) + SourceIndex(0) +6 >Emitted(16, 27) Source(20, 27) + SourceIndex(0) +7 >Emitted(16, 28) Source(20, 28) + SourceIndex(0) +8 >Emitted(16, 29) Source(20, 29) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(17, 1) Source(21, 1) + SourceIndex(0) +2 >Emitted(17, 2) Source(21, 2) + SourceIndex(0) +--- +>>>foo1(robotA); +1-> +2 >^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +2 >foo1 +3 > ( +4 > robotA +5 > ) +6 > ; +1->Emitted(18, 1) Source(23, 1) + SourceIndex(0) +2 >Emitted(18, 5) Source(23, 5) + SourceIndex(0) +3 >Emitted(18, 6) Source(23, 6) + SourceIndex(0) +4 >Emitted(18, 12) Source(23, 12) + SourceIndex(0) +5 >Emitted(18, 13) Source(23, 13) + SourceIndex(0) +6 >Emitted(18, 14) Source(23, 14) + SourceIndex(0) +--- +>>>foo1([2, "trimmer", "trimming"]); +1-> +2 >^^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^ +7 > ^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^ +10> ^ +11> ^ +12> ^ +1-> + > +2 >foo1 +3 > ( +4 > [ +5 > 2 +6 > , +7 > "trimmer" +8 > , +9 > "trimming" +10> ] +11> ) +12> ; +1->Emitted(19, 1) Source(24, 1) + SourceIndex(0) +2 >Emitted(19, 5) Source(24, 5) + SourceIndex(0) +3 >Emitted(19, 6) Source(24, 6) + SourceIndex(0) +4 >Emitted(19, 7) Source(24, 7) + SourceIndex(0) +5 >Emitted(19, 8) Source(24, 8) + SourceIndex(0) +6 >Emitted(19, 10) Source(24, 10) + SourceIndex(0) +7 >Emitted(19, 19) Source(24, 19) + SourceIndex(0) +8 >Emitted(19, 21) Source(24, 21) + SourceIndex(0) +9 >Emitted(19, 31) Source(24, 31) + SourceIndex(0) +10>Emitted(19, 32) Source(24, 32) + SourceIndex(0) +11>Emitted(19, 33) Source(24, 33) + SourceIndex(0) +12>Emitted(19, 34) Source(24, 34) + SourceIndex(0) +--- +>>>foo2(robotA); +1 > +2 >^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >foo2 +3 > ( +4 > robotA +5 > ) +6 > ; +1 >Emitted(20, 1) Source(26, 1) + SourceIndex(0) +2 >Emitted(20, 5) Source(26, 5) + SourceIndex(0) +3 >Emitted(20, 6) Source(26, 6) + SourceIndex(0) +4 >Emitted(20, 12) Source(26, 12) + SourceIndex(0) +5 >Emitted(20, 13) Source(26, 13) + SourceIndex(0) +6 >Emitted(20, 14) Source(26, 14) + SourceIndex(0) +--- +>>>foo2([2, "trimmer", "trimming"]); +1-> +2 >^^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^ +7 > ^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^ +10> ^ +11> ^ +12> ^ +1-> + > +2 >foo2 +3 > ( +4 > [ +5 > 2 +6 > , +7 > "trimmer" +8 > , +9 > "trimming" +10> ] +11> ) +12> ; +1->Emitted(21, 1) Source(27, 1) + SourceIndex(0) +2 >Emitted(21, 5) Source(27, 5) + SourceIndex(0) +3 >Emitted(21, 6) Source(27, 6) + SourceIndex(0) +4 >Emitted(21, 7) Source(27, 7) + SourceIndex(0) +5 >Emitted(21, 8) Source(27, 8) + SourceIndex(0) +6 >Emitted(21, 10) Source(27, 10) + SourceIndex(0) +7 >Emitted(21, 19) Source(27, 19) + SourceIndex(0) +8 >Emitted(21, 21) Source(27, 21) + SourceIndex(0) +9 >Emitted(21, 31) Source(27, 31) + SourceIndex(0) +10>Emitted(21, 32) Source(27, 32) + SourceIndex(0) +11>Emitted(21, 33) Source(27, 33) + SourceIndex(0) +12>Emitted(21, 34) Source(27, 34) + SourceIndex(0) +--- +>>>foo3(robotA); +1 > +2 >^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >foo3 +3 > ( +4 > robotA +5 > ) +6 > ; +1 >Emitted(22, 1) Source(29, 1) + SourceIndex(0) +2 >Emitted(22, 5) Source(29, 5) + SourceIndex(0) +3 >Emitted(22, 6) Source(29, 6) + SourceIndex(0) +4 >Emitted(22, 12) Source(29, 12) + SourceIndex(0) +5 >Emitted(22, 13) Source(29, 13) + SourceIndex(0) +6 >Emitted(22, 14) Source(29, 14) + SourceIndex(0) +--- +>>>foo3([2, "trimmer", "trimming"]); +1-> +2 >^^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^ +7 > ^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^ +10> ^ +11> ^ +12> ^ +1-> + > +2 >foo3 +3 > ( +4 > [ +5 > 2 +6 > , +7 > "trimmer" +8 > , +9 > "trimming" +10> ] +11> ) +12> ; +1->Emitted(23, 1) Source(30, 1) + SourceIndex(0) +2 >Emitted(23, 5) Source(30, 5) + SourceIndex(0) +3 >Emitted(23, 6) Source(30, 6) + SourceIndex(0) +4 >Emitted(23, 7) Source(30, 7) + SourceIndex(0) +5 >Emitted(23, 8) Source(30, 8) + SourceIndex(0) +6 >Emitted(23, 10) Source(30, 10) + SourceIndex(0) +7 >Emitted(23, 19) Source(30, 19) + SourceIndex(0) +8 >Emitted(23, 21) Source(30, 21) + SourceIndex(0) +9 >Emitted(23, 31) Source(30, 31) + SourceIndex(0) +10>Emitted(23, 32) Source(30, 32) + SourceIndex(0) +11>Emitted(23, 33) Source(30, 33) + SourceIndex(0) +12>Emitted(23, 34) Source(30, 34) + SourceIndex(0) +--- +>>>foo4(robotA); +1 > +2 >^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >foo4 +3 > ( +4 > robotA +5 > ) +6 > ; +1 >Emitted(24, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(24, 5) Source(32, 5) + SourceIndex(0) +3 >Emitted(24, 6) Source(32, 6) + SourceIndex(0) +4 >Emitted(24, 12) Source(32, 12) + SourceIndex(0) +5 >Emitted(24, 13) Source(32, 13) + SourceIndex(0) +6 >Emitted(24, 14) Source(32, 14) + SourceIndex(0) +--- +>>>foo4([2, "trimmer", "trimming"]); +1-> +2 >^^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^ +7 > ^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^ +10> ^ +11> ^ +12> ^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >foo4 +3 > ( +4 > [ +5 > 2 +6 > , +7 > "trimmer" +8 > , +9 > "trimming" +10> ] +11> ) +12> ; +1->Emitted(25, 1) Source(33, 1) + SourceIndex(0) +2 >Emitted(25, 5) Source(33, 5) + SourceIndex(0) +3 >Emitted(25, 6) Source(33, 6) + SourceIndex(0) +4 >Emitted(25, 7) Source(33, 7) + SourceIndex(0) +5 >Emitted(25, 8) Source(33, 8) + SourceIndex(0) +6 >Emitted(25, 10) Source(33, 10) + SourceIndex(0) +7 >Emitted(25, 19) Source(33, 19) + SourceIndex(0) +8 >Emitted(25, 21) Source(33, 21) + SourceIndex(0) +9 >Emitted(25, 31) Source(33, 31) + SourceIndex(0) +10>Emitted(25, 32) Source(33, 32) + SourceIndex(0) +11>Emitted(25, 33) Source(33, 33) + SourceIndex(0) +12>Emitted(25, 34) Source(33, 34) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringParametertArrayBindingPattern.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.symbols b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.symbols new file mode 100644 index 00000000000..a1370b132c2 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.symbols @@ -0,0 +1,94 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPattern.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 0, 11)) + + log(msg: any): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 1, 8)) +} +type Robot = [number, string, string]; +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 2, 1)) + +var robotA: Robot = [1, "mower", "mowing"]; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 4, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 2, 1)) + +function foo1([, nameA]: Robot) { +>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 4, 43)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 6, 16)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 2, 1)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 6, 16)) +} + +function foo2([numberB]: Robot) { +>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 8, 1)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 10, 15)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 2, 1)) + + console.log(numberB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 0, 22)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 10, 15)) +} + +function foo3([numberA2, nameA2, skillA2]: Robot) { +>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 12, 1)) +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 14, 15)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 14, 24)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 14, 32)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 2, 1)) + + console.log(nameA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 0, 22)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 14, 24)) +} + +function foo4([numberA3, ...robotAInfo]: Robot) { +>foo4 : Symbol(foo4, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 16, 1)) +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 18, 15)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 18, 24)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 2, 1)) + + console.log(robotAInfo); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 0, 22)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 18, 24)) +} + +foo1(robotA); +>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 4, 43)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 4, 3)) + +foo1([2, "trimmer", "trimming"]); +>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 4, 43)) + +foo2(robotA); +>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 8, 1)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 4, 3)) + +foo2([2, "trimmer", "trimming"]); +>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 8, 1)) + +foo3(robotA); +>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 12, 1)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 4, 3)) + +foo3([2, "trimmer", "trimming"]); +>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 12, 1)) + +foo4(robotA); +>foo4 : Symbol(foo4, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 16, 1)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 4, 3)) + +foo4([2, "trimmer", "trimming"]); +>foo4 : Symbol(foo4, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern.ts, 16, 1)) + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.types b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.types new file mode 100644 index 00000000000..9c695f1c0dd --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.types @@ -0,0 +1,127 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPattern.ts === +declare var console: { +>console : { log(msg: any): void; } + + log(msg: any): void; +>log : (msg: any) => void +>msg : any +} +type Robot = [number, string, string]; +>Robot : [number, string, string] + +var robotA: Robot = [1, "mower", "mowing"]; +>robotA : [number, string, string] +>Robot : [number, string, string] +>[1, "mower", "mowing"] : [number, string, string] +>1 : number +>"mower" : string +>"mowing" : string + +function foo1([, nameA]: Robot) { +>foo1 : ([, nameA]: [number, string, string]) => void +> : undefined +>nameA : string +>Robot : [number, string, string] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} + +function foo2([numberB]: Robot) { +>foo2 : ([numberB]: [number, string, string]) => void +>numberB : number +>Robot : [number, string, string] + + console.log(numberB); +>console.log(numberB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberB : number +} + +function foo3([numberA2, nameA2, skillA2]: Robot) { +>foo3 : ([numberA2, nameA2, skillA2]: [number, string, string]) => void +>numberA2 : number +>nameA2 : string +>skillA2 : string +>Robot : [number, string, string] + + console.log(nameA2); +>console.log(nameA2) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA2 : string +} + +function foo4([numberA3, ...robotAInfo]: Robot) { +>foo4 : ([numberA3, ...robotAInfo]: [number, string, string]) => void +>numberA3 : number +>robotAInfo : (number | string)[] +>Robot : [number, string, string] + + console.log(robotAInfo); +>console.log(robotAInfo) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>robotAInfo : (number | string)[] +} + +foo1(robotA); +>foo1(robotA) : void +>foo1 : ([, nameA]: [number, string, string]) => void +>robotA : [number, string, string] + +foo1([2, "trimmer", "trimming"]); +>foo1([2, "trimmer", "trimming"]) : void +>foo1 : ([, nameA]: [number, string, string]) => void +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + +foo2(robotA); +>foo2(robotA) : void +>foo2 : ([numberB]: [number, string, string]) => void +>robotA : [number, string, string] + +foo2([2, "trimmer", "trimming"]); +>foo2([2, "trimmer", "trimming"]) : void +>foo2 : ([numberB]: [number, string, string]) => void +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + +foo3(robotA); +>foo3(robotA) : void +>foo3 : ([numberA2, nameA2, skillA2]: [number, string, string]) => void +>robotA : [number, string, string] + +foo3([2, "trimmer", "trimming"]); +>foo3([2, "trimmer", "trimming"]) : void +>foo3 : ([numberA2, nameA2, skillA2]: [number, string, string]) => void +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + +foo4(robotA); +>foo4(robotA) : void +>foo4 : ([numberA3, ...robotAInfo]: [number, string, string]) => void +>robotA : [number, string, string] + +foo4([2, "trimmer", "trimming"]); +>foo4([2, "trimmer", "trimming"]) : void +>foo4 : ([numberA3, ...robotAInfo]: [number, string, string]) => void +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + diff --git a/tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPattern.ts b/tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPattern.ts new file mode 100644 index 00000000000..731dc7f2657 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPattern.ts @@ -0,0 +1,34 @@ +// @sourcemap: true +declare var console: { + log(msg: any): void; +} +type Robot = [number, string, string]; +var robotA: Robot = [1, "mower", "mowing"]; + +function foo1([, nameA]: Robot) { + console.log(nameA); +} + +function foo2([numberB]: Robot) { + console.log(numberB); +} + +function foo3([numberA2, nameA2, skillA2]: Robot) { + console.log(nameA2); +} + +function foo4([numberA3, ...robotAInfo]: Robot) { + console.log(robotAInfo); +} + +foo1(robotA); +foo1([2, "trimmer", "trimming"]); + +foo2(robotA); +foo2([2, "trimmer", "trimming"]); + +foo3(robotA); +foo3([2, "trimmer", "trimming"]); + +foo4(robotA); +foo4([2, "trimmer", "trimming"]); \ No newline at end of file From 6f896836b8457ffe67d4e8705c0c753957dd5f59 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 4 Dec 2015 13:53:40 -0800 Subject: [PATCH 024/209] Test cases for nested array binding pattern destructuring in parameters --- ...ructuringParametertArrayBindingPattern2.js | 62 ++ ...uringParametertArrayBindingPattern2.js.map | 2 + ...rametertArrayBindingPattern2.sourcemap.txt | 588 ++++++++++++++++++ ...ringParametertArrayBindingPattern2.symbols | 93 +++ ...turingParametertArrayBindingPattern2.types | 131 ++++ ...ructuringParametertArrayBindingPattern2.ts | 34 + 6 files changed, 910 insertions(+) create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.types create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPattern2.ts diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.js b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.js new file mode 100644 index 00000000000..0aa302e0990 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.js @@ -0,0 +1,62 @@ +//// [sourceMapValidationDestructuringParametertArrayBindingPattern2.ts] +declare var console: { + log(msg: any): void; +} +type Robot = [string, [string, string]]; +var robotA: Robot = ["trimmer", ["trimming", "edging"]]; + +function foo1([, skillA]: Robot) { + console.log(skillA); +} + +function foo2([nameMB]: Robot) { + console.log(nameMB); +} + +function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) { + console.log(nameMA); +} + +function foo4([...multiRobotAInfo]: Robot) { + console.log(multiRobotAInfo); +} + +foo1(robotA); +foo1(["roomba", ["vaccum", "mopping"]]); + +foo2(robotA); +foo2(["roomba", ["vaccum", "mopping"]]); + +foo3(robotA); +foo3(["roomba", ["vaccum", "mopping"]]); + +foo4(robotA); +foo4(["roomba", ["vaccum", "mopping"]]); + +//// [sourceMapValidationDestructuringParametertArrayBindingPattern2.js] +var robotA = ["trimmer", ["trimming", "edging"]]; +function foo1(_a) { + var skillA = _a[1]; + console.log(skillA); +} +function foo2(_a) { + var nameMB = _a[0]; + console.log(nameMB); +} +function foo3(_a) { + var nameMA = _a[0], _b = _a[1], primarySkillA = _b[0], secondarySkillA = _b[1]; + console.log(nameMA); +} +function foo4(_a) { + var multiRobotAInfo = _a.slice(0); + console.log(multiRobotAInfo); +} +foo1(robotA); +foo1(["roomba", ["vaccum", "mopping"]]); +foo2(robotA); +foo2(["roomba", ["vaccum", "mopping"]]); +foo3(robotA); +foo3(["roomba", ["vaccum", "mopping"]]); +foo4(robotA); +foo4(["roomba", ["vaccum", "mopping"]]); +//# sourceMappingURL=sourceMapValidationDestructuringParametertArrayBindingPattern2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.js.map new file mode 100644 index 00000000000..aa8ada6f3ba --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringParametertArrayBindingPattern2.js.map] +{"version":3,"file":"sourceMapValidationDestructuringParametertArrayBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringParametertArrayBindingPattern2.ts"],"names":[],"mappings":"AAIA,IAAI,MAAM,GAAU,CAAC,SAAS,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;AAExD,cAAc,EAAiB;QAAjB,cAAiB;IAC3B,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,cAAc,EAAe;QAAf,cAAe;IACzB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,cAAc,EAAiD;QAAhD,cAAM,EAAE,UAAgC,EAA/B,qBAAa,EAAE,uBAAe;IAClD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,cAAc,EAA2B;QAA3B,6BAA2B;IACrC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC;AAED,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAExC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAExC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAExC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.sourcemap.txt new file mode 100644 index 00000000000..e20536be8e9 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.sourcemap.txt @@ -0,0 +1,588 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringParametertArrayBindingPattern2.js +mapUrl: sourceMapValidationDestructuringParametertArrayBindingPattern2.js.map +sourceRoot: +sources: sourceMapValidationDestructuringParametertArrayBindingPattern2.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPattern2.js +sourceFile:sourceMapValidationDestructuringParametertArrayBindingPattern2.ts +------------------------------------------------------------------- +>>>var robotA = ["trimmer", ["trimming", "edging"]]; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^ +12> ^ +13> ^ +14> ^ +1 >declare var console: { + > log(msg: any): void; + >} + >type Robot = [string, [string, string]]; + > +2 >var +3 > robotA +4 > : Robot = +5 > [ +6 > "trimmer" +7 > , +8 > [ +9 > "trimming" +10> , +11> "edging" +12> ] +13> ] +14> ; +1 >Emitted(1, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(5, 5) + SourceIndex(0) +3 >Emitted(1, 11) Source(5, 11) + SourceIndex(0) +4 >Emitted(1, 14) Source(5, 21) + SourceIndex(0) +5 >Emitted(1, 15) Source(5, 22) + SourceIndex(0) +6 >Emitted(1, 24) Source(5, 31) + SourceIndex(0) +7 >Emitted(1, 26) Source(5, 33) + SourceIndex(0) +8 >Emitted(1, 27) Source(5, 34) + SourceIndex(0) +9 >Emitted(1, 37) Source(5, 44) + SourceIndex(0) +10>Emitted(1, 39) Source(5, 46) + SourceIndex(0) +11>Emitted(1, 47) Source(5, 54) + SourceIndex(0) +12>Emitted(1, 48) Source(5, 55) + SourceIndex(0) +13>Emitted(1, 49) Source(5, 56) + SourceIndex(0) +14>Emitted(1, 50) Source(5, 57) + SourceIndex(0) +--- +>>>function foo1(_a) { +1 > +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^-> +1 > + > + > +2 >function foo1( +3 > [, skillA]: Robot +1 >Emitted(2, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(2, 15) Source(7, 15) + SourceIndex(0) +3 >Emitted(2, 17) Source(7, 32) + SourceIndex(0) +--- +>>> var skillA = _a[1]; +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^^-> +1-> +2 > [, skillA]: Robot +1->Emitted(3, 9) Source(7, 15) + SourceIndex(0) +2 >Emitted(3, 23) Source(7, 32) + SourceIndex(0) +--- +>>> console.log(skillA); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1->) { + > +2 > console +3 > . +4 > log +5 > ( +6 > skillA +7 > ) +8 > ; +1->Emitted(4, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(4, 12) Source(8, 12) + SourceIndex(0) +3 >Emitted(4, 13) Source(8, 13) + SourceIndex(0) +4 >Emitted(4, 16) Source(8, 16) + SourceIndex(0) +5 >Emitted(4, 17) Source(8, 17) + SourceIndex(0) +6 >Emitted(4, 23) Source(8, 23) + SourceIndex(0) +7 >Emitted(4, 24) Source(8, 24) + SourceIndex(0) +8 >Emitted(4, 25) Source(8, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(5, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(5, 2) Source(9, 2) + SourceIndex(0) +--- +>>>function foo2(_a) { +1-> +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^-> +1-> + > + > +2 >function foo2( +3 > [nameMB]: Robot +1->Emitted(6, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(6, 15) Source(11, 15) + SourceIndex(0) +3 >Emitted(6, 17) Source(11, 30) + SourceIndex(0) +--- +>>> var nameMB = _a[0]; +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^^-> +1-> +2 > [nameMB]: Robot +1->Emitted(7, 9) Source(11, 15) + SourceIndex(0) +2 >Emitted(7, 23) Source(11, 30) + SourceIndex(0) +--- +>>> console.log(nameMB); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1->) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMB +7 > ) +8 > ; +1->Emitted(8, 5) Source(12, 5) + SourceIndex(0) +2 >Emitted(8, 12) Source(12, 12) + SourceIndex(0) +3 >Emitted(8, 13) Source(12, 13) + SourceIndex(0) +4 >Emitted(8, 16) Source(12, 16) + SourceIndex(0) +5 >Emitted(8, 17) Source(12, 17) + SourceIndex(0) +6 >Emitted(8, 23) Source(12, 23) + SourceIndex(0) +7 >Emitted(8, 24) Source(12, 24) + SourceIndex(0) +8 >Emitted(8, 25) Source(12, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(9, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(13, 2) + SourceIndex(0) +--- +>>>function foo3(_a) { +1-> +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +2 >function foo3( +3 > [nameMA, [primarySkillA, secondarySkillA]]: Robot +1->Emitted(10, 1) Source(15, 1) + SourceIndex(0) +2 >Emitted(10, 15) Source(15, 15) + SourceIndex(0) +3 >Emitted(10, 17) Source(15, 64) + SourceIndex(0) +--- +>>> var nameMA = _a[0], _b = _a[1], primarySkillA = _b[0], secondarySkillA = _b[1]; +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > nameMA +3 > , +4 > [primarySkillA, secondarySkillA] +5 > +6 > primarySkillA +7 > , +8 > secondarySkillA +1->Emitted(11, 9) Source(15, 16) + SourceIndex(0) +2 >Emitted(11, 23) Source(15, 22) + SourceIndex(0) +3 >Emitted(11, 25) Source(15, 24) + SourceIndex(0) +4 >Emitted(11, 35) Source(15, 56) + SourceIndex(0) +5 >Emitted(11, 37) Source(15, 25) + SourceIndex(0) +6 >Emitted(11, 58) Source(15, 38) + SourceIndex(0) +7 >Emitted(11, 60) Source(15, 40) + SourceIndex(0) +8 >Emitted(11, 83) Source(15, 55) + SourceIndex(0) +--- +>>> console.log(nameMA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 >]]: Robot) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMA +7 > ) +8 > ; +1 >Emitted(12, 5) Source(16, 5) + SourceIndex(0) +2 >Emitted(12, 12) Source(16, 12) + SourceIndex(0) +3 >Emitted(12, 13) Source(16, 13) + SourceIndex(0) +4 >Emitted(12, 16) Source(16, 16) + SourceIndex(0) +5 >Emitted(12, 17) Source(16, 17) + SourceIndex(0) +6 >Emitted(12, 23) Source(16, 23) + SourceIndex(0) +7 >Emitted(12, 24) Source(16, 24) + SourceIndex(0) +8 >Emitted(12, 25) Source(16, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(13, 1) Source(17, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(17, 2) + SourceIndex(0) +--- +>>>function foo4(_a) { +1-> +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +2 >function foo4( +3 > [...multiRobotAInfo]: Robot +1->Emitted(14, 1) Source(19, 1) + SourceIndex(0) +2 >Emitted(14, 15) Source(19, 15) + SourceIndex(0) +3 >Emitted(14, 17) Source(19, 42) + SourceIndex(0) +--- +>>> var multiRobotAInfo = _a.slice(0); +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [...multiRobotAInfo]: Robot +1->Emitted(15, 9) Source(19, 15) + SourceIndex(0) +2 >Emitted(15, 38) Source(19, 42) + SourceIndex(0) +--- +>>> console.log(multiRobotAInfo); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 >) { + > +2 > console +3 > . +4 > log +5 > ( +6 > multiRobotAInfo +7 > ) +8 > ; +1 >Emitted(16, 5) Source(20, 5) + SourceIndex(0) +2 >Emitted(16, 12) Source(20, 12) + SourceIndex(0) +3 >Emitted(16, 13) Source(20, 13) + SourceIndex(0) +4 >Emitted(16, 16) Source(20, 16) + SourceIndex(0) +5 >Emitted(16, 17) Source(20, 17) + SourceIndex(0) +6 >Emitted(16, 32) Source(20, 32) + SourceIndex(0) +7 >Emitted(16, 33) Source(20, 33) + SourceIndex(0) +8 >Emitted(16, 34) Source(20, 34) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(17, 1) Source(21, 1) + SourceIndex(0) +2 >Emitted(17, 2) Source(21, 2) + SourceIndex(0) +--- +>>>foo1(robotA); +1-> +2 >^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +2 >foo1 +3 > ( +4 > robotA +5 > ) +6 > ; +1->Emitted(18, 1) Source(23, 1) + SourceIndex(0) +2 >Emitted(18, 5) Source(23, 5) + SourceIndex(0) +3 >Emitted(18, 6) Source(23, 6) + SourceIndex(0) +4 >Emitted(18, 12) Source(23, 12) + SourceIndex(0) +5 >Emitted(18, 13) Source(23, 13) + SourceIndex(0) +6 >Emitted(18, 14) Source(23, 14) + SourceIndex(0) +--- +>>>foo1(["roomba", ["vaccum", "mopping"]]); +1-> +2 >^^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^ +6 > ^^ +7 > ^ +8 > ^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^ +11> ^ +12> ^ +13> ^ +14> ^ +1-> + > +2 >foo1 +3 > ( +4 > [ +5 > "roomba" +6 > , +7 > [ +8 > "vaccum" +9 > , +10> "mopping" +11> ] +12> ] +13> ) +14> ; +1->Emitted(19, 1) Source(24, 1) + SourceIndex(0) +2 >Emitted(19, 5) Source(24, 5) + SourceIndex(0) +3 >Emitted(19, 6) Source(24, 6) + SourceIndex(0) +4 >Emitted(19, 7) Source(24, 7) + SourceIndex(0) +5 >Emitted(19, 15) Source(24, 15) + SourceIndex(0) +6 >Emitted(19, 17) Source(24, 17) + SourceIndex(0) +7 >Emitted(19, 18) Source(24, 18) + SourceIndex(0) +8 >Emitted(19, 26) Source(24, 26) + SourceIndex(0) +9 >Emitted(19, 28) Source(24, 28) + SourceIndex(0) +10>Emitted(19, 37) Source(24, 37) + SourceIndex(0) +11>Emitted(19, 38) Source(24, 38) + SourceIndex(0) +12>Emitted(19, 39) Source(24, 39) + SourceIndex(0) +13>Emitted(19, 40) Source(24, 40) + SourceIndex(0) +14>Emitted(19, 41) Source(24, 41) + SourceIndex(0) +--- +>>>foo2(robotA); +1 > +2 >^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >foo2 +3 > ( +4 > robotA +5 > ) +6 > ; +1 >Emitted(20, 1) Source(26, 1) + SourceIndex(0) +2 >Emitted(20, 5) Source(26, 5) + SourceIndex(0) +3 >Emitted(20, 6) Source(26, 6) + SourceIndex(0) +4 >Emitted(20, 12) Source(26, 12) + SourceIndex(0) +5 >Emitted(20, 13) Source(26, 13) + SourceIndex(0) +6 >Emitted(20, 14) Source(26, 14) + SourceIndex(0) +--- +>>>foo2(["roomba", ["vaccum", "mopping"]]); +1-> +2 >^^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^ +6 > ^^ +7 > ^ +8 > ^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^ +11> ^ +12> ^ +13> ^ +14> ^ +1-> + > +2 >foo2 +3 > ( +4 > [ +5 > "roomba" +6 > , +7 > [ +8 > "vaccum" +9 > , +10> "mopping" +11> ] +12> ] +13> ) +14> ; +1->Emitted(21, 1) Source(27, 1) + SourceIndex(0) +2 >Emitted(21, 5) Source(27, 5) + SourceIndex(0) +3 >Emitted(21, 6) Source(27, 6) + SourceIndex(0) +4 >Emitted(21, 7) Source(27, 7) + SourceIndex(0) +5 >Emitted(21, 15) Source(27, 15) + SourceIndex(0) +6 >Emitted(21, 17) Source(27, 17) + SourceIndex(0) +7 >Emitted(21, 18) Source(27, 18) + SourceIndex(0) +8 >Emitted(21, 26) Source(27, 26) + SourceIndex(0) +9 >Emitted(21, 28) Source(27, 28) + SourceIndex(0) +10>Emitted(21, 37) Source(27, 37) + SourceIndex(0) +11>Emitted(21, 38) Source(27, 38) + SourceIndex(0) +12>Emitted(21, 39) Source(27, 39) + SourceIndex(0) +13>Emitted(21, 40) Source(27, 40) + SourceIndex(0) +14>Emitted(21, 41) Source(27, 41) + SourceIndex(0) +--- +>>>foo3(robotA); +1 > +2 >^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >foo3 +3 > ( +4 > robotA +5 > ) +6 > ; +1 >Emitted(22, 1) Source(29, 1) + SourceIndex(0) +2 >Emitted(22, 5) Source(29, 5) + SourceIndex(0) +3 >Emitted(22, 6) Source(29, 6) + SourceIndex(0) +4 >Emitted(22, 12) Source(29, 12) + SourceIndex(0) +5 >Emitted(22, 13) Source(29, 13) + SourceIndex(0) +6 >Emitted(22, 14) Source(29, 14) + SourceIndex(0) +--- +>>>foo3(["roomba", ["vaccum", "mopping"]]); +1-> +2 >^^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^ +6 > ^^ +7 > ^ +8 > ^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^ +11> ^ +12> ^ +13> ^ +14> ^ +1-> + > +2 >foo3 +3 > ( +4 > [ +5 > "roomba" +6 > , +7 > [ +8 > "vaccum" +9 > , +10> "mopping" +11> ] +12> ] +13> ) +14> ; +1->Emitted(23, 1) Source(30, 1) + SourceIndex(0) +2 >Emitted(23, 5) Source(30, 5) + SourceIndex(0) +3 >Emitted(23, 6) Source(30, 6) + SourceIndex(0) +4 >Emitted(23, 7) Source(30, 7) + SourceIndex(0) +5 >Emitted(23, 15) Source(30, 15) + SourceIndex(0) +6 >Emitted(23, 17) Source(30, 17) + SourceIndex(0) +7 >Emitted(23, 18) Source(30, 18) + SourceIndex(0) +8 >Emitted(23, 26) Source(30, 26) + SourceIndex(0) +9 >Emitted(23, 28) Source(30, 28) + SourceIndex(0) +10>Emitted(23, 37) Source(30, 37) + SourceIndex(0) +11>Emitted(23, 38) Source(30, 38) + SourceIndex(0) +12>Emitted(23, 39) Source(30, 39) + SourceIndex(0) +13>Emitted(23, 40) Source(30, 40) + SourceIndex(0) +14>Emitted(23, 41) Source(30, 41) + SourceIndex(0) +--- +>>>foo4(robotA); +1 > +2 >^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >foo4 +3 > ( +4 > robotA +5 > ) +6 > ; +1 >Emitted(24, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(24, 5) Source(32, 5) + SourceIndex(0) +3 >Emitted(24, 6) Source(32, 6) + SourceIndex(0) +4 >Emitted(24, 12) Source(32, 12) + SourceIndex(0) +5 >Emitted(24, 13) Source(32, 13) + SourceIndex(0) +6 >Emitted(24, 14) Source(32, 14) + SourceIndex(0) +--- +>>>foo4(["roomba", ["vaccum", "mopping"]]); +1-> +2 >^^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^ +6 > ^^ +7 > ^ +8 > ^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^ +11> ^ +12> ^ +13> ^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >foo4 +3 > ( +4 > [ +5 > "roomba" +6 > , +7 > [ +8 > "vaccum" +9 > , +10> "mopping" +11> ] +12> ] +13> ) +14> ; +1->Emitted(25, 1) Source(33, 1) + SourceIndex(0) +2 >Emitted(25, 5) Source(33, 5) + SourceIndex(0) +3 >Emitted(25, 6) Source(33, 6) + SourceIndex(0) +4 >Emitted(25, 7) Source(33, 7) + SourceIndex(0) +5 >Emitted(25, 15) Source(33, 15) + SourceIndex(0) +6 >Emitted(25, 17) Source(33, 17) + SourceIndex(0) +7 >Emitted(25, 18) Source(33, 18) + SourceIndex(0) +8 >Emitted(25, 26) Source(33, 26) + SourceIndex(0) +9 >Emitted(25, 28) Source(33, 28) + SourceIndex(0) +10>Emitted(25, 37) Source(33, 37) + SourceIndex(0) +11>Emitted(25, 38) Source(33, 38) + SourceIndex(0) +12>Emitted(25, 39) Source(33, 39) + SourceIndex(0) +13>Emitted(25, 40) Source(33, 40) + SourceIndex(0) +14>Emitted(25, 41) Source(33, 41) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringParametertArrayBindingPattern2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.symbols b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.symbols new file mode 100644 index 00000000000..26797210f4b --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.symbols @@ -0,0 +1,93 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPattern2.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 11)) + + log(msg: any): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 1, 8)) +} +type Robot = [string, [string, string]]; +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 2, 1)) + +var robotA: Robot = ["trimmer", ["trimming", "edging"]]; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 4, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 2, 1)) + +function foo1([, skillA]: Robot) { +>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 4, 56)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 6, 16)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 2, 1)) + + console.log(skillA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 22)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 6, 16)) +} + +function foo2([nameMB]: Robot) { +>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 8, 1)) +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 10, 15)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 2, 1)) + + console.log(nameMB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 22)) +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 10, 15)) +} + +function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) { +>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 12, 1)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 14, 15)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 14, 24)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 14, 38)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 2, 1)) + + console.log(nameMA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 22)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 14, 15)) +} + +function foo4([...multiRobotAInfo]: Robot) { +>foo4 : Symbol(foo4, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 16, 1)) +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 18, 15)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 2, 1)) + + console.log(multiRobotAInfo); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 22)) +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 18, 15)) +} + +foo1(robotA); +>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 4, 56)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 4, 3)) + +foo1(["roomba", ["vaccum", "mopping"]]); +>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 4, 56)) + +foo2(robotA); +>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 8, 1)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 4, 3)) + +foo2(["roomba", ["vaccum", "mopping"]]); +>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 8, 1)) + +foo3(robotA); +>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 12, 1)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 4, 3)) + +foo3(["roomba", ["vaccum", "mopping"]]); +>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 12, 1)) + +foo4(robotA); +>foo4 : Symbol(foo4, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 16, 1)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 4, 3)) + +foo4(["roomba", ["vaccum", "mopping"]]); +>foo4 : Symbol(foo4, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 16, 1)) + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.types b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.types new file mode 100644 index 00000000000..b3e09d962c3 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.types @@ -0,0 +1,131 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPattern2.ts === +declare var console: { +>console : { log(msg: any): void; } + + log(msg: any): void; +>log : (msg: any) => void +>msg : any +} +type Robot = [string, [string, string]]; +>Robot : [string, [string, string]] + +var robotA: Robot = ["trimmer", ["trimming", "edging"]]; +>robotA : [string, [string, string]] +>Robot : [string, [string, string]] +>["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>"trimmer" : string +>["trimming", "edging"] : [string, string] +>"trimming" : string +>"edging" : string + +function foo1([, skillA]: Robot) { +>foo1 : ([, skillA]: [string, [string, string]]) => void +> : undefined +>skillA : [string, string] +>Robot : [string, [string, string]] + + console.log(skillA); +>console.log(skillA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>skillA : [string, string] +} + +function foo2([nameMB]: Robot) { +>foo2 : ([nameMB]: [string, [string, string]]) => void +>nameMB : string +>Robot : [string, [string, string]] + + console.log(nameMB); +>console.log(nameMB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMB : string +} + +function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) { +>foo3 : ([nameMA, [primarySkillA, secondarySkillA]]: [string, [string, string]]) => void +>nameMA : string +>primarySkillA : string +>secondarySkillA : string +>Robot : [string, [string, string]] + + console.log(nameMA); +>console.log(nameMA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMA : string +} + +function foo4([...multiRobotAInfo]: Robot) { +>foo4 : ([...multiRobotAInfo]: [string, [string, string]]) => void +>multiRobotAInfo : (string | [string, string])[] +>Robot : [string, [string, string]] + + console.log(multiRobotAInfo); +>console.log(multiRobotAInfo) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>multiRobotAInfo : (string | [string, string])[] +} + +foo1(robotA); +>foo1(robotA) : void +>foo1 : ([, skillA]: [string, [string, string]]) => void +>robotA : [string, [string, string]] + +foo1(["roomba", ["vaccum", "mopping"]]); +>foo1(["roomba", ["vaccum", "mopping"]]) : void +>foo1 : ([, skillA]: [string, [string, string]]) => void +>["roomba", ["vaccum", "mopping"]] : [string, [string, string]] +>"roomba" : string +>["vaccum", "mopping"] : [string, string] +>"vaccum" : string +>"mopping" : string + +foo2(robotA); +>foo2(robotA) : void +>foo2 : ([nameMB]: [string, [string, string]]) => void +>robotA : [string, [string, string]] + +foo2(["roomba", ["vaccum", "mopping"]]); +>foo2(["roomba", ["vaccum", "mopping"]]) : void +>foo2 : ([nameMB]: [string, [string, string]]) => void +>["roomba", ["vaccum", "mopping"]] : [string, [string, string]] +>"roomba" : string +>["vaccum", "mopping"] : [string, string] +>"vaccum" : string +>"mopping" : string + +foo3(robotA); +>foo3(robotA) : void +>foo3 : ([nameMA, [primarySkillA, secondarySkillA]]: [string, [string, string]]) => void +>robotA : [string, [string, string]] + +foo3(["roomba", ["vaccum", "mopping"]]); +>foo3(["roomba", ["vaccum", "mopping"]]) : void +>foo3 : ([nameMA, [primarySkillA, secondarySkillA]]: [string, [string, string]]) => void +>["roomba", ["vaccum", "mopping"]] : [string, [string, string]] +>"roomba" : string +>["vaccum", "mopping"] : [string, string] +>"vaccum" : string +>"mopping" : string + +foo4(robotA); +>foo4(robotA) : void +>foo4 : ([...multiRobotAInfo]: [string, [string, string]]) => void +>robotA : [string, [string, string]] + +foo4(["roomba", ["vaccum", "mopping"]]); +>foo4(["roomba", ["vaccum", "mopping"]]) : void +>foo4 : ([...multiRobotAInfo]: [string, [string, string]]) => void +>["roomba", ["vaccum", "mopping"]] : [string, [string, string]] +>"roomba" : string +>["vaccum", "mopping"] : [string, string] +>"vaccum" : string +>"mopping" : string + diff --git a/tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPattern2.ts b/tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPattern2.ts new file mode 100644 index 00000000000..07c2a24e70e --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPattern2.ts @@ -0,0 +1,34 @@ +// @sourcemap: true +declare var console: { + log(msg: any): void; +} +type Robot = [string, [string, string]]; +var robotA: Robot = ["trimmer", ["trimming", "edging"]]; + +function foo1([, skillA]: Robot) { + console.log(skillA); +} + +function foo2([nameMB]: Robot) { + console.log(nameMB); +} + +function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) { + console.log(nameMA); +} + +function foo4([...multiRobotAInfo]: Robot) { + console.log(multiRobotAInfo); +} + +foo1(robotA); +foo1(["roomba", ["vaccum", "mopping"]]); + +foo2(robotA); +foo2(["roomba", ["vaccum", "mopping"]]); + +foo3(robotA); +foo3(["roomba", ["vaccum", "mopping"]]); + +foo4(robotA); +foo4(["roomba", ["vaccum", "mopping"]]); \ No newline at end of file From c0f9de6d2cdbc0099943e7493e8c412bd449e56a Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 8 Dec 2015 13:55:13 -0800 Subject: [PATCH 025/209] Test case for ForOf statement with object binding pattern --- ...nDestructuringForOfObjectBindingPattern.js | 130 ++ ...tructuringForOfObjectBindingPattern.js.map | 2 + ...ingForOfObjectBindingPattern.sourcemap.txt | 1809 +++++++++++++++++ ...ructuringForOfObjectBindingPattern.symbols | 259 +++ ...structuringForOfObjectBindingPattern.types | 329 +++ ...nDestructuringForOfObjectBindingPattern.ts | 68 + 6 files changed, 2597 insertions(+) create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.types create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPattern.ts diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.js b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.js new file mode 100644 index 00000000000..247e23ff1f1 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.js @@ -0,0 +1,130 @@ +//// [sourceMapValidationDestructuringForOfObjectBindingPattern.ts] +declare var console: { + log(msg: any): void; +} +interface Robot { + name: string; + skill: string; +} + +interface MultiRobot { + name: string; + skills: { + primary: string; + secondary: string; + }; +} + +let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; + +function getRobots() { + return robots; +} + +function getMultiRobots() { + return multiRobots; +} + +for (let {name: nameA } of robots) { + console.log(nameA); +} +for (let {name: nameA } of getRobots()) { + console.log(nameA); +} +for (let {name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + console.log(primaryA); +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + console.log(primaryA); +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(primaryA); +} + +for (let {name: nameA, skill: skillA } of robots) { + console.log(nameA); +} +for (let {name: nameA, skill: skillA } of getRobots()) { + console.log(nameA); +} +for (let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + console.log(nameA); +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + console.log(nameA); +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(nameA); +} + +//// [sourceMapValidationDestructuringForOfObjectBindingPattern.js] +var robots = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +var multiRobots = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; +function getRobots() { + return robots; +} +function getMultiRobots() { + return multiRobots; +} +for (var _i = 0, robots_1 = robots; _i < robots_1.length; _i++) { + var nameA = robots_1[_i].name; + console.log(nameA); +} +for (var _a = 0, _b = getRobots(); _a < _b.length; _a++) { + var nameA = _b[_a].name; + console.log(nameA); +} +for (var _c = 0, _d = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _c < _d.length; _c++) { + var nameA = _d[_c].name; + console.log(nameA); +} +for (var _e = 0, multiRobots_1 = multiRobots; _e < multiRobots_1.length; _e++) { + var _f = multiRobots_1[_e].skills, primaryA = _f.primary, secondaryA = _f.secondary; + console.log(primaryA); +} +for (var _g = 0, _h = getMultiRobots(); _g < _h.length; _g++) { + var _j = _h[_g].skills, primaryA = _j.primary, secondaryA = _j.secondary; + console.log(primaryA); +} +for (var _k = 0, _l = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _k < _l.length; _k++) { + var _m = _l[_k].skills, primaryA = _m.primary, secondaryA = _m.secondary; + console.log(primaryA); +} +for (var _o = 0, robots_2 = robots; _o < robots_2.length; _o++) { + var _p = robots_2[_o], nameA = _p.name, skillA = _p.skill; + console.log(nameA); +} +for (var _q = 0, _r = getRobots(); _q < _r.length; _q++) { + var _s = _r[_q], nameA = _s.name, skillA = _s.skill; + console.log(nameA); +} +for (var _t = 0, _u = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _t < _u.length; _t++) { + var _v = _u[_t], nameA = _v.name, skillA = _v.skill; + console.log(nameA); +} +for (var _w = 0, multiRobots_2 = multiRobots; _w < multiRobots_2.length; _w++) { + var _x = multiRobots_2[_w], nameA = _x.name, _y = _x.skills, primaryA = _y.primary, secondaryA = _y.secondary; + console.log(nameA); +} +for (var _z = 0, _0 = getMultiRobots(); _z < _0.length; _z++) { + var _1 = _0[_z], nameA = _1.name, _2 = _1.skills, primaryA = _2.primary, secondaryA = _2.secondary; + console.log(nameA); +} +for (var _3 = 0, _4 = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _3 < _4.length; _3++) { + var _5 = _4[_3], nameA = _5.name, _6 = _5.skills, primaryA = _6.primary, secondaryA = _6.secondary; + console.log(nameA); +} +//# sourceMappingURL=sourceMapValidationDestructuringForOfObjectBindingPattern.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.js.map new file mode 100644 index 00000000000..3f8182d4376 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringForOfObjectBindingPattern.js.map] +{"version":3,"file":"sourceMapValidationDestructuringForOfObjectBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForOfObjectBindingPattern.ts"],"names":[],"mappings":"AAgBA,IAAI,MAAM,GAAY,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;AACnG,IAAI,WAAW,GAAiB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE;IAChG,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;AAE/E;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,GAAG,CAAC,CAAuB,UAAM,EAAN,iBAAM,EAA5B,oBAAkB,EAAlB,IAA4B,CAAC;IAA7B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ACjJ,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,EADzE,cAAwE,EAAxE,IACyE,CAAC;IAD1E,iBAAK,eAAW,EAAE,cAAM,EAAI,qBAAiB,EAAE,yBAAqB;IAErE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.sourcemap.txt new file mode 100644 index 00000000000..42b9853cc09 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.sourcemap.txt @@ -0,0 +1,1809 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringForOfObjectBindingPattern.js +mapUrl: sourceMapValidationDestructuringForOfObjectBindingPattern.js.map +sourceRoot: +sources: sourceMapValidationDestructuringForOfObjectBindingPattern.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPattern.js +sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts +------------------------------------------------------------------- +>>>var robots = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^ +7 > ^^^^ +8 > ^^ +9 > ^^^^^^^ +10> ^^ +11> ^^^^^ +12> ^^ +13> ^^^^^^^^ +14> ^^ +15> ^^ +16> ^^ +17> ^^^^ +18> ^^ +19> ^^^^^^^^^ +20> ^^ +21> ^^^^^ +22> ^^ +23> ^^^^^^^^^^ +24> ^^ +25> ^ +26> ^ +1 >declare var console: { + > log(msg: any): void; + >} + >interface Robot { + > name: string; + > skill: string; + >} + > + >interface MultiRobot { + > name: string; + > skills: { + > primary: string; + > secondary: string; + > }; + >} + > + > +2 >let +3 > robots +4 > : Robot[] = +5 > [ +6 > { +7 > name +8 > : +9 > "mower" +10> , +11> skill +12> : +13> "mowing" +14> } +15> , +16> { +17> name +18> : +19> "trimmer" +20> , +21> skill +22> : +23> "trimming" +24> } +25> ] +26> ; +1 >Emitted(1, 1) Source(17, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(17, 5) + SourceIndex(0) +3 >Emitted(1, 11) Source(17, 11) + SourceIndex(0) +4 >Emitted(1, 14) Source(17, 23) + SourceIndex(0) +5 >Emitted(1, 15) Source(17, 24) + SourceIndex(0) +6 >Emitted(1, 17) Source(17, 26) + SourceIndex(0) +7 >Emitted(1, 21) Source(17, 30) + SourceIndex(0) +8 >Emitted(1, 23) Source(17, 32) + SourceIndex(0) +9 >Emitted(1, 30) Source(17, 39) + SourceIndex(0) +10>Emitted(1, 32) Source(17, 41) + SourceIndex(0) +11>Emitted(1, 37) Source(17, 46) + SourceIndex(0) +12>Emitted(1, 39) Source(17, 48) + SourceIndex(0) +13>Emitted(1, 47) Source(17, 56) + SourceIndex(0) +14>Emitted(1, 49) Source(17, 58) + SourceIndex(0) +15>Emitted(1, 51) Source(17, 60) + SourceIndex(0) +16>Emitted(1, 53) Source(17, 62) + SourceIndex(0) +17>Emitted(1, 57) Source(17, 66) + SourceIndex(0) +18>Emitted(1, 59) Source(17, 68) + SourceIndex(0) +19>Emitted(1, 68) Source(17, 77) + SourceIndex(0) +20>Emitted(1, 70) Source(17, 79) + SourceIndex(0) +21>Emitted(1, 75) Source(17, 84) + SourceIndex(0) +22>Emitted(1, 77) Source(17, 86) + SourceIndex(0) +23>Emitted(1, 87) Source(17, 96) + SourceIndex(0) +24>Emitted(1, 89) Source(17, 98) + SourceIndex(0) +25>Emitted(1, 90) Source(17, 99) + SourceIndex(0) +26>Emitted(1, 91) Source(17, 100) + SourceIndex(0) +--- +>>>var multiRobots = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +1 > +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^ +7 > ^^^^ +8 > ^^ +9 > ^^^^^^^ +10> ^^ +11> ^^^^^^ +12> ^^ +13> ^^ +14> ^^^^^^^ +15> ^^ +16> ^^^^^^^^ +17> ^^ +18> ^^^^^^^^^ +19> ^^ +20> ^^^^^^ +21> ^^ +22> ^^ +1 > + > +2 >let +3 > multiRobots +4 > : MultiRobot[] = +5 > [ +6 > { +7 > name +8 > : +9 > "mower" +10> , +11> skills +12> : +13> { +14> primary +15> : +16> "mowing" +17> , +18> secondary +19> : +20> "none" +21> } +22> } +1 >Emitted(2, 1) Source(18, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(18, 5) + SourceIndex(0) +3 >Emitted(2, 16) Source(18, 16) + SourceIndex(0) +4 >Emitted(2, 19) Source(18, 33) + SourceIndex(0) +5 >Emitted(2, 20) Source(18, 34) + SourceIndex(0) +6 >Emitted(2, 22) Source(18, 36) + SourceIndex(0) +7 >Emitted(2, 26) Source(18, 40) + SourceIndex(0) +8 >Emitted(2, 28) Source(18, 42) + SourceIndex(0) +9 >Emitted(2, 35) Source(18, 49) + SourceIndex(0) +10>Emitted(2, 37) Source(18, 51) + SourceIndex(0) +11>Emitted(2, 43) Source(18, 57) + SourceIndex(0) +12>Emitted(2, 45) Source(18, 59) + SourceIndex(0) +13>Emitted(2, 47) Source(18, 61) + SourceIndex(0) +14>Emitted(2, 54) Source(18, 68) + SourceIndex(0) +15>Emitted(2, 56) Source(18, 70) + SourceIndex(0) +16>Emitted(2, 64) Source(18, 78) + SourceIndex(0) +17>Emitted(2, 66) Source(18, 80) + SourceIndex(0) +18>Emitted(2, 75) Source(18, 89) + SourceIndex(0) +19>Emitted(2, 77) Source(18, 91) + SourceIndex(0) +20>Emitted(2, 83) Source(18, 97) + SourceIndex(0) +21>Emitted(2, 85) Source(18, 99) + SourceIndex(0) +22>Emitted(2, 87) Source(18, 101) + SourceIndex(0) +--- +>>> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; +1 >^^^^ +2 > ^^ +3 > ^^^^ +4 > ^^ +5 > ^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^ +10> ^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^ +15> ^^ +16> ^^^^^^^^ +17> ^^ +18> ^^ +19> ^ +20> ^ +1 >, + > +2 > { +3 > name +4 > : +5 > "trimmer" +6 > , +7 > skills +8 > : +9 > { +10> primary +11> : +12> "trimming" +13> , +14> secondary +15> : +16> "edging" +17> } +18> } +19> ] +20> ; +1 >Emitted(3, 5) Source(19, 5) + SourceIndex(0) +2 >Emitted(3, 7) Source(19, 7) + SourceIndex(0) +3 >Emitted(3, 11) Source(19, 11) + SourceIndex(0) +4 >Emitted(3, 13) Source(19, 13) + SourceIndex(0) +5 >Emitted(3, 22) Source(19, 22) + SourceIndex(0) +6 >Emitted(3, 24) Source(19, 24) + SourceIndex(0) +7 >Emitted(3, 30) Source(19, 30) + SourceIndex(0) +8 >Emitted(3, 32) Source(19, 32) + SourceIndex(0) +9 >Emitted(3, 34) Source(19, 34) + SourceIndex(0) +10>Emitted(3, 41) Source(19, 41) + SourceIndex(0) +11>Emitted(3, 43) Source(19, 43) + SourceIndex(0) +12>Emitted(3, 53) Source(19, 53) + SourceIndex(0) +13>Emitted(3, 55) Source(19, 55) + SourceIndex(0) +14>Emitted(3, 64) Source(19, 64) + SourceIndex(0) +15>Emitted(3, 66) Source(19, 66) + SourceIndex(0) +16>Emitted(3, 74) Source(19, 74) + SourceIndex(0) +17>Emitted(3, 76) Source(19, 76) + SourceIndex(0) +18>Emitted(3, 78) Source(19, 78) + SourceIndex(0) +19>Emitted(3, 79) Source(19, 79) + SourceIndex(0) +20>Emitted(3, 80) Source(19, 80) + SourceIndex(0) +--- +>>>function getRobots() { +1 > +2 >^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +1 >Emitted(4, 1) Source(21, 1) + SourceIndex(0) +--- +>>> return robots; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +1->function getRobots() { + > +2 > return +3 > +4 > robots +5 > ; +1->Emitted(5, 5) Source(22, 5) + SourceIndex(0) +2 >Emitted(5, 11) Source(22, 11) + SourceIndex(0) +3 >Emitted(5, 12) Source(22, 12) + SourceIndex(0) +4 >Emitted(5, 18) Source(22, 18) + SourceIndex(0) +5 >Emitted(5, 19) Source(22, 19) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(6, 1) Source(23, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(23, 2) + SourceIndex(0) +--- +>>>function getMultiRobots() { +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +1->Emitted(7, 1) Source(25, 1) + SourceIndex(0) +--- +>>> return multiRobots; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^ +5 > ^ +1->function getMultiRobots() { + > +2 > return +3 > +4 > multiRobots +5 > ; +1->Emitted(8, 5) Source(26, 5) + SourceIndex(0) +2 >Emitted(8, 11) Source(26, 11) + SourceIndex(0) +3 >Emitted(8, 12) Source(26, 12) + SourceIndex(0) +4 >Emitted(8, 23) Source(26, 23) + SourceIndex(0) +5 >Emitted(8, 24) Source(26, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(9, 1) Source(27, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(27, 2) + SourceIndex(0) +--- +>>>for (var _i = 0, robots_1 = robots; _i < robots_1.length; _i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +1-> + > + > +2 >for +3 > +4 > (let {name: nameA } of +5 > robots +6 > +7 > robots +8 > +9 > let {name: nameA } +10> +11> let {name: nameA } of robots +12> ) +1->Emitted(10, 1) Source(29, 1) + SourceIndex(0) +2 >Emitted(10, 4) Source(29, 4) + SourceIndex(0) +3 >Emitted(10, 5) Source(29, 5) + SourceIndex(0) +4 >Emitted(10, 6) Source(29, 28) + SourceIndex(0) +5 >Emitted(10, 16) Source(29, 34) + SourceIndex(0) +6 >Emitted(10, 18) Source(29, 28) + SourceIndex(0) +7 >Emitted(10, 35) Source(29, 34) + SourceIndex(0) +8 >Emitted(10, 37) Source(29, 6) + SourceIndex(0) +9 >Emitted(10, 57) Source(29, 24) + SourceIndex(0) +10>Emitted(10, 59) Source(29, 6) + SourceIndex(0) +11>Emitted(10, 63) Source(29, 34) + SourceIndex(0) +12>Emitted(10, 64) Source(29, 35) + SourceIndex(0) +--- +>>> var nameA = robots_1[_i].name; +1 >^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > let +3 > {name: nameA } +1 >Emitted(11, 5) Source(29, 6) + SourceIndex(0) +2 >Emitted(11, 9) Source(29, 10) + SourceIndex(0) +3 >Emitted(11, 34) Source(29, 24) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(12, 5) Source(30, 5) + SourceIndex(0) +2 >Emitted(12, 12) Source(30, 12) + SourceIndex(0) +3 >Emitted(12, 13) Source(30, 13) + SourceIndex(0) +4 >Emitted(12, 16) Source(30, 16) + SourceIndex(0) +5 >Emitted(12, 17) Source(30, 17) + SourceIndex(0) +6 >Emitted(12, 22) Source(30, 22) + SourceIndex(0) +7 >Emitted(12, 23) Source(30, 23) + SourceIndex(0) +8 >Emitted(12, 24) Source(30, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(13, 2) Source(31, 2) + SourceIndex(0) +--- +>>>for (var _a = 0, _b = getRobots(); _a < _b.length; _a++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +1-> + > +2 >for +3 > +4 > (let {name: nameA } of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> let {name: nameA } +12> +13> let {name: nameA } of getRobots() +14> ) +1->Emitted(14, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(14, 4) Source(32, 4) + SourceIndex(0) +3 >Emitted(14, 5) Source(32, 5) + SourceIndex(0) +4 >Emitted(14, 6) Source(32, 28) + SourceIndex(0) +5 >Emitted(14, 16) Source(32, 39) + SourceIndex(0) +6 >Emitted(14, 18) Source(32, 28) + SourceIndex(0) +7 >Emitted(14, 23) Source(32, 28) + SourceIndex(0) +8 >Emitted(14, 32) Source(32, 37) + SourceIndex(0) +9 >Emitted(14, 34) Source(32, 39) + SourceIndex(0) +10>Emitted(14, 36) Source(32, 6) + SourceIndex(0) +11>Emitted(14, 50) Source(32, 24) + SourceIndex(0) +12>Emitted(14, 52) Source(32, 6) + SourceIndex(0) +13>Emitted(14, 56) Source(32, 39) + SourceIndex(0) +14>Emitted(14, 57) Source(32, 40) + SourceIndex(0) +--- +>>> var nameA = _b[_a].name; +1 >^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^^^ +1 > +2 > let +3 > {name: nameA } +1 >Emitted(15, 5) Source(32, 6) + SourceIndex(0) +2 >Emitted(15, 9) Source(32, 10) + SourceIndex(0) +3 >Emitted(15, 28) Source(32, 24) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(16, 5) Source(33, 5) + SourceIndex(0) +2 >Emitted(16, 12) Source(33, 12) + SourceIndex(0) +3 >Emitted(16, 13) Source(33, 13) + SourceIndex(0) +4 >Emitted(16, 16) Source(33, 16) + SourceIndex(0) +5 >Emitted(16, 17) Source(33, 17) + SourceIndex(0) +6 >Emitted(16, 22) Source(33, 22) + SourceIndex(0) +7 >Emitted(16, 23) Source(33, 23) + SourceIndex(0) +8 >Emitted(16, 24) Source(33, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(17, 2) Source(34, 2) + SourceIndex(0) +--- +>>>for (var _c = 0, _d = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _c < _d.length; _c++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^^^ +10> ^^ +11> ^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^^ +15> ^^^^^^^^ +16> ^^ +17> ^^ +18> ^^ +19> ^^^^ +20> ^^ +21> ^^^^^^^^^ +22> ^^ +23> ^^^^^ +24> ^^ +25> ^^^^^^^^^^ +26> ^^ +27> ^ +28> ^^ +29> ^^^^^^^^^^^^^^ +30> ^^ +31> ^^^^ +32> ^ +1-> + > +2 >for +3 > +4 > (let {name: nameA } of +5 > [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +6 > +7 > [ +8 > { +9 > name +10> : +11> "mower" +12> , +13> skill +14> : +15> "mowing" +16> } +17> , +18> { +19> name +20> : +21> "trimmer" +22> , +23> skill +24> : +25> "trimming" +26> } +27> ] +28> +29> let {name: nameA } +30> +31> let {name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +32> ) +1->Emitted(18, 1) Source(35, 1) + SourceIndex(0) +2 >Emitted(18, 4) Source(35, 4) + SourceIndex(0) +3 >Emitted(18, 5) Source(35, 5) + SourceIndex(0) +4 >Emitted(18, 6) Source(35, 28) + SourceIndex(0) +5 >Emitted(18, 16) Source(35, 104) + SourceIndex(0) +6 >Emitted(18, 18) Source(35, 28) + SourceIndex(0) +7 >Emitted(18, 24) Source(35, 29) + SourceIndex(0) +8 >Emitted(18, 26) Source(35, 31) + SourceIndex(0) +9 >Emitted(18, 30) Source(35, 35) + SourceIndex(0) +10>Emitted(18, 32) Source(35, 37) + SourceIndex(0) +11>Emitted(18, 39) Source(35, 44) + SourceIndex(0) +12>Emitted(18, 41) Source(35, 46) + SourceIndex(0) +13>Emitted(18, 46) Source(35, 51) + SourceIndex(0) +14>Emitted(18, 48) Source(35, 53) + SourceIndex(0) +15>Emitted(18, 56) Source(35, 61) + SourceIndex(0) +16>Emitted(18, 58) Source(35, 63) + SourceIndex(0) +17>Emitted(18, 60) Source(35, 65) + SourceIndex(0) +18>Emitted(18, 62) Source(35, 67) + SourceIndex(0) +19>Emitted(18, 66) Source(35, 71) + SourceIndex(0) +20>Emitted(18, 68) Source(35, 73) + SourceIndex(0) +21>Emitted(18, 77) Source(35, 82) + SourceIndex(0) +22>Emitted(18, 79) Source(35, 84) + SourceIndex(0) +23>Emitted(18, 84) Source(35, 89) + SourceIndex(0) +24>Emitted(18, 86) Source(35, 91) + SourceIndex(0) +25>Emitted(18, 96) Source(35, 101) + SourceIndex(0) +26>Emitted(18, 98) Source(35, 103) + SourceIndex(0) +27>Emitted(18, 99) Source(35, 104) + SourceIndex(0) +28>Emitted(18, 101) Source(35, 6) + SourceIndex(0) +29>Emitted(18, 115) Source(35, 24) + SourceIndex(0) +30>Emitted(18, 117) Source(35, 6) + SourceIndex(0) +31>Emitted(18, 121) Source(35, 104) + SourceIndex(0) +32>Emitted(18, 122) Source(35, 105) + SourceIndex(0) +--- +>>> var nameA = _d[_c].name; +1 >^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^^^ +1 > +2 > let +3 > {name: nameA } +1 >Emitted(19, 5) Source(35, 6) + SourceIndex(0) +2 >Emitted(19, 9) Source(35, 10) + SourceIndex(0) +3 >Emitted(19, 28) Source(35, 24) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(20, 5) Source(36, 5) + SourceIndex(0) +2 >Emitted(20, 12) Source(36, 12) + SourceIndex(0) +3 >Emitted(20, 13) Source(36, 13) + SourceIndex(0) +4 >Emitted(20, 16) Source(36, 16) + SourceIndex(0) +5 >Emitted(20, 17) Source(36, 17) + SourceIndex(0) +6 >Emitted(20, 22) Source(36, 22) + SourceIndex(0) +7 >Emitted(20, 23) Source(36, 23) + SourceIndex(0) +8 >Emitted(20, 24) Source(36, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(21, 2) Source(37, 2) + SourceIndex(0) +--- +>>>for (var _e = 0, multiRobots_1 = multiRobots; _e < multiRobots_1.length; _e++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +13> ^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let { skills: { primary: primaryA, secondary: secondaryA } } of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > let { skills: { primary: primaryA, secondary: secondaryA } } +10> +11> let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots +12> ) +1->Emitted(22, 1) Source(38, 1) + SourceIndex(0) +2 >Emitted(22, 4) Source(38, 4) + SourceIndex(0) +3 >Emitted(22, 5) Source(38, 5) + SourceIndex(0) +4 >Emitted(22, 6) Source(38, 70) + SourceIndex(0) +5 >Emitted(22, 16) Source(38, 81) + SourceIndex(0) +6 >Emitted(22, 18) Source(38, 70) + SourceIndex(0) +7 >Emitted(22, 45) Source(38, 81) + SourceIndex(0) +8 >Emitted(22, 47) Source(38, 6) + SourceIndex(0) +9 >Emitted(22, 72) Source(38, 66) + SourceIndex(0) +10>Emitted(22, 74) Source(38, 6) + SourceIndex(0) +11>Emitted(22, 78) Source(38, 81) + SourceIndex(0) +12>Emitted(22, 79) Source(38, 82) + SourceIndex(0) +--- +>>> var _f = multiRobots_1[_e].skills, primaryA = _f.primary, secondaryA = _f.secondary; +1->^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let { +3 > skills +4 > : { +5 > primary: primaryA +6 > , +7 > secondary: secondaryA +1->Emitted(23, 5) Source(38, 6) + SourceIndex(0) +2 >Emitted(23, 9) Source(38, 12) + SourceIndex(0) +3 >Emitted(23, 38) Source(38, 18) + SourceIndex(0) +4 >Emitted(23, 40) Source(38, 22) + SourceIndex(0) +5 >Emitted(23, 61) Source(38, 39) + SourceIndex(0) +6 >Emitted(23, 63) Source(38, 41) + SourceIndex(0) +7 >Emitted(23, 88) Source(38, 62) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > } } of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(24, 5) Source(39, 5) + SourceIndex(0) +2 >Emitted(24, 12) Source(39, 12) + SourceIndex(0) +3 >Emitted(24, 13) Source(39, 13) + SourceIndex(0) +4 >Emitted(24, 16) Source(39, 16) + SourceIndex(0) +5 >Emitted(24, 17) Source(39, 17) + SourceIndex(0) +6 >Emitted(24, 25) Source(39, 25) + SourceIndex(0) +7 >Emitted(24, 26) Source(39, 26) + SourceIndex(0) +8 >Emitted(24, 27) Source(39, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(25, 2) Source(40, 2) + SourceIndex(0) +--- +>>>for (var _g = 0, _h = getMultiRobots(); _g < _h.length; _g++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let { skills: { primary: primaryA, secondary: secondaryA } } of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> let { skills: { primary: primaryA, secondary: secondaryA } } +12> +13> let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots() +14> ) +1->Emitted(26, 1) Source(41, 1) + SourceIndex(0) +2 >Emitted(26, 4) Source(41, 4) + SourceIndex(0) +3 >Emitted(26, 5) Source(41, 5) + SourceIndex(0) +4 >Emitted(26, 6) Source(41, 70) + SourceIndex(0) +5 >Emitted(26, 16) Source(41, 86) + SourceIndex(0) +6 >Emitted(26, 18) Source(41, 70) + SourceIndex(0) +7 >Emitted(26, 23) Source(41, 70) + SourceIndex(0) +8 >Emitted(26, 37) Source(41, 84) + SourceIndex(0) +9 >Emitted(26, 39) Source(41, 86) + SourceIndex(0) +10>Emitted(26, 41) Source(41, 6) + SourceIndex(0) +11>Emitted(26, 55) Source(41, 66) + SourceIndex(0) +12>Emitted(26, 57) Source(41, 6) + SourceIndex(0) +13>Emitted(26, 61) Source(41, 86) + SourceIndex(0) +14>Emitted(26, 62) Source(41, 87) + SourceIndex(0) +--- +>>> var _j = _h[_g].skills, primaryA = _j.primary, secondaryA = _j.secondary; +1->^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let { +3 > skills +4 > : { +5 > primary: primaryA +6 > , +7 > secondary: secondaryA +1->Emitted(27, 5) Source(41, 6) + SourceIndex(0) +2 >Emitted(27, 9) Source(41, 12) + SourceIndex(0) +3 >Emitted(27, 27) Source(41, 18) + SourceIndex(0) +4 >Emitted(27, 29) Source(41, 22) + SourceIndex(0) +5 >Emitted(27, 50) Source(41, 39) + SourceIndex(0) +6 >Emitted(27, 52) Source(41, 41) + SourceIndex(0) +7 >Emitted(27, 77) Source(41, 62) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > } } of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(28, 5) Source(42, 5) + SourceIndex(0) +2 >Emitted(28, 12) Source(42, 12) + SourceIndex(0) +3 >Emitted(28, 13) Source(42, 13) + SourceIndex(0) +4 >Emitted(28, 16) Source(42, 16) + SourceIndex(0) +5 >Emitted(28, 17) Source(42, 17) + SourceIndex(0) +6 >Emitted(28, 25) Source(42, 25) + SourceIndex(0) +7 >Emitted(28, 26) Source(42, 26) + SourceIndex(0) +8 >Emitted(28, 27) Source(42, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(29, 2) Source(43, 2) + SourceIndex(0) +--- +>>>for (var _k = 0, _l = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^^^ +10> ^^ +11> ^^^^^^^ +12> ^^ +13> ^^^^^^ +14> ^^ +15> ^^ +16> ^^^^^^^ +17> ^^ +18> ^^^^^^^^ +19> ^^ +20> ^^^^^^^^^ +21> ^^ +22> ^^^^^^ +23> ^^ +24> ^^ +25> ^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let { skills: { primary: primaryA, secondary: secondaryA } } of +5 > [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +6 > +7 > [ +8 > { +9 > name +10> : +11> "mower" +12> , +13> skills +14> : +15> { +16> primary +17> : +18> "mowing" +19> , +20> secondary +21> : +22> "none" +23> } +24> } +1->Emitted(30, 1) Source(44, 1) + SourceIndex(0) +2 >Emitted(30, 4) Source(44, 4) + SourceIndex(0) +3 >Emitted(30, 5) Source(44, 5) + SourceIndex(0) +4 >Emitted(30, 6) Source(44, 70) + SourceIndex(0) +5 >Emitted(30, 16) Source(45, 79) + SourceIndex(0) +6 >Emitted(30, 18) Source(44, 70) + SourceIndex(0) +7 >Emitted(30, 24) Source(44, 71) + SourceIndex(0) +8 >Emitted(30, 26) Source(44, 73) + SourceIndex(0) +9 >Emitted(30, 30) Source(44, 77) + SourceIndex(0) +10>Emitted(30, 32) Source(44, 79) + SourceIndex(0) +11>Emitted(30, 39) Source(44, 86) + SourceIndex(0) +12>Emitted(30, 41) Source(44, 88) + SourceIndex(0) +13>Emitted(30, 47) Source(44, 94) + SourceIndex(0) +14>Emitted(30, 49) Source(44, 96) + SourceIndex(0) +15>Emitted(30, 51) Source(44, 98) + SourceIndex(0) +16>Emitted(30, 58) Source(44, 105) + SourceIndex(0) +17>Emitted(30, 60) Source(44, 107) + SourceIndex(0) +18>Emitted(30, 68) Source(44, 115) + SourceIndex(0) +19>Emitted(30, 70) Source(44, 117) + SourceIndex(0) +20>Emitted(30, 79) Source(44, 126) + SourceIndex(0) +21>Emitted(30, 81) Source(44, 128) + SourceIndex(0) +22>Emitted(30, 87) Source(44, 134) + SourceIndex(0) +23>Emitted(30, 89) Source(44, 136) + SourceIndex(0) +24>Emitted(30, 91) Source(44, 138) + SourceIndex(0) +--- +>>> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _k < _l.length; _k++) { +1->^^^^ +2 > ^^ +3 > ^^^^ +4 > ^^ +5 > ^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^ +10> ^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^ +15> ^^ +16> ^^^^^^^^ +17> ^^ +18> ^^ +19> ^ +20> ^^ +21> ^^^^^^^^^^^^^^ +22> ^^ +23> ^^^^ +24> ^ +1->, + > +2 > { +3 > name +4 > : +5 > "trimmer" +6 > , +7 > skills +8 > : +9 > { +10> primary +11> : +12> "trimming" +13> , +14> secondary +15> : +16> "edging" +17> } +18> } +19> ] +20> +21> let { skills: { primary: primaryA, secondary: secondaryA } } +22> +23> let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +24> ) +1->Emitted(31, 5) Source(45, 5) + SourceIndex(0) +2 >Emitted(31, 7) Source(45, 7) + SourceIndex(0) +3 >Emitted(31, 11) Source(45, 11) + SourceIndex(0) +4 >Emitted(31, 13) Source(45, 13) + SourceIndex(0) +5 >Emitted(31, 22) Source(45, 22) + SourceIndex(0) +6 >Emitted(31, 24) Source(45, 24) + SourceIndex(0) +7 >Emitted(31, 30) Source(45, 30) + SourceIndex(0) +8 >Emitted(31, 32) Source(45, 32) + SourceIndex(0) +9 >Emitted(31, 34) Source(45, 34) + SourceIndex(0) +10>Emitted(31, 41) Source(45, 41) + SourceIndex(0) +11>Emitted(31, 43) Source(45, 43) + SourceIndex(0) +12>Emitted(31, 53) Source(45, 53) + SourceIndex(0) +13>Emitted(31, 55) Source(45, 55) + SourceIndex(0) +14>Emitted(31, 64) Source(45, 64) + SourceIndex(0) +15>Emitted(31, 66) Source(45, 66) + SourceIndex(0) +16>Emitted(31, 74) Source(45, 74) + SourceIndex(0) +17>Emitted(31, 76) Source(45, 76) + SourceIndex(0) +18>Emitted(31, 78) Source(45, 78) + SourceIndex(0) +19>Emitted(31, 79) Source(45, 79) + SourceIndex(0) +20>Emitted(31, 81) Source(44, 6) + SourceIndex(0) +21>Emitted(31, 95) Source(44, 66) + SourceIndex(0) +22>Emitted(31, 97) Source(44, 6) + SourceIndex(0) +23>Emitted(31, 101) Source(45, 79) + SourceIndex(0) +24>Emitted(31, 102) Source(45, 80) + SourceIndex(0) +--- +>>> var _m = _l[_k].skills, primaryA = _m.primary, secondaryA = _m.secondary; +1 >^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > let { +3 > skills +4 > : { +5 > primary: primaryA +6 > , +7 > secondary: secondaryA +1 >Emitted(32, 5) Source(44, 6) + SourceIndex(0) +2 >Emitted(32, 9) Source(44, 12) + SourceIndex(0) +3 >Emitted(32, 27) Source(44, 18) + SourceIndex(0) +4 >Emitted(32, 29) Source(44, 22) + SourceIndex(0) +5 >Emitted(32, 50) Source(44, 39) + SourceIndex(0) +6 >Emitted(32, 52) Source(44, 41) + SourceIndex(0) +7 >Emitted(32, 77) Source(44, 62) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(33, 5) Source(46, 5) + SourceIndex(0) +2 >Emitted(33, 12) Source(46, 12) + SourceIndex(0) +3 >Emitted(33, 13) Source(46, 13) + SourceIndex(0) +4 >Emitted(33, 16) Source(46, 16) + SourceIndex(0) +5 >Emitted(33, 17) Source(46, 17) + SourceIndex(0) +6 >Emitted(33, 25) Source(46, 25) + SourceIndex(0) +7 >Emitted(33, 26) Source(46, 26) + SourceIndex(0) +8 >Emitted(33, 27) Source(46, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(34, 2) Source(47, 2) + SourceIndex(0) +--- +>>>for (var _o = 0, robots_2 = robots; _o < robots_2.length; _o++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +1-> + > + > +2 >for +3 > +4 > (let {name: nameA, skill: skillA } of +5 > robots +6 > +7 > robots +8 > +9 > let {name: nameA, skill: skillA } +10> +11> let {name: nameA, skill: skillA } of robots +12> ) +1->Emitted(35, 1) Source(49, 1) + SourceIndex(0) +2 >Emitted(35, 4) Source(49, 4) + SourceIndex(0) +3 >Emitted(35, 5) Source(49, 5) + SourceIndex(0) +4 >Emitted(35, 6) Source(49, 43) + SourceIndex(0) +5 >Emitted(35, 16) Source(49, 49) + SourceIndex(0) +6 >Emitted(35, 18) Source(49, 43) + SourceIndex(0) +7 >Emitted(35, 35) Source(49, 49) + SourceIndex(0) +8 >Emitted(35, 37) Source(49, 6) + SourceIndex(0) +9 >Emitted(35, 57) Source(49, 39) + SourceIndex(0) +10>Emitted(35, 59) Source(49, 6) + SourceIndex(0) +11>Emitted(35, 63) Source(49, 49) + SourceIndex(0) +12>Emitted(35, 64) Source(49, 50) + SourceIndex(0) +--- +>>> var _p = robots_2[_o], nameA = _p.name, skillA = _p.skill; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^ +1 > +2 > let { +3 > name: nameA +4 > , +5 > skill: skillA +1 >Emitted(36, 5) Source(49, 6) + SourceIndex(0) +2 >Emitted(36, 28) Source(49, 11) + SourceIndex(0) +3 >Emitted(36, 43) Source(49, 22) + SourceIndex(0) +4 >Emitted(36, 45) Source(49, 24) + SourceIndex(0) +5 >Emitted(36, 62) Source(49, 37) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(37, 5) Source(50, 5) + SourceIndex(0) +2 >Emitted(37, 12) Source(50, 12) + SourceIndex(0) +3 >Emitted(37, 13) Source(50, 13) + SourceIndex(0) +4 >Emitted(37, 16) Source(50, 16) + SourceIndex(0) +5 >Emitted(37, 17) Source(50, 17) + SourceIndex(0) +6 >Emitted(37, 22) Source(50, 22) + SourceIndex(0) +7 >Emitted(37, 23) Source(50, 23) + SourceIndex(0) +8 >Emitted(37, 24) Source(50, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(38, 2) Source(51, 2) + SourceIndex(0) +--- +>>>for (var _q = 0, _r = getRobots(); _q < _r.length; _q++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +15> ^-> +1-> + > +2 >for +3 > +4 > (let {name: nameA, skill: skillA } of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> let {name: nameA, skill: skillA } +12> +13> let {name: nameA, skill: skillA } of getRobots() +14> ) +1->Emitted(39, 1) Source(52, 1) + SourceIndex(0) +2 >Emitted(39, 4) Source(52, 4) + SourceIndex(0) +3 >Emitted(39, 5) Source(52, 5) + SourceIndex(0) +4 >Emitted(39, 6) Source(52, 43) + SourceIndex(0) +5 >Emitted(39, 16) Source(52, 54) + SourceIndex(0) +6 >Emitted(39, 18) Source(52, 43) + SourceIndex(0) +7 >Emitted(39, 23) Source(52, 43) + SourceIndex(0) +8 >Emitted(39, 32) Source(52, 52) + SourceIndex(0) +9 >Emitted(39, 34) Source(52, 54) + SourceIndex(0) +10>Emitted(39, 36) Source(52, 6) + SourceIndex(0) +11>Emitted(39, 50) Source(52, 39) + SourceIndex(0) +12>Emitted(39, 52) Source(52, 6) + SourceIndex(0) +13>Emitted(39, 56) Source(52, 54) + SourceIndex(0) +14>Emitted(39, 57) Source(52, 55) + SourceIndex(0) +--- +>>> var _s = _r[_q], nameA = _s.name, skillA = _s.skill; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^ +1-> +2 > let { +3 > name: nameA +4 > , +5 > skill: skillA +1->Emitted(40, 5) Source(52, 6) + SourceIndex(0) +2 >Emitted(40, 22) Source(52, 11) + SourceIndex(0) +3 >Emitted(40, 37) Source(52, 22) + SourceIndex(0) +4 >Emitted(40, 39) Source(52, 24) + SourceIndex(0) +5 >Emitted(40, 56) Source(52, 37) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(41, 5) Source(53, 5) + SourceIndex(0) +2 >Emitted(41, 12) Source(53, 12) + SourceIndex(0) +3 >Emitted(41, 13) Source(53, 13) + SourceIndex(0) +4 >Emitted(41, 16) Source(53, 16) + SourceIndex(0) +5 >Emitted(41, 17) Source(53, 17) + SourceIndex(0) +6 >Emitted(41, 22) Source(53, 22) + SourceIndex(0) +7 >Emitted(41, 23) Source(53, 23) + SourceIndex(0) +8 >Emitted(41, 24) Source(53, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(42, 2) Source(54, 2) + SourceIndex(0) +--- +>>>for (var _t = 0, _u = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _t < _u.length; _t++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^^^ +10> ^^ +11> ^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^^ +15> ^^^^^^^^ +16> ^^ +17> ^^ +18> ^^ +19> ^^^^ +20> ^^ +21> ^^^^^^^^^ +22> ^^ +23> ^^^^^ +24> ^^ +25> ^^^^^^^^^^ +26> ^^ +27> ^ +28> ^^ +29> ^^^^^^^^^^^^^^ +30> ^^ +31> ^^^^ +32> ^ +1-> + > +2 >for +3 > +4 > (let {name: nameA, skill: skillA } of +5 > [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +6 > +7 > [ +8 > { +9 > name +10> : +11> "mower" +12> , +13> skill +14> : +15> "mowing" +16> } +17> , +18> { +19> name +20> : +21> "trimmer" +22> , +23> skill +24> : +25> "trimming" +26> } +27> ] +28> +29> let {name: nameA, skill: skillA } +30> +31> let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +32> ) +1->Emitted(43, 1) Source(55, 1) + SourceIndex(0) +2 >Emitted(43, 4) Source(55, 4) + SourceIndex(0) +3 >Emitted(43, 5) Source(55, 5) + SourceIndex(0) +4 >Emitted(43, 6) Source(55, 43) + SourceIndex(0) +5 >Emitted(43, 16) Source(55, 119) + SourceIndex(0) +6 >Emitted(43, 18) Source(55, 43) + SourceIndex(0) +7 >Emitted(43, 24) Source(55, 44) + SourceIndex(0) +8 >Emitted(43, 26) Source(55, 46) + SourceIndex(0) +9 >Emitted(43, 30) Source(55, 50) + SourceIndex(0) +10>Emitted(43, 32) Source(55, 52) + SourceIndex(0) +11>Emitted(43, 39) Source(55, 59) + SourceIndex(0) +12>Emitted(43, 41) Source(55, 61) + SourceIndex(0) +13>Emitted(43, 46) Source(55, 66) + SourceIndex(0) +14>Emitted(43, 48) Source(55, 68) + SourceIndex(0) +15>Emitted(43, 56) Source(55, 76) + SourceIndex(0) +16>Emitted(43, 58) Source(55, 78) + SourceIndex(0) +17>Emitted(43, 60) Source(55, 80) + SourceIndex(0) +18>Emitted(43, 62) Source(55, 82) + SourceIndex(0) +19>Emitted(43, 66) Source(55, 86) + SourceIndex(0) +20>Emitted(43, 68) Source(55, 88) + SourceIndex(0) +21>Emitted(43, 77) Source(55, 97) + SourceIndex(0) +22>Emitted(43, 79) Source(55, 99) + SourceIndex(0) +23>Emitted(43, 84) Source(55, 104) + SourceIndex(0) +24>Emitted(43, 86) Source(55, 106) + SourceIndex(0) +25>Emitted(43, 96) Source(55, 116) + SourceIndex(0) +26>Emitted(43, 98) Source(55, 118) + SourceIndex(0) +27>Emitted(43, 99) Source(55, 119) + SourceIndex(0) +28>Emitted(43, 101) Source(55, 6) + SourceIndex(0) +29>Emitted(43, 115) Source(55, 39) + SourceIndex(0) +30>Emitted(43, 117) Source(55, 6) + SourceIndex(0) +31>Emitted(43, 121) Source(55, 119) + SourceIndex(0) +32>Emitted(43, 122) Source(55, 120) + SourceIndex(0) +--- +>>> var _v = _u[_t], nameA = _v.name, skillA = _v.skill; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^ +1 > +2 > let { +3 > name: nameA +4 > , +5 > skill: skillA +1 >Emitted(44, 5) Source(55, 6) + SourceIndex(0) +2 >Emitted(44, 22) Source(55, 11) + SourceIndex(0) +3 >Emitted(44, 37) Source(55, 22) + SourceIndex(0) +4 >Emitted(44, 39) Source(55, 24) + SourceIndex(0) +5 >Emitted(44, 56) Source(55, 37) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(45, 5) Source(56, 5) + SourceIndex(0) +2 >Emitted(45, 12) Source(56, 12) + SourceIndex(0) +3 >Emitted(45, 13) Source(56, 13) + SourceIndex(0) +4 >Emitted(45, 16) Source(56, 16) + SourceIndex(0) +5 >Emitted(45, 17) Source(56, 17) + SourceIndex(0) +6 >Emitted(45, 22) Source(56, 22) + SourceIndex(0) +7 >Emitted(45, 23) Source(56, 23) + SourceIndex(0) +8 >Emitted(45, 24) Source(56, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(46, 2) Source(57, 2) + SourceIndex(0) +--- +>>>for (var _w = 0, multiRobots_2 = multiRobots; _w < multiRobots_2.length; _w++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } +10> +11> let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots +12> ) +1->Emitted(47, 1) Source(58, 1) + SourceIndex(0) +2 >Emitted(47, 4) Source(58, 4) + SourceIndex(0) +3 >Emitted(47, 5) Source(58, 5) + SourceIndex(0) +4 >Emitted(47, 6) Source(58, 82) + SourceIndex(0) +5 >Emitted(47, 16) Source(58, 93) + SourceIndex(0) +6 >Emitted(47, 18) Source(58, 82) + SourceIndex(0) +7 >Emitted(47, 45) Source(58, 93) + SourceIndex(0) +8 >Emitted(47, 47) Source(58, 6) + SourceIndex(0) +9 >Emitted(47, 72) Source(58, 78) + SourceIndex(0) +10>Emitted(47, 74) Source(58, 6) + SourceIndex(0) +11>Emitted(47, 78) Source(58, 93) + SourceIndex(0) +12>Emitted(47, 79) Source(58, 94) + SourceIndex(0) +--- +>>> var _x = multiRobots_2[_w], nameA = _x.name, _y = _x.skills, primaryA = _y.primary, secondaryA = _y.secondary; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let { +3 > name: nameA +4 > , +5 > skills +6 > : { +7 > primary: primaryA +8 > , +9 > secondary: secondaryA +1->Emitted(48, 5) Source(58, 6) + SourceIndex(0) +2 >Emitted(48, 33) Source(58, 11) + SourceIndex(0) +3 >Emitted(48, 48) Source(58, 22) + SourceIndex(0) +4 >Emitted(48, 50) Source(58, 24) + SourceIndex(0) +5 >Emitted(48, 64) Source(58, 30) + SourceIndex(0) +6 >Emitted(48, 66) Source(58, 34) + SourceIndex(0) +7 >Emitted(48, 87) Source(58, 51) + SourceIndex(0) +8 >Emitted(48, 89) Source(58, 53) + SourceIndex(0) +9 >Emitted(48, 114) Source(58, 74) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } } of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(49, 5) Source(59, 5) + SourceIndex(0) +2 >Emitted(49, 12) Source(59, 12) + SourceIndex(0) +3 >Emitted(49, 13) Source(59, 13) + SourceIndex(0) +4 >Emitted(49, 16) Source(59, 16) + SourceIndex(0) +5 >Emitted(49, 17) Source(59, 17) + SourceIndex(0) +6 >Emitted(49, 22) Source(59, 22) + SourceIndex(0) +7 >Emitted(49, 23) Source(59, 23) + SourceIndex(0) +8 >Emitted(49, 24) Source(59, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(50, 2) Source(60, 2) + SourceIndex(0) +--- +>>>for (var _z = 0, _0 = getMultiRobots(); _z < _0.length; _z++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } +12> +13> let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots() +14> ) +1->Emitted(51, 1) Source(61, 1) + SourceIndex(0) +2 >Emitted(51, 4) Source(61, 4) + SourceIndex(0) +3 >Emitted(51, 5) Source(61, 5) + SourceIndex(0) +4 >Emitted(51, 6) Source(61, 82) + SourceIndex(0) +5 >Emitted(51, 16) Source(61, 98) + SourceIndex(0) +6 >Emitted(51, 18) Source(61, 82) + SourceIndex(0) +7 >Emitted(51, 23) Source(61, 82) + SourceIndex(0) +8 >Emitted(51, 37) Source(61, 96) + SourceIndex(0) +9 >Emitted(51, 39) Source(61, 98) + SourceIndex(0) +10>Emitted(51, 41) Source(61, 6) + SourceIndex(0) +11>Emitted(51, 55) Source(61, 78) + SourceIndex(0) +12>Emitted(51, 57) Source(61, 6) + SourceIndex(0) +13>Emitted(51, 61) Source(61, 98) + SourceIndex(0) +14>Emitted(51, 62) Source(61, 99) + SourceIndex(0) +--- +>>> var _1 = _0[_z], nameA = _1.name, _2 = _1.skills, primaryA = _2.primary, secondaryA = _2.secondary; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let { +3 > name: nameA +4 > , +5 > skills +6 > : { +7 > primary: primaryA +8 > , +9 > secondary: secondaryA +1->Emitted(52, 5) Source(61, 6) + SourceIndex(0) +2 >Emitted(52, 22) Source(61, 11) + SourceIndex(0) +3 >Emitted(52, 37) Source(61, 22) + SourceIndex(0) +4 >Emitted(52, 39) Source(61, 24) + SourceIndex(0) +5 >Emitted(52, 53) Source(61, 30) + SourceIndex(0) +6 >Emitted(52, 55) Source(61, 34) + SourceIndex(0) +7 >Emitted(52, 76) Source(61, 51) + SourceIndex(0) +8 >Emitted(52, 78) Source(61, 53) + SourceIndex(0) +9 >Emitted(52, 103) Source(61, 74) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } } of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(53, 5) Source(62, 5) + SourceIndex(0) +2 >Emitted(53, 12) Source(62, 12) + SourceIndex(0) +3 >Emitted(53, 13) Source(62, 13) + SourceIndex(0) +4 >Emitted(53, 16) Source(62, 16) + SourceIndex(0) +5 >Emitted(53, 17) Source(62, 17) + SourceIndex(0) +6 >Emitted(53, 22) Source(62, 22) + SourceIndex(0) +7 >Emitted(53, 23) Source(62, 23) + SourceIndex(0) +8 >Emitted(53, 24) Source(62, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(54, 2) Source(63, 2) + SourceIndex(0) +--- +>>>for (var _3 = 0, _4 = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^^^ +10> ^^ +11> ^^^^^^^ +12> ^^ +13> ^^^^^^ +14> ^^ +15> ^^ +16> ^^^^^^^ +17> ^^ +18> ^^^^^^^^ +19> ^^ +20> ^^^^^^^^^ +21> ^^ +22> ^^^^^^ +23> ^^ +24> ^^ +25> ^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of +5 > [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +6 > +7 > [ +8 > { +9 > name +10> : +11> "mower" +12> , +13> skills +14> : +15> { +16> primary +17> : +18> "mowing" +19> , +20> secondary +21> : +22> "none" +23> } +24> } +1->Emitted(55, 1) Source(64, 1) + SourceIndex(0) +2 >Emitted(55, 4) Source(64, 4) + SourceIndex(0) +3 >Emitted(55, 5) Source(64, 5) + SourceIndex(0) +4 >Emitted(55, 6) Source(64, 82) + SourceIndex(0) +5 >Emitted(55, 16) Source(65, 79) + SourceIndex(0) +6 >Emitted(55, 18) Source(64, 82) + SourceIndex(0) +7 >Emitted(55, 24) Source(64, 83) + SourceIndex(0) +8 >Emitted(55, 26) Source(64, 85) + SourceIndex(0) +9 >Emitted(55, 30) Source(64, 89) + SourceIndex(0) +10>Emitted(55, 32) Source(64, 91) + SourceIndex(0) +11>Emitted(55, 39) Source(64, 98) + SourceIndex(0) +12>Emitted(55, 41) Source(64, 100) + SourceIndex(0) +13>Emitted(55, 47) Source(64, 106) + SourceIndex(0) +14>Emitted(55, 49) Source(64, 108) + SourceIndex(0) +15>Emitted(55, 51) Source(64, 110) + SourceIndex(0) +16>Emitted(55, 58) Source(64, 117) + SourceIndex(0) +17>Emitted(55, 60) Source(64, 119) + SourceIndex(0) +18>Emitted(55, 68) Source(64, 127) + SourceIndex(0) +19>Emitted(55, 70) Source(64, 129) + SourceIndex(0) +20>Emitted(55, 79) Source(64, 138) + SourceIndex(0) +21>Emitted(55, 81) Source(64, 140) + SourceIndex(0) +22>Emitted(55, 87) Source(64, 146) + SourceIndex(0) +23>Emitted(55, 89) Source(64, 148) + SourceIndex(0) +24>Emitted(55, 91) Source(64, 150) + SourceIndex(0) +--- +>>> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _3 < _4.length; _3++) { +1->^^^^ +2 > ^^ +3 > ^^^^ +4 > ^^ +5 > ^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^ +10> ^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^ +15> ^^ +16> ^^^^^^^^ +17> ^^ +18> ^^ +19> ^ +20> ^^ +21> ^^^^^^^^^^^^^^ +22> ^^ +23> ^^^^ +24> ^ +25> ^^^-> +1->, + > +2 > { +3 > name +4 > : +5 > "trimmer" +6 > , +7 > skills +8 > : +9 > { +10> primary +11> : +12> "trimming" +13> , +14> secondary +15> : +16> "edging" +17> } +18> } +19> ] +20> +21> let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } +22> +23> let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +24> ) +1->Emitted(56, 5) Source(65, 5) + SourceIndex(0) +2 >Emitted(56, 7) Source(65, 7) + SourceIndex(0) +3 >Emitted(56, 11) Source(65, 11) + SourceIndex(0) +4 >Emitted(56, 13) Source(65, 13) + SourceIndex(0) +5 >Emitted(56, 22) Source(65, 22) + SourceIndex(0) +6 >Emitted(56, 24) Source(65, 24) + SourceIndex(0) +7 >Emitted(56, 30) Source(65, 30) + SourceIndex(0) +8 >Emitted(56, 32) Source(65, 32) + SourceIndex(0) +9 >Emitted(56, 34) Source(65, 34) + SourceIndex(0) +10>Emitted(56, 41) Source(65, 41) + SourceIndex(0) +11>Emitted(56, 43) Source(65, 43) + SourceIndex(0) +12>Emitted(56, 53) Source(65, 53) + SourceIndex(0) +13>Emitted(56, 55) Source(65, 55) + SourceIndex(0) +14>Emitted(56, 64) Source(65, 64) + SourceIndex(0) +15>Emitted(56, 66) Source(65, 66) + SourceIndex(0) +16>Emitted(56, 74) Source(65, 74) + SourceIndex(0) +17>Emitted(56, 76) Source(65, 76) + SourceIndex(0) +18>Emitted(56, 78) Source(65, 78) + SourceIndex(0) +19>Emitted(56, 79) Source(65, 79) + SourceIndex(0) +20>Emitted(56, 81) Source(64, 6) + SourceIndex(0) +21>Emitted(56, 95) Source(64, 78) + SourceIndex(0) +22>Emitted(56, 97) Source(64, 6) + SourceIndex(0) +23>Emitted(56, 101) Source(65, 79) + SourceIndex(0) +24>Emitted(56, 102) Source(65, 80) + SourceIndex(0) +--- +>>> var _5 = _4[_3], nameA = _5.name, _6 = _5.skills, primaryA = _6.primary, secondaryA = _6.secondary; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let { +3 > name: nameA +4 > , +5 > skills +6 > : { +7 > primary: primaryA +8 > , +9 > secondary: secondaryA +1->Emitted(57, 5) Source(64, 6) + SourceIndex(0) +2 >Emitted(57, 22) Source(64, 11) + SourceIndex(0) +3 >Emitted(57, 37) Source(64, 22) + SourceIndex(0) +4 >Emitted(57, 39) Source(64, 24) + SourceIndex(0) +5 >Emitted(57, 53) Source(64, 30) + SourceIndex(0) +6 >Emitted(57, 55) Source(64, 34) + SourceIndex(0) +7 >Emitted(57, 76) Source(64, 51) + SourceIndex(0) +8 >Emitted(57, 78) Source(64, 53) + SourceIndex(0) +9 >Emitted(57, 103) Source(64, 74) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(58, 5) Source(66, 5) + SourceIndex(0) +2 >Emitted(58, 12) Source(66, 12) + SourceIndex(0) +3 >Emitted(58, 13) Source(66, 13) + SourceIndex(0) +4 >Emitted(58, 16) Source(66, 16) + SourceIndex(0) +5 >Emitted(58, 17) Source(66, 17) + SourceIndex(0) +6 >Emitted(58, 22) Source(66, 22) + SourceIndex(0) +7 >Emitted(58, 23) Source(66, 23) + SourceIndex(0) +8 >Emitted(58, 24) Source(66, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(59, 2) Source(67, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringForOfObjectBindingPattern.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.symbols b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.symbols new file mode 100644 index 00000000000..8fef1fabd6d --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.symbols @@ -0,0 +1,259 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPattern.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 11)) + + log(msg: any): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 1, 8)) +} +interface Robot { +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 2, 1)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 3, 17)) + + skill: string; +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 4, 17)) +} + +interface MultiRobot { +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 6, 1)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 8, 22)) + + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 9, 17)) + + primary: string; +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 10, 13)) + + secondary: string; +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 11, 24)) + + }; +} + +let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 16, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 16, 24)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 16, 39)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 16, 60)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 16, 77)) + +let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 17, 3)) +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 17, 34)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 17, 49)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 17, 59)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 17, 78)) + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 18, 5)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 18, 22)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 18, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 18, 53)) + +function getRobots() { +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 18, 79)) + + return robots; +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 16, 3)) +} + +function getMultiRobots() { +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 22, 1)) + + return multiRobots; +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 17, 3)) +} + +for (let {name: nameA } of robots) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 28, 10)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 16, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 28, 10)) +} +for (let {name: nameA } of getRobots()) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 31, 10)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 18, 79)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 31, 10)) +} +for (let {name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 34, 29)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 34, 10)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 34, 29)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 34, 44)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 34, 65)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 34, 82)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 34, 10)) +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 9, 17)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 37, 20)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 11, 24)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 37, 39)) +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 17, 3)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 37, 20)) +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 9, 17)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 40, 20)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 11, 24)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 40, 39)) +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 22, 1)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 40, 20)) +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 86)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 96)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 20)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 115)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 39)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 71)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 86)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 96)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 115)) + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 44, 5)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 44, 22)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 44, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 44, 53)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 20)) +} + +for (let {name: nameA, skill: skillA } of robots) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 48, 10)) +>skill : Symbol(Robot.skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 4, 17)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 48, 22)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 16, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 48, 10)) +} +for (let {name: nameA, skill: skillA } of getRobots()) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 51, 10)) +>skill : Symbol(Robot.skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 4, 17)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 51, 22)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 18, 79)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 51, 10)) +} +for (let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 44)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 10)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 59)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 22)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 44)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 59)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 80)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 97)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 10)) +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { +>name : Symbol(MultiRobot.name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 8, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 57, 10)) +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 9, 17)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 57, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 11, 24)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 57, 51)) +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 17, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 57, 10)) +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { +>name : Symbol(MultiRobot.name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 8, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 60, 10)) +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 9, 17)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 60, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 11, 24)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 60, 51)) +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 22, 1)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 60, 10)) +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 83)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 10)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 98)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 108)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 127)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 51)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 83)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 98)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 108)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 127)) + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 64, 5)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 64, 22)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 64, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 64, 53)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 10)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.types b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.types new file mode 100644 index 00000000000..17c060225dc --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.types @@ -0,0 +1,329 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPattern.ts === +declare var console: { +>console : { log(msg: any): void; } + + log(msg: any): void; +>log : (msg: any) => void +>msg : any +} +interface Robot { +>Robot : Robot + + name: string; +>name : string + + skill: string; +>skill : string +} + +interface MultiRobot { +>MultiRobot : MultiRobot + + name: string; +>name : string + + skills: { +>skills : { primary: string; secondary: string; } + + primary: string; +>primary : string + + secondary: string; +>secondary : string + + }; +} + +let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +>robots : Robot[] +>Robot : Robot +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string + +let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>multiRobots : MultiRobot[] +>MultiRobot : MultiRobot +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"mower" : string +>skills : { primary: string; secondary: string; } +>{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } +>primary : string +>"mowing" : string +>secondary : string +>"none" : string + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + +function getRobots() { +>getRobots : () => Robot[] + + return robots; +>robots : Robot[] +} + +function getMultiRobots() { +>getMultiRobots : () => MultiRobot[] + + return multiRobots; +>multiRobots : MultiRobot[] +} + +for (let {name: nameA } of robots) { +>name : any +>nameA : string +>robots : Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let {name: nameA } of getRobots()) { +>name : any +>nameA : string +>getRobots() : Robot[] +>getRobots : () => Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let {name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>name : any +>nameA : string +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { +>skills : any +>primary : any +>primaryA : string +>secondary : any +>secondaryA : string +>multiRobots : MultiRobot[] + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { +>skills : any +>primary : any +>primaryA : string +>secondary : any +>secondaryA : string +>getMultiRobots() : MultiRobot[] +>getMultiRobots : () => MultiRobot[] + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>skills : any +>primary : any +>primaryA : string +>secondary : any +>secondaryA : string +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"mower" : string +>skills : { primary: string; secondary: string; } +>{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } +>primary : string +>"mowing" : string +>secondary : string +>"none" : string + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} + +for (let {name: nameA, skill: skillA } of robots) { +>name : any +>nameA : string +>skill : any +>skillA : string +>robots : Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let {name: nameA, skill: skillA } of getRobots()) { +>name : any +>nameA : string +>skill : any +>skillA : string +>getRobots() : Robot[] +>getRobots : () => Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>name : any +>nameA : string +>skill : any +>skillA : string +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { +>name : any +>nameA : string +>skills : any +>primary : any +>primaryA : string +>secondary : any +>secondaryA : string +>multiRobots : MultiRobot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { +>name : any +>nameA : string +>skills : any +>primary : any +>primaryA : string +>secondary : any +>secondaryA : string +>getMultiRobots() : MultiRobot[] +>getMultiRobots : () => MultiRobot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>name : any +>nameA : string +>skills : any +>primary : any +>primaryA : string +>secondary : any +>secondaryA : string +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"mower" : string +>skills : { primary: string; secondary: string; } +>{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } +>primary : string +>"mowing" : string +>secondary : string +>"none" : string + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} diff --git a/tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPattern.ts b/tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPattern.ts new file mode 100644 index 00000000000..df822f89bc0 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPattern.ts @@ -0,0 +1,68 @@ +// @sourcemap: true +declare var console: { + log(msg: any): void; +} +interface Robot { + name: string; + skill: string; +} + +interface MultiRobot { + name: string; + skills: { + primary: string; + secondary: string; + }; +} + +let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; + +function getRobots() { + return robots; +} + +function getMultiRobots() { + return multiRobots; +} + +for (let {name: nameA } of robots) { + console.log(nameA); +} +for (let {name: nameA } of getRobots()) { + console.log(nameA); +} +for (let {name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + console.log(primaryA); +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + console.log(primaryA); +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(primaryA); +} + +for (let {name: nameA, skill: skillA } of robots) { + console.log(nameA); +} +for (let {name: nameA, skill: skillA } of getRobots()) { + console.log(nameA); +} +for (let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + console.log(nameA); +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + console.log(nameA); +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(nameA); +} \ No newline at end of file From edd55ddf51489db808842a8576dfa479ab37e792 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 8 Dec 2015 13:27:17 -0800 Subject: [PATCH 026/209] Make the source map of "for of" destructuring - object binding pattern better --- src/compiler/emitter.ts | 10 +- ...tructuringForOfObjectBindingPattern.js.map | 2 +- ...ingForOfObjectBindingPattern.sourcemap.txt | 374 ++++++++++-------- 3 files changed, 212 insertions(+), 174 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 06272bbb3a7..4487695a2af 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -3315,21 +3315,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write("; "); // _i < _a.length; - emitStart(node.initializer); + emitStart(node.expression); emitNodeWithoutSourceMap(counter); write(" < "); emitNodeWithCommentsAndWithoutSourcemap(rhsReference); write(".length"); - emitEnd(node.initializer); + emitEnd(node.expression); write("; "); // _i++) - emitStart(node.initializer); + emitStart(node.expression); emitNodeWithoutSourceMap(counter); write("++"); - emitEnd(node.initializer); + emitEnd(node.expression); emitToken(SyntaxKind.CloseParenToken, node.expression.end); // Body @@ -3339,7 +3339,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi // Initialize LHS // let v = _a[_i]; - const rhsIterationValue = createElementAccessExpression(rhsReference, counter); + const rhsIterationValue = createElementAccessExpression(rhsReference, counter, node.initializer); emitStart(node.initializer); if (node.initializer.kind === SyntaxKind.VariableDeclarationList) { write("var "); diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.js.map index 3f8182d4376..12bfa47171a 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringForOfObjectBindingPattern.js.map] -{"version":3,"file":"sourceMapValidationDestructuringForOfObject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,EAAjH,cAAiC,EAAjC,IAAiH,CAAC;IAAlH,iBAAK,eAAW,EAAE,iBAAa;IAChC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAA6E,UAAW,EAAX,2BAAW,EAAvF,yBAAwE,EAAxE,IAAuF,CAAC;IAAxF,4BAAK,eAAW,EAAE,cAAM,EAAI,qBAAiB,EAAE,yBAAqB;IACrE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAA6E,UAAgB,EAAhB,KAAA,cAAc,EAAE,EAA5F,cAAwE,EAAxE,IAA4F,CAAC;IAA7F,iBAAK,eAAW,EAAE,cAAM,EAAI,qBAAiB,EAAE,yBAAqB;IACrE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAA6E,UACH,EADG,MAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE;IACjJ,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,EADzE,cAAwE,EAAxE,IACyE,CAAC;IAD1E,iBAAK,eAAW,EAAE,cAAM,EAAI,qBAAiB,EAAE,yBAAqB;IAErE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringForOfObjectBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForOfObjectBindingPattern.ts"],"names":[],"mappings":"AAgBA,IAAI,MAAM,GAAY,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;AACnG,IAAI,WAA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AAM,EAAI,qBAAiB,EAAE,yBAAqB;IACrE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAA6E,UAAgB,EAAhB,KAAA,cAAc,EAAE,EAAhB,cAAgB,EAAhB,IAAgB,CAAC;IAA7F,IAAA,WAAwE,EAAnE,eAAW,EAAE,cAAM,EAAI,qBAAiB,EAAE,yBAAqB;IACrE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAA6E,UACH,EADG,MAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE;IACjJ,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,EADG,cACH,EADG,IACH,CAAC;IAD1E,IAAA,WAAwE,EAAnE,eAAW,EAAE,cAAM,EAAI,qBAAiB,EAAE,yBAAqB;IAErE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.sourcemap.txt index 42b9853cc09..513ff6ea2a9 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.sourcemap.txt @@ -331,9 +331,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts 6 > 7 > robots 8 > -9 > let {name: nameA } +9 > robots 10> -11> let {name: nameA } of robots +11> robots 12> ) 1->Emitted(10, 1) Source(29, 1) + SourceIndex(0) 2 >Emitted(10, 4) Source(29, 4) + SourceIndex(0) @@ -342,9 +342,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts 5 >Emitted(10, 16) Source(29, 34) + SourceIndex(0) 6 >Emitted(10, 18) Source(29, 28) + SourceIndex(0) 7 >Emitted(10, 35) Source(29, 34) + SourceIndex(0) -8 >Emitted(10, 37) Source(29, 6) + SourceIndex(0) -9 >Emitted(10, 57) Source(29, 24) + SourceIndex(0) -10>Emitted(10, 59) Source(29, 6) + SourceIndex(0) +8 >Emitted(10, 37) Source(29, 28) + SourceIndex(0) +9 >Emitted(10, 57) Source(29, 34) + SourceIndex(0) +10>Emitted(10, 59) Source(29, 28) + SourceIndex(0) 11>Emitted(10, 63) Source(29, 34) + SourceIndex(0) 12>Emitted(10, 64) Source(29, 35) + SourceIndex(0) --- @@ -419,9 +419,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts 8 > getRobots 9 > () 10> -11> let {name: nameA } +11> getRobots() 12> -13> let {name: nameA } of getRobots() +13> getRobots() 14> ) 1->Emitted(14, 1) Source(32, 1) + SourceIndex(0) 2 >Emitted(14, 4) Source(32, 4) + SourceIndex(0) @@ -432,9 +432,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts 7 >Emitted(14, 23) Source(32, 28) + SourceIndex(0) 8 >Emitted(14, 32) Source(32, 37) + SourceIndex(0) 9 >Emitted(14, 34) Source(32, 39) + SourceIndex(0) -10>Emitted(14, 36) Source(32, 6) + SourceIndex(0) -11>Emitted(14, 50) Source(32, 24) + SourceIndex(0) -12>Emitted(14, 52) Source(32, 6) + SourceIndex(0) +10>Emitted(14, 36) Source(32, 28) + SourceIndex(0) +11>Emitted(14, 50) Source(32, 39) + SourceIndex(0) +12>Emitted(14, 52) Source(32, 28) + SourceIndex(0) 13>Emitted(14, 56) Source(32, 39) + SourceIndex(0) 14>Emitted(14, 57) Source(32, 40) + SourceIndex(0) --- @@ -545,9 +545,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts 26> } 27> ] 28> -29> let {name: nameA } +29> [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] 30> -31> let {name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +31> [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] 32> ) 1->Emitted(18, 1) Source(35, 1) + SourceIndex(0) 2 >Emitted(18, 4) Source(35, 4) + SourceIndex(0) @@ -576,9 +576,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts 25>Emitted(18, 96) Source(35, 101) + SourceIndex(0) 26>Emitted(18, 98) Source(35, 103) + SourceIndex(0) 27>Emitted(18, 99) Source(35, 104) + SourceIndex(0) -28>Emitted(18, 101) Source(35, 6) + SourceIndex(0) -29>Emitted(18, 115) Source(35, 24) + SourceIndex(0) -30>Emitted(18, 117) Source(35, 6) + SourceIndex(0) +28>Emitted(18, 101) Source(35, 28) + SourceIndex(0) +29>Emitted(18, 115) Source(35, 104) + SourceIndex(0) +30>Emitted(18, 117) Source(35, 28) + SourceIndex(0) 31>Emitted(18, 121) Source(35, 104) + SourceIndex(0) 32>Emitted(18, 122) Source(35, 105) + SourceIndex(0) --- @@ -650,9 +650,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts 6 > 7 > multiRobots 8 > -9 > let { skills: { primary: primaryA, secondary: secondaryA } } +9 > multiRobots 10> -11> let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots +11> multiRobots 12> ) 1->Emitted(22, 1) Source(38, 1) + SourceIndex(0) 2 >Emitted(22, 4) Source(38, 4) + SourceIndex(0) @@ -661,9 +661,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts 5 >Emitted(22, 16) Source(38, 81) + SourceIndex(0) 6 >Emitted(22, 18) Source(38, 70) + SourceIndex(0) 7 >Emitted(22, 45) Source(38, 81) + SourceIndex(0) -8 >Emitted(22, 47) Source(38, 6) + SourceIndex(0) -9 >Emitted(22, 72) Source(38, 66) + SourceIndex(0) -10>Emitted(22, 74) Source(38, 6) + SourceIndex(0) +8 >Emitted(22, 47) Source(38, 70) + SourceIndex(0) +9 >Emitted(22, 72) Source(38, 81) + SourceIndex(0) +10>Emitted(22, 74) Source(38, 70) + SourceIndex(0) 11>Emitted(22, 78) Source(38, 81) + SourceIndex(0) 12>Emitted(22, 79) Source(38, 82) + SourceIndex(0) --- @@ -751,9 +751,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts 8 > getMultiRobots 9 > () 10> -11> let { skills: { primary: primaryA, secondary: secondaryA } } +11> getMultiRobots() 12> -13> let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots() +13> getMultiRobots() 14> ) 1->Emitted(26, 1) Source(41, 1) + SourceIndex(0) 2 >Emitted(26, 4) Source(41, 4) + SourceIndex(0) @@ -764,9 +764,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts 7 >Emitted(26, 23) Source(41, 70) + SourceIndex(0) 8 >Emitted(26, 37) Source(41, 84) + SourceIndex(0) 9 >Emitted(26, 39) Source(41, 86) + SourceIndex(0) -10>Emitted(26, 41) Source(41, 6) + SourceIndex(0) -11>Emitted(26, 55) Source(41, 66) + SourceIndex(0) -12>Emitted(26, 57) Source(41, 6) + SourceIndex(0) +10>Emitted(26, 41) Source(41, 70) + SourceIndex(0) +11>Emitted(26, 55) Source(41, 86) + SourceIndex(0) +12>Emitted(26, 57) Source(41, 70) + SourceIndex(0) 13>Emitted(26, 61) Source(41, 86) + SourceIndex(0) 14>Emitted(26, 62) Source(41, 87) + SourceIndex(0) --- @@ -950,9 +950,10 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts 18> } 19> ] 20> -21> let { skills: { primary: primaryA, secondary: secondaryA } } +21> [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] 22> -23> let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +23> [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] 24> ) 1->Emitted(31, 5) Source(45, 5) + SourceIndex(0) @@ -974,9 +975,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts 17>Emitted(31, 76) Source(45, 76) + SourceIndex(0) 18>Emitted(31, 78) Source(45, 78) + SourceIndex(0) 19>Emitted(31, 79) Source(45, 79) + SourceIndex(0) -20>Emitted(31, 81) Source(44, 6) + SourceIndex(0) -21>Emitted(31, 95) Source(44, 66) + SourceIndex(0) -22>Emitted(31, 97) Source(44, 6) + SourceIndex(0) +20>Emitted(31, 81) Source(44, 70) + SourceIndex(0) +21>Emitted(31, 95) Source(45, 79) + SourceIndex(0) +22>Emitted(31, 97) Source(44, 70) + SourceIndex(0) 23>Emitted(31, 101) Source(45, 79) + SourceIndex(0) 24>Emitted(31, 102) Source(45, 80) + SourceIndex(0) --- @@ -1061,9 +1062,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts 6 > 7 > robots 8 > -9 > let {name: nameA, skill: skillA } +9 > robots 10> -11> let {name: nameA, skill: skillA } of robots +11> robots 12> ) 1->Emitted(35, 1) Source(49, 1) + SourceIndex(0) 2 >Emitted(35, 4) Source(49, 4) + SourceIndex(0) @@ -1072,28 +1073,34 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts 5 >Emitted(35, 16) Source(49, 49) + SourceIndex(0) 6 >Emitted(35, 18) Source(49, 43) + SourceIndex(0) 7 >Emitted(35, 35) Source(49, 49) + SourceIndex(0) -8 >Emitted(35, 37) Source(49, 6) + SourceIndex(0) -9 >Emitted(35, 57) Source(49, 39) + SourceIndex(0) -10>Emitted(35, 59) Source(49, 6) + SourceIndex(0) +8 >Emitted(35, 37) Source(49, 43) + SourceIndex(0) +9 >Emitted(35, 57) Source(49, 49) + SourceIndex(0) +10>Emitted(35, 59) Source(49, 43) + SourceIndex(0) 11>Emitted(35, 63) Source(49, 49) + SourceIndex(0) 12>Emitted(35, 64) Source(49, 50) + SourceIndex(0) --- >>> var _p = robots_2[_o], nameA = _p.name, skillA = _p.skill; 1 >^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ 1 > -2 > let { -3 > name: nameA -4 > , -5 > skill: skillA +2 > +3 > let {name: nameA, skill: skillA } +4 > +5 > name: nameA +6 > , +7 > skill: skillA 1 >Emitted(36, 5) Source(49, 6) + SourceIndex(0) -2 >Emitted(36, 28) Source(49, 11) + SourceIndex(0) -3 >Emitted(36, 43) Source(49, 22) + SourceIndex(0) -4 >Emitted(36, 45) Source(49, 24) + SourceIndex(0) -5 >Emitted(36, 62) Source(49, 37) + SourceIndex(0) +2 >Emitted(36, 9) Source(49, 6) + SourceIndex(0) +3 >Emitted(36, 26) Source(49, 39) + SourceIndex(0) +4 >Emitted(36, 28) Source(49, 11) + SourceIndex(0) +5 >Emitted(36, 43) Source(49, 22) + SourceIndex(0) +6 >Emitted(36, 45) Source(49, 24) + SourceIndex(0) +7 >Emitted(36, 62) Source(49, 37) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -1156,9 +1163,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts 8 > getRobots 9 > () 10> -11> let {name: nameA, skill: skillA } +11> getRobots() 12> -13> let {name: nameA, skill: skillA } of getRobots() +13> getRobots() 14> ) 1->Emitted(39, 1) Source(52, 1) + SourceIndex(0) 2 >Emitted(39, 4) Source(52, 4) + SourceIndex(0) @@ -1169,28 +1176,34 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts 7 >Emitted(39, 23) Source(52, 43) + SourceIndex(0) 8 >Emitted(39, 32) Source(52, 52) + SourceIndex(0) 9 >Emitted(39, 34) Source(52, 54) + SourceIndex(0) -10>Emitted(39, 36) Source(52, 6) + SourceIndex(0) -11>Emitted(39, 50) Source(52, 39) + SourceIndex(0) -12>Emitted(39, 52) Source(52, 6) + SourceIndex(0) +10>Emitted(39, 36) Source(52, 43) + SourceIndex(0) +11>Emitted(39, 50) Source(52, 54) + SourceIndex(0) +12>Emitted(39, 52) Source(52, 43) + SourceIndex(0) 13>Emitted(39, 56) Source(52, 54) + SourceIndex(0) 14>Emitted(39, 57) Source(52, 55) + SourceIndex(0) --- >>> var _s = _r[_q], nameA = _s.name, skillA = _s.skill; 1->^^^^ -2 > ^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ 1-> -2 > let { -3 > name: nameA -4 > , -5 > skill: skillA +2 > +3 > let {name: nameA, skill: skillA } +4 > +5 > name: nameA +6 > , +7 > skill: skillA 1->Emitted(40, 5) Source(52, 6) + SourceIndex(0) -2 >Emitted(40, 22) Source(52, 11) + SourceIndex(0) -3 >Emitted(40, 37) Source(52, 22) + SourceIndex(0) -4 >Emitted(40, 39) Source(52, 24) + SourceIndex(0) -5 >Emitted(40, 56) Source(52, 37) + SourceIndex(0) +2 >Emitted(40, 9) Source(52, 6) + SourceIndex(0) +3 >Emitted(40, 20) Source(52, 39) + SourceIndex(0) +4 >Emitted(40, 22) Source(52, 11) + SourceIndex(0) +5 >Emitted(40, 37) Source(52, 22) + SourceIndex(0) +6 >Emitted(40, 39) Source(52, 24) + SourceIndex(0) +7 >Emitted(40, 56) Source(52, 37) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -1288,9 +1301,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts 26> } 27> ] 28> -29> let {name: nameA, skill: skillA } +29> [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] 30> -31> let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +31> [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] 32> ) 1->Emitted(43, 1) Source(55, 1) + SourceIndex(0) 2 >Emitted(43, 4) Source(55, 4) + SourceIndex(0) @@ -1319,28 +1332,34 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts 25>Emitted(43, 96) Source(55, 116) + SourceIndex(0) 26>Emitted(43, 98) Source(55, 118) + SourceIndex(0) 27>Emitted(43, 99) Source(55, 119) + SourceIndex(0) -28>Emitted(43, 101) Source(55, 6) + SourceIndex(0) -29>Emitted(43, 115) Source(55, 39) + SourceIndex(0) -30>Emitted(43, 117) Source(55, 6) + SourceIndex(0) +28>Emitted(43, 101) Source(55, 43) + SourceIndex(0) +29>Emitted(43, 115) Source(55, 119) + SourceIndex(0) +30>Emitted(43, 117) Source(55, 43) + SourceIndex(0) 31>Emitted(43, 121) Source(55, 119) + SourceIndex(0) 32>Emitted(43, 122) Source(55, 120) + SourceIndex(0) --- >>> var _v = _u[_t], nameA = _v.name, skillA = _v.skill; 1 >^^^^ -2 > ^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ 1 > -2 > let { -3 > name: nameA -4 > , -5 > skill: skillA +2 > +3 > let {name: nameA, skill: skillA } +4 > +5 > name: nameA +6 > , +7 > skill: skillA 1 >Emitted(44, 5) Source(55, 6) + SourceIndex(0) -2 >Emitted(44, 22) Source(55, 11) + SourceIndex(0) -3 >Emitted(44, 37) Source(55, 22) + SourceIndex(0) -4 >Emitted(44, 39) Source(55, 24) + SourceIndex(0) -5 >Emitted(44, 56) Source(55, 37) + SourceIndex(0) +2 >Emitted(44, 9) Source(55, 6) + SourceIndex(0) +3 >Emitted(44, 20) Source(55, 39) + SourceIndex(0) +4 >Emitted(44, 22) Source(55, 11) + SourceIndex(0) +5 >Emitted(44, 37) Source(55, 22) + SourceIndex(0) +6 >Emitted(44, 39) Source(55, 24) + SourceIndex(0) +7 >Emitted(44, 56) Source(55, 37) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -1399,9 +1418,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts 6 > 7 > multiRobots 8 > -9 > let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } +9 > multiRobots 10> -11> let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots +11> multiRobots 12> ) 1->Emitted(47, 1) Source(58, 1) + SourceIndex(0) 2 >Emitted(47, 4) Source(58, 4) + SourceIndex(0) @@ -1410,40 +1429,46 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts 5 >Emitted(47, 16) Source(58, 93) + SourceIndex(0) 6 >Emitted(47, 18) Source(58, 82) + SourceIndex(0) 7 >Emitted(47, 45) Source(58, 93) + SourceIndex(0) -8 >Emitted(47, 47) Source(58, 6) + SourceIndex(0) -9 >Emitted(47, 72) Source(58, 78) + SourceIndex(0) -10>Emitted(47, 74) Source(58, 6) + SourceIndex(0) +8 >Emitted(47, 47) Source(58, 82) + SourceIndex(0) +9 >Emitted(47, 72) Source(58, 93) + SourceIndex(0) +10>Emitted(47, 74) Source(58, 82) + SourceIndex(0) 11>Emitted(47, 78) Source(58, 93) + SourceIndex(0) 12>Emitted(47, 79) Source(58, 94) + SourceIndex(0) --- >>> var _x = multiRobots_2[_w], nameA = _x.name, _y = _x.skills, primaryA = _y.primary, secondaryA = _y.secondary; 1->^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > let { -3 > name: nameA -4 > , -5 > skills -6 > : { -7 > primary: primaryA -8 > , -9 > secondary: secondaryA +2 > +3 > let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } +4 > +5 > name: nameA +6 > , +7 > skills +8 > : { +9 > primary: primaryA +10> , +11> secondary: secondaryA 1->Emitted(48, 5) Source(58, 6) + SourceIndex(0) -2 >Emitted(48, 33) Source(58, 11) + SourceIndex(0) -3 >Emitted(48, 48) Source(58, 22) + SourceIndex(0) -4 >Emitted(48, 50) Source(58, 24) + SourceIndex(0) -5 >Emitted(48, 64) Source(58, 30) + SourceIndex(0) -6 >Emitted(48, 66) Source(58, 34) + SourceIndex(0) -7 >Emitted(48, 87) Source(58, 51) + SourceIndex(0) -8 >Emitted(48, 89) Source(58, 53) + SourceIndex(0) -9 >Emitted(48, 114) Source(58, 74) + SourceIndex(0) +2 >Emitted(48, 9) Source(58, 6) + SourceIndex(0) +3 >Emitted(48, 31) Source(58, 78) + SourceIndex(0) +4 >Emitted(48, 33) Source(58, 11) + SourceIndex(0) +5 >Emitted(48, 48) Source(58, 22) + SourceIndex(0) +6 >Emitted(48, 50) Source(58, 24) + SourceIndex(0) +7 >Emitted(48, 64) Source(58, 30) + SourceIndex(0) +8 >Emitted(48, 66) Source(58, 34) + SourceIndex(0) +9 >Emitted(48, 87) Source(58, 51) + SourceIndex(0) +10>Emitted(48, 89) Source(58, 53) + SourceIndex(0) +11>Emitted(48, 114) Source(58, 74) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -1506,9 +1531,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts 8 > getMultiRobots 9 > () 10> -11> let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } +11> getMultiRobots() 12> -13> let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots() +13> getMultiRobots() 14> ) 1->Emitted(51, 1) Source(61, 1) + SourceIndex(0) 2 >Emitted(51, 4) Source(61, 4) + SourceIndex(0) @@ -1519,40 +1544,46 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts 7 >Emitted(51, 23) Source(61, 82) + SourceIndex(0) 8 >Emitted(51, 37) Source(61, 96) + SourceIndex(0) 9 >Emitted(51, 39) Source(61, 98) + SourceIndex(0) -10>Emitted(51, 41) Source(61, 6) + SourceIndex(0) -11>Emitted(51, 55) Source(61, 78) + SourceIndex(0) -12>Emitted(51, 57) Source(61, 6) + SourceIndex(0) +10>Emitted(51, 41) Source(61, 82) + SourceIndex(0) +11>Emitted(51, 55) Source(61, 98) + SourceIndex(0) +12>Emitted(51, 57) Source(61, 82) + SourceIndex(0) 13>Emitted(51, 61) Source(61, 98) + SourceIndex(0) 14>Emitted(51, 62) Source(61, 99) + SourceIndex(0) --- >>> var _1 = _0[_z], nameA = _1.name, _2 = _1.skills, primaryA = _2.primary, secondaryA = _2.secondary; 1->^^^^ -2 > ^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > let { -3 > name: nameA -4 > , -5 > skills -6 > : { -7 > primary: primaryA -8 > , -9 > secondary: secondaryA +2 > +3 > let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } +4 > +5 > name: nameA +6 > , +7 > skills +8 > : { +9 > primary: primaryA +10> , +11> secondary: secondaryA 1->Emitted(52, 5) Source(61, 6) + SourceIndex(0) -2 >Emitted(52, 22) Source(61, 11) + SourceIndex(0) -3 >Emitted(52, 37) Source(61, 22) + SourceIndex(0) -4 >Emitted(52, 39) Source(61, 24) + SourceIndex(0) -5 >Emitted(52, 53) Source(61, 30) + SourceIndex(0) -6 >Emitted(52, 55) Source(61, 34) + SourceIndex(0) -7 >Emitted(52, 76) Source(61, 51) + SourceIndex(0) -8 >Emitted(52, 78) Source(61, 53) + SourceIndex(0) -9 >Emitted(52, 103) Source(61, 74) + SourceIndex(0) +2 >Emitted(52, 9) Source(61, 6) + SourceIndex(0) +3 >Emitted(52, 20) Source(61, 78) + SourceIndex(0) +4 >Emitted(52, 22) Source(61, 11) + SourceIndex(0) +5 >Emitted(52, 37) Source(61, 22) + SourceIndex(0) +6 >Emitted(52, 39) Source(61, 24) + SourceIndex(0) +7 >Emitted(52, 53) Source(61, 30) + SourceIndex(0) +8 >Emitted(52, 55) Source(61, 34) + SourceIndex(0) +9 >Emitted(52, 76) Source(61, 51) + SourceIndex(0) +10>Emitted(52, 78) Source(61, 53) + SourceIndex(0) +11>Emitted(52, 103) Source(61, 74) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -1712,9 +1743,10 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts 18> } 19> ] 20> -21> let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } +21> [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] 22> -23> let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +23> [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] 24> ) 1->Emitted(56, 5) Source(65, 5) + SourceIndex(0) @@ -1736,40 +1768,46 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts 17>Emitted(56, 76) Source(65, 76) + SourceIndex(0) 18>Emitted(56, 78) Source(65, 78) + SourceIndex(0) 19>Emitted(56, 79) Source(65, 79) + SourceIndex(0) -20>Emitted(56, 81) Source(64, 6) + SourceIndex(0) -21>Emitted(56, 95) Source(64, 78) + SourceIndex(0) -22>Emitted(56, 97) Source(64, 6) + SourceIndex(0) +20>Emitted(56, 81) Source(64, 82) + SourceIndex(0) +21>Emitted(56, 95) Source(65, 79) + SourceIndex(0) +22>Emitted(56, 97) Source(64, 82) + SourceIndex(0) 23>Emitted(56, 101) Source(65, 79) + SourceIndex(0) 24>Emitted(56, 102) Source(65, 80) + SourceIndex(0) --- >>> var _5 = _4[_3], nameA = _5.name, _6 = _5.skills, primaryA = _6.primary, secondaryA = _6.secondary; 1->^^^^ -2 > ^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > let { -3 > name: nameA -4 > , -5 > skills -6 > : { -7 > primary: primaryA -8 > , -9 > secondary: secondaryA +2 > +3 > let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } +4 > +5 > name: nameA +6 > , +7 > skills +8 > : { +9 > primary: primaryA +10> , +11> secondary: secondaryA 1->Emitted(57, 5) Source(64, 6) + SourceIndex(0) -2 >Emitted(57, 22) Source(64, 11) + SourceIndex(0) -3 >Emitted(57, 37) Source(64, 22) + SourceIndex(0) -4 >Emitted(57, 39) Source(64, 24) + SourceIndex(0) -5 >Emitted(57, 53) Source(64, 30) + SourceIndex(0) -6 >Emitted(57, 55) Source(64, 34) + SourceIndex(0) -7 >Emitted(57, 76) Source(64, 51) + SourceIndex(0) -8 >Emitted(57, 78) Source(64, 53) + SourceIndex(0) -9 >Emitted(57, 103) Source(64, 74) + SourceIndex(0) +2 >Emitted(57, 9) Source(64, 6) + SourceIndex(0) +3 >Emitted(57, 20) Source(64, 78) + SourceIndex(0) +4 >Emitted(57, 22) Source(64, 11) + SourceIndex(0) +5 >Emitted(57, 37) Source(64, 22) + SourceIndex(0) +6 >Emitted(57, 39) Source(64, 24) + SourceIndex(0) +7 >Emitted(57, 53) Source(64, 30) + SourceIndex(0) +8 >Emitted(57, 55) Source(64, 34) + SourceIndex(0) +9 >Emitted(57, 76) Source(64, 51) + SourceIndex(0) +10>Emitted(57, 78) Source(64, 53) + SourceIndex(0) +11>Emitted(57, 103) Source(64, 74) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ From d8701c437cc8d8d22dd7763ca47c814375d37677 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 8 Dec 2015 14:12:04 -0800 Subject: [PATCH 027/209] Test case for For Of statement with array binding pattern --- ...onDestructuringForOfArrayBindingPattern.js | 207 ++ ...structuringForOfArrayBindingPattern.js.map | 2 + ...ringForOfArrayBindingPattern.sourcemap.txt | 2733 +++++++++++++++++ ...tructuringForOfArrayBindingPattern.symbols | 323 ++ ...estructuringForOfArrayBindingPattern.types | 389 +++ ...onDestructuringForOfArrayBindingPattern.ts | 96 + 6 files changed, 3750 insertions(+) create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.types create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPattern.ts diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.js b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.js new file mode 100644 index 00000000000..daf39ece7be --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.js @@ -0,0 +1,207 @@ +//// [sourceMapValidationDestructuringForOfArrayBindingPattern.ts] +declare var console: { + log(msg: any): void; +} +type Robot = [number, string, string]; +type MultiSkilledRobot = [string, [string, string]]; + +let robotA: Robot = [1, "mower", "mowing"]; +let robotB: Robot = [2, "trimmer", "trimming"]; +let robots = [robotA, robotB]; +function getRobots() { + return robots; +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +let multiRobots = [multiRobotA, multiRobotB]; +function getMultiRobots() { + return multiRobots; +} + +for (let [, nameA] of robots) { + console.log(nameA); +} +for (let [, nameA] of getRobots()) { + console.log(nameA); +} +for (let [, nameA] of [robotA, robotB]) { + console.log(nameA); +} +for (let [, [primarySkillA, secondarySkillA]] of multiRobots) { + console.log(primarySkillA); +} +for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + console.log(primarySkillA); +} +for (let [, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + console.log(primarySkillA); +} + +for (let [numberB] of robots) { + console.log(numberB); +} +for (let [numberB] of getRobots()) { + console.log(numberB); +} +for (let [numberB] of [robotA, robotB]) { + console.log(numberB); +} +for (let [nameB] of multiRobots) { + console.log(nameB); +} +for (let [nameB] of getMultiRobots()) { + console.log(nameB); +} +for (let [nameB] of [multiRobotA, multiRobotB]) { + console.log(nameB); +} + +for (let [numberA2, nameA2, skillA2] of robots) { + console.log(nameA2); +} +for (let [numberA2, nameA2, skillA2] of getRobots()) { + console.log(nameA2); +} +for (let [numberA2, nameA2, skillA2] of [robotA, robotB]) { + console.log(nameA2); +} +for (let [nameMA, [primarySkillA, secondarySkillA]] of multiRobots) { + console.log(nameMA); +} +for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + console.log(nameMA); +} +for (let [nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + console.log(nameMA); +} + +for (let [numberA3, ...robotAInfo] of robots) { + console.log(numberA3); +} +for (let [numberA3, ...robotAInfo] of getRobots()) { + console.log(numberA3); +} +for (let [numberA3, ...robotAInfo] of [robotA, robotB]) { + console.log(numberA3); +} +for (let [...multiRobotAInfo] of multiRobots) { + console.log(multiRobotAInfo); +} +for (let [...multiRobotAInfo] of getMultiRobots()) { + console.log(multiRobotAInfo); +} +for (let [...multiRobotAInfo] of [multiRobotA, multiRobotB]) { + console.log(multiRobotAInfo); +} + +//// [sourceMapValidationDestructuringForOfArrayBindingPattern.js] +var robotA = [1, "mower", "mowing"]; +var robotB = [2, "trimmer", "trimming"]; +var robots = [robotA, robotB]; +function getRobots() { + return robots; +} +var multiRobotA = ["mower", ["mowing", ""]]; +var multiRobotB = ["trimmer", ["trimming", "edging"]]; +var multiRobots = [multiRobotA, multiRobotB]; +function getMultiRobots() { + return multiRobots; +} +for (var _i = 0, robots_1 = robots; _i < robots_1.length; _i++) { + var _a = robots_1[_i], nameA = _a[1]; + console.log(nameA); +} +for (var _b = 0, _c = getRobots(); _b < _c.length; _b++) { + var _d = _c[_b], nameA = _d[1]; + console.log(nameA); +} +for (var _e = 0, _f = [robotA, robotB]; _e < _f.length; _e++) { + var _g = _f[_e], nameA = _g[1]; + console.log(nameA); +} +for (var _h = 0, multiRobots_1 = multiRobots; _h < multiRobots_1.length; _h++) { + var _j = multiRobots_1[_h], _k = _j[1], primarySkillA = _k[0], secondarySkillA = _k[1]; + console.log(primarySkillA); +} +for (var _l = 0, _m = getMultiRobots(); _l < _m.length; _l++) { + var _o = _m[_l], _p = _o[1], primarySkillA = _p[0], secondarySkillA = _p[1]; + console.log(primarySkillA); +} +for (var _q = 0, _r = [multiRobotA, multiRobotB]; _q < _r.length; _q++) { + var _s = _r[_q], _t = _s[1], primarySkillA = _t[0], secondarySkillA = _t[1]; + console.log(primarySkillA); +} +for (var _u = 0, robots_2 = robots; _u < robots_2.length; _u++) { + var numberB = robots_2[_u][0]; + console.log(numberB); +} +for (var _v = 0, _w = getRobots(); _v < _w.length; _v++) { + var numberB = _w[_v][0]; + console.log(numberB); +} +for (var _x = 0, _y = [robotA, robotB]; _x < _y.length; _x++) { + var numberB = _y[_x][0]; + console.log(numberB); +} +for (var _z = 0, multiRobots_2 = multiRobots; _z < multiRobots_2.length; _z++) { + var nameB = multiRobots_2[_z][0]; + console.log(nameB); +} +for (var _0 = 0, _1 = getMultiRobots(); _0 < _1.length; _0++) { + var nameB = _1[_0][0]; + console.log(nameB); +} +for (var _2 = 0, _3 = [multiRobotA, multiRobotB]; _2 < _3.length; _2++) { + var nameB = _3[_2][0]; + console.log(nameB); +} +for (var _4 = 0, robots_3 = robots; _4 < robots_3.length; _4++) { + var _5 = robots_3[_4], numberA2 = _5[0], nameA2 = _5[1], skillA2 = _5[2]; + console.log(nameA2); +} +for (var _6 = 0, _7 = getRobots(); _6 < _7.length; _6++) { + var _8 = _7[_6], numberA2 = _8[0], nameA2 = _8[1], skillA2 = _8[2]; + console.log(nameA2); +} +for (var _9 = 0, _10 = [robotA, robotB]; _9 < _10.length; _9++) { + var _11 = _10[_9], numberA2 = _11[0], nameA2 = _11[1], skillA2 = _11[2]; + console.log(nameA2); +} +for (var _12 = 0, multiRobots_3 = multiRobots; _12 < multiRobots_3.length; _12++) { + var _13 = multiRobots_3[_12], nameMA = _13[0], _14 = _13[1], primarySkillA = _14[0], secondarySkillA = _14[1]; + console.log(nameMA); +} +for (var _15 = 0, _16 = getMultiRobots(); _15 < _16.length; _15++) { + var _17 = _16[_15], nameMA = _17[0], _18 = _17[1], primarySkillA = _18[0], secondarySkillA = _18[1]; + console.log(nameMA); +} +for (var _19 = 0, _20 = [multiRobotA, multiRobotB]; _19 < _20.length; _19++) { + var _21 = _20[_19], nameMA = _21[0], _22 = _21[1], primarySkillA = _22[0], secondarySkillA = _22[1]; + console.log(nameMA); +} +for (var _23 = 0, robots_4 = robots; _23 < robots_4.length; _23++) { + var _24 = robots_4[_23], numberA3 = _24[0], robotAInfo = _24.slice(1); + console.log(numberA3); +} +for (var _25 = 0, _26 = getRobots(); _25 < _26.length; _25++) { + var _27 = _26[_25], numberA3 = _27[0], robotAInfo = _27.slice(1); + console.log(numberA3); +} +for (var _28 = 0, _29 = [robotA, robotB]; _28 < _29.length; _28++) { + var _30 = _29[_28], numberA3 = _30[0], robotAInfo = _30.slice(1); + console.log(numberA3); +} +for (var _31 = 0, multiRobots_4 = multiRobots; _31 < multiRobots_4.length; _31++) { + var multiRobotAInfo = multiRobots_4[_31].slice(0); + console.log(multiRobotAInfo); +} +for (var _32 = 0, _33 = getMultiRobots(); _32 < _33.length; _32++) { + var multiRobotAInfo = _33[_32].slice(0); + console.log(multiRobotAInfo); +} +for (var _34 = 0, _35 = [multiRobotA, multiRobotB]; _34 < _35.length; _34++) { + var multiRobotAInfo = _35[_34].slice(0); + console.log(multiRobotAInfo); +} +//# sourceMappingURL=sourceMapValidationDestructuringForOfArrayBindingPattern.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.js.map new file mode 100644 index 00000000000..a49d45f78b8 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringForOfArrayBindingPattern.js.map] +{"version":3,"file":"sourceMapValidationDestructuringForOfArrayBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForOfArrayBindingPattern.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAC/C,IAAI,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9B;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED,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;AACzE,IAAI,WAAW,GAAG,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAC7C;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,GAAG,CAAC,CAAkB,UAAM,EAAN,iBAAM,EAAN,oBAAM,EAAN,IAAM,CAAC;IAAxB,IAAA,iBAAa,EAAT,aAAS;IACd,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAAkB,UAAW,EAAX,KAAA,SAAS,EAAE,EAAX,cAAW,EAAX,IAAW,CAAC;IAA7B,IAAA,WAAa,EAAT,aAAS;IACd,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAAkB,UAAgB,EAAhB,MAAC,MAAM,EAAE,MAAM,CAAC,EAAhB,cAAgB,EAAhB,IAAgB,CAAC;IAAlC,IAAA,WAAa,EAAT,aAAS;IACd,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAA6C,U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IACzB,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;CAChC;AACD,GAAG,CAAC,CAA6B,WAA0B,EAA1B,OAAC,WAAW,EAAE,WAAW,CAAC,EAA1B,gBAA0B,EAA1B,KAA0B,CAAC;IAAvD,IAAI,mCAAoB;IACzB,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;CAChC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.sourcemap.txt new file mode 100644 index 00000000000..4ca415fdaee --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.sourcemap.txt @@ -0,0 +1,2733 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringForOfArrayBindingPattern.js +mapUrl: sourceMapValidationDestructuringForOfArrayBindingPattern.js.map +sourceRoot: +sources: sourceMapValidationDestructuringForOfArrayBindingPattern.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPattern.js +sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts +------------------------------------------------------------------- +>>>var robotA = [1, "mower", "mowing"]; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^^^^ +11> ^ +12> ^ +13> ^^^^^-> +1 >declare var console: { + > log(msg: any): void; + >} + >type Robot = [number, string, string]; + >type MultiSkilledRobot = [string, [string, string]]; + > + > +2 >let +3 > robotA +4 > : Robot = +5 > [ +6 > 1 +7 > , +8 > "mower" +9 > , +10> "mowing" +11> ] +12> ; +1 >Emitted(1, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(7, 5) + SourceIndex(0) +3 >Emitted(1, 11) Source(7, 11) + SourceIndex(0) +4 >Emitted(1, 14) Source(7, 21) + SourceIndex(0) +5 >Emitted(1, 15) Source(7, 22) + SourceIndex(0) +6 >Emitted(1, 16) Source(7, 23) + SourceIndex(0) +7 >Emitted(1, 18) Source(7, 25) + SourceIndex(0) +8 >Emitted(1, 25) Source(7, 32) + SourceIndex(0) +9 >Emitted(1, 27) Source(7, 34) + SourceIndex(0) +10>Emitted(1, 35) Source(7, 42) + SourceIndex(0) +11>Emitted(1, 36) Source(7, 43) + SourceIndex(0) +12>Emitted(1, 37) Source(7, 44) + SourceIndex(0) +--- +>>>var robotB = [2, "trimmer", "trimming"]; +1-> +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^ +11> ^ +12> ^ +1-> + > +2 >let +3 > robotB +4 > : Robot = +5 > [ +6 > 2 +7 > , +8 > "trimmer" +9 > , +10> "trimming" +11> ] +12> ; +1->Emitted(2, 1) Source(8, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(8, 5) + SourceIndex(0) +3 >Emitted(2, 11) Source(8, 11) + SourceIndex(0) +4 >Emitted(2, 14) Source(8, 21) + SourceIndex(0) +5 >Emitted(2, 15) Source(8, 22) + SourceIndex(0) +6 >Emitted(2, 16) Source(8, 23) + SourceIndex(0) +7 >Emitted(2, 18) Source(8, 25) + SourceIndex(0) +8 >Emitted(2, 27) Source(8, 34) + SourceIndex(0) +9 >Emitted(2, 29) Source(8, 36) + SourceIndex(0) +10>Emitted(2, 39) Source(8, 46) + SourceIndex(0) +11>Emitted(2, 40) Source(8, 47) + SourceIndex(0) +12>Emitted(2, 41) Source(8, 48) + SourceIndex(0) +--- +>>>var robots = [robotA, robotB]; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^^ +8 > ^^^^^^ +9 > ^ +10> ^ +1 > + > +2 >let +3 > robots +4 > = +5 > [ +6 > robotA +7 > , +8 > robotB +9 > ] +10> ; +1 >Emitted(3, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(9, 5) + SourceIndex(0) +3 >Emitted(3, 11) Source(9, 11) + SourceIndex(0) +4 >Emitted(3, 14) Source(9, 14) + SourceIndex(0) +5 >Emitted(3, 15) Source(9, 15) + SourceIndex(0) +6 >Emitted(3, 21) Source(9, 21) + SourceIndex(0) +7 >Emitted(3, 23) Source(9, 23) + SourceIndex(0) +8 >Emitted(3, 29) Source(9, 29) + SourceIndex(0) +9 >Emitted(3, 30) Source(9, 30) + SourceIndex(0) +10>Emitted(3, 31) Source(9, 31) + SourceIndex(0) +--- +>>>function getRobots() { +1 > +2 >^^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(4, 1) Source(10, 1) + SourceIndex(0) +--- +>>> return robots; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +1->function getRobots() { + > +2 > return +3 > +4 > robots +5 > ; +1->Emitted(5, 5) Source(11, 5) + SourceIndex(0) +2 >Emitted(5, 11) Source(11, 11) + SourceIndex(0) +3 >Emitted(5, 12) Source(11, 12) + SourceIndex(0) +4 >Emitted(5, 18) Source(11, 18) + SourceIndex(0) +5 >Emitted(5, 19) Source(11, 19) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(6, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(12, 2) + SourceIndex(0) +--- +>>>var multiRobotA = ["mower", ["mowing", ""]]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^ +10> ^^ +11> ^^ +12> ^ +13> ^ +14> ^ +15> ^^^^^^^^^^^-> +1-> + > + > +2 >let +3 > multiRobotA +4 > : MultiSkilledRobot = +5 > [ +6 > "mower" +7 > , +8 > [ +9 > "mowing" +10> , +11> "" +12> ] +13> ] +14> ; +1->Emitted(7, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(7, 5) Source(14, 5) + SourceIndex(0) +3 >Emitted(7, 16) Source(14, 16) + SourceIndex(0) +4 >Emitted(7, 19) Source(14, 38) + SourceIndex(0) +5 >Emitted(7, 20) Source(14, 39) + SourceIndex(0) +6 >Emitted(7, 27) Source(14, 46) + SourceIndex(0) +7 >Emitted(7, 29) Source(14, 48) + SourceIndex(0) +8 >Emitted(7, 30) Source(14, 49) + SourceIndex(0) +9 >Emitted(7, 38) Source(14, 57) + SourceIndex(0) +10>Emitted(7, 40) Source(14, 59) + SourceIndex(0) +11>Emitted(7, 42) Source(14, 61) + SourceIndex(0) +12>Emitted(7, 43) Source(14, 62) + SourceIndex(0) +13>Emitted(7, 44) Source(14, 63) + SourceIndex(0) +14>Emitted(7, 45) Source(14, 64) + SourceIndex(0) +--- +>>>var multiRobotB = ["trimmer", ["trimming", "edging"]]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^ +12> ^ +13> ^ +14> ^ +1-> + > +2 >let +3 > multiRobotB +4 > : MultiSkilledRobot = +5 > [ +6 > "trimmer" +7 > , +8 > [ +9 > "trimming" +10> , +11> "edging" +12> ] +13> ] +14> ; +1->Emitted(8, 1) Source(15, 1) + SourceIndex(0) +2 >Emitted(8, 5) Source(15, 5) + SourceIndex(0) +3 >Emitted(8, 16) Source(15, 16) + SourceIndex(0) +4 >Emitted(8, 19) Source(15, 38) + SourceIndex(0) +5 >Emitted(8, 20) Source(15, 39) + SourceIndex(0) +6 >Emitted(8, 29) Source(15, 48) + SourceIndex(0) +7 >Emitted(8, 31) Source(15, 50) + SourceIndex(0) +8 >Emitted(8, 32) Source(15, 51) + SourceIndex(0) +9 >Emitted(8, 42) Source(15, 61) + SourceIndex(0) +10>Emitted(8, 44) Source(15, 63) + SourceIndex(0) +11>Emitted(8, 52) Source(15, 71) + SourceIndex(0) +12>Emitted(8, 53) Source(15, 72) + SourceIndex(0) +13>Emitted(8, 54) Source(15, 73) + SourceIndex(0) +14>Emitted(8, 55) Source(15, 74) + SourceIndex(0) +--- +>>>var multiRobots = [multiRobotA, multiRobotB]; +1 > +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^ +9 > ^ +10> ^ +1 > + > +2 >let +3 > multiRobots +4 > = +5 > [ +6 > multiRobotA +7 > , +8 > multiRobotB +9 > ] +10> ; +1 >Emitted(9, 1) Source(16, 1) + SourceIndex(0) +2 >Emitted(9, 5) Source(16, 5) + SourceIndex(0) +3 >Emitted(9, 16) Source(16, 16) + SourceIndex(0) +4 >Emitted(9, 19) Source(16, 19) + SourceIndex(0) +5 >Emitted(9, 20) Source(16, 20) + SourceIndex(0) +6 >Emitted(9, 31) Source(16, 31) + SourceIndex(0) +7 >Emitted(9, 33) Source(16, 33) + SourceIndex(0) +8 >Emitted(9, 44) Source(16, 44) + SourceIndex(0) +9 >Emitted(9, 45) Source(16, 45) + SourceIndex(0) +10>Emitted(9, 46) Source(16, 46) + SourceIndex(0) +--- +>>>function getMultiRobots() { +1 > +2 >^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(10, 1) Source(17, 1) + SourceIndex(0) +--- +>>> return multiRobots; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^ +5 > ^ +1->function getMultiRobots() { + > +2 > return +3 > +4 > multiRobots +5 > ; +1->Emitted(11, 5) Source(18, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(18, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(18, 12) + SourceIndex(0) +4 >Emitted(11, 23) Source(18, 23) + SourceIndex(0) +5 >Emitted(11, 24) Source(18, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(12, 1) Source(19, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(19, 2) + SourceIndex(0) +--- +>>>for (var _i = 0, robots_1 = robots; _i < robots_1.length; _i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +1-> + > + > +2 >for +3 > +4 > (let [, nameA] of +5 > robots +6 > +7 > robots +8 > +9 > robots +10> +11> robots +12> ) +1->Emitted(13, 1) Source(21, 1) + SourceIndex(0) +2 >Emitted(13, 4) Source(21, 4) + SourceIndex(0) +3 >Emitted(13, 5) Source(21, 5) + SourceIndex(0) +4 >Emitted(13, 6) Source(21, 23) + SourceIndex(0) +5 >Emitted(13, 16) Source(21, 29) + SourceIndex(0) +6 >Emitted(13, 18) Source(21, 23) + SourceIndex(0) +7 >Emitted(13, 35) Source(21, 29) + SourceIndex(0) +8 >Emitted(13, 37) Source(21, 23) + SourceIndex(0) +9 >Emitted(13, 57) Source(21, 29) + SourceIndex(0) +10>Emitted(13, 59) Source(21, 23) + SourceIndex(0) +11>Emitted(13, 63) Source(21, 29) + SourceIndex(0) +12>Emitted(13, 64) Source(21, 30) + SourceIndex(0) +--- +>>> var _a = robots_1[_i], nameA = _a[1]; +1 >^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^ +1 > +2 > +3 > let [, nameA] +4 > +5 > [, nameA] +1 >Emitted(14, 5) Source(21, 6) + SourceIndex(0) +2 >Emitted(14, 9) Source(21, 6) + SourceIndex(0) +3 >Emitted(14, 26) Source(21, 19) + SourceIndex(0) +4 >Emitted(14, 28) Source(21, 10) + SourceIndex(0) +5 >Emitted(14, 41) Source(21, 19) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(15, 5) Source(22, 5) + SourceIndex(0) +2 >Emitted(15, 12) Source(22, 12) + SourceIndex(0) +3 >Emitted(15, 13) Source(22, 13) + SourceIndex(0) +4 >Emitted(15, 16) Source(22, 16) + SourceIndex(0) +5 >Emitted(15, 17) Source(22, 17) + SourceIndex(0) +6 >Emitted(15, 22) Source(22, 22) + SourceIndex(0) +7 >Emitted(15, 23) Source(22, 23) + SourceIndex(0) +8 >Emitted(15, 24) Source(22, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(16, 2) Source(23, 2) + SourceIndex(0) +--- +>>>for (var _b = 0, _c = getRobots(); _b < _c.length; _b++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +1-> + > +2 >for +3 > +4 > (let [, nameA] of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> getRobots() +12> +13> getRobots() +14> ) +1->Emitted(17, 1) Source(24, 1) + SourceIndex(0) +2 >Emitted(17, 4) Source(24, 4) + SourceIndex(0) +3 >Emitted(17, 5) Source(24, 5) + SourceIndex(0) +4 >Emitted(17, 6) Source(24, 23) + SourceIndex(0) +5 >Emitted(17, 16) Source(24, 34) + SourceIndex(0) +6 >Emitted(17, 18) Source(24, 23) + SourceIndex(0) +7 >Emitted(17, 23) Source(24, 23) + SourceIndex(0) +8 >Emitted(17, 32) Source(24, 32) + SourceIndex(0) +9 >Emitted(17, 34) Source(24, 34) + SourceIndex(0) +10>Emitted(17, 36) Source(24, 23) + SourceIndex(0) +11>Emitted(17, 50) Source(24, 34) + SourceIndex(0) +12>Emitted(17, 52) Source(24, 23) + SourceIndex(0) +13>Emitted(17, 56) Source(24, 34) + SourceIndex(0) +14>Emitted(17, 57) Source(24, 35) + SourceIndex(0) +--- +>>> var _d = _c[_b], nameA = _d[1]; +1 >^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^ +1 > +2 > +3 > let [, nameA] +4 > +5 > [, nameA] +1 >Emitted(18, 5) Source(24, 6) + SourceIndex(0) +2 >Emitted(18, 9) Source(24, 6) + SourceIndex(0) +3 >Emitted(18, 20) Source(24, 19) + SourceIndex(0) +4 >Emitted(18, 22) Source(24, 10) + SourceIndex(0) +5 >Emitted(18, 35) Source(24, 19) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(19, 5) Source(25, 5) + SourceIndex(0) +2 >Emitted(19, 12) Source(25, 12) + SourceIndex(0) +3 >Emitted(19, 13) Source(25, 13) + SourceIndex(0) +4 >Emitted(19, 16) Source(25, 16) + SourceIndex(0) +5 >Emitted(19, 17) Source(25, 17) + SourceIndex(0) +6 >Emitted(19, 22) Source(25, 22) + SourceIndex(0) +7 >Emitted(19, 23) Source(25, 23) + SourceIndex(0) +8 >Emitted(19, 24) Source(25, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(20, 2) Source(26, 2) + SourceIndex(0) +--- +>>>for (var _e = 0, _f = [robotA, robotB]; _e < _f.length; _e++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^ +16> ^ +1-> + > +2 >for +3 > +4 > (let [, nameA] of +5 > [robotA, robotB] +6 > +7 > [ +8 > robotA +9 > , +10> robotB +11> ] +12> +13> [robotA, robotB] +14> +15> [robotA, robotB] +16> ) +1->Emitted(21, 1) Source(27, 1) + SourceIndex(0) +2 >Emitted(21, 4) Source(27, 4) + SourceIndex(0) +3 >Emitted(21, 5) Source(27, 5) + SourceIndex(0) +4 >Emitted(21, 6) Source(27, 23) + SourceIndex(0) +5 >Emitted(21, 16) Source(27, 39) + SourceIndex(0) +6 >Emitted(21, 18) Source(27, 23) + SourceIndex(0) +7 >Emitted(21, 24) Source(27, 24) + SourceIndex(0) +8 >Emitted(21, 30) Source(27, 30) + SourceIndex(0) +9 >Emitted(21, 32) Source(27, 32) + SourceIndex(0) +10>Emitted(21, 38) Source(27, 38) + SourceIndex(0) +11>Emitted(21, 39) Source(27, 39) + SourceIndex(0) +12>Emitted(21, 41) Source(27, 23) + SourceIndex(0) +13>Emitted(21, 55) Source(27, 39) + SourceIndex(0) +14>Emitted(21, 57) Source(27, 23) + SourceIndex(0) +15>Emitted(21, 61) Source(27, 39) + SourceIndex(0) +16>Emitted(21, 62) Source(27, 40) + SourceIndex(0) +--- +>>> var _g = _f[_e], nameA = _g[1]; +1 >^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^ +1 > +2 > +3 > let [, nameA] +4 > +5 > [, nameA] +1 >Emitted(22, 5) Source(27, 6) + SourceIndex(0) +2 >Emitted(22, 9) Source(27, 6) + SourceIndex(0) +3 >Emitted(22, 20) Source(27, 19) + SourceIndex(0) +4 >Emitted(22, 22) Source(27, 10) + SourceIndex(0) +5 >Emitted(22, 35) Source(27, 19) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > of [robotA, robotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(23, 5) Source(28, 5) + SourceIndex(0) +2 >Emitted(23, 12) Source(28, 12) + SourceIndex(0) +3 >Emitted(23, 13) Source(28, 13) + SourceIndex(0) +4 >Emitted(23, 16) Source(28, 16) + SourceIndex(0) +5 >Emitted(23, 17) Source(28, 17) + SourceIndex(0) +6 >Emitted(23, 22) Source(28, 22) + SourceIndex(0) +7 >Emitted(23, 23) Source(28, 23) + SourceIndex(0) +8 >Emitted(23, 24) Source(28, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(24, 2) Source(29, 2) + SourceIndex(0) +--- +>>>for (var _h = 0, multiRobots_1 = multiRobots; _h < multiRobots_1.length; _h++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +13> ^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let [, [primarySkillA, secondarySkillA]] of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > multiRobots +10> +11> multiRobots +12> ) +1->Emitted(25, 1) Source(30, 1) + SourceIndex(0) +2 >Emitted(25, 4) Source(30, 4) + SourceIndex(0) +3 >Emitted(25, 5) Source(30, 5) + SourceIndex(0) +4 >Emitted(25, 6) Source(30, 50) + SourceIndex(0) +5 >Emitted(25, 16) Source(30, 61) + SourceIndex(0) +6 >Emitted(25, 18) Source(30, 50) + SourceIndex(0) +7 >Emitted(25, 45) Source(30, 61) + SourceIndex(0) +8 >Emitted(25, 47) Source(30, 50) + SourceIndex(0) +9 >Emitted(25, 72) Source(30, 61) + SourceIndex(0) +10>Emitted(25, 74) Source(30, 50) + SourceIndex(0) +11>Emitted(25, 78) Source(30, 61) + SourceIndex(0) +12>Emitted(25, 79) Source(30, 62) + SourceIndex(0) +--- +>>> var _j = multiRobots_1[_h], _k = _j[1], primarySkillA = _k[0], secondarySkillA = _k[1]; +1->^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > +3 > let [, [primarySkillA, secondarySkillA]] +4 > +5 > [primarySkillA, secondarySkillA] +6 > +7 > primarySkillA +8 > , +9 > secondarySkillA +1->Emitted(26, 5) Source(30, 6) + SourceIndex(0) +2 >Emitted(26, 9) Source(30, 6) + SourceIndex(0) +3 >Emitted(26, 31) Source(30, 46) + SourceIndex(0) +4 >Emitted(26, 33) Source(30, 13) + SourceIndex(0) +5 >Emitted(26, 43) Source(30, 45) + SourceIndex(0) +6 >Emitted(26, 45) Source(30, 14) + SourceIndex(0) +7 >Emitted(26, 66) Source(30, 27) + SourceIndex(0) +8 >Emitted(26, 68) Source(30, 29) + SourceIndex(0) +9 >Emitted(26, 91) Source(30, 44) + SourceIndex(0) +--- +>>> console.log(primarySkillA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 >]] of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primarySkillA +7 > ) +8 > ; +1 >Emitted(27, 5) Source(31, 5) + SourceIndex(0) +2 >Emitted(27, 12) Source(31, 12) + SourceIndex(0) +3 >Emitted(27, 13) Source(31, 13) + SourceIndex(0) +4 >Emitted(27, 16) Source(31, 16) + SourceIndex(0) +5 >Emitted(27, 17) Source(31, 17) + SourceIndex(0) +6 >Emitted(27, 30) Source(31, 30) + SourceIndex(0) +7 >Emitted(27, 31) Source(31, 31) + SourceIndex(0) +8 >Emitted(27, 32) Source(31, 32) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(28, 2) Source(32, 2) + SourceIndex(0) +--- +>>>for (var _l = 0, _m = getMultiRobots(); _l < _m.length; _l++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let [, [primarySkillA, secondarySkillA]] of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> getMultiRobots() +12> +13> getMultiRobots() +14> ) +1->Emitted(29, 1) Source(33, 1) + SourceIndex(0) +2 >Emitted(29, 4) Source(33, 4) + SourceIndex(0) +3 >Emitted(29, 5) Source(33, 5) + SourceIndex(0) +4 >Emitted(29, 6) Source(33, 50) + SourceIndex(0) +5 >Emitted(29, 16) Source(33, 66) + SourceIndex(0) +6 >Emitted(29, 18) Source(33, 50) + SourceIndex(0) +7 >Emitted(29, 23) Source(33, 50) + SourceIndex(0) +8 >Emitted(29, 37) Source(33, 64) + SourceIndex(0) +9 >Emitted(29, 39) Source(33, 66) + SourceIndex(0) +10>Emitted(29, 41) Source(33, 50) + SourceIndex(0) +11>Emitted(29, 55) Source(33, 66) + SourceIndex(0) +12>Emitted(29, 57) Source(33, 50) + SourceIndex(0) +13>Emitted(29, 61) Source(33, 66) + SourceIndex(0) +14>Emitted(29, 62) Source(33, 67) + SourceIndex(0) +--- +>>> var _o = _m[_l], _p = _o[1], primarySkillA = _p[0], secondarySkillA = _p[1]; +1->^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > +3 > let [, [primarySkillA, secondarySkillA]] +4 > +5 > [primarySkillA, secondarySkillA] +6 > +7 > primarySkillA +8 > , +9 > secondarySkillA +1->Emitted(30, 5) Source(33, 6) + SourceIndex(0) +2 >Emitted(30, 9) Source(33, 6) + SourceIndex(0) +3 >Emitted(30, 20) Source(33, 46) + SourceIndex(0) +4 >Emitted(30, 22) Source(33, 13) + SourceIndex(0) +5 >Emitted(30, 32) Source(33, 45) + SourceIndex(0) +6 >Emitted(30, 34) Source(33, 14) + SourceIndex(0) +7 >Emitted(30, 55) Source(33, 27) + SourceIndex(0) +8 >Emitted(30, 57) Source(33, 29) + SourceIndex(0) +9 >Emitted(30, 80) Source(33, 44) + SourceIndex(0) +--- +>>> console.log(primarySkillA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 >]] of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primarySkillA +7 > ) +8 > ; +1 >Emitted(31, 5) Source(34, 5) + SourceIndex(0) +2 >Emitted(31, 12) Source(34, 12) + SourceIndex(0) +3 >Emitted(31, 13) Source(34, 13) + SourceIndex(0) +4 >Emitted(31, 16) Source(34, 16) + SourceIndex(0) +5 >Emitted(31, 17) Source(34, 17) + SourceIndex(0) +6 >Emitted(31, 30) Source(34, 30) + SourceIndex(0) +7 >Emitted(31, 31) Source(34, 31) + SourceIndex(0) +8 >Emitted(31, 32) Source(34, 32) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(32, 2) Source(35, 2) + SourceIndex(0) +--- +>>>for (var _q = 0, _r = [multiRobotA, multiRobotB]; _q < _r.length; _q++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^ +16> ^ +17> ^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let [, [primarySkillA, secondarySkillA]] of +5 > [multiRobotA, multiRobotB] +6 > +7 > [ +8 > multiRobotA +9 > , +10> multiRobotB +11> ] +12> +13> [multiRobotA, multiRobotB] +14> +15> [multiRobotA, multiRobotB] +16> ) +1->Emitted(33, 1) Source(36, 1) + SourceIndex(0) +2 >Emitted(33, 4) Source(36, 4) + SourceIndex(0) +3 >Emitted(33, 5) Source(36, 5) + SourceIndex(0) +4 >Emitted(33, 6) Source(36, 50) + SourceIndex(0) +5 >Emitted(33, 16) Source(36, 76) + SourceIndex(0) +6 >Emitted(33, 18) Source(36, 50) + SourceIndex(0) +7 >Emitted(33, 24) Source(36, 51) + SourceIndex(0) +8 >Emitted(33, 35) Source(36, 62) + SourceIndex(0) +9 >Emitted(33, 37) Source(36, 64) + SourceIndex(0) +10>Emitted(33, 48) Source(36, 75) + SourceIndex(0) +11>Emitted(33, 49) Source(36, 76) + SourceIndex(0) +12>Emitted(33, 51) Source(36, 50) + SourceIndex(0) +13>Emitted(33, 65) Source(36, 76) + SourceIndex(0) +14>Emitted(33, 67) Source(36, 50) + SourceIndex(0) +15>Emitted(33, 71) Source(36, 76) + SourceIndex(0) +16>Emitted(33, 72) Source(36, 77) + SourceIndex(0) +--- +>>> var _s = _r[_q], _t = _s[1], primarySkillA = _t[0], secondarySkillA = _t[1]; +1->^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > +3 > let [, [primarySkillA, secondarySkillA]] +4 > +5 > [primarySkillA, secondarySkillA] +6 > +7 > primarySkillA +8 > , +9 > secondarySkillA +1->Emitted(34, 5) Source(36, 6) + SourceIndex(0) +2 >Emitted(34, 9) Source(36, 6) + SourceIndex(0) +3 >Emitted(34, 20) Source(36, 46) + SourceIndex(0) +4 >Emitted(34, 22) Source(36, 13) + SourceIndex(0) +5 >Emitted(34, 32) Source(36, 45) + SourceIndex(0) +6 >Emitted(34, 34) Source(36, 14) + SourceIndex(0) +7 >Emitted(34, 55) Source(36, 27) + SourceIndex(0) +8 >Emitted(34, 57) Source(36, 29) + SourceIndex(0) +9 >Emitted(34, 80) Source(36, 44) + SourceIndex(0) +--- +>>> console.log(primarySkillA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 >]] of [multiRobotA, multiRobotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primarySkillA +7 > ) +8 > ; +1 >Emitted(35, 5) Source(37, 5) + SourceIndex(0) +2 >Emitted(35, 12) Source(37, 12) + SourceIndex(0) +3 >Emitted(35, 13) Source(37, 13) + SourceIndex(0) +4 >Emitted(35, 16) Source(37, 16) + SourceIndex(0) +5 >Emitted(35, 17) Source(37, 17) + SourceIndex(0) +6 >Emitted(35, 30) Source(37, 30) + SourceIndex(0) +7 >Emitted(35, 31) Source(37, 31) + SourceIndex(0) +8 >Emitted(35, 32) Source(37, 32) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(36, 2) Source(38, 2) + SourceIndex(0) +--- +>>>for (var _u = 0, robots_2 = robots; _u < robots_2.length; _u++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +1-> + > + > +2 >for +3 > +4 > (let [numberB] of +5 > robots +6 > +7 > robots +8 > +9 > robots +10> +11> robots +12> ) +1->Emitted(37, 1) Source(40, 1) + SourceIndex(0) +2 >Emitted(37, 4) Source(40, 4) + SourceIndex(0) +3 >Emitted(37, 5) Source(40, 5) + SourceIndex(0) +4 >Emitted(37, 6) Source(40, 23) + SourceIndex(0) +5 >Emitted(37, 16) Source(40, 29) + SourceIndex(0) +6 >Emitted(37, 18) Source(40, 23) + SourceIndex(0) +7 >Emitted(37, 35) Source(40, 29) + SourceIndex(0) +8 >Emitted(37, 37) Source(40, 23) + SourceIndex(0) +9 >Emitted(37, 57) Source(40, 29) + SourceIndex(0) +10>Emitted(37, 59) Source(40, 23) + SourceIndex(0) +11>Emitted(37, 63) Source(40, 29) + SourceIndex(0) +12>Emitted(37, 64) Source(40, 30) + SourceIndex(0) +--- +>>> var numberB = robots_2[_u][0]; +1 >^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > let +3 > [numberB] +1 >Emitted(38, 5) Source(40, 6) + SourceIndex(0) +2 >Emitted(38, 9) Source(40, 10) + SourceIndex(0) +3 >Emitted(38, 34) Source(40, 19) + SourceIndex(0) +--- +>>> console.log(numberB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1 > of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > numberB +7 > ) +8 > ; +1 >Emitted(39, 5) Source(41, 5) + SourceIndex(0) +2 >Emitted(39, 12) Source(41, 12) + SourceIndex(0) +3 >Emitted(39, 13) Source(41, 13) + SourceIndex(0) +4 >Emitted(39, 16) Source(41, 16) + SourceIndex(0) +5 >Emitted(39, 17) Source(41, 17) + SourceIndex(0) +6 >Emitted(39, 24) Source(41, 24) + SourceIndex(0) +7 >Emitted(39, 25) Source(41, 25) + SourceIndex(0) +8 >Emitted(39, 26) Source(41, 26) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(40, 2) Source(42, 2) + SourceIndex(0) +--- +>>>for (var _v = 0, _w = getRobots(); _v < _w.length; _v++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +1-> + > +2 >for +3 > +4 > (let [numberB] of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> getRobots() +12> +13> getRobots() +14> ) +1->Emitted(41, 1) Source(43, 1) + SourceIndex(0) +2 >Emitted(41, 4) Source(43, 4) + SourceIndex(0) +3 >Emitted(41, 5) Source(43, 5) + SourceIndex(0) +4 >Emitted(41, 6) Source(43, 23) + SourceIndex(0) +5 >Emitted(41, 16) Source(43, 34) + SourceIndex(0) +6 >Emitted(41, 18) Source(43, 23) + SourceIndex(0) +7 >Emitted(41, 23) Source(43, 23) + SourceIndex(0) +8 >Emitted(41, 32) Source(43, 32) + SourceIndex(0) +9 >Emitted(41, 34) Source(43, 34) + SourceIndex(0) +10>Emitted(41, 36) Source(43, 23) + SourceIndex(0) +11>Emitted(41, 50) Source(43, 34) + SourceIndex(0) +12>Emitted(41, 52) Source(43, 23) + SourceIndex(0) +13>Emitted(41, 56) Source(43, 34) + SourceIndex(0) +14>Emitted(41, 57) Source(43, 35) + SourceIndex(0) +--- +>>> var numberB = _w[_v][0]; +1 >^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^^^ +1 > +2 > let +3 > [numberB] +1 >Emitted(42, 5) Source(43, 6) + SourceIndex(0) +2 >Emitted(42, 9) Source(43, 10) + SourceIndex(0) +3 >Emitted(42, 28) Source(43, 19) + SourceIndex(0) +--- +>>> console.log(numberB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1 > of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > numberB +7 > ) +8 > ; +1 >Emitted(43, 5) Source(44, 5) + SourceIndex(0) +2 >Emitted(43, 12) Source(44, 12) + SourceIndex(0) +3 >Emitted(43, 13) Source(44, 13) + SourceIndex(0) +4 >Emitted(43, 16) Source(44, 16) + SourceIndex(0) +5 >Emitted(43, 17) Source(44, 17) + SourceIndex(0) +6 >Emitted(43, 24) Source(44, 24) + SourceIndex(0) +7 >Emitted(43, 25) Source(44, 25) + SourceIndex(0) +8 >Emitted(43, 26) Source(44, 26) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(44, 2) Source(45, 2) + SourceIndex(0) +--- +>>>for (var _x = 0, _y = [robotA, robotB]; _x < _y.length; _x++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^ +16> ^ +1-> + > +2 >for +3 > +4 > (let [numberB] of +5 > [robotA, robotB] +6 > +7 > [ +8 > robotA +9 > , +10> robotB +11> ] +12> +13> [robotA, robotB] +14> +15> [robotA, robotB] +16> ) +1->Emitted(45, 1) Source(46, 1) + SourceIndex(0) +2 >Emitted(45, 4) Source(46, 4) + SourceIndex(0) +3 >Emitted(45, 5) Source(46, 5) + SourceIndex(0) +4 >Emitted(45, 6) Source(46, 23) + SourceIndex(0) +5 >Emitted(45, 16) Source(46, 39) + SourceIndex(0) +6 >Emitted(45, 18) Source(46, 23) + SourceIndex(0) +7 >Emitted(45, 24) Source(46, 24) + SourceIndex(0) +8 >Emitted(45, 30) Source(46, 30) + SourceIndex(0) +9 >Emitted(45, 32) Source(46, 32) + SourceIndex(0) +10>Emitted(45, 38) Source(46, 38) + SourceIndex(0) +11>Emitted(45, 39) Source(46, 39) + SourceIndex(0) +12>Emitted(45, 41) Source(46, 23) + SourceIndex(0) +13>Emitted(45, 55) Source(46, 39) + SourceIndex(0) +14>Emitted(45, 57) Source(46, 23) + SourceIndex(0) +15>Emitted(45, 61) Source(46, 39) + SourceIndex(0) +16>Emitted(45, 62) Source(46, 40) + SourceIndex(0) +--- +>>> var numberB = _y[_x][0]; +1 >^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^^^ +1 > +2 > let +3 > [numberB] +1 >Emitted(46, 5) Source(46, 6) + SourceIndex(0) +2 >Emitted(46, 9) Source(46, 10) + SourceIndex(0) +3 >Emitted(46, 28) Source(46, 19) + SourceIndex(0) +--- +>>> console.log(numberB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1 > of [robotA, robotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > numberB +7 > ) +8 > ; +1 >Emitted(47, 5) Source(47, 5) + SourceIndex(0) +2 >Emitted(47, 12) Source(47, 12) + SourceIndex(0) +3 >Emitted(47, 13) Source(47, 13) + SourceIndex(0) +4 >Emitted(47, 16) Source(47, 16) + SourceIndex(0) +5 >Emitted(47, 17) Source(47, 17) + SourceIndex(0) +6 >Emitted(47, 24) Source(47, 24) + SourceIndex(0) +7 >Emitted(47, 25) Source(47, 25) + SourceIndex(0) +8 >Emitted(47, 26) Source(47, 26) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(48, 2) Source(48, 2) + SourceIndex(0) +--- +>>>for (var _z = 0, multiRobots_2 = multiRobots; _z < multiRobots_2.length; _z++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +1-> + > +2 >for +3 > +4 > (let [nameB] of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > multiRobots +10> +11> multiRobots +12> ) +1->Emitted(49, 1) Source(49, 1) + SourceIndex(0) +2 >Emitted(49, 4) Source(49, 4) + SourceIndex(0) +3 >Emitted(49, 5) Source(49, 5) + SourceIndex(0) +4 >Emitted(49, 6) Source(49, 21) + SourceIndex(0) +5 >Emitted(49, 16) Source(49, 32) + SourceIndex(0) +6 >Emitted(49, 18) Source(49, 21) + SourceIndex(0) +7 >Emitted(49, 45) Source(49, 32) + SourceIndex(0) +8 >Emitted(49, 47) Source(49, 21) + SourceIndex(0) +9 >Emitted(49, 72) Source(49, 32) + SourceIndex(0) +10>Emitted(49, 74) Source(49, 21) + SourceIndex(0) +11>Emitted(49, 78) Source(49, 32) + SourceIndex(0) +12>Emitted(49, 79) Source(49, 33) + SourceIndex(0) +--- +>>> var nameB = multiRobots_2[_z][0]; +1 >^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > let +3 > [nameB] +1 >Emitted(50, 5) Source(49, 6) + SourceIndex(0) +2 >Emitted(50, 9) Source(49, 10) + SourceIndex(0) +3 >Emitted(50, 37) Source(49, 17) + SourceIndex(0) +--- +>>> console.log(nameB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameB +7 > ) +8 > ; +1 >Emitted(51, 5) Source(50, 5) + SourceIndex(0) +2 >Emitted(51, 12) Source(50, 12) + SourceIndex(0) +3 >Emitted(51, 13) Source(50, 13) + SourceIndex(0) +4 >Emitted(51, 16) Source(50, 16) + SourceIndex(0) +5 >Emitted(51, 17) Source(50, 17) + SourceIndex(0) +6 >Emitted(51, 22) Source(50, 22) + SourceIndex(0) +7 >Emitted(51, 23) Source(50, 23) + SourceIndex(0) +8 >Emitted(51, 24) Source(50, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(52, 2) Source(51, 2) + SourceIndex(0) +--- +>>>for (var _0 = 0, _1 = getMultiRobots(); _0 < _1.length; _0++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +1-> + > +2 >for +3 > +4 > (let [nameB] of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> getMultiRobots() +12> +13> getMultiRobots() +14> ) +1->Emitted(53, 1) Source(52, 1) + SourceIndex(0) +2 >Emitted(53, 4) Source(52, 4) + SourceIndex(0) +3 >Emitted(53, 5) Source(52, 5) + SourceIndex(0) +4 >Emitted(53, 6) Source(52, 21) + SourceIndex(0) +5 >Emitted(53, 16) Source(52, 37) + SourceIndex(0) +6 >Emitted(53, 18) Source(52, 21) + SourceIndex(0) +7 >Emitted(53, 23) Source(52, 21) + SourceIndex(0) +8 >Emitted(53, 37) Source(52, 35) + SourceIndex(0) +9 >Emitted(53, 39) Source(52, 37) + SourceIndex(0) +10>Emitted(53, 41) Source(52, 21) + SourceIndex(0) +11>Emitted(53, 55) Source(52, 37) + SourceIndex(0) +12>Emitted(53, 57) Source(52, 21) + SourceIndex(0) +13>Emitted(53, 61) Source(52, 37) + SourceIndex(0) +14>Emitted(53, 62) Source(52, 38) + SourceIndex(0) +--- +>>> var nameB = _1[_0][0]; +1 >^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^ +1 > +2 > let +3 > [nameB] +1 >Emitted(54, 5) Source(52, 6) + SourceIndex(0) +2 >Emitted(54, 9) Source(52, 10) + SourceIndex(0) +3 >Emitted(54, 26) Source(52, 17) + SourceIndex(0) +--- +>>> console.log(nameB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameB +7 > ) +8 > ; +1 >Emitted(55, 5) Source(53, 5) + SourceIndex(0) +2 >Emitted(55, 12) Source(53, 12) + SourceIndex(0) +3 >Emitted(55, 13) Source(53, 13) + SourceIndex(0) +4 >Emitted(55, 16) Source(53, 16) + SourceIndex(0) +5 >Emitted(55, 17) Source(53, 17) + SourceIndex(0) +6 >Emitted(55, 22) Source(53, 22) + SourceIndex(0) +7 >Emitted(55, 23) Source(53, 23) + SourceIndex(0) +8 >Emitted(55, 24) Source(53, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(56, 2) Source(54, 2) + SourceIndex(0) +--- +>>>for (var _2 = 0, _3 = [multiRobotA, multiRobotB]; _2 < _3.length; _2++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^ +16> ^ +1-> + > +2 >for +3 > +4 > (let [nameB] of +5 > [multiRobotA, multiRobotB] +6 > +7 > [ +8 > multiRobotA +9 > , +10> multiRobotB +11> ] +12> +13> [multiRobotA, multiRobotB] +14> +15> [multiRobotA, multiRobotB] +16> ) +1->Emitted(57, 1) Source(55, 1) + SourceIndex(0) +2 >Emitted(57, 4) Source(55, 4) + SourceIndex(0) +3 >Emitted(57, 5) Source(55, 5) + SourceIndex(0) +4 >Emitted(57, 6) Source(55, 21) + SourceIndex(0) +5 >Emitted(57, 16) Source(55, 47) + SourceIndex(0) +6 >Emitted(57, 18) Source(55, 21) + SourceIndex(0) +7 >Emitted(57, 24) Source(55, 22) + SourceIndex(0) +8 >Emitted(57, 35) Source(55, 33) + SourceIndex(0) +9 >Emitted(57, 37) Source(55, 35) + SourceIndex(0) +10>Emitted(57, 48) Source(55, 46) + SourceIndex(0) +11>Emitted(57, 49) Source(55, 47) + SourceIndex(0) +12>Emitted(57, 51) Source(55, 21) + SourceIndex(0) +13>Emitted(57, 65) Source(55, 47) + SourceIndex(0) +14>Emitted(57, 67) Source(55, 21) + SourceIndex(0) +15>Emitted(57, 71) Source(55, 47) + SourceIndex(0) +16>Emitted(57, 72) Source(55, 48) + SourceIndex(0) +--- +>>> var nameB = _3[_2][0]; +1 >^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^ +1 > +2 > let +3 > [nameB] +1 >Emitted(58, 5) Source(55, 6) + SourceIndex(0) +2 >Emitted(58, 9) Source(55, 10) + SourceIndex(0) +3 >Emitted(58, 26) Source(55, 17) + SourceIndex(0) +--- +>>> console.log(nameB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > of [multiRobotA, multiRobotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameB +7 > ) +8 > ; +1 >Emitted(59, 5) Source(56, 5) + SourceIndex(0) +2 >Emitted(59, 12) Source(56, 12) + SourceIndex(0) +3 >Emitted(59, 13) Source(56, 13) + SourceIndex(0) +4 >Emitted(59, 16) Source(56, 16) + SourceIndex(0) +5 >Emitted(59, 17) Source(56, 17) + SourceIndex(0) +6 >Emitted(59, 22) Source(56, 22) + SourceIndex(0) +7 >Emitted(59, 23) Source(56, 23) + SourceIndex(0) +8 >Emitted(59, 24) Source(56, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(60, 2) Source(57, 2) + SourceIndex(0) +--- +>>>for (var _4 = 0, robots_3 = robots; _4 < robots_3.length; _4++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +13> ^^^^^^^^^^^^^^^-> +1-> + > + > +2 >for +3 > +4 > (let [numberA2, nameA2, skillA2] of +5 > robots +6 > +7 > robots +8 > +9 > robots +10> +11> robots +12> ) +1->Emitted(61, 1) Source(59, 1) + SourceIndex(0) +2 >Emitted(61, 4) Source(59, 4) + SourceIndex(0) +3 >Emitted(61, 5) Source(59, 5) + SourceIndex(0) +4 >Emitted(61, 6) Source(59, 41) + SourceIndex(0) +5 >Emitted(61, 16) Source(59, 47) + SourceIndex(0) +6 >Emitted(61, 18) Source(59, 41) + SourceIndex(0) +7 >Emitted(61, 35) Source(59, 47) + SourceIndex(0) +8 >Emitted(61, 37) Source(59, 41) + SourceIndex(0) +9 >Emitted(61, 57) Source(59, 47) + SourceIndex(0) +10>Emitted(61, 59) Source(59, 41) + SourceIndex(0) +11>Emitted(61, 63) Source(59, 47) + SourceIndex(0) +12>Emitted(61, 64) Source(59, 48) + SourceIndex(0) +--- +>>> var _5 = robots_3[_4], numberA2 = _5[0], nameA2 = _5[1], skillA2 = _5[2]; +1->^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^ +1-> +2 > +3 > let [numberA2, nameA2, skillA2] +4 > +5 > numberA2 +6 > , +7 > nameA2 +8 > , +9 > skillA2 +1->Emitted(62, 5) Source(59, 6) + SourceIndex(0) +2 >Emitted(62, 9) Source(59, 6) + SourceIndex(0) +3 >Emitted(62, 26) Source(59, 37) + SourceIndex(0) +4 >Emitted(62, 28) Source(59, 11) + SourceIndex(0) +5 >Emitted(62, 44) Source(59, 19) + SourceIndex(0) +6 >Emitted(62, 46) Source(59, 21) + SourceIndex(0) +7 >Emitted(62, 60) Source(59, 27) + SourceIndex(0) +8 >Emitted(62, 62) Source(59, 29) + SourceIndex(0) +9 >Emitted(62, 77) Source(59, 36) + SourceIndex(0) +--- +>>> console.log(nameA2); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 >] of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA2 +7 > ) +8 > ; +1 >Emitted(63, 5) Source(60, 5) + SourceIndex(0) +2 >Emitted(63, 12) Source(60, 12) + SourceIndex(0) +3 >Emitted(63, 13) Source(60, 13) + SourceIndex(0) +4 >Emitted(63, 16) Source(60, 16) + SourceIndex(0) +5 >Emitted(63, 17) Source(60, 17) + SourceIndex(0) +6 >Emitted(63, 23) Source(60, 23) + SourceIndex(0) +7 >Emitted(63, 24) Source(60, 24) + SourceIndex(0) +8 >Emitted(63, 25) Source(60, 25) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(64, 2) Source(61, 2) + SourceIndex(0) +--- +>>>for (var _6 = 0, _7 = getRobots(); _6 < _7.length; _6++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let [numberA2, nameA2, skillA2] of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> getRobots() +12> +13> getRobots() +14> ) +1->Emitted(65, 1) Source(62, 1) + SourceIndex(0) +2 >Emitted(65, 4) Source(62, 4) + SourceIndex(0) +3 >Emitted(65, 5) Source(62, 5) + SourceIndex(0) +4 >Emitted(65, 6) Source(62, 41) + SourceIndex(0) +5 >Emitted(65, 16) Source(62, 52) + SourceIndex(0) +6 >Emitted(65, 18) Source(62, 41) + SourceIndex(0) +7 >Emitted(65, 23) Source(62, 41) + SourceIndex(0) +8 >Emitted(65, 32) Source(62, 50) + SourceIndex(0) +9 >Emitted(65, 34) Source(62, 52) + SourceIndex(0) +10>Emitted(65, 36) Source(62, 41) + SourceIndex(0) +11>Emitted(65, 50) Source(62, 52) + SourceIndex(0) +12>Emitted(65, 52) Source(62, 41) + SourceIndex(0) +13>Emitted(65, 56) Source(62, 52) + SourceIndex(0) +14>Emitted(65, 57) Source(62, 53) + SourceIndex(0) +--- +>>> var _8 = _7[_6], numberA2 = _8[0], nameA2 = _8[1], skillA2 = _8[2]; +1->^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^ +1-> +2 > +3 > let [numberA2, nameA2, skillA2] +4 > +5 > numberA2 +6 > , +7 > nameA2 +8 > , +9 > skillA2 +1->Emitted(66, 5) Source(62, 6) + SourceIndex(0) +2 >Emitted(66, 9) Source(62, 6) + SourceIndex(0) +3 >Emitted(66, 20) Source(62, 37) + SourceIndex(0) +4 >Emitted(66, 22) Source(62, 11) + SourceIndex(0) +5 >Emitted(66, 38) Source(62, 19) + SourceIndex(0) +6 >Emitted(66, 40) Source(62, 21) + SourceIndex(0) +7 >Emitted(66, 54) Source(62, 27) + SourceIndex(0) +8 >Emitted(66, 56) Source(62, 29) + SourceIndex(0) +9 >Emitted(66, 71) Source(62, 36) + SourceIndex(0) +--- +>>> console.log(nameA2); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 >] of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA2 +7 > ) +8 > ; +1 >Emitted(67, 5) Source(63, 5) + SourceIndex(0) +2 >Emitted(67, 12) Source(63, 12) + SourceIndex(0) +3 >Emitted(67, 13) Source(63, 13) + SourceIndex(0) +4 >Emitted(67, 16) Source(63, 16) + SourceIndex(0) +5 >Emitted(67, 17) Source(63, 17) + SourceIndex(0) +6 >Emitted(67, 23) Source(63, 23) + SourceIndex(0) +7 >Emitted(67, 24) Source(63, 24) + SourceIndex(0) +8 >Emitted(67, 25) Source(63, 25) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(68, 2) Source(64, 2) + SourceIndex(0) +--- +>>>for (var _9 = 0, _10 = [robotA, robotB]; _9 < _10.length; _9++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^ +16> ^ +17> ^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let [numberA2, nameA2, skillA2] of +5 > [robotA, robotB] +6 > +7 > [ +8 > robotA +9 > , +10> robotB +11> ] +12> +13> [robotA, robotB] +14> +15> [robotA, robotB] +16> ) +1->Emitted(69, 1) Source(65, 1) + SourceIndex(0) +2 >Emitted(69, 4) Source(65, 4) + SourceIndex(0) +3 >Emitted(69, 5) Source(65, 5) + SourceIndex(0) +4 >Emitted(69, 6) Source(65, 41) + SourceIndex(0) +5 >Emitted(69, 16) Source(65, 57) + SourceIndex(0) +6 >Emitted(69, 18) Source(65, 41) + SourceIndex(0) +7 >Emitted(69, 25) Source(65, 42) + SourceIndex(0) +8 >Emitted(69, 31) Source(65, 48) + SourceIndex(0) +9 >Emitted(69, 33) Source(65, 50) + SourceIndex(0) +10>Emitted(69, 39) Source(65, 56) + SourceIndex(0) +11>Emitted(69, 40) Source(65, 57) + SourceIndex(0) +12>Emitted(69, 42) Source(65, 41) + SourceIndex(0) +13>Emitted(69, 57) Source(65, 57) + SourceIndex(0) +14>Emitted(69, 59) Source(65, 41) + SourceIndex(0) +15>Emitted(69, 63) Source(65, 57) + SourceIndex(0) +16>Emitted(69, 64) Source(65, 58) + SourceIndex(0) +--- +>>> var _11 = _10[_9], numberA2 = _11[0], nameA2 = _11[1], skillA2 = _11[2]; +1->^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^ +1-> +2 > +3 > let [numberA2, nameA2, skillA2] +4 > +5 > numberA2 +6 > , +7 > nameA2 +8 > , +9 > skillA2 +1->Emitted(70, 5) Source(65, 6) + SourceIndex(0) +2 >Emitted(70, 9) Source(65, 6) + SourceIndex(0) +3 >Emitted(70, 22) Source(65, 37) + SourceIndex(0) +4 >Emitted(70, 24) Source(65, 11) + SourceIndex(0) +5 >Emitted(70, 41) Source(65, 19) + SourceIndex(0) +6 >Emitted(70, 43) Source(65, 21) + SourceIndex(0) +7 >Emitted(70, 58) Source(65, 27) + SourceIndex(0) +8 >Emitted(70, 60) Source(65, 29) + SourceIndex(0) +9 >Emitted(70, 76) Source(65, 36) + SourceIndex(0) +--- +>>> console.log(nameA2); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 >] of [robotA, robotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA2 +7 > ) +8 > ; +1 >Emitted(71, 5) Source(66, 5) + SourceIndex(0) +2 >Emitted(71, 12) Source(66, 12) + SourceIndex(0) +3 >Emitted(71, 13) Source(66, 13) + SourceIndex(0) +4 >Emitted(71, 16) Source(66, 16) + SourceIndex(0) +5 >Emitted(71, 17) Source(66, 17) + SourceIndex(0) +6 >Emitted(71, 23) Source(66, 23) + SourceIndex(0) +7 >Emitted(71, 24) Source(66, 24) + SourceIndex(0) +8 >Emitted(71, 25) Source(66, 25) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(72, 2) Source(67, 2) + SourceIndex(0) +--- +>>>for (var _12 = 0, multiRobots_3 = multiRobots; _12 < multiRobots_3.length; _12++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^ +12> ^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let [nameMA, [primarySkillA, secondarySkillA]] of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > multiRobots +10> +11> multiRobots +12> ) +1->Emitted(73, 1) Source(68, 1) + SourceIndex(0) +2 >Emitted(73, 4) Source(68, 4) + SourceIndex(0) +3 >Emitted(73, 5) Source(68, 5) + SourceIndex(0) +4 >Emitted(73, 6) Source(68, 56) + SourceIndex(0) +5 >Emitted(73, 17) Source(68, 67) + SourceIndex(0) +6 >Emitted(73, 19) Source(68, 56) + SourceIndex(0) +7 >Emitted(73, 46) Source(68, 67) + SourceIndex(0) +8 >Emitted(73, 48) Source(68, 56) + SourceIndex(0) +9 >Emitted(73, 74) Source(68, 67) + SourceIndex(0) +10>Emitted(73, 76) Source(68, 56) + SourceIndex(0) +11>Emitted(73, 81) Source(68, 67) + SourceIndex(0) +12>Emitted(73, 82) Source(68, 68) + SourceIndex(0) +--- +>>> var _13 = multiRobots_3[_12], nameMA = _13[0], _14 = _13[1], primarySkillA = _14[0], secondarySkillA = _14[1]; +1->^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > +3 > let [nameMA, [primarySkillA, secondarySkillA]] +4 > +5 > nameMA +6 > , +7 > [primarySkillA, secondarySkillA] +8 > +9 > primarySkillA +10> , +11> secondarySkillA +1->Emitted(74, 5) Source(68, 6) + SourceIndex(0) +2 >Emitted(74, 9) Source(68, 6) + SourceIndex(0) +3 >Emitted(74, 33) Source(68, 52) + SourceIndex(0) +4 >Emitted(74, 35) Source(68, 11) + SourceIndex(0) +5 >Emitted(74, 50) Source(68, 17) + SourceIndex(0) +6 >Emitted(74, 52) Source(68, 19) + SourceIndex(0) +7 >Emitted(74, 64) Source(68, 51) + SourceIndex(0) +8 >Emitted(74, 66) Source(68, 20) + SourceIndex(0) +9 >Emitted(74, 88) Source(68, 33) + SourceIndex(0) +10>Emitted(74, 90) Source(68, 35) + SourceIndex(0) +11>Emitted(74, 114) Source(68, 50) + SourceIndex(0) +--- +>>> console.log(nameMA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 >]] of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMA +7 > ) +8 > ; +1 >Emitted(75, 5) Source(69, 5) + SourceIndex(0) +2 >Emitted(75, 12) Source(69, 12) + SourceIndex(0) +3 >Emitted(75, 13) Source(69, 13) + SourceIndex(0) +4 >Emitted(75, 16) Source(69, 16) + SourceIndex(0) +5 >Emitted(75, 17) Source(69, 17) + SourceIndex(0) +6 >Emitted(75, 23) Source(69, 23) + SourceIndex(0) +7 >Emitted(75, 24) Source(69, 24) + SourceIndex(0) +8 >Emitted(75, 25) Source(69, 25) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(76, 2) Source(70, 2) + SourceIndex(0) +--- +>>>for (var _15 = 0, _16 = getMultiRobots(); _15 < _16.length; _15++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let [nameMA, [primarySkillA, secondarySkillA]] of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> getMultiRobots() +12> +13> getMultiRobots() +14> ) +1->Emitted(77, 1) Source(71, 1) + SourceIndex(0) +2 >Emitted(77, 4) Source(71, 4) + SourceIndex(0) +3 >Emitted(77, 5) Source(71, 5) + SourceIndex(0) +4 >Emitted(77, 6) Source(71, 56) + SourceIndex(0) +5 >Emitted(77, 17) Source(71, 72) + SourceIndex(0) +6 >Emitted(77, 19) Source(71, 56) + SourceIndex(0) +7 >Emitted(77, 25) Source(71, 56) + SourceIndex(0) +8 >Emitted(77, 39) Source(71, 70) + SourceIndex(0) +9 >Emitted(77, 41) Source(71, 72) + SourceIndex(0) +10>Emitted(77, 43) Source(71, 56) + SourceIndex(0) +11>Emitted(77, 59) Source(71, 72) + SourceIndex(0) +12>Emitted(77, 61) Source(71, 56) + SourceIndex(0) +13>Emitted(77, 66) Source(71, 72) + SourceIndex(0) +14>Emitted(77, 67) Source(71, 73) + SourceIndex(0) +--- +>>> var _17 = _16[_15], nameMA = _17[0], _18 = _17[1], primarySkillA = _18[0], secondarySkillA = _18[1]; +1->^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > +3 > let [nameMA, [primarySkillA, secondarySkillA]] +4 > +5 > nameMA +6 > , +7 > [primarySkillA, secondarySkillA] +8 > +9 > primarySkillA +10> , +11> secondarySkillA +1->Emitted(78, 5) Source(71, 6) + SourceIndex(0) +2 >Emitted(78, 9) Source(71, 6) + SourceIndex(0) +3 >Emitted(78, 23) Source(71, 52) + SourceIndex(0) +4 >Emitted(78, 25) Source(71, 11) + SourceIndex(0) +5 >Emitted(78, 40) Source(71, 17) + SourceIndex(0) +6 >Emitted(78, 42) Source(71, 19) + SourceIndex(0) +7 >Emitted(78, 54) Source(71, 51) + SourceIndex(0) +8 >Emitted(78, 56) Source(71, 20) + SourceIndex(0) +9 >Emitted(78, 78) Source(71, 33) + SourceIndex(0) +10>Emitted(78, 80) Source(71, 35) + SourceIndex(0) +11>Emitted(78, 104) Source(71, 50) + SourceIndex(0) +--- +>>> console.log(nameMA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 >]] of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMA +7 > ) +8 > ; +1 >Emitted(79, 5) Source(72, 5) + SourceIndex(0) +2 >Emitted(79, 12) Source(72, 12) + SourceIndex(0) +3 >Emitted(79, 13) Source(72, 13) + SourceIndex(0) +4 >Emitted(79, 16) Source(72, 16) + SourceIndex(0) +5 >Emitted(79, 17) Source(72, 17) + SourceIndex(0) +6 >Emitted(79, 23) Source(72, 23) + SourceIndex(0) +7 >Emitted(79, 24) Source(72, 24) + SourceIndex(0) +8 >Emitted(79, 25) Source(72, 25) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(80, 2) Source(73, 2) + SourceIndex(0) +--- +>>>for (var _19 = 0, _20 = [multiRobotA, multiRobotB]; _19 < _20.length; _19++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^^ +16> ^ +17> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let [nameMA, [primarySkillA, secondarySkillA]] of +5 > [multiRobotA, multiRobotB] +6 > +7 > [ +8 > multiRobotA +9 > , +10> multiRobotB +11> ] +12> +13> [multiRobotA, multiRobotB] +14> +15> [multiRobotA, multiRobotB] +16> ) +1->Emitted(81, 1) Source(74, 1) + SourceIndex(0) +2 >Emitted(81, 4) Source(74, 4) + SourceIndex(0) +3 >Emitted(81, 5) Source(74, 5) + SourceIndex(0) +4 >Emitted(81, 6) Source(74, 56) + SourceIndex(0) +5 >Emitted(81, 17) Source(74, 82) + SourceIndex(0) +6 >Emitted(81, 19) Source(74, 56) + SourceIndex(0) +7 >Emitted(81, 26) Source(74, 57) + SourceIndex(0) +8 >Emitted(81, 37) Source(74, 68) + SourceIndex(0) +9 >Emitted(81, 39) Source(74, 70) + SourceIndex(0) +10>Emitted(81, 50) Source(74, 81) + SourceIndex(0) +11>Emitted(81, 51) Source(74, 82) + SourceIndex(0) +12>Emitted(81, 53) Source(74, 56) + SourceIndex(0) +13>Emitted(81, 69) Source(74, 82) + SourceIndex(0) +14>Emitted(81, 71) Source(74, 56) + SourceIndex(0) +15>Emitted(81, 76) Source(74, 82) + SourceIndex(0) +16>Emitted(81, 77) Source(74, 83) + SourceIndex(0) +--- +>>> var _21 = _20[_19], nameMA = _21[0], _22 = _21[1], primarySkillA = _22[0], secondarySkillA = _22[1]; +1->^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > +3 > let [nameMA, [primarySkillA, secondarySkillA]] +4 > +5 > nameMA +6 > , +7 > [primarySkillA, secondarySkillA] +8 > +9 > primarySkillA +10> , +11> secondarySkillA +1->Emitted(82, 5) Source(74, 6) + SourceIndex(0) +2 >Emitted(82, 9) Source(74, 6) + SourceIndex(0) +3 >Emitted(82, 23) Source(74, 52) + SourceIndex(0) +4 >Emitted(82, 25) Source(74, 11) + SourceIndex(0) +5 >Emitted(82, 40) Source(74, 17) + SourceIndex(0) +6 >Emitted(82, 42) Source(74, 19) + SourceIndex(0) +7 >Emitted(82, 54) Source(74, 51) + SourceIndex(0) +8 >Emitted(82, 56) Source(74, 20) + SourceIndex(0) +9 >Emitted(82, 78) Source(74, 33) + SourceIndex(0) +10>Emitted(82, 80) Source(74, 35) + SourceIndex(0) +11>Emitted(82, 104) Source(74, 50) + SourceIndex(0) +--- +>>> console.log(nameMA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 >]] of [multiRobotA, multiRobotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMA +7 > ) +8 > ; +1 >Emitted(83, 5) Source(75, 5) + SourceIndex(0) +2 >Emitted(83, 12) Source(75, 12) + SourceIndex(0) +3 >Emitted(83, 13) Source(75, 13) + SourceIndex(0) +4 >Emitted(83, 16) Source(75, 16) + SourceIndex(0) +5 >Emitted(83, 17) Source(75, 17) + SourceIndex(0) +6 >Emitted(83, 23) Source(75, 23) + SourceIndex(0) +7 >Emitted(83, 24) Source(75, 24) + SourceIndex(0) +8 >Emitted(83, 25) Source(75, 25) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(84, 2) Source(76, 2) + SourceIndex(0) +--- +>>>for (var _23 = 0, robots_4 = robots; _23 < robots_4.length; _23++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^ +12> ^ +13> ^^^^^^^^^-> +1-> + > + > +2 >for +3 > +4 > (let [numberA3, ...robotAInfo] of +5 > robots +6 > +7 > robots +8 > +9 > robots +10> +11> robots +12> ) +1->Emitted(85, 1) Source(78, 1) + SourceIndex(0) +2 >Emitted(85, 4) Source(78, 4) + SourceIndex(0) +3 >Emitted(85, 5) Source(78, 5) + SourceIndex(0) +4 >Emitted(85, 6) Source(78, 39) + SourceIndex(0) +5 >Emitted(85, 17) Source(78, 45) + SourceIndex(0) +6 >Emitted(85, 19) Source(78, 39) + SourceIndex(0) +7 >Emitted(85, 36) Source(78, 45) + SourceIndex(0) +8 >Emitted(85, 38) Source(78, 39) + SourceIndex(0) +9 >Emitted(85, 59) Source(78, 45) + SourceIndex(0) +10>Emitted(85, 61) Source(78, 39) + SourceIndex(0) +11>Emitted(85, 66) Source(78, 45) + SourceIndex(0) +12>Emitted(85, 67) Source(78, 46) + SourceIndex(0) +--- +>>> var _24 = robots_4[_23], numberA3 = _24[0], robotAInfo = _24.slice(1); +1->^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > +3 > let [numberA3, ...robotAInfo] +4 > +5 > numberA3 +6 > , +7 > ...robotAInfo +1->Emitted(86, 5) Source(78, 6) + SourceIndex(0) +2 >Emitted(86, 9) Source(78, 6) + SourceIndex(0) +3 >Emitted(86, 28) Source(78, 35) + SourceIndex(0) +4 >Emitted(86, 30) Source(78, 11) + SourceIndex(0) +5 >Emitted(86, 47) Source(78, 19) + SourceIndex(0) +6 >Emitted(86, 49) Source(78, 21) + SourceIndex(0) +7 >Emitted(86, 74) Source(78, 34) + SourceIndex(0) +--- +>>> console.log(numberA3); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 >] of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > numberA3 +7 > ) +8 > ; +1 >Emitted(87, 5) Source(79, 5) + SourceIndex(0) +2 >Emitted(87, 12) Source(79, 12) + SourceIndex(0) +3 >Emitted(87, 13) Source(79, 13) + SourceIndex(0) +4 >Emitted(87, 16) Source(79, 16) + SourceIndex(0) +5 >Emitted(87, 17) Source(79, 17) + SourceIndex(0) +6 >Emitted(87, 25) Source(79, 25) + SourceIndex(0) +7 >Emitted(87, 26) Source(79, 26) + SourceIndex(0) +8 >Emitted(87, 27) Source(79, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(88, 2) Source(80, 2) + SourceIndex(0) +--- +>>>for (var _25 = 0, _26 = getRobots(); _25 < _26.length; _25++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^ +15> ^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let [numberA3, ...robotAInfo] of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> getRobots() +12> +13> getRobots() +14> ) +1->Emitted(89, 1) Source(81, 1) + SourceIndex(0) +2 >Emitted(89, 4) Source(81, 4) + SourceIndex(0) +3 >Emitted(89, 5) Source(81, 5) + SourceIndex(0) +4 >Emitted(89, 6) Source(81, 39) + SourceIndex(0) +5 >Emitted(89, 17) Source(81, 50) + SourceIndex(0) +6 >Emitted(89, 19) Source(81, 39) + SourceIndex(0) +7 >Emitted(89, 25) Source(81, 39) + SourceIndex(0) +8 >Emitted(89, 34) Source(81, 48) + SourceIndex(0) +9 >Emitted(89, 36) Source(81, 50) + SourceIndex(0) +10>Emitted(89, 38) Source(81, 39) + SourceIndex(0) +11>Emitted(89, 54) Source(81, 50) + SourceIndex(0) +12>Emitted(89, 56) Source(81, 39) + SourceIndex(0) +13>Emitted(89, 61) Source(81, 50) + SourceIndex(0) +14>Emitted(89, 62) Source(81, 51) + SourceIndex(0) +--- +>>> var _27 = _26[_25], numberA3 = _27[0], robotAInfo = _27.slice(1); +1->^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > +3 > let [numberA3, ...robotAInfo] +4 > +5 > numberA3 +6 > , +7 > ...robotAInfo +1->Emitted(90, 5) Source(81, 6) + SourceIndex(0) +2 >Emitted(90, 9) Source(81, 6) + SourceIndex(0) +3 >Emitted(90, 23) Source(81, 35) + SourceIndex(0) +4 >Emitted(90, 25) Source(81, 11) + SourceIndex(0) +5 >Emitted(90, 42) Source(81, 19) + SourceIndex(0) +6 >Emitted(90, 44) Source(81, 21) + SourceIndex(0) +7 >Emitted(90, 69) Source(81, 34) + SourceIndex(0) +--- +>>> console.log(numberA3); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 >] of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > numberA3 +7 > ) +8 > ; +1 >Emitted(91, 5) Source(82, 5) + SourceIndex(0) +2 >Emitted(91, 12) Source(82, 12) + SourceIndex(0) +3 >Emitted(91, 13) Source(82, 13) + SourceIndex(0) +4 >Emitted(91, 16) Source(82, 16) + SourceIndex(0) +5 >Emitted(91, 17) Source(82, 17) + SourceIndex(0) +6 >Emitted(91, 25) Source(82, 25) + SourceIndex(0) +7 >Emitted(91, 26) Source(82, 26) + SourceIndex(0) +8 >Emitted(91, 27) Source(82, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(92, 2) Source(83, 2) + SourceIndex(0) +--- +>>>for (var _28 = 0, _29 = [robotA, robotB]; _28 < _29.length; _28++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^^ +16> ^ +17> ^^^^-> +1-> + > +2 >for +3 > +4 > (let [numberA3, ...robotAInfo] of +5 > [robotA, robotB] +6 > +7 > [ +8 > robotA +9 > , +10> robotB +11> ] +12> +13> [robotA, robotB] +14> +15> [robotA, robotB] +16> ) +1->Emitted(93, 1) Source(84, 1) + SourceIndex(0) +2 >Emitted(93, 4) Source(84, 4) + SourceIndex(0) +3 >Emitted(93, 5) Source(84, 5) + SourceIndex(0) +4 >Emitted(93, 6) Source(84, 39) + SourceIndex(0) +5 >Emitted(93, 17) Source(84, 55) + SourceIndex(0) +6 >Emitted(93, 19) Source(84, 39) + SourceIndex(0) +7 >Emitted(93, 26) Source(84, 40) + SourceIndex(0) +8 >Emitted(93, 32) Source(84, 46) + SourceIndex(0) +9 >Emitted(93, 34) Source(84, 48) + SourceIndex(0) +10>Emitted(93, 40) Source(84, 54) + SourceIndex(0) +11>Emitted(93, 41) Source(84, 55) + SourceIndex(0) +12>Emitted(93, 43) Source(84, 39) + SourceIndex(0) +13>Emitted(93, 59) Source(84, 55) + SourceIndex(0) +14>Emitted(93, 61) Source(84, 39) + SourceIndex(0) +15>Emitted(93, 66) Source(84, 55) + SourceIndex(0) +16>Emitted(93, 67) Source(84, 56) + SourceIndex(0) +--- +>>> var _30 = _29[_28], numberA3 = _30[0], robotAInfo = _30.slice(1); +1->^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > +3 > let [numberA3, ...robotAInfo] +4 > +5 > numberA3 +6 > , +7 > ...robotAInfo +1->Emitted(94, 5) Source(84, 6) + SourceIndex(0) +2 >Emitted(94, 9) Source(84, 6) + SourceIndex(0) +3 >Emitted(94, 23) Source(84, 35) + SourceIndex(0) +4 >Emitted(94, 25) Source(84, 11) + SourceIndex(0) +5 >Emitted(94, 42) Source(84, 19) + SourceIndex(0) +6 >Emitted(94, 44) Source(84, 21) + SourceIndex(0) +7 >Emitted(94, 69) Source(84, 34) + SourceIndex(0) +--- +>>> console.log(numberA3); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 >] of [robotA, robotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > numberA3 +7 > ) +8 > ; +1 >Emitted(95, 5) Source(85, 5) + SourceIndex(0) +2 >Emitted(95, 12) Source(85, 12) + SourceIndex(0) +3 >Emitted(95, 13) Source(85, 13) + SourceIndex(0) +4 >Emitted(95, 16) Source(85, 16) + SourceIndex(0) +5 >Emitted(95, 17) Source(85, 17) + SourceIndex(0) +6 >Emitted(95, 25) Source(85, 25) + SourceIndex(0) +7 >Emitted(95, 26) Source(85, 26) + SourceIndex(0) +8 >Emitted(95, 27) Source(85, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(96, 2) Source(86, 2) + SourceIndex(0) +--- +>>>for (var _31 = 0, multiRobots_4 = multiRobots; _31 < multiRobots_4.length; _31++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^ +12> ^ +1-> + > +2 >for +3 > +4 > (let [...multiRobotAInfo] of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > multiRobots +10> +11> multiRobots +12> ) +1->Emitted(97, 1) Source(87, 1) + SourceIndex(0) +2 >Emitted(97, 4) Source(87, 4) + SourceIndex(0) +3 >Emitted(97, 5) Source(87, 5) + SourceIndex(0) +4 >Emitted(97, 6) Source(87, 34) + SourceIndex(0) +5 >Emitted(97, 17) Source(87, 45) + SourceIndex(0) +6 >Emitted(97, 19) Source(87, 34) + SourceIndex(0) +7 >Emitted(97, 46) Source(87, 45) + SourceIndex(0) +8 >Emitted(97, 48) Source(87, 34) + SourceIndex(0) +9 >Emitted(97, 74) Source(87, 45) + SourceIndex(0) +10>Emitted(97, 76) Source(87, 34) + SourceIndex(0) +11>Emitted(97, 81) Source(87, 45) + SourceIndex(0) +12>Emitted(97, 82) Source(87, 46) + SourceIndex(0) +--- +>>> var multiRobotAInfo = multiRobots_4[_31].slice(0); +1 >^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > let +3 > [...multiRobotAInfo] +1 >Emitted(98, 5) Source(87, 6) + SourceIndex(0) +2 >Emitted(98, 9) Source(87, 10) + SourceIndex(0) +3 >Emitted(98, 54) Source(87, 30) + SourceIndex(0) +--- +>>> console.log(multiRobotAInfo); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > multiRobotAInfo +7 > ) +8 > ; +1 >Emitted(99, 5) Source(88, 5) + SourceIndex(0) +2 >Emitted(99, 12) Source(88, 12) + SourceIndex(0) +3 >Emitted(99, 13) Source(88, 13) + SourceIndex(0) +4 >Emitted(99, 16) Source(88, 16) + SourceIndex(0) +5 >Emitted(99, 17) Source(88, 17) + SourceIndex(0) +6 >Emitted(99, 32) Source(88, 32) + SourceIndex(0) +7 >Emitted(99, 33) Source(88, 33) + SourceIndex(0) +8 >Emitted(99, 34) Source(88, 34) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(100, 2) Source(89, 2) + SourceIndex(0) +--- +>>>for (var _32 = 0, _33 = getMultiRobots(); _32 < _33.length; _32++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^ +1-> + > +2 >for +3 > +4 > (let [...multiRobotAInfo] of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> getMultiRobots() +12> +13> getMultiRobots() +14> ) +1->Emitted(101, 1) Source(90, 1) + SourceIndex(0) +2 >Emitted(101, 4) Source(90, 4) + SourceIndex(0) +3 >Emitted(101, 5) Source(90, 5) + SourceIndex(0) +4 >Emitted(101, 6) Source(90, 34) + SourceIndex(0) +5 >Emitted(101, 17) Source(90, 50) + SourceIndex(0) +6 >Emitted(101, 19) Source(90, 34) + SourceIndex(0) +7 >Emitted(101, 25) Source(90, 34) + SourceIndex(0) +8 >Emitted(101, 39) Source(90, 48) + SourceIndex(0) +9 >Emitted(101, 41) Source(90, 50) + SourceIndex(0) +10>Emitted(101, 43) Source(90, 34) + SourceIndex(0) +11>Emitted(101, 59) Source(90, 50) + SourceIndex(0) +12>Emitted(101, 61) Source(90, 34) + SourceIndex(0) +13>Emitted(101, 66) Source(90, 50) + SourceIndex(0) +14>Emitted(101, 67) Source(90, 51) + SourceIndex(0) +--- +>>> var multiRobotAInfo = _33[_32].slice(0); +1 >^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > let +3 > [...multiRobotAInfo] +1 >Emitted(102, 5) Source(90, 6) + SourceIndex(0) +2 >Emitted(102, 9) Source(90, 10) + SourceIndex(0) +3 >Emitted(102, 44) Source(90, 30) + SourceIndex(0) +--- +>>> console.log(multiRobotAInfo); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > multiRobotAInfo +7 > ) +8 > ; +1 >Emitted(103, 5) Source(91, 5) + SourceIndex(0) +2 >Emitted(103, 12) Source(91, 12) + SourceIndex(0) +3 >Emitted(103, 13) Source(91, 13) + SourceIndex(0) +4 >Emitted(103, 16) Source(91, 16) + SourceIndex(0) +5 >Emitted(103, 17) Source(91, 17) + SourceIndex(0) +6 >Emitted(103, 32) Source(91, 32) + SourceIndex(0) +7 >Emitted(103, 33) Source(91, 33) + SourceIndex(0) +8 >Emitted(103, 34) Source(91, 34) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(104, 2) Source(92, 2) + SourceIndex(0) +--- +>>>for (var _34 = 0, _35 = [multiRobotA, multiRobotB]; _34 < _35.length; _34++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^^ +16> ^ +1-> + > +2 >for +3 > +4 > (let [...multiRobotAInfo] of +5 > [multiRobotA, multiRobotB] +6 > +7 > [ +8 > multiRobotA +9 > , +10> multiRobotB +11> ] +12> +13> [multiRobotA, multiRobotB] +14> +15> [multiRobotA, multiRobotB] +16> ) +1->Emitted(105, 1) Source(93, 1) + SourceIndex(0) +2 >Emitted(105, 4) Source(93, 4) + SourceIndex(0) +3 >Emitted(105, 5) Source(93, 5) + SourceIndex(0) +4 >Emitted(105, 6) Source(93, 34) + SourceIndex(0) +5 >Emitted(105, 17) Source(93, 60) + SourceIndex(0) +6 >Emitted(105, 19) Source(93, 34) + SourceIndex(0) +7 >Emitted(105, 26) Source(93, 35) + SourceIndex(0) +8 >Emitted(105, 37) Source(93, 46) + SourceIndex(0) +9 >Emitted(105, 39) Source(93, 48) + SourceIndex(0) +10>Emitted(105, 50) Source(93, 59) + SourceIndex(0) +11>Emitted(105, 51) Source(93, 60) + SourceIndex(0) +12>Emitted(105, 53) Source(93, 34) + SourceIndex(0) +13>Emitted(105, 69) Source(93, 60) + SourceIndex(0) +14>Emitted(105, 71) Source(93, 34) + SourceIndex(0) +15>Emitted(105, 76) Source(93, 60) + SourceIndex(0) +16>Emitted(105, 77) Source(93, 61) + SourceIndex(0) +--- +>>> var multiRobotAInfo = _35[_34].slice(0); +1 >^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > let +3 > [...multiRobotAInfo] +1 >Emitted(106, 5) Source(93, 6) + SourceIndex(0) +2 >Emitted(106, 9) Source(93, 10) + SourceIndex(0) +3 >Emitted(106, 44) Source(93, 30) + SourceIndex(0) +--- +>>> console.log(multiRobotAInfo); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > of [multiRobotA, multiRobotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > multiRobotAInfo +7 > ) +8 > ; +1 >Emitted(107, 5) Source(94, 5) + SourceIndex(0) +2 >Emitted(107, 12) Source(94, 12) + SourceIndex(0) +3 >Emitted(107, 13) Source(94, 13) + SourceIndex(0) +4 >Emitted(107, 16) Source(94, 16) + SourceIndex(0) +5 >Emitted(107, 17) Source(94, 17) + SourceIndex(0) +6 >Emitted(107, 32) Source(94, 32) + SourceIndex(0) +7 >Emitted(107, 33) Source(94, 33) + SourceIndex(0) +8 >Emitted(107, 34) Source(94, 34) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(108, 2) Source(95, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringForOfArrayBindingPattern.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.symbols b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.symbols new file mode 100644 index 00000000000..7d4412805e0 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.symbols @@ -0,0 +1,323 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPattern.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 11)) + + log(msg: any): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 1, 8)) +} +type Robot = [number, string, string]; +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 2, 1)) + +type MultiSkilledRobot = [string, [string, string]]; +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 3, 38)) + +let robotA: Robot = [1, "mower", "mowing"]; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 6, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 2, 1)) + +let robotB: Robot = [2, "trimmer", "trimming"]; +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 7, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 2, 1)) + +let robots = [robotA, robotB]; +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 8, 3)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 6, 3)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 7, 3)) + +function getRobots() { +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 8, 30)) + + return robots; +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 8, 3)) +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 13, 3)) +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 3, 38)) + +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 14, 3)) +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 3, 38)) + +let multiRobots = [multiRobotA, multiRobotB]; +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 15, 3)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 13, 3)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 14, 3)) + +function getMultiRobots() { +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 15, 45)) + + return multiRobots; +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 15, 3)) +} + +for (let [, nameA] of robots) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 20, 11)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 8, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 20, 11)) +} +for (let [, nameA] of getRobots()) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 23, 11)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 8, 30)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 23, 11)) +} +for (let [, nameA] of [robotA, robotB]) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 26, 11)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 6, 3)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 7, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 26, 11)) +} +for (let [, [primarySkillA, secondarySkillA]] of multiRobots) { +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 29, 13)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 29, 27)) +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 15, 3)) + + console.log(primarySkillA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 29, 13)) +} +for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) { +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 32, 13)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 32, 27)) +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 15, 45)) + + console.log(primarySkillA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 32, 13)) +} +for (let [, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 35, 13)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 35, 27)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 13, 3)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 14, 3)) + + console.log(primarySkillA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 35, 13)) +} + +for (let [numberB] of robots) { +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 39, 10)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 8, 3)) + + console.log(numberB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 39, 10)) +} +for (let [numberB] of getRobots()) { +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 42, 10)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 8, 30)) + + console.log(numberB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 42, 10)) +} +for (let [numberB] of [robotA, robotB]) { +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 45, 10)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 6, 3)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 7, 3)) + + console.log(numberB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 45, 10)) +} +for (let [nameB] of multiRobots) { +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 48, 10)) +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 15, 3)) + + console.log(nameB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 48, 10)) +} +for (let [nameB] of getMultiRobots()) { +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 51, 10)) +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 15, 45)) + + console.log(nameB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 51, 10)) +} +for (let [nameB] of [multiRobotA, multiRobotB]) { +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 54, 10)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 13, 3)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 14, 3)) + + console.log(nameB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 54, 10)) +} + +for (let [numberA2, nameA2, skillA2] of robots) { +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 58, 10)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 58, 19)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 58, 27)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 8, 3)) + + console.log(nameA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 58, 19)) +} +for (let [numberA2, nameA2, skillA2] of getRobots()) { +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 61, 10)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 61, 19)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 61, 27)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 8, 30)) + + console.log(nameA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 61, 19)) +} +for (let [numberA2, nameA2, skillA2] of [robotA, robotB]) { +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 64, 10)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 64, 19)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 64, 27)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 6, 3)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 7, 3)) + + console.log(nameA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 64, 19)) +} +for (let [nameMA, [primarySkillA, secondarySkillA]] of multiRobots) { +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 67, 10)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 67, 19)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 67, 33)) +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 15, 3)) + + console.log(nameMA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 67, 10)) +} +for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 70, 10)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 70, 19)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 70, 33)) +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 15, 45)) + + console.log(nameMA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 70, 10)) +} +for (let [nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 73, 10)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 73, 19)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 73, 33)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 13, 3)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 14, 3)) + + console.log(nameMA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 73, 10)) +} + +for (let [numberA3, ...robotAInfo] of robots) { +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 77, 10)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 77, 19)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 8, 3)) + + console.log(numberA3); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 77, 10)) +} +for (let [numberA3, ...robotAInfo] of getRobots()) { +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 80, 10)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 80, 19)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 8, 30)) + + console.log(numberA3); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 80, 10)) +} +for (let [numberA3, ...robotAInfo] of [robotA, robotB]) { +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 83, 10)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 83, 19)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 6, 3)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 7, 3)) + + console.log(numberA3); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 83, 10)) +} +for (let [...multiRobotAInfo] of multiRobots) { +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 86, 10)) +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 15, 3)) + + console.log(multiRobotAInfo); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 86, 10)) +} +for (let [...multiRobotAInfo] of getMultiRobots()) { +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 89, 10)) +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 15, 45)) + + console.log(multiRobotAInfo); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 89, 10)) +} +for (let [...multiRobotAInfo] of [multiRobotA, multiRobotB]) { +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 92, 10)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 13, 3)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 14, 3)) + + console.log(multiRobotAInfo); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 0, 22)) +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern.ts, 92, 10)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.types b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.types new file mode 100644 index 00000000000..95c947f8fcc --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.types @@ -0,0 +1,389 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPattern.ts === +declare var console: { +>console : { log(msg: any): void; } + + log(msg: any): void; +>log : (msg: any) => void +>msg : any +} +type Robot = [number, string, string]; +>Robot : [number, string, string] + +type MultiSkilledRobot = [string, [string, string]]; +>MultiSkilledRobot : [string, [string, string]] + +let robotA: Robot = [1, "mower", "mowing"]; +>robotA : [number, string, string] +>Robot : [number, string, string] +>[1, "mower", "mowing"] : [number, string, string] +>1 : number +>"mower" : string +>"mowing" : string + +let robotB: Robot = [2, "trimmer", "trimming"]; +>robotB : [number, string, string] +>Robot : [number, string, string] +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + +let robots = [robotA, robotB]; +>robots : [number, string, string][] +>[robotA, robotB] : [number, string, string][] +>robotA : [number, string, string] +>robotB : [number, string, string] + +function getRobots() { +>getRobots : () => [number, string, string][] + + return robots; +>robots : [number, string, string][] +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +>multiRobotA : [string, [string, string]] +>MultiSkilledRobot : [string, [string, string]] +>["mower", ["mowing", ""]] : [string, [string, string]] +>"mower" : string +>["mowing", ""] : [string, string] +>"mowing" : string +>"" : string + +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +>multiRobotB : [string, [string, string]] +>MultiSkilledRobot : [string, [string, string]] +>["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>"trimmer" : string +>["trimming", "edging"] : [string, string] +>"trimming" : string +>"edging" : string + +let multiRobots = [multiRobotA, multiRobotB]; +>multiRobots : [string, [string, string]][] +>[multiRobotA, multiRobotB] : [string, [string, string]][] +>multiRobotA : [string, [string, string]] +>multiRobotB : [string, [string, string]] + +function getMultiRobots() { +>getMultiRobots : () => [string, [string, string]][] + + return multiRobots; +>multiRobots : [string, [string, string]][] +} + +for (let [, nameA] of robots) { +> : undefined +>nameA : string +>robots : [number, string, string][] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let [, nameA] of getRobots()) { +> : undefined +>nameA : string +>getRobots() : [number, string, string][] +>getRobots : () => [number, string, string][] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let [, nameA] of [robotA, robotB]) { +> : undefined +>nameA : string +>[robotA, robotB] : [number, string, string][] +>robotA : [number, string, string] +>robotB : [number, string, string] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let [, [primarySkillA, secondarySkillA]] of multiRobots) { +> : undefined +>primarySkillA : string +>secondarySkillA : string +>multiRobots : [string, [string, string]][] + + console.log(primarySkillA); +>console.log(primarySkillA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primarySkillA : string +} +for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) { +> : undefined +>primarySkillA : string +>secondarySkillA : string +>getMultiRobots() : [string, [string, string]][] +>getMultiRobots : () => [string, [string, string]][] + + console.log(primarySkillA); +>console.log(primarySkillA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primarySkillA : string +} +for (let [, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { +> : undefined +>primarySkillA : string +>secondarySkillA : string +>[multiRobotA, multiRobotB] : [string, [string, string]][] +>multiRobotA : [string, [string, string]] +>multiRobotB : [string, [string, string]] + + console.log(primarySkillA); +>console.log(primarySkillA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primarySkillA : string +} + +for (let [numberB] of robots) { +>numberB : number +>robots : [number, string, string][] + + console.log(numberB); +>console.log(numberB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberB : number +} +for (let [numberB] of getRobots()) { +>numberB : number +>getRobots() : [number, string, string][] +>getRobots : () => [number, string, string][] + + console.log(numberB); +>console.log(numberB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberB : number +} +for (let [numberB] of [robotA, robotB]) { +>numberB : number +>[robotA, robotB] : [number, string, string][] +>robotA : [number, string, string] +>robotB : [number, string, string] + + console.log(numberB); +>console.log(numberB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberB : number +} +for (let [nameB] of multiRobots) { +>nameB : string +>multiRobots : [string, [string, string]][] + + console.log(nameB); +>console.log(nameB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameB : string +} +for (let [nameB] of getMultiRobots()) { +>nameB : string +>getMultiRobots() : [string, [string, string]][] +>getMultiRobots : () => [string, [string, string]][] + + console.log(nameB); +>console.log(nameB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameB : string +} +for (let [nameB] of [multiRobotA, multiRobotB]) { +>nameB : string +>[multiRobotA, multiRobotB] : [string, [string, string]][] +>multiRobotA : [string, [string, string]] +>multiRobotB : [string, [string, string]] + + console.log(nameB); +>console.log(nameB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameB : string +} + +for (let [numberA2, nameA2, skillA2] of robots) { +>numberA2 : number +>nameA2 : string +>skillA2 : string +>robots : [number, string, string][] + + console.log(nameA2); +>console.log(nameA2) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA2 : string +} +for (let [numberA2, nameA2, skillA2] of getRobots()) { +>numberA2 : number +>nameA2 : string +>skillA2 : string +>getRobots() : [number, string, string][] +>getRobots : () => [number, string, string][] + + console.log(nameA2); +>console.log(nameA2) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA2 : string +} +for (let [numberA2, nameA2, skillA2] of [robotA, robotB]) { +>numberA2 : number +>nameA2 : string +>skillA2 : string +>[robotA, robotB] : [number, string, string][] +>robotA : [number, string, string] +>robotB : [number, string, string] + + console.log(nameA2); +>console.log(nameA2) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA2 : string +} +for (let [nameMA, [primarySkillA, secondarySkillA]] of multiRobots) { +>nameMA : string +>primarySkillA : string +>secondarySkillA : string +>multiRobots : [string, [string, string]][] + + console.log(nameMA); +>console.log(nameMA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMA : string +} +for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { +>nameMA : string +>primarySkillA : string +>secondarySkillA : string +>getMultiRobots() : [string, [string, string]][] +>getMultiRobots : () => [string, [string, string]][] + + console.log(nameMA); +>console.log(nameMA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMA : string +} +for (let [nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { +>nameMA : string +>primarySkillA : string +>secondarySkillA : string +>[multiRobotA, multiRobotB] : [string, [string, string]][] +>multiRobotA : [string, [string, string]] +>multiRobotB : [string, [string, string]] + + console.log(nameMA); +>console.log(nameMA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMA : string +} + +for (let [numberA3, ...robotAInfo] of robots) { +>numberA3 : number +>robotAInfo : (number | string)[] +>robots : [number, string, string][] + + console.log(numberA3); +>console.log(numberA3) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberA3 : number +} +for (let [numberA3, ...robotAInfo] of getRobots()) { +>numberA3 : number +>robotAInfo : (number | string)[] +>getRobots() : [number, string, string][] +>getRobots : () => [number, string, string][] + + console.log(numberA3); +>console.log(numberA3) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberA3 : number +} +for (let [numberA3, ...robotAInfo] of [robotA, robotB]) { +>numberA3 : number +>robotAInfo : (number | string)[] +>[robotA, robotB] : [number, string, string][] +>robotA : [number, string, string] +>robotB : [number, string, string] + + console.log(numberA3); +>console.log(numberA3) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberA3 : number +} +for (let [...multiRobotAInfo] of multiRobots) { +>multiRobotAInfo : (string | [string, string])[] +>multiRobots : [string, [string, string]][] + + console.log(multiRobotAInfo); +>console.log(multiRobotAInfo) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>multiRobotAInfo : (string | [string, string])[] +} +for (let [...multiRobotAInfo] of getMultiRobots()) { +>multiRobotAInfo : (string | [string, string])[] +>getMultiRobots() : [string, [string, string]][] +>getMultiRobots : () => [string, [string, string]][] + + console.log(multiRobotAInfo); +>console.log(multiRobotAInfo) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>multiRobotAInfo : (string | [string, string])[] +} +for (let [...multiRobotAInfo] of [multiRobotA, multiRobotB]) { +>multiRobotAInfo : (string | [string, string])[] +>[multiRobotA, multiRobotB] : [string, [string, string]][] +>multiRobotA : [string, [string, string]] +>multiRobotB : [string, [string, string]] + + console.log(multiRobotAInfo); +>console.log(multiRobotAInfo) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>multiRobotAInfo : (string | [string, string])[] +} diff --git a/tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPattern.ts b/tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPattern.ts new file mode 100644 index 00000000000..f2fb461f443 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPattern.ts @@ -0,0 +1,96 @@ +// @sourcemap: true +declare var console: { + log(msg: any): void; +} +type Robot = [number, string, string]; +type MultiSkilledRobot = [string, [string, string]]; + +let robotA: Robot = [1, "mower", "mowing"]; +let robotB: Robot = [2, "trimmer", "trimming"]; +let robots = [robotA, robotB]; +function getRobots() { + return robots; +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +let multiRobots = [multiRobotA, multiRobotB]; +function getMultiRobots() { + return multiRobots; +} + +for (let [, nameA] of robots) { + console.log(nameA); +} +for (let [, nameA] of getRobots()) { + console.log(nameA); +} +for (let [, nameA] of [robotA, robotB]) { + console.log(nameA); +} +for (let [, [primarySkillA, secondarySkillA]] of multiRobots) { + console.log(primarySkillA); +} +for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + console.log(primarySkillA); +} +for (let [, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + console.log(primarySkillA); +} + +for (let [numberB] of robots) { + console.log(numberB); +} +for (let [numberB] of getRobots()) { + console.log(numberB); +} +for (let [numberB] of [robotA, robotB]) { + console.log(numberB); +} +for (let [nameB] of multiRobots) { + console.log(nameB); +} +for (let [nameB] of getMultiRobots()) { + console.log(nameB); +} +for (let [nameB] of [multiRobotA, multiRobotB]) { + console.log(nameB); +} + +for (let [numberA2, nameA2, skillA2] of robots) { + console.log(nameA2); +} +for (let [numberA2, nameA2, skillA2] of getRobots()) { + console.log(nameA2); +} +for (let [numberA2, nameA2, skillA2] of [robotA, robotB]) { + console.log(nameA2); +} +for (let [nameMA, [primarySkillA, secondarySkillA]] of multiRobots) { + console.log(nameMA); +} +for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + console.log(nameMA); +} +for (let [nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + console.log(nameMA); +} + +for (let [numberA3, ...robotAInfo] of robots) { + console.log(numberA3); +} +for (let [numberA3, ...robotAInfo] of getRobots()) { + console.log(numberA3); +} +for (let [numberA3, ...robotAInfo] of [robotA, robotB]) { + console.log(numberA3); +} +for (let [...multiRobotAInfo] of multiRobots) { + console.log(multiRobotAInfo); +} +for (let [...multiRobotAInfo] of getMultiRobots()) { + console.log(multiRobotAInfo); +} +for (let [...multiRobotAInfo] of [multiRobotA, multiRobotB]) { + console.log(multiRobotAInfo); +} \ No newline at end of file From 24d0c98b5172df0ccc2e3020ee2869adf9aa3da6 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 8 Dec 2015 14:34:25 -0800 Subject: [PATCH 028/209] Test case for "For" statement with object binding pattern --- ...ionDestructuringForObjectBindingPattern.js | 114 ++ ...estructuringForObjectBindingPattern.js.map | 2 + ...uringForObjectBindingPattern.sourcemap.txt | 1550 +++++++++++++++++ ...structuringForObjectBindingPattern.symbols | 282 +++ ...DestructuringForObjectBindingPattern.types | 374 ++++ ...ionDestructuringForObjectBindingPattern.ts | 67 + 6 files changed, 2389 insertions(+) create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.types create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPattern.ts diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.js b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.js new file mode 100644 index 00000000000..ca29b2eabd8 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.js @@ -0,0 +1,114 @@ +//// [sourceMapValidationDestructuringForObjectBindingPattern.ts] +declare var console: { + log(msg: any): void; +} +interface Robot { + name: string; + skill: string; +} + +interface MultiRobot { + name: string; + skills: { + primary: string; + secondary: string; + }; +} + +let robot: Robot = { name: "mower", skill: "mowing" }; +let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +function getRobot() { + return robot; +} +function getMultiRobot() { + return multiRobot; +} + +for (let {name: nameA } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } = + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} + +for (let {name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} + +//// [sourceMapValidationDestructuringForObjectBindingPattern.js] +var robot = { name: "mower", skill: "mowing" }; +var multiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +function getRobot() { + return robot; +} +function getMultiRobot() { + return multiRobot; +} +for (var nameA = robot.name, i = 0; i < 1; i++) { + console.log(nameA); +} +for (var nameA = getRobot().name, i = 0; i < 1; i++) { + console.log(nameA); +} +for (var nameA = { name: "trimmer", skill: "trimming" }.name, i = 0; i < 1; i++) { + console.log(nameA); +} +for (var _a = multiRobot.skills, primaryA = _a.primary, secondaryA = _a.secondary, i = 0; i < 1; i++) { + console.log(primaryA); +} +for (var _b = getMultiRobot().skills, primaryA = _b.primary, secondaryA = _b.secondary, i = 0; i < 1; i++) { + console.log(primaryA); +} +for (var _c = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }.skills, primaryA = _c.primary, secondaryA = _c.secondary, i = 0; i < 1; i++) { + console.log(primaryA); +} +for (var nameA = robot.name, skillA = robot.skill, i = 0; i < 1; i++) { + console.log(nameA); +} +for (var _d = getRobot(), nameA = _d.name, skillA = _d.skill, i = 0; i < 1; i++) { + console.log(nameA); +} +for (var _e = { name: "trimmer", skill: "trimming" }, nameA = _e.name, skillA = _e.skill, i = 0; i < 1; i++) { + console.log(nameA); +} +for (var nameA = multiRobot.name, _f = multiRobot.skills, primaryA = _f.primary, secondaryA = _f.secondary, i = 0; i < 1; i++) { + console.log(primaryA); +} +for (var _g = getMultiRobot(), nameA = _g.name, _h = _g.skills, primaryA = _h.primary, secondaryA = _h.secondary, i = 0; i < 1; i++) { + console.log(primaryA); +} +for (var _j = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, nameA = _j.name, _k = _j.skills, primaryA = _k.primary, secondaryA = _k.secondary, i = 0; i < 1; i++) { + console.log(primaryA); +} +//# sourceMappingURL=sourceMapValidationDestructuringForObjectBindingPattern.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.js.map new file mode 100644 index 00000000000..b931afe67b0 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringForObjectBindingPattern.js.map] +{"version":3,"file":"sourceMapValidationDestructuringForObjectBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForObjectBindingPattern.ts"],"names":[],"mappings":"AAgBA,IAAI,KAAK,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACtD,IAAI,UAAU,GAAe,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;AACjG;IACI,MAAM,CAAC,KAAK,CAAC;AACjB,CAAC;AACD;IACI,MAAM,CAAC,UAAU,CAAC;AACtB,CAAC;AAED,GAAG,CAAC,CAAC,GAAG,CAAC,kBAAsB,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,uBAA2B,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACtD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,mDAA8D,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACzF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAG,sBAAM,EA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AG,CAAE,uBAAW,EAAE,sBAAM,EAAI,qBAAiB,EAAE,yBAAqB,EAAmB,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC5G,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAwE,oBAAe,EAArF,eAAW,EAAE,cAAM,EAAI,qBAAiB,EAAE,yBAAqB,EAAwB,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjH,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CACJ,8EAAqF,EAD/E,eAAW,EAAE,cAAM,EAAI,qBAAiB,EAAE,yBAAqB,EAErE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACpB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.sourcemap.txt new file mode 100644 index 00000000000..f598cc385f8 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.sourcemap.txt @@ -0,0 +1,1550 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringForObjectBindingPattern.js +mapUrl: sourceMapValidationDestructuringForObjectBindingPattern.js.map +sourceRoot: +sources: sourceMapValidationDestructuringForObjectBindingPattern.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPattern.js +sourceFile:sourceMapValidationDestructuringForObjectBindingPattern.ts +------------------------------------------------------------------- +>>>var robot = { name: "mower", skill: "mowing" }; +1 > +2 >^^^^ +3 > ^^^^^ +4 > ^^^ +5 > ^^ +6 > ^^^^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^ +11> ^^ +12> ^^^^^^^^ +13> ^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 >declare var console: { + > log(msg: any): void; + >} + >interface Robot { + > name: string; + > skill: string; + >} + > + >interface MultiRobot { + > name: string; + > skills: { + > primary: string; + > secondary: string; + > }; + >} + > + > +2 >let +3 > robot +4 > : Robot = +5 > { +6 > name +7 > : +8 > "mower" +9 > , +10> skill +11> : +12> "mowing" +13> } +14> ; +1 >Emitted(1, 1) Source(17, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(17, 5) + SourceIndex(0) +3 >Emitted(1, 10) Source(17, 10) + SourceIndex(0) +4 >Emitted(1, 13) Source(17, 20) + SourceIndex(0) +5 >Emitted(1, 15) Source(17, 22) + SourceIndex(0) +6 >Emitted(1, 19) Source(17, 26) + SourceIndex(0) +7 >Emitted(1, 21) Source(17, 28) + SourceIndex(0) +8 >Emitted(1, 28) Source(17, 35) + SourceIndex(0) +9 >Emitted(1, 30) Source(17, 37) + SourceIndex(0) +10>Emitted(1, 35) Source(17, 42) + SourceIndex(0) +11>Emitted(1, 37) Source(17, 44) + SourceIndex(0) +12>Emitted(1, 45) Source(17, 52) + SourceIndex(0) +13>Emitted(1, 47) Source(17, 54) + SourceIndex(0) +14>Emitted(1, 48) Source(17, 55) + SourceIndex(0) +--- +>>>var multiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +1-> +2 >^^^^ +3 > ^^^^^^^^^^ +4 > ^^^ +5 > ^^ +6 > ^^^^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^^ +12> ^^ +13> ^^^^^^^ +14> ^^ +15> ^^^^^^^^ +16> ^^ +17> ^^^^^^^^^ +18> ^^ +19> ^^^^^^ +20> ^^ +21> ^^ +22> ^ +1-> + > +2 >let +3 > multiRobot +4 > : MultiRobot = +5 > { +6 > name +7 > : +8 > "mower" +9 > , +10> skills +11> : +12> { +13> primary +14> : +15> "mowing" +16> , +17> secondary +18> : +19> "none" +20> } +21> } +22> ; +1->Emitted(2, 1) Source(18, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(18, 5) + SourceIndex(0) +3 >Emitted(2, 15) Source(18, 15) + SourceIndex(0) +4 >Emitted(2, 18) Source(18, 30) + SourceIndex(0) +5 >Emitted(2, 20) Source(18, 32) + SourceIndex(0) +6 >Emitted(2, 24) Source(18, 36) + SourceIndex(0) +7 >Emitted(2, 26) Source(18, 38) + SourceIndex(0) +8 >Emitted(2, 33) Source(18, 45) + SourceIndex(0) +9 >Emitted(2, 35) Source(18, 47) + SourceIndex(0) +10>Emitted(2, 41) Source(18, 53) + SourceIndex(0) +11>Emitted(2, 43) Source(18, 55) + SourceIndex(0) +12>Emitted(2, 45) Source(18, 57) + SourceIndex(0) +13>Emitted(2, 52) Source(18, 64) + SourceIndex(0) +14>Emitted(2, 54) Source(18, 66) + SourceIndex(0) +15>Emitted(2, 62) Source(18, 74) + SourceIndex(0) +16>Emitted(2, 64) Source(18, 76) + SourceIndex(0) +17>Emitted(2, 73) Source(18, 85) + SourceIndex(0) +18>Emitted(2, 75) Source(18, 87) + SourceIndex(0) +19>Emitted(2, 81) Source(18, 93) + SourceIndex(0) +20>Emitted(2, 83) Source(18, 95) + SourceIndex(0) +21>Emitted(2, 85) Source(18, 97) + SourceIndex(0) +22>Emitted(2, 86) Source(18, 98) + SourceIndex(0) +--- +>>>function getRobot() { +1 > +2 >^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(3, 1) Source(19, 1) + SourceIndex(0) +--- +>>> return robot; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^ +5 > ^ +1->function getRobot() { + > +2 > return +3 > +4 > robot +5 > ; +1->Emitted(4, 5) Source(20, 5) + SourceIndex(0) +2 >Emitted(4, 11) Source(20, 11) + SourceIndex(0) +3 >Emitted(4, 12) Source(20, 12) + SourceIndex(0) +4 >Emitted(4, 17) Source(20, 17) + SourceIndex(0) +5 >Emitted(4, 18) Source(20, 18) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(5, 1) Source(21, 1) + SourceIndex(0) +2 >Emitted(5, 2) Source(21, 2) + SourceIndex(0) +--- +>>>function getMultiRobot() { +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +1->Emitted(6, 1) Source(22, 1) + SourceIndex(0) +--- +>>> return multiRobot; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^^^^^ +5 > ^ +1->function getMultiRobot() { + > +2 > return +3 > +4 > multiRobot +5 > ; +1->Emitted(7, 5) Source(23, 5) + SourceIndex(0) +2 >Emitted(7, 11) Source(23, 11) + SourceIndex(0) +3 >Emitted(7, 12) Source(23, 12) + SourceIndex(0) +4 >Emitted(7, 22) Source(23, 22) + SourceIndex(0) +5 >Emitted(7, 23) Source(23, 23) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(8, 1) Source(24, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(24, 2) + SourceIndex(0) +--- +>>>for (var nameA = robot.name, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ +1-> + > + > +2 >for +3 > +4 > ( +5 > let +6 > +7 > {name: nameA } = robot +8 > , +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { +1->Emitted(9, 1) Source(26, 1) + SourceIndex(0) +2 >Emitted(9, 4) Source(26, 4) + SourceIndex(0) +3 >Emitted(9, 5) Source(26, 5) + SourceIndex(0) +4 >Emitted(9, 6) Source(26, 6) + SourceIndex(0) +5 >Emitted(9, 9) Source(26, 9) + SourceIndex(0) +6 >Emitted(9, 10) Source(26, 10) + SourceIndex(0) +7 >Emitted(9, 28) Source(26, 32) + SourceIndex(0) +8 >Emitted(9, 30) Source(26, 34) + SourceIndex(0) +9 >Emitted(9, 31) Source(26, 35) + SourceIndex(0) +10>Emitted(9, 34) Source(26, 38) + SourceIndex(0) +11>Emitted(9, 35) Source(26, 39) + SourceIndex(0) +12>Emitted(9, 37) Source(26, 41) + SourceIndex(0) +13>Emitted(9, 38) Source(26, 42) + SourceIndex(0) +14>Emitted(9, 41) Source(26, 45) + SourceIndex(0) +15>Emitted(9, 42) Source(26, 46) + SourceIndex(0) +16>Emitted(9, 44) Source(26, 48) + SourceIndex(0) +17>Emitted(9, 45) Source(26, 49) + SourceIndex(0) +18>Emitted(9, 47) Source(26, 51) + SourceIndex(0) +19>Emitted(9, 49) Source(26, 53) + SourceIndex(0) +20>Emitted(9, 50) Source(26, 54) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(10, 5) Source(27, 5) + SourceIndex(0) +2 >Emitted(10, 12) Source(27, 12) + SourceIndex(0) +3 >Emitted(10, 13) Source(27, 13) + SourceIndex(0) +4 >Emitted(10, 16) Source(27, 16) + SourceIndex(0) +5 >Emitted(10, 17) Source(27, 17) + SourceIndex(0) +6 >Emitted(10, 22) Source(27, 22) + SourceIndex(0) +7 >Emitted(10, 23) Source(27, 23) + SourceIndex(0) +8 >Emitted(10, 24) Source(27, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(11, 1) Source(28, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(28, 2) + SourceIndex(0) +--- +>>>for (var nameA = getRobot().name, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > +7 > {name: nameA } = getRobot() +8 > , +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { +1->Emitted(12, 1) Source(29, 1) + SourceIndex(0) +2 >Emitted(12, 4) Source(29, 4) + SourceIndex(0) +3 >Emitted(12, 5) Source(29, 5) + SourceIndex(0) +4 >Emitted(12, 6) Source(29, 6) + SourceIndex(0) +5 >Emitted(12, 9) Source(29, 9) + SourceIndex(0) +6 >Emitted(12, 10) Source(29, 10) + SourceIndex(0) +7 >Emitted(12, 33) Source(29, 37) + SourceIndex(0) +8 >Emitted(12, 35) Source(29, 39) + SourceIndex(0) +9 >Emitted(12, 36) Source(29, 40) + SourceIndex(0) +10>Emitted(12, 39) Source(29, 43) + SourceIndex(0) +11>Emitted(12, 40) Source(29, 44) + SourceIndex(0) +12>Emitted(12, 42) Source(29, 46) + SourceIndex(0) +13>Emitted(12, 43) Source(29, 47) + SourceIndex(0) +14>Emitted(12, 46) Source(29, 50) + SourceIndex(0) +15>Emitted(12, 47) Source(29, 51) + SourceIndex(0) +16>Emitted(12, 49) Source(29, 53) + SourceIndex(0) +17>Emitted(12, 50) Source(29, 54) + SourceIndex(0) +18>Emitted(12, 52) Source(29, 56) + SourceIndex(0) +19>Emitted(12, 54) Source(29, 58) + SourceIndex(0) +20>Emitted(12, 55) Source(29, 59) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(13, 5) Source(30, 5) + SourceIndex(0) +2 >Emitted(13, 12) Source(30, 12) + SourceIndex(0) +3 >Emitted(13, 13) Source(30, 13) + SourceIndex(0) +4 >Emitted(13, 16) Source(30, 16) + SourceIndex(0) +5 >Emitted(13, 17) Source(30, 17) + SourceIndex(0) +6 >Emitted(13, 22) Source(30, 22) + SourceIndex(0) +7 >Emitted(13, 23) Source(30, 23) + SourceIndex(0) +8 >Emitted(13, 24) Source(30, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(14, 1) Source(31, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(31, 2) + SourceIndex(0) +--- +>>>for (var nameA = { name: "trimmer", skill: "trimming" }.name, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > +7 > {name: nameA } = { name: "trimmer", skill: "trimming" } +8 > , +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { +1->Emitted(15, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(15, 4) Source(32, 4) + SourceIndex(0) +3 >Emitted(15, 5) Source(32, 5) + SourceIndex(0) +4 >Emitted(15, 6) Source(32, 6) + SourceIndex(0) +5 >Emitted(15, 9) Source(32, 9) + SourceIndex(0) +6 >Emitted(15, 10) Source(32, 10) + SourceIndex(0) +7 >Emitted(15, 61) Source(32, 72) + SourceIndex(0) +8 >Emitted(15, 63) Source(32, 74) + SourceIndex(0) +9 >Emitted(15, 64) Source(32, 75) + SourceIndex(0) +10>Emitted(15, 67) Source(32, 78) + SourceIndex(0) +11>Emitted(15, 68) Source(32, 79) + SourceIndex(0) +12>Emitted(15, 70) Source(32, 81) + SourceIndex(0) +13>Emitted(15, 71) Source(32, 82) + SourceIndex(0) +14>Emitted(15, 74) Source(32, 85) + SourceIndex(0) +15>Emitted(15, 75) Source(32, 86) + SourceIndex(0) +16>Emitted(15, 77) Source(32, 88) + SourceIndex(0) +17>Emitted(15, 78) Source(32, 89) + SourceIndex(0) +18>Emitted(15, 80) Source(32, 91) + SourceIndex(0) +19>Emitted(15, 82) Source(32, 93) + SourceIndex(0) +20>Emitted(15, 83) Source(32, 94) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(16, 5) Source(33, 5) + SourceIndex(0) +2 >Emitted(16, 12) Source(33, 12) + SourceIndex(0) +3 >Emitted(16, 13) Source(33, 13) + SourceIndex(0) +4 >Emitted(16, 16) Source(33, 16) + SourceIndex(0) +5 >Emitted(16, 17) Source(33, 17) + SourceIndex(0) +6 >Emitted(16, 22) Source(33, 22) + SourceIndex(0) +7 >Emitted(16, 23) Source(33, 23) + SourceIndex(0) +8 >Emitted(16, 24) Source(33, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(17, 1) Source(34, 1) + SourceIndex(0) +2 >Emitted(17, 2) Source(34, 2) + SourceIndex(0) +--- +>>>for (var _a = multiRobot.skills, primaryA = _a.primary, secondaryA = _a.secondary, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > { +7 > skills +8 > : { +9 > primary: primaryA +10> , +11> secondary: secondaryA +12> } } = multiRobot, +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(18, 1) Source(35, 1) + SourceIndex(0) +2 >Emitted(18, 4) Source(35, 4) + SourceIndex(0) +3 >Emitted(18, 5) Source(35, 5) + SourceIndex(0) +4 >Emitted(18, 6) Source(35, 6) + SourceIndex(0) +5 >Emitted(18, 9) Source(35, 9) + SourceIndex(0) +6 >Emitted(18, 10) Source(35, 12) + SourceIndex(0) +7 >Emitted(18, 32) Source(35, 18) + SourceIndex(0) +8 >Emitted(18, 34) Source(35, 22) + SourceIndex(0) +9 >Emitted(18, 55) Source(35, 39) + SourceIndex(0) +10>Emitted(18, 57) Source(35, 41) + SourceIndex(0) +11>Emitted(18, 82) Source(35, 62) + SourceIndex(0) +12>Emitted(18, 84) Source(35, 81) + SourceIndex(0) +13>Emitted(18, 85) Source(35, 82) + SourceIndex(0) +14>Emitted(18, 88) Source(35, 85) + SourceIndex(0) +15>Emitted(18, 89) Source(35, 86) + SourceIndex(0) +16>Emitted(18, 91) Source(35, 88) + SourceIndex(0) +17>Emitted(18, 92) Source(35, 89) + SourceIndex(0) +18>Emitted(18, 95) Source(35, 92) + SourceIndex(0) +19>Emitted(18, 96) Source(35, 93) + SourceIndex(0) +20>Emitted(18, 98) Source(35, 95) + SourceIndex(0) +21>Emitted(18, 99) Source(35, 96) + SourceIndex(0) +22>Emitted(18, 101) Source(35, 98) + SourceIndex(0) +23>Emitted(18, 103) Source(35, 100) + SourceIndex(0) +24>Emitted(18, 104) Source(35, 101) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(19, 5) Source(36, 5) + SourceIndex(0) +2 >Emitted(19, 12) Source(36, 12) + SourceIndex(0) +3 >Emitted(19, 13) Source(36, 13) + SourceIndex(0) +4 >Emitted(19, 16) Source(36, 16) + SourceIndex(0) +5 >Emitted(19, 17) Source(36, 17) + SourceIndex(0) +6 >Emitted(19, 25) Source(36, 25) + SourceIndex(0) +7 >Emitted(19, 26) Source(36, 26) + SourceIndex(0) +8 >Emitted(19, 27) Source(36, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(20, 1) Source(37, 1) + SourceIndex(0) +2 >Emitted(20, 2) Source(37, 2) + SourceIndex(0) +--- +>>>for (var _b = getMultiRobot().skills, primaryA = _b.primary, secondaryA = _b.secondary, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > { +7 > skills +8 > : { +9 > primary: primaryA +10> , +11> secondary: secondaryA +12> } } = getMultiRobot(), +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(21, 1) Source(38, 1) + SourceIndex(0) +2 >Emitted(21, 4) Source(38, 4) + SourceIndex(0) +3 >Emitted(21, 5) Source(38, 5) + SourceIndex(0) +4 >Emitted(21, 6) Source(38, 6) + SourceIndex(0) +5 >Emitted(21, 9) Source(38, 9) + SourceIndex(0) +6 >Emitted(21, 10) Source(38, 12) + SourceIndex(0) +7 >Emitted(21, 37) Source(38, 18) + SourceIndex(0) +8 >Emitted(21, 39) Source(38, 22) + SourceIndex(0) +9 >Emitted(21, 60) Source(38, 39) + SourceIndex(0) +10>Emitted(21, 62) Source(38, 41) + SourceIndex(0) +11>Emitted(21, 87) Source(38, 62) + SourceIndex(0) +12>Emitted(21, 89) Source(38, 86) + SourceIndex(0) +13>Emitted(21, 90) Source(38, 87) + SourceIndex(0) +14>Emitted(21, 93) Source(38, 90) + SourceIndex(0) +15>Emitted(21, 94) Source(38, 91) + SourceIndex(0) +16>Emitted(21, 96) Source(38, 93) + SourceIndex(0) +17>Emitted(21, 97) Source(38, 94) + SourceIndex(0) +18>Emitted(21, 100) Source(38, 97) + SourceIndex(0) +19>Emitted(21, 101) Source(38, 98) + SourceIndex(0) +20>Emitted(21, 103) Source(38, 100) + SourceIndex(0) +21>Emitted(21, 104) Source(38, 101) + SourceIndex(0) +22>Emitted(21, 106) Source(38, 103) + SourceIndex(0) +23>Emitted(21, 108) Source(38, 105) + SourceIndex(0) +24>Emitted(21, 109) Source(38, 106) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(22, 5) Source(39, 5) + SourceIndex(0) +2 >Emitted(22, 12) Source(39, 12) + SourceIndex(0) +3 >Emitted(22, 13) Source(39, 13) + SourceIndex(0) +4 >Emitted(22, 16) Source(39, 16) + SourceIndex(0) +5 >Emitted(22, 17) Source(39, 17) + SourceIndex(0) +6 >Emitted(22, 25) Source(39, 25) + SourceIndex(0) +7 >Emitted(22, 26) Source(39, 26) + SourceIndex(0) +8 >Emitted(22, 27) Source(39, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(23, 1) Source(40, 1) + SourceIndex(0) +2 >Emitted(23, 2) Source(40, 2) + SourceIndex(0) +--- +>>>for (var _c = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }.skills, primaryA = _c.primary, secondaryA = _c.secondary, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > { +7 > skills +8 > : { +9 > primary: primaryA +10> , +11> secondary: secondaryA +12> } } = + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + > +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(24, 1) Source(41, 1) + SourceIndex(0) +2 >Emitted(24, 4) Source(41, 4) + SourceIndex(0) +3 >Emitted(24, 5) Source(41, 5) + SourceIndex(0) +4 >Emitted(24, 6) Source(41, 6) + SourceIndex(0) +5 >Emitted(24, 9) Source(41, 9) + SourceIndex(0) +6 >Emitted(24, 10) Source(41, 12) + SourceIndex(0) +7 >Emitted(24, 95) Source(41, 18) + SourceIndex(0) +8 >Emitted(24, 97) Source(41, 22) + SourceIndex(0) +9 >Emitted(24, 118) Source(41, 39) + SourceIndex(0) +10>Emitted(24, 120) Source(41, 41) + SourceIndex(0) +11>Emitted(24, 145) Source(41, 62) + SourceIndex(0) +12>Emitted(24, 147) Source(43, 5) + SourceIndex(0) +13>Emitted(24, 148) Source(43, 6) + SourceIndex(0) +14>Emitted(24, 151) Source(43, 9) + SourceIndex(0) +15>Emitted(24, 152) Source(43, 10) + SourceIndex(0) +16>Emitted(24, 154) Source(43, 12) + SourceIndex(0) +17>Emitted(24, 155) Source(43, 13) + SourceIndex(0) +18>Emitted(24, 158) Source(43, 16) + SourceIndex(0) +19>Emitted(24, 159) Source(43, 17) + SourceIndex(0) +20>Emitted(24, 161) Source(43, 19) + SourceIndex(0) +21>Emitted(24, 162) Source(43, 20) + SourceIndex(0) +22>Emitted(24, 164) Source(43, 22) + SourceIndex(0) +23>Emitted(24, 166) Source(43, 24) + SourceIndex(0) +24>Emitted(24, 167) Source(43, 25) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(25, 5) Source(44, 5) + SourceIndex(0) +2 >Emitted(25, 12) Source(44, 12) + SourceIndex(0) +3 >Emitted(25, 13) Source(44, 13) + SourceIndex(0) +4 >Emitted(25, 16) Source(44, 16) + SourceIndex(0) +5 >Emitted(25, 17) Source(44, 17) + SourceIndex(0) +6 >Emitted(25, 25) Source(44, 25) + SourceIndex(0) +7 >Emitted(25, 26) Source(44, 26) + SourceIndex(0) +8 >Emitted(25, 27) Source(44, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(26, 1) Source(45, 1) + SourceIndex(0) +2 >Emitted(26, 2) Source(45, 2) + SourceIndex(0) +--- +>>>for (var nameA = robot.name, skillA = robot.skill, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ +1-> + > + > +2 >for +3 > +4 > ( +5 > let +6 > { +7 > name: nameA +8 > , +9 > skill: skillA +10> } = robot, +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { +1->Emitted(27, 1) Source(47, 1) + SourceIndex(0) +2 >Emitted(27, 4) Source(47, 4) + SourceIndex(0) +3 >Emitted(27, 5) Source(47, 5) + SourceIndex(0) +4 >Emitted(27, 6) Source(47, 6) + SourceIndex(0) +5 >Emitted(27, 9) Source(47, 9) + SourceIndex(0) +6 >Emitted(27, 10) Source(47, 11) + SourceIndex(0) +7 >Emitted(27, 28) Source(47, 22) + SourceIndex(0) +8 >Emitted(27, 30) Source(47, 24) + SourceIndex(0) +9 >Emitted(27, 50) Source(47, 37) + SourceIndex(0) +10>Emitted(27, 52) Source(47, 49) + SourceIndex(0) +11>Emitted(27, 53) Source(47, 50) + SourceIndex(0) +12>Emitted(27, 56) Source(47, 53) + SourceIndex(0) +13>Emitted(27, 57) Source(47, 54) + SourceIndex(0) +14>Emitted(27, 59) Source(47, 56) + SourceIndex(0) +15>Emitted(27, 60) Source(47, 57) + SourceIndex(0) +16>Emitted(27, 63) Source(47, 60) + SourceIndex(0) +17>Emitted(27, 64) Source(47, 61) + SourceIndex(0) +18>Emitted(27, 66) Source(47, 63) + SourceIndex(0) +19>Emitted(27, 67) Source(47, 64) + SourceIndex(0) +20>Emitted(27, 69) Source(47, 66) + SourceIndex(0) +21>Emitted(27, 71) Source(47, 68) + SourceIndex(0) +22>Emitted(27, 72) Source(47, 69) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(28, 5) Source(48, 5) + SourceIndex(0) +2 >Emitted(28, 12) Source(48, 12) + SourceIndex(0) +3 >Emitted(28, 13) Source(48, 13) + SourceIndex(0) +4 >Emitted(28, 16) Source(48, 16) + SourceIndex(0) +5 >Emitted(28, 17) Source(48, 17) + SourceIndex(0) +6 >Emitted(28, 22) Source(48, 22) + SourceIndex(0) +7 >Emitted(28, 23) Source(48, 23) + SourceIndex(0) +8 >Emitted(28, 24) Source(48, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(29, 1) Source(49, 1) + SourceIndex(0) +2 >Emitted(29, 2) Source(49, 2) + SourceIndex(0) +--- +>>>for (var _d = getRobot(), nameA = _d.name, skillA = _d.skill, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > {name: nameA, skill: skillA } = +7 > getRobot() +8 > +9 > name: nameA +10> , +11> skill: skillA +12> } = getRobot(), +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(30, 1) Source(50, 1) + SourceIndex(0) +2 >Emitted(30, 4) Source(50, 4) + SourceIndex(0) +3 >Emitted(30, 5) Source(50, 5) + SourceIndex(0) +4 >Emitted(30, 6) Source(50, 6) + SourceIndex(0) +5 >Emitted(30, 9) Source(50, 9) + SourceIndex(0) +6 >Emitted(30, 10) Source(50, 42) + SourceIndex(0) +7 >Emitted(30, 25) Source(50, 52) + SourceIndex(0) +8 >Emitted(30, 27) Source(50, 11) + SourceIndex(0) +9 >Emitted(30, 42) Source(50, 22) + SourceIndex(0) +10>Emitted(30, 44) Source(50, 24) + SourceIndex(0) +11>Emitted(30, 61) Source(50, 37) + SourceIndex(0) +12>Emitted(30, 63) Source(50, 54) + SourceIndex(0) +13>Emitted(30, 64) Source(50, 55) + SourceIndex(0) +14>Emitted(30, 67) Source(50, 58) + SourceIndex(0) +15>Emitted(30, 68) Source(50, 59) + SourceIndex(0) +16>Emitted(30, 70) Source(50, 61) + SourceIndex(0) +17>Emitted(30, 71) Source(50, 62) + SourceIndex(0) +18>Emitted(30, 74) Source(50, 65) + SourceIndex(0) +19>Emitted(30, 75) Source(50, 66) + SourceIndex(0) +20>Emitted(30, 77) Source(50, 68) + SourceIndex(0) +21>Emitted(30, 78) Source(50, 69) + SourceIndex(0) +22>Emitted(30, 80) Source(50, 71) + SourceIndex(0) +23>Emitted(30, 82) Source(50, 73) + SourceIndex(0) +24>Emitted(30, 83) Source(50, 74) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(31, 5) Source(51, 5) + SourceIndex(0) +2 >Emitted(31, 12) Source(51, 12) + SourceIndex(0) +3 >Emitted(31, 13) Source(51, 13) + SourceIndex(0) +4 >Emitted(31, 16) Source(51, 16) + SourceIndex(0) +5 >Emitted(31, 17) Source(51, 17) + SourceIndex(0) +6 >Emitted(31, 22) Source(51, 22) + SourceIndex(0) +7 >Emitted(31, 23) Source(51, 23) + SourceIndex(0) +8 >Emitted(31, 24) Source(51, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(32, 1) Source(52, 1) + SourceIndex(0) +2 >Emitted(32, 2) Source(52, 2) + SourceIndex(0) +--- +>>>for (var _e = { name: "trimmer", skill: "trimming" }, nameA = _e.name, skillA = _e.skill, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > {name: nameA, skill: skillA } = +7 > { name: "trimmer", skill: "trimming" } +8 > +9 > name: nameA +10> , +11> skill: skillA +12> } = { name: "trimmer", skill: "trimming" }, +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(33, 1) Source(53, 1) + SourceIndex(0) +2 >Emitted(33, 4) Source(53, 4) + SourceIndex(0) +3 >Emitted(33, 5) Source(53, 5) + SourceIndex(0) +4 >Emitted(33, 6) Source(53, 6) + SourceIndex(0) +5 >Emitted(33, 9) Source(53, 9) + SourceIndex(0) +6 >Emitted(33, 10) Source(53, 42) + SourceIndex(0) +7 >Emitted(33, 53) Source(53, 87) + SourceIndex(0) +8 >Emitted(33, 55) Source(53, 11) + SourceIndex(0) +9 >Emitted(33, 70) Source(53, 22) + SourceIndex(0) +10>Emitted(33, 72) Source(53, 24) + SourceIndex(0) +11>Emitted(33, 89) Source(53, 37) + SourceIndex(0) +12>Emitted(33, 91) Source(53, 89) + SourceIndex(0) +13>Emitted(33, 92) Source(53, 90) + SourceIndex(0) +14>Emitted(33, 95) Source(53, 93) + SourceIndex(0) +15>Emitted(33, 96) Source(53, 94) + SourceIndex(0) +16>Emitted(33, 98) Source(53, 96) + SourceIndex(0) +17>Emitted(33, 99) Source(53, 97) + SourceIndex(0) +18>Emitted(33, 102) Source(53, 100) + SourceIndex(0) +19>Emitted(33, 103) Source(53, 101) + SourceIndex(0) +20>Emitted(33, 105) Source(53, 103) + SourceIndex(0) +21>Emitted(33, 106) Source(53, 104) + SourceIndex(0) +22>Emitted(33, 108) Source(53, 106) + SourceIndex(0) +23>Emitted(33, 110) Source(53, 108) + SourceIndex(0) +24>Emitted(33, 111) Source(53, 109) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(34, 5) Source(54, 5) + SourceIndex(0) +2 >Emitted(34, 12) Source(54, 12) + SourceIndex(0) +3 >Emitted(34, 13) Source(54, 13) + SourceIndex(0) +4 >Emitted(34, 16) Source(54, 16) + SourceIndex(0) +5 >Emitted(34, 17) Source(54, 17) + SourceIndex(0) +6 >Emitted(34, 22) Source(54, 22) + SourceIndex(0) +7 >Emitted(34, 23) Source(54, 23) + SourceIndex(0) +8 >Emitted(34, 24) Source(54, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(35, 1) Source(55, 1) + SourceIndex(0) +2 >Emitted(35, 2) Source(55, 2) + SourceIndex(0) +--- +>>>for (var nameA = multiRobot.name, _f = multiRobot.skills, primaryA = _f.primary, secondaryA = _f.secondary, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^^ +21> ^ +22> ^^ +23> ^ +24> ^^ +25> ^^ +26> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > { +7 > name: nameA +8 > , +9 > skills +10> : { +11> primary: primaryA +12> , +13> secondary: secondaryA +14> } } = multiRobot, +15> i +16> = +17> 0 +18> ; +19> i +20> < +21> 1 +22> ; +23> i +24> ++ +25> ) +26> { +1->Emitted(36, 1) Source(56, 1) + SourceIndex(0) +2 >Emitted(36, 4) Source(56, 4) + SourceIndex(0) +3 >Emitted(36, 5) Source(56, 5) + SourceIndex(0) +4 >Emitted(36, 6) Source(56, 6) + SourceIndex(0) +5 >Emitted(36, 9) Source(56, 9) + SourceIndex(0) +6 >Emitted(36, 10) Source(56, 11) + SourceIndex(0) +7 >Emitted(36, 33) Source(56, 22) + SourceIndex(0) +8 >Emitted(36, 35) Source(56, 24) + SourceIndex(0) +9 >Emitted(36, 57) Source(56, 30) + SourceIndex(0) +10>Emitted(36, 59) Source(56, 34) + SourceIndex(0) +11>Emitted(36, 80) Source(56, 51) + SourceIndex(0) +12>Emitted(36, 82) Source(56, 53) + SourceIndex(0) +13>Emitted(36, 107) Source(56, 74) + SourceIndex(0) +14>Emitted(36, 109) Source(56, 93) + SourceIndex(0) +15>Emitted(36, 110) Source(56, 94) + SourceIndex(0) +16>Emitted(36, 113) Source(56, 97) + SourceIndex(0) +17>Emitted(36, 114) Source(56, 98) + SourceIndex(0) +18>Emitted(36, 116) Source(56, 100) + SourceIndex(0) +19>Emitted(36, 117) Source(56, 101) + SourceIndex(0) +20>Emitted(36, 120) Source(56, 104) + SourceIndex(0) +21>Emitted(36, 121) Source(56, 105) + SourceIndex(0) +22>Emitted(36, 123) Source(56, 107) + SourceIndex(0) +23>Emitted(36, 124) Source(56, 108) + SourceIndex(0) +24>Emitted(36, 126) Source(56, 110) + SourceIndex(0) +25>Emitted(36, 128) Source(56, 112) + SourceIndex(0) +26>Emitted(36, 129) Source(56, 113) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(37, 5) Source(57, 5) + SourceIndex(0) +2 >Emitted(37, 12) Source(57, 12) + SourceIndex(0) +3 >Emitted(37, 13) Source(57, 13) + SourceIndex(0) +4 >Emitted(37, 16) Source(57, 16) + SourceIndex(0) +5 >Emitted(37, 17) Source(57, 17) + SourceIndex(0) +6 >Emitted(37, 25) Source(57, 25) + SourceIndex(0) +7 >Emitted(37, 26) Source(57, 26) + SourceIndex(0) +8 >Emitted(37, 27) Source(57, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(38, 1) Source(58, 1) + SourceIndex(0) +2 >Emitted(38, 2) Source(58, 2) + SourceIndex(0) +--- +>>>for (var _g = getMultiRobot(), nameA = _g.name, _h = _g.skills, primaryA = _h.primary, secondaryA = _h.secondary, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^^^^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^ +27> ^^ +28> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = +7 > getMultiRobot() +8 > +9 > name: nameA +10> , +11> skills +12> : { +13> primary: primaryA +14> , +15> secondary: secondaryA +16> } } = getMultiRobot(), +17> i +18> = +19> 0 +20> ; +21> i +22> < +23> 1 +24> ; +25> i +26> ++ +27> ) +28> { +1->Emitted(39, 1) Source(59, 1) + SourceIndex(0) +2 >Emitted(39, 4) Source(59, 4) + SourceIndex(0) +3 >Emitted(39, 5) Source(59, 5) + SourceIndex(0) +4 >Emitted(39, 6) Source(59, 6) + SourceIndex(0) +5 >Emitted(39, 9) Source(59, 9) + SourceIndex(0) +6 >Emitted(39, 10) Source(59, 81) + SourceIndex(0) +7 >Emitted(39, 30) Source(59, 96) + SourceIndex(0) +8 >Emitted(39, 32) Source(59, 11) + SourceIndex(0) +9 >Emitted(39, 47) Source(59, 22) + SourceIndex(0) +10>Emitted(39, 49) Source(59, 24) + SourceIndex(0) +11>Emitted(39, 63) Source(59, 30) + SourceIndex(0) +12>Emitted(39, 65) Source(59, 34) + SourceIndex(0) +13>Emitted(39, 86) Source(59, 51) + SourceIndex(0) +14>Emitted(39, 88) Source(59, 53) + SourceIndex(0) +15>Emitted(39, 113) Source(59, 74) + SourceIndex(0) +16>Emitted(39, 115) Source(59, 98) + SourceIndex(0) +17>Emitted(39, 116) Source(59, 99) + SourceIndex(0) +18>Emitted(39, 119) Source(59, 102) + SourceIndex(0) +19>Emitted(39, 120) Source(59, 103) + SourceIndex(0) +20>Emitted(39, 122) Source(59, 105) + SourceIndex(0) +21>Emitted(39, 123) Source(59, 106) + SourceIndex(0) +22>Emitted(39, 126) Source(59, 109) + SourceIndex(0) +23>Emitted(39, 127) Source(59, 110) + SourceIndex(0) +24>Emitted(39, 129) Source(59, 112) + SourceIndex(0) +25>Emitted(39, 130) Source(59, 113) + SourceIndex(0) +26>Emitted(39, 132) Source(59, 115) + SourceIndex(0) +27>Emitted(39, 134) Source(59, 117) + SourceIndex(0) +28>Emitted(39, 135) Source(59, 118) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(40, 5) Source(60, 5) + SourceIndex(0) +2 >Emitted(40, 12) Source(60, 12) + SourceIndex(0) +3 >Emitted(40, 13) Source(60, 13) + SourceIndex(0) +4 >Emitted(40, 16) Source(60, 16) + SourceIndex(0) +5 >Emitted(40, 17) Source(60, 17) + SourceIndex(0) +6 >Emitted(40, 25) Source(60, 25) + SourceIndex(0) +7 >Emitted(40, 26) Source(60, 26) + SourceIndex(0) +8 >Emitted(40, 27) Source(60, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(41, 1) Source(61, 1) + SourceIndex(0) +2 >Emitted(41, 2) Source(61, 2) + SourceIndex(0) +--- +>>>for (var _j = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, nameA = _j.name, _k = _j.skills, primaryA = _k.primary, secondaryA = _k.secondary, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^^^^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^ +27> ^^ +28> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = + > +7 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } +8 > +9 > name: nameA +10> , +11> skills +12> : { +13> primary: primaryA +14> , +15> secondary: secondaryA +16> } } = + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + > +17> i +18> = +19> 0 +20> ; +21> i +22> < +23> 1 +24> ; +25> i +26> ++ +27> ) +28> { +1->Emitted(42, 1) Source(62, 1) + SourceIndex(0) +2 >Emitted(42, 4) Source(62, 4) + SourceIndex(0) +3 >Emitted(42, 5) Source(62, 5) + SourceIndex(0) +4 >Emitted(42, 6) Source(62, 6) + SourceIndex(0) +5 >Emitted(42, 9) Source(62, 9) + SourceIndex(0) +6 >Emitted(42, 10) Source(63, 5) + SourceIndex(0) +7 >Emitted(42, 88) Source(63, 90) + SourceIndex(0) +8 >Emitted(42, 90) Source(62, 11) + SourceIndex(0) +9 >Emitted(42, 105) Source(62, 22) + SourceIndex(0) +10>Emitted(42, 107) Source(62, 24) + SourceIndex(0) +11>Emitted(42, 121) Source(62, 30) + SourceIndex(0) +12>Emitted(42, 123) Source(62, 34) + SourceIndex(0) +13>Emitted(42, 144) Source(62, 51) + SourceIndex(0) +14>Emitted(42, 146) Source(62, 53) + SourceIndex(0) +15>Emitted(42, 171) Source(62, 74) + SourceIndex(0) +16>Emitted(42, 173) Source(64, 5) + SourceIndex(0) +17>Emitted(42, 174) Source(64, 6) + SourceIndex(0) +18>Emitted(42, 177) Source(64, 9) + SourceIndex(0) +19>Emitted(42, 178) Source(64, 10) + SourceIndex(0) +20>Emitted(42, 180) Source(64, 12) + SourceIndex(0) +21>Emitted(42, 181) Source(64, 13) + SourceIndex(0) +22>Emitted(42, 184) Source(64, 16) + SourceIndex(0) +23>Emitted(42, 185) Source(64, 17) + SourceIndex(0) +24>Emitted(42, 187) Source(64, 19) + SourceIndex(0) +25>Emitted(42, 188) Source(64, 20) + SourceIndex(0) +26>Emitted(42, 190) Source(64, 22) + SourceIndex(0) +27>Emitted(42, 192) Source(64, 24) + SourceIndex(0) +28>Emitted(42, 193) Source(64, 25) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(43, 5) Source(65, 5) + SourceIndex(0) +2 >Emitted(43, 12) Source(65, 12) + SourceIndex(0) +3 >Emitted(43, 13) Source(65, 13) + SourceIndex(0) +4 >Emitted(43, 16) Source(65, 16) + SourceIndex(0) +5 >Emitted(43, 17) Source(65, 17) + SourceIndex(0) +6 >Emitted(43, 25) Source(65, 25) + SourceIndex(0) +7 >Emitted(43, 26) Source(65, 26) + SourceIndex(0) +8 >Emitted(43, 27) Source(65, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(44, 1) Source(66, 1) + SourceIndex(0) +2 >Emitted(44, 2) Source(66, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringForObjectBindingPattern.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.symbols b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.symbols new file mode 100644 index 00000000000..7037783e9a1 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.symbols @@ -0,0 +1,282 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPattern.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 11)) + + log(msg: any): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 1, 8)) +} +interface Robot { +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 2, 1)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 3, 17)) + + skill: string; +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 4, 17)) +} + +interface MultiRobot { +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 6, 1)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 8, 22)) + + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 9, 17)) + + primary: string; +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 10, 13)) + + secondary: string; +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 11, 24)) + + }; +} + +let robot: Robot = { name: "mower", skill: "mowing" }; +>robot : Symbol(robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 16, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 16, 20)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 16, 35)) + +let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +>multiRobot : Symbol(multiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 17, 3)) +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 17, 30)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 17, 45)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 17, 55)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 17, 74)) + +function getRobot() { +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 17, 97)) + + return robot; +>robot : Symbol(robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 16, 3)) +} +function getMultiRobot() { +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 20, 1)) + + return multiRobot; +>multiRobot : Symbol(multiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 17, 3)) +} + +for (let {name: nameA } = robot, i = 0; i < 1; i++) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 25, 10)) +>robot : Symbol(robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 16, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 25, 32)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 25, 32)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 25, 32)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 25, 10)) +} +for (let {name: nameA } = getRobot(), i = 0; i < 1; i++) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 28, 10)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 17, 97)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 28, 37)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 28, 37)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 28, 37)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 28, 10)) +} +for (let {name: nameA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 31, 10)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 31, 34)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 31, 51)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 31, 72)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 31, 72)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 31, 72)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 31, 10)) +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 9, 17)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 34, 20)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 11, 24)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 34, 39)) +>multiRobot : Symbol(multiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 17, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 34, 79)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 34, 79)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 34, 79)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 34, 20)) +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 9, 17)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 37, 20)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 11, 24)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 37, 39)) +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 20, 1)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 37, 84)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 37, 84)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 37, 84)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 37, 20)) +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } = +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 9, 17)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 40, 20)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 11, 24)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 40, 39)) + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 41, 17)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 41, 34)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 41, 44)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 41, 65)) + + i = 0; i < 1; i++) { +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 41, 90)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 41, 90)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 41, 90)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 40, 20)) +} + +for (let {name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 46, 10)) +>skill : Symbol(Robot.skill, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 4, 17)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 46, 22)) +>robot : Symbol(robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 16, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 46, 47)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 46, 47)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 46, 47)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 46, 10)) +} +for (let {name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 49, 10)) +>skill : Symbol(Robot.skill, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 4, 17)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 49, 22)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 17, 97)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 49, 52)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 49, 52)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 49, 52)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 49, 10)) +} +for (let {name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 52, 10)) +>skill : Symbol(Robot.skill, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 4, 17)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 52, 22)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 52, 49)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 52, 66)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 52, 87)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 52, 87)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 52, 87)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 52, 10)) +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { +>name : Symbol(MultiRobot.name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 8, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 55, 10)) +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 9, 17)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 55, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 11, 24)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 55, 51)) +>multiRobot : Symbol(multiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 17, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 55, 91)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 55, 91)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 55, 91)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 55, 32)) +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { +>name : Symbol(MultiRobot.name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 8, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 58, 10)) +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 9, 17)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 58, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 11, 24)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 58, 51)) +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 20, 1)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 58, 96)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 58, 96)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 58, 96)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 58, 32)) +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = +>name : Symbol(MultiRobot.name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 8, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 61, 10)) +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 9, 17)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 61, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 11, 24)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 61, 51)) + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 62, 17)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 62, 34)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 62, 44)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 62, 65)) + + i = 0; i < 1; i++) { +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 62, 90)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 62, 90)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 62, 90)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 61, 32)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.types b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.types new file mode 100644 index 00000000000..21a7122e564 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.types @@ -0,0 +1,374 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPattern.ts === +declare var console: { +>console : { log(msg: any): void; } + + log(msg: any): void; +>log : (msg: any) => void +>msg : any +} +interface Robot { +>Robot : Robot + + name: string; +>name : string + + skill: string; +>skill : string +} + +interface MultiRobot { +>MultiRobot : MultiRobot + + name: string; +>name : string + + skills: { +>skills : { primary: string; secondary: string; } + + primary: string; +>primary : string + + secondary: string; +>secondary : string + + }; +} + +let robot: Robot = { name: "mower", skill: "mowing" }; +>robot : Robot +>Robot : Robot +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string + +let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +>multiRobot : MultiRobot +>MultiRobot : MultiRobot +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"mower" : string +>skills : { primary: string; secondary: string; } +>{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } +>primary : string +>"mowing" : string +>secondary : string +>"none" : string + +function getRobot() { +>getRobot : () => Robot + + return robot; +>robot : Robot +} +function getMultiRobot() { +>getMultiRobot : () => MultiRobot + + return multiRobot; +>multiRobot : MultiRobot +} + +for (let {name: nameA } = robot, i = 0; i < 1; i++) { +>name : any +>nameA : string +>robot : Robot +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let {name: nameA } = getRobot(), i = 0; i < 1; i++) { +>name : any +>nameA : string +>getRobot() : Robot +>getRobot : () => Robot +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let {name: nameA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>name : any +>nameA : string +>{ name: "trimmer", skill: "trimming" } : Robot +>Robot : Robot +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { +>skills : any +>primary : any +>primaryA : string +>secondary : any +>secondaryA : string +>multiRobot : MultiRobot +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { +>skills : any +>primary : any +>primaryA : string +>secondary : any +>secondaryA : string +>getMultiRobot() : MultiRobot +>getMultiRobot : () => MultiRobot +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } = +>skills : any +>primary : any +>primaryA : string +>secondary : any +>secondaryA : string + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot +>MultiRobot : MultiRobot +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + + i = 0; i < 1; i++) { +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} + +for (let {name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) { +>name : any +>nameA : string +>skill : any +>skillA : string +>robot : Robot +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let {name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) { +>name : any +>nameA : string +>skill : any +>skillA : string +>getRobot() : Robot +>getRobot : () => Robot +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let {name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>name : any +>nameA : string +>skill : any +>skillA : string +>{ name: "trimmer", skill: "trimming" } : Robot +>Robot : Robot +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { +>name : any +>nameA : string +>skills : any +>primary : any +>primaryA : string +>secondary : any +>secondaryA : string +>multiRobot : MultiRobot +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { +>name : any +>nameA : string +>skills : any +>primary : any +>primaryA : string +>secondary : any +>secondaryA : string +>getMultiRobot() : MultiRobot +>getMultiRobot : () => MultiRobot +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = +>name : any +>nameA : string +>skills : any +>primary : any +>primaryA : string +>secondary : any +>secondaryA : string + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot +>MultiRobot : MultiRobot +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + + i = 0; i < 1; i++) { +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} diff --git a/tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPattern.ts b/tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPattern.ts new file mode 100644 index 00000000000..7d5471db324 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPattern.ts @@ -0,0 +1,67 @@ +// @sourcemap: true +declare var console: { + log(msg: any): void; +} +interface Robot { + name: string; + skill: string; +} + +interface MultiRobot { + name: string; + skills: { + primary: string; + secondary: string; + }; +} + +let robot: Robot = { name: "mower", skill: "mowing" }; +let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +function getRobot() { + return robot; +} +function getMultiRobot() { + return multiRobot; +} + +for (let {name: nameA } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } = + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} + +for (let {name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} \ No newline at end of file From 1da5b15c1a9915c6228dc1e5607f0131cca60472 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 8 Dec 2015 14:46:51 -0800 Subject: [PATCH 029/209] Test case for "For" statement with array binding pattern --- ...tionDestructuringForArrayBindingPattern.js | 177 ++ ...DestructuringForArrayBindingPattern.js.map | 2 + ...turingForArrayBindingPattern.sourcemap.txt | 2825 +++++++++++++++++ ...estructuringForArrayBindingPattern.symbols | 365 +++ ...nDestructuringForArrayBindingPattern.types | 549 ++++ ...tionDestructuringForArrayBindingPattern.ts | 93 + 6 files changed, 4011 insertions(+) create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.types create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPattern.ts diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.js b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.js new file mode 100644 index 00000000000..407af9c08a0 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.js @@ -0,0 +1,177 @@ +//// [sourceMapValidationDestructuringForArrayBindingPattern.ts] +declare var console: { + log(msg: any): void; +} +type Robot = [number, string, string]; +type MultiSkilledRobot = [string, [string, string]]; + +let robotA: Robot = [1, "mower", "mowing"]; +function getRobot() { + return robotA; +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +function getMultiRobot() { + return multiRobotA; +} + +for (let [, nameA] = robotA, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let [, nameA] = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for (let [, nameA] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(nameA); +} +for (let [, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for (let [, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for (let [, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(primarySkillA); +} + +for (let [numberB] = robotA, i = 0; i < 1; i++) { + console.log(numberB); +} +for (let [numberB] = getRobot(), i = 0; i < 1; i++) { + console.log(numberB); +} +for (let [numberB] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(numberB); +} +for (let [nameB] = multiRobotA, i = 0; i < 1; i++) { + console.log(nameB); +} +for (let [nameB] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(nameB); +} +for (let [nameB] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(nameB); +} + +for (let [numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { + console.log(nameA2); +} +for (let [numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { + console.log(nameA2); +} +for (let [numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(nameA2); +} +for (let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + console.log(nameMA); +} +for (let [nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(nameMA); +} +for (let [nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(nameMA); +} + +for (let [numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + console.log(numberA3); +} +for (let [numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + console.log(numberA3); +} +for (let [numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(numberA3); +} +for (let [...multiRobotAInfo] = multiRobotA, i = 0; i < 1; i++) { + console.log(multiRobotAInfo); +} +for (let [...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(multiRobotAInfo); +} +for (let [...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(multiRobotAInfo); +} + +//// [sourceMapValidationDestructuringForArrayBindingPattern.js] +var robotA = [1, "mower", "mowing"]; +function getRobot() { + return robotA; +} +var multiRobotA = ["mower", ["mowing", ""]]; +var multiRobotB = ["trimmer", ["trimming", "edging"]]; +function getMultiRobot() { + return multiRobotA; +} +for (var nameA = robotA[1], i = 0; i < 1; i++) { + console.log(nameA); +} +for (var _a = getRobot(), nameA = _a[1], i = 0; i < 1; i++) { + console.log(nameA); +} +for (var _b = [2, "trimmer", "trimming"], nameA = _b[1], i = 0; i < 1; i++) { + console.log(nameA); +} +for (var _c = multiRobotA[1], primarySkillA = _c[0], secondarySkillA = _c[1], i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for (var _d = getMultiRobot(), _e = _d[1], primarySkillA = _e[0], secondarySkillA = _e[1], i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for (var _f = ["trimmer", ["trimming", "edging"]], _g = _f[1], primarySkillA = _g[0], secondarySkillA = _g[1], i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for (var numberB = robotA[0], i = 0; i < 1; i++) { + console.log(numberB); +} +for (var numberB = getRobot()[0], i = 0; i < 1; i++) { + console.log(numberB); +} +for (var numberB = [2, "trimmer", "trimming"][0], i = 0; i < 1; i++) { + console.log(numberB); +} +for (var nameB = multiRobotA[0], i = 0; i < 1; i++) { + console.log(nameB); +} +for (var nameB = getMultiRobot()[0], i = 0; i < 1; i++) { + console.log(nameB); +} +for (var nameB = ["trimmer", ["trimming", "edging"]][0], i = 0; i < 1; i++) { + console.log(nameB); +} +for (var numberA2 = robotA[0], nameA2 = robotA[1], skillA2 = robotA[2], i = 0; i < 1; i++) { + console.log(nameA2); +} +for (var _h = getRobot(), numberA2 = _h[0], nameA2 = _h[1], skillA2 = _h[2], i = 0; i < 1; i++) { + console.log(nameA2); +} +for (var _j = [2, "trimmer", "trimming"], numberA2 = _j[0], nameA2 = _j[1], skillA2 = _j[2], i = 0; i < 1; i++) { + console.log(nameA2); +} +for (var nameMA = multiRobotA[0], _k = multiRobotA[1], primarySkillA = _k[0], secondarySkillA = _k[1], i = 0; i < 1; i++) { + console.log(nameMA); +} +for (var _l = getMultiRobot(), nameMA = _l[0], _m = _l[1], primarySkillA = _m[0], secondarySkillA = _m[1], i = 0; i < 1; i++) { + console.log(nameMA); +} +for (var _o = ["trimmer", ["trimming", "edging"]], nameMA = _o[0], _p = _o[1], primarySkillA = _p[0], secondarySkillA = _p[1], i = 0; i < 1; i++) { + console.log(nameMA); +} +for (var numberA3 = robotA[0], robotAInfo = robotA.slice(1), i = 0; i < 1; i++) { + console.log(numberA3); +} +for (var _q = getRobot(), numberA3 = _q[0], robotAInfo = _q.slice(1), i = 0; i < 1; i++) { + console.log(numberA3); +} +for (var _r = [2, "trimmer", "trimming"], numberA3 = _r[0], robotAInfo = _r.slice(1), i = 0; i < 1; i++) { + console.log(numberA3); +} +for (var multiRobotAInfo = multiRobotA.slice(0), i = 0; i < 1; i++) { + console.log(multiRobotAInfo); +} +for (var multiRobotAInfo = getMultiRobot().slice(0), i = 0; i < 1; i++) { + console.log(multiRobotAInfo); +} +for (var multiRobotAInfo = ["trimmer", ["trimming", "edging"]].slice(0), i = 0; i < 1; i++) { + console.log(multiRobotAInfo); +} +//# sourceMappingURL=sourceMapValidationDestructuringForArrayBindingPattern.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.js.map new file mode 100644 index 00000000000..efda72d1d96 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringForArrayBindingPattern.js.map] +{"version":3,"file":"sourceMapValidationDestructuringForArrayBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForArrayBindingPattern.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED,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;AACzE;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,GAAG,CAAC,CAAC,GAAG,CAAC,iBAAkB,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC7C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAa,eAAU,EAAtB,aAAsB,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjD,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E,EAAE,CAAC;IACjE,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAA6B,+BAA0B,EAArD,gBAAQ,EAAE,wBAAa,EAAgC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjF,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,sCAAkC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC7D,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,0CAAsC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjE,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,8DAA0D,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACrF,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.sourcemap.txt new file mode 100644 index 00000000000..11ef4f41879 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.sourcemap.txt @@ -0,0 +1,2825 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringForArrayBindingPattern.js +mapUrl: sourceMapValidationDestructuringForArrayBindingPattern.js.map +sourceRoot: +sources: sourceMapValidationDestructuringForArrayBindingPattern.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPattern.js +sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts +------------------------------------------------------------------- +>>>var robotA = [1, "mower", "mowing"]; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^^^^ +11> ^ +12> ^ +1 >declare var console: { + > log(msg: any): void; + >} + >type Robot = [number, string, string]; + >type MultiSkilledRobot = [string, [string, string]]; + > + > +2 >let +3 > robotA +4 > : Robot = +5 > [ +6 > 1 +7 > , +8 > "mower" +9 > , +10> "mowing" +11> ] +12> ; +1 >Emitted(1, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(7, 5) + SourceIndex(0) +3 >Emitted(1, 11) Source(7, 11) + SourceIndex(0) +4 >Emitted(1, 14) Source(7, 21) + SourceIndex(0) +5 >Emitted(1, 15) Source(7, 22) + SourceIndex(0) +6 >Emitted(1, 16) Source(7, 23) + SourceIndex(0) +7 >Emitted(1, 18) Source(7, 25) + SourceIndex(0) +8 >Emitted(1, 25) Source(7, 32) + SourceIndex(0) +9 >Emitted(1, 27) Source(7, 34) + SourceIndex(0) +10>Emitted(1, 35) Source(7, 42) + SourceIndex(0) +11>Emitted(1, 36) Source(7, 43) + SourceIndex(0) +12>Emitted(1, 37) Source(7, 44) + SourceIndex(0) +--- +>>>function getRobot() { +1 > +2 >^^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(2, 1) Source(8, 1) + SourceIndex(0) +--- +>>> return robotA; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +1->function getRobot() { + > +2 > return +3 > +4 > robotA +5 > ; +1->Emitted(3, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(3, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(3, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(3, 18) Source(9, 18) + SourceIndex(0) +5 >Emitted(3, 19) Source(9, 19) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(4, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(4, 2) Source(10, 2) + SourceIndex(0) +--- +>>>var multiRobotA = ["mower", ["mowing", ""]]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^ +10> ^^ +11> ^^ +12> ^ +13> ^ +14> ^ +15> ^^^^^^^^^^^-> +1-> + > + > +2 >let +3 > multiRobotA +4 > : MultiSkilledRobot = +5 > [ +6 > "mower" +7 > , +8 > [ +9 > "mowing" +10> , +11> "" +12> ] +13> ] +14> ; +1->Emitted(5, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(5, 5) Source(12, 5) + SourceIndex(0) +3 >Emitted(5, 16) Source(12, 16) + SourceIndex(0) +4 >Emitted(5, 19) Source(12, 38) + SourceIndex(0) +5 >Emitted(5, 20) Source(12, 39) + SourceIndex(0) +6 >Emitted(5, 27) Source(12, 46) + SourceIndex(0) +7 >Emitted(5, 29) Source(12, 48) + SourceIndex(0) +8 >Emitted(5, 30) Source(12, 49) + SourceIndex(0) +9 >Emitted(5, 38) Source(12, 57) + SourceIndex(0) +10>Emitted(5, 40) Source(12, 59) + SourceIndex(0) +11>Emitted(5, 42) Source(12, 61) + SourceIndex(0) +12>Emitted(5, 43) Source(12, 62) + SourceIndex(0) +13>Emitted(5, 44) Source(12, 63) + SourceIndex(0) +14>Emitted(5, 45) Source(12, 64) + SourceIndex(0) +--- +>>>var multiRobotB = ["trimmer", ["trimming", "edging"]]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^ +12> ^ +13> ^ +14> ^ +1-> + > +2 >let +3 > multiRobotB +4 > : MultiSkilledRobot = +5 > [ +6 > "trimmer" +7 > , +8 > [ +9 > "trimming" +10> , +11> "edging" +12> ] +13> ] +14> ; +1->Emitted(6, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(6, 5) Source(13, 5) + SourceIndex(0) +3 >Emitted(6, 16) Source(13, 16) + SourceIndex(0) +4 >Emitted(6, 19) Source(13, 38) + SourceIndex(0) +5 >Emitted(6, 20) Source(13, 39) + SourceIndex(0) +6 >Emitted(6, 29) Source(13, 48) + SourceIndex(0) +7 >Emitted(6, 31) Source(13, 50) + SourceIndex(0) +8 >Emitted(6, 32) Source(13, 51) + SourceIndex(0) +9 >Emitted(6, 42) Source(13, 61) + SourceIndex(0) +10>Emitted(6, 44) Source(13, 63) + SourceIndex(0) +11>Emitted(6, 52) Source(13, 71) + SourceIndex(0) +12>Emitted(6, 53) Source(13, 72) + SourceIndex(0) +13>Emitted(6, 54) Source(13, 73) + SourceIndex(0) +14>Emitted(6, 55) Source(13, 74) + SourceIndex(0) +--- +>>>function getMultiRobot() { +1 > +2 >^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(7, 1) Source(14, 1) + SourceIndex(0) +--- +>>> return multiRobotA; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^ +5 > ^ +1->function getMultiRobot() { + > +2 > return +3 > +4 > multiRobotA +5 > ; +1->Emitted(8, 5) Source(15, 5) + SourceIndex(0) +2 >Emitted(8, 11) Source(15, 11) + SourceIndex(0) +3 >Emitted(8, 12) Source(15, 12) + SourceIndex(0) +4 >Emitted(8, 23) Source(15, 23) + SourceIndex(0) +5 >Emitted(8, 24) Source(15, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(9, 1) Source(16, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(16, 2) + SourceIndex(0) +--- +>>>for (var nameA = robotA[1], i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ +1-> + > + > +2 >for +3 > +4 > ( +5 > let +6 > +7 > [, nameA] = robotA +8 > , +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { +1->Emitted(10, 1) Source(18, 1) + SourceIndex(0) +2 >Emitted(10, 4) Source(18, 4) + SourceIndex(0) +3 >Emitted(10, 5) Source(18, 5) + SourceIndex(0) +4 >Emitted(10, 6) Source(18, 6) + SourceIndex(0) +5 >Emitted(10, 9) Source(18, 9) + SourceIndex(0) +6 >Emitted(10, 10) Source(18, 10) + SourceIndex(0) +7 >Emitted(10, 27) Source(18, 28) + SourceIndex(0) +8 >Emitted(10, 29) Source(18, 30) + SourceIndex(0) +9 >Emitted(10, 30) Source(18, 31) + SourceIndex(0) +10>Emitted(10, 33) Source(18, 34) + SourceIndex(0) +11>Emitted(10, 34) Source(18, 35) + SourceIndex(0) +12>Emitted(10, 36) Source(18, 37) + SourceIndex(0) +13>Emitted(10, 37) Source(18, 38) + SourceIndex(0) +14>Emitted(10, 40) Source(18, 41) + SourceIndex(0) +15>Emitted(10, 41) Source(18, 42) + SourceIndex(0) +16>Emitted(10, 43) Source(18, 44) + SourceIndex(0) +17>Emitted(10, 44) Source(18, 45) + SourceIndex(0) +18>Emitted(10, 46) Source(18, 47) + SourceIndex(0) +19>Emitted(10, 48) Source(18, 49) + SourceIndex(0) +20>Emitted(10, 49) Source(18, 50) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(11, 5) Source(19, 5) + SourceIndex(0) +2 >Emitted(11, 12) Source(19, 12) + SourceIndex(0) +3 >Emitted(11, 13) Source(19, 13) + SourceIndex(0) +4 >Emitted(11, 16) Source(19, 16) + SourceIndex(0) +5 >Emitted(11, 17) Source(19, 17) + SourceIndex(0) +6 >Emitted(11, 22) Source(19, 22) + SourceIndex(0) +7 >Emitted(11, 23) Source(19, 23) + SourceIndex(0) +8 >Emitted(11, 24) Source(19, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(12, 1) Source(20, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(20, 2) + SourceIndex(0) +--- +>>>for (var _a = getRobot(), nameA = _a[1], i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > [, nameA] = +7 > getRobot() +8 > +9 > [, nameA] = getRobot() +10> , +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { +1->Emitted(13, 1) Source(21, 1) + SourceIndex(0) +2 >Emitted(13, 4) Source(21, 4) + SourceIndex(0) +3 >Emitted(13, 5) Source(21, 5) + SourceIndex(0) +4 >Emitted(13, 6) Source(21, 6) + SourceIndex(0) +5 >Emitted(13, 9) Source(21, 9) + SourceIndex(0) +6 >Emitted(13, 10) Source(21, 22) + SourceIndex(0) +7 >Emitted(13, 25) Source(21, 32) + SourceIndex(0) +8 >Emitted(13, 27) Source(21, 10) + SourceIndex(0) +9 >Emitted(13, 40) Source(21, 32) + SourceIndex(0) +10>Emitted(13, 42) Source(21, 34) + SourceIndex(0) +11>Emitted(13, 43) Source(21, 35) + SourceIndex(0) +12>Emitted(13, 46) Source(21, 38) + SourceIndex(0) +13>Emitted(13, 47) Source(21, 39) + SourceIndex(0) +14>Emitted(13, 49) Source(21, 41) + SourceIndex(0) +15>Emitted(13, 50) Source(21, 42) + SourceIndex(0) +16>Emitted(13, 53) Source(21, 45) + SourceIndex(0) +17>Emitted(13, 54) Source(21, 46) + SourceIndex(0) +18>Emitted(13, 56) Source(21, 48) + SourceIndex(0) +19>Emitted(13, 57) Source(21, 49) + SourceIndex(0) +20>Emitted(13, 59) Source(21, 51) + SourceIndex(0) +21>Emitted(13, 61) Source(21, 53) + SourceIndex(0) +22>Emitted(13, 62) Source(21, 54) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(14, 5) Source(22, 5) + SourceIndex(0) +2 >Emitted(14, 12) Source(22, 12) + SourceIndex(0) +3 >Emitted(14, 13) Source(22, 13) + SourceIndex(0) +4 >Emitted(14, 16) Source(22, 16) + SourceIndex(0) +5 >Emitted(14, 17) Source(22, 17) + SourceIndex(0) +6 >Emitted(14, 22) Source(22, 22) + SourceIndex(0) +7 >Emitted(14, 23) Source(22, 23) + SourceIndex(0) +8 >Emitted(14, 24) Source(22, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(15, 1) Source(23, 1) + SourceIndex(0) +2 >Emitted(15, 2) Source(23, 2) + SourceIndex(0) +--- +>>>for (var _b = [2, "trimmer", "trimming"], nameA = _b[1], i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > [, nameA] = +7 > [2, "trimmer", "trimming"] +8 > +9 > [, nameA] = [2, "trimmer", "trimming"] +10> , +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { +1->Emitted(16, 1) Source(24, 1) + SourceIndex(0) +2 >Emitted(16, 4) Source(24, 4) + SourceIndex(0) +3 >Emitted(16, 5) Source(24, 5) + SourceIndex(0) +4 >Emitted(16, 6) Source(24, 6) + SourceIndex(0) +5 >Emitted(16, 9) Source(24, 9) + SourceIndex(0) +6 >Emitted(16, 10) Source(24, 22) + SourceIndex(0) +7 >Emitted(16, 41) Source(24, 48) + SourceIndex(0) +8 >Emitted(16, 43) Source(24, 10) + SourceIndex(0) +9 >Emitted(16, 56) Source(24, 48) + SourceIndex(0) +10>Emitted(16, 58) Source(24, 50) + SourceIndex(0) +11>Emitted(16, 59) Source(24, 51) + SourceIndex(0) +12>Emitted(16, 62) Source(24, 54) + SourceIndex(0) +13>Emitted(16, 63) Source(24, 55) + SourceIndex(0) +14>Emitted(16, 65) Source(24, 57) + SourceIndex(0) +15>Emitted(16, 66) Source(24, 58) + SourceIndex(0) +16>Emitted(16, 69) Source(24, 61) + SourceIndex(0) +17>Emitted(16, 70) Source(24, 62) + SourceIndex(0) +18>Emitted(16, 72) Source(24, 64) + SourceIndex(0) +19>Emitted(16, 73) Source(24, 65) + SourceIndex(0) +20>Emitted(16, 75) Source(24, 67) + SourceIndex(0) +21>Emitted(16, 77) Source(24, 69) + SourceIndex(0) +22>Emitted(16, 78) Source(24, 70) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(17, 5) Source(25, 5) + SourceIndex(0) +2 >Emitted(17, 12) Source(25, 12) + SourceIndex(0) +3 >Emitted(17, 13) Source(25, 13) + SourceIndex(0) +4 >Emitted(17, 16) Source(25, 16) + SourceIndex(0) +5 >Emitted(17, 17) Source(25, 17) + SourceIndex(0) +6 >Emitted(17, 22) Source(25, 22) + SourceIndex(0) +7 >Emitted(17, 23) Source(25, 23) + SourceIndex(0) +8 >Emitted(17, 24) Source(25, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(18, 1) Source(26, 1) + SourceIndex(0) +2 >Emitted(18, 2) Source(26, 2) + SourceIndex(0) +--- +>>>for (var _c = multiRobotA[1], primarySkillA = _c[0], secondarySkillA = _c[1], i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > [, +7 > [primarySkillA, secondarySkillA] +8 > +9 > primarySkillA +10> , +11> secondarySkillA +12> ]] = multiRobotA, +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(19, 1) Source(27, 1) + SourceIndex(0) +2 >Emitted(19, 4) Source(27, 4) + SourceIndex(0) +3 >Emitted(19, 5) Source(27, 5) + SourceIndex(0) +4 >Emitted(19, 6) Source(27, 6) + SourceIndex(0) +5 >Emitted(19, 9) Source(27, 9) + SourceIndex(0) +6 >Emitted(19, 10) Source(27, 13) + SourceIndex(0) +7 >Emitted(19, 29) Source(27, 45) + SourceIndex(0) +8 >Emitted(19, 31) Source(27, 14) + SourceIndex(0) +9 >Emitted(19, 52) Source(27, 27) + SourceIndex(0) +10>Emitted(19, 54) Source(27, 29) + SourceIndex(0) +11>Emitted(19, 77) Source(27, 44) + SourceIndex(0) +12>Emitted(19, 79) Source(27, 62) + SourceIndex(0) +13>Emitted(19, 80) Source(27, 63) + SourceIndex(0) +14>Emitted(19, 83) Source(27, 66) + SourceIndex(0) +15>Emitted(19, 84) Source(27, 67) + SourceIndex(0) +16>Emitted(19, 86) Source(27, 69) + SourceIndex(0) +17>Emitted(19, 87) Source(27, 70) + SourceIndex(0) +18>Emitted(19, 90) Source(27, 73) + SourceIndex(0) +19>Emitted(19, 91) Source(27, 74) + SourceIndex(0) +20>Emitted(19, 93) Source(27, 76) + SourceIndex(0) +21>Emitted(19, 94) Source(27, 77) + SourceIndex(0) +22>Emitted(19, 96) Source(27, 79) + SourceIndex(0) +23>Emitted(19, 98) Source(27, 81) + SourceIndex(0) +24>Emitted(19, 99) Source(27, 82) + SourceIndex(0) +--- +>>> console.log(primarySkillA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primarySkillA +7 > ) +8 > ; +1 >Emitted(20, 5) Source(28, 5) + SourceIndex(0) +2 >Emitted(20, 12) Source(28, 12) + SourceIndex(0) +3 >Emitted(20, 13) Source(28, 13) + SourceIndex(0) +4 >Emitted(20, 16) Source(28, 16) + SourceIndex(0) +5 >Emitted(20, 17) Source(28, 17) + SourceIndex(0) +6 >Emitted(20, 30) Source(28, 30) + SourceIndex(0) +7 >Emitted(20, 31) Source(28, 31) + SourceIndex(0) +8 >Emitted(20, 32) Source(28, 32) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(21, 1) Source(29, 1) + SourceIndex(0) +2 >Emitted(21, 2) Source(29, 2) + SourceIndex(0) +--- +>>>for (var _d = getMultiRobot(), _e = _d[1], primarySkillA = _e[0], secondarySkillA = _e[1], i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^^^^^^^^^^^^^^^^^^^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^^ +21> ^ +22> ^^ +23> ^ +24> ^^ +25> ^^ +26> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > [, [primarySkillA, secondarySkillA]] = +7 > getMultiRobot() +8 > +9 > [primarySkillA, secondarySkillA] +10> +11> primarySkillA +12> , +13> secondarySkillA +14> ]] = getMultiRobot(), +15> i +16> = +17> 0 +18> ; +19> i +20> < +21> 1 +22> ; +23> i +24> ++ +25> ) +26> { +1->Emitted(22, 1) Source(30, 1) + SourceIndex(0) +2 >Emitted(22, 4) Source(30, 4) + SourceIndex(0) +3 >Emitted(22, 5) Source(30, 5) + SourceIndex(0) +4 >Emitted(22, 6) Source(30, 6) + SourceIndex(0) +5 >Emitted(22, 9) Source(30, 9) + SourceIndex(0) +6 >Emitted(22, 10) Source(30, 49) + SourceIndex(0) +7 >Emitted(22, 30) Source(30, 64) + SourceIndex(0) +8 >Emitted(22, 32) Source(30, 13) + SourceIndex(0) +9 >Emitted(22, 42) Source(30, 45) + SourceIndex(0) +10>Emitted(22, 44) Source(30, 14) + SourceIndex(0) +11>Emitted(22, 65) Source(30, 27) + SourceIndex(0) +12>Emitted(22, 67) Source(30, 29) + SourceIndex(0) +13>Emitted(22, 90) Source(30, 44) + SourceIndex(0) +14>Emitted(22, 92) Source(30, 66) + SourceIndex(0) +15>Emitted(22, 93) Source(30, 67) + SourceIndex(0) +16>Emitted(22, 96) Source(30, 70) + SourceIndex(0) +17>Emitted(22, 97) Source(30, 71) + SourceIndex(0) +18>Emitted(22, 99) Source(30, 73) + SourceIndex(0) +19>Emitted(22, 100) Source(30, 74) + SourceIndex(0) +20>Emitted(22, 103) Source(30, 77) + SourceIndex(0) +21>Emitted(22, 104) Source(30, 78) + SourceIndex(0) +22>Emitted(22, 106) Source(30, 80) + SourceIndex(0) +23>Emitted(22, 107) Source(30, 81) + SourceIndex(0) +24>Emitted(22, 109) Source(30, 83) + SourceIndex(0) +25>Emitted(22, 111) Source(30, 85) + SourceIndex(0) +26>Emitted(22, 112) Source(30, 86) + SourceIndex(0) +--- +>>> console.log(primarySkillA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primarySkillA +7 > ) +8 > ; +1 >Emitted(23, 5) Source(31, 5) + SourceIndex(0) +2 >Emitted(23, 12) Source(31, 12) + SourceIndex(0) +3 >Emitted(23, 13) Source(31, 13) + SourceIndex(0) +4 >Emitted(23, 16) Source(31, 16) + SourceIndex(0) +5 >Emitted(23, 17) Source(31, 17) + SourceIndex(0) +6 >Emitted(23, 30) Source(31, 30) + SourceIndex(0) +7 >Emitted(23, 31) Source(31, 31) + SourceIndex(0) +8 >Emitted(23, 32) Source(31, 32) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(24, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(24, 2) Source(32, 2) + SourceIndex(0) +--- +>>>for (var _f = ["trimmer", ["trimming", "edging"]], _g = _f[1], primarySkillA = _g[0], secondarySkillA = _g[1], i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^^^^^^^^^^^^^^^^^^^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^^ +21> ^ +22> ^^ +23> ^ +24> ^^ +25> ^^ +26> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > [, [primarySkillA, secondarySkillA]] = +7 > ["trimmer", ["trimming", "edging"]] +8 > +9 > [primarySkillA, secondarySkillA] +10> +11> primarySkillA +12> , +13> secondarySkillA +14> ]] = ["trimmer", ["trimming", "edging"]], +15> i +16> = +17> 0 +18> ; +19> i +20> < +21> 1 +22> ; +23> i +24> ++ +25> ) +26> { +1->Emitted(25, 1) Source(33, 1) + SourceIndex(0) +2 >Emitted(25, 4) Source(33, 4) + SourceIndex(0) +3 >Emitted(25, 5) Source(33, 5) + SourceIndex(0) +4 >Emitted(25, 6) Source(33, 6) + SourceIndex(0) +5 >Emitted(25, 9) Source(33, 9) + SourceIndex(0) +6 >Emitted(25, 10) Source(33, 49) + SourceIndex(0) +7 >Emitted(25, 50) Source(33, 84) + SourceIndex(0) +8 >Emitted(25, 52) Source(33, 13) + SourceIndex(0) +9 >Emitted(25, 62) Source(33, 45) + SourceIndex(0) +10>Emitted(25, 64) Source(33, 14) + SourceIndex(0) +11>Emitted(25, 85) Source(33, 27) + SourceIndex(0) +12>Emitted(25, 87) Source(33, 29) + SourceIndex(0) +13>Emitted(25, 110) Source(33, 44) + SourceIndex(0) +14>Emitted(25, 112) Source(33, 86) + SourceIndex(0) +15>Emitted(25, 113) Source(33, 87) + SourceIndex(0) +16>Emitted(25, 116) Source(33, 90) + SourceIndex(0) +17>Emitted(25, 117) Source(33, 91) + SourceIndex(0) +18>Emitted(25, 119) Source(33, 93) + SourceIndex(0) +19>Emitted(25, 120) Source(33, 94) + SourceIndex(0) +20>Emitted(25, 123) Source(33, 97) + SourceIndex(0) +21>Emitted(25, 124) Source(33, 98) + SourceIndex(0) +22>Emitted(25, 126) Source(33, 100) + SourceIndex(0) +23>Emitted(25, 127) Source(33, 101) + SourceIndex(0) +24>Emitted(25, 129) Source(33, 103) + SourceIndex(0) +25>Emitted(25, 131) Source(33, 105) + SourceIndex(0) +26>Emitted(25, 132) Source(33, 106) + SourceIndex(0) +--- +>>> console.log(primarySkillA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primarySkillA +7 > ) +8 > ; +1 >Emitted(26, 5) Source(34, 5) + SourceIndex(0) +2 >Emitted(26, 12) Source(34, 12) + SourceIndex(0) +3 >Emitted(26, 13) Source(34, 13) + SourceIndex(0) +4 >Emitted(26, 16) Source(34, 16) + SourceIndex(0) +5 >Emitted(26, 17) Source(34, 17) + SourceIndex(0) +6 >Emitted(26, 30) Source(34, 30) + SourceIndex(0) +7 >Emitted(26, 31) Source(34, 31) + SourceIndex(0) +8 >Emitted(26, 32) Source(34, 32) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(27, 1) Source(35, 1) + SourceIndex(0) +2 >Emitted(27, 2) Source(35, 2) + SourceIndex(0) +--- +>>>for (var numberB = robotA[0], i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ +1-> + > + > +2 >for +3 > +4 > ( +5 > let +6 > +7 > [numberB] = robotA +8 > , +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { +1->Emitted(28, 1) Source(37, 1) + SourceIndex(0) +2 >Emitted(28, 4) Source(37, 4) + SourceIndex(0) +3 >Emitted(28, 5) Source(37, 5) + SourceIndex(0) +4 >Emitted(28, 6) Source(37, 6) + SourceIndex(0) +5 >Emitted(28, 9) Source(37, 9) + SourceIndex(0) +6 >Emitted(28, 10) Source(37, 10) + SourceIndex(0) +7 >Emitted(28, 29) Source(37, 28) + SourceIndex(0) +8 >Emitted(28, 31) Source(37, 30) + SourceIndex(0) +9 >Emitted(28, 32) Source(37, 31) + SourceIndex(0) +10>Emitted(28, 35) Source(37, 34) + SourceIndex(0) +11>Emitted(28, 36) Source(37, 35) + SourceIndex(0) +12>Emitted(28, 38) Source(37, 37) + SourceIndex(0) +13>Emitted(28, 39) Source(37, 38) + SourceIndex(0) +14>Emitted(28, 42) Source(37, 41) + SourceIndex(0) +15>Emitted(28, 43) Source(37, 42) + SourceIndex(0) +16>Emitted(28, 45) Source(37, 44) + SourceIndex(0) +17>Emitted(28, 46) Source(37, 45) + SourceIndex(0) +18>Emitted(28, 48) Source(37, 47) + SourceIndex(0) +19>Emitted(28, 50) Source(37, 49) + SourceIndex(0) +20>Emitted(28, 51) Source(37, 50) + SourceIndex(0) +--- +>>> console.log(numberB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > numberB +7 > ) +8 > ; +1 >Emitted(29, 5) Source(38, 5) + SourceIndex(0) +2 >Emitted(29, 12) Source(38, 12) + SourceIndex(0) +3 >Emitted(29, 13) Source(38, 13) + SourceIndex(0) +4 >Emitted(29, 16) Source(38, 16) + SourceIndex(0) +5 >Emitted(29, 17) Source(38, 17) + SourceIndex(0) +6 >Emitted(29, 24) Source(38, 24) + SourceIndex(0) +7 >Emitted(29, 25) Source(38, 25) + SourceIndex(0) +8 >Emitted(29, 26) Source(38, 26) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(30, 1) Source(39, 1) + SourceIndex(0) +2 >Emitted(30, 2) Source(39, 2) + SourceIndex(0) +--- +>>>for (var numberB = getRobot()[0], i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > +7 > [numberB] = getRobot() +8 > , +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { +1->Emitted(31, 1) Source(40, 1) + SourceIndex(0) +2 >Emitted(31, 4) Source(40, 4) + SourceIndex(0) +3 >Emitted(31, 5) Source(40, 5) + SourceIndex(0) +4 >Emitted(31, 6) Source(40, 6) + SourceIndex(0) +5 >Emitted(31, 9) Source(40, 9) + SourceIndex(0) +6 >Emitted(31, 10) Source(40, 10) + SourceIndex(0) +7 >Emitted(31, 33) Source(40, 32) + SourceIndex(0) +8 >Emitted(31, 35) Source(40, 34) + SourceIndex(0) +9 >Emitted(31, 36) Source(40, 35) + SourceIndex(0) +10>Emitted(31, 39) Source(40, 38) + SourceIndex(0) +11>Emitted(31, 40) Source(40, 39) + SourceIndex(0) +12>Emitted(31, 42) Source(40, 41) + SourceIndex(0) +13>Emitted(31, 43) Source(40, 42) + SourceIndex(0) +14>Emitted(31, 46) Source(40, 45) + SourceIndex(0) +15>Emitted(31, 47) Source(40, 46) + SourceIndex(0) +16>Emitted(31, 49) Source(40, 48) + SourceIndex(0) +17>Emitted(31, 50) Source(40, 49) + SourceIndex(0) +18>Emitted(31, 52) Source(40, 51) + SourceIndex(0) +19>Emitted(31, 54) Source(40, 53) + SourceIndex(0) +20>Emitted(31, 55) Source(40, 54) + SourceIndex(0) +--- +>>> console.log(numberB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > numberB +7 > ) +8 > ; +1 >Emitted(32, 5) Source(41, 5) + SourceIndex(0) +2 >Emitted(32, 12) Source(41, 12) + SourceIndex(0) +3 >Emitted(32, 13) Source(41, 13) + SourceIndex(0) +4 >Emitted(32, 16) Source(41, 16) + SourceIndex(0) +5 >Emitted(32, 17) Source(41, 17) + SourceIndex(0) +6 >Emitted(32, 24) Source(41, 24) + SourceIndex(0) +7 >Emitted(32, 25) Source(41, 25) + SourceIndex(0) +8 >Emitted(32, 26) Source(41, 26) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(33, 1) Source(42, 1) + SourceIndex(0) +2 >Emitted(33, 2) Source(42, 2) + SourceIndex(0) +--- +>>>for (var numberB = [2, "trimmer", "trimming"][0], i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > +7 > [numberB] = [2, "trimmer", "trimming"] +8 > , +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { +1->Emitted(34, 1) Source(43, 1) + SourceIndex(0) +2 >Emitted(34, 4) Source(43, 4) + SourceIndex(0) +3 >Emitted(34, 5) Source(43, 5) + SourceIndex(0) +4 >Emitted(34, 6) Source(43, 6) + SourceIndex(0) +5 >Emitted(34, 9) Source(43, 9) + SourceIndex(0) +6 >Emitted(34, 10) Source(43, 10) + SourceIndex(0) +7 >Emitted(34, 49) Source(43, 48) + SourceIndex(0) +8 >Emitted(34, 51) Source(43, 50) + SourceIndex(0) +9 >Emitted(34, 52) Source(43, 51) + SourceIndex(0) +10>Emitted(34, 55) Source(43, 54) + SourceIndex(0) +11>Emitted(34, 56) Source(43, 55) + SourceIndex(0) +12>Emitted(34, 58) Source(43, 57) + SourceIndex(0) +13>Emitted(34, 59) Source(43, 58) + SourceIndex(0) +14>Emitted(34, 62) Source(43, 61) + SourceIndex(0) +15>Emitted(34, 63) Source(43, 62) + SourceIndex(0) +16>Emitted(34, 65) Source(43, 64) + SourceIndex(0) +17>Emitted(34, 66) Source(43, 65) + SourceIndex(0) +18>Emitted(34, 68) Source(43, 67) + SourceIndex(0) +19>Emitted(34, 70) Source(43, 69) + SourceIndex(0) +20>Emitted(34, 71) Source(43, 70) + SourceIndex(0) +--- +>>> console.log(numberB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > numberB +7 > ) +8 > ; +1 >Emitted(35, 5) Source(44, 5) + SourceIndex(0) +2 >Emitted(35, 12) Source(44, 12) + SourceIndex(0) +3 >Emitted(35, 13) Source(44, 13) + SourceIndex(0) +4 >Emitted(35, 16) Source(44, 16) + SourceIndex(0) +5 >Emitted(35, 17) Source(44, 17) + SourceIndex(0) +6 >Emitted(35, 24) Source(44, 24) + SourceIndex(0) +7 >Emitted(35, 25) Source(44, 25) + SourceIndex(0) +8 >Emitted(35, 26) Source(44, 26) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(36, 1) Source(45, 1) + SourceIndex(0) +2 >Emitted(36, 2) Source(45, 2) + SourceIndex(0) +--- +>>>for (var nameB = multiRobotA[0], i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > +7 > [nameB] = multiRobotA +8 > , +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { +1->Emitted(37, 1) Source(46, 1) + SourceIndex(0) +2 >Emitted(37, 4) Source(46, 4) + SourceIndex(0) +3 >Emitted(37, 5) Source(46, 5) + SourceIndex(0) +4 >Emitted(37, 6) Source(46, 6) + SourceIndex(0) +5 >Emitted(37, 9) Source(46, 9) + SourceIndex(0) +6 >Emitted(37, 10) Source(46, 10) + SourceIndex(0) +7 >Emitted(37, 32) Source(46, 31) + SourceIndex(0) +8 >Emitted(37, 34) Source(46, 33) + SourceIndex(0) +9 >Emitted(37, 35) Source(46, 34) + SourceIndex(0) +10>Emitted(37, 38) Source(46, 37) + SourceIndex(0) +11>Emitted(37, 39) Source(46, 38) + SourceIndex(0) +12>Emitted(37, 41) Source(46, 40) + SourceIndex(0) +13>Emitted(37, 42) Source(46, 41) + SourceIndex(0) +14>Emitted(37, 45) Source(46, 44) + SourceIndex(0) +15>Emitted(37, 46) Source(46, 45) + SourceIndex(0) +16>Emitted(37, 48) Source(46, 47) + SourceIndex(0) +17>Emitted(37, 49) Source(46, 48) + SourceIndex(0) +18>Emitted(37, 51) Source(46, 50) + SourceIndex(0) +19>Emitted(37, 53) Source(46, 52) + SourceIndex(0) +20>Emitted(37, 54) Source(46, 53) + SourceIndex(0) +--- +>>> console.log(nameB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameB +7 > ) +8 > ; +1 >Emitted(38, 5) Source(47, 5) + SourceIndex(0) +2 >Emitted(38, 12) Source(47, 12) + SourceIndex(0) +3 >Emitted(38, 13) Source(47, 13) + SourceIndex(0) +4 >Emitted(38, 16) Source(47, 16) + SourceIndex(0) +5 >Emitted(38, 17) Source(47, 17) + SourceIndex(0) +6 >Emitted(38, 22) Source(47, 22) + SourceIndex(0) +7 >Emitted(38, 23) Source(47, 23) + SourceIndex(0) +8 >Emitted(38, 24) Source(47, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(39, 1) Source(48, 1) + SourceIndex(0) +2 >Emitted(39, 2) Source(48, 2) + SourceIndex(0) +--- +>>>for (var nameB = getMultiRobot()[0], i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > +7 > [nameB] = getMultiRobot() +8 > , +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { +1->Emitted(40, 1) Source(49, 1) + SourceIndex(0) +2 >Emitted(40, 4) Source(49, 4) + SourceIndex(0) +3 >Emitted(40, 5) Source(49, 5) + SourceIndex(0) +4 >Emitted(40, 6) Source(49, 6) + SourceIndex(0) +5 >Emitted(40, 9) Source(49, 9) + SourceIndex(0) +6 >Emitted(40, 10) Source(49, 10) + SourceIndex(0) +7 >Emitted(40, 36) Source(49, 35) + SourceIndex(0) +8 >Emitted(40, 38) Source(49, 37) + SourceIndex(0) +9 >Emitted(40, 39) Source(49, 38) + SourceIndex(0) +10>Emitted(40, 42) Source(49, 41) + SourceIndex(0) +11>Emitted(40, 43) Source(49, 42) + SourceIndex(0) +12>Emitted(40, 45) Source(49, 44) + SourceIndex(0) +13>Emitted(40, 46) Source(49, 45) + SourceIndex(0) +14>Emitted(40, 49) Source(49, 48) + SourceIndex(0) +15>Emitted(40, 50) Source(49, 49) + SourceIndex(0) +16>Emitted(40, 52) Source(49, 51) + SourceIndex(0) +17>Emitted(40, 53) Source(49, 52) + SourceIndex(0) +18>Emitted(40, 55) Source(49, 54) + SourceIndex(0) +19>Emitted(40, 57) Source(49, 56) + SourceIndex(0) +20>Emitted(40, 58) Source(49, 57) + SourceIndex(0) +--- +>>> console.log(nameB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameB +7 > ) +8 > ; +1 >Emitted(41, 5) Source(50, 5) + SourceIndex(0) +2 >Emitted(41, 12) Source(50, 12) + SourceIndex(0) +3 >Emitted(41, 13) Source(50, 13) + SourceIndex(0) +4 >Emitted(41, 16) Source(50, 16) + SourceIndex(0) +5 >Emitted(41, 17) Source(50, 17) + SourceIndex(0) +6 >Emitted(41, 22) Source(50, 22) + SourceIndex(0) +7 >Emitted(41, 23) Source(50, 23) + SourceIndex(0) +8 >Emitted(41, 24) Source(50, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(42, 1) Source(51, 1) + SourceIndex(0) +2 >Emitted(42, 2) Source(51, 2) + SourceIndex(0) +--- +>>>for (var nameB = ["trimmer", ["trimming", "edging"]][0], i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > +7 > [nameB] = ["trimmer", ["trimming", "edging"]] +8 > , +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { +1->Emitted(43, 1) Source(52, 1) + SourceIndex(0) +2 >Emitted(43, 4) Source(52, 4) + SourceIndex(0) +3 >Emitted(43, 5) Source(52, 5) + SourceIndex(0) +4 >Emitted(43, 6) Source(52, 6) + SourceIndex(0) +5 >Emitted(43, 9) Source(52, 9) + SourceIndex(0) +6 >Emitted(43, 10) Source(52, 10) + SourceIndex(0) +7 >Emitted(43, 56) Source(52, 55) + SourceIndex(0) +8 >Emitted(43, 58) Source(52, 57) + SourceIndex(0) +9 >Emitted(43, 59) Source(52, 58) + SourceIndex(0) +10>Emitted(43, 62) Source(52, 61) + SourceIndex(0) +11>Emitted(43, 63) Source(52, 62) + SourceIndex(0) +12>Emitted(43, 65) Source(52, 64) + SourceIndex(0) +13>Emitted(43, 66) Source(52, 65) + SourceIndex(0) +14>Emitted(43, 69) Source(52, 68) + SourceIndex(0) +15>Emitted(43, 70) Source(52, 69) + SourceIndex(0) +16>Emitted(43, 72) Source(52, 71) + SourceIndex(0) +17>Emitted(43, 73) Source(52, 72) + SourceIndex(0) +18>Emitted(43, 75) Source(52, 74) + SourceIndex(0) +19>Emitted(43, 77) Source(52, 76) + SourceIndex(0) +20>Emitted(43, 78) Source(52, 77) + SourceIndex(0) +--- +>>> console.log(nameB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameB +7 > ) +8 > ; +1 >Emitted(44, 5) Source(53, 5) + SourceIndex(0) +2 >Emitted(44, 12) Source(53, 12) + SourceIndex(0) +3 >Emitted(44, 13) Source(53, 13) + SourceIndex(0) +4 >Emitted(44, 16) Source(53, 16) + SourceIndex(0) +5 >Emitted(44, 17) Source(53, 17) + SourceIndex(0) +6 >Emitted(44, 22) Source(53, 22) + SourceIndex(0) +7 >Emitted(44, 23) Source(53, 23) + SourceIndex(0) +8 >Emitted(44, 24) Source(53, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(45, 1) Source(54, 1) + SourceIndex(0) +2 >Emitted(45, 2) Source(54, 2) + SourceIndex(0) +--- +>>>for (var numberA2 = robotA[0], nameA2 = robotA[1], skillA2 = robotA[2], i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > + > +2 >for +3 > +4 > ( +5 > let +6 > [ +7 > numberA2 +8 > , +9 > nameA2 +10> , +11> skillA2 +12> ] = robotA, +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(46, 1) Source(56, 1) + SourceIndex(0) +2 >Emitted(46, 4) Source(56, 4) + SourceIndex(0) +3 >Emitted(46, 5) Source(56, 5) + SourceIndex(0) +4 >Emitted(46, 6) Source(56, 6) + SourceIndex(0) +5 >Emitted(46, 9) Source(56, 9) + SourceIndex(0) +6 >Emitted(46, 10) Source(56, 11) + SourceIndex(0) +7 >Emitted(46, 30) Source(56, 19) + SourceIndex(0) +8 >Emitted(46, 32) Source(56, 21) + SourceIndex(0) +9 >Emitted(46, 50) Source(56, 27) + SourceIndex(0) +10>Emitted(46, 52) Source(56, 29) + SourceIndex(0) +11>Emitted(46, 71) Source(56, 36) + SourceIndex(0) +12>Emitted(46, 73) Source(56, 48) + SourceIndex(0) +13>Emitted(46, 74) Source(56, 49) + SourceIndex(0) +14>Emitted(46, 77) Source(56, 52) + SourceIndex(0) +15>Emitted(46, 78) Source(56, 53) + SourceIndex(0) +16>Emitted(46, 80) Source(56, 55) + SourceIndex(0) +17>Emitted(46, 81) Source(56, 56) + SourceIndex(0) +18>Emitted(46, 84) Source(56, 59) + SourceIndex(0) +19>Emitted(46, 85) Source(56, 60) + SourceIndex(0) +20>Emitted(46, 87) Source(56, 62) + SourceIndex(0) +21>Emitted(46, 88) Source(56, 63) + SourceIndex(0) +22>Emitted(46, 90) Source(56, 65) + SourceIndex(0) +23>Emitted(46, 92) Source(56, 67) + SourceIndex(0) +24>Emitted(46, 93) Source(56, 68) + SourceIndex(0) +--- +>>> console.log(nameA2); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA2 +7 > ) +8 > ; +1 >Emitted(47, 5) Source(57, 5) + SourceIndex(0) +2 >Emitted(47, 12) Source(57, 12) + SourceIndex(0) +3 >Emitted(47, 13) Source(57, 13) + SourceIndex(0) +4 >Emitted(47, 16) Source(57, 16) + SourceIndex(0) +5 >Emitted(47, 17) Source(57, 17) + SourceIndex(0) +6 >Emitted(47, 23) Source(57, 23) + SourceIndex(0) +7 >Emitted(47, 24) Source(57, 24) + SourceIndex(0) +8 >Emitted(47, 25) Source(57, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(48, 1) Source(58, 1) + SourceIndex(0) +2 >Emitted(48, 2) Source(58, 2) + SourceIndex(0) +--- +>>>for (var _h = getRobot(), numberA2 = _h[0], nameA2 = _h[1], skillA2 = _h[2], i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^^^^^^^^^^^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^^ +21> ^ +22> ^^ +23> ^ +24> ^^ +25> ^^ +26> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > [numberA2, nameA2, skillA2] = +7 > getRobot() +8 > +9 > numberA2 +10> , +11> nameA2 +12> , +13> skillA2 +14> ] = getRobot(), +15> i +16> = +17> 0 +18> ; +19> i +20> < +21> 1 +22> ; +23> i +24> ++ +25> ) +26> { +1->Emitted(49, 1) Source(59, 1) + SourceIndex(0) +2 >Emitted(49, 4) Source(59, 4) + SourceIndex(0) +3 >Emitted(49, 5) Source(59, 5) + SourceIndex(0) +4 >Emitted(49, 6) Source(59, 6) + SourceIndex(0) +5 >Emitted(49, 9) Source(59, 9) + SourceIndex(0) +6 >Emitted(49, 10) Source(59, 40) + SourceIndex(0) +7 >Emitted(49, 25) Source(59, 50) + SourceIndex(0) +8 >Emitted(49, 27) Source(59, 11) + SourceIndex(0) +9 >Emitted(49, 43) Source(59, 19) + SourceIndex(0) +10>Emitted(49, 45) Source(59, 21) + SourceIndex(0) +11>Emitted(49, 59) Source(59, 27) + SourceIndex(0) +12>Emitted(49, 61) Source(59, 29) + SourceIndex(0) +13>Emitted(49, 76) Source(59, 36) + SourceIndex(0) +14>Emitted(49, 78) Source(59, 52) + SourceIndex(0) +15>Emitted(49, 79) Source(59, 53) + SourceIndex(0) +16>Emitted(49, 82) Source(59, 56) + SourceIndex(0) +17>Emitted(49, 83) Source(59, 57) + SourceIndex(0) +18>Emitted(49, 85) Source(59, 59) + SourceIndex(0) +19>Emitted(49, 86) Source(59, 60) + SourceIndex(0) +20>Emitted(49, 89) Source(59, 63) + SourceIndex(0) +21>Emitted(49, 90) Source(59, 64) + SourceIndex(0) +22>Emitted(49, 92) Source(59, 66) + SourceIndex(0) +23>Emitted(49, 93) Source(59, 67) + SourceIndex(0) +24>Emitted(49, 95) Source(59, 69) + SourceIndex(0) +25>Emitted(49, 97) Source(59, 71) + SourceIndex(0) +26>Emitted(49, 98) Source(59, 72) + SourceIndex(0) +--- +>>> console.log(nameA2); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA2 +7 > ) +8 > ; +1 >Emitted(50, 5) Source(60, 5) + SourceIndex(0) +2 >Emitted(50, 12) Source(60, 12) + SourceIndex(0) +3 >Emitted(50, 13) Source(60, 13) + SourceIndex(0) +4 >Emitted(50, 16) Source(60, 16) + SourceIndex(0) +5 >Emitted(50, 17) Source(60, 17) + SourceIndex(0) +6 >Emitted(50, 23) Source(60, 23) + SourceIndex(0) +7 >Emitted(50, 24) Source(60, 24) + SourceIndex(0) +8 >Emitted(50, 25) Source(60, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(51, 1) Source(61, 1) + SourceIndex(0) +2 >Emitted(51, 2) Source(61, 2) + SourceIndex(0) +--- +>>>for (var _j = [2, "trimmer", "trimming"], numberA2 = _j[0], nameA2 = _j[1], skillA2 = _j[2], i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^^^^^^^^^^^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^^ +21> ^ +22> ^^ +23> ^ +24> ^^ +25> ^^ +26> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > [numberA2, nameA2, skillA2] = +7 > [2, "trimmer", "trimming"] +8 > +9 > numberA2 +10> , +11> nameA2 +12> , +13> skillA2 +14> ] = [2, "trimmer", "trimming"], +15> i +16> = +17> 0 +18> ; +19> i +20> < +21> 1 +22> ; +23> i +24> ++ +25> ) +26> { +1->Emitted(52, 1) Source(62, 1) + SourceIndex(0) +2 >Emitted(52, 4) Source(62, 4) + SourceIndex(0) +3 >Emitted(52, 5) Source(62, 5) + SourceIndex(0) +4 >Emitted(52, 6) Source(62, 6) + SourceIndex(0) +5 >Emitted(52, 9) Source(62, 9) + SourceIndex(0) +6 >Emitted(52, 10) Source(62, 40) + SourceIndex(0) +7 >Emitted(52, 41) Source(62, 66) + SourceIndex(0) +8 >Emitted(52, 43) Source(62, 11) + SourceIndex(0) +9 >Emitted(52, 59) Source(62, 19) + SourceIndex(0) +10>Emitted(52, 61) Source(62, 21) + SourceIndex(0) +11>Emitted(52, 75) Source(62, 27) + SourceIndex(0) +12>Emitted(52, 77) Source(62, 29) + SourceIndex(0) +13>Emitted(52, 92) Source(62, 36) + SourceIndex(0) +14>Emitted(52, 94) Source(62, 68) + SourceIndex(0) +15>Emitted(52, 95) Source(62, 69) + SourceIndex(0) +16>Emitted(52, 98) Source(62, 72) + SourceIndex(0) +17>Emitted(52, 99) Source(62, 73) + SourceIndex(0) +18>Emitted(52, 101) Source(62, 75) + SourceIndex(0) +19>Emitted(52, 102) Source(62, 76) + SourceIndex(0) +20>Emitted(52, 105) Source(62, 79) + SourceIndex(0) +21>Emitted(52, 106) Source(62, 80) + SourceIndex(0) +22>Emitted(52, 108) Source(62, 82) + SourceIndex(0) +23>Emitted(52, 109) Source(62, 83) + SourceIndex(0) +24>Emitted(52, 111) Source(62, 85) + SourceIndex(0) +25>Emitted(52, 113) Source(62, 87) + SourceIndex(0) +26>Emitted(52, 114) Source(62, 88) + SourceIndex(0) +--- +>>> console.log(nameA2); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA2 +7 > ) +8 > ; +1 >Emitted(53, 5) Source(63, 5) + SourceIndex(0) +2 >Emitted(53, 12) Source(63, 12) + SourceIndex(0) +3 >Emitted(53, 13) Source(63, 13) + SourceIndex(0) +4 >Emitted(53, 16) Source(63, 16) + SourceIndex(0) +5 >Emitted(53, 17) Source(63, 17) + SourceIndex(0) +6 >Emitted(53, 23) Source(63, 23) + SourceIndex(0) +7 >Emitted(53, 24) Source(63, 24) + SourceIndex(0) +8 >Emitted(53, 25) Source(63, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(54, 1) Source(64, 1) + SourceIndex(0) +2 >Emitted(54, 2) Source(64, 2) + SourceIndex(0) +--- +>>>for (var nameMA = multiRobotA[0], _k = multiRobotA[1], primarySkillA = _k[0], secondarySkillA = _k[1], i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^^^^^^^^^^^^^^^^^^^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^^ +21> ^ +22> ^^ +23> ^ +24> ^^ +25> ^^ +26> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > [ +7 > nameMA +8 > , +9 > [primarySkillA, secondarySkillA] +10> +11> primarySkillA +12> , +13> secondarySkillA +14> ]] = multiRobotA, +15> i +16> = +17> 0 +18> ; +19> i +20> < +21> 1 +22> ; +23> i +24> ++ +25> ) +26> { +1->Emitted(55, 1) Source(65, 1) + SourceIndex(0) +2 >Emitted(55, 4) Source(65, 4) + SourceIndex(0) +3 >Emitted(55, 5) Source(65, 5) + SourceIndex(0) +4 >Emitted(55, 6) Source(65, 6) + SourceIndex(0) +5 >Emitted(55, 9) Source(65, 9) + SourceIndex(0) +6 >Emitted(55, 10) Source(65, 11) + SourceIndex(0) +7 >Emitted(55, 33) Source(65, 17) + SourceIndex(0) +8 >Emitted(55, 35) Source(65, 19) + SourceIndex(0) +9 >Emitted(55, 54) Source(65, 51) + SourceIndex(0) +10>Emitted(55, 56) Source(65, 20) + SourceIndex(0) +11>Emitted(55, 77) Source(65, 33) + SourceIndex(0) +12>Emitted(55, 79) Source(65, 35) + SourceIndex(0) +13>Emitted(55, 102) Source(65, 50) + SourceIndex(0) +14>Emitted(55, 104) Source(65, 68) + SourceIndex(0) +15>Emitted(55, 105) Source(65, 69) + SourceIndex(0) +16>Emitted(55, 108) Source(65, 72) + SourceIndex(0) +17>Emitted(55, 109) Source(65, 73) + SourceIndex(0) +18>Emitted(55, 111) Source(65, 75) + SourceIndex(0) +19>Emitted(55, 112) Source(65, 76) + SourceIndex(0) +20>Emitted(55, 115) Source(65, 79) + SourceIndex(0) +21>Emitted(55, 116) Source(65, 80) + SourceIndex(0) +22>Emitted(55, 118) Source(65, 82) + SourceIndex(0) +23>Emitted(55, 119) Source(65, 83) + SourceIndex(0) +24>Emitted(55, 121) Source(65, 85) + SourceIndex(0) +25>Emitted(55, 123) Source(65, 87) + SourceIndex(0) +26>Emitted(55, 124) Source(65, 88) + SourceIndex(0) +--- +>>> console.log(nameMA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMA +7 > ) +8 > ; +1 >Emitted(56, 5) Source(66, 5) + SourceIndex(0) +2 >Emitted(56, 12) Source(66, 12) + SourceIndex(0) +3 >Emitted(56, 13) Source(66, 13) + SourceIndex(0) +4 >Emitted(56, 16) Source(66, 16) + SourceIndex(0) +5 >Emitted(56, 17) Source(66, 17) + SourceIndex(0) +6 >Emitted(56, 23) Source(66, 23) + SourceIndex(0) +7 >Emitted(56, 24) Source(66, 24) + SourceIndex(0) +8 >Emitted(56, 25) Source(66, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(57, 1) Source(67, 1) + SourceIndex(0) +2 >Emitted(57, 2) Source(67, 2) + SourceIndex(0) +--- +>>>for (var _l = getMultiRobot(), nameMA = _l[0], _m = _l[1], primarySkillA = _m[0], secondarySkillA = _m[1], i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^ +12> ^^ +13> ^^^^^^^^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^^^^^^^^^^^^^^^^^^^^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^ +27> ^^ +28> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > [nameMA, [primarySkillA, secondarySkillA]] = +7 > getMultiRobot() +8 > +9 > nameMA +10> , +11> [primarySkillA, secondarySkillA] +12> +13> primarySkillA +14> , +15> secondarySkillA +16> ]] = getMultiRobot(), +17> i +18> = +19> 0 +20> ; +21> i +22> < +23> 1 +24> ; +25> i +26> ++ +27> ) +28> { +1->Emitted(58, 1) Source(68, 1) + SourceIndex(0) +2 >Emitted(58, 4) Source(68, 4) + SourceIndex(0) +3 >Emitted(58, 5) Source(68, 5) + SourceIndex(0) +4 >Emitted(58, 6) Source(68, 6) + SourceIndex(0) +5 >Emitted(58, 9) Source(68, 9) + SourceIndex(0) +6 >Emitted(58, 10) Source(68, 55) + SourceIndex(0) +7 >Emitted(58, 30) Source(68, 70) + SourceIndex(0) +8 >Emitted(58, 32) Source(68, 11) + SourceIndex(0) +9 >Emitted(58, 46) Source(68, 17) + SourceIndex(0) +10>Emitted(58, 48) Source(68, 19) + SourceIndex(0) +11>Emitted(58, 58) Source(68, 51) + SourceIndex(0) +12>Emitted(58, 60) Source(68, 20) + SourceIndex(0) +13>Emitted(58, 81) Source(68, 33) + SourceIndex(0) +14>Emitted(58, 83) Source(68, 35) + SourceIndex(0) +15>Emitted(58, 106) Source(68, 50) + SourceIndex(0) +16>Emitted(58, 108) Source(68, 72) + SourceIndex(0) +17>Emitted(58, 109) Source(68, 73) + SourceIndex(0) +18>Emitted(58, 112) Source(68, 76) + SourceIndex(0) +19>Emitted(58, 113) Source(68, 77) + SourceIndex(0) +20>Emitted(58, 115) Source(68, 79) + SourceIndex(0) +21>Emitted(58, 116) Source(68, 80) + SourceIndex(0) +22>Emitted(58, 119) Source(68, 83) + SourceIndex(0) +23>Emitted(58, 120) Source(68, 84) + SourceIndex(0) +24>Emitted(58, 122) Source(68, 86) + SourceIndex(0) +25>Emitted(58, 123) Source(68, 87) + SourceIndex(0) +26>Emitted(58, 125) Source(68, 89) + SourceIndex(0) +27>Emitted(58, 127) Source(68, 91) + SourceIndex(0) +28>Emitted(58, 128) Source(68, 92) + SourceIndex(0) +--- +>>> console.log(nameMA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMA +7 > ) +8 > ; +1 >Emitted(59, 5) Source(69, 5) + SourceIndex(0) +2 >Emitted(59, 12) Source(69, 12) + SourceIndex(0) +3 >Emitted(59, 13) Source(69, 13) + SourceIndex(0) +4 >Emitted(59, 16) Source(69, 16) + SourceIndex(0) +5 >Emitted(59, 17) Source(69, 17) + SourceIndex(0) +6 >Emitted(59, 23) Source(69, 23) + SourceIndex(0) +7 >Emitted(59, 24) Source(69, 24) + SourceIndex(0) +8 >Emitted(59, 25) Source(69, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(60, 1) Source(70, 1) + SourceIndex(0) +2 >Emitted(60, 2) Source(70, 2) + SourceIndex(0) +--- +>>>for (var _o = ["trimmer", ["trimming", "edging"]], nameMA = _o[0], _p = _o[1], primarySkillA = _p[0], secondarySkillA = _p[1], i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^ +12> ^^ +13> ^^^^^^^^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^^^^^^^^^^^^^^^^^^^^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^ +27> ^^ +28> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > [nameMA, [primarySkillA, secondarySkillA]] = +7 > ["trimmer", ["trimming", "edging"]] +8 > +9 > nameMA +10> , +11> [primarySkillA, secondarySkillA] +12> +13> primarySkillA +14> , +15> secondarySkillA +16> ]] = ["trimmer", ["trimming", "edging"]], +17> i +18> = +19> 0 +20> ; +21> i +22> < +23> 1 +24> ; +25> i +26> ++ +27> ) +28> { +1->Emitted(61, 1) Source(71, 1) + SourceIndex(0) +2 >Emitted(61, 4) Source(71, 4) + SourceIndex(0) +3 >Emitted(61, 5) Source(71, 5) + SourceIndex(0) +4 >Emitted(61, 6) Source(71, 6) + SourceIndex(0) +5 >Emitted(61, 9) Source(71, 9) + SourceIndex(0) +6 >Emitted(61, 10) Source(71, 55) + SourceIndex(0) +7 >Emitted(61, 50) Source(71, 90) + SourceIndex(0) +8 >Emitted(61, 52) Source(71, 11) + SourceIndex(0) +9 >Emitted(61, 66) Source(71, 17) + SourceIndex(0) +10>Emitted(61, 68) Source(71, 19) + SourceIndex(0) +11>Emitted(61, 78) Source(71, 51) + SourceIndex(0) +12>Emitted(61, 80) Source(71, 20) + SourceIndex(0) +13>Emitted(61, 101) Source(71, 33) + SourceIndex(0) +14>Emitted(61, 103) Source(71, 35) + SourceIndex(0) +15>Emitted(61, 126) Source(71, 50) + SourceIndex(0) +16>Emitted(61, 128) Source(71, 92) + SourceIndex(0) +17>Emitted(61, 129) Source(71, 93) + SourceIndex(0) +18>Emitted(61, 132) Source(71, 96) + SourceIndex(0) +19>Emitted(61, 133) Source(71, 97) + SourceIndex(0) +20>Emitted(61, 135) Source(71, 99) + SourceIndex(0) +21>Emitted(61, 136) Source(71, 100) + SourceIndex(0) +22>Emitted(61, 139) Source(71, 103) + SourceIndex(0) +23>Emitted(61, 140) Source(71, 104) + SourceIndex(0) +24>Emitted(61, 142) Source(71, 106) + SourceIndex(0) +25>Emitted(61, 143) Source(71, 107) + SourceIndex(0) +26>Emitted(61, 145) Source(71, 109) + SourceIndex(0) +27>Emitted(61, 147) Source(71, 111) + SourceIndex(0) +28>Emitted(61, 148) Source(71, 112) + SourceIndex(0) +--- +>>> console.log(nameMA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMA +7 > ) +8 > ; +1 >Emitted(62, 5) Source(72, 5) + SourceIndex(0) +2 >Emitted(62, 12) Source(72, 12) + SourceIndex(0) +3 >Emitted(62, 13) Source(72, 13) + SourceIndex(0) +4 >Emitted(62, 16) Source(72, 16) + SourceIndex(0) +5 >Emitted(62, 17) Source(72, 17) + SourceIndex(0) +6 >Emitted(62, 23) Source(72, 23) + SourceIndex(0) +7 >Emitted(62, 24) Source(72, 24) + SourceIndex(0) +8 >Emitted(62, 25) Source(72, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(63, 1) Source(73, 1) + SourceIndex(0) +2 >Emitted(63, 2) Source(73, 2) + SourceIndex(0) +--- +>>>for (var numberA3 = robotA[0], robotAInfo = robotA.slice(1), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ +1-> + > + > +2 >for +3 > +4 > ( +5 > let +6 > [ +7 > numberA3 +8 > , +9 > ...robotAInfo +10> ] = robotA, +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { +1->Emitted(64, 1) Source(75, 1) + SourceIndex(0) +2 >Emitted(64, 4) Source(75, 4) + SourceIndex(0) +3 >Emitted(64, 5) Source(75, 5) + SourceIndex(0) +4 >Emitted(64, 6) Source(75, 6) + SourceIndex(0) +5 >Emitted(64, 9) Source(75, 9) + SourceIndex(0) +6 >Emitted(64, 10) Source(75, 11) + SourceIndex(0) +7 >Emitted(64, 30) Source(75, 19) + SourceIndex(0) +8 >Emitted(64, 32) Source(75, 21) + SourceIndex(0) +9 >Emitted(64, 60) Source(75, 34) + SourceIndex(0) +10>Emitted(64, 62) Source(75, 46) + SourceIndex(0) +11>Emitted(64, 63) Source(75, 47) + SourceIndex(0) +12>Emitted(64, 66) Source(75, 50) + SourceIndex(0) +13>Emitted(64, 67) Source(75, 51) + SourceIndex(0) +14>Emitted(64, 69) Source(75, 53) + SourceIndex(0) +15>Emitted(64, 70) Source(75, 54) + SourceIndex(0) +16>Emitted(64, 73) Source(75, 57) + SourceIndex(0) +17>Emitted(64, 74) Source(75, 58) + SourceIndex(0) +18>Emitted(64, 76) Source(75, 60) + SourceIndex(0) +19>Emitted(64, 77) Source(75, 61) + SourceIndex(0) +20>Emitted(64, 79) Source(75, 63) + SourceIndex(0) +21>Emitted(64, 81) Source(75, 65) + SourceIndex(0) +22>Emitted(64, 82) Source(75, 66) + SourceIndex(0) +--- +>>> console.log(numberA3); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > numberA3 +7 > ) +8 > ; +1 >Emitted(65, 5) Source(76, 5) + SourceIndex(0) +2 >Emitted(65, 12) Source(76, 12) + SourceIndex(0) +3 >Emitted(65, 13) Source(76, 13) + SourceIndex(0) +4 >Emitted(65, 16) Source(76, 16) + SourceIndex(0) +5 >Emitted(65, 17) Source(76, 17) + SourceIndex(0) +6 >Emitted(65, 25) Source(76, 25) + SourceIndex(0) +7 >Emitted(65, 26) Source(76, 26) + SourceIndex(0) +8 >Emitted(65, 27) Source(76, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(66, 1) Source(77, 1) + SourceIndex(0) +2 >Emitted(66, 2) Source(77, 2) + SourceIndex(0) +--- +>>>for (var _q = getRobot(), numberA3 = _q[0], robotAInfo = _q.slice(1), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > [numberA3, ...robotAInfo] = +7 > getRobot() +8 > +9 > numberA3 +10> , +11> ...robotAInfo +12> ] = getRobot(), +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(67, 1) Source(78, 1) + SourceIndex(0) +2 >Emitted(67, 4) Source(78, 4) + SourceIndex(0) +3 >Emitted(67, 5) Source(78, 5) + SourceIndex(0) +4 >Emitted(67, 6) Source(78, 6) + SourceIndex(0) +5 >Emitted(67, 9) Source(78, 9) + SourceIndex(0) +6 >Emitted(67, 10) Source(78, 38) + SourceIndex(0) +7 >Emitted(67, 25) Source(78, 48) + SourceIndex(0) +8 >Emitted(67, 27) Source(78, 11) + SourceIndex(0) +9 >Emitted(67, 43) Source(78, 19) + SourceIndex(0) +10>Emitted(67, 45) Source(78, 21) + SourceIndex(0) +11>Emitted(67, 69) Source(78, 34) + SourceIndex(0) +12>Emitted(67, 71) Source(78, 50) + SourceIndex(0) +13>Emitted(67, 72) Source(78, 51) + SourceIndex(0) +14>Emitted(67, 75) Source(78, 54) + SourceIndex(0) +15>Emitted(67, 76) Source(78, 55) + SourceIndex(0) +16>Emitted(67, 78) Source(78, 57) + SourceIndex(0) +17>Emitted(67, 79) Source(78, 58) + SourceIndex(0) +18>Emitted(67, 82) Source(78, 61) + SourceIndex(0) +19>Emitted(67, 83) Source(78, 62) + SourceIndex(0) +20>Emitted(67, 85) Source(78, 64) + SourceIndex(0) +21>Emitted(67, 86) Source(78, 65) + SourceIndex(0) +22>Emitted(67, 88) Source(78, 67) + SourceIndex(0) +23>Emitted(67, 90) Source(78, 69) + SourceIndex(0) +24>Emitted(67, 91) Source(78, 70) + SourceIndex(0) +--- +>>> console.log(numberA3); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > numberA3 +7 > ) +8 > ; +1 >Emitted(68, 5) Source(79, 5) + SourceIndex(0) +2 >Emitted(68, 12) Source(79, 12) + SourceIndex(0) +3 >Emitted(68, 13) Source(79, 13) + SourceIndex(0) +4 >Emitted(68, 16) Source(79, 16) + SourceIndex(0) +5 >Emitted(68, 17) Source(79, 17) + SourceIndex(0) +6 >Emitted(68, 25) Source(79, 25) + SourceIndex(0) +7 >Emitted(68, 26) Source(79, 26) + SourceIndex(0) +8 >Emitted(68, 27) Source(79, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(69, 1) Source(80, 1) + SourceIndex(0) +2 >Emitted(69, 2) Source(80, 2) + SourceIndex(0) +--- +>>>for (var _r = [2, "trimmer", "trimming"], numberA3 = _r[0], robotAInfo = _r.slice(1), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > [numberA3, ...robotAInfo] = +7 > [2, "trimmer", "trimming"] +8 > +9 > numberA3 +10> , +11> ...robotAInfo +12> ] = [2, "trimmer", "trimming"], +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(70, 1) Source(81, 1) + SourceIndex(0) +2 >Emitted(70, 4) Source(81, 4) + SourceIndex(0) +3 >Emitted(70, 5) Source(81, 5) + SourceIndex(0) +4 >Emitted(70, 6) Source(81, 6) + SourceIndex(0) +5 >Emitted(70, 9) Source(81, 9) + SourceIndex(0) +6 >Emitted(70, 10) Source(81, 38) + SourceIndex(0) +7 >Emitted(70, 41) Source(81, 64) + SourceIndex(0) +8 >Emitted(70, 43) Source(81, 11) + SourceIndex(0) +9 >Emitted(70, 59) Source(81, 19) + SourceIndex(0) +10>Emitted(70, 61) Source(81, 21) + SourceIndex(0) +11>Emitted(70, 85) Source(81, 34) + SourceIndex(0) +12>Emitted(70, 87) Source(81, 66) + SourceIndex(0) +13>Emitted(70, 88) Source(81, 67) + SourceIndex(0) +14>Emitted(70, 91) Source(81, 70) + SourceIndex(0) +15>Emitted(70, 92) Source(81, 71) + SourceIndex(0) +16>Emitted(70, 94) Source(81, 73) + SourceIndex(0) +17>Emitted(70, 95) Source(81, 74) + SourceIndex(0) +18>Emitted(70, 98) Source(81, 77) + SourceIndex(0) +19>Emitted(70, 99) Source(81, 78) + SourceIndex(0) +20>Emitted(70, 101) Source(81, 80) + SourceIndex(0) +21>Emitted(70, 102) Source(81, 81) + SourceIndex(0) +22>Emitted(70, 104) Source(81, 83) + SourceIndex(0) +23>Emitted(70, 106) Source(81, 85) + SourceIndex(0) +24>Emitted(70, 107) Source(81, 86) + SourceIndex(0) +--- +>>> console.log(numberA3); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > numberA3 +7 > ) +8 > ; +1 >Emitted(71, 5) Source(82, 5) + SourceIndex(0) +2 >Emitted(71, 12) Source(82, 12) + SourceIndex(0) +3 >Emitted(71, 13) Source(82, 13) + SourceIndex(0) +4 >Emitted(71, 16) Source(82, 16) + SourceIndex(0) +5 >Emitted(71, 17) Source(82, 17) + SourceIndex(0) +6 >Emitted(71, 25) Source(82, 25) + SourceIndex(0) +7 >Emitted(71, 26) Source(82, 26) + SourceIndex(0) +8 >Emitted(71, 27) Source(82, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(72, 1) Source(83, 1) + SourceIndex(0) +2 >Emitted(72, 2) Source(83, 2) + SourceIndex(0) +--- +>>>for (var multiRobotAInfo = multiRobotA.slice(0), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > +7 > [...multiRobotAInfo] = multiRobotA +8 > , +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { +1->Emitted(73, 1) Source(84, 1) + SourceIndex(0) +2 >Emitted(73, 4) Source(84, 4) + SourceIndex(0) +3 >Emitted(73, 5) Source(84, 5) + SourceIndex(0) +4 >Emitted(73, 6) Source(84, 6) + SourceIndex(0) +5 >Emitted(73, 9) Source(84, 9) + SourceIndex(0) +6 >Emitted(73, 10) Source(84, 10) + SourceIndex(0) +7 >Emitted(73, 48) Source(84, 44) + SourceIndex(0) +8 >Emitted(73, 50) Source(84, 46) + SourceIndex(0) +9 >Emitted(73, 51) Source(84, 47) + SourceIndex(0) +10>Emitted(73, 54) Source(84, 50) + SourceIndex(0) +11>Emitted(73, 55) Source(84, 51) + SourceIndex(0) +12>Emitted(73, 57) Source(84, 53) + SourceIndex(0) +13>Emitted(73, 58) Source(84, 54) + SourceIndex(0) +14>Emitted(73, 61) Source(84, 57) + SourceIndex(0) +15>Emitted(73, 62) Source(84, 58) + SourceIndex(0) +16>Emitted(73, 64) Source(84, 60) + SourceIndex(0) +17>Emitted(73, 65) Source(84, 61) + SourceIndex(0) +18>Emitted(73, 67) Source(84, 63) + SourceIndex(0) +19>Emitted(73, 69) Source(84, 65) + SourceIndex(0) +20>Emitted(73, 70) Source(84, 66) + SourceIndex(0) +--- +>>> console.log(multiRobotAInfo); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > multiRobotAInfo +7 > ) +8 > ; +1 >Emitted(74, 5) Source(85, 5) + SourceIndex(0) +2 >Emitted(74, 12) Source(85, 12) + SourceIndex(0) +3 >Emitted(74, 13) Source(85, 13) + SourceIndex(0) +4 >Emitted(74, 16) Source(85, 16) + SourceIndex(0) +5 >Emitted(74, 17) Source(85, 17) + SourceIndex(0) +6 >Emitted(74, 32) Source(85, 32) + SourceIndex(0) +7 >Emitted(74, 33) Source(85, 33) + SourceIndex(0) +8 >Emitted(74, 34) Source(85, 34) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(75, 1) Source(86, 1) + SourceIndex(0) +2 >Emitted(75, 2) Source(86, 2) + SourceIndex(0) +--- +>>>for (var multiRobotAInfo = getMultiRobot().slice(0), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > +7 > [...multiRobotAInfo] = getMultiRobot() +8 > , +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { +1->Emitted(76, 1) Source(87, 1) + SourceIndex(0) +2 >Emitted(76, 4) Source(87, 4) + SourceIndex(0) +3 >Emitted(76, 5) Source(87, 5) + SourceIndex(0) +4 >Emitted(76, 6) Source(87, 6) + SourceIndex(0) +5 >Emitted(76, 9) Source(87, 9) + SourceIndex(0) +6 >Emitted(76, 10) Source(87, 10) + SourceIndex(0) +7 >Emitted(76, 52) Source(87, 48) + SourceIndex(0) +8 >Emitted(76, 54) Source(87, 50) + SourceIndex(0) +9 >Emitted(76, 55) Source(87, 51) + SourceIndex(0) +10>Emitted(76, 58) Source(87, 54) + SourceIndex(0) +11>Emitted(76, 59) Source(87, 55) + SourceIndex(0) +12>Emitted(76, 61) Source(87, 57) + SourceIndex(0) +13>Emitted(76, 62) Source(87, 58) + SourceIndex(0) +14>Emitted(76, 65) Source(87, 61) + SourceIndex(0) +15>Emitted(76, 66) Source(87, 62) + SourceIndex(0) +16>Emitted(76, 68) Source(87, 64) + SourceIndex(0) +17>Emitted(76, 69) Source(87, 65) + SourceIndex(0) +18>Emitted(76, 71) Source(87, 67) + SourceIndex(0) +19>Emitted(76, 73) Source(87, 69) + SourceIndex(0) +20>Emitted(76, 74) Source(87, 70) + SourceIndex(0) +--- +>>> console.log(multiRobotAInfo); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > multiRobotAInfo +7 > ) +8 > ; +1 >Emitted(77, 5) Source(88, 5) + SourceIndex(0) +2 >Emitted(77, 12) Source(88, 12) + SourceIndex(0) +3 >Emitted(77, 13) Source(88, 13) + SourceIndex(0) +4 >Emitted(77, 16) Source(88, 16) + SourceIndex(0) +5 >Emitted(77, 17) Source(88, 17) + SourceIndex(0) +6 >Emitted(77, 32) Source(88, 32) + SourceIndex(0) +7 >Emitted(77, 33) Source(88, 33) + SourceIndex(0) +8 >Emitted(77, 34) Source(88, 34) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(78, 1) Source(89, 1) + SourceIndex(0) +2 >Emitted(78, 2) Source(89, 2) + SourceIndex(0) +--- +>>>for (var multiRobotAInfo = ["trimmer", ["trimming", "edging"]].slice(0), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > +7 > [...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]] +8 > , +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { +1->Emitted(79, 1) Source(90, 1) + SourceIndex(0) +2 >Emitted(79, 4) Source(90, 4) + SourceIndex(0) +3 >Emitted(79, 5) Source(90, 5) + SourceIndex(0) +4 >Emitted(79, 6) Source(90, 6) + SourceIndex(0) +5 >Emitted(79, 9) Source(90, 9) + SourceIndex(0) +6 >Emitted(79, 10) Source(90, 10) + SourceIndex(0) +7 >Emitted(79, 72) Source(90, 68) + SourceIndex(0) +8 >Emitted(79, 74) Source(90, 70) + SourceIndex(0) +9 >Emitted(79, 75) Source(90, 71) + SourceIndex(0) +10>Emitted(79, 78) Source(90, 74) + SourceIndex(0) +11>Emitted(79, 79) Source(90, 75) + SourceIndex(0) +12>Emitted(79, 81) Source(90, 77) + SourceIndex(0) +13>Emitted(79, 82) Source(90, 78) + SourceIndex(0) +14>Emitted(79, 85) Source(90, 81) + SourceIndex(0) +15>Emitted(79, 86) Source(90, 82) + SourceIndex(0) +16>Emitted(79, 88) Source(90, 84) + SourceIndex(0) +17>Emitted(79, 89) Source(90, 85) + SourceIndex(0) +18>Emitted(79, 91) Source(90, 87) + SourceIndex(0) +19>Emitted(79, 93) Source(90, 89) + SourceIndex(0) +20>Emitted(79, 94) Source(90, 90) + SourceIndex(0) +--- +>>> console.log(multiRobotAInfo); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > multiRobotAInfo +7 > ) +8 > ; +1 >Emitted(80, 5) Source(91, 5) + SourceIndex(0) +2 >Emitted(80, 12) Source(91, 12) + SourceIndex(0) +3 >Emitted(80, 13) Source(91, 13) + SourceIndex(0) +4 >Emitted(80, 16) Source(91, 16) + SourceIndex(0) +5 >Emitted(80, 17) Source(91, 17) + SourceIndex(0) +6 >Emitted(80, 32) Source(91, 32) + SourceIndex(0) +7 >Emitted(80, 33) Source(91, 33) + SourceIndex(0) +8 >Emitted(80, 34) Source(91, 34) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(81, 1) Source(92, 1) + SourceIndex(0) +2 >Emitted(81, 2) Source(92, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringForArrayBindingPattern.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.symbols b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.symbols new file mode 100644 index 00000000000..4e2131ff295 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.symbols @@ -0,0 +1,365 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPattern.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 11)) + + log(msg: any): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 1, 8)) +} +type Robot = [number, string, string]; +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 2, 1)) + +type MultiSkilledRobot = [string, [string, string]]; +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 3, 38)) + +let robotA: Robot = [1, "mower", "mowing"]; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 6, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 2, 1)) + +function getRobot() { +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 6, 43)) + + return robotA; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 6, 3)) +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 11, 3)) +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 3, 38)) + +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 12, 3)) +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 3, 38)) + +function getMultiRobot() { +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 12, 73)) + + return multiRobotA; +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 11, 3)) +} + +for (let [, nameA] = robotA, i = 0; i < 1; i++) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 17, 11)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 6, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 17, 28)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 17, 28)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 17, 28)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 17, 11)) +} +for (let [, nameA] = getRobot(), i = 0; i < 1; i++) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 20, 11)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 6, 43)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 20, 32)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 20, 32)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 20, 32)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 20, 11)) +} +for (let [, nameA] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 23, 11)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 23, 48)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 23, 48)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 23, 48)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 23, 11)) +} +for (let [, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 26, 13)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 26, 27)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 11, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 26, 60)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 26, 60)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 26, 60)) + + console.log(primarySkillA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 26, 13)) +} +for (let [, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 29, 13)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 29, 27)) +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 12, 73)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 29, 64)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 29, 64)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 29, 64)) + + console.log(primarySkillA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 29, 13)) +} +for (let [, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 32, 13)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 32, 27)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 32, 84)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 32, 84)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 32, 84)) + + console.log(primarySkillA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 32, 13)) +} + +for (let [numberB] = robotA, i = 0; i < 1; i++) { +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 36, 10)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 6, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 36, 28)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 36, 28)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 36, 28)) + + console.log(numberB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 36, 10)) +} +for (let [numberB] = getRobot(), i = 0; i < 1; i++) { +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 39, 10)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 6, 43)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 39, 32)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 39, 32)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 39, 32)) + + console.log(numberB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 39, 10)) +} +for (let [numberB] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 42, 10)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 42, 48)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 42, 48)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 42, 48)) + + console.log(numberB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 42, 10)) +} +for (let [nameB] = multiRobotA, i = 0; i < 1; i++) { +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 45, 10)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 11, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 45, 31)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 45, 31)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 45, 31)) + + console.log(nameB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 45, 10)) +} +for (let [nameB] = getMultiRobot(), i = 0; i < 1; i++) { +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 48, 10)) +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 12, 73)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 48, 35)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 48, 35)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 48, 35)) + + console.log(nameB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 48, 10)) +} +for (let [nameB] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 51, 10)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 51, 55)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 51, 55)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 51, 55)) + + console.log(nameB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 51, 10)) +} + +for (let [numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 55, 10)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 55, 19)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 55, 27)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 6, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 55, 46)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 55, 46)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 55, 46)) + + console.log(nameA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 55, 19)) +} +for (let [numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 58, 10)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 58, 19)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 58, 27)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 6, 43)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 58, 50)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 58, 50)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 58, 50)) + + console.log(nameA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 58, 19)) +} +for (let [numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 61, 10)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 61, 19)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 61, 27)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 61, 66)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 61, 66)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 61, 66)) + + console.log(nameA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 61, 19)) +} +for (let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 64, 10)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 64, 19)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 64, 33)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 11, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 64, 66)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 64, 66)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 64, 66)) + + console.log(nameMA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 64, 10)) +} +for (let [nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 67, 10)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 67, 19)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 67, 33)) +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 12, 73)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 67, 70)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 67, 70)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 67, 70)) + + console.log(nameMA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 67, 10)) +} +for (let [nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 70, 10)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 70, 19)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 70, 33)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 70, 90)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 70, 90)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 70, 90)) + + console.log(nameMA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 70, 10)) +} + +for (let [numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 74, 10)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 74, 19)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 6, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 74, 44)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 74, 44)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 74, 44)) + + console.log(numberA3); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 74, 10)) +} +for (let [numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 77, 10)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 77, 19)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 6, 43)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 77, 48)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 77, 48)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 77, 48)) + + console.log(numberA3); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 77, 10)) +} +for (let [numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 80, 10)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 80, 19)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 80, 64)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 80, 64)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 80, 64)) + + console.log(numberA3); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 80, 10)) +} +for (let [...multiRobotAInfo] = multiRobotA, i = 0; i < 1; i++) { +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 83, 10)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 11, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 83, 44)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 83, 44)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 83, 44)) + + console.log(multiRobotAInfo); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 83, 10)) +} +for (let [...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 86, 10)) +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 12, 73)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 86, 48)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 86, 48)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 86, 48)) + + console.log(multiRobotAInfo); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 86, 10)) +} +for (let [...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 89, 10)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 89, 68)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 89, 68)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 89, 68)) + + console.log(multiRobotAInfo); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 0, 22)) +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPattern.ts, 89, 10)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.types b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.types new file mode 100644 index 00000000000..fbe264eeeae --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.types @@ -0,0 +1,549 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPattern.ts === +declare var console: { +>console : { log(msg: any): void; } + + log(msg: any): void; +>log : (msg: any) => void +>msg : any +} +type Robot = [number, string, string]; +>Robot : [number, string, string] + +type MultiSkilledRobot = [string, [string, string]]; +>MultiSkilledRobot : [string, [string, string]] + +let robotA: Robot = [1, "mower", "mowing"]; +>robotA : [number, string, string] +>Robot : [number, string, string] +>[1, "mower", "mowing"] : [number, string, string] +>1 : number +>"mower" : string +>"mowing" : string + +function getRobot() { +>getRobot : () => [number, string, string] + + return robotA; +>robotA : [number, string, string] +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +>multiRobotA : [string, [string, string]] +>MultiSkilledRobot : [string, [string, string]] +>["mower", ["mowing", ""]] : [string, [string, string]] +>"mower" : string +>["mowing", ""] : [string, string] +>"mowing" : string +>"" : string + +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +>multiRobotB : [string, [string, string]] +>MultiSkilledRobot : [string, [string, string]] +>["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>"trimmer" : string +>["trimming", "edging"] : [string, string] +>"trimming" : string +>"edging" : string + +function getMultiRobot() { +>getMultiRobot : () => [string, [string, string]] + + return multiRobotA; +>multiRobotA : [string, [string, string]] +} + +for (let [, nameA] = robotA, i = 0; i < 1; i++) { +> : undefined +>nameA : string +>robotA : [number, string, string] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let [, nameA] = getRobot(), i = 0; i < 1; i++) { +> : undefined +>nameA : string +>getRobot() : [number, string, string] +>getRobot : () => [number, string, string] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let [, nameA] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +> : undefined +>nameA : string +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let [, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { +> : undefined +>primarySkillA : string +>secondarySkillA : string +>multiRobotA : [string, [string, string]] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primarySkillA); +>console.log(primarySkillA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primarySkillA : string +} +for (let [, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { +> : undefined +>primarySkillA : string +>secondarySkillA : string +>getMultiRobot() : [string, [string, string]] +>getMultiRobot : () => [string, [string, string]] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primarySkillA); +>console.log(primarySkillA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primarySkillA : string +} +for (let [, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +> : undefined +>primarySkillA : string +>secondarySkillA : string +>["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>"trimmer" : string +>["trimming", "edging"] : [string, string] +>"trimming" : string +>"edging" : string +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primarySkillA); +>console.log(primarySkillA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primarySkillA : string +} + +for (let [numberB] = robotA, i = 0; i < 1; i++) { +>numberB : number +>robotA : [number, string, string] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(numberB); +>console.log(numberB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberB : number +} +for (let [numberB] = getRobot(), i = 0; i < 1; i++) { +>numberB : number +>getRobot() : [number, string, string] +>getRobot : () => [number, string, string] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(numberB); +>console.log(numberB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberB : number +} +for (let [numberB] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>numberB : number +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(numberB); +>console.log(numberB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberB : number +} +for (let [nameB] = multiRobotA, i = 0; i < 1; i++) { +>nameB : string +>multiRobotA : [string, [string, string]] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameB); +>console.log(nameB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameB : string +} +for (let [nameB] = getMultiRobot(), i = 0; i < 1; i++) { +>nameB : string +>getMultiRobot() : [string, [string, string]] +>getMultiRobot : () => [string, [string, string]] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameB); +>console.log(nameB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameB : string +} +for (let [nameB] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +>nameB : string +>["trimmer", ["trimming", "edging"]] : [string, string[]] +>"trimmer" : string +>["trimming", "edging"] : string[] +>"trimming" : string +>"edging" : string +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameB); +>console.log(nameB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameB : string +} + +for (let [numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { +>numberA2 : number +>nameA2 : string +>skillA2 : string +>robotA : [number, string, string] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA2); +>console.log(nameA2) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA2 : string +} +for (let [numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { +>numberA2 : number +>nameA2 : string +>skillA2 : string +>getRobot() : [number, string, string] +>getRobot : () => [number, string, string] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA2); +>console.log(nameA2) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA2 : string +} +for (let [numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>numberA2 : number +>nameA2 : string +>skillA2 : string +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA2); +>console.log(nameA2) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA2 : string +} +for (let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { +>nameMA : string +>primarySkillA : string +>secondarySkillA : string +>multiRobotA : [string, [string, string]] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameMA); +>console.log(nameMA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMA : string +} +for (let [nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { +>nameMA : string +>primarySkillA : string +>secondarySkillA : string +>getMultiRobot() : [string, [string, string]] +>getMultiRobot : () => [string, [string, string]] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameMA); +>console.log(nameMA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMA : string +} +for (let [nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +>nameMA : string +>primarySkillA : string +>secondarySkillA : string +>["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>"trimmer" : string +>["trimming", "edging"] : [string, string] +>"trimming" : string +>"edging" : string +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameMA); +>console.log(nameMA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMA : string +} + +for (let [numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { +>numberA3 : number +>robotAInfo : (number | string)[] +>robotA : [number, string, string] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(numberA3); +>console.log(numberA3) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberA3 : number +} +for (let [numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { +>numberA3 : number +>robotAInfo : (number | string)[] +>getRobot() : [number, string, string] +>getRobot : () => [number, string, string] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(numberA3); +>console.log(numberA3) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberA3 : number +} +for (let [numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>numberA3 : number | string +>robotAInfo : (number | string)[] +>[2, "trimmer", "trimming"] : (number | string)[] +>2 : number +>"trimmer" : string +>"trimming" : string +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(numberA3); +>console.log(numberA3) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberA3 : number | string +} +for (let [...multiRobotAInfo] = multiRobotA, i = 0; i < 1; i++) { +>multiRobotAInfo : (string | [string, string])[] +>multiRobotA : [string, [string, string]] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(multiRobotAInfo); +>console.log(multiRobotAInfo) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>multiRobotAInfo : (string | [string, string])[] +} +for (let [...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { +>multiRobotAInfo : (string | [string, string])[] +>getMultiRobot() : [string, [string, string]] +>getMultiRobot : () => [string, [string, string]] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(multiRobotAInfo); +>console.log(multiRobotAInfo) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>multiRobotAInfo : (string | [string, string])[] +} +for (let [...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +>multiRobotAInfo : (string | string[])[] +>["trimmer", ["trimming", "edging"]] : (string | string[])[] +>"trimmer" : string +>["trimming", "edging"] : string[] +>"trimming" : string +>"edging" : string +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(multiRobotAInfo); +>console.log(multiRobotAInfo) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>multiRobotAInfo : (string | string[])[] +} diff --git a/tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPattern.ts b/tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPattern.ts new file mode 100644 index 00000000000..cd1ad012b25 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPattern.ts @@ -0,0 +1,93 @@ +// @sourcemap: true +declare var console: { + log(msg: any): void; +} +type Robot = [number, string, string]; +type MultiSkilledRobot = [string, [string, string]]; + +let robotA: Robot = [1, "mower", "mowing"]; +function getRobot() { + return robotA; +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +function getMultiRobot() { + return multiRobotA; +} + +for (let [, nameA] = robotA, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let [, nameA] = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for (let [, nameA] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(nameA); +} +for (let [, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for (let [, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for (let [, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(primarySkillA); +} + +for (let [numberB] = robotA, i = 0; i < 1; i++) { + console.log(numberB); +} +for (let [numberB] = getRobot(), i = 0; i < 1; i++) { + console.log(numberB); +} +for (let [numberB] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(numberB); +} +for (let [nameB] = multiRobotA, i = 0; i < 1; i++) { + console.log(nameB); +} +for (let [nameB] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(nameB); +} +for (let [nameB] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(nameB); +} + +for (let [numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { + console.log(nameA2); +} +for (let [numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { + console.log(nameA2); +} +for (let [numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(nameA2); +} +for (let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + console.log(nameMA); +} +for (let [nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(nameMA); +} +for (let [nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(nameMA); +} + +for (let [numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + console.log(numberA3); +} +for (let [numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + console.log(numberA3); +} +for (let [numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(numberA3); +} +for (let [...multiRobotAInfo] = multiRobotA, i = 0; i < 1; i++) { + console.log(multiRobotAInfo); +} +for (let [...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(multiRobotAInfo); +} +for (let [...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(multiRobotAInfo); +} \ No newline at end of file From 6baa36b5469ea2f44b08241c63659b2860ad89bf Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 8 Dec 2015 15:18:24 -0800 Subject: [PATCH 030/209] Test case for assignment expression with Array destructuring pattern --- ...ngVariableStatementArrayBindingPattern3.js | 102 +++ ...riableStatementArrayBindingPattern3.js.map | 2 + ...tatementArrayBindingPattern3.sourcemap.txt | 771 ++++++++++++++++++ ...iableStatementArrayBindingPattern3.symbols | 176 ++++ ...ariableStatementArrayBindingPattern3.types | 304 +++++++ ...ngVariableStatementArrayBindingPattern3.ts | 57 ++ 6 files changed, 1412 insertions(+) create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.types create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js new file mode 100644 index 00000000000..32862b978db --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js @@ -0,0 +1,102 @@ +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts] +declare var console: { + log(msg: any): void; +} +type Robot = [number, string, string]; +type MultiSkilledRobot = [string, [string, string]]; + +var robotA: Robot = [1, "mower", "mowing"]; +var robotB: Robot = [2, "trimmer", "trimming"]; +var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; + +let nameA: string, numberB: number, nameB: string, skillB: string; +let robotAInfo: (number | string)[]; + +let multiSkillB: [string, string], nameMB: string, primarySkillB: string, secondarySkillB: string; +let multiRobotAInfo: (string | [string, string])[]; + +[, nameA] = robotA; +[, nameB] = getRobotB(); +[, nameB] = [2, "trimmer", "trimming"]; +[, multiSkillB] = multiRobotB; +[, multiSkillB] = getMultiRobotB(); +[, multiSkillB] = ["roomba", ["vaccum", "mopping"]]; + +[numberB] = robotB; +[numberB] = getRobotB(); +[numberB] = [2, "trimmer", "trimming"]; +[nameMB] = multiRobotB; +[nameMB] = getMultiRobotB(); +[nameMB] = ["trimmer", ["trimming", "edging"]]; + +[numberB, nameB, skillB] = robotB; +[numberB, nameB, skillB] = getRobotB(); +[numberB, nameB, skillB] = [2, "trimmer", "trimming"]; +[nameMB, [primarySkillB, secondarySkillB]] = multiRobotB; +[nameMB, [primarySkillB, secondarySkillB]] = getMultiRobotB(); +[nameMB, [primarySkillB, secondarySkillB]] = ["trimmer", ["trimming", "edging"]]; + +[numberB, ...robotAInfo] = robotB; +[numberB, ...robotAInfo] = getRobotB(); +[numberB, ...robotAInfo] = [2, "trimmer", "trimming"]; +[...multiRobotAInfo] = multiRobotA; +[...multiRobotAInfo] = getMultiRobotB(); +[...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]]; + +if (nameA == nameB) { + console.log(skillB); +} + +function getRobotB() { + return robotB; +} + +function getMultiRobotB() { + return multiRobotB; +} + +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js] +var robotA = [1, "mower", "mowing"]; +var robotB = [2, "trimmer", "trimming"]; +var multiRobotA = ["mower", ["mowing", ""]]; +var multiRobotB = ["trimmer", ["trimming", "edging"]]; +var nameA, numberB, nameB, skillB; +var robotAInfo; +var multiSkillB, nameMB, primarySkillB, secondarySkillB; +var multiRobotAInfo; +nameA = robotA[1]; +_a = getRobotB(), nameB = _a[1]; +_b = [2, "trimmer", "trimming"], nameB = _b[1]; +multiSkillB = multiRobotB[1]; +_c = getMultiRobotB(), multiSkillB = _c[1]; +_d = ["roomba", ["vaccum", "mopping"]], multiSkillB = _d[1]; +numberB = robotB[0]; +numberB = getRobotB()[0]; +numberB = [2, "trimmer", "trimming"][0]; +nameMB = multiRobotB[0]; +nameMB = getMultiRobotB()[0]; +nameMB = ["trimmer", ["trimming", "edging"]][0]; +numberB = robotB[0], nameB = robotB[1], skillB = robotB[2]; +_e = getRobotB(), numberB = _e[0], nameB = _e[1], skillB = _e[2]; +_f = [2, "trimmer", "trimming"], numberB = _f[0], nameB = _f[1], skillB = _f[2]; +nameMB = multiRobotB[0], _g = multiRobotB[1], primarySkillB = _g[0], secondarySkillB = _g[1]; +_h = getMultiRobotB(), nameMB = _h[0], _j = _h[1], primarySkillB = _j[0], secondarySkillB = _j[1]; +_k = ["trimmer", ["trimming", "edging"]], nameMB = _k[0], _l = _k[1], primarySkillB = _l[0], secondarySkillB = _l[1]; +numberB = robotB[0], robotAInfo = robotB.slice(1); +_m = getRobotB(), numberB = _m[0], robotAInfo = _m.slice(1); +_o = [2, "trimmer", "trimming"], numberB = _o[0], robotAInfo = _o.slice(1); +multiRobotAInfo = multiRobotA.slice(0); +multiRobotAInfo = getMultiRobotB().slice(0); +multiRobotAInfo = ["trimmer", ["trimming", "edging"]].slice(0); +if (nameA == nameB) { + console.log(skillB); +} +function getRobotB() { + return robotB; +} +function getMultiRobotB() { + return multiRobotB; +} +var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o; +//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js.map new file mode 100644 index 00000000000..9b10b964ee5 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js.map] +{"version":3,"file":"sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAC/C,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;AAEzE,IAAI,KAAa,EAAE,OAAe,EAAE,KAAa,EAAE,MAAc,CAAC;AAClE,IAAI,UAA+B,CAAC;AAEpC,IAAI,WAA6B,EAAE,MAAc,EAAE,aAAqB,EAAE,eAAuB,CAAC;AAClG,IAAI,eAA8C,CAAC;AAEnD,iBAAkB,CAAC;AACP,gBAAW,eAAA,CAAC;AACZ,+BAA0B,eAAA,CAAC;AACvC,4BAA6B,CAAC;AACZ,qBAAgB,qBAAA,CAAC;AACjB,sCAAiC,qBAAA,CAAC;AAEpD,mBAAkB,CAAC;AACnB,wBAAuB,CAAC;AACxB,uCAAsC,CAAC;AACvC,uBAAsB,CAAC;AACvB,4BAA2B,CAAC;AAC5B,+CAA8C,CAAC;AAE/C,0DAAiC,CAAC;AACP,gBAAW,gDAAA,CAAC;AACZ,+BAA0B,gDAAA,CAAC;AACtD,4FAAwD,CAAC;AACZ,qBAAgB,4EAAA,CAAC;AACjB,wCAAmC,4EAAA,CAAC;AAEjF,iDAAiC,CAAC;AACP,gBAAW,2CAAA,CAAC;AACZ,+BAAiC,2CAAA,CAAC;AAC7D,sCAAkC,CAAC;AACnC,2CAAuC,CAAC;AACxC,8DAA0D,CAAC;AAE3D,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.sourcemap.txt new file mode 100644 index 00000000000..fbe3c58b0a6 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.sourcemap.txt @@ -0,0 +1,771 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js +mapUrl: sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js.map +sourceRoot: +sources: sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js +sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts +------------------------------------------------------------------- +>>>var robotA = [1, "mower", "mowing"]; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^^^^ +11> ^ +12> ^ +13> ^^^^^-> +1 >declare var console: { + > log(msg: any): void; + >} + >type Robot = [number, string, string]; + >type MultiSkilledRobot = [string, [string, string]]; + > + > +2 >var +3 > robotA +4 > : Robot = +5 > [ +6 > 1 +7 > , +8 > "mower" +9 > , +10> "mowing" +11> ] +12> ; +1 >Emitted(1, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(7, 5) + SourceIndex(0) +3 >Emitted(1, 11) Source(7, 11) + SourceIndex(0) +4 >Emitted(1, 14) Source(7, 21) + SourceIndex(0) +5 >Emitted(1, 15) Source(7, 22) + SourceIndex(0) +6 >Emitted(1, 16) Source(7, 23) + SourceIndex(0) +7 >Emitted(1, 18) Source(7, 25) + SourceIndex(0) +8 >Emitted(1, 25) Source(7, 32) + SourceIndex(0) +9 >Emitted(1, 27) Source(7, 34) + SourceIndex(0) +10>Emitted(1, 35) Source(7, 42) + SourceIndex(0) +11>Emitted(1, 36) Source(7, 43) + SourceIndex(0) +12>Emitted(1, 37) Source(7, 44) + SourceIndex(0) +--- +>>>var robotB = [2, "trimmer", "trimming"]; +1-> +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^ +11> ^ +12> ^ +13> ^^^^^-> +1-> + > +2 >var +3 > robotB +4 > : Robot = +5 > [ +6 > 2 +7 > , +8 > "trimmer" +9 > , +10> "trimming" +11> ] +12> ; +1->Emitted(2, 1) Source(8, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(8, 5) + SourceIndex(0) +3 >Emitted(2, 11) Source(8, 11) + SourceIndex(0) +4 >Emitted(2, 14) Source(8, 21) + SourceIndex(0) +5 >Emitted(2, 15) Source(8, 22) + SourceIndex(0) +6 >Emitted(2, 16) Source(8, 23) + SourceIndex(0) +7 >Emitted(2, 18) Source(8, 25) + SourceIndex(0) +8 >Emitted(2, 27) Source(8, 34) + SourceIndex(0) +9 >Emitted(2, 29) Source(8, 36) + SourceIndex(0) +10>Emitted(2, 39) Source(8, 46) + SourceIndex(0) +11>Emitted(2, 40) Source(8, 47) + SourceIndex(0) +12>Emitted(2, 41) Source(8, 48) + SourceIndex(0) +--- +>>>var multiRobotA = ["mower", ["mowing", ""]]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^ +10> ^^ +11> ^^ +12> ^ +13> ^ +14> ^ +15> ^^^^^^^^^^^-> +1-> + > +2 >var +3 > multiRobotA +4 > : MultiSkilledRobot = +5 > [ +6 > "mower" +7 > , +8 > [ +9 > "mowing" +10> , +11> "" +12> ] +13> ] +14> ; +1->Emitted(3, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(9, 5) + SourceIndex(0) +3 >Emitted(3, 16) Source(9, 16) + SourceIndex(0) +4 >Emitted(3, 19) Source(9, 38) + SourceIndex(0) +5 >Emitted(3, 20) Source(9, 39) + SourceIndex(0) +6 >Emitted(3, 27) Source(9, 46) + SourceIndex(0) +7 >Emitted(3, 29) Source(9, 48) + SourceIndex(0) +8 >Emitted(3, 30) Source(9, 49) + SourceIndex(0) +9 >Emitted(3, 38) Source(9, 57) + SourceIndex(0) +10>Emitted(3, 40) Source(9, 59) + SourceIndex(0) +11>Emitted(3, 42) Source(9, 61) + SourceIndex(0) +12>Emitted(3, 43) Source(9, 62) + SourceIndex(0) +13>Emitted(3, 44) Source(9, 63) + SourceIndex(0) +14>Emitted(3, 45) Source(9, 64) + SourceIndex(0) +--- +>>>var multiRobotB = ["trimmer", ["trimming", "edging"]]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^ +12> ^ +13> ^ +14> ^ +1-> + > +2 >var +3 > multiRobotB +4 > : MultiSkilledRobot = +5 > [ +6 > "trimmer" +7 > , +8 > [ +9 > "trimming" +10> , +11> "edging" +12> ] +13> ] +14> ; +1->Emitted(4, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(4, 5) Source(10, 5) + SourceIndex(0) +3 >Emitted(4, 16) Source(10, 16) + SourceIndex(0) +4 >Emitted(4, 19) Source(10, 38) + SourceIndex(0) +5 >Emitted(4, 20) Source(10, 39) + SourceIndex(0) +6 >Emitted(4, 29) Source(10, 48) + SourceIndex(0) +7 >Emitted(4, 31) Source(10, 50) + SourceIndex(0) +8 >Emitted(4, 32) Source(10, 51) + SourceIndex(0) +9 >Emitted(4, 42) Source(10, 61) + SourceIndex(0) +10>Emitted(4, 44) Source(10, 63) + SourceIndex(0) +11>Emitted(4, 52) Source(10, 71) + SourceIndex(0) +12>Emitted(4, 53) Source(10, 72) + SourceIndex(0) +13>Emitted(4, 54) Source(10, 73) + SourceIndex(0) +14>Emitted(4, 55) Source(10, 74) + SourceIndex(0) +--- +>>>var nameA, numberB, nameB, skillB; +1 > +2 >^^^^ +3 > ^^^^^ +4 > ^^ +5 > ^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^ +9 > ^^^^^^ +10> ^ +1 > + > + > +2 >let +3 > nameA: string +4 > , +5 > numberB: number +6 > , +7 > nameB: string +8 > , +9 > skillB: string +10> ; +1 >Emitted(5, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(5, 5) Source(12, 5) + SourceIndex(0) +3 >Emitted(5, 10) Source(12, 18) + SourceIndex(0) +4 >Emitted(5, 12) Source(12, 20) + SourceIndex(0) +5 >Emitted(5, 19) Source(12, 35) + SourceIndex(0) +6 >Emitted(5, 21) Source(12, 37) + SourceIndex(0) +7 >Emitted(5, 26) Source(12, 50) + SourceIndex(0) +8 >Emitted(5, 28) Source(12, 52) + SourceIndex(0) +9 >Emitted(5, 34) Source(12, 66) + SourceIndex(0) +10>Emitted(5, 35) Source(12, 67) + SourceIndex(0) +--- +>>>var robotAInfo; +1 > +2 >^^^^ +3 > ^^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >let +3 > robotAInfo: (number | string)[] +4 > ; +1 >Emitted(6, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(6, 5) Source(13, 5) + SourceIndex(0) +3 >Emitted(6, 15) Source(13, 36) + SourceIndex(0) +4 >Emitted(6, 16) Source(13, 37) + SourceIndex(0) +--- +>>>var multiSkillB, nameMB, primarySkillB, secondarySkillB; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^ +10> ^ +1-> + > + > +2 >let +3 > multiSkillB: [string, string] +4 > , +5 > nameMB: string +6 > , +7 > primarySkillB: string +8 > , +9 > secondarySkillB: string +10> ; +1->Emitted(7, 1) Source(15, 1) + SourceIndex(0) +2 >Emitted(7, 5) Source(15, 5) + SourceIndex(0) +3 >Emitted(7, 16) Source(15, 34) + SourceIndex(0) +4 >Emitted(7, 18) Source(15, 36) + SourceIndex(0) +5 >Emitted(7, 24) Source(15, 50) + SourceIndex(0) +6 >Emitted(7, 26) Source(15, 52) + SourceIndex(0) +7 >Emitted(7, 39) Source(15, 73) + SourceIndex(0) +8 >Emitted(7, 41) Source(15, 75) + SourceIndex(0) +9 >Emitted(7, 56) Source(15, 98) + SourceIndex(0) +10>Emitted(7, 57) Source(15, 99) + SourceIndex(0) +--- +>>>var multiRobotAInfo; +1 > +2 >^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^ +1 > + > +2 >let +3 > multiRobotAInfo: (string | [string, string])[] +4 > ; +1 >Emitted(8, 1) Source(16, 1) + SourceIndex(0) +2 >Emitted(8, 5) Source(16, 5) + SourceIndex(0) +3 >Emitted(8, 20) Source(16, 51) + SourceIndex(0) +4 >Emitted(8, 21) Source(16, 52) + SourceIndex(0) +--- +>>>nameA = robotA[1]; +1 > +2 >^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^-> +1 > + > + > +2 >[, nameA] = robotA +3 > ; +1 >Emitted(9, 1) Source(18, 1) + SourceIndex(0) +2 >Emitted(9, 18) Source(18, 19) + SourceIndex(0) +3 >Emitted(9, 19) Source(18, 20) + SourceIndex(0) +--- +>>>_a = getRobotB(), nameB = _a[1]; +1-> +2 >^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^-> +1-> + >[, nameB] = +2 >getRobotB() +3 > +4 > ; +1->Emitted(10, 1) Source(19, 13) + SourceIndex(0) +2 >Emitted(10, 17) Source(19, 24) + SourceIndex(0) +3 >Emitted(10, 32) Source(19, 24) + SourceIndex(0) +4 >Emitted(10, 33) Source(19, 25) + SourceIndex(0) +--- +>>>_b = [2, "trimmer", "trimming"], nameB = _b[1]; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^ +1-> + >[, nameB] = +2 >[2, "trimmer", "trimming"] +3 > +4 > ; +1->Emitted(11, 1) Source(20, 13) + SourceIndex(0) +2 >Emitted(11, 32) Source(20, 39) + SourceIndex(0) +3 >Emitted(11, 47) Source(20, 39) + SourceIndex(0) +4 >Emitted(11, 48) Source(20, 40) + SourceIndex(0) +--- +>>>multiSkillB = multiRobotB[1]; +1 > +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^-> +1 > + > +2 >[, multiSkillB] = multiRobotB +3 > ; +1 >Emitted(12, 1) Source(21, 1) + SourceIndex(0) +2 >Emitted(12, 29) Source(21, 30) + SourceIndex(0) +3 >Emitted(12, 30) Source(21, 31) + SourceIndex(0) +--- +>>>_c = getMultiRobotB(), multiSkillB = _c[1]; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^-> +1-> + >[, multiSkillB] = +2 >getMultiRobotB() +3 > +4 > ; +1->Emitted(13, 1) Source(22, 19) + SourceIndex(0) +2 >Emitted(13, 22) Source(22, 35) + SourceIndex(0) +3 >Emitted(13, 43) Source(22, 35) + SourceIndex(0) +4 >Emitted(13, 44) Source(22, 36) + SourceIndex(0) +--- +>>>_d = ["roomba", ["vaccum", "mopping"]], multiSkillB = _d[1]; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^ +4 > ^ +1-> + >[, multiSkillB] = +2 >["roomba", ["vaccum", "mopping"]] +3 > +4 > ; +1->Emitted(14, 1) Source(23, 19) + SourceIndex(0) +2 >Emitted(14, 39) Source(23, 52) + SourceIndex(0) +3 >Emitted(14, 60) Source(23, 52) + SourceIndex(0) +4 >Emitted(14, 61) Source(23, 53) + SourceIndex(0) +--- +>>>numberB = robotB[0]; +1 > +2 >^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^-> +1 > + > + > +2 >[numberB] = robotB +3 > ; +1 >Emitted(15, 1) Source(25, 1) + SourceIndex(0) +2 >Emitted(15, 20) Source(25, 19) + SourceIndex(0) +3 >Emitted(15, 21) Source(25, 20) + SourceIndex(0) +--- +>>>numberB = getRobotB()[0]; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^-> +1-> + > +2 >[numberB] = getRobotB() +3 > ; +1->Emitted(16, 1) Source(26, 1) + SourceIndex(0) +2 >Emitted(16, 25) Source(26, 24) + SourceIndex(0) +3 >Emitted(16, 26) Source(26, 25) + SourceIndex(0) +--- +>>>numberB = [2, "trimmer", "trimming"][0]; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^ +1-> + > +2 >[numberB] = [2, "trimmer", "trimming"] +3 > ; +1->Emitted(17, 1) Source(27, 1) + SourceIndex(0) +2 >Emitted(17, 40) Source(27, 39) + SourceIndex(0) +3 >Emitted(17, 41) Source(27, 40) + SourceIndex(0) +--- +>>>nameMB = multiRobotB[0]; +1 > +2 >^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^-> +1 > + > +2 >[nameMB] = multiRobotB +3 > ; +1 >Emitted(18, 1) Source(28, 1) + SourceIndex(0) +2 >Emitted(18, 24) Source(28, 23) + SourceIndex(0) +3 >Emitted(18, 25) Source(28, 24) + SourceIndex(0) +--- +>>>nameMB = getMultiRobotB()[0]; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >[nameMB] = getMultiRobotB() +3 > ; +1->Emitted(19, 1) Source(29, 1) + SourceIndex(0) +2 >Emitted(19, 29) Source(29, 28) + SourceIndex(0) +3 >Emitted(19, 30) Source(29, 29) + SourceIndex(0) +--- +>>>nameMB = ["trimmer", ["trimming", "edging"]][0]; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^-> +1-> + > +2 >[nameMB] = ["trimmer", ["trimming", "edging"]] +3 > ; +1->Emitted(20, 1) Source(30, 1) + SourceIndex(0) +2 >Emitted(20, 48) Source(30, 47) + SourceIndex(0) +3 >Emitted(20, 49) Source(30, 48) + SourceIndex(0) +--- +>>>numberB = robotB[0], nameB = robotB[1], skillB = robotB[2]; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^-> +1-> + > + > +2 >[numberB, nameB, skillB] = robotB +3 > ; +1->Emitted(21, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(21, 59) Source(32, 34) + SourceIndex(0) +3 >Emitted(21, 60) Source(32, 35) + SourceIndex(0) +--- +>>>_e = getRobotB(), numberB = _e[0], nameB = _e[1], skillB = _e[2]; +1-> +2 >^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^-> +1-> + >[numberB, nameB, skillB] = +2 >getRobotB() +3 > +4 > ; +1->Emitted(22, 1) Source(33, 28) + SourceIndex(0) +2 >Emitted(22, 17) Source(33, 39) + SourceIndex(0) +3 >Emitted(22, 65) Source(33, 39) + SourceIndex(0) +4 >Emitted(22, 66) Source(33, 40) + SourceIndex(0) +--- +>>>_f = [2, "trimmer", "trimming"], numberB = _f[0], nameB = _f[1], skillB = _f[2]; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^-> +1-> + >[numberB, nameB, skillB] = +2 >[2, "trimmer", "trimming"] +3 > +4 > ; +1->Emitted(23, 1) Source(34, 28) + SourceIndex(0) +2 >Emitted(23, 32) Source(34, 54) + SourceIndex(0) +3 >Emitted(23, 80) Source(34, 54) + SourceIndex(0) +4 >Emitted(23, 81) Source(34, 55) + SourceIndex(0) +--- +>>>nameMB = multiRobotB[0], _g = multiRobotB[1], primarySkillB = _g[0], secondarySkillB = _g[1]; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^-> +1-> + > +2 >[nameMB, [primarySkillB, secondarySkillB]] = multiRobotB +3 > ; +1->Emitted(24, 1) Source(35, 1) + SourceIndex(0) +2 >Emitted(24, 93) Source(35, 57) + SourceIndex(0) +3 >Emitted(24, 94) Source(35, 58) + SourceIndex(0) +--- +>>>_h = getMultiRobotB(), nameMB = _h[0], _j = _h[1], primarySkillB = _j[0], secondarySkillB = _j[1]; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^-> +1-> + >[nameMB, [primarySkillB, secondarySkillB]] = +2 >getMultiRobotB() +3 > +4 > ; +1->Emitted(25, 1) Source(36, 46) + SourceIndex(0) +2 >Emitted(25, 22) Source(36, 62) + SourceIndex(0) +3 >Emitted(25, 98) Source(36, 62) + SourceIndex(0) +4 >Emitted(25, 99) Source(36, 63) + SourceIndex(0) +--- +>>>_k = ["trimmer", ["trimming", "edging"]], nameMB = _k[0], _l = _k[1], primarySkillB = _l[0], secondarySkillB = _l[1]; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^ +1-> + >[nameMB, [primarySkillB, secondarySkillB]] = +2 >["trimmer", ["trimming", "edging"]] +3 > +4 > ; +1->Emitted(26, 1) Source(37, 46) + SourceIndex(0) +2 >Emitted(26, 41) Source(37, 81) + SourceIndex(0) +3 >Emitted(26, 117) Source(37, 81) + SourceIndex(0) +4 >Emitted(26, 118) Source(37, 82) + SourceIndex(0) +--- +>>>numberB = robotB[0], robotAInfo = robotB.slice(1); +1 > +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^-> +1 > + > + > +2 >[numberB, ...robotAInfo] = robotB +3 > ; +1 >Emitted(27, 1) Source(39, 1) + SourceIndex(0) +2 >Emitted(27, 50) Source(39, 34) + SourceIndex(0) +3 >Emitted(27, 51) Source(39, 35) + SourceIndex(0) +--- +>>>_m = getRobotB(), numberB = _m[0], robotAInfo = _m.slice(1); +1-> +2 >^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^-> +1-> + >[numberB, ...robotAInfo] = +2 >getRobotB() +3 > +4 > ; +1->Emitted(28, 1) Source(40, 28) + SourceIndex(0) +2 >Emitted(28, 17) Source(40, 39) + SourceIndex(0) +3 >Emitted(28, 60) Source(40, 39) + SourceIndex(0) +4 >Emitted(28, 61) Source(40, 40) + SourceIndex(0) +--- +>>>_o = [2, "trimmer", "trimming"], numberB = _o[0], robotAInfo = _o.slice(1); +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^ +1-> + >[numberB, ...robotAInfo] = +2 >[2, "trimmer", "trimming"] +3 > +4 > ; +1->Emitted(29, 1) Source(41, 28) + SourceIndex(0) +2 >Emitted(29, 32) Source(41, 61) + SourceIndex(0) +3 >Emitted(29, 75) Source(41, 61) + SourceIndex(0) +4 >Emitted(29, 76) Source(41, 62) + SourceIndex(0) +--- +>>>multiRobotAInfo = multiRobotA.slice(0); +1 > +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^-> +1 > + > +2 >[...multiRobotAInfo] = multiRobotA +3 > ; +1 >Emitted(30, 1) Source(42, 1) + SourceIndex(0) +2 >Emitted(30, 39) Source(42, 35) + SourceIndex(0) +3 >Emitted(30, 40) Source(42, 36) + SourceIndex(0) +--- +>>>multiRobotAInfo = getMultiRobotB().slice(0); +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >[...multiRobotAInfo] = getMultiRobotB() +3 > ; +1->Emitted(31, 1) Source(43, 1) + SourceIndex(0) +2 >Emitted(31, 44) Source(43, 40) + SourceIndex(0) +3 >Emitted(31, 45) Source(43, 41) + SourceIndex(0) +--- +>>>multiRobotAInfo = ["trimmer", ["trimming", "edging"]].slice(0); +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^ +1-> + > +2 >[...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]] +3 > ; +1->Emitted(32, 1) Source(44, 1) + SourceIndex(0) +2 >Emitted(32, 63) Source(44, 59) + SourceIndex(0) +3 >Emitted(32, 64) Source(44, 60) + SourceIndex(0) +--- +>>>if (nameA == nameB) { +1 > +2 >^^ +3 > ^ +4 > ^ +5 > ^^^^^ +6 > ^^^^ +7 > ^^^^^ +8 > ^ +9 > ^ +10> ^ +11> ^^^^-> +1 > + > + > +2 >if +3 > +4 > ( +5 > nameA +6 > == +7 > nameB +8 > ) +9 > +10> { +1 >Emitted(33, 1) Source(46, 1) + SourceIndex(0) +2 >Emitted(33, 3) Source(46, 3) + SourceIndex(0) +3 >Emitted(33, 4) Source(46, 4) + SourceIndex(0) +4 >Emitted(33, 5) Source(46, 5) + SourceIndex(0) +5 >Emitted(33, 10) Source(46, 10) + SourceIndex(0) +6 >Emitted(33, 14) Source(46, 14) + SourceIndex(0) +7 >Emitted(33, 19) Source(46, 19) + SourceIndex(0) +8 >Emitted(33, 20) Source(46, 20) + SourceIndex(0) +9 >Emitted(33, 21) Source(46, 21) + SourceIndex(0) +10>Emitted(33, 22) Source(46, 22) + SourceIndex(0) +--- +>>> console.log(skillB); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1-> + > +2 > console +3 > . +4 > log +5 > ( +6 > skillB +7 > ) +8 > ; +1->Emitted(34, 5) Source(47, 5) + SourceIndex(0) +2 >Emitted(34, 12) Source(47, 12) + SourceIndex(0) +3 >Emitted(34, 13) Source(47, 13) + SourceIndex(0) +4 >Emitted(34, 16) Source(47, 16) + SourceIndex(0) +5 >Emitted(34, 17) Source(47, 17) + SourceIndex(0) +6 >Emitted(34, 23) Source(47, 23) + SourceIndex(0) +7 >Emitted(34, 24) Source(47, 24) + SourceIndex(0) +8 >Emitted(34, 25) Source(47, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(35, 1) Source(48, 1) + SourceIndex(0) +2 >Emitted(35, 2) Source(48, 2) + SourceIndex(0) +--- +>>>function getRobotB() { +1-> +2 >^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +1->Emitted(36, 1) Source(50, 1) + SourceIndex(0) +--- +>>> return robotB; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +1->function getRobotB() { + > +2 > return +3 > +4 > robotB +5 > ; +1->Emitted(37, 5) Source(51, 5) + SourceIndex(0) +2 >Emitted(37, 11) Source(51, 11) + SourceIndex(0) +3 >Emitted(37, 12) Source(51, 12) + SourceIndex(0) +4 >Emitted(37, 18) Source(51, 18) + SourceIndex(0) +5 >Emitted(37, 19) Source(51, 19) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(38, 1) Source(52, 1) + SourceIndex(0) +2 >Emitted(38, 2) Source(52, 2) + SourceIndex(0) +--- +>>>function getMultiRobotB() { +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +1->Emitted(39, 1) Source(54, 1) + SourceIndex(0) +--- +>>> return multiRobotB; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^ +5 > ^ +1->function getMultiRobotB() { + > +2 > return +3 > +4 > multiRobotB +5 > ; +1->Emitted(40, 5) Source(55, 5) + SourceIndex(0) +2 >Emitted(40, 11) Source(55, 11) + SourceIndex(0) +3 >Emitted(40, 12) Source(55, 12) + SourceIndex(0) +4 >Emitted(40, 23) Source(55, 23) + SourceIndex(0) +5 >Emitted(40, 24) Source(55, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(41, 1) Source(56, 1) + SourceIndex(0) +2 >Emitted(41, 2) Source(56, 2) + SourceIndex(0) +--- +>>>var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o; +>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.symbols b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.symbols new file mode 100644 index 00000000000..931523c6b26 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.symbols @@ -0,0 +1,176 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 0, 11)) + + log(msg: any): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 1, 8)) +} +type Robot = [number, string, string]; +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 2, 1)) + +type MultiSkilledRobot = [string, [string, string]]; +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 3, 38)) + +var robotA: Robot = [1, "mower", "mowing"]; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 6, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 2, 1)) + +var robotB: Robot = [2, "trimmer", "trimming"]; +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 7, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 2, 1)) + +var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 8, 3)) +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 3, 38)) + +var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 9, 3)) +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 3, 38)) + +let nameA: string, numberB: number, nameB: string, skillB: string; +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 11, 3)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 11, 18)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 11, 35)) +>skillB : Symbol(skillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 11, 50)) + +let robotAInfo: (number | string)[]; +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 12, 3)) + +let multiSkillB: [string, string], nameMB: string, primarySkillB: string, secondarySkillB: string; +>multiSkillB : Symbol(multiSkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 14, 3)) +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 14, 34)) +>primarySkillB : Symbol(primarySkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 14, 50)) +>secondarySkillB : Symbol(secondarySkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 14, 73)) + +let multiRobotAInfo: (string | [string, string])[]; +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 15, 3)) + +[, nameA] = robotA; +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 11, 3)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 6, 3)) + +[, nameB] = getRobotB(); +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 11, 35)) +>getRobotB : Symbol(getRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 47, 1)) + +[, nameB] = [2, "trimmer", "trimming"]; +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 11, 35)) + +[, multiSkillB] = multiRobotB; +>multiSkillB : Symbol(multiSkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 14, 3)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 9, 3)) + +[, multiSkillB] = getMultiRobotB(); +>multiSkillB : Symbol(multiSkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 14, 3)) +>getMultiRobotB : Symbol(getMultiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 51, 1)) + +[, multiSkillB] = ["roomba", ["vaccum", "mopping"]]; +>multiSkillB : Symbol(multiSkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 14, 3)) + +[numberB] = robotB; +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 11, 18)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 7, 3)) + +[numberB] = getRobotB(); +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 11, 18)) +>getRobotB : Symbol(getRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 47, 1)) + +[numberB] = [2, "trimmer", "trimming"]; +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 11, 18)) + +[nameMB] = multiRobotB; +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 14, 34)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 9, 3)) + +[nameMB] = getMultiRobotB(); +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 14, 34)) +>getMultiRobotB : Symbol(getMultiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 51, 1)) + +[nameMB] = ["trimmer", ["trimming", "edging"]]; +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 14, 34)) + +[numberB, nameB, skillB] = robotB; +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 11, 18)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 11, 35)) +>skillB : Symbol(skillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 11, 50)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 7, 3)) + +[numberB, nameB, skillB] = getRobotB(); +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 11, 18)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 11, 35)) +>skillB : Symbol(skillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 11, 50)) +>getRobotB : Symbol(getRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 47, 1)) + +[numberB, nameB, skillB] = [2, "trimmer", "trimming"]; +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 11, 18)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 11, 35)) +>skillB : Symbol(skillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 11, 50)) + +[nameMB, [primarySkillB, secondarySkillB]] = multiRobotB; +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 14, 34)) +>primarySkillB : Symbol(primarySkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 14, 50)) +>secondarySkillB : Symbol(secondarySkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 14, 73)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 9, 3)) + +[nameMB, [primarySkillB, secondarySkillB]] = getMultiRobotB(); +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 14, 34)) +>primarySkillB : Symbol(primarySkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 14, 50)) +>secondarySkillB : Symbol(secondarySkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 14, 73)) +>getMultiRobotB : Symbol(getMultiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 51, 1)) + +[nameMB, [primarySkillB, secondarySkillB]] = ["trimmer", ["trimming", "edging"]]; +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 14, 34)) +>primarySkillB : Symbol(primarySkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 14, 50)) +>secondarySkillB : Symbol(secondarySkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 14, 73)) + +[numberB, ...robotAInfo] = robotB; +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 11, 18)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 12, 3)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 7, 3)) + +[numberB, ...robotAInfo] = getRobotB(); +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 11, 18)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 12, 3)) +>getRobotB : Symbol(getRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 47, 1)) + +[numberB, ...robotAInfo] = [2, "trimmer", "trimming"]; +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 11, 18)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 12, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 2, 1)) + +[...multiRobotAInfo] = multiRobotA; +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 15, 3)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 8, 3)) + +[...multiRobotAInfo] = getMultiRobotB(); +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 15, 3)) +>getMultiRobotB : Symbol(getMultiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 51, 1)) + +[...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]]; +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 15, 3)) + +if (nameA == nameB) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 11, 3)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 11, 35)) + + console.log(skillB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 0, 22)) +>skillB : Symbol(skillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 11, 50)) +} + +function getRobotB() { +>getRobotB : Symbol(getRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 47, 1)) + + return robotB; +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 7, 3)) +} + +function getMultiRobotB() { +>getMultiRobotB : Symbol(getMultiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 51, 1)) + + return multiRobotB; +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts, 9, 3)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.types new file mode 100644 index 00000000000..5ca93029977 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.types @@ -0,0 +1,304 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts === +declare var console: { +>console : { log(msg: any): void; } + + log(msg: any): void; +>log : (msg: any) => void +>msg : any +} +type Robot = [number, string, string]; +>Robot : [number, string, string] + +type MultiSkilledRobot = [string, [string, string]]; +>MultiSkilledRobot : [string, [string, string]] + +var robotA: Robot = [1, "mower", "mowing"]; +>robotA : [number, string, string] +>Robot : [number, string, string] +>[1, "mower", "mowing"] : [number, string, string] +>1 : number +>"mower" : string +>"mowing" : string + +var robotB: Robot = [2, "trimmer", "trimming"]; +>robotB : [number, string, string] +>Robot : [number, string, string] +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + +var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +>multiRobotA : [string, [string, string]] +>MultiSkilledRobot : [string, [string, string]] +>["mower", ["mowing", ""]] : [string, [string, string]] +>"mower" : string +>["mowing", ""] : [string, string] +>"mowing" : string +>"" : string + +var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +>multiRobotB : [string, [string, string]] +>MultiSkilledRobot : [string, [string, string]] +>["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>"trimmer" : string +>["trimming", "edging"] : [string, string] +>"trimming" : string +>"edging" : string + +let nameA: string, numberB: number, nameB: string, skillB: string; +>nameA : string +>numberB : number +>nameB : string +>skillB : string + +let robotAInfo: (number | string)[]; +>robotAInfo : (number | string)[] + +let multiSkillB: [string, string], nameMB: string, primarySkillB: string, secondarySkillB: string; +>multiSkillB : [string, string] +>nameMB : string +>primarySkillB : string +>secondarySkillB : string + +let multiRobotAInfo: (string | [string, string])[]; +>multiRobotAInfo : (string | [string, string])[] + +[, nameA] = robotA; +>[, nameA] = robotA : [number, string, string] +>[, nameA] : [undefined, string] +> : undefined +>nameA : string +>robotA : [number, string, string] + +[, nameB] = getRobotB(); +>[, nameB] = getRobotB() : [number, string, string] +>[, nameB] : [undefined, string] +> : undefined +>nameB : string +>getRobotB() : [number, string, string] +>getRobotB : () => [number, string, string] + +[, nameB] = [2, "trimmer", "trimming"]; +>[, nameB] = [2, "trimmer", "trimming"] : [number, string, string] +>[, nameB] : [undefined, string] +> : undefined +>nameB : string +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + +[, multiSkillB] = multiRobotB; +>[, multiSkillB] = multiRobotB : [string, [string, string]] +>[, multiSkillB] : [undefined, [string, string]] +> : undefined +>multiSkillB : [string, string] +>multiRobotB : [string, [string, string]] + +[, multiSkillB] = getMultiRobotB(); +>[, multiSkillB] = getMultiRobotB() : [string, [string, string]] +>[, multiSkillB] : [undefined, [string, string]] +> : undefined +>multiSkillB : [string, string] +>getMultiRobotB() : [string, [string, string]] +>getMultiRobotB : () => [string, [string, string]] + +[, multiSkillB] = ["roomba", ["vaccum", "mopping"]]; +>[, multiSkillB] = ["roomba", ["vaccum", "mopping"]] : [string, [string, string]] +>[, multiSkillB] : [undefined, [string, string]] +> : undefined +>multiSkillB : [string, string] +>["roomba", ["vaccum", "mopping"]] : [string, [string, string]] +>"roomba" : string +>["vaccum", "mopping"] : [string, string] +>"vaccum" : string +>"mopping" : string + +[numberB] = robotB; +>[numberB] = robotB : [number, string, string] +>[numberB] : [number] +>numberB : number +>robotB : [number, string, string] + +[numberB] = getRobotB(); +>[numberB] = getRobotB() : [number, string, string] +>[numberB] : [number] +>numberB : number +>getRobotB() : [number, string, string] +>getRobotB : () => [number, string, string] + +[numberB] = [2, "trimmer", "trimming"]; +>[numberB] = [2, "trimmer", "trimming"] : [number, string, string] +>[numberB] : [number] +>numberB : number +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + +[nameMB] = multiRobotB; +>[nameMB] = multiRobotB : [string, [string, string]] +>[nameMB] : [string] +>nameMB : string +>multiRobotB : [string, [string, string]] + +[nameMB] = getMultiRobotB(); +>[nameMB] = getMultiRobotB() : [string, [string, string]] +>[nameMB] : [string] +>nameMB : string +>getMultiRobotB() : [string, [string, string]] +>getMultiRobotB : () => [string, [string, string]] + +[nameMB] = ["trimmer", ["trimming", "edging"]]; +>[nameMB] = ["trimmer", ["trimming", "edging"]] : [string, string[]] +>[nameMB] : [string] +>nameMB : string +>["trimmer", ["trimming", "edging"]] : [string, string[]] +>"trimmer" : string +>["trimming", "edging"] : string[] +>"trimming" : string +>"edging" : string + +[numberB, nameB, skillB] = robotB; +>[numberB, nameB, skillB] = robotB : [number, string, string] +>[numberB, nameB, skillB] : [number, string, string] +>numberB : number +>nameB : string +>skillB : string +>robotB : [number, string, string] + +[numberB, nameB, skillB] = getRobotB(); +>[numberB, nameB, skillB] = getRobotB() : [number, string, string] +>[numberB, nameB, skillB] : [number, string, string] +>numberB : number +>nameB : string +>skillB : string +>getRobotB() : [number, string, string] +>getRobotB : () => [number, string, string] + +[numberB, nameB, skillB] = [2, "trimmer", "trimming"]; +>[numberB, nameB, skillB] = [2, "trimmer", "trimming"] : [number, string, string] +>[numberB, nameB, skillB] : [number, string, string] +>numberB : number +>nameB : string +>skillB : string +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + +[nameMB, [primarySkillB, secondarySkillB]] = multiRobotB; +>[nameMB, [primarySkillB, secondarySkillB]] = multiRobotB : [string, [string, string]] +>[nameMB, [primarySkillB, secondarySkillB]] : [string, [string, string]] +>nameMB : string +>[primarySkillB, secondarySkillB] : [string, string] +>primarySkillB : string +>secondarySkillB : string +>multiRobotB : [string, [string, string]] + +[nameMB, [primarySkillB, secondarySkillB]] = getMultiRobotB(); +>[nameMB, [primarySkillB, secondarySkillB]] = getMultiRobotB() : [string, [string, string]] +>[nameMB, [primarySkillB, secondarySkillB]] : [string, [string, string]] +>nameMB : string +>[primarySkillB, secondarySkillB] : [string, string] +>primarySkillB : string +>secondarySkillB : string +>getMultiRobotB() : [string, [string, string]] +>getMultiRobotB : () => [string, [string, string]] + +[nameMB, [primarySkillB, secondarySkillB]] = ["trimmer", ["trimming", "edging"]]; +>[nameMB, [primarySkillB, secondarySkillB]] = ["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>[nameMB, [primarySkillB, secondarySkillB]] : [string, [string, string]] +>nameMB : string +>[primarySkillB, secondarySkillB] : [string, string] +>primarySkillB : string +>secondarySkillB : string +>["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>"trimmer" : string +>["trimming", "edging"] : [string, string] +>"trimming" : string +>"edging" : string + +[numberB, ...robotAInfo] = robotB; +>[numberB, ...robotAInfo] = robotB : [number, string, string] +>[numberB, ...robotAInfo] : (number | string)[] +>numberB : number +>...robotAInfo : number | string +>robotAInfo : (number | string)[] +>robotB : [number, string, string] + +[numberB, ...robotAInfo] = getRobotB(); +>[numberB, ...robotAInfo] = getRobotB() : [number, string, string] +>[numberB, ...robotAInfo] : (number | string)[] +>numberB : number +>...robotAInfo : number | string +>robotAInfo : (number | string)[] +>getRobotB() : [number, string, string] +>getRobotB : () => [number, string, string] + +[numberB, ...robotAInfo] = [2, "trimmer", "trimming"]; +>[numberB, ...robotAInfo] = [2, "trimmer", "trimming"] : [number, string, string] +>[numberB, ...robotAInfo] : (number | string)[] +>numberB : number +>...robotAInfo : number | string +>robotAInfo : (number | string)[] +>[2, "trimmer", "trimming"] : [number, string, string] +>Robot : [number, string, string] +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + +[...multiRobotAInfo] = multiRobotA; +>[...multiRobotAInfo] = multiRobotA : [string, [string, string]] +>[...multiRobotAInfo] : (string | [string, string])[] +>...multiRobotAInfo : string | [string, string] +>multiRobotAInfo : (string | [string, string])[] +>multiRobotA : [string, [string, string]] + +[...multiRobotAInfo] = getMultiRobotB(); +>[...multiRobotAInfo] = getMultiRobotB() : [string, [string, string]] +>[...multiRobotAInfo] : (string | [string, string])[] +>...multiRobotAInfo : string | [string, string] +>multiRobotAInfo : (string | [string, string])[] +>getMultiRobotB() : [string, [string, string]] +>getMultiRobotB : () => [string, [string, string]] + +[...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]]; +>[...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]] : (string | [string, string])[] +>[...multiRobotAInfo] : (string | [string, string])[] +>...multiRobotAInfo : string | [string, string] +>multiRobotAInfo : (string | [string, string])[] +>["trimmer", ["trimming", "edging"]] : (string | [string, string])[] +>"trimmer" : string +>["trimming", "edging"] : [string, string] +>"trimming" : string +>"edging" : string + +if (nameA == nameB) { +>nameA == nameB : boolean +>nameA : string +>nameB : string + + console.log(skillB); +>console.log(skillB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>skillB : string +} + +function getRobotB() { +>getRobotB : () => [number, string, string] + + return robotB; +>robotB : [number, string, string] +} + +function getMultiRobotB() { +>getMultiRobotB : () => [string, [string, string]] + + return multiRobotB; +>multiRobotB : [string, [string, string]] +} diff --git a/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts new file mode 100644 index 00000000000..78ed29c397b --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts @@ -0,0 +1,57 @@ +// @sourcemap: true +declare var console: { + log(msg: any): void; +} +type Robot = [number, string, string]; +type MultiSkilledRobot = [string, [string, string]]; + +var robotA: Robot = [1, "mower", "mowing"]; +var robotB: Robot = [2, "trimmer", "trimming"]; +var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; + +let nameA: string, numberB: number, nameB: string, skillB: string; +let robotAInfo: (number | string)[]; + +let multiSkillB: [string, string], nameMB: string, primarySkillB: string, secondarySkillB: string; +let multiRobotAInfo: (string | [string, string])[]; + +[, nameA] = robotA; +[, nameB] = getRobotB(); +[, nameB] = [2, "trimmer", "trimming"]; +[, multiSkillB] = multiRobotB; +[, multiSkillB] = getMultiRobotB(); +[, multiSkillB] = ["roomba", ["vaccum", "mopping"]]; + +[numberB] = robotB; +[numberB] = getRobotB(); +[numberB] = [2, "trimmer", "trimming"]; +[nameMB] = multiRobotB; +[nameMB] = getMultiRobotB(); +[nameMB] = ["trimmer", ["trimming", "edging"]]; + +[numberB, nameB, skillB] = robotB; +[numberB, nameB, skillB] = getRobotB(); +[numberB, nameB, skillB] = [2, "trimmer", "trimming"]; +[nameMB, [primarySkillB, secondarySkillB]] = multiRobotB; +[nameMB, [primarySkillB, secondarySkillB]] = getMultiRobotB(); +[nameMB, [primarySkillB, secondarySkillB]] = ["trimmer", ["trimming", "edging"]]; + +[numberB, ...robotAInfo] = robotB; +[numberB, ...robotAInfo] = getRobotB(); +[numberB, ...robotAInfo] = [2, "trimmer", "trimming"]; +[...multiRobotAInfo] = multiRobotA; +[...multiRobotAInfo] = getMultiRobotB(); +[...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]]; + +if (nameA == nameB) { + console.log(skillB); +} + +function getRobotB() { + return robotB; +} + +function getMultiRobotB() { + return multiRobotB; +} \ No newline at end of file From b1d395c4cf24f6c7b9a8ac00bafa9678edba6597 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 8 Dec 2015 16:36:19 -0800 Subject: [PATCH 031/209] Make the destructuring array literal assignment better with sourcemap --- src/compiler/emitter.ts | 26 +- ...DestructuringForArrayBindingPattern.js.map | 2 +- ...turingForArrayBindingPattern.sourcemap.txt | 60 +-- ...estructuringForObjectBindingPattern.js.map | 2 +- ...uringForObjectBindingPattern.sourcemap.txt | 26 +- ...ationDestructuringVariableStatement.js.map | 2 +- ...structuringVariableStatement.sourcemap.txt | 6 +- ...ariableStatementArrayBindingPattern.js.map | 2 +- ...StatementArrayBindingPattern.sourcemap.txt | 6 +- ...riableStatementArrayBindingPattern2.js.map | 2 +- ...tatementArrayBindingPattern2.sourcemap.txt | 6 +- ...riableStatementArrayBindingPattern3.js.map | 2 +- ...tatementArrayBindingPattern3.sourcemap.txt | 384 ++++++++++++------ ...StatementNestedObjectBindingPattern.js.map | 2 +- ...ntNestedObjectBindingPattern.sourcemap.txt | 6 +- 15 files changed, 336 insertions(+), 198 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 4487695a2af..47e518e90d7 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1986,8 +1986,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi return result; } - function createElementAccessExpression(expression: Expression, argumentExpression: Expression, sourceMapNode?: Node): ElementAccessExpression { - const result = createSourceMappedSynthesizedNode(SyntaxKind.ElementAccessExpression, sourceMapNode || argumentExpression); + function createElementAccessExpression(expression: Expression, argumentExpression: Expression, sourceMapNode: Node): ElementAccessExpression { + const result = createSourceMappedSynthesizedNode(SyntaxKind.ElementAccessExpression, sourceMapNode); result.expression = parenthesizeForAccess(expression); result.argumentExpression = argumentExpression; @@ -3775,7 +3775,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi if (!canDefineTempVariablesInPlace) { recordTempDeclaration(identifier); } - emitAssignment(identifier, expression, shouldEmitCommaBeforeAssignment, expression); + emitAssignment(identifier, expression, shouldEmitCommaBeforeAssignment, expression.parent || expression); return identifier; } @@ -3867,7 +3867,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi return !nameIsComputed && index.kind === SyntaxKind.Identifier ? createPropertyAccessExpression(object, index) - : createElementAccessExpression(object, index); + : createElementAccessExpression(object, index, index); } function createSliceCall(value: Expression, sliceIndex: number): CallExpression { @@ -3891,12 +3891,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi if (p.kind === SyntaxKind.PropertyAssignment || p.kind === SyntaxKind.ShorthandPropertyAssignment) { const propName = (p).name; const target = p.kind === SyntaxKind.ShorthandPropertyAssignment ? p : (p).initializer || propName; - emitDestructuringAssignment(target, createPropertyAccessForDestructuringProperty(value, propName)); + emitDestructuringAssignment(target, createPropertyAccessForDestructuringProperty(value, propName), p); } } } - function emitArrayLiteralAssignment(target: ArrayLiteralExpression, value: Expression) { + function emitArrayLiteralAssignment(target: ArrayLiteralExpression, value: Expression, sourceMapNode: Node) { const elements = target.elements; if (elements.length !== 1) { // For anything but a single element destructuring we need to generate a temporary @@ -3907,16 +3907,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi const e = elements[i]; if (e.kind !== SyntaxKind.OmittedExpression) { if (e.kind !== SyntaxKind.SpreadElementExpression) { - emitDestructuringAssignment(e, createElementAccessExpression(value, createNumericLiteral(i))); + emitDestructuringAssignment(e, createElementAccessExpression(value, createNumericLiteral(i), e), elements.length === 1 ? sourceMapNode : e); } else if (i === elements.length - 1) { - emitDestructuringAssignment((e).expression, createSliceCall(value, i)); + emitDestructuringAssignment((e).expression, createSliceCall(value, i), elements.length === 1 ? sourceMapNode : e); } } } } - function emitDestructuringAssignment(target: Expression | ShorthandPropertyAssignment, value: Expression) { + function emitDestructuringAssignment(target: Expression | ShorthandPropertyAssignment, value: Expression, sourceMapNode: Node) { if (target.kind === SyntaxKind.ShorthandPropertyAssignment) { if ((target).objectAssignmentInitializer) { value = createDefaultValueCheck(value, (target).objectAssignmentInitializer); @@ -3931,11 +3931,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emitObjectLiteralAssignment(target, value); } else if (target.kind === SyntaxKind.ArrayLiteralExpression) { - emitArrayLiteralAssignment(target, value); + emitArrayLiteralAssignment(target, value, sourceMapNode); } else { // TODO - emitAssignment(target, value, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0, { pos: -1, end: -1 }); + emitAssignment(target, value, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0, sourceMapNode); emitCount++; } } @@ -3948,14 +3948,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emit(value); } else if (isAssignmentExpressionStatement) { - emitDestructuringAssignment(target, value); + emitDestructuringAssignment(target, value, root); } else { if (root.parent.kind !== SyntaxKind.ParenthesizedExpression) { write("("); } value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true); - emitDestructuringAssignment(target, value); + emitDestructuringAssignment(target, value, root); write(", "); emit(value); if (root.parent.kind !== SyntaxKind.ParenthesizedExpression) { diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.js.map index efda72d1d96..5d84072bda9 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringForArrayBindingPattern.js.map] -{"version":3,"file":"sourceMapValidationDestructuringForArrayBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForArrayBindingPattern.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED,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;AACzE;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,GAAG,CAAC,CAAC,GAAG,CAAC,iBAAkB,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC7C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAa,eAAU,EAAtB,aAAsB,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAa,+BAA0B,EAAtC,aAAsC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAI,mBAAgC,EAA/B,qBAAa,EAAE,uBAAe,EAAkB,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC7E,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;AAC/B,CAAC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AACjC,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,0CAAsC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjE,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,8DAA0D,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACrF,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringForArrayBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForArrayBindingPattern.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED,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;AACzE;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,GAAG,CAAC,CAAC,GAAG,CAAC,iBAAkB,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC7C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,eAAsB,EAAtB,aAAsB,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,C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;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,+BAAsD,EAArD,gBAAQ,EAAE,wBAAa,EAAgC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjF,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,sCAAkC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC7D,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,0CAAsC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjE,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,8DAA0D,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACrF,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.sourcemap.txt index 11ef4f41879..3710798733e 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.sourcemap.txt @@ -344,8 +344,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 3 > 4 > ( 5 > let -6 > [, nameA] = -7 > getRobot() +6 > +7 > [, nameA] = getRobot() 8 > 9 > [, nameA] = getRobot() 10> , @@ -366,7 +366,7 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 3 >Emitted(13, 5) Source(21, 5) + SourceIndex(0) 4 >Emitted(13, 6) Source(21, 6) + SourceIndex(0) 5 >Emitted(13, 9) Source(21, 9) + SourceIndex(0) -6 >Emitted(13, 10) Source(21, 22) + SourceIndex(0) +6 >Emitted(13, 10) Source(21, 10) + SourceIndex(0) 7 >Emitted(13, 25) Source(21, 32) + SourceIndex(0) 8 >Emitted(13, 27) Source(21, 10) + SourceIndex(0) 9 >Emitted(13, 40) Source(21, 32) + SourceIndex(0) @@ -450,8 +450,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 3 > 4 > ( 5 > let -6 > [, nameA] = -7 > [2, "trimmer", "trimming"] +6 > +7 > [, nameA] = [2, "trimmer", "trimming"] 8 > 9 > [, nameA] = [2, "trimmer", "trimming"] 10> , @@ -472,7 +472,7 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 3 >Emitted(16, 5) Source(24, 5) + SourceIndex(0) 4 >Emitted(16, 6) Source(24, 6) + SourceIndex(0) 5 >Emitted(16, 9) Source(24, 9) + SourceIndex(0) -6 >Emitted(16, 10) Source(24, 22) + SourceIndex(0) +6 >Emitted(16, 10) Source(24, 10) + SourceIndex(0) 7 >Emitted(16, 41) Source(24, 48) + SourceIndex(0) 8 >Emitted(16, 43) Source(24, 10) + SourceIndex(0) 9 >Emitted(16, 56) Source(24, 48) + SourceIndex(0) @@ -672,8 +672,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 3 > 4 > ( 5 > let -6 > [, [primarySkillA, secondarySkillA]] = -7 > getMultiRobot() +6 > +7 > [, [primarySkillA, secondarySkillA]] = getMultiRobot() 8 > 9 > [primarySkillA, secondarySkillA] 10> @@ -698,7 +698,7 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 3 >Emitted(22, 5) Source(30, 5) + SourceIndex(0) 4 >Emitted(22, 6) Source(30, 6) + SourceIndex(0) 5 >Emitted(22, 9) Source(30, 9) + SourceIndex(0) -6 >Emitted(22, 10) Source(30, 49) + SourceIndex(0) +6 >Emitted(22, 10) Source(30, 10) + SourceIndex(0) 7 >Emitted(22, 30) Source(30, 64) + SourceIndex(0) 8 >Emitted(22, 32) Source(30, 13) + SourceIndex(0) 9 >Emitted(22, 42) Source(30, 45) + SourceIndex(0) @@ -790,8 +790,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 3 > 4 > ( 5 > let -6 > [, [primarySkillA, secondarySkillA]] = -7 > ["trimmer", ["trimming", "edging"]] +6 > +7 > [, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]] 8 > 9 > [primarySkillA, secondarySkillA] 10> @@ -816,7 +816,7 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 3 >Emitted(25, 5) Source(33, 5) + SourceIndex(0) 4 >Emitted(25, 6) Source(33, 6) + SourceIndex(0) 5 >Emitted(25, 9) Source(33, 9) + SourceIndex(0) -6 >Emitted(25, 10) Source(33, 49) + SourceIndex(0) +6 >Emitted(25, 10) Source(33, 10) + SourceIndex(0) 7 >Emitted(25, 50) Source(33, 84) + SourceIndex(0) 8 >Emitted(25, 52) Source(33, 13) + SourceIndex(0) 9 >Emitted(25, 62) Source(33, 45) + SourceIndex(0) @@ -1622,8 +1622,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 3 > 4 > ( 5 > let -6 > [numberA2, nameA2, skillA2] = -7 > getRobot() +6 > +7 > [numberA2, nameA2, skillA2] = getRobot() 8 > 9 > numberA2 10> , @@ -1648,7 +1648,7 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 3 >Emitted(49, 5) Source(59, 5) + SourceIndex(0) 4 >Emitted(49, 6) Source(59, 6) + SourceIndex(0) 5 >Emitted(49, 9) Source(59, 9) + SourceIndex(0) -6 >Emitted(49, 10) Source(59, 40) + SourceIndex(0) +6 >Emitted(49, 10) Source(59, 10) + SourceIndex(0) 7 >Emitted(49, 25) Source(59, 50) + SourceIndex(0) 8 >Emitted(49, 27) Source(59, 11) + SourceIndex(0) 9 >Emitted(49, 43) Source(59, 19) + SourceIndex(0) @@ -1740,8 +1740,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 3 > 4 > ( 5 > let -6 > [numberA2, nameA2, skillA2] = -7 > [2, "trimmer", "trimming"] +6 > +7 > [numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"] 8 > 9 > numberA2 10> , @@ -1766,7 +1766,7 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 3 >Emitted(52, 5) Source(62, 5) + SourceIndex(0) 4 >Emitted(52, 6) Source(62, 6) + SourceIndex(0) 5 >Emitted(52, 9) Source(62, 9) + SourceIndex(0) -6 >Emitted(52, 10) Source(62, 40) + SourceIndex(0) +6 >Emitted(52, 10) Source(62, 10) + SourceIndex(0) 7 >Emitted(52, 41) Source(62, 66) + SourceIndex(0) 8 >Emitted(52, 43) Source(62, 11) + SourceIndex(0) 9 >Emitted(52, 59) Source(62, 19) + SourceIndex(0) @@ -1978,8 +1978,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 3 > 4 > ( 5 > let -6 > [nameMA, [primarySkillA, secondarySkillA]] = -7 > getMultiRobot() +6 > +7 > [nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot() 8 > 9 > nameMA 10> , @@ -2006,7 +2006,7 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 3 >Emitted(58, 5) Source(68, 5) + SourceIndex(0) 4 >Emitted(58, 6) Source(68, 6) + SourceIndex(0) 5 >Emitted(58, 9) Source(68, 9) + SourceIndex(0) -6 >Emitted(58, 10) Source(68, 55) + SourceIndex(0) +6 >Emitted(58, 10) Source(68, 10) + SourceIndex(0) 7 >Emitted(58, 30) Source(68, 70) + SourceIndex(0) 8 >Emitted(58, 32) Source(68, 11) + SourceIndex(0) 9 >Emitted(58, 46) Source(68, 17) + SourceIndex(0) @@ -2102,8 +2102,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 3 > 4 > ( 5 > let -6 > [nameMA, [primarySkillA, secondarySkillA]] = -7 > ["trimmer", ["trimming", "edging"]] +6 > +7 > [nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]] 8 > 9 > nameMA 10> , @@ -2130,7 +2130,7 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 3 >Emitted(61, 5) Source(71, 5) + SourceIndex(0) 4 >Emitted(61, 6) Source(71, 6) + SourceIndex(0) 5 >Emitted(61, 9) Source(71, 9) + SourceIndex(0) -6 >Emitted(61, 10) Source(71, 55) + SourceIndex(0) +6 >Emitted(61, 10) Source(71, 10) + SourceIndex(0) 7 >Emitted(61, 50) Source(71, 90) + SourceIndex(0) 8 >Emitted(61, 52) Source(71, 11) + SourceIndex(0) 9 >Emitted(61, 66) Source(71, 17) + SourceIndex(0) @@ -2329,8 +2329,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 3 > 4 > ( 5 > let -6 > [numberA3, ...robotAInfo] = -7 > getRobot() +6 > +7 > [numberA3, ...robotAInfo] = getRobot() 8 > 9 > numberA3 10> , @@ -2353,7 +2353,7 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 3 >Emitted(67, 5) Source(78, 5) + SourceIndex(0) 4 >Emitted(67, 6) Source(78, 6) + SourceIndex(0) 5 >Emitted(67, 9) Source(78, 9) + SourceIndex(0) -6 >Emitted(67, 10) Source(78, 38) + SourceIndex(0) +6 >Emitted(67, 10) Source(78, 10) + SourceIndex(0) 7 >Emitted(67, 25) Source(78, 48) + SourceIndex(0) 8 >Emitted(67, 27) Source(78, 11) + SourceIndex(0) 9 >Emitted(67, 43) Source(78, 19) + SourceIndex(0) @@ -2441,8 +2441,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 3 > 4 > ( 5 > let -6 > [numberA3, ...robotAInfo] = -7 > [2, "trimmer", "trimming"] +6 > +7 > [numberA3, ...robotAInfo] = [2, "trimmer", "trimming"] 8 > 9 > numberA3 10> , @@ -2465,7 +2465,7 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 3 >Emitted(70, 5) Source(81, 5) + SourceIndex(0) 4 >Emitted(70, 6) Source(81, 6) + SourceIndex(0) 5 >Emitted(70, 9) Source(81, 9) + SourceIndex(0) -6 >Emitted(70, 10) Source(81, 38) + SourceIndex(0) +6 >Emitted(70, 10) Source(81, 10) + SourceIndex(0) 7 >Emitted(70, 41) Source(81, 64) + SourceIndex(0) 8 >Emitted(70, 43) Source(81, 11) + SourceIndex(0) 9 >Emitted(70, 59) Source(81, 19) + SourceIndex(0) diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.js.map index b931afe67b0..2c3f4eb1264 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringForObjectBindingPattern.js.map] -{"version":3,"file":"sourceMapValidationDestructuringForObjectBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForObjectBindingPattern.ts"],"names":[],"mappings":"AAgBA,IAAI,KAAK,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACtD,IAAI,UAAU,GAAe,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;AACjG;IACI,MAAM,CAAC,KAAK,CAAC;AACjB,CAAC;AACD;IACI,MAAM,CAAC,UAAU,CAAC;AACtB,CAAC;AAED,GAAG,CAAC,CAAC,GAAG,CAAC,kBAAsB,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAA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,EAAE,yBAAqB,EAAwB,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjH,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,8EACgF,EAD/E,eAAW,EAAE,cAAM,EAAI,qBAAiB,EAAE,yBAAqB,EAErE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACpB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.sourcemap.txt index f598cc385f8..cac10b04888 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.sourcemap.txt @@ -985,8 +985,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern.ts 3 > 4 > ( 5 > let -6 > {name: nameA, skill: skillA } = -7 > getRobot() +6 > +7 > {name: nameA, skill: skillA } = getRobot() 8 > 9 > name: nameA 10> , @@ -1009,7 +1009,7 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern.ts 3 >Emitted(30, 5) Source(50, 5) + SourceIndex(0) 4 >Emitted(30, 6) Source(50, 6) + SourceIndex(0) 5 >Emitted(30, 9) Source(50, 9) + SourceIndex(0) -6 >Emitted(30, 10) Source(50, 42) + SourceIndex(0) +6 >Emitted(30, 10) Source(50, 10) + SourceIndex(0) 7 >Emitted(30, 25) Source(50, 52) + SourceIndex(0) 8 >Emitted(30, 27) Source(50, 11) + SourceIndex(0) 9 >Emitted(30, 42) Source(50, 22) + SourceIndex(0) @@ -1097,8 +1097,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern.ts 3 > 4 > ( 5 > let -6 > {name: nameA, skill: skillA } = -7 > { name: "trimmer", skill: "trimming" } +6 > +7 > {name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" } 8 > 9 > name: nameA 10> , @@ -1121,7 +1121,7 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern.ts 3 >Emitted(33, 5) Source(53, 5) + SourceIndex(0) 4 >Emitted(33, 6) Source(53, 6) + SourceIndex(0) 5 >Emitted(33, 9) Source(53, 9) + SourceIndex(0) -6 >Emitted(33, 10) Source(53, 42) + SourceIndex(0) +6 >Emitted(33, 10) Source(53, 10) + SourceIndex(0) 7 >Emitted(33, 53) Source(53, 87) + SourceIndex(0) 8 >Emitted(33, 55) Source(53, 11) + SourceIndex(0) 9 >Emitted(33, 70) Source(53, 22) + SourceIndex(0) @@ -1331,8 +1331,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern.ts 3 > 4 > ( 5 > let -6 > {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = -7 > getMultiRobot() +6 > +7 > {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot() 8 > 9 > name: nameA 10> , @@ -1359,7 +1359,7 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern.ts 3 >Emitted(39, 5) Source(59, 5) + SourceIndex(0) 4 >Emitted(39, 6) Source(59, 6) + SourceIndex(0) 5 >Emitted(39, 9) Source(59, 9) + SourceIndex(0) -6 >Emitted(39, 10) Source(59, 81) + SourceIndex(0) +6 >Emitted(39, 10) Source(59, 10) + SourceIndex(0) 7 >Emitted(39, 30) Source(59, 96) + SourceIndex(0) 8 >Emitted(39, 32) Source(59, 11) + SourceIndex(0) 9 >Emitted(39, 47) Source(59, 22) + SourceIndex(0) @@ -1455,9 +1455,9 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern.ts 3 > 4 > ( 5 > let -6 > {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = - > -7 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } +6 > +7 > {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } 8 > 9 > name: nameA 10> , @@ -1486,7 +1486,7 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern.ts 3 >Emitted(42, 5) Source(62, 5) + SourceIndex(0) 4 >Emitted(42, 6) Source(62, 6) + SourceIndex(0) 5 >Emitted(42, 9) Source(62, 9) + SourceIndex(0) -6 >Emitted(42, 10) Source(63, 5) + SourceIndex(0) +6 >Emitted(42, 10) Source(62, 10) + SourceIndex(0) 7 >Emitted(42, 88) Source(63, 90) + SourceIndex(0) 8 >Emitted(42, 90) Source(62, 11) + SourceIndex(0) 9 >Emitted(42, 105) Source(62, 22) + SourceIndex(0) diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.js.map index b70ebc3bc1d..b7f0e37c778 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;AAC3D,IAAI,mBAAwB,CAAC;AAC7B,IAAM,mBAAW,EAAE,qBAAa,CAAY;AAC5C,IAAqC,8CAAyC,EAAxE,eAAW,EAAE,iBAAa,CAA+C;AAC/E,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AACD,IAAI,CAAC,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"} \ 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;AAC3D,IAAI,mBAAwB,CAAC;AAC7B,IAAM,mBAAW,EAAE,qBAAa,CAAY;AAC5C,IAAI,8CAA0E,EAAxE,eAAW,EAAE,iBAAa,CAA+C;AAC/E,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AACD,IAAI,CAAC,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.sourcemap.txt index 36f31e00216..f69d311e90d 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.sourcemap.txt @@ -176,15 +176,15 @@ sourceFile:sourceMapValidationDestructuringVariableStatement.ts 8 > ^ 1-> > -2 >var { name: nameC, skill: skillC } = -3 > { name: "Edger", skill: "cutting edges" } +2 >var +3 > { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" } 4 > 5 > name: nameC 6 > , 7 > skill: skillC 8 > } = { name: "Edger", skill: "cutting edges" }; 1->Emitted(6, 1) Source(13, 1) + SourceIndex(0) -2 >Emitted(6, 5) Source(13, 38) + 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) diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js.map index ff3efc97078..5047017e525 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;AAG/C,IAAI,iBAAkB,CAAC;AACvB,IAAI,mBAAkB,CAAC;AACvB,IAAK,oBAAQ,EAAE,kBAAM,EAAE,mBAAO,CAAW;AAEzC,IAAI,6CAA4C,CAAC;AACjD,IAA+B,oCAA+B,EAAzD,eAAO,EAAE,aAAK,EAAE,cAAM,CAAoC;AAE/D,IAAK,oBAAQ,EAAE,4BAAa,CAAW;AAEvC,EAAE,CAAC,CAAC,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC;IAClB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC"} \ 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;AAG/C,IAAI,iBAAkB,CAAC;AACvB,IAAI,mBAAkB,CAAC;AACvB,IAAK,oBAAQ,EAAE,kBAAM,EAAE,mBAAO,CAAW;AAEzC,IAAI,6CAA4C,CAAC;AACjD,IAAI,oCAA0D,EAAzD,eAAO,EAAE,aAAK,EAAE,cAAM,CAAoC;AAE/D,IAAK,oBAAQ,EAAE,4BAAa,CAAW;AAEvC,EAAE,CAAC,CAAC,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC;IAClB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt index 557043581c3..da4f258ea9b 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt @@ -181,8 +181,8 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern. 10> ^ 1-> > -2 >let [numberC, nameC, skillC] = -3 > [3, "edging", "Trimming edges"] +2 >let +3 > [numberC, nameC, skillC] = [3, "edging", "Trimming edges"] 4 > 5 > numberC 6 > , @@ -191,7 +191,7 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern. 9 > skillC 10> ] = [3, "edging", "Trimming edges"]; 1->Emitted(7, 1) Source(14, 1) + SourceIndex(0) -2 >Emitted(7, 5) Source(14, 32) + SourceIndex(0) +2 >Emitted(7, 5) Source(14, 5) + SourceIndex(0) 3 >Emitted(7, 41) Source(14, 63) + SourceIndex(0) 4 >Emitted(7, 43) Source(14, 6) + SourceIndex(0) 5 >Emitted(7, 58) Source(14, 13) + SourceIndex(0) diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js.map index c588d92c53d..3ed458e21b0 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;AAEzE,IAAI,uBAAwB,CAAC;AAC7B,IAAI,uBAAsB,CAAC;AAC3B,IAAK,uBAAM,EAAE,mBAAgC,EAA/B,qBAAa,EAAE,uBAAe,CAAiB;AAE7D,IAAI,6CAA4C,CAAC;AACjD,IAAkD,sCAAiC,EAA9E,eAAO,EAAE,UAAgC,EAA/B,qBAAa,EAAE,uBAAe,CAAuC;AAEpF,IAAI,sCAAkC,CAAC;AAEvC,EAAE,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC,CAAC;IACnB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvC,CAAC"} \ 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;AAEzE,IAAI,uBAAwB,CAAC;AAC7B,IAAI,uBAAsB,CAAC;AAC3B,IAAK,uBAAM,EAAE,mBAAgC,EAA/B,qBAAa,EAAE,uBAAe,CAAiB;AAE7D,IAAI,6CAA4C,CAAC;AACjD,IAAI,sCAA+E,EAA9E,eAAO,EAAE,UAAgC,EAA/B,qBAAa,EAAE,uBAAe,CAAuC;AAEpF,IAAI,sCAAkC,CAAC;AAEvC,EAAE,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC,CAAC;IACnB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt index a81a55e629a..8e61c11ef3f 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt @@ -200,8 +200,8 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern2 12> ^ 1-> > -2 >let [nameMC2, [primarySkillC, secondarySkillC]] = -3 > ["roomba", ["vaccum", "mopping"]] +2 >let +3 > [nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vaccum", "mopping"]] 4 > 5 > nameMC2 6 > , @@ -212,7 +212,7 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern2 11> secondarySkillC 12> ]] = ["roomba", ["vaccum", "mopping"]]; 1->Emitted(7, 1) Source(13, 1) + SourceIndex(0) -2 >Emitted(7, 5) Source(13, 51) + SourceIndex(0) +2 >Emitted(7, 5) Source(13, 5) + SourceIndex(0) 3 >Emitted(7, 43) Source(13, 84) + SourceIndex(0) 4 >Emitted(7, 45) Source(13, 6) + SourceIndex(0) 5 >Emitted(7, 60) Source(13, 13) + SourceIndex(0) diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js.map index 9b10b964ee5..61afc3ab57b 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js.map] -{"version":3,"file":"sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAC/C,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;AAEzE,IAAI,KAAa,EAAE,OAAe,EAAE,KAAa,EAAE,MAAc,CAAC;AAClE,IAAI,UAA+B,CAAC;AAEpC,IAAI,WAA6B,EAAE,MAAc,EAAE,aAAqB,EAAE,eAAuB,CAAC;AAClG,IAAI,eAA8C,CAAC;AAEnD,iBAAkB,CAAC;AACP,gBAAW,eAAA,CAAC;AACZ,+BAA0B,eAAA,CAAC;AACvC,4BAA6B,CAAC;AACZ,qBAAgB,qBAAA,CAAC;AACjB,sCAAiC,qBAAA,CAAC;AAEpD,mBAAkB,CAAC;AACnB,wBAAuB,CAAC;AACxB,uCAAsC,CAAC;AACvC,uBAAsB,CAAC;AACvB,4BAA2B,CAAC;AAC5B,+CAA8C,CAAC;AAE/C,0DAAiC,CAAC;AACP,gBAAW,gDAAA,CAAC;AACZ,+BAA0B,gDAAA,CAAC;AACtD,4FAAwD,CAAC;AACZ,qBAAgB,4EAAA,CAAC;AACjB,wCAAmC,4EAAA,CAAC;AAEjF,iDAAiC,CAAC;AACP,gBAAW,2CAAA,CAAC;AACZ,+BAAiC,2CAAA,CAAC;AAC7D,sCAAkC,CAAC;AACnC,2CAAuC,CAAC;AACxC,8DAA0D,CAAC;AAE3D,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAC/C,IAAI,WAAW,GAAsB,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;AAC/D,IAAI,WAAW,G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ACxB,CAAC;AAED;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.sourcemap.txt index fbe3c58b0a6..3c02134201b 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.sourcemap.txt @@ -290,43 +290,49 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern3 4 > ^^^^^^^^^^^^^^^-> 1 > > - > -2 >[, nameA] = robotA -3 > ; -1 >Emitted(9, 1) Source(18, 1) + SourceIndex(0) -2 >Emitted(9, 18) Source(18, 19) + SourceIndex(0) + >[, +2 >nameA +3 > ] = robotA; +1 >Emitted(9, 1) Source(18, 4) + SourceIndex(0) +2 >Emitted(9, 18) Source(18, 9) + SourceIndex(0) 3 >Emitted(9, 19) Source(18, 20) + SourceIndex(0) --- >>>_a = getRobotB(), nameB = _a[1]; 1-> 2 >^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^ -4 > ^ -5 > ^^^^^^^^^^^^^^^^-> +3 > ^^ +4 > ^^^^^^^^^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^-> 1-> - >[, nameB] = -2 >getRobotB() + > +2 >[, nameB] = getRobotB() 3 > -4 > ; -1->Emitted(10, 1) Source(19, 13) + SourceIndex(0) +4 > nameB +5 > ] = getRobotB(); +1->Emitted(10, 1) Source(19, 1) + SourceIndex(0) 2 >Emitted(10, 17) Source(19, 24) + SourceIndex(0) -3 >Emitted(10, 32) Source(19, 24) + SourceIndex(0) -4 >Emitted(10, 33) Source(19, 25) + SourceIndex(0) +3 >Emitted(10, 19) Source(19, 4) + SourceIndex(0) +4 >Emitted(10, 32) Source(19, 9) + SourceIndex(0) +5 >Emitted(10, 33) Source(19, 25) + SourceIndex(0) --- >>>_b = [2, "trimmer", "trimming"], nameB = _b[1]; 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^ -4 > ^ +3 > ^^ +4 > ^^^^^^^^^^^^^ +5 > ^ 1-> - >[, nameB] = -2 >[2, "trimmer", "trimming"] + > +2 >[, nameB] = [2, "trimmer", "trimming"] 3 > -4 > ; -1->Emitted(11, 1) Source(20, 13) + SourceIndex(0) +4 > nameB +5 > ] = [2, "trimmer", "trimming"]; +1->Emitted(11, 1) Source(20, 1) + SourceIndex(0) 2 >Emitted(11, 32) Source(20, 39) + SourceIndex(0) -3 >Emitted(11, 47) Source(20, 39) + SourceIndex(0) -4 >Emitted(11, 48) Source(20, 40) + SourceIndex(0) +3 >Emitted(11, 34) Source(20, 4) + SourceIndex(0) +4 >Emitted(11, 47) Source(20, 9) + SourceIndex(0) +5 >Emitted(11, 48) Source(20, 40) + SourceIndex(0) --- >>>multiSkillB = multiRobotB[1]; 1 > @@ -334,43 +340,49 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern3 3 > ^ 4 > ^^^^^^^^^^^^^^^-> 1 > - > -2 >[, multiSkillB] = multiRobotB -3 > ; -1 >Emitted(12, 1) Source(21, 1) + SourceIndex(0) -2 >Emitted(12, 29) Source(21, 30) + SourceIndex(0) + >[, +2 >multiSkillB +3 > ] = multiRobotB; +1 >Emitted(12, 1) Source(21, 4) + SourceIndex(0) +2 >Emitted(12, 29) Source(21, 15) + SourceIndex(0) 3 >Emitted(12, 30) Source(21, 31) + SourceIndex(0) --- >>>_c = getMultiRobotB(), multiSkillB = _c[1]; 1-> 2 >^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^ -4 > ^ -5 > ^^^^^^^^^^^^^^^^^^-> +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^-> 1-> - >[, multiSkillB] = -2 >getMultiRobotB() + > +2 >[, multiSkillB] = getMultiRobotB() 3 > -4 > ; -1->Emitted(13, 1) Source(22, 19) + SourceIndex(0) +4 > multiSkillB +5 > ] = getMultiRobotB(); +1->Emitted(13, 1) Source(22, 1) + SourceIndex(0) 2 >Emitted(13, 22) Source(22, 35) + SourceIndex(0) -3 >Emitted(13, 43) Source(22, 35) + SourceIndex(0) -4 >Emitted(13, 44) Source(22, 36) + SourceIndex(0) +3 >Emitted(13, 24) Source(22, 4) + SourceIndex(0) +4 >Emitted(13, 43) Source(22, 15) + SourceIndex(0) +5 >Emitted(13, 44) Source(22, 36) + SourceIndex(0) --- >>>_d = ["roomba", ["vaccum", "mopping"]], multiSkillB = _d[1]; 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^ -4 > ^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^ +5 > ^ 1-> - >[, multiSkillB] = -2 >["roomba", ["vaccum", "mopping"]] + > +2 >[, multiSkillB] = ["roomba", ["vaccum", "mopping"]] 3 > -4 > ; -1->Emitted(14, 1) Source(23, 19) + SourceIndex(0) +4 > multiSkillB +5 > ] = ["roomba", ["vaccum", "mopping"]]; +1->Emitted(14, 1) Source(23, 1) + SourceIndex(0) 2 >Emitted(14, 39) Source(23, 52) + SourceIndex(0) -3 >Emitted(14, 60) Source(23, 52) + SourceIndex(0) -4 >Emitted(14, 61) Source(23, 53) + SourceIndex(0) +3 >Emitted(14, 41) Source(23, 4) + SourceIndex(0) +4 >Emitted(14, 60) Source(23, 15) + SourceIndex(0) +5 >Emitted(14, 61) Source(23, 53) + SourceIndex(0) --- >>>numberB = robotB[0]; 1 > @@ -452,138 +464,264 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern3 --- >>>numberB = robotB[0], nameB = robotB[1], skillB = robotB[2]; 1-> -2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^ -4 > ^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^ +7 > ^ +8 > ^^^^^^^-> 1-> > - > -2 >[numberB, nameB, skillB] = robotB -3 > ; -1->Emitted(21, 1) Source(32, 1) + SourceIndex(0) -2 >Emitted(21, 59) Source(32, 34) + SourceIndex(0) -3 >Emitted(21, 60) Source(32, 35) + SourceIndex(0) + >[ +2 >numberB +3 > , +4 > nameB +5 > , +6 > skillB +7 > ] = robotB; +1->Emitted(21, 1) Source(32, 2) + SourceIndex(0) +2 >Emitted(21, 20) Source(32, 9) + SourceIndex(0) +3 >Emitted(21, 22) Source(32, 11) + SourceIndex(0) +4 >Emitted(21, 39) Source(32, 16) + SourceIndex(0) +5 >Emitted(21, 41) Source(32, 18) + SourceIndex(0) +6 >Emitted(21, 59) Source(32, 24) + SourceIndex(0) +7 >Emitted(21, 60) Source(32, 35) + SourceIndex(0) --- >>>_e = getRobotB(), numberB = _e[0], nameB = _e[1], skillB = _e[2]; 1-> 2 >^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -4 > ^ -5 > ^^^^^^^^^^^^^^^^-> +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^ +10> ^^^^^^^^^^^^^^^^-> 1-> - >[numberB, nameB, skillB] = -2 >getRobotB() + > +2 >[numberB, nameB, skillB] = getRobotB() 3 > -4 > ; -1->Emitted(22, 1) Source(33, 28) + SourceIndex(0) +4 > numberB +5 > , +6 > nameB +7 > , +8 > skillB +9 > ] = getRobotB(); +1->Emitted(22, 1) Source(33, 1) + SourceIndex(0) 2 >Emitted(22, 17) Source(33, 39) + SourceIndex(0) -3 >Emitted(22, 65) Source(33, 39) + SourceIndex(0) -4 >Emitted(22, 66) Source(33, 40) + SourceIndex(0) +3 >Emitted(22, 19) Source(33, 2) + SourceIndex(0) +4 >Emitted(22, 34) Source(33, 9) + SourceIndex(0) +5 >Emitted(22, 36) Source(33, 11) + SourceIndex(0) +6 >Emitted(22, 49) Source(33, 16) + SourceIndex(0) +7 >Emitted(22, 51) Source(33, 18) + SourceIndex(0) +8 >Emitted(22, 65) Source(33, 24) + SourceIndex(0) +9 >Emitted(22, 66) Source(33, 40) + SourceIndex(0) --- >>>_f = [2, "trimmer", "trimming"], numberB = _f[0], nameB = _f[1], skillB = _f[2]; 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -4 > ^ -5 > ^^^^^^^^^^^^^^-> +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^ +10> ^^^^^^^^^^^^^^-> 1-> - >[numberB, nameB, skillB] = -2 >[2, "trimmer", "trimming"] + > +2 >[numberB, nameB, skillB] = [2, "trimmer", "trimming"] 3 > -4 > ; -1->Emitted(23, 1) Source(34, 28) + SourceIndex(0) +4 > numberB +5 > , +6 > nameB +7 > , +8 > skillB +9 > ] = [2, "trimmer", "trimming"]; +1->Emitted(23, 1) Source(34, 1) + SourceIndex(0) 2 >Emitted(23, 32) Source(34, 54) + SourceIndex(0) -3 >Emitted(23, 80) Source(34, 54) + SourceIndex(0) -4 >Emitted(23, 81) Source(34, 55) + SourceIndex(0) +3 >Emitted(23, 34) Source(34, 2) + SourceIndex(0) +4 >Emitted(23, 49) Source(34, 9) + SourceIndex(0) +5 >Emitted(23, 51) Source(34, 11) + SourceIndex(0) +6 >Emitted(23, 64) Source(34, 16) + SourceIndex(0) +7 >Emitted(23, 66) Source(34, 18) + SourceIndex(0) +8 >Emitted(23, 80) Source(34, 24) + SourceIndex(0) +9 >Emitted(23, 81) Source(34, 55) + SourceIndex(0) --- >>>nameMB = multiRobotB[0], _g = multiRobotB[1], primarySkillB = _g[0], secondarySkillB = _g[1]; 1-> -2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^ -4 > ^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^ +10> ^^^^^^-> 1-> - > -2 >[nameMB, [primarySkillB, secondarySkillB]] = multiRobotB -3 > ; -1->Emitted(24, 1) Source(35, 1) + SourceIndex(0) -2 >Emitted(24, 93) Source(35, 57) + SourceIndex(0) -3 >Emitted(24, 94) Source(35, 58) + SourceIndex(0) + >[ +2 >nameMB +3 > , +4 > [primarySkillB, secondarySkillB] +5 > +6 > primarySkillB +7 > , +8 > secondarySkillB +9 > ]] = multiRobotB; +1->Emitted(24, 1) Source(35, 2) + SourceIndex(0) +2 >Emitted(24, 24) Source(35, 8) + SourceIndex(0) +3 >Emitted(24, 26) Source(35, 10) + SourceIndex(0) +4 >Emitted(24, 45) Source(35, 42) + SourceIndex(0) +5 >Emitted(24, 47) Source(35, 11) + SourceIndex(0) +6 >Emitted(24, 68) Source(35, 24) + SourceIndex(0) +7 >Emitted(24, 70) Source(35, 26) + SourceIndex(0) +8 >Emitted(24, 93) Source(35, 41) + SourceIndex(0) +9 >Emitted(24, 94) Source(35, 58) + SourceIndex(0) --- >>>_h = getMultiRobotB(), nameMB = _h[0], _j = _h[1], primarySkillB = _j[0], secondarySkillB = _j[1]; 1-> 2 >^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -4 > ^ -5 > ^^^^^^^^^^^^^^^^^^^^-> +3 > ^^ +4 > ^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^ +11> ^ +12> ^^^^^^^^^^^^^^^^^^^^-> 1-> - >[nameMB, [primarySkillB, secondarySkillB]] = -2 >getMultiRobotB() + > +2 >[nameMB, [primarySkillB, secondarySkillB]] = getMultiRobotB() 3 > -4 > ; -1->Emitted(25, 1) Source(36, 46) + SourceIndex(0) +4 > nameMB +5 > , +6 > [primarySkillB, secondarySkillB] +7 > +8 > primarySkillB +9 > , +10> secondarySkillB +11> ]] = getMultiRobotB(); +1->Emitted(25, 1) Source(36, 1) + SourceIndex(0) 2 >Emitted(25, 22) Source(36, 62) + SourceIndex(0) -3 >Emitted(25, 98) Source(36, 62) + SourceIndex(0) -4 >Emitted(25, 99) Source(36, 63) + SourceIndex(0) +3 >Emitted(25, 24) Source(36, 2) + SourceIndex(0) +4 >Emitted(25, 38) Source(36, 8) + SourceIndex(0) +5 >Emitted(25, 40) Source(36, 10) + SourceIndex(0) +6 >Emitted(25, 50) Source(36, 42) + SourceIndex(0) +7 >Emitted(25, 52) Source(36, 11) + SourceIndex(0) +8 >Emitted(25, 73) Source(36, 24) + SourceIndex(0) +9 >Emitted(25, 75) Source(36, 26) + SourceIndex(0) +10>Emitted(25, 98) Source(36, 41) + SourceIndex(0) +11>Emitted(25, 99) Source(36, 63) + SourceIndex(0) --- >>>_k = ["trimmer", ["trimming", "edging"]], nameMB = _k[0], _l = _k[1], primarySkillB = _l[0], secondarySkillB = _l[1]; 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -4 > ^ +3 > ^^ +4 > ^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^ +11> ^ 1-> - >[nameMB, [primarySkillB, secondarySkillB]] = -2 >["trimmer", ["trimming", "edging"]] + > +2 >[nameMB, [primarySkillB, secondarySkillB]] = ["trimmer", ["trimming", "edging"]] 3 > -4 > ; -1->Emitted(26, 1) Source(37, 46) + SourceIndex(0) +4 > nameMB +5 > , +6 > [primarySkillB, secondarySkillB] +7 > +8 > primarySkillB +9 > , +10> secondarySkillB +11> ]] = ["trimmer", ["trimming", "edging"]]; +1->Emitted(26, 1) Source(37, 1) + SourceIndex(0) 2 >Emitted(26, 41) Source(37, 81) + SourceIndex(0) -3 >Emitted(26, 117) Source(37, 81) + SourceIndex(0) -4 >Emitted(26, 118) Source(37, 82) + SourceIndex(0) +3 >Emitted(26, 43) Source(37, 2) + SourceIndex(0) +4 >Emitted(26, 57) Source(37, 8) + SourceIndex(0) +5 >Emitted(26, 59) Source(37, 10) + SourceIndex(0) +6 >Emitted(26, 69) Source(37, 42) + SourceIndex(0) +7 >Emitted(26, 71) Source(37, 11) + SourceIndex(0) +8 >Emitted(26, 92) Source(37, 24) + SourceIndex(0) +9 >Emitted(26, 94) Source(37, 26) + SourceIndex(0) +10>Emitted(26, 117) Source(37, 41) + SourceIndex(0) +11>Emitted(26, 118) Source(37, 82) + SourceIndex(0) --- >>>numberB = robotB[0], robotAInfo = robotB.slice(1); 1 > -2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^ -4 > ^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +6 > ^^^^^^^^^^^-> 1 > > - > -2 >[numberB, ...robotAInfo] = robotB -3 > ; -1 >Emitted(27, 1) Source(39, 1) + SourceIndex(0) -2 >Emitted(27, 50) Source(39, 34) + SourceIndex(0) -3 >Emitted(27, 51) Source(39, 35) + SourceIndex(0) + >[ +2 >numberB +3 > , +4 > ...robotAInfo +5 > ] = robotB; +1 >Emitted(27, 1) Source(39, 2) + SourceIndex(0) +2 >Emitted(27, 20) Source(39, 9) + SourceIndex(0) +3 >Emitted(27, 22) Source(39, 11) + SourceIndex(0) +4 >Emitted(27, 50) Source(39, 24) + SourceIndex(0) +5 >Emitted(27, 51) Source(39, 35) + SourceIndex(0) --- >>>_m = getRobotB(), numberB = _m[0], robotAInfo = _m.slice(1); 1-> 2 >^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -4 > ^ -5 > ^^^^^^^^^^^^^^^^-> +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^ +8 > ^^^^^^^^^^^^^^^^-> 1-> - >[numberB, ...robotAInfo] = -2 >getRobotB() + > +2 >[numberB, ...robotAInfo] = getRobotB() 3 > -4 > ; -1->Emitted(28, 1) Source(40, 28) + SourceIndex(0) +4 > numberB +5 > , +6 > ...robotAInfo +7 > ] = getRobotB(); +1->Emitted(28, 1) Source(40, 1) + SourceIndex(0) 2 >Emitted(28, 17) Source(40, 39) + SourceIndex(0) -3 >Emitted(28, 60) Source(40, 39) + SourceIndex(0) -4 >Emitted(28, 61) Source(40, 40) + SourceIndex(0) +3 >Emitted(28, 19) Source(40, 2) + SourceIndex(0) +4 >Emitted(28, 34) Source(40, 9) + SourceIndex(0) +5 >Emitted(28, 36) Source(40, 11) + SourceIndex(0) +6 >Emitted(28, 60) Source(40, 24) + SourceIndex(0) +7 >Emitted(28, 61) Source(40, 40) + SourceIndex(0) --- >>>_o = [2, "trimmer", "trimming"], numberB = _o[0], robotAInfo = _o.slice(1); 1-> 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -4 > ^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^ 1-> - >[numberB, ...robotAInfo] = -2 >[2, "trimmer", "trimming"] + > +2 >[numberB, ...robotAInfo] = [2, "trimmer", "trimming"] 3 > -4 > ; -1->Emitted(29, 1) Source(41, 28) + SourceIndex(0) +4 > numberB +5 > , +6 > ...robotAInfo +7 > ] = [2, "trimmer", "trimming"]; +1->Emitted(29, 1) Source(41, 1) + SourceIndex(0) 2 >Emitted(29, 32) Source(41, 61) + SourceIndex(0) -3 >Emitted(29, 75) Source(41, 61) + SourceIndex(0) -4 >Emitted(29, 76) Source(41, 62) + SourceIndex(0) +3 >Emitted(29, 34) Source(41, 2) + SourceIndex(0) +4 >Emitted(29, 49) Source(41, 9) + SourceIndex(0) +5 >Emitted(29, 51) Source(41, 11) + SourceIndex(0) +6 >Emitted(29, 75) Source(41, 24) + SourceIndex(0) +7 >Emitted(29, 76) Source(41, 62) + SourceIndex(0) --- >>>multiRobotAInfo = multiRobotA.slice(0); 1 > diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js.map index 6723a44d68b..5f4eb18e261 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;AAE9F,IAAM,kBAAM,EAAI,qBAAiB,EAAE,yBAAqB,CAAc;AACtE,IAAM,mBAAW,EAAE,kBAAM,EAAI,qBAAiB,EAAE,yBAAqB,CAAc;AACnF,IAA4E,mFAA8E,EAApJ,eAAW,EAAE,cAAM,EAAI,qBAAiB,EAAE,yBAAqB,CAAsF;AAE3J,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,IAAI,CAAC,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"} \ 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;AAE9F,IAAM,kBAAM,EAAI,qBAAiB,EAAE,yBAAqB,CAAc;AACtE,IAAM,mBAAW,EAAE,kBAAM,EAAI,qBAAiB,EAAE,yBAAqB,CAAc;AACnF,IAAI,mFAAsJ,EAApJ,eAAW,EAAE,cAAM,EAAI,qBAAiB,EAAE,yBAAqB,CAAsF;AAE3J,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,IAAI,CAAC,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.sourcemap.txt index 085104bad32..0e26912364f 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.sourcemap.txt @@ -234,8 +234,8 @@ sourceFile:sourceMapValidationDestructuringVariableStatementNestedObjectBindingP 12> ^ 1-> > -2 >var { name: nameC, skills: { primary: primaryB, secondary: secondaryB } } = -3 > { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } +2 >var +3 > { name: nameC, skills: { primary: primaryB, secondary: secondaryB } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } 4 > 5 > name: nameC 6 > , @@ -246,7 +246,7 @@ sourceFile:sourceMapValidationDestructuringVariableStatementNestedObjectBindingP 11> secondary: secondaryB 12> } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; 1->Emitted(5, 1) Source(16, 1) + SourceIndex(0) -2 >Emitted(5, 5) Source(16, 77) + SourceIndex(0) +2 >Emitted(5, 5) Source(16, 5) + SourceIndex(0) 3 >Emitted(5, 88) Source(16, 155) + SourceIndex(0) 4 >Emitted(5, 90) Source(16, 7) + SourceIndex(0) 5 >Emitted(5, 105) Source(16, 18) + SourceIndex(0) From a99c9a00dcc8d6ef6317e36cdaae4ea201243c14 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 8 Dec 2015 16:59:25 -0800 Subject: [PATCH 032/209] Test case for "For of" that initializes vars using array binding pattern --- ...nDestructuringForOfArrayBindingPattern2.js | 217 ++ ...tructuringForOfArrayBindingPattern2.js.map | 2 + ...ingForOfArrayBindingPattern2.sourcemap.txt | 2777 +++++++++++++++++ ...ructuringForOfArrayBindingPattern2.symbols | 343 ++ ...structuringForOfArrayBindingPattern2.types | 445 +++ ...nDestructuringForOfArrayBindingPattern2.ts | 101 + 6 files changed, 3885 insertions(+) create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.types create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPattern2.ts diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.js b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.js new file mode 100644 index 00000000000..8b21faf3ad9 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.js @@ -0,0 +1,217 @@ +//// [sourceMapValidationDestructuringForOfArrayBindingPattern2.ts] +declare var console: { + log(msg: any): void; +} +type Robot = [number, string, string]; +type MultiSkilledRobot = [string, [string, string]]; + +let robotA: Robot = [1, "mower", "mowing"]; +let robotB: Robot = [2, "trimmer", "trimming"]; +let robots = [robotA, robotB]; +function getRobots() { + return robots; +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +let multiRobots = [multiRobotA, multiRobotB]; +function getMultiRobots() { + return multiRobots; +} + +let nameA: string, primarySkillA: string, secondarySkillA: string; +let numberB: number, nameB: string; +let numberA2: number, nameA2: string, skillA2: string, nameMA: string; +let numberA3: number, robotAInfo: (number | string)[], multiRobotAInfo: (string | [string, string])[]; + +for ([, nameA] of robots) { + console.log(nameA); +} +for ([, nameA] of getRobots()) { + console.log(nameA); +} +for ([, nameA] of [robotA, robotB]) { + console.log(nameA); +} +for ([, [primarySkillA, secondarySkillA]] of multiRobots) { + console.log(primarySkillA); +} +for ([, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + console.log(primarySkillA); +} +for ([, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + console.log(primarySkillA); +} + +for ([numberB] of robots) { + console.log(numberB); +} +for ([numberB] of getRobots()) { + console.log(numberB); +} +for ([numberB] of [robotA, robotB]) { + console.log(numberB); +} +for ([nameB] of multiRobots) { + console.log(nameB); +} +for ([nameB] of getMultiRobots()) { + console.log(nameB); +} +for ([nameB] of [multiRobotA, multiRobotB]) { + console.log(nameB); +} + +for ([numberA2, nameA2, skillA2] of robots) { + console.log(nameA2); +} +for ([numberA2, nameA2, skillA2] of getRobots()) { + console.log(nameA2); +} +for ([numberA2, nameA2, skillA2] of [robotA, robotB]) { + console.log(nameA2); +} +for ([nameMA, [primarySkillA, secondarySkillA]] of multiRobots) { + console.log(nameMA); +} +for ([nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + console.log(nameMA); +} +for ([nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + console.log(nameMA); +} + +for ([numberA3, ...robotAInfo] of robots) { + console.log(numberA3); +} +for ([numberA3, ...robotAInfo] of getRobots()) { + console.log(numberA3); +} +for ([numberA3, ...robotAInfo] of [robotA, robotB]) { + console.log(numberA3); +} +for ([...multiRobotAInfo] of multiRobots) { + console.log(multiRobotAInfo); +} +for ([...multiRobotAInfo] of getMultiRobots()) { + console.log(multiRobotAInfo); +} +for ([...multiRobotAInfo] of [multiRobotA, multiRobotB]) { + console.log(multiRobotAInfo); +} + +//// [sourceMapValidationDestructuringForOfArrayBindingPattern2.js] +var robotA = [1, "mower", "mowing"]; +var robotB = [2, "trimmer", "trimming"]; +var robots = [robotA, robotB]; +function getRobots() { + return robots; +} +var multiRobotA = ["mower", ["mowing", ""]]; +var multiRobotB = ["trimmer", ["trimming", "edging"]]; +var multiRobots = [multiRobotA, multiRobotB]; +function getMultiRobots() { + return multiRobots; +} +var nameA, primarySkillA, secondarySkillA; +var numberB, nameB; +var numberA2, nameA2, skillA2, nameMA; +var numberA3, robotAInfo, multiRobotAInfo; +for (var _i = 0, robots_1 = robots; _i < robots_1.length; _i++) { + _a = robots_1[_i], nameA = _a[1]; + console.log(nameA); +} +for (var _b = 0, _c = getRobots(); _b < _c.length; _b++) { + _d = _c[_b], nameA = _d[1]; + console.log(nameA); +} +for (var _e = 0, _f = [robotA, robotB]; _e < _f.length; _e++) { + _g = _f[_e], nameA = _g[1]; + console.log(nameA); +} +for (var _h = 0, multiRobots_1 = multiRobots; _h < multiRobots_1.length; _h++) { + _j = multiRobots_1[_h], _k = _j[1], primarySkillA = _k[0], secondarySkillA = _k[1]; + console.log(primarySkillA); +} +for (var _l = 0, _m = getMultiRobots(); _l < _m.length; _l++) { + _o = _m[_l], _p = _o[1], primarySkillA = _p[0], secondarySkillA = _p[1]; + console.log(primarySkillA); +} +for (var _q = 0, _r = [multiRobotA, multiRobotB]; _q < _r.length; _q++) { + _s = _r[_q], _t = _s[1], primarySkillA = _t[0], secondarySkillA = _t[1]; + console.log(primarySkillA); +} +for (var _u = 0, robots_2 = robots; _u < robots_2.length; _u++) { + numberB = robots_2[_u][0]; + console.log(numberB); +} +for (var _v = 0, _w = getRobots(); _v < _w.length; _v++) { + numberB = _w[_v][0]; + console.log(numberB); +} +for (var _x = 0, _y = [robotA, robotB]; _x < _y.length; _x++) { + numberB = _y[_x][0]; + console.log(numberB); +} +for (var _z = 0, multiRobots_2 = multiRobots; _z < multiRobots_2.length; _z++) { + nameB = multiRobots_2[_z][0]; + console.log(nameB); +} +for (var _0 = 0, _1 = getMultiRobots(); _0 < _1.length; _0++) { + nameB = _1[_0][0]; + console.log(nameB); +} +for (var _2 = 0, _3 = [multiRobotA, multiRobotB]; _2 < _3.length; _2++) { + nameB = _3[_2][0]; + console.log(nameB); +} +for (var _4 = 0, robots_3 = robots; _4 < robots_3.length; _4++) { + _5 = robots_3[_4], numberA2 = _5[0], nameA2 = _5[1], skillA2 = _5[2]; + console.log(nameA2); +} +for (var _6 = 0, _7 = getRobots(); _6 < _7.length; _6++) { + _8 = _7[_6], numberA2 = _8[0], nameA2 = _8[1], skillA2 = _8[2]; + console.log(nameA2); +} +for (var _9 = 0, _10 = [robotA, robotB]; _9 < _10.length; _9++) { + _11 = _10[_9], numberA2 = _11[0], nameA2 = _11[1], skillA2 = _11[2]; + console.log(nameA2); +} +for (var _12 = 0, multiRobots_3 = multiRobots; _12 < multiRobots_3.length; _12++) { + _13 = multiRobots_3[_12], nameMA = _13[0], _14 = _13[1], primarySkillA = _14[0], secondarySkillA = _14[1]; + console.log(nameMA); +} +for (var _15 = 0, _16 = getMultiRobots(); _15 < _16.length; _15++) { + _17 = _16[_15], nameMA = _17[0], _18 = _17[1], primarySkillA = _18[0], secondarySkillA = _18[1]; + console.log(nameMA); +} +for (var _19 = 0, _20 = [multiRobotA, multiRobotB]; _19 < _20.length; _19++) { + _21 = _20[_19], nameMA = _21[0], _22 = _21[1], primarySkillA = _22[0], secondarySkillA = _22[1]; + console.log(nameMA); +} +for (var _23 = 0, robots_4 = robots; _23 < robots_4.length; _23++) { + _24 = robots_4[_23], numberA3 = _24[0], robotAInfo = _24.slice(1); + console.log(numberA3); +} +for (var _25 = 0, _26 = getRobots(); _25 < _26.length; _25++) { + _27 = _26[_25], numberA3 = _27[0], robotAInfo = _27.slice(1); + console.log(numberA3); +} +for (var _28 = 0, _29 = [robotA, robotB]; _28 < _29.length; _28++) { + _30 = _29[_28], numberA3 = _30[0], robotAInfo = _30.slice(1); + console.log(numberA3); +} +for (var _31 = 0, multiRobots_4 = multiRobots; _31 < multiRobots_4.length; _31++) { + multiRobotAInfo = multiRobots_4[_31].slice(0); + console.log(multiRobotAInfo); +} +for (var _32 = 0, _33 = getMultiRobots(); _32 < _33.length; _32++) { + multiRobotAInfo = _33[_32].slice(0); + console.log(multiRobotAInfo); +} +for (var _34 = 0, _35 = [multiRobotA, multiRobotB]; _34 < _35.length; _34++) { + multiRobotAInfo = _35[_34].slice(0); + console.log(multiRobotAInfo); +} +var _a, _d, _g, _j, _k, _o, _p, _s, _t, _5, _8, _11, _13, _14, _17, _18, _21, _22, _24, _27, _30; +//# sourceMappingURL=sourceMapValidationDestructuringForOfArrayBindingPattern2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.js.map new file mode 100644 index 00000000000..fa0a2e18ac9 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringForOfArrayBindingPattern2.js.map] +{"version":3,"file":"sourceMapValidationDestructuringForOfArrayBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForOfArrayBindingPattern2.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAC/C,IAAI,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9B;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED,IAAI,WAAW,GAAsB,CAAC,OAAO,EAAE,CA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B;AAED,GAAG,CAAC,CAA8B,WAAM,EAAN,iBAAM,EAAN,qBAAM,EAAN,KAAM,CAAC;IAApC,mBAAyB,EAAxB,iBAAQ,EAAE,yBAAa;IACzB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;CACzB;AACD,GAAG,CAAC,CAA8B,WAAW,EAAX,MAAA,SAAS,EAAE,EAAX,gBAAW,EAAX,KAAW,CAAC;IAAzC,cAAyB,EAAxB,iBAAQ,EAAE,yBAAa;IACzB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;CACzB;AACD,GAAG,CAAC,CAA8B,WAAgB,EAAhB,OAAC,MAAM,EAAE,MAAM,CAAC,EAAhB,gBAAgB,EAAhB,KAAgB,CAAC;IAA9C,cAAyB,EAAxB,iBAAQ,EAAE,yBAAa;IACzB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;CACzB;AACD,GAAG,CAAC,CAAyB,WAAW,EAAX,2BAAW,EAAX,0BAAW,EAAX,KAAW,CAAC;IAApC,6CAAoB;IACrB,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;CAChC;AACD,GAAG,CAAC,CAAyB,WAAgB,EAAhB,MAAA,cAAc,EAAE,EAAhB,gBAAgB,EAAhB,KAAgB,CAAC;IAAzC,mCAAoB;IACrB,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;CAChC;AACD,GAAG,CAAC,CAAyB,WAA0B,EAA1B,OAAC,WAAW,EAAE,WAAW,CAAC,EAA1B,gBAA0B,EAA1B,KAA0B,CAAC;IAAnD,mCAAoB;IACrB,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;CAChC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.sourcemap.txt new file mode 100644 index 00000000000..409629e1081 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.sourcemap.txt @@ -0,0 +1,2777 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringForOfArrayBindingPattern2.js +mapUrl: sourceMapValidationDestructuringForOfArrayBindingPattern2.js.map +sourceRoot: +sources: sourceMapValidationDestructuringForOfArrayBindingPattern2.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPattern2.js +sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts +------------------------------------------------------------------- +>>>var robotA = [1, "mower", "mowing"]; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^^^^ +11> ^ +12> ^ +13> ^^^^^-> +1 >declare var console: { + > log(msg: any): void; + >} + >type Robot = [number, string, string]; + >type MultiSkilledRobot = [string, [string, string]]; + > + > +2 >let +3 > robotA +4 > : Robot = +5 > [ +6 > 1 +7 > , +8 > "mower" +9 > , +10> "mowing" +11> ] +12> ; +1 >Emitted(1, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(7, 5) + SourceIndex(0) +3 >Emitted(1, 11) Source(7, 11) + SourceIndex(0) +4 >Emitted(1, 14) Source(7, 21) + SourceIndex(0) +5 >Emitted(1, 15) Source(7, 22) + SourceIndex(0) +6 >Emitted(1, 16) Source(7, 23) + SourceIndex(0) +7 >Emitted(1, 18) Source(7, 25) + SourceIndex(0) +8 >Emitted(1, 25) Source(7, 32) + SourceIndex(0) +9 >Emitted(1, 27) Source(7, 34) + SourceIndex(0) +10>Emitted(1, 35) Source(7, 42) + SourceIndex(0) +11>Emitted(1, 36) Source(7, 43) + SourceIndex(0) +12>Emitted(1, 37) Source(7, 44) + SourceIndex(0) +--- +>>>var robotB = [2, "trimmer", "trimming"]; +1-> +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^ +11> ^ +12> ^ +1-> + > +2 >let +3 > robotB +4 > : Robot = +5 > [ +6 > 2 +7 > , +8 > "trimmer" +9 > , +10> "trimming" +11> ] +12> ; +1->Emitted(2, 1) Source(8, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(8, 5) + SourceIndex(0) +3 >Emitted(2, 11) Source(8, 11) + SourceIndex(0) +4 >Emitted(2, 14) Source(8, 21) + SourceIndex(0) +5 >Emitted(2, 15) Source(8, 22) + SourceIndex(0) +6 >Emitted(2, 16) Source(8, 23) + SourceIndex(0) +7 >Emitted(2, 18) Source(8, 25) + SourceIndex(0) +8 >Emitted(2, 27) Source(8, 34) + SourceIndex(0) +9 >Emitted(2, 29) Source(8, 36) + SourceIndex(0) +10>Emitted(2, 39) Source(8, 46) + SourceIndex(0) +11>Emitted(2, 40) Source(8, 47) + SourceIndex(0) +12>Emitted(2, 41) Source(8, 48) + SourceIndex(0) +--- +>>>var robots = [robotA, robotB]; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^^ +8 > ^^^^^^ +9 > ^ +10> ^ +1 > + > +2 >let +3 > robots +4 > = +5 > [ +6 > robotA +7 > , +8 > robotB +9 > ] +10> ; +1 >Emitted(3, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(9, 5) + SourceIndex(0) +3 >Emitted(3, 11) Source(9, 11) + SourceIndex(0) +4 >Emitted(3, 14) Source(9, 14) + SourceIndex(0) +5 >Emitted(3, 15) Source(9, 15) + SourceIndex(0) +6 >Emitted(3, 21) Source(9, 21) + SourceIndex(0) +7 >Emitted(3, 23) Source(9, 23) + SourceIndex(0) +8 >Emitted(3, 29) Source(9, 29) + SourceIndex(0) +9 >Emitted(3, 30) Source(9, 30) + SourceIndex(0) +10>Emitted(3, 31) Source(9, 31) + SourceIndex(0) +--- +>>>function getRobots() { +1 > +2 >^^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(4, 1) Source(10, 1) + SourceIndex(0) +--- +>>> return robots; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +1->function getRobots() { + > +2 > return +3 > +4 > robots +5 > ; +1->Emitted(5, 5) Source(11, 5) + SourceIndex(0) +2 >Emitted(5, 11) Source(11, 11) + SourceIndex(0) +3 >Emitted(5, 12) Source(11, 12) + SourceIndex(0) +4 >Emitted(5, 18) Source(11, 18) + SourceIndex(0) +5 >Emitted(5, 19) Source(11, 19) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(6, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(12, 2) + SourceIndex(0) +--- +>>>var multiRobotA = ["mower", ["mowing", ""]]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^ +10> ^^ +11> ^^ +12> ^ +13> ^ +14> ^ +15> ^^^^^^^^^^^-> +1-> + > + > +2 >let +3 > multiRobotA +4 > : MultiSkilledRobot = +5 > [ +6 > "mower" +7 > , +8 > [ +9 > "mowing" +10> , +11> "" +12> ] +13> ] +14> ; +1->Emitted(7, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(7, 5) Source(14, 5) + SourceIndex(0) +3 >Emitted(7, 16) Source(14, 16) + SourceIndex(0) +4 >Emitted(7, 19) Source(14, 38) + SourceIndex(0) +5 >Emitted(7, 20) Source(14, 39) + SourceIndex(0) +6 >Emitted(7, 27) Source(14, 46) + SourceIndex(0) +7 >Emitted(7, 29) Source(14, 48) + SourceIndex(0) +8 >Emitted(7, 30) Source(14, 49) + SourceIndex(0) +9 >Emitted(7, 38) Source(14, 57) + SourceIndex(0) +10>Emitted(7, 40) Source(14, 59) + SourceIndex(0) +11>Emitted(7, 42) Source(14, 61) + SourceIndex(0) +12>Emitted(7, 43) Source(14, 62) + SourceIndex(0) +13>Emitted(7, 44) Source(14, 63) + SourceIndex(0) +14>Emitted(7, 45) Source(14, 64) + SourceIndex(0) +--- +>>>var multiRobotB = ["trimmer", ["trimming", "edging"]]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^ +12> ^ +13> ^ +14> ^ +1-> + > +2 >let +3 > multiRobotB +4 > : MultiSkilledRobot = +5 > [ +6 > "trimmer" +7 > , +8 > [ +9 > "trimming" +10> , +11> "edging" +12> ] +13> ] +14> ; +1->Emitted(8, 1) Source(15, 1) + SourceIndex(0) +2 >Emitted(8, 5) Source(15, 5) + SourceIndex(0) +3 >Emitted(8, 16) Source(15, 16) + SourceIndex(0) +4 >Emitted(8, 19) Source(15, 38) + SourceIndex(0) +5 >Emitted(8, 20) Source(15, 39) + SourceIndex(0) +6 >Emitted(8, 29) Source(15, 48) + SourceIndex(0) +7 >Emitted(8, 31) Source(15, 50) + SourceIndex(0) +8 >Emitted(8, 32) Source(15, 51) + SourceIndex(0) +9 >Emitted(8, 42) Source(15, 61) + SourceIndex(0) +10>Emitted(8, 44) Source(15, 63) + SourceIndex(0) +11>Emitted(8, 52) Source(15, 71) + SourceIndex(0) +12>Emitted(8, 53) Source(15, 72) + SourceIndex(0) +13>Emitted(8, 54) Source(15, 73) + SourceIndex(0) +14>Emitted(8, 55) Source(15, 74) + SourceIndex(0) +--- +>>>var multiRobots = [multiRobotA, multiRobotB]; +1 > +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^ +9 > ^ +10> ^ +1 > + > +2 >let +3 > multiRobots +4 > = +5 > [ +6 > multiRobotA +7 > , +8 > multiRobotB +9 > ] +10> ; +1 >Emitted(9, 1) Source(16, 1) + SourceIndex(0) +2 >Emitted(9, 5) Source(16, 5) + SourceIndex(0) +3 >Emitted(9, 16) Source(16, 16) + SourceIndex(0) +4 >Emitted(9, 19) Source(16, 19) + SourceIndex(0) +5 >Emitted(9, 20) Source(16, 20) + SourceIndex(0) +6 >Emitted(9, 31) Source(16, 31) + SourceIndex(0) +7 >Emitted(9, 33) Source(16, 33) + SourceIndex(0) +8 >Emitted(9, 44) Source(16, 44) + SourceIndex(0) +9 >Emitted(9, 45) Source(16, 45) + SourceIndex(0) +10>Emitted(9, 46) Source(16, 46) + SourceIndex(0) +--- +>>>function getMultiRobots() { +1 > +2 >^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(10, 1) Source(17, 1) + SourceIndex(0) +--- +>>> return multiRobots; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^ +5 > ^ +1->function getMultiRobots() { + > +2 > return +3 > +4 > multiRobots +5 > ; +1->Emitted(11, 5) Source(18, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(18, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(18, 12) + SourceIndex(0) +4 >Emitted(11, 23) Source(18, 23) + SourceIndex(0) +5 >Emitted(11, 24) Source(18, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(12, 1) Source(19, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(19, 2) + SourceIndex(0) +--- +>>>var nameA, primarySkillA, secondarySkillA; +1-> +2 >^^^^ +3 > ^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^ +8 > ^ +1-> + > + > +2 >let +3 > nameA: string +4 > , +5 > primarySkillA: string +6 > , +7 > secondarySkillA: string +8 > ; +1->Emitted(13, 1) Source(21, 1) + SourceIndex(0) +2 >Emitted(13, 5) Source(21, 5) + SourceIndex(0) +3 >Emitted(13, 10) Source(21, 18) + SourceIndex(0) +4 >Emitted(13, 12) Source(21, 20) + SourceIndex(0) +5 >Emitted(13, 25) Source(21, 41) + SourceIndex(0) +6 >Emitted(13, 27) Source(21, 43) + SourceIndex(0) +7 >Emitted(13, 42) Source(21, 66) + SourceIndex(0) +8 >Emitted(13, 43) Source(21, 67) + SourceIndex(0) +--- +>>>var numberB, nameB; +1 > +2 >^^^^ +3 > ^^^^^^^ +4 > ^^ +5 > ^^^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >let +3 > numberB: number +4 > , +5 > nameB: string +6 > ; +1 >Emitted(14, 1) Source(22, 1) + SourceIndex(0) +2 >Emitted(14, 5) Source(22, 5) + SourceIndex(0) +3 >Emitted(14, 12) Source(22, 20) + SourceIndex(0) +4 >Emitted(14, 14) Source(22, 22) + SourceIndex(0) +5 >Emitted(14, 19) Source(22, 35) + SourceIndex(0) +6 >Emitted(14, 20) Source(22, 36) + SourceIndex(0) +--- +>>>var numberA2, nameA2, skillA2, nameMA; +1-> +2 >^^^^ +3 > ^^^^^^^^ +4 > ^^ +5 > ^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^ +9 > ^^^^^^ +10> ^ +11> ^^^^^-> +1-> + > +2 >let +3 > numberA2: number +4 > , +5 > nameA2: string +6 > , +7 > skillA2: string +8 > , +9 > nameMA: string +10> ; +1->Emitted(15, 1) Source(23, 1) + SourceIndex(0) +2 >Emitted(15, 5) Source(23, 5) + SourceIndex(0) +3 >Emitted(15, 13) Source(23, 21) + SourceIndex(0) +4 >Emitted(15, 15) Source(23, 23) + SourceIndex(0) +5 >Emitted(15, 21) Source(23, 37) + SourceIndex(0) +6 >Emitted(15, 23) Source(23, 39) + SourceIndex(0) +7 >Emitted(15, 30) Source(23, 54) + SourceIndex(0) +8 >Emitted(15, 32) Source(23, 56) + SourceIndex(0) +9 >Emitted(15, 38) Source(23, 70) + SourceIndex(0) +10>Emitted(15, 39) Source(23, 71) + SourceIndex(0) +--- +>>>var numberA3, robotAInfo, multiRobotAInfo; +1-> +2 >^^^^ +3 > ^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^ +8 > ^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >let +3 > numberA3: number +4 > , +5 > robotAInfo: (number | string)[] +6 > , +7 > multiRobotAInfo: (string | [string, string])[] +8 > ; +1->Emitted(16, 1) Source(24, 1) + SourceIndex(0) +2 >Emitted(16, 5) Source(24, 5) + SourceIndex(0) +3 >Emitted(16, 13) Source(24, 21) + SourceIndex(0) +4 >Emitted(16, 15) Source(24, 23) + SourceIndex(0) +5 >Emitted(16, 25) Source(24, 54) + SourceIndex(0) +6 >Emitted(16, 27) Source(24, 56) + SourceIndex(0) +7 >Emitted(16, 42) Source(24, 102) + SourceIndex(0) +8 >Emitted(16, 43) Source(24, 103) + SourceIndex(0) +--- +>>>for (var _i = 0, robots_1 = robots; _i < robots_1.length; _i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +1-> + > + > +2 >for +3 > +4 > ([, nameA] of +5 > robots +6 > +7 > robots +8 > +9 > robots +10> +11> robots +12> ) +1->Emitted(17, 1) Source(26, 1) + SourceIndex(0) +2 >Emitted(17, 4) Source(26, 4) + SourceIndex(0) +3 >Emitted(17, 5) Source(26, 5) + SourceIndex(0) +4 >Emitted(17, 6) Source(26, 19) + SourceIndex(0) +5 >Emitted(17, 16) Source(26, 25) + SourceIndex(0) +6 >Emitted(17, 18) Source(26, 19) + SourceIndex(0) +7 >Emitted(17, 35) Source(26, 25) + SourceIndex(0) +8 >Emitted(17, 37) Source(26, 19) + SourceIndex(0) +9 >Emitted(17, 57) Source(26, 25) + SourceIndex(0) +10>Emitted(17, 59) Source(26, 19) + SourceIndex(0) +11>Emitted(17, 63) Source(26, 25) + SourceIndex(0) +12>Emitted(17, 64) Source(26, 26) + SourceIndex(0) +--- +>>> _a = robots_1[_i], nameA = _a[1]; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^ +1 > +2 > [, nameA] +3 > +4 > nameA +1 >Emitted(18, 5) Source(26, 6) + SourceIndex(0) +2 >Emitted(18, 22) Source(26, 15) + SourceIndex(0) +3 >Emitted(18, 24) Source(26, 9) + SourceIndex(0) +4 >Emitted(18, 37) Source(26, 14) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 >] of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(19, 5) Source(27, 5) + SourceIndex(0) +2 >Emitted(19, 12) Source(27, 12) + SourceIndex(0) +3 >Emitted(19, 13) Source(27, 13) + SourceIndex(0) +4 >Emitted(19, 16) Source(27, 16) + SourceIndex(0) +5 >Emitted(19, 17) Source(27, 17) + SourceIndex(0) +6 >Emitted(19, 22) Source(27, 22) + SourceIndex(0) +7 >Emitted(19, 23) Source(27, 23) + SourceIndex(0) +8 >Emitted(19, 24) Source(27, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(20, 2) Source(28, 2) + SourceIndex(0) +--- +>>>for (var _b = 0, _c = getRobots(); _b < _c.length; _b++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +1-> + > +2 >for +3 > +4 > ([, nameA] of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> getRobots() +12> +13> getRobots() +14> ) +1->Emitted(21, 1) Source(29, 1) + SourceIndex(0) +2 >Emitted(21, 4) Source(29, 4) + SourceIndex(0) +3 >Emitted(21, 5) Source(29, 5) + SourceIndex(0) +4 >Emitted(21, 6) Source(29, 19) + SourceIndex(0) +5 >Emitted(21, 16) Source(29, 30) + SourceIndex(0) +6 >Emitted(21, 18) Source(29, 19) + SourceIndex(0) +7 >Emitted(21, 23) Source(29, 19) + SourceIndex(0) +8 >Emitted(21, 32) Source(29, 28) + SourceIndex(0) +9 >Emitted(21, 34) Source(29, 30) + SourceIndex(0) +10>Emitted(21, 36) Source(29, 19) + SourceIndex(0) +11>Emitted(21, 50) Source(29, 30) + SourceIndex(0) +12>Emitted(21, 52) Source(29, 19) + SourceIndex(0) +13>Emitted(21, 56) Source(29, 30) + SourceIndex(0) +14>Emitted(21, 57) Source(29, 31) + SourceIndex(0) +--- +>>> _d = _c[_b], nameA = _d[1]; +1 >^^^^ +2 > ^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^ +1 > +2 > [, nameA] +3 > +4 > nameA +1 >Emitted(22, 5) Source(29, 6) + SourceIndex(0) +2 >Emitted(22, 16) Source(29, 15) + SourceIndex(0) +3 >Emitted(22, 18) Source(29, 9) + SourceIndex(0) +4 >Emitted(22, 31) Source(29, 14) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 >] of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(23, 5) Source(30, 5) + SourceIndex(0) +2 >Emitted(23, 12) Source(30, 12) + SourceIndex(0) +3 >Emitted(23, 13) Source(30, 13) + SourceIndex(0) +4 >Emitted(23, 16) Source(30, 16) + SourceIndex(0) +5 >Emitted(23, 17) Source(30, 17) + SourceIndex(0) +6 >Emitted(23, 22) Source(30, 22) + SourceIndex(0) +7 >Emitted(23, 23) Source(30, 23) + SourceIndex(0) +8 >Emitted(23, 24) Source(30, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(24, 2) Source(31, 2) + SourceIndex(0) +--- +>>>for (var _e = 0, _f = [robotA, robotB]; _e < _f.length; _e++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^ +16> ^ +1-> + > +2 >for +3 > +4 > ([, nameA] of +5 > [robotA, robotB] +6 > +7 > [ +8 > robotA +9 > , +10> robotB +11> ] +12> +13> [robotA, robotB] +14> +15> [robotA, robotB] +16> ) +1->Emitted(25, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(25, 4) Source(32, 4) + SourceIndex(0) +3 >Emitted(25, 5) Source(32, 5) + SourceIndex(0) +4 >Emitted(25, 6) Source(32, 19) + SourceIndex(0) +5 >Emitted(25, 16) Source(32, 35) + SourceIndex(0) +6 >Emitted(25, 18) Source(32, 19) + SourceIndex(0) +7 >Emitted(25, 24) Source(32, 20) + SourceIndex(0) +8 >Emitted(25, 30) Source(32, 26) + SourceIndex(0) +9 >Emitted(25, 32) Source(32, 28) + SourceIndex(0) +10>Emitted(25, 38) Source(32, 34) + SourceIndex(0) +11>Emitted(25, 39) Source(32, 35) + SourceIndex(0) +12>Emitted(25, 41) Source(32, 19) + SourceIndex(0) +13>Emitted(25, 55) Source(32, 35) + SourceIndex(0) +14>Emitted(25, 57) Source(32, 19) + SourceIndex(0) +15>Emitted(25, 61) Source(32, 35) + SourceIndex(0) +16>Emitted(25, 62) Source(32, 36) + SourceIndex(0) +--- +>>> _g = _f[_e], nameA = _g[1]; +1 >^^^^ +2 > ^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^ +1 > +2 > [, nameA] +3 > +4 > nameA +1 >Emitted(26, 5) Source(32, 6) + SourceIndex(0) +2 >Emitted(26, 16) Source(32, 15) + SourceIndex(0) +3 >Emitted(26, 18) Source(32, 9) + SourceIndex(0) +4 >Emitted(26, 31) Source(32, 14) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 >] of [robotA, robotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(27, 5) Source(33, 5) + SourceIndex(0) +2 >Emitted(27, 12) Source(33, 12) + SourceIndex(0) +3 >Emitted(27, 13) Source(33, 13) + SourceIndex(0) +4 >Emitted(27, 16) Source(33, 16) + SourceIndex(0) +5 >Emitted(27, 17) Source(33, 17) + SourceIndex(0) +6 >Emitted(27, 22) Source(33, 22) + SourceIndex(0) +7 >Emitted(27, 23) Source(33, 23) + SourceIndex(0) +8 >Emitted(27, 24) Source(33, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(28, 2) Source(34, 2) + SourceIndex(0) +--- +>>>for (var _h = 0, multiRobots_1 = multiRobots; _h < multiRobots_1.length; _h++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +13> ^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ([, [primarySkillA, secondarySkillA]] of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > multiRobots +10> +11> multiRobots +12> ) +1->Emitted(29, 1) Source(35, 1) + SourceIndex(0) +2 >Emitted(29, 4) Source(35, 4) + SourceIndex(0) +3 >Emitted(29, 5) Source(35, 5) + SourceIndex(0) +4 >Emitted(29, 6) Source(35, 46) + SourceIndex(0) +5 >Emitted(29, 16) Source(35, 57) + SourceIndex(0) +6 >Emitted(29, 18) Source(35, 46) + SourceIndex(0) +7 >Emitted(29, 45) Source(35, 57) + SourceIndex(0) +8 >Emitted(29, 47) Source(35, 46) + SourceIndex(0) +9 >Emitted(29, 72) Source(35, 57) + SourceIndex(0) +10>Emitted(29, 74) Source(35, 46) + SourceIndex(0) +11>Emitted(29, 78) Source(35, 57) + SourceIndex(0) +12>Emitted(29, 79) Source(35, 58) + SourceIndex(0) +--- +>>> _j = multiRobots_1[_h], _k = _j[1], primarySkillA = _k[0], secondarySkillA = _k[1]; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [, [primarySkillA, secondarySkillA]] +3 > +4 > [primarySkillA, secondarySkillA] +5 > +6 > primarySkillA +7 > , +8 > secondarySkillA +1->Emitted(30, 5) Source(35, 6) + SourceIndex(0) +2 >Emitted(30, 27) Source(35, 42) + SourceIndex(0) +3 >Emitted(30, 29) Source(35, 9) + SourceIndex(0) +4 >Emitted(30, 39) Source(35, 41) + SourceIndex(0) +5 >Emitted(30, 41) Source(35, 10) + SourceIndex(0) +6 >Emitted(30, 62) Source(35, 23) + SourceIndex(0) +7 >Emitted(30, 64) Source(35, 25) + SourceIndex(0) +8 >Emitted(30, 87) Source(35, 40) + SourceIndex(0) +--- +>>> console.log(primarySkillA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 >]] of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primarySkillA +7 > ) +8 > ; +1 >Emitted(31, 5) Source(36, 5) + SourceIndex(0) +2 >Emitted(31, 12) Source(36, 12) + SourceIndex(0) +3 >Emitted(31, 13) Source(36, 13) + SourceIndex(0) +4 >Emitted(31, 16) Source(36, 16) + SourceIndex(0) +5 >Emitted(31, 17) Source(36, 17) + SourceIndex(0) +6 >Emitted(31, 30) Source(36, 30) + SourceIndex(0) +7 >Emitted(31, 31) Source(36, 31) + SourceIndex(0) +8 >Emitted(31, 32) Source(36, 32) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(32, 2) Source(37, 2) + SourceIndex(0) +--- +>>>for (var _l = 0, _m = getMultiRobots(); _l < _m.length; _l++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ([, [primarySkillA, secondarySkillA]] of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> getMultiRobots() +12> +13> getMultiRobots() +14> ) +1->Emitted(33, 1) Source(38, 1) + SourceIndex(0) +2 >Emitted(33, 4) Source(38, 4) + SourceIndex(0) +3 >Emitted(33, 5) Source(38, 5) + SourceIndex(0) +4 >Emitted(33, 6) Source(38, 46) + SourceIndex(0) +5 >Emitted(33, 16) Source(38, 62) + SourceIndex(0) +6 >Emitted(33, 18) Source(38, 46) + SourceIndex(0) +7 >Emitted(33, 23) Source(38, 46) + SourceIndex(0) +8 >Emitted(33, 37) Source(38, 60) + SourceIndex(0) +9 >Emitted(33, 39) Source(38, 62) + SourceIndex(0) +10>Emitted(33, 41) Source(38, 46) + SourceIndex(0) +11>Emitted(33, 55) Source(38, 62) + SourceIndex(0) +12>Emitted(33, 57) Source(38, 46) + SourceIndex(0) +13>Emitted(33, 61) Source(38, 62) + SourceIndex(0) +14>Emitted(33, 62) Source(38, 63) + SourceIndex(0) +--- +>>> _o = _m[_l], _p = _o[1], primarySkillA = _p[0], secondarySkillA = _p[1]; +1->^^^^ +2 > ^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [, [primarySkillA, secondarySkillA]] +3 > +4 > [primarySkillA, secondarySkillA] +5 > +6 > primarySkillA +7 > , +8 > secondarySkillA +1->Emitted(34, 5) Source(38, 6) + SourceIndex(0) +2 >Emitted(34, 16) Source(38, 42) + SourceIndex(0) +3 >Emitted(34, 18) Source(38, 9) + SourceIndex(0) +4 >Emitted(34, 28) Source(38, 41) + SourceIndex(0) +5 >Emitted(34, 30) Source(38, 10) + SourceIndex(0) +6 >Emitted(34, 51) Source(38, 23) + SourceIndex(0) +7 >Emitted(34, 53) Source(38, 25) + SourceIndex(0) +8 >Emitted(34, 76) Source(38, 40) + SourceIndex(0) +--- +>>> console.log(primarySkillA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 >]] of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primarySkillA +7 > ) +8 > ; +1 >Emitted(35, 5) Source(39, 5) + SourceIndex(0) +2 >Emitted(35, 12) Source(39, 12) + SourceIndex(0) +3 >Emitted(35, 13) Source(39, 13) + SourceIndex(0) +4 >Emitted(35, 16) Source(39, 16) + SourceIndex(0) +5 >Emitted(35, 17) Source(39, 17) + SourceIndex(0) +6 >Emitted(35, 30) Source(39, 30) + SourceIndex(0) +7 >Emitted(35, 31) Source(39, 31) + SourceIndex(0) +8 >Emitted(35, 32) Source(39, 32) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(36, 2) Source(40, 2) + SourceIndex(0) +--- +>>>for (var _q = 0, _r = [multiRobotA, multiRobotB]; _q < _r.length; _q++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^ +16> ^ +17> ^^^^^^-> +1-> + > +2 >for +3 > +4 > ([, [primarySkillA, secondarySkillA]] of +5 > [multiRobotA, multiRobotB] +6 > +7 > [ +8 > multiRobotA +9 > , +10> multiRobotB +11> ] +12> +13> [multiRobotA, multiRobotB] +14> +15> [multiRobotA, multiRobotB] +16> ) +1->Emitted(37, 1) Source(41, 1) + SourceIndex(0) +2 >Emitted(37, 4) Source(41, 4) + SourceIndex(0) +3 >Emitted(37, 5) Source(41, 5) + SourceIndex(0) +4 >Emitted(37, 6) Source(41, 46) + SourceIndex(0) +5 >Emitted(37, 16) Source(41, 72) + SourceIndex(0) +6 >Emitted(37, 18) Source(41, 46) + SourceIndex(0) +7 >Emitted(37, 24) Source(41, 47) + SourceIndex(0) +8 >Emitted(37, 35) Source(41, 58) + SourceIndex(0) +9 >Emitted(37, 37) Source(41, 60) + SourceIndex(0) +10>Emitted(37, 48) Source(41, 71) + SourceIndex(0) +11>Emitted(37, 49) Source(41, 72) + SourceIndex(0) +12>Emitted(37, 51) Source(41, 46) + SourceIndex(0) +13>Emitted(37, 65) Source(41, 72) + SourceIndex(0) +14>Emitted(37, 67) Source(41, 46) + SourceIndex(0) +15>Emitted(37, 71) Source(41, 72) + SourceIndex(0) +16>Emitted(37, 72) Source(41, 73) + SourceIndex(0) +--- +>>> _s = _r[_q], _t = _s[1], primarySkillA = _t[0], secondarySkillA = _t[1]; +1->^^^^ +2 > ^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [, [primarySkillA, secondarySkillA]] +3 > +4 > [primarySkillA, secondarySkillA] +5 > +6 > primarySkillA +7 > , +8 > secondarySkillA +1->Emitted(38, 5) Source(41, 6) + SourceIndex(0) +2 >Emitted(38, 16) Source(41, 42) + SourceIndex(0) +3 >Emitted(38, 18) Source(41, 9) + SourceIndex(0) +4 >Emitted(38, 28) Source(41, 41) + SourceIndex(0) +5 >Emitted(38, 30) Source(41, 10) + SourceIndex(0) +6 >Emitted(38, 51) Source(41, 23) + SourceIndex(0) +7 >Emitted(38, 53) Source(41, 25) + SourceIndex(0) +8 >Emitted(38, 76) Source(41, 40) + SourceIndex(0) +--- +>>> console.log(primarySkillA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 >]] of [multiRobotA, multiRobotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primarySkillA +7 > ) +8 > ; +1 >Emitted(39, 5) Source(42, 5) + SourceIndex(0) +2 >Emitted(39, 12) Source(42, 12) + SourceIndex(0) +3 >Emitted(39, 13) Source(42, 13) + SourceIndex(0) +4 >Emitted(39, 16) Source(42, 16) + SourceIndex(0) +5 >Emitted(39, 17) Source(42, 17) + SourceIndex(0) +6 >Emitted(39, 30) Source(42, 30) + SourceIndex(0) +7 >Emitted(39, 31) Source(42, 31) + SourceIndex(0) +8 >Emitted(39, 32) Source(42, 32) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(40, 2) Source(43, 2) + SourceIndex(0) +--- +>>>for (var _u = 0, robots_2 = robots; _u < robots_2.length; _u++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +1-> + > + > +2 >for +3 > +4 > ([numberB] of +5 > robots +6 > +7 > robots +8 > +9 > robots +10> +11> robots +12> ) +1->Emitted(41, 1) Source(45, 1) + SourceIndex(0) +2 >Emitted(41, 4) Source(45, 4) + SourceIndex(0) +3 >Emitted(41, 5) Source(45, 5) + SourceIndex(0) +4 >Emitted(41, 6) Source(45, 19) + SourceIndex(0) +5 >Emitted(41, 16) Source(45, 25) + SourceIndex(0) +6 >Emitted(41, 18) Source(45, 19) + SourceIndex(0) +7 >Emitted(41, 35) Source(45, 25) + SourceIndex(0) +8 >Emitted(41, 37) Source(45, 19) + SourceIndex(0) +9 >Emitted(41, 57) Source(45, 25) + SourceIndex(0) +10>Emitted(41, 59) Source(45, 19) + SourceIndex(0) +11>Emitted(41, 63) Source(45, 25) + SourceIndex(0) +12>Emitted(41, 64) Source(45, 26) + SourceIndex(0) +--- +>>> numberB = robots_2[_u][0]; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > [numberB] +1 >Emitted(42, 5) Source(45, 6) + SourceIndex(0) +2 >Emitted(42, 30) Source(45, 15) + SourceIndex(0) +--- +>>> console.log(numberB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1 > of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > numberB +7 > ) +8 > ; +1 >Emitted(43, 5) Source(46, 5) + SourceIndex(0) +2 >Emitted(43, 12) Source(46, 12) + SourceIndex(0) +3 >Emitted(43, 13) Source(46, 13) + SourceIndex(0) +4 >Emitted(43, 16) Source(46, 16) + SourceIndex(0) +5 >Emitted(43, 17) Source(46, 17) + SourceIndex(0) +6 >Emitted(43, 24) Source(46, 24) + SourceIndex(0) +7 >Emitted(43, 25) Source(46, 25) + SourceIndex(0) +8 >Emitted(43, 26) Source(46, 26) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(44, 2) Source(47, 2) + SourceIndex(0) +--- +>>>for (var _v = 0, _w = getRobots(); _v < _w.length; _v++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +1-> + > +2 >for +3 > +4 > ([numberB] of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> getRobots() +12> +13> getRobots() +14> ) +1->Emitted(45, 1) Source(48, 1) + SourceIndex(0) +2 >Emitted(45, 4) Source(48, 4) + SourceIndex(0) +3 >Emitted(45, 5) Source(48, 5) + SourceIndex(0) +4 >Emitted(45, 6) Source(48, 19) + SourceIndex(0) +5 >Emitted(45, 16) Source(48, 30) + SourceIndex(0) +6 >Emitted(45, 18) Source(48, 19) + SourceIndex(0) +7 >Emitted(45, 23) Source(48, 19) + SourceIndex(0) +8 >Emitted(45, 32) Source(48, 28) + SourceIndex(0) +9 >Emitted(45, 34) Source(48, 30) + SourceIndex(0) +10>Emitted(45, 36) Source(48, 19) + SourceIndex(0) +11>Emitted(45, 50) Source(48, 30) + SourceIndex(0) +12>Emitted(45, 52) Source(48, 19) + SourceIndex(0) +13>Emitted(45, 56) Source(48, 30) + SourceIndex(0) +14>Emitted(45, 57) Source(48, 31) + SourceIndex(0) +--- +>>> numberB = _w[_v][0]; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^^^-> +1 > +2 > [numberB] +1 >Emitted(46, 5) Source(48, 6) + SourceIndex(0) +2 >Emitted(46, 24) Source(48, 15) + SourceIndex(0) +--- +>>> console.log(numberB); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1-> of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > numberB +7 > ) +8 > ; +1->Emitted(47, 5) Source(49, 5) + SourceIndex(0) +2 >Emitted(47, 12) Source(49, 12) + SourceIndex(0) +3 >Emitted(47, 13) Source(49, 13) + SourceIndex(0) +4 >Emitted(47, 16) Source(49, 16) + SourceIndex(0) +5 >Emitted(47, 17) Source(49, 17) + SourceIndex(0) +6 >Emitted(47, 24) Source(49, 24) + SourceIndex(0) +7 >Emitted(47, 25) Source(49, 25) + SourceIndex(0) +8 >Emitted(47, 26) Source(49, 26) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(48, 2) Source(50, 2) + SourceIndex(0) +--- +>>>for (var _x = 0, _y = [robotA, robotB]; _x < _y.length; _x++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^ +16> ^ +1-> + > +2 >for +3 > +4 > ([numberB] of +5 > [robotA, robotB] +6 > +7 > [ +8 > robotA +9 > , +10> robotB +11> ] +12> +13> [robotA, robotB] +14> +15> [robotA, robotB] +16> ) +1->Emitted(49, 1) Source(51, 1) + SourceIndex(0) +2 >Emitted(49, 4) Source(51, 4) + SourceIndex(0) +3 >Emitted(49, 5) Source(51, 5) + SourceIndex(0) +4 >Emitted(49, 6) Source(51, 19) + SourceIndex(0) +5 >Emitted(49, 16) Source(51, 35) + SourceIndex(0) +6 >Emitted(49, 18) Source(51, 19) + SourceIndex(0) +7 >Emitted(49, 24) Source(51, 20) + SourceIndex(0) +8 >Emitted(49, 30) Source(51, 26) + SourceIndex(0) +9 >Emitted(49, 32) Source(51, 28) + SourceIndex(0) +10>Emitted(49, 38) Source(51, 34) + SourceIndex(0) +11>Emitted(49, 39) Source(51, 35) + SourceIndex(0) +12>Emitted(49, 41) Source(51, 19) + SourceIndex(0) +13>Emitted(49, 55) Source(51, 35) + SourceIndex(0) +14>Emitted(49, 57) Source(51, 19) + SourceIndex(0) +15>Emitted(49, 61) Source(51, 35) + SourceIndex(0) +16>Emitted(49, 62) Source(51, 36) + SourceIndex(0) +--- +>>> numberB = _y[_x][0]; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^^^-> +1 > +2 > [numberB] +1 >Emitted(50, 5) Source(51, 6) + SourceIndex(0) +2 >Emitted(50, 24) Source(51, 15) + SourceIndex(0) +--- +>>> console.log(numberB); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1-> of [robotA, robotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > numberB +7 > ) +8 > ; +1->Emitted(51, 5) Source(52, 5) + SourceIndex(0) +2 >Emitted(51, 12) Source(52, 12) + SourceIndex(0) +3 >Emitted(51, 13) Source(52, 13) + SourceIndex(0) +4 >Emitted(51, 16) Source(52, 16) + SourceIndex(0) +5 >Emitted(51, 17) Source(52, 17) + SourceIndex(0) +6 >Emitted(51, 24) Source(52, 24) + SourceIndex(0) +7 >Emitted(51, 25) Source(52, 25) + SourceIndex(0) +8 >Emitted(51, 26) Source(52, 26) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(52, 2) Source(53, 2) + SourceIndex(0) +--- +>>>for (var _z = 0, multiRobots_2 = multiRobots; _z < multiRobots_2.length; _z++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +1-> + > +2 >for +3 > +4 > ([nameB] of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > multiRobots +10> +11> multiRobots +12> ) +1->Emitted(53, 1) Source(54, 1) + SourceIndex(0) +2 >Emitted(53, 4) Source(54, 4) + SourceIndex(0) +3 >Emitted(53, 5) Source(54, 5) + SourceIndex(0) +4 >Emitted(53, 6) Source(54, 17) + SourceIndex(0) +5 >Emitted(53, 16) Source(54, 28) + SourceIndex(0) +6 >Emitted(53, 18) Source(54, 17) + SourceIndex(0) +7 >Emitted(53, 45) Source(54, 28) + SourceIndex(0) +8 >Emitted(53, 47) Source(54, 17) + SourceIndex(0) +9 >Emitted(53, 72) Source(54, 28) + SourceIndex(0) +10>Emitted(53, 74) Source(54, 17) + SourceIndex(0) +11>Emitted(53, 78) Source(54, 28) + SourceIndex(0) +12>Emitted(53, 79) Source(54, 29) + SourceIndex(0) +--- +>>> nameB = multiRobots_2[_z][0]; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > [nameB] +1 >Emitted(54, 5) Source(54, 6) + SourceIndex(0) +2 >Emitted(54, 33) Source(54, 13) + SourceIndex(0) +--- +>>> console.log(nameB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameB +7 > ) +8 > ; +1 >Emitted(55, 5) Source(55, 5) + SourceIndex(0) +2 >Emitted(55, 12) Source(55, 12) + SourceIndex(0) +3 >Emitted(55, 13) Source(55, 13) + SourceIndex(0) +4 >Emitted(55, 16) Source(55, 16) + SourceIndex(0) +5 >Emitted(55, 17) Source(55, 17) + SourceIndex(0) +6 >Emitted(55, 22) Source(55, 22) + SourceIndex(0) +7 >Emitted(55, 23) Source(55, 23) + SourceIndex(0) +8 >Emitted(55, 24) Source(55, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(56, 2) Source(56, 2) + SourceIndex(0) +--- +>>>for (var _0 = 0, _1 = getMultiRobots(); _0 < _1.length; _0++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +1-> + > +2 >for +3 > +4 > ([nameB] of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> getMultiRobots() +12> +13> getMultiRobots() +14> ) +1->Emitted(57, 1) Source(57, 1) + SourceIndex(0) +2 >Emitted(57, 4) Source(57, 4) + SourceIndex(0) +3 >Emitted(57, 5) Source(57, 5) + SourceIndex(0) +4 >Emitted(57, 6) Source(57, 17) + SourceIndex(0) +5 >Emitted(57, 16) Source(57, 33) + SourceIndex(0) +6 >Emitted(57, 18) Source(57, 17) + SourceIndex(0) +7 >Emitted(57, 23) Source(57, 17) + SourceIndex(0) +8 >Emitted(57, 37) Source(57, 31) + SourceIndex(0) +9 >Emitted(57, 39) Source(57, 33) + SourceIndex(0) +10>Emitted(57, 41) Source(57, 17) + SourceIndex(0) +11>Emitted(57, 55) Source(57, 33) + SourceIndex(0) +12>Emitted(57, 57) Source(57, 17) + SourceIndex(0) +13>Emitted(57, 61) Source(57, 33) + SourceIndex(0) +14>Emitted(57, 62) Source(57, 34) + SourceIndex(0) +--- +>>> nameB = _1[_0][0]; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^ +3 > ^^^-> +1 > +2 > [nameB] +1 >Emitted(58, 5) Source(57, 6) + SourceIndex(0) +2 >Emitted(58, 22) Source(57, 13) + SourceIndex(0) +--- +>>> console.log(nameB); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1-> of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameB +7 > ) +8 > ; +1->Emitted(59, 5) Source(58, 5) + SourceIndex(0) +2 >Emitted(59, 12) Source(58, 12) + SourceIndex(0) +3 >Emitted(59, 13) Source(58, 13) + SourceIndex(0) +4 >Emitted(59, 16) Source(58, 16) + SourceIndex(0) +5 >Emitted(59, 17) Source(58, 17) + SourceIndex(0) +6 >Emitted(59, 22) Source(58, 22) + SourceIndex(0) +7 >Emitted(59, 23) Source(58, 23) + SourceIndex(0) +8 >Emitted(59, 24) Source(58, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(60, 2) Source(59, 2) + SourceIndex(0) +--- +>>>for (var _2 = 0, _3 = [multiRobotA, multiRobotB]; _2 < _3.length; _2++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^ +16> ^ +1-> + > +2 >for +3 > +4 > ([nameB] of +5 > [multiRobotA, multiRobotB] +6 > +7 > [ +8 > multiRobotA +9 > , +10> multiRobotB +11> ] +12> +13> [multiRobotA, multiRobotB] +14> +15> [multiRobotA, multiRobotB] +16> ) +1->Emitted(61, 1) Source(60, 1) + SourceIndex(0) +2 >Emitted(61, 4) Source(60, 4) + SourceIndex(0) +3 >Emitted(61, 5) Source(60, 5) + SourceIndex(0) +4 >Emitted(61, 6) Source(60, 17) + SourceIndex(0) +5 >Emitted(61, 16) Source(60, 43) + SourceIndex(0) +6 >Emitted(61, 18) Source(60, 17) + SourceIndex(0) +7 >Emitted(61, 24) Source(60, 18) + SourceIndex(0) +8 >Emitted(61, 35) Source(60, 29) + SourceIndex(0) +9 >Emitted(61, 37) Source(60, 31) + SourceIndex(0) +10>Emitted(61, 48) Source(60, 42) + SourceIndex(0) +11>Emitted(61, 49) Source(60, 43) + SourceIndex(0) +12>Emitted(61, 51) Source(60, 17) + SourceIndex(0) +13>Emitted(61, 65) Source(60, 43) + SourceIndex(0) +14>Emitted(61, 67) Source(60, 17) + SourceIndex(0) +15>Emitted(61, 71) Source(60, 43) + SourceIndex(0) +16>Emitted(61, 72) Source(60, 44) + SourceIndex(0) +--- +>>> nameB = _3[_2][0]; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^ +3 > ^^^-> +1 > +2 > [nameB] +1 >Emitted(62, 5) Source(60, 6) + SourceIndex(0) +2 >Emitted(62, 22) Source(60, 13) + SourceIndex(0) +--- +>>> console.log(nameB); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1-> of [multiRobotA, multiRobotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameB +7 > ) +8 > ; +1->Emitted(63, 5) Source(61, 5) + SourceIndex(0) +2 >Emitted(63, 12) Source(61, 12) + SourceIndex(0) +3 >Emitted(63, 13) Source(61, 13) + SourceIndex(0) +4 >Emitted(63, 16) Source(61, 16) + SourceIndex(0) +5 >Emitted(63, 17) Source(61, 17) + SourceIndex(0) +6 >Emitted(63, 22) Source(61, 22) + SourceIndex(0) +7 >Emitted(63, 23) Source(61, 23) + SourceIndex(0) +8 >Emitted(63, 24) Source(61, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(64, 2) Source(62, 2) + SourceIndex(0) +--- +>>>for (var _4 = 0, robots_3 = robots; _4 < robots_3.length; _4++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +13> ^^^^^^^^^^^-> +1-> + > + > +2 >for +3 > +4 > ([numberA2, nameA2, skillA2] of +5 > robots +6 > +7 > robots +8 > +9 > robots +10> +11> robots +12> ) +1->Emitted(65, 1) Source(64, 1) + SourceIndex(0) +2 >Emitted(65, 4) Source(64, 4) + SourceIndex(0) +3 >Emitted(65, 5) Source(64, 5) + SourceIndex(0) +4 >Emitted(65, 6) Source(64, 37) + SourceIndex(0) +5 >Emitted(65, 16) Source(64, 43) + SourceIndex(0) +6 >Emitted(65, 18) Source(64, 37) + SourceIndex(0) +7 >Emitted(65, 35) Source(64, 43) + SourceIndex(0) +8 >Emitted(65, 37) Source(64, 37) + SourceIndex(0) +9 >Emitted(65, 57) Source(64, 43) + SourceIndex(0) +10>Emitted(65, 59) Source(64, 37) + SourceIndex(0) +11>Emitted(65, 63) Source(64, 43) + SourceIndex(0) +12>Emitted(65, 64) Source(64, 44) + SourceIndex(0) +--- +>>> _5 = robots_3[_4], numberA2 = _5[0], nameA2 = _5[1], skillA2 = _5[2]; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^ +1-> +2 > [numberA2, nameA2, skillA2] +3 > +4 > numberA2 +5 > , +6 > nameA2 +7 > , +8 > skillA2 +1->Emitted(66, 5) Source(64, 6) + SourceIndex(0) +2 >Emitted(66, 22) Source(64, 33) + SourceIndex(0) +3 >Emitted(66, 24) Source(64, 7) + SourceIndex(0) +4 >Emitted(66, 40) Source(64, 15) + SourceIndex(0) +5 >Emitted(66, 42) Source(64, 17) + SourceIndex(0) +6 >Emitted(66, 56) Source(64, 23) + SourceIndex(0) +7 >Emitted(66, 58) Source(64, 25) + SourceIndex(0) +8 >Emitted(66, 73) Source(64, 32) + SourceIndex(0) +--- +>>> console.log(nameA2); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 >] of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA2 +7 > ) +8 > ; +1 >Emitted(67, 5) Source(65, 5) + SourceIndex(0) +2 >Emitted(67, 12) Source(65, 12) + SourceIndex(0) +3 >Emitted(67, 13) Source(65, 13) + SourceIndex(0) +4 >Emitted(67, 16) Source(65, 16) + SourceIndex(0) +5 >Emitted(67, 17) Source(65, 17) + SourceIndex(0) +6 >Emitted(67, 23) Source(65, 23) + SourceIndex(0) +7 >Emitted(67, 24) Source(65, 24) + SourceIndex(0) +8 >Emitted(67, 25) Source(65, 25) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(68, 2) Source(66, 2) + SourceIndex(0) +--- +>>>for (var _6 = 0, _7 = getRobots(); _6 < _7.length; _6++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +15> ^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ([numberA2, nameA2, skillA2] of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> getRobots() +12> +13> getRobots() +14> ) +1->Emitted(69, 1) Source(67, 1) + SourceIndex(0) +2 >Emitted(69, 4) Source(67, 4) + SourceIndex(0) +3 >Emitted(69, 5) Source(67, 5) + SourceIndex(0) +4 >Emitted(69, 6) Source(67, 37) + SourceIndex(0) +5 >Emitted(69, 16) Source(67, 48) + SourceIndex(0) +6 >Emitted(69, 18) Source(67, 37) + SourceIndex(0) +7 >Emitted(69, 23) Source(67, 37) + SourceIndex(0) +8 >Emitted(69, 32) Source(67, 46) + SourceIndex(0) +9 >Emitted(69, 34) Source(67, 48) + SourceIndex(0) +10>Emitted(69, 36) Source(67, 37) + SourceIndex(0) +11>Emitted(69, 50) Source(67, 48) + SourceIndex(0) +12>Emitted(69, 52) Source(67, 37) + SourceIndex(0) +13>Emitted(69, 56) Source(67, 48) + SourceIndex(0) +14>Emitted(69, 57) Source(67, 49) + SourceIndex(0) +--- +>>> _8 = _7[_6], numberA2 = _8[0], nameA2 = _8[1], skillA2 = _8[2]; +1->^^^^ +2 > ^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^ +1-> +2 > [numberA2, nameA2, skillA2] +3 > +4 > numberA2 +5 > , +6 > nameA2 +7 > , +8 > skillA2 +1->Emitted(70, 5) Source(67, 6) + SourceIndex(0) +2 >Emitted(70, 16) Source(67, 33) + SourceIndex(0) +3 >Emitted(70, 18) Source(67, 7) + SourceIndex(0) +4 >Emitted(70, 34) Source(67, 15) + SourceIndex(0) +5 >Emitted(70, 36) Source(67, 17) + SourceIndex(0) +6 >Emitted(70, 50) Source(67, 23) + SourceIndex(0) +7 >Emitted(70, 52) Source(67, 25) + SourceIndex(0) +8 >Emitted(70, 67) Source(67, 32) + SourceIndex(0) +--- +>>> console.log(nameA2); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 >] of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA2 +7 > ) +8 > ; +1 >Emitted(71, 5) Source(68, 5) + SourceIndex(0) +2 >Emitted(71, 12) Source(68, 12) + SourceIndex(0) +3 >Emitted(71, 13) Source(68, 13) + SourceIndex(0) +4 >Emitted(71, 16) Source(68, 16) + SourceIndex(0) +5 >Emitted(71, 17) Source(68, 17) + SourceIndex(0) +6 >Emitted(71, 23) Source(68, 23) + SourceIndex(0) +7 >Emitted(71, 24) Source(68, 24) + SourceIndex(0) +8 >Emitted(71, 25) Source(68, 25) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(72, 2) Source(69, 2) + SourceIndex(0) +--- +>>>for (var _9 = 0, _10 = [robotA, robotB]; _9 < _10.length; _9++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^ +16> ^ +17> ^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ([numberA2, nameA2, skillA2] of +5 > [robotA, robotB] +6 > +7 > [ +8 > robotA +9 > , +10> robotB +11> ] +12> +13> [robotA, robotB] +14> +15> [robotA, robotB] +16> ) +1->Emitted(73, 1) Source(70, 1) + SourceIndex(0) +2 >Emitted(73, 4) Source(70, 4) + SourceIndex(0) +3 >Emitted(73, 5) Source(70, 5) + SourceIndex(0) +4 >Emitted(73, 6) Source(70, 37) + SourceIndex(0) +5 >Emitted(73, 16) Source(70, 53) + SourceIndex(0) +6 >Emitted(73, 18) Source(70, 37) + SourceIndex(0) +7 >Emitted(73, 25) Source(70, 38) + SourceIndex(0) +8 >Emitted(73, 31) Source(70, 44) + SourceIndex(0) +9 >Emitted(73, 33) Source(70, 46) + SourceIndex(0) +10>Emitted(73, 39) Source(70, 52) + SourceIndex(0) +11>Emitted(73, 40) Source(70, 53) + SourceIndex(0) +12>Emitted(73, 42) Source(70, 37) + SourceIndex(0) +13>Emitted(73, 57) Source(70, 53) + SourceIndex(0) +14>Emitted(73, 59) Source(70, 37) + SourceIndex(0) +15>Emitted(73, 63) Source(70, 53) + SourceIndex(0) +16>Emitted(73, 64) Source(70, 54) + SourceIndex(0) +--- +>>> _11 = _10[_9], numberA2 = _11[0], nameA2 = _11[1], skillA2 = _11[2]; +1->^^^^ +2 > ^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^ +1-> +2 > [numberA2, nameA2, skillA2] +3 > +4 > numberA2 +5 > , +6 > nameA2 +7 > , +8 > skillA2 +1->Emitted(74, 5) Source(70, 6) + SourceIndex(0) +2 >Emitted(74, 18) Source(70, 33) + SourceIndex(0) +3 >Emitted(74, 20) Source(70, 7) + SourceIndex(0) +4 >Emitted(74, 37) Source(70, 15) + SourceIndex(0) +5 >Emitted(74, 39) Source(70, 17) + SourceIndex(0) +6 >Emitted(74, 54) Source(70, 23) + SourceIndex(0) +7 >Emitted(74, 56) Source(70, 25) + SourceIndex(0) +8 >Emitted(74, 72) Source(70, 32) + SourceIndex(0) +--- +>>> console.log(nameA2); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 >] of [robotA, robotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA2 +7 > ) +8 > ; +1 >Emitted(75, 5) Source(71, 5) + SourceIndex(0) +2 >Emitted(75, 12) Source(71, 12) + SourceIndex(0) +3 >Emitted(75, 13) Source(71, 13) + SourceIndex(0) +4 >Emitted(75, 16) Source(71, 16) + SourceIndex(0) +5 >Emitted(75, 17) Source(71, 17) + SourceIndex(0) +6 >Emitted(75, 23) Source(71, 23) + SourceIndex(0) +7 >Emitted(75, 24) Source(71, 24) + SourceIndex(0) +8 >Emitted(75, 25) Source(71, 25) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(76, 2) Source(72, 2) + SourceIndex(0) +--- +>>>for (var _12 = 0, multiRobots_3 = multiRobots; _12 < multiRobots_3.length; _12++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^ +12> ^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ([nameMA, [primarySkillA, secondarySkillA]] of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > multiRobots +10> +11> multiRobots +12> ) +1->Emitted(77, 1) Source(73, 1) + SourceIndex(0) +2 >Emitted(77, 4) Source(73, 4) + SourceIndex(0) +3 >Emitted(77, 5) Source(73, 5) + SourceIndex(0) +4 >Emitted(77, 6) Source(73, 52) + SourceIndex(0) +5 >Emitted(77, 17) Source(73, 63) + SourceIndex(0) +6 >Emitted(77, 19) Source(73, 52) + SourceIndex(0) +7 >Emitted(77, 46) Source(73, 63) + SourceIndex(0) +8 >Emitted(77, 48) Source(73, 52) + SourceIndex(0) +9 >Emitted(77, 74) Source(73, 63) + SourceIndex(0) +10>Emitted(77, 76) Source(73, 52) + SourceIndex(0) +11>Emitted(77, 81) Source(73, 63) + SourceIndex(0) +12>Emitted(77, 82) Source(73, 64) + SourceIndex(0) +--- +>>> _13 = multiRobots_3[_12], nameMA = _13[0], _14 = _13[1], primarySkillA = _14[0], secondarySkillA = _14[1]; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [nameMA, [primarySkillA, secondarySkillA]] +3 > +4 > nameMA +5 > , +6 > [primarySkillA, secondarySkillA] +7 > +8 > primarySkillA +9 > , +10> secondarySkillA +1->Emitted(78, 5) Source(73, 6) + SourceIndex(0) +2 >Emitted(78, 29) Source(73, 48) + SourceIndex(0) +3 >Emitted(78, 31) Source(73, 7) + SourceIndex(0) +4 >Emitted(78, 46) Source(73, 13) + SourceIndex(0) +5 >Emitted(78, 48) Source(73, 15) + SourceIndex(0) +6 >Emitted(78, 60) Source(73, 47) + SourceIndex(0) +7 >Emitted(78, 62) Source(73, 16) + SourceIndex(0) +8 >Emitted(78, 84) Source(73, 29) + SourceIndex(0) +9 >Emitted(78, 86) Source(73, 31) + SourceIndex(0) +10>Emitted(78, 110) Source(73, 46) + SourceIndex(0) +--- +>>> console.log(nameMA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 >]] of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMA +7 > ) +8 > ; +1 >Emitted(79, 5) Source(74, 5) + SourceIndex(0) +2 >Emitted(79, 12) Source(74, 12) + SourceIndex(0) +3 >Emitted(79, 13) Source(74, 13) + SourceIndex(0) +4 >Emitted(79, 16) Source(74, 16) + SourceIndex(0) +5 >Emitted(79, 17) Source(74, 17) + SourceIndex(0) +6 >Emitted(79, 23) Source(74, 23) + SourceIndex(0) +7 >Emitted(79, 24) Source(74, 24) + SourceIndex(0) +8 >Emitted(79, 25) Source(74, 25) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(80, 2) Source(75, 2) + SourceIndex(0) +--- +>>>for (var _15 = 0, _16 = getMultiRobots(); _15 < _16.length; _15++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ([nameMA, [primarySkillA, secondarySkillA]] of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> getMultiRobots() +12> +13> getMultiRobots() +14> ) +1->Emitted(81, 1) Source(76, 1) + SourceIndex(0) +2 >Emitted(81, 4) Source(76, 4) + SourceIndex(0) +3 >Emitted(81, 5) Source(76, 5) + SourceIndex(0) +4 >Emitted(81, 6) Source(76, 52) + SourceIndex(0) +5 >Emitted(81, 17) Source(76, 68) + SourceIndex(0) +6 >Emitted(81, 19) Source(76, 52) + SourceIndex(0) +7 >Emitted(81, 25) Source(76, 52) + SourceIndex(0) +8 >Emitted(81, 39) Source(76, 66) + SourceIndex(0) +9 >Emitted(81, 41) Source(76, 68) + SourceIndex(0) +10>Emitted(81, 43) Source(76, 52) + SourceIndex(0) +11>Emitted(81, 59) Source(76, 68) + SourceIndex(0) +12>Emitted(81, 61) Source(76, 52) + SourceIndex(0) +13>Emitted(81, 66) Source(76, 68) + SourceIndex(0) +14>Emitted(81, 67) Source(76, 69) + SourceIndex(0) +--- +>>> _17 = _16[_15], nameMA = _17[0], _18 = _17[1], primarySkillA = _18[0], secondarySkillA = _18[1]; +1->^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [nameMA, [primarySkillA, secondarySkillA]] +3 > +4 > nameMA +5 > , +6 > [primarySkillA, secondarySkillA] +7 > +8 > primarySkillA +9 > , +10> secondarySkillA +1->Emitted(82, 5) Source(76, 6) + SourceIndex(0) +2 >Emitted(82, 19) Source(76, 48) + SourceIndex(0) +3 >Emitted(82, 21) Source(76, 7) + SourceIndex(0) +4 >Emitted(82, 36) Source(76, 13) + SourceIndex(0) +5 >Emitted(82, 38) Source(76, 15) + SourceIndex(0) +6 >Emitted(82, 50) Source(76, 47) + SourceIndex(0) +7 >Emitted(82, 52) Source(76, 16) + SourceIndex(0) +8 >Emitted(82, 74) Source(76, 29) + SourceIndex(0) +9 >Emitted(82, 76) Source(76, 31) + SourceIndex(0) +10>Emitted(82, 100) Source(76, 46) + SourceIndex(0) +--- +>>> console.log(nameMA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 >]] of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMA +7 > ) +8 > ; +1 >Emitted(83, 5) Source(77, 5) + SourceIndex(0) +2 >Emitted(83, 12) Source(77, 12) + SourceIndex(0) +3 >Emitted(83, 13) Source(77, 13) + SourceIndex(0) +4 >Emitted(83, 16) Source(77, 16) + SourceIndex(0) +5 >Emitted(83, 17) Source(77, 17) + SourceIndex(0) +6 >Emitted(83, 23) Source(77, 23) + SourceIndex(0) +7 >Emitted(83, 24) Source(77, 24) + SourceIndex(0) +8 >Emitted(83, 25) Source(77, 25) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(84, 2) Source(78, 2) + SourceIndex(0) +--- +>>>for (var _19 = 0, _20 = [multiRobotA, multiRobotB]; _19 < _20.length; _19++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^^ +16> ^ +17> ^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ([nameMA, [primarySkillA, secondarySkillA]] of +5 > [multiRobotA, multiRobotB] +6 > +7 > [ +8 > multiRobotA +9 > , +10> multiRobotB +11> ] +12> +13> [multiRobotA, multiRobotB] +14> +15> [multiRobotA, multiRobotB] +16> ) +1->Emitted(85, 1) Source(79, 1) + SourceIndex(0) +2 >Emitted(85, 4) Source(79, 4) + SourceIndex(0) +3 >Emitted(85, 5) Source(79, 5) + SourceIndex(0) +4 >Emitted(85, 6) Source(79, 52) + SourceIndex(0) +5 >Emitted(85, 17) Source(79, 78) + SourceIndex(0) +6 >Emitted(85, 19) Source(79, 52) + SourceIndex(0) +7 >Emitted(85, 26) Source(79, 53) + SourceIndex(0) +8 >Emitted(85, 37) Source(79, 64) + SourceIndex(0) +9 >Emitted(85, 39) Source(79, 66) + SourceIndex(0) +10>Emitted(85, 50) Source(79, 77) + SourceIndex(0) +11>Emitted(85, 51) Source(79, 78) + SourceIndex(0) +12>Emitted(85, 53) Source(79, 52) + SourceIndex(0) +13>Emitted(85, 69) Source(79, 78) + SourceIndex(0) +14>Emitted(85, 71) Source(79, 52) + SourceIndex(0) +15>Emitted(85, 76) Source(79, 78) + SourceIndex(0) +16>Emitted(85, 77) Source(79, 79) + SourceIndex(0) +--- +>>> _21 = _20[_19], nameMA = _21[0], _22 = _21[1], primarySkillA = _22[0], secondarySkillA = _22[1]; +1->^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [nameMA, [primarySkillA, secondarySkillA]] +3 > +4 > nameMA +5 > , +6 > [primarySkillA, secondarySkillA] +7 > +8 > primarySkillA +9 > , +10> secondarySkillA +1->Emitted(86, 5) Source(79, 6) + SourceIndex(0) +2 >Emitted(86, 19) Source(79, 48) + SourceIndex(0) +3 >Emitted(86, 21) Source(79, 7) + SourceIndex(0) +4 >Emitted(86, 36) Source(79, 13) + SourceIndex(0) +5 >Emitted(86, 38) Source(79, 15) + SourceIndex(0) +6 >Emitted(86, 50) Source(79, 47) + SourceIndex(0) +7 >Emitted(86, 52) Source(79, 16) + SourceIndex(0) +8 >Emitted(86, 74) Source(79, 29) + SourceIndex(0) +9 >Emitted(86, 76) Source(79, 31) + SourceIndex(0) +10>Emitted(86, 100) Source(79, 46) + SourceIndex(0) +--- +>>> console.log(nameMA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 >]] of [multiRobotA, multiRobotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMA +7 > ) +8 > ; +1 >Emitted(87, 5) Source(80, 5) + SourceIndex(0) +2 >Emitted(87, 12) Source(80, 12) + SourceIndex(0) +3 >Emitted(87, 13) Source(80, 13) + SourceIndex(0) +4 >Emitted(87, 16) Source(80, 16) + SourceIndex(0) +5 >Emitted(87, 17) Source(80, 17) + SourceIndex(0) +6 >Emitted(87, 23) Source(80, 23) + SourceIndex(0) +7 >Emitted(87, 24) Source(80, 24) + SourceIndex(0) +8 >Emitted(87, 25) Source(80, 25) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(88, 2) Source(81, 2) + SourceIndex(0) +--- +>>>for (var _23 = 0, robots_4 = robots; _23 < robots_4.length; _23++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^ +12> ^ +13> ^^^^^-> +1-> + > + > +2 >for +3 > +4 > ([numberA3, ...robotAInfo] of +5 > robots +6 > +7 > robots +8 > +9 > robots +10> +11> robots +12> ) +1->Emitted(89, 1) Source(83, 1) + SourceIndex(0) +2 >Emitted(89, 4) Source(83, 4) + SourceIndex(0) +3 >Emitted(89, 5) Source(83, 5) + SourceIndex(0) +4 >Emitted(89, 6) Source(83, 35) + SourceIndex(0) +5 >Emitted(89, 17) Source(83, 41) + SourceIndex(0) +6 >Emitted(89, 19) Source(83, 35) + SourceIndex(0) +7 >Emitted(89, 36) Source(83, 41) + SourceIndex(0) +8 >Emitted(89, 38) Source(83, 35) + SourceIndex(0) +9 >Emitted(89, 59) Source(83, 41) + SourceIndex(0) +10>Emitted(89, 61) Source(83, 35) + SourceIndex(0) +11>Emitted(89, 66) Source(83, 41) + SourceIndex(0) +12>Emitted(89, 67) Source(83, 42) + SourceIndex(0) +--- +>>> _24 = robots_4[_23], numberA3 = _24[0], robotAInfo = _24.slice(1); +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [numberA3, ...robotAInfo] +3 > +4 > numberA3 +5 > , +6 > ...robotAInfo +1->Emitted(90, 5) Source(83, 6) + SourceIndex(0) +2 >Emitted(90, 24) Source(83, 31) + SourceIndex(0) +3 >Emitted(90, 26) Source(83, 7) + SourceIndex(0) +4 >Emitted(90, 43) Source(83, 15) + SourceIndex(0) +5 >Emitted(90, 45) Source(83, 17) + SourceIndex(0) +6 >Emitted(90, 70) Source(83, 30) + SourceIndex(0) +--- +>>> console.log(numberA3); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 >] of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > numberA3 +7 > ) +8 > ; +1 >Emitted(91, 5) Source(84, 5) + SourceIndex(0) +2 >Emitted(91, 12) Source(84, 12) + SourceIndex(0) +3 >Emitted(91, 13) Source(84, 13) + SourceIndex(0) +4 >Emitted(91, 16) Source(84, 16) + SourceIndex(0) +5 >Emitted(91, 17) Source(84, 17) + SourceIndex(0) +6 >Emitted(91, 25) Source(84, 25) + SourceIndex(0) +7 >Emitted(91, 26) Source(84, 26) + SourceIndex(0) +8 >Emitted(91, 27) Source(84, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(92, 2) Source(85, 2) + SourceIndex(0) +--- +>>>for (var _25 = 0, _26 = getRobots(); _25 < _26.length; _25++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^ +15> ^^^^^-> +1-> + > +2 >for +3 > +4 > ([numberA3, ...robotAInfo] of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> getRobots() +12> +13> getRobots() +14> ) +1->Emitted(93, 1) Source(86, 1) + SourceIndex(0) +2 >Emitted(93, 4) Source(86, 4) + SourceIndex(0) +3 >Emitted(93, 5) Source(86, 5) + SourceIndex(0) +4 >Emitted(93, 6) Source(86, 35) + SourceIndex(0) +5 >Emitted(93, 17) Source(86, 46) + SourceIndex(0) +6 >Emitted(93, 19) Source(86, 35) + SourceIndex(0) +7 >Emitted(93, 25) Source(86, 35) + SourceIndex(0) +8 >Emitted(93, 34) Source(86, 44) + SourceIndex(0) +9 >Emitted(93, 36) Source(86, 46) + SourceIndex(0) +10>Emitted(93, 38) Source(86, 35) + SourceIndex(0) +11>Emitted(93, 54) Source(86, 46) + SourceIndex(0) +12>Emitted(93, 56) Source(86, 35) + SourceIndex(0) +13>Emitted(93, 61) Source(86, 46) + SourceIndex(0) +14>Emitted(93, 62) Source(86, 47) + SourceIndex(0) +--- +>>> _27 = _26[_25], numberA3 = _27[0], robotAInfo = _27.slice(1); +1->^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [numberA3, ...robotAInfo] +3 > +4 > numberA3 +5 > , +6 > ...robotAInfo +1->Emitted(94, 5) Source(86, 6) + SourceIndex(0) +2 >Emitted(94, 19) Source(86, 31) + SourceIndex(0) +3 >Emitted(94, 21) Source(86, 7) + SourceIndex(0) +4 >Emitted(94, 38) Source(86, 15) + SourceIndex(0) +5 >Emitted(94, 40) Source(86, 17) + SourceIndex(0) +6 >Emitted(94, 65) Source(86, 30) + SourceIndex(0) +--- +>>> console.log(numberA3); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 >] of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > numberA3 +7 > ) +8 > ; +1 >Emitted(95, 5) Source(87, 5) + SourceIndex(0) +2 >Emitted(95, 12) Source(87, 12) + SourceIndex(0) +3 >Emitted(95, 13) Source(87, 13) + SourceIndex(0) +4 >Emitted(95, 16) Source(87, 16) + SourceIndex(0) +5 >Emitted(95, 17) Source(87, 17) + SourceIndex(0) +6 >Emitted(95, 25) Source(87, 25) + SourceIndex(0) +7 >Emitted(95, 26) Source(87, 26) + SourceIndex(0) +8 >Emitted(95, 27) Source(87, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(96, 2) Source(88, 2) + SourceIndex(0) +--- +>>>for (var _28 = 0, _29 = [robotA, robotB]; _28 < _29.length; _28++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^^ +16> ^ +1-> + > +2 >for +3 > +4 > ([numberA3, ...robotAInfo] of +5 > [robotA, robotB] +6 > +7 > [ +8 > robotA +9 > , +10> robotB +11> ] +12> +13> [robotA, robotB] +14> +15> [robotA, robotB] +16> ) +1->Emitted(97, 1) Source(89, 1) + SourceIndex(0) +2 >Emitted(97, 4) Source(89, 4) + SourceIndex(0) +3 >Emitted(97, 5) Source(89, 5) + SourceIndex(0) +4 >Emitted(97, 6) Source(89, 35) + SourceIndex(0) +5 >Emitted(97, 17) Source(89, 51) + SourceIndex(0) +6 >Emitted(97, 19) Source(89, 35) + SourceIndex(0) +7 >Emitted(97, 26) Source(89, 36) + SourceIndex(0) +8 >Emitted(97, 32) Source(89, 42) + SourceIndex(0) +9 >Emitted(97, 34) Source(89, 44) + SourceIndex(0) +10>Emitted(97, 40) Source(89, 50) + SourceIndex(0) +11>Emitted(97, 41) Source(89, 51) + SourceIndex(0) +12>Emitted(97, 43) Source(89, 35) + SourceIndex(0) +13>Emitted(97, 59) Source(89, 51) + SourceIndex(0) +14>Emitted(97, 61) Source(89, 35) + SourceIndex(0) +15>Emitted(97, 66) Source(89, 51) + SourceIndex(0) +16>Emitted(97, 67) Source(89, 52) + SourceIndex(0) +--- +>>> _30 = _29[_28], numberA3 = _30[0], robotAInfo = _30.slice(1); +1 >^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > [numberA3, ...robotAInfo] +3 > +4 > numberA3 +5 > , +6 > ...robotAInfo +1 >Emitted(98, 5) Source(89, 6) + SourceIndex(0) +2 >Emitted(98, 19) Source(89, 31) + SourceIndex(0) +3 >Emitted(98, 21) Source(89, 7) + SourceIndex(0) +4 >Emitted(98, 38) Source(89, 15) + SourceIndex(0) +5 >Emitted(98, 40) Source(89, 17) + SourceIndex(0) +6 >Emitted(98, 65) Source(89, 30) + SourceIndex(0) +--- +>>> console.log(numberA3); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 >] of [robotA, robotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > numberA3 +7 > ) +8 > ; +1 >Emitted(99, 5) Source(90, 5) + SourceIndex(0) +2 >Emitted(99, 12) Source(90, 12) + SourceIndex(0) +3 >Emitted(99, 13) Source(90, 13) + SourceIndex(0) +4 >Emitted(99, 16) Source(90, 16) + SourceIndex(0) +5 >Emitted(99, 17) Source(90, 17) + SourceIndex(0) +6 >Emitted(99, 25) Source(90, 25) + SourceIndex(0) +7 >Emitted(99, 26) Source(90, 26) + SourceIndex(0) +8 >Emitted(99, 27) Source(90, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(100, 2) Source(91, 2) + SourceIndex(0) +--- +>>>for (var _31 = 0, multiRobots_4 = multiRobots; _31 < multiRobots_4.length; _31++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^ +12> ^ +1-> + > +2 >for +3 > +4 > ([...multiRobotAInfo] of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > multiRobots +10> +11> multiRobots +12> ) +1->Emitted(101, 1) Source(92, 1) + SourceIndex(0) +2 >Emitted(101, 4) Source(92, 4) + SourceIndex(0) +3 >Emitted(101, 5) Source(92, 5) + SourceIndex(0) +4 >Emitted(101, 6) Source(92, 30) + SourceIndex(0) +5 >Emitted(101, 17) Source(92, 41) + SourceIndex(0) +6 >Emitted(101, 19) Source(92, 30) + SourceIndex(0) +7 >Emitted(101, 46) Source(92, 41) + SourceIndex(0) +8 >Emitted(101, 48) Source(92, 30) + SourceIndex(0) +9 >Emitted(101, 74) Source(92, 41) + SourceIndex(0) +10>Emitted(101, 76) Source(92, 30) + SourceIndex(0) +11>Emitted(101, 81) Source(92, 41) + SourceIndex(0) +12>Emitted(101, 82) Source(92, 42) + SourceIndex(0) +--- +>>> multiRobotAInfo = multiRobots_4[_31].slice(0); +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > [...multiRobotAInfo] +1 >Emitted(102, 5) Source(92, 6) + SourceIndex(0) +2 >Emitted(102, 50) Source(92, 26) + SourceIndex(0) +--- +>>> console.log(multiRobotAInfo); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > multiRobotAInfo +7 > ) +8 > ; +1 >Emitted(103, 5) Source(93, 5) + SourceIndex(0) +2 >Emitted(103, 12) Source(93, 12) + SourceIndex(0) +3 >Emitted(103, 13) Source(93, 13) + SourceIndex(0) +4 >Emitted(103, 16) Source(93, 16) + SourceIndex(0) +5 >Emitted(103, 17) Source(93, 17) + SourceIndex(0) +6 >Emitted(103, 32) Source(93, 32) + SourceIndex(0) +7 >Emitted(103, 33) Source(93, 33) + SourceIndex(0) +8 >Emitted(103, 34) Source(93, 34) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(104, 2) Source(94, 2) + SourceIndex(0) +--- +>>>for (var _32 = 0, _33 = getMultiRobots(); _32 < _33.length; _32++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^ +1-> + > +2 >for +3 > +4 > ([...multiRobotAInfo] of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> getMultiRobots() +12> +13> getMultiRobots() +14> ) +1->Emitted(105, 1) Source(95, 1) + SourceIndex(0) +2 >Emitted(105, 4) Source(95, 4) + SourceIndex(0) +3 >Emitted(105, 5) Source(95, 5) + SourceIndex(0) +4 >Emitted(105, 6) Source(95, 30) + SourceIndex(0) +5 >Emitted(105, 17) Source(95, 46) + SourceIndex(0) +6 >Emitted(105, 19) Source(95, 30) + SourceIndex(0) +7 >Emitted(105, 25) Source(95, 30) + SourceIndex(0) +8 >Emitted(105, 39) Source(95, 44) + SourceIndex(0) +9 >Emitted(105, 41) Source(95, 46) + SourceIndex(0) +10>Emitted(105, 43) Source(95, 30) + SourceIndex(0) +11>Emitted(105, 59) Source(95, 46) + SourceIndex(0) +12>Emitted(105, 61) Source(95, 30) + SourceIndex(0) +13>Emitted(105, 66) Source(95, 46) + SourceIndex(0) +14>Emitted(105, 67) Source(95, 47) + SourceIndex(0) +--- +>>> multiRobotAInfo = _33[_32].slice(0); +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > [...multiRobotAInfo] +1 >Emitted(106, 5) Source(95, 6) + SourceIndex(0) +2 >Emitted(106, 40) Source(95, 26) + SourceIndex(0) +--- +>>> console.log(multiRobotAInfo); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > multiRobotAInfo +7 > ) +8 > ; +1 >Emitted(107, 5) Source(96, 5) + SourceIndex(0) +2 >Emitted(107, 12) Source(96, 12) + SourceIndex(0) +3 >Emitted(107, 13) Source(96, 13) + SourceIndex(0) +4 >Emitted(107, 16) Source(96, 16) + SourceIndex(0) +5 >Emitted(107, 17) Source(96, 17) + SourceIndex(0) +6 >Emitted(107, 32) Source(96, 32) + SourceIndex(0) +7 >Emitted(107, 33) Source(96, 33) + SourceIndex(0) +8 >Emitted(107, 34) Source(96, 34) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(108, 2) Source(97, 2) + SourceIndex(0) +--- +>>>for (var _34 = 0, _35 = [multiRobotA, multiRobotB]; _34 < _35.length; _34++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^^ +16> ^ +1-> + > +2 >for +3 > +4 > ([...multiRobotAInfo] of +5 > [multiRobotA, multiRobotB] +6 > +7 > [ +8 > multiRobotA +9 > , +10> multiRobotB +11> ] +12> +13> [multiRobotA, multiRobotB] +14> +15> [multiRobotA, multiRobotB] +16> ) +1->Emitted(109, 1) Source(98, 1) + SourceIndex(0) +2 >Emitted(109, 4) Source(98, 4) + SourceIndex(0) +3 >Emitted(109, 5) Source(98, 5) + SourceIndex(0) +4 >Emitted(109, 6) Source(98, 30) + SourceIndex(0) +5 >Emitted(109, 17) Source(98, 56) + SourceIndex(0) +6 >Emitted(109, 19) Source(98, 30) + SourceIndex(0) +7 >Emitted(109, 26) Source(98, 31) + SourceIndex(0) +8 >Emitted(109, 37) Source(98, 42) + SourceIndex(0) +9 >Emitted(109, 39) Source(98, 44) + SourceIndex(0) +10>Emitted(109, 50) Source(98, 55) + SourceIndex(0) +11>Emitted(109, 51) Source(98, 56) + SourceIndex(0) +12>Emitted(109, 53) Source(98, 30) + SourceIndex(0) +13>Emitted(109, 69) Source(98, 56) + SourceIndex(0) +14>Emitted(109, 71) Source(98, 30) + SourceIndex(0) +15>Emitted(109, 76) Source(98, 56) + SourceIndex(0) +16>Emitted(109, 77) Source(98, 57) + SourceIndex(0) +--- +>>> multiRobotAInfo = _35[_34].slice(0); +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > [...multiRobotAInfo] +1 >Emitted(110, 5) Source(98, 6) + SourceIndex(0) +2 >Emitted(110, 40) Source(98, 26) + SourceIndex(0) +--- +>>> console.log(multiRobotAInfo); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > of [multiRobotA, multiRobotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > multiRobotAInfo +7 > ) +8 > ; +1 >Emitted(111, 5) Source(99, 5) + SourceIndex(0) +2 >Emitted(111, 12) Source(99, 12) + SourceIndex(0) +3 >Emitted(111, 13) Source(99, 13) + SourceIndex(0) +4 >Emitted(111, 16) Source(99, 16) + SourceIndex(0) +5 >Emitted(111, 17) Source(99, 17) + SourceIndex(0) +6 >Emitted(111, 32) Source(99, 32) + SourceIndex(0) +7 >Emitted(111, 33) Source(99, 33) + SourceIndex(0) +8 >Emitted(111, 34) Source(99, 34) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(112, 2) Source(100, 2) + SourceIndex(0) +--- +>>>var _a, _d, _g, _j, _k, _o, _p, _s, _t, _5, _8, _11, _13, _14, _17, _18, _21, _22, _24, _27, _30; +>>>//# sourceMappingURL=sourceMapValidationDestructuringForOfArrayBindingPattern2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.symbols b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.symbols new file mode 100644 index 00000000000..9f7648afccb --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.symbols @@ -0,0 +1,343 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPattern2.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 11)) + + log(msg: any): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 1, 8)) +} +type Robot = [number, string, string]; +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 2, 1)) + +type MultiSkilledRobot = [string, [string, string]]; +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 3, 38)) + +let robotA: Robot = [1, "mower", "mowing"]; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 6, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 2, 1)) + +let robotB: Robot = [2, "trimmer", "trimming"]; +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 7, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 2, 1)) + +let robots = [robotA, robotB]; +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 8, 3)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 6, 3)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 7, 3)) + +function getRobots() { +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 8, 30)) + + return robots; +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 8, 3)) +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 13, 3)) +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 3, 38)) + +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 14, 3)) +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 3, 38)) + +let multiRobots = [multiRobotA, multiRobotB]; +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 15, 3)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 13, 3)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 14, 3)) + +function getMultiRobots() { +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 15, 45)) + + return multiRobots; +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 15, 3)) +} + +let nameA: string, primarySkillA: string, secondarySkillA: string; +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 20, 3)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 20, 18)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 20, 41)) + +let numberB: number, nameB: string; +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 21, 3)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 21, 20)) + +let numberA2: number, nameA2: string, skillA2: string, nameMA: string; +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 22, 3)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 22, 21)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 22, 37)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 22, 54)) + +let numberA3: number, robotAInfo: (number | string)[], multiRobotAInfo: (string | [string, string])[]; +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 23, 3)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 23, 21)) +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 23, 54)) + +for ([, nameA] of robots) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 20, 3)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 8, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 20, 3)) +} +for ([, nameA] of getRobots()) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 20, 3)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 8, 30)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 20, 3)) +} +for ([, nameA] of [robotA, robotB]) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 20, 3)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 6, 3)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 7, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 20, 3)) +} +for ([, [primarySkillA, secondarySkillA]] of multiRobots) { +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 20, 18)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 20, 41)) +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 15, 3)) + + console.log(primarySkillA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 20, 18)) +} +for ([, [primarySkillA, secondarySkillA]] of getMultiRobots()) { +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 20, 18)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 20, 41)) +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 15, 45)) + + console.log(primarySkillA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 20, 18)) +} +for ([, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 20, 18)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 20, 41)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 13, 3)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 14, 3)) + + console.log(primarySkillA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 20, 18)) +} + +for ([numberB] of robots) { +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 21, 3)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 8, 3)) + + console.log(numberB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 21, 3)) +} +for ([numberB] of getRobots()) { +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 21, 3)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 8, 30)) + + console.log(numberB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 21, 3)) +} +for ([numberB] of [robotA, robotB]) { +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 21, 3)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 6, 3)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 7, 3)) + + console.log(numberB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 21, 3)) +} +for ([nameB] of multiRobots) { +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 21, 20)) +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 15, 3)) + + console.log(nameB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 21, 20)) +} +for ([nameB] of getMultiRobots()) { +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 21, 20)) +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 15, 45)) + + console.log(nameB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 21, 20)) +} +for ([nameB] of [multiRobotA, multiRobotB]) { +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 21, 20)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 13, 3)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 14, 3)) + + console.log(nameB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 21, 20)) +} + +for ([numberA2, nameA2, skillA2] of robots) { +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 22, 3)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 22, 21)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 22, 37)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 8, 3)) + + console.log(nameA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 22, 21)) +} +for ([numberA2, nameA2, skillA2] of getRobots()) { +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 22, 3)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 22, 21)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 22, 37)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 8, 30)) + + console.log(nameA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 22, 21)) +} +for ([numberA2, nameA2, skillA2] of [robotA, robotB]) { +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 22, 3)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 22, 21)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 22, 37)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 6, 3)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 7, 3)) + + console.log(nameA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 22, 21)) +} +for ([nameMA, [primarySkillA, secondarySkillA]] of multiRobots) { +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 22, 54)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 20, 18)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 20, 41)) +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 15, 3)) + + console.log(nameMA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 22, 54)) +} +for ([nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 22, 54)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 20, 18)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 20, 41)) +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 15, 45)) + + console.log(nameMA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 22, 54)) +} +for ([nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 22, 54)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 20, 18)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 20, 41)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 13, 3)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 14, 3)) + + console.log(nameMA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 22, 54)) +} + +for ([numberA3, ...robotAInfo] of robots) { +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 23, 3)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 23, 21)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 8, 3)) + + console.log(numberA3); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 23, 3)) +} +for ([numberA3, ...robotAInfo] of getRobots()) { +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 23, 3)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 23, 21)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 8, 30)) + + console.log(numberA3); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 23, 3)) +} +for ([numberA3, ...robotAInfo] of [robotA, robotB]) { +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 23, 3)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 23, 21)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 6, 3)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 7, 3)) + + console.log(numberA3); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 23, 3)) +} +for ([...multiRobotAInfo] of multiRobots) { +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 23, 54)) +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 15, 3)) + + console.log(multiRobotAInfo); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 23, 54)) +} +for ([...multiRobotAInfo] of getMultiRobots()) { +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 23, 54)) +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 15, 45)) + + console.log(multiRobotAInfo); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 23, 54)) +} +for ([...multiRobotAInfo] of [multiRobotA, multiRobotB]) { +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 23, 54)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 13, 3)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 14, 3)) + + console.log(multiRobotAInfo); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 0, 22)) +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPattern2.ts, 23, 54)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.types b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.types new file mode 100644 index 00000000000..33b503d0d8f --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.types @@ -0,0 +1,445 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPattern2.ts === +declare var console: { +>console : { log(msg: any): void; } + + log(msg: any): void; +>log : (msg: any) => void +>msg : any +} +type Robot = [number, string, string]; +>Robot : [number, string, string] + +type MultiSkilledRobot = [string, [string, string]]; +>MultiSkilledRobot : [string, [string, string]] + +let robotA: Robot = [1, "mower", "mowing"]; +>robotA : [number, string, string] +>Robot : [number, string, string] +>[1, "mower", "mowing"] : [number, string, string] +>1 : number +>"mower" : string +>"mowing" : string + +let robotB: Robot = [2, "trimmer", "trimming"]; +>robotB : [number, string, string] +>Robot : [number, string, string] +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + +let robots = [robotA, robotB]; +>robots : [number, string, string][] +>[robotA, robotB] : [number, string, string][] +>robotA : [number, string, string] +>robotB : [number, string, string] + +function getRobots() { +>getRobots : () => [number, string, string][] + + return robots; +>robots : [number, string, string][] +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +>multiRobotA : [string, [string, string]] +>MultiSkilledRobot : [string, [string, string]] +>["mower", ["mowing", ""]] : [string, [string, string]] +>"mower" : string +>["mowing", ""] : [string, string] +>"mowing" : string +>"" : string + +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +>multiRobotB : [string, [string, string]] +>MultiSkilledRobot : [string, [string, string]] +>["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>"trimmer" : string +>["trimming", "edging"] : [string, string] +>"trimming" : string +>"edging" : string + +let multiRobots = [multiRobotA, multiRobotB]; +>multiRobots : [string, [string, string]][] +>[multiRobotA, multiRobotB] : [string, [string, string]][] +>multiRobotA : [string, [string, string]] +>multiRobotB : [string, [string, string]] + +function getMultiRobots() { +>getMultiRobots : () => [string, [string, string]][] + + return multiRobots; +>multiRobots : [string, [string, string]][] +} + +let nameA: string, primarySkillA: string, secondarySkillA: string; +>nameA : string +>primarySkillA : string +>secondarySkillA : string + +let numberB: number, nameB: string; +>numberB : number +>nameB : string + +let numberA2: number, nameA2: string, skillA2: string, nameMA: string; +>numberA2 : number +>nameA2 : string +>skillA2 : string +>nameMA : string + +let numberA3: number, robotAInfo: (number | string)[], multiRobotAInfo: (string | [string, string])[]; +>numberA3 : number +>robotAInfo : (number | string)[] +>multiRobotAInfo : (string | [string, string])[] + +for ([, nameA] of robots) { +>[, nameA] : string[] +> : undefined +>nameA : string +>robots : [number, string, string][] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ([, nameA] of getRobots()) { +>[, nameA] : string[] +> : undefined +>nameA : string +>getRobots() : [number, string, string][] +>getRobots : () => [number, string, string][] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ([, nameA] of [robotA, robotB]) { +>[, nameA] : string[] +> : undefined +>nameA : string +>[robotA, robotB] : [number, string, string][] +>robotA : [number, string, string] +>robotB : [number, string, string] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ([, [primarySkillA, secondarySkillA]] of multiRobots) { +>[, [primarySkillA, secondarySkillA]] : string[][] +> : undefined +>[primarySkillA, secondarySkillA] : string[] +>primarySkillA : string +>secondarySkillA : string +>multiRobots : [string, [string, string]][] + + console.log(primarySkillA); +>console.log(primarySkillA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primarySkillA : string +} +for ([, [primarySkillA, secondarySkillA]] of getMultiRobots()) { +>[, [primarySkillA, secondarySkillA]] : string[][] +> : undefined +>[primarySkillA, secondarySkillA] : string[] +>primarySkillA : string +>secondarySkillA : string +>getMultiRobots() : [string, [string, string]][] +>getMultiRobots : () => [string, [string, string]][] + + console.log(primarySkillA); +>console.log(primarySkillA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primarySkillA : string +} +for ([, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { +>[, [primarySkillA, secondarySkillA]] : string[][] +> : undefined +>[primarySkillA, secondarySkillA] : string[] +>primarySkillA : string +>secondarySkillA : string +>[multiRobotA, multiRobotB] : [string, [string, string]][] +>multiRobotA : [string, [string, string]] +>multiRobotB : [string, [string, string]] + + console.log(primarySkillA); +>console.log(primarySkillA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primarySkillA : string +} + +for ([numberB] of robots) { +>[numberB] : number[] +>numberB : number +>robots : [number, string, string][] + + console.log(numberB); +>console.log(numberB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberB : number +} +for ([numberB] of getRobots()) { +>[numberB] : number[] +>numberB : number +>getRobots() : [number, string, string][] +>getRobots : () => [number, string, string][] + + console.log(numberB); +>console.log(numberB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberB : number +} +for ([numberB] of [robotA, robotB]) { +>[numberB] : number[] +>numberB : number +>[robotA, robotB] : [number, string, string][] +>robotA : [number, string, string] +>robotB : [number, string, string] + + console.log(numberB); +>console.log(numberB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberB : number +} +for ([nameB] of multiRobots) { +>[nameB] : string[] +>nameB : string +>multiRobots : [string, [string, string]][] + + console.log(nameB); +>console.log(nameB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameB : string +} +for ([nameB] of getMultiRobots()) { +>[nameB] : string[] +>nameB : string +>getMultiRobots() : [string, [string, string]][] +>getMultiRobots : () => [string, [string, string]][] + + console.log(nameB); +>console.log(nameB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameB : string +} +for ([nameB] of [multiRobotA, multiRobotB]) { +>[nameB] : string[] +>nameB : string +>[multiRobotA, multiRobotB] : [string, [string, string]][] +>multiRobotA : [string, [string, string]] +>multiRobotB : [string, [string, string]] + + console.log(nameB); +>console.log(nameB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameB : string +} + +for ([numberA2, nameA2, skillA2] of robots) { +>[numberA2, nameA2, skillA2] : (number | string)[] +>numberA2 : number +>nameA2 : string +>skillA2 : string +>robots : [number, string, string][] + + console.log(nameA2); +>console.log(nameA2) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA2 : string +} +for ([numberA2, nameA2, skillA2] of getRobots()) { +>[numberA2, nameA2, skillA2] : (number | string)[] +>numberA2 : number +>nameA2 : string +>skillA2 : string +>getRobots() : [number, string, string][] +>getRobots : () => [number, string, string][] + + console.log(nameA2); +>console.log(nameA2) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA2 : string +} +for ([numberA2, nameA2, skillA2] of [robotA, robotB]) { +>[numberA2, nameA2, skillA2] : (number | string)[] +>numberA2 : number +>nameA2 : string +>skillA2 : string +>[robotA, robotB] : [number, string, string][] +>robotA : [number, string, string] +>robotB : [number, string, string] + + console.log(nameA2); +>console.log(nameA2) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA2 : string +} +for ([nameMA, [primarySkillA, secondarySkillA]] of multiRobots) { +>[nameMA, [primarySkillA, secondarySkillA]] : (string | string[])[] +>nameMA : string +>[primarySkillA, secondarySkillA] : string[] +>primarySkillA : string +>secondarySkillA : string +>multiRobots : [string, [string, string]][] + + console.log(nameMA); +>console.log(nameMA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMA : string +} +for ([nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { +>[nameMA, [primarySkillA, secondarySkillA]] : (string | string[])[] +>nameMA : string +>[primarySkillA, secondarySkillA] : string[] +>primarySkillA : string +>secondarySkillA : string +>getMultiRobots() : [string, [string, string]][] +>getMultiRobots : () => [string, [string, string]][] + + console.log(nameMA); +>console.log(nameMA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMA : string +} +for ([nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { +>[nameMA, [primarySkillA, secondarySkillA]] : (string | string[])[] +>nameMA : string +>[primarySkillA, secondarySkillA] : string[] +>primarySkillA : string +>secondarySkillA : string +>[multiRobotA, multiRobotB] : [string, [string, string]][] +>multiRobotA : [string, [string, string]] +>multiRobotB : [string, [string, string]] + + console.log(nameMA); +>console.log(nameMA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMA : string +} + +for ([numberA3, ...robotAInfo] of robots) { +>[numberA3, ...robotAInfo] : (number | string)[] +>numberA3 : number +>...robotAInfo : number | string +>robotAInfo : (number | string)[] +>robots : [number, string, string][] + + console.log(numberA3); +>console.log(numberA3) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberA3 : number +} +for ([numberA3, ...robotAInfo] of getRobots()) { +>[numberA3, ...robotAInfo] : (number | string)[] +>numberA3 : number +>...robotAInfo : number | string +>robotAInfo : (number | string)[] +>getRobots() : [number, string, string][] +>getRobots : () => [number, string, string][] + + console.log(numberA3); +>console.log(numberA3) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberA3 : number +} +for ([numberA3, ...robotAInfo] of [robotA, robotB]) { +>[numberA3, ...robotAInfo] : (number | string)[] +>numberA3 : number +>...robotAInfo : number | string +>robotAInfo : (number | string)[] +>[robotA, robotB] : [number, string, string][] +>robotA : [number, string, string] +>robotB : [number, string, string] + + console.log(numberA3); +>console.log(numberA3) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberA3 : number +} +for ([...multiRobotAInfo] of multiRobots) { +>[...multiRobotAInfo] : (string | [string, string])[] +>...multiRobotAInfo : string | [string, string] +>multiRobotAInfo : (string | [string, string])[] +>multiRobots : [string, [string, string]][] + + console.log(multiRobotAInfo); +>console.log(multiRobotAInfo) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>multiRobotAInfo : (string | [string, string])[] +} +for ([...multiRobotAInfo] of getMultiRobots()) { +>[...multiRobotAInfo] : (string | [string, string])[] +>...multiRobotAInfo : string | [string, string] +>multiRobotAInfo : (string | [string, string])[] +>getMultiRobots() : [string, [string, string]][] +>getMultiRobots : () => [string, [string, string]][] + + console.log(multiRobotAInfo); +>console.log(multiRobotAInfo) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>multiRobotAInfo : (string | [string, string])[] +} +for ([...multiRobotAInfo] of [multiRobotA, multiRobotB]) { +>[...multiRobotAInfo] : (string | [string, string])[] +>...multiRobotAInfo : string | [string, string] +>multiRobotAInfo : (string | [string, string])[] +>[multiRobotA, multiRobotB] : [string, [string, string]][] +>multiRobotA : [string, [string, string]] +>multiRobotB : [string, [string, string]] + + console.log(multiRobotAInfo); +>console.log(multiRobotAInfo) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>multiRobotAInfo : (string | [string, string])[] +} diff --git a/tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPattern2.ts b/tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPattern2.ts new file mode 100644 index 00000000000..365a030f8e9 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPattern2.ts @@ -0,0 +1,101 @@ +// @sourcemap: true +declare var console: { + log(msg: any): void; +} +type Robot = [number, string, string]; +type MultiSkilledRobot = [string, [string, string]]; + +let robotA: Robot = [1, "mower", "mowing"]; +let robotB: Robot = [2, "trimmer", "trimming"]; +let robots = [robotA, robotB]; +function getRobots() { + return robots; +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +let multiRobots = [multiRobotA, multiRobotB]; +function getMultiRobots() { + return multiRobots; +} + +let nameA: string, primarySkillA: string, secondarySkillA: string; +let numberB: number, nameB: string; +let numberA2: number, nameA2: string, skillA2: string, nameMA: string; +let numberA3: number, robotAInfo: (number | string)[], multiRobotAInfo: (string | [string, string])[]; + +for ([, nameA] of robots) { + console.log(nameA); +} +for ([, nameA] of getRobots()) { + console.log(nameA); +} +for ([, nameA] of [robotA, robotB]) { + console.log(nameA); +} +for ([, [primarySkillA, secondarySkillA]] of multiRobots) { + console.log(primarySkillA); +} +for ([, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + console.log(primarySkillA); +} +for ([, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + console.log(primarySkillA); +} + +for ([numberB] of robots) { + console.log(numberB); +} +for ([numberB] of getRobots()) { + console.log(numberB); +} +for ([numberB] of [robotA, robotB]) { + console.log(numberB); +} +for ([nameB] of multiRobots) { + console.log(nameB); +} +for ([nameB] of getMultiRobots()) { + console.log(nameB); +} +for ([nameB] of [multiRobotA, multiRobotB]) { + console.log(nameB); +} + +for ([numberA2, nameA2, skillA2] of robots) { + console.log(nameA2); +} +for ([numberA2, nameA2, skillA2] of getRobots()) { + console.log(nameA2); +} +for ([numberA2, nameA2, skillA2] of [robotA, robotB]) { + console.log(nameA2); +} +for ([nameMA, [primarySkillA, secondarySkillA]] of multiRobots) { + console.log(nameMA); +} +for ([nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + console.log(nameMA); +} +for ([nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + console.log(nameMA); +} + +for ([numberA3, ...robotAInfo] of robots) { + console.log(numberA3); +} +for ([numberA3, ...robotAInfo] of getRobots()) { + console.log(numberA3); +} +for ([numberA3, ...robotAInfo] of [robotA, robotB]) { + console.log(numberA3); +} +for ([...multiRobotAInfo] of multiRobots) { + console.log(multiRobotAInfo); +} +for ([...multiRobotAInfo] of getMultiRobots()) { + console.log(multiRobotAInfo); +} +for ([...multiRobotAInfo] of [multiRobotA, multiRobotB]) { + console.log(multiRobotAInfo); +} \ No newline at end of file From ac4b2bd7951fb5f762c86199174327506fa69c13 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 8 Dec 2015 17:07:07 -0800 Subject: [PATCH 033/209] Test case for "For" that initializes vars using array binding pattern --- ...ionDestructuringForArrayBindingPattern2.js | 189 + ...estructuringForArrayBindingPattern2.js.map | 2 + ...uringForArrayBindingPattern2.sourcemap.txt | 3037 +++++++++++++++++ ...structuringForArrayBindingPattern2.symbols | 390 +++ ...DestructuringForArrayBindingPattern2.types | 684 ++++ ...ionDestructuringForArrayBindingPattern2.ts | 99 + 6 files changed, 4401 insertions(+) create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.types create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPattern2.ts diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.js b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.js new file mode 100644 index 00000000000..aad4d79ddd1 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.js @@ -0,0 +1,189 @@ +//// [sourceMapValidationDestructuringForArrayBindingPattern2.ts] +declare var console: { + log(msg: any): void; +} +type Robot = [number, string, string]; +type MultiSkilledRobot = [string, [string, string]]; + +let robotA: Robot = [1, "mower", "mowing"]; +function getRobot() { + return robotA; +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +function getMultiRobot() { + return multiRobotA; +} + +let nameA: string, primarySkillA: string, secondarySkillA: string; +let numberB: number, nameB: string; +let numberA2: number, nameA2: string, skillA2: string, nameMA: string; +let numberA3: number, robotAInfo: (number | string)[], multiRobotAInfo: (string | [string, string])[]; +let i: number; + +for ([, nameA] = robotA, i = 0; i < 1; i++) { + console.log(nameA); +} +for ([, nameA] = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for ([, nameA] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(nameA); +} +for ([, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for ([, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for ([, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(primarySkillA); +} + +for ([numberB] = robotA, i = 0; i < 1; i++) { + console.log(numberB); +} +for ([numberB] = getRobot(), i = 0; i < 1; i++) { + console.log(numberB); +} +for ([numberB] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(numberB); +} +for ([nameB] = multiRobotA, i = 0; i < 1; i++) { + console.log(nameB); +} +for ([nameB] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(nameB); +} +for ([nameB] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(nameB); +} + +for ([numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { + console.log(nameA2); +} +for ([numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { + console.log(nameA2); +} +for ([numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(nameA2); +} +for ([nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + console.log(nameMA); +} +for ([nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(nameMA); +} +for ([nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(nameMA); +} + +for ([numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + console.log(numberA3); +} +for ([numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + console.log(numberA3); +} +for ([numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(numberA3); +} +for ([...multiRobotAInfo] = multiRobotA, i = 0; i < 1; i++) { + console.log(multiRobotAInfo); +} +for ([...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(multiRobotAInfo); +} +for ([...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(multiRobotAInfo); +} + +//// [sourceMapValidationDestructuringForArrayBindingPattern2.js] +var robotA = [1, "mower", "mowing"]; +function getRobot() { + return robotA; +} +var multiRobotA = ["mower", ["mowing", ""]]; +var multiRobotB = ["trimmer", ["trimming", "edging"]]; +function getMultiRobot() { + return multiRobotA; +} +var nameA, primarySkillA, secondarySkillA; +var numberB, nameB; +var numberA2, nameA2, skillA2, nameMA; +var numberA3, robotAInfo, multiRobotAInfo; +var i; +for ((nameA = robotA[1], robotA), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_a = getRobot(), nameA = _a[1], _a), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_b = [2, "trimmer", "trimming"], nameA = _b[1], _b), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_c = multiRobotA[1], primarySkillA = _c[0], secondarySkillA = _c[1], multiRobotA), i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for ((_d = getMultiRobot(), _e = _d[1], primarySkillA = _e[0], secondarySkillA = _e[1], _d), i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for ((_f = ["trimmer", ["trimming", "edging"]], _g = _f[1], primarySkillA = _g[0], secondarySkillA = _g[1], _f), i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for ((numberB = robotA[0], robotA), i = 0; i < 1; i++) { + console.log(numberB); +} +for ((_h = getRobot(), numberB = _h[0], _h), i = 0; i < 1; i++) { + console.log(numberB); +} +for ((_j = [2, "trimmer", "trimming"], numberB = _j[0], _j), i = 0; i < 1; i++) { + console.log(numberB); +} +for ((nameB = multiRobotA[0], multiRobotA), i = 0; i < 1; i++) { + console.log(nameB); +} +for ((_k = getMultiRobot(), nameB = _k[0], _k), i = 0; i < 1; i++) { + console.log(nameB); +} +for ((_l = ["trimmer", ["trimming", "edging"]], nameB = _l[0], _l), i = 0; i < 1; i++) { + console.log(nameB); +} +for ((numberA2 = robotA[0], nameA2 = robotA[1], skillA2 = robotA[2], robotA), i = 0; i < 1; i++) { + console.log(nameA2); +} +for ((_m = getRobot(), numberA2 = _m[0], nameA2 = _m[1], skillA2 = _m[2], _m), i = 0; i < 1; i++) { + console.log(nameA2); +} +for ((_o = [2, "trimmer", "trimming"], numberA2 = _o[0], nameA2 = _o[1], skillA2 = _o[2], _o), i = 0; i < 1; i++) { + console.log(nameA2); +} +for ((nameMA = multiRobotA[0], _p = multiRobotA[1], primarySkillA = _p[0], secondarySkillA = _p[1], multiRobotA), i = 0; i < 1; i++) { + console.log(nameMA); +} +for ((_q = getMultiRobot(), nameMA = _q[0], _r = _q[1], primarySkillA = _r[0], secondarySkillA = _r[1], _q), i = 0; i < 1; i++) { + console.log(nameMA); +} +for ((_s = ["trimmer", ["trimming", "edging"]], nameMA = _s[0], _t = _s[1], primarySkillA = _t[0], secondarySkillA = _t[1], _s), i = 0; i < 1; i++) { + console.log(nameMA); +} +for ((numberA3 = robotA[0], robotAInfo = robotA.slice(1), robotA), i = 0; i < 1; i++) { + console.log(numberA3); +} +for ((_u = getRobot(), numberA3 = _u[0], robotAInfo = _u.slice(1), _u), i = 0; i < 1; i++) { + console.log(numberA3); +} +for ((_v = [2, "trimmer", "trimming"], numberA3 = _v[0], robotAInfo = _v.slice(1), _v), i = 0; i < 1; i++) { + console.log(numberA3); +} +for ((multiRobotAInfo = multiRobotA.slice(0), multiRobotA), i = 0; i < 1; i++) { + console.log(multiRobotAInfo); +} +for ((_w = getMultiRobot(), multiRobotAInfo = _w.slice(0), _w), i = 0; i < 1; i++) { + console.log(multiRobotAInfo); +} +for ((_x = ["trimmer", ["trimming", "edging"]], multiRobotAInfo = _x.slice(0), _x), i = 0; i < 1; i++) { + console.log(multiRobotAInfo); +} +var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x; +//# sourceMappingURL=sourceMapValidationDestructuringForArrayBindingPattern2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.js.map new file mode 100644 index 00000000000..a007a60e41f --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringForArrayBindingPattern2.js.map] +{"version":3,"file":"sourceMapValidationDestructuringForArrayBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForArrayBindingPattern2.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED,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;AACzE;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,IAAI,KAAa,EAAE,aAAqB,EAAE,eAAuB,CAAC;AAClE,IAAI,OAAe,EAAE,KAAa,CAAC;AACnC,IAAI,QAAgB,EAAE,MAAc,EAAE,OAAe,EAAE,MAAc,CAAC;AACtE,IAAI,QAAgB,EAAE,UAA+B,EAAE,eAA8C,CAAC;AACtG,IAAI,CAAS,CAAC;AAEd,GAAG,CAAC,CAAC,CAAG,iBAAK,EAAI,MAAM,CAAA,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACzC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,eAAsB,EAAnB,aAAK,KAAc,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC7C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAA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AAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC7D,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,+BAA6D,EAA5D,gBAAQ,EAAE,wBAAa,KAAqC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACpF,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,sCAAkC,EAAX,WAAW,CAAA,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACzD,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,oBAAsC,EAAtC,6BAAsC,KAAA,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC7D,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,wCAA6E,EAA7E,6BAA6E,KAAA,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACpG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.sourcemap.txt new file mode 100644 index 00000000000..87d063f6ca5 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.sourcemap.txt @@ -0,0 +1,3037 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringForArrayBindingPattern2.js +mapUrl: sourceMapValidationDestructuringForArrayBindingPattern2.js.map +sourceRoot: +sources: sourceMapValidationDestructuringForArrayBindingPattern2.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPattern2.js +sourceFile:sourceMapValidationDestructuringForArrayBindingPattern2.ts +------------------------------------------------------------------- +>>>var robotA = [1, "mower", "mowing"]; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^^^^ +11> ^ +12> ^ +1 >declare var console: { + > log(msg: any): void; + >} + >type Robot = [number, string, string]; + >type MultiSkilledRobot = [string, [string, string]]; + > + > +2 >let +3 > robotA +4 > : Robot = +5 > [ +6 > 1 +7 > , +8 > "mower" +9 > , +10> "mowing" +11> ] +12> ; +1 >Emitted(1, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(7, 5) + SourceIndex(0) +3 >Emitted(1, 11) Source(7, 11) + SourceIndex(0) +4 >Emitted(1, 14) Source(7, 21) + SourceIndex(0) +5 >Emitted(1, 15) Source(7, 22) + SourceIndex(0) +6 >Emitted(1, 16) Source(7, 23) + SourceIndex(0) +7 >Emitted(1, 18) Source(7, 25) + SourceIndex(0) +8 >Emitted(1, 25) Source(7, 32) + SourceIndex(0) +9 >Emitted(1, 27) Source(7, 34) + SourceIndex(0) +10>Emitted(1, 35) Source(7, 42) + SourceIndex(0) +11>Emitted(1, 36) Source(7, 43) + SourceIndex(0) +12>Emitted(1, 37) Source(7, 44) + SourceIndex(0) +--- +>>>function getRobot() { +1 > +2 >^^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(2, 1) Source(8, 1) + SourceIndex(0) +--- +>>> return robotA; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +1->function getRobot() { + > +2 > return +3 > +4 > robotA +5 > ; +1->Emitted(3, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(3, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(3, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(3, 18) Source(9, 18) + SourceIndex(0) +5 >Emitted(3, 19) Source(9, 19) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(4, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(4, 2) Source(10, 2) + SourceIndex(0) +--- +>>>var multiRobotA = ["mower", ["mowing", ""]]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^ +10> ^^ +11> ^^ +12> ^ +13> ^ +14> ^ +15> ^^^^^^^^^^^-> +1-> + > + > +2 >let +3 > multiRobotA +4 > : MultiSkilledRobot = +5 > [ +6 > "mower" +7 > , +8 > [ +9 > "mowing" +10> , +11> "" +12> ] +13> ] +14> ; +1->Emitted(5, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(5, 5) Source(12, 5) + SourceIndex(0) +3 >Emitted(5, 16) Source(12, 16) + SourceIndex(0) +4 >Emitted(5, 19) Source(12, 38) + SourceIndex(0) +5 >Emitted(5, 20) Source(12, 39) + SourceIndex(0) +6 >Emitted(5, 27) Source(12, 46) + SourceIndex(0) +7 >Emitted(5, 29) Source(12, 48) + SourceIndex(0) +8 >Emitted(5, 30) Source(12, 49) + SourceIndex(0) +9 >Emitted(5, 38) Source(12, 57) + SourceIndex(0) +10>Emitted(5, 40) Source(12, 59) + SourceIndex(0) +11>Emitted(5, 42) Source(12, 61) + SourceIndex(0) +12>Emitted(5, 43) Source(12, 62) + SourceIndex(0) +13>Emitted(5, 44) Source(12, 63) + SourceIndex(0) +14>Emitted(5, 45) Source(12, 64) + SourceIndex(0) +--- +>>>var multiRobotB = ["trimmer", ["trimming", "edging"]]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^ +12> ^ +13> ^ +14> ^ +1-> + > +2 >let +3 > multiRobotB +4 > : MultiSkilledRobot = +5 > [ +6 > "trimmer" +7 > , +8 > [ +9 > "trimming" +10> , +11> "edging" +12> ] +13> ] +14> ; +1->Emitted(6, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(6, 5) Source(13, 5) + SourceIndex(0) +3 >Emitted(6, 16) Source(13, 16) + SourceIndex(0) +4 >Emitted(6, 19) Source(13, 38) + SourceIndex(0) +5 >Emitted(6, 20) Source(13, 39) + SourceIndex(0) +6 >Emitted(6, 29) Source(13, 48) + SourceIndex(0) +7 >Emitted(6, 31) Source(13, 50) + SourceIndex(0) +8 >Emitted(6, 32) Source(13, 51) + SourceIndex(0) +9 >Emitted(6, 42) Source(13, 61) + SourceIndex(0) +10>Emitted(6, 44) Source(13, 63) + SourceIndex(0) +11>Emitted(6, 52) Source(13, 71) + SourceIndex(0) +12>Emitted(6, 53) Source(13, 72) + SourceIndex(0) +13>Emitted(6, 54) Source(13, 73) + SourceIndex(0) +14>Emitted(6, 55) Source(13, 74) + SourceIndex(0) +--- +>>>function getMultiRobot() { +1 > +2 >^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(7, 1) Source(14, 1) + SourceIndex(0) +--- +>>> return multiRobotA; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^ +5 > ^ +1->function getMultiRobot() { + > +2 > return +3 > +4 > multiRobotA +5 > ; +1->Emitted(8, 5) Source(15, 5) + SourceIndex(0) +2 >Emitted(8, 11) Source(15, 11) + SourceIndex(0) +3 >Emitted(8, 12) Source(15, 12) + SourceIndex(0) +4 >Emitted(8, 23) Source(15, 23) + SourceIndex(0) +5 >Emitted(8, 24) Source(15, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(9, 1) Source(16, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(16, 2) + SourceIndex(0) +--- +>>>var nameA, primarySkillA, secondarySkillA; +1-> +2 >^^^^ +3 > ^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^ +8 > ^ +1-> + > + > +2 >let +3 > nameA: string +4 > , +5 > primarySkillA: string +6 > , +7 > secondarySkillA: string +8 > ; +1->Emitted(10, 1) Source(18, 1) + SourceIndex(0) +2 >Emitted(10, 5) Source(18, 5) + SourceIndex(0) +3 >Emitted(10, 10) Source(18, 18) + SourceIndex(0) +4 >Emitted(10, 12) Source(18, 20) + SourceIndex(0) +5 >Emitted(10, 25) Source(18, 41) + SourceIndex(0) +6 >Emitted(10, 27) Source(18, 43) + SourceIndex(0) +7 >Emitted(10, 42) Source(18, 66) + SourceIndex(0) +8 >Emitted(10, 43) Source(18, 67) + SourceIndex(0) +--- +>>>var numberB, nameB; +1 > +2 >^^^^ +3 > ^^^^^^^ +4 > ^^ +5 > ^^^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >let +3 > numberB: number +4 > , +5 > nameB: string +6 > ; +1 >Emitted(11, 1) Source(19, 1) + SourceIndex(0) +2 >Emitted(11, 5) Source(19, 5) + SourceIndex(0) +3 >Emitted(11, 12) Source(19, 20) + SourceIndex(0) +4 >Emitted(11, 14) Source(19, 22) + SourceIndex(0) +5 >Emitted(11, 19) Source(19, 35) + SourceIndex(0) +6 >Emitted(11, 20) Source(19, 36) + SourceIndex(0) +--- +>>>var numberA2, nameA2, skillA2, nameMA; +1-> +2 >^^^^ +3 > ^^^^^^^^ +4 > ^^ +5 > ^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^ +9 > ^^^^^^ +10> ^ +11> ^^^^^-> +1-> + > +2 >let +3 > numberA2: number +4 > , +5 > nameA2: string +6 > , +7 > skillA2: string +8 > , +9 > nameMA: string +10> ; +1->Emitted(12, 1) Source(20, 1) + SourceIndex(0) +2 >Emitted(12, 5) Source(20, 5) + SourceIndex(0) +3 >Emitted(12, 13) Source(20, 21) + SourceIndex(0) +4 >Emitted(12, 15) Source(20, 23) + SourceIndex(0) +5 >Emitted(12, 21) Source(20, 37) + SourceIndex(0) +6 >Emitted(12, 23) Source(20, 39) + SourceIndex(0) +7 >Emitted(12, 30) Source(20, 54) + SourceIndex(0) +8 >Emitted(12, 32) Source(20, 56) + SourceIndex(0) +9 >Emitted(12, 38) Source(20, 70) + SourceIndex(0) +10>Emitted(12, 39) Source(20, 71) + SourceIndex(0) +--- +>>>var numberA3, robotAInfo, multiRobotAInfo; +1-> +2 >^^^^ +3 > ^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^ +8 > ^ +1-> + > +2 >let +3 > numberA3: number +4 > , +5 > robotAInfo: (number | string)[] +6 > , +7 > multiRobotAInfo: (string | [string, string])[] +8 > ; +1->Emitted(13, 1) Source(21, 1) + SourceIndex(0) +2 >Emitted(13, 5) Source(21, 5) + SourceIndex(0) +3 >Emitted(13, 13) Source(21, 21) + SourceIndex(0) +4 >Emitted(13, 15) Source(21, 23) + SourceIndex(0) +5 >Emitted(13, 25) Source(21, 54) + SourceIndex(0) +6 >Emitted(13, 27) Source(21, 56) + SourceIndex(0) +7 >Emitted(13, 42) Source(21, 102) + SourceIndex(0) +8 >Emitted(13, 43) Source(21, 103) + SourceIndex(0) +--- +>>>var i; +1 > +2 >^^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >let +3 > i: number +4 > ; +1 >Emitted(14, 1) Source(22, 1) + SourceIndex(0) +2 >Emitted(14, 5) Source(22, 5) + SourceIndex(0) +3 >Emitted(14, 6) Source(22, 14) + SourceIndex(0) +4 >Emitted(14, 7) Source(22, 15) + SourceIndex(0) +--- +>>>for ((nameA = robotA[1], robotA), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^ +9 > ^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ +1-> + > + > +2 >for +3 > +4 > ( +5 > [, +6 > nameA +7 > ] = +8 > robotA +9 > +10> , +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { +1->Emitted(15, 1) Source(24, 1) + SourceIndex(0) +2 >Emitted(15, 4) Source(24, 4) + SourceIndex(0) +3 >Emitted(15, 5) Source(24, 5) + SourceIndex(0) +4 >Emitted(15, 6) Source(24, 6) + SourceIndex(0) +5 >Emitted(15, 7) Source(24, 9) + SourceIndex(0) +6 >Emitted(15, 24) Source(24, 14) + SourceIndex(0) +7 >Emitted(15, 26) Source(24, 18) + SourceIndex(0) +8 >Emitted(15, 32) Source(24, 24) + SourceIndex(0) +9 >Emitted(15, 33) Source(24, 24) + SourceIndex(0) +10>Emitted(15, 35) Source(24, 26) + SourceIndex(0) +11>Emitted(15, 36) Source(24, 27) + SourceIndex(0) +12>Emitted(15, 39) Source(24, 30) + SourceIndex(0) +13>Emitted(15, 40) Source(24, 31) + SourceIndex(0) +14>Emitted(15, 42) Source(24, 33) + SourceIndex(0) +15>Emitted(15, 43) Source(24, 34) + SourceIndex(0) +16>Emitted(15, 46) Source(24, 37) + SourceIndex(0) +17>Emitted(15, 47) Source(24, 38) + SourceIndex(0) +18>Emitted(15, 49) Source(24, 40) + SourceIndex(0) +19>Emitted(15, 50) Source(24, 41) + SourceIndex(0) +20>Emitted(15, 52) Source(24, 43) + SourceIndex(0) +21>Emitted(15, 54) Source(24, 45) + SourceIndex(0) +22>Emitted(15, 55) Source(24, 46) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(16, 5) Source(25, 5) + SourceIndex(0) +2 >Emitted(16, 12) Source(25, 12) + SourceIndex(0) +3 >Emitted(16, 13) Source(25, 13) + SourceIndex(0) +4 >Emitted(16, 16) Source(25, 16) + SourceIndex(0) +5 >Emitted(16, 17) Source(25, 17) + SourceIndex(0) +6 >Emitted(16, 22) Source(25, 22) + SourceIndex(0) +7 >Emitted(16, 23) Source(25, 23) + SourceIndex(0) +8 >Emitted(16, 24) Source(25, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(17, 1) Source(26, 1) + SourceIndex(0) +2 >Emitted(17, 2) Source(26, 2) + SourceIndex(0) +--- +>>>for ((_a = getRobot(), nameA = _a[1], _a), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^ +9 > ^^^^^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [, nameA] = getRobot() +7 > +8 > nameA +9 > ] = getRobot() +10> , +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { +1->Emitted(18, 1) Source(27, 1) + SourceIndex(0) +2 >Emitted(18, 4) Source(27, 4) + SourceIndex(0) +3 >Emitted(18, 5) Source(27, 5) + SourceIndex(0) +4 >Emitted(18, 6) Source(27, 6) + SourceIndex(0) +5 >Emitted(18, 7) Source(27, 6) + SourceIndex(0) +6 >Emitted(18, 22) Source(27, 28) + SourceIndex(0) +7 >Emitted(18, 24) Source(27, 9) + SourceIndex(0) +8 >Emitted(18, 37) Source(27, 14) + SourceIndex(0) +9 >Emitted(18, 42) Source(27, 28) + SourceIndex(0) +10>Emitted(18, 44) Source(27, 30) + SourceIndex(0) +11>Emitted(18, 45) Source(27, 31) + SourceIndex(0) +12>Emitted(18, 48) Source(27, 34) + SourceIndex(0) +13>Emitted(18, 49) Source(27, 35) + SourceIndex(0) +14>Emitted(18, 51) Source(27, 37) + SourceIndex(0) +15>Emitted(18, 52) Source(27, 38) + SourceIndex(0) +16>Emitted(18, 55) Source(27, 41) + SourceIndex(0) +17>Emitted(18, 56) Source(27, 42) + SourceIndex(0) +18>Emitted(18, 58) Source(27, 44) + SourceIndex(0) +19>Emitted(18, 59) Source(27, 45) + SourceIndex(0) +20>Emitted(18, 61) Source(27, 47) + SourceIndex(0) +21>Emitted(18, 63) Source(27, 49) + SourceIndex(0) +22>Emitted(18, 64) Source(27, 50) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(19, 5) Source(28, 5) + SourceIndex(0) +2 >Emitted(19, 12) Source(28, 12) + SourceIndex(0) +3 >Emitted(19, 13) Source(28, 13) + SourceIndex(0) +4 >Emitted(19, 16) Source(28, 16) + SourceIndex(0) +5 >Emitted(19, 17) Source(28, 17) + SourceIndex(0) +6 >Emitted(19, 22) Source(28, 22) + SourceIndex(0) +7 >Emitted(19, 23) Source(28, 23) + SourceIndex(0) +8 >Emitted(19, 24) Source(28, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(20, 1) Source(29, 1) + SourceIndex(0) +2 >Emitted(20, 2) Source(29, 2) + SourceIndex(0) +--- +>>>for ((_b = [2, "trimmer", "trimming"], nameA = _b[1], _b), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^ +9 > ^^^^^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [, nameA] = [2, "trimmer", "trimming"] +7 > +8 > nameA +9 > ] = [2, "trimmer", "trimming"] +10> , +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { +1->Emitted(21, 1) Source(30, 1) + SourceIndex(0) +2 >Emitted(21, 4) Source(30, 4) + SourceIndex(0) +3 >Emitted(21, 5) Source(30, 5) + SourceIndex(0) +4 >Emitted(21, 6) Source(30, 6) + SourceIndex(0) +5 >Emitted(21, 7) Source(30, 6) + SourceIndex(0) +6 >Emitted(21, 38) Source(30, 44) + SourceIndex(0) +7 >Emitted(21, 40) Source(30, 9) + SourceIndex(0) +8 >Emitted(21, 53) Source(30, 14) + SourceIndex(0) +9 >Emitted(21, 58) Source(30, 44) + SourceIndex(0) +10>Emitted(21, 60) Source(30, 46) + SourceIndex(0) +11>Emitted(21, 61) Source(30, 47) + SourceIndex(0) +12>Emitted(21, 64) Source(30, 50) + SourceIndex(0) +13>Emitted(21, 65) Source(30, 51) + SourceIndex(0) +14>Emitted(21, 67) Source(30, 53) + SourceIndex(0) +15>Emitted(21, 68) Source(30, 54) + SourceIndex(0) +16>Emitted(21, 71) Source(30, 57) + SourceIndex(0) +17>Emitted(21, 72) Source(30, 58) + SourceIndex(0) +18>Emitted(21, 74) Source(30, 60) + SourceIndex(0) +19>Emitted(21, 75) Source(30, 61) + SourceIndex(0) +20>Emitted(21, 77) Source(30, 63) + SourceIndex(0) +21>Emitted(21, 79) Source(30, 65) + SourceIndex(0) +22>Emitted(21, 80) Source(30, 66) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(22, 5) Source(31, 5) + SourceIndex(0) +2 >Emitted(22, 12) Source(31, 12) + SourceIndex(0) +3 >Emitted(22, 13) Source(31, 13) + SourceIndex(0) +4 >Emitted(22, 16) Source(31, 16) + SourceIndex(0) +5 >Emitted(22, 17) Source(31, 17) + SourceIndex(0) +6 >Emitted(22, 22) Source(31, 22) + SourceIndex(0) +7 >Emitted(22, 23) Source(31, 23) + SourceIndex(0) +8 >Emitted(22, 24) Source(31, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(23, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(23, 2) Source(32, 2) + SourceIndex(0) +--- +>>>for ((_c = multiRobotA[1], primarySkillA = _c[0], secondarySkillA = _c[1], multiRobotA), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^^ +21> ^ +22> ^^ +23> ^ +24> ^^ +25> ^^ +26> ^ +1-> + > +2 >for +3 > +4 > ( +5 > [, +6 > [primarySkillA, secondarySkillA] +7 > +8 > primarySkillA +9 > , +10> secondarySkillA +11> ]] = +12> multiRobotA +13> +14> , +15> i +16> = +17> 0 +18> ; +19> i +20> < +21> 1 +22> ; +23> i +24> ++ +25> ) +26> { +1->Emitted(24, 1) Source(33, 1) + SourceIndex(0) +2 >Emitted(24, 4) Source(33, 4) + SourceIndex(0) +3 >Emitted(24, 5) Source(33, 5) + SourceIndex(0) +4 >Emitted(24, 6) Source(33, 6) + SourceIndex(0) +5 >Emitted(24, 7) Source(33, 9) + SourceIndex(0) +6 >Emitted(24, 26) Source(33, 41) + SourceIndex(0) +7 >Emitted(24, 28) Source(33, 10) + SourceIndex(0) +8 >Emitted(24, 49) Source(33, 23) + SourceIndex(0) +9 >Emitted(24, 51) Source(33, 25) + SourceIndex(0) +10>Emitted(24, 74) Source(33, 40) + SourceIndex(0) +11>Emitted(24, 76) Source(33, 45) + SourceIndex(0) +12>Emitted(24, 87) Source(33, 56) + SourceIndex(0) +13>Emitted(24, 88) Source(33, 56) + SourceIndex(0) +14>Emitted(24, 90) Source(33, 58) + SourceIndex(0) +15>Emitted(24, 91) Source(33, 59) + SourceIndex(0) +16>Emitted(24, 94) Source(33, 62) + SourceIndex(0) +17>Emitted(24, 95) Source(33, 63) + SourceIndex(0) +18>Emitted(24, 97) Source(33, 65) + SourceIndex(0) +19>Emitted(24, 98) Source(33, 66) + SourceIndex(0) +20>Emitted(24, 101) Source(33, 69) + SourceIndex(0) +21>Emitted(24, 102) Source(33, 70) + SourceIndex(0) +22>Emitted(24, 104) Source(33, 72) + SourceIndex(0) +23>Emitted(24, 105) Source(33, 73) + SourceIndex(0) +24>Emitted(24, 107) Source(33, 75) + SourceIndex(0) +25>Emitted(24, 109) Source(33, 77) + SourceIndex(0) +26>Emitted(24, 110) Source(33, 78) + SourceIndex(0) +--- +>>> console.log(primarySkillA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primarySkillA +7 > ) +8 > ; +1 >Emitted(25, 5) Source(34, 5) + SourceIndex(0) +2 >Emitted(25, 12) Source(34, 12) + SourceIndex(0) +3 >Emitted(25, 13) Source(34, 13) + SourceIndex(0) +4 >Emitted(25, 16) Source(34, 16) + SourceIndex(0) +5 >Emitted(25, 17) Source(34, 17) + SourceIndex(0) +6 >Emitted(25, 30) Source(34, 30) + SourceIndex(0) +7 >Emitted(25, 31) Source(34, 31) + SourceIndex(0) +8 >Emitted(25, 32) Source(34, 32) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(26, 1) Source(35, 1) + SourceIndex(0) +2 >Emitted(26, 2) Source(35, 2) + SourceIndex(0) +--- +>>>for ((_d = getMultiRobot(), _e = _d[1], primarySkillA = _e[0], secondarySkillA = _e[1], _d), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^^^^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^^ +21> ^ +22> ^^ +23> ^ +24> ^^ +25> ^^ +26> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [, [primarySkillA, secondarySkillA]] = getMultiRobot() +7 > +8 > [primarySkillA, secondarySkillA] +9 > +10> primarySkillA +11> , +12> secondarySkillA +13> ]] = getMultiRobot() +14> , +15> i +16> = +17> 0 +18> ; +19> i +20> < +21> 1 +22> ; +23> i +24> ++ +25> ) +26> { +1->Emitted(27, 1) Source(36, 1) + SourceIndex(0) +2 >Emitted(27, 4) Source(36, 4) + SourceIndex(0) +3 >Emitted(27, 5) Source(36, 5) + SourceIndex(0) +4 >Emitted(27, 6) Source(36, 6) + SourceIndex(0) +5 >Emitted(27, 7) Source(36, 6) + SourceIndex(0) +6 >Emitted(27, 27) Source(36, 60) + SourceIndex(0) +7 >Emitted(27, 29) Source(36, 9) + SourceIndex(0) +8 >Emitted(27, 39) Source(36, 41) + SourceIndex(0) +9 >Emitted(27, 41) Source(36, 10) + SourceIndex(0) +10>Emitted(27, 62) Source(36, 23) + SourceIndex(0) +11>Emitted(27, 64) Source(36, 25) + SourceIndex(0) +12>Emitted(27, 87) Source(36, 40) + SourceIndex(0) +13>Emitted(27, 92) Source(36, 60) + SourceIndex(0) +14>Emitted(27, 94) Source(36, 62) + SourceIndex(0) +15>Emitted(27, 95) Source(36, 63) + SourceIndex(0) +16>Emitted(27, 98) Source(36, 66) + SourceIndex(0) +17>Emitted(27, 99) Source(36, 67) + SourceIndex(0) +18>Emitted(27, 101) Source(36, 69) + SourceIndex(0) +19>Emitted(27, 102) Source(36, 70) + SourceIndex(0) +20>Emitted(27, 105) Source(36, 73) + SourceIndex(0) +21>Emitted(27, 106) Source(36, 74) + SourceIndex(0) +22>Emitted(27, 108) Source(36, 76) + SourceIndex(0) +23>Emitted(27, 109) Source(36, 77) + SourceIndex(0) +24>Emitted(27, 111) Source(36, 79) + SourceIndex(0) +25>Emitted(27, 113) Source(36, 81) + SourceIndex(0) +26>Emitted(27, 114) Source(36, 82) + SourceIndex(0) +--- +>>> console.log(primarySkillA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primarySkillA +7 > ) +8 > ; +1 >Emitted(28, 5) Source(37, 5) + SourceIndex(0) +2 >Emitted(28, 12) Source(37, 12) + SourceIndex(0) +3 >Emitted(28, 13) Source(37, 13) + SourceIndex(0) +4 >Emitted(28, 16) Source(37, 16) + SourceIndex(0) +5 >Emitted(28, 17) Source(37, 17) + SourceIndex(0) +6 >Emitted(28, 30) Source(37, 30) + SourceIndex(0) +7 >Emitted(28, 31) Source(37, 31) + SourceIndex(0) +8 >Emitted(28, 32) Source(37, 32) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(29, 1) Source(38, 1) + SourceIndex(0) +2 >Emitted(29, 2) Source(38, 2) + SourceIndex(0) +--- +>>>for ((_f = ["trimmer", ["trimming", "edging"]], _g = _f[1], primarySkillA = _g[0], secondarySkillA = _g[1], _f), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^^^^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^^ +21> ^ +22> ^^ +23> ^ +24> ^^ +25> ^^ +26> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]] +7 > +8 > [primarySkillA, secondarySkillA] +9 > +10> primarySkillA +11> , +12> secondarySkillA +13> ]] = ["trimmer", ["trimming", "edging"]] +14> , +15> i +16> = +17> 0 +18> ; +19> i +20> < +21> 1 +22> ; +23> i +24> ++ +25> ) +26> { +1->Emitted(30, 1) Source(39, 1) + SourceIndex(0) +2 >Emitted(30, 4) Source(39, 4) + SourceIndex(0) +3 >Emitted(30, 5) Source(39, 5) + SourceIndex(0) +4 >Emitted(30, 6) Source(39, 6) + SourceIndex(0) +5 >Emitted(30, 7) Source(39, 6) + SourceIndex(0) +6 >Emitted(30, 47) Source(39, 80) + SourceIndex(0) +7 >Emitted(30, 49) Source(39, 9) + SourceIndex(0) +8 >Emitted(30, 59) Source(39, 41) + SourceIndex(0) +9 >Emitted(30, 61) Source(39, 10) + SourceIndex(0) +10>Emitted(30, 82) Source(39, 23) + SourceIndex(0) +11>Emitted(30, 84) Source(39, 25) + SourceIndex(0) +12>Emitted(30, 107) Source(39, 40) + SourceIndex(0) +13>Emitted(30, 112) Source(39, 80) + SourceIndex(0) +14>Emitted(30, 114) Source(39, 82) + SourceIndex(0) +15>Emitted(30, 115) Source(39, 83) + SourceIndex(0) +16>Emitted(30, 118) Source(39, 86) + SourceIndex(0) +17>Emitted(30, 119) Source(39, 87) + SourceIndex(0) +18>Emitted(30, 121) Source(39, 89) + SourceIndex(0) +19>Emitted(30, 122) Source(39, 90) + SourceIndex(0) +20>Emitted(30, 125) Source(39, 93) + SourceIndex(0) +21>Emitted(30, 126) Source(39, 94) + SourceIndex(0) +22>Emitted(30, 128) Source(39, 96) + SourceIndex(0) +23>Emitted(30, 129) Source(39, 97) + SourceIndex(0) +24>Emitted(30, 131) Source(39, 99) + SourceIndex(0) +25>Emitted(30, 133) Source(39, 101) + SourceIndex(0) +26>Emitted(30, 134) Source(39, 102) + SourceIndex(0) +--- +>>> console.log(primarySkillA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primarySkillA +7 > ) +8 > ; +1 >Emitted(31, 5) Source(40, 5) + SourceIndex(0) +2 >Emitted(31, 12) Source(40, 12) + SourceIndex(0) +3 >Emitted(31, 13) Source(40, 13) + SourceIndex(0) +4 >Emitted(31, 16) Source(40, 16) + SourceIndex(0) +5 >Emitted(31, 17) Source(40, 17) + SourceIndex(0) +6 >Emitted(31, 30) Source(40, 30) + SourceIndex(0) +7 >Emitted(31, 31) Source(40, 31) + SourceIndex(0) +8 >Emitted(31, 32) Source(40, 32) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(32, 1) Source(41, 1) + SourceIndex(0) +2 >Emitted(32, 2) Source(41, 2) + SourceIndex(0) +--- +>>>for ((numberB = robotA[0], robotA), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^ +9 > ^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ +1-> + > + > +2 >for +3 > +4 > ( +5 > +6 > [numberB] = robotA +7 > +8 > robotA +9 > +10> , +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { +1->Emitted(33, 1) Source(43, 1) + SourceIndex(0) +2 >Emitted(33, 4) Source(43, 4) + SourceIndex(0) +3 >Emitted(33, 5) Source(43, 5) + SourceIndex(0) +4 >Emitted(33, 6) Source(43, 6) + SourceIndex(0) +5 >Emitted(33, 7) Source(43, 6) + SourceIndex(0) +6 >Emitted(33, 26) Source(43, 24) + SourceIndex(0) +7 >Emitted(33, 28) Source(43, 18) + SourceIndex(0) +8 >Emitted(33, 34) Source(43, 24) + SourceIndex(0) +9 >Emitted(33, 35) Source(43, 24) + SourceIndex(0) +10>Emitted(33, 37) Source(43, 26) + SourceIndex(0) +11>Emitted(33, 38) Source(43, 27) + SourceIndex(0) +12>Emitted(33, 41) Source(43, 30) + SourceIndex(0) +13>Emitted(33, 42) Source(43, 31) + SourceIndex(0) +14>Emitted(33, 44) Source(43, 33) + SourceIndex(0) +15>Emitted(33, 45) Source(43, 34) + SourceIndex(0) +16>Emitted(33, 48) Source(43, 37) + SourceIndex(0) +17>Emitted(33, 49) Source(43, 38) + SourceIndex(0) +18>Emitted(33, 51) Source(43, 40) + SourceIndex(0) +19>Emitted(33, 52) Source(43, 41) + SourceIndex(0) +20>Emitted(33, 54) Source(43, 43) + SourceIndex(0) +21>Emitted(33, 56) Source(43, 45) + SourceIndex(0) +22>Emitted(33, 57) Source(43, 46) + SourceIndex(0) +--- +>>> console.log(numberB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > numberB +7 > ) +8 > ; +1 >Emitted(34, 5) Source(44, 5) + SourceIndex(0) +2 >Emitted(34, 12) Source(44, 12) + SourceIndex(0) +3 >Emitted(34, 13) Source(44, 13) + SourceIndex(0) +4 >Emitted(34, 16) Source(44, 16) + SourceIndex(0) +5 >Emitted(34, 17) Source(44, 17) + SourceIndex(0) +6 >Emitted(34, 24) Source(44, 24) + SourceIndex(0) +7 >Emitted(34, 25) Source(44, 25) + SourceIndex(0) +8 >Emitted(34, 26) Source(44, 26) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(35, 1) Source(45, 1) + SourceIndex(0) +2 >Emitted(35, 2) Source(45, 2) + SourceIndex(0) +--- +>>>for ((_h = getRobot(), numberB = _h[0], _h), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^ +9 > ^^^^^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [numberB] = getRobot() +7 > +8 > [numberB] = getRobot() +9 > +10> , +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { +1->Emitted(36, 1) Source(46, 1) + SourceIndex(0) +2 >Emitted(36, 4) Source(46, 4) + SourceIndex(0) +3 >Emitted(36, 5) Source(46, 5) + SourceIndex(0) +4 >Emitted(36, 6) Source(46, 6) + SourceIndex(0) +5 >Emitted(36, 7) Source(46, 6) + SourceIndex(0) +6 >Emitted(36, 22) Source(46, 28) + SourceIndex(0) +7 >Emitted(36, 24) Source(46, 6) + SourceIndex(0) +8 >Emitted(36, 39) Source(46, 28) + SourceIndex(0) +9 >Emitted(36, 44) Source(46, 28) + SourceIndex(0) +10>Emitted(36, 46) Source(46, 30) + SourceIndex(0) +11>Emitted(36, 47) Source(46, 31) + SourceIndex(0) +12>Emitted(36, 50) Source(46, 34) + SourceIndex(0) +13>Emitted(36, 51) Source(46, 35) + SourceIndex(0) +14>Emitted(36, 53) Source(46, 37) + SourceIndex(0) +15>Emitted(36, 54) Source(46, 38) + SourceIndex(0) +16>Emitted(36, 57) Source(46, 41) + SourceIndex(0) +17>Emitted(36, 58) Source(46, 42) + SourceIndex(0) +18>Emitted(36, 60) Source(46, 44) + SourceIndex(0) +19>Emitted(36, 61) Source(46, 45) + SourceIndex(0) +20>Emitted(36, 63) Source(46, 47) + SourceIndex(0) +21>Emitted(36, 65) Source(46, 49) + SourceIndex(0) +22>Emitted(36, 66) Source(46, 50) + SourceIndex(0) +--- +>>> console.log(numberB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > numberB +7 > ) +8 > ; +1 >Emitted(37, 5) Source(47, 5) + SourceIndex(0) +2 >Emitted(37, 12) Source(47, 12) + SourceIndex(0) +3 >Emitted(37, 13) Source(47, 13) + SourceIndex(0) +4 >Emitted(37, 16) Source(47, 16) + SourceIndex(0) +5 >Emitted(37, 17) Source(47, 17) + SourceIndex(0) +6 >Emitted(37, 24) Source(47, 24) + SourceIndex(0) +7 >Emitted(37, 25) Source(47, 25) + SourceIndex(0) +8 >Emitted(37, 26) Source(47, 26) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(38, 1) Source(48, 1) + SourceIndex(0) +2 >Emitted(38, 2) Source(48, 2) + SourceIndex(0) +--- +>>>for ((_j = [2, "trimmer", "trimming"], numberB = _j[0], _j), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^ +9 > ^^^^^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [numberB] = [2, "trimmer", "trimming"] +7 > +8 > [numberB] = [2, "trimmer", "trimming"] +9 > +10> , +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { +1->Emitted(39, 1) Source(49, 1) + SourceIndex(0) +2 >Emitted(39, 4) Source(49, 4) + SourceIndex(0) +3 >Emitted(39, 5) Source(49, 5) + SourceIndex(0) +4 >Emitted(39, 6) Source(49, 6) + SourceIndex(0) +5 >Emitted(39, 7) Source(49, 6) + SourceIndex(0) +6 >Emitted(39, 38) Source(49, 44) + SourceIndex(0) +7 >Emitted(39, 40) Source(49, 6) + SourceIndex(0) +8 >Emitted(39, 55) Source(49, 44) + SourceIndex(0) +9 >Emitted(39, 60) Source(49, 44) + SourceIndex(0) +10>Emitted(39, 62) Source(49, 46) + SourceIndex(0) +11>Emitted(39, 63) Source(49, 47) + SourceIndex(0) +12>Emitted(39, 66) Source(49, 50) + SourceIndex(0) +13>Emitted(39, 67) Source(49, 51) + SourceIndex(0) +14>Emitted(39, 69) Source(49, 53) + SourceIndex(0) +15>Emitted(39, 70) Source(49, 54) + SourceIndex(0) +16>Emitted(39, 73) Source(49, 57) + SourceIndex(0) +17>Emitted(39, 74) Source(49, 58) + SourceIndex(0) +18>Emitted(39, 76) Source(49, 60) + SourceIndex(0) +19>Emitted(39, 77) Source(49, 61) + SourceIndex(0) +20>Emitted(39, 79) Source(49, 63) + SourceIndex(0) +21>Emitted(39, 81) Source(49, 65) + SourceIndex(0) +22>Emitted(39, 82) Source(49, 66) + SourceIndex(0) +--- +>>> console.log(numberB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > numberB +7 > ) +8 > ; +1 >Emitted(40, 5) Source(50, 5) + SourceIndex(0) +2 >Emitted(40, 12) Source(50, 12) + SourceIndex(0) +3 >Emitted(40, 13) Source(50, 13) + SourceIndex(0) +4 >Emitted(40, 16) Source(50, 16) + SourceIndex(0) +5 >Emitted(40, 17) Source(50, 17) + SourceIndex(0) +6 >Emitted(40, 24) Source(50, 24) + SourceIndex(0) +7 >Emitted(40, 25) Source(50, 25) + SourceIndex(0) +8 >Emitted(40, 26) Source(50, 26) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(41, 1) Source(51, 1) + SourceIndex(0) +2 >Emitted(41, 2) Source(51, 2) + SourceIndex(0) +--- +>>>for ((nameB = multiRobotA[0], multiRobotA), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^ +9 > ^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [nameB] = multiRobotA +7 > +8 > multiRobotA +9 > +10> , +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { +1->Emitted(42, 1) Source(52, 1) + SourceIndex(0) +2 >Emitted(42, 4) Source(52, 4) + SourceIndex(0) +3 >Emitted(42, 5) Source(52, 5) + SourceIndex(0) +4 >Emitted(42, 6) Source(52, 6) + SourceIndex(0) +5 >Emitted(42, 7) Source(52, 6) + SourceIndex(0) +6 >Emitted(42, 29) Source(52, 27) + SourceIndex(0) +7 >Emitted(42, 31) Source(52, 16) + SourceIndex(0) +8 >Emitted(42, 42) Source(52, 27) + SourceIndex(0) +9 >Emitted(42, 43) Source(52, 27) + SourceIndex(0) +10>Emitted(42, 45) Source(52, 29) + SourceIndex(0) +11>Emitted(42, 46) Source(52, 30) + SourceIndex(0) +12>Emitted(42, 49) Source(52, 33) + SourceIndex(0) +13>Emitted(42, 50) Source(52, 34) + SourceIndex(0) +14>Emitted(42, 52) Source(52, 36) + SourceIndex(0) +15>Emitted(42, 53) Source(52, 37) + SourceIndex(0) +16>Emitted(42, 56) Source(52, 40) + SourceIndex(0) +17>Emitted(42, 57) Source(52, 41) + SourceIndex(0) +18>Emitted(42, 59) Source(52, 43) + SourceIndex(0) +19>Emitted(42, 60) Source(52, 44) + SourceIndex(0) +20>Emitted(42, 62) Source(52, 46) + SourceIndex(0) +21>Emitted(42, 64) Source(52, 48) + SourceIndex(0) +22>Emitted(42, 65) Source(52, 49) + SourceIndex(0) +--- +>>> console.log(nameB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameB +7 > ) +8 > ; +1 >Emitted(43, 5) Source(53, 5) + SourceIndex(0) +2 >Emitted(43, 12) Source(53, 12) + SourceIndex(0) +3 >Emitted(43, 13) Source(53, 13) + SourceIndex(0) +4 >Emitted(43, 16) Source(53, 16) + SourceIndex(0) +5 >Emitted(43, 17) Source(53, 17) + SourceIndex(0) +6 >Emitted(43, 22) Source(53, 22) + SourceIndex(0) +7 >Emitted(43, 23) Source(53, 23) + SourceIndex(0) +8 >Emitted(43, 24) Source(53, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(44, 1) Source(54, 1) + SourceIndex(0) +2 >Emitted(44, 2) Source(54, 2) + SourceIndex(0) +--- +>>>for ((_k = getMultiRobot(), nameB = _k[0], _k), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^ +9 > ^^^^^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [nameB] = getMultiRobot() +7 > +8 > [nameB] = getMultiRobot() +9 > +10> , +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { +1->Emitted(45, 1) Source(55, 1) + SourceIndex(0) +2 >Emitted(45, 4) Source(55, 4) + SourceIndex(0) +3 >Emitted(45, 5) Source(55, 5) + SourceIndex(0) +4 >Emitted(45, 6) Source(55, 6) + SourceIndex(0) +5 >Emitted(45, 7) Source(55, 6) + SourceIndex(0) +6 >Emitted(45, 27) Source(55, 31) + SourceIndex(0) +7 >Emitted(45, 29) Source(55, 6) + SourceIndex(0) +8 >Emitted(45, 42) Source(55, 31) + SourceIndex(0) +9 >Emitted(45, 47) Source(55, 31) + SourceIndex(0) +10>Emitted(45, 49) Source(55, 33) + SourceIndex(0) +11>Emitted(45, 50) Source(55, 34) + SourceIndex(0) +12>Emitted(45, 53) Source(55, 37) + SourceIndex(0) +13>Emitted(45, 54) Source(55, 38) + SourceIndex(0) +14>Emitted(45, 56) Source(55, 40) + SourceIndex(0) +15>Emitted(45, 57) Source(55, 41) + SourceIndex(0) +16>Emitted(45, 60) Source(55, 44) + SourceIndex(0) +17>Emitted(45, 61) Source(55, 45) + SourceIndex(0) +18>Emitted(45, 63) Source(55, 47) + SourceIndex(0) +19>Emitted(45, 64) Source(55, 48) + SourceIndex(0) +20>Emitted(45, 66) Source(55, 50) + SourceIndex(0) +21>Emitted(45, 68) Source(55, 52) + SourceIndex(0) +22>Emitted(45, 69) Source(55, 53) + SourceIndex(0) +--- +>>> console.log(nameB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameB +7 > ) +8 > ; +1 >Emitted(46, 5) Source(56, 5) + SourceIndex(0) +2 >Emitted(46, 12) Source(56, 12) + SourceIndex(0) +3 >Emitted(46, 13) Source(56, 13) + SourceIndex(0) +4 >Emitted(46, 16) Source(56, 16) + SourceIndex(0) +5 >Emitted(46, 17) Source(56, 17) + SourceIndex(0) +6 >Emitted(46, 22) Source(56, 22) + SourceIndex(0) +7 >Emitted(46, 23) Source(56, 23) + SourceIndex(0) +8 >Emitted(46, 24) Source(56, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(47, 1) Source(57, 1) + SourceIndex(0) +2 >Emitted(47, 2) Source(57, 2) + SourceIndex(0) +--- +>>>for ((_l = ["trimmer", ["trimming", "edging"]], nameB = _l[0], _l), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^ +9 > ^^^^^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [nameB] = ["trimmer", ["trimming", "edging"]] +7 > +8 > [nameB] = ["trimmer", ["trimming", "edging"]] +9 > +10> , +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { +1->Emitted(48, 1) Source(58, 1) + SourceIndex(0) +2 >Emitted(48, 4) Source(58, 4) + SourceIndex(0) +3 >Emitted(48, 5) Source(58, 5) + SourceIndex(0) +4 >Emitted(48, 6) Source(58, 6) + SourceIndex(0) +5 >Emitted(48, 7) Source(58, 6) + SourceIndex(0) +6 >Emitted(48, 47) Source(58, 51) + SourceIndex(0) +7 >Emitted(48, 49) Source(58, 6) + SourceIndex(0) +8 >Emitted(48, 62) Source(58, 51) + SourceIndex(0) +9 >Emitted(48, 67) Source(58, 51) + SourceIndex(0) +10>Emitted(48, 69) Source(58, 53) + SourceIndex(0) +11>Emitted(48, 70) Source(58, 54) + SourceIndex(0) +12>Emitted(48, 73) Source(58, 57) + SourceIndex(0) +13>Emitted(48, 74) Source(58, 58) + SourceIndex(0) +14>Emitted(48, 76) Source(58, 60) + SourceIndex(0) +15>Emitted(48, 77) Source(58, 61) + SourceIndex(0) +16>Emitted(48, 80) Source(58, 64) + SourceIndex(0) +17>Emitted(48, 81) Source(58, 65) + SourceIndex(0) +18>Emitted(48, 83) Source(58, 67) + SourceIndex(0) +19>Emitted(48, 84) Source(58, 68) + SourceIndex(0) +20>Emitted(48, 86) Source(58, 70) + SourceIndex(0) +21>Emitted(48, 88) Source(58, 72) + SourceIndex(0) +22>Emitted(48, 89) Source(58, 73) + SourceIndex(0) +--- +>>> console.log(nameB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameB +7 > ) +8 > ; +1 >Emitted(49, 5) Source(59, 5) + SourceIndex(0) +2 >Emitted(49, 12) Source(59, 12) + SourceIndex(0) +3 >Emitted(49, 13) Source(59, 13) + SourceIndex(0) +4 >Emitted(49, 16) Source(59, 16) + SourceIndex(0) +5 >Emitted(49, 17) Source(59, 17) + SourceIndex(0) +6 >Emitted(49, 22) Source(59, 22) + SourceIndex(0) +7 >Emitted(49, 23) Source(59, 23) + SourceIndex(0) +8 >Emitted(49, 24) Source(59, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(50, 1) Source(60, 1) + SourceIndex(0) +2 >Emitted(50, 2) Source(60, 2) + SourceIndex(0) +--- +>>>for ((numberA2 = robotA[0], nameA2 = robotA[1], skillA2 = robotA[2], robotA), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^^ +21> ^ +22> ^^ +23> ^ +24> ^^ +25> ^^ +26> ^ +1-> + > + > +2 >for +3 > +4 > ( +5 > [ +6 > numberA2 +7 > , +8 > nameA2 +9 > , +10> skillA2 +11> ] = +12> robotA +13> +14> , +15> i +16> = +17> 0 +18> ; +19> i +20> < +21> 1 +22> ; +23> i +24> ++ +25> ) +26> { +1->Emitted(51, 1) Source(62, 1) + SourceIndex(0) +2 >Emitted(51, 4) Source(62, 4) + SourceIndex(0) +3 >Emitted(51, 5) Source(62, 5) + SourceIndex(0) +4 >Emitted(51, 6) Source(62, 6) + SourceIndex(0) +5 >Emitted(51, 7) Source(62, 7) + SourceIndex(0) +6 >Emitted(51, 27) Source(62, 15) + SourceIndex(0) +7 >Emitted(51, 29) Source(62, 17) + SourceIndex(0) +8 >Emitted(51, 47) Source(62, 23) + SourceIndex(0) +9 >Emitted(51, 49) Source(62, 25) + SourceIndex(0) +10>Emitted(51, 68) Source(62, 32) + SourceIndex(0) +11>Emitted(51, 70) Source(62, 36) + SourceIndex(0) +12>Emitted(51, 76) Source(62, 42) + SourceIndex(0) +13>Emitted(51, 77) Source(62, 42) + SourceIndex(0) +14>Emitted(51, 79) Source(62, 44) + SourceIndex(0) +15>Emitted(51, 80) Source(62, 45) + SourceIndex(0) +16>Emitted(51, 83) Source(62, 48) + SourceIndex(0) +17>Emitted(51, 84) Source(62, 49) + SourceIndex(0) +18>Emitted(51, 86) Source(62, 51) + SourceIndex(0) +19>Emitted(51, 87) Source(62, 52) + SourceIndex(0) +20>Emitted(51, 90) Source(62, 55) + SourceIndex(0) +21>Emitted(51, 91) Source(62, 56) + SourceIndex(0) +22>Emitted(51, 93) Source(62, 58) + SourceIndex(0) +23>Emitted(51, 94) Source(62, 59) + SourceIndex(0) +24>Emitted(51, 96) Source(62, 61) + SourceIndex(0) +25>Emitted(51, 98) Source(62, 63) + SourceIndex(0) +26>Emitted(51, 99) Source(62, 64) + SourceIndex(0) +--- +>>> console.log(nameA2); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA2 +7 > ) +8 > ; +1 >Emitted(52, 5) Source(63, 5) + SourceIndex(0) +2 >Emitted(52, 12) Source(63, 12) + SourceIndex(0) +3 >Emitted(52, 13) Source(63, 13) + SourceIndex(0) +4 >Emitted(52, 16) Source(63, 16) + SourceIndex(0) +5 >Emitted(52, 17) Source(63, 17) + SourceIndex(0) +6 >Emitted(52, 23) Source(63, 23) + SourceIndex(0) +7 >Emitted(52, 24) Source(63, 24) + SourceIndex(0) +8 >Emitted(52, 25) Source(63, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(53, 1) Source(64, 1) + SourceIndex(0) +2 >Emitted(53, 2) Source(64, 2) + SourceIndex(0) +--- +>>>for ((_m = getRobot(), numberA2 = _m[0], nameA2 = _m[1], skillA2 = _m[2], _m), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^ +13> ^^^^^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^^ +21> ^ +22> ^^ +23> ^ +24> ^^ +25> ^^ +26> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [numberA2, nameA2, skillA2] = getRobot() +7 > +8 > numberA2 +9 > , +10> nameA2 +11> , +12> skillA2 +13> ] = getRobot() +14> , +15> i +16> = +17> 0 +18> ; +19> i +20> < +21> 1 +22> ; +23> i +24> ++ +25> ) +26> { +1->Emitted(54, 1) Source(65, 1) + SourceIndex(0) +2 >Emitted(54, 4) Source(65, 4) + SourceIndex(0) +3 >Emitted(54, 5) Source(65, 5) + SourceIndex(0) +4 >Emitted(54, 6) Source(65, 6) + SourceIndex(0) +5 >Emitted(54, 7) Source(65, 6) + SourceIndex(0) +6 >Emitted(54, 22) Source(65, 46) + SourceIndex(0) +7 >Emitted(54, 24) Source(65, 7) + SourceIndex(0) +8 >Emitted(54, 40) Source(65, 15) + SourceIndex(0) +9 >Emitted(54, 42) Source(65, 17) + SourceIndex(0) +10>Emitted(54, 56) Source(65, 23) + SourceIndex(0) +11>Emitted(54, 58) Source(65, 25) + SourceIndex(0) +12>Emitted(54, 73) Source(65, 32) + SourceIndex(0) +13>Emitted(54, 78) Source(65, 46) + SourceIndex(0) +14>Emitted(54, 80) Source(65, 48) + SourceIndex(0) +15>Emitted(54, 81) Source(65, 49) + SourceIndex(0) +16>Emitted(54, 84) Source(65, 52) + SourceIndex(0) +17>Emitted(54, 85) Source(65, 53) + SourceIndex(0) +18>Emitted(54, 87) Source(65, 55) + SourceIndex(0) +19>Emitted(54, 88) Source(65, 56) + SourceIndex(0) +20>Emitted(54, 91) Source(65, 59) + SourceIndex(0) +21>Emitted(54, 92) Source(65, 60) + SourceIndex(0) +22>Emitted(54, 94) Source(65, 62) + SourceIndex(0) +23>Emitted(54, 95) Source(65, 63) + SourceIndex(0) +24>Emitted(54, 97) Source(65, 65) + SourceIndex(0) +25>Emitted(54, 99) Source(65, 67) + SourceIndex(0) +26>Emitted(54, 100) Source(65, 68) + SourceIndex(0) +--- +>>> console.log(nameA2); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA2 +7 > ) +8 > ; +1 >Emitted(55, 5) Source(66, 5) + SourceIndex(0) +2 >Emitted(55, 12) Source(66, 12) + SourceIndex(0) +3 >Emitted(55, 13) Source(66, 13) + SourceIndex(0) +4 >Emitted(55, 16) Source(66, 16) + SourceIndex(0) +5 >Emitted(55, 17) Source(66, 17) + SourceIndex(0) +6 >Emitted(55, 23) Source(66, 23) + SourceIndex(0) +7 >Emitted(55, 24) Source(66, 24) + SourceIndex(0) +8 >Emitted(55, 25) Source(66, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(56, 1) Source(67, 1) + SourceIndex(0) +2 >Emitted(56, 2) Source(67, 2) + SourceIndex(0) +--- +>>>for ((_o = [2, "trimmer", "trimming"], numberA2 = _o[0], nameA2 = _o[1], skillA2 = _o[2], _o), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^ +13> ^^^^^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^^ +21> ^ +22> ^^ +23> ^ +24> ^^ +25> ^^ +26> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"] +7 > +8 > numberA2 +9 > , +10> nameA2 +11> , +12> skillA2 +13> ] = [2, "trimmer", "trimming"] +14> , +15> i +16> = +17> 0 +18> ; +19> i +20> < +21> 1 +22> ; +23> i +24> ++ +25> ) +26> { +1->Emitted(57, 1) Source(68, 1) + SourceIndex(0) +2 >Emitted(57, 4) Source(68, 4) + SourceIndex(0) +3 >Emitted(57, 5) Source(68, 5) + SourceIndex(0) +4 >Emitted(57, 6) Source(68, 6) + SourceIndex(0) +5 >Emitted(57, 7) Source(68, 6) + SourceIndex(0) +6 >Emitted(57, 38) Source(68, 62) + SourceIndex(0) +7 >Emitted(57, 40) Source(68, 7) + SourceIndex(0) +8 >Emitted(57, 56) Source(68, 15) + SourceIndex(0) +9 >Emitted(57, 58) Source(68, 17) + SourceIndex(0) +10>Emitted(57, 72) Source(68, 23) + SourceIndex(0) +11>Emitted(57, 74) Source(68, 25) + SourceIndex(0) +12>Emitted(57, 89) Source(68, 32) + SourceIndex(0) +13>Emitted(57, 94) Source(68, 62) + SourceIndex(0) +14>Emitted(57, 96) Source(68, 64) + SourceIndex(0) +15>Emitted(57, 97) Source(68, 65) + SourceIndex(0) +16>Emitted(57, 100) Source(68, 68) + SourceIndex(0) +17>Emitted(57, 101) Source(68, 69) + SourceIndex(0) +18>Emitted(57, 103) Source(68, 71) + SourceIndex(0) +19>Emitted(57, 104) Source(68, 72) + SourceIndex(0) +20>Emitted(57, 107) Source(68, 75) + SourceIndex(0) +21>Emitted(57, 108) Source(68, 76) + SourceIndex(0) +22>Emitted(57, 110) Source(68, 78) + SourceIndex(0) +23>Emitted(57, 111) Source(68, 79) + SourceIndex(0) +24>Emitted(57, 113) Source(68, 81) + SourceIndex(0) +25>Emitted(57, 115) Source(68, 83) + SourceIndex(0) +26>Emitted(57, 116) Source(68, 84) + SourceIndex(0) +--- +>>> console.log(nameA2); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA2 +7 > ) +8 > ; +1 >Emitted(58, 5) Source(69, 5) + SourceIndex(0) +2 >Emitted(58, 12) Source(69, 12) + SourceIndex(0) +3 >Emitted(58, 13) Source(69, 13) + SourceIndex(0) +4 >Emitted(58, 16) Source(69, 16) + SourceIndex(0) +5 >Emitted(58, 17) Source(69, 17) + SourceIndex(0) +6 >Emitted(58, 23) Source(69, 23) + SourceIndex(0) +7 >Emitted(58, 24) Source(69, 24) + SourceIndex(0) +8 >Emitted(58, 25) Source(69, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(59, 1) Source(70, 1) + SourceIndex(0) +2 >Emitted(59, 2) Source(70, 2) + SourceIndex(0) +--- +>>>for ((nameMA = multiRobotA[0], _p = multiRobotA[1], primarySkillA = _p[0], secondarySkillA = _p[1], multiRobotA), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^ +27> ^^ +28> ^ +1-> + > +2 >for +3 > +4 > ( +5 > [ +6 > nameMA +7 > , +8 > [primarySkillA, secondarySkillA] +9 > +10> primarySkillA +11> , +12> secondarySkillA +13> ]] = +14> multiRobotA +15> +16> , +17> i +18> = +19> 0 +20> ; +21> i +22> < +23> 1 +24> ; +25> i +26> ++ +27> ) +28> { +1->Emitted(60, 1) Source(71, 1) + SourceIndex(0) +2 >Emitted(60, 4) Source(71, 4) + SourceIndex(0) +3 >Emitted(60, 5) Source(71, 5) + SourceIndex(0) +4 >Emitted(60, 6) Source(71, 6) + SourceIndex(0) +5 >Emitted(60, 7) Source(71, 7) + SourceIndex(0) +6 >Emitted(60, 30) Source(71, 13) + SourceIndex(0) +7 >Emitted(60, 32) Source(71, 15) + SourceIndex(0) +8 >Emitted(60, 51) Source(71, 47) + SourceIndex(0) +9 >Emitted(60, 53) Source(71, 16) + SourceIndex(0) +10>Emitted(60, 74) Source(71, 29) + SourceIndex(0) +11>Emitted(60, 76) Source(71, 31) + SourceIndex(0) +12>Emitted(60, 99) Source(71, 46) + SourceIndex(0) +13>Emitted(60, 101) Source(71, 51) + SourceIndex(0) +14>Emitted(60, 112) Source(71, 62) + SourceIndex(0) +15>Emitted(60, 113) Source(71, 62) + SourceIndex(0) +16>Emitted(60, 115) Source(71, 64) + SourceIndex(0) +17>Emitted(60, 116) Source(71, 65) + SourceIndex(0) +18>Emitted(60, 119) Source(71, 68) + SourceIndex(0) +19>Emitted(60, 120) Source(71, 69) + SourceIndex(0) +20>Emitted(60, 122) Source(71, 71) + SourceIndex(0) +21>Emitted(60, 123) Source(71, 72) + SourceIndex(0) +22>Emitted(60, 126) Source(71, 75) + SourceIndex(0) +23>Emitted(60, 127) Source(71, 76) + SourceIndex(0) +24>Emitted(60, 129) Source(71, 78) + SourceIndex(0) +25>Emitted(60, 130) Source(71, 79) + SourceIndex(0) +26>Emitted(60, 132) Source(71, 81) + SourceIndex(0) +27>Emitted(60, 134) Source(71, 83) + SourceIndex(0) +28>Emitted(60, 135) Source(71, 84) + SourceIndex(0) +--- +>>> console.log(nameMA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMA +7 > ) +8 > ; +1 >Emitted(61, 5) Source(72, 5) + SourceIndex(0) +2 >Emitted(61, 12) Source(72, 12) + SourceIndex(0) +3 >Emitted(61, 13) Source(72, 13) + SourceIndex(0) +4 >Emitted(61, 16) Source(72, 16) + SourceIndex(0) +5 >Emitted(61, 17) Source(72, 17) + SourceIndex(0) +6 >Emitted(61, 23) Source(72, 23) + SourceIndex(0) +7 >Emitted(61, 24) Source(72, 24) + SourceIndex(0) +8 >Emitted(61, 25) Source(72, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(62, 1) Source(73, 1) + SourceIndex(0) +2 >Emitted(62, 2) Source(73, 2) + SourceIndex(0) +--- +>>>for ((_q = getMultiRobot(), nameMA = _q[0], _r = _q[1], primarySkillA = _r[0], secondarySkillA = _r[1], _q), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^^^^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^ +27> ^^ +28> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot() +7 > +8 > nameMA +9 > , +10> [primarySkillA, secondarySkillA] +11> +12> primarySkillA +13> , +14> secondarySkillA +15> ]] = getMultiRobot() +16> , +17> i +18> = +19> 0 +20> ; +21> i +22> < +23> 1 +24> ; +25> i +26> ++ +27> ) +28> { +1->Emitted(63, 1) Source(74, 1) + SourceIndex(0) +2 >Emitted(63, 4) Source(74, 4) + SourceIndex(0) +3 >Emitted(63, 5) Source(74, 5) + SourceIndex(0) +4 >Emitted(63, 6) Source(74, 6) + SourceIndex(0) +5 >Emitted(63, 7) Source(74, 6) + SourceIndex(0) +6 >Emitted(63, 27) Source(74, 66) + SourceIndex(0) +7 >Emitted(63, 29) Source(74, 7) + SourceIndex(0) +8 >Emitted(63, 43) Source(74, 13) + SourceIndex(0) +9 >Emitted(63, 45) Source(74, 15) + SourceIndex(0) +10>Emitted(63, 55) Source(74, 47) + SourceIndex(0) +11>Emitted(63, 57) Source(74, 16) + SourceIndex(0) +12>Emitted(63, 78) Source(74, 29) + SourceIndex(0) +13>Emitted(63, 80) Source(74, 31) + SourceIndex(0) +14>Emitted(63, 103) Source(74, 46) + SourceIndex(0) +15>Emitted(63, 108) Source(74, 66) + SourceIndex(0) +16>Emitted(63, 110) Source(74, 68) + SourceIndex(0) +17>Emitted(63, 111) Source(74, 69) + SourceIndex(0) +18>Emitted(63, 114) Source(74, 72) + SourceIndex(0) +19>Emitted(63, 115) Source(74, 73) + SourceIndex(0) +20>Emitted(63, 117) Source(74, 75) + SourceIndex(0) +21>Emitted(63, 118) Source(74, 76) + SourceIndex(0) +22>Emitted(63, 121) Source(74, 79) + SourceIndex(0) +23>Emitted(63, 122) Source(74, 80) + SourceIndex(0) +24>Emitted(63, 124) Source(74, 82) + SourceIndex(0) +25>Emitted(63, 125) Source(74, 83) + SourceIndex(0) +26>Emitted(63, 127) Source(74, 85) + SourceIndex(0) +27>Emitted(63, 129) Source(74, 87) + SourceIndex(0) +28>Emitted(63, 130) Source(74, 88) + SourceIndex(0) +--- +>>> console.log(nameMA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMA +7 > ) +8 > ; +1 >Emitted(64, 5) Source(75, 5) + SourceIndex(0) +2 >Emitted(64, 12) Source(75, 12) + SourceIndex(0) +3 >Emitted(64, 13) Source(75, 13) + SourceIndex(0) +4 >Emitted(64, 16) Source(75, 16) + SourceIndex(0) +5 >Emitted(64, 17) Source(75, 17) + SourceIndex(0) +6 >Emitted(64, 23) Source(75, 23) + SourceIndex(0) +7 >Emitted(64, 24) Source(75, 24) + SourceIndex(0) +8 >Emitted(64, 25) Source(75, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(65, 1) Source(76, 1) + SourceIndex(0) +2 >Emitted(65, 2) Source(76, 2) + SourceIndex(0) +--- +>>>for ((_s = ["trimmer", ["trimming", "edging"]], nameMA = _s[0], _t = _s[1], primarySkillA = _t[0], secondarySkillA = _t[1], _s), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^^^^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^ +27> ^^ +28> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]] +7 > +8 > nameMA +9 > , +10> [primarySkillA, secondarySkillA] +11> +12> primarySkillA +13> , +14> secondarySkillA +15> ]] = ["trimmer", ["trimming", "edging"]] +16> , +17> i +18> = +19> 0 +20> ; +21> i +22> < +23> 1 +24> ; +25> i +26> ++ +27> ) +28> { +1->Emitted(66, 1) Source(77, 1) + SourceIndex(0) +2 >Emitted(66, 4) Source(77, 4) + SourceIndex(0) +3 >Emitted(66, 5) Source(77, 5) + SourceIndex(0) +4 >Emitted(66, 6) Source(77, 6) + SourceIndex(0) +5 >Emitted(66, 7) Source(77, 6) + SourceIndex(0) +6 >Emitted(66, 47) Source(77, 86) + SourceIndex(0) +7 >Emitted(66, 49) Source(77, 7) + SourceIndex(0) +8 >Emitted(66, 63) Source(77, 13) + SourceIndex(0) +9 >Emitted(66, 65) Source(77, 15) + SourceIndex(0) +10>Emitted(66, 75) Source(77, 47) + SourceIndex(0) +11>Emitted(66, 77) Source(77, 16) + SourceIndex(0) +12>Emitted(66, 98) Source(77, 29) + SourceIndex(0) +13>Emitted(66, 100) Source(77, 31) + SourceIndex(0) +14>Emitted(66, 123) Source(77, 46) + SourceIndex(0) +15>Emitted(66, 128) Source(77, 86) + SourceIndex(0) +16>Emitted(66, 130) Source(77, 88) + SourceIndex(0) +17>Emitted(66, 131) Source(77, 89) + SourceIndex(0) +18>Emitted(66, 134) Source(77, 92) + SourceIndex(0) +19>Emitted(66, 135) Source(77, 93) + SourceIndex(0) +20>Emitted(66, 137) Source(77, 95) + SourceIndex(0) +21>Emitted(66, 138) Source(77, 96) + SourceIndex(0) +22>Emitted(66, 141) Source(77, 99) + SourceIndex(0) +23>Emitted(66, 142) Source(77, 100) + SourceIndex(0) +24>Emitted(66, 144) Source(77, 102) + SourceIndex(0) +25>Emitted(66, 145) Source(77, 103) + SourceIndex(0) +26>Emitted(66, 147) Source(77, 105) + SourceIndex(0) +27>Emitted(66, 149) Source(77, 107) + SourceIndex(0) +28>Emitted(66, 150) Source(77, 108) + SourceIndex(0) +--- +>>> console.log(nameMA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMA +7 > ) +8 > ; +1 >Emitted(67, 5) Source(78, 5) + SourceIndex(0) +2 >Emitted(67, 12) Source(78, 12) + SourceIndex(0) +3 >Emitted(67, 13) Source(78, 13) + SourceIndex(0) +4 >Emitted(67, 16) Source(78, 16) + SourceIndex(0) +5 >Emitted(67, 17) Source(78, 17) + SourceIndex(0) +6 >Emitted(67, 23) Source(78, 23) + SourceIndex(0) +7 >Emitted(67, 24) Source(78, 24) + SourceIndex(0) +8 >Emitted(67, 25) Source(78, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(68, 1) Source(79, 1) + SourceIndex(0) +2 >Emitted(68, 2) Source(79, 2) + SourceIndex(0) +--- +>>>for ((numberA3 = robotA[0], robotAInfo = robotA.slice(1), robotA), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > + > +2 >for +3 > +4 > ( +5 > [ +6 > numberA3 +7 > , +8 > ...robotAInfo +9 > ] = +10> robotA +11> +12> , +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(69, 1) Source(81, 1) + SourceIndex(0) +2 >Emitted(69, 4) Source(81, 4) + SourceIndex(0) +3 >Emitted(69, 5) Source(81, 5) + SourceIndex(0) +4 >Emitted(69, 6) Source(81, 6) + SourceIndex(0) +5 >Emitted(69, 7) Source(81, 7) + SourceIndex(0) +6 >Emitted(69, 27) Source(81, 15) + SourceIndex(0) +7 >Emitted(69, 29) Source(81, 17) + SourceIndex(0) +8 >Emitted(69, 57) Source(81, 30) + SourceIndex(0) +9 >Emitted(69, 59) Source(81, 34) + SourceIndex(0) +10>Emitted(69, 65) Source(81, 40) + SourceIndex(0) +11>Emitted(69, 66) Source(81, 40) + SourceIndex(0) +12>Emitted(69, 68) Source(81, 42) + SourceIndex(0) +13>Emitted(69, 69) Source(81, 43) + SourceIndex(0) +14>Emitted(69, 72) Source(81, 46) + SourceIndex(0) +15>Emitted(69, 73) Source(81, 47) + SourceIndex(0) +16>Emitted(69, 75) Source(81, 49) + SourceIndex(0) +17>Emitted(69, 76) Source(81, 50) + SourceIndex(0) +18>Emitted(69, 79) Source(81, 53) + SourceIndex(0) +19>Emitted(69, 80) Source(81, 54) + SourceIndex(0) +20>Emitted(69, 82) Source(81, 56) + SourceIndex(0) +21>Emitted(69, 83) Source(81, 57) + SourceIndex(0) +22>Emitted(69, 85) Source(81, 59) + SourceIndex(0) +23>Emitted(69, 87) Source(81, 61) + SourceIndex(0) +24>Emitted(69, 88) Source(81, 62) + SourceIndex(0) +--- +>>> console.log(numberA3); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > numberA3 +7 > ) +8 > ; +1 >Emitted(70, 5) Source(82, 5) + SourceIndex(0) +2 >Emitted(70, 12) Source(82, 12) + SourceIndex(0) +3 >Emitted(70, 13) Source(82, 13) + SourceIndex(0) +4 >Emitted(70, 16) Source(82, 16) + SourceIndex(0) +5 >Emitted(70, 17) Source(82, 17) + SourceIndex(0) +6 >Emitted(70, 25) Source(82, 25) + SourceIndex(0) +7 >Emitted(70, 26) Source(82, 26) + SourceIndex(0) +8 >Emitted(70, 27) Source(82, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(71, 1) Source(83, 1) + SourceIndex(0) +2 >Emitted(71, 2) Source(83, 2) + SourceIndex(0) +--- +>>>for ((_u = getRobot(), numberA3 = _u[0], robotAInfo = _u.slice(1), _u), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [numberA3, ...robotAInfo] = getRobot() +7 > +8 > numberA3 +9 > , +10> ...robotAInfo +11> ] = getRobot() +12> , +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(72, 1) Source(84, 1) + SourceIndex(0) +2 >Emitted(72, 4) Source(84, 4) + SourceIndex(0) +3 >Emitted(72, 5) Source(84, 5) + SourceIndex(0) +4 >Emitted(72, 6) Source(84, 6) + SourceIndex(0) +5 >Emitted(72, 7) Source(84, 6) + SourceIndex(0) +6 >Emitted(72, 22) Source(84, 44) + SourceIndex(0) +7 >Emitted(72, 24) Source(84, 7) + SourceIndex(0) +8 >Emitted(72, 40) Source(84, 15) + SourceIndex(0) +9 >Emitted(72, 42) Source(84, 17) + SourceIndex(0) +10>Emitted(72, 66) Source(84, 30) + SourceIndex(0) +11>Emitted(72, 71) Source(84, 44) + SourceIndex(0) +12>Emitted(72, 73) Source(84, 46) + SourceIndex(0) +13>Emitted(72, 74) Source(84, 47) + SourceIndex(0) +14>Emitted(72, 77) Source(84, 50) + SourceIndex(0) +15>Emitted(72, 78) Source(84, 51) + SourceIndex(0) +16>Emitted(72, 80) Source(84, 53) + SourceIndex(0) +17>Emitted(72, 81) Source(84, 54) + SourceIndex(0) +18>Emitted(72, 84) Source(84, 57) + SourceIndex(0) +19>Emitted(72, 85) Source(84, 58) + SourceIndex(0) +20>Emitted(72, 87) Source(84, 60) + SourceIndex(0) +21>Emitted(72, 88) Source(84, 61) + SourceIndex(0) +22>Emitted(72, 90) Source(84, 63) + SourceIndex(0) +23>Emitted(72, 92) Source(84, 65) + SourceIndex(0) +24>Emitted(72, 93) Source(84, 66) + SourceIndex(0) +--- +>>> console.log(numberA3); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > numberA3 +7 > ) +8 > ; +1 >Emitted(73, 5) Source(85, 5) + SourceIndex(0) +2 >Emitted(73, 12) Source(85, 12) + SourceIndex(0) +3 >Emitted(73, 13) Source(85, 13) + SourceIndex(0) +4 >Emitted(73, 16) Source(85, 16) + SourceIndex(0) +5 >Emitted(73, 17) Source(85, 17) + SourceIndex(0) +6 >Emitted(73, 25) Source(85, 25) + SourceIndex(0) +7 >Emitted(73, 26) Source(85, 26) + SourceIndex(0) +8 >Emitted(73, 27) Source(85, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(74, 1) Source(86, 1) + SourceIndex(0) +2 >Emitted(74, 2) Source(86, 2) + SourceIndex(0) +--- +>>>for ((_v = [2, "trimmer", "trimming"], numberA3 = _v[0], robotAInfo = _v.slice(1), _v), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [numberA3, ...robotAInfo] = [2, "trimmer", "trimming"] +7 > +8 > numberA3 +9 > , +10> ...robotAInfo +11> ] = [2, "trimmer", "trimming"] +12> , +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(75, 1) Source(87, 1) + SourceIndex(0) +2 >Emitted(75, 4) Source(87, 4) + SourceIndex(0) +3 >Emitted(75, 5) Source(87, 5) + SourceIndex(0) +4 >Emitted(75, 6) Source(87, 6) + SourceIndex(0) +5 >Emitted(75, 7) Source(87, 6) + SourceIndex(0) +6 >Emitted(75, 38) Source(87, 67) + SourceIndex(0) +7 >Emitted(75, 40) Source(87, 7) + SourceIndex(0) +8 >Emitted(75, 56) Source(87, 15) + SourceIndex(0) +9 >Emitted(75, 58) Source(87, 17) + SourceIndex(0) +10>Emitted(75, 82) Source(87, 30) + SourceIndex(0) +11>Emitted(75, 87) Source(87, 67) + SourceIndex(0) +12>Emitted(75, 89) Source(87, 69) + SourceIndex(0) +13>Emitted(75, 90) Source(87, 70) + SourceIndex(0) +14>Emitted(75, 93) Source(87, 73) + SourceIndex(0) +15>Emitted(75, 94) Source(87, 74) + SourceIndex(0) +16>Emitted(75, 96) Source(87, 76) + SourceIndex(0) +17>Emitted(75, 97) Source(87, 77) + SourceIndex(0) +18>Emitted(75, 100) Source(87, 80) + SourceIndex(0) +19>Emitted(75, 101) Source(87, 81) + SourceIndex(0) +20>Emitted(75, 103) Source(87, 83) + SourceIndex(0) +21>Emitted(75, 104) Source(87, 84) + SourceIndex(0) +22>Emitted(75, 106) Source(87, 86) + SourceIndex(0) +23>Emitted(75, 108) Source(87, 88) + SourceIndex(0) +24>Emitted(75, 109) Source(87, 89) + SourceIndex(0) +--- +>>> console.log(numberA3); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > numberA3 +7 > ) +8 > ; +1 >Emitted(76, 5) Source(88, 5) + SourceIndex(0) +2 >Emitted(76, 12) Source(88, 12) + SourceIndex(0) +3 >Emitted(76, 13) Source(88, 13) + SourceIndex(0) +4 >Emitted(76, 16) Source(88, 16) + SourceIndex(0) +5 >Emitted(76, 17) Source(88, 17) + SourceIndex(0) +6 >Emitted(76, 25) Source(88, 25) + SourceIndex(0) +7 >Emitted(76, 26) Source(88, 26) + SourceIndex(0) +8 >Emitted(76, 27) Source(88, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(77, 1) Source(89, 1) + SourceIndex(0) +2 >Emitted(77, 2) Source(89, 2) + SourceIndex(0) +--- +>>>for ((multiRobotAInfo = multiRobotA.slice(0), multiRobotA), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^ +9 > ^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [...multiRobotAInfo] = multiRobotA +7 > +8 > multiRobotA +9 > +10> , +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { +1->Emitted(78, 1) Source(90, 1) + SourceIndex(0) +2 >Emitted(78, 4) Source(90, 4) + SourceIndex(0) +3 >Emitted(78, 5) Source(90, 5) + SourceIndex(0) +4 >Emitted(78, 6) Source(90, 6) + SourceIndex(0) +5 >Emitted(78, 7) Source(90, 6) + SourceIndex(0) +6 >Emitted(78, 45) Source(90, 40) + SourceIndex(0) +7 >Emitted(78, 47) Source(90, 29) + SourceIndex(0) +8 >Emitted(78, 58) Source(90, 40) + SourceIndex(0) +9 >Emitted(78, 59) Source(90, 40) + SourceIndex(0) +10>Emitted(78, 61) Source(90, 42) + SourceIndex(0) +11>Emitted(78, 62) Source(90, 43) + SourceIndex(0) +12>Emitted(78, 65) Source(90, 46) + SourceIndex(0) +13>Emitted(78, 66) Source(90, 47) + SourceIndex(0) +14>Emitted(78, 68) Source(90, 49) + SourceIndex(0) +15>Emitted(78, 69) Source(90, 50) + SourceIndex(0) +16>Emitted(78, 72) Source(90, 53) + SourceIndex(0) +17>Emitted(78, 73) Source(90, 54) + SourceIndex(0) +18>Emitted(78, 75) Source(90, 56) + SourceIndex(0) +19>Emitted(78, 76) Source(90, 57) + SourceIndex(0) +20>Emitted(78, 78) Source(90, 59) + SourceIndex(0) +21>Emitted(78, 80) Source(90, 61) + SourceIndex(0) +22>Emitted(78, 81) Source(90, 62) + SourceIndex(0) +--- +>>> console.log(multiRobotAInfo); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > multiRobotAInfo +7 > ) +8 > ; +1 >Emitted(79, 5) Source(91, 5) + SourceIndex(0) +2 >Emitted(79, 12) Source(91, 12) + SourceIndex(0) +3 >Emitted(79, 13) Source(91, 13) + SourceIndex(0) +4 >Emitted(79, 16) Source(91, 16) + SourceIndex(0) +5 >Emitted(79, 17) Source(91, 17) + SourceIndex(0) +6 >Emitted(79, 32) Source(91, 32) + SourceIndex(0) +7 >Emitted(79, 33) Source(91, 33) + SourceIndex(0) +8 >Emitted(79, 34) Source(91, 34) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(80, 1) Source(92, 1) + SourceIndex(0) +2 >Emitted(80, 2) Source(92, 2) + SourceIndex(0) +--- +>>>for ((_w = getMultiRobot(), multiRobotAInfo = _w.slice(0), _w), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^^^^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [...multiRobotAInfo] = getMultiRobot() +7 > +8 > [...multiRobotAInfo] = getMultiRobot() +9 > +10> , +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { +1->Emitted(81, 1) Source(93, 1) + SourceIndex(0) +2 >Emitted(81, 4) Source(93, 4) + SourceIndex(0) +3 >Emitted(81, 5) Source(93, 5) + SourceIndex(0) +4 >Emitted(81, 6) Source(93, 6) + SourceIndex(0) +5 >Emitted(81, 7) Source(93, 6) + SourceIndex(0) +6 >Emitted(81, 27) Source(93, 44) + SourceIndex(0) +7 >Emitted(81, 29) Source(93, 6) + SourceIndex(0) +8 >Emitted(81, 58) Source(93, 44) + SourceIndex(0) +9 >Emitted(81, 63) Source(93, 44) + SourceIndex(0) +10>Emitted(81, 65) Source(93, 46) + SourceIndex(0) +11>Emitted(81, 66) Source(93, 47) + SourceIndex(0) +12>Emitted(81, 69) Source(93, 50) + SourceIndex(0) +13>Emitted(81, 70) Source(93, 51) + SourceIndex(0) +14>Emitted(81, 72) Source(93, 53) + SourceIndex(0) +15>Emitted(81, 73) Source(93, 54) + SourceIndex(0) +16>Emitted(81, 76) Source(93, 57) + SourceIndex(0) +17>Emitted(81, 77) Source(93, 58) + SourceIndex(0) +18>Emitted(81, 79) Source(93, 60) + SourceIndex(0) +19>Emitted(81, 80) Source(93, 61) + SourceIndex(0) +20>Emitted(81, 82) Source(93, 63) + SourceIndex(0) +21>Emitted(81, 84) Source(93, 65) + SourceIndex(0) +22>Emitted(81, 85) Source(93, 66) + SourceIndex(0) +--- +>>> console.log(multiRobotAInfo); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > multiRobotAInfo +7 > ) +8 > ; +1 >Emitted(82, 5) Source(94, 5) + SourceIndex(0) +2 >Emitted(82, 12) Source(94, 12) + SourceIndex(0) +3 >Emitted(82, 13) Source(94, 13) + SourceIndex(0) +4 >Emitted(82, 16) Source(94, 16) + SourceIndex(0) +5 >Emitted(82, 17) Source(94, 17) + SourceIndex(0) +6 >Emitted(82, 32) Source(94, 32) + SourceIndex(0) +7 >Emitted(82, 33) Source(94, 33) + SourceIndex(0) +8 >Emitted(82, 34) Source(94, 34) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(83, 1) Source(95, 1) + SourceIndex(0) +2 >Emitted(83, 2) Source(95, 2) + SourceIndex(0) +--- +>>>for ((_x = ["trimmer", ["trimming", "edging"]], multiRobotAInfo = _x.slice(0), _x), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^^^^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]] +7 > +8 > [...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]] +9 > +10> , +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { +1->Emitted(84, 1) Source(96, 1) + SourceIndex(0) +2 >Emitted(84, 4) Source(96, 4) + SourceIndex(0) +3 >Emitted(84, 5) Source(96, 5) + SourceIndex(0) +4 >Emitted(84, 6) Source(96, 6) + SourceIndex(0) +5 >Emitted(84, 7) Source(96, 6) + SourceIndex(0) +6 >Emitted(84, 47) Source(96, 83) + SourceIndex(0) +7 >Emitted(84, 49) Source(96, 6) + SourceIndex(0) +8 >Emitted(84, 78) Source(96, 83) + SourceIndex(0) +9 >Emitted(84, 83) Source(96, 83) + SourceIndex(0) +10>Emitted(84, 85) Source(96, 85) + SourceIndex(0) +11>Emitted(84, 86) Source(96, 86) + SourceIndex(0) +12>Emitted(84, 89) Source(96, 89) + SourceIndex(0) +13>Emitted(84, 90) Source(96, 90) + SourceIndex(0) +14>Emitted(84, 92) Source(96, 92) + SourceIndex(0) +15>Emitted(84, 93) Source(96, 93) + SourceIndex(0) +16>Emitted(84, 96) Source(96, 96) + SourceIndex(0) +17>Emitted(84, 97) Source(96, 97) + SourceIndex(0) +18>Emitted(84, 99) Source(96, 99) + SourceIndex(0) +19>Emitted(84, 100) Source(96, 100) + SourceIndex(0) +20>Emitted(84, 102) Source(96, 102) + SourceIndex(0) +21>Emitted(84, 104) Source(96, 104) + SourceIndex(0) +22>Emitted(84, 105) Source(96, 105) + SourceIndex(0) +--- +>>> console.log(multiRobotAInfo); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > multiRobotAInfo +7 > ) +8 > ; +1 >Emitted(85, 5) Source(97, 5) + SourceIndex(0) +2 >Emitted(85, 12) Source(97, 12) + SourceIndex(0) +3 >Emitted(85, 13) Source(97, 13) + SourceIndex(0) +4 >Emitted(85, 16) Source(97, 16) + SourceIndex(0) +5 >Emitted(85, 17) Source(97, 17) + SourceIndex(0) +6 >Emitted(85, 32) Source(97, 32) + SourceIndex(0) +7 >Emitted(85, 33) Source(97, 33) + SourceIndex(0) +8 >Emitted(85, 34) Source(97, 34) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(86, 1) Source(98, 1) + SourceIndex(0) +2 >Emitted(86, 2) Source(98, 2) + SourceIndex(0) +--- +>>>var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x; +>>>//# sourceMappingURL=sourceMapValidationDestructuringForArrayBindingPattern2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.symbols b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.symbols new file mode 100644 index 00000000000..5c269a42043 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.symbols @@ -0,0 +1,390 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPattern2.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 11)) + + log(msg: any): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 1, 8)) +} +type Robot = [number, string, string]; +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 2, 1)) + +type MultiSkilledRobot = [string, [string, string]]; +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 3, 38)) + +let robotA: Robot = [1, "mower", "mowing"]; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 6, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 2, 1)) + +function getRobot() { +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 6, 43)) + + return robotA; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 6, 3)) +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 11, 3)) +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 3, 38)) + +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 12, 3)) +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 3, 38)) + +function getMultiRobot() { +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 12, 73)) + + return multiRobotA; +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 11, 3)) +} + +let nameA: string, primarySkillA: string, secondarySkillA: string; +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 17, 3)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 17, 18)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 17, 41)) + +let numberB: number, nameB: string; +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 18, 3)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 18, 20)) + +let numberA2: number, nameA2: string, skillA2: string, nameMA: string; +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 19, 3)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 19, 21)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 19, 37)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 19, 54)) + +let numberA3: number, robotAInfo: (number | string)[], multiRobotAInfo: (string | [string, string])[]; +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 20, 3)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 20, 21)) +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 20, 54)) + +let i: number; +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) + +for ([, nameA] = robotA, i = 0; i < 1; i++) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 17, 3)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 6, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 17, 3)) +} +for ([, nameA] = getRobot(), i = 0; i < 1; i++) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 17, 3)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 6, 43)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 17, 3)) +} +for ([, nameA] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 17, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 17, 3)) +} +for ([, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 17, 18)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 17, 41)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 11, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) + + console.log(primarySkillA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 17, 18)) +} +for ([, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 17, 18)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 17, 41)) +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 12, 73)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) + + console.log(primarySkillA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 17, 18)) +} +for ([, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 17, 18)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 17, 41)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) + + console.log(primarySkillA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 17, 18)) +} + +for ([numberB] = robotA, i = 0; i < 1; i++) { +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 18, 3)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 6, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) + + console.log(numberB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 18, 3)) +} +for ([numberB] = getRobot(), i = 0; i < 1; i++) { +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 18, 3)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 6, 43)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) + + console.log(numberB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 18, 3)) +} +for ([numberB] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 18, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) + + console.log(numberB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 18, 3)) +} +for ([nameB] = multiRobotA, i = 0; i < 1; i++) { +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 18, 20)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 11, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) + + console.log(nameB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 18, 20)) +} +for ([nameB] = getMultiRobot(), i = 0; i < 1; i++) { +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 18, 20)) +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 12, 73)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) + + console.log(nameB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 18, 20)) +} +for ([nameB] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 18, 20)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) + + console.log(nameB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 18, 20)) +} + +for ([numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 19, 3)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 19, 21)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 19, 37)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 6, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) + + console.log(nameA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 19, 21)) +} +for ([numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 19, 3)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 19, 21)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 19, 37)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 6, 43)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) + + console.log(nameA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 19, 21)) +} +for ([numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 19, 3)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 19, 21)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 19, 37)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) + + console.log(nameA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 19, 21)) +} +for ([nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 19, 54)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 17, 18)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 17, 41)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 11, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) + + console.log(nameMA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 19, 54)) +} +for ([nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 19, 54)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 17, 18)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 17, 41)) +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 12, 73)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) + + console.log(nameMA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 19, 54)) +} +for ([nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 19, 54)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 17, 18)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 17, 41)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) + + console.log(nameMA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 19, 54)) +} + +for ([numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 20, 3)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 20, 21)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 6, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) + + console.log(numberA3); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 20, 3)) +} +for ([numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 20, 3)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 20, 21)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 6, 43)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) + + console.log(numberA3); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 20, 3)) +} +for ([numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 20, 3)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 20, 21)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 2, 1)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) + + console.log(numberA3); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 20, 3)) +} +for ([...multiRobotAInfo] = multiRobotA, i = 0; i < 1; i++) { +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 20, 54)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 11, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) + + console.log(multiRobotAInfo); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 20, 54)) +} +for ([...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 20, 54)) +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 12, 73)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) + + console.log(multiRobotAInfo); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 20, 54)) +} +for ([...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 20, 54)) +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 3, 38)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 21, 3)) + + console.log(multiRobotAInfo); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 0, 22)) +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPattern2.ts, 20, 54)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.types b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.types new file mode 100644 index 00000000000..a50f506262d --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.types @@ -0,0 +1,684 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPattern2.ts === +declare var console: { +>console : { log(msg: any): void; } + + log(msg: any): void; +>log : (msg: any) => void +>msg : any +} +type Robot = [number, string, string]; +>Robot : [number, string, string] + +type MultiSkilledRobot = [string, [string, string]]; +>MultiSkilledRobot : [string, [string, string]] + +let robotA: Robot = [1, "mower", "mowing"]; +>robotA : [number, string, string] +>Robot : [number, string, string] +>[1, "mower", "mowing"] : [number, string, string] +>1 : number +>"mower" : string +>"mowing" : string + +function getRobot() { +>getRobot : () => [number, string, string] + + return robotA; +>robotA : [number, string, string] +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +>multiRobotA : [string, [string, string]] +>MultiSkilledRobot : [string, [string, string]] +>["mower", ["mowing", ""]] : [string, [string, string]] +>"mower" : string +>["mowing", ""] : [string, string] +>"mowing" : string +>"" : string + +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +>multiRobotB : [string, [string, string]] +>MultiSkilledRobot : [string, [string, string]] +>["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>"trimmer" : string +>["trimming", "edging"] : [string, string] +>"trimming" : string +>"edging" : string + +function getMultiRobot() { +>getMultiRobot : () => [string, [string, string]] + + return multiRobotA; +>multiRobotA : [string, [string, string]] +} + +let nameA: string, primarySkillA: string, secondarySkillA: string; +>nameA : string +>primarySkillA : string +>secondarySkillA : string + +let numberB: number, nameB: string; +>numberB : number +>nameB : string + +let numberA2: number, nameA2: string, skillA2: string, nameMA: string; +>numberA2 : number +>nameA2 : string +>skillA2 : string +>nameMA : string + +let numberA3: number, robotAInfo: (number | string)[], multiRobotAInfo: (string | [string, string])[]; +>numberA3 : number +>robotAInfo : (number | string)[] +>multiRobotAInfo : (string | [string, string])[] + +let i: number; +>i : number + +for ([, nameA] = robotA, i = 0; i < 1; i++) { +>[, nameA] = robotA, i = 0 : number +>[, nameA] = robotA : [number, string, string] +>[, nameA] : [undefined, string] +> : undefined +>nameA : string +>robotA : [number, string, string] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ([, nameA] = getRobot(), i = 0; i < 1; i++) { +>[, nameA] = getRobot(), i = 0 : number +>[, nameA] = getRobot() : [number, string, string] +>[, nameA] : [undefined, string] +> : undefined +>nameA : string +>getRobot() : [number, string, string] +>getRobot : () => [number, string, string] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ([, nameA] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>[, nameA] = [2, "trimmer", "trimming"], i = 0 : number +>[, nameA] = [2, "trimmer", "trimming"] : [number, string, string] +>[, nameA] : [undefined, string] +> : undefined +>nameA : string +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ([, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { +>[, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0 : number +>[, [primarySkillA, secondarySkillA]] = multiRobotA : [string, [string, string]] +>[, [primarySkillA, secondarySkillA]] : [undefined, [string, string]] +> : undefined +>[primarySkillA, secondarySkillA] : [string, string] +>primarySkillA : string +>secondarySkillA : string +>multiRobotA : [string, [string, string]] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primarySkillA); +>console.log(primarySkillA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primarySkillA : string +} +for ([, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { +>[, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0 : number +>[, [primarySkillA, secondarySkillA]] = getMultiRobot() : [string, [string, string]] +>[, [primarySkillA, secondarySkillA]] : [undefined, [string, string]] +> : undefined +>[primarySkillA, secondarySkillA] : [string, string] +>primarySkillA : string +>secondarySkillA : string +>getMultiRobot() : [string, [string, string]] +>getMultiRobot : () => [string, [string, string]] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primarySkillA); +>console.log(primarySkillA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primarySkillA : string +} +for ([, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +>[, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0 : number +>[, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>[, [primarySkillA, secondarySkillA]] : [undefined, [string, string]] +> : undefined +>[primarySkillA, secondarySkillA] : [string, string] +>primarySkillA : string +>secondarySkillA : string +>["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>"trimmer" : string +>["trimming", "edging"] : [string, string] +>"trimming" : string +>"edging" : string +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primarySkillA); +>console.log(primarySkillA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primarySkillA : string +} + +for ([numberB] = robotA, i = 0; i < 1; i++) { +>[numberB] = robotA, i = 0 : number +>[numberB] = robotA : [number, string, string] +>[numberB] : [number] +>numberB : number +>robotA : [number, string, string] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(numberB); +>console.log(numberB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberB : number +} +for ([numberB] = getRobot(), i = 0; i < 1; i++) { +>[numberB] = getRobot(), i = 0 : number +>[numberB] = getRobot() : [number, string, string] +>[numberB] : [number] +>numberB : number +>getRobot() : [number, string, string] +>getRobot : () => [number, string, string] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(numberB); +>console.log(numberB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberB : number +} +for ([numberB] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>[numberB] = [2, "trimmer", "trimming"], i = 0 : number +>[numberB] = [2, "trimmer", "trimming"] : [number, string, string] +>[numberB] : [number] +>numberB : number +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(numberB); +>console.log(numberB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberB : number +} +for ([nameB] = multiRobotA, i = 0; i < 1; i++) { +>[nameB] = multiRobotA, i = 0 : number +>[nameB] = multiRobotA : [string, [string, string]] +>[nameB] : [string] +>nameB : string +>multiRobotA : [string, [string, string]] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameB); +>console.log(nameB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameB : string +} +for ([nameB] = getMultiRobot(), i = 0; i < 1; i++) { +>[nameB] = getMultiRobot(), i = 0 : number +>[nameB] = getMultiRobot() : [string, [string, string]] +>[nameB] : [string] +>nameB : string +>getMultiRobot() : [string, [string, string]] +>getMultiRobot : () => [string, [string, string]] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameB); +>console.log(nameB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameB : string +} +for ([nameB] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +>[nameB] = ["trimmer", ["trimming", "edging"]], i = 0 : number +>[nameB] = ["trimmer", ["trimming", "edging"]] : [string, string[]] +>[nameB] : [string] +>nameB : string +>["trimmer", ["trimming", "edging"]] : [string, string[]] +>"trimmer" : string +>["trimming", "edging"] : string[] +>"trimming" : string +>"edging" : string +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameB); +>console.log(nameB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameB : string +} + +for ([numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { +>[numberA2, nameA2, skillA2] = robotA, i = 0 : number +>[numberA2, nameA2, skillA2] = robotA : [number, string, string] +>[numberA2, nameA2, skillA2] : [number, string, string] +>numberA2 : number +>nameA2 : string +>skillA2 : string +>robotA : [number, string, string] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA2); +>console.log(nameA2) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA2 : string +} +for ([numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { +>[numberA2, nameA2, skillA2] = getRobot(), i = 0 : number +>[numberA2, nameA2, skillA2] = getRobot() : [number, string, string] +>[numberA2, nameA2, skillA2] : [number, string, string] +>numberA2 : number +>nameA2 : string +>skillA2 : string +>getRobot() : [number, string, string] +>getRobot : () => [number, string, string] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA2); +>console.log(nameA2) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA2 : string +} +for ([numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>[numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0 : number +>[numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"] : [number, string, string] +>[numberA2, nameA2, skillA2] : [number, string, string] +>numberA2 : number +>nameA2 : string +>skillA2 : string +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA2); +>console.log(nameA2) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA2 : string +} +for ([nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { +>[nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0 : number +>[nameMA, [primarySkillA, secondarySkillA]] = multiRobotA : [string, [string, string]] +>[nameMA, [primarySkillA, secondarySkillA]] : [string, [string, string]] +>nameMA : string +>[primarySkillA, secondarySkillA] : [string, string] +>primarySkillA : string +>secondarySkillA : string +>multiRobotA : [string, [string, string]] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameMA); +>console.log(nameMA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMA : string +} +for ([nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { +>[nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0 : number +>[nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot() : [string, [string, string]] +>[nameMA, [primarySkillA, secondarySkillA]] : [string, [string, string]] +>nameMA : string +>[primarySkillA, secondarySkillA] : [string, string] +>primarySkillA : string +>secondarySkillA : string +>getMultiRobot() : [string, [string, string]] +>getMultiRobot : () => [string, [string, string]] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameMA); +>console.log(nameMA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMA : string +} +for ([nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +>[nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0 : number +>[nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>[nameMA, [primarySkillA, secondarySkillA]] : [string, [string, string]] +>nameMA : string +>[primarySkillA, secondarySkillA] : [string, string] +>primarySkillA : string +>secondarySkillA : string +>["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>"trimmer" : string +>["trimming", "edging"] : [string, string] +>"trimming" : string +>"edging" : string +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameMA); +>console.log(nameMA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMA : string +} + +for ([numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { +>[numberA3, ...robotAInfo] = robotA, i = 0 : number +>[numberA3, ...robotAInfo] = robotA : [number, string, string] +>[numberA3, ...robotAInfo] : (number | string)[] +>numberA3 : number +>...robotAInfo : number | string +>robotAInfo : (number | string)[] +>robotA : [number, string, string] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(numberA3); +>console.log(numberA3) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberA3 : number +} +for ([numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { +>[numberA3, ...robotAInfo] = getRobot(), i = 0 : number +>[numberA3, ...robotAInfo] = getRobot() : [number, string, string] +>[numberA3, ...robotAInfo] : (number | string)[] +>numberA3 : number +>...robotAInfo : number | string +>robotAInfo : (number | string)[] +>getRobot() : [number, string, string] +>getRobot : () => [number, string, string] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(numberA3); +>console.log(numberA3) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberA3 : number +} +for ([numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>[numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0 : number +>[numberA3, ...robotAInfo] = [2, "trimmer", "trimming"] : [number, string, string] +>[numberA3, ...robotAInfo] : (number | string)[] +>numberA3 : number +>...robotAInfo : number | string +>robotAInfo : (number | string)[] +>[2, "trimmer", "trimming"] : [number, string, string] +>Robot : [number, string, string] +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(numberA3); +>console.log(numberA3) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberA3 : number +} +for ([...multiRobotAInfo] = multiRobotA, i = 0; i < 1; i++) { +>[...multiRobotAInfo] = multiRobotA, i = 0 : number +>[...multiRobotAInfo] = multiRobotA : [string, [string, string]] +>[...multiRobotAInfo] : (string | [string, string])[] +>...multiRobotAInfo : string | [string, string] +>multiRobotAInfo : (string | [string, string])[] +>multiRobotA : [string, [string, string]] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(multiRobotAInfo); +>console.log(multiRobotAInfo) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>multiRobotAInfo : (string | [string, string])[] +} +for ([...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { +>[...multiRobotAInfo] = getMultiRobot(), i = 0 : number +>[...multiRobotAInfo] = getMultiRobot() : [string, [string, string]] +>[...multiRobotAInfo] : (string | [string, string])[] +>...multiRobotAInfo : string | [string, string] +>multiRobotAInfo : (string | [string, string])[] +>getMultiRobot() : [string, [string, string]] +>getMultiRobot : () => [string, [string, string]] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(multiRobotAInfo); +>console.log(multiRobotAInfo) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>multiRobotAInfo : (string | [string, string])[] +} +for ([...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +>[...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0 : number +>[...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>[...multiRobotAInfo] : (string | [string, string])[] +>...multiRobotAInfo : string | [string, string] +>multiRobotAInfo : (string | [string, string])[] +>["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>MultiSkilledRobot : [string, [string, string]] +>["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>"trimmer" : string +>["trimming", "edging"] : [string, string] +>"trimming" : string +>"edging" : string +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(multiRobotAInfo); +>console.log(multiRobotAInfo) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>multiRobotAInfo : (string | [string, string])[] +} diff --git a/tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPattern2.ts b/tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPattern2.ts new file mode 100644 index 00000000000..597f40afe86 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPattern2.ts @@ -0,0 +1,99 @@ +// @sourcemap: true +declare var console: { + log(msg: any): void; +} +type Robot = [number, string, string]; +type MultiSkilledRobot = [string, [string, string]]; + +let robotA: Robot = [1, "mower", "mowing"]; +function getRobot() { + return robotA; +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +function getMultiRobot() { + return multiRobotA; +} + +let nameA: string, primarySkillA: string, secondarySkillA: string; +let numberB: number, nameB: string; +let numberA2: number, nameA2: string, skillA2: string, nameMA: string; +let numberA3: number, robotAInfo: (number | string)[], multiRobotAInfo: (string | [string, string])[]; +let i: number; + +for ([, nameA] = robotA, i = 0; i < 1; i++) { + console.log(nameA); +} +for ([, nameA] = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for ([, nameA] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(nameA); +} +for ([, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for ([, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for ([, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(primarySkillA); +} + +for ([numberB] = robotA, i = 0; i < 1; i++) { + console.log(numberB); +} +for ([numberB] = getRobot(), i = 0; i < 1; i++) { + console.log(numberB); +} +for ([numberB] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(numberB); +} +for ([nameB] = multiRobotA, i = 0; i < 1; i++) { + console.log(nameB); +} +for ([nameB] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(nameB); +} +for ([nameB] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(nameB); +} + +for ([numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { + console.log(nameA2); +} +for ([numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { + console.log(nameA2); +} +for ([numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(nameA2); +} +for ([nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + console.log(nameMA); +} +for ([nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(nameMA); +} +for ([nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(nameMA); +} + +for ([numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + console.log(numberA3); +} +for ([numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + console.log(numberA3); +} +for ([numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(numberA3); +} +for ([...multiRobotAInfo] = multiRobotA, i = 0; i < 1; i++) { + console.log(multiRobotAInfo); +} +for ([...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(multiRobotAInfo); +} +for ([...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(multiRobotAInfo); +} \ No newline at end of file From 67d28777185a664e1a76e738d14bccd0abae5533 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 8 Dec 2015 17:13:58 -0800 Subject: [PATCH 034/209] Test case for "For" that initializes vars using object literal binding pattern --- ...onDestructuringForObjectBindingPattern2.js | 201 ++ ...structuringForObjectBindingPattern2.js.map | 2 + ...ringForObjectBindingPattern2.sourcemap.txt | 3073 +++++++++++++++++ ...tructuringForObjectBindingPattern2.symbols | 490 +++ ...estructuringForObjectBindingPattern2.types | 774 +++++ ...onDestructuringForObjectBindingPattern2.ts | 111 + 6 files changed, 4651 insertions(+) create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.types create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPattern2.ts diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.js b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.js new file mode 100644 index 00000000000..f7073765d04 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.js @@ -0,0 +1,201 @@ +//// [sourceMapValidationDestructuringForObjectBindingPattern2.ts] +declare var console: { + log(msg: any): void; +} +interface Robot { + name: string; + skill: string; +} + +interface MultiRobot { + name: string; + skills: { + primary: string; + secondary: string; + }; +} + +let robot: Robot = { name: "mower", skill: "mowing" }; +let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +function getRobot() { + return robot; +} +function getMultiRobot() { + return multiRobot; +} + +let nameA: string, primaryA: string, secondaryA: string, i: number, skillA: string; +let name: string, primary: string, secondary: string, skill: string; + +for ({ name: nameA } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name: nameA } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name: nameA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ skills: { primary: primaryA, secondary: secondaryA } } = + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ name } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ skills: { primary, secondary } } = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ skills: { primary, secondary } } = + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} + + +for ({ name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ name, skill } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name, skill } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name, skill } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name, skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ name, skills: { primary, secondary } } = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ name, skills: { primary, secondary } } = + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} + +//// [sourceMapValidationDestructuringForObjectBindingPattern2.js] +var robot = { name: "mower", skill: "mowing" }; +var multiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +function getRobot() { + return robot; +} +function getMultiRobot() { + return multiRobot; +} +var nameA, primaryA, secondaryA, i, skillA; +var name, primary, secondary, skill; +for ((nameA = robot.name, robot), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_a = getRobot(), nameA = _a.name, _a), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_b = { name: "trimmer", skill: "trimming" }, nameA = _b.name, _b), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_c = multiRobot.skills, primaryA = _c.primary, secondaryA = _c.secondary, multiRobot), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ((_d = getMultiRobot(), _e = _d.skills, primaryA = _e.primary, secondaryA = _e.secondary, _d), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ((_f = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, _g = _f.skills, primaryA = _g.primary, secondaryA = _g.secondary, _f), + i = 0; i < 1; i++) { + console.log(primaryA); +} +for ((name = robot.name, robot), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_h = getRobot(), name = _h.name, _h), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_j = { name: "trimmer", skill: "trimming" }, name = _j.name, _j), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_k = multiRobot.skills, primary = _k.primary, secondary = _k.secondary, multiRobot), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ((_l = getMultiRobot(), _m = _l.skills, primary = _m.primary, secondary = _m.secondary, _l), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ((_o = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, _p = _o.skills, primary = _p.primary, secondary = _p.secondary, _o), + i = 0; i < 1; i++) { + console.log(primaryA); +} +for ((nameA = robot.name, skillA = robot.skill, robot), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_q = getRobot(), nameA = _q.name, skillA = _q.skill, _q), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_r = { name: "trimmer", skill: "trimming" }, nameA = _r.name, skillA = _r.skill, _r), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((nameA = multiRobot.name, _s = multiRobot.skills, primaryA = _s.primary, secondaryA = _s.secondary, multiRobot), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ((_t = getMultiRobot(), nameA = _t.name, _u = _t.skills, primaryA = _u.primary, secondaryA = _u.secondary, _t), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ((_v = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, nameA = _v.name, _w = _v.skills, primaryA = _w.primary, secondaryA = _w.secondary, _v), + i = 0; i < 1; i++) { + console.log(primaryA); +} +for ((name = robot.name, skill = robot.skill, robot), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_x = getRobot(), name = _x.name, skill = _x.skill, _x), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_y = { name: "trimmer", skill: "trimming" }, name = _y.name, skill = _y.skill, _y), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((name = multiRobot.name, _z = multiRobot.skills, primary = _z.primary, secondary = _z.secondary, multiRobot), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ((_0 = getMultiRobot(), name = _0.name, _1 = _0.skills, primary = _1.primary, secondary = _1.secondary, _0), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ((_2 = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, name = _2.name, _3 = _2.skills, primary = _3.primary, secondary = _3.secondary, _2), + i = 0; i < 1; i++) { + console.log(primaryA); +} +var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3; +//# sourceMappingURL=sourceMapValidationDestructuringForObjectBindingPattern2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.js.map new file mode 100644 index 00000000000..6c59f512b0e --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringForObjectBindingPattern2.js.map] +{"version":3,"file":"sourceMapValidationDestructuringForObjectBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForObjectBindingPattern2.ts"],"names":[],"mappings":"AAgBA,IAAI,KAAK,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACtD,IAAI,UAAU,GAAe,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;AACjG;IACI,MAAM,CAAC,KAAK,CAAC;AACjB,CAAC;AACD;IACI,MAAM,CAAC,UAAU,CAAC;AACtB,CAAC;AAED,IAAI,KAAa,EAAE,QAAgB,EAAE,UAAkB,EAAE,CAAS,EAAE,MAAc,CAAC;AACnF,IAAI,IAAY,EAAE,OAAe,EAAE,SAAiB,EAAE,KAAa,CAAC;AAEpE,GAAG,CAAC,CAAC,CAAE,kBAAW,EAAK,KAAK,CAAA,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC9C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,eAA4B,EAA1B,eAAW,KAAe,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACnD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,2CAA+D,EAA7D,eAAW,KAAkD,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,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O,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,2CAA+D,EAA7D,cAAI,EAAE,gBAAK,KAAkD,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACtF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,CAAE,sBAAI,EAAE,sBAAM,EAAI,oBAAO,EAAE,wBAAS,EAAO,UAAU,CAAA,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC5E,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,oBAA0D,EAAxD,cAAI,EAAE,cAAM,EAAI,oBAAO,EAAE,wBAAS,KAAsB,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjF,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,8EACoF,EADlF,cAAI,EAAE,cAAM,EAAI,oBAAO,EAAE,wBAAS,KACgD;IACrF,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACpB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.sourcemap.txt new file mode 100644 index 00000000000..0659ec2fcee --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.sourcemap.txt @@ -0,0 +1,3073 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringForObjectBindingPattern2.js +mapUrl: sourceMapValidationDestructuringForObjectBindingPattern2.js.map +sourceRoot: +sources: sourceMapValidationDestructuringForObjectBindingPattern2.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPattern2.js +sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts +------------------------------------------------------------------- +>>>var robot = { name: "mower", skill: "mowing" }; +1 > +2 >^^^^ +3 > ^^^^^ +4 > ^^^ +5 > ^^ +6 > ^^^^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^ +11> ^^ +12> ^^^^^^^^ +13> ^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 >declare var console: { + > log(msg: any): void; + >} + >interface Robot { + > name: string; + > skill: string; + >} + > + >interface MultiRobot { + > name: string; + > skills: { + > primary: string; + > secondary: string; + > }; + >} + > + > +2 >let +3 > robot +4 > : Robot = +5 > { +6 > name +7 > : +8 > "mower" +9 > , +10> skill +11> : +12> "mowing" +13> } +14> ; +1 >Emitted(1, 1) Source(17, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(17, 5) + SourceIndex(0) +3 >Emitted(1, 10) Source(17, 10) + SourceIndex(0) +4 >Emitted(1, 13) Source(17, 20) + SourceIndex(0) +5 >Emitted(1, 15) Source(17, 22) + SourceIndex(0) +6 >Emitted(1, 19) Source(17, 26) + SourceIndex(0) +7 >Emitted(1, 21) Source(17, 28) + SourceIndex(0) +8 >Emitted(1, 28) Source(17, 35) + SourceIndex(0) +9 >Emitted(1, 30) Source(17, 37) + SourceIndex(0) +10>Emitted(1, 35) Source(17, 42) + SourceIndex(0) +11>Emitted(1, 37) Source(17, 44) + SourceIndex(0) +12>Emitted(1, 45) Source(17, 52) + SourceIndex(0) +13>Emitted(1, 47) Source(17, 54) + SourceIndex(0) +14>Emitted(1, 48) Source(17, 55) + SourceIndex(0) +--- +>>>var multiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +1-> +2 >^^^^ +3 > ^^^^^^^^^^ +4 > ^^^ +5 > ^^ +6 > ^^^^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^^ +12> ^^ +13> ^^^^^^^ +14> ^^ +15> ^^^^^^^^ +16> ^^ +17> ^^^^^^^^^ +18> ^^ +19> ^^^^^^ +20> ^^ +21> ^^ +22> ^ +1-> + > +2 >let +3 > multiRobot +4 > : MultiRobot = +5 > { +6 > name +7 > : +8 > "mower" +9 > , +10> skills +11> : +12> { +13> primary +14> : +15> "mowing" +16> , +17> secondary +18> : +19> "none" +20> } +21> } +22> ; +1->Emitted(2, 1) Source(18, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(18, 5) + SourceIndex(0) +3 >Emitted(2, 15) Source(18, 15) + SourceIndex(0) +4 >Emitted(2, 18) Source(18, 30) + SourceIndex(0) +5 >Emitted(2, 20) Source(18, 32) + SourceIndex(0) +6 >Emitted(2, 24) Source(18, 36) + SourceIndex(0) +7 >Emitted(2, 26) Source(18, 38) + SourceIndex(0) +8 >Emitted(2, 33) Source(18, 45) + SourceIndex(0) +9 >Emitted(2, 35) Source(18, 47) + SourceIndex(0) +10>Emitted(2, 41) Source(18, 53) + SourceIndex(0) +11>Emitted(2, 43) Source(18, 55) + SourceIndex(0) +12>Emitted(2, 45) Source(18, 57) + SourceIndex(0) +13>Emitted(2, 52) Source(18, 64) + SourceIndex(0) +14>Emitted(2, 54) Source(18, 66) + SourceIndex(0) +15>Emitted(2, 62) Source(18, 74) + SourceIndex(0) +16>Emitted(2, 64) Source(18, 76) + SourceIndex(0) +17>Emitted(2, 73) Source(18, 85) + SourceIndex(0) +18>Emitted(2, 75) Source(18, 87) + SourceIndex(0) +19>Emitted(2, 81) Source(18, 93) + SourceIndex(0) +20>Emitted(2, 83) Source(18, 95) + SourceIndex(0) +21>Emitted(2, 85) Source(18, 97) + SourceIndex(0) +22>Emitted(2, 86) Source(18, 98) + SourceIndex(0) +--- +>>>function getRobot() { +1 > +2 >^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(3, 1) Source(19, 1) + SourceIndex(0) +--- +>>> return robot; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^ +5 > ^ +1->function getRobot() { + > +2 > return +3 > +4 > robot +5 > ; +1->Emitted(4, 5) Source(20, 5) + SourceIndex(0) +2 >Emitted(4, 11) Source(20, 11) + SourceIndex(0) +3 >Emitted(4, 12) Source(20, 12) + SourceIndex(0) +4 >Emitted(4, 17) Source(20, 17) + SourceIndex(0) +5 >Emitted(4, 18) Source(20, 18) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(5, 1) Source(21, 1) + SourceIndex(0) +2 >Emitted(5, 2) Source(21, 2) + SourceIndex(0) +--- +>>>function getMultiRobot() { +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +1->Emitted(6, 1) Source(22, 1) + SourceIndex(0) +--- +>>> return multiRobot; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^^^^^ +5 > ^ +1->function getMultiRobot() { + > +2 > return +3 > +4 > multiRobot +5 > ; +1->Emitted(7, 5) Source(23, 5) + SourceIndex(0) +2 >Emitted(7, 11) Source(23, 11) + SourceIndex(0) +3 >Emitted(7, 12) Source(23, 12) + SourceIndex(0) +4 >Emitted(7, 22) Source(23, 22) + SourceIndex(0) +5 >Emitted(7, 23) Source(23, 23) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(8, 1) Source(24, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(24, 2) + SourceIndex(0) +--- +>>>var nameA, primaryA, secondaryA, i, skillA; +1-> +2 >^^^^ +3 > ^^^^^ +4 > ^^ +5 > ^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^ +11> ^^^^^^ +12> ^ +1-> + > + > +2 >let +3 > nameA: string +4 > , +5 > primaryA: string +6 > , +7 > secondaryA: string +8 > , +9 > i: number +10> , +11> skillA: string +12> ; +1->Emitted(9, 1) Source(26, 1) + SourceIndex(0) +2 >Emitted(9, 5) Source(26, 5) + SourceIndex(0) +3 >Emitted(9, 10) Source(26, 18) + SourceIndex(0) +4 >Emitted(9, 12) Source(26, 20) + SourceIndex(0) +5 >Emitted(9, 20) Source(26, 36) + SourceIndex(0) +6 >Emitted(9, 22) Source(26, 38) + SourceIndex(0) +7 >Emitted(9, 32) Source(26, 56) + SourceIndex(0) +8 >Emitted(9, 34) Source(26, 58) + SourceIndex(0) +9 >Emitted(9, 35) Source(26, 67) + SourceIndex(0) +10>Emitted(9, 37) Source(26, 69) + SourceIndex(0) +11>Emitted(9, 43) Source(26, 83) + SourceIndex(0) +12>Emitted(9, 44) Source(26, 84) + SourceIndex(0) +--- +>>>var name, primary, secondary, skill; +1 > +2 >^^^^ +3 > ^^^^ +4 > ^^ +5 > ^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^ +8 > ^^ +9 > ^^^^^ +10> ^ +11> ^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >let +3 > name: string +4 > , +5 > primary: string +6 > , +7 > secondary: string +8 > , +9 > skill: string +10> ; +1 >Emitted(10, 1) Source(27, 1) + SourceIndex(0) +2 >Emitted(10, 5) Source(27, 5) + SourceIndex(0) +3 >Emitted(10, 9) Source(27, 17) + SourceIndex(0) +4 >Emitted(10, 11) Source(27, 19) + SourceIndex(0) +5 >Emitted(10, 18) Source(27, 34) + SourceIndex(0) +6 >Emitted(10, 20) Source(27, 36) + SourceIndex(0) +7 >Emitted(10, 29) Source(27, 53) + SourceIndex(0) +8 >Emitted(10, 31) Source(27, 55) + SourceIndex(0) +9 >Emitted(10, 36) Source(27, 68) + SourceIndex(0) +10>Emitted(10, 37) Source(27, 69) + SourceIndex(0) +--- +>>>for ((nameA = robot.name, robot), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^ +9 > ^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ +1-> + > + > +2 >for +3 > +4 > ( +5 > { +6 > name: nameA +7 > } = +8 > robot +9 > +10> , +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { +1->Emitted(11, 1) Source(29, 1) + SourceIndex(0) +2 >Emitted(11, 4) Source(29, 4) + SourceIndex(0) +3 >Emitted(11, 5) Source(29, 5) + SourceIndex(0) +4 >Emitted(11, 6) Source(29, 6) + SourceIndex(0) +5 >Emitted(11, 7) Source(29, 8) + SourceIndex(0) +6 >Emitted(11, 25) Source(29, 19) + SourceIndex(0) +7 >Emitted(11, 27) Source(29, 24) + SourceIndex(0) +8 >Emitted(11, 32) Source(29, 29) + SourceIndex(0) +9 >Emitted(11, 33) Source(29, 29) + SourceIndex(0) +10>Emitted(11, 35) Source(29, 31) + SourceIndex(0) +11>Emitted(11, 36) Source(29, 32) + SourceIndex(0) +12>Emitted(11, 39) Source(29, 35) + SourceIndex(0) +13>Emitted(11, 40) Source(29, 36) + SourceIndex(0) +14>Emitted(11, 42) Source(29, 38) + SourceIndex(0) +15>Emitted(11, 43) Source(29, 39) + SourceIndex(0) +16>Emitted(11, 46) Source(29, 42) + SourceIndex(0) +17>Emitted(11, 47) Source(29, 43) + SourceIndex(0) +18>Emitted(11, 49) Source(29, 45) + SourceIndex(0) +19>Emitted(11, 50) Source(29, 46) + SourceIndex(0) +20>Emitted(11, 52) Source(29, 48) + SourceIndex(0) +21>Emitted(11, 54) Source(29, 50) + SourceIndex(0) +22>Emitted(11, 55) Source(29, 51) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(12, 5) Source(30, 5) + SourceIndex(0) +2 >Emitted(12, 12) Source(30, 12) + SourceIndex(0) +3 >Emitted(12, 13) Source(30, 13) + SourceIndex(0) +4 >Emitted(12, 16) Source(30, 16) + SourceIndex(0) +5 >Emitted(12, 17) Source(30, 17) + SourceIndex(0) +6 >Emitted(12, 22) Source(30, 22) + SourceIndex(0) +7 >Emitted(12, 23) Source(30, 23) + SourceIndex(0) +8 >Emitted(12, 24) Source(30, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(13, 1) Source(31, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(31, 2) + SourceIndex(0) +--- +>>>for ((_a = getRobot(), nameA = _a.name, _a), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^ +9 > ^^^^^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { name: nameA } = getRobot() +7 > +8 > name: nameA +9 > } = getRobot() +10> , +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { +1->Emitted(14, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(14, 4) Source(32, 4) + SourceIndex(0) +3 >Emitted(14, 5) Source(32, 5) + SourceIndex(0) +4 >Emitted(14, 6) Source(32, 6) + SourceIndex(0) +5 >Emitted(14, 7) Source(32, 6) + SourceIndex(0) +6 >Emitted(14, 22) Source(32, 34) + SourceIndex(0) +7 >Emitted(14, 24) Source(32, 8) + SourceIndex(0) +8 >Emitted(14, 39) Source(32, 19) + SourceIndex(0) +9 >Emitted(14, 44) Source(32, 34) + SourceIndex(0) +10>Emitted(14, 46) Source(32, 36) + SourceIndex(0) +11>Emitted(14, 47) Source(32, 37) + SourceIndex(0) +12>Emitted(14, 50) Source(32, 40) + SourceIndex(0) +13>Emitted(14, 51) Source(32, 41) + SourceIndex(0) +14>Emitted(14, 53) Source(32, 43) + SourceIndex(0) +15>Emitted(14, 54) Source(32, 44) + SourceIndex(0) +16>Emitted(14, 57) Source(32, 47) + SourceIndex(0) +17>Emitted(14, 58) Source(32, 48) + SourceIndex(0) +18>Emitted(14, 60) Source(32, 50) + SourceIndex(0) +19>Emitted(14, 61) Source(32, 51) + SourceIndex(0) +20>Emitted(14, 63) Source(32, 53) + SourceIndex(0) +21>Emitted(14, 65) Source(32, 55) + SourceIndex(0) +22>Emitted(14, 66) Source(32, 56) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(15, 5) Source(33, 5) + SourceIndex(0) +2 >Emitted(15, 12) Source(33, 12) + SourceIndex(0) +3 >Emitted(15, 13) Source(33, 13) + SourceIndex(0) +4 >Emitted(15, 16) Source(33, 16) + SourceIndex(0) +5 >Emitted(15, 17) Source(33, 17) + SourceIndex(0) +6 >Emitted(15, 22) Source(33, 22) + SourceIndex(0) +7 >Emitted(15, 23) Source(33, 23) + SourceIndex(0) +8 >Emitted(15, 24) Source(33, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(16, 1) Source(34, 1) + SourceIndex(0) +2 >Emitted(16, 2) Source(34, 2) + SourceIndex(0) +--- +>>>for ((_b = { name: "trimmer", skill: "trimming" }, nameA = _b.name, _b), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^ +9 > ^^^^^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { name: nameA } = { name: "trimmer", skill: "trimming" } +7 > +8 > name: nameA +9 > } = { name: "trimmer", skill: "trimming" } +10> , +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { +1->Emitted(17, 1) Source(35, 1) + SourceIndex(0) +2 >Emitted(17, 4) Source(35, 4) + SourceIndex(0) +3 >Emitted(17, 5) Source(35, 5) + SourceIndex(0) +4 >Emitted(17, 6) Source(35, 6) + SourceIndex(0) +5 >Emitted(17, 7) Source(35, 6) + SourceIndex(0) +6 >Emitted(17, 50) Source(35, 69) + SourceIndex(0) +7 >Emitted(17, 52) Source(35, 8) + SourceIndex(0) +8 >Emitted(17, 67) Source(35, 19) + SourceIndex(0) +9 >Emitted(17, 72) Source(35, 69) + SourceIndex(0) +10>Emitted(17, 74) Source(35, 71) + SourceIndex(0) +11>Emitted(17, 75) Source(35, 72) + SourceIndex(0) +12>Emitted(17, 78) Source(35, 75) + SourceIndex(0) +13>Emitted(17, 79) Source(35, 76) + SourceIndex(0) +14>Emitted(17, 81) Source(35, 78) + SourceIndex(0) +15>Emitted(17, 82) Source(35, 79) + SourceIndex(0) +16>Emitted(17, 85) Source(35, 82) + SourceIndex(0) +17>Emitted(17, 86) Source(35, 83) + SourceIndex(0) +18>Emitted(17, 88) Source(35, 85) + SourceIndex(0) +19>Emitted(17, 89) Source(35, 86) + SourceIndex(0) +20>Emitted(17, 91) Source(35, 88) + SourceIndex(0) +21>Emitted(17, 93) Source(35, 90) + SourceIndex(0) +22>Emitted(17, 94) Source(35, 91) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(18, 5) Source(36, 5) + SourceIndex(0) +2 >Emitted(18, 12) Source(36, 12) + SourceIndex(0) +3 >Emitted(18, 13) Source(36, 13) + SourceIndex(0) +4 >Emitted(18, 16) Source(36, 16) + SourceIndex(0) +5 >Emitted(18, 17) Source(36, 17) + SourceIndex(0) +6 >Emitted(18, 22) Source(36, 22) + SourceIndex(0) +7 >Emitted(18, 23) Source(36, 23) + SourceIndex(0) +8 >Emitted(18, 24) Source(36, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(19, 1) Source(37, 1) + SourceIndex(0) +2 >Emitted(19, 2) Source(37, 2) + SourceIndex(0) +--- +>>>for ((_c = multiRobot.skills, primaryA = _c.primary, secondaryA = _c.secondary, multiRobot), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^^ +21> ^ +22> ^^ +23> ^ +24> ^^ +25> ^^ +26> ^ +1-> + > +2 >for +3 > +4 > ( +5 > { +6 > skills +7 > : { +8 > primary: primaryA +9 > , +10> secondary: secondaryA +11> } } = +12> multiRobot +13> +14> , +15> i +16> = +17> 0 +18> ; +19> i +20> < +21> 1 +22> ; +23> i +24> ++ +25> ) +26> { +1->Emitted(20, 1) Source(38, 1) + SourceIndex(0) +2 >Emitted(20, 4) Source(38, 4) + SourceIndex(0) +3 >Emitted(20, 5) Source(38, 5) + SourceIndex(0) +4 >Emitted(20, 6) Source(38, 6) + SourceIndex(0) +5 >Emitted(20, 7) Source(38, 8) + SourceIndex(0) +6 >Emitted(20, 29) Source(38, 14) + SourceIndex(0) +7 >Emitted(20, 31) Source(38, 18) + SourceIndex(0) +8 >Emitted(20, 52) Source(38, 35) + SourceIndex(0) +9 >Emitted(20, 54) Source(38, 37) + SourceIndex(0) +10>Emitted(20, 79) Source(38, 58) + SourceIndex(0) +11>Emitted(20, 81) Source(38, 65) + SourceIndex(0) +12>Emitted(20, 91) Source(38, 75) + SourceIndex(0) +13>Emitted(20, 92) Source(38, 75) + SourceIndex(0) +14>Emitted(20, 94) Source(38, 77) + SourceIndex(0) +15>Emitted(20, 95) Source(38, 78) + SourceIndex(0) +16>Emitted(20, 98) Source(38, 81) + SourceIndex(0) +17>Emitted(20, 99) Source(38, 82) + SourceIndex(0) +18>Emitted(20, 101) Source(38, 84) + SourceIndex(0) +19>Emitted(20, 102) Source(38, 85) + SourceIndex(0) +20>Emitted(20, 105) Source(38, 88) + SourceIndex(0) +21>Emitted(20, 106) Source(38, 89) + SourceIndex(0) +22>Emitted(20, 108) Source(38, 91) + SourceIndex(0) +23>Emitted(20, 109) Source(38, 92) + SourceIndex(0) +24>Emitted(20, 111) Source(38, 94) + SourceIndex(0) +25>Emitted(20, 113) Source(38, 96) + SourceIndex(0) +26>Emitted(20, 114) Source(38, 97) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(21, 5) Source(39, 5) + SourceIndex(0) +2 >Emitted(21, 12) Source(39, 12) + SourceIndex(0) +3 >Emitted(21, 13) Source(39, 13) + SourceIndex(0) +4 >Emitted(21, 16) Source(39, 16) + SourceIndex(0) +5 >Emitted(21, 17) Source(39, 17) + SourceIndex(0) +6 >Emitted(21, 25) Source(39, 25) + SourceIndex(0) +7 >Emitted(21, 26) Source(39, 26) + SourceIndex(0) +8 >Emitted(21, 27) Source(39, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(22, 1) Source(40, 1) + SourceIndex(0) +2 >Emitted(22, 2) Source(40, 2) + SourceIndex(0) +--- +>>>for ((_d = getMultiRobot(), _e = _d.skills, primaryA = _e.primary, secondaryA = _e.secondary, _d), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^^^^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^^ +21> ^ +22> ^^ +23> ^ +24> ^^ +25> ^^ +26> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot() +7 > +8 > skills +9 > : { +10> primary: primaryA +11> , +12> secondary: secondaryA +13> } } = getMultiRobot() +14> , +15> i +16> = +17> 0 +18> ; +19> i +20> < +21> 1 +22> ; +23> i +24> ++ +25> ) +26> { +1->Emitted(23, 1) Source(41, 1) + SourceIndex(0) +2 >Emitted(23, 4) Source(41, 4) + SourceIndex(0) +3 >Emitted(23, 5) Source(41, 5) + SourceIndex(0) +4 >Emitted(23, 6) Source(41, 6) + SourceIndex(0) +5 >Emitted(23, 7) Source(41, 6) + SourceIndex(0) +6 >Emitted(23, 27) Source(41, 80) + SourceIndex(0) +7 >Emitted(23, 29) Source(41, 8) + SourceIndex(0) +8 >Emitted(23, 43) Source(41, 14) + SourceIndex(0) +9 >Emitted(23, 45) Source(41, 18) + SourceIndex(0) +10>Emitted(23, 66) Source(41, 35) + SourceIndex(0) +11>Emitted(23, 68) Source(41, 37) + SourceIndex(0) +12>Emitted(23, 93) Source(41, 58) + SourceIndex(0) +13>Emitted(23, 98) Source(41, 80) + SourceIndex(0) +14>Emitted(23, 100) Source(41, 82) + SourceIndex(0) +15>Emitted(23, 101) Source(41, 83) + SourceIndex(0) +16>Emitted(23, 104) Source(41, 86) + SourceIndex(0) +17>Emitted(23, 105) Source(41, 87) + SourceIndex(0) +18>Emitted(23, 107) Source(41, 89) + SourceIndex(0) +19>Emitted(23, 108) Source(41, 90) + SourceIndex(0) +20>Emitted(23, 111) Source(41, 93) + SourceIndex(0) +21>Emitted(23, 112) Source(41, 94) + SourceIndex(0) +22>Emitted(23, 114) Source(41, 96) + SourceIndex(0) +23>Emitted(23, 115) Source(41, 97) + SourceIndex(0) +24>Emitted(23, 117) Source(41, 99) + SourceIndex(0) +25>Emitted(23, 119) Source(41, 101) + SourceIndex(0) +26>Emitted(23, 120) Source(41, 102) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(24, 5) Source(42, 5) + SourceIndex(0) +2 >Emitted(24, 12) Source(42, 12) + SourceIndex(0) +3 >Emitted(24, 13) Source(42, 13) + SourceIndex(0) +4 >Emitted(24, 16) Source(42, 16) + SourceIndex(0) +5 >Emitted(24, 17) Source(42, 17) + SourceIndex(0) +6 >Emitted(24, 25) Source(42, 25) + SourceIndex(0) +7 >Emitted(24, 26) Source(42, 26) + SourceIndex(0) +8 >Emitted(24, 27) Source(42, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(25, 1) Source(43, 1) + SourceIndex(0) +2 >Emitted(25, 2) Source(43, 2) + SourceIndex(0) +--- +>>>for ((_f = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, _g = _f.skills, primaryA = _g.primary, secondaryA = _g.secondary, _f), +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^^^^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { skills: { primary: primaryA, secondary: secondaryA } } = + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } +7 > +8 > skills +9 > : { +10> primary: primaryA +11> , +12> secondary: secondaryA +13> } } = + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } +1->Emitted(26, 1) Source(44, 1) + SourceIndex(0) +2 >Emitted(26, 4) Source(44, 4) + SourceIndex(0) +3 >Emitted(26, 5) Source(44, 5) + SourceIndex(0) +4 >Emitted(26, 6) Source(44, 6) + SourceIndex(0) +5 >Emitted(26, 7) Source(44, 6) + SourceIndex(0) +6 >Emitted(26, 85) Source(45, 90) + SourceIndex(0) +7 >Emitted(26, 87) Source(44, 8) + SourceIndex(0) +8 >Emitted(26, 101) Source(44, 14) + SourceIndex(0) +9 >Emitted(26, 103) Source(44, 18) + SourceIndex(0) +10>Emitted(26, 124) Source(44, 35) + SourceIndex(0) +11>Emitted(26, 126) Source(44, 37) + SourceIndex(0) +12>Emitted(26, 151) Source(44, 58) + SourceIndex(0) +13>Emitted(26, 156) Source(45, 90) + SourceIndex(0) +--- +>>> i = 0; i < 1; i++) { +1 >^^^^ +2 > ^ +3 > ^^^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^^^ +8 > ^ +9 > ^^ +10> ^ +11> ^^ +12> ^^ +13> ^ +14> ^^^-> +1 >, + > +2 > i +3 > = +4 > 0 +5 > ; +6 > i +7 > < +8 > 1 +9 > ; +10> i +11> ++ +12> ) +13> { +1 >Emitted(27, 5) Source(46, 5) + SourceIndex(0) +2 >Emitted(27, 6) Source(46, 6) + SourceIndex(0) +3 >Emitted(27, 9) Source(46, 9) + SourceIndex(0) +4 >Emitted(27, 10) Source(46, 10) + SourceIndex(0) +5 >Emitted(27, 12) Source(46, 12) + SourceIndex(0) +6 >Emitted(27, 13) Source(46, 13) + SourceIndex(0) +7 >Emitted(27, 16) Source(46, 16) + SourceIndex(0) +8 >Emitted(27, 17) Source(46, 17) + SourceIndex(0) +9 >Emitted(27, 19) Source(46, 19) + SourceIndex(0) +10>Emitted(27, 20) Source(46, 20) + SourceIndex(0) +11>Emitted(27, 22) Source(46, 22) + SourceIndex(0) +12>Emitted(27, 24) Source(46, 24) + SourceIndex(0) +13>Emitted(27, 25) Source(46, 25) + SourceIndex(0) +--- +>>> console.log(primaryA); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1-> + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1->Emitted(28, 5) Source(47, 5) + SourceIndex(0) +2 >Emitted(28, 12) Source(47, 12) + SourceIndex(0) +3 >Emitted(28, 13) Source(47, 13) + SourceIndex(0) +4 >Emitted(28, 16) Source(47, 16) + SourceIndex(0) +5 >Emitted(28, 17) Source(47, 17) + SourceIndex(0) +6 >Emitted(28, 25) Source(47, 25) + SourceIndex(0) +7 >Emitted(28, 26) Source(47, 26) + SourceIndex(0) +8 >Emitted(28, 27) Source(47, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(29, 1) Source(48, 1) + SourceIndex(0) +2 >Emitted(29, 2) Source(48, 2) + SourceIndex(0) +--- +>>>for ((name = robot.name, robot), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^ +9 > ^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ +1-> + > +2 >for +3 > +4 > ( +5 > { +6 > name +7 > } = +8 > robot +9 > +10> , +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { +1->Emitted(30, 1) Source(49, 1) + SourceIndex(0) +2 >Emitted(30, 4) Source(49, 4) + SourceIndex(0) +3 >Emitted(30, 5) Source(49, 5) + SourceIndex(0) +4 >Emitted(30, 6) Source(49, 6) + SourceIndex(0) +5 >Emitted(30, 7) Source(49, 8) + SourceIndex(0) +6 >Emitted(30, 24) Source(49, 12) + SourceIndex(0) +7 >Emitted(30, 26) Source(49, 17) + SourceIndex(0) +8 >Emitted(30, 31) Source(49, 22) + SourceIndex(0) +9 >Emitted(30, 32) Source(49, 22) + SourceIndex(0) +10>Emitted(30, 34) Source(49, 24) + SourceIndex(0) +11>Emitted(30, 35) Source(49, 25) + SourceIndex(0) +12>Emitted(30, 38) Source(49, 28) + SourceIndex(0) +13>Emitted(30, 39) Source(49, 29) + SourceIndex(0) +14>Emitted(30, 41) Source(49, 31) + SourceIndex(0) +15>Emitted(30, 42) Source(49, 32) + SourceIndex(0) +16>Emitted(30, 45) Source(49, 35) + SourceIndex(0) +17>Emitted(30, 46) Source(49, 36) + SourceIndex(0) +18>Emitted(30, 48) Source(49, 38) + SourceIndex(0) +19>Emitted(30, 49) Source(49, 39) + SourceIndex(0) +20>Emitted(30, 51) Source(49, 41) + SourceIndex(0) +21>Emitted(30, 53) Source(49, 43) + SourceIndex(0) +22>Emitted(30, 54) Source(49, 44) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(31, 5) Source(50, 5) + SourceIndex(0) +2 >Emitted(31, 12) Source(50, 12) + SourceIndex(0) +3 >Emitted(31, 13) Source(50, 13) + SourceIndex(0) +4 >Emitted(31, 16) Source(50, 16) + SourceIndex(0) +5 >Emitted(31, 17) Source(50, 17) + SourceIndex(0) +6 >Emitted(31, 22) Source(50, 22) + SourceIndex(0) +7 >Emitted(31, 23) Source(50, 23) + SourceIndex(0) +8 >Emitted(31, 24) Source(50, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(32, 1) Source(51, 1) + SourceIndex(0) +2 >Emitted(32, 2) Source(51, 2) + SourceIndex(0) +--- +>>>for ((_h = getRobot(), name = _h.name, _h), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^^^^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { name } = getRobot() +7 > +8 > name +9 > } = getRobot() +10> , +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { +1->Emitted(33, 1) Source(52, 1) + SourceIndex(0) +2 >Emitted(33, 4) Source(52, 4) + SourceIndex(0) +3 >Emitted(33, 5) Source(52, 5) + SourceIndex(0) +4 >Emitted(33, 6) Source(52, 6) + SourceIndex(0) +5 >Emitted(33, 7) Source(52, 6) + SourceIndex(0) +6 >Emitted(33, 22) Source(52, 27) + SourceIndex(0) +7 >Emitted(33, 24) Source(52, 8) + SourceIndex(0) +8 >Emitted(33, 38) Source(52, 12) + SourceIndex(0) +9 >Emitted(33, 43) Source(52, 27) + SourceIndex(0) +10>Emitted(33, 45) Source(52, 29) + SourceIndex(0) +11>Emitted(33, 46) Source(52, 30) + SourceIndex(0) +12>Emitted(33, 49) Source(52, 33) + SourceIndex(0) +13>Emitted(33, 50) Source(52, 34) + SourceIndex(0) +14>Emitted(33, 52) Source(52, 36) + SourceIndex(0) +15>Emitted(33, 53) Source(52, 37) + SourceIndex(0) +16>Emitted(33, 56) Source(52, 40) + SourceIndex(0) +17>Emitted(33, 57) Source(52, 41) + SourceIndex(0) +18>Emitted(33, 59) Source(52, 43) + SourceIndex(0) +19>Emitted(33, 60) Source(52, 44) + SourceIndex(0) +20>Emitted(33, 62) Source(52, 46) + SourceIndex(0) +21>Emitted(33, 64) Source(52, 48) + SourceIndex(0) +22>Emitted(33, 65) Source(52, 49) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(34, 5) Source(53, 5) + SourceIndex(0) +2 >Emitted(34, 12) Source(53, 12) + SourceIndex(0) +3 >Emitted(34, 13) Source(53, 13) + SourceIndex(0) +4 >Emitted(34, 16) Source(53, 16) + SourceIndex(0) +5 >Emitted(34, 17) Source(53, 17) + SourceIndex(0) +6 >Emitted(34, 22) Source(53, 22) + SourceIndex(0) +7 >Emitted(34, 23) Source(53, 23) + SourceIndex(0) +8 >Emitted(34, 24) Source(53, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(35, 1) Source(54, 1) + SourceIndex(0) +2 >Emitted(35, 2) Source(54, 2) + SourceIndex(0) +--- +>>>for ((_j = { name: "trimmer", skill: "trimming" }, name = _j.name, _j), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^^^^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { name } = { name: "trimmer", skill: "trimming" } +7 > +8 > name +9 > } = { name: "trimmer", skill: "trimming" } +10> , +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { +1->Emitted(36, 1) Source(55, 1) + SourceIndex(0) +2 >Emitted(36, 4) Source(55, 4) + SourceIndex(0) +3 >Emitted(36, 5) Source(55, 5) + SourceIndex(0) +4 >Emitted(36, 6) Source(55, 6) + SourceIndex(0) +5 >Emitted(36, 7) Source(55, 6) + SourceIndex(0) +6 >Emitted(36, 50) Source(55, 62) + SourceIndex(0) +7 >Emitted(36, 52) Source(55, 8) + SourceIndex(0) +8 >Emitted(36, 66) Source(55, 12) + SourceIndex(0) +9 >Emitted(36, 71) Source(55, 62) + SourceIndex(0) +10>Emitted(36, 73) Source(55, 64) + SourceIndex(0) +11>Emitted(36, 74) Source(55, 65) + SourceIndex(0) +12>Emitted(36, 77) Source(55, 68) + SourceIndex(0) +13>Emitted(36, 78) Source(55, 69) + SourceIndex(0) +14>Emitted(36, 80) Source(55, 71) + SourceIndex(0) +15>Emitted(36, 81) Source(55, 72) + SourceIndex(0) +16>Emitted(36, 84) Source(55, 75) + SourceIndex(0) +17>Emitted(36, 85) Source(55, 76) + SourceIndex(0) +18>Emitted(36, 87) Source(55, 78) + SourceIndex(0) +19>Emitted(36, 88) Source(55, 79) + SourceIndex(0) +20>Emitted(36, 90) Source(55, 81) + SourceIndex(0) +21>Emitted(36, 92) Source(55, 83) + SourceIndex(0) +22>Emitted(36, 93) Source(55, 84) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(37, 5) Source(56, 5) + SourceIndex(0) +2 >Emitted(37, 12) Source(56, 12) + SourceIndex(0) +3 >Emitted(37, 13) Source(56, 13) + SourceIndex(0) +4 >Emitted(37, 16) Source(56, 16) + SourceIndex(0) +5 >Emitted(37, 17) Source(56, 17) + SourceIndex(0) +6 >Emitted(37, 22) Source(56, 22) + SourceIndex(0) +7 >Emitted(37, 23) Source(56, 23) + SourceIndex(0) +8 >Emitted(37, 24) Source(56, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(38, 1) Source(57, 1) + SourceIndex(0) +2 >Emitted(38, 2) Source(57, 2) + SourceIndex(0) +--- +>>>for ((_k = multiRobot.skills, primary = _k.primary, secondary = _k.secondary, multiRobot), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^^ +21> ^ +22> ^^ +23> ^ +24> ^^ +25> ^^ +26> ^ +1-> + > +2 >for +3 > +4 > ( +5 > { +6 > skills +7 > : { +8 > primary +9 > , +10> secondary +11> } } = +12> multiRobot +13> +14> , +15> i +16> = +17> 0 +18> ; +19> i +20> < +21> 1 +22> ; +23> i +24> ++ +25> ) +26> { +1->Emitted(39, 1) Source(58, 1) + SourceIndex(0) +2 >Emitted(39, 4) Source(58, 4) + SourceIndex(0) +3 >Emitted(39, 5) Source(58, 5) + SourceIndex(0) +4 >Emitted(39, 6) Source(58, 6) + SourceIndex(0) +5 >Emitted(39, 7) Source(58, 8) + SourceIndex(0) +6 >Emitted(39, 29) Source(58, 14) + SourceIndex(0) +7 >Emitted(39, 31) Source(58, 18) + SourceIndex(0) +8 >Emitted(39, 51) Source(58, 25) + SourceIndex(0) +9 >Emitted(39, 53) Source(58, 27) + SourceIndex(0) +10>Emitted(39, 77) Source(58, 36) + SourceIndex(0) +11>Emitted(39, 79) Source(58, 43) + SourceIndex(0) +12>Emitted(39, 89) Source(58, 53) + SourceIndex(0) +13>Emitted(39, 90) Source(58, 53) + SourceIndex(0) +14>Emitted(39, 92) Source(58, 55) + SourceIndex(0) +15>Emitted(39, 93) Source(58, 56) + SourceIndex(0) +16>Emitted(39, 96) Source(58, 59) + SourceIndex(0) +17>Emitted(39, 97) Source(58, 60) + SourceIndex(0) +18>Emitted(39, 99) Source(58, 62) + SourceIndex(0) +19>Emitted(39, 100) Source(58, 63) + SourceIndex(0) +20>Emitted(39, 103) Source(58, 66) + SourceIndex(0) +21>Emitted(39, 104) Source(58, 67) + SourceIndex(0) +22>Emitted(39, 106) Source(58, 69) + SourceIndex(0) +23>Emitted(39, 107) Source(58, 70) + SourceIndex(0) +24>Emitted(39, 109) Source(58, 72) + SourceIndex(0) +25>Emitted(39, 111) Source(58, 74) + SourceIndex(0) +26>Emitted(39, 112) Source(58, 75) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(40, 5) Source(59, 5) + SourceIndex(0) +2 >Emitted(40, 12) Source(59, 12) + SourceIndex(0) +3 >Emitted(40, 13) Source(59, 13) + SourceIndex(0) +4 >Emitted(40, 16) Source(59, 16) + SourceIndex(0) +5 >Emitted(40, 17) Source(59, 17) + SourceIndex(0) +6 >Emitted(40, 25) Source(59, 25) + SourceIndex(0) +7 >Emitted(40, 26) Source(59, 26) + SourceIndex(0) +8 >Emitted(40, 27) Source(59, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(41, 1) Source(60, 1) + SourceIndex(0) +2 >Emitted(41, 2) Source(60, 2) + SourceIndex(0) +--- +>>>for ((_l = getMultiRobot(), _m = _l.skills, primary = _m.primary, secondary = _m.secondary, _l), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^^^^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^^ +21> ^ +22> ^^ +23> ^ +24> ^^ +25> ^^ +26> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { skills: { primary, secondary } } = getMultiRobot() +7 > +8 > skills +9 > : { +10> primary +11> , +12> secondary +13> } } = getMultiRobot() +14> , +15> i +16> = +17> 0 +18> ; +19> i +20> < +21> 1 +22> ; +23> i +24> ++ +25> ) +26> { +1->Emitted(42, 1) Source(61, 1) + SourceIndex(0) +2 >Emitted(42, 4) Source(61, 4) + SourceIndex(0) +3 >Emitted(42, 5) Source(61, 5) + SourceIndex(0) +4 >Emitted(42, 6) Source(61, 6) + SourceIndex(0) +5 >Emitted(42, 7) Source(61, 6) + SourceIndex(0) +6 >Emitted(42, 27) Source(61, 58) + SourceIndex(0) +7 >Emitted(42, 29) Source(61, 8) + SourceIndex(0) +8 >Emitted(42, 43) Source(61, 14) + SourceIndex(0) +9 >Emitted(42, 45) Source(61, 18) + SourceIndex(0) +10>Emitted(42, 65) Source(61, 25) + SourceIndex(0) +11>Emitted(42, 67) Source(61, 27) + SourceIndex(0) +12>Emitted(42, 91) Source(61, 36) + SourceIndex(0) +13>Emitted(42, 96) Source(61, 58) + SourceIndex(0) +14>Emitted(42, 98) Source(61, 60) + SourceIndex(0) +15>Emitted(42, 99) Source(61, 61) + SourceIndex(0) +16>Emitted(42, 102) Source(61, 64) + SourceIndex(0) +17>Emitted(42, 103) Source(61, 65) + SourceIndex(0) +18>Emitted(42, 105) Source(61, 67) + SourceIndex(0) +19>Emitted(42, 106) Source(61, 68) + SourceIndex(0) +20>Emitted(42, 109) Source(61, 71) + SourceIndex(0) +21>Emitted(42, 110) Source(61, 72) + SourceIndex(0) +22>Emitted(42, 112) Source(61, 74) + SourceIndex(0) +23>Emitted(42, 113) Source(61, 75) + SourceIndex(0) +24>Emitted(42, 115) Source(61, 77) + SourceIndex(0) +25>Emitted(42, 117) Source(61, 79) + SourceIndex(0) +26>Emitted(42, 118) Source(61, 80) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(43, 5) Source(62, 5) + SourceIndex(0) +2 >Emitted(43, 12) Source(62, 12) + SourceIndex(0) +3 >Emitted(43, 13) Source(62, 13) + SourceIndex(0) +4 >Emitted(43, 16) Source(62, 16) + SourceIndex(0) +5 >Emitted(43, 17) Source(62, 17) + SourceIndex(0) +6 >Emitted(43, 25) Source(62, 25) + SourceIndex(0) +7 >Emitted(43, 26) Source(62, 26) + SourceIndex(0) +8 >Emitted(43, 27) Source(62, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(44, 1) Source(63, 1) + SourceIndex(0) +2 >Emitted(44, 2) Source(63, 2) + SourceIndex(0) +--- +>>>for ((_o = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, _p = _o.skills, primary = _p.primary, secondary = _p.secondary, _o), +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^^^^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { skills: { primary, secondary } } = + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } +7 > +8 > skills +9 > : { +10> primary +11> , +12> secondary +13> } } = + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } +1->Emitted(45, 1) Source(64, 1) + SourceIndex(0) +2 >Emitted(45, 4) Source(64, 4) + SourceIndex(0) +3 >Emitted(45, 5) Source(64, 5) + SourceIndex(0) +4 >Emitted(45, 6) Source(64, 6) + SourceIndex(0) +5 >Emitted(45, 7) Source(64, 6) + SourceIndex(0) +6 >Emitted(45, 85) Source(65, 90) + SourceIndex(0) +7 >Emitted(45, 87) Source(64, 8) + SourceIndex(0) +8 >Emitted(45, 101) Source(64, 14) + SourceIndex(0) +9 >Emitted(45, 103) Source(64, 18) + SourceIndex(0) +10>Emitted(45, 123) Source(64, 25) + SourceIndex(0) +11>Emitted(45, 125) Source(64, 27) + SourceIndex(0) +12>Emitted(45, 149) Source(64, 36) + SourceIndex(0) +13>Emitted(45, 154) Source(65, 90) + SourceIndex(0) +--- +>>> i = 0; i < 1; i++) { +1 >^^^^ +2 > ^ +3 > ^^^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^^^ +8 > ^ +9 > ^^ +10> ^ +11> ^^ +12> ^^ +13> ^ +14> ^^^-> +1 >, + > +2 > i +3 > = +4 > 0 +5 > ; +6 > i +7 > < +8 > 1 +9 > ; +10> i +11> ++ +12> ) +13> { +1 >Emitted(46, 5) Source(66, 5) + SourceIndex(0) +2 >Emitted(46, 6) Source(66, 6) + SourceIndex(0) +3 >Emitted(46, 9) Source(66, 9) + SourceIndex(0) +4 >Emitted(46, 10) Source(66, 10) + SourceIndex(0) +5 >Emitted(46, 12) Source(66, 12) + SourceIndex(0) +6 >Emitted(46, 13) Source(66, 13) + SourceIndex(0) +7 >Emitted(46, 16) Source(66, 16) + SourceIndex(0) +8 >Emitted(46, 17) Source(66, 17) + SourceIndex(0) +9 >Emitted(46, 19) Source(66, 19) + SourceIndex(0) +10>Emitted(46, 20) Source(66, 20) + SourceIndex(0) +11>Emitted(46, 22) Source(66, 22) + SourceIndex(0) +12>Emitted(46, 24) Source(66, 24) + SourceIndex(0) +13>Emitted(46, 25) Source(66, 25) + SourceIndex(0) +--- +>>> console.log(primaryA); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1-> + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1->Emitted(47, 5) Source(67, 5) + SourceIndex(0) +2 >Emitted(47, 12) Source(67, 12) + SourceIndex(0) +3 >Emitted(47, 13) Source(67, 13) + SourceIndex(0) +4 >Emitted(47, 16) Source(67, 16) + SourceIndex(0) +5 >Emitted(47, 17) Source(67, 17) + SourceIndex(0) +6 >Emitted(47, 25) Source(67, 25) + SourceIndex(0) +7 >Emitted(47, 26) Source(67, 26) + SourceIndex(0) +8 >Emitted(47, 27) Source(67, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(48, 1) Source(68, 1) + SourceIndex(0) +2 >Emitted(48, 2) Source(68, 2) + SourceIndex(0) +--- +>>>for ((nameA = robot.name, skillA = robot.skill, robot), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > + > + > +2 >for +3 > +4 > ( +5 > { +6 > name: nameA +7 > , +8 > skill: skillA +9 > } = +10> robot +11> +12> , +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(49, 1) Source(71, 1) + SourceIndex(0) +2 >Emitted(49, 4) Source(71, 4) + SourceIndex(0) +3 >Emitted(49, 5) Source(71, 5) + SourceIndex(0) +4 >Emitted(49, 6) Source(71, 6) + SourceIndex(0) +5 >Emitted(49, 7) Source(71, 8) + SourceIndex(0) +6 >Emitted(49, 25) Source(71, 19) + SourceIndex(0) +7 >Emitted(49, 27) Source(71, 21) + SourceIndex(0) +8 >Emitted(49, 47) Source(71, 34) + SourceIndex(0) +9 >Emitted(49, 49) Source(71, 39) + SourceIndex(0) +10>Emitted(49, 54) Source(71, 44) + SourceIndex(0) +11>Emitted(49, 55) Source(71, 44) + SourceIndex(0) +12>Emitted(49, 57) Source(71, 46) + SourceIndex(0) +13>Emitted(49, 58) Source(71, 47) + SourceIndex(0) +14>Emitted(49, 61) Source(71, 50) + SourceIndex(0) +15>Emitted(49, 62) Source(71, 51) + SourceIndex(0) +16>Emitted(49, 64) Source(71, 53) + SourceIndex(0) +17>Emitted(49, 65) Source(71, 54) + SourceIndex(0) +18>Emitted(49, 68) Source(71, 57) + SourceIndex(0) +19>Emitted(49, 69) Source(71, 58) + SourceIndex(0) +20>Emitted(49, 71) Source(71, 60) + SourceIndex(0) +21>Emitted(49, 72) Source(71, 61) + SourceIndex(0) +22>Emitted(49, 74) Source(71, 63) + SourceIndex(0) +23>Emitted(49, 76) Source(71, 65) + SourceIndex(0) +24>Emitted(49, 77) Source(71, 66) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(50, 5) Source(72, 5) + SourceIndex(0) +2 >Emitted(50, 12) Source(72, 12) + SourceIndex(0) +3 >Emitted(50, 13) Source(72, 13) + SourceIndex(0) +4 >Emitted(50, 16) Source(72, 16) + SourceIndex(0) +5 >Emitted(50, 17) Source(72, 17) + SourceIndex(0) +6 >Emitted(50, 22) Source(72, 22) + SourceIndex(0) +7 >Emitted(50, 23) Source(72, 23) + SourceIndex(0) +8 >Emitted(50, 24) Source(72, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(51, 1) Source(73, 1) + SourceIndex(0) +2 >Emitted(51, 2) Source(73, 2) + SourceIndex(0) +--- +>>>for ((_q = getRobot(), nameA = _q.name, skillA = _q.skill, _q), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^ +11> ^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { name: nameA, skill: skillA } = getRobot() +7 > +8 > name: nameA +9 > , +10> skill: skillA +11> } = getRobot() +12> , +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(52, 1) Source(74, 1) + SourceIndex(0) +2 >Emitted(52, 4) Source(74, 4) + SourceIndex(0) +3 >Emitted(52, 5) Source(74, 5) + SourceIndex(0) +4 >Emitted(52, 6) Source(74, 6) + SourceIndex(0) +5 >Emitted(52, 7) Source(74, 6) + SourceIndex(0) +6 >Emitted(52, 22) Source(74, 49) + SourceIndex(0) +7 >Emitted(52, 24) Source(74, 8) + SourceIndex(0) +8 >Emitted(52, 39) Source(74, 19) + SourceIndex(0) +9 >Emitted(52, 41) Source(74, 21) + SourceIndex(0) +10>Emitted(52, 58) Source(74, 34) + SourceIndex(0) +11>Emitted(52, 63) Source(74, 49) + SourceIndex(0) +12>Emitted(52, 65) Source(74, 51) + SourceIndex(0) +13>Emitted(52, 66) Source(74, 52) + SourceIndex(0) +14>Emitted(52, 69) Source(74, 55) + SourceIndex(0) +15>Emitted(52, 70) Source(74, 56) + SourceIndex(0) +16>Emitted(52, 72) Source(74, 58) + SourceIndex(0) +17>Emitted(52, 73) Source(74, 59) + SourceIndex(0) +18>Emitted(52, 76) Source(74, 62) + SourceIndex(0) +19>Emitted(52, 77) Source(74, 63) + SourceIndex(0) +20>Emitted(52, 79) Source(74, 65) + SourceIndex(0) +21>Emitted(52, 80) Source(74, 66) + SourceIndex(0) +22>Emitted(52, 82) Source(74, 68) + SourceIndex(0) +23>Emitted(52, 84) Source(74, 70) + SourceIndex(0) +24>Emitted(52, 85) Source(74, 71) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(53, 5) Source(75, 5) + SourceIndex(0) +2 >Emitted(53, 12) Source(75, 12) + SourceIndex(0) +3 >Emitted(53, 13) Source(75, 13) + SourceIndex(0) +4 >Emitted(53, 16) Source(75, 16) + SourceIndex(0) +5 >Emitted(53, 17) Source(75, 17) + SourceIndex(0) +6 >Emitted(53, 22) Source(75, 22) + SourceIndex(0) +7 >Emitted(53, 23) Source(75, 23) + SourceIndex(0) +8 >Emitted(53, 24) Source(75, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(54, 1) Source(76, 1) + SourceIndex(0) +2 >Emitted(54, 2) Source(76, 2) + SourceIndex(0) +--- +>>>for ((_r = { name: "trimmer", skill: "trimming" }, nameA = _r.name, skillA = _r.skill, _r), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^ +11> ^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" } +7 > +8 > name: nameA +9 > , +10> skill: skillA +11> } = { name: "trimmer", skill: "trimming" } +12> , +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(55, 1) Source(77, 1) + SourceIndex(0) +2 >Emitted(55, 4) Source(77, 4) + SourceIndex(0) +3 >Emitted(55, 5) Source(77, 5) + SourceIndex(0) +4 >Emitted(55, 6) Source(77, 6) + SourceIndex(0) +5 >Emitted(55, 7) Source(77, 6) + SourceIndex(0) +6 >Emitted(55, 50) Source(77, 84) + SourceIndex(0) +7 >Emitted(55, 52) Source(77, 8) + SourceIndex(0) +8 >Emitted(55, 67) Source(77, 19) + SourceIndex(0) +9 >Emitted(55, 69) Source(77, 21) + SourceIndex(0) +10>Emitted(55, 86) Source(77, 34) + SourceIndex(0) +11>Emitted(55, 91) Source(77, 84) + SourceIndex(0) +12>Emitted(55, 93) Source(77, 86) + SourceIndex(0) +13>Emitted(55, 94) Source(77, 87) + SourceIndex(0) +14>Emitted(55, 97) Source(77, 90) + SourceIndex(0) +15>Emitted(55, 98) Source(77, 91) + SourceIndex(0) +16>Emitted(55, 100) Source(77, 93) + SourceIndex(0) +17>Emitted(55, 101) Source(77, 94) + SourceIndex(0) +18>Emitted(55, 104) Source(77, 97) + SourceIndex(0) +19>Emitted(55, 105) Source(77, 98) + SourceIndex(0) +20>Emitted(55, 107) Source(77, 100) + SourceIndex(0) +21>Emitted(55, 108) Source(77, 101) + SourceIndex(0) +22>Emitted(55, 110) Source(77, 103) + SourceIndex(0) +23>Emitted(55, 112) Source(77, 105) + SourceIndex(0) +24>Emitted(55, 113) Source(77, 106) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(56, 5) Source(78, 5) + SourceIndex(0) +2 >Emitted(56, 12) Source(78, 12) + SourceIndex(0) +3 >Emitted(56, 13) Source(78, 13) + SourceIndex(0) +4 >Emitted(56, 16) Source(78, 16) + SourceIndex(0) +5 >Emitted(56, 17) Source(78, 17) + SourceIndex(0) +6 >Emitted(56, 22) Source(78, 22) + SourceIndex(0) +7 >Emitted(56, 23) Source(78, 23) + SourceIndex(0) +8 >Emitted(56, 24) Source(78, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(57, 1) Source(79, 1) + SourceIndex(0) +2 >Emitted(57, 2) Source(79, 2) + SourceIndex(0) +--- +>>>for ((nameA = multiRobot.name, _s = multiRobot.skills, primaryA = _s.primary, secondaryA = _s.secondary, multiRobot), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^ +27> ^^ +28> ^ +1-> + > +2 >for +3 > +4 > ( +5 > { +6 > name: nameA +7 > , +8 > skills +9 > : { +10> primary: primaryA +11> , +12> secondary: secondaryA +13> } } = +14> multiRobot +15> +16> , +17> i +18> = +19> 0 +20> ; +21> i +22> < +23> 1 +24> ; +25> i +26> ++ +27> ) +28> { +1->Emitted(58, 1) Source(80, 1) + SourceIndex(0) +2 >Emitted(58, 4) Source(80, 4) + SourceIndex(0) +3 >Emitted(58, 5) Source(80, 5) + SourceIndex(0) +4 >Emitted(58, 6) Source(80, 6) + SourceIndex(0) +5 >Emitted(58, 7) Source(80, 8) + SourceIndex(0) +6 >Emitted(58, 30) Source(80, 19) + SourceIndex(0) +7 >Emitted(58, 32) Source(80, 21) + SourceIndex(0) +8 >Emitted(58, 54) Source(80, 27) + SourceIndex(0) +9 >Emitted(58, 56) Source(80, 31) + SourceIndex(0) +10>Emitted(58, 77) Source(80, 48) + SourceIndex(0) +11>Emitted(58, 79) Source(80, 50) + SourceIndex(0) +12>Emitted(58, 104) Source(80, 71) + SourceIndex(0) +13>Emitted(58, 106) Source(80, 78) + SourceIndex(0) +14>Emitted(58, 116) Source(80, 88) + SourceIndex(0) +15>Emitted(58, 117) Source(80, 88) + SourceIndex(0) +16>Emitted(58, 119) Source(80, 90) + SourceIndex(0) +17>Emitted(58, 120) Source(80, 91) + SourceIndex(0) +18>Emitted(58, 123) Source(80, 94) + SourceIndex(0) +19>Emitted(58, 124) Source(80, 95) + SourceIndex(0) +20>Emitted(58, 126) Source(80, 97) + SourceIndex(0) +21>Emitted(58, 127) Source(80, 98) + SourceIndex(0) +22>Emitted(58, 130) Source(80, 101) + SourceIndex(0) +23>Emitted(58, 131) Source(80, 102) + SourceIndex(0) +24>Emitted(58, 133) Source(80, 104) + SourceIndex(0) +25>Emitted(58, 134) Source(80, 105) + SourceIndex(0) +26>Emitted(58, 136) Source(80, 107) + SourceIndex(0) +27>Emitted(58, 138) Source(80, 109) + SourceIndex(0) +28>Emitted(58, 139) Source(80, 110) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(59, 5) Source(81, 5) + SourceIndex(0) +2 >Emitted(59, 12) Source(81, 12) + SourceIndex(0) +3 >Emitted(59, 13) Source(81, 13) + SourceIndex(0) +4 >Emitted(59, 16) Source(81, 16) + SourceIndex(0) +5 >Emitted(59, 17) Source(81, 17) + SourceIndex(0) +6 >Emitted(59, 25) Source(81, 25) + SourceIndex(0) +7 >Emitted(59, 26) Source(81, 26) + SourceIndex(0) +8 >Emitted(59, 27) Source(81, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(60, 1) Source(82, 1) + SourceIndex(0) +2 >Emitted(60, 2) Source(82, 2) + SourceIndex(0) +--- +>>>for ((_t = getMultiRobot(), nameA = _t.name, _u = _t.skills, primaryA = _u.primary, secondaryA = _u.secondary, _t), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^^^^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^ +27> ^^ +28> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot() +7 > +8 > name: nameA +9 > , +10> skills +11> : { +12> primary: primaryA +13> , +14> secondary: secondaryA +15> } } = getMultiRobot() +16> , +17> i +18> = +19> 0 +20> ; +21> i +22> < +23> 1 +24> ; +25> i +26> ++ +27> ) +28> { +1->Emitted(61, 1) Source(83, 1) + SourceIndex(0) +2 >Emitted(61, 4) Source(83, 4) + SourceIndex(0) +3 >Emitted(61, 5) Source(83, 5) + SourceIndex(0) +4 >Emitted(61, 6) Source(83, 6) + SourceIndex(0) +5 >Emitted(61, 7) Source(83, 6) + SourceIndex(0) +6 >Emitted(61, 27) Source(83, 93) + SourceIndex(0) +7 >Emitted(61, 29) Source(83, 8) + SourceIndex(0) +8 >Emitted(61, 44) Source(83, 19) + SourceIndex(0) +9 >Emitted(61, 46) Source(83, 21) + SourceIndex(0) +10>Emitted(61, 60) Source(83, 27) + SourceIndex(0) +11>Emitted(61, 62) Source(83, 31) + SourceIndex(0) +12>Emitted(61, 83) Source(83, 48) + SourceIndex(0) +13>Emitted(61, 85) Source(83, 50) + SourceIndex(0) +14>Emitted(61, 110) Source(83, 71) + SourceIndex(0) +15>Emitted(61, 115) Source(83, 93) + SourceIndex(0) +16>Emitted(61, 117) Source(83, 95) + SourceIndex(0) +17>Emitted(61, 118) Source(83, 96) + SourceIndex(0) +18>Emitted(61, 121) Source(83, 99) + SourceIndex(0) +19>Emitted(61, 122) Source(83, 100) + SourceIndex(0) +20>Emitted(61, 124) Source(83, 102) + SourceIndex(0) +21>Emitted(61, 125) Source(83, 103) + SourceIndex(0) +22>Emitted(61, 128) Source(83, 106) + SourceIndex(0) +23>Emitted(61, 129) Source(83, 107) + SourceIndex(0) +24>Emitted(61, 131) Source(83, 109) + SourceIndex(0) +25>Emitted(61, 132) Source(83, 110) + SourceIndex(0) +26>Emitted(61, 134) Source(83, 112) + SourceIndex(0) +27>Emitted(61, 136) Source(83, 114) + SourceIndex(0) +28>Emitted(61, 137) Source(83, 115) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(62, 5) Source(84, 5) + SourceIndex(0) +2 >Emitted(62, 12) Source(84, 12) + SourceIndex(0) +3 >Emitted(62, 13) Source(84, 13) + SourceIndex(0) +4 >Emitted(62, 16) Source(84, 16) + SourceIndex(0) +5 >Emitted(62, 17) Source(84, 17) + SourceIndex(0) +6 >Emitted(62, 25) Source(84, 25) + SourceIndex(0) +7 >Emitted(62, 26) Source(84, 26) + SourceIndex(0) +8 >Emitted(62, 27) Source(84, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(63, 1) Source(85, 1) + SourceIndex(0) +2 >Emitted(63, 2) Source(85, 2) + SourceIndex(0) +--- +>>>for ((_v = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, nameA = _v.name, _w = _v.skills, primaryA = _w.primary, secondaryA = _w.secondary, _v), +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^^^^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } +7 > +8 > name: nameA +9 > , +10> skills +11> : { +12> primary: primaryA +13> , +14> secondary: secondaryA +15> } } = + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } +1->Emitted(64, 1) Source(86, 1) + SourceIndex(0) +2 >Emitted(64, 4) Source(86, 4) + SourceIndex(0) +3 >Emitted(64, 5) Source(86, 5) + SourceIndex(0) +4 >Emitted(64, 6) Source(86, 6) + SourceIndex(0) +5 >Emitted(64, 7) Source(86, 6) + SourceIndex(0) +6 >Emitted(64, 85) Source(87, 90) + SourceIndex(0) +7 >Emitted(64, 87) Source(86, 8) + SourceIndex(0) +8 >Emitted(64, 102) Source(86, 19) + SourceIndex(0) +9 >Emitted(64, 104) Source(86, 21) + SourceIndex(0) +10>Emitted(64, 118) Source(86, 27) + SourceIndex(0) +11>Emitted(64, 120) Source(86, 31) + SourceIndex(0) +12>Emitted(64, 141) Source(86, 48) + SourceIndex(0) +13>Emitted(64, 143) Source(86, 50) + SourceIndex(0) +14>Emitted(64, 168) Source(86, 71) + SourceIndex(0) +15>Emitted(64, 173) Source(87, 90) + SourceIndex(0) +--- +>>> i = 0; i < 1; i++) { +1 >^^^^ +2 > ^ +3 > ^^^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^^^ +8 > ^ +9 > ^^ +10> ^ +11> ^^ +12> ^^ +13> ^ +14> ^^^-> +1 >, + > +2 > i +3 > = +4 > 0 +5 > ; +6 > i +7 > < +8 > 1 +9 > ; +10> i +11> ++ +12> ) +13> { +1 >Emitted(65, 5) Source(88, 5) + SourceIndex(0) +2 >Emitted(65, 6) Source(88, 6) + SourceIndex(0) +3 >Emitted(65, 9) Source(88, 9) + SourceIndex(0) +4 >Emitted(65, 10) Source(88, 10) + SourceIndex(0) +5 >Emitted(65, 12) Source(88, 12) + SourceIndex(0) +6 >Emitted(65, 13) Source(88, 13) + SourceIndex(0) +7 >Emitted(65, 16) Source(88, 16) + SourceIndex(0) +8 >Emitted(65, 17) Source(88, 17) + SourceIndex(0) +9 >Emitted(65, 19) Source(88, 19) + SourceIndex(0) +10>Emitted(65, 20) Source(88, 20) + SourceIndex(0) +11>Emitted(65, 22) Source(88, 22) + SourceIndex(0) +12>Emitted(65, 24) Source(88, 24) + SourceIndex(0) +13>Emitted(65, 25) Source(88, 25) + SourceIndex(0) +--- +>>> console.log(primaryA); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1-> + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1->Emitted(66, 5) Source(89, 5) + SourceIndex(0) +2 >Emitted(66, 12) Source(89, 12) + SourceIndex(0) +3 >Emitted(66, 13) Source(89, 13) + SourceIndex(0) +4 >Emitted(66, 16) Source(89, 16) + SourceIndex(0) +5 >Emitted(66, 17) Source(89, 17) + SourceIndex(0) +6 >Emitted(66, 25) Source(89, 25) + SourceIndex(0) +7 >Emitted(66, 26) Source(89, 26) + SourceIndex(0) +8 >Emitted(66, 27) Source(89, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(67, 1) Source(90, 1) + SourceIndex(0) +2 >Emitted(67, 2) Source(90, 2) + SourceIndex(0) +--- +>>>for ((name = robot.name, skill = robot.skill, robot), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > +2 >for +3 > +4 > ( +5 > { +6 > name +7 > , +8 > skill +9 > } = +10> robot +11> +12> , +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(68, 1) Source(91, 1) + SourceIndex(0) +2 >Emitted(68, 4) Source(91, 4) + SourceIndex(0) +3 >Emitted(68, 5) Source(91, 5) + SourceIndex(0) +4 >Emitted(68, 6) Source(91, 6) + SourceIndex(0) +5 >Emitted(68, 7) Source(91, 8) + SourceIndex(0) +6 >Emitted(68, 24) Source(91, 12) + SourceIndex(0) +7 >Emitted(68, 26) Source(91, 14) + SourceIndex(0) +8 >Emitted(68, 45) Source(91, 19) + SourceIndex(0) +9 >Emitted(68, 47) Source(91, 24) + SourceIndex(0) +10>Emitted(68, 52) Source(91, 29) + SourceIndex(0) +11>Emitted(68, 53) Source(91, 29) + SourceIndex(0) +12>Emitted(68, 55) Source(91, 31) + SourceIndex(0) +13>Emitted(68, 56) Source(91, 32) + SourceIndex(0) +14>Emitted(68, 59) Source(91, 35) + SourceIndex(0) +15>Emitted(68, 60) Source(91, 36) + SourceIndex(0) +16>Emitted(68, 62) Source(91, 38) + SourceIndex(0) +17>Emitted(68, 63) Source(91, 39) + SourceIndex(0) +18>Emitted(68, 66) Source(91, 42) + SourceIndex(0) +19>Emitted(68, 67) Source(91, 43) + SourceIndex(0) +20>Emitted(68, 69) Source(91, 45) + SourceIndex(0) +21>Emitted(68, 70) Source(91, 46) + SourceIndex(0) +22>Emitted(68, 72) Source(91, 48) + SourceIndex(0) +23>Emitted(68, 74) Source(91, 50) + SourceIndex(0) +24>Emitted(68, 75) Source(91, 51) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(69, 5) Source(92, 5) + SourceIndex(0) +2 >Emitted(69, 12) Source(92, 12) + SourceIndex(0) +3 >Emitted(69, 13) Source(92, 13) + SourceIndex(0) +4 >Emitted(69, 16) Source(92, 16) + SourceIndex(0) +5 >Emitted(69, 17) Source(92, 17) + SourceIndex(0) +6 >Emitted(69, 22) Source(92, 22) + SourceIndex(0) +7 >Emitted(69, 23) Source(92, 23) + SourceIndex(0) +8 >Emitted(69, 24) Source(92, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(70, 1) Source(93, 1) + SourceIndex(0) +2 >Emitted(70, 2) Source(93, 2) + SourceIndex(0) +--- +>>>for ((_x = getRobot(), name = _x.name, skill = _x.skill, _x), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^ +11> ^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { name, skill } = getRobot() +7 > +8 > name +9 > , +10> skill +11> } = getRobot() +12> , +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(71, 1) Source(94, 1) + SourceIndex(0) +2 >Emitted(71, 4) Source(94, 4) + SourceIndex(0) +3 >Emitted(71, 5) Source(94, 5) + SourceIndex(0) +4 >Emitted(71, 6) Source(94, 6) + SourceIndex(0) +5 >Emitted(71, 7) Source(94, 6) + SourceIndex(0) +6 >Emitted(71, 22) Source(94, 34) + SourceIndex(0) +7 >Emitted(71, 24) Source(94, 8) + SourceIndex(0) +8 >Emitted(71, 38) Source(94, 12) + SourceIndex(0) +9 >Emitted(71, 40) Source(94, 14) + SourceIndex(0) +10>Emitted(71, 56) Source(94, 19) + SourceIndex(0) +11>Emitted(71, 61) Source(94, 34) + SourceIndex(0) +12>Emitted(71, 63) Source(94, 36) + SourceIndex(0) +13>Emitted(71, 64) Source(94, 37) + SourceIndex(0) +14>Emitted(71, 67) Source(94, 40) + SourceIndex(0) +15>Emitted(71, 68) Source(94, 41) + SourceIndex(0) +16>Emitted(71, 70) Source(94, 43) + SourceIndex(0) +17>Emitted(71, 71) Source(94, 44) + SourceIndex(0) +18>Emitted(71, 74) Source(94, 47) + SourceIndex(0) +19>Emitted(71, 75) Source(94, 48) + SourceIndex(0) +20>Emitted(71, 77) Source(94, 50) + SourceIndex(0) +21>Emitted(71, 78) Source(94, 51) + SourceIndex(0) +22>Emitted(71, 80) Source(94, 53) + SourceIndex(0) +23>Emitted(71, 82) Source(94, 55) + SourceIndex(0) +24>Emitted(71, 83) Source(94, 56) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(72, 5) Source(95, 5) + SourceIndex(0) +2 >Emitted(72, 12) Source(95, 12) + SourceIndex(0) +3 >Emitted(72, 13) Source(95, 13) + SourceIndex(0) +4 >Emitted(72, 16) Source(95, 16) + SourceIndex(0) +5 >Emitted(72, 17) Source(95, 17) + SourceIndex(0) +6 >Emitted(72, 22) Source(95, 22) + SourceIndex(0) +7 >Emitted(72, 23) Source(95, 23) + SourceIndex(0) +8 >Emitted(72, 24) Source(95, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(73, 1) Source(96, 1) + SourceIndex(0) +2 >Emitted(73, 2) Source(96, 2) + SourceIndex(0) +--- +>>>for ((_y = { name: "trimmer", skill: "trimming" }, name = _y.name, skill = _y.skill, _y), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^ +11> ^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { name, skill } = { name: "trimmer", skill: "trimming" } +7 > +8 > name +9 > , +10> skill +11> } = { name: "trimmer", skill: "trimming" } +12> , +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(74, 1) Source(97, 1) + SourceIndex(0) +2 >Emitted(74, 4) Source(97, 4) + SourceIndex(0) +3 >Emitted(74, 5) Source(97, 5) + SourceIndex(0) +4 >Emitted(74, 6) Source(97, 6) + SourceIndex(0) +5 >Emitted(74, 7) Source(97, 6) + SourceIndex(0) +6 >Emitted(74, 50) Source(97, 69) + SourceIndex(0) +7 >Emitted(74, 52) Source(97, 8) + SourceIndex(0) +8 >Emitted(74, 66) Source(97, 12) + SourceIndex(0) +9 >Emitted(74, 68) Source(97, 14) + SourceIndex(0) +10>Emitted(74, 84) Source(97, 19) + SourceIndex(0) +11>Emitted(74, 89) Source(97, 69) + SourceIndex(0) +12>Emitted(74, 91) Source(97, 71) + SourceIndex(0) +13>Emitted(74, 92) Source(97, 72) + SourceIndex(0) +14>Emitted(74, 95) Source(97, 75) + SourceIndex(0) +15>Emitted(74, 96) Source(97, 76) + SourceIndex(0) +16>Emitted(74, 98) Source(97, 78) + SourceIndex(0) +17>Emitted(74, 99) Source(97, 79) + SourceIndex(0) +18>Emitted(74, 102) Source(97, 82) + SourceIndex(0) +19>Emitted(74, 103) Source(97, 83) + SourceIndex(0) +20>Emitted(74, 105) Source(97, 85) + SourceIndex(0) +21>Emitted(74, 106) Source(97, 86) + SourceIndex(0) +22>Emitted(74, 108) Source(97, 88) + SourceIndex(0) +23>Emitted(74, 110) Source(97, 90) + SourceIndex(0) +24>Emitted(74, 111) Source(97, 91) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(75, 5) Source(98, 5) + SourceIndex(0) +2 >Emitted(75, 12) Source(98, 12) + SourceIndex(0) +3 >Emitted(75, 13) Source(98, 13) + SourceIndex(0) +4 >Emitted(75, 16) Source(98, 16) + SourceIndex(0) +5 >Emitted(75, 17) Source(98, 17) + SourceIndex(0) +6 >Emitted(75, 22) Source(98, 22) + SourceIndex(0) +7 >Emitted(75, 23) Source(98, 23) + SourceIndex(0) +8 >Emitted(75, 24) Source(98, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(76, 1) Source(99, 1) + SourceIndex(0) +2 >Emitted(76, 2) Source(99, 2) + SourceIndex(0) +--- +>>>for ((name = multiRobot.name, _z = multiRobot.skills, primary = _z.primary, secondary = _z.secondary, multiRobot), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^ +27> ^^ +28> ^ +1-> + > +2 >for +3 > +4 > ( +5 > { +6 > name +7 > , +8 > skills +9 > : { +10> primary +11> , +12> secondary +13> } } = +14> multiRobot +15> +16> , +17> i +18> = +19> 0 +20> ; +21> i +22> < +23> 1 +24> ; +25> i +26> ++ +27> ) +28> { +1->Emitted(77, 1) Source(100, 1) + SourceIndex(0) +2 >Emitted(77, 4) Source(100, 4) + SourceIndex(0) +3 >Emitted(77, 5) Source(100, 5) + SourceIndex(0) +4 >Emitted(77, 6) Source(100, 6) + SourceIndex(0) +5 >Emitted(77, 7) Source(100, 8) + SourceIndex(0) +6 >Emitted(77, 29) Source(100, 12) + SourceIndex(0) +7 >Emitted(77, 31) Source(100, 14) + SourceIndex(0) +8 >Emitted(77, 53) Source(100, 20) + SourceIndex(0) +9 >Emitted(77, 55) Source(100, 24) + SourceIndex(0) +10>Emitted(77, 75) Source(100, 31) + SourceIndex(0) +11>Emitted(77, 77) Source(100, 33) + SourceIndex(0) +12>Emitted(77, 101) Source(100, 42) + SourceIndex(0) +13>Emitted(77, 103) Source(100, 49) + SourceIndex(0) +14>Emitted(77, 113) Source(100, 59) + SourceIndex(0) +15>Emitted(77, 114) Source(100, 59) + SourceIndex(0) +16>Emitted(77, 116) Source(100, 61) + SourceIndex(0) +17>Emitted(77, 117) Source(100, 62) + SourceIndex(0) +18>Emitted(77, 120) Source(100, 65) + SourceIndex(0) +19>Emitted(77, 121) Source(100, 66) + SourceIndex(0) +20>Emitted(77, 123) Source(100, 68) + SourceIndex(0) +21>Emitted(77, 124) Source(100, 69) + SourceIndex(0) +22>Emitted(77, 127) Source(100, 72) + SourceIndex(0) +23>Emitted(77, 128) Source(100, 73) + SourceIndex(0) +24>Emitted(77, 130) Source(100, 75) + SourceIndex(0) +25>Emitted(77, 131) Source(100, 76) + SourceIndex(0) +26>Emitted(77, 133) Source(100, 78) + SourceIndex(0) +27>Emitted(77, 135) Source(100, 80) + SourceIndex(0) +28>Emitted(77, 136) Source(100, 81) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(78, 5) Source(101, 5) + SourceIndex(0) +2 >Emitted(78, 12) Source(101, 12) + SourceIndex(0) +3 >Emitted(78, 13) Source(101, 13) + SourceIndex(0) +4 >Emitted(78, 16) Source(101, 16) + SourceIndex(0) +5 >Emitted(78, 17) Source(101, 17) + SourceIndex(0) +6 >Emitted(78, 25) Source(101, 25) + SourceIndex(0) +7 >Emitted(78, 26) Source(101, 26) + SourceIndex(0) +8 >Emitted(78, 27) Source(101, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(79, 1) Source(102, 1) + SourceIndex(0) +2 >Emitted(79, 2) Source(102, 2) + SourceIndex(0) +--- +>>>for ((_0 = getMultiRobot(), name = _0.name, _1 = _0.skills, primary = _1.primary, secondary = _1.secondary, _0), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^^^^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^ +27> ^^ +28> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { name, skills: { primary, secondary } } = getMultiRobot() +7 > +8 > name +9 > , +10> skills +11> : { +12> primary +13> , +14> secondary +15> } } = getMultiRobot() +16> , +17> i +18> = +19> 0 +20> ; +21> i +22> < +23> 1 +24> ; +25> i +26> ++ +27> ) +28> { +1->Emitted(80, 1) Source(103, 1) + SourceIndex(0) +2 >Emitted(80, 4) Source(103, 4) + SourceIndex(0) +3 >Emitted(80, 5) Source(103, 5) + SourceIndex(0) +4 >Emitted(80, 6) Source(103, 6) + SourceIndex(0) +5 >Emitted(80, 7) Source(103, 6) + SourceIndex(0) +6 >Emitted(80, 27) Source(103, 64) + SourceIndex(0) +7 >Emitted(80, 29) Source(103, 8) + SourceIndex(0) +8 >Emitted(80, 43) Source(103, 12) + SourceIndex(0) +9 >Emitted(80, 45) Source(103, 14) + SourceIndex(0) +10>Emitted(80, 59) Source(103, 20) + SourceIndex(0) +11>Emitted(80, 61) Source(103, 24) + SourceIndex(0) +12>Emitted(80, 81) Source(103, 31) + SourceIndex(0) +13>Emitted(80, 83) Source(103, 33) + SourceIndex(0) +14>Emitted(80, 107) Source(103, 42) + SourceIndex(0) +15>Emitted(80, 112) Source(103, 64) + SourceIndex(0) +16>Emitted(80, 114) Source(103, 66) + SourceIndex(0) +17>Emitted(80, 115) Source(103, 67) + SourceIndex(0) +18>Emitted(80, 118) Source(103, 70) + SourceIndex(0) +19>Emitted(80, 119) Source(103, 71) + SourceIndex(0) +20>Emitted(80, 121) Source(103, 73) + SourceIndex(0) +21>Emitted(80, 122) Source(103, 74) + SourceIndex(0) +22>Emitted(80, 125) Source(103, 77) + SourceIndex(0) +23>Emitted(80, 126) Source(103, 78) + SourceIndex(0) +24>Emitted(80, 128) Source(103, 80) + SourceIndex(0) +25>Emitted(80, 129) Source(103, 81) + SourceIndex(0) +26>Emitted(80, 131) Source(103, 83) + SourceIndex(0) +27>Emitted(80, 133) Source(103, 85) + SourceIndex(0) +28>Emitted(80, 134) Source(103, 86) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(81, 5) Source(104, 5) + SourceIndex(0) +2 >Emitted(81, 12) Source(104, 12) + SourceIndex(0) +3 >Emitted(81, 13) Source(104, 13) + SourceIndex(0) +4 >Emitted(81, 16) Source(104, 16) + SourceIndex(0) +5 >Emitted(81, 17) Source(104, 17) + SourceIndex(0) +6 >Emitted(81, 25) Source(104, 25) + SourceIndex(0) +7 >Emitted(81, 26) Source(104, 26) + SourceIndex(0) +8 >Emitted(81, 27) Source(104, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(82, 1) Source(105, 1) + SourceIndex(0) +2 >Emitted(82, 2) Source(105, 2) + SourceIndex(0) +--- +>>>for ((_2 = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, name = _2.name, _3 = _2.skills, primary = _3.primary, secondary = _3.secondary, _2), +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^^^^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { name, skills: { primary, secondary } } = + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } +7 > +8 > name +9 > , +10> skills +11> : { +12> primary +13> , +14> secondary +15> } } = + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } +1->Emitted(83, 1) Source(106, 1) + SourceIndex(0) +2 >Emitted(83, 4) Source(106, 4) + SourceIndex(0) +3 >Emitted(83, 5) Source(106, 5) + SourceIndex(0) +4 >Emitted(83, 6) Source(106, 6) + SourceIndex(0) +5 >Emitted(83, 7) Source(106, 6) + SourceIndex(0) +6 >Emitted(83, 85) Source(107, 90) + SourceIndex(0) +7 >Emitted(83, 87) Source(106, 8) + SourceIndex(0) +8 >Emitted(83, 101) Source(106, 12) + SourceIndex(0) +9 >Emitted(83, 103) Source(106, 14) + SourceIndex(0) +10>Emitted(83, 117) Source(106, 20) + SourceIndex(0) +11>Emitted(83, 119) Source(106, 24) + SourceIndex(0) +12>Emitted(83, 139) Source(106, 31) + SourceIndex(0) +13>Emitted(83, 141) Source(106, 33) + SourceIndex(0) +14>Emitted(83, 165) Source(106, 42) + SourceIndex(0) +15>Emitted(83, 170) Source(107, 90) + SourceIndex(0) +--- +>>> i = 0; i < 1; i++) { +1 >^^^^ +2 > ^ +3 > ^^^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^^^ +8 > ^ +9 > ^^ +10> ^ +11> ^^ +12> ^^ +13> ^ +14> ^^^-> +1 >, + > +2 > i +3 > = +4 > 0 +5 > ; +6 > i +7 > < +8 > 1 +9 > ; +10> i +11> ++ +12> ) +13> { +1 >Emitted(84, 5) Source(108, 5) + SourceIndex(0) +2 >Emitted(84, 6) Source(108, 6) + SourceIndex(0) +3 >Emitted(84, 9) Source(108, 9) + SourceIndex(0) +4 >Emitted(84, 10) Source(108, 10) + SourceIndex(0) +5 >Emitted(84, 12) Source(108, 12) + SourceIndex(0) +6 >Emitted(84, 13) Source(108, 13) + SourceIndex(0) +7 >Emitted(84, 16) Source(108, 16) + SourceIndex(0) +8 >Emitted(84, 17) Source(108, 17) + SourceIndex(0) +9 >Emitted(84, 19) Source(108, 19) + SourceIndex(0) +10>Emitted(84, 20) Source(108, 20) + SourceIndex(0) +11>Emitted(84, 22) Source(108, 22) + SourceIndex(0) +12>Emitted(84, 24) Source(108, 24) + SourceIndex(0) +13>Emitted(84, 25) Source(108, 25) + SourceIndex(0) +--- +>>> console.log(primaryA); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1-> + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1->Emitted(85, 5) Source(109, 5) + SourceIndex(0) +2 >Emitted(85, 12) Source(109, 12) + SourceIndex(0) +3 >Emitted(85, 13) Source(109, 13) + SourceIndex(0) +4 >Emitted(85, 16) Source(109, 16) + SourceIndex(0) +5 >Emitted(85, 17) Source(109, 17) + SourceIndex(0) +6 >Emitted(85, 25) Source(109, 25) + SourceIndex(0) +7 >Emitted(85, 26) Source(109, 26) + SourceIndex(0) +8 >Emitted(85, 27) Source(109, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(86, 1) Source(110, 1) + SourceIndex(0) +2 >Emitted(86, 2) Source(110, 2) + SourceIndex(0) +--- +>>>var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3; +>>>//# sourceMappingURL=sourceMapValidationDestructuringForObjectBindingPattern2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.symbols b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.symbols new file mode 100644 index 00000000000..49de55505a2 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.symbols @@ -0,0 +1,490 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPattern2.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 11)) + + log(msg: any): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 1, 8)) +} +interface Robot { +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 2, 1)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 3, 17)) + + skill: string; +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 4, 17)) +} + +interface MultiRobot { +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 6, 1)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 8, 22)) + + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 9, 17)) + + primary: string; +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 10, 13)) + + secondary: string; +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 11, 24)) + + }; +} + +let robot: Robot = { name: "mower", skill: "mowing" }; +>robot : Symbol(robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 16, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 16, 20)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 16, 35)) + +let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +>multiRobot : Symbol(multiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 17, 3)) +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 17, 30)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 17, 45)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 17, 55)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 17, 74)) + +function getRobot() { +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 17, 97)) + + return robot; +>robot : Symbol(robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 16, 3)) +} +function getMultiRobot() { +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 20, 1)) + + return multiRobot; +>multiRobot : Symbol(multiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 17, 3)) +} + +let nameA: string, primaryA: string, secondaryA: string, i: number, skillA: string; +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 3)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 18)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 36)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 67)) + +let name: string, primary: string, secondary: string, skill: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 26, 3)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 26, 17)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 26, 34)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 26, 53)) + +for ({ name: nameA } = robot, i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 28, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 3)) +>robot : Symbol(robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 16, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 3)) +} +for ({ name: nameA } = getRobot(), i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 31, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 3)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 17, 97)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 3)) +} +for ({ name: nameA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 34, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 34, 31)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 34, 48)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 3)) +} +for ({ skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 37, 6)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 37, 16)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 18)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 37, 35)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 36)) +>multiRobot : Symbol(multiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 17, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 18)) +} +for ({ skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 40, 6)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 40, 16)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 18)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 40, 35)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 36)) +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 20, 1)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 18)) +} +for ({ skills: { primary: primaryA, secondary: secondaryA } } = +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 43, 6)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 43, 16)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 18)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 43, 35)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 36)) + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 44, 17)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 44, 34)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 44, 44)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 44, 65)) + + i = 0; i < 1; i++) { +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 18)) +} +for ({ name } = robot, i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 48, 6)) +>robot : Symbol(robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 16, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 3)) +} +for ({ name } = getRobot(), i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 51, 6)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 17, 97)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 3)) +} +for ({ name } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 54, 6)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 54, 24)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 54, 41)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 3)) +} +for ({ skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 57, 6)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 57, 16)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 57, 25)) +>multiRobot : Symbol(multiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 17, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 18)) +} +for ({ skills: { primary, secondary } } = getMultiRobot(), i = 0; i < 1; i++) { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 60, 6)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 60, 16)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 60, 25)) +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 20, 1)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 18)) +} +for ({ skills: { primary, secondary } } = +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 63, 6)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 63, 16)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 63, 25)) + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 64, 17)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 64, 34)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 64, 44)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 64, 65)) + + i = 0; i < 1; i++) { +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 18)) +} + + +for ({ name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 70, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 3)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 70, 19)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 67)) +>robot : Symbol(robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 16, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 3)) +} +for ({ name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 73, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 3)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 73, 19)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 67)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 17, 97)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 3)) +} +for ({ name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 76, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 3)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 76, 19)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 67)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 76, 46)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 76, 63)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 3)) +} +for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 79, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 3)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 79, 19)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 79, 29)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 18)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 79, 48)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 36)) +>multiRobot : Symbol(multiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 17, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 18)) +} +for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 82, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 3)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 82, 19)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 82, 29)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 18)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 82, 48)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 36)) +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 20, 1)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 18)) +} +for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 85, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 3)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 85, 19)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 85, 29)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 18)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 85, 48)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 36)) + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 86, 17)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 86, 34)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 86, 44)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 86, 65)) + + i = 0; i < 1; i++) { +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 18)) +} +for ({ name, skill } = robot, i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 90, 6)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 90, 12)) +>robot : Symbol(robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 16, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 3)) +} +for ({ name, skill } = getRobot(), i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 93, 6)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 93, 12)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 17, 97)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 3)) +} +for ({ name, skill } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 96, 6)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 96, 12)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 96, 31)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 96, 48)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 3)) +} +for ({ name, skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 99, 6)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 99, 12)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 99, 22)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 99, 31)) +>multiRobot : Symbol(multiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 17, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 18)) +} +for ({ name, skills: { primary, secondary } } = getMultiRobot(), i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 102, 6)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 102, 12)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 102, 22)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 102, 31)) +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 20, 1)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 18)) +} +for ({ name, skills: { primary, secondary } } = +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 105, 6)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 105, 12)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 105, 22)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 105, 31)) + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 106, 17)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 106, 34)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 106, 44)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 106, 65)) + + i = 0; i < 1; i++) { +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 56)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern2.ts, 25, 18)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.types b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.types new file mode 100644 index 00000000000..81beb06d3d7 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.types @@ -0,0 +1,774 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPattern2.ts === +declare var console: { +>console : { log(msg: any): void; } + + log(msg: any): void; +>log : (msg: any) => void +>msg : any +} +interface Robot { +>Robot : Robot + + name: string; +>name : string + + skill: string; +>skill : string +} + +interface MultiRobot { +>MultiRobot : MultiRobot + + name: string; +>name : string + + skills: { +>skills : { primary: string; secondary: string; } + + primary: string; +>primary : string + + secondary: string; +>secondary : string + + }; +} + +let robot: Robot = { name: "mower", skill: "mowing" }; +>robot : Robot +>Robot : Robot +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string + +let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +>multiRobot : MultiRobot +>MultiRobot : MultiRobot +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"mower" : string +>skills : { primary: string; secondary: string; } +>{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } +>primary : string +>"mowing" : string +>secondary : string +>"none" : string + +function getRobot() { +>getRobot : () => Robot + + return robot; +>robot : Robot +} +function getMultiRobot() { +>getMultiRobot : () => MultiRobot + + return multiRobot; +>multiRobot : MultiRobot +} + +let nameA: string, primaryA: string, secondaryA: string, i: number, skillA: string; +>nameA : string +>primaryA : string +>secondaryA : string +>i : number +>skillA : string + +let name: string, primary: string, secondary: string, skill: string; +>name : string +>primary : string +>secondary : string +>skill : string + +for ({ name: nameA } = robot, i = 0; i < 1; i++) { +>{ name: nameA } = robot, i = 0 : number +>{ name: nameA } = robot : Robot +>{ name: nameA } : { name: string; } +>name : string +>nameA : string +>robot : Robot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ name: nameA } = getRobot(), i = 0; i < 1; i++) { +>{ name: nameA } = getRobot(), i = 0 : number +>{ name: nameA } = getRobot() : Robot +>{ name: nameA } : { name: string; } +>name : string +>nameA : string +>getRobot() : Robot +>getRobot : () => Robot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ name: nameA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>{ name: nameA } = { name: "trimmer", skill: "trimming" }, i = 0 : number +>{ name: nameA } = { name: "trimmer", skill: "trimming" } : Robot +>{ name: nameA } : { name: string; } +>name : string +>nameA : string +>{ name: "trimmer", skill: "trimming" } : Robot +>Robot : Robot +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { +>{ skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0 : number +>{ skills: { primary: primaryA, secondary: secondaryA } } = multiRobot : MultiRobot +>{ skills: { primary: primaryA, secondary: secondaryA } } : { skills: { primary: string; secondary: string; }; } +>skills : { primary: string; secondary: string; } +>{ primary: primaryA, secondary: secondaryA } : { primary: string; secondary: string; } +>primary : string +>primaryA : string +>secondary : string +>secondaryA : string +>multiRobot : MultiRobot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for ({ skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { +>{ skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0 : number +>{ skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot() : MultiRobot +>{ skills: { primary: primaryA, secondary: secondaryA } } : { skills: { primary: string; secondary: string; }; } +>skills : { primary: string; secondary: string; } +>{ primary: primaryA, secondary: secondaryA } : { primary: string; secondary: string; } +>primary : string +>primaryA : string +>secondary : string +>secondaryA : string +>getMultiRobot() : MultiRobot +>getMultiRobot : () => MultiRobot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for ({ skills: { primary: primaryA, secondary: secondaryA } } = +>{ skills: { primary: primaryA, secondary: secondaryA } } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, i = 0 : number +>{ skills: { primary: primaryA, secondary: secondaryA } } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot +>{ skills: { primary: primaryA, secondary: secondaryA } } : { skills: { primary: string; secondary: string; }; } +>skills : { primary: string; secondary: string; } +>{ primary: primaryA, secondary: secondaryA } : { primary: string; secondary: string; } +>primary : string +>primaryA : string +>secondary : string +>secondaryA : string + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot +>MultiRobot : MultiRobot +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + + i = 0; i < 1; i++) { +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for ({ name } = robot, i = 0; i < 1; i++) { +>{ name } = robot, i = 0 : number +>{ name } = robot : Robot +>{ name } : { name: string; } +>name : string +>robot : Robot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ name } = getRobot(), i = 0; i < 1; i++) { +>{ name } = getRobot(), i = 0 : number +>{ name } = getRobot() : Robot +>{ name } : { name: string; } +>name : string +>getRobot() : Robot +>getRobot : () => Robot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ name } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>{ name } = { name: "trimmer", skill: "trimming" }, i = 0 : number +>{ name } = { name: "trimmer", skill: "trimming" } : Robot +>{ name } : { name: string; } +>name : string +>{ name: "trimmer", skill: "trimming" } : Robot +>Robot : Robot +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { +>{ skills: { primary, secondary } } = multiRobot, i = 0 : number +>{ skills: { primary, secondary } } = multiRobot : MultiRobot +>{ skills: { primary, secondary } } : { skills: { primary: string; secondary: string; }; } +>skills : { primary: string; secondary: string; } +>{ primary, secondary } : { primary: string; secondary: string; } +>primary : string +>secondary : string +>multiRobot : MultiRobot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for ({ skills: { primary, secondary } } = getMultiRobot(), i = 0; i < 1; i++) { +>{ skills: { primary, secondary } } = getMultiRobot(), i = 0 : number +>{ skills: { primary, secondary } } = getMultiRobot() : MultiRobot +>{ skills: { primary, secondary } } : { skills: { primary: string; secondary: string; }; } +>skills : { primary: string; secondary: string; } +>{ primary, secondary } : { primary: string; secondary: string; } +>primary : string +>secondary : string +>getMultiRobot() : MultiRobot +>getMultiRobot : () => MultiRobot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for ({ skills: { primary, secondary } } = +>{ skills: { primary, secondary } } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, i = 0 : number +>{ skills: { primary, secondary } } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot +>{ skills: { primary, secondary } } : { skills: { primary: string; secondary: string; }; } +>skills : { primary: string; secondary: string; } +>{ primary, secondary } : { primary: string; secondary: string; } +>primary : string +>secondary : string + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot +>MultiRobot : MultiRobot +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + + i = 0; i < 1; i++) { +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} + + +for ({ name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) { +>{ name: nameA, skill: skillA } = robot, i = 0 : number +>{ name: nameA, skill: skillA } = robot : Robot +>{ name: nameA, skill: skillA } : { name: string; skill: string; } +>name : string +>nameA : string +>skill : string +>skillA : string +>robot : Robot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) { +>{ name: nameA, skill: skillA } = getRobot(), i = 0 : number +>{ name: nameA, skill: skillA } = getRobot() : Robot +>{ name: nameA, skill: skillA } : { name: string; skill: string; } +>name : string +>nameA : string +>skill : string +>skillA : string +>getRobot() : Robot +>getRobot : () => Robot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>{ name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" }, i = 0 : number +>{ name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" } : Robot +>{ name: nameA, skill: skillA } : { name: string; skill: string; } +>name : string +>nameA : string +>skill : string +>skillA : string +>{ name: "trimmer", skill: "trimming" } : Robot +>Robot : Robot +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { +>{ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0 : number +>{ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot : MultiRobot +>{ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>nameA : string +>skills : { primary: string; secondary: string; } +>{ primary: primaryA, secondary: secondaryA } : { primary: string; secondary: string; } +>primary : string +>primaryA : string +>secondary : string +>secondaryA : string +>multiRobot : MultiRobot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { +>{ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0 : number +>{ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot() : MultiRobot +>{ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>nameA : string +>skills : { primary: string; secondary: string; } +>{ primary: primaryA, secondary: secondaryA } : { primary: string; secondary: string; } +>primary : string +>primaryA : string +>secondary : string +>secondaryA : string +>getMultiRobot() : MultiRobot +>getMultiRobot : () => MultiRobot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = +>{ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, i = 0 : number +>{ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot +>{ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>nameA : string +>skills : { primary: string; secondary: string; } +>{ primary: primaryA, secondary: secondaryA } : { primary: string; secondary: string; } +>primary : string +>primaryA : string +>secondary : string +>secondaryA : string + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot +>MultiRobot : MultiRobot +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + + i = 0; i < 1; i++) { +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for ({ name, skill } = robot, i = 0; i < 1; i++) { +>{ name, skill } = robot, i = 0 : number +>{ name, skill } = robot : Robot +>{ name, skill } : { name: string; skill: string; } +>name : string +>skill : string +>robot : Robot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ name, skill } = getRobot(), i = 0; i < 1; i++) { +>{ name, skill } = getRobot(), i = 0 : number +>{ name, skill } = getRobot() : Robot +>{ name, skill } : { name: string; skill: string; } +>name : string +>skill : string +>getRobot() : Robot +>getRobot : () => Robot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ name, skill } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>{ name, skill } = { name: "trimmer", skill: "trimming" }, i = 0 : number +>{ name, skill } = { name: "trimmer", skill: "trimming" } : Robot +>{ name, skill } : { name: string; skill: string; } +>name : string +>skill : string +>{ name: "trimmer", skill: "trimming" } : Robot +>Robot : Robot +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ name, skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { +>{ name, skills: { primary, secondary } } = multiRobot, i = 0 : number +>{ name, skills: { primary, secondary } } = multiRobot : MultiRobot +>{ name, skills: { primary, secondary } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>skills : { primary: string; secondary: string; } +>{ primary, secondary } : { primary: string; secondary: string; } +>primary : string +>secondary : string +>multiRobot : MultiRobot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for ({ name, skills: { primary, secondary } } = getMultiRobot(), i = 0; i < 1; i++) { +>{ name, skills: { primary, secondary } } = getMultiRobot(), i = 0 : number +>{ name, skills: { primary, secondary } } = getMultiRobot() : MultiRobot +>{ name, skills: { primary, secondary } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>skills : { primary: string; secondary: string; } +>{ primary, secondary } : { primary: string; secondary: string; } +>primary : string +>secondary : string +>getMultiRobot() : MultiRobot +>getMultiRobot : () => MultiRobot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for ({ name, skills: { primary, secondary } } = +>{ name, skills: { primary, secondary } } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, i = 0 : number +>{ name, skills: { primary, secondary } } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot +>{ name, skills: { primary, secondary } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>skills : { primary: string; secondary: string; } +>{ primary, secondary } : { primary: string; secondary: string; } +>primary : string +>secondary : string + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot +>MultiRobot : MultiRobot +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + + i = 0; i < 1; i++) { +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} diff --git a/tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPattern2.ts b/tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPattern2.ts new file mode 100644 index 00000000000..3e018b2a6d5 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPattern2.ts @@ -0,0 +1,111 @@ +// @sourcemap: true +declare var console: { + log(msg: any): void; +} +interface Robot { + name: string; + skill: string; +} + +interface MultiRobot { + name: string; + skills: { + primary: string; + secondary: string; + }; +} + +let robot: Robot = { name: "mower", skill: "mowing" }; +let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +function getRobot() { + return robot; +} +function getMultiRobot() { + return multiRobot; +} + +let nameA: string, primaryA: string, secondaryA: string, i: number, skillA: string; +let name: string, primary: string, secondary: string, skill: string; + +for ({ name: nameA } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name: nameA } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name: nameA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ skills: { primary: primaryA, secondary: secondaryA } } = + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ name } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ skills: { primary, secondary } } = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ skills: { primary, secondary } } = + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} + + +for ({ name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ name, skill } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name, skill } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name, skill } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name, skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ name, skills: { primary, secondary } } = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ name, skills: { primary, secondary } } = + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} \ No newline at end of file From 35ec9caf6551100fcd3996f923fa69688f955e35 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 8 Dec 2015 17:19:35 -0800 Subject: [PATCH 035/209] Make sourcemap of "For" that initializes vars using object literal binding pattern better --- src/compiler/emitter.ts | 6 +-- ...structuringForObjectBindingPattern2.js.map | 2 +- ...ringForObjectBindingPattern2.sourcemap.txt | 52 +++++++++---------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 47e518e90d7..c51fca95f32 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -3880,7 +3880,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi return call; } - function emitObjectLiteralAssignment(target: ObjectLiteralExpression, value: Expression) { + function emitObjectLiteralAssignment(target: ObjectLiteralExpression, value: Expression, sourceMapNode: Node) { const properties = target.properties; if (properties.length !== 1) { // For anything but a single element destructuring we need to generate a temporary @@ -3891,7 +3891,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi if (p.kind === SyntaxKind.PropertyAssignment || p.kind === SyntaxKind.ShorthandPropertyAssignment) { const propName = (p).name; const target = p.kind === SyntaxKind.ShorthandPropertyAssignment ? p : (p).initializer || propName; - emitDestructuringAssignment(target, createPropertyAccessForDestructuringProperty(value, propName), p); + emitDestructuringAssignment(target, createPropertyAccessForDestructuringProperty(value, propName), properties.length === 1 ? sourceMapNode : p); } } } @@ -3928,7 +3928,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi target = (target).left; } if (target.kind === SyntaxKind.ObjectLiteralExpression) { - emitObjectLiteralAssignment(target, value); + emitObjectLiteralAssignment(target, value, sourceMapNode); } else if (target.kind === SyntaxKind.ArrayLiteralExpression) { emitArrayLiteralAssignment(target, value, sourceMapNode); diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.js.map index 6c59f512b0e..89bf5672d04 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringForObjectBindingPattern2.js.map] -{"version":3,"file":"sourceMapValidationDestructuringForObjectBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForObjectBindingPattern2.ts"],"names":[],"mappings":"AAgBA,IAAI,KAAK,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACtD,IAAI,UAAU,GAAe,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;AACjG;IACI,MAAM,CAAC,KAAK,CAAC;AACjB,CAAC;AACD;IACI,MAAM,CAAC,UAAU,CAAC;AACtB,CAAC;AAED,IAAI,KAAa,EAAE,QAAgB,EAAE,UAAkB,EAAE,CAAS,EAAE,MAAc,CAAC;AACnF,IAAI,IAAY,EAAE,OAAe,EAAE,SAAiB,EAAE,KAAa,CAAC;AAEpE,GAAG,CAAC,CAAC,CAAE,kBAAW,EAAK,KAAK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8EACoF,EADlF,cAAI,EAAE,cAAM,EAAI,oBAAO,EAAE,wBAAS,KACgD;IACrF,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACpB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringForObjectBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForObjectBindingPattern2.ts"],"names":[],"mappings":"AAgBA,IAAI,KAAK,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACtD,IAAI,UAAU,GAAe,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;AACjG;IACI,MAAM,CAAC,KAAK,CAAC;AACjB,CAAC;AACD;IACI,MAAM,CAAC,UAAU,CAAC;AACtB,CAAC;AAED,IAAI,KAAa,EAAE,QAAgB,EAAE,UAAkB,EAAE,CAAS,EAAE,MAAc,CAAC;AACnF,IAAI,IAAY,EAAE,OAAe,EAAE,SAAiB,EAAE,KAAa,CAAC;AAEpE,GAAG,CAAC,CAAC,CAAA,kBAAuB,EAAL,KAAK,CAAA,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC9C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,eAA4B,EAA5B,eAA4B,KAAA,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACnD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,2CAA+D,EAA/D,eAA+D,KAAA,EAAE,CA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,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACnD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,2CAA+D,EAA7D,cAAI,EAAE,gBAAK,KAAkD,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACtF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,CAAE,sBAAI,EAAE,sBAAM,EAAI,oBAAO,EAAE,wBAAS,EAAO,UAAU,CAAA,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC5E,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,oBAA0D,EAAxD,cAAI,EAAE,cAAM,EAAI,oBAAO,EAAE,wBAAS,KAAsB,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjF,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,8EACoF,EADlF,cAAI,EAAE,cAAM,EAAI,oBAAO,EAAE,wBAAS,KACgD;IACrF,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACpB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.sourcemap.txt index 0659ec2fcee..6621dd0b551 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.sourcemap.txt @@ -311,9 +311,9 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 2 >for 3 > 4 > ( -5 > { -6 > name: nameA -7 > } = +5 > +6 > { name: nameA } = robot +7 > 8 > robot 9 > 10> , @@ -333,8 +333,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 2 >Emitted(11, 4) Source(29, 4) + SourceIndex(0) 3 >Emitted(11, 5) Source(29, 5) + SourceIndex(0) 4 >Emitted(11, 6) Source(29, 6) + SourceIndex(0) -5 >Emitted(11, 7) Source(29, 8) + SourceIndex(0) -6 >Emitted(11, 25) Source(29, 19) + SourceIndex(0) +5 >Emitted(11, 7) Source(29, 6) + SourceIndex(0) +6 >Emitted(11, 25) Source(29, 29) + SourceIndex(0) 7 >Emitted(11, 27) Source(29, 24) + SourceIndex(0) 8 >Emitted(11, 32) Source(29, 29) + SourceIndex(0) 9 >Emitted(11, 33) Source(29, 29) + SourceIndex(0) @@ -420,8 +420,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 5 > 6 > { name: nameA } = getRobot() 7 > -8 > name: nameA -9 > } = getRobot() +8 > { name: nameA } = getRobot() +9 > 10> , 11> i 12> = @@ -441,8 +441,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 4 >Emitted(14, 6) Source(32, 6) + SourceIndex(0) 5 >Emitted(14, 7) Source(32, 6) + SourceIndex(0) 6 >Emitted(14, 22) Source(32, 34) + SourceIndex(0) -7 >Emitted(14, 24) Source(32, 8) + SourceIndex(0) -8 >Emitted(14, 39) Source(32, 19) + SourceIndex(0) +7 >Emitted(14, 24) Source(32, 6) + SourceIndex(0) +8 >Emitted(14, 39) Source(32, 34) + SourceIndex(0) 9 >Emitted(14, 44) Source(32, 34) + SourceIndex(0) 10>Emitted(14, 46) Source(32, 36) + SourceIndex(0) 11>Emitted(14, 47) Source(32, 37) + SourceIndex(0) @@ -526,8 +526,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 5 > 6 > { name: nameA } = { name: "trimmer", skill: "trimming" } 7 > -8 > name: nameA -9 > } = { name: "trimmer", skill: "trimming" } +8 > { name: nameA } = { name: "trimmer", skill: "trimming" } +9 > 10> , 11> i 12> = @@ -547,8 +547,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 4 >Emitted(17, 6) Source(35, 6) + SourceIndex(0) 5 >Emitted(17, 7) Source(35, 6) + SourceIndex(0) 6 >Emitted(17, 50) Source(35, 69) + SourceIndex(0) -7 >Emitted(17, 52) Source(35, 8) + SourceIndex(0) -8 >Emitted(17, 67) Source(35, 19) + SourceIndex(0) +7 >Emitted(17, 52) Source(35, 6) + SourceIndex(0) +8 >Emitted(17, 67) Source(35, 69) + SourceIndex(0) 9 >Emitted(17, 72) Source(35, 69) + SourceIndex(0) 10>Emitted(17, 74) Source(35, 71) + SourceIndex(0) 11>Emitted(17, 75) Source(35, 72) + SourceIndex(0) @@ -989,9 +989,9 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 2 >for 3 > 4 > ( -5 > { -6 > name -7 > } = +5 > +6 > { name } = robot +7 > 8 > robot 9 > 10> , @@ -1011,8 +1011,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 2 >Emitted(30, 4) Source(49, 4) + SourceIndex(0) 3 >Emitted(30, 5) Source(49, 5) + SourceIndex(0) 4 >Emitted(30, 6) Source(49, 6) + SourceIndex(0) -5 >Emitted(30, 7) Source(49, 8) + SourceIndex(0) -6 >Emitted(30, 24) Source(49, 12) + SourceIndex(0) +5 >Emitted(30, 7) Source(49, 6) + SourceIndex(0) +6 >Emitted(30, 24) Source(49, 22) + SourceIndex(0) 7 >Emitted(30, 26) Source(49, 17) + SourceIndex(0) 8 >Emitted(30, 31) Source(49, 22) + SourceIndex(0) 9 >Emitted(30, 32) Source(49, 22) + SourceIndex(0) @@ -1098,8 +1098,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 5 > 6 > { name } = getRobot() 7 > -8 > name -9 > } = getRobot() +8 > { name } = getRobot() +9 > 10> , 11> i 12> = @@ -1119,8 +1119,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 4 >Emitted(33, 6) Source(52, 6) + SourceIndex(0) 5 >Emitted(33, 7) Source(52, 6) + SourceIndex(0) 6 >Emitted(33, 22) Source(52, 27) + SourceIndex(0) -7 >Emitted(33, 24) Source(52, 8) + SourceIndex(0) -8 >Emitted(33, 38) Source(52, 12) + SourceIndex(0) +7 >Emitted(33, 24) Source(52, 6) + SourceIndex(0) +8 >Emitted(33, 38) Source(52, 27) + SourceIndex(0) 9 >Emitted(33, 43) Source(52, 27) + SourceIndex(0) 10>Emitted(33, 45) Source(52, 29) + SourceIndex(0) 11>Emitted(33, 46) Source(52, 30) + SourceIndex(0) @@ -1204,8 +1204,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 5 > 6 > { name } = { name: "trimmer", skill: "trimming" } 7 > -8 > name -9 > } = { name: "trimmer", skill: "trimming" } +8 > { name } = { name: "trimmer", skill: "trimming" } +9 > 10> , 11> i 12> = @@ -1225,8 +1225,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 4 >Emitted(36, 6) Source(55, 6) + SourceIndex(0) 5 >Emitted(36, 7) Source(55, 6) + SourceIndex(0) 6 >Emitted(36, 50) Source(55, 62) + SourceIndex(0) -7 >Emitted(36, 52) Source(55, 8) + SourceIndex(0) -8 >Emitted(36, 66) Source(55, 12) + SourceIndex(0) +7 >Emitted(36, 52) Source(55, 6) + SourceIndex(0) +8 >Emitted(36, 66) Source(55, 62) + SourceIndex(0) 9 >Emitted(36, 71) Source(55, 62) + SourceIndex(0) 10>Emitted(36, 73) Source(55, 64) + SourceIndex(0) 11>Emitted(36, 74) Source(55, 65) + SourceIndex(0) From bbfe6b5e940b3485e6733e9bdd6f4611ca21940a Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 8 Dec 2015 17:25:31 -0800 Subject: [PATCH 036/209] Test case for sourcemap of "For of" that initializes vars using object literal binding pattern --- ...DestructuringForOfObjectBindingPattern2.js | 225 ++ ...ructuringForOfObjectBindingPattern2.js.map | 2 + ...ngForOfObjectBindingPattern2.sourcemap.txt | 3387 +++++++++++++++++ ...ucturingForOfObjectBindingPattern2.symbols | 435 +++ ...tructuringForOfObjectBindingPattern2.types | 593 +++ ...DestructuringForOfObjectBindingPattern2.ts | 110 + 6 files changed, 4752 insertions(+) create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.types create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPattern2.ts diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.js b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.js new file mode 100644 index 00000000000..aebfd11b9db --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.js @@ -0,0 +1,225 @@ +//// [sourceMapValidationDestructuringForOfObjectBindingPattern2.ts] +declare var console: { + log(msg: any): void; +} +interface Robot { + name: string; + skill: string; +} + +interface MultiRobot { + name: string; + skills: { + primary: string; + secondary: string; + }; +} + +let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; + +function getRobots() { + return robots; +} + +function getMultiRobots() { + return multiRobots; +} + +let nameA: string, primaryA: string, secondaryA: string, i: number, skillA: string; +let name: string, primary: string, secondary: string, skill: string; + +for ({name: nameA } of robots) { + console.log(nameA); +} +for ({name: nameA } of getRobots()) { + console.log(nameA); +} +for ({name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for ({ skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + console.log(primaryA); +} +for ({ skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + console.log(primaryA); +} +for ({ skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(primaryA); +} +for ({name } of robots) { + console.log(nameA); +} +for ({name } of getRobots()) { + console.log(nameA); +} +for ({name } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for ({ skills: { primary, secondary } } of multiRobots) { + console.log(primaryA); +} +for ({ skills: { primary, secondary } } of getMultiRobots()) { + console.log(primaryA); +} +for ({ skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(primaryA); +} + + +for ({name: nameA, skill: skillA } of robots) { + console.log(nameA); +} +for ({name: nameA, skill: skillA } of getRobots()) { + console.log(nameA); +} +for ({name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + console.log(nameA); +} +for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + console.log(nameA); +} +for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(nameA); +} +for ({name, skill } of robots) { + console.log(nameA); +} +for ({name, skill } of getRobots()) { + console.log(nameA); +} +for ({name, skill } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for ({name, skills: { primary, secondary } } of multiRobots) { + console.log(nameA); +} +for ({name, skills: { primary, secondary } } of getMultiRobots()) { + console.log(nameA); +} +for ({name, skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(nameA); +} + +//// [sourceMapValidationDestructuringForOfObjectBindingPattern2.js] +var robots = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +var multiRobots = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; +function getRobots() { + return robots; +} +function getMultiRobots() { + return multiRobots; +} +var nameA, primaryA, secondaryA, i, skillA; +var name, primary, secondary, skill; +for (var _i = 0, robots_1 = robots; _i < robots_1.length; _i++) { + nameA = robots_1[_i].name; + console.log(nameA); +} +for (var _a = 0, _b = getRobots(); _a < _b.length; _a++) { + nameA = _b[_a].name; + console.log(nameA); +} +for (var _c = 0, _d = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _c < _d.length; _c++) { + nameA = _d[_c].name; + console.log(nameA); +} +for (var _e = 0, multiRobots_1 = multiRobots; _e < multiRobots_1.length; _e++) { + _f = multiRobots_1[_e].skills, primaryA = _f.primary, secondaryA = _f.secondary; + console.log(primaryA); +} +for (var _g = 0, _h = getMultiRobots(); _g < _h.length; _g++) { + _j = _h[_g].skills, primaryA = _j.primary, secondaryA = _j.secondary; + console.log(primaryA); +} +for (var _k = 0, _l = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _k < _l.length; _k++) { + _m = _l[_k].skills, primaryA = _m.primary, secondaryA = _m.secondary; + console.log(primaryA); +} +for (var _o = 0, robots_2 = robots; _o < robots_2.length; _o++) { + name = robots_2[_o].name; + console.log(nameA); +} +for (var _p = 0, _q = getRobots(); _p < _q.length; _p++) { + name = _q[_p].name; + console.log(nameA); +} +for (var _r = 0, _s = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _r < _s.length; _r++) { + name = _s[_r].name; + console.log(nameA); +} +for (var _t = 0, multiRobots_2 = multiRobots; _t < multiRobots_2.length; _t++) { + _u = multiRobots_2[_t].skills, primary = _u.primary, secondary = _u.secondary; + console.log(primaryA); +} +for (var _v = 0, _w = getMultiRobots(); _v < _w.length; _v++) { + _x = _w[_v].skills, primary = _x.primary, secondary = _x.secondary; + console.log(primaryA); +} +for (var _y = 0, _z = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _y < _z.length; _y++) { + _0 = _z[_y].skills, primary = _0.primary, secondary = _0.secondary; + console.log(primaryA); +} +for (var _1 = 0, robots_3 = robots; _1 < robots_3.length; _1++) { + _2 = robots_3[_1], nameA = _2.name, skillA = _2.skill; + console.log(nameA); +} +for (var _3 = 0, _4 = getRobots(); _3 < _4.length; _3++) { + _5 = _4[_3], nameA = _5.name, skillA = _5.skill; + console.log(nameA); +} +for (var _6 = 0, _7 = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _6 < _7.length; _6++) { + _8 = _7[_6], nameA = _8.name, skillA = _8.skill; + console.log(nameA); +} +for (var _9 = 0, multiRobots_3 = multiRobots; _9 < multiRobots_3.length; _9++) { + _10 = multiRobots_3[_9], nameA = _10.name, _11 = _10.skills, primaryA = _11.primary, secondaryA = _11.secondary; + console.log(nameA); +} +for (var _12 = 0, _13 = getMultiRobots(); _12 < _13.length; _12++) { + _14 = _13[_12], nameA = _14.name, _15 = _14.skills, primaryA = _15.primary, secondaryA = _15.secondary; + console.log(nameA); +} +for (var _16 = 0, _17 = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _16 < _17.length; _16++) { + _18 = _17[_16], nameA = _18.name, _19 = _18.skills, primaryA = _19.primary, secondaryA = _19.secondary; + console.log(nameA); +} +for (var _20 = 0, robots_4 = robots; _20 < robots_4.length; _20++) { + _21 = robots_4[_20], name = _21.name, skill = _21.skill; + console.log(nameA); +} +for (var _22 = 0, _23 = getRobots(); _22 < _23.length; _22++) { + _24 = _23[_22], name = _24.name, skill = _24.skill; + console.log(nameA); +} +for (var _25 = 0, _26 = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _25 < _26.length; _25++) { + _27 = _26[_25], name = _27.name, skill = _27.skill; + console.log(nameA); +} +for (var _28 = 0, multiRobots_4 = multiRobots; _28 < multiRobots_4.length; _28++) { + _29 = multiRobots_4[_28], name = _29.name, _30 = _29.skills, primary = _30.primary, secondary = _30.secondary; + console.log(nameA); +} +for (var _31 = 0, _32 = getMultiRobots(); _31 < _32.length; _31++) { + _33 = _32[_31], name = _33.name, _34 = _33.skills, primary = _34.primary, secondary = _34.secondary; + console.log(nameA); +} +for (var _35 = 0, _36 = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _35 < _36.length; _35++) { + _37 = _36[_35], name = _37.name, _38 = _37.skills, primary = _38.primary, secondary = _38.secondary; + console.log(nameA); +} +var _f, _j, _m, _u, _x, _0, _2, _5, _8, _10, _11, _14, _15, _18, _19, _21, _24, _27, _29, _30, _33, _34, _37, _38; +//# sourceMappingURL=sourceMapValidationDestructuringForOfObjectBindingPattern2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.js.map new file mode 100644 index 00000000000..77e719df043 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringForOfObjectBindingPattern2.js.map] +{"version":3,"file":"sourceMapValidationDestructuringForOfObjectBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForOfObjectBindingPattern2.ts"],"names":[],"mappings":"AAgBA,IAAI,MAAM,GAAY,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;AACnG,IAAI,WAAW,GAAiB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE;IAChG,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;AAE/E;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,IAAI,KAAa,EAAE,QAAgB,EAAE,UAAkB,EAAE,CAAS,EAAE,MAAc,CAAC;AACnF,IAAI,IAAY,EAAE,OAAe,EAAE,SAAiB,EAAE,KAAa,CAAC;AAEpE,GAAG,CAAC,CAAmB,UAAM,EAAN,iBAAM,EAAN,oBAAM,EAAN,IAAM,CAAC;IAAzB,yBAAc;IACf,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAAmB,UAAW,EAAX,KAAA,SAAS,EAAE,EAAX,cAAW,EAAX,IAAW,CAAC;IAA9B,mBAAc;IACf,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAAmB,UAA4E,EAA5E,MAAC,EAAE,IAAI,EAAE,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,EAAE;IAChH,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,EAD9B,gBAC8B,EAD9B,KAC8B,CAAC;IAD1E,cAAuC,EAAtC,eAAI,EAAE,gBAAM,EAAI,qBAAO,EAAE,yBAAS;IAEpC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.sourcemap.txt new file mode 100644 index 00000000000..a3d11d0d43c --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.sourcemap.txt @@ -0,0 +1,3387 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringForOfObjectBindingPattern2.js +mapUrl: sourceMapValidationDestructuringForOfObjectBindingPattern2.js.map +sourceRoot: +sources: sourceMapValidationDestructuringForOfObjectBindingPattern2.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPattern2.js +sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts +------------------------------------------------------------------- +>>>var robots = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^ +7 > ^^^^ +8 > ^^ +9 > ^^^^^^^ +10> ^^ +11> ^^^^^ +12> ^^ +13> ^^^^^^^^ +14> ^^ +15> ^^ +16> ^^ +17> ^^^^ +18> ^^ +19> ^^^^^^^^^ +20> ^^ +21> ^^^^^ +22> ^^ +23> ^^^^^^^^^^ +24> ^^ +25> ^ +26> ^ +1 >declare var console: { + > log(msg: any): void; + >} + >interface Robot { + > name: string; + > skill: string; + >} + > + >interface MultiRobot { + > name: string; + > skills: { + > primary: string; + > secondary: string; + > }; + >} + > + > +2 >let +3 > robots +4 > : Robot[] = +5 > [ +6 > { +7 > name +8 > : +9 > "mower" +10> , +11> skill +12> : +13> "mowing" +14> } +15> , +16> { +17> name +18> : +19> "trimmer" +20> , +21> skill +22> : +23> "trimming" +24> } +25> ] +26> ; +1 >Emitted(1, 1) Source(17, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(17, 5) + SourceIndex(0) +3 >Emitted(1, 11) Source(17, 11) + SourceIndex(0) +4 >Emitted(1, 14) Source(17, 23) + SourceIndex(0) +5 >Emitted(1, 15) Source(17, 24) + SourceIndex(0) +6 >Emitted(1, 17) Source(17, 26) + SourceIndex(0) +7 >Emitted(1, 21) Source(17, 30) + SourceIndex(0) +8 >Emitted(1, 23) Source(17, 32) + SourceIndex(0) +9 >Emitted(1, 30) Source(17, 39) + SourceIndex(0) +10>Emitted(1, 32) Source(17, 41) + SourceIndex(0) +11>Emitted(1, 37) Source(17, 46) + SourceIndex(0) +12>Emitted(1, 39) Source(17, 48) + SourceIndex(0) +13>Emitted(1, 47) Source(17, 56) + SourceIndex(0) +14>Emitted(1, 49) Source(17, 58) + SourceIndex(0) +15>Emitted(1, 51) Source(17, 60) + SourceIndex(0) +16>Emitted(1, 53) Source(17, 62) + SourceIndex(0) +17>Emitted(1, 57) Source(17, 66) + SourceIndex(0) +18>Emitted(1, 59) Source(17, 68) + SourceIndex(0) +19>Emitted(1, 68) Source(17, 77) + SourceIndex(0) +20>Emitted(1, 70) Source(17, 79) + SourceIndex(0) +21>Emitted(1, 75) Source(17, 84) + SourceIndex(0) +22>Emitted(1, 77) Source(17, 86) + SourceIndex(0) +23>Emitted(1, 87) Source(17, 96) + SourceIndex(0) +24>Emitted(1, 89) Source(17, 98) + SourceIndex(0) +25>Emitted(1, 90) Source(17, 99) + SourceIndex(0) +26>Emitted(1, 91) Source(17, 100) + SourceIndex(0) +--- +>>>var multiRobots = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +1 > +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^ +7 > ^^^^ +8 > ^^ +9 > ^^^^^^^ +10> ^^ +11> ^^^^^^ +12> ^^ +13> ^^ +14> ^^^^^^^ +15> ^^ +16> ^^^^^^^^ +17> ^^ +18> ^^^^^^^^^ +19> ^^ +20> ^^^^^^ +21> ^^ +22> ^^ +1 > + > +2 >let +3 > multiRobots +4 > : MultiRobot[] = +5 > [ +6 > { +7 > name +8 > : +9 > "mower" +10> , +11> skills +12> : +13> { +14> primary +15> : +16> "mowing" +17> , +18> secondary +19> : +20> "none" +21> } +22> } +1 >Emitted(2, 1) Source(18, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(18, 5) + SourceIndex(0) +3 >Emitted(2, 16) Source(18, 16) + SourceIndex(0) +4 >Emitted(2, 19) Source(18, 33) + SourceIndex(0) +5 >Emitted(2, 20) Source(18, 34) + SourceIndex(0) +6 >Emitted(2, 22) Source(18, 36) + SourceIndex(0) +7 >Emitted(2, 26) Source(18, 40) + SourceIndex(0) +8 >Emitted(2, 28) Source(18, 42) + SourceIndex(0) +9 >Emitted(2, 35) Source(18, 49) + SourceIndex(0) +10>Emitted(2, 37) Source(18, 51) + SourceIndex(0) +11>Emitted(2, 43) Source(18, 57) + SourceIndex(0) +12>Emitted(2, 45) Source(18, 59) + SourceIndex(0) +13>Emitted(2, 47) Source(18, 61) + SourceIndex(0) +14>Emitted(2, 54) Source(18, 68) + SourceIndex(0) +15>Emitted(2, 56) Source(18, 70) + SourceIndex(0) +16>Emitted(2, 64) Source(18, 78) + SourceIndex(0) +17>Emitted(2, 66) Source(18, 80) + SourceIndex(0) +18>Emitted(2, 75) Source(18, 89) + SourceIndex(0) +19>Emitted(2, 77) Source(18, 91) + SourceIndex(0) +20>Emitted(2, 83) Source(18, 97) + SourceIndex(0) +21>Emitted(2, 85) Source(18, 99) + SourceIndex(0) +22>Emitted(2, 87) Source(18, 101) + SourceIndex(0) +--- +>>> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; +1 >^^^^ +2 > ^^ +3 > ^^^^ +4 > ^^ +5 > ^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^ +10> ^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^ +15> ^^ +16> ^^^^^^^^ +17> ^^ +18> ^^ +19> ^ +20> ^ +1 >, + > +2 > { +3 > name +4 > : +5 > "trimmer" +6 > , +7 > skills +8 > : +9 > { +10> primary +11> : +12> "trimming" +13> , +14> secondary +15> : +16> "edging" +17> } +18> } +19> ] +20> ; +1 >Emitted(3, 5) Source(19, 5) + SourceIndex(0) +2 >Emitted(3, 7) Source(19, 7) + SourceIndex(0) +3 >Emitted(3, 11) Source(19, 11) + SourceIndex(0) +4 >Emitted(3, 13) Source(19, 13) + SourceIndex(0) +5 >Emitted(3, 22) Source(19, 22) + SourceIndex(0) +6 >Emitted(3, 24) Source(19, 24) + SourceIndex(0) +7 >Emitted(3, 30) Source(19, 30) + SourceIndex(0) +8 >Emitted(3, 32) Source(19, 32) + SourceIndex(0) +9 >Emitted(3, 34) Source(19, 34) + SourceIndex(0) +10>Emitted(3, 41) Source(19, 41) + SourceIndex(0) +11>Emitted(3, 43) Source(19, 43) + SourceIndex(0) +12>Emitted(3, 53) Source(19, 53) + SourceIndex(0) +13>Emitted(3, 55) Source(19, 55) + SourceIndex(0) +14>Emitted(3, 64) Source(19, 64) + SourceIndex(0) +15>Emitted(3, 66) Source(19, 66) + SourceIndex(0) +16>Emitted(3, 74) Source(19, 74) + SourceIndex(0) +17>Emitted(3, 76) Source(19, 76) + SourceIndex(0) +18>Emitted(3, 78) Source(19, 78) + SourceIndex(0) +19>Emitted(3, 79) Source(19, 79) + SourceIndex(0) +20>Emitted(3, 80) Source(19, 80) + SourceIndex(0) +--- +>>>function getRobots() { +1 > +2 >^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +1 >Emitted(4, 1) Source(21, 1) + SourceIndex(0) +--- +>>> return robots; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +1->function getRobots() { + > +2 > return +3 > +4 > robots +5 > ; +1->Emitted(5, 5) Source(22, 5) + SourceIndex(0) +2 >Emitted(5, 11) Source(22, 11) + SourceIndex(0) +3 >Emitted(5, 12) Source(22, 12) + SourceIndex(0) +4 >Emitted(5, 18) Source(22, 18) + SourceIndex(0) +5 >Emitted(5, 19) Source(22, 19) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(6, 1) Source(23, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(23, 2) + SourceIndex(0) +--- +>>>function getMultiRobots() { +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +1->Emitted(7, 1) Source(25, 1) + SourceIndex(0) +--- +>>> return multiRobots; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^ +5 > ^ +1->function getMultiRobots() { + > +2 > return +3 > +4 > multiRobots +5 > ; +1->Emitted(8, 5) Source(26, 5) + SourceIndex(0) +2 >Emitted(8, 11) Source(26, 11) + SourceIndex(0) +3 >Emitted(8, 12) Source(26, 12) + SourceIndex(0) +4 >Emitted(8, 23) Source(26, 23) + SourceIndex(0) +5 >Emitted(8, 24) Source(26, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(9, 1) Source(27, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(27, 2) + SourceIndex(0) +--- +>>>var nameA, primaryA, secondaryA, i, skillA; +1-> +2 >^^^^ +3 > ^^^^^ +4 > ^^ +5 > ^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^ +11> ^^^^^^ +12> ^ +1-> + > + > +2 >let +3 > nameA: string +4 > , +5 > primaryA: string +6 > , +7 > secondaryA: string +8 > , +9 > i: number +10> , +11> skillA: string +12> ; +1->Emitted(10, 1) Source(29, 1) + SourceIndex(0) +2 >Emitted(10, 5) Source(29, 5) + SourceIndex(0) +3 >Emitted(10, 10) Source(29, 18) + SourceIndex(0) +4 >Emitted(10, 12) Source(29, 20) + SourceIndex(0) +5 >Emitted(10, 20) Source(29, 36) + SourceIndex(0) +6 >Emitted(10, 22) Source(29, 38) + SourceIndex(0) +7 >Emitted(10, 32) Source(29, 56) + SourceIndex(0) +8 >Emitted(10, 34) Source(29, 58) + SourceIndex(0) +9 >Emitted(10, 35) Source(29, 67) + SourceIndex(0) +10>Emitted(10, 37) Source(29, 69) + SourceIndex(0) +11>Emitted(10, 43) Source(29, 83) + SourceIndex(0) +12>Emitted(10, 44) Source(29, 84) + SourceIndex(0) +--- +>>>var name, primary, secondary, skill; +1 > +2 >^^^^ +3 > ^^^^ +4 > ^^ +5 > ^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^ +8 > ^^ +9 > ^^^^^ +10> ^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >let +3 > name: string +4 > , +5 > primary: string +6 > , +7 > secondary: string +8 > , +9 > skill: string +10> ; +1 >Emitted(11, 1) Source(30, 1) + SourceIndex(0) +2 >Emitted(11, 5) Source(30, 5) + SourceIndex(0) +3 >Emitted(11, 9) Source(30, 17) + SourceIndex(0) +4 >Emitted(11, 11) Source(30, 19) + SourceIndex(0) +5 >Emitted(11, 18) Source(30, 34) + SourceIndex(0) +6 >Emitted(11, 20) Source(30, 36) + SourceIndex(0) +7 >Emitted(11, 29) Source(30, 53) + SourceIndex(0) +8 >Emitted(11, 31) Source(30, 55) + SourceIndex(0) +9 >Emitted(11, 36) Source(30, 68) + SourceIndex(0) +10>Emitted(11, 37) Source(30, 69) + SourceIndex(0) +--- +>>>for (var _i = 0, robots_1 = robots; _i < robots_1.length; _i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +1-> + > + > +2 >for +3 > +4 > ({name: nameA } of +5 > robots +6 > +7 > robots +8 > +9 > robots +10> +11> robots +12> ) +1->Emitted(12, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(12, 4) Source(32, 4) + SourceIndex(0) +3 >Emitted(12, 5) Source(32, 5) + SourceIndex(0) +4 >Emitted(12, 6) Source(32, 24) + SourceIndex(0) +5 >Emitted(12, 16) Source(32, 30) + SourceIndex(0) +6 >Emitted(12, 18) Source(32, 24) + SourceIndex(0) +7 >Emitted(12, 35) Source(32, 30) + SourceIndex(0) +8 >Emitted(12, 37) Source(32, 24) + SourceIndex(0) +9 >Emitted(12, 57) Source(32, 30) + SourceIndex(0) +10>Emitted(12, 59) Source(32, 24) + SourceIndex(0) +11>Emitted(12, 63) Source(32, 30) + SourceIndex(0) +12>Emitted(12, 64) Source(32, 31) + SourceIndex(0) +--- +>>> nameA = robots_1[_i].name; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > {name: nameA } +1 >Emitted(13, 5) Source(32, 6) + SourceIndex(0) +2 >Emitted(13, 30) Source(32, 20) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(14, 5) Source(33, 5) + SourceIndex(0) +2 >Emitted(14, 12) Source(33, 12) + SourceIndex(0) +3 >Emitted(14, 13) Source(33, 13) + SourceIndex(0) +4 >Emitted(14, 16) Source(33, 16) + SourceIndex(0) +5 >Emitted(14, 17) Source(33, 17) + SourceIndex(0) +6 >Emitted(14, 22) Source(33, 22) + SourceIndex(0) +7 >Emitted(14, 23) Source(33, 23) + SourceIndex(0) +8 >Emitted(14, 24) Source(33, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(15, 2) Source(34, 2) + SourceIndex(0) +--- +>>>for (var _a = 0, _b = getRobots(); _a < _b.length; _a++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +1-> + > +2 >for +3 > +4 > ({name: nameA } of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> getRobots() +12> +13> getRobots() +14> ) +1->Emitted(16, 1) Source(35, 1) + SourceIndex(0) +2 >Emitted(16, 4) Source(35, 4) + SourceIndex(0) +3 >Emitted(16, 5) Source(35, 5) + SourceIndex(0) +4 >Emitted(16, 6) Source(35, 24) + SourceIndex(0) +5 >Emitted(16, 16) Source(35, 35) + SourceIndex(0) +6 >Emitted(16, 18) Source(35, 24) + SourceIndex(0) +7 >Emitted(16, 23) Source(35, 24) + SourceIndex(0) +8 >Emitted(16, 32) Source(35, 33) + SourceIndex(0) +9 >Emitted(16, 34) Source(35, 35) + SourceIndex(0) +10>Emitted(16, 36) Source(35, 24) + SourceIndex(0) +11>Emitted(16, 50) Source(35, 35) + SourceIndex(0) +12>Emitted(16, 52) Source(35, 24) + SourceIndex(0) +13>Emitted(16, 56) Source(35, 35) + SourceIndex(0) +14>Emitted(16, 57) Source(35, 36) + SourceIndex(0) +--- +>>> nameA = _b[_a].name; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^-> +1 > +2 > {name: nameA } +1 >Emitted(17, 5) Source(35, 6) + SourceIndex(0) +2 >Emitted(17, 24) Source(35, 20) + SourceIndex(0) +--- +>>> console.log(nameA); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1-> of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1->Emitted(18, 5) Source(36, 5) + SourceIndex(0) +2 >Emitted(18, 12) Source(36, 12) + SourceIndex(0) +3 >Emitted(18, 13) Source(36, 13) + SourceIndex(0) +4 >Emitted(18, 16) Source(36, 16) + SourceIndex(0) +5 >Emitted(18, 17) Source(36, 17) + SourceIndex(0) +6 >Emitted(18, 22) Source(36, 22) + SourceIndex(0) +7 >Emitted(18, 23) Source(36, 23) + SourceIndex(0) +8 >Emitted(18, 24) Source(36, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(19, 2) Source(37, 2) + SourceIndex(0) +--- +>>>for (var _c = 0, _d = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _c < _d.length; _c++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^^^ +10> ^^ +11> ^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^^ +15> ^^^^^^^^ +16> ^^ +17> ^^ +18> ^^ +19> ^^^^ +20> ^^ +21> ^^^^^^^^^ +22> ^^ +23> ^^^^^ +24> ^^ +25> ^^^^^^^^^^ +26> ^^ +27> ^ +28> ^^ +29> ^^^^^^^^^^^^^^ +30> ^^ +31> ^^^^ +32> ^ +1-> + > +2 >for +3 > +4 > ({name: nameA } of +5 > [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +6 > +7 > [ +8 > { +9 > name +10> : +11> "mower" +12> , +13> skill +14> : +15> "mowing" +16> } +17> , +18> { +19> name +20> : +21> "trimmer" +22> , +23> skill +24> : +25> "trimming" +26> } +27> ] +28> +29> [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +30> +31> [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +32> ) +1->Emitted(20, 1) Source(38, 1) + SourceIndex(0) +2 >Emitted(20, 4) Source(38, 4) + SourceIndex(0) +3 >Emitted(20, 5) Source(38, 5) + SourceIndex(0) +4 >Emitted(20, 6) Source(38, 24) + SourceIndex(0) +5 >Emitted(20, 16) Source(38, 100) + SourceIndex(0) +6 >Emitted(20, 18) Source(38, 24) + SourceIndex(0) +7 >Emitted(20, 24) Source(38, 25) + SourceIndex(0) +8 >Emitted(20, 26) Source(38, 27) + SourceIndex(0) +9 >Emitted(20, 30) Source(38, 31) + SourceIndex(0) +10>Emitted(20, 32) Source(38, 33) + SourceIndex(0) +11>Emitted(20, 39) Source(38, 40) + SourceIndex(0) +12>Emitted(20, 41) Source(38, 42) + SourceIndex(0) +13>Emitted(20, 46) Source(38, 47) + SourceIndex(0) +14>Emitted(20, 48) Source(38, 49) + SourceIndex(0) +15>Emitted(20, 56) Source(38, 57) + SourceIndex(0) +16>Emitted(20, 58) Source(38, 59) + SourceIndex(0) +17>Emitted(20, 60) Source(38, 61) + SourceIndex(0) +18>Emitted(20, 62) Source(38, 63) + SourceIndex(0) +19>Emitted(20, 66) Source(38, 67) + SourceIndex(0) +20>Emitted(20, 68) Source(38, 69) + SourceIndex(0) +21>Emitted(20, 77) Source(38, 78) + SourceIndex(0) +22>Emitted(20, 79) Source(38, 80) + SourceIndex(0) +23>Emitted(20, 84) Source(38, 85) + SourceIndex(0) +24>Emitted(20, 86) Source(38, 87) + SourceIndex(0) +25>Emitted(20, 96) Source(38, 97) + SourceIndex(0) +26>Emitted(20, 98) Source(38, 99) + SourceIndex(0) +27>Emitted(20, 99) Source(38, 100) + SourceIndex(0) +28>Emitted(20, 101) Source(38, 24) + SourceIndex(0) +29>Emitted(20, 115) Source(38, 100) + SourceIndex(0) +30>Emitted(20, 117) Source(38, 24) + SourceIndex(0) +31>Emitted(20, 121) Source(38, 100) + SourceIndex(0) +32>Emitted(20, 122) Source(38, 101) + SourceIndex(0) +--- +>>> nameA = _d[_c].name; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^-> +1 > +2 > {name: nameA } +1 >Emitted(21, 5) Source(38, 6) + SourceIndex(0) +2 >Emitted(21, 24) Source(38, 20) + SourceIndex(0) +--- +>>> console.log(nameA); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1-> of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1->Emitted(22, 5) Source(39, 5) + SourceIndex(0) +2 >Emitted(22, 12) Source(39, 12) + SourceIndex(0) +3 >Emitted(22, 13) Source(39, 13) + SourceIndex(0) +4 >Emitted(22, 16) Source(39, 16) + SourceIndex(0) +5 >Emitted(22, 17) Source(39, 17) + SourceIndex(0) +6 >Emitted(22, 22) Source(39, 22) + SourceIndex(0) +7 >Emitted(22, 23) Source(39, 23) + SourceIndex(0) +8 >Emitted(22, 24) Source(39, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(23, 2) Source(40, 2) + SourceIndex(0) +--- +>>>for (var _e = 0, multiRobots_1 = multiRobots; _e < multiRobots_1.length; _e++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +13> ^^^^^^^-> +1-> + > +2 >for +3 > +4 > ({ skills: { primary: primaryA, secondary: secondaryA } } of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > multiRobots +10> +11> multiRobots +12> ) +1->Emitted(24, 1) Source(41, 1) + SourceIndex(0) +2 >Emitted(24, 4) Source(41, 4) + SourceIndex(0) +3 >Emitted(24, 5) Source(41, 5) + SourceIndex(0) +4 >Emitted(24, 6) Source(41, 66) + SourceIndex(0) +5 >Emitted(24, 16) Source(41, 77) + SourceIndex(0) +6 >Emitted(24, 18) Source(41, 66) + SourceIndex(0) +7 >Emitted(24, 45) Source(41, 77) + SourceIndex(0) +8 >Emitted(24, 47) Source(41, 66) + SourceIndex(0) +9 >Emitted(24, 72) Source(41, 77) + SourceIndex(0) +10>Emitted(24, 74) Source(41, 66) + SourceIndex(0) +11>Emitted(24, 78) Source(41, 77) + SourceIndex(0) +12>Emitted(24, 79) Source(41, 78) + SourceIndex(0) +--- +>>> _f = multiRobots_1[_e].skills, primaryA = _f.primary, secondaryA = _f.secondary; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > skills +3 > : { +4 > primary: primaryA +5 > , +6 > secondary: secondaryA +1->Emitted(25, 5) Source(41, 8) + SourceIndex(0) +2 >Emitted(25, 34) Source(41, 14) + SourceIndex(0) +3 >Emitted(25, 36) Source(41, 18) + SourceIndex(0) +4 >Emitted(25, 57) Source(41, 35) + SourceIndex(0) +5 >Emitted(25, 59) Source(41, 37) + SourceIndex(0) +6 >Emitted(25, 84) Source(41, 58) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > } } of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(26, 5) Source(42, 5) + SourceIndex(0) +2 >Emitted(26, 12) Source(42, 12) + SourceIndex(0) +3 >Emitted(26, 13) Source(42, 13) + SourceIndex(0) +4 >Emitted(26, 16) Source(42, 16) + SourceIndex(0) +5 >Emitted(26, 17) Source(42, 17) + SourceIndex(0) +6 >Emitted(26, 25) Source(42, 25) + SourceIndex(0) +7 >Emitted(26, 26) Source(42, 26) + SourceIndex(0) +8 >Emitted(26, 27) Source(42, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(27, 2) Source(43, 2) + SourceIndex(0) +--- +>>>for (var _g = 0, _h = getMultiRobots(); _g < _h.length; _g++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +15> ^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ({ skills: { primary: primaryA, secondary: secondaryA } } of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> getMultiRobots() +12> +13> getMultiRobots() +14> ) +1->Emitted(28, 1) Source(44, 1) + SourceIndex(0) +2 >Emitted(28, 4) Source(44, 4) + SourceIndex(0) +3 >Emitted(28, 5) Source(44, 5) + SourceIndex(0) +4 >Emitted(28, 6) Source(44, 66) + SourceIndex(0) +5 >Emitted(28, 16) Source(44, 82) + SourceIndex(0) +6 >Emitted(28, 18) Source(44, 66) + SourceIndex(0) +7 >Emitted(28, 23) Source(44, 66) + SourceIndex(0) +8 >Emitted(28, 37) Source(44, 80) + SourceIndex(0) +9 >Emitted(28, 39) Source(44, 82) + SourceIndex(0) +10>Emitted(28, 41) Source(44, 66) + SourceIndex(0) +11>Emitted(28, 55) Source(44, 82) + SourceIndex(0) +12>Emitted(28, 57) Source(44, 66) + SourceIndex(0) +13>Emitted(28, 61) Source(44, 82) + SourceIndex(0) +14>Emitted(28, 62) Source(44, 83) + SourceIndex(0) +--- +>>> _j = _h[_g].skills, primaryA = _j.primary, secondaryA = _j.secondary; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > skills +3 > : { +4 > primary: primaryA +5 > , +6 > secondary: secondaryA +1->Emitted(29, 5) Source(44, 8) + SourceIndex(0) +2 >Emitted(29, 23) Source(44, 14) + SourceIndex(0) +3 >Emitted(29, 25) Source(44, 18) + SourceIndex(0) +4 >Emitted(29, 46) Source(44, 35) + SourceIndex(0) +5 >Emitted(29, 48) Source(44, 37) + SourceIndex(0) +6 >Emitted(29, 73) Source(44, 58) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > } } of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(30, 5) Source(45, 5) + SourceIndex(0) +2 >Emitted(30, 12) Source(45, 12) + SourceIndex(0) +3 >Emitted(30, 13) Source(45, 13) + SourceIndex(0) +4 >Emitted(30, 16) Source(45, 16) + SourceIndex(0) +5 >Emitted(30, 17) Source(45, 17) + SourceIndex(0) +6 >Emitted(30, 25) Source(45, 25) + SourceIndex(0) +7 >Emitted(30, 26) Source(45, 26) + SourceIndex(0) +8 >Emitted(30, 27) Source(45, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(31, 2) Source(46, 2) + SourceIndex(0) +--- +>>>for (var _k = 0, _l = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^^^ +10> ^^ +11> ^^^^^^^ +12> ^^ +13> ^^^^^^ +14> ^^ +15> ^^ +16> ^^^^^^^ +17> ^^ +18> ^^^^^^^^ +19> ^^ +20> ^^^^^^^^^ +21> ^^ +22> ^^^^^^ +23> ^^ +24> ^^ +25> ^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ({ skills: { primary: primaryA, secondary: secondaryA } } of +5 > [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +6 > +7 > [ +8 > { +9 > name +10> : +11> "mower" +12> , +13> skills +14> : +15> { +16> primary +17> : +18> "mowing" +19> , +20> secondary +21> : +22> "none" +23> } +24> } +1->Emitted(32, 1) Source(47, 1) + SourceIndex(0) +2 >Emitted(32, 4) Source(47, 4) + SourceIndex(0) +3 >Emitted(32, 5) Source(47, 5) + SourceIndex(0) +4 >Emitted(32, 6) Source(47, 66) + SourceIndex(0) +5 >Emitted(32, 16) Source(48, 79) + SourceIndex(0) +6 >Emitted(32, 18) Source(47, 66) + SourceIndex(0) +7 >Emitted(32, 24) Source(47, 67) + SourceIndex(0) +8 >Emitted(32, 26) Source(47, 69) + SourceIndex(0) +9 >Emitted(32, 30) Source(47, 73) + SourceIndex(0) +10>Emitted(32, 32) Source(47, 75) + SourceIndex(0) +11>Emitted(32, 39) Source(47, 82) + SourceIndex(0) +12>Emitted(32, 41) Source(47, 84) + SourceIndex(0) +13>Emitted(32, 47) Source(47, 90) + SourceIndex(0) +14>Emitted(32, 49) Source(47, 92) + SourceIndex(0) +15>Emitted(32, 51) Source(47, 94) + SourceIndex(0) +16>Emitted(32, 58) Source(47, 101) + SourceIndex(0) +17>Emitted(32, 60) Source(47, 103) + SourceIndex(0) +18>Emitted(32, 68) Source(47, 111) + SourceIndex(0) +19>Emitted(32, 70) Source(47, 113) + SourceIndex(0) +20>Emitted(32, 79) Source(47, 122) + SourceIndex(0) +21>Emitted(32, 81) Source(47, 124) + SourceIndex(0) +22>Emitted(32, 87) Source(47, 130) + SourceIndex(0) +23>Emitted(32, 89) Source(47, 132) + SourceIndex(0) +24>Emitted(32, 91) Source(47, 134) + SourceIndex(0) +--- +>>> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _k < _l.length; _k++) { +1->^^^^ +2 > ^^ +3 > ^^^^ +4 > ^^ +5 > ^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^ +10> ^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^ +15> ^^ +16> ^^^^^^^^ +17> ^^ +18> ^^ +19> ^ +20> ^^ +21> ^^^^^^^^^^^^^^ +22> ^^ +23> ^^^^ +24> ^ +1->, + > +2 > { +3 > name +4 > : +5 > "trimmer" +6 > , +7 > skills +8 > : +9 > { +10> primary +11> : +12> "trimming" +13> , +14> secondary +15> : +16> "edging" +17> } +18> } +19> ] +20> +21> [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +22> +23> [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +24> ) +1->Emitted(33, 5) Source(48, 5) + SourceIndex(0) +2 >Emitted(33, 7) Source(48, 7) + SourceIndex(0) +3 >Emitted(33, 11) Source(48, 11) + SourceIndex(0) +4 >Emitted(33, 13) Source(48, 13) + SourceIndex(0) +5 >Emitted(33, 22) Source(48, 22) + SourceIndex(0) +6 >Emitted(33, 24) Source(48, 24) + SourceIndex(0) +7 >Emitted(33, 30) Source(48, 30) + SourceIndex(0) +8 >Emitted(33, 32) Source(48, 32) + SourceIndex(0) +9 >Emitted(33, 34) Source(48, 34) + SourceIndex(0) +10>Emitted(33, 41) Source(48, 41) + SourceIndex(0) +11>Emitted(33, 43) Source(48, 43) + SourceIndex(0) +12>Emitted(33, 53) Source(48, 53) + SourceIndex(0) +13>Emitted(33, 55) Source(48, 55) + SourceIndex(0) +14>Emitted(33, 64) Source(48, 64) + SourceIndex(0) +15>Emitted(33, 66) Source(48, 66) + SourceIndex(0) +16>Emitted(33, 74) Source(48, 74) + SourceIndex(0) +17>Emitted(33, 76) Source(48, 76) + SourceIndex(0) +18>Emitted(33, 78) Source(48, 78) + SourceIndex(0) +19>Emitted(33, 79) Source(48, 79) + SourceIndex(0) +20>Emitted(33, 81) Source(47, 66) + SourceIndex(0) +21>Emitted(33, 95) Source(48, 79) + SourceIndex(0) +22>Emitted(33, 97) Source(47, 66) + SourceIndex(0) +23>Emitted(33, 101) Source(48, 79) + SourceIndex(0) +24>Emitted(33, 102) Source(48, 80) + SourceIndex(0) +--- +>>> _m = _l[_k].skills, primaryA = _m.primary, secondaryA = _m.secondary; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > skills +3 > : { +4 > primary: primaryA +5 > , +6 > secondary: secondaryA +1 >Emitted(34, 5) Source(47, 8) + SourceIndex(0) +2 >Emitted(34, 23) Source(47, 14) + SourceIndex(0) +3 >Emitted(34, 25) Source(47, 18) + SourceIndex(0) +4 >Emitted(34, 46) Source(47, 35) + SourceIndex(0) +5 >Emitted(34, 48) Source(47, 37) + SourceIndex(0) +6 >Emitted(34, 73) Source(47, 58) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(35, 5) Source(49, 5) + SourceIndex(0) +2 >Emitted(35, 12) Source(49, 12) + SourceIndex(0) +3 >Emitted(35, 13) Source(49, 13) + SourceIndex(0) +4 >Emitted(35, 16) Source(49, 16) + SourceIndex(0) +5 >Emitted(35, 17) Source(49, 17) + SourceIndex(0) +6 >Emitted(35, 25) Source(49, 25) + SourceIndex(0) +7 >Emitted(35, 26) Source(49, 26) + SourceIndex(0) +8 >Emitted(35, 27) Source(49, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(36, 2) Source(50, 2) + SourceIndex(0) +--- +>>>for (var _o = 0, robots_2 = robots; _o < robots_2.length; _o++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +1-> + > +2 >for +3 > +4 > ({name } of +5 > robots +6 > +7 > robots +8 > +9 > robots +10> +11> robots +12> ) +1->Emitted(37, 1) Source(51, 1) + SourceIndex(0) +2 >Emitted(37, 4) Source(51, 4) + SourceIndex(0) +3 >Emitted(37, 5) Source(51, 5) + SourceIndex(0) +4 >Emitted(37, 6) Source(51, 17) + SourceIndex(0) +5 >Emitted(37, 16) Source(51, 23) + SourceIndex(0) +6 >Emitted(37, 18) Source(51, 17) + SourceIndex(0) +7 >Emitted(37, 35) Source(51, 23) + SourceIndex(0) +8 >Emitted(37, 37) Source(51, 17) + SourceIndex(0) +9 >Emitted(37, 57) Source(51, 23) + SourceIndex(0) +10>Emitted(37, 59) Source(51, 17) + SourceIndex(0) +11>Emitted(37, 63) Source(51, 23) + SourceIndex(0) +12>Emitted(37, 64) Source(51, 24) + SourceIndex(0) +--- +>>> name = robots_2[_o].name; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > {name } +1 >Emitted(38, 5) Source(51, 6) + SourceIndex(0) +2 >Emitted(38, 29) Source(51, 13) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(39, 5) Source(52, 5) + SourceIndex(0) +2 >Emitted(39, 12) Source(52, 12) + SourceIndex(0) +3 >Emitted(39, 13) Source(52, 13) + SourceIndex(0) +4 >Emitted(39, 16) Source(52, 16) + SourceIndex(0) +5 >Emitted(39, 17) Source(52, 17) + SourceIndex(0) +6 >Emitted(39, 22) Source(52, 22) + SourceIndex(0) +7 >Emitted(39, 23) Source(52, 23) + SourceIndex(0) +8 >Emitted(39, 24) Source(52, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(40, 2) Source(53, 2) + SourceIndex(0) +--- +>>>for (var _p = 0, _q = getRobots(); _p < _q.length; _p++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +1-> + > +2 >for +3 > +4 > ({name } of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> getRobots() +12> +13> getRobots() +14> ) +1->Emitted(41, 1) Source(54, 1) + SourceIndex(0) +2 >Emitted(41, 4) Source(54, 4) + SourceIndex(0) +3 >Emitted(41, 5) Source(54, 5) + SourceIndex(0) +4 >Emitted(41, 6) Source(54, 17) + SourceIndex(0) +5 >Emitted(41, 16) Source(54, 28) + SourceIndex(0) +6 >Emitted(41, 18) Source(54, 17) + SourceIndex(0) +7 >Emitted(41, 23) Source(54, 17) + SourceIndex(0) +8 >Emitted(41, 32) Source(54, 26) + SourceIndex(0) +9 >Emitted(41, 34) Source(54, 28) + SourceIndex(0) +10>Emitted(41, 36) Source(54, 17) + SourceIndex(0) +11>Emitted(41, 50) Source(54, 28) + SourceIndex(0) +12>Emitted(41, 52) Source(54, 17) + SourceIndex(0) +13>Emitted(41, 56) Source(54, 28) + SourceIndex(0) +14>Emitted(41, 57) Source(54, 29) + SourceIndex(0) +--- +>>> name = _q[_p].name; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^-> +1 > +2 > {name } +1 >Emitted(42, 5) Source(54, 6) + SourceIndex(0) +2 >Emitted(42, 23) Source(54, 13) + SourceIndex(0) +--- +>>> console.log(nameA); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1-> of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1->Emitted(43, 5) Source(55, 5) + SourceIndex(0) +2 >Emitted(43, 12) Source(55, 12) + SourceIndex(0) +3 >Emitted(43, 13) Source(55, 13) + SourceIndex(0) +4 >Emitted(43, 16) Source(55, 16) + SourceIndex(0) +5 >Emitted(43, 17) Source(55, 17) + SourceIndex(0) +6 >Emitted(43, 22) Source(55, 22) + SourceIndex(0) +7 >Emitted(43, 23) Source(55, 23) + SourceIndex(0) +8 >Emitted(43, 24) Source(55, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(44, 2) Source(56, 2) + SourceIndex(0) +--- +>>>for (var _r = 0, _s = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _r < _s.length; _r++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^^^ +10> ^^ +11> ^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^^ +15> ^^^^^^^^ +16> ^^ +17> ^^ +18> ^^ +19> ^^^^ +20> ^^ +21> ^^^^^^^^^ +22> ^^ +23> ^^^^^ +24> ^^ +25> ^^^^^^^^^^ +26> ^^ +27> ^ +28> ^^ +29> ^^^^^^^^^^^^^^ +30> ^^ +31> ^^^^ +32> ^ +1-> + > +2 >for +3 > +4 > ({name } of +5 > [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +6 > +7 > [ +8 > { +9 > name +10> : +11> "mower" +12> , +13> skill +14> : +15> "mowing" +16> } +17> , +18> { +19> name +20> : +21> "trimmer" +22> , +23> skill +24> : +25> "trimming" +26> } +27> ] +28> +29> [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +30> +31> [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +32> ) +1->Emitted(45, 1) Source(57, 1) + SourceIndex(0) +2 >Emitted(45, 4) Source(57, 4) + SourceIndex(0) +3 >Emitted(45, 5) Source(57, 5) + SourceIndex(0) +4 >Emitted(45, 6) Source(57, 17) + SourceIndex(0) +5 >Emitted(45, 16) Source(57, 93) + SourceIndex(0) +6 >Emitted(45, 18) Source(57, 17) + SourceIndex(0) +7 >Emitted(45, 24) Source(57, 18) + SourceIndex(0) +8 >Emitted(45, 26) Source(57, 20) + SourceIndex(0) +9 >Emitted(45, 30) Source(57, 24) + SourceIndex(0) +10>Emitted(45, 32) Source(57, 26) + SourceIndex(0) +11>Emitted(45, 39) Source(57, 33) + SourceIndex(0) +12>Emitted(45, 41) Source(57, 35) + SourceIndex(0) +13>Emitted(45, 46) Source(57, 40) + SourceIndex(0) +14>Emitted(45, 48) Source(57, 42) + SourceIndex(0) +15>Emitted(45, 56) Source(57, 50) + SourceIndex(0) +16>Emitted(45, 58) Source(57, 52) + SourceIndex(0) +17>Emitted(45, 60) Source(57, 54) + SourceIndex(0) +18>Emitted(45, 62) Source(57, 56) + SourceIndex(0) +19>Emitted(45, 66) Source(57, 60) + SourceIndex(0) +20>Emitted(45, 68) Source(57, 62) + SourceIndex(0) +21>Emitted(45, 77) Source(57, 71) + SourceIndex(0) +22>Emitted(45, 79) Source(57, 73) + SourceIndex(0) +23>Emitted(45, 84) Source(57, 78) + SourceIndex(0) +24>Emitted(45, 86) Source(57, 80) + SourceIndex(0) +25>Emitted(45, 96) Source(57, 90) + SourceIndex(0) +26>Emitted(45, 98) Source(57, 92) + SourceIndex(0) +27>Emitted(45, 99) Source(57, 93) + SourceIndex(0) +28>Emitted(45, 101) Source(57, 17) + SourceIndex(0) +29>Emitted(45, 115) Source(57, 93) + SourceIndex(0) +30>Emitted(45, 117) Source(57, 17) + SourceIndex(0) +31>Emitted(45, 121) Source(57, 93) + SourceIndex(0) +32>Emitted(45, 122) Source(57, 94) + SourceIndex(0) +--- +>>> name = _s[_r].name; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^-> +1 > +2 > {name } +1 >Emitted(46, 5) Source(57, 6) + SourceIndex(0) +2 >Emitted(46, 23) Source(57, 13) + SourceIndex(0) +--- +>>> console.log(nameA); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1-> of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1->Emitted(47, 5) Source(58, 5) + SourceIndex(0) +2 >Emitted(47, 12) Source(58, 12) + SourceIndex(0) +3 >Emitted(47, 13) Source(58, 13) + SourceIndex(0) +4 >Emitted(47, 16) Source(58, 16) + SourceIndex(0) +5 >Emitted(47, 17) Source(58, 17) + SourceIndex(0) +6 >Emitted(47, 22) Source(58, 22) + SourceIndex(0) +7 >Emitted(47, 23) Source(58, 23) + SourceIndex(0) +8 >Emitted(47, 24) Source(58, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(48, 2) Source(59, 2) + SourceIndex(0) +--- +>>>for (var _t = 0, multiRobots_2 = multiRobots; _t < multiRobots_2.length; _t++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +13> ^^^^^-> +1-> + > +2 >for +3 > +4 > ({ skills: { primary, secondary } } of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > multiRobots +10> +11> multiRobots +12> ) +1->Emitted(49, 1) Source(60, 1) + SourceIndex(0) +2 >Emitted(49, 4) Source(60, 4) + SourceIndex(0) +3 >Emitted(49, 5) Source(60, 5) + SourceIndex(0) +4 >Emitted(49, 6) Source(60, 44) + SourceIndex(0) +5 >Emitted(49, 16) Source(60, 55) + SourceIndex(0) +6 >Emitted(49, 18) Source(60, 44) + SourceIndex(0) +7 >Emitted(49, 45) Source(60, 55) + SourceIndex(0) +8 >Emitted(49, 47) Source(60, 44) + SourceIndex(0) +9 >Emitted(49, 72) Source(60, 55) + SourceIndex(0) +10>Emitted(49, 74) Source(60, 44) + SourceIndex(0) +11>Emitted(49, 78) Source(60, 55) + SourceIndex(0) +12>Emitted(49, 79) Source(60, 56) + SourceIndex(0) +--- +>>> _u = multiRobots_2[_t].skills, primary = _u.primary, secondary = _u.secondary; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > skills +3 > : { +4 > primary +5 > , +6 > secondary +1->Emitted(50, 5) Source(60, 8) + SourceIndex(0) +2 >Emitted(50, 34) Source(60, 14) + SourceIndex(0) +3 >Emitted(50, 36) Source(60, 18) + SourceIndex(0) +4 >Emitted(50, 56) Source(60, 25) + SourceIndex(0) +5 >Emitted(50, 58) Source(60, 27) + SourceIndex(0) +6 >Emitted(50, 82) Source(60, 36) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > } } of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(51, 5) Source(61, 5) + SourceIndex(0) +2 >Emitted(51, 12) Source(61, 12) + SourceIndex(0) +3 >Emitted(51, 13) Source(61, 13) + SourceIndex(0) +4 >Emitted(51, 16) Source(61, 16) + SourceIndex(0) +5 >Emitted(51, 17) Source(61, 17) + SourceIndex(0) +6 >Emitted(51, 25) Source(61, 25) + SourceIndex(0) +7 >Emitted(51, 26) Source(61, 26) + SourceIndex(0) +8 >Emitted(51, 27) Source(61, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(52, 2) Source(62, 2) + SourceIndex(0) +--- +>>>for (var _v = 0, _w = getMultiRobots(); _v < _w.length; _v++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +15> ^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ({ skills: { primary, secondary } } of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> getMultiRobots() +12> +13> getMultiRobots() +14> ) +1->Emitted(53, 1) Source(63, 1) + SourceIndex(0) +2 >Emitted(53, 4) Source(63, 4) + SourceIndex(0) +3 >Emitted(53, 5) Source(63, 5) + SourceIndex(0) +4 >Emitted(53, 6) Source(63, 44) + SourceIndex(0) +5 >Emitted(53, 16) Source(63, 60) + SourceIndex(0) +6 >Emitted(53, 18) Source(63, 44) + SourceIndex(0) +7 >Emitted(53, 23) Source(63, 44) + SourceIndex(0) +8 >Emitted(53, 37) Source(63, 58) + SourceIndex(0) +9 >Emitted(53, 39) Source(63, 60) + SourceIndex(0) +10>Emitted(53, 41) Source(63, 44) + SourceIndex(0) +11>Emitted(53, 55) Source(63, 60) + SourceIndex(0) +12>Emitted(53, 57) Source(63, 44) + SourceIndex(0) +13>Emitted(53, 61) Source(63, 60) + SourceIndex(0) +14>Emitted(53, 62) Source(63, 61) + SourceIndex(0) +--- +>>> _x = _w[_v].skills, primary = _x.primary, secondary = _x.secondary; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > skills +3 > : { +4 > primary +5 > , +6 > secondary +1->Emitted(54, 5) Source(63, 8) + SourceIndex(0) +2 >Emitted(54, 23) Source(63, 14) + SourceIndex(0) +3 >Emitted(54, 25) Source(63, 18) + SourceIndex(0) +4 >Emitted(54, 45) Source(63, 25) + SourceIndex(0) +5 >Emitted(54, 47) Source(63, 27) + SourceIndex(0) +6 >Emitted(54, 71) Source(63, 36) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > } } of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(55, 5) Source(64, 5) + SourceIndex(0) +2 >Emitted(55, 12) Source(64, 12) + SourceIndex(0) +3 >Emitted(55, 13) Source(64, 13) + SourceIndex(0) +4 >Emitted(55, 16) Source(64, 16) + SourceIndex(0) +5 >Emitted(55, 17) Source(64, 17) + SourceIndex(0) +6 >Emitted(55, 25) Source(64, 25) + SourceIndex(0) +7 >Emitted(55, 26) Source(64, 26) + SourceIndex(0) +8 >Emitted(55, 27) Source(64, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(56, 2) Source(65, 2) + SourceIndex(0) +--- +>>>for (var _y = 0, _z = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^^^ +10> ^^ +11> ^^^^^^^ +12> ^^ +13> ^^^^^^ +14> ^^ +15> ^^ +16> ^^^^^^^ +17> ^^ +18> ^^^^^^^^ +19> ^^ +20> ^^^^^^^^^ +21> ^^ +22> ^^^^^^ +23> ^^ +24> ^^ +25> ^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ({ skills: { primary, secondary } } of +5 > [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +6 > +7 > [ +8 > { +9 > name +10> : +11> "mower" +12> , +13> skills +14> : +15> { +16> primary +17> : +18> "mowing" +19> , +20> secondary +21> : +22> "none" +23> } +24> } +1->Emitted(57, 1) Source(66, 1) + SourceIndex(0) +2 >Emitted(57, 4) Source(66, 4) + SourceIndex(0) +3 >Emitted(57, 5) Source(66, 5) + SourceIndex(0) +4 >Emitted(57, 6) Source(66, 44) + SourceIndex(0) +5 >Emitted(57, 16) Source(67, 79) + SourceIndex(0) +6 >Emitted(57, 18) Source(66, 44) + SourceIndex(0) +7 >Emitted(57, 24) Source(66, 45) + SourceIndex(0) +8 >Emitted(57, 26) Source(66, 47) + SourceIndex(0) +9 >Emitted(57, 30) Source(66, 51) + SourceIndex(0) +10>Emitted(57, 32) Source(66, 53) + SourceIndex(0) +11>Emitted(57, 39) Source(66, 60) + SourceIndex(0) +12>Emitted(57, 41) Source(66, 62) + SourceIndex(0) +13>Emitted(57, 47) Source(66, 68) + SourceIndex(0) +14>Emitted(57, 49) Source(66, 70) + SourceIndex(0) +15>Emitted(57, 51) Source(66, 72) + SourceIndex(0) +16>Emitted(57, 58) Source(66, 79) + SourceIndex(0) +17>Emitted(57, 60) Source(66, 81) + SourceIndex(0) +18>Emitted(57, 68) Source(66, 89) + SourceIndex(0) +19>Emitted(57, 70) Source(66, 91) + SourceIndex(0) +20>Emitted(57, 79) Source(66, 100) + SourceIndex(0) +21>Emitted(57, 81) Source(66, 102) + SourceIndex(0) +22>Emitted(57, 87) Source(66, 108) + SourceIndex(0) +23>Emitted(57, 89) Source(66, 110) + SourceIndex(0) +24>Emitted(57, 91) Source(66, 112) + SourceIndex(0) +--- +>>> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _y < _z.length; _y++) { +1->^^^^ +2 > ^^ +3 > ^^^^ +4 > ^^ +5 > ^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^ +10> ^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^ +15> ^^ +16> ^^^^^^^^ +17> ^^ +18> ^^ +19> ^ +20> ^^ +21> ^^^^^^^^^^^^^^ +22> ^^ +23> ^^^^ +24> ^ +1->, + > +2 > { +3 > name +4 > : +5 > "trimmer" +6 > , +7 > skills +8 > : +9 > { +10> primary +11> : +12> "trimming" +13> , +14> secondary +15> : +16> "edging" +17> } +18> } +19> ] +20> +21> [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +22> +23> [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +24> ) +1->Emitted(58, 5) Source(67, 5) + SourceIndex(0) +2 >Emitted(58, 7) Source(67, 7) + SourceIndex(0) +3 >Emitted(58, 11) Source(67, 11) + SourceIndex(0) +4 >Emitted(58, 13) Source(67, 13) + SourceIndex(0) +5 >Emitted(58, 22) Source(67, 22) + SourceIndex(0) +6 >Emitted(58, 24) Source(67, 24) + SourceIndex(0) +7 >Emitted(58, 30) Source(67, 30) + SourceIndex(0) +8 >Emitted(58, 32) Source(67, 32) + SourceIndex(0) +9 >Emitted(58, 34) Source(67, 34) + SourceIndex(0) +10>Emitted(58, 41) Source(67, 41) + SourceIndex(0) +11>Emitted(58, 43) Source(67, 43) + SourceIndex(0) +12>Emitted(58, 53) Source(67, 53) + SourceIndex(0) +13>Emitted(58, 55) Source(67, 55) + SourceIndex(0) +14>Emitted(58, 64) Source(67, 64) + SourceIndex(0) +15>Emitted(58, 66) Source(67, 66) + SourceIndex(0) +16>Emitted(58, 74) Source(67, 74) + SourceIndex(0) +17>Emitted(58, 76) Source(67, 76) + SourceIndex(0) +18>Emitted(58, 78) Source(67, 78) + SourceIndex(0) +19>Emitted(58, 79) Source(67, 79) + SourceIndex(0) +20>Emitted(58, 81) Source(66, 44) + SourceIndex(0) +21>Emitted(58, 95) Source(67, 79) + SourceIndex(0) +22>Emitted(58, 97) Source(66, 44) + SourceIndex(0) +23>Emitted(58, 101) Source(67, 79) + SourceIndex(0) +24>Emitted(58, 102) Source(67, 80) + SourceIndex(0) +--- +>>> _0 = _z[_y].skills, primary = _0.primary, secondary = _0.secondary; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > skills +3 > : { +4 > primary +5 > , +6 > secondary +1 >Emitted(59, 5) Source(66, 8) + SourceIndex(0) +2 >Emitted(59, 23) Source(66, 14) + SourceIndex(0) +3 >Emitted(59, 25) Source(66, 18) + SourceIndex(0) +4 >Emitted(59, 45) Source(66, 25) + SourceIndex(0) +5 >Emitted(59, 47) Source(66, 27) + SourceIndex(0) +6 >Emitted(59, 71) Source(66, 36) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(60, 5) Source(68, 5) + SourceIndex(0) +2 >Emitted(60, 12) Source(68, 12) + SourceIndex(0) +3 >Emitted(60, 13) Source(68, 13) + SourceIndex(0) +4 >Emitted(60, 16) Source(68, 16) + SourceIndex(0) +5 >Emitted(60, 17) Source(68, 17) + SourceIndex(0) +6 >Emitted(60, 25) Source(68, 25) + SourceIndex(0) +7 >Emitted(60, 26) Source(68, 26) + SourceIndex(0) +8 >Emitted(60, 27) Source(68, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(61, 2) Source(69, 2) + SourceIndex(0) +--- +>>>for (var _1 = 0, robots_3 = robots; _1 < robots_3.length; _1++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +1-> + > + > + > +2 >for +3 > +4 > ({name: nameA, skill: skillA } of +5 > robots +6 > +7 > robots +8 > +9 > robots +10> +11> robots +12> ) +1->Emitted(62, 1) Source(72, 1) + SourceIndex(0) +2 >Emitted(62, 4) Source(72, 4) + SourceIndex(0) +3 >Emitted(62, 5) Source(72, 5) + SourceIndex(0) +4 >Emitted(62, 6) Source(72, 39) + SourceIndex(0) +5 >Emitted(62, 16) Source(72, 45) + SourceIndex(0) +6 >Emitted(62, 18) Source(72, 39) + SourceIndex(0) +7 >Emitted(62, 35) Source(72, 45) + SourceIndex(0) +8 >Emitted(62, 37) Source(72, 39) + SourceIndex(0) +9 >Emitted(62, 57) Source(72, 45) + SourceIndex(0) +10>Emitted(62, 59) Source(72, 39) + SourceIndex(0) +11>Emitted(62, 63) Source(72, 45) + SourceIndex(0) +12>Emitted(62, 64) Source(72, 46) + SourceIndex(0) +--- +>>> _2 = robots_3[_1], nameA = _2.name, skillA = _2.skill; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^ +1 > +2 > {name: nameA, skill: skillA } +3 > +4 > name: nameA +5 > , +6 > skill: skillA +1 >Emitted(63, 5) Source(72, 6) + SourceIndex(0) +2 >Emitted(63, 22) Source(72, 35) + SourceIndex(0) +3 >Emitted(63, 24) Source(72, 7) + SourceIndex(0) +4 >Emitted(63, 39) Source(72, 18) + SourceIndex(0) +5 >Emitted(63, 41) Source(72, 20) + SourceIndex(0) +6 >Emitted(63, 58) Source(72, 33) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(64, 5) Source(73, 5) + SourceIndex(0) +2 >Emitted(64, 12) Source(73, 12) + SourceIndex(0) +3 >Emitted(64, 13) Source(73, 13) + SourceIndex(0) +4 >Emitted(64, 16) Source(73, 16) + SourceIndex(0) +5 >Emitted(64, 17) Source(73, 17) + SourceIndex(0) +6 >Emitted(64, 22) Source(73, 22) + SourceIndex(0) +7 >Emitted(64, 23) Source(73, 23) + SourceIndex(0) +8 >Emitted(64, 24) Source(73, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(65, 2) Source(74, 2) + SourceIndex(0) +--- +>>>for (var _3 = 0, _4 = getRobots(); _3 < _4.length; _3++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +1-> + > +2 >for +3 > +4 > ({name: nameA, skill: skillA } of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> getRobots() +12> +13> getRobots() +14> ) +1->Emitted(66, 1) Source(75, 1) + SourceIndex(0) +2 >Emitted(66, 4) Source(75, 4) + SourceIndex(0) +3 >Emitted(66, 5) Source(75, 5) + SourceIndex(0) +4 >Emitted(66, 6) Source(75, 39) + SourceIndex(0) +5 >Emitted(66, 16) Source(75, 50) + SourceIndex(0) +6 >Emitted(66, 18) Source(75, 39) + SourceIndex(0) +7 >Emitted(66, 23) Source(75, 39) + SourceIndex(0) +8 >Emitted(66, 32) Source(75, 48) + SourceIndex(0) +9 >Emitted(66, 34) Source(75, 50) + SourceIndex(0) +10>Emitted(66, 36) Source(75, 39) + SourceIndex(0) +11>Emitted(66, 50) Source(75, 50) + SourceIndex(0) +12>Emitted(66, 52) Source(75, 39) + SourceIndex(0) +13>Emitted(66, 56) Source(75, 50) + SourceIndex(0) +14>Emitted(66, 57) Source(75, 51) + SourceIndex(0) +--- +>>> _5 = _4[_3], nameA = _5.name, skillA = _5.skill; +1 >^^^^ +2 > ^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^ +1 > +2 > {name: nameA, skill: skillA } +3 > +4 > name: nameA +5 > , +6 > skill: skillA +1 >Emitted(67, 5) Source(75, 6) + SourceIndex(0) +2 >Emitted(67, 16) Source(75, 35) + SourceIndex(0) +3 >Emitted(67, 18) Source(75, 7) + SourceIndex(0) +4 >Emitted(67, 33) Source(75, 18) + SourceIndex(0) +5 >Emitted(67, 35) Source(75, 20) + SourceIndex(0) +6 >Emitted(67, 52) Source(75, 33) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(68, 5) Source(76, 5) + SourceIndex(0) +2 >Emitted(68, 12) Source(76, 12) + SourceIndex(0) +3 >Emitted(68, 13) Source(76, 13) + SourceIndex(0) +4 >Emitted(68, 16) Source(76, 16) + SourceIndex(0) +5 >Emitted(68, 17) Source(76, 17) + SourceIndex(0) +6 >Emitted(68, 22) Source(76, 22) + SourceIndex(0) +7 >Emitted(68, 23) Source(76, 23) + SourceIndex(0) +8 >Emitted(68, 24) Source(76, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(69, 2) Source(77, 2) + SourceIndex(0) +--- +>>>for (var _6 = 0, _7 = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _6 < _7.length; _6++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^^^ +10> ^^ +11> ^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^^ +15> ^^^^^^^^ +16> ^^ +17> ^^ +18> ^^ +19> ^^^^ +20> ^^ +21> ^^^^^^^^^ +22> ^^ +23> ^^^^^ +24> ^^ +25> ^^^^^^^^^^ +26> ^^ +27> ^ +28> ^^ +29> ^^^^^^^^^^^^^^ +30> ^^ +31> ^^^^ +32> ^ +1-> + > +2 >for +3 > +4 > ({name: nameA, skill: skillA } of +5 > [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +6 > +7 > [ +8 > { +9 > name +10> : +11> "mower" +12> , +13> skill +14> : +15> "mowing" +16> } +17> , +18> { +19> name +20> : +21> "trimmer" +22> , +23> skill +24> : +25> "trimming" +26> } +27> ] +28> +29> [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +30> +31> [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +32> ) +1->Emitted(70, 1) Source(78, 1) + SourceIndex(0) +2 >Emitted(70, 4) Source(78, 4) + SourceIndex(0) +3 >Emitted(70, 5) Source(78, 5) + SourceIndex(0) +4 >Emitted(70, 6) Source(78, 39) + SourceIndex(0) +5 >Emitted(70, 16) Source(78, 115) + SourceIndex(0) +6 >Emitted(70, 18) Source(78, 39) + SourceIndex(0) +7 >Emitted(70, 24) Source(78, 40) + SourceIndex(0) +8 >Emitted(70, 26) Source(78, 42) + SourceIndex(0) +9 >Emitted(70, 30) Source(78, 46) + SourceIndex(0) +10>Emitted(70, 32) Source(78, 48) + SourceIndex(0) +11>Emitted(70, 39) Source(78, 55) + SourceIndex(0) +12>Emitted(70, 41) Source(78, 57) + SourceIndex(0) +13>Emitted(70, 46) Source(78, 62) + SourceIndex(0) +14>Emitted(70, 48) Source(78, 64) + SourceIndex(0) +15>Emitted(70, 56) Source(78, 72) + SourceIndex(0) +16>Emitted(70, 58) Source(78, 74) + SourceIndex(0) +17>Emitted(70, 60) Source(78, 76) + SourceIndex(0) +18>Emitted(70, 62) Source(78, 78) + SourceIndex(0) +19>Emitted(70, 66) Source(78, 82) + SourceIndex(0) +20>Emitted(70, 68) Source(78, 84) + SourceIndex(0) +21>Emitted(70, 77) Source(78, 93) + SourceIndex(0) +22>Emitted(70, 79) Source(78, 95) + SourceIndex(0) +23>Emitted(70, 84) Source(78, 100) + SourceIndex(0) +24>Emitted(70, 86) Source(78, 102) + SourceIndex(0) +25>Emitted(70, 96) Source(78, 112) + SourceIndex(0) +26>Emitted(70, 98) Source(78, 114) + SourceIndex(0) +27>Emitted(70, 99) Source(78, 115) + SourceIndex(0) +28>Emitted(70, 101) Source(78, 39) + SourceIndex(0) +29>Emitted(70, 115) Source(78, 115) + SourceIndex(0) +30>Emitted(70, 117) Source(78, 39) + SourceIndex(0) +31>Emitted(70, 121) Source(78, 115) + SourceIndex(0) +32>Emitted(70, 122) Source(78, 116) + SourceIndex(0) +--- +>>> _8 = _7[_6], nameA = _8.name, skillA = _8.skill; +1 >^^^^ +2 > ^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^ +1 > +2 > {name: nameA, skill: skillA } +3 > +4 > name: nameA +5 > , +6 > skill: skillA +1 >Emitted(71, 5) Source(78, 6) + SourceIndex(0) +2 >Emitted(71, 16) Source(78, 35) + SourceIndex(0) +3 >Emitted(71, 18) Source(78, 7) + SourceIndex(0) +4 >Emitted(71, 33) Source(78, 18) + SourceIndex(0) +5 >Emitted(71, 35) Source(78, 20) + SourceIndex(0) +6 >Emitted(71, 52) Source(78, 33) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(72, 5) Source(79, 5) + SourceIndex(0) +2 >Emitted(72, 12) Source(79, 12) + SourceIndex(0) +3 >Emitted(72, 13) Source(79, 13) + SourceIndex(0) +4 >Emitted(72, 16) Source(79, 16) + SourceIndex(0) +5 >Emitted(72, 17) Source(79, 17) + SourceIndex(0) +6 >Emitted(72, 22) Source(79, 22) + SourceIndex(0) +7 >Emitted(72, 23) Source(79, 23) + SourceIndex(0) +8 >Emitted(72, 24) Source(79, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(73, 2) Source(80, 2) + SourceIndex(0) +--- +>>>for (var _9 = 0, multiRobots_3 = multiRobots; _9 < multiRobots_3.length; _9++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > multiRobots +10> +11> multiRobots +12> ) +1->Emitted(74, 1) Source(81, 1) + SourceIndex(0) +2 >Emitted(74, 4) Source(81, 4) + SourceIndex(0) +3 >Emitted(74, 5) Source(81, 5) + SourceIndex(0) +4 >Emitted(74, 6) Source(81, 78) + SourceIndex(0) +5 >Emitted(74, 16) Source(81, 89) + SourceIndex(0) +6 >Emitted(74, 18) Source(81, 78) + SourceIndex(0) +7 >Emitted(74, 45) Source(81, 89) + SourceIndex(0) +8 >Emitted(74, 47) Source(81, 78) + SourceIndex(0) +9 >Emitted(74, 72) Source(81, 89) + SourceIndex(0) +10>Emitted(74, 74) Source(81, 78) + SourceIndex(0) +11>Emitted(74, 78) Source(81, 89) + SourceIndex(0) +12>Emitted(74, 79) Source(81, 90) + SourceIndex(0) +--- +>>> _10 = multiRobots_3[_9], nameA = _10.name, _11 = _10.skills, primaryA = _11.primary, secondaryA = _11.secondary; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } +3 > +4 > name: nameA +5 > , +6 > skills +7 > : { +8 > primary: primaryA +9 > , +10> secondary: secondaryA +1->Emitted(75, 5) Source(81, 6) + SourceIndex(0) +2 >Emitted(75, 28) Source(81, 74) + SourceIndex(0) +3 >Emitted(75, 30) Source(81, 7) + SourceIndex(0) +4 >Emitted(75, 46) Source(81, 18) + SourceIndex(0) +5 >Emitted(75, 48) Source(81, 20) + SourceIndex(0) +6 >Emitted(75, 64) Source(81, 26) + SourceIndex(0) +7 >Emitted(75, 66) Source(81, 30) + SourceIndex(0) +8 >Emitted(75, 88) Source(81, 47) + SourceIndex(0) +9 >Emitted(75, 90) Source(81, 49) + SourceIndex(0) +10>Emitted(75, 116) Source(81, 70) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } } of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(76, 5) Source(82, 5) + SourceIndex(0) +2 >Emitted(76, 12) Source(82, 12) + SourceIndex(0) +3 >Emitted(76, 13) Source(82, 13) + SourceIndex(0) +4 >Emitted(76, 16) Source(82, 16) + SourceIndex(0) +5 >Emitted(76, 17) Source(82, 17) + SourceIndex(0) +6 >Emitted(76, 22) Source(82, 22) + SourceIndex(0) +7 >Emitted(76, 23) Source(82, 23) + SourceIndex(0) +8 >Emitted(76, 24) Source(82, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(77, 2) Source(83, 2) + SourceIndex(0) +--- +>>>for (var _12 = 0, _13 = getMultiRobots(); _12 < _13.length; _12++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> getMultiRobots() +12> +13> getMultiRobots() +14> ) +1->Emitted(78, 1) Source(84, 1) + SourceIndex(0) +2 >Emitted(78, 4) Source(84, 4) + SourceIndex(0) +3 >Emitted(78, 5) Source(84, 5) + SourceIndex(0) +4 >Emitted(78, 6) Source(84, 78) + SourceIndex(0) +5 >Emitted(78, 17) Source(84, 94) + SourceIndex(0) +6 >Emitted(78, 19) Source(84, 78) + SourceIndex(0) +7 >Emitted(78, 25) Source(84, 78) + SourceIndex(0) +8 >Emitted(78, 39) Source(84, 92) + SourceIndex(0) +9 >Emitted(78, 41) Source(84, 94) + SourceIndex(0) +10>Emitted(78, 43) Source(84, 78) + SourceIndex(0) +11>Emitted(78, 59) Source(84, 94) + SourceIndex(0) +12>Emitted(78, 61) Source(84, 78) + SourceIndex(0) +13>Emitted(78, 66) Source(84, 94) + SourceIndex(0) +14>Emitted(78, 67) Source(84, 95) + SourceIndex(0) +--- +>>> _14 = _13[_12], nameA = _14.name, _15 = _14.skills, primaryA = _15.primary, secondaryA = _15.secondary; +1->^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } +3 > +4 > name: nameA +5 > , +6 > skills +7 > : { +8 > primary: primaryA +9 > , +10> secondary: secondaryA +1->Emitted(79, 5) Source(84, 6) + SourceIndex(0) +2 >Emitted(79, 19) Source(84, 74) + SourceIndex(0) +3 >Emitted(79, 21) Source(84, 7) + SourceIndex(0) +4 >Emitted(79, 37) Source(84, 18) + SourceIndex(0) +5 >Emitted(79, 39) Source(84, 20) + SourceIndex(0) +6 >Emitted(79, 55) Source(84, 26) + SourceIndex(0) +7 >Emitted(79, 57) Source(84, 30) + SourceIndex(0) +8 >Emitted(79, 79) Source(84, 47) + SourceIndex(0) +9 >Emitted(79, 81) Source(84, 49) + SourceIndex(0) +10>Emitted(79, 107) Source(84, 70) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } } of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(80, 5) Source(85, 5) + SourceIndex(0) +2 >Emitted(80, 12) Source(85, 12) + SourceIndex(0) +3 >Emitted(80, 13) Source(85, 13) + SourceIndex(0) +4 >Emitted(80, 16) Source(85, 16) + SourceIndex(0) +5 >Emitted(80, 17) Source(85, 17) + SourceIndex(0) +6 >Emitted(80, 22) Source(85, 22) + SourceIndex(0) +7 >Emitted(80, 23) Source(85, 23) + SourceIndex(0) +8 >Emitted(80, 24) Source(85, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(81, 2) Source(86, 2) + SourceIndex(0) +--- +>>>for (var _16 = 0, _17 = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^ +9 > ^^^^ +10> ^^ +11> ^^^^^^^ +12> ^^ +13> ^^^^^^ +14> ^^ +15> ^^ +16> ^^^^^^^ +17> ^^ +18> ^^^^^^^^ +19> ^^ +20> ^^^^^^^^^ +21> ^^ +22> ^^^^^^ +23> ^^ +24> ^^ +25> ^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of +5 > [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +6 > +7 > [ +8 > { +9 > name +10> : +11> "mower" +12> , +13> skills +14> : +15> { +16> primary +17> : +18> "mowing" +19> , +20> secondary +21> : +22> "none" +23> } +24> } +1->Emitted(82, 1) Source(87, 1) + SourceIndex(0) +2 >Emitted(82, 4) Source(87, 4) + SourceIndex(0) +3 >Emitted(82, 5) Source(87, 5) + SourceIndex(0) +4 >Emitted(82, 6) Source(87, 78) + SourceIndex(0) +5 >Emitted(82, 17) Source(88, 79) + SourceIndex(0) +6 >Emitted(82, 19) Source(87, 78) + SourceIndex(0) +7 >Emitted(82, 26) Source(87, 79) + SourceIndex(0) +8 >Emitted(82, 28) Source(87, 81) + SourceIndex(0) +9 >Emitted(82, 32) Source(87, 85) + SourceIndex(0) +10>Emitted(82, 34) Source(87, 87) + SourceIndex(0) +11>Emitted(82, 41) Source(87, 94) + SourceIndex(0) +12>Emitted(82, 43) Source(87, 96) + SourceIndex(0) +13>Emitted(82, 49) Source(87, 102) + SourceIndex(0) +14>Emitted(82, 51) Source(87, 104) + SourceIndex(0) +15>Emitted(82, 53) Source(87, 106) + SourceIndex(0) +16>Emitted(82, 60) Source(87, 113) + SourceIndex(0) +17>Emitted(82, 62) Source(87, 115) + SourceIndex(0) +18>Emitted(82, 70) Source(87, 123) + SourceIndex(0) +19>Emitted(82, 72) Source(87, 125) + SourceIndex(0) +20>Emitted(82, 81) Source(87, 134) + SourceIndex(0) +21>Emitted(82, 83) Source(87, 136) + SourceIndex(0) +22>Emitted(82, 89) Source(87, 142) + SourceIndex(0) +23>Emitted(82, 91) Source(87, 144) + SourceIndex(0) +24>Emitted(82, 93) Source(87, 146) + SourceIndex(0) +--- +>>> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _16 < _17.length; _16++) { +1->^^^^ +2 > ^^ +3 > ^^^^ +4 > ^^ +5 > ^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^ +10> ^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^ +15> ^^ +16> ^^^^^^^^ +17> ^^ +18> ^^ +19> ^ +20> ^^ +21> ^^^^^^^^^^^^^^^^ +22> ^^ +23> ^^^^^ +24> ^ +25> ^^^^-> +1->, + > +2 > { +3 > name +4 > : +5 > "trimmer" +6 > , +7 > skills +8 > : +9 > { +10> primary +11> : +12> "trimming" +13> , +14> secondary +15> : +16> "edging" +17> } +18> } +19> ] +20> +21> [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +22> +23> [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +24> ) +1->Emitted(83, 5) Source(88, 5) + SourceIndex(0) +2 >Emitted(83, 7) Source(88, 7) + SourceIndex(0) +3 >Emitted(83, 11) Source(88, 11) + SourceIndex(0) +4 >Emitted(83, 13) Source(88, 13) + SourceIndex(0) +5 >Emitted(83, 22) Source(88, 22) + SourceIndex(0) +6 >Emitted(83, 24) Source(88, 24) + SourceIndex(0) +7 >Emitted(83, 30) Source(88, 30) + SourceIndex(0) +8 >Emitted(83, 32) Source(88, 32) + SourceIndex(0) +9 >Emitted(83, 34) Source(88, 34) + SourceIndex(0) +10>Emitted(83, 41) Source(88, 41) + SourceIndex(0) +11>Emitted(83, 43) Source(88, 43) + SourceIndex(0) +12>Emitted(83, 53) Source(88, 53) + SourceIndex(0) +13>Emitted(83, 55) Source(88, 55) + SourceIndex(0) +14>Emitted(83, 64) Source(88, 64) + SourceIndex(0) +15>Emitted(83, 66) Source(88, 66) + SourceIndex(0) +16>Emitted(83, 74) Source(88, 74) + SourceIndex(0) +17>Emitted(83, 76) Source(88, 76) + SourceIndex(0) +18>Emitted(83, 78) Source(88, 78) + SourceIndex(0) +19>Emitted(83, 79) Source(88, 79) + SourceIndex(0) +20>Emitted(83, 81) Source(87, 78) + SourceIndex(0) +21>Emitted(83, 97) Source(88, 79) + SourceIndex(0) +22>Emitted(83, 99) Source(87, 78) + SourceIndex(0) +23>Emitted(83, 104) Source(88, 79) + SourceIndex(0) +24>Emitted(83, 105) Source(88, 80) + SourceIndex(0) +--- +>>> _18 = _17[_16], nameA = _18.name, _19 = _18.skills, primaryA = _19.primary, secondaryA = _19.secondary; +1->^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } +3 > +4 > name: nameA +5 > , +6 > skills +7 > : { +8 > primary: primaryA +9 > , +10> secondary: secondaryA +1->Emitted(84, 5) Source(87, 6) + SourceIndex(0) +2 >Emitted(84, 19) Source(87, 74) + SourceIndex(0) +3 >Emitted(84, 21) Source(87, 7) + SourceIndex(0) +4 >Emitted(84, 37) Source(87, 18) + SourceIndex(0) +5 >Emitted(84, 39) Source(87, 20) + SourceIndex(0) +6 >Emitted(84, 55) Source(87, 26) + SourceIndex(0) +7 >Emitted(84, 57) Source(87, 30) + SourceIndex(0) +8 >Emitted(84, 79) Source(87, 47) + SourceIndex(0) +9 >Emitted(84, 81) Source(87, 49) + SourceIndex(0) +10>Emitted(84, 107) Source(87, 70) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(85, 5) Source(89, 5) + SourceIndex(0) +2 >Emitted(85, 12) Source(89, 12) + SourceIndex(0) +3 >Emitted(85, 13) Source(89, 13) + SourceIndex(0) +4 >Emitted(85, 16) Source(89, 16) + SourceIndex(0) +5 >Emitted(85, 17) Source(89, 17) + SourceIndex(0) +6 >Emitted(85, 22) Source(89, 22) + SourceIndex(0) +7 >Emitted(85, 23) Source(89, 23) + SourceIndex(0) +8 >Emitted(85, 24) Source(89, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(86, 2) Source(90, 2) + SourceIndex(0) +--- +>>>for (var _20 = 0, robots_4 = robots; _20 < robots_4.length; _20++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^ +12> ^ +1-> + > +2 >for +3 > +4 > ({name, skill } of +5 > robots +6 > +7 > robots +8 > +9 > robots +10> +11> robots +12> ) +1->Emitted(87, 1) Source(91, 1) + SourceIndex(0) +2 >Emitted(87, 4) Source(91, 4) + SourceIndex(0) +3 >Emitted(87, 5) Source(91, 5) + SourceIndex(0) +4 >Emitted(87, 6) Source(91, 24) + SourceIndex(0) +5 >Emitted(87, 17) Source(91, 30) + SourceIndex(0) +6 >Emitted(87, 19) Source(91, 24) + SourceIndex(0) +7 >Emitted(87, 36) Source(91, 30) + SourceIndex(0) +8 >Emitted(87, 38) Source(91, 24) + SourceIndex(0) +9 >Emitted(87, 59) Source(91, 30) + SourceIndex(0) +10>Emitted(87, 61) Source(91, 24) + SourceIndex(0) +11>Emitted(87, 66) Source(91, 30) + SourceIndex(0) +12>Emitted(87, 67) Source(91, 31) + SourceIndex(0) +--- +>>> _21 = robots_4[_20], name = _21.name, skill = _21.skill; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^ +1 > +2 > {name, skill } +3 > +4 > name +5 > , +6 > skill +1 >Emitted(88, 5) Source(91, 6) + SourceIndex(0) +2 >Emitted(88, 24) Source(91, 20) + SourceIndex(0) +3 >Emitted(88, 26) Source(91, 7) + SourceIndex(0) +4 >Emitted(88, 41) Source(91, 11) + SourceIndex(0) +5 >Emitted(88, 43) Source(91, 13) + SourceIndex(0) +6 >Emitted(88, 60) Source(91, 18) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(89, 5) Source(92, 5) + SourceIndex(0) +2 >Emitted(89, 12) Source(92, 12) + SourceIndex(0) +3 >Emitted(89, 13) Source(92, 13) + SourceIndex(0) +4 >Emitted(89, 16) Source(92, 16) + SourceIndex(0) +5 >Emitted(89, 17) Source(92, 17) + SourceIndex(0) +6 >Emitted(89, 22) Source(92, 22) + SourceIndex(0) +7 >Emitted(89, 23) Source(92, 23) + SourceIndex(0) +8 >Emitted(89, 24) Source(92, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(90, 2) Source(93, 2) + SourceIndex(0) +--- +>>>for (var _22 = 0, _23 = getRobots(); _22 < _23.length; _22++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^ +1-> + > +2 >for +3 > +4 > ({name, skill } of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> getRobots() +12> +13> getRobots() +14> ) +1->Emitted(91, 1) Source(94, 1) + SourceIndex(0) +2 >Emitted(91, 4) Source(94, 4) + SourceIndex(0) +3 >Emitted(91, 5) Source(94, 5) + SourceIndex(0) +4 >Emitted(91, 6) Source(94, 24) + SourceIndex(0) +5 >Emitted(91, 17) Source(94, 35) + SourceIndex(0) +6 >Emitted(91, 19) Source(94, 24) + SourceIndex(0) +7 >Emitted(91, 25) Source(94, 24) + SourceIndex(0) +8 >Emitted(91, 34) Source(94, 33) + SourceIndex(0) +9 >Emitted(91, 36) Source(94, 35) + SourceIndex(0) +10>Emitted(91, 38) Source(94, 24) + SourceIndex(0) +11>Emitted(91, 54) Source(94, 35) + SourceIndex(0) +12>Emitted(91, 56) Source(94, 24) + SourceIndex(0) +13>Emitted(91, 61) Source(94, 35) + SourceIndex(0) +14>Emitted(91, 62) Source(94, 36) + SourceIndex(0) +--- +>>> _24 = _23[_22], name = _24.name, skill = _24.skill; +1 >^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^ +1 > +2 > {name, skill } +3 > +4 > name +5 > , +6 > skill +1 >Emitted(92, 5) Source(94, 6) + SourceIndex(0) +2 >Emitted(92, 19) Source(94, 20) + SourceIndex(0) +3 >Emitted(92, 21) Source(94, 7) + SourceIndex(0) +4 >Emitted(92, 36) Source(94, 11) + SourceIndex(0) +5 >Emitted(92, 38) Source(94, 13) + SourceIndex(0) +6 >Emitted(92, 55) Source(94, 18) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(93, 5) Source(95, 5) + SourceIndex(0) +2 >Emitted(93, 12) Source(95, 12) + SourceIndex(0) +3 >Emitted(93, 13) Source(95, 13) + SourceIndex(0) +4 >Emitted(93, 16) Source(95, 16) + SourceIndex(0) +5 >Emitted(93, 17) Source(95, 17) + SourceIndex(0) +6 >Emitted(93, 22) Source(95, 22) + SourceIndex(0) +7 >Emitted(93, 23) Source(95, 23) + SourceIndex(0) +8 >Emitted(93, 24) Source(95, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(94, 2) Source(96, 2) + SourceIndex(0) +--- +>>>for (var _25 = 0, _26 = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _25 < _26.length; _25++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^ +9 > ^^^^ +10> ^^ +11> ^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^^ +15> ^^^^^^^^ +16> ^^ +17> ^^ +18> ^^ +19> ^^^^ +20> ^^ +21> ^^^^^^^^^ +22> ^^ +23> ^^^^^ +24> ^^ +25> ^^^^^^^^^^ +26> ^^ +27> ^ +28> ^^ +29> ^^^^^^^^^^^^^^^^ +30> ^^ +31> ^^^^^ +32> ^ +1-> + > +2 >for +3 > +4 > ({name, skill } of +5 > [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +6 > +7 > [ +8 > { +9 > name +10> : +11> "mower" +12> , +13> skill +14> : +15> "mowing" +16> } +17> , +18> { +19> name +20> : +21> "trimmer" +22> , +23> skill +24> : +25> "trimming" +26> } +27> ] +28> +29> [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +30> +31> [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +32> ) +1->Emitted(95, 1) Source(97, 1) + SourceIndex(0) +2 >Emitted(95, 4) Source(97, 4) + SourceIndex(0) +3 >Emitted(95, 5) Source(97, 5) + SourceIndex(0) +4 >Emitted(95, 6) Source(97, 24) + SourceIndex(0) +5 >Emitted(95, 17) Source(97, 100) + SourceIndex(0) +6 >Emitted(95, 19) Source(97, 24) + SourceIndex(0) +7 >Emitted(95, 26) Source(97, 25) + SourceIndex(0) +8 >Emitted(95, 28) Source(97, 27) + SourceIndex(0) +9 >Emitted(95, 32) Source(97, 31) + SourceIndex(0) +10>Emitted(95, 34) Source(97, 33) + SourceIndex(0) +11>Emitted(95, 41) Source(97, 40) + SourceIndex(0) +12>Emitted(95, 43) Source(97, 42) + SourceIndex(0) +13>Emitted(95, 48) Source(97, 47) + SourceIndex(0) +14>Emitted(95, 50) Source(97, 49) + SourceIndex(0) +15>Emitted(95, 58) Source(97, 57) + SourceIndex(0) +16>Emitted(95, 60) Source(97, 59) + SourceIndex(0) +17>Emitted(95, 62) Source(97, 61) + SourceIndex(0) +18>Emitted(95, 64) Source(97, 63) + SourceIndex(0) +19>Emitted(95, 68) Source(97, 67) + SourceIndex(0) +20>Emitted(95, 70) Source(97, 69) + SourceIndex(0) +21>Emitted(95, 79) Source(97, 78) + SourceIndex(0) +22>Emitted(95, 81) Source(97, 80) + SourceIndex(0) +23>Emitted(95, 86) Source(97, 85) + SourceIndex(0) +24>Emitted(95, 88) Source(97, 87) + SourceIndex(0) +25>Emitted(95, 98) Source(97, 97) + SourceIndex(0) +26>Emitted(95, 100) Source(97, 99) + SourceIndex(0) +27>Emitted(95, 101) Source(97, 100) + SourceIndex(0) +28>Emitted(95, 103) Source(97, 24) + SourceIndex(0) +29>Emitted(95, 119) Source(97, 100) + SourceIndex(0) +30>Emitted(95, 121) Source(97, 24) + SourceIndex(0) +31>Emitted(95, 126) Source(97, 100) + SourceIndex(0) +32>Emitted(95, 127) Source(97, 101) + SourceIndex(0) +--- +>>> _27 = _26[_25], name = _27.name, skill = _27.skill; +1 >^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^ +1 > +2 > {name, skill } +3 > +4 > name +5 > , +6 > skill +1 >Emitted(96, 5) Source(97, 6) + SourceIndex(0) +2 >Emitted(96, 19) Source(97, 20) + SourceIndex(0) +3 >Emitted(96, 21) Source(97, 7) + SourceIndex(0) +4 >Emitted(96, 36) Source(97, 11) + SourceIndex(0) +5 >Emitted(96, 38) Source(97, 13) + SourceIndex(0) +6 >Emitted(96, 55) Source(97, 18) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(97, 5) Source(98, 5) + SourceIndex(0) +2 >Emitted(97, 12) Source(98, 12) + SourceIndex(0) +3 >Emitted(97, 13) Source(98, 13) + SourceIndex(0) +4 >Emitted(97, 16) Source(98, 16) + SourceIndex(0) +5 >Emitted(97, 17) Source(98, 17) + SourceIndex(0) +6 >Emitted(97, 22) Source(98, 22) + SourceIndex(0) +7 >Emitted(97, 23) Source(98, 23) + SourceIndex(0) +8 >Emitted(97, 24) Source(98, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(98, 2) Source(99, 2) + SourceIndex(0) +--- +>>>for (var _28 = 0, multiRobots_4 = multiRobots; _28 < multiRobots_4.length; _28++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^ +12> ^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ({name, skills: { primary, secondary } } of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > multiRobots +10> +11> multiRobots +12> ) +1->Emitted(99, 1) Source(100, 1) + SourceIndex(0) +2 >Emitted(99, 4) Source(100, 4) + SourceIndex(0) +3 >Emitted(99, 5) Source(100, 5) + SourceIndex(0) +4 >Emitted(99, 6) Source(100, 49) + SourceIndex(0) +5 >Emitted(99, 17) Source(100, 60) + SourceIndex(0) +6 >Emitted(99, 19) Source(100, 49) + SourceIndex(0) +7 >Emitted(99, 46) Source(100, 60) + SourceIndex(0) +8 >Emitted(99, 48) Source(100, 49) + SourceIndex(0) +9 >Emitted(99, 74) Source(100, 60) + SourceIndex(0) +10>Emitted(99, 76) Source(100, 49) + SourceIndex(0) +11>Emitted(99, 81) Source(100, 60) + SourceIndex(0) +12>Emitted(99, 82) Source(100, 61) + SourceIndex(0) +--- +>>> _29 = multiRobots_4[_28], name = _29.name, _30 = _29.skills, primary = _30.primary, secondary = _30.secondary; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > {name, skills: { primary, secondary } } +3 > +4 > name +5 > , +6 > skills +7 > : { +8 > primary +9 > , +10> secondary +1->Emitted(100, 5) Source(100, 6) + SourceIndex(0) +2 >Emitted(100, 29) Source(100, 45) + SourceIndex(0) +3 >Emitted(100, 31) Source(100, 7) + SourceIndex(0) +4 >Emitted(100, 46) Source(100, 11) + SourceIndex(0) +5 >Emitted(100, 48) Source(100, 13) + SourceIndex(0) +6 >Emitted(100, 64) Source(100, 19) + SourceIndex(0) +7 >Emitted(100, 66) Source(100, 23) + SourceIndex(0) +8 >Emitted(100, 87) Source(100, 30) + SourceIndex(0) +9 >Emitted(100, 89) Source(100, 32) + SourceIndex(0) +10>Emitted(100, 114) Source(100, 41) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } } of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(101, 5) Source(101, 5) + SourceIndex(0) +2 >Emitted(101, 12) Source(101, 12) + SourceIndex(0) +3 >Emitted(101, 13) Source(101, 13) + SourceIndex(0) +4 >Emitted(101, 16) Source(101, 16) + SourceIndex(0) +5 >Emitted(101, 17) Source(101, 17) + SourceIndex(0) +6 >Emitted(101, 22) Source(101, 22) + SourceIndex(0) +7 >Emitted(101, 23) Source(101, 23) + SourceIndex(0) +8 >Emitted(101, 24) Source(101, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(102, 2) Source(102, 2) + SourceIndex(0) +--- +>>>for (var _31 = 0, _32 = getMultiRobots(); _31 < _32.length; _31++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ({name, skills: { primary, secondary } } of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> getMultiRobots() +12> +13> getMultiRobots() +14> ) +1->Emitted(103, 1) Source(103, 1) + SourceIndex(0) +2 >Emitted(103, 4) Source(103, 4) + SourceIndex(0) +3 >Emitted(103, 5) Source(103, 5) + SourceIndex(0) +4 >Emitted(103, 6) Source(103, 49) + SourceIndex(0) +5 >Emitted(103, 17) Source(103, 65) + SourceIndex(0) +6 >Emitted(103, 19) Source(103, 49) + SourceIndex(0) +7 >Emitted(103, 25) Source(103, 49) + SourceIndex(0) +8 >Emitted(103, 39) Source(103, 63) + SourceIndex(0) +9 >Emitted(103, 41) Source(103, 65) + SourceIndex(0) +10>Emitted(103, 43) Source(103, 49) + SourceIndex(0) +11>Emitted(103, 59) Source(103, 65) + SourceIndex(0) +12>Emitted(103, 61) Source(103, 49) + SourceIndex(0) +13>Emitted(103, 66) Source(103, 65) + SourceIndex(0) +14>Emitted(103, 67) Source(103, 66) + SourceIndex(0) +--- +>>> _33 = _32[_31], name = _33.name, _34 = _33.skills, primary = _34.primary, secondary = _34.secondary; +1->^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > {name, skills: { primary, secondary } } +3 > +4 > name +5 > , +6 > skills +7 > : { +8 > primary +9 > , +10> secondary +1->Emitted(104, 5) Source(103, 6) + SourceIndex(0) +2 >Emitted(104, 19) Source(103, 45) + SourceIndex(0) +3 >Emitted(104, 21) Source(103, 7) + SourceIndex(0) +4 >Emitted(104, 36) Source(103, 11) + SourceIndex(0) +5 >Emitted(104, 38) Source(103, 13) + SourceIndex(0) +6 >Emitted(104, 54) Source(103, 19) + SourceIndex(0) +7 >Emitted(104, 56) Source(103, 23) + SourceIndex(0) +8 >Emitted(104, 77) Source(103, 30) + SourceIndex(0) +9 >Emitted(104, 79) Source(103, 32) + SourceIndex(0) +10>Emitted(104, 104) Source(103, 41) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } } of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(105, 5) Source(104, 5) + SourceIndex(0) +2 >Emitted(105, 12) Source(104, 12) + SourceIndex(0) +3 >Emitted(105, 13) Source(104, 13) + SourceIndex(0) +4 >Emitted(105, 16) Source(104, 16) + SourceIndex(0) +5 >Emitted(105, 17) Source(104, 17) + SourceIndex(0) +6 >Emitted(105, 22) Source(104, 22) + SourceIndex(0) +7 >Emitted(105, 23) Source(104, 23) + SourceIndex(0) +8 >Emitted(105, 24) Source(104, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(106, 2) Source(105, 2) + SourceIndex(0) +--- +>>>for (var _35 = 0, _36 = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^ +9 > ^^^^ +10> ^^ +11> ^^^^^^^ +12> ^^ +13> ^^^^^^ +14> ^^ +15> ^^ +16> ^^^^^^^ +17> ^^ +18> ^^^^^^^^ +19> ^^ +20> ^^^^^^^^^ +21> ^^ +22> ^^^^^^ +23> ^^ +24> ^^ +25> ^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ({name, skills: { primary, secondary } } of +5 > [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +6 > +7 > [ +8 > { +9 > name +10> : +11> "mower" +12> , +13> skills +14> : +15> { +16> primary +17> : +18> "mowing" +19> , +20> secondary +21> : +22> "none" +23> } +24> } +1->Emitted(107, 1) Source(106, 1) + SourceIndex(0) +2 >Emitted(107, 4) Source(106, 4) + SourceIndex(0) +3 >Emitted(107, 5) Source(106, 5) + SourceIndex(0) +4 >Emitted(107, 6) Source(106, 49) + SourceIndex(0) +5 >Emitted(107, 17) Source(107, 79) + SourceIndex(0) +6 >Emitted(107, 19) Source(106, 49) + SourceIndex(0) +7 >Emitted(107, 26) Source(106, 50) + SourceIndex(0) +8 >Emitted(107, 28) Source(106, 52) + SourceIndex(0) +9 >Emitted(107, 32) Source(106, 56) + SourceIndex(0) +10>Emitted(107, 34) Source(106, 58) + SourceIndex(0) +11>Emitted(107, 41) Source(106, 65) + SourceIndex(0) +12>Emitted(107, 43) Source(106, 67) + SourceIndex(0) +13>Emitted(107, 49) Source(106, 73) + SourceIndex(0) +14>Emitted(107, 51) Source(106, 75) + SourceIndex(0) +15>Emitted(107, 53) Source(106, 77) + SourceIndex(0) +16>Emitted(107, 60) Source(106, 84) + SourceIndex(0) +17>Emitted(107, 62) Source(106, 86) + SourceIndex(0) +18>Emitted(107, 70) Source(106, 94) + SourceIndex(0) +19>Emitted(107, 72) Source(106, 96) + SourceIndex(0) +20>Emitted(107, 81) Source(106, 105) + SourceIndex(0) +21>Emitted(107, 83) Source(106, 107) + SourceIndex(0) +22>Emitted(107, 89) Source(106, 113) + SourceIndex(0) +23>Emitted(107, 91) Source(106, 115) + SourceIndex(0) +24>Emitted(107, 93) Source(106, 117) + SourceIndex(0) +--- +>>> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _35 < _36.length; _35++) { +1->^^^^ +2 > ^^ +3 > ^^^^ +4 > ^^ +5 > ^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^ +10> ^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^ +15> ^^ +16> ^^^^^^^^ +17> ^^ +18> ^^ +19> ^ +20> ^^ +21> ^^^^^^^^^^^^^^^^ +22> ^^ +23> ^^^^^ +24> ^ +25> ^-> +1->, + > +2 > { +3 > name +4 > : +5 > "trimmer" +6 > , +7 > skills +8 > : +9 > { +10> primary +11> : +12> "trimming" +13> , +14> secondary +15> : +16> "edging" +17> } +18> } +19> ] +20> +21> [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +22> +23> [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +24> ) +1->Emitted(108, 5) Source(107, 5) + SourceIndex(0) +2 >Emitted(108, 7) Source(107, 7) + SourceIndex(0) +3 >Emitted(108, 11) Source(107, 11) + SourceIndex(0) +4 >Emitted(108, 13) Source(107, 13) + SourceIndex(0) +5 >Emitted(108, 22) Source(107, 22) + SourceIndex(0) +6 >Emitted(108, 24) Source(107, 24) + SourceIndex(0) +7 >Emitted(108, 30) Source(107, 30) + SourceIndex(0) +8 >Emitted(108, 32) Source(107, 32) + SourceIndex(0) +9 >Emitted(108, 34) Source(107, 34) + SourceIndex(0) +10>Emitted(108, 41) Source(107, 41) + SourceIndex(0) +11>Emitted(108, 43) Source(107, 43) + SourceIndex(0) +12>Emitted(108, 53) Source(107, 53) + SourceIndex(0) +13>Emitted(108, 55) Source(107, 55) + SourceIndex(0) +14>Emitted(108, 64) Source(107, 64) + SourceIndex(0) +15>Emitted(108, 66) Source(107, 66) + SourceIndex(0) +16>Emitted(108, 74) Source(107, 74) + SourceIndex(0) +17>Emitted(108, 76) Source(107, 76) + SourceIndex(0) +18>Emitted(108, 78) Source(107, 78) + SourceIndex(0) +19>Emitted(108, 79) Source(107, 79) + SourceIndex(0) +20>Emitted(108, 81) Source(106, 49) + SourceIndex(0) +21>Emitted(108, 97) Source(107, 79) + SourceIndex(0) +22>Emitted(108, 99) Source(106, 49) + SourceIndex(0) +23>Emitted(108, 104) Source(107, 79) + SourceIndex(0) +24>Emitted(108, 105) Source(107, 80) + SourceIndex(0) +--- +>>> _37 = _36[_35], name = _37.name, _38 = _37.skills, primary = _38.primary, secondary = _38.secondary; +1->^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > {name, skills: { primary, secondary } } +3 > +4 > name +5 > , +6 > skills +7 > : { +8 > primary +9 > , +10> secondary +1->Emitted(109, 5) Source(106, 6) + SourceIndex(0) +2 >Emitted(109, 19) Source(106, 45) + SourceIndex(0) +3 >Emitted(109, 21) Source(106, 7) + SourceIndex(0) +4 >Emitted(109, 36) Source(106, 11) + SourceIndex(0) +5 >Emitted(109, 38) Source(106, 13) + SourceIndex(0) +6 >Emitted(109, 54) Source(106, 19) + SourceIndex(0) +7 >Emitted(109, 56) Source(106, 23) + SourceIndex(0) +8 >Emitted(109, 77) Source(106, 30) + SourceIndex(0) +9 >Emitted(109, 79) Source(106, 32) + SourceIndex(0) +10>Emitted(109, 104) Source(106, 41) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(110, 5) Source(108, 5) + SourceIndex(0) +2 >Emitted(110, 12) Source(108, 12) + SourceIndex(0) +3 >Emitted(110, 13) Source(108, 13) + SourceIndex(0) +4 >Emitted(110, 16) Source(108, 16) + SourceIndex(0) +5 >Emitted(110, 17) Source(108, 17) + SourceIndex(0) +6 >Emitted(110, 22) Source(108, 22) + SourceIndex(0) +7 >Emitted(110, 23) Source(108, 23) + SourceIndex(0) +8 >Emitted(110, 24) Source(108, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(111, 2) Source(109, 2) + SourceIndex(0) +--- +>>>var _f, _j, _m, _u, _x, _0, _2, _5, _8, _10, _11, _14, _15, _18, _19, _21, _24, _27, _29, _30, _33, _34, _37, _38; +>>>//# sourceMappingURL=sourceMapValidationDestructuringForOfObjectBindingPattern2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.symbols b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.symbols new file mode 100644 index 00000000000..ed2a6c3449d --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.symbols @@ -0,0 +1,435 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPattern2.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 11)) + + log(msg: any): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 1, 8)) +} +interface Robot { +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 2, 1)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 3, 17)) + + skill: string; +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 4, 17)) +} + +interface MultiRobot { +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 6, 1)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 8, 22)) + + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 9, 17)) + + primary: string; +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 10, 13)) + + secondary: string; +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 11, 24)) + + }; +} + +let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 16, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 16, 24)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 16, 39)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 16, 60)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 16, 77)) + +let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 17, 3)) +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 17, 34)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 17, 49)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 17, 59)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 17, 78)) + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 18, 5)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 18, 22)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 18, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 18, 53)) + +function getRobots() { +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 18, 79)) + + return robots; +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 16, 3)) +} + +function getMultiRobots() { +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 22, 1)) + + return multiRobots; +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 17, 3)) +} + +let nameA: string, primaryA: string, secondaryA: string, i: number, skillA: string; +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 18)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 36)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 56)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 67)) + +let name: string, primary: string, secondary: string, skill: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 29, 3)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 29, 17)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 29, 34)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 29, 53)) + +for ({name: nameA } of robots) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 31, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 16, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +} +for ({name: nameA } of getRobots()) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 34, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 18, 79)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +} +for ({name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 37, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 37, 25)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 37, 40)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 37, 61)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 37, 78)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +} +for ({ skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 40, 6)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 40, 16)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 18)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 40, 35)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 36)) +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 17, 3)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 18)) +} +for ({ skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 43, 6)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 43, 16)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 18)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 43, 35)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 36)) +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 22, 1)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 18)) +} +for ({ skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 46, 6)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 46, 16)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 18)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 46, 35)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 36)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 46, 67)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 46, 82)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 46, 92)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 46, 111)) + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 47, 5)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 47, 22)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 47, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 47, 53)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 18)) +} +for ({name } of robots) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 50, 6)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 16, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +} +for ({name } of getRobots()) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 53, 6)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 18, 79)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +} +for ({name } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 56, 6)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 56, 18)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 56, 33)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 56, 54)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 56, 71)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +} +for ({ skills: { primary, secondary } } of multiRobots) { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 59, 6)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 59, 16)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 59, 25)) +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 17, 3)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 18)) +} +for ({ skills: { primary, secondary } } of getMultiRobots()) { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 62, 6)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 62, 16)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 62, 25)) +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 22, 1)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 18)) +} +for ({ skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 65, 6)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 65, 16)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 65, 25)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 65, 45)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 65, 60)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 65, 70)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 65, 89)) + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 66, 5)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 66, 22)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 66, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 66, 53)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 18)) +} + + +for ({name: nameA, skill: skillA } of robots) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 71, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 71, 18)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 67)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 16, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +} +for ({name: nameA, skill: skillA } of getRobots()) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 74, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 74, 18)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 67)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 18, 79)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +} +for ({name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 77, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 77, 18)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 67)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 77, 40)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 77, 55)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 77, 76)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 77, 93)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +} +for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 80, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 80, 18)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 80, 28)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 18)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 80, 47)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 36)) +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 17, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +} +for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 83, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 83, 18)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 83, 28)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 18)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 83, 47)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 36)) +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 22, 1)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +} +for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 86, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 86, 18)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 86, 28)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 18)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 86, 47)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 36)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 86, 79)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 86, 94)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 86, 104)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 86, 123)) + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 87, 5)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 87, 22)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 87, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 87, 53)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +} +for ({name, skill } of robots) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 90, 6)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 90, 11)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 16, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +} +for ({name, skill } of getRobots()) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 93, 6)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 93, 11)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 18, 79)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +} +for ({name, skill } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 96, 6)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 96, 11)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 96, 25)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 96, 40)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 96, 61)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 96, 78)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +} +for ({name, skills: { primary, secondary } } of multiRobots) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 99, 6)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 99, 11)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 99, 21)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 99, 30)) +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 17, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +} +for ({name, skills: { primary, secondary } } of getMultiRobots()) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 102, 6)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 102, 11)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 102, 21)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 102, 30)) +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 22, 1)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +} +for ({name, skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 105, 6)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 105, 11)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 105, 21)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 105, 30)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 105, 50)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 105, 65)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 105, 75)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 105, 94)) + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 106, 5)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 106, 22)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 106, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 106, 53)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern2.ts, 28, 3)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.types b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.types new file mode 100644 index 00000000000..1f292542545 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.types @@ -0,0 +1,593 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPattern2.ts === +declare var console: { +>console : { log(msg: any): void; } + + log(msg: any): void; +>log : (msg: any) => void +>msg : any +} +interface Robot { +>Robot : Robot + + name: string; +>name : string + + skill: string; +>skill : string +} + +interface MultiRobot { +>MultiRobot : MultiRobot + + name: string; +>name : string + + skills: { +>skills : { primary: string; secondary: string; } + + primary: string; +>primary : string + + secondary: string; +>secondary : string + + }; +} + +let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +>robots : Robot[] +>Robot : Robot +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string + +let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>multiRobots : MultiRobot[] +>MultiRobot : MultiRobot +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"mower" : string +>skills : { primary: string; secondary: string; } +>{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } +>primary : string +>"mowing" : string +>secondary : string +>"none" : string + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + +function getRobots() { +>getRobots : () => Robot[] + + return robots; +>robots : Robot[] +} + +function getMultiRobots() { +>getMultiRobots : () => MultiRobot[] + + return multiRobots; +>multiRobots : MultiRobot[] +} + +let nameA: string, primaryA: string, secondaryA: string, i: number, skillA: string; +>nameA : string +>primaryA : string +>secondaryA : string +>i : number +>skillA : string + +let name: string, primary: string, secondary: string, skill: string; +>name : string +>primary : string +>secondary : string +>skill : string + +for ({name: nameA } of robots) { +>{name: nameA } : { name: string; } +>name : Robot +>nameA : string +>robots : Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({name: nameA } of getRobots()) { +>{name: nameA } : { name: string; } +>name : Robot +>nameA : string +>getRobots() : Robot[] +>getRobots : () => Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>{name: nameA } : { name: string; } +>name : { name: string; skill: string; } +>nameA : string +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { +>{ skills: { primary: primaryA, secondary: secondaryA } } : { skills: { primary: string; secondary: string; }; } +>skills : MultiRobot +>{ primary: primaryA, secondary: secondaryA } : { primary: string; secondary: string; } +>primary : string +>primaryA : string +>secondary : string +>secondaryA : string +>multiRobots : MultiRobot[] + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for ({ skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { +>{ skills: { primary: primaryA, secondary: secondaryA } } : { skills: { primary: string; secondary: string; }; } +>skills : MultiRobot +>{ primary: primaryA, secondary: secondaryA } : { primary: string; secondary: string; } +>primary : string +>primaryA : string +>secondary : string +>secondaryA : string +>getMultiRobots() : MultiRobot[] +>getMultiRobots : () => MultiRobot[] + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for ({ skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>{ skills: { primary: primaryA, secondary: secondaryA } } : { skills: { primary: string; secondary: string; }; } +>skills : { name: string; skills: { primary: string; secondary: string; }; } +>{ primary: primaryA, secondary: secondaryA } : { primary: string; secondary: string; } +>primary : string +>primaryA : string +>secondary : string +>secondaryA : string +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"mower" : string +>skills : { primary: string; secondary: string; } +>{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } +>primary : string +>"mowing" : string +>secondary : string +>"none" : string + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for ({name } of robots) { +>{name } : { name: string; } +>name : Robot +>robots : Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({name } of getRobots()) { +>{name } : { name: string; } +>name : Robot +>getRobots() : Robot[] +>getRobots : () => Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({name } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>{name } : { name: string; } +>name : { name: string; skill: string; } +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ skills: { primary, secondary } } of multiRobots) { +>{ skills: { primary, secondary } } : { skills: { primary: string; secondary: string; }; } +>skills : MultiRobot +>{ primary, secondary } : { primary: string; secondary: string; } +>primary : string +>secondary : string +>multiRobots : MultiRobot[] + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for ({ skills: { primary, secondary } } of getMultiRobots()) { +>{ skills: { primary, secondary } } : { skills: { primary: string; secondary: string; }; } +>skills : MultiRobot +>{ primary, secondary } : { primary: string; secondary: string; } +>primary : string +>secondary : string +>getMultiRobots() : MultiRobot[] +>getMultiRobots : () => MultiRobot[] + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for ({ skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>{ skills: { primary, secondary } } : { skills: { primary: string; secondary: string; }; } +>skills : { name: string; skills: { primary: string; secondary: string; }; } +>{ primary, secondary } : { primary: string; secondary: string; } +>primary : string +>secondary : string +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"mower" : string +>skills : { primary: string; secondary: string; } +>{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } +>primary : string +>"mowing" : string +>secondary : string +>"none" : string + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} + + +for ({name: nameA, skill: skillA } of robots) { +>{name: nameA, skill: skillA } : { name: string; skill: string; } +>name : Robot +>nameA : string +>skill : Robot +>skillA : string +>robots : Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({name: nameA, skill: skillA } of getRobots()) { +>{name: nameA, skill: skillA } : { name: string; skill: string; } +>name : Robot +>nameA : string +>skill : Robot +>skillA : string +>getRobots() : Robot[] +>getRobots : () => Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>{name: nameA, skill: skillA } : { name: string; skill: string; } +>name : { name: string; skill: string; } +>nameA : string +>skill : { name: string; skill: string; } +>skillA : string +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { +>{name: nameA, skills: { primary: primaryA, secondary: secondaryA } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : MultiRobot +>nameA : string +>skills : MultiRobot +>{ primary: primaryA, secondary: secondaryA } : { primary: string; secondary: string; } +>primary : string +>primaryA : string +>secondary : string +>secondaryA : string +>multiRobots : MultiRobot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { +>{name: nameA, skills: { primary: primaryA, secondary: secondaryA } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : MultiRobot +>nameA : string +>skills : MultiRobot +>{ primary: primaryA, secondary: secondaryA } : { primary: string; secondary: string; } +>primary : string +>primaryA : string +>secondary : string +>secondaryA : string +>getMultiRobots() : MultiRobot[] +>getMultiRobots : () => MultiRobot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>{name: nameA, skills: { primary: primaryA, secondary: secondaryA } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : { name: string; skills: { primary: string; secondary: string; }; } +>nameA : string +>skills : { name: string; skills: { primary: string; secondary: string; }; } +>{ primary: primaryA, secondary: secondaryA } : { primary: string; secondary: string; } +>primary : string +>primaryA : string +>secondary : string +>secondaryA : string +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"mower" : string +>skills : { primary: string; secondary: string; } +>{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } +>primary : string +>"mowing" : string +>secondary : string +>"none" : string + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({name, skill } of robots) { +>{name, skill } : { name: string; skill: string; } +>name : Robot +>skill : Robot +>robots : Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({name, skill } of getRobots()) { +>{name, skill } : { name: string; skill: string; } +>name : Robot +>skill : Robot +>getRobots() : Robot[] +>getRobots : () => Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({name, skill } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>{name, skill } : { name: string; skill: string; } +>name : { name: string; skill: string; } +>skill : { name: string; skill: string; } +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({name, skills: { primary, secondary } } of multiRobots) { +>{name, skills: { primary, secondary } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : MultiRobot +>skills : MultiRobot +>{ primary, secondary } : { primary: string; secondary: string; } +>primary : string +>secondary : string +>multiRobots : MultiRobot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({name, skills: { primary, secondary } } of getMultiRobots()) { +>{name, skills: { primary, secondary } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : MultiRobot +>skills : MultiRobot +>{ primary, secondary } : { primary: string; secondary: string; } +>primary : string +>secondary : string +>getMultiRobots() : MultiRobot[] +>getMultiRobots : () => MultiRobot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({name, skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>{name, skills: { primary, secondary } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : { name: string; skills: { primary: string; secondary: string; }; } +>skills : { name: string; skills: { primary: string; secondary: string; }; } +>{ primary, secondary } : { primary: string; secondary: string; } +>primary : string +>secondary : string +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"mower" : string +>skills : { primary: string; secondary: string; } +>{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } +>primary : string +>"mowing" : string +>secondary : string +>"none" : string + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} diff --git a/tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPattern2.ts b/tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPattern2.ts new file mode 100644 index 00000000000..7f71e7d6bdd --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPattern2.ts @@ -0,0 +1,110 @@ +// @sourcemap: true +declare var console: { + log(msg: any): void; +} +interface Robot { + name: string; + skill: string; +} + +interface MultiRobot { + name: string; + skills: { + primary: string; + secondary: string; + }; +} + +let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; + +function getRobots() { + return robots; +} + +function getMultiRobots() { + return multiRobots; +} + +let nameA: string, primaryA: string, secondaryA: string, i: number, skillA: string; +let name: string, primary: string, secondary: string, skill: string; + +for ({name: nameA } of robots) { + console.log(nameA); +} +for ({name: nameA } of getRobots()) { + console.log(nameA); +} +for ({name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for ({ skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + console.log(primaryA); +} +for ({ skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + console.log(primaryA); +} +for ({ skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(primaryA); +} +for ({name } of robots) { + console.log(nameA); +} +for ({name } of getRobots()) { + console.log(nameA); +} +for ({name } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for ({ skills: { primary, secondary } } of multiRobots) { + console.log(primaryA); +} +for ({ skills: { primary, secondary } } of getMultiRobots()) { + console.log(primaryA); +} +for ({ skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(primaryA); +} + + +for ({name: nameA, skill: skillA } of robots) { + console.log(nameA); +} +for ({name: nameA, skill: skillA } of getRobots()) { + console.log(nameA); +} +for ({name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + console.log(nameA); +} +for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + console.log(nameA); +} +for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(nameA); +} +for ({name, skill } of robots) { + console.log(nameA); +} +for ({name, skill } of getRobots()) { + console.log(nameA); +} +for ({name, skill } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for ({name, skills: { primary, secondary } } of multiRobots) { + console.log(nameA); +} +for ({name, skills: { primary, secondary } } of getMultiRobots()) { + console.log(nameA); +} +for ({name, skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(nameA); +} \ No newline at end of file From 250ddca65b06c361d09761a49fb2addc8167ede5 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 8 Dec 2015 17:32:59 -0800 Subject: [PATCH 037/209] Update existing baselines --- tests/baselines/reference/ES5For-of1.js.map | 2 +- .../reference/ES5For-of1.sourcemap.txt | 10 +-- tests/baselines/reference/ES5For-of13.js.map | 2 +- .../reference/ES5For-of13.sourcemap.txt | 10 +-- tests/baselines/reference/ES5For-of25.js.map | 2 +- .../reference/ES5For-of25.sourcemap.txt | 10 +-- tests/baselines/reference/ES5For-of26.js.map | 2 +- .../reference/ES5For-of26.sourcemap.txt | 69 ++++++++++--------- tests/baselines/reference/ES5For-of3.js.map | 2 +- .../reference/ES5For-of3.sourcemap.txt | 10 +-- tests/baselines/reference/ES5For-of8.js.map | 2 +- .../reference/ES5For-of8.sourcemap.txt | 19 ++--- 12 files changed, 73 insertions(+), 67 deletions(-) diff --git a/tests/baselines/reference/ES5For-of1.js.map b/tests/baselines/reference/ES5For-of1.js.map index 568ac1987e7..bd729517462 100644 --- a/tests/baselines/reference/ES5For-of1.js.map +++ b/tests/baselines/reference/ES5For-of1.js.map @@ -1,2 +1,2 @@ //// [ES5For-of1.js.map] -{"version":3,"file":"ES5For-of1.js","sourceRoot":"","sources":["ES5For-of1.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAxB,cAAK,EAAL,IAAwB,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAClB"} \ No newline at end of file +{"version":3,"file":"ES5For-of1.js","sourceRoot":"","sources":["ES5For-of1.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAf,cAAe,EAAf,IAAe,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAClB"} \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of1.sourcemap.txt b/tests/baselines/reference/ES5For-of1.sourcemap.txt index 7bdd7edfa13..5ae1084df25 100644 --- a/tests/baselines/reference/ES5For-of1.sourcemap.txt +++ b/tests/baselines/reference/ES5For-of1.sourcemap.txt @@ -41,9 +41,9 @@ sourceFile:ES5For-of1.ts 12> 'c' 13> ] 14> -15> var v +15> ['a', 'b', 'c'] 16> -17> var v of ['a', 'b', 'c'] +17> ['a', 'b', 'c'] 18> ) 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) 2 >Emitted(1, 4) Source(1, 4) + SourceIndex(0) @@ -58,9 +58,9 @@ sourceFile:ES5For-of1.ts 11>Emitted(1, 34) Source(1, 26) + SourceIndex(0) 12>Emitted(1, 37) Source(1, 29) + SourceIndex(0) 13>Emitted(1, 38) Source(1, 30) + SourceIndex(0) -14>Emitted(1, 40) Source(1, 6) + SourceIndex(0) -15>Emitted(1, 54) Source(1, 11) + SourceIndex(0) -16>Emitted(1, 56) Source(1, 6) + SourceIndex(0) +14>Emitted(1, 40) Source(1, 15) + SourceIndex(0) +15>Emitted(1, 54) Source(1, 30) + SourceIndex(0) +16>Emitted(1, 56) Source(1, 15) + SourceIndex(0) 17>Emitted(1, 60) Source(1, 30) + SourceIndex(0) 18>Emitted(1, 61) Source(1, 31) + SourceIndex(0) --- diff --git a/tests/baselines/reference/ES5For-of13.js.map b/tests/baselines/reference/ES5For-of13.js.map index 5ff54bb8816..3fa2bd27348 100644 --- a/tests/baselines/reference/ES5For-of13.js.map +++ b/tests/baselines/reference/ES5For-of13.js.map @@ -1,2 +1,2 @@ //// [ES5For-of13.js.map] -{"version":3,"file":"ES5For-of13.js","sourceRoot":"","sources":["ES5For-of13.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAxB,cAAK,EAAL,IAAwB,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,IAAI,CAAC,GAAG,CAAC,CAAC;CACb"} \ No newline at end of file +{"version":3,"file":"ES5For-of13.js","sourceRoot":"","sources":["ES5For-of13.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAf,cAAe,EAAf,IAAe,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,IAAI,CAAC,GAAG,CAAC,CAAC;CACb"} \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of13.sourcemap.txt b/tests/baselines/reference/ES5For-of13.sourcemap.txt index c3a188e7221..410560ac78e 100644 --- a/tests/baselines/reference/ES5For-of13.sourcemap.txt +++ b/tests/baselines/reference/ES5For-of13.sourcemap.txt @@ -41,9 +41,9 @@ sourceFile:ES5For-of13.ts 12> 'c' 13> ] 14> -15> let v +15> ['a', 'b', 'c'] 16> -17> let v of ['a', 'b', 'c'] +17> ['a', 'b', 'c'] 18> ) 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) 2 >Emitted(1, 4) Source(1, 4) + SourceIndex(0) @@ -58,9 +58,9 @@ sourceFile:ES5For-of13.ts 11>Emitted(1, 34) Source(1, 26) + SourceIndex(0) 12>Emitted(1, 37) Source(1, 29) + SourceIndex(0) 13>Emitted(1, 38) Source(1, 30) + SourceIndex(0) -14>Emitted(1, 40) Source(1, 6) + SourceIndex(0) -15>Emitted(1, 54) Source(1, 11) + SourceIndex(0) -16>Emitted(1, 56) Source(1, 6) + SourceIndex(0) +14>Emitted(1, 40) Source(1, 15) + SourceIndex(0) +15>Emitted(1, 54) Source(1, 30) + SourceIndex(0) +16>Emitted(1, 56) Source(1, 15) + SourceIndex(0) 17>Emitted(1, 60) Source(1, 30) + SourceIndex(0) 18>Emitted(1, 61) Source(1, 31) + SourceIndex(0) --- diff --git a/tests/baselines/reference/ES5For-of25.js.map b/tests/baselines/reference/ES5For-of25.js.map index 1c4d8c2101f..5ccc838a488 100644 --- a/tests/baselines/reference/ES5For-of25.js.map +++ b/tests/baselines/reference/ES5For-of25.js.map @@ -1,2 +1,2 @@ //// [ES5For-of25.js.map] -{"version":3,"file":"ES5For-of25.js","sourceRoot":"","sources":["ES5For-of25.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAClB,GAAG,CAAC,CAAU,UAAC,EAAD,OAAC,EAAV,eAAK,EAAL,IAAU,CAAC;IAAX,IAAI,CAAC,UAAA;IACN,CAAC,CAAC;IACF,CAAC,CAAC;CACL"} \ No newline at end of file +{"version":3,"file":"ES5For-of25.js","sourceRoot":"","sources":["ES5For-of25.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAClB,GAAG,CAAC,CAAU,UAAC,EAAD,OAAC,EAAD,eAAC,EAAD,IAAC,CAAC;IAAX,IAAI,CAAC,UAAA;IACN,CAAC,CAAC;IACF,CAAC,CAAC;CACL"} \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of25.sourcemap.txt b/tests/baselines/reference/ES5For-of25.sourcemap.txt index 453eef4ee46..765aa707701 100644 --- a/tests/baselines/reference/ES5For-of25.sourcemap.txt +++ b/tests/baselines/reference/ES5For-of25.sourcemap.txt @@ -69,9 +69,9 @@ sourceFile:ES5For-of25.ts 6 > 7 > a 8 > -9 > var v +9 > a 10> -11> var v of a +11> a 12> ) 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) 2 >Emitted(2, 4) Source(2, 4) + SourceIndex(0) @@ -80,9 +80,9 @@ sourceFile:ES5For-of25.ts 5 >Emitted(2, 16) Source(2, 16) + SourceIndex(0) 6 >Emitted(2, 18) Source(2, 15) + SourceIndex(0) 7 >Emitted(2, 25) Source(2, 16) + SourceIndex(0) -8 >Emitted(2, 27) Source(2, 6) + SourceIndex(0) -9 >Emitted(2, 42) Source(2, 11) + SourceIndex(0) -10>Emitted(2, 44) Source(2, 6) + SourceIndex(0) +8 >Emitted(2, 27) Source(2, 15) + SourceIndex(0) +9 >Emitted(2, 42) Source(2, 16) + SourceIndex(0) +10>Emitted(2, 44) Source(2, 15) + SourceIndex(0) 11>Emitted(2, 48) Source(2, 16) + SourceIndex(0) 12>Emitted(2, 49) Source(2, 17) + SourceIndex(0) --- diff --git a/tests/baselines/reference/ES5For-of26.js.map b/tests/baselines/reference/ES5For-of26.js.map index 704a3a24f2a..5e128b4674c 100644 --- a/tests/baselines/reference/ES5For-of26.js.map +++ b/tests/baselines/reference/ES5For-of26.js.map @@ -1,2 +1,2 @@ //// [ES5For-of26.js.map] -{"version":3,"file":"ES5For-of26.js","sourceRoot":"","sources":["ES5For-of26.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAuB,UAAM,EAAN,MAAC,CAAC,EAAE,CAAC,CAAC,EAA5B,cAAkB,EAAlB,IAA4B,CAAC;IAA7B,6BAAK,CAAC,mBAAG,CAAC,mBAAE,CAAC,mBAAG,CAAC,KAAC;IACnB,CAAC,CAAC;IACF,CAAC,CAAC;CACL"} \ No newline at end of file +{"version":3,"file":"ES5For-of26.js","sourceRoot":"","sources":["ES5For-of26.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAuB,UAAM,EAAN,MAAC,CAAC,EAAE,CAAC,CAAC,EAAN,cAAM,EAAN,IAAM,CAAC;IAA7B,IAAA,WAAkB,EAAb,UAAK,EAAL,0BAAK,EAAE,UAAK,EAAL,0BAAK;IAClB,CAAC,CAAC;IACF,CAAC,CAAC;CACL"} \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of26.sourcemap.txt b/tests/baselines/reference/ES5For-of26.sourcemap.txt index c9942b1e861..112fb65c596 100644 --- a/tests/baselines/reference/ES5For-of26.sourcemap.txt +++ b/tests/baselines/reference/ES5For-of26.sourcemap.txt @@ -38,9 +38,9 @@ sourceFile:ES5For-of26.ts 10> 3 11> ] 12> -13> var [a = 0, b = 1] +13> [2, 3] 14> -15> var [a = 0, b = 1] of [2, 3] +15> [2, 3] 16> ) 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) 2 >Emitted(1, 4) Source(1, 4) + SourceIndex(0) @@ -53,50 +53,53 @@ sourceFile:ES5For-of26.ts 9 >Emitted(1, 27) Source(1, 32) + SourceIndex(0) 10>Emitted(1, 28) Source(1, 33) + SourceIndex(0) 11>Emitted(1, 29) Source(1, 34) + SourceIndex(0) -12>Emitted(1, 31) Source(1, 6) + SourceIndex(0) -13>Emitted(1, 45) Source(1, 24) + SourceIndex(0) -14>Emitted(1, 47) Source(1, 6) + SourceIndex(0) +12>Emitted(1, 31) Source(1, 28) + SourceIndex(0) +13>Emitted(1, 45) Source(1, 34) + SourceIndex(0) +14>Emitted(1, 47) Source(1, 28) + SourceIndex(0) 15>Emitted(1, 51) Source(1, 34) + SourceIndex(0) 16>Emitted(1, 52) Source(1, 35) + SourceIndex(0) --- >>> var _b = _a[_i], _c = _b[0], a = _c === void 0 ? 0 : _c, _d = _b[1], b = _d === void 0 ? 1 : _d; 1->^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^ -4 > ^^^^^^^^^^^^^^^^^^^ -5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^ -7 > ^ -8 > ^^^^^^^^^^^^^^^^^^^ -9 > ^ -10> ^^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > var [ -3 > a -4 > = -5 > 0 -6 > , -7 > b -8 > = -9 > 1 -10> ] +2 > +3 > var [a = 0, b = 1] +4 > +5 > a = 0 +6 > +7 > a = 0 +8 > , +9 > b = 1 +10> +11> b = 1 1->Emitted(2, 5) Source(1, 6) + SourceIndex(0) -2 >Emitted(2, 34) Source(1, 11) + SourceIndex(0) -3 >Emitted(2, 35) Source(1, 12) + SourceIndex(0) -4 >Emitted(2, 54) Source(1, 15) + SourceIndex(0) -5 >Emitted(2, 55) Source(1, 16) + SourceIndex(0) -6 >Emitted(2, 74) Source(1, 18) + SourceIndex(0) -7 >Emitted(2, 75) Source(1, 19) + SourceIndex(0) -8 >Emitted(2, 94) Source(1, 22) + SourceIndex(0) -9 >Emitted(2, 95) Source(1, 23) + SourceIndex(0) -10>Emitted(2, 100) Source(1, 24) + SourceIndex(0) +2 >Emitted(2, 9) Source(1, 6) + SourceIndex(0) +3 >Emitted(2, 20) Source(1, 24) + SourceIndex(0) +4 >Emitted(2, 22) Source(1, 11) + SourceIndex(0) +5 >Emitted(2, 32) Source(1, 16) + SourceIndex(0) +6 >Emitted(2, 34) Source(1, 11) + SourceIndex(0) +7 >Emitted(2, 60) Source(1, 16) + SourceIndex(0) +8 >Emitted(2, 62) Source(1, 18) + SourceIndex(0) +9 >Emitted(2, 72) Source(1, 23) + SourceIndex(0) +10>Emitted(2, 74) Source(1, 18) + SourceIndex(0) +11>Emitted(2, 100) Source(1, 23) + SourceIndex(0) --- >>> a; 1 >^^^^ 2 > ^ 3 > ^ 4 > ^-> -1 > of [2, 3]) { +1 >] of [2, 3]) { > 2 > a 3 > ; diff --git a/tests/baselines/reference/ES5For-of3.js.map b/tests/baselines/reference/ES5For-of3.js.map index 7454e1ca85d..5a91ff28e9c 100644 --- a/tests/baselines/reference/ES5For-of3.js.map +++ b/tests/baselines/reference/ES5For-of3.js.map @@ -1,2 +1,2 @@ //// [ES5For-of3.js.map] -{"version":3,"file":"ES5For-of3.js","sourceRoot":"","sources":["ES5For-of3.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAxB,cAAK,EAAL,IAAwB,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,IAAI,CAAC,GAAG,CAAC,CAAC;CAAA"} \ No newline at end of file +{"version":3,"file":"ES5For-of3.js","sourceRoot":"","sources":["ES5For-of3.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAf,cAAe,EAAf,IAAe,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,IAAI,CAAC,GAAG,CAAC,CAAC;CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of3.sourcemap.txt b/tests/baselines/reference/ES5For-of3.sourcemap.txt index dd0bca37b68..1c728f5df67 100644 --- a/tests/baselines/reference/ES5For-of3.sourcemap.txt +++ b/tests/baselines/reference/ES5For-of3.sourcemap.txt @@ -41,9 +41,9 @@ sourceFile:ES5For-of3.ts 12> 'c' 13> ] 14> -15> var v +15> ['a', 'b', 'c'] 16> -17> var v of ['a', 'b', 'c'] +17> ['a', 'b', 'c'] 18> ) 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) 2 >Emitted(1, 4) Source(1, 4) + SourceIndex(0) @@ -58,9 +58,9 @@ sourceFile:ES5For-of3.ts 11>Emitted(1, 34) Source(1, 26) + SourceIndex(0) 12>Emitted(1, 37) Source(1, 29) + SourceIndex(0) 13>Emitted(1, 38) Source(1, 30) + SourceIndex(0) -14>Emitted(1, 40) Source(1, 6) + SourceIndex(0) -15>Emitted(1, 54) Source(1, 11) + SourceIndex(0) -16>Emitted(1, 56) Source(1, 6) + SourceIndex(0) +14>Emitted(1, 40) Source(1, 15) + SourceIndex(0) +15>Emitted(1, 54) Source(1, 30) + SourceIndex(0) +16>Emitted(1, 56) Source(1, 15) + SourceIndex(0) 17>Emitted(1, 60) Source(1, 30) + SourceIndex(0) 18>Emitted(1, 61) Source(1, 31) + SourceIndex(0) --- diff --git a/tests/baselines/reference/ES5For-of8.js.map b/tests/baselines/reference/ES5For-of8.js.map index f4e62e46e18..65efa797e0d 100644 --- a/tests/baselines/reference/ES5For-of8.js.map +++ b/tests/baselines/reference/ES5For-of8.js.map @@ -1,2 +1,2 @@ //// [ES5For-of8.js.map] -{"version":3,"file":"ES5For-of8.js","sourceRoot":"","sources":["ES5For-of8.ts"],"names":[],"mappings":"AAAA;IACI,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AACpB,CAAC;AACD,GAAG,CAAC,CAAY,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAA1B,cAAO,EAAP,IAA0B,CAAC;IAA3B,GAAG,EAAE,CAAC,CAAC,SAAA;IACR,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;CACnB"} \ No newline at end of file +{"version":3,"file":"ES5For-of8.js","sourceRoot":"","sources":["ES5For-of8.ts"],"names":[],"mappings":"AAAA;IACI,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AACpB,CAAC;AACD,GAAG,CAAC,CAAY,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAf,cAAe,EAAf,IAAe,CAAC;IAA3B,GAAG,EAAE,CAAC,CAAC,GAAP,MAAO;IACR,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;CACnB"} \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of8.sourcemap.txt b/tests/baselines/reference/ES5For-of8.sourcemap.txt index 7a87dbf3998..8bc3f3d7aba 100644 --- a/tests/baselines/reference/ES5For-of8.sourcemap.txt +++ b/tests/baselines/reference/ES5For-of8.sourcemap.txt @@ -88,9 +88,9 @@ sourceFile:ES5For-of8.ts 12> 'c' 13> ] 14> -15> foo().x +15> ['a', 'b', 'c'] 16> -17> foo().x of ['a', 'b', 'c'] +17> ['a', 'b', 'c'] 18> ) 1->Emitted(4, 1) Source(4, 1) + SourceIndex(0) 2 >Emitted(4, 4) Source(4, 4) + SourceIndex(0) @@ -105,9 +105,9 @@ sourceFile:ES5For-of8.ts 11>Emitted(4, 34) Source(4, 28) + SourceIndex(0) 12>Emitted(4, 37) Source(4, 31) + SourceIndex(0) 13>Emitted(4, 38) Source(4, 32) + SourceIndex(0) -14>Emitted(4, 40) Source(4, 6) + SourceIndex(0) -15>Emitted(4, 54) Source(4, 13) + SourceIndex(0) -16>Emitted(4, 56) Source(4, 6) + SourceIndex(0) +14>Emitted(4, 40) Source(4, 17) + SourceIndex(0) +15>Emitted(4, 54) Source(4, 32) + SourceIndex(0) +16>Emitted(4, 56) Source(4, 17) + SourceIndex(0) 17>Emitted(4, 60) Source(4, 32) + SourceIndex(0) 18>Emitted(4, 61) Source(4, 33) + SourceIndex(0) --- @@ -117,20 +117,23 @@ sourceFile:ES5For-of8.ts 3 > ^^ 4 > ^ 5 > ^ -6 > ^^^^^^^^^ -7 > ^-> +6 > ^^^ +7 > ^^^^^^ +8 > ^-> 1 > 2 > foo 3 > () 4 > . 5 > x 6 > +7 > foo().x 1 >Emitted(5, 5) Source(4, 6) + SourceIndex(0) 2 >Emitted(5, 8) Source(4, 9) + SourceIndex(0) 3 >Emitted(5, 10) Source(4, 11) + SourceIndex(0) 4 >Emitted(5, 11) Source(4, 12) + SourceIndex(0) 5 >Emitted(5, 12) Source(4, 13) + SourceIndex(0) -6 >Emitted(5, 21) Source(4, 13) + SourceIndex(0) +6 >Emitted(5, 15) Source(4, 6) + SourceIndex(0) +7 >Emitted(5, 21) Source(4, 13) + SourceIndex(0) --- >>> var p = foo().x; 1->^^^^ From 9fd525bc7c10f2f18980fb0686eff1ad0c6e9e8c Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 9 Dec 2015 13:02:09 -0800 Subject: [PATCH 038/209] Simplify the array binding pattern element to determine what to highlight --- src/compiler/emitter.ts | 22 +--------------- ...DestructuringForArrayBindingPattern.js.map | 2 +- ...turingForArrayBindingPattern.sourcemap.txt | 26 +++++++++---------- ...structuringForOfArrayBindingPattern.js.map | 2 +- ...ringForOfArrayBindingPattern.sourcemap.txt | 24 ++++++++--------- ...turingParametertArrayBindingPattern.js.map | 2 +- ...arametertArrayBindingPattern.sourcemap.txt | 8 +++--- ...uringParametertArrayBindingPattern2.js.map | 2 +- ...rametertArrayBindingPattern2.sourcemap.txt | 8 +++--- ...ariableStatementArrayBindingPattern.js.map | 2 +- ...StatementArrayBindingPattern.sourcemap.txt | 10 +++---- ...riableStatementArrayBindingPattern2.js.map | 2 +- ...tatementArrayBindingPattern2.sourcemap.txt | 10 +++---- 13 files changed, 50 insertions(+), 70 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index c51fca95f32..a707c669b5f 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -4007,7 +4007,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi else { let nodeForSourceMap: Node; // If binding element is part of binding pattern with single element, use binding pattern - if (target.kind === SyntaxKind.BindingElement && hasSingleBindingElement(target.parent)) { + if (target.kind === SyntaxKind.BindingElement && (target.parent).elements.length === 1) { nodeForSourceMap = (target.parent.parent.kind === SyntaxKind.VariableDeclaration || target.parent.parent.kind === SyntaxKind.Parameter) ? target.parent.parent : // Set sourcemap as whole variable declaration target.parent; // Only binding Pattern @@ -4018,26 +4018,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emitAssignment(target.name, value, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0, nodeForSourceMap); emitCount++; } - - function hasSingleBindingElement(pattern: BindingPattern) { - if (pattern.kind === SyntaxKind.ObjectBindingPattern) { - return pattern.elements.length === 1; - } - - let hasFoundEmittingElement = false; - for (const element of pattern.elements) { - if (element.kind !== SyntaxKind.OmittedExpression) { - if (hasFoundEmittingElement) { - // More than one elements are going to be emitted - return false; - } - hasFoundEmittingElement = true; - } - } - - // If we found exactly one emitting element - return hasFoundEmittingElement; - } } } diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.js.map index 5d84072bda9..e15c5de5eec 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringForArrayBindingPattern.js.map] -{"version":3,"file":"sourceMapValidationDestructuringForArrayBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForArrayBindingPattern.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED,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;AACzE;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,GAAG,CAAC,CAAC,GAAG,CAAC,iBAAkB,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC7C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,eAAsB,EAAtB,aAAsB,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjD,OAAO,CAAC,GAAG,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AAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,+BAAsD,EAArD,gBAAQ,EAAE,wBAAa,EAAgC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjF,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,sCAAkC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC7D,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,0CAAsC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjE,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,8DAA0D,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACrF,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringForArrayBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForArrayBindingPattern.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED,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;AACz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ceMapValidationDestructuringForArrayBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.sourcemap.txt index 3710798733e..cdb595801e2 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.sourcemap.txt @@ -242,9 +242,9 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 3 > 4 > ( 5 > let -6 > -7 > [, nameA] = robotA -8 > , +6 > [, +7 > nameA +8 > ] = robotA, 9 > i 10> = 11> 0 @@ -262,8 +262,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 3 >Emitted(10, 5) Source(18, 5) + SourceIndex(0) 4 >Emitted(10, 6) Source(18, 6) + SourceIndex(0) 5 >Emitted(10, 9) Source(18, 9) + SourceIndex(0) -6 >Emitted(10, 10) Source(18, 10) + SourceIndex(0) -7 >Emitted(10, 27) Source(18, 28) + SourceIndex(0) +6 >Emitted(10, 10) Source(18, 13) + SourceIndex(0) +7 >Emitted(10, 27) Source(18, 18) + SourceIndex(0) 8 >Emitted(10, 29) Source(18, 30) + SourceIndex(0) 9 >Emitted(10, 30) Source(18, 31) + SourceIndex(0) 10>Emitted(10, 33) Source(18, 34) + SourceIndex(0) @@ -347,8 +347,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 6 > 7 > [, nameA] = getRobot() 8 > -9 > [, nameA] = getRobot() -10> , +9 > nameA +10> ] = getRobot(), 11> i 12> = 13> 0 @@ -368,8 +368,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 5 >Emitted(13, 9) Source(21, 9) + SourceIndex(0) 6 >Emitted(13, 10) Source(21, 10) + SourceIndex(0) 7 >Emitted(13, 25) Source(21, 32) + SourceIndex(0) -8 >Emitted(13, 27) Source(21, 10) + SourceIndex(0) -9 >Emitted(13, 40) Source(21, 32) + SourceIndex(0) +8 >Emitted(13, 27) Source(21, 13) + SourceIndex(0) +9 >Emitted(13, 40) Source(21, 18) + SourceIndex(0) 10>Emitted(13, 42) Source(21, 34) + SourceIndex(0) 11>Emitted(13, 43) Source(21, 35) + SourceIndex(0) 12>Emitted(13, 46) Source(21, 38) + SourceIndex(0) @@ -453,8 +453,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 6 > 7 > [, nameA] = [2, "trimmer", "trimming"] 8 > -9 > [, nameA] = [2, "trimmer", "trimming"] -10> , +9 > nameA +10> ] = [2, "trimmer", "trimming"], 11> i 12> = 13> 0 @@ -474,8 +474,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 5 >Emitted(16, 9) Source(24, 9) + SourceIndex(0) 6 >Emitted(16, 10) Source(24, 10) + SourceIndex(0) 7 >Emitted(16, 41) Source(24, 48) + SourceIndex(0) -8 >Emitted(16, 43) Source(24, 10) + SourceIndex(0) -9 >Emitted(16, 56) Source(24, 48) + SourceIndex(0) +8 >Emitted(16, 43) Source(24, 13) + SourceIndex(0) +9 >Emitted(16, 56) Source(24, 18) + SourceIndex(0) 10>Emitted(16, 58) Source(24, 50) + SourceIndex(0) 11>Emitted(16, 59) Source(24, 51) + SourceIndex(0) 12>Emitted(16, 62) Source(24, 54) + SourceIndex(0) diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.js.map index a49d45f78b8..c2a1c23d12b 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringForOfArrayBindingPattern.js.map] -{"version":3,"file":"sourceMapValidationDestructuringForOfArrayBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForOfArrayBindingPattern.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAA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IACzB,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;CAChC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringForOfArrayBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForOfArrayBindingPattern.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAC/C,IAAI,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9B;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED,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;AACzE,IAAI,WAAW,GAAG,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAC7C;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,GAAG,CAAC,CAAkB,UAAM,EAAN,iBAAM,EAAN,oBAAM,EAAN,IAAM,CAAC;IAAxB,IAAA,iBAAa,EAAN,aAAK;IACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAAkB,UAAW,EAAX,KAAA,SAAS,EAAE,EAAX,cAAW,EAAX,IAAW,CAAC;IAA7B,IAAA,WAAa,EAAN,aAAK;IACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAAkB,UAAgB,EAAhB,MAAC,MAAM,EAAE,MAAM,CAAC,EAAhB,cAAgB,EAAhB,IAAgB,CAAC;IAAlC,IAAA,WAAa,EAAN,aAAK;IACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;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AC;IAA7C,IAAI,mCAAoB;IACzB,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;CAChC;AACD,GAAG,CAAC,CAA6B,WAA0B,EAA1B,OAAC,WAAW,EAAE,WAAW,CAAC,EAA1B,gBAA0B,EAA1B,KAA0B,CAAC;IAAvD,IAAI,mCAAoB;IACzB,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;CAChC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.sourcemap.txt index 4ca415fdaee..bb39152f474 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.sourcemap.txt @@ -370,12 +370,12 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts 2 > 3 > let [, nameA] 4 > -5 > [, nameA] +5 > nameA 1 >Emitted(14, 5) Source(21, 6) + SourceIndex(0) 2 >Emitted(14, 9) Source(21, 6) + SourceIndex(0) 3 >Emitted(14, 26) Source(21, 19) + SourceIndex(0) -4 >Emitted(14, 28) Source(21, 10) + SourceIndex(0) -5 >Emitted(14, 41) Source(21, 19) + SourceIndex(0) +4 >Emitted(14, 28) Source(21, 13) + SourceIndex(0) +5 >Emitted(14, 41) Source(21, 18) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -386,7 +386,7 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts 6 > ^^^^^ 7 > ^ 8 > ^ -1 > of robots) { +1 >] of robots) { > 2 > console 3 > . @@ -466,12 +466,12 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts 2 > 3 > let [, nameA] 4 > -5 > [, nameA] +5 > nameA 1 >Emitted(18, 5) Source(24, 6) + SourceIndex(0) 2 >Emitted(18, 9) Source(24, 6) + SourceIndex(0) 3 >Emitted(18, 20) Source(24, 19) + SourceIndex(0) -4 >Emitted(18, 22) Source(24, 10) + SourceIndex(0) -5 >Emitted(18, 35) Source(24, 19) + SourceIndex(0) +4 >Emitted(18, 22) Source(24, 13) + SourceIndex(0) +5 >Emitted(18, 35) Source(24, 18) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -482,7 +482,7 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts 6 > ^^^^^ 7 > ^ 8 > ^ -1 > of getRobots()) { +1 >] of getRobots()) { > 2 > console 3 > . @@ -568,12 +568,12 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts 2 > 3 > let [, nameA] 4 > -5 > [, nameA] +5 > nameA 1 >Emitted(22, 5) Source(27, 6) + SourceIndex(0) 2 >Emitted(22, 9) Source(27, 6) + SourceIndex(0) 3 >Emitted(22, 20) Source(27, 19) + SourceIndex(0) -4 >Emitted(22, 22) Source(27, 10) + SourceIndex(0) -5 >Emitted(22, 35) Source(27, 19) + SourceIndex(0) +4 >Emitted(22, 22) Source(27, 13) + SourceIndex(0) +5 >Emitted(22, 35) Source(27, 18) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -584,7 +584,7 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts 6 > ^^^^^ 7 > ^ 8 > ^ -1 > of [robotA, robotB]) { +1 >] of [robotA, robotB]) { > 2 > console 3 > . diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.js.map index fe1498a5876..db7b7d0b88f 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringParametertArrayBindingPattern.js.map] -{"version":3,"file":"sourceMapValidationDestructuringParametertArrayBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringParametertArrayBindingPattern.ts"],"names":[],"mappings":"AAIA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAE3C,cAAc,EAAgB;QAAhB,aAAgB;IAC1B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AAED,cAAc,EAAgB;QAAhB,eAAgB;IAC1B,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC;AAED,cAAc,EAAkC;QAAjC,gBAAQ,EAAE,cAAM,EAAE,eAAO;IACpC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,cAAc,EAAgC;QAA/B,gBAAQ,EAAE,wBAAa;IAClC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AAC5B,CAAC;AAED,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AAEjC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AAEjC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AAEjC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringParametertArrayBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringParametertArrayBindingPattern.ts"],"names":[],"mappings":"AAIA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAE3C,cAAc,EAAgB;QAAb,aAAK;IAClB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AAED,cAAc,EAAgB;QAAhB,eAAgB;IAC1B,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC;AAED,cAAc,EAAkC;QAAjC,gBAAQ,EAAE,cAAM,EAAE,eAAO;IACpC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,cAAc,EAAgC;QAA/B,gBAAQ,EAAE,wBAAa;IAClC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AAC5B,CAAC;AAED,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AAEjC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AAEjC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AAEjC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.sourcemap.txt index 345f8488718..df90ae6abb4 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.sourcemap.txt @@ -69,9 +69,9 @@ sourceFile:sourceMapValidationDestructuringParametertArrayBindingPattern.ts 2 > ^^^^^^^^^^^^^ 3 > ^^^-> 1-> -2 > [, nameA]: Robot -1->Emitted(3, 9) Source(7, 15) + SourceIndex(0) -2 >Emitted(3, 22) Source(7, 31) + SourceIndex(0) +2 > nameA +1->Emitted(3, 9) Source(7, 18) + SourceIndex(0) +2 >Emitted(3, 22) Source(7, 23) + SourceIndex(0) --- >>> console.log(nameA); 1->^^^^ @@ -82,7 +82,7 @@ sourceFile:sourceMapValidationDestructuringParametertArrayBindingPattern.ts 6 > ^^^^^ 7 > ^ 8 > ^ -1->) { +1->]: Robot) { > 2 > console 3 > . diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.js.map index aa8ada6f3ba..a8a5715add1 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringParametertArrayBindingPattern2.js.map] -{"version":3,"file":"sourceMapValidationDestructuringParametertArrayBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringParametertArrayBindingPattern2.ts"],"names":[],"mappings":"AAIA,IAAI,MAAM,GAAU,CAAC,SAAS,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;AAExD,cAAc,EAAiB;QAAjB,cAAiB;IAC3B,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,cAAc,EAAe;QAAf,cAAe;IACzB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,cAAc,EAAiD;QAAhD,cAAM,EAAE,UAAgC,EAA/B,qBAAa,EAAE,uBAAe;IAClD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,cAAc,EAA2B;QAA3B,6BAA2B;IACrC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC;AAED,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAExC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAExC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAExC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringParametertArrayBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringParametertArrayBindingPattern2.ts"],"names":[],"mappings":"AAIA,IAAI,MAAM,GAAU,CAAC,SAAS,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;AAExD,cAAc,EAAiB;QAAd,cAAM;IACnB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,cAAc,EAAe;QAAf,cAAe;IACzB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,cAAc,EAAiD;QAAhD,cAAM,EAAE,UAAgC,EAA/B,qBAAa,EAAE,uBAAe;IAClD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,cAAc,EAA2B;QAA3B,6BAA2B;IACrC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC;AAED,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAExC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAExC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAExC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.sourcemap.txt index e20536be8e9..eb37cd692b3 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.sourcemap.txt @@ -75,9 +75,9 @@ sourceFile:sourceMapValidationDestructuringParametertArrayBindingPattern2.ts 2 > ^^^^^^^^^^^^^^ 3 > ^^^-> 1-> -2 > [, skillA]: Robot -1->Emitted(3, 9) Source(7, 15) + SourceIndex(0) -2 >Emitted(3, 23) Source(7, 32) + SourceIndex(0) +2 > skillA +1->Emitted(3, 9) Source(7, 18) + SourceIndex(0) +2 >Emitted(3, 23) Source(7, 24) + SourceIndex(0) --- >>> console.log(skillA); 1->^^^^ @@ -88,7 +88,7 @@ sourceFile:sourceMapValidationDestructuringParametertArrayBindingPattern2.ts 6 > ^^^^^^ 7 > ^ 8 > ^ -1->) { +1->]: Robot) { > 2 > console 3 > . diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js.map index 5047017e525..231f7fa8435 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;AAG/C,IAAI,iBAAkB,CAAC;AACvB,IAAI,mBAAkB,CAAC;AACvB,IAAK,oBAAQ,EAAE,kBAAM,EAAE,mBAAO,CAAW;AAEzC,IAAI,6CAA4C,CAAC;AACjD,IAAI,oCAA0D,EAAzD,eAAO,EAAE,aAAK,EAAE,cAAM,CAAoC;AAE/D,IAAK,oBAAQ,EAAE,4BAAa,CAAW;AAEvC,EAAE,CAAC,CAAC,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC;IAClB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC"} \ 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;AAG/C,IAAO,iBAAK,CAAW;AACvB,IAAI,mBAAkB,CAAC;AACvB,IAAK,oBAAQ,EAAE,kBAAM,EAAE,mBAAO,CAAW;AAEzC,IAAI,6CAA4C,CAAC;AACjD,IAAI,oCAA0D,EAAzD,eAAO,EAAE,aAAK,EAAE,cAAM,CAAoC;AAE/D,IAAK,oBAAQ,EAAE,4BAAa,CAAW;AAEvC,EAAE,CAAC,CAAC,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC;IAClB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt index da4f258ea9b..c1fd17ad142 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt @@ -100,12 +100,12 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern. > > > -2 >let -3 > [, nameA] = robotA -4 > ; +2 >let [, +3 > nameA +4 > ] = robotA; 1 >Emitted(3, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(9, 5) + SourceIndex(0) -3 >Emitted(3, 22) Source(9, 23) + SourceIndex(0) +2 >Emitted(3, 5) Source(9, 8) + SourceIndex(0) +3 >Emitted(3, 22) Source(9, 13) + SourceIndex(0) 4 >Emitted(3, 23) Source(9, 24) + SourceIndex(0) --- >>>var numberB = robotB[0]; diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js.map index 3ed458e21b0..53b2c81b9be 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;AAEzE,IAAI,uBAAwB,CAAC;AAC7B,IAAI,uBAAsB,CAAC;AAC3B,IAAK,uBAAM,EAAE,mBAAgC,EAA/B,qBAAa,EAAE,uBAAe,CAAiB;AAE7D,IAAI,6CAA4C,CAAC;AACjD,IAAI,sCAA+E,EAA9E,eAAO,EAAE,UAAgC,EAA/B,qBAAa,EAAE,uBAAe,CAAuC;AAEpF,IAAI,sCAAkC,CAAC;AAEvC,EAAE,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC,CAAC;IACnB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvC,CAAC"} \ 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;AAEzE,IAAO,uBAAM,CAAgB;AAC7B,IAAI,uBAAsB,CAAC;AAC3B,IAAK,uBAAM,EAAE,mBAAgC,EAA/B,qBAAa,EAAE,uBAAe,CAAiB;AAE7D,IAAI,6CAA4C,CAAC;AACjD,IAAI,sCAA+E,EAA9E,eAAO,EAAE,UAAgC,EAA/B,qBAAa,EAAE,uBAAe,CAAuC;AAEpF,IAAI,sCAAkC,CAAC;AAEvC,EAAE,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC,CAAC;IACnB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt index 8e61c11ef3f..ad79567ea63 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt @@ -111,12 +111,12 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern2 1 > > > -2 >let -3 > [, skillA] = multiRobotA -4 > ; +2 >let [, +3 > skillA +4 > ] = multiRobotA; 1 >Emitted(3, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(8, 5) + SourceIndex(0) -3 >Emitted(3, 28) Source(8, 29) + SourceIndex(0) +2 >Emitted(3, 5) Source(8, 8) + SourceIndex(0) +3 >Emitted(3, 28) Source(8, 14) + SourceIndex(0) 4 >Emitted(3, 29) Source(8, 30) + SourceIndex(0) --- >>>var nameMB = multiRobotB[0]; From e67574446a56bbf5ceb8a3fd8f416ad8ca0c2907 Mon Sep 17 00:00:00 2001 From: Zhengbo Li Date: Wed, 9 Dec 2015 16:21:04 -0800 Subject: [PATCH 039/209] Fix too many watcher instances issue --- src/compiler/sys.ts | 59 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 50 insertions(+), 9 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index cd7580119b5..5482e549ebf 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -24,7 +24,7 @@ namespace ts { interface WatchedFile { fileName: string; callback: (fileName: string, removed?: boolean) => void; - mtime: Date; + mtime?: Date; } export interface FileWatcher { @@ -218,7 +218,7 @@ namespace ts { // average async stat takes about 30 microseconds // set chunk size to do 30 files in < 1 millisecond - function createWatchedFileSet(interval = 2500, chunkSize = 30) { + function createPollingWatchedFileSet(interval = 2500, chunkSize = 30) { let watchedFiles: WatchedFile[] = []; let nextFileToCheck = 0; let watchTimer: any; @@ -293,6 +293,50 @@ namespace ts { removeFile: removeFile }; } + + function createWatchedFileSet() { + let watchedDirectories: { [path: string]: FileWatcher } = {}; + let watchedFiles: { [fileName: string]: (fileName: string, removed?: boolean) => void; } = {}; + + function addFile(fileName: string, callback: (fileName: string, removed?: boolean) => void): WatchedFile { + const file: WatchedFile = { fileName, callback }; + let watchedPaths = Object.keys(watchedDirectories); + // Try to find parent paths that are already watched. If found, don't add directory watchers + let watchedParentPaths = watchedPaths.filter(path => fileName.indexOf(path) === 0); + // If adding new watchers, try to find children paths that are already watched. If found, close them. + if (watchedParentPaths.length === 0) { + let pathToWatch = ts.getDirectoryPath(fileName); + for (let watchedPath in watchedDirectories) { + if (watchedPath.indexOf(pathToWatch) === 0) { + watchedDirectories[watchedPath].close(); + delete watchedDirectories[watchedPath]; + } + } + watchedDirectories[pathToWatch] = _fs.watch( + pathToWatch, + (eventName: string, relativeFileName: string) => fileEventHandler(eventName, ts.normalizePath(ts.combinePaths(pathToWatch, relativeFileName))) + ); + } + watchedFiles[fileName] = callback; + return { fileName, callback } + } + + function removeFile(file: WatchedFile) { + delete watchedFiles[file.fileName]; + } + + function fileEventHandler(eventName: string, fileName: string) { + if (watchedFiles[fileName]) { + let callback = watchedFiles[fileName]; + callback(fileName); + } + } + + return { + addFile: addFile, + removeFile: removeFile + } + } // REVIEW: for now this implementation uses polling. // The advantage of polling is that it works reliably @@ -307,6 +351,7 @@ namespace ts { // changes for large reference sets? If so, do we want // to increase the chunk size or decrease the interval // time dynamically to match the large reference set? + const pollingWatchedFileSet = createPollingWatchedFileSet(); const watchedFileSet = createWatchedFileSet(); function isNode4OrLater(): Boolean { @@ -411,14 +456,10 @@ namespace ts { // and is more efficient than `fs.watchFile` (ref: https://github.com/nodejs/node/pull/2649 // and https://github.com/Microsoft/TypeScript/issues/4643), therefore // if the current node.js version is newer than 4, use `fs.watch` instead. - if (isNode4OrLater()) { - // Note: in node the callback of fs.watch is given only the relative file name as a parameter - return _fs.watch(fileName, (eventName: string, relativeFileName: string) => callback(fileName)); - } - - const watchedFile = watchedFileSet.addFile(fileName, callback); + let fileSet = isNode4OrLater() ? watchedFileSet : pollingWatchedFileSet; + const watchedFile = fileSet.addFile(fileName, callback); return { - close: () => watchedFileSet.removeFile(watchedFile) + close: () => fileSet.removeFile(watchedFile) }; }, watchDirectory: (path, callback, recursive) => { From 03c8d2f29325469993a2a53b2c971d01d06ab31b Mon Sep 17 00:00:00 2001 From: Yui T Date: Thu, 10 Dec 2015 11:42:20 -0800 Subject: [PATCH 040/209] Rename parameter --- src/compiler/checker.ts | 4 ++-- src/compiler/types.ts | 2 +- src/services/services.ts | 14 ++++++++------ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index f02520b24fd..6077e76ed04 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -14576,7 +14576,7 @@ namespace ts { return false; } - function getSymbolsInScope(location: Node, meaning: SymbolFlags, includeAllGlobalSymbols: boolean): Symbol[] { + function getSymbolsInScope(location: Node, meaning: SymbolFlags, includeGlobalSymbols: boolean): Symbol[] { const symbols: SymbolTable = {}; let memberFlags: NodeFlags = 0; @@ -14639,7 +14639,7 @@ namespace ts { location = location.parent; } - if (includeAllGlobalSymbols) { + if (includeGlobalSymbols) { copySymbols(globals, meaning); } } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index eb93ceee093..9cec9dda241 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1717,7 +1717,7 @@ namespace ts { getBaseTypes(type: InterfaceType): ObjectType[]; getReturnTypeOfSignature(signature: Signature): Type; - getSymbolsInScope(location: Node, meaning: SymbolFlags, includeAllGlobalSymbols: boolean): Symbol[]; + getSymbolsInScope(location: Node, meaning: SymbolFlags, includeGlobalSymbols: boolean): Symbol[]; getSymbolAtLocation(node: Node): Symbol; getShorthandAssignmentValueSymbol(location: Node): Symbol; getTypeAtLocation(node: Node): Type; diff --git a/src/services/services.ts b/src/services/services.ts index 7e12a521a4d..552af68ce40 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -3114,9 +3114,11 @@ namespace ts { } else if (isRightOfOpenTag) { let tagSymbols = typeChecker.getJsxIntrinsicTagNames(); - // If the currect cursor is inside JSX opening tag, the only meaningful completions are those of JSX.IntrinsicElements or users defined React.Component - // If the services can't find those symbols, then show nothing instead of including all the global symbols in the completion list. - if (tryGetGlobalSymbols(/*includeAllGlobalSymbols*/false)) { + // In this case, we are handling completion list inside JSX opening tag. For example: + // !!(s.flags & SymbolFlags.Value))); } else { @@ -3140,7 +3142,7 @@ namespace ts { // For JavaScript or TypeScript, if we're not after a dot, then just try to get the // global symbols in scope. These results should be valid for either language as // the set of symbols that can be referenced from this location. - if (!tryGetGlobalSymbols(/*includeAllGlobalSymbols*/true)) { + if (!tryGetGlobalSymbols(/*includeGlobalSymbols*/ true)) { return undefined; } } @@ -3200,7 +3202,7 @@ namespace ts { } } - function tryGetGlobalSymbols(includeAllGlobalSymbols: boolean): boolean { + function tryGetGlobalSymbols(includeGlobalSymbols: boolean): boolean { let objectLikeContainer: ObjectLiteralExpression | BindingPattern; let namedImportsOrExports: NamedImportsOrExports; let jsxContainer: JsxOpeningLikeElement; @@ -3271,7 +3273,7 @@ namespace ts { /// TODO filter meaning based on the current context let symbolMeanings = SymbolFlags.Type | SymbolFlags.Value | SymbolFlags.Namespace | SymbolFlags.Alias; - symbols = typeChecker.getSymbolsInScope(scopeNode, symbolMeanings, includeAllGlobalSymbols); + symbols = typeChecker.getSymbolsInScope(scopeNode, symbolMeanings, includeGlobalSymbols); return true; } From 8948f9be50e703667c0d9b4a6bdcabc1ad46b356 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 10 Dec 2015 12:29:14 -0800 Subject: [PATCH 041/209] Add support for modifying last encoded source map's source location With this, we can just highlight the bindingElement when the temp variable for it is assigned. Note there are few scenarios like below which would still highlight let part but thats because of how default value source mapping is currently which is next in pipeline to support binding element with default values for (let {name: nameA, skill: skillA } of robots) { console.log(nameA); } or for (let [numberA2, nameA2, skillA2] of robots) { console.log(nameA2); } --- src/compiler/emitter.ts | 60 +- src/compiler/sourcemap.ts | 74 +- ...DestructuringForArrayBindingPattern.js.map | 2 +- ...turingForArrayBindingPattern.sourcemap.txt | 2664 ++++++++--------- ...estructuringForObjectBindingPattern.js.map | 2 +- ...uringForObjectBindingPattern.sourcemap.txt | 1394 ++++----- ...structuringForObjectBindingPattern2.js.map | 2 +- ...ringForObjectBindingPattern2.sourcemap.txt | 112 +- ...structuringForOfArrayBindingPattern.js.map | 2 +- ...ringForOfArrayBindingPattern.sourcemap.txt | 720 ++--- ...tructuringForOfObjectBindingPattern.js.map | 2 +- ...ingForOfObjectBindingPattern.sourcemap.txt | 414 ++- ...ructuringForOfObjectBindingPattern2.js.map | 2 +- ...ngForOfObjectBindingPattern2.sourcemap.txt | 108 +- ...ParameterNestedObjectBindingPattern.js.map | 2 +- ...erNestedObjectBindingPattern.sourcemap.txt | 20 +- ...turingParameterObjectBindingPattern.js.map | 2 +- ...arameterObjectBindingPattern.sourcemap.txt | 16 +- ...turingParametertArrayBindingPattern.js.map | 2 +- ...arametertArrayBindingPattern.sourcemap.txt | 8 +- ...uringParametertArrayBindingPattern2.js.map | 2 +- ...rametertArrayBindingPattern2.sourcemap.txt | 16 +- ...ationDestructuringVariableStatement.js.map | 2 +- ...structuringVariableStatement.sourcemap.txt | 97 +- ...ariableStatementArrayBindingPattern.js.map | 2 +- ...StatementArrayBindingPattern.sourcemap.txt | 192 +- ...riableStatementArrayBindingPattern2.js.map | 2 +- ...tatementArrayBindingPattern2.sourcemap.txt | 204 +- ...StatementNestedObjectBindingPattern.js.map | 2 +- ...ntNestedObjectBindingPattern.sourcemap.txt | 169 +- 30 files changed, 2980 insertions(+), 3316 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index a707c669b5f..b2470a3d584 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -2802,7 +2802,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi * Returns false if nothing was written - this can happen for source file level variable declarations * in system modules where such variable declarations are hoisted. */ - function tryEmitStartOfVariableDeclarationList(decl: VariableDeclarationList, startPos?: number): boolean { + function tryEmitStartOfVariableDeclarationList(decl: VariableDeclarationList): boolean { if (shouldHoistVariable(decl, /*checkIfSourceFileLevelDecl*/ true)) { // variables in variable declaration list were already hoisted return false; @@ -2817,34 +2817,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi return false; } - let tokenKind = SyntaxKind.VarKeyword; + emitStart(decl); if (decl && languageVersion >= ScriptTarget.ES6) { if (isLet(decl)) { - tokenKind = SyntaxKind.LetKeyword; + write("let "); } else if (isConst(decl)) { - tokenKind = SyntaxKind.ConstKeyword; + write("const "); + } + else { + write("var "); } - } - - if (startPos !== undefined) { - emitToken(tokenKind, startPos); - write(" "); } else { - switch (tokenKind) { - case SyntaxKind.VarKeyword: - write("var "); - break; - case SyntaxKind.LetKeyword: - write("let "); - break; - case SyntaxKind.ConstKeyword: - write("const "); - break; - } + write("var "); } - return true; } @@ -3183,7 +3170,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi endPos = emitToken(SyntaxKind.OpenParenToken, endPos); if (node.initializer && node.initializer.kind === SyntaxKind.VariableDeclarationList) { const variableDeclarationList = node.initializer; - const startIsEmitted = tryEmitStartOfVariableDeclarationList(variableDeclarationList, endPos); + const startIsEmitted = tryEmitStartOfVariableDeclarationList(variableDeclarationList); if (startIsEmitted) { emitCommaList(variableDeclarationList.declarations); } @@ -3224,7 +3211,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi if (node.initializer.kind === SyntaxKind.VariableDeclarationList) { const variableDeclarationList = node.initializer; if (variableDeclarationList.declarations.length >= 1) { - tryEmitStartOfVariableDeclarationList(variableDeclarationList, endPos); + tryEmitStartOfVariableDeclarationList(variableDeclarationList); emit(variableDeclarationList.declarations[0]); } } @@ -3801,6 +3788,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } else { Debug.assert(!isAssignmentExpressionStatement); + // If first variable declaration of variable statement correct the start location + if (root.kind === SyntaxKind.VariableDeclaration && + root.parent.kind === SyntaxKind.VariableDeclarationList && + (root.parent).declarations[0] === root) { + // Use emit location of "var " as next emit start entry + sourceMap.changeEmitSourcePos(); + } emitBindingElement(root, value); } @@ -3852,7 +3846,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi return node; } - function createPropertyAccessForDestructuringProperty(object: Expression, propName: PropertyName): Expression { + function createPropertyAccessForDestructuringProperty(object: Expression, propName: PropertyName, sourceMapNode: Node): Expression { let index: Expression; const nameIsComputed = propName.kind === SyntaxKind.ComputedPropertyName; if (nameIsComputed) { @@ -3861,7 +3855,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi else { // We create a synthetic copy of the identifier in order to avoid the rewriting that might // otherwise occur when the identifier is emitted. - index = createSourceMappedSynthesizedNode(propName.kind, propName); + index = createSourceMappedSynthesizedNode(propName.kind, sourceMapNode); (index).text = (propName).text; } @@ -3891,7 +3885,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi if (p.kind === SyntaxKind.PropertyAssignment || p.kind === SyntaxKind.ShorthandPropertyAssignment) { const propName = (p).name; const target = p.kind === SyntaxKind.ShorthandPropertyAssignment ? p : (p).initializer || propName; - emitDestructuringAssignment(target, createPropertyAccessForDestructuringProperty(value, propName), properties.length === 1 ? sourceMapNode : p); + emitDestructuringAssignment(target, createPropertyAccessForDestructuringProperty(value, propName, target), properties.length === 1 ? sourceMapNode : p); } } } @@ -3991,7 +3985,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi if (pattern.kind === SyntaxKind.ObjectBindingPattern) { // Rewrite element to a declaration with an initializer that fetches property const propName = element.propertyName || element.name; - emitBindingElement(element, createPropertyAccessForDestructuringProperty(value, propName)); + emitBindingElement(element, createPropertyAccessForDestructuringProperty(value, propName, element)); } else if (element.kind !== SyntaxKind.OmittedExpression) { if (!element.dotDotDotToken) { @@ -4005,17 +3999,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } } else { - let nodeForSourceMap: Node; - // If binding element is part of binding pattern with single element, use binding pattern - if (target.kind === SyntaxKind.BindingElement && (target.parent).elements.length === 1) { - nodeForSourceMap = (target.parent.parent.kind === SyntaxKind.VariableDeclaration || target.parent.parent.kind === SyntaxKind.Parameter) ? - target.parent.parent : // Set sourcemap as whole variable declaration - target.parent; // Only binding Pattern - } - else { - nodeForSourceMap = target; // Binding Element - } - emitAssignment(target.name, value, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0, nodeForSourceMap); + emitAssignment(target.name, value, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0, target); emitCount++; } } diff --git a/src/compiler/sourcemap.ts b/src/compiler/sourcemap.ts index 680c48cfaa4..501b1aa476a 100644 --- a/src/compiler/sourcemap.ts +++ b/src/compiler/sourcemap.ts @@ -8,6 +8,7 @@ namespace ts { emitPos(pos: number): void; emitStart(range: TextRange): void; emitEnd(range: TextRange, stopOverridingSpan?: boolean): void; + changeEmitSourcePos(): void; getText(): string; getSourceMappingURL(): string; initialize(filePath: string, sourceMapFilePath: string, sourceFiles: SourceFile[], isBundledEmit: boolean): void; @@ -25,6 +26,7 @@ namespace ts { emitStart(range: TextRange): void { }, emitEnd(range: TextRange, stopOverridingSpan?: boolean): void { }, emitPos(pos: number): void { }, + changeEmitSourcePos(): void { }, getText(): string { return undefined; }, getSourceMappingURL(): string { return undefined; }, initialize(filePath: string, sourceMapFilePath: string, sourceFiles: SourceFile[], isBundledEmit: boolean): void { }, @@ -40,6 +42,7 @@ namespace ts { let currentSourceFile: SourceFile; let sourceMapDir: string; // The directory in which sourcemap will be let stopOverridingSpan = false; + let modifyLastSourcePos = false; // Current source map file and its index in the sources list let sourceMapSourceIndex: number; @@ -58,6 +61,7 @@ namespace ts { emitPos, emitStart, emitEnd, + changeEmitSourcePos, getText, getSourceMappingURL, initialize, @@ -144,6 +148,45 @@ namespace ts { sourceMapData = undefined; } + function updateLastEncodedAndRecordedSpans() { + if (modifyLastSourcePos) { + // Reset the source pos + modifyLastSourcePos = false; + + // Change Last recorded Map with last encoded emit line and character + lastRecordedSourceMapSpan.emittedLine = lastEncodedSourceMapSpan.emittedLine; + lastRecordedSourceMapSpan.emittedColumn = lastEncodedSourceMapSpan.emittedColumn; + + // Pop sourceMapDecodedMappings to remove last entry + sourceMapData.sourceMapDecodedMappings.pop(); + + // Change the last encoded source map + lastEncodedSourceMapSpan = sourceMapData.sourceMapDecodedMappings.length ? + sourceMapData.sourceMapDecodedMappings[sourceMapData.sourceMapDecodedMappings.length - 1] : + undefined; + + // TODO: Update lastEncodedNameIndex + // Since we dont support this any more, lets not worry about it right now. + // When we start supporting nameIndex, we will get back to this + + // Change the encoded source map + const sourceMapMappings = sourceMapData.sourceMapMappings; + let lenthToSet = sourceMapMappings.length - 1; + for (; lenthToSet >= 0; lenthToSet--) { + const currentChar = sourceMapMappings.charAt(lenthToSet); + if (currentChar === ",") { + // Separator for the entry found + break; + } + if (currentChar === ";" && lenthToSet !== 0 && sourceMapMappings.charAt(lenthToSet - 1) !== ";") { + // Last line separator found + break; + } + } + sourceMapData.sourceMapMappings = sourceMapMappings.substr(0, Math.max(0, lenthToSet)); + } + } + // Encoding for sourcemap span function encodeLastRecordedSourceMapSpan() { if (!lastRecordedSourceMapSpan || lastRecordedSourceMapSpan === lastEncodedSourceMapSpan) { @@ -180,6 +223,7 @@ namespace ts { // 5. Relative namePosition 0 based if (lastRecordedSourceMapSpan.nameIndex >= 0) { + Debug.assert(false, "We do not support name index right now, Make sure to update updateLastEncodedAndRecordedSpans when we start using this"); sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.nameIndex - lastEncodedNameIndex); lastEncodedNameIndex = lastRecordedSourceMapSpan.nameIndex; } @@ -188,17 +232,20 @@ namespace ts { sourceMapData.sourceMapDecodedMappings.push(lastEncodedSourceMapSpan); } + function getSourceLinePos(pos: number) { + const sourceLinePos = getLineAndCharacterOfPosition(currentSourceFile, pos); + // Convert the location to be one-based. + sourceLinePos.line++; + sourceLinePos.character++; + return sourceLinePos; + } + function emitPos(pos: number) { if (pos === -1) { return; } - const sourceLinePos = getLineAndCharacterOfPosition(currentSourceFile, pos); - - // Convert the location to be one-based. - sourceLinePos.line++; - sourceLinePos.character++; - + const sourceLinePos = getSourceLinePos(pos); const emittedLine = writer.getLine(); const emittedColumn = writer.getColumn(); @@ -230,6 +277,8 @@ namespace ts { lastRecordedSourceMapSpan.sourceColumn = sourceLinePos.character; lastRecordedSourceMapSpan.sourceIndex = sourceMapSourceIndex; } + + updateLastEncodedAndRecordedSpans(); } function getSourceMapRange(range: TextRange) { @@ -239,10 +288,14 @@ namespace ts { return range; } - function emitStart(range: TextRange) { + function getStartPos(range: TextRange) { range = getSourceMapRange(range); const rangeHasDecorators = !!(range as Node).decorators; - emitPos(range.pos !== -1 ? skipTrivia(currentSourceFile.text, rangeHasDecorators ? (range as Node).decorators.end : range.pos) : -1); + return range.pos !== -1 ? skipTrivia(currentSourceFile.text, rangeHasDecorators ? (range as Node).decorators.end : range.pos) : -1; + } + + function emitStart(range: TextRange) { + emitPos(getStartPos(range)); } function emitEnd(range: TextRange, stopOverridingEnd?: boolean) { @@ -251,6 +304,11 @@ namespace ts { stopOverridingSpan = stopOverridingEnd; } + function changeEmitSourcePos() { + Debug.assert(!modifyLastSourcePos); + modifyLastSourcePos = true; + } + function setSourceFile(sourceFile: SourceFile) { currentSourceFile = sourceFile; diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.js.map index e15c5de5eec..971f5106983 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringForArrayBindingPattern.js.map] -{"version":3,"file":"sourceMapValidationDestructuringForArrayBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForArrayBindingPattern.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED,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;AACzE;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,GAAG,CAAC,CAAC,GAAG,CAAI,iBAAK,EAAY,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC7C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,eAAsB,EAAnB,aAAK,EAAgB,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,+BAAsC,EAAnC,aAAK,EAAgC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAA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CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,sCAAkC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC7D,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,0CAAsC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjE,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,8DAA0D,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACrF,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringForArrayBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForArrayBindingPattern.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED,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;AACzE;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,GAAG,CAAC,CAAQ,qBAAK,EAAY,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC7C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD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C,CAAK,mCAAsD,EAArD,gBAAQ,EAAE,wBAAa,EAAgC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjF,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAM,0CAAkB,EAAiB,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC7D,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC;AACD,GAAG,CAAC,CAAM,8CAAkB,EAAqB,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjE,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC;AACD,GAAG,CAAC,CAAM,kEAAkB,EAAyC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACrF,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.sourcemap.txt index cdb595801e2..2a9497d3ad2 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.sourcemap.txt @@ -219,64 +219,58 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^ -10> ^^^ -11> ^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^ -19> ^^ -20> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^ +8 > ^^^ +9 > ^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^ +17> ^^ +18> ^ 1-> > > 2 >for 3 > -4 > ( -5 > let -6 > [, -7 > nameA -8 > ] = robotA, -9 > i -10> = -11> 0 -12> ; -13> i -14> < -15> 1 -16> ; -17> i -18> ++ -19> ) -20> { +4 > (let [, +5 > nameA +6 > ] = robotA, +7 > i +8 > = +9 > 0 +10> ; +11> i +12> < +13> 1 +14> ; +15> i +16> ++ +17> ) +18> { 1->Emitted(10, 1) Source(18, 1) + SourceIndex(0) 2 >Emitted(10, 4) Source(18, 4) + SourceIndex(0) 3 >Emitted(10, 5) Source(18, 5) + SourceIndex(0) -4 >Emitted(10, 6) Source(18, 6) + SourceIndex(0) -5 >Emitted(10, 9) Source(18, 9) + SourceIndex(0) -6 >Emitted(10, 10) Source(18, 13) + SourceIndex(0) -7 >Emitted(10, 27) Source(18, 18) + SourceIndex(0) -8 >Emitted(10, 29) Source(18, 30) + SourceIndex(0) -9 >Emitted(10, 30) Source(18, 31) + SourceIndex(0) -10>Emitted(10, 33) Source(18, 34) + SourceIndex(0) -11>Emitted(10, 34) Source(18, 35) + SourceIndex(0) -12>Emitted(10, 36) Source(18, 37) + SourceIndex(0) -13>Emitted(10, 37) Source(18, 38) + SourceIndex(0) -14>Emitted(10, 40) Source(18, 41) + SourceIndex(0) -15>Emitted(10, 41) Source(18, 42) + SourceIndex(0) -16>Emitted(10, 43) Source(18, 44) + SourceIndex(0) -17>Emitted(10, 44) Source(18, 45) + SourceIndex(0) -18>Emitted(10, 46) Source(18, 47) + SourceIndex(0) -19>Emitted(10, 48) Source(18, 49) + SourceIndex(0) -20>Emitted(10, 49) Source(18, 50) + SourceIndex(0) +4 >Emitted(10, 6) Source(18, 13) + SourceIndex(0) +5 >Emitted(10, 27) Source(18, 18) + SourceIndex(0) +6 >Emitted(10, 29) Source(18, 30) + SourceIndex(0) +7 >Emitted(10, 30) Source(18, 31) + SourceIndex(0) +8 >Emitted(10, 33) Source(18, 34) + SourceIndex(0) +9 >Emitted(10, 34) Source(18, 35) + SourceIndex(0) +10>Emitted(10, 36) Source(18, 37) + SourceIndex(0) +11>Emitted(10, 37) Source(18, 38) + SourceIndex(0) +12>Emitted(10, 40) Source(18, 41) + SourceIndex(0) +13>Emitted(10, 41) Source(18, 42) + SourceIndex(0) +14>Emitted(10, 43) Source(18, 44) + SourceIndex(0) +15>Emitted(10, 44) Source(18, 45) + SourceIndex(0) +16>Emitted(10, 46) Source(18, 47) + SourceIndex(0) +17>Emitted(10, 48) Source(18, 49) + SourceIndex(0) +18>Emitted(10, 49) Source(18, 50) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -320,69 +314,63 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^ -10> ^^ -11> ^ -12> ^^^ -13> ^ -14> ^^ -15> ^ -16> ^^^ -17> ^ -18> ^^ -19> ^ -20> ^^ -21> ^^ -22> ^ +5 > ^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > -7 > [, nameA] = getRobot() -8 > -9 > nameA -10> ] = getRobot(), -11> i -12> = -13> 0 -14> ; -15> i -16> < -17> 1 -18> ; -19> i -20> ++ -21> ) -22> { +4 > (let +5 > [, nameA] = getRobot() +6 > +7 > nameA +8 > ] = getRobot(), +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { 1->Emitted(13, 1) Source(21, 1) + SourceIndex(0) 2 >Emitted(13, 4) Source(21, 4) + SourceIndex(0) 3 >Emitted(13, 5) Source(21, 5) + SourceIndex(0) -4 >Emitted(13, 6) Source(21, 6) + SourceIndex(0) -5 >Emitted(13, 9) Source(21, 9) + SourceIndex(0) -6 >Emitted(13, 10) Source(21, 10) + SourceIndex(0) -7 >Emitted(13, 25) Source(21, 32) + SourceIndex(0) -8 >Emitted(13, 27) Source(21, 13) + SourceIndex(0) -9 >Emitted(13, 40) Source(21, 18) + SourceIndex(0) -10>Emitted(13, 42) Source(21, 34) + SourceIndex(0) -11>Emitted(13, 43) Source(21, 35) + SourceIndex(0) -12>Emitted(13, 46) Source(21, 38) + SourceIndex(0) -13>Emitted(13, 47) Source(21, 39) + SourceIndex(0) -14>Emitted(13, 49) Source(21, 41) + SourceIndex(0) -15>Emitted(13, 50) Source(21, 42) + SourceIndex(0) -16>Emitted(13, 53) Source(21, 45) + SourceIndex(0) -17>Emitted(13, 54) Source(21, 46) + SourceIndex(0) -18>Emitted(13, 56) Source(21, 48) + SourceIndex(0) -19>Emitted(13, 57) Source(21, 49) + SourceIndex(0) -20>Emitted(13, 59) Source(21, 51) + SourceIndex(0) -21>Emitted(13, 61) Source(21, 53) + SourceIndex(0) -22>Emitted(13, 62) Source(21, 54) + SourceIndex(0) +4 >Emitted(13, 6) Source(21, 10) + SourceIndex(0) +5 >Emitted(13, 25) Source(21, 32) + SourceIndex(0) +6 >Emitted(13, 27) Source(21, 13) + SourceIndex(0) +7 >Emitted(13, 40) Source(21, 18) + SourceIndex(0) +8 >Emitted(13, 42) Source(21, 34) + SourceIndex(0) +9 >Emitted(13, 43) Source(21, 35) + SourceIndex(0) +10>Emitted(13, 46) Source(21, 38) + SourceIndex(0) +11>Emitted(13, 47) Source(21, 39) + SourceIndex(0) +12>Emitted(13, 49) Source(21, 41) + SourceIndex(0) +13>Emitted(13, 50) Source(21, 42) + SourceIndex(0) +14>Emitted(13, 53) Source(21, 45) + SourceIndex(0) +15>Emitted(13, 54) Source(21, 46) + SourceIndex(0) +16>Emitted(13, 56) Source(21, 48) + SourceIndex(0) +17>Emitted(13, 57) Source(21, 49) + SourceIndex(0) +18>Emitted(13, 59) Source(21, 51) + SourceIndex(0) +19>Emitted(13, 61) Source(21, 53) + SourceIndex(0) +20>Emitted(13, 62) Source(21, 54) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -426,69 +414,63 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^ -10> ^^ -11> ^ -12> ^^^ -13> ^ -14> ^^ -15> ^ -16> ^^^ -17> ^ -18> ^^ -19> ^ -20> ^^ -21> ^^ -22> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > -7 > [, nameA] = [2, "trimmer", "trimming"] -8 > -9 > nameA -10> ] = [2, "trimmer", "trimming"], -11> i -12> = -13> 0 -14> ; -15> i -16> < -17> 1 -18> ; -19> i -20> ++ -21> ) -22> { +4 > (let +5 > [, nameA] = [2, "trimmer", "trimming"] +6 > +7 > nameA +8 > ] = [2, "trimmer", "trimming"], +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { 1->Emitted(16, 1) Source(24, 1) + SourceIndex(0) 2 >Emitted(16, 4) Source(24, 4) + SourceIndex(0) 3 >Emitted(16, 5) Source(24, 5) + SourceIndex(0) -4 >Emitted(16, 6) Source(24, 6) + SourceIndex(0) -5 >Emitted(16, 9) Source(24, 9) + SourceIndex(0) -6 >Emitted(16, 10) Source(24, 10) + SourceIndex(0) -7 >Emitted(16, 41) Source(24, 48) + SourceIndex(0) -8 >Emitted(16, 43) Source(24, 13) + SourceIndex(0) -9 >Emitted(16, 56) Source(24, 18) + SourceIndex(0) -10>Emitted(16, 58) Source(24, 50) + SourceIndex(0) -11>Emitted(16, 59) Source(24, 51) + SourceIndex(0) -12>Emitted(16, 62) Source(24, 54) + SourceIndex(0) -13>Emitted(16, 63) Source(24, 55) + SourceIndex(0) -14>Emitted(16, 65) Source(24, 57) + SourceIndex(0) -15>Emitted(16, 66) Source(24, 58) + SourceIndex(0) -16>Emitted(16, 69) Source(24, 61) + SourceIndex(0) -17>Emitted(16, 70) Source(24, 62) + SourceIndex(0) -18>Emitted(16, 72) Source(24, 64) + SourceIndex(0) -19>Emitted(16, 73) Source(24, 65) + SourceIndex(0) -20>Emitted(16, 75) Source(24, 67) + SourceIndex(0) -21>Emitted(16, 77) Source(24, 69) + SourceIndex(0) -22>Emitted(16, 78) Source(24, 70) + SourceIndex(0) +4 >Emitted(16, 6) Source(24, 10) + SourceIndex(0) +5 >Emitted(16, 41) Source(24, 48) + SourceIndex(0) +6 >Emitted(16, 43) Source(24, 13) + SourceIndex(0) +7 >Emitted(16, 56) Source(24, 18) + SourceIndex(0) +8 >Emitted(16, 58) Source(24, 50) + SourceIndex(0) +9 >Emitted(16, 59) Source(24, 51) + SourceIndex(0) +10>Emitted(16, 62) Source(24, 54) + SourceIndex(0) +11>Emitted(16, 63) Source(24, 55) + SourceIndex(0) +12>Emitted(16, 65) Source(24, 57) + SourceIndex(0) +13>Emitted(16, 66) Source(24, 58) + SourceIndex(0) +14>Emitted(16, 69) Source(24, 61) + SourceIndex(0) +15>Emitted(16, 70) Source(24, 62) + SourceIndex(0) +16>Emitted(16, 72) Source(24, 64) + SourceIndex(0) +17>Emitted(16, 73) Source(24, 65) + SourceIndex(0) +18>Emitted(16, 75) Source(24, 67) + SourceIndex(0) +19>Emitted(16, 77) Source(24, 69) + SourceIndex(0) +20>Emitted(16, 78) Source(24, 70) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -532,75 +514,69 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^^^^^^^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^^ -19> ^ -20> ^^ -21> ^ -22> ^^ -23> ^^ -24> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > [, -7 > [primarySkillA, secondarySkillA] -8 > -9 > primarySkillA -10> , -11> secondarySkillA -12> ]] = multiRobotA, -13> i -14> = -15> 0 -16> ; -17> i -18> < -19> 1 -20> ; -21> i -22> ++ -23> ) -24> { +4 > (let [, +5 > [primarySkillA, secondarySkillA] +6 > +7 > primarySkillA +8 > , +9 > secondarySkillA +10> ]] = multiRobotA, +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { 1->Emitted(19, 1) Source(27, 1) + SourceIndex(0) 2 >Emitted(19, 4) Source(27, 4) + SourceIndex(0) 3 >Emitted(19, 5) Source(27, 5) + SourceIndex(0) -4 >Emitted(19, 6) Source(27, 6) + SourceIndex(0) -5 >Emitted(19, 9) Source(27, 9) + SourceIndex(0) -6 >Emitted(19, 10) Source(27, 13) + SourceIndex(0) -7 >Emitted(19, 29) Source(27, 45) + SourceIndex(0) -8 >Emitted(19, 31) Source(27, 14) + SourceIndex(0) -9 >Emitted(19, 52) Source(27, 27) + SourceIndex(0) -10>Emitted(19, 54) Source(27, 29) + SourceIndex(0) -11>Emitted(19, 77) Source(27, 44) + SourceIndex(0) -12>Emitted(19, 79) Source(27, 62) + SourceIndex(0) -13>Emitted(19, 80) Source(27, 63) + SourceIndex(0) -14>Emitted(19, 83) Source(27, 66) + SourceIndex(0) -15>Emitted(19, 84) Source(27, 67) + SourceIndex(0) -16>Emitted(19, 86) Source(27, 69) + SourceIndex(0) -17>Emitted(19, 87) Source(27, 70) + SourceIndex(0) -18>Emitted(19, 90) Source(27, 73) + SourceIndex(0) -19>Emitted(19, 91) Source(27, 74) + SourceIndex(0) -20>Emitted(19, 93) Source(27, 76) + SourceIndex(0) -21>Emitted(19, 94) Source(27, 77) + SourceIndex(0) -22>Emitted(19, 96) Source(27, 79) + SourceIndex(0) -23>Emitted(19, 98) Source(27, 81) + SourceIndex(0) -24>Emitted(19, 99) Source(27, 82) + SourceIndex(0) +4 >Emitted(19, 6) Source(27, 13) + SourceIndex(0) +5 >Emitted(19, 29) Source(27, 45) + SourceIndex(0) +6 >Emitted(19, 31) Source(27, 14) + SourceIndex(0) +7 >Emitted(19, 52) Source(27, 27) + SourceIndex(0) +8 >Emitted(19, 54) Source(27, 29) + SourceIndex(0) +9 >Emitted(19, 77) Source(27, 44) + SourceIndex(0) +10>Emitted(19, 79) Source(27, 62) + SourceIndex(0) +11>Emitted(19, 80) Source(27, 63) + SourceIndex(0) +12>Emitted(19, 83) Source(27, 66) + SourceIndex(0) +13>Emitted(19, 84) Source(27, 67) + SourceIndex(0) +14>Emitted(19, 86) Source(27, 69) + SourceIndex(0) +15>Emitted(19, 87) Source(27, 70) + SourceIndex(0) +16>Emitted(19, 90) Source(27, 73) + SourceIndex(0) +17>Emitted(19, 91) Source(27, 74) + SourceIndex(0) +18>Emitted(19, 93) Source(27, 76) + SourceIndex(0) +19>Emitted(19, 94) Source(27, 77) + SourceIndex(0) +20>Emitted(19, 96) Source(27, 79) + SourceIndex(0) +21>Emitted(19, 98) Source(27, 81) + SourceIndex(0) +22>Emitted(19, 99) Source(27, 82) + SourceIndex(0) --- >>> console.log(primarySkillA); 1 >^^^^ @@ -644,81 +620,75 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^^^^^ -12> ^^ -13> ^^^^^^^^^^^^^^^^^^^^^^^ -14> ^^ -15> ^ -16> ^^^ -17> ^ -18> ^^ -19> ^ -20> ^^^ -21> ^ -22> ^^ -23> ^ -24> ^^ -25> ^^ -26> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > -7 > [, [primarySkillA, secondarySkillA]] = getMultiRobot() -8 > -9 > [primarySkillA, secondarySkillA] -10> -11> primarySkillA -12> , -13> secondarySkillA -14> ]] = getMultiRobot(), -15> i -16> = -17> 0 -18> ; -19> i -20> < -21> 1 -22> ; -23> i -24> ++ -25> ) -26> { +4 > (let +5 > [, [primarySkillA, secondarySkillA]] = getMultiRobot() +6 > +7 > [primarySkillA, secondarySkillA] +8 > +9 > primarySkillA +10> , +11> secondarySkillA +12> ]] = getMultiRobot(), +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { 1->Emitted(22, 1) Source(30, 1) + SourceIndex(0) 2 >Emitted(22, 4) Source(30, 4) + SourceIndex(0) 3 >Emitted(22, 5) Source(30, 5) + SourceIndex(0) -4 >Emitted(22, 6) Source(30, 6) + SourceIndex(0) -5 >Emitted(22, 9) Source(30, 9) + SourceIndex(0) -6 >Emitted(22, 10) Source(30, 10) + SourceIndex(0) -7 >Emitted(22, 30) Source(30, 64) + SourceIndex(0) -8 >Emitted(22, 32) Source(30, 13) + SourceIndex(0) -9 >Emitted(22, 42) Source(30, 45) + SourceIndex(0) -10>Emitted(22, 44) Source(30, 14) + SourceIndex(0) -11>Emitted(22, 65) Source(30, 27) + SourceIndex(0) -12>Emitted(22, 67) Source(30, 29) + SourceIndex(0) -13>Emitted(22, 90) Source(30, 44) + SourceIndex(0) -14>Emitted(22, 92) Source(30, 66) + SourceIndex(0) -15>Emitted(22, 93) Source(30, 67) + SourceIndex(0) -16>Emitted(22, 96) Source(30, 70) + SourceIndex(0) -17>Emitted(22, 97) Source(30, 71) + SourceIndex(0) -18>Emitted(22, 99) Source(30, 73) + SourceIndex(0) -19>Emitted(22, 100) Source(30, 74) + SourceIndex(0) -20>Emitted(22, 103) Source(30, 77) + SourceIndex(0) -21>Emitted(22, 104) Source(30, 78) + SourceIndex(0) -22>Emitted(22, 106) Source(30, 80) + SourceIndex(0) -23>Emitted(22, 107) Source(30, 81) + SourceIndex(0) -24>Emitted(22, 109) Source(30, 83) + SourceIndex(0) -25>Emitted(22, 111) Source(30, 85) + SourceIndex(0) -26>Emitted(22, 112) Source(30, 86) + SourceIndex(0) +4 >Emitted(22, 6) Source(30, 10) + SourceIndex(0) +5 >Emitted(22, 30) Source(30, 64) + SourceIndex(0) +6 >Emitted(22, 32) Source(30, 13) + SourceIndex(0) +7 >Emitted(22, 42) Source(30, 45) + SourceIndex(0) +8 >Emitted(22, 44) Source(30, 14) + SourceIndex(0) +9 >Emitted(22, 65) Source(30, 27) + SourceIndex(0) +10>Emitted(22, 67) Source(30, 29) + SourceIndex(0) +11>Emitted(22, 90) Source(30, 44) + SourceIndex(0) +12>Emitted(22, 92) Source(30, 66) + SourceIndex(0) +13>Emitted(22, 93) Source(30, 67) + SourceIndex(0) +14>Emitted(22, 96) Source(30, 70) + SourceIndex(0) +15>Emitted(22, 97) Source(30, 71) + SourceIndex(0) +16>Emitted(22, 99) Source(30, 73) + SourceIndex(0) +17>Emitted(22, 100) Source(30, 74) + SourceIndex(0) +18>Emitted(22, 103) Source(30, 77) + SourceIndex(0) +19>Emitted(22, 104) Source(30, 78) + SourceIndex(0) +20>Emitted(22, 106) Source(30, 80) + SourceIndex(0) +21>Emitted(22, 107) Source(30, 81) + SourceIndex(0) +22>Emitted(22, 109) Source(30, 83) + SourceIndex(0) +23>Emitted(22, 111) Source(30, 85) + SourceIndex(0) +24>Emitted(22, 112) Source(30, 86) + SourceIndex(0) --- >>> console.log(primarySkillA); 1 >^^^^ @@ -762,81 +732,75 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^^^^^ -12> ^^ -13> ^^^^^^^^^^^^^^^^^^^^^^^ -14> ^^ -15> ^ -16> ^^^ -17> ^ -18> ^^ -19> ^ -20> ^^^ -21> ^ -22> ^^ -23> ^ -24> ^^ -25> ^^ -26> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > -7 > [, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]] -8 > -9 > [primarySkillA, secondarySkillA] -10> -11> primarySkillA -12> , -13> secondarySkillA -14> ]] = ["trimmer", ["trimming", "edging"]], -15> i -16> = -17> 0 -18> ; -19> i -20> < -21> 1 -22> ; -23> i -24> ++ -25> ) -26> { +4 > (let +5 > [, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]] +6 > +7 > [primarySkillA, secondarySkillA] +8 > +9 > primarySkillA +10> , +11> secondarySkillA +12> ]] = ["trimmer", ["trimming", "edging"]], +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { 1->Emitted(25, 1) Source(33, 1) + SourceIndex(0) 2 >Emitted(25, 4) Source(33, 4) + SourceIndex(0) 3 >Emitted(25, 5) Source(33, 5) + SourceIndex(0) -4 >Emitted(25, 6) Source(33, 6) + SourceIndex(0) -5 >Emitted(25, 9) Source(33, 9) + SourceIndex(0) -6 >Emitted(25, 10) Source(33, 10) + SourceIndex(0) -7 >Emitted(25, 50) Source(33, 84) + SourceIndex(0) -8 >Emitted(25, 52) Source(33, 13) + SourceIndex(0) -9 >Emitted(25, 62) Source(33, 45) + SourceIndex(0) -10>Emitted(25, 64) Source(33, 14) + SourceIndex(0) -11>Emitted(25, 85) Source(33, 27) + SourceIndex(0) -12>Emitted(25, 87) Source(33, 29) + SourceIndex(0) -13>Emitted(25, 110) Source(33, 44) + SourceIndex(0) -14>Emitted(25, 112) Source(33, 86) + SourceIndex(0) -15>Emitted(25, 113) Source(33, 87) + SourceIndex(0) -16>Emitted(25, 116) Source(33, 90) + SourceIndex(0) -17>Emitted(25, 117) Source(33, 91) + SourceIndex(0) -18>Emitted(25, 119) Source(33, 93) + SourceIndex(0) -19>Emitted(25, 120) Source(33, 94) + SourceIndex(0) -20>Emitted(25, 123) Source(33, 97) + SourceIndex(0) -21>Emitted(25, 124) Source(33, 98) + SourceIndex(0) -22>Emitted(25, 126) Source(33, 100) + SourceIndex(0) -23>Emitted(25, 127) Source(33, 101) + SourceIndex(0) -24>Emitted(25, 129) Source(33, 103) + SourceIndex(0) -25>Emitted(25, 131) Source(33, 105) + SourceIndex(0) -26>Emitted(25, 132) Source(33, 106) + SourceIndex(0) +4 >Emitted(25, 6) Source(33, 10) + SourceIndex(0) +5 >Emitted(25, 50) Source(33, 84) + SourceIndex(0) +6 >Emitted(25, 52) Source(33, 13) + SourceIndex(0) +7 >Emitted(25, 62) Source(33, 45) + SourceIndex(0) +8 >Emitted(25, 64) Source(33, 14) + SourceIndex(0) +9 >Emitted(25, 85) Source(33, 27) + SourceIndex(0) +10>Emitted(25, 87) Source(33, 29) + SourceIndex(0) +11>Emitted(25, 110) Source(33, 44) + SourceIndex(0) +12>Emitted(25, 112) Source(33, 86) + SourceIndex(0) +13>Emitted(25, 113) Source(33, 87) + SourceIndex(0) +14>Emitted(25, 116) Source(33, 90) + SourceIndex(0) +15>Emitted(25, 117) Source(33, 91) + SourceIndex(0) +16>Emitted(25, 119) Source(33, 93) + SourceIndex(0) +17>Emitted(25, 120) Source(33, 94) + SourceIndex(0) +18>Emitted(25, 123) Source(33, 97) + SourceIndex(0) +19>Emitted(25, 124) Source(33, 98) + SourceIndex(0) +20>Emitted(25, 126) Source(33, 100) + SourceIndex(0) +21>Emitted(25, 127) Source(33, 101) + SourceIndex(0) +22>Emitted(25, 129) Source(33, 103) + SourceIndex(0) +23>Emitted(25, 131) Source(33, 105) + SourceIndex(0) +24>Emitted(25, 132) Source(33, 106) + SourceIndex(0) --- >>> console.log(primarySkillA); 1 >^^^^ @@ -880,64 +844,58 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^ -10> ^^^ -11> ^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^ -19> ^^ -20> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^ +8 > ^^^ +9 > ^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^ +17> ^^ +18> ^ 1-> > > 2 >for 3 > -4 > ( -5 > let -6 > -7 > [numberB] = robotA -8 > , -9 > i -10> = -11> 0 -12> ; -13> i -14> < -15> 1 -16> ; -17> i -18> ++ -19> ) -20> { +4 > (let [ +5 > numberB +6 > ] = robotA, +7 > i +8 > = +9 > 0 +10> ; +11> i +12> < +13> 1 +14> ; +15> i +16> ++ +17> ) +18> { 1->Emitted(28, 1) Source(37, 1) + SourceIndex(0) 2 >Emitted(28, 4) Source(37, 4) + SourceIndex(0) 3 >Emitted(28, 5) Source(37, 5) + SourceIndex(0) -4 >Emitted(28, 6) Source(37, 6) + SourceIndex(0) -5 >Emitted(28, 9) Source(37, 9) + SourceIndex(0) -6 >Emitted(28, 10) Source(37, 10) + SourceIndex(0) -7 >Emitted(28, 29) Source(37, 28) + SourceIndex(0) -8 >Emitted(28, 31) Source(37, 30) + SourceIndex(0) -9 >Emitted(28, 32) Source(37, 31) + SourceIndex(0) -10>Emitted(28, 35) Source(37, 34) + SourceIndex(0) -11>Emitted(28, 36) Source(37, 35) + SourceIndex(0) -12>Emitted(28, 38) Source(37, 37) + SourceIndex(0) -13>Emitted(28, 39) Source(37, 38) + SourceIndex(0) -14>Emitted(28, 42) Source(37, 41) + SourceIndex(0) -15>Emitted(28, 43) Source(37, 42) + SourceIndex(0) -16>Emitted(28, 45) Source(37, 44) + SourceIndex(0) -17>Emitted(28, 46) Source(37, 45) + SourceIndex(0) -18>Emitted(28, 48) Source(37, 47) + SourceIndex(0) -19>Emitted(28, 50) Source(37, 49) + SourceIndex(0) -20>Emitted(28, 51) Source(37, 50) + SourceIndex(0) +4 >Emitted(28, 6) Source(37, 11) + SourceIndex(0) +5 >Emitted(28, 29) Source(37, 18) + SourceIndex(0) +6 >Emitted(28, 31) Source(37, 30) + SourceIndex(0) +7 >Emitted(28, 32) Source(37, 31) + SourceIndex(0) +8 >Emitted(28, 35) Source(37, 34) + SourceIndex(0) +9 >Emitted(28, 36) Source(37, 35) + SourceIndex(0) +10>Emitted(28, 38) Source(37, 37) + SourceIndex(0) +11>Emitted(28, 39) Source(37, 38) + SourceIndex(0) +12>Emitted(28, 42) Source(37, 41) + SourceIndex(0) +13>Emitted(28, 43) Source(37, 42) + SourceIndex(0) +14>Emitted(28, 45) Source(37, 44) + SourceIndex(0) +15>Emitted(28, 46) Source(37, 45) + SourceIndex(0) +16>Emitted(28, 48) Source(37, 47) + SourceIndex(0) +17>Emitted(28, 50) Source(37, 49) + SourceIndex(0) +18>Emitted(28, 51) Source(37, 50) + SourceIndex(0) --- >>> console.log(numberB); 1 >^^^^ @@ -981,63 +939,57 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^ -10> ^^^ -11> ^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^ -19> ^^ -20> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^ +8 > ^^^ +9 > ^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^ +17> ^^ +18> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > -7 > [numberB] = getRobot() -8 > , -9 > i -10> = -11> 0 -12> ; -13> i -14> < -15> 1 -16> ; -17> i -18> ++ -19> ) -20> { +4 > (let [ +5 > numberB +6 > ] = getRobot(), +7 > i +8 > = +9 > 0 +10> ; +11> i +12> < +13> 1 +14> ; +15> i +16> ++ +17> ) +18> { 1->Emitted(31, 1) Source(40, 1) + SourceIndex(0) 2 >Emitted(31, 4) Source(40, 4) + SourceIndex(0) 3 >Emitted(31, 5) Source(40, 5) + SourceIndex(0) -4 >Emitted(31, 6) Source(40, 6) + SourceIndex(0) -5 >Emitted(31, 9) Source(40, 9) + SourceIndex(0) -6 >Emitted(31, 10) Source(40, 10) + SourceIndex(0) -7 >Emitted(31, 33) Source(40, 32) + SourceIndex(0) -8 >Emitted(31, 35) Source(40, 34) + SourceIndex(0) -9 >Emitted(31, 36) Source(40, 35) + SourceIndex(0) -10>Emitted(31, 39) Source(40, 38) + SourceIndex(0) -11>Emitted(31, 40) Source(40, 39) + SourceIndex(0) -12>Emitted(31, 42) Source(40, 41) + SourceIndex(0) -13>Emitted(31, 43) Source(40, 42) + SourceIndex(0) -14>Emitted(31, 46) Source(40, 45) + SourceIndex(0) -15>Emitted(31, 47) Source(40, 46) + SourceIndex(0) -16>Emitted(31, 49) Source(40, 48) + SourceIndex(0) -17>Emitted(31, 50) Source(40, 49) + SourceIndex(0) -18>Emitted(31, 52) Source(40, 51) + SourceIndex(0) -19>Emitted(31, 54) Source(40, 53) + SourceIndex(0) -20>Emitted(31, 55) Source(40, 54) + SourceIndex(0) +4 >Emitted(31, 6) Source(40, 11) + SourceIndex(0) +5 >Emitted(31, 33) Source(40, 18) + SourceIndex(0) +6 >Emitted(31, 35) Source(40, 34) + SourceIndex(0) +7 >Emitted(31, 36) Source(40, 35) + SourceIndex(0) +8 >Emitted(31, 39) Source(40, 38) + SourceIndex(0) +9 >Emitted(31, 40) Source(40, 39) + SourceIndex(0) +10>Emitted(31, 42) Source(40, 41) + SourceIndex(0) +11>Emitted(31, 43) Source(40, 42) + SourceIndex(0) +12>Emitted(31, 46) Source(40, 45) + SourceIndex(0) +13>Emitted(31, 47) Source(40, 46) + SourceIndex(0) +14>Emitted(31, 49) Source(40, 48) + SourceIndex(0) +15>Emitted(31, 50) Source(40, 49) + SourceIndex(0) +16>Emitted(31, 52) Source(40, 51) + SourceIndex(0) +17>Emitted(31, 54) Source(40, 53) + SourceIndex(0) +18>Emitted(31, 55) Source(40, 54) + SourceIndex(0) --- >>> console.log(numberB); 1 >^^^^ @@ -1081,63 +1033,57 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^ -10> ^^^ -11> ^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^ -19> ^^ -20> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^ +8 > ^^^ +9 > ^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^ +17> ^^ +18> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > -7 > [numberB] = [2, "trimmer", "trimming"] -8 > , -9 > i -10> = -11> 0 -12> ; -13> i -14> < -15> 1 -16> ; -17> i -18> ++ -19> ) -20> { +4 > (let [ +5 > numberB +6 > ] = [2, "trimmer", "trimming"], +7 > i +8 > = +9 > 0 +10> ; +11> i +12> < +13> 1 +14> ; +15> i +16> ++ +17> ) +18> { 1->Emitted(34, 1) Source(43, 1) + SourceIndex(0) 2 >Emitted(34, 4) Source(43, 4) + SourceIndex(0) 3 >Emitted(34, 5) Source(43, 5) + SourceIndex(0) -4 >Emitted(34, 6) Source(43, 6) + SourceIndex(0) -5 >Emitted(34, 9) Source(43, 9) + SourceIndex(0) -6 >Emitted(34, 10) Source(43, 10) + SourceIndex(0) -7 >Emitted(34, 49) Source(43, 48) + SourceIndex(0) -8 >Emitted(34, 51) Source(43, 50) + SourceIndex(0) -9 >Emitted(34, 52) Source(43, 51) + SourceIndex(0) -10>Emitted(34, 55) Source(43, 54) + SourceIndex(0) -11>Emitted(34, 56) Source(43, 55) + SourceIndex(0) -12>Emitted(34, 58) Source(43, 57) + SourceIndex(0) -13>Emitted(34, 59) Source(43, 58) + SourceIndex(0) -14>Emitted(34, 62) Source(43, 61) + SourceIndex(0) -15>Emitted(34, 63) Source(43, 62) + SourceIndex(0) -16>Emitted(34, 65) Source(43, 64) + SourceIndex(0) -17>Emitted(34, 66) Source(43, 65) + SourceIndex(0) -18>Emitted(34, 68) Source(43, 67) + SourceIndex(0) -19>Emitted(34, 70) Source(43, 69) + SourceIndex(0) -20>Emitted(34, 71) Source(43, 70) + SourceIndex(0) +4 >Emitted(34, 6) Source(43, 11) + SourceIndex(0) +5 >Emitted(34, 49) Source(43, 18) + SourceIndex(0) +6 >Emitted(34, 51) Source(43, 50) + SourceIndex(0) +7 >Emitted(34, 52) Source(43, 51) + SourceIndex(0) +8 >Emitted(34, 55) Source(43, 54) + SourceIndex(0) +9 >Emitted(34, 56) Source(43, 55) + SourceIndex(0) +10>Emitted(34, 58) Source(43, 57) + SourceIndex(0) +11>Emitted(34, 59) Source(43, 58) + SourceIndex(0) +12>Emitted(34, 62) Source(43, 61) + SourceIndex(0) +13>Emitted(34, 63) Source(43, 62) + SourceIndex(0) +14>Emitted(34, 65) Source(43, 64) + SourceIndex(0) +15>Emitted(34, 66) Source(43, 65) + SourceIndex(0) +16>Emitted(34, 68) Source(43, 67) + SourceIndex(0) +17>Emitted(34, 70) Source(43, 69) + SourceIndex(0) +18>Emitted(34, 71) Source(43, 70) + SourceIndex(0) --- >>> console.log(numberB); 1 >^^^^ @@ -1181,63 +1127,57 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^ -10> ^^^ -11> ^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^ -19> ^^ -20> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^ +8 > ^^^ +9 > ^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^ +17> ^^ +18> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > -7 > [nameB] = multiRobotA -8 > , -9 > i -10> = -11> 0 -12> ; -13> i -14> < -15> 1 -16> ; -17> i -18> ++ -19> ) -20> { +4 > (let [ +5 > nameB +6 > ] = multiRobotA, +7 > i +8 > = +9 > 0 +10> ; +11> i +12> < +13> 1 +14> ; +15> i +16> ++ +17> ) +18> { 1->Emitted(37, 1) Source(46, 1) + SourceIndex(0) 2 >Emitted(37, 4) Source(46, 4) + SourceIndex(0) 3 >Emitted(37, 5) Source(46, 5) + SourceIndex(0) -4 >Emitted(37, 6) Source(46, 6) + SourceIndex(0) -5 >Emitted(37, 9) Source(46, 9) + SourceIndex(0) -6 >Emitted(37, 10) Source(46, 10) + SourceIndex(0) -7 >Emitted(37, 32) Source(46, 31) + SourceIndex(0) -8 >Emitted(37, 34) Source(46, 33) + SourceIndex(0) -9 >Emitted(37, 35) Source(46, 34) + SourceIndex(0) -10>Emitted(37, 38) Source(46, 37) + SourceIndex(0) -11>Emitted(37, 39) Source(46, 38) + SourceIndex(0) -12>Emitted(37, 41) Source(46, 40) + SourceIndex(0) -13>Emitted(37, 42) Source(46, 41) + SourceIndex(0) -14>Emitted(37, 45) Source(46, 44) + SourceIndex(0) -15>Emitted(37, 46) Source(46, 45) + SourceIndex(0) -16>Emitted(37, 48) Source(46, 47) + SourceIndex(0) -17>Emitted(37, 49) Source(46, 48) + SourceIndex(0) -18>Emitted(37, 51) Source(46, 50) + SourceIndex(0) -19>Emitted(37, 53) Source(46, 52) + SourceIndex(0) -20>Emitted(37, 54) Source(46, 53) + SourceIndex(0) +4 >Emitted(37, 6) Source(46, 11) + SourceIndex(0) +5 >Emitted(37, 32) Source(46, 16) + SourceIndex(0) +6 >Emitted(37, 34) Source(46, 33) + SourceIndex(0) +7 >Emitted(37, 35) Source(46, 34) + SourceIndex(0) +8 >Emitted(37, 38) Source(46, 37) + SourceIndex(0) +9 >Emitted(37, 39) Source(46, 38) + SourceIndex(0) +10>Emitted(37, 41) Source(46, 40) + SourceIndex(0) +11>Emitted(37, 42) Source(46, 41) + SourceIndex(0) +12>Emitted(37, 45) Source(46, 44) + SourceIndex(0) +13>Emitted(37, 46) Source(46, 45) + SourceIndex(0) +14>Emitted(37, 48) Source(46, 47) + SourceIndex(0) +15>Emitted(37, 49) Source(46, 48) + SourceIndex(0) +16>Emitted(37, 51) Source(46, 50) + SourceIndex(0) +17>Emitted(37, 53) Source(46, 52) + SourceIndex(0) +18>Emitted(37, 54) Source(46, 53) + SourceIndex(0) --- >>> console.log(nameB); 1 >^^^^ @@ -1281,63 +1221,57 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^ -10> ^^^ -11> ^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^ -19> ^^ -20> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^ +8 > ^^^ +9 > ^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^ +17> ^^ +18> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > -7 > [nameB] = getMultiRobot() -8 > , -9 > i -10> = -11> 0 -12> ; -13> i -14> < -15> 1 -16> ; -17> i -18> ++ -19> ) -20> { +4 > (let [ +5 > nameB +6 > ] = getMultiRobot(), +7 > i +8 > = +9 > 0 +10> ; +11> i +12> < +13> 1 +14> ; +15> i +16> ++ +17> ) +18> { 1->Emitted(40, 1) Source(49, 1) + SourceIndex(0) 2 >Emitted(40, 4) Source(49, 4) + SourceIndex(0) 3 >Emitted(40, 5) Source(49, 5) + SourceIndex(0) -4 >Emitted(40, 6) Source(49, 6) + SourceIndex(0) -5 >Emitted(40, 9) Source(49, 9) + SourceIndex(0) -6 >Emitted(40, 10) Source(49, 10) + SourceIndex(0) -7 >Emitted(40, 36) Source(49, 35) + SourceIndex(0) -8 >Emitted(40, 38) Source(49, 37) + SourceIndex(0) -9 >Emitted(40, 39) Source(49, 38) + SourceIndex(0) -10>Emitted(40, 42) Source(49, 41) + SourceIndex(0) -11>Emitted(40, 43) Source(49, 42) + SourceIndex(0) -12>Emitted(40, 45) Source(49, 44) + SourceIndex(0) -13>Emitted(40, 46) Source(49, 45) + SourceIndex(0) -14>Emitted(40, 49) Source(49, 48) + SourceIndex(0) -15>Emitted(40, 50) Source(49, 49) + SourceIndex(0) -16>Emitted(40, 52) Source(49, 51) + SourceIndex(0) -17>Emitted(40, 53) Source(49, 52) + SourceIndex(0) -18>Emitted(40, 55) Source(49, 54) + SourceIndex(0) -19>Emitted(40, 57) Source(49, 56) + SourceIndex(0) -20>Emitted(40, 58) Source(49, 57) + SourceIndex(0) +4 >Emitted(40, 6) Source(49, 11) + SourceIndex(0) +5 >Emitted(40, 36) Source(49, 16) + SourceIndex(0) +6 >Emitted(40, 38) Source(49, 37) + SourceIndex(0) +7 >Emitted(40, 39) Source(49, 38) + SourceIndex(0) +8 >Emitted(40, 42) Source(49, 41) + SourceIndex(0) +9 >Emitted(40, 43) Source(49, 42) + SourceIndex(0) +10>Emitted(40, 45) Source(49, 44) + SourceIndex(0) +11>Emitted(40, 46) Source(49, 45) + SourceIndex(0) +12>Emitted(40, 49) Source(49, 48) + SourceIndex(0) +13>Emitted(40, 50) Source(49, 49) + SourceIndex(0) +14>Emitted(40, 52) Source(49, 51) + SourceIndex(0) +15>Emitted(40, 53) Source(49, 52) + SourceIndex(0) +16>Emitted(40, 55) Source(49, 54) + SourceIndex(0) +17>Emitted(40, 57) Source(49, 56) + SourceIndex(0) +18>Emitted(40, 58) Source(49, 57) + SourceIndex(0) --- >>> console.log(nameB); 1 >^^^^ @@ -1381,63 +1315,57 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^ -10> ^^^ -11> ^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^ -19> ^^ -20> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^ +8 > ^^^ +9 > ^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^ +17> ^^ +18> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > -7 > [nameB] = ["trimmer", ["trimming", "edging"]] -8 > , -9 > i -10> = -11> 0 -12> ; -13> i -14> < -15> 1 -16> ; -17> i -18> ++ -19> ) -20> { +4 > (let [ +5 > nameB +6 > ] = ["trimmer", ["trimming", "edging"]], +7 > i +8 > = +9 > 0 +10> ; +11> i +12> < +13> 1 +14> ; +15> i +16> ++ +17> ) +18> { 1->Emitted(43, 1) Source(52, 1) + SourceIndex(0) 2 >Emitted(43, 4) Source(52, 4) + SourceIndex(0) 3 >Emitted(43, 5) Source(52, 5) + SourceIndex(0) -4 >Emitted(43, 6) Source(52, 6) + SourceIndex(0) -5 >Emitted(43, 9) Source(52, 9) + SourceIndex(0) -6 >Emitted(43, 10) Source(52, 10) + SourceIndex(0) -7 >Emitted(43, 56) Source(52, 55) + SourceIndex(0) -8 >Emitted(43, 58) Source(52, 57) + SourceIndex(0) -9 >Emitted(43, 59) Source(52, 58) + SourceIndex(0) -10>Emitted(43, 62) Source(52, 61) + SourceIndex(0) -11>Emitted(43, 63) Source(52, 62) + SourceIndex(0) -12>Emitted(43, 65) Source(52, 64) + SourceIndex(0) -13>Emitted(43, 66) Source(52, 65) + SourceIndex(0) -14>Emitted(43, 69) Source(52, 68) + SourceIndex(0) -15>Emitted(43, 70) Source(52, 69) + SourceIndex(0) -16>Emitted(43, 72) Source(52, 71) + SourceIndex(0) -17>Emitted(43, 73) Source(52, 72) + SourceIndex(0) -18>Emitted(43, 75) Source(52, 74) + SourceIndex(0) -19>Emitted(43, 77) Source(52, 76) + SourceIndex(0) -20>Emitted(43, 78) Source(52, 77) + SourceIndex(0) +4 >Emitted(43, 6) Source(52, 11) + SourceIndex(0) +5 >Emitted(43, 56) Source(52, 16) + SourceIndex(0) +6 >Emitted(43, 58) Source(52, 57) + SourceIndex(0) +7 >Emitted(43, 59) Source(52, 58) + SourceIndex(0) +8 >Emitted(43, 62) Source(52, 61) + SourceIndex(0) +9 >Emitted(43, 63) Source(52, 62) + SourceIndex(0) +10>Emitted(43, 65) Source(52, 64) + SourceIndex(0) +11>Emitted(43, 66) Source(52, 65) + SourceIndex(0) +12>Emitted(43, 69) Source(52, 68) + SourceIndex(0) +13>Emitted(43, 70) Source(52, 69) + SourceIndex(0) +14>Emitted(43, 72) Source(52, 71) + SourceIndex(0) +15>Emitted(43, 73) Source(52, 72) + SourceIndex(0) +16>Emitted(43, 75) Source(52, 74) + SourceIndex(0) +17>Emitted(43, 77) Source(52, 76) + SourceIndex(0) +18>Emitted(43, 78) Source(52, 77) + SourceIndex(0) --- >>> console.log(nameB); 1 >^^^^ @@ -1481,76 +1409,70 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^^^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^^ -19> ^ -20> ^^ -21> ^ -22> ^^ -23> ^^ -24> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ 1-> > > 2 >for 3 > -4 > ( -5 > let -6 > [ -7 > numberA2 -8 > , -9 > nameA2 -10> , -11> skillA2 -12> ] = robotA, -13> i -14> = -15> 0 -16> ; -17> i -18> < -19> 1 -20> ; -21> i -22> ++ -23> ) -24> { +4 > (let [ +5 > numberA2 +6 > , +7 > nameA2 +8 > , +9 > skillA2 +10> ] = robotA, +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { 1->Emitted(46, 1) Source(56, 1) + SourceIndex(0) 2 >Emitted(46, 4) Source(56, 4) + SourceIndex(0) 3 >Emitted(46, 5) Source(56, 5) + SourceIndex(0) -4 >Emitted(46, 6) Source(56, 6) + SourceIndex(0) -5 >Emitted(46, 9) Source(56, 9) + SourceIndex(0) -6 >Emitted(46, 10) Source(56, 11) + SourceIndex(0) -7 >Emitted(46, 30) Source(56, 19) + SourceIndex(0) -8 >Emitted(46, 32) Source(56, 21) + SourceIndex(0) -9 >Emitted(46, 50) Source(56, 27) + SourceIndex(0) -10>Emitted(46, 52) Source(56, 29) + SourceIndex(0) -11>Emitted(46, 71) Source(56, 36) + SourceIndex(0) -12>Emitted(46, 73) Source(56, 48) + SourceIndex(0) -13>Emitted(46, 74) Source(56, 49) + SourceIndex(0) -14>Emitted(46, 77) Source(56, 52) + SourceIndex(0) -15>Emitted(46, 78) Source(56, 53) + SourceIndex(0) -16>Emitted(46, 80) Source(56, 55) + SourceIndex(0) -17>Emitted(46, 81) Source(56, 56) + SourceIndex(0) -18>Emitted(46, 84) Source(56, 59) + SourceIndex(0) -19>Emitted(46, 85) Source(56, 60) + SourceIndex(0) -20>Emitted(46, 87) Source(56, 62) + SourceIndex(0) -21>Emitted(46, 88) Source(56, 63) + SourceIndex(0) -22>Emitted(46, 90) Source(56, 65) + SourceIndex(0) -23>Emitted(46, 92) Source(56, 67) + SourceIndex(0) -24>Emitted(46, 93) Source(56, 68) + SourceIndex(0) +4 >Emitted(46, 6) Source(56, 11) + SourceIndex(0) +5 >Emitted(46, 30) Source(56, 19) + SourceIndex(0) +6 >Emitted(46, 32) Source(56, 21) + SourceIndex(0) +7 >Emitted(46, 50) Source(56, 27) + SourceIndex(0) +8 >Emitted(46, 52) Source(56, 29) + SourceIndex(0) +9 >Emitted(46, 71) Source(56, 36) + SourceIndex(0) +10>Emitted(46, 73) Source(56, 48) + SourceIndex(0) +11>Emitted(46, 74) Source(56, 49) + SourceIndex(0) +12>Emitted(46, 77) Source(56, 52) + SourceIndex(0) +13>Emitted(46, 78) Source(56, 53) + SourceIndex(0) +14>Emitted(46, 80) Source(56, 55) + SourceIndex(0) +15>Emitted(46, 81) Source(56, 56) + SourceIndex(0) +16>Emitted(46, 84) Source(56, 59) + SourceIndex(0) +17>Emitted(46, 85) Source(56, 60) + SourceIndex(0) +18>Emitted(46, 87) Source(56, 62) + SourceIndex(0) +19>Emitted(46, 88) Source(56, 63) + SourceIndex(0) +20>Emitted(46, 90) Source(56, 65) + SourceIndex(0) +21>Emitted(46, 92) Source(56, 67) + SourceIndex(0) +22>Emitted(46, 93) Source(56, 68) + SourceIndex(0) --- >>> console.log(nameA2); 1 >^^^^ @@ -1594,81 +1516,75 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^ -12> ^^ -13> ^^^^^^^^^^^^^^^ -14> ^^ -15> ^ -16> ^^^ -17> ^ -18> ^^ -19> ^ -20> ^^^ -21> ^ -22> ^^ -23> ^ -24> ^^ -25> ^^ -26> ^ +5 > ^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > -7 > [numberA2, nameA2, skillA2] = getRobot() -8 > -9 > numberA2 -10> , -11> nameA2 -12> , -13> skillA2 -14> ] = getRobot(), -15> i -16> = -17> 0 -18> ; -19> i -20> < -21> 1 -22> ; -23> i -24> ++ -25> ) -26> { +4 > (let +5 > [numberA2, nameA2, skillA2] = getRobot() +6 > +7 > numberA2 +8 > , +9 > nameA2 +10> , +11> skillA2 +12> ] = getRobot(), +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { 1->Emitted(49, 1) Source(59, 1) + SourceIndex(0) 2 >Emitted(49, 4) Source(59, 4) + SourceIndex(0) 3 >Emitted(49, 5) Source(59, 5) + SourceIndex(0) -4 >Emitted(49, 6) Source(59, 6) + SourceIndex(0) -5 >Emitted(49, 9) Source(59, 9) + SourceIndex(0) -6 >Emitted(49, 10) Source(59, 10) + SourceIndex(0) -7 >Emitted(49, 25) Source(59, 50) + SourceIndex(0) -8 >Emitted(49, 27) Source(59, 11) + SourceIndex(0) -9 >Emitted(49, 43) Source(59, 19) + SourceIndex(0) -10>Emitted(49, 45) Source(59, 21) + SourceIndex(0) -11>Emitted(49, 59) Source(59, 27) + SourceIndex(0) -12>Emitted(49, 61) Source(59, 29) + SourceIndex(0) -13>Emitted(49, 76) Source(59, 36) + SourceIndex(0) -14>Emitted(49, 78) Source(59, 52) + SourceIndex(0) -15>Emitted(49, 79) Source(59, 53) + SourceIndex(0) -16>Emitted(49, 82) Source(59, 56) + SourceIndex(0) -17>Emitted(49, 83) Source(59, 57) + SourceIndex(0) -18>Emitted(49, 85) Source(59, 59) + SourceIndex(0) -19>Emitted(49, 86) Source(59, 60) + SourceIndex(0) -20>Emitted(49, 89) Source(59, 63) + SourceIndex(0) -21>Emitted(49, 90) Source(59, 64) + SourceIndex(0) -22>Emitted(49, 92) Source(59, 66) + SourceIndex(0) -23>Emitted(49, 93) Source(59, 67) + SourceIndex(0) -24>Emitted(49, 95) Source(59, 69) + SourceIndex(0) -25>Emitted(49, 97) Source(59, 71) + SourceIndex(0) -26>Emitted(49, 98) Source(59, 72) + SourceIndex(0) +4 >Emitted(49, 6) Source(59, 10) + SourceIndex(0) +5 >Emitted(49, 25) Source(59, 50) + SourceIndex(0) +6 >Emitted(49, 27) Source(59, 11) + SourceIndex(0) +7 >Emitted(49, 43) Source(59, 19) + SourceIndex(0) +8 >Emitted(49, 45) Source(59, 21) + SourceIndex(0) +9 >Emitted(49, 59) Source(59, 27) + SourceIndex(0) +10>Emitted(49, 61) Source(59, 29) + SourceIndex(0) +11>Emitted(49, 76) Source(59, 36) + SourceIndex(0) +12>Emitted(49, 78) Source(59, 52) + SourceIndex(0) +13>Emitted(49, 79) Source(59, 53) + SourceIndex(0) +14>Emitted(49, 82) Source(59, 56) + SourceIndex(0) +15>Emitted(49, 83) Source(59, 57) + SourceIndex(0) +16>Emitted(49, 85) Source(59, 59) + SourceIndex(0) +17>Emitted(49, 86) Source(59, 60) + SourceIndex(0) +18>Emitted(49, 89) Source(59, 63) + SourceIndex(0) +19>Emitted(49, 90) Source(59, 64) + SourceIndex(0) +20>Emitted(49, 92) Source(59, 66) + SourceIndex(0) +21>Emitted(49, 93) Source(59, 67) + SourceIndex(0) +22>Emitted(49, 95) Source(59, 69) + SourceIndex(0) +23>Emitted(49, 97) Source(59, 71) + SourceIndex(0) +24>Emitted(49, 98) Source(59, 72) + SourceIndex(0) --- >>> console.log(nameA2); 1 >^^^^ @@ -1712,81 +1628,75 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^ -12> ^^ -13> ^^^^^^^^^^^^^^^ -14> ^^ -15> ^ -16> ^^^ -17> ^ -18> ^^ -19> ^ -20> ^^^ -21> ^ -22> ^^ -23> ^ -24> ^^ -25> ^^ -26> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > -7 > [numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"] -8 > -9 > numberA2 -10> , -11> nameA2 -12> , -13> skillA2 -14> ] = [2, "trimmer", "trimming"], -15> i -16> = -17> 0 -18> ; -19> i -20> < -21> 1 -22> ; -23> i -24> ++ -25> ) -26> { +4 > (let +5 > [numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"] +6 > +7 > numberA2 +8 > , +9 > nameA2 +10> , +11> skillA2 +12> ] = [2, "trimmer", "trimming"], +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { 1->Emitted(52, 1) Source(62, 1) + SourceIndex(0) 2 >Emitted(52, 4) Source(62, 4) + SourceIndex(0) 3 >Emitted(52, 5) Source(62, 5) + SourceIndex(0) -4 >Emitted(52, 6) Source(62, 6) + SourceIndex(0) -5 >Emitted(52, 9) Source(62, 9) + SourceIndex(0) -6 >Emitted(52, 10) Source(62, 10) + SourceIndex(0) -7 >Emitted(52, 41) Source(62, 66) + SourceIndex(0) -8 >Emitted(52, 43) Source(62, 11) + SourceIndex(0) -9 >Emitted(52, 59) Source(62, 19) + SourceIndex(0) -10>Emitted(52, 61) Source(62, 21) + SourceIndex(0) -11>Emitted(52, 75) Source(62, 27) + SourceIndex(0) -12>Emitted(52, 77) Source(62, 29) + SourceIndex(0) -13>Emitted(52, 92) Source(62, 36) + SourceIndex(0) -14>Emitted(52, 94) Source(62, 68) + SourceIndex(0) -15>Emitted(52, 95) Source(62, 69) + SourceIndex(0) -16>Emitted(52, 98) Source(62, 72) + SourceIndex(0) -17>Emitted(52, 99) Source(62, 73) + SourceIndex(0) -18>Emitted(52, 101) Source(62, 75) + SourceIndex(0) -19>Emitted(52, 102) Source(62, 76) + SourceIndex(0) -20>Emitted(52, 105) Source(62, 79) + SourceIndex(0) -21>Emitted(52, 106) Source(62, 80) + SourceIndex(0) -22>Emitted(52, 108) Source(62, 82) + SourceIndex(0) -23>Emitted(52, 109) Source(62, 83) + SourceIndex(0) -24>Emitted(52, 111) Source(62, 85) + SourceIndex(0) -25>Emitted(52, 113) Source(62, 87) + SourceIndex(0) -26>Emitted(52, 114) Source(62, 88) + SourceIndex(0) +4 >Emitted(52, 6) Source(62, 10) + SourceIndex(0) +5 >Emitted(52, 41) Source(62, 66) + SourceIndex(0) +6 >Emitted(52, 43) Source(62, 11) + SourceIndex(0) +7 >Emitted(52, 59) Source(62, 19) + SourceIndex(0) +8 >Emitted(52, 61) Source(62, 21) + SourceIndex(0) +9 >Emitted(52, 75) Source(62, 27) + SourceIndex(0) +10>Emitted(52, 77) Source(62, 29) + SourceIndex(0) +11>Emitted(52, 92) Source(62, 36) + SourceIndex(0) +12>Emitted(52, 94) Source(62, 68) + SourceIndex(0) +13>Emitted(52, 95) Source(62, 69) + SourceIndex(0) +14>Emitted(52, 98) Source(62, 72) + SourceIndex(0) +15>Emitted(52, 99) Source(62, 73) + SourceIndex(0) +16>Emitted(52, 101) Source(62, 75) + SourceIndex(0) +17>Emitted(52, 102) Source(62, 76) + SourceIndex(0) +18>Emitted(52, 105) Source(62, 79) + SourceIndex(0) +19>Emitted(52, 106) Source(62, 80) + SourceIndex(0) +20>Emitted(52, 108) Source(62, 82) + SourceIndex(0) +21>Emitted(52, 109) Source(62, 83) + SourceIndex(0) +22>Emitted(52, 111) Source(62, 85) + SourceIndex(0) +23>Emitted(52, 113) Source(62, 87) + SourceIndex(0) +24>Emitted(52, 114) Source(62, 88) + SourceIndex(0) --- >>> console.log(nameA2); 1 >^^^^ @@ -1830,81 +1740,75 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^^^^^ -12> ^^ -13> ^^^^^^^^^^^^^^^^^^^^^^^ -14> ^^ -15> ^ -16> ^^^ -17> ^ -18> ^^ -19> ^ -20> ^^^ -21> ^ -22> ^^ -23> ^ -24> ^^ -25> ^^ -26> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > [ -7 > nameMA -8 > , -9 > [primarySkillA, secondarySkillA] -10> -11> primarySkillA -12> , -13> secondarySkillA -14> ]] = multiRobotA, -15> i -16> = -17> 0 -18> ; -19> i -20> < -21> 1 -22> ; -23> i -24> ++ -25> ) -26> { +4 > (let [ +5 > nameMA +6 > , +7 > [primarySkillA, secondarySkillA] +8 > +9 > primarySkillA +10> , +11> secondarySkillA +12> ]] = multiRobotA, +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { 1->Emitted(55, 1) Source(65, 1) + SourceIndex(0) 2 >Emitted(55, 4) Source(65, 4) + SourceIndex(0) 3 >Emitted(55, 5) Source(65, 5) + SourceIndex(0) -4 >Emitted(55, 6) Source(65, 6) + SourceIndex(0) -5 >Emitted(55, 9) Source(65, 9) + SourceIndex(0) -6 >Emitted(55, 10) Source(65, 11) + SourceIndex(0) -7 >Emitted(55, 33) Source(65, 17) + SourceIndex(0) -8 >Emitted(55, 35) Source(65, 19) + SourceIndex(0) -9 >Emitted(55, 54) Source(65, 51) + SourceIndex(0) -10>Emitted(55, 56) Source(65, 20) + SourceIndex(0) -11>Emitted(55, 77) Source(65, 33) + SourceIndex(0) -12>Emitted(55, 79) Source(65, 35) + SourceIndex(0) -13>Emitted(55, 102) Source(65, 50) + SourceIndex(0) -14>Emitted(55, 104) Source(65, 68) + SourceIndex(0) -15>Emitted(55, 105) Source(65, 69) + SourceIndex(0) -16>Emitted(55, 108) Source(65, 72) + SourceIndex(0) -17>Emitted(55, 109) Source(65, 73) + SourceIndex(0) -18>Emitted(55, 111) Source(65, 75) + SourceIndex(0) -19>Emitted(55, 112) Source(65, 76) + SourceIndex(0) -20>Emitted(55, 115) Source(65, 79) + SourceIndex(0) -21>Emitted(55, 116) Source(65, 80) + SourceIndex(0) -22>Emitted(55, 118) Source(65, 82) + SourceIndex(0) -23>Emitted(55, 119) Source(65, 83) + SourceIndex(0) -24>Emitted(55, 121) Source(65, 85) + SourceIndex(0) -25>Emitted(55, 123) Source(65, 87) + SourceIndex(0) -26>Emitted(55, 124) Source(65, 88) + SourceIndex(0) +4 >Emitted(55, 6) Source(65, 11) + SourceIndex(0) +5 >Emitted(55, 33) Source(65, 17) + SourceIndex(0) +6 >Emitted(55, 35) Source(65, 19) + SourceIndex(0) +7 >Emitted(55, 54) Source(65, 51) + SourceIndex(0) +8 >Emitted(55, 56) Source(65, 20) + SourceIndex(0) +9 >Emitted(55, 77) Source(65, 33) + SourceIndex(0) +10>Emitted(55, 79) Source(65, 35) + SourceIndex(0) +11>Emitted(55, 102) Source(65, 50) + SourceIndex(0) +12>Emitted(55, 104) Source(65, 68) + SourceIndex(0) +13>Emitted(55, 105) Source(65, 69) + SourceIndex(0) +14>Emitted(55, 108) Source(65, 72) + SourceIndex(0) +15>Emitted(55, 109) Source(65, 73) + SourceIndex(0) +16>Emitted(55, 111) Source(65, 75) + SourceIndex(0) +17>Emitted(55, 112) Source(65, 76) + SourceIndex(0) +18>Emitted(55, 115) Source(65, 79) + SourceIndex(0) +19>Emitted(55, 116) Source(65, 80) + SourceIndex(0) +20>Emitted(55, 118) Source(65, 82) + SourceIndex(0) +21>Emitted(55, 119) Source(65, 83) + SourceIndex(0) +22>Emitted(55, 121) Source(65, 85) + SourceIndex(0) +23>Emitted(55, 123) Source(65, 87) + SourceIndex(0) +24>Emitted(55, 124) Source(65, 88) + SourceIndex(0) --- >>> console.log(nameMA); 1 >^^^^ @@ -1948,87 +1852,81 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^ -12> ^^ -13> ^^^^^^^^^^^^^^^^^^^^^ -14> ^^ -15> ^^^^^^^^^^^^^^^^^^^^^^^ -16> ^^ -17> ^ -18> ^^^ -19> ^ -20> ^^ -21> ^ -22> ^^^ -23> ^ -24> ^^ -25> ^ -26> ^^ -27> ^^ -28> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^^^^^^^^^^^^^^^^^^^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^^ +21> ^ +22> ^^ +23> ^ +24> ^^ +25> ^^ +26> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > -7 > [nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot() -8 > -9 > nameMA -10> , -11> [primarySkillA, secondarySkillA] -12> -13> primarySkillA -14> , -15> secondarySkillA -16> ]] = getMultiRobot(), -17> i -18> = -19> 0 -20> ; -21> i -22> < -23> 1 -24> ; -25> i -26> ++ -27> ) -28> { +4 > (let +5 > [nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot() +6 > +7 > nameMA +8 > , +9 > [primarySkillA, secondarySkillA] +10> +11> primarySkillA +12> , +13> secondarySkillA +14> ]] = getMultiRobot(), +15> i +16> = +17> 0 +18> ; +19> i +20> < +21> 1 +22> ; +23> i +24> ++ +25> ) +26> { 1->Emitted(58, 1) Source(68, 1) + SourceIndex(0) 2 >Emitted(58, 4) Source(68, 4) + SourceIndex(0) 3 >Emitted(58, 5) Source(68, 5) + SourceIndex(0) -4 >Emitted(58, 6) Source(68, 6) + SourceIndex(0) -5 >Emitted(58, 9) Source(68, 9) + SourceIndex(0) -6 >Emitted(58, 10) Source(68, 10) + SourceIndex(0) -7 >Emitted(58, 30) Source(68, 70) + SourceIndex(0) -8 >Emitted(58, 32) Source(68, 11) + SourceIndex(0) -9 >Emitted(58, 46) Source(68, 17) + SourceIndex(0) -10>Emitted(58, 48) Source(68, 19) + SourceIndex(0) -11>Emitted(58, 58) Source(68, 51) + SourceIndex(0) -12>Emitted(58, 60) Source(68, 20) + SourceIndex(0) -13>Emitted(58, 81) Source(68, 33) + SourceIndex(0) -14>Emitted(58, 83) Source(68, 35) + SourceIndex(0) -15>Emitted(58, 106) Source(68, 50) + SourceIndex(0) -16>Emitted(58, 108) Source(68, 72) + SourceIndex(0) -17>Emitted(58, 109) Source(68, 73) + SourceIndex(0) -18>Emitted(58, 112) Source(68, 76) + SourceIndex(0) -19>Emitted(58, 113) Source(68, 77) + SourceIndex(0) -20>Emitted(58, 115) Source(68, 79) + SourceIndex(0) -21>Emitted(58, 116) Source(68, 80) + SourceIndex(0) -22>Emitted(58, 119) Source(68, 83) + SourceIndex(0) -23>Emitted(58, 120) Source(68, 84) + SourceIndex(0) -24>Emitted(58, 122) Source(68, 86) + SourceIndex(0) -25>Emitted(58, 123) Source(68, 87) + SourceIndex(0) -26>Emitted(58, 125) Source(68, 89) + SourceIndex(0) -27>Emitted(58, 127) Source(68, 91) + SourceIndex(0) -28>Emitted(58, 128) Source(68, 92) + SourceIndex(0) +4 >Emitted(58, 6) Source(68, 10) + SourceIndex(0) +5 >Emitted(58, 30) Source(68, 70) + SourceIndex(0) +6 >Emitted(58, 32) Source(68, 11) + SourceIndex(0) +7 >Emitted(58, 46) Source(68, 17) + SourceIndex(0) +8 >Emitted(58, 48) Source(68, 19) + SourceIndex(0) +9 >Emitted(58, 58) Source(68, 51) + SourceIndex(0) +10>Emitted(58, 60) Source(68, 20) + SourceIndex(0) +11>Emitted(58, 81) Source(68, 33) + SourceIndex(0) +12>Emitted(58, 83) Source(68, 35) + SourceIndex(0) +13>Emitted(58, 106) Source(68, 50) + SourceIndex(0) +14>Emitted(58, 108) Source(68, 72) + SourceIndex(0) +15>Emitted(58, 109) Source(68, 73) + SourceIndex(0) +16>Emitted(58, 112) Source(68, 76) + SourceIndex(0) +17>Emitted(58, 113) Source(68, 77) + SourceIndex(0) +18>Emitted(58, 115) Source(68, 79) + SourceIndex(0) +19>Emitted(58, 116) Source(68, 80) + SourceIndex(0) +20>Emitted(58, 119) Source(68, 83) + SourceIndex(0) +21>Emitted(58, 120) Source(68, 84) + SourceIndex(0) +22>Emitted(58, 122) Source(68, 86) + SourceIndex(0) +23>Emitted(58, 123) Source(68, 87) + SourceIndex(0) +24>Emitted(58, 125) Source(68, 89) + SourceIndex(0) +25>Emitted(58, 127) Source(68, 91) + SourceIndex(0) +26>Emitted(58, 128) Source(68, 92) + SourceIndex(0) --- >>> console.log(nameMA); 1 >^^^^ @@ -2072,87 +1970,81 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^ -12> ^^ -13> ^^^^^^^^^^^^^^^^^^^^^ -14> ^^ -15> ^^^^^^^^^^^^^^^^^^^^^^^ -16> ^^ -17> ^ -18> ^^^ -19> ^ -20> ^^ -21> ^ -22> ^^^ -23> ^ -24> ^^ -25> ^ -26> ^^ -27> ^^ -28> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^^^^^^^^^^^^^^^^^^^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^^ +21> ^ +22> ^^ +23> ^ +24> ^^ +25> ^^ +26> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > -7 > [nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]] -8 > -9 > nameMA -10> , -11> [primarySkillA, secondarySkillA] -12> -13> primarySkillA -14> , -15> secondarySkillA -16> ]] = ["trimmer", ["trimming", "edging"]], -17> i -18> = -19> 0 -20> ; -21> i -22> < -23> 1 -24> ; -25> i -26> ++ -27> ) -28> { +4 > (let +5 > [nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]] +6 > +7 > nameMA +8 > , +9 > [primarySkillA, secondarySkillA] +10> +11> primarySkillA +12> , +13> secondarySkillA +14> ]] = ["trimmer", ["trimming", "edging"]], +15> i +16> = +17> 0 +18> ; +19> i +20> < +21> 1 +22> ; +23> i +24> ++ +25> ) +26> { 1->Emitted(61, 1) Source(71, 1) + SourceIndex(0) 2 >Emitted(61, 4) Source(71, 4) + SourceIndex(0) 3 >Emitted(61, 5) Source(71, 5) + SourceIndex(0) -4 >Emitted(61, 6) Source(71, 6) + SourceIndex(0) -5 >Emitted(61, 9) Source(71, 9) + SourceIndex(0) -6 >Emitted(61, 10) Source(71, 10) + SourceIndex(0) -7 >Emitted(61, 50) Source(71, 90) + SourceIndex(0) -8 >Emitted(61, 52) Source(71, 11) + SourceIndex(0) -9 >Emitted(61, 66) Source(71, 17) + SourceIndex(0) -10>Emitted(61, 68) Source(71, 19) + SourceIndex(0) -11>Emitted(61, 78) Source(71, 51) + SourceIndex(0) -12>Emitted(61, 80) Source(71, 20) + SourceIndex(0) -13>Emitted(61, 101) Source(71, 33) + SourceIndex(0) -14>Emitted(61, 103) Source(71, 35) + SourceIndex(0) -15>Emitted(61, 126) Source(71, 50) + SourceIndex(0) -16>Emitted(61, 128) Source(71, 92) + SourceIndex(0) -17>Emitted(61, 129) Source(71, 93) + SourceIndex(0) -18>Emitted(61, 132) Source(71, 96) + SourceIndex(0) -19>Emitted(61, 133) Source(71, 97) + SourceIndex(0) -20>Emitted(61, 135) Source(71, 99) + SourceIndex(0) -21>Emitted(61, 136) Source(71, 100) + SourceIndex(0) -22>Emitted(61, 139) Source(71, 103) + SourceIndex(0) -23>Emitted(61, 140) Source(71, 104) + SourceIndex(0) -24>Emitted(61, 142) Source(71, 106) + SourceIndex(0) -25>Emitted(61, 143) Source(71, 107) + SourceIndex(0) -26>Emitted(61, 145) Source(71, 109) + SourceIndex(0) -27>Emitted(61, 147) Source(71, 111) + SourceIndex(0) -28>Emitted(61, 148) Source(71, 112) + SourceIndex(0) +4 >Emitted(61, 6) Source(71, 10) + SourceIndex(0) +5 >Emitted(61, 50) Source(71, 90) + SourceIndex(0) +6 >Emitted(61, 52) Source(71, 11) + SourceIndex(0) +7 >Emitted(61, 66) Source(71, 17) + SourceIndex(0) +8 >Emitted(61, 68) Source(71, 19) + SourceIndex(0) +9 >Emitted(61, 78) Source(71, 51) + SourceIndex(0) +10>Emitted(61, 80) Source(71, 20) + SourceIndex(0) +11>Emitted(61, 101) Source(71, 33) + SourceIndex(0) +12>Emitted(61, 103) Source(71, 35) + SourceIndex(0) +13>Emitted(61, 126) Source(71, 50) + SourceIndex(0) +14>Emitted(61, 128) Source(71, 92) + SourceIndex(0) +15>Emitted(61, 129) Source(71, 93) + SourceIndex(0) +16>Emitted(61, 132) Source(71, 96) + SourceIndex(0) +17>Emitted(61, 133) Source(71, 97) + SourceIndex(0) +18>Emitted(61, 135) Source(71, 99) + SourceIndex(0) +19>Emitted(61, 136) Source(71, 100) + SourceIndex(0) +20>Emitted(61, 139) Source(71, 103) + SourceIndex(0) +21>Emitted(61, 140) Source(71, 104) + SourceIndex(0) +22>Emitted(61, 142) Source(71, 106) + SourceIndex(0) +23>Emitted(61, 143) Source(71, 107) + SourceIndex(0) +24>Emitted(61, 145) Source(71, 109) + SourceIndex(0) +25>Emitted(61, 147) Source(71, 111) + SourceIndex(0) +26>Emitted(61, 148) Source(71, 112) + SourceIndex(0) --- >>> console.log(nameMA); 1 >^^^^ @@ -2196,70 +2088,64 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -10> ^^ -11> ^ -12> ^^^ -13> ^ -14> ^^ -15> ^ -16> ^^^ -17> ^ -18> ^^ -19> ^ -20> ^^ -21> ^^ -22> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ 1-> > > 2 >for 3 > -4 > ( -5 > let -6 > [ -7 > numberA3 -8 > , -9 > ...robotAInfo -10> ] = robotA, -11> i -12> = -13> 0 -14> ; -15> i -16> < -17> 1 -18> ; -19> i -20> ++ -21> ) -22> { +4 > (let [ +5 > numberA3 +6 > , +7 > ...robotAInfo +8 > ] = robotA, +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { 1->Emitted(64, 1) Source(75, 1) + SourceIndex(0) 2 >Emitted(64, 4) Source(75, 4) + SourceIndex(0) 3 >Emitted(64, 5) Source(75, 5) + SourceIndex(0) -4 >Emitted(64, 6) Source(75, 6) + SourceIndex(0) -5 >Emitted(64, 9) Source(75, 9) + SourceIndex(0) -6 >Emitted(64, 10) Source(75, 11) + SourceIndex(0) -7 >Emitted(64, 30) Source(75, 19) + SourceIndex(0) -8 >Emitted(64, 32) Source(75, 21) + SourceIndex(0) -9 >Emitted(64, 60) Source(75, 34) + SourceIndex(0) -10>Emitted(64, 62) Source(75, 46) + SourceIndex(0) -11>Emitted(64, 63) Source(75, 47) + SourceIndex(0) -12>Emitted(64, 66) Source(75, 50) + SourceIndex(0) -13>Emitted(64, 67) Source(75, 51) + SourceIndex(0) -14>Emitted(64, 69) Source(75, 53) + SourceIndex(0) -15>Emitted(64, 70) Source(75, 54) + SourceIndex(0) -16>Emitted(64, 73) Source(75, 57) + SourceIndex(0) -17>Emitted(64, 74) Source(75, 58) + SourceIndex(0) -18>Emitted(64, 76) Source(75, 60) + SourceIndex(0) -19>Emitted(64, 77) Source(75, 61) + SourceIndex(0) -20>Emitted(64, 79) Source(75, 63) + SourceIndex(0) -21>Emitted(64, 81) Source(75, 65) + SourceIndex(0) -22>Emitted(64, 82) Source(75, 66) + SourceIndex(0) +4 >Emitted(64, 6) Source(75, 11) + SourceIndex(0) +5 >Emitted(64, 30) Source(75, 19) + SourceIndex(0) +6 >Emitted(64, 32) Source(75, 21) + SourceIndex(0) +7 >Emitted(64, 60) Source(75, 34) + SourceIndex(0) +8 >Emitted(64, 62) Source(75, 46) + SourceIndex(0) +9 >Emitted(64, 63) Source(75, 47) + SourceIndex(0) +10>Emitted(64, 66) Source(75, 50) + SourceIndex(0) +11>Emitted(64, 67) Source(75, 51) + SourceIndex(0) +12>Emitted(64, 69) Source(75, 53) + SourceIndex(0) +13>Emitted(64, 70) Source(75, 54) + SourceIndex(0) +14>Emitted(64, 73) Source(75, 57) + SourceIndex(0) +15>Emitted(64, 74) Source(75, 58) + SourceIndex(0) +16>Emitted(64, 76) Source(75, 60) + SourceIndex(0) +17>Emitted(64, 77) Source(75, 61) + SourceIndex(0) +18>Emitted(64, 79) Source(75, 63) + SourceIndex(0) +19>Emitted(64, 81) Source(75, 65) + SourceIndex(0) +20>Emitted(64, 82) Source(75, 66) + SourceIndex(0) --- >>> console.log(numberA3); 1 >^^^^ @@ -2303,75 +2189,69 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^^^^^^^^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^^ -19> ^ -20> ^^ -21> ^ -22> ^^ -23> ^^ -24> ^ +5 > ^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > -7 > [numberA3, ...robotAInfo] = getRobot() -8 > -9 > numberA3 -10> , -11> ...robotAInfo -12> ] = getRobot(), -13> i -14> = -15> 0 -16> ; -17> i -18> < -19> 1 -20> ; -21> i -22> ++ -23> ) -24> { +4 > (let +5 > [numberA3, ...robotAInfo] = getRobot() +6 > +7 > numberA3 +8 > , +9 > ...robotAInfo +10> ] = getRobot(), +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { 1->Emitted(67, 1) Source(78, 1) + SourceIndex(0) 2 >Emitted(67, 4) Source(78, 4) + SourceIndex(0) 3 >Emitted(67, 5) Source(78, 5) + SourceIndex(0) -4 >Emitted(67, 6) Source(78, 6) + SourceIndex(0) -5 >Emitted(67, 9) Source(78, 9) + SourceIndex(0) -6 >Emitted(67, 10) Source(78, 10) + SourceIndex(0) -7 >Emitted(67, 25) Source(78, 48) + SourceIndex(0) -8 >Emitted(67, 27) Source(78, 11) + SourceIndex(0) -9 >Emitted(67, 43) Source(78, 19) + SourceIndex(0) -10>Emitted(67, 45) Source(78, 21) + SourceIndex(0) -11>Emitted(67, 69) Source(78, 34) + SourceIndex(0) -12>Emitted(67, 71) Source(78, 50) + SourceIndex(0) -13>Emitted(67, 72) Source(78, 51) + SourceIndex(0) -14>Emitted(67, 75) Source(78, 54) + SourceIndex(0) -15>Emitted(67, 76) Source(78, 55) + SourceIndex(0) -16>Emitted(67, 78) Source(78, 57) + SourceIndex(0) -17>Emitted(67, 79) Source(78, 58) + SourceIndex(0) -18>Emitted(67, 82) Source(78, 61) + SourceIndex(0) -19>Emitted(67, 83) Source(78, 62) + SourceIndex(0) -20>Emitted(67, 85) Source(78, 64) + SourceIndex(0) -21>Emitted(67, 86) Source(78, 65) + SourceIndex(0) -22>Emitted(67, 88) Source(78, 67) + SourceIndex(0) -23>Emitted(67, 90) Source(78, 69) + SourceIndex(0) -24>Emitted(67, 91) Source(78, 70) + SourceIndex(0) +4 >Emitted(67, 6) Source(78, 10) + SourceIndex(0) +5 >Emitted(67, 25) Source(78, 48) + SourceIndex(0) +6 >Emitted(67, 27) Source(78, 11) + SourceIndex(0) +7 >Emitted(67, 43) Source(78, 19) + SourceIndex(0) +8 >Emitted(67, 45) Source(78, 21) + SourceIndex(0) +9 >Emitted(67, 69) Source(78, 34) + SourceIndex(0) +10>Emitted(67, 71) Source(78, 50) + SourceIndex(0) +11>Emitted(67, 72) Source(78, 51) + SourceIndex(0) +12>Emitted(67, 75) Source(78, 54) + SourceIndex(0) +13>Emitted(67, 76) Source(78, 55) + SourceIndex(0) +14>Emitted(67, 78) Source(78, 57) + SourceIndex(0) +15>Emitted(67, 79) Source(78, 58) + SourceIndex(0) +16>Emitted(67, 82) Source(78, 61) + SourceIndex(0) +17>Emitted(67, 83) Source(78, 62) + SourceIndex(0) +18>Emitted(67, 85) Source(78, 64) + SourceIndex(0) +19>Emitted(67, 86) Source(78, 65) + SourceIndex(0) +20>Emitted(67, 88) Source(78, 67) + SourceIndex(0) +21>Emitted(67, 90) Source(78, 69) + SourceIndex(0) +22>Emitted(67, 91) Source(78, 70) + SourceIndex(0) --- >>> console.log(numberA3); 1 >^^^^ @@ -2415,75 +2295,69 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^^^^^^^^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^^ -19> ^ -20> ^^ -21> ^ -22> ^^ -23> ^^ -24> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > -7 > [numberA3, ...robotAInfo] = [2, "trimmer", "trimming"] -8 > -9 > numberA3 -10> , -11> ...robotAInfo -12> ] = [2, "trimmer", "trimming"], -13> i -14> = -15> 0 -16> ; -17> i -18> < -19> 1 -20> ; -21> i -22> ++ -23> ) -24> { +4 > (let +5 > [numberA3, ...robotAInfo] = [2, "trimmer", "trimming"] +6 > +7 > numberA3 +8 > , +9 > ...robotAInfo +10> ] = [2, "trimmer", "trimming"], +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { 1->Emitted(70, 1) Source(81, 1) + SourceIndex(0) 2 >Emitted(70, 4) Source(81, 4) + SourceIndex(0) 3 >Emitted(70, 5) Source(81, 5) + SourceIndex(0) -4 >Emitted(70, 6) Source(81, 6) + SourceIndex(0) -5 >Emitted(70, 9) Source(81, 9) + SourceIndex(0) -6 >Emitted(70, 10) Source(81, 10) + SourceIndex(0) -7 >Emitted(70, 41) Source(81, 64) + SourceIndex(0) -8 >Emitted(70, 43) Source(81, 11) + SourceIndex(0) -9 >Emitted(70, 59) Source(81, 19) + SourceIndex(0) -10>Emitted(70, 61) Source(81, 21) + SourceIndex(0) -11>Emitted(70, 85) Source(81, 34) + SourceIndex(0) -12>Emitted(70, 87) Source(81, 66) + SourceIndex(0) -13>Emitted(70, 88) Source(81, 67) + SourceIndex(0) -14>Emitted(70, 91) Source(81, 70) + SourceIndex(0) -15>Emitted(70, 92) Source(81, 71) + SourceIndex(0) -16>Emitted(70, 94) Source(81, 73) + SourceIndex(0) -17>Emitted(70, 95) Source(81, 74) + SourceIndex(0) -18>Emitted(70, 98) Source(81, 77) + SourceIndex(0) -19>Emitted(70, 99) Source(81, 78) + SourceIndex(0) -20>Emitted(70, 101) Source(81, 80) + SourceIndex(0) -21>Emitted(70, 102) Source(81, 81) + SourceIndex(0) -22>Emitted(70, 104) Source(81, 83) + SourceIndex(0) -23>Emitted(70, 106) Source(81, 85) + SourceIndex(0) -24>Emitted(70, 107) Source(81, 86) + SourceIndex(0) +4 >Emitted(70, 6) Source(81, 10) + SourceIndex(0) +5 >Emitted(70, 41) Source(81, 64) + SourceIndex(0) +6 >Emitted(70, 43) Source(81, 11) + SourceIndex(0) +7 >Emitted(70, 59) Source(81, 19) + SourceIndex(0) +8 >Emitted(70, 61) Source(81, 21) + SourceIndex(0) +9 >Emitted(70, 85) Source(81, 34) + SourceIndex(0) +10>Emitted(70, 87) Source(81, 66) + SourceIndex(0) +11>Emitted(70, 88) Source(81, 67) + SourceIndex(0) +12>Emitted(70, 91) Source(81, 70) + SourceIndex(0) +13>Emitted(70, 92) Source(81, 71) + SourceIndex(0) +14>Emitted(70, 94) Source(81, 73) + SourceIndex(0) +15>Emitted(70, 95) Source(81, 74) + SourceIndex(0) +16>Emitted(70, 98) Source(81, 77) + SourceIndex(0) +17>Emitted(70, 99) Source(81, 78) + SourceIndex(0) +18>Emitted(70, 101) Source(81, 80) + SourceIndex(0) +19>Emitted(70, 102) Source(81, 81) + SourceIndex(0) +20>Emitted(70, 104) Source(81, 83) + SourceIndex(0) +21>Emitted(70, 106) Source(81, 85) + SourceIndex(0) +22>Emitted(70, 107) Source(81, 86) + SourceIndex(0) --- >>> console.log(numberA3); 1 >^^^^ @@ -2527,63 +2401,57 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^ -10> ^^^ -11> ^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^ -19> ^^ -20> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^ +8 > ^^^ +9 > ^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^ +17> ^^ +18> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > -7 > [...multiRobotAInfo] = multiRobotA -8 > , -9 > i -10> = -11> 0 -12> ; -13> i -14> < -15> 1 -16> ; -17> i -18> ++ -19> ) -20> { +4 > (let [ +5 > ...multiRobotAInfo +6 > ] = multiRobotA, +7 > i +8 > = +9 > 0 +10> ; +11> i +12> < +13> 1 +14> ; +15> i +16> ++ +17> ) +18> { 1->Emitted(73, 1) Source(84, 1) + SourceIndex(0) 2 >Emitted(73, 4) Source(84, 4) + SourceIndex(0) 3 >Emitted(73, 5) Source(84, 5) + SourceIndex(0) -4 >Emitted(73, 6) Source(84, 6) + SourceIndex(0) -5 >Emitted(73, 9) Source(84, 9) + SourceIndex(0) -6 >Emitted(73, 10) Source(84, 10) + SourceIndex(0) -7 >Emitted(73, 48) Source(84, 44) + SourceIndex(0) -8 >Emitted(73, 50) Source(84, 46) + SourceIndex(0) -9 >Emitted(73, 51) Source(84, 47) + SourceIndex(0) -10>Emitted(73, 54) Source(84, 50) + SourceIndex(0) -11>Emitted(73, 55) Source(84, 51) + SourceIndex(0) -12>Emitted(73, 57) Source(84, 53) + SourceIndex(0) -13>Emitted(73, 58) Source(84, 54) + SourceIndex(0) -14>Emitted(73, 61) Source(84, 57) + SourceIndex(0) -15>Emitted(73, 62) Source(84, 58) + SourceIndex(0) -16>Emitted(73, 64) Source(84, 60) + SourceIndex(0) -17>Emitted(73, 65) Source(84, 61) + SourceIndex(0) -18>Emitted(73, 67) Source(84, 63) + SourceIndex(0) -19>Emitted(73, 69) Source(84, 65) + SourceIndex(0) -20>Emitted(73, 70) Source(84, 66) + SourceIndex(0) +4 >Emitted(73, 6) Source(84, 11) + SourceIndex(0) +5 >Emitted(73, 48) Source(84, 29) + SourceIndex(0) +6 >Emitted(73, 50) Source(84, 46) + SourceIndex(0) +7 >Emitted(73, 51) Source(84, 47) + SourceIndex(0) +8 >Emitted(73, 54) Source(84, 50) + SourceIndex(0) +9 >Emitted(73, 55) Source(84, 51) + SourceIndex(0) +10>Emitted(73, 57) Source(84, 53) + SourceIndex(0) +11>Emitted(73, 58) Source(84, 54) + SourceIndex(0) +12>Emitted(73, 61) Source(84, 57) + SourceIndex(0) +13>Emitted(73, 62) Source(84, 58) + SourceIndex(0) +14>Emitted(73, 64) Source(84, 60) + SourceIndex(0) +15>Emitted(73, 65) Source(84, 61) + SourceIndex(0) +16>Emitted(73, 67) Source(84, 63) + SourceIndex(0) +17>Emitted(73, 69) Source(84, 65) + SourceIndex(0) +18>Emitted(73, 70) Source(84, 66) + SourceIndex(0) --- >>> console.log(multiRobotAInfo); 1 >^^^^ @@ -2627,63 +2495,57 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^ -10> ^^^ -11> ^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^ -19> ^^ -20> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^ +8 > ^^^ +9 > ^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^ +17> ^^ +18> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > -7 > [...multiRobotAInfo] = getMultiRobot() -8 > , -9 > i -10> = -11> 0 -12> ; -13> i -14> < -15> 1 -16> ; -17> i -18> ++ -19> ) -20> { +4 > (let [ +5 > ...multiRobotAInfo +6 > ] = getMultiRobot(), +7 > i +8 > = +9 > 0 +10> ; +11> i +12> < +13> 1 +14> ; +15> i +16> ++ +17> ) +18> { 1->Emitted(76, 1) Source(87, 1) + SourceIndex(0) 2 >Emitted(76, 4) Source(87, 4) + SourceIndex(0) 3 >Emitted(76, 5) Source(87, 5) + SourceIndex(0) -4 >Emitted(76, 6) Source(87, 6) + SourceIndex(0) -5 >Emitted(76, 9) Source(87, 9) + SourceIndex(0) -6 >Emitted(76, 10) Source(87, 10) + SourceIndex(0) -7 >Emitted(76, 52) Source(87, 48) + SourceIndex(0) -8 >Emitted(76, 54) Source(87, 50) + SourceIndex(0) -9 >Emitted(76, 55) Source(87, 51) + SourceIndex(0) -10>Emitted(76, 58) Source(87, 54) + SourceIndex(0) -11>Emitted(76, 59) Source(87, 55) + SourceIndex(0) -12>Emitted(76, 61) Source(87, 57) + SourceIndex(0) -13>Emitted(76, 62) Source(87, 58) + SourceIndex(0) -14>Emitted(76, 65) Source(87, 61) + SourceIndex(0) -15>Emitted(76, 66) Source(87, 62) + SourceIndex(0) -16>Emitted(76, 68) Source(87, 64) + SourceIndex(0) -17>Emitted(76, 69) Source(87, 65) + SourceIndex(0) -18>Emitted(76, 71) Source(87, 67) + SourceIndex(0) -19>Emitted(76, 73) Source(87, 69) + SourceIndex(0) -20>Emitted(76, 74) Source(87, 70) + SourceIndex(0) +4 >Emitted(76, 6) Source(87, 11) + SourceIndex(0) +5 >Emitted(76, 52) Source(87, 29) + SourceIndex(0) +6 >Emitted(76, 54) Source(87, 50) + SourceIndex(0) +7 >Emitted(76, 55) Source(87, 51) + SourceIndex(0) +8 >Emitted(76, 58) Source(87, 54) + SourceIndex(0) +9 >Emitted(76, 59) Source(87, 55) + SourceIndex(0) +10>Emitted(76, 61) Source(87, 57) + SourceIndex(0) +11>Emitted(76, 62) Source(87, 58) + SourceIndex(0) +12>Emitted(76, 65) Source(87, 61) + SourceIndex(0) +13>Emitted(76, 66) Source(87, 62) + SourceIndex(0) +14>Emitted(76, 68) Source(87, 64) + SourceIndex(0) +15>Emitted(76, 69) Source(87, 65) + SourceIndex(0) +16>Emitted(76, 71) Source(87, 67) + SourceIndex(0) +17>Emitted(76, 73) Source(87, 69) + SourceIndex(0) +18>Emitted(76, 74) Source(87, 70) + SourceIndex(0) --- >>> console.log(multiRobotAInfo); 1 >^^^^ @@ -2727,63 +2589,57 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^ -10> ^^^ -11> ^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^ -19> ^^ -20> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^ +8 > ^^^ +9 > ^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^ +17> ^^ +18> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > -7 > [...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]] -8 > , -9 > i -10> = -11> 0 -12> ; -13> i -14> < -15> 1 -16> ; -17> i -18> ++ -19> ) -20> { +4 > (let [ +5 > ...multiRobotAInfo +6 > ] = ["trimmer", ["trimming", "edging"]], +7 > i +8 > = +9 > 0 +10> ; +11> i +12> < +13> 1 +14> ; +15> i +16> ++ +17> ) +18> { 1->Emitted(79, 1) Source(90, 1) + SourceIndex(0) 2 >Emitted(79, 4) Source(90, 4) + SourceIndex(0) 3 >Emitted(79, 5) Source(90, 5) + SourceIndex(0) -4 >Emitted(79, 6) Source(90, 6) + SourceIndex(0) -5 >Emitted(79, 9) Source(90, 9) + SourceIndex(0) -6 >Emitted(79, 10) Source(90, 10) + SourceIndex(0) -7 >Emitted(79, 72) Source(90, 68) + SourceIndex(0) -8 >Emitted(79, 74) Source(90, 70) + SourceIndex(0) -9 >Emitted(79, 75) Source(90, 71) + SourceIndex(0) -10>Emitted(79, 78) Source(90, 74) + SourceIndex(0) -11>Emitted(79, 79) Source(90, 75) + SourceIndex(0) -12>Emitted(79, 81) Source(90, 77) + SourceIndex(0) -13>Emitted(79, 82) Source(90, 78) + SourceIndex(0) -14>Emitted(79, 85) Source(90, 81) + SourceIndex(0) -15>Emitted(79, 86) Source(90, 82) + SourceIndex(0) -16>Emitted(79, 88) Source(90, 84) + SourceIndex(0) -17>Emitted(79, 89) Source(90, 85) + SourceIndex(0) -18>Emitted(79, 91) Source(90, 87) + SourceIndex(0) -19>Emitted(79, 93) Source(90, 89) + SourceIndex(0) -20>Emitted(79, 94) Source(90, 90) + SourceIndex(0) +4 >Emitted(79, 6) Source(90, 11) + SourceIndex(0) +5 >Emitted(79, 72) Source(90, 29) + SourceIndex(0) +6 >Emitted(79, 74) Source(90, 70) + SourceIndex(0) +7 >Emitted(79, 75) Source(90, 71) + SourceIndex(0) +8 >Emitted(79, 78) Source(90, 74) + SourceIndex(0) +9 >Emitted(79, 79) Source(90, 75) + SourceIndex(0) +10>Emitted(79, 81) Source(90, 77) + SourceIndex(0) +11>Emitted(79, 82) Source(90, 78) + SourceIndex(0) +12>Emitted(79, 85) Source(90, 81) + SourceIndex(0) +13>Emitted(79, 86) Source(90, 82) + SourceIndex(0) +14>Emitted(79, 88) Source(90, 84) + SourceIndex(0) +15>Emitted(79, 89) Source(90, 85) + SourceIndex(0) +16>Emitted(79, 91) Source(90, 87) + SourceIndex(0) +17>Emitted(79, 93) Source(90, 89) + SourceIndex(0) +18>Emitted(79, 94) Source(90, 90) + SourceIndex(0) --- >>> console.log(multiRobotAInfo); 1 >^^^^ diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.js.map index 2c3f4eb1264..ba21829737b 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringForObjectBindingPattern.js.map] -{"version":3,"file":"sourceMapValidationDestructuringForObjectBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForObjectBindingPattern.ts"],"names":[],"mappings":"AAgBA,IAAI,KAAK,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACtD,IAAI,UAAU,GAAe,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;AACjG;IACI,MAAM,CAAC,KAAK,CAAC;AACjB,CAAC;AACD;IACI,MAAM,CAAC,UAAU,CAAC;AACtB,CAAC;AAED,GAAG,CAAC,CAAC,GAAG,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AAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringForObjectBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForObjectBindingPattern.ts"],"names":[],"mappings":"AAgBA,IAAI,KAAK,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACtD,IAAI,UAAU,GAAe,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;AACjG;IACI,MAAM,CAAC,KAAK,CAAC;AACjB,CAAC;AACD;IACI,MAAM,CAAC,UAAU,CAAC;AACtB,CAAC;AAED,GAAG,CAAC,CAAM,sBAAW,EAAY,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAM,2BAAW,EAAiB,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACtD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAM,uDAAW,EAAoD,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACzF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAO,0BAAoD,EAA1C,qBAAiB,EAAE,yBAAqB,EAAmB,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAChG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAO,+BAAoD,EAA1C,qBAAiB,EAAE,yBAAqB,EAAwB,CAAC,GAAG,CAA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E,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjH,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAK,kFACgF,EAD/E,eAAW,EAAE,cAAoD,EAA1C,qBAAiB,EAAE,yBAAqB,EAErE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACpB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.sourcemap.txt index cac10b04888..d68da51e880 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.sourcemap.txt @@ -213,64 +213,58 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^ -10> ^^^ -11> ^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^ -19> ^^ -20> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^ +8 > ^^^ +9 > ^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^ +17> ^^ +18> ^ 1-> > > 2 >for 3 > -4 > ( -5 > let -6 > -7 > {name: nameA } = robot -8 > , -9 > i -10> = -11> 0 -12> ; -13> i -14> < -15> 1 -16> ; -17> i -18> ++ -19> ) -20> { +4 > (let { +5 > name: nameA +6 > } = robot, +7 > i +8 > = +9 > 0 +10> ; +11> i +12> < +13> 1 +14> ; +15> i +16> ++ +17> ) +18> { 1->Emitted(9, 1) Source(26, 1) + SourceIndex(0) 2 >Emitted(9, 4) Source(26, 4) + SourceIndex(0) 3 >Emitted(9, 5) Source(26, 5) + SourceIndex(0) -4 >Emitted(9, 6) Source(26, 6) + SourceIndex(0) -5 >Emitted(9, 9) Source(26, 9) + SourceIndex(0) -6 >Emitted(9, 10) Source(26, 10) + SourceIndex(0) -7 >Emitted(9, 28) Source(26, 32) + SourceIndex(0) -8 >Emitted(9, 30) Source(26, 34) + SourceIndex(0) -9 >Emitted(9, 31) Source(26, 35) + SourceIndex(0) -10>Emitted(9, 34) Source(26, 38) + SourceIndex(0) -11>Emitted(9, 35) Source(26, 39) + SourceIndex(0) -12>Emitted(9, 37) Source(26, 41) + SourceIndex(0) -13>Emitted(9, 38) Source(26, 42) + SourceIndex(0) -14>Emitted(9, 41) Source(26, 45) + SourceIndex(0) -15>Emitted(9, 42) Source(26, 46) + SourceIndex(0) -16>Emitted(9, 44) Source(26, 48) + SourceIndex(0) -17>Emitted(9, 45) Source(26, 49) + SourceIndex(0) -18>Emitted(9, 47) Source(26, 51) + SourceIndex(0) -19>Emitted(9, 49) Source(26, 53) + SourceIndex(0) -20>Emitted(9, 50) Source(26, 54) + SourceIndex(0) +4 >Emitted(9, 6) Source(26, 11) + SourceIndex(0) +5 >Emitted(9, 28) Source(26, 22) + SourceIndex(0) +6 >Emitted(9, 30) Source(26, 34) + SourceIndex(0) +7 >Emitted(9, 31) Source(26, 35) + SourceIndex(0) +8 >Emitted(9, 34) Source(26, 38) + SourceIndex(0) +9 >Emitted(9, 35) Source(26, 39) + SourceIndex(0) +10>Emitted(9, 37) Source(26, 41) + SourceIndex(0) +11>Emitted(9, 38) Source(26, 42) + SourceIndex(0) +12>Emitted(9, 41) Source(26, 45) + SourceIndex(0) +13>Emitted(9, 42) Source(26, 46) + SourceIndex(0) +14>Emitted(9, 44) Source(26, 48) + SourceIndex(0) +15>Emitted(9, 45) Source(26, 49) + SourceIndex(0) +16>Emitted(9, 47) Source(26, 51) + SourceIndex(0) +17>Emitted(9, 49) Source(26, 53) + SourceIndex(0) +18>Emitted(9, 50) Source(26, 54) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -314,63 +308,57 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^ -10> ^^^ -11> ^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^ -19> ^^ -20> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^ +8 > ^^^ +9 > ^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^ +17> ^^ +18> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > -7 > {name: nameA } = getRobot() -8 > , -9 > i -10> = -11> 0 -12> ; -13> i -14> < -15> 1 -16> ; -17> i -18> ++ -19> ) -20> { +4 > (let { +5 > name: nameA +6 > } = getRobot(), +7 > i +8 > = +9 > 0 +10> ; +11> i +12> < +13> 1 +14> ; +15> i +16> ++ +17> ) +18> { 1->Emitted(12, 1) Source(29, 1) + SourceIndex(0) 2 >Emitted(12, 4) Source(29, 4) + SourceIndex(0) 3 >Emitted(12, 5) Source(29, 5) + SourceIndex(0) -4 >Emitted(12, 6) Source(29, 6) + SourceIndex(0) -5 >Emitted(12, 9) Source(29, 9) + SourceIndex(0) -6 >Emitted(12, 10) Source(29, 10) + SourceIndex(0) -7 >Emitted(12, 33) Source(29, 37) + SourceIndex(0) -8 >Emitted(12, 35) Source(29, 39) + SourceIndex(0) -9 >Emitted(12, 36) Source(29, 40) + SourceIndex(0) -10>Emitted(12, 39) Source(29, 43) + SourceIndex(0) -11>Emitted(12, 40) Source(29, 44) + SourceIndex(0) -12>Emitted(12, 42) Source(29, 46) + SourceIndex(0) -13>Emitted(12, 43) Source(29, 47) + SourceIndex(0) -14>Emitted(12, 46) Source(29, 50) + SourceIndex(0) -15>Emitted(12, 47) Source(29, 51) + SourceIndex(0) -16>Emitted(12, 49) Source(29, 53) + SourceIndex(0) -17>Emitted(12, 50) Source(29, 54) + SourceIndex(0) -18>Emitted(12, 52) Source(29, 56) + SourceIndex(0) -19>Emitted(12, 54) Source(29, 58) + SourceIndex(0) -20>Emitted(12, 55) Source(29, 59) + SourceIndex(0) +4 >Emitted(12, 6) Source(29, 11) + SourceIndex(0) +5 >Emitted(12, 33) Source(29, 22) + SourceIndex(0) +6 >Emitted(12, 35) Source(29, 39) + SourceIndex(0) +7 >Emitted(12, 36) Source(29, 40) + SourceIndex(0) +8 >Emitted(12, 39) Source(29, 43) + SourceIndex(0) +9 >Emitted(12, 40) Source(29, 44) + SourceIndex(0) +10>Emitted(12, 42) Source(29, 46) + SourceIndex(0) +11>Emitted(12, 43) Source(29, 47) + SourceIndex(0) +12>Emitted(12, 46) Source(29, 50) + SourceIndex(0) +13>Emitted(12, 47) Source(29, 51) + SourceIndex(0) +14>Emitted(12, 49) Source(29, 53) + SourceIndex(0) +15>Emitted(12, 50) Source(29, 54) + SourceIndex(0) +16>Emitted(12, 52) Source(29, 56) + SourceIndex(0) +17>Emitted(12, 54) Source(29, 58) + SourceIndex(0) +18>Emitted(12, 55) Source(29, 59) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -414,63 +402,57 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^ -10> ^^^ -11> ^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^ -19> ^^ -20> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^ +8 > ^^^ +9 > ^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^ +17> ^^ +18> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > -7 > {name: nameA } = { name: "trimmer", skill: "trimming" } -8 > , -9 > i -10> = -11> 0 -12> ; -13> i -14> < -15> 1 -16> ; -17> i -18> ++ -19> ) -20> { +4 > (let { +5 > name: nameA +6 > } = { name: "trimmer", skill: "trimming" }, +7 > i +8 > = +9 > 0 +10> ; +11> i +12> < +13> 1 +14> ; +15> i +16> ++ +17> ) +18> { 1->Emitted(15, 1) Source(32, 1) + SourceIndex(0) 2 >Emitted(15, 4) Source(32, 4) + SourceIndex(0) 3 >Emitted(15, 5) Source(32, 5) + SourceIndex(0) -4 >Emitted(15, 6) Source(32, 6) + SourceIndex(0) -5 >Emitted(15, 9) Source(32, 9) + SourceIndex(0) -6 >Emitted(15, 10) Source(32, 10) + SourceIndex(0) -7 >Emitted(15, 61) Source(32, 72) + SourceIndex(0) -8 >Emitted(15, 63) Source(32, 74) + SourceIndex(0) -9 >Emitted(15, 64) Source(32, 75) + SourceIndex(0) -10>Emitted(15, 67) Source(32, 78) + SourceIndex(0) -11>Emitted(15, 68) Source(32, 79) + SourceIndex(0) -12>Emitted(15, 70) Source(32, 81) + SourceIndex(0) -13>Emitted(15, 71) Source(32, 82) + SourceIndex(0) -14>Emitted(15, 74) Source(32, 85) + SourceIndex(0) -15>Emitted(15, 75) Source(32, 86) + SourceIndex(0) -16>Emitted(15, 77) Source(32, 88) + SourceIndex(0) -17>Emitted(15, 78) Source(32, 89) + SourceIndex(0) -18>Emitted(15, 80) Source(32, 91) + SourceIndex(0) -19>Emitted(15, 82) Source(32, 93) + SourceIndex(0) -20>Emitted(15, 83) Source(32, 94) + SourceIndex(0) +4 >Emitted(15, 6) Source(32, 11) + SourceIndex(0) +5 >Emitted(15, 61) Source(32, 22) + SourceIndex(0) +6 >Emitted(15, 63) Source(32, 74) + SourceIndex(0) +7 >Emitted(15, 64) Source(32, 75) + SourceIndex(0) +8 >Emitted(15, 67) Source(32, 78) + SourceIndex(0) +9 >Emitted(15, 68) Source(32, 79) + SourceIndex(0) +10>Emitted(15, 70) Source(32, 81) + SourceIndex(0) +11>Emitted(15, 71) Source(32, 82) + SourceIndex(0) +12>Emitted(15, 74) Source(32, 85) + SourceIndex(0) +13>Emitted(15, 75) Source(32, 86) + SourceIndex(0) +14>Emitted(15, 77) Source(32, 88) + SourceIndex(0) +15>Emitted(15, 78) Source(32, 89) + SourceIndex(0) +16>Emitted(15, 80) Source(32, 91) + SourceIndex(0) +17>Emitted(15, 82) Source(32, 93) + SourceIndex(0) +18>Emitted(15, 83) Source(32, 94) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -514,75 +496,69 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^^^^^^^^^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^^ -19> ^ -20> ^^ -21> ^ -22> ^^ -23> ^^ -24> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > { -7 > skills -8 > : { -9 > primary: primaryA -10> , -11> secondary: secondaryA -12> } } = multiRobot, -13> i -14> = -15> 0 -16> ; -17> i -18> < -19> 1 -20> ; -21> i -22> ++ -23> ) -24> { +4 > (let { +5 > skills: { primary: primaryA, secondary: secondaryA } +6 > +7 > primary: primaryA +8 > , +9 > secondary: secondaryA +10> } } = multiRobot, +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { 1->Emitted(18, 1) Source(35, 1) + SourceIndex(0) 2 >Emitted(18, 4) Source(35, 4) + SourceIndex(0) 3 >Emitted(18, 5) Source(35, 5) + SourceIndex(0) -4 >Emitted(18, 6) Source(35, 6) + SourceIndex(0) -5 >Emitted(18, 9) Source(35, 9) + SourceIndex(0) -6 >Emitted(18, 10) Source(35, 12) + SourceIndex(0) -7 >Emitted(18, 32) Source(35, 18) + SourceIndex(0) -8 >Emitted(18, 34) Source(35, 22) + SourceIndex(0) -9 >Emitted(18, 55) Source(35, 39) + SourceIndex(0) -10>Emitted(18, 57) Source(35, 41) + SourceIndex(0) -11>Emitted(18, 82) Source(35, 62) + SourceIndex(0) -12>Emitted(18, 84) Source(35, 81) + SourceIndex(0) -13>Emitted(18, 85) Source(35, 82) + SourceIndex(0) -14>Emitted(18, 88) Source(35, 85) + SourceIndex(0) -15>Emitted(18, 89) Source(35, 86) + SourceIndex(0) -16>Emitted(18, 91) Source(35, 88) + SourceIndex(0) -17>Emitted(18, 92) Source(35, 89) + SourceIndex(0) -18>Emitted(18, 95) Source(35, 92) + SourceIndex(0) -19>Emitted(18, 96) Source(35, 93) + SourceIndex(0) -20>Emitted(18, 98) Source(35, 95) + SourceIndex(0) -21>Emitted(18, 99) Source(35, 96) + SourceIndex(0) -22>Emitted(18, 101) Source(35, 98) + SourceIndex(0) -23>Emitted(18, 103) Source(35, 100) + SourceIndex(0) -24>Emitted(18, 104) Source(35, 101) + SourceIndex(0) +4 >Emitted(18, 6) Source(35, 12) + SourceIndex(0) +5 >Emitted(18, 32) Source(35, 64) + SourceIndex(0) +6 >Emitted(18, 34) Source(35, 22) + SourceIndex(0) +7 >Emitted(18, 55) Source(35, 39) + SourceIndex(0) +8 >Emitted(18, 57) Source(35, 41) + SourceIndex(0) +9 >Emitted(18, 82) Source(35, 62) + SourceIndex(0) +10>Emitted(18, 84) Source(35, 81) + SourceIndex(0) +11>Emitted(18, 85) Source(35, 82) + SourceIndex(0) +12>Emitted(18, 88) Source(35, 85) + SourceIndex(0) +13>Emitted(18, 89) Source(35, 86) + SourceIndex(0) +14>Emitted(18, 91) Source(35, 88) + SourceIndex(0) +15>Emitted(18, 92) Source(35, 89) + SourceIndex(0) +16>Emitted(18, 95) Source(35, 92) + SourceIndex(0) +17>Emitted(18, 96) Source(35, 93) + SourceIndex(0) +18>Emitted(18, 98) Source(35, 95) + SourceIndex(0) +19>Emitted(18, 99) Source(35, 96) + SourceIndex(0) +20>Emitted(18, 101) Source(35, 98) + SourceIndex(0) +21>Emitted(18, 103) Source(35, 100) + SourceIndex(0) +22>Emitted(18, 104) Source(35, 101) + SourceIndex(0) --- >>> console.log(primaryA); 1 >^^^^ @@ -626,75 +602,69 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^^^^^^^^^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^^ -19> ^ -20> ^^ -21> ^ -22> ^^ -23> ^^ -24> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > { -7 > skills -8 > : { -9 > primary: primaryA -10> , -11> secondary: secondaryA -12> } } = getMultiRobot(), -13> i -14> = -15> 0 -16> ; -17> i -18> < -19> 1 -20> ; -21> i -22> ++ -23> ) -24> { +4 > (let { +5 > skills: { primary: primaryA, secondary: secondaryA } +6 > +7 > primary: primaryA +8 > , +9 > secondary: secondaryA +10> } } = getMultiRobot(), +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { 1->Emitted(21, 1) Source(38, 1) + SourceIndex(0) 2 >Emitted(21, 4) Source(38, 4) + SourceIndex(0) 3 >Emitted(21, 5) Source(38, 5) + SourceIndex(0) -4 >Emitted(21, 6) Source(38, 6) + SourceIndex(0) -5 >Emitted(21, 9) Source(38, 9) + SourceIndex(0) -6 >Emitted(21, 10) Source(38, 12) + SourceIndex(0) -7 >Emitted(21, 37) Source(38, 18) + SourceIndex(0) -8 >Emitted(21, 39) Source(38, 22) + SourceIndex(0) -9 >Emitted(21, 60) Source(38, 39) + SourceIndex(0) -10>Emitted(21, 62) Source(38, 41) + SourceIndex(0) -11>Emitted(21, 87) Source(38, 62) + SourceIndex(0) -12>Emitted(21, 89) Source(38, 86) + SourceIndex(0) -13>Emitted(21, 90) Source(38, 87) + SourceIndex(0) -14>Emitted(21, 93) Source(38, 90) + SourceIndex(0) -15>Emitted(21, 94) Source(38, 91) + SourceIndex(0) -16>Emitted(21, 96) Source(38, 93) + SourceIndex(0) -17>Emitted(21, 97) Source(38, 94) + SourceIndex(0) -18>Emitted(21, 100) Source(38, 97) + SourceIndex(0) -19>Emitted(21, 101) Source(38, 98) + SourceIndex(0) -20>Emitted(21, 103) Source(38, 100) + SourceIndex(0) -21>Emitted(21, 104) Source(38, 101) + SourceIndex(0) -22>Emitted(21, 106) Source(38, 103) + SourceIndex(0) -23>Emitted(21, 108) Source(38, 105) + SourceIndex(0) -24>Emitted(21, 109) Source(38, 106) + SourceIndex(0) +4 >Emitted(21, 6) Source(38, 12) + SourceIndex(0) +5 >Emitted(21, 37) Source(38, 64) + SourceIndex(0) +6 >Emitted(21, 39) Source(38, 22) + SourceIndex(0) +7 >Emitted(21, 60) Source(38, 39) + SourceIndex(0) +8 >Emitted(21, 62) Source(38, 41) + SourceIndex(0) +9 >Emitted(21, 87) Source(38, 62) + SourceIndex(0) +10>Emitted(21, 89) Source(38, 86) + SourceIndex(0) +11>Emitted(21, 90) Source(38, 87) + SourceIndex(0) +12>Emitted(21, 93) Source(38, 90) + SourceIndex(0) +13>Emitted(21, 94) Source(38, 91) + SourceIndex(0) +14>Emitted(21, 96) Source(38, 93) + SourceIndex(0) +15>Emitted(21, 97) Source(38, 94) + SourceIndex(0) +16>Emitted(21, 100) Source(38, 97) + SourceIndex(0) +17>Emitted(21, 101) Source(38, 98) + SourceIndex(0) +18>Emitted(21, 103) Source(38, 100) + SourceIndex(0) +19>Emitted(21, 104) Source(38, 101) + SourceIndex(0) +20>Emitted(21, 106) Source(38, 103) + SourceIndex(0) +21>Emitted(21, 108) Source(38, 105) + SourceIndex(0) +22>Emitted(21, 109) Source(38, 106) + SourceIndex(0) --- >>> console.log(primaryA); 1 >^^^^ @@ -738,77 +708,71 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^^^^^^^^^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^^ -19> ^ -20> ^^ -21> ^ -22> ^^ -23> ^^ -24> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > { -7 > skills -8 > : { -9 > primary: primaryA -10> , -11> secondary: secondaryA -12> } } = +4 > (let { +5 > skills: { primary: primaryA, secondary: secondaryA } +6 > +7 > primary: primaryA +8 > , +9 > secondary: secondaryA +10> } } = > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, > -13> i -14> = -15> 0 -16> ; -17> i -18> < -19> 1 -20> ; -21> i -22> ++ -23> ) -24> { +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { 1->Emitted(24, 1) Source(41, 1) + SourceIndex(0) 2 >Emitted(24, 4) Source(41, 4) + SourceIndex(0) 3 >Emitted(24, 5) Source(41, 5) + SourceIndex(0) -4 >Emitted(24, 6) Source(41, 6) + SourceIndex(0) -5 >Emitted(24, 9) Source(41, 9) + SourceIndex(0) -6 >Emitted(24, 10) Source(41, 12) + SourceIndex(0) -7 >Emitted(24, 95) Source(41, 18) + SourceIndex(0) -8 >Emitted(24, 97) Source(41, 22) + SourceIndex(0) -9 >Emitted(24, 118) Source(41, 39) + SourceIndex(0) -10>Emitted(24, 120) Source(41, 41) + SourceIndex(0) -11>Emitted(24, 145) Source(41, 62) + SourceIndex(0) -12>Emitted(24, 147) Source(43, 5) + SourceIndex(0) -13>Emitted(24, 148) Source(43, 6) + SourceIndex(0) -14>Emitted(24, 151) Source(43, 9) + SourceIndex(0) -15>Emitted(24, 152) Source(43, 10) + SourceIndex(0) -16>Emitted(24, 154) Source(43, 12) + SourceIndex(0) -17>Emitted(24, 155) Source(43, 13) + SourceIndex(0) -18>Emitted(24, 158) Source(43, 16) + SourceIndex(0) -19>Emitted(24, 159) Source(43, 17) + SourceIndex(0) -20>Emitted(24, 161) Source(43, 19) + SourceIndex(0) -21>Emitted(24, 162) Source(43, 20) + SourceIndex(0) -22>Emitted(24, 164) Source(43, 22) + SourceIndex(0) -23>Emitted(24, 166) Source(43, 24) + SourceIndex(0) -24>Emitted(24, 167) Source(43, 25) + SourceIndex(0) +4 >Emitted(24, 6) Source(41, 12) + SourceIndex(0) +5 >Emitted(24, 95) Source(41, 64) + SourceIndex(0) +6 >Emitted(24, 97) Source(41, 22) + SourceIndex(0) +7 >Emitted(24, 118) Source(41, 39) + SourceIndex(0) +8 >Emitted(24, 120) Source(41, 41) + SourceIndex(0) +9 >Emitted(24, 145) Source(41, 62) + SourceIndex(0) +10>Emitted(24, 147) Source(43, 5) + SourceIndex(0) +11>Emitted(24, 148) Source(43, 6) + SourceIndex(0) +12>Emitted(24, 151) Source(43, 9) + SourceIndex(0) +13>Emitted(24, 152) Source(43, 10) + SourceIndex(0) +14>Emitted(24, 154) Source(43, 12) + SourceIndex(0) +15>Emitted(24, 155) Source(43, 13) + SourceIndex(0) +16>Emitted(24, 158) Source(43, 16) + SourceIndex(0) +17>Emitted(24, 159) Source(43, 17) + SourceIndex(0) +18>Emitted(24, 161) Source(43, 19) + SourceIndex(0) +19>Emitted(24, 162) Source(43, 20) + SourceIndex(0) +20>Emitted(24, 164) Source(43, 22) + SourceIndex(0) +21>Emitted(24, 166) Source(43, 24) + SourceIndex(0) +22>Emitted(24, 167) Source(43, 25) + SourceIndex(0) --- >>> console.log(primaryA); 1 >^^^^ @@ -852,70 +816,64 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^ -10> ^^ -11> ^ -12> ^^^ -13> ^ -14> ^^ -15> ^ -16> ^^^ -17> ^ -18> ^^ -19> ^ -20> ^^ -21> ^^ -22> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ 1-> > > 2 >for 3 > -4 > ( -5 > let -6 > { -7 > name: nameA -8 > , -9 > skill: skillA -10> } = robot, -11> i -12> = -13> 0 -14> ; -15> i -16> < -17> 1 -18> ; -19> i -20> ++ -21> ) -22> { +4 > (let { +5 > name: nameA +6 > , +7 > skill: skillA +8 > } = robot, +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { 1->Emitted(27, 1) Source(47, 1) + SourceIndex(0) 2 >Emitted(27, 4) Source(47, 4) + SourceIndex(0) 3 >Emitted(27, 5) Source(47, 5) + SourceIndex(0) -4 >Emitted(27, 6) Source(47, 6) + SourceIndex(0) -5 >Emitted(27, 9) Source(47, 9) + SourceIndex(0) -6 >Emitted(27, 10) Source(47, 11) + SourceIndex(0) -7 >Emitted(27, 28) Source(47, 22) + SourceIndex(0) -8 >Emitted(27, 30) Source(47, 24) + SourceIndex(0) -9 >Emitted(27, 50) Source(47, 37) + SourceIndex(0) -10>Emitted(27, 52) Source(47, 49) + SourceIndex(0) -11>Emitted(27, 53) Source(47, 50) + SourceIndex(0) -12>Emitted(27, 56) Source(47, 53) + SourceIndex(0) -13>Emitted(27, 57) Source(47, 54) + SourceIndex(0) -14>Emitted(27, 59) Source(47, 56) + SourceIndex(0) -15>Emitted(27, 60) Source(47, 57) + SourceIndex(0) -16>Emitted(27, 63) Source(47, 60) + SourceIndex(0) -17>Emitted(27, 64) Source(47, 61) + SourceIndex(0) -18>Emitted(27, 66) Source(47, 63) + SourceIndex(0) -19>Emitted(27, 67) Source(47, 64) + SourceIndex(0) -20>Emitted(27, 69) Source(47, 66) + SourceIndex(0) -21>Emitted(27, 71) Source(47, 68) + SourceIndex(0) -22>Emitted(27, 72) Source(47, 69) + SourceIndex(0) +4 >Emitted(27, 6) Source(47, 11) + SourceIndex(0) +5 >Emitted(27, 28) Source(47, 22) + SourceIndex(0) +6 >Emitted(27, 30) Source(47, 24) + SourceIndex(0) +7 >Emitted(27, 50) Source(47, 37) + SourceIndex(0) +8 >Emitted(27, 52) Source(47, 49) + SourceIndex(0) +9 >Emitted(27, 53) Source(47, 50) + SourceIndex(0) +10>Emitted(27, 56) Source(47, 53) + SourceIndex(0) +11>Emitted(27, 57) Source(47, 54) + SourceIndex(0) +12>Emitted(27, 59) Source(47, 56) + SourceIndex(0) +13>Emitted(27, 60) Source(47, 57) + SourceIndex(0) +14>Emitted(27, 63) Source(47, 60) + SourceIndex(0) +15>Emitted(27, 64) Source(47, 61) + SourceIndex(0) +16>Emitted(27, 66) Source(47, 63) + SourceIndex(0) +17>Emitted(27, 67) Source(47, 64) + SourceIndex(0) +18>Emitted(27, 69) Source(47, 66) + SourceIndex(0) +19>Emitted(27, 71) Source(47, 68) + SourceIndex(0) +20>Emitted(27, 72) Source(47, 69) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -959,75 +917,69 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^^ -19> ^ -20> ^^ -21> ^ -22> ^^ -23> ^^ -24> ^ +5 > ^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > -7 > {name: nameA, skill: skillA } = getRobot() -8 > -9 > name: nameA -10> , -11> skill: skillA -12> } = getRobot(), -13> i -14> = -15> 0 -16> ; -17> i -18> < -19> 1 -20> ; -21> i -22> ++ -23> ) -24> { +4 > (let +5 > {name: nameA, skill: skillA } = getRobot() +6 > +7 > name: nameA +8 > , +9 > skill: skillA +10> } = getRobot(), +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { 1->Emitted(30, 1) Source(50, 1) + SourceIndex(0) 2 >Emitted(30, 4) Source(50, 4) + SourceIndex(0) 3 >Emitted(30, 5) Source(50, 5) + SourceIndex(0) -4 >Emitted(30, 6) Source(50, 6) + SourceIndex(0) -5 >Emitted(30, 9) Source(50, 9) + SourceIndex(0) -6 >Emitted(30, 10) Source(50, 10) + SourceIndex(0) -7 >Emitted(30, 25) Source(50, 52) + SourceIndex(0) -8 >Emitted(30, 27) Source(50, 11) + SourceIndex(0) -9 >Emitted(30, 42) Source(50, 22) + SourceIndex(0) -10>Emitted(30, 44) Source(50, 24) + SourceIndex(0) -11>Emitted(30, 61) Source(50, 37) + SourceIndex(0) -12>Emitted(30, 63) Source(50, 54) + SourceIndex(0) -13>Emitted(30, 64) Source(50, 55) + SourceIndex(0) -14>Emitted(30, 67) Source(50, 58) + SourceIndex(0) -15>Emitted(30, 68) Source(50, 59) + SourceIndex(0) -16>Emitted(30, 70) Source(50, 61) + SourceIndex(0) -17>Emitted(30, 71) Source(50, 62) + SourceIndex(0) -18>Emitted(30, 74) Source(50, 65) + SourceIndex(0) -19>Emitted(30, 75) Source(50, 66) + SourceIndex(0) -20>Emitted(30, 77) Source(50, 68) + SourceIndex(0) -21>Emitted(30, 78) Source(50, 69) + SourceIndex(0) -22>Emitted(30, 80) Source(50, 71) + SourceIndex(0) -23>Emitted(30, 82) Source(50, 73) + SourceIndex(0) -24>Emitted(30, 83) Source(50, 74) + SourceIndex(0) +4 >Emitted(30, 6) Source(50, 10) + SourceIndex(0) +5 >Emitted(30, 25) Source(50, 52) + SourceIndex(0) +6 >Emitted(30, 27) Source(50, 11) + SourceIndex(0) +7 >Emitted(30, 42) Source(50, 22) + SourceIndex(0) +8 >Emitted(30, 44) Source(50, 24) + SourceIndex(0) +9 >Emitted(30, 61) Source(50, 37) + SourceIndex(0) +10>Emitted(30, 63) Source(50, 54) + SourceIndex(0) +11>Emitted(30, 64) Source(50, 55) + SourceIndex(0) +12>Emitted(30, 67) Source(50, 58) + SourceIndex(0) +13>Emitted(30, 68) Source(50, 59) + SourceIndex(0) +14>Emitted(30, 70) Source(50, 61) + SourceIndex(0) +15>Emitted(30, 71) Source(50, 62) + SourceIndex(0) +16>Emitted(30, 74) Source(50, 65) + SourceIndex(0) +17>Emitted(30, 75) Source(50, 66) + SourceIndex(0) +18>Emitted(30, 77) Source(50, 68) + SourceIndex(0) +19>Emitted(30, 78) Source(50, 69) + SourceIndex(0) +20>Emitted(30, 80) Source(50, 71) + SourceIndex(0) +21>Emitted(30, 82) Source(50, 73) + SourceIndex(0) +22>Emitted(30, 83) Source(50, 74) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -1071,75 +1023,69 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^^ -19> ^ -20> ^^ -21> ^ -22> ^^ -23> ^^ -24> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > -7 > {name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" } -8 > -9 > name: nameA -10> , -11> skill: skillA -12> } = { name: "trimmer", skill: "trimming" }, -13> i -14> = -15> 0 -16> ; -17> i -18> < -19> 1 -20> ; -21> i -22> ++ -23> ) -24> { +4 > (let +5 > {name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" } +6 > +7 > name: nameA +8 > , +9 > skill: skillA +10> } = { name: "trimmer", skill: "trimming" }, +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { 1->Emitted(33, 1) Source(53, 1) + SourceIndex(0) 2 >Emitted(33, 4) Source(53, 4) + SourceIndex(0) 3 >Emitted(33, 5) Source(53, 5) + SourceIndex(0) -4 >Emitted(33, 6) Source(53, 6) + SourceIndex(0) -5 >Emitted(33, 9) Source(53, 9) + SourceIndex(0) -6 >Emitted(33, 10) Source(53, 10) + SourceIndex(0) -7 >Emitted(33, 53) Source(53, 87) + SourceIndex(0) -8 >Emitted(33, 55) Source(53, 11) + SourceIndex(0) -9 >Emitted(33, 70) Source(53, 22) + SourceIndex(0) -10>Emitted(33, 72) Source(53, 24) + SourceIndex(0) -11>Emitted(33, 89) Source(53, 37) + SourceIndex(0) -12>Emitted(33, 91) Source(53, 89) + SourceIndex(0) -13>Emitted(33, 92) Source(53, 90) + SourceIndex(0) -14>Emitted(33, 95) Source(53, 93) + SourceIndex(0) -15>Emitted(33, 96) Source(53, 94) + SourceIndex(0) -16>Emitted(33, 98) Source(53, 96) + SourceIndex(0) -17>Emitted(33, 99) Source(53, 97) + SourceIndex(0) -18>Emitted(33, 102) Source(53, 100) + SourceIndex(0) -19>Emitted(33, 103) Source(53, 101) + SourceIndex(0) -20>Emitted(33, 105) Source(53, 103) + SourceIndex(0) -21>Emitted(33, 106) Source(53, 104) + SourceIndex(0) -22>Emitted(33, 108) Source(53, 106) + SourceIndex(0) -23>Emitted(33, 110) Source(53, 108) + SourceIndex(0) -24>Emitted(33, 111) Source(53, 109) + SourceIndex(0) +4 >Emitted(33, 6) Source(53, 10) + SourceIndex(0) +5 >Emitted(33, 53) Source(53, 87) + SourceIndex(0) +6 >Emitted(33, 55) Source(53, 11) + SourceIndex(0) +7 >Emitted(33, 70) Source(53, 22) + SourceIndex(0) +8 >Emitted(33, 72) Source(53, 24) + SourceIndex(0) +9 >Emitted(33, 89) Source(53, 37) + SourceIndex(0) +10>Emitted(33, 91) Source(53, 89) + SourceIndex(0) +11>Emitted(33, 92) Source(53, 90) + SourceIndex(0) +12>Emitted(33, 95) Source(53, 93) + SourceIndex(0) +13>Emitted(33, 96) Source(53, 94) + SourceIndex(0) +14>Emitted(33, 98) Source(53, 96) + SourceIndex(0) +15>Emitted(33, 99) Source(53, 97) + SourceIndex(0) +16>Emitted(33, 102) Source(53, 100) + SourceIndex(0) +17>Emitted(33, 103) Source(53, 101) + SourceIndex(0) +18>Emitted(33, 105) Source(53, 103) + SourceIndex(0) +19>Emitted(33, 106) Source(53, 104) + SourceIndex(0) +20>Emitted(33, 108) Source(53, 106) + SourceIndex(0) +21>Emitted(33, 110) Source(53, 108) + SourceIndex(0) +22>Emitted(33, 111) Source(53, 109) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -1183,81 +1129,75 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^^^^^ -12> ^^ -13> ^^^^^^^^^^^^^^^^^^^^^^^^^ -14> ^^ -15> ^ -16> ^^^ -17> ^ -18> ^^ -19> ^ -20> ^^^ -21> ^ -22> ^^ -23> ^ -24> ^^ -25> ^^ -26> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > { -7 > name: nameA -8 > , -9 > skills -10> : { -11> primary: primaryA -12> , -13> secondary: secondaryA -14> } } = multiRobot, -15> i -16> = -17> 0 -18> ; -19> i -20> < -21> 1 -22> ; -23> i -24> ++ -25> ) -26> { +4 > (let { +5 > name: nameA +6 > , +7 > skills: { primary: primaryA, secondary: secondaryA } +8 > +9 > primary: primaryA +10> , +11> secondary: secondaryA +12> } } = multiRobot, +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { 1->Emitted(36, 1) Source(56, 1) + SourceIndex(0) 2 >Emitted(36, 4) Source(56, 4) + SourceIndex(0) 3 >Emitted(36, 5) Source(56, 5) + SourceIndex(0) -4 >Emitted(36, 6) Source(56, 6) + SourceIndex(0) -5 >Emitted(36, 9) Source(56, 9) + SourceIndex(0) -6 >Emitted(36, 10) Source(56, 11) + SourceIndex(0) -7 >Emitted(36, 33) Source(56, 22) + SourceIndex(0) -8 >Emitted(36, 35) Source(56, 24) + SourceIndex(0) -9 >Emitted(36, 57) Source(56, 30) + SourceIndex(0) -10>Emitted(36, 59) Source(56, 34) + SourceIndex(0) -11>Emitted(36, 80) Source(56, 51) + SourceIndex(0) -12>Emitted(36, 82) Source(56, 53) + SourceIndex(0) -13>Emitted(36, 107) Source(56, 74) + SourceIndex(0) -14>Emitted(36, 109) Source(56, 93) + SourceIndex(0) -15>Emitted(36, 110) Source(56, 94) + SourceIndex(0) -16>Emitted(36, 113) Source(56, 97) + SourceIndex(0) -17>Emitted(36, 114) Source(56, 98) + SourceIndex(0) -18>Emitted(36, 116) Source(56, 100) + SourceIndex(0) -19>Emitted(36, 117) Source(56, 101) + SourceIndex(0) -20>Emitted(36, 120) Source(56, 104) + SourceIndex(0) -21>Emitted(36, 121) Source(56, 105) + SourceIndex(0) -22>Emitted(36, 123) Source(56, 107) + SourceIndex(0) -23>Emitted(36, 124) Source(56, 108) + SourceIndex(0) -24>Emitted(36, 126) Source(56, 110) + SourceIndex(0) -25>Emitted(36, 128) Source(56, 112) + SourceIndex(0) -26>Emitted(36, 129) Source(56, 113) + SourceIndex(0) +4 >Emitted(36, 6) Source(56, 11) + SourceIndex(0) +5 >Emitted(36, 33) Source(56, 22) + SourceIndex(0) +6 >Emitted(36, 35) Source(56, 24) + SourceIndex(0) +7 >Emitted(36, 57) Source(56, 76) + SourceIndex(0) +8 >Emitted(36, 59) Source(56, 34) + SourceIndex(0) +9 >Emitted(36, 80) Source(56, 51) + SourceIndex(0) +10>Emitted(36, 82) Source(56, 53) + SourceIndex(0) +11>Emitted(36, 107) Source(56, 74) + SourceIndex(0) +12>Emitted(36, 109) Source(56, 93) + SourceIndex(0) +13>Emitted(36, 110) Source(56, 94) + SourceIndex(0) +14>Emitted(36, 113) Source(56, 97) + SourceIndex(0) +15>Emitted(36, 114) Source(56, 98) + SourceIndex(0) +16>Emitted(36, 116) Source(56, 100) + SourceIndex(0) +17>Emitted(36, 117) Source(56, 101) + SourceIndex(0) +18>Emitted(36, 120) Source(56, 104) + SourceIndex(0) +19>Emitted(36, 121) Source(56, 105) + SourceIndex(0) +20>Emitted(36, 123) Source(56, 107) + SourceIndex(0) +21>Emitted(36, 124) Source(56, 108) + SourceIndex(0) +22>Emitted(36, 126) Source(56, 110) + SourceIndex(0) +23>Emitted(36, 128) Source(56, 112) + SourceIndex(0) +24>Emitted(36, 129) Source(56, 113) + SourceIndex(0) --- >>> console.log(primaryA); 1 >^^^^ @@ -1301,87 +1241,81 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^ -12> ^^ -13> ^^^^^^^^^^^^^^^^^^^^^ -14> ^^ -15> ^^^^^^^^^^^^^^^^^^^^^^^^^ -16> ^^ -17> ^ -18> ^^^ -19> ^ -20> ^^ -21> ^ -22> ^^^ -23> ^ -24> ^^ -25> ^ -26> ^^ -27> ^^ -28> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^^ +21> ^ +22> ^^ +23> ^ +24> ^^ +25> ^^ +26> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > -7 > {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot() -8 > -9 > name: nameA -10> , -11> skills -12> : { -13> primary: primaryA -14> , -15> secondary: secondaryA -16> } } = getMultiRobot(), -17> i -18> = -19> 0 -20> ; -21> i -22> < -23> 1 -24> ; -25> i -26> ++ -27> ) -28> { +4 > (let +5 > {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot() +6 > +7 > name: nameA +8 > , +9 > skills: { primary: primaryA, secondary: secondaryA } +10> +11> primary: primaryA +12> , +13> secondary: secondaryA +14> } } = getMultiRobot(), +15> i +16> = +17> 0 +18> ; +19> i +20> < +21> 1 +22> ; +23> i +24> ++ +25> ) +26> { 1->Emitted(39, 1) Source(59, 1) + SourceIndex(0) 2 >Emitted(39, 4) Source(59, 4) + SourceIndex(0) 3 >Emitted(39, 5) Source(59, 5) + SourceIndex(0) -4 >Emitted(39, 6) Source(59, 6) + SourceIndex(0) -5 >Emitted(39, 9) Source(59, 9) + SourceIndex(0) -6 >Emitted(39, 10) Source(59, 10) + SourceIndex(0) -7 >Emitted(39, 30) Source(59, 96) + SourceIndex(0) -8 >Emitted(39, 32) Source(59, 11) + SourceIndex(0) -9 >Emitted(39, 47) Source(59, 22) + SourceIndex(0) -10>Emitted(39, 49) Source(59, 24) + SourceIndex(0) -11>Emitted(39, 63) Source(59, 30) + SourceIndex(0) -12>Emitted(39, 65) Source(59, 34) + SourceIndex(0) -13>Emitted(39, 86) Source(59, 51) + SourceIndex(0) -14>Emitted(39, 88) Source(59, 53) + SourceIndex(0) -15>Emitted(39, 113) Source(59, 74) + SourceIndex(0) -16>Emitted(39, 115) Source(59, 98) + SourceIndex(0) -17>Emitted(39, 116) Source(59, 99) + SourceIndex(0) -18>Emitted(39, 119) Source(59, 102) + SourceIndex(0) -19>Emitted(39, 120) Source(59, 103) + SourceIndex(0) -20>Emitted(39, 122) Source(59, 105) + SourceIndex(0) -21>Emitted(39, 123) Source(59, 106) + SourceIndex(0) -22>Emitted(39, 126) Source(59, 109) + SourceIndex(0) -23>Emitted(39, 127) Source(59, 110) + SourceIndex(0) -24>Emitted(39, 129) Source(59, 112) + SourceIndex(0) -25>Emitted(39, 130) Source(59, 113) + SourceIndex(0) -26>Emitted(39, 132) Source(59, 115) + SourceIndex(0) -27>Emitted(39, 134) Source(59, 117) + SourceIndex(0) -28>Emitted(39, 135) Source(59, 118) + SourceIndex(0) +4 >Emitted(39, 6) Source(59, 10) + SourceIndex(0) +5 >Emitted(39, 30) Source(59, 96) + SourceIndex(0) +6 >Emitted(39, 32) Source(59, 11) + SourceIndex(0) +7 >Emitted(39, 47) Source(59, 22) + SourceIndex(0) +8 >Emitted(39, 49) Source(59, 24) + SourceIndex(0) +9 >Emitted(39, 63) Source(59, 76) + SourceIndex(0) +10>Emitted(39, 65) Source(59, 34) + SourceIndex(0) +11>Emitted(39, 86) Source(59, 51) + SourceIndex(0) +12>Emitted(39, 88) Source(59, 53) + SourceIndex(0) +13>Emitted(39, 113) Source(59, 74) + SourceIndex(0) +14>Emitted(39, 115) Source(59, 98) + SourceIndex(0) +15>Emitted(39, 116) Source(59, 99) + SourceIndex(0) +16>Emitted(39, 119) Source(59, 102) + SourceIndex(0) +17>Emitted(39, 120) Source(59, 103) + SourceIndex(0) +18>Emitted(39, 122) Source(59, 105) + SourceIndex(0) +19>Emitted(39, 123) Source(59, 106) + SourceIndex(0) +20>Emitted(39, 126) Source(59, 109) + SourceIndex(0) +21>Emitted(39, 127) Source(59, 110) + SourceIndex(0) +22>Emitted(39, 129) Source(59, 112) + SourceIndex(0) +23>Emitted(39, 130) Source(59, 113) + SourceIndex(0) +24>Emitted(39, 132) Source(59, 115) + SourceIndex(0) +25>Emitted(39, 134) Source(59, 117) + SourceIndex(0) +26>Emitted(39, 135) Source(59, 118) + SourceIndex(0) --- >>> console.log(primaryA); 1 >^^^^ @@ -1425,90 +1359,84 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^ -12> ^^ -13> ^^^^^^^^^^^^^^^^^^^^^ -14> ^^ -15> ^^^^^^^^^^^^^^^^^^^^^^^^^ -16> ^^ -17> ^ -18> ^^^ -19> ^ -20> ^^ -21> ^ -22> ^^^ -23> ^ -24> ^^ -25> ^ -26> ^^ -27> ^^ -28> ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^^ +21> ^ +22> ^^ +23> ^ +24> ^^ +25> ^^ +26> ^ 1-> > 2 >for 3 > -4 > ( -5 > let -6 > -7 > {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = - > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } -8 > -9 > name: nameA -10> , -11> skills -12> : { -13> primary: primaryA -14> , -15> secondary: secondaryA -16> } } = +4 > (let +5 > {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } +6 > +7 > name: nameA +8 > , +9 > skills: { primary: primaryA, secondary: secondaryA } +10> +11> primary: primaryA +12> , +13> secondary: secondaryA +14> } } = > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, > -17> i -18> = -19> 0 -20> ; -21> i -22> < -23> 1 -24> ; -25> i -26> ++ -27> ) -28> { +15> i +16> = +17> 0 +18> ; +19> i +20> < +21> 1 +22> ; +23> i +24> ++ +25> ) +26> { 1->Emitted(42, 1) Source(62, 1) + SourceIndex(0) 2 >Emitted(42, 4) Source(62, 4) + SourceIndex(0) 3 >Emitted(42, 5) Source(62, 5) + SourceIndex(0) -4 >Emitted(42, 6) Source(62, 6) + SourceIndex(0) -5 >Emitted(42, 9) Source(62, 9) + SourceIndex(0) -6 >Emitted(42, 10) Source(62, 10) + SourceIndex(0) -7 >Emitted(42, 88) Source(63, 90) + SourceIndex(0) -8 >Emitted(42, 90) Source(62, 11) + SourceIndex(0) -9 >Emitted(42, 105) Source(62, 22) + SourceIndex(0) -10>Emitted(42, 107) Source(62, 24) + SourceIndex(0) -11>Emitted(42, 121) Source(62, 30) + SourceIndex(0) -12>Emitted(42, 123) Source(62, 34) + SourceIndex(0) -13>Emitted(42, 144) Source(62, 51) + SourceIndex(0) -14>Emitted(42, 146) Source(62, 53) + SourceIndex(0) -15>Emitted(42, 171) Source(62, 74) + SourceIndex(0) -16>Emitted(42, 173) Source(64, 5) + SourceIndex(0) -17>Emitted(42, 174) Source(64, 6) + SourceIndex(0) -18>Emitted(42, 177) Source(64, 9) + SourceIndex(0) -19>Emitted(42, 178) Source(64, 10) + SourceIndex(0) -20>Emitted(42, 180) Source(64, 12) + SourceIndex(0) -21>Emitted(42, 181) Source(64, 13) + SourceIndex(0) -22>Emitted(42, 184) Source(64, 16) + SourceIndex(0) -23>Emitted(42, 185) Source(64, 17) + SourceIndex(0) -24>Emitted(42, 187) Source(64, 19) + SourceIndex(0) -25>Emitted(42, 188) Source(64, 20) + SourceIndex(0) -26>Emitted(42, 190) Source(64, 22) + SourceIndex(0) -27>Emitted(42, 192) Source(64, 24) + SourceIndex(0) -28>Emitted(42, 193) Source(64, 25) + SourceIndex(0) +4 >Emitted(42, 6) Source(62, 10) + SourceIndex(0) +5 >Emitted(42, 88) Source(63, 90) + SourceIndex(0) +6 >Emitted(42, 90) Source(62, 11) + SourceIndex(0) +7 >Emitted(42, 105) Source(62, 22) + SourceIndex(0) +8 >Emitted(42, 107) Source(62, 24) + SourceIndex(0) +9 >Emitted(42, 121) Source(62, 76) + SourceIndex(0) +10>Emitted(42, 123) Source(62, 34) + SourceIndex(0) +11>Emitted(42, 144) Source(62, 51) + SourceIndex(0) +12>Emitted(42, 146) Source(62, 53) + SourceIndex(0) +13>Emitted(42, 171) Source(62, 74) + SourceIndex(0) +14>Emitted(42, 173) Source(64, 5) + SourceIndex(0) +15>Emitted(42, 174) Source(64, 6) + SourceIndex(0) +16>Emitted(42, 177) Source(64, 9) + SourceIndex(0) +17>Emitted(42, 178) Source(64, 10) + SourceIndex(0) +18>Emitted(42, 180) Source(64, 12) + SourceIndex(0) +19>Emitted(42, 181) Source(64, 13) + SourceIndex(0) +20>Emitted(42, 184) Source(64, 16) + SourceIndex(0) +21>Emitted(42, 185) Source(64, 17) + SourceIndex(0) +22>Emitted(42, 187) Source(64, 19) + SourceIndex(0) +23>Emitted(42, 188) Source(64, 20) + SourceIndex(0) +24>Emitted(42, 190) Source(64, 22) + SourceIndex(0) +25>Emitted(42, 192) Source(64, 24) + SourceIndex(0) +26>Emitted(42, 193) Source(64, 25) + SourceIndex(0) --- >>> console.log(primaryA); 1 >^^^^ diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.js.map index 89bf5672d04..83ec7f83efa 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringForObjectBindingPattern2.js.map] -{"version":3,"file":"sourceMapValidationDestructuringForObjectBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForObjectBindingPattern2.ts"],"names":[],"mappings":"AAgBA,IAAI,KAAK,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACtD,IAAI,UAAU,GAAe,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;AACjG;IACI,MAAM,CAAC,KAAK,CAAC;AACjB,CAAC;AACD;IACI,MAAM,CAAC,UAAU,CAAC;AACtB,CAAC;AAED,IAAI,KAAa,EAAE,QAAgB,EAAE,UAAkB,EAAE,CAAS,EAAE,MAAc,CAAC;AACnF,IAAI,IAAY,EAAE,OAAe,EAAE,SAAiB,EAAE,KAAa,CAAC;AAEpE,GAAG,CAAC,CAAC,CAAA,kBAAuB,EAAL,KAAK,CAAA,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC9C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,C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AC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringForObjectBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForObjectBindingPattern2.ts"],"names":[],"mappings":"AAgBA,IAAI,KAAK,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACtD,IAAI,UAAU,GAAe,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;AACjG;IACI,MAAM,CAAC,KAAK,CAAC;AACjB,CAAC;AACD;IACI,MAAM,CAAC,UAAU,CAAC;AACtB,CAAC;AAED,IAAI,KAAa,EAAE,QAAgB,EAAE,UAAkB,EAAE,CAAS,EAAE,MAAc,CAAC;AACnF,IAAI,IAAY,EAAE,OAAe,EAAE,SAAiB,EAAE,KAAa,CAAC;AAEpE,GAAG,CAAC,CAAC,CAAA,kBAAuB,EAAL,KAAK,CAAA,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC9C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,eAA4B,EAA5B,eAA4B,KAAA,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACnD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,2CAA+D,EAA/D,eAA+D,KAAA,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACtF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,CAA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C,CAAA,2CAA+D,EAA7D,cAAI,EAAE,gBAAK,KAAkD,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACtF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,CAAE,sBAAI,EAAU,sBAAsB,EAApB,oBAAO,EAAE,wBAAS,EAAO,UAAU,CAAA,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC5E,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,oBAA0D,EAAxD,cAAI,EAAU,cAAsB,EAApB,oBAAO,EAAE,wBAAS,KAAsB,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjF,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,8EACoF,EADlF,cAAI,EAAU,cAAsB,EAApB,oBAAO,EAAE,wBAAS,KACgD;IACrF,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACpB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.sourcemap.txt index 6621dd0b551..18aea40d2f2 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.sourcemap.txt @@ -633,9 +633,9 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 2 >for 3 > 4 > ( -5 > { -6 > skills -7 > : { +5 > { skills: +6 > { primary: primaryA, secondary: secondaryA } +7 > 8 > primary: primaryA 9 > , 10> secondary: secondaryA @@ -659,8 +659,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 2 >Emitted(20, 4) Source(38, 4) + SourceIndex(0) 3 >Emitted(20, 5) Source(38, 5) + SourceIndex(0) 4 >Emitted(20, 6) Source(38, 6) + SourceIndex(0) -5 >Emitted(20, 7) Source(38, 8) + SourceIndex(0) -6 >Emitted(20, 29) Source(38, 14) + SourceIndex(0) +5 >Emitted(20, 7) Source(38, 16) + SourceIndex(0) +6 >Emitted(20, 29) Source(38, 60) + SourceIndex(0) 7 >Emitted(20, 31) Source(38, 18) + SourceIndex(0) 8 >Emitted(20, 52) Source(38, 35) + SourceIndex(0) 9 >Emitted(20, 54) Source(38, 37) + SourceIndex(0) @@ -754,8 +754,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 5 > 6 > { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot() 7 > -8 > skills -9 > : { +8 > { primary: primaryA, secondary: secondaryA } +9 > 10> primary: primaryA 11> , 12> secondary: secondaryA @@ -779,8 +779,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 4 >Emitted(23, 6) Source(41, 6) + SourceIndex(0) 5 >Emitted(23, 7) Source(41, 6) + SourceIndex(0) 6 >Emitted(23, 27) Source(41, 80) + SourceIndex(0) -7 >Emitted(23, 29) Source(41, 8) + SourceIndex(0) -8 >Emitted(23, 43) Source(41, 14) + SourceIndex(0) +7 >Emitted(23, 29) Source(41, 16) + SourceIndex(0) +8 >Emitted(23, 43) Source(41, 60) + SourceIndex(0) 9 >Emitted(23, 45) Source(41, 18) + SourceIndex(0) 10>Emitted(23, 66) Source(41, 35) + SourceIndex(0) 11>Emitted(23, 68) Source(41, 37) + SourceIndex(0) @@ -860,8 +860,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 6 > { skills: { primary: primaryA, secondary: secondaryA } } = > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } 7 > -8 > skills -9 > : { +8 > { primary: primaryA, secondary: secondaryA } +9 > 10> primary: primaryA 11> , 12> secondary: secondaryA @@ -873,8 +873,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 4 >Emitted(26, 6) Source(44, 6) + SourceIndex(0) 5 >Emitted(26, 7) Source(44, 6) + SourceIndex(0) 6 >Emitted(26, 85) Source(45, 90) + SourceIndex(0) -7 >Emitted(26, 87) Source(44, 8) + SourceIndex(0) -8 >Emitted(26, 101) Source(44, 14) + SourceIndex(0) +7 >Emitted(26, 87) Source(44, 16) + SourceIndex(0) +8 >Emitted(26, 101) Source(44, 60) + SourceIndex(0) 9 >Emitted(26, 103) Source(44, 18) + SourceIndex(0) 10>Emitted(26, 124) Source(44, 35) + SourceIndex(0) 11>Emitted(26, 126) Source(44, 37) + SourceIndex(0) @@ -1311,9 +1311,9 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 2 >for 3 > 4 > ( -5 > { -6 > skills -7 > : { +5 > { skills: +6 > { primary, secondary } +7 > 8 > primary 9 > , 10> secondary @@ -1337,8 +1337,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 2 >Emitted(39, 4) Source(58, 4) + SourceIndex(0) 3 >Emitted(39, 5) Source(58, 5) + SourceIndex(0) 4 >Emitted(39, 6) Source(58, 6) + SourceIndex(0) -5 >Emitted(39, 7) Source(58, 8) + SourceIndex(0) -6 >Emitted(39, 29) Source(58, 14) + SourceIndex(0) +5 >Emitted(39, 7) Source(58, 16) + SourceIndex(0) +6 >Emitted(39, 29) Source(58, 38) + SourceIndex(0) 7 >Emitted(39, 31) Source(58, 18) + SourceIndex(0) 8 >Emitted(39, 51) Source(58, 25) + SourceIndex(0) 9 >Emitted(39, 53) Source(58, 27) + SourceIndex(0) @@ -1432,8 +1432,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 5 > 6 > { skills: { primary, secondary } } = getMultiRobot() 7 > -8 > skills -9 > : { +8 > { primary, secondary } +9 > 10> primary 11> , 12> secondary @@ -1457,8 +1457,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 4 >Emitted(42, 6) Source(61, 6) + SourceIndex(0) 5 >Emitted(42, 7) Source(61, 6) + SourceIndex(0) 6 >Emitted(42, 27) Source(61, 58) + SourceIndex(0) -7 >Emitted(42, 29) Source(61, 8) + SourceIndex(0) -8 >Emitted(42, 43) Source(61, 14) + SourceIndex(0) +7 >Emitted(42, 29) Source(61, 16) + SourceIndex(0) +8 >Emitted(42, 43) Source(61, 38) + SourceIndex(0) 9 >Emitted(42, 45) Source(61, 18) + SourceIndex(0) 10>Emitted(42, 65) Source(61, 25) + SourceIndex(0) 11>Emitted(42, 67) Source(61, 27) + SourceIndex(0) @@ -1538,8 +1538,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 6 > { skills: { primary, secondary } } = > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } 7 > -8 > skills -9 > : { +8 > { primary, secondary } +9 > 10> primary 11> , 12> secondary @@ -1551,8 +1551,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 4 >Emitted(45, 6) Source(64, 6) + SourceIndex(0) 5 >Emitted(45, 7) Source(64, 6) + SourceIndex(0) 6 >Emitted(45, 85) Source(65, 90) + SourceIndex(0) -7 >Emitted(45, 87) Source(64, 8) + SourceIndex(0) -8 >Emitted(45, 101) Source(64, 14) + SourceIndex(0) +7 >Emitted(45, 87) Source(64, 16) + SourceIndex(0) +8 >Emitted(45, 101) Source(64, 38) + SourceIndex(0) 9 >Emitted(45, 103) Source(64, 18) + SourceIndex(0) 10>Emitted(45, 123) Source(64, 25) + SourceIndex(0) 11>Emitted(45, 125) Source(64, 27) + SourceIndex(0) @@ -2013,9 +2013,9 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 4 > ( 5 > { 6 > name: nameA -7 > , -8 > skills -9 > : { +7 > , skills: +8 > { primary: primaryA, secondary: secondaryA } +9 > 10> primary: primaryA 11> , 12> secondary: secondaryA @@ -2041,8 +2041,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 4 >Emitted(58, 6) Source(80, 6) + SourceIndex(0) 5 >Emitted(58, 7) Source(80, 8) + SourceIndex(0) 6 >Emitted(58, 30) Source(80, 19) + SourceIndex(0) -7 >Emitted(58, 32) Source(80, 21) + SourceIndex(0) -8 >Emitted(58, 54) Source(80, 27) + SourceIndex(0) +7 >Emitted(58, 32) Source(80, 29) + SourceIndex(0) +8 >Emitted(58, 54) Source(80, 73) + SourceIndex(0) 9 >Emitted(58, 56) Source(80, 31) + SourceIndex(0) 10>Emitted(58, 77) Source(80, 48) + SourceIndex(0) 11>Emitted(58, 79) Source(80, 50) + SourceIndex(0) @@ -2139,9 +2139,9 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 6 > { name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot() 7 > 8 > name: nameA -9 > , -10> skills -11> : { +9 > , skills: +10> { primary: primaryA, secondary: secondaryA } +11> 12> primary: primaryA 13> , 14> secondary: secondaryA @@ -2167,8 +2167,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 6 >Emitted(61, 27) Source(83, 93) + SourceIndex(0) 7 >Emitted(61, 29) Source(83, 8) + SourceIndex(0) 8 >Emitted(61, 44) Source(83, 19) + SourceIndex(0) -9 >Emitted(61, 46) Source(83, 21) + SourceIndex(0) -10>Emitted(61, 60) Source(83, 27) + SourceIndex(0) +9 >Emitted(61, 46) Source(83, 29) + SourceIndex(0) +10>Emitted(61, 60) Source(83, 73) + SourceIndex(0) 11>Emitted(61, 62) Source(83, 31) + SourceIndex(0) 12>Emitted(61, 83) Source(83, 48) + SourceIndex(0) 13>Emitted(61, 85) Source(83, 50) + SourceIndex(0) @@ -2251,9 +2251,9 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } 7 > 8 > name: nameA -9 > , -10> skills -11> : { +9 > , skills: +10> { primary: primaryA, secondary: secondaryA } +11> 12> primary: primaryA 13> , 14> secondary: secondaryA @@ -2267,8 +2267,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 6 >Emitted(64, 85) Source(87, 90) + SourceIndex(0) 7 >Emitted(64, 87) Source(86, 8) + SourceIndex(0) 8 >Emitted(64, 102) Source(86, 19) + SourceIndex(0) -9 >Emitted(64, 104) Source(86, 21) + SourceIndex(0) -10>Emitted(64, 118) Source(86, 27) + SourceIndex(0) +9 >Emitted(64, 104) Source(86, 29) + SourceIndex(0) +10>Emitted(64, 118) Source(86, 73) + SourceIndex(0) 11>Emitted(64, 120) Source(86, 31) + SourceIndex(0) 12>Emitted(64, 141) Source(86, 48) + SourceIndex(0) 13>Emitted(64, 143) Source(86, 50) + SourceIndex(0) @@ -2727,9 +2727,9 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 4 > ( 5 > { 6 > name -7 > , -8 > skills -9 > : { +7 > , skills: +8 > { primary, secondary } +9 > 10> primary 11> , 12> secondary @@ -2755,8 +2755,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 4 >Emitted(77, 6) Source(100, 6) + SourceIndex(0) 5 >Emitted(77, 7) Source(100, 8) + SourceIndex(0) 6 >Emitted(77, 29) Source(100, 12) + SourceIndex(0) -7 >Emitted(77, 31) Source(100, 14) + SourceIndex(0) -8 >Emitted(77, 53) Source(100, 20) + SourceIndex(0) +7 >Emitted(77, 31) Source(100, 22) + SourceIndex(0) +8 >Emitted(77, 53) Source(100, 44) + SourceIndex(0) 9 >Emitted(77, 55) Source(100, 24) + SourceIndex(0) 10>Emitted(77, 75) Source(100, 31) + SourceIndex(0) 11>Emitted(77, 77) Source(100, 33) + SourceIndex(0) @@ -2853,9 +2853,9 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 6 > { name, skills: { primary, secondary } } = getMultiRobot() 7 > 8 > name -9 > , -10> skills -11> : { +9 > , skills: +10> { primary, secondary } +11> 12> primary 13> , 14> secondary @@ -2881,8 +2881,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 6 >Emitted(80, 27) Source(103, 64) + SourceIndex(0) 7 >Emitted(80, 29) Source(103, 8) + SourceIndex(0) 8 >Emitted(80, 43) Source(103, 12) + SourceIndex(0) -9 >Emitted(80, 45) Source(103, 14) + SourceIndex(0) -10>Emitted(80, 59) Source(103, 20) + SourceIndex(0) +9 >Emitted(80, 45) Source(103, 22) + SourceIndex(0) +10>Emitted(80, 59) Source(103, 44) + SourceIndex(0) 11>Emitted(80, 61) Source(103, 24) + SourceIndex(0) 12>Emitted(80, 81) Source(103, 31) + SourceIndex(0) 13>Emitted(80, 83) Source(103, 33) + SourceIndex(0) @@ -2965,9 +2965,9 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } 7 > 8 > name -9 > , -10> skills -11> : { +9 > , skills: +10> { primary, secondary } +11> 12> primary 13> , 14> secondary @@ -2981,8 +2981,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 6 >Emitted(83, 85) Source(107, 90) + SourceIndex(0) 7 >Emitted(83, 87) Source(106, 8) + SourceIndex(0) 8 >Emitted(83, 101) Source(106, 12) + SourceIndex(0) -9 >Emitted(83, 103) Source(106, 14) + SourceIndex(0) -10>Emitted(83, 117) Source(106, 20) + SourceIndex(0) +9 >Emitted(83, 103) Source(106, 22) + SourceIndex(0) +10>Emitted(83, 117) Source(106, 44) + SourceIndex(0) 11>Emitted(83, 119) Source(106, 24) + SourceIndex(0) 12>Emitted(83, 139) Source(106, 31) + SourceIndex(0) 13>Emitted(83, 141) Source(106, 33) + SourceIndex(0) diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.js.map index c2a1c23d12b..076b6994fa3 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringForOfArrayBindingPattern.js.map] -{"version":3,"file":"sourceMapValidationDestructuringForOfArrayBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForOfArrayBindingPattern.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAC/C,IAAI,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9B;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED,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;AACzE,IAAI,WAAW,GAAG,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAC7C;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,GAAG,CAAC,CAAkB,UAAM,EAAN,iBAAM,EAAN,oBAAM,EAAN,IAAM,CAAC;IAAxB,IAAA,iBAAa,EAAN,aAAK;IACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAAkB,UAAW,EAAX,KAAA,SAAS,EAAE,EAAX,cAAW,EAAX,IAAW,CAAC;IAA7B,IAAA,WAAa,EAAN,aAAK;IACb,OAAO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G,CAAC,CAA6B,WAAW,EAAX,2BAAW,EAAX,0BAAW,EAAX,KAAW,CAAC;IAAxC,IAAI,6CAAoB;IACzB,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;CAChC;AACD,GAAG,CAAC,CAA6B,WAAgB,EAAhB,MAAA,cAAc,EAAE,EAAhB,gBAAgB,EAAhB,KAAgB,CAAC;IAA7C,IAAI,mCAAoB;IACzB,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;CAChC;AACD,GAAG,CAAC,CAA6B,WAA0B,EAA1B,OAAC,WAAW,EAAE,WAAW,CAAC,EAA1B,gBAA0B,EAA1B,KAA0B,CAAC;IAAvD,IAAI,mCAAoB;IACzB,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;CAChC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringForOfArrayBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForOfArrayBindingPattern.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAC/C,IAAI,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9B;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED,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;AACzE,IAAI,WAAW,GAAG,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAC7C;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,GAAG,CAAC,CAAkB,UAAM,EAAN,iBAAM,EAAN,oBAAM,EAAN,IAAM,CAAC;IAAx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,EAAE,yBAAa;IAC7B,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;CACzB;AACD,GAAG,CAAC,CAA6B,WAAW,EAAX,2BAAW,EAAX,0BAAW,EAAX,KAAW,CAAC;IAAnC,iDAAkB;IACxB,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;CAChC;AACD,GAAG,CAAC,CAA6B,WAAgB,EAAhB,MAAA,cAAc,EAAE,EAAhB,gBAAgB,EAAhB,KAAgB,CAAC;IAAxC,uCAAkB;IACxB,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;CAChC;AACD,GAAG,CAAC,CAA6B,WAA0B,EAA1B,OAAC,WAAW,EAAE,WAAW,CAAC,EAA1B,gBAA0B,EAA1B,KAA0B,CAAC;IAAlD,uCAAkB;IACxB,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;CAChC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.sourcemap.txt index bb39152f474..17110072800 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern.sourcemap.txt @@ -362,20 +362,17 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts --- >>> var _a = robots_1[_i], nameA = _a[1]; 1 >^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^ 1 > -2 > -3 > let [, nameA] -4 > -5 > nameA +2 > let [, nameA] +3 > +4 > nameA 1 >Emitted(14, 5) Source(21, 6) + SourceIndex(0) -2 >Emitted(14, 9) Source(21, 6) + SourceIndex(0) -3 >Emitted(14, 26) Source(21, 19) + SourceIndex(0) -4 >Emitted(14, 28) Source(21, 13) + SourceIndex(0) -5 >Emitted(14, 41) Source(21, 18) + SourceIndex(0) +2 >Emitted(14, 26) Source(21, 19) + SourceIndex(0) +3 >Emitted(14, 28) Source(21, 13) + SourceIndex(0) +4 >Emitted(14, 41) Source(21, 18) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -458,20 +455,17 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts --- >>> var _d = _c[_b], nameA = _d[1]; 1 >^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^ 1 > -2 > -3 > let [, nameA] -4 > -5 > nameA +2 > let [, nameA] +3 > +4 > nameA 1 >Emitted(18, 5) Source(24, 6) + SourceIndex(0) -2 >Emitted(18, 9) Source(24, 6) + SourceIndex(0) -3 >Emitted(18, 20) Source(24, 19) + SourceIndex(0) -4 >Emitted(18, 22) Source(24, 13) + SourceIndex(0) -5 >Emitted(18, 35) Source(24, 18) + SourceIndex(0) +2 >Emitted(18, 20) Source(24, 19) + SourceIndex(0) +3 >Emitted(18, 22) Source(24, 13) + SourceIndex(0) +4 >Emitted(18, 35) Source(24, 18) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -560,20 +554,17 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts --- >>> var _g = _f[_e], nameA = _g[1]; 1 >^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^ 1 > -2 > -3 > let [, nameA] -4 > -5 > nameA +2 > let [, nameA] +3 > +4 > nameA 1 >Emitted(22, 5) Source(27, 6) + SourceIndex(0) -2 >Emitted(22, 9) Source(27, 6) + SourceIndex(0) -3 >Emitted(22, 20) Source(27, 19) + SourceIndex(0) -4 >Emitted(22, 22) Source(27, 13) + SourceIndex(0) -5 >Emitted(22, 35) Source(27, 18) + SourceIndex(0) +2 >Emitted(22, 20) Source(27, 19) + SourceIndex(0) +3 >Emitted(22, 22) Source(27, 13) + SourceIndex(0) +4 >Emitted(22, 35) Source(27, 18) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -651,32 +642,29 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts --- >>> var _j = multiRobots_1[_h], _k = _j[1], primarySkillA = _k[0], secondarySkillA = _k[1]; 1->^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > -3 > let [, [primarySkillA, secondarySkillA]] -4 > -5 > [primarySkillA, secondarySkillA] -6 > -7 > primarySkillA -8 > , -9 > secondarySkillA +2 > let [, [primarySkillA, secondarySkillA]] +3 > +4 > [primarySkillA, secondarySkillA] +5 > +6 > primarySkillA +7 > , +8 > secondarySkillA 1->Emitted(26, 5) Source(30, 6) + SourceIndex(0) -2 >Emitted(26, 9) Source(30, 6) + SourceIndex(0) -3 >Emitted(26, 31) Source(30, 46) + SourceIndex(0) -4 >Emitted(26, 33) Source(30, 13) + SourceIndex(0) -5 >Emitted(26, 43) Source(30, 45) + SourceIndex(0) -6 >Emitted(26, 45) Source(30, 14) + SourceIndex(0) -7 >Emitted(26, 66) Source(30, 27) + SourceIndex(0) -8 >Emitted(26, 68) Source(30, 29) + SourceIndex(0) -9 >Emitted(26, 91) Source(30, 44) + SourceIndex(0) +2 >Emitted(26, 31) Source(30, 46) + SourceIndex(0) +3 >Emitted(26, 33) Source(30, 13) + SourceIndex(0) +4 >Emitted(26, 43) Source(30, 45) + SourceIndex(0) +5 >Emitted(26, 45) Source(30, 14) + SourceIndex(0) +6 >Emitted(26, 66) Source(30, 27) + SourceIndex(0) +7 >Emitted(26, 68) Source(30, 29) + SourceIndex(0) +8 >Emitted(26, 91) Source(30, 44) + SourceIndex(0) --- >>> console.log(primarySkillA); 1 >^^^^ @@ -760,32 +748,29 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts --- >>> var _o = _m[_l], _p = _o[1], primarySkillA = _p[0], secondarySkillA = _p[1]; 1->^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > -3 > let [, [primarySkillA, secondarySkillA]] -4 > -5 > [primarySkillA, secondarySkillA] -6 > -7 > primarySkillA -8 > , -9 > secondarySkillA +2 > let [, [primarySkillA, secondarySkillA]] +3 > +4 > [primarySkillA, secondarySkillA] +5 > +6 > primarySkillA +7 > , +8 > secondarySkillA 1->Emitted(30, 5) Source(33, 6) + SourceIndex(0) -2 >Emitted(30, 9) Source(33, 6) + SourceIndex(0) -3 >Emitted(30, 20) Source(33, 46) + SourceIndex(0) -4 >Emitted(30, 22) Source(33, 13) + SourceIndex(0) -5 >Emitted(30, 32) Source(33, 45) + SourceIndex(0) -6 >Emitted(30, 34) Source(33, 14) + SourceIndex(0) -7 >Emitted(30, 55) Source(33, 27) + SourceIndex(0) -8 >Emitted(30, 57) Source(33, 29) + SourceIndex(0) -9 >Emitted(30, 80) Source(33, 44) + SourceIndex(0) +2 >Emitted(30, 20) Source(33, 46) + SourceIndex(0) +3 >Emitted(30, 22) Source(33, 13) + SourceIndex(0) +4 >Emitted(30, 32) Source(33, 45) + SourceIndex(0) +5 >Emitted(30, 34) Source(33, 14) + SourceIndex(0) +6 >Emitted(30, 55) Source(33, 27) + SourceIndex(0) +7 >Emitted(30, 57) Source(33, 29) + SourceIndex(0) +8 >Emitted(30, 80) Source(33, 44) + SourceIndex(0) --- >>> console.log(primarySkillA); 1 >^^^^ @@ -875,32 +860,29 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts --- >>> var _s = _r[_q], _t = _s[1], primarySkillA = _t[0], secondarySkillA = _t[1]; 1->^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > -3 > let [, [primarySkillA, secondarySkillA]] -4 > -5 > [primarySkillA, secondarySkillA] -6 > -7 > primarySkillA -8 > , -9 > secondarySkillA +2 > let [, [primarySkillA, secondarySkillA]] +3 > +4 > [primarySkillA, secondarySkillA] +5 > +6 > primarySkillA +7 > , +8 > secondarySkillA 1->Emitted(34, 5) Source(36, 6) + SourceIndex(0) -2 >Emitted(34, 9) Source(36, 6) + SourceIndex(0) -3 >Emitted(34, 20) Source(36, 46) + SourceIndex(0) -4 >Emitted(34, 22) Source(36, 13) + SourceIndex(0) -5 >Emitted(34, 32) Source(36, 45) + SourceIndex(0) -6 >Emitted(34, 34) Source(36, 14) + SourceIndex(0) -7 >Emitted(34, 55) Source(36, 27) + SourceIndex(0) -8 >Emitted(34, 57) Source(36, 29) + SourceIndex(0) -9 >Emitted(34, 80) Source(36, 44) + SourceIndex(0) +2 >Emitted(34, 20) Source(36, 46) + SourceIndex(0) +3 >Emitted(34, 22) Source(36, 13) + SourceIndex(0) +4 >Emitted(34, 32) Source(36, 45) + SourceIndex(0) +5 >Emitted(34, 34) Source(36, 14) + SourceIndex(0) +6 >Emitted(34, 55) Source(36, 27) + SourceIndex(0) +7 >Emitted(34, 57) Source(36, 29) + SourceIndex(0) +8 >Emitted(34, 80) Source(36, 44) + SourceIndex(0) --- >>> console.log(primarySkillA); 1 >^^^^ @@ -978,14 +960,11 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts --- >>> var numberB = robots_2[_u][0]; 1 >^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > let -3 > [numberB] -1 >Emitted(38, 5) Source(40, 6) + SourceIndex(0) -2 >Emitted(38, 9) Source(40, 10) + SourceIndex(0) -3 >Emitted(38, 34) Source(40, 19) + SourceIndex(0) +2 > numberB +1 >Emitted(38, 5) Source(40, 11) + SourceIndex(0) +2 >Emitted(38, 34) Source(40, 18) + SourceIndex(0) --- >>> console.log(numberB); 1 >^^^^ @@ -996,7 +975,7 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts 6 > ^^^^^^^ 7 > ^ 8 > ^ -1 > of robots) { +1 >] of robots) { > 2 > console 3 > . @@ -1068,14 +1047,11 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts --- >>> var numberB = _w[_v][0]; 1 >^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > let -3 > [numberB] -1 >Emitted(42, 5) Source(43, 6) + SourceIndex(0) -2 >Emitted(42, 9) Source(43, 10) + SourceIndex(0) -3 >Emitted(42, 28) Source(43, 19) + SourceIndex(0) +2 > numberB +1 >Emitted(42, 5) Source(43, 11) + SourceIndex(0) +2 >Emitted(42, 28) Source(43, 18) + SourceIndex(0) --- >>> console.log(numberB); 1 >^^^^ @@ -1086,7 +1062,7 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts 6 > ^^^^^^^ 7 > ^ 8 > ^ -1 > of getRobots()) { +1 >] of getRobots()) { > 2 > console 3 > . @@ -1164,14 +1140,11 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts --- >>> var numberB = _y[_x][0]; 1 >^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > let -3 > [numberB] -1 >Emitted(46, 5) Source(46, 6) + SourceIndex(0) -2 >Emitted(46, 9) Source(46, 10) + SourceIndex(0) -3 >Emitted(46, 28) Source(46, 19) + SourceIndex(0) +2 > numberB +1 >Emitted(46, 5) Source(46, 11) + SourceIndex(0) +2 >Emitted(46, 28) Source(46, 18) + SourceIndex(0) --- >>> console.log(numberB); 1 >^^^^ @@ -1182,7 +1155,7 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts 6 > ^^^^^^^ 7 > ^ 8 > ^ -1 > of [robotA, robotB]) { +1 >] of [robotA, robotB]) { > 2 > console 3 > . @@ -1248,14 +1221,11 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts --- >>> var nameB = multiRobots_2[_z][0]; 1 >^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > let -3 > [nameB] -1 >Emitted(50, 5) Source(49, 6) + SourceIndex(0) -2 >Emitted(50, 9) Source(49, 10) + SourceIndex(0) -3 >Emitted(50, 37) Source(49, 17) + SourceIndex(0) +2 > nameB +1 >Emitted(50, 5) Source(49, 11) + SourceIndex(0) +2 >Emitted(50, 37) Source(49, 16) + SourceIndex(0) --- >>> console.log(nameB); 1 >^^^^ @@ -1266,7 +1236,7 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts 6 > ^^^^^ 7 > ^ 8 > ^ -1 > of multiRobots) { +1 >] of multiRobots) { > 2 > console 3 > . @@ -1338,14 +1308,11 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts --- >>> var nameB = _1[_0][0]; 1 >^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > let -3 > [nameB] -1 >Emitted(54, 5) Source(52, 6) + SourceIndex(0) -2 >Emitted(54, 9) Source(52, 10) + SourceIndex(0) -3 >Emitted(54, 26) Source(52, 17) + SourceIndex(0) +2 > nameB +1 >Emitted(54, 5) Source(52, 11) + SourceIndex(0) +2 >Emitted(54, 26) Source(52, 16) + SourceIndex(0) --- >>> console.log(nameB); 1 >^^^^ @@ -1356,7 +1323,7 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts 6 > ^^^^^ 7 > ^ 8 > ^ -1 > of getMultiRobots()) { +1 >] of getMultiRobots()) { > 2 > console 3 > . @@ -1434,14 +1401,11 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts --- >>> var nameB = _3[_2][0]; 1 >^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > let -3 > [nameB] -1 >Emitted(58, 5) Source(55, 6) + SourceIndex(0) -2 >Emitted(58, 9) Source(55, 10) + SourceIndex(0) -3 >Emitted(58, 26) Source(55, 17) + SourceIndex(0) +2 > nameB +1 >Emitted(58, 5) Source(55, 11) + SourceIndex(0) +2 >Emitted(58, 26) Source(55, 16) + SourceIndex(0) --- >>> console.log(nameB); 1 >^^^^ @@ -1452,7 +1416,7 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts 6 > ^^^^^ 7 > ^ 8 > ^ -1 > of [multiRobotA, multiRobotB]) { +1 >] of [multiRobotA, multiRobotB]) { > 2 > console 3 > . @@ -1520,32 +1484,29 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts --- >>> var _5 = robots_3[_4], numberA2 = _5[0], nameA2 = _5[1], skillA2 = _5[2]; 1->^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^ 1-> -2 > -3 > let [numberA2, nameA2, skillA2] -4 > -5 > numberA2 -6 > , -7 > nameA2 -8 > , -9 > skillA2 +2 > let [numberA2, nameA2, skillA2] +3 > +4 > numberA2 +5 > , +6 > nameA2 +7 > , +8 > skillA2 1->Emitted(62, 5) Source(59, 6) + SourceIndex(0) -2 >Emitted(62, 9) Source(59, 6) + SourceIndex(0) -3 >Emitted(62, 26) Source(59, 37) + SourceIndex(0) -4 >Emitted(62, 28) Source(59, 11) + SourceIndex(0) -5 >Emitted(62, 44) Source(59, 19) + SourceIndex(0) -6 >Emitted(62, 46) Source(59, 21) + SourceIndex(0) -7 >Emitted(62, 60) Source(59, 27) + SourceIndex(0) -8 >Emitted(62, 62) Source(59, 29) + SourceIndex(0) -9 >Emitted(62, 77) Source(59, 36) + SourceIndex(0) +2 >Emitted(62, 26) Source(59, 37) + SourceIndex(0) +3 >Emitted(62, 28) Source(59, 11) + SourceIndex(0) +4 >Emitted(62, 44) Source(59, 19) + SourceIndex(0) +5 >Emitted(62, 46) Source(59, 21) + SourceIndex(0) +6 >Emitted(62, 60) Source(59, 27) + SourceIndex(0) +7 >Emitted(62, 62) Source(59, 29) + SourceIndex(0) +8 >Emitted(62, 77) Source(59, 36) + SourceIndex(0) --- >>> console.log(nameA2); 1 >^^^^ @@ -1629,32 +1590,29 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts --- >>> var _8 = _7[_6], numberA2 = _8[0], nameA2 = _8[1], skillA2 = _8[2]; 1->^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^ 1-> -2 > -3 > let [numberA2, nameA2, skillA2] -4 > -5 > numberA2 -6 > , -7 > nameA2 -8 > , -9 > skillA2 +2 > let [numberA2, nameA2, skillA2] +3 > +4 > numberA2 +5 > , +6 > nameA2 +7 > , +8 > skillA2 1->Emitted(66, 5) Source(62, 6) + SourceIndex(0) -2 >Emitted(66, 9) Source(62, 6) + SourceIndex(0) -3 >Emitted(66, 20) Source(62, 37) + SourceIndex(0) -4 >Emitted(66, 22) Source(62, 11) + SourceIndex(0) -5 >Emitted(66, 38) Source(62, 19) + SourceIndex(0) -6 >Emitted(66, 40) Source(62, 21) + SourceIndex(0) -7 >Emitted(66, 54) Source(62, 27) + SourceIndex(0) -8 >Emitted(66, 56) Source(62, 29) + SourceIndex(0) -9 >Emitted(66, 71) Source(62, 36) + SourceIndex(0) +2 >Emitted(66, 20) Source(62, 37) + SourceIndex(0) +3 >Emitted(66, 22) Source(62, 11) + SourceIndex(0) +4 >Emitted(66, 38) Source(62, 19) + SourceIndex(0) +5 >Emitted(66, 40) Source(62, 21) + SourceIndex(0) +6 >Emitted(66, 54) Source(62, 27) + SourceIndex(0) +7 >Emitted(66, 56) Source(62, 29) + SourceIndex(0) +8 >Emitted(66, 71) Source(62, 36) + SourceIndex(0) --- >>> console.log(nameA2); 1 >^^^^ @@ -1744,32 +1702,29 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts --- >>> var _11 = _10[_9], numberA2 = _11[0], nameA2 = _11[1], skillA2 = _11[2]; 1->^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^ 1-> -2 > -3 > let [numberA2, nameA2, skillA2] -4 > -5 > numberA2 -6 > , -7 > nameA2 -8 > , -9 > skillA2 +2 > let [numberA2, nameA2, skillA2] +3 > +4 > numberA2 +5 > , +6 > nameA2 +7 > , +8 > skillA2 1->Emitted(70, 5) Source(65, 6) + SourceIndex(0) -2 >Emitted(70, 9) Source(65, 6) + SourceIndex(0) -3 >Emitted(70, 22) Source(65, 37) + SourceIndex(0) -4 >Emitted(70, 24) Source(65, 11) + SourceIndex(0) -5 >Emitted(70, 41) Source(65, 19) + SourceIndex(0) -6 >Emitted(70, 43) Source(65, 21) + SourceIndex(0) -7 >Emitted(70, 58) Source(65, 27) + SourceIndex(0) -8 >Emitted(70, 60) Source(65, 29) + SourceIndex(0) -9 >Emitted(70, 76) Source(65, 36) + SourceIndex(0) +2 >Emitted(70, 22) Source(65, 37) + SourceIndex(0) +3 >Emitted(70, 24) Source(65, 11) + SourceIndex(0) +4 >Emitted(70, 41) Source(65, 19) + SourceIndex(0) +5 >Emitted(70, 43) Source(65, 21) + SourceIndex(0) +6 >Emitted(70, 58) Source(65, 27) + SourceIndex(0) +7 >Emitted(70, 60) Source(65, 29) + SourceIndex(0) +8 >Emitted(70, 76) Source(65, 36) + SourceIndex(0) --- >>> console.log(nameA2); 1 >^^^^ @@ -1847,38 +1802,35 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts --- >>> var _13 = multiRobots_3[_12], nameMA = _13[0], _14 = _13[1], primarySkillA = _14[0], secondarySkillA = _14[1]; 1->^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > -3 > let [nameMA, [primarySkillA, secondarySkillA]] -4 > -5 > nameMA -6 > , -7 > [primarySkillA, secondarySkillA] -8 > -9 > primarySkillA -10> , -11> secondarySkillA +2 > let [nameMA, [primarySkillA, secondarySkillA]] +3 > +4 > nameMA +5 > , +6 > [primarySkillA, secondarySkillA] +7 > +8 > primarySkillA +9 > , +10> secondarySkillA 1->Emitted(74, 5) Source(68, 6) + SourceIndex(0) -2 >Emitted(74, 9) Source(68, 6) + SourceIndex(0) -3 >Emitted(74, 33) Source(68, 52) + SourceIndex(0) -4 >Emitted(74, 35) Source(68, 11) + SourceIndex(0) -5 >Emitted(74, 50) Source(68, 17) + SourceIndex(0) -6 >Emitted(74, 52) Source(68, 19) + SourceIndex(0) -7 >Emitted(74, 64) Source(68, 51) + SourceIndex(0) -8 >Emitted(74, 66) Source(68, 20) + SourceIndex(0) -9 >Emitted(74, 88) Source(68, 33) + SourceIndex(0) -10>Emitted(74, 90) Source(68, 35) + SourceIndex(0) -11>Emitted(74, 114) Source(68, 50) + SourceIndex(0) +2 >Emitted(74, 33) Source(68, 52) + SourceIndex(0) +3 >Emitted(74, 35) Source(68, 11) + SourceIndex(0) +4 >Emitted(74, 50) Source(68, 17) + SourceIndex(0) +5 >Emitted(74, 52) Source(68, 19) + SourceIndex(0) +6 >Emitted(74, 64) Source(68, 51) + SourceIndex(0) +7 >Emitted(74, 66) Source(68, 20) + SourceIndex(0) +8 >Emitted(74, 88) Source(68, 33) + SourceIndex(0) +9 >Emitted(74, 90) Source(68, 35) + SourceIndex(0) +10>Emitted(74, 114) Source(68, 50) + SourceIndex(0) --- >>> console.log(nameMA); 1 >^^^^ @@ -1962,38 +1914,35 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts --- >>> var _17 = _16[_15], nameMA = _17[0], _18 = _17[1], primarySkillA = _18[0], secondarySkillA = _18[1]; 1->^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > -3 > let [nameMA, [primarySkillA, secondarySkillA]] -4 > -5 > nameMA -6 > , -7 > [primarySkillA, secondarySkillA] -8 > -9 > primarySkillA -10> , -11> secondarySkillA +2 > let [nameMA, [primarySkillA, secondarySkillA]] +3 > +4 > nameMA +5 > , +6 > [primarySkillA, secondarySkillA] +7 > +8 > primarySkillA +9 > , +10> secondarySkillA 1->Emitted(78, 5) Source(71, 6) + SourceIndex(0) -2 >Emitted(78, 9) Source(71, 6) + SourceIndex(0) -3 >Emitted(78, 23) Source(71, 52) + SourceIndex(0) -4 >Emitted(78, 25) Source(71, 11) + SourceIndex(0) -5 >Emitted(78, 40) Source(71, 17) + SourceIndex(0) -6 >Emitted(78, 42) Source(71, 19) + SourceIndex(0) -7 >Emitted(78, 54) Source(71, 51) + SourceIndex(0) -8 >Emitted(78, 56) Source(71, 20) + SourceIndex(0) -9 >Emitted(78, 78) Source(71, 33) + SourceIndex(0) -10>Emitted(78, 80) Source(71, 35) + SourceIndex(0) -11>Emitted(78, 104) Source(71, 50) + SourceIndex(0) +2 >Emitted(78, 23) Source(71, 52) + SourceIndex(0) +3 >Emitted(78, 25) Source(71, 11) + SourceIndex(0) +4 >Emitted(78, 40) Source(71, 17) + SourceIndex(0) +5 >Emitted(78, 42) Source(71, 19) + SourceIndex(0) +6 >Emitted(78, 54) Source(71, 51) + SourceIndex(0) +7 >Emitted(78, 56) Source(71, 20) + SourceIndex(0) +8 >Emitted(78, 78) Source(71, 33) + SourceIndex(0) +9 >Emitted(78, 80) Source(71, 35) + SourceIndex(0) +10>Emitted(78, 104) Source(71, 50) + SourceIndex(0) --- >>> console.log(nameMA); 1 >^^^^ @@ -2083,38 +2032,35 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts --- >>> var _21 = _20[_19], nameMA = _21[0], _22 = _21[1], primarySkillA = _22[0], secondarySkillA = _22[1]; 1->^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > -3 > let [nameMA, [primarySkillA, secondarySkillA]] -4 > -5 > nameMA -6 > , -7 > [primarySkillA, secondarySkillA] -8 > -9 > primarySkillA -10> , -11> secondarySkillA +2 > let [nameMA, [primarySkillA, secondarySkillA]] +3 > +4 > nameMA +5 > , +6 > [primarySkillA, secondarySkillA] +7 > +8 > primarySkillA +9 > , +10> secondarySkillA 1->Emitted(82, 5) Source(74, 6) + SourceIndex(0) -2 >Emitted(82, 9) Source(74, 6) + SourceIndex(0) -3 >Emitted(82, 23) Source(74, 52) + SourceIndex(0) -4 >Emitted(82, 25) Source(74, 11) + SourceIndex(0) -5 >Emitted(82, 40) Source(74, 17) + SourceIndex(0) -6 >Emitted(82, 42) Source(74, 19) + SourceIndex(0) -7 >Emitted(82, 54) Source(74, 51) + SourceIndex(0) -8 >Emitted(82, 56) Source(74, 20) + SourceIndex(0) -9 >Emitted(82, 78) Source(74, 33) + SourceIndex(0) -10>Emitted(82, 80) Source(74, 35) + SourceIndex(0) -11>Emitted(82, 104) Source(74, 50) + SourceIndex(0) +2 >Emitted(82, 23) Source(74, 52) + SourceIndex(0) +3 >Emitted(82, 25) Source(74, 11) + SourceIndex(0) +4 >Emitted(82, 40) Source(74, 17) + SourceIndex(0) +5 >Emitted(82, 42) Source(74, 19) + SourceIndex(0) +6 >Emitted(82, 54) Source(74, 51) + SourceIndex(0) +7 >Emitted(82, 56) Source(74, 20) + SourceIndex(0) +8 >Emitted(82, 78) Source(74, 33) + SourceIndex(0) +9 >Emitted(82, 80) Source(74, 35) + SourceIndex(0) +10>Emitted(82, 104) Source(74, 50) + SourceIndex(0) --- >>> console.log(nameMA); 1 >^^^^ @@ -2193,26 +2139,23 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts --- >>> var _24 = robots_4[_23], numberA3 = _24[0], robotAInfo = _24.slice(1); 1->^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > -3 > let [numberA3, ...robotAInfo] -4 > -5 > numberA3 -6 > , -7 > ...robotAInfo +2 > let [numberA3, ...robotAInfo] +3 > +4 > numberA3 +5 > , +6 > ...robotAInfo 1->Emitted(86, 5) Source(78, 6) + SourceIndex(0) -2 >Emitted(86, 9) Source(78, 6) + SourceIndex(0) -3 >Emitted(86, 28) Source(78, 35) + SourceIndex(0) -4 >Emitted(86, 30) Source(78, 11) + SourceIndex(0) -5 >Emitted(86, 47) Source(78, 19) + SourceIndex(0) -6 >Emitted(86, 49) Source(78, 21) + SourceIndex(0) -7 >Emitted(86, 74) Source(78, 34) + SourceIndex(0) +2 >Emitted(86, 28) Source(78, 35) + SourceIndex(0) +3 >Emitted(86, 30) Source(78, 11) + SourceIndex(0) +4 >Emitted(86, 47) Source(78, 19) + SourceIndex(0) +5 >Emitted(86, 49) Source(78, 21) + SourceIndex(0) +6 >Emitted(86, 74) Source(78, 34) + SourceIndex(0) --- >>> console.log(numberA3); 1 >^^^^ @@ -2296,26 +2239,23 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts --- >>> var _27 = _26[_25], numberA3 = _27[0], robotAInfo = _27.slice(1); 1->^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > -3 > let [numberA3, ...robotAInfo] -4 > -5 > numberA3 -6 > , -7 > ...robotAInfo +2 > let [numberA3, ...robotAInfo] +3 > +4 > numberA3 +5 > , +6 > ...robotAInfo 1->Emitted(90, 5) Source(81, 6) + SourceIndex(0) -2 >Emitted(90, 9) Source(81, 6) + SourceIndex(0) -3 >Emitted(90, 23) Source(81, 35) + SourceIndex(0) -4 >Emitted(90, 25) Source(81, 11) + SourceIndex(0) -5 >Emitted(90, 42) Source(81, 19) + SourceIndex(0) -6 >Emitted(90, 44) Source(81, 21) + SourceIndex(0) -7 >Emitted(90, 69) Source(81, 34) + SourceIndex(0) +2 >Emitted(90, 23) Source(81, 35) + SourceIndex(0) +3 >Emitted(90, 25) Source(81, 11) + SourceIndex(0) +4 >Emitted(90, 42) Source(81, 19) + SourceIndex(0) +5 >Emitted(90, 44) Source(81, 21) + SourceIndex(0) +6 >Emitted(90, 69) Source(81, 34) + SourceIndex(0) --- >>> console.log(numberA3); 1 >^^^^ @@ -2405,26 +2345,23 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts --- >>> var _30 = _29[_28], numberA3 = _30[0], robotAInfo = _30.slice(1); 1->^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > -3 > let [numberA3, ...robotAInfo] -4 > -5 > numberA3 -6 > , -7 > ...robotAInfo +2 > let [numberA3, ...robotAInfo] +3 > +4 > numberA3 +5 > , +6 > ...robotAInfo 1->Emitted(94, 5) Source(84, 6) + SourceIndex(0) -2 >Emitted(94, 9) Source(84, 6) + SourceIndex(0) -3 >Emitted(94, 23) Source(84, 35) + SourceIndex(0) -4 >Emitted(94, 25) Source(84, 11) + SourceIndex(0) -5 >Emitted(94, 42) Source(84, 19) + SourceIndex(0) -6 >Emitted(94, 44) Source(84, 21) + SourceIndex(0) -7 >Emitted(94, 69) Source(84, 34) + SourceIndex(0) +2 >Emitted(94, 23) Source(84, 35) + SourceIndex(0) +3 >Emitted(94, 25) Source(84, 11) + SourceIndex(0) +4 >Emitted(94, 42) Source(84, 19) + SourceIndex(0) +5 >Emitted(94, 44) Source(84, 21) + SourceIndex(0) +6 >Emitted(94, 69) Source(84, 34) + SourceIndex(0) --- >>> console.log(numberA3); 1 >^^^^ @@ -2501,14 +2438,11 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts --- >>> var multiRobotAInfo = multiRobots_4[_31].slice(0); 1 >^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > let -3 > [...multiRobotAInfo] -1 >Emitted(98, 5) Source(87, 6) + SourceIndex(0) -2 >Emitted(98, 9) Source(87, 10) + SourceIndex(0) -3 >Emitted(98, 54) Source(87, 30) + SourceIndex(0) +2 > ...multiRobotAInfo +1 >Emitted(98, 5) Source(87, 11) + SourceIndex(0) +2 >Emitted(98, 54) Source(87, 29) + SourceIndex(0) --- >>> console.log(multiRobotAInfo); 1 >^^^^ @@ -2519,7 +2453,7 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts 6 > ^^^^^^^^^^^^^^^ 7 > ^ 8 > ^ -1 > of multiRobots) { +1 >] of multiRobots) { > 2 > console 3 > . @@ -2591,14 +2525,11 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts --- >>> var multiRobotAInfo = _33[_32].slice(0); 1 >^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > let -3 > [...multiRobotAInfo] -1 >Emitted(102, 5) Source(90, 6) + SourceIndex(0) -2 >Emitted(102, 9) Source(90, 10) + SourceIndex(0) -3 >Emitted(102, 44) Source(90, 30) + SourceIndex(0) +2 > ...multiRobotAInfo +1 >Emitted(102, 5) Source(90, 11) + SourceIndex(0) +2 >Emitted(102, 44) Source(90, 29) + SourceIndex(0) --- >>> console.log(multiRobotAInfo); 1 >^^^^ @@ -2609,7 +2540,7 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts 6 > ^^^^^^^^^^^^^^^ 7 > ^ 8 > ^ -1 > of getMultiRobots()) { +1 >] of getMultiRobots()) { > 2 > console 3 > . @@ -2687,14 +2618,11 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts --- >>> var multiRobotAInfo = _35[_34].slice(0); 1 >^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > let -3 > [...multiRobotAInfo] -1 >Emitted(106, 5) Source(93, 6) + SourceIndex(0) -2 >Emitted(106, 9) Source(93, 10) + SourceIndex(0) -3 >Emitted(106, 44) Source(93, 30) + SourceIndex(0) +2 > ...multiRobotAInfo +1 >Emitted(106, 5) Source(93, 11) + SourceIndex(0) +2 >Emitted(106, 44) Source(93, 29) + SourceIndex(0) --- >>> console.log(multiRobotAInfo); 1 >^^^^ @@ -2705,7 +2633,7 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern.ts 6 > ^^^^^^^^^^^^^^^ 7 > ^ 8 > ^ -1 > of [multiRobotA, multiRobotB]) { +1 >] of [multiRobotA, multiRobotB]) { > 2 > console 3 > . diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.js.map index 12bfa47171a..3f10e267eb9 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringForOfObjectBindingPattern.js.map] -{"version":3,"file":"sourceMapValidationDestructuringForOfObjectBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForOfObjectBindingPattern.ts"],"names":[],"mappings":"AAgBA,IAAI,MAAM,GAAY,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;AACnG,IAAI,WAAW,GAAiB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE;IAChG,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;AAE/E;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,GAAG,CAAC,CAAuB,UAAM,EAAN,iBAAM,EAAN,oBAAM,EAAN,IAAM,CAAC;IAA7B,IAAI,yBAAc;IACnB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAAuB,UAAW,EAAX,KAAA,SAAS,EAAE,EAAX,cAAW,EAAX,IAAW,CAAC;IAAlC,IAAI,mBAAc;IACnB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAAuB,UAA4E,EAA5E,MAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,EAA5E,cAA4E,EAA5E,IAA4E,CAAC;IAAnG,IAAI,mBAAc;IACnB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAA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AE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,EAA5E,cAA4E,EAA5E,IAA4E,CAAC;IAAlH,IAAA,WAAiC,EAA5B,eAAW,EAAE,iBAAa;IAChC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAA6E,UAAW,EAAX,2BAAW,EAAX,yBAAW,EAAX,IAAW,CAAC;IAAxF,IAAA,sBAAwE,EAAnE,eAAW,EAAE,cAAM,EAAI,qBAAiB,EAAE,yBAAqB;IACrE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAA6E,UAAgB,EAAhB,KAAA,cAAc,EAAE,EAAhB,cAAgB,EAAhB,IAAgB,CAAC;IAA7F,IAAA,WAAwE,EAAnE,eAAW,EAAE,cAAM,EAAI,qBAAiB,EAAE,yBAAqB;IACrE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAA6E,UACH,EADG,MAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE;IACjJ,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,EADG,cACH,EADG,IACH,CAAC;IAD1E,IAAA,WAAwE,EAAnE,eAAW,EAAE,cAAM,EAAI,qBAAiB,EAAE,yBAAqB;IAErE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringForOfObjectBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForOfObjectBindingPattern.ts"],"names":[],"mappings":"AAgBA,IAAI,MAAM,GAAY,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KA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W,EAAX,IAAW,CAAC;IAAxF,0BAAwE,EAAnE,eAAW,EAAE,cAAoD,EAA1C,qBAAiB,EAAE,yBAAqB;IACrE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAA6E,UAAgB,EAAhB,KAAA,cAAc,EAAE,EAAhB,cAAgB,EAAhB,IAAgB,CAAC;IAA7F,eAAwE,EAAnE,eAAW,EAAE,cAAoD,EAA1C,qBAAiB,EAAE,yBAAqB;IACrE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAA6E,UACH,EADG,MAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE;IACjJ,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,EADG,cACH,EADG,IACH,CAAC;IAD1E,eAAwE,EAAnE,eAAW,EAAE,cAAoD,EAA1C,qBAAiB,EAAE,yBAAqB;IAErE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.sourcemap.txt index 513ff6ea2a9..5403a0863a3 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.sourcemap.txt @@ -350,14 +350,11 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts --- >>> var nameA = robots_1[_i].name; 1 >^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > let -3 > {name: nameA } -1 >Emitted(11, 5) Source(29, 6) + SourceIndex(0) -2 >Emitted(11, 9) Source(29, 10) + SourceIndex(0) -3 >Emitted(11, 34) Source(29, 24) + SourceIndex(0) +2 > name: nameA +1 >Emitted(11, 5) Source(29, 11) + SourceIndex(0) +2 >Emitted(11, 34) Source(29, 22) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -368,7 +365,7 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts 6 > ^^^^^ 7 > ^ 8 > ^ -1 > of robots) { +1 > } of robots) { > 2 > console 3 > . @@ -440,14 +437,11 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts --- >>> var nameA = _b[_a].name; 1 >^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > let -3 > {name: nameA } -1 >Emitted(15, 5) Source(32, 6) + SourceIndex(0) -2 >Emitted(15, 9) Source(32, 10) + SourceIndex(0) -3 >Emitted(15, 28) Source(32, 24) + SourceIndex(0) +2 > name: nameA +1 >Emitted(15, 5) Source(32, 11) + SourceIndex(0) +2 >Emitted(15, 28) Source(32, 22) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -458,7 +452,7 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts 6 > ^^^^^ 7 > ^ 8 > ^ -1 > of getRobots()) { +1 > } of getRobots()) { > 2 > console 3 > . @@ -584,14 +578,11 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts --- >>> var nameA = _d[_c].name; 1 >^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > let -3 > {name: nameA } -1 >Emitted(19, 5) Source(35, 6) + SourceIndex(0) -2 >Emitted(19, 9) Source(35, 10) + SourceIndex(0) -3 >Emitted(19, 28) Source(35, 24) + SourceIndex(0) +2 > name: nameA +1 >Emitted(19, 5) Source(35, 11) + SourceIndex(0) +2 >Emitted(19, 28) Source(35, 22) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -602,7 +593,7 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts 6 > ^^^^^ 7 > ^ 8 > ^ -1 > of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +1 > } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { > 2 > console 3 > . @@ -669,26 +660,23 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts --- >>> var _f = multiRobots_1[_e].skills, primaryA = _f.primary, secondaryA = _f.secondary; 1->^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > let { -3 > skills -4 > : { -5 > primary: primaryA -6 > , -7 > secondary: secondaryA -1->Emitted(23, 5) Source(38, 6) + SourceIndex(0) -2 >Emitted(23, 9) Source(38, 12) + SourceIndex(0) -3 >Emitted(23, 38) Source(38, 18) + SourceIndex(0) -4 >Emitted(23, 40) Source(38, 22) + SourceIndex(0) -5 >Emitted(23, 61) Source(38, 39) + SourceIndex(0) -6 >Emitted(23, 63) Source(38, 41) + SourceIndex(0) -7 >Emitted(23, 88) Source(38, 62) + SourceIndex(0) +2 > skills: { primary: primaryA, secondary: secondaryA } +3 > +4 > primary: primaryA +5 > , +6 > secondary: secondaryA +1->Emitted(23, 5) Source(38, 12) + SourceIndex(0) +2 >Emitted(23, 38) Source(38, 64) + SourceIndex(0) +3 >Emitted(23, 40) Source(38, 22) + SourceIndex(0) +4 >Emitted(23, 61) Source(38, 39) + SourceIndex(0) +5 >Emitted(23, 63) Source(38, 41) + SourceIndex(0) +6 >Emitted(23, 88) Source(38, 62) + SourceIndex(0) --- >>> console.log(primaryA); 1 >^^^^ @@ -772,26 +760,23 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts --- >>> var _j = _h[_g].skills, primaryA = _j.primary, secondaryA = _j.secondary; 1->^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > let { -3 > skills -4 > : { -5 > primary: primaryA -6 > , -7 > secondary: secondaryA -1->Emitted(27, 5) Source(41, 6) + SourceIndex(0) -2 >Emitted(27, 9) Source(41, 12) + SourceIndex(0) -3 >Emitted(27, 27) Source(41, 18) + SourceIndex(0) -4 >Emitted(27, 29) Source(41, 22) + SourceIndex(0) -5 >Emitted(27, 50) Source(41, 39) + SourceIndex(0) -6 >Emitted(27, 52) Source(41, 41) + SourceIndex(0) -7 >Emitted(27, 77) Source(41, 62) + SourceIndex(0) +2 > skills: { primary: primaryA, secondary: secondaryA } +3 > +4 > primary: primaryA +5 > , +6 > secondary: secondaryA +1->Emitted(27, 5) Source(41, 12) + SourceIndex(0) +2 >Emitted(27, 27) Source(41, 64) + SourceIndex(0) +3 >Emitted(27, 29) Source(41, 22) + SourceIndex(0) +4 >Emitted(27, 50) Source(41, 39) + SourceIndex(0) +5 >Emitted(27, 52) Source(41, 41) + SourceIndex(0) +6 >Emitted(27, 77) Source(41, 62) + SourceIndex(0) --- >>> console.log(primaryA); 1 >^^^^ @@ -983,26 +968,23 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts --- >>> var _m = _l[_k].skills, primaryA = _m.primary, secondaryA = _m.secondary; 1 >^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > let { -3 > skills -4 > : { -5 > primary: primaryA -6 > , -7 > secondary: secondaryA -1 >Emitted(32, 5) Source(44, 6) + SourceIndex(0) -2 >Emitted(32, 9) Source(44, 12) + SourceIndex(0) -3 >Emitted(32, 27) Source(44, 18) + SourceIndex(0) -4 >Emitted(32, 29) Source(44, 22) + SourceIndex(0) -5 >Emitted(32, 50) Source(44, 39) + SourceIndex(0) -6 >Emitted(32, 52) Source(44, 41) + SourceIndex(0) -7 >Emitted(32, 77) Source(44, 62) + SourceIndex(0) +2 > skills: { primary: primaryA, secondary: secondaryA } +3 > +4 > primary: primaryA +5 > , +6 > secondary: secondaryA +1 >Emitted(32, 5) Source(44, 12) + SourceIndex(0) +2 >Emitted(32, 27) Source(44, 64) + SourceIndex(0) +3 >Emitted(32, 29) Source(44, 22) + SourceIndex(0) +4 >Emitted(32, 50) Source(44, 39) + SourceIndex(0) +5 >Emitted(32, 52) Source(44, 41) + SourceIndex(0) +6 >Emitted(32, 77) Source(44, 62) + SourceIndex(0) --- >>> console.log(primaryA); 1 >^^^^ @@ -1081,26 +1063,23 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts --- >>> var _p = robots_2[_o], nameA = _p.name, skillA = _p.skill; 1 >^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^ 1 > -2 > -3 > let {name: nameA, skill: skillA } -4 > -5 > name: nameA -6 > , -7 > skill: skillA +2 > let {name: nameA, skill: skillA } +3 > +4 > name: nameA +5 > , +6 > skill: skillA 1 >Emitted(36, 5) Source(49, 6) + SourceIndex(0) -2 >Emitted(36, 9) Source(49, 6) + SourceIndex(0) -3 >Emitted(36, 26) Source(49, 39) + SourceIndex(0) -4 >Emitted(36, 28) Source(49, 11) + SourceIndex(0) -5 >Emitted(36, 43) Source(49, 22) + SourceIndex(0) -6 >Emitted(36, 45) Source(49, 24) + SourceIndex(0) -7 >Emitted(36, 62) Source(49, 37) + SourceIndex(0) +2 >Emitted(36, 26) Source(49, 39) + SourceIndex(0) +3 >Emitted(36, 28) Source(49, 11) + SourceIndex(0) +4 >Emitted(36, 43) Source(49, 22) + SourceIndex(0) +5 >Emitted(36, 45) Source(49, 24) + SourceIndex(0) +6 >Emitted(36, 62) Source(49, 37) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -1184,26 +1163,23 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts --- >>> var _s = _r[_q], nameA = _s.name, skillA = _s.skill; 1->^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^ 1-> -2 > -3 > let {name: nameA, skill: skillA } -4 > -5 > name: nameA -6 > , -7 > skill: skillA +2 > let {name: nameA, skill: skillA } +3 > +4 > name: nameA +5 > , +6 > skill: skillA 1->Emitted(40, 5) Source(52, 6) + SourceIndex(0) -2 >Emitted(40, 9) Source(52, 6) + SourceIndex(0) -3 >Emitted(40, 20) Source(52, 39) + SourceIndex(0) -4 >Emitted(40, 22) Source(52, 11) + SourceIndex(0) -5 >Emitted(40, 37) Source(52, 22) + SourceIndex(0) -6 >Emitted(40, 39) Source(52, 24) + SourceIndex(0) -7 >Emitted(40, 56) Source(52, 37) + SourceIndex(0) +2 >Emitted(40, 20) Source(52, 39) + SourceIndex(0) +3 >Emitted(40, 22) Source(52, 11) + SourceIndex(0) +4 >Emitted(40, 37) Source(52, 22) + SourceIndex(0) +5 >Emitted(40, 39) Source(52, 24) + SourceIndex(0) +6 >Emitted(40, 56) Source(52, 37) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -1340,26 +1316,23 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts --- >>> var _v = _u[_t], nameA = _v.name, skillA = _v.skill; 1 >^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^ 1 > -2 > -3 > let {name: nameA, skill: skillA } -4 > -5 > name: nameA -6 > , -7 > skill: skillA +2 > let {name: nameA, skill: skillA } +3 > +4 > name: nameA +5 > , +6 > skill: skillA 1 >Emitted(44, 5) Source(55, 6) + SourceIndex(0) -2 >Emitted(44, 9) Source(55, 6) + SourceIndex(0) -3 >Emitted(44, 20) Source(55, 39) + SourceIndex(0) -4 >Emitted(44, 22) Source(55, 11) + SourceIndex(0) -5 >Emitted(44, 37) Source(55, 22) + SourceIndex(0) -6 >Emitted(44, 39) Source(55, 24) + SourceIndex(0) -7 >Emitted(44, 56) Source(55, 37) + SourceIndex(0) +2 >Emitted(44, 20) Source(55, 39) + SourceIndex(0) +3 >Emitted(44, 22) Source(55, 11) + SourceIndex(0) +4 >Emitted(44, 37) Source(55, 22) + SourceIndex(0) +5 >Emitted(44, 39) Source(55, 24) + SourceIndex(0) +6 >Emitted(44, 56) Source(55, 37) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -1437,38 +1410,35 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts --- >>> var _x = multiRobots_2[_w], nameA = _x.name, _y = _x.skills, primaryA = _y.primary, secondaryA = _y.secondary; 1->^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > -3 > let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } -4 > -5 > name: nameA -6 > , -7 > skills -8 > : { -9 > primary: primaryA -10> , -11> secondary: secondaryA +2 > let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } +3 > +4 > name: nameA +5 > , +6 > skills: { primary: primaryA, secondary: secondaryA } +7 > +8 > primary: primaryA +9 > , +10> secondary: secondaryA 1->Emitted(48, 5) Source(58, 6) + SourceIndex(0) -2 >Emitted(48, 9) Source(58, 6) + SourceIndex(0) -3 >Emitted(48, 31) Source(58, 78) + SourceIndex(0) -4 >Emitted(48, 33) Source(58, 11) + SourceIndex(0) -5 >Emitted(48, 48) Source(58, 22) + SourceIndex(0) -6 >Emitted(48, 50) Source(58, 24) + SourceIndex(0) -7 >Emitted(48, 64) Source(58, 30) + SourceIndex(0) -8 >Emitted(48, 66) Source(58, 34) + SourceIndex(0) -9 >Emitted(48, 87) Source(58, 51) + SourceIndex(0) -10>Emitted(48, 89) Source(58, 53) + SourceIndex(0) -11>Emitted(48, 114) Source(58, 74) + SourceIndex(0) +2 >Emitted(48, 31) Source(58, 78) + SourceIndex(0) +3 >Emitted(48, 33) Source(58, 11) + SourceIndex(0) +4 >Emitted(48, 48) Source(58, 22) + SourceIndex(0) +5 >Emitted(48, 50) Source(58, 24) + SourceIndex(0) +6 >Emitted(48, 64) Source(58, 76) + SourceIndex(0) +7 >Emitted(48, 66) Source(58, 34) + SourceIndex(0) +8 >Emitted(48, 87) Source(58, 51) + SourceIndex(0) +9 >Emitted(48, 89) Source(58, 53) + SourceIndex(0) +10>Emitted(48, 114) Source(58, 74) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -1552,38 +1522,35 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts --- >>> var _1 = _0[_z], nameA = _1.name, _2 = _1.skills, primaryA = _2.primary, secondaryA = _2.secondary; 1->^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > -3 > let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } -4 > -5 > name: nameA -6 > , -7 > skills -8 > : { -9 > primary: primaryA -10> , -11> secondary: secondaryA +2 > let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } +3 > +4 > name: nameA +5 > , +6 > skills: { primary: primaryA, secondary: secondaryA } +7 > +8 > primary: primaryA +9 > , +10> secondary: secondaryA 1->Emitted(52, 5) Source(61, 6) + SourceIndex(0) -2 >Emitted(52, 9) Source(61, 6) + SourceIndex(0) -3 >Emitted(52, 20) Source(61, 78) + SourceIndex(0) -4 >Emitted(52, 22) Source(61, 11) + SourceIndex(0) -5 >Emitted(52, 37) Source(61, 22) + SourceIndex(0) -6 >Emitted(52, 39) Source(61, 24) + SourceIndex(0) -7 >Emitted(52, 53) Source(61, 30) + SourceIndex(0) -8 >Emitted(52, 55) Source(61, 34) + SourceIndex(0) -9 >Emitted(52, 76) Source(61, 51) + SourceIndex(0) -10>Emitted(52, 78) Source(61, 53) + SourceIndex(0) -11>Emitted(52, 103) Source(61, 74) + SourceIndex(0) +2 >Emitted(52, 20) Source(61, 78) + SourceIndex(0) +3 >Emitted(52, 22) Source(61, 11) + SourceIndex(0) +4 >Emitted(52, 37) Source(61, 22) + SourceIndex(0) +5 >Emitted(52, 39) Source(61, 24) + SourceIndex(0) +6 >Emitted(52, 53) Source(61, 76) + SourceIndex(0) +7 >Emitted(52, 55) Source(61, 34) + SourceIndex(0) +8 >Emitted(52, 76) Source(61, 51) + SourceIndex(0) +9 >Emitted(52, 78) Source(61, 53) + SourceIndex(0) +10>Emitted(52, 103) Source(61, 74) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -1776,38 +1743,35 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts --- >>> var _5 = _4[_3], nameA = _5.name, _6 = _5.skills, primaryA = _6.primary, secondaryA = _6.secondary; 1->^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > -3 > let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } -4 > -5 > name: nameA -6 > , -7 > skills -8 > : { -9 > primary: primaryA -10> , -11> secondary: secondaryA +2 > let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } +3 > +4 > name: nameA +5 > , +6 > skills: { primary: primaryA, secondary: secondaryA } +7 > +8 > primary: primaryA +9 > , +10> secondary: secondaryA 1->Emitted(57, 5) Source(64, 6) + SourceIndex(0) -2 >Emitted(57, 9) Source(64, 6) + SourceIndex(0) -3 >Emitted(57, 20) Source(64, 78) + SourceIndex(0) -4 >Emitted(57, 22) Source(64, 11) + SourceIndex(0) -5 >Emitted(57, 37) Source(64, 22) + SourceIndex(0) -6 >Emitted(57, 39) Source(64, 24) + SourceIndex(0) -7 >Emitted(57, 53) Source(64, 30) + SourceIndex(0) -8 >Emitted(57, 55) Source(64, 34) + SourceIndex(0) -9 >Emitted(57, 76) Source(64, 51) + SourceIndex(0) -10>Emitted(57, 78) Source(64, 53) + SourceIndex(0) -11>Emitted(57, 103) Source(64, 74) + SourceIndex(0) +2 >Emitted(57, 20) Source(64, 78) + SourceIndex(0) +3 >Emitted(57, 22) Source(64, 11) + SourceIndex(0) +4 >Emitted(57, 37) Source(64, 22) + SourceIndex(0) +5 >Emitted(57, 39) Source(64, 24) + SourceIndex(0) +6 >Emitted(57, 53) Source(64, 76) + SourceIndex(0) +7 >Emitted(57, 55) Source(64, 34) + SourceIndex(0) +8 >Emitted(57, 76) Source(64, 51) + SourceIndex(0) +9 >Emitted(57, 78) Source(64, 53) + SourceIndex(0) +10>Emitted(57, 103) Source(64, 74) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.js.map index 77e719df043..2fb57235dec 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringForOfObjectBindingPattern2.js.map] -{"version":3,"file":"sourceMapValidationDestructuringForOfObjectBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForOfObjectBindingPattern2.ts"],"names":[],"mappings":"AAgBA,IAAI,MAAM,GAAY,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;AACnG,IAAI,WAAW,GAAiB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE;IAChG,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;AAE/E;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,IAAI,KAAa,EAAE,QAAgB,EAAE,UAAkB,EAAE,CAAS,EAAE,MAAc,CAAC;AACnF,IAAI,IAAY,EAAE,OAAe,EAAE,SAAiB,EAAE,KAAa,CAAC;AAEpE,GAAG,CAAC,CAAmB,UAAM,EAAN,iBAAM,EAAN,oBAAM,EAAN,IAAM,CAAC;IAAzB,yBAAc;IACf,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAAmB,UAAW,EAAX,KAAA,SAAS,EAAE,EAAX,cAAW,EAAX,IAAW,CAAC;IAA9B,mBAAc;IACf,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACt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AAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE;IAChH,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,EAD9B,gBAC8B,EAD9B,KAC8B,CAAC;IAD1E,cAAuC,EAAtC,eAAI,EAAE,gBAAM,EAAI,qBAAO,EAAE,yBAAS;IAEpC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringForOfObjectBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForOfObjectBindingPattern2.ts"],"names":[],"mappings":"AAgBA,IAAI,MAAM,GAAY,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;AACnG,IAAI,WAAW,GAAiB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE;IAChG,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;AAE/E;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,IAAI,KAAa,EAAE,QAAgB,EAAE,UAAkB,EAAE,CAAS,EAAE,MAAc,CAAC;AACnF,IAAI,IAAY,EAAE,OAAe,EAAE,SAAiB,EAAE,KAAa,CAAC;AAEpE,GAAG,CAAC,CAAmB,UAAM,EAAN,iBAAM,EAAN,oBAAM,EAAN,IAAM,CAAC;IAAzB,yBAAc;IACf,OAAO,CAAC,GAAG,C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;IAA5D,cAAuC,EAAtC,eAAI,EAAU,gBAAsB,EAApB,qBAAO,EAAE,yBAAS;IACpC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAA4C,WAC8B,EAD9B,OAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE;IAChH,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,EAD9B,gBAC8B,EAD9B,KAC8B,CAAC;IAD1E,cAAuC,EAAtC,eAAI,EAAU,gBAAsB,EAApB,qBAAO,EAAE,yBAAS;IAEpC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.sourcemap.txt index a3d11d0d43c..bde5b81177d 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.sourcemap.txt @@ -742,13 +742,13 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 5 > ^^ 6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > skills -3 > : { +2 > { primary: primaryA, secondary: secondaryA } +3 > 4 > primary: primaryA 5 > , 6 > secondary: secondaryA -1->Emitted(25, 5) Source(41, 8) + SourceIndex(0) -2 >Emitted(25, 34) Source(41, 14) + SourceIndex(0) +1->Emitted(25, 5) Source(41, 16) + SourceIndex(0) +2 >Emitted(25, 34) Source(41, 60) + SourceIndex(0) 3 >Emitted(25, 36) Source(41, 18) + SourceIndex(0) 4 >Emitted(25, 57) Source(41, 35) + SourceIndex(0) 5 >Emitted(25, 59) Source(41, 37) + SourceIndex(0) @@ -842,13 +842,13 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 5 > ^^ 6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > skills -3 > : { +2 > { primary: primaryA, secondary: secondaryA } +3 > 4 > primary: primaryA 5 > , 6 > secondary: secondaryA -1->Emitted(29, 5) Source(44, 8) + SourceIndex(0) -2 >Emitted(29, 23) Source(44, 14) + SourceIndex(0) +1->Emitted(29, 5) Source(44, 16) + SourceIndex(0) +2 >Emitted(29, 23) Source(44, 60) + SourceIndex(0) 3 >Emitted(29, 25) Source(44, 18) + SourceIndex(0) 4 >Emitted(29, 46) Source(44, 35) + SourceIndex(0) 5 >Emitted(29, 48) Source(44, 37) + SourceIndex(0) @@ -1050,13 +1050,13 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 5 > ^^ 6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > skills -3 > : { +2 > { primary: primaryA, secondary: secondaryA } +3 > 4 > primary: primaryA 5 > , 6 > secondary: secondaryA -1 >Emitted(34, 5) Source(47, 8) + SourceIndex(0) -2 >Emitted(34, 23) Source(47, 14) + SourceIndex(0) +1 >Emitted(34, 5) Source(47, 16) + SourceIndex(0) +2 >Emitted(34, 23) Source(47, 60) + SourceIndex(0) 3 >Emitted(34, 25) Source(47, 18) + SourceIndex(0) 4 >Emitted(34, 46) Source(47, 35) + SourceIndex(0) 5 >Emitted(34, 48) Source(47, 37) + SourceIndex(0) @@ -1456,13 +1456,13 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 5 > ^^ 6 > ^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > skills -3 > : { +2 > { primary, secondary } +3 > 4 > primary 5 > , 6 > secondary -1->Emitted(50, 5) Source(60, 8) + SourceIndex(0) -2 >Emitted(50, 34) Source(60, 14) + SourceIndex(0) +1->Emitted(50, 5) Source(60, 16) + SourceIndex(0) +2 >Emitted(50, 34) Source(60, 38) + SourceIndex(0) 3 >Emitted(50, 36) Source(60, 18) + SourceIndex(0) 4 >Emitted(50, 56) Source(60, 25) + SourceIndex(0) 5 >Emitted(50, 58) Source(60, 27) + SourceIndex(0) @@ -1556,13 +1556,13 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 5 > ^^ 6 > ^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > skills -3 > : { +2 > { primary, secondary } +3 > 4 > primary 5 > , 6 > secondary -1->Emitted(54, 5) Source(63, 8) + SourceIndex(0) -2 >Emitted(54, 23) Source(63, 14) + SourceIndex(0) +1->Emitted(54, 5) Source(63, 16) + SourceIndex(0) +2 >Emitted(54, 23) Source(63, 38) + SourceIndex(0) 3 >Emitted(54, 25) Source(63, 18) + SourceIndex(0) 4 >Emitted(54, 45) Source(63, 25) + SourceIndex(0) 5 >Emitted(54, 47) Source(63, 27) + SourceIndex(0) @@ -1764,13 +1764,13 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 5 > ^^ 6 > ^^^^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > skills -3 > : { +2 > { primary, secondary } +3 > 4 > primary 5 > , 6 > secondary -1 >Emitted(59, 5) Source(66, 8) + SourceIndex(0) -2 >Emitted(59, 23) Source(66, 14) + SourceIndex(0) +1 >Emitted(59, 5) Source(66, 16) + SourceIndex(0) +2 >Emitted(59, 23) Source(66, 38) + SourceIndex(0) 3 >Emitted(59, 25) Source(66, 18) + SourceIndex(0) 4 >Emitted(59, 45) Source(66, 25) + SourceIndex(0) 5 >Emitted(59, 47) Source(66, 27) + SourceIndex(0) @@ -2213,9 +2213,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 2 > {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } 3 > 4 > name: nameA -5 > , -6 > skills -7 > : { +5 > , skills: +6 > { primary: primaryA, secondary: secondaryA } +7 > 8 > primary: primaryA 9 > , 10> secondary: secondaryA @@ -2223,8 +2223,8 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 2 >Emitted(75, 28) Source(81, 74) + SourceIndex(0) 3 >Emitted(75, 30) Source(81, 7) + SourceIndex(0) 4 >Emitted(75, 46) Source(81, 18) + SourceIndex(0) -5 >Emitted(75, 48) Source(81, 20) + SourceIndex(0) -6 >Emitted(75, 64) Source(81, 26) + SourceIndex(0) +5 >Emitted(75, 48) Source(81, 28) + SourceIndex(0) +6 >Emitted(75, 64) Source(81, 72) + SourceIndex(0) 7 >Emitted(75, 66) Source(81, 30) + SourceIndex(0) 8 >Emitted(75, 88) Source(81, 47) + SourceIndex(0) 9 >Emitted(75, 90) Source(81, 49) + SourceIndex(0) @@ -2325,9 +2325,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 2 > {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } 3 > 4 > name: nameA -5 > , -6 > skills -7 > : { +5 > , skills: +6 > { primary: primaryA, secondary: secondaryA } +7 > 8 > primary: primaryA 9 > , 10> secondary: secondaryA @@ -2335,8 +2335,8 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 2 >Emitted(79, 19) Source(84, 74) + SourceIndex(0) 3 >Emitted(79, 21) Source(84, 7) + SourceIndex(0) 4 >Emitted(79, 37) Source(84, 18) + SourceIndex(0) -5 >Emitted(79, 39) Source(84, 20) + SourceIndex(0) -6 >Emitted(79, 55) Source(84, 26) + SourceIndex(0) +5 >Emitted(79, 39) Source(84, 28) + SourceIndex(0) +6 >Emitted(79, 55) Source(84, 72) + SourceIndex(0) 7 >Emitted(79, 57) Source(84, 30) + SourceIndex(0) 8 >Emitted(79, 79) Source(84, 47) + SourceIndex(0) 9 >Emitted(79, 81) Source(84, 49) + SourceIndex(0) @@ -2546,9 +2546,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 2 > {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } 3 > 4 > name: nameA -5 > , -6 > skills -7 > : { +5 > , skills: +6 > { primary: primaryA, secondary: secondaryA } +7 > 8 > primary: primaryA 9 > , 10> secondary: secondaryA @@ -2556,8 +2556,8 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 2 >Emitted(84, 19) Source(87, 74) + SourceIndex(0) 3 >Emitted(84, 21) Source(87, 7) + SourceIndex(0) 4 >Emitted(84, 37) Source(87, 18) + SourceIndex(0) -5 >Emitted(84, 39) Source(87, 20) + SourceIndex(0) -6 >Emitted(84, 55) Source(87, 26) + SourceIndex(0) +5 >Emitted(84, 39) Source(87, 28) + SourceIndex(0) +6 >Emitted(84, 55) Source(87, 72) + SourceIndex(0) 7 >Emitted(84, 57) Source(87, 30) + SourceIndex(0) 8 >Emitted(84, 79) Source(87, 47) + SourceIndex(0) 9 >Emitted(84, 81) Source(87, 49) + SourceIndex(0) @@ -2998,9 +2998,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 2 > {name, skills: { primary, secondary } } 3 > 4 > name -5 > , -6 > skills -7 > : { +5 > , skills: +6 > { primary, secondary } +7 > 8 > primary 9 > , 10> secondary @@ -3008,8 +3008,8 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 2 >Emitted(100, 29) Source(100, 45) + SourceIndex(0) 3 >Emitted(100, 31) Source(100, 7) + SourceIndex(0) 4 >Emitted(100, 46) Source(100, 11) + SourceIndex(0) -5 >Emitted(100, 48) Source(100, 13) + SourceIndex(0) -6 >Emitted(100, 64) Source(100, 19) + SourceIndex(0) +5 >Emitted(100, 48) Source(100, 21) + SourceIndex(0) +6 >Emitted(100, 64) Source(100, 43) + SourceIndex(0) 7 >Emitted(100, 66) Source(100, 23) + SourceIndex(0) 8 >Emitted(100, 87) Source(100, 30) + SourceIndex(0) 9 >Emitted(100, 89) Source(100, 32) + SourceIndex(0) @@ -3110,9 +3110,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 2 > {name, skills: { primary, secondary } } 3 > 4 > name -5 > , -6 > skills -7 > : { +5 > , skills: +6 > { primary, secondary } +7 > 8 > primary 9 > , 10> secondary @@ -3120,8 +3120,8 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 2 >Emitted(104, 19) Source(103, 45) + SourceIndex(0) 3 >Emitted(104, 21) Source(103, 7) + SourceIndex(0) 4 >Emitted(104, 36) Source(103, 11) + SourceIndex(0) -5 >Emitted(104, 38) Source(103, 13) + SourceIndex(0) -6 >Emitted(104, 54) Source(103, 19) + SourceIndex(0) +5 >Emitted(104, 38) Source(103, 21) + SourceIndex(0) +6 >Emitted(104, 54) Source(103, 43) + SourceIndex(0) 7 >Emitted(104, 56) Source(103, 23) + SourceIndex(0) 8 >Emitted(104, 77) Source(103, 30) + SourceIndex(0) 9 >Emitted(104, 79) Source(103, 32) + SourceIndex(0) @@ -3331,9 +3331,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 2 > {name, skills: { primary, secondary } } 3 > 4 > name -5 > , -6 > skills -7 > : { +5 > , skills: +6 > { primary, secondary } +7 > 8 > primary 9 > , 10> secondary @@ -3341,8 +3341,8 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 2 >Emitted(109, 19) Source(106, 45) + SourceIndex(0) 3 >Emitted(109, 21) Source(106, 7) + SourceIndex(0) 4 >Emitted(109, 36) Source(106, 11) + SourceIndex(0) -5 >Emitted(109, 38) Source(106, 13) + SourceIndex(0) -6 >Emitted(109, 54) Source(106, 19) + SourceIndex(0) +5 >Emitted(109, 38) Source(106, 21) + SourceIndex(0) +6 >Emitted(109, 54) Source(106, 43) + SourceIndex(0) 7 >Emitted(109, 56) Source(106, 23) + SourceIndex(0) 8 >Emitted(109, 77) Source(106, 30) + SourceIndex(0) 9 >Emitted(109, 79) Source(106, 32) + SourceIndex(0) diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.js.map index 7bc982e7e46..b05ceecbc4a 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringParameterNestedObjectBindingPattern.js.map] -{"version":3,"file":"sourceMapValidationDestructuringParameterNestedObjectBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringParameterNestedObjectBindingPattern.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;AAExF,cAAc,EAA+D;QAA7D,cAAM,EAAI,qBAAiB,EAAE,yBAAqB;IAC9D,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,cAAc,EAA4E;QAA1E,eAAW,EAAE,cAAM,EAAI,qBAAiB,EAAE,yBAAqB;IAC3E,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AAC5B,CAAC;AACD,cAAc,EAAiB;QAAjB,kBAAiB;IAC3B,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAChC,CAAC;AAED,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,iBAAiB,EAAE,EAAE,CAAC,CAAC;AAErF,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,iBAAiB,EAAE,EAAE,CAAC,CAAC;AAErF,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,iBAAiB,EAAE,EAAE,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringParameterNestedObjectBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringParameterNestedObjectBindingPattern.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;AAExF,cAAc,EAA+D;QAA7D,cAAoD,EAA1C,qBAAiB,EAAE,yBAAqB;IAC9D,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,cAAc,EAA4E;QAA1E,eAAW,EAAE,cAAoD,EAA1C,qBAAiB,EAAE,yBAAqB;IAC3E,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AAC5B,CAAC;AACD,cAAc,EAAiB;QAAf,kBAAM;IAClB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAChC,CAAC;AAED,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,iBAAiB,EAAE,EAAE,CAAC,CAAC;AAErF,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,iBAAiB,EAAE,EAAE,CAAC,CAAC;AAErF,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,iBAAiB,EAAE,EAAE,CAAC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.sourcemap.txt index 720057d3f79..8e39fd676d0 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.sourcemap.txt @@ -108,13 +108,13 @@ sourceFile:sourceMapValidationDestructuringParameterNestedObjectBindingPattern.t 5 > ^^ 6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > skills -3 > : { +2 > skills: { primary: primaryA, secondary: secondaryA } +3 > 4 > primary: primaryA 5 > , 6 > secondary: secondaryA 1->Emitted(3, 9) Source(13, 17) + SourceIndex(0) -2 >Emitted(3, 23) Source(13, 23) + SourceIndex(0) +2 >Emitted(3, 23) Source(13, 69) + SourceIndex(0) 3 >Emitted(3, 25) Source(13, 27) + SourceIndex(0) 4 >Emitted(3, 46) Source(13, 44) + SourceIndex(0) 5 >Emitted(3, 48) Source(13, 46) + SourceIndex(0) @@ -182,15 +182,15 @@ sourceFile:sourceMapValidationDestructuringParameterNestedObjectBindingPattern.t 1-> 2 > name: nameC 3 > , -4 > skills -5 > : { +4 > skills: { primary: primaryB, secondary: secondaryB } +5 > 6 > primary: primaryB 7 > , 8 > secondary: secondaryB 1->Emitted(7, 9) Source(16, 17) + SourceIndex(0) 2 >Emitted(7, 24) Source(16, 28) + SourceIndex(0) 3 >Emitted(7, 26) Source(16, 30) + SourceIndex(0) -4 >Emitted(7, 40) Source(16, 36) + SourceIndex(0) +4 >Emitted(7, 40) Source(16, 82) + SourceIndex(0) 5 >Emitted(7, 42) Source(16, 40) + SourceIndex(0) 6 >Emitted(7, 63) Source(16, 57) + SourceIndex(0) 7 >Emitted(7, 65) Source(16, 59) + SourceIndex(0) @@ -251,9 +251,9 @@ sourceFile:sourceMapValidationDestructuringParameterNestedObjectBindingPattern.t 2 > ^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^-> 1-> -2 > { skills }: Robot -1->Emitted(11, 9) Source(19, 15) + SourceIndex(0) -2 >Emitted(11, 27) Source(19, 32) + SourceIndex(0) +2 > skills +1->Emitted(11, 9) Source(19, 17) + SourceIndex(0) +2 >Emitted(11, 27) Source(19, 23) + SourceIndex(0) --- >>> console.log(skills.primary); 1->^^^^ @@ -266,7 +266,7 @@ sourceFile:sourceMapValidationDestructuringParameterNestedObjectBindingPattern.t 8 > ^^^^^^^ 9 > ^ 10> ^ -1->) { +1-> }: Robot) { > 2 > console 3 > . diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.js.map index 9290f57f89d..adc7a7dbb90 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringParameterObjectBindingPattern.js.map] -{"version":3,"file":"sourceMapValidationDestructuringParameterObjectBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringParameterObjectBindingPattern.ts"],"names":[],"mappings":"AAOA,IAAI,KAAK,GAAG,OAAO,CAAC;AACpB,IAAI,MAAM,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AAEvD,cAAc,EAAsB;QAAtB,eAAsB;IAChC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,cAAc,EAAqC;QAAnC,eAAW,EAAE,iBAAa;IACtC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,cAAc,EAAe;QAAf,cAAe;IACzB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACtB,CAAC;AAED,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,CAAC;AAEhD,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,CAAC;AAEhD,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringParameterObjectBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringParameterObjectBindingPattern.ts"],"names":[],"mappings":"AAOA,IAAI,KAAK,GAAG,OAAO,CAAC;AACpB,IAAI,MAAM,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AAEvD,cAAc,EAAsB;QAApB,eAAW;IACvB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,cAAc,EAAqC;QAAnC,eAAW,EAAE,iBAAa;IACtC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,cAAc,EAAe;QAAb,cAAI;IAChB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACtB,CAAC;AAED,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,CAAC;AAEhD,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,CAAC;AAEhD,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.sourcemap.txt index 63eea72d8a0..ee826647f54 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.sourcemap.txt @@ -100,9 +100,9 @@ sourceFile:sourceMapValidationDestructuringParameterObjectBindingPattern.ts 2 > ^^^^^^^^^^^^^^^ 3 > ^-> 1-> -2 > { name: nameA }: Robot -1->Emitted(4, 9) Source(11, 15) + SourceIndex(0) -2 >Emitted(4, 24) Source(11, 37) + SourceIndex(0) +2 > name: nameA +1->Emitted(4, 9) Source(11, 17) + SourceIndex(0) +2 >Emitted(4, 24) Source(11, 28) + SourceIndex(0) --- >>> console.log(nameA); 1->^^^^ @@ -113,7 +113,7 @@ sourceFile:sourceMapValidationDestructuringParameterObjectBindingPattern.ts 6 > ^^^^^ 7 > ^ 8 > ^ -1->) { +1-> }: Robot) { > 2 > console 3 > . @@ -223,9 +223,9 @@ sourceFile:sourceMapValidationDestructuringParameterObjectBindingPattern.ts 2 > ^^^^^^^^^^^^^^ 3 > ^-> 1-> -2 > { name }: Robot -1->Emitted(12, 9) Source(17, 15) + SourceIndex(0) -2 >Emitted(12, 23) Source(17, 30) + SourceIndex(0) +2 > name +1->Emitted(12, 9) Source(17, 17) + SourceIndex(0) +2 >Emitted(12, 23) Source(17, 21) + SourceIndex(0) --- >>> console.log(name); 1->^^^^ @@ -236,7 +236,7 @@ sourceFile:sourceMapValidationDestructuringParameterObjectBindingPattern.ts 6 > ^^^^ 7 > ^ 8 > ^ -1->) { +1-> }: Robot) { > 2 > console 3 > . diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.js.map index db7b7d0b88f..246a2da30a4 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringParametertArrayBindingPattern.js.map] -{"version":3,"file":"sourceMapValidationDestructuringParametertArrayBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringParametertArrayBindingPattern.ts"],"names":[],"mappings":"AAIA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAE3C,cAAc,EAAgB;QAAb,aAAK;IAClB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AAED,cAAc,EAAgB;QAAhB,eAAgB;IAC1B,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC;AAED,cAAc,EAAkC;QAAjC,gBAAQ,EAAE,cAAM,EAAE,eAAO;IACpC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,cAAc,EAAgC;QAA/B,gBAAQ,EAAE,wBAAa;IAClC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AAC5B,CAAC;AAED,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AAEjC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AAEjC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AAEjC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringParametertArrayBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringParametertArrayBindingPattern.ts"],"names":[],"mappings":"AAIA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAE3C,cAAc,EAAgB;QAAb,aAAK;IAClB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AAED,cAAc,EAAgB;QAAf,eAAO;IAClB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC;AAED,cAAc,EAAkC;QAAjC,gBAAQ,EAAE,cAAM,EAAE,eAAO;IACpC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,cAAc,EAAgC;QAA/B,gBAAQ,EAAE,wBAAa;IAClC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AAC5B,CAAC;AAED,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AAEjC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AAEjC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AAEjC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.sourcemap.txt index df90ae6abb4..098cb5058a1 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern.sourcemap.txt @@ -129,9 +129,9 @@ sourceFile:sourceMapValidationDestructuringParametertArrayBindingPattern.ts 2 > ^^^^^^^^^^^^^^^ 3 > ^^^-> 1-> -2 > [numberB]: Robot -1->Emitted(7, 9) Source(11, 15) + SourceIndex(0) -2 >Emitted(7, 24) Source(11, 31) + SourceIndex(0) +2 > numberB +1->Emitted(7, 9) Source(11, 16) + SourceIndex(0) +2 >Emitted(7, 24) Source(11, 23) + SourceIndex(0) --- >>> console.log(numberB); 1->^^^^ @@ -142,7 +142,7 @@ sourceFile:sourceMapValidationDestructuringParametertArrayBindingPattern.ts 6 > ^^^^^^^ 7 > ^ 8 > ^ -1->) { +1->]: Robot) { > 2 > console 3 > . diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.js.map index a8a5715add1..b242ccd9114 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringParametertArrayBindingPattern2.js.map] -{"version":3,"file":"sourceMapValidationDestructuringParametertArrayBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringParametertArrayBindingPattern2.ts"],"names":[],"mappings":"AAIA,IAAI,MAAM,GAAU,CAAC,SAAS,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;AAExD,cAAc,EAAiB;QAAd,cAAM;IACnB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,cAAc,EAAe;QAAf,cAAe;IACzB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,cAAc,EAAiD;QAAhD,cAAM,EAAE,UAAgC,EAA/B,qBAAa,EAAE,uBAAe;IAClD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,cAAc,EAA2B;QAA3B,6BAA2B;IACrC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC;AAED,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAExC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAExC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAExC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringParametertArrayBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringParametertArrayBindingPattern2.ts"],"names":[],"mappings":"AAIA,IAAI,MAAM,GAAU,CAAC,SAAS,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;AAExD,cAAc,EAAiB;QAAd,cAAM;IACnB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,cAAc,EAAe;QAAd,cAAM;IACjB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,cAAc,EAAiD;QAAhD,cAAM,EAAE,UAAgC,EAA/B,qBAAa,EAAE,uBAAe;IAClD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,cAAc,EAA2B;QAA1B,6BAAkB;IAC7B,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC;AAED,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAExC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAExC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAExC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.sourcemap.txt index eb37cd692b3..491e5025ecd 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPattern2.sourcemap.txt @@ -135,9 +135,9 @@ sourceFile:sourceMapValidationDestructuringParametertArrayBindingPattern2.ts 2 > ^^^^^^^^^^^^^^ 3 > ^^^-> 1-> -2 > [nameMB]: Robot -1->Emitted(7, 9) Source(11, 15) + SourceIndex(0) -2 >Emitted(7, 23) Source(11, 30) + SourceIndex(0) +2 > nameMB +1->Emitted(7, 9) Source(11, 16) + SourceIndex(0) +2 >Emitted(7, 23) Source(11, 22) + SourceIndex(0) --- >>> console.log(nameMB); 1->^^^^ @@ -148,7 +148,7 @@ sourceFile:sourceMapValidationDestructuringParametertArrayBindingPattern2.ts 6 > ^^^^^^ 7 > ^ 8 > ^ -1->) { +1->]: Robot) { > 2 > console 3 > . @@ -271,9 +271,9 @@ sourceFile:sourceMapValidationDestructuringParametertArrayBindingPattern2.ts 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > [...multiRobotAInfo]: Robot -1->Emitted(15, 9) Source(19, 15) + SourceIndex(0) -2 >Emitted(15, 38) Source(19, 42) + SourceIndex(0) +2 > ...multiRobotAInfo +1->Emitted(15, 9) Source(19, 16) + SourceIndex(0) +2 >Emitted(15, 38) Source(19, 34) + SourceIndex(0) --- >>> console.log(multiRobotAInfo); 1 >^^^^ @@ -284,7 +284,7 @@ sourceFile:sourceMapValidationDestructuringParametertArrayBindingPattern2.ts 6 > ^^^^^^^^^^^^^^^ 7 > ^ 8 > ^ -1 >) { +1 >]: Robot) { > 2 > console 3 > . diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.js.map index b7f0e37c778..782a7682168 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;AAC3D,IAAI,mBAAwB,CAAC;AAC7B,IAAM,mBAAW,EAAE,qBAAa,CAAY;AAC5C,IAAI,8CAA0E,EAAxE,eAAW,EAAE,iBAAa,CAA+C;AAC/E,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AACD,IAAI,CAAC,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"} \ 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,uBAAW,CAAY;AACvB,uBAAW,EAAE,qBAAa,CAAY;AACxC,kDAA0E,EAAxE,eAAW,EAAE,iBAAa,CAA+C;AAC/E,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AACD,IAAI,CAAC,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.sourcemap.txt index f69d311e90d..b58075c8b70 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.sourcemap.txt @@ -129,68 +129,59 @@ sourceFile:sourceMapValidationDestructuringVariableStatement.ts --- >>>var nameA = robotA.name; 1 > -2 >^^^^ -3 > ^^^^^^^^^^^^^^^^^^^ -4 > ^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > - > -2 >var -3 > { name: nameA } = robotA -4 > ; -1 >Emitted(4, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(11, 5) + SourceIndex(0) -3 >Emitted(4, 24) Source(11, 29) + SourceIndex(0) -4 >Emitted(4, 25) Source(11, 30) + SourceIndex(0) + >var { +2 >name: nameA +3 > } = robotA; +1 >Emitted(4, 1) Source(11, 7) + SourceIndex(0) +2 >Emitted(4, 24) Source(11, 18) + SourceIndex(0) +3 >Emitted(4, 25) Source(11, 30) + SourceIndex(0) --- >>>var nameB = robotB.name, skillB = robotB.skill; 1-> -2 >^^^^ -3 > ^^^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^^^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> - > -2 >var { -3 > name: nameB -4 > , -5 > skill: skillB -6 > } = robotB; -1->Emitted(5, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(5, 5) Source(12, 7) + SourceIndex(0) -3 >Emitted(5, 24) Source(12, 18) + SourceIndex(0) -4 >Emitted(5, 26) Source(12, 20) + SourceIndex(0) -5 >Emitted(5, 47) Source(12, 33) + SourceIndex(0) -6 >Emitted(5, 48) Source(12, 45) + SourceIndex(0) + >var { +2 >name: nameB +3 > , +4 > skill: skillB +5 > } = robotB; +1->Emitted(5, 1) Source(12, 7) + SourceIndex(0) +2 >Emitted(5, 24) Source(12, 18) + SourceIndex(0) +3 >Emitted(5, 26) Source(12, 20) + SourceIndex(0) +4 >Emitted(5, 47) Source(12, 33) + SourceIndex(0) +5 >Emitted(5, 48) Source(12, 45) + SourceIndex(0) --- >>>var _a = { name: "Edger", skill: "cutting edges" }, nameC = _a.name, skillC = _a.skill; 1-> -2 >^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^ -8 > ^ +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^ +7 > ^ 1-> - > -2 >var -3 > { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" } -4 > -5 > name: nameC -6 > , -7 > skill: skillC -8 > } = { name: "Edger", skill: "cutting edges" }; -1->Emitted(6, 1) Source(13, 1) + 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) -8 >Emitted(6, 88) Source(13, 80) + SourceIndex(0) + >var +2 >{ name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" } +3 > +4 > name: nameC +5 > , +6 > skill: skillC +7 > } = { name: "Edger", skill: "cutting edges" }; +1->Emitted(6, 1) Source(13, 5) + SourceIndex(0) +2 >Emitted(6, 51) Source(13, 79) + SourceIndex(0) +3 >Emitted(6, 53) Source(13, 7) + SourceIndex(0) +4 >Emitted(6, 68) Source(13, 18) + SourceIndex(0) +5 >Emitted(6, 70) Source(13, 20) + SourceIndex(0) +6 >Emitted(6, 87) Source(13, 33) + SourceIndex(0) +7 >Emitted(6, 88) Source(13, 80) + SourceIndex(0) --- >>>if (nameA == nameB) { 1 > diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js.map index 231f7fa8435..3db6913ce13 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;AAG/C,IAAO,iBAAK,CAAW;AACvB,IAAI,mBAAkB,CAAC;AACvB,IAAK,oBAAQ,EAAE,kBAAM,EAAE,mBAAO,CAAW;AAEzC,IAAI,6CAA4C,CAAC;AACjD,IAAI,oCAA0D,EAAzD,eAAO,EAAE,aAAK,EAAE,cAAM,CAAoC;AAE/D,IAAK,oBAAQ,EAAE,4BAAa,CAAW;AAEvC,EAAE,CAAC,CAAC,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC;IAClB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC"} \ 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,qBAAK,CAAW;AAClB,uBAAO,CAAW;AAClB,wBAAQ,EAAE,kBAAM,EAAE,mBAAO,CAAW;AAEpC,iDAAQ,CAAoC;AAC7C,wCAA0D,EAAzD,eAAO,EAAE,aAAK,EAAE,cAAM,CAAoC;AAE1D,wBAAQ,EAAE,4BAAa,CAAW;AAEvC,EAAE,CAAC,CAAC,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC;IAClB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt index c1fd17ad142..6aa11106d90 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt @@ -92,136 +92,118 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern. --- >>>var nameA = robotA[1]; 1 > -2 >^^^^ -3 > ^^^^^^^^^^^^^^^^^ -4 > ^ -5 > ^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^-> 1 > > > - > -2 >let [, -3 > nameA -4 > ] = robotA; -1 >Emitted(3, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(9, 8) + SourceIndex(0) -3 >Emitted(3, 22) Source(9, 13) + SourceIndex(0) -4 >Emitted(3, 23) Source(9, 24) + SourceIndex(0) + >let [, +2 >nameA +3 > ] = robotA; +1 >Emitted(3, 1) Source(9, 8) + SourceIndex(0) +2 >Emitted(3, 22) Source(9, 13) + SourceIndex(0) +3 >Emitted(3, 23) Source(9, 24) + SourceIndex(0) --- >>>var numberB = robotB[0]; 1-> -2 >^^^^ -3 > ^^^^^^^^^^^^^^^^^^^ -4 > ^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> - > -2 >let -3 > [numberB] = robotB -4 > ; -1->Emitted(4, 1) Source(10, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(10, 5) + SourceIndex(0) -3 >Emitted(4, 24) Source(10, 23) + SourceIndex(0) -4 >Emitted(4, 25) Source(10, 24) + SourceIndex(0) + >let [ +2 >numberB +3 > ] = robotB; +1->Emitted(4, 1) Source(10, 6) + SourceIndex(0) +2 >Emitted(4, 24) Source(10, 13) + SourceIndex(0) +3 >Emitted(4, 25) Source(10, 24) + SourceIndex(0) --- >>>var numberA2 = robotA[0], nameA2 = robotA[1], skillA2 = robotA[2]; 1-> -2 >^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^ -8 > ^ +2 >^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^ +7 > ^ 1-> - > -2 >let [ -3 > numberA2 -4 > , -5 > nameA2 -6 > , -7 > skillA2 -8 > ] = robotA; -1->Emitted(5, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(5, 5) Source(11, 6) + SourceIndex(0) -3 >Emitted(5, 25) Source(11, 14) + SourceIndex(0) -4 >Emitted(5, 27) Source(11, 16) + SourceIndex(0) -5 >Emitted(5, 45) Source(11, 22) + SourceIndex(0) -6 >Emitted(5, 47) Source(11, 24) + SourceIndex(0) -7 >Emitted(5, 66) Source(11, 31) + SourceIndex(0) -8 >Emitted(5, 67) Source(11, 42) + SourceIndex(0) + >let [ +2 >numberA2 +3 > , +4 > nameA2 +5 > , +6 > skillA2 +7 > ] = robotA; +1->Emitted(5, 1) Source(11, 6) + SourceIndex(0) +2 >Emitted(5, 25) Source(11, 14) + SourceIndex(0) +3 >Emitted(5, 27) Source(11, 16) + SourceIndex(0) +4 >Emitted(5, 45) Source(11, 22) + SourceIndex(0) +5 >Emitted(5, 47) Source(11, 24) + SourceIndex(0) +6 >Emitted(5, 66) Source(11, 31) + SourceIndex(0) +7 >Emitted(5, 67) Source(11, 42) + SourceIndex(0) --- >>>var numberC2 = [3, "edging", "Trimming edges"][0]; 1 > -2 >^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -4 > ^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > - > -2 >let -3 > [numberC2] = [3, "edging", "Trimming edges"] -4 > ; -1 >Emitted(6, 1) Source(13, 1) + SourceIndex(0) -2 >Emitted(6, 5) Source(13, 5) + SourceIndex(0) -3 >Emitted(6, 50) Source(13, 49) + SourceIndex(0) -4 >Emitted(6, 51) Source(13, 50) + SourceIndex(0) + >let [ +2 >numberC2 +3 > ] = [3, "edging", "Trimming edges"]; +1 >Emitted(6, 1) Source(13, 6) + SourceIndex(0) +2 >Emitted(6, 50) Source(13, 14) + SourceIndex(0) +3 >Emitted(6, 51) Source(13, 50) + SourceIndex(0) --- >>>var _a = [3, "edging", "Trimming edges"], numberC = _a[0], nameC = _a[1], skillC = _a[2]; 1-> -2 >^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^ -10> ^ +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^ 1-> - > -2 >let -3 > [numberC, nameC, skillC] = [3, "edging", "Trimming edges"] -4 > -5 > numberC -6 > , -7 > nameC -8 > , -9 > skillC -10> ] = [3, "edging", "Trimming edges"]; -1->Emitted(7, 1) Source(14, 1) + SourceIndex(0) -2 >Emitted(7, 5) Source(14, 5) + SourceIndex(0) -3 >Emitted(7, 41) Source(14, 63) + SourceIndex(0) -4 >Emitted(7, 43) Source(14, 6) + SourceIndex(0) -5 >Emitted(7, 58) Source(14, 13) + SourceIndex(0) -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) -10>Emitted(7, 90) Source(14, 64) + SourceIndex(0) + >let +2 >[numberC, nameC, skillC] = [3, "edging", "Trimming edges"] +3 > +4 > numberC +5 > , +6 > nameC +7 > , +8 > skillC +9 > ] = [3, "edging", "Trimming edges"]; +1->Emitted(7, 1) Source(14, 5) + SourceIndex(0) +2 >Emitted(7, 41) Source(14, 63) + SourceIndex(0) +3 >Emitted(7, 43) Source(14, 6) + SourceIndex(0) +4 >Emitted(7, 58) Source(14, 13) + SourceIndex(0) +5 >Emitted(7, 60) Source(14, 15) + SourceIndex(0) +6 >Emitted(7, 73) Source(14, 20) + SourceIndex(0) +7 >Emitted(7, 75) Source(14, 22) + SourceIndex(0) +8 >Emitted(7, 89) Source(14, 28) + SourceIndex(0) +9 >Emitted(7, 90) Source(14, 64) + SourceIndex(0) --- >>>var numberA3 = robotA[0], robotAInfo = robotA.slice(1); 1 > -2 >^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -6 > ^ +2 >^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ 1 > > - > -2 >let [ -3 > numberA3 -4 > , -5 > ...robotAInfo -6 > ] = robotA; -1 >Emitted(8, 1) Source(16, 1) + SourceIndex(0) -2 >Emitted(8, 5) Source(16, 6) + SourceIndex(0) -3 >Emitted(8, 25) Source(16, 14) + SourceIndex(0) -4 >Emitted(8, 27) Source(16, 16) + SourceIndex(0) -5 >Emitted(8, 55) Source(16, 29) + SourceIndex(0) -6 >Emitted(8, 56) Source(16, 40) + SourceIndex(0) + >let [ +2 >numberA3 +3 > , +4 > ...robotAInfo +5 > ] = robotA; +1 >Emitted(8, 1) Source(16, 6) + SourceIndex(0) +2 >Emitted(8, 25) Source(16, 14) + SourceIndex(0) +3 >Emitted(8, 27) Source(16, 16) + SourceIndex(0) +4 >Emitted(8, 55) Source(16, 29) + SourceIndex(0) +5 >Emitted(8, 56) Source(16, 40) + SourceIndex(0) --- >>>if (nameA == nameA2) { 1 > diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js.map index 53b2c81b9be..581a6a4bc5d 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;AAEzE,IAAO,uBAAM,CAAgB;AAC7B,IAAI,uBAAsB,CAAC;AAC3B,IAAK,uBAAM,EAAE,mBAAgC,EAA/B,qBAAa,EAAE,uBAAe,CAAiB;AAE7D,IAAI,6CAA4C,CAAC;AACjD,IAAI,sCAA+E,EAA9E,eAAO,EAAE,UAAgC,EAA/B,qBAAa,EAAE,uBAAe,CAAuC;AAEpF,IAAI,sCAAkC,CAAC;AAEvC,EAAE,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC,CAAC;IACnB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvC,CAAC"} \ 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,2BAAM,CAAgB;AACxB,2BAAM,CAAgB;AACtB,2BAAM,EAAE,mBAAgC,EAA/B,qBAAa,EAAE,uBAAe,CAAiB;AAExD,iDAAM,CAAsC;AAC7C,0CAA+E,EAA9E,eAAO,EAAE,UAAgC,EAA/B,qBAAa,EAAE,uBAAe,CAAuC;AAE/E,0CAAkB,CAAgB;AAEvC,EAAE,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC,CAAC;IACnB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt index ad79567ea63..d0293fdaac9 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt @@ -104,141 +104,123 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern2 --- >>>var skillA = multiRobotA[1]; 1 > -2 >^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^ -4 > ^ -5 > ^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^-> 1 > > - > -2 >let [, -3 > skillA -4 > ] = multiRobotA; -1 >Emitted(3, 1) Source(8, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(8, 8) + SourceIndex(0) -3 >Emitted(3, 28) Source(8, 14) + SourceIndex(0) -4 >Emitted(3, 29) Source(8, 30) + SourceIndex(0) + >let [, +2 >skillA +3 > ] = multiRobotA; +1 >Emitted(3, 1) Source(8, 8) + SourceIndex(0) +2 >Emitted(3, 28) Source(8, 14) + SourceIndex(0) +3 >Emitted(3, 29) Source(8, 30) + SourceIndex(0) --- >>>var nameMB = multiRobotB[0]; 1-> -2 >^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^ -4 > ^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> - > -2 >let -3 > [nameMB] = multiRobotB -4 > ; -1->Emitted(4, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(9, 5) + SourceIndex(0) -3 >Emitted(4, 28) Source(9, 27) + SourceIndex(0) -4 >Emitted(4, 29) Source(9, 28) + SourceIndex(0) + >let [ +2 >nameMB +3 > ] = multiRobotB; +1->Emitted(4, 1) Source(9, 6) + SourceIndex(0) +2 >Emitted(4, 28) Source(9, 12) + SourceIndex(0) +3 >Emitted(4, 29) Source(9, 28) + SourceIndex(0) --- >>>var nameMA = multiRobotA[0], _a = multiRobotA[1], primarySkillA = _a[0], secondarySkillA = _a[1]; 1-> -2 >^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^ -10> ^ +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^ 1-> - > -2 >let [ -3 > nameMA -4 > , -5 > [primarySkillA, secondarySkillA] -6 > -7 > primarySkillA -8 > , -9 > secondarySkillA -10> ]] = multiRobotA; -1->Emitted(5, 1) Source(10, 1) + SourceIndex(0) -2 >Emitted(5, 5) Source(10, 6) + SourceIndex(0) -3 >Emitted(5, 28) Source(10, 12) + SourceIndex(0) -4 >Emitted(5, 30) Source(10, 14) + SourceIndex(0) -5 >Emitted(5, 49) Source(10, 46) + SourceIndex(0) -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) -10>Emitted(5, 98) Source(10, 62) + SourceIndex(0) + >let [ +2 >nameMA +3 > , +4 > [primarySkillA, secondarySkillA] +5 > +6 > primarySkillA +7 > , +8 > secondarySkillA +9 > ]] = multiRobotA; +1->Emitted(5, 1) Source(10, 6) + SourceIndex(0) +2 >Emitted(5, 28) Source(10, 12) + SourceIndex(0) +3 >Emitted(5, 30) Source(10, 14) + SourceIndex(0) +4 >Emitted(5, 49) Source(10, 46) + SourceIndex(0) +5 >Emitted(5, 51) Source(10, 15) + SourceIndex(0) +6 >Emitted(5, 72) Source(10, 28) + SourceIndex(0) +7 >Emitted(5, 74) Source(10, 30) + SourceIndex(0) +8 >Emitted(5, 97) Source(10, 45) + SourceIndex(0) +9 >Emitted(5, 98) Source(10, 62) + SourceIndex(0) --- >>>var nameMC = ["roomba", ["vaccum", "mopping"]][0]; 1 > -2 >^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -4 > ^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > - > -2 >let -3 > [nameMC] = ["roomba", ["vaccum", "mopping"]] -4 > ; -1 >Emitted(6, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(6, 5) Source(12, 5) + SourceIndex(0) -3 >Emitted(6, 50) Source(12, 49) + SourceIndex(0) -4 >Emitted(6, 51) Source(12, 50) + SourceIndex(0) + >let [ +2 >nameMC +3 > ] = ["roomba", ["vaccum", "mopping"]]; +1 >Emitted(6, 1) Source(12, 6) + SourceIndex(0) +2 >Emitted(6, 50) Source(12, 12) + SourceIndex(0) +3 >Emitted(6, 51) Source(12, 50) + SourceIndex(0) --- >>>var _b = ["roomba", ["vaccum", "mopping"]], nameMC2 = _b[0], _c = _b[1], primarySkillC = _c[0], secondarySkillC = _c[1]; 1-> -2 >^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^^^^^^^ -12> ^ +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^ +11> ^ 1-> - > -2 >let -3 > [nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vaccum", "mopping"]] -4 > -5 > nameMC2 -6 > , -7 > [primarySkillC, secondarySkillC] -8 > -9 > primarySkillC -10> , -11> secondarySkillC -12> ]] = ["roomba", ["vaccum", "mopping"]]; -1->Emitted(7, 1) Source(13, 1) + SourceIndex(0) -2 >Emitted(7, 5) Source(13, 5) + SourceIndex(0) -3 >Emitted(7, 43) Source(13, 84) + SourceIndex(0) -4 >Emitted(7, 45) Source(13, 6) + SourceIndex(0) -5 >Emitted(7, 60) Source(13, 13) + SourceIndex(0) -6 >Emitted(7, 62) Source(13, 15) + SourceIndex(0) -7 >Emitted(7, 72) Source(13, 47) + SourceIndex(0) -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) -12>Emitted(7, 121) Source(13, 85) + SourceIndex(0) + >let +2 >[nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vaccum", "mopping"]] +3 > +4 > nameMC2 +5 > , +6 > [primarySkillC, secondarySkillC] +7 > +8 > primarySkillC +9 > , +10> secondarySkillC +11> ]] = ["roomba", ["vaccum", "mopping"]]; +1->Emitted(7, 1) Source(13, 5) + SourceIndex(0) +2 >Emitted(7, 43) Source(13, 84) + SourceIndex(0) +3 >Emitted(7, 45) Source(13, 6) + SourceIndex(0) +4 >Emitted(7, 60) Source(13, 13) + SourceIndex(0) +5 >Emitted(7, 62) Source(13, 15) + SourceIndex(0) +6 >Emitted(7, 72) Source(13, 47) + SourceIndex(0) +7 >Emitted(7, 74) Source(13, 16) + SourceIndex(0) +8 >Emitted(7, 95) Source(13, 29) + SourceIndex(0) +9 >Emitted(7, 97) Source(13, 31) + SourceIndex(0) +10>Emitted(7, 120) Source(13, 46) + SourceIndex(0) +11>Emitted(7, 121) Source(13, 85) + SourceIndex(0) --- >>>var multiRobotAInfo = multiRobotA.slice(0); 1 > -2 >^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -4 > ^ +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^ 1 > > - > -2 >let -3 > [...multiRobotAInfo] = multiRobotA -4 > ; -1 >Emitted(8, 1) Source(15, 1) + SourceIndex(0) -2 >Emitted(8, 5) Source(15, 5) + SourceIndex(0) -3 >Emitted(8, 43) Source(15, 39) + SourceIndex(0) -4 >Emitted(8, 44) Source(15, 40) + SourceIndex(0) + >let [ +2 >...multiRobotAInfo +3 > ] = multiRobotA; +1 >Emitted(8, 1) Source(15, 6) + SourceIndex(0) +2 >Emitted(8, 43) Source(15, 24) + SourceIndex(0) +3 >Emitted(8, 44) Source(15, 40) + SourceIndex(0) --- >>>if (nameMB == nameMA) { 1 > diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js.map index 5f4eb18e261..41074c2d999 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;AAE9F,IAAM,kBAAM,EAAI,qBAAiB,EAAE,yBAAqB,CAAc;AACtE,IAAM,mBAAW,EAAE,kBAAM,EAAI,qBAAiB,EAAE,yBAAqB,CAAc;AACnF,IAAI,mFAAsJ,EAApJ,eAAW,EAAE,cAAM,EAAI,qBAAiB,EAAE,yBAAqB,CAAsF;AAE3J,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,IAAI,CAAC,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"} \ 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,sBAAoD,EAA1C,qBAAiB,EAAE,yBAAqB,CAAc;AAChE,uBAAW,EAAE,kBAAoD,EAA1C,qBAAiB,EAAE,yBAAqB,CAAc;AAC/E,uFAAsJ,EAApJ,eAAW,EAAE,cAAoD,EAA1C,qBAAiB,EAAE,yBAAqB,CAAsF;AAE3J,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,IAAI,CAAC,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.sourcemap.txt index 0e26912364f..deb5b3918f9 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.sourcemap.txt @@ -158,105 +158,96 @@ sourceFile:sourceMapValidationDestructuringVariableStatementNestedObjectBindingP --- >>>var _a = robotA.skills, primaryA = _a.primary, secondaryA = _a.secondary; 1 > -2 >^^^^ -3 > ^^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^ -8 > ^ -9 > ^^^^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^ +8 > ^^^^^^^^^^^^^^^^^^^^^^-> 1 > > - > -2 >var { -3 > skills -4 > : { -5 > primary: primaryA -6 > , -7 > secondary: secondaryA -8 > } } = robotA; -1 >Emitted(3, 1) Source(14, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(14, 7) + SourceIndex(0) -3 >Emitted(3, 23) Source(14, 13) + 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) -8 >Emitted(3, 74) Source(14, 71) + SourceIndex(0) + >var { +2 >skills: { primary: primaryA, secondary: secondaryA } +3 > +4 > primary: primaryA +5 > , +6 > secondary: secondaryA +7 > } } = robotA; +1 >Emitted(3, 1) Source(14, 7) + SourceIndex(0) +2 >Emitted(3, 23) Source(14, 59) + SourceIndex(0) +3 >Emitted(3, 25) Source(14, 17) + SourceIndex(0) +4 >Emitted(3, 46) Source(14, 34) + SourceIndex(0) +5 >Emitted(3, 48) Source(14, 36) + SourceIndex(0) +6 >Emitted(3, 73) Source(14, 57) + SourceIndex(0) +7 >Emitted(3, 74) Source(14, 71) + SourceIndex(0) --- >>>var nameB = robotB.name, _b = robotB.skills, primaryB = _b.primary, secondaryB = _b.secondary; 1-> -2 >^^^^ -3 > ^^^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ -10> ^ -11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> - > -2 >var { -3 > name: nameB -4 > , -5 > skills -6 > : { -7 > primary: primaryB -8 > , -9 > secondary: secondaryB -10> } } = robotB; -1->Emitted(4, 1) Source(15, 1) + SourceIndex(0) -2 >Emitted(4, 5) Source(15, 7) + SourceIndex(0) -3 >Emitted(4, 24) Source(15, 18) + SourceIndex(0) -4 >Emitted(4, 26) Source(15, 20) + SourceIndex(0) -5 >Emitted(4, 44) Source(15, 26) + SourceIndex(0) -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) -10>Emitted(4, 95) Source(15, 84) + SourceIndex(0) + >var { +2 >name: nameB +3 > , +4 > skills: { primary: primaryB, secondary: secondaryB } +5 > +6 > primary: primaryB +7 > , +8 > secondary: secondaryB +9 > } } = robotB; +1->Emitted(4, 1) Source(15, 7) + SourceIndex(0) +2 >Emitted(4, 24) Source(15, 18) + SourceIndex(0) +3 >Emitted(4, 26) Source(15, 20) + SourceIndex(0) +4 >Emitted(4, 44) Source(15, 72) + SourceIndex(0) +5 >Emitted(4, 46) Source(15, 30) + SourceIndex(0) +6 >Emitted(4, 67) Source(15, 47) + SourceIndex(0) +7 >Emitted(4, 69) Source(15, 49) + SourceIndex(0) +8 >Emitted(4, 94) Source(15, 70) + SourceIndex(0) +9 >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; 1-> -2 >^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^^^^^^^^^ -12> ^ +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^ 1-> - > -2 >var -3 > { name: nameC, skills: { primary: primaryB, secondary: secondaryB } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } -4 > -5 > name: nameC -6 > , -7 > skills -8 > : { -9 > primary: primaryB -10> , -11> secondary: secondaryB -12> } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; -1->Emitted(5, 1) Source(16, 1) + SourceIndex(0) -2 >Emitted(5, 5) Source(16, 5) + SourceIndex(0) -3 >Emitted(5, 88) Source(16, 155) + SourceIndex(0) -4 >Emitted(5, 90) Source(16, 7) + SourceIndex(0) -5 >Emitted(5, 105) Source(16, 18) + SourceIndex(0) -6 >Emitted(5, 107) Source(16, 20) + SourceIndex(0) -7 >Emitted(5, 121) Source(16, 26) + SourceIndex(0) -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) -12>Emitted(5, 172) Source(16, 156) + SourceIndex(0) + >var +2 >{ name: nameC, skills: { primary: primaryB, secondary: secondaryB } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } +3 > +4 > name: nameC +5 > , +6 > skills: { primary: primaryB, secondary: secondaryB } +7 > +8 > primary: primaryB +9 > , +10> secondary: secondaryB +11> } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; +1->Emitted(5, 1) Source(16, 5) + SourceIndex(0) +2 >Emitted(5, 88) Source(16, 155) + SourceIndex(0) +3 >Emitted(5, 90) Source(16, 7) + SourceIndex(0) +4 >Emitted(5, 105) Source(16, 18) + SourceIndex(0) +5 >Emitted(5, 107) Source(16, 20) + SourceIndex(0) +6 >Emitted(5, 121) Source(16, 72) + SourceIndex(0) +7 >Emitted(5, 123) Source(16, 30) + SourceIndex(0) +8 >Emitted(5, 144) Source(16, 47) + SourceIndex(0) +9 >Emitted(5, 146) Source(16, 49) + SourceIndex(0) +10>Emitted(5, 171) Source(16, 70) + SourceIndex(0) +11>Emitted(5, 172) Source(16, 156) + SourceIndex(0) --- >>>if (nameB == nameB) { 1 > From 7d60c5e6309a080a12b461a97ce9428854bd2a54 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 10 Dec 2015 14:10:34 -0800 Subject: [PATCH 042/209] Fix the temporary assignment source maps in a better way This doesnt create synthetic nodes with source map node on them And makes us determine what to put source map on for temporary assignments --- src/compiler/emitter.ts | 82 +- src/compiler/sourcemap.ts | 9 - src/compiler/utilities.ts | 7 - ...DestructuringForArrayBindingPattern.js.map | 2 +- ...turingForArrayBindingPattern.sourcemap.txt | 1222 +++++++++-------- ...estructuringForArrayBindingPattern2.js.map | 2 +- ...uringForArrayBindingPattern2.sourcemap.txt | 78 +- ...estructuringForObjectBindingPattern.js.map | 2 +- ...uringForObjectBindingPattern.sourcemap.txt | 510 +++---- ...structuringForObjectBindingPattern2.js.map | 2 +- ...ringForObjectBindingPattern2.sourcemap.txt | 116 +- ...tructuringForOfArrayBindingPattern2.js.map | 2 +- ...ingForOfArrayBindingPattern2.sourcemap.txt | 585 ++++---- ...ructuringForOfObjectBindingPattern2.js.map | 2 +- ...ngForOfObjectBindingPattern2.sourcemap.txt | 540 ++++---- ...ationDestructuringVariableStatement.js.map | 2 +- ...structuringVariableStatement.sourcemap.txt | 43 +- ...ariableStatementArrayBindingPattern.js.map | 2 +- ...StatementArrayBindingPattern.sourcemap.txt | 55 +- ...riableStatementArrayBindingPattern2.js.map | 2 +- ...tatementArrayBindingPattern2.sourcemap.txt | 67 +- ...riableStatementArrayBindingPattern3.js.map | 2 +- ...tatementArrayBindingPattern3.sourcemap.txt | 90 +- ...StatementNestedObjectBindingPattern.js.map | 2 +- ...ntNestedObjectBindingPattern.sourcemap.txt | 67 +- 25 files changed, 1733 insertions(+), 1760 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index b2470a3d584..f152618312a 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1979,15 +1979,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } function createPropertyAccessExpression(expression: Expression, name: Identifier): PropertyAccessExpression { - const result = createSourceMappedSynthesizedNode(SyntaxKind.PropertyAccessExpression, name); + const result = createSynthesizedNode(SyntaxKind.PropertyAccessExpression); result.expression = parenthesizeForAccess(expression); result.dotToken = createSynthesizedNode(SyntaxKind.DotToken); result.name = name; return result; } - function createElementAccessExpression(expression: Expression, argumentExpression: Expression, sourceMapNode: Node): ElementAccessExpression { - const result = createSourceMappedSynthesizedNode(SyntaxKind.ElementAccessExpression, sourceMapNode); + function createElementAccessExpression(expression: Expression, argumentExpression: Expression): ElementAccessExpression { + const result = createSynthesizedNode(SyntaxKind.ElementAccessExpression); result.expression = parenthesizeForAccess(expression); result.argumentExpression = argumentExpression; @@ -2015,7 +2015,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi return expr; } - const node = createSourceMappedSynthesizedNode(SyntaxKind.ParenthesizedExpression, expr); + const node = createSynthesizedNode(SyntaxKind.ParenthesizedExpression); node.expression = expr; return node; } @@ -3326,7 +3326,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi // Initialize LHS // let v = _a[_i]; - const rhsIterationValue = createElementAccessExpression(rhsReference, counter, node.initializer); + const rhsIterationValue = createElementAccessExpression(rhsReference, counter); emitStart(node.initializer); if (node.initializer.kind === SyntaxKind.VariableDeclarationList) { write("var "); @@ -3716,7 +3716,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi * @param value an expression as a right-hand-side operand of the assignment * @param shouldEmitCommaBeforeAssignment a boolean indicating whether to prefix an assignment with comma */ - function emitAssignment(name: Identifier, value: Expression, shouldEmitCommaBeforeAssignment: boolean, nodeForSourceMap: TextRange) { + function emitAssignment(name: Identifier, value: Expression, shouldEmitCommaBeforeAssignment: boolean, nodeForSourceMap: Node) { if (shouldEmitCommaBeforeAssignment) { write(", "); } @@ -3732,7 +3732,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi const isVariableDeclarationOrBindingElement = name.parent && (name.parent.kind === SyntaxKind.VariableDeclaration || name.parent.kind === SyntaxKind.BindingElement); - emitStart(nodeForSourceMap); + // If this is first var declaration, we need to stary at var/let/const keyword instead + // otherwise use nodeForSourceMap as the start position + emitStart(isFirstVariableDeclaration(nodeForSourceMap) ? nodeForSourceMap.parent : nodeForSourceMap); withTemporaryNoSourceMap(() => { if (isVariableDeclarationOrBindingElement) { emitModuleMemberName(name.parent); @@ -3757,15 +3759,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi * @param canDefineTempVariablesInPlace a boolean indicating whether you can define the temporary variable at an assignment location * @param shouldEmitCommaBeforeAssignment a boolean indicating whether an assignment should prefix with comma */ - function emitTempVariableAssignment(expression: Expression, canDefineTempVariablesInPlace: boolean, shouldEmitCommaBeforeAssignment: boolean): Identifier { + function emitTempVariableAssignment(expression: Expression, canDefineTempVariablesInPlace: boolean, shouldEmitCommaBeforeAssignment: boolean, sourceMapNode?: Node): Identifier { const identifier = createTempVariable(TempFlags.Auto); if (!canDefineTempVariablesInPlace) { recordTempDeclaration(identifier); } - emitAssignment(identifier, expression, shouldEmitCommaBeforeAssignment, expression.parent || expression); + emitAssignment(identifier, expression, shouldEmitCommaBeforeAssignment, sourceMapNode || expression.parent); return identifier; } + function isFirstVariableDeclaration(root: Node) { + return root.kind === SyntaxKind.VariableDeclaration && + root.parent.kind === SyntaxKind.VariableDeclarationList && + (root.parent).declarations[0] === root; + } + function emitDestructuring(root: BinaryExpression | VariableDeclaration | ParameterDeclaration, isAssignmentExpressionStatement: boolean, value?: Expression) { let emitCount = 0; @@ -3789,9 +3797,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi else { Debug.assert(!isAssignmentExpressionStatement); // If first variable declaration of variable statement correct the start location - if (root.kind === SyntaxKind.VariableDeclaration && - root.parent.kind === SyntaxKind.VariableDeclarationList && - (root.parent).declarations[0] === root) { + if (isFirstVariableDeclaration(root)) { // Use emit location of "var " as next emit start entry sourceMap.changeEmitSourcePos(); } @@ -3808,20 +3814,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi * @param reuseIdentifierExpressions true if identifier expressions can simply be returned; * false if it is necessary to always emit an identifier. */ - function ensureIdentifier(expr: Expression, reuseIdentifierExpressions: boolean): Expression { + function ensureIdentifier(expr: Expression, reuseIdentifierExpressions: boolean, sourceMapNode: Node): Expression { if (expr.kind === SyntaxKind.Identifier && reuseIdentifierExpressions) { return expr; } - const identifier = emitTempVariableAssignment(expr, canDefineTempVariablesInPlace, emitCount > 0); + const identifier = emitTempVariableAssignment(expr, canDefineTempVariablesInPlace, emitCount > 0, sourceMapNode); emitCount++; return identifier; } - function createDefaultValueCheck(value: Expression, defaultValue: Expression): Expression { + function createDefaultValueCheck(value: Expression, defaultValue: Expression, sourceMapNode: Node): Expression { // The value expression will be evaluated twice, so for anything but a simple identifier // we need to generate a temporary variable - value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true); + // If the temporary variable needs to be emitted use the source Map node for assignment of that statement + value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true, sourceMapNode); // Return the expression 'value === void 0 ? defaultValue : value' const equals = createSynthesizedNode(SyntaxKind.BinaryExpression); equals.left = value; @@ -3846,22 +3853,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi return node; } - function createPropertyAccessForDestructuringProperty(object: Expression, propName: PropertyName, sourceMapNode: Node): Expression { + function createPropertyAccessForDestructuringProperty(object: Expression, propName: PropertyName): Expression { let index: Expression; const nameIsComputed = propName.kind === SyntaxKind.ComputedPropertyName; if (nameIsComputed) { - index = ensureIdentifier((propName).expression, /*reuseIdentifierExpressions*/ false); + // TODO to handle when we look into sourcemaps for computed properties, for now use propName + index = ensureIdentifier((propName).expression, /*reuseIdentifierExpressions*/ false, propName); } else { // We create a synthetic copy of the identifier in order to avoid the rewriting that might // otherwise occur when the identifier is emitted. - index = createSourceMappedSynthesizedNode(propName.kind, sourceMapNode); + index = createSynthesizedNode(propName.kind); (index).text = (propName).text; } return !nameIsComputed && index.kind === SyntaxKind.Identifier ? createPropertyAccessExpression(object, index) - : createElementAccessExpression(object, index, index); + : createElementAccessExpression(object, index); } function createSliceCall(value: Expression, sliceIndex: number): CallExpression { @@ -3879,13 +3887,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi if (properties.length !== 1) { // For anything but a single element destructuring we need to generate a temporary // to ensure value is evaluated exactly once. - value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true); + // When doing so we want to hightlight the passed in source map node since thats the one needing this temp assignment + value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true, sourceMapNode); } for (const p of properties) { if (p.kind === SyntaxKind.PropertyAssignment || p.kind === SyntaxKind.ShorthandPropertyAssignment) { const propName = (p).name; const target = p.kind === SyntaxKind.ShorthandPropertyAssignment ? p : (p).initializer || propName; - emitDestructuringAssignment(target, createPropertyAccessForDestructuringProperty(value, propName, target), properties.length === 1 ? sourceMapNode : p); + // Assignment for target = value.propName should highligh whole property, hence use p as source map node + emitDestructuringAssignment(target, createPropertyAccessForDestructuringProperty(value, propName), p); } } } @@ -3895,30 +3905,33 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi if (elements.length !== 1) { // For anything but a single element destructuring we need to generate a temporary // to ensure value is evaluated exactly once. - value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true); + // When doing so we want to hightlight the passed in source map node since thats the one needing this temp assignment + value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true, sourceMapNode); } for (let i = 0; i < elements.length; i++) { const e = elements[i]; if (e.kind !== SyntaxKind.OmittedExpression) { + // Assignment for target = value.propName should highligh whole property, hence use e as source map node if (e.kind !== SyntaxKind.SpreadElementExpression) { - emitDestructuringAssignment(e, createElementAccessExpression(value, createNumericLiteral(i), e), elements.length === 1 ? sourceMapNode : e); + emitDestructuringAssignment(e, createElementAccessExpression(value, createNumericLiteral(i)), e); } else if (i === elements.length - 1) { - emitDestructuringAssignment((e).expression, createSliceCall(value, i), elements.length === 1 ? sourceMapNode : e); + emitDestructuringAssignment((e).expression, createSliceCall(value, i), e); } } } } function emitDestructuringAssignment(target: Expression | ShorthandPropertyAssignment, value: Expression, sourceMapNode: Node) { + // When emitting target = value use source map node to highlight, including any temporary assignments needed for this if (target.kind === SyntaxKind.ShorthandPropertyAssignment) { if ((target).objectAssignmentInitializer) { - value = createDefaultValueCheck(value, (target).objectAssignmentInitializer); + value = createDefaultValueCheck(value, (target).objectAssignmentInitializer, sourceMapNode); } target = (target).name; } else if (target.kind === SyntaxKind.BinaryExpression && (target).operatorToken.kind === SyntaxKind.EqualsToken) { - value = createDefaultValueCheck(value, (target).right); + value = createDefaultValueCheck(value, (target).right, sourceMapNode); target = (target).left; } if (target.kind === SyntaxKind.ObjectLiteralExpression) { @@ -3928,7 +3941,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emitArrayLiteralAssignment(target, value, sourceMapNode); } else { - // TODO emitAssignment(target, value, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0, sourceMapNode); emitCount++; } @@ -3942,13 +3954,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emit(value); } else if (isAssignmentExpressionStatement) { + // Source map node for root.left = root.right is root emitDestructuringAssignment(target, value, root); } else { if (root.parent.kind !== SyntaxKind.ParenthesizedExpression) { write("("); } - value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true); + // Temporary assignment needed to emit root should highlight whole binary expression + value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true, root); + // Source map node for root.left = root.right is root emitDestructuringAssignment(target, value, root); write(", "); emit(value); @@ -3959,9 +3974,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } function emitBindingElement(target: BindingElement | VariableDeclaration, value: Expression) { + // Any temporary assignments needed to emit target = value should point to target if (target.initializer) { // Combine value and initializer - value = value ? createDefaultValueCheck(value, target.initializer) : target.initializer; + value = value ? createDefaultValueCheck(value, target.initializer, target) : target.initializer; } else if (!value) { // Use 'void 0' in absence of value and initializer @@ -3977,7 +3993,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi // to ensure value is evaluated exactly once. Additionally, if we have zero elements // we need to emit *something* to ensure that in case a 'var' keyword was already emitted, // so in that case, we'll intentionally create that temporary. - value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ numElements !== 0); + value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ numElements !== 0, target); } for (let i = 0; i < numElements; i++) { @@ -3985,12 +4001,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi if (pattern.kind === SyntaxKind.ObjectBindingPattern) { // Rewrite element to a declaration with an initializer that fetches property const propName = element.propertyName || element.name; - emitBindingElement(element, createPropertyAccessForDestructuringProperty(value, propName, element)); + emitBindingElement(element, createPropertyAccessForDestructuringProperty(value, propName)); } else if (element.kind !== SyntaxKind.OmittedExpression) { if (!element.dotDotDotToken) { // Rewrite element to a declaration that accesses array element at index i - emitBindingElement(element, createElementAccessExpression(value, createNumericLiteral(i), element)); + emitBindingElement(element, createElementAccessExpression(value, createNumericLiteral(i))); } else if (i === numElements - 1) { emitBindingElement(element, createSliceCall(value, i)); diff --git a/src/compiler/sourcemap.ts b/src/compiler/sourcemap.ts index 501b1aa476a..ab079c642ea 100644 --- a/src/compiler/sourcemap.ts +++ b/src/compiler/sourcemap.ts @@ -281,15 +281,7 @@ namespace ts { updateLastEncodedAndRecordedSpans(); } - function getSourceMapRange(range: TextRange) { - while ((range as SynthesizedNode).sourceMapNode) { - range = (range as SynthesizedNode).sourceMapNode; - } - return range; - } - function getStartPos(range: TextRange) { - range = getSourceMapRange(range); const rangeHasDecorators = !!(range as Node).decorators; return range.pos !== -1 ? skipTrivia(currentSourceFile.text, rangeHasDecorators ? (range as Node).decorators.end : range.pos) : -1; } @@ -299,7 +291,6 @@ namespace ts { } function emitEnd(range: TextRange, stopOverridingEnd?: boolean) { - range = getSourceMapRange(range); emitPos(range.end); stopOverridingSpan = stopOverridingEnd; } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 03cdf26a4ad..0f0f50719c1 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -12,7 +12,6 @@ namespace ts { leadingCommentRanges?: CommentRange[]; trailingCommentRanges?: CommentRange[]; startsOnNewLine: boolean; - sourceMapNode?: Node; } export function getDeclarationOfKind(symbol: Symbol, kind: SyntaxKind): Declaration { @@ -1627,12 +1626,6 @@ namespace ts { return node; } - export function createSourceMappedSynthesizedNode(kind: SyntaxKind, sourceMapNode: Node, startsOnNewLine?: boolean): Node { - const synthesizedNode = createSynthesizedNode(kind, startsOnNewLine); - synthesizedNode.sourceMapNode = sourceMapNode; - return synthesizedNode; - } - export function createSynthesizedNodeArray(): NodeArray { const array = >[]; array.pos = -1; diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.js.map index 971f5106983..0ee4a2092e7 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringForArrayBindingPattern.js.map] -{"version":3,"file":"sourceMapValidationDestructuringForArrayBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForArrayBindingPattern.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED,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;AACzE;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,GAAG,CAAC,CAAQ,qBAAK,EAAY,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC7C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAK,mBAAsB,EAAnB,aAAK,EAAgB,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAK,mCAAsC,EAAnC,aAAK,EAAgC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAQ,uBAAgC,EAA/B,qBAAa,EAAE,uBAAe,EAAkB,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;I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CAAC,CAAC;AACjC,CAAC;AACD,GAAG,CAAC,CAAM,kEAAkB,EAAyC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACrF,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringForArrayBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForArrayBindingPattern.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED,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;AACzE;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,GAAG,CAAC,CAAQ,qBAAK,EAAY,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC7C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,IAAA,eAA0B,EAAnB,aAAK,EAAgB,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,IAAA,+BAA0C,EAAnC,aAAK,EAAgC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAQ,uB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;AACjC,CAAC;AACD,GAAG,CAAC,CAAM,8CAAkB,EAAqB,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjE,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC;AACD,GAAG,CAAC,CAAM,kEAAkB,EAAyC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACrF,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.sourcemap.txt index 2a9497d3ad2..e7ee5c01f2c 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern.sourcemap.txt @@ -314,63 +314,66 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^ -8 > ^^ -9 > ^ -10> ^^^ -11> ^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^ -19> ^^ -20> ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^ +9 > ^^ +10> ^ +11> ^^^ +12> ^ +13> ^^ +14> ^ +15> ^^^ +16> ^ +17> ^^ +18> ^ +19> ^^ +20> ^^ +21> ^ 1-> > 2 >for 3 > -4 > (let -5 > [, nameA] = getRobot() -6 > -7 > nameA -8 > ] = getRobot(), -9 > i -10> = -11> 0 -12> ; -13> i -14> < -15> 1 -16> ; -17> i -18> ++ -19> ) -20> { +4 > ( +5 > +6 > let [, nameA] = getRobot() +7 > +8 > nameA +9 > ] = getRobot(), +10> i +11> = +12> 0 +13> ; +14> i +15> < +16> 1 +17> ; +18> i +19> ++ +20> ) +21> { 1->Emitted(13, 1) Source(21, 1) + SourceIndex(0) 2 >Emitted(13, 4) Source(21, 4) + SourceIndex(0) 3 >Emitted(13, 5) Source(21, 5) + SourceIndex(0) -4 >Emitted(13, 6) Source(21, 10) + SourceIndex(0) -5 >Emitted(13, 25) Source(21, 32) + SourceIndex(0) -6 >Emitted(13, 27) Source(21, 13) + SourceIndex(0) -7 >Emitted(13, 40) Source(21, 18) + SourceIndex(0) -8 >Emitted(13, 42) Source(21, 34) + SourceIndex(0) -9 >Emitted(13, 43) Source(21, 35) + SourceIndex(0) -10>Emitted(13, 46) Source(21, 38) + SourceIndex(0) -11>Emitted(13, 47) Source(21, 39) + SourceIndex(0) -12>Emitted(13, 49) Source(21, 41) + SourceIndex(0) -13>Emitted(13, 50) Source(21, 42) + SourceIndex(0) -14>Emitted(13, 53) Source(21, 45) + SourceIndex(0) -15>Emitted(13, 54) Source(21, 46) + SourceIndex(0) -16>Emitted(13, 56) Source(21, 48) + SourceIndex(0) -17>Emitted(13, 57) Source(21, 49) + SourceIndex(0) -18>Emitted(13, 59) Source(21, 51) + SourceIndex(0) -19>Emitted(13, 61) Source(21, 53) + SourceIndex(0) -20>Emitted(13, 62) Source(21, 54) + SourceIndex(0) +4 >Emitted(13, 6) Source(21, 6) + SourceIndex(0) +5 >Emitted(13, 10) Source(21, 6) + SourceIndex(0) +6 >Emitted(13, 25) Source(21, 32) + SourceIndex(0) +7 >Emitted(13, 27) Source(21, 13) + SourceIndex(0) +8 >Emitted(13, 40) Source(21, 18) + SourceIndex(0) +9 >Emitted(13, 42) Source(21, 34) + SourceIndex(0) +10>Emitted(13, 43) Source(21, 35) + SourceIndex(0) +11>Emitted(13, 46) Source(21, 38) + SourceIndex(0) +12>Emitted(13, 47) Source(21, 39) + SourceIndex(0) +13>Emitted(13, 49) Source(21, 41) + SourceIndex(0) +14>Emitted(13, 50) Source(21, 42) + SourceIndex(0) +15>Emitted(13, 53) Source(21, 45) + SourceIndex(0) +16>Emitted(13, 54) Source(21, 46) + SourceIndex(0) +17>Emitted(13, 56) Source(21, 48) + SourceIndex(0) +18>Emitted(13, 57) Source(21, 49) + SourceIndex(0) +19>Emitted(13, 59) Source(21, 51) + SourceIndex(0) +20>Emitted(13, 61) Source(21, 53) + SourceIndex(0) +21>Emitted(13, 62) Source(21, 54) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -414,63 +417,66 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^ -8 > ^^ -9 > ^ -10> ^^^ -11> ^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^ -19> ^^ -20> ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^ +9 > ^^ +10> ^ +11> ^^^ +12> ^ +13> ^^ +14> ^ +15> ^^^ +16> ^ +17> ^^ +18> ^ +19> ^^ +20> ^^ +21> ^ 1-> > 2 >for 3 > -4 > (let -5 > [, nameA] = [2, "trimmer", "trimming"] -6 > -7 > nameA -8 > ] = [2, "trimmer", "trimming"], -9 > i -10> = -11> 0 -12> ; -13> i -14> < -15> 1 -16> ; -17> i -18> ++ -19> ) -20> { +4 > ( +5 > +6 > let [, nameA] = [2, "trimmer", "trimming"] +7 > +8 > nameA +9 > ] = [2, "trimmer", "trimming"], +10> i +11> = +12> 0 +13> ; +14> i +15> < +16> 1 +17> ; +18> i +19> ++ +20> ) +21> { 1->Emitted(16, 1) Source(24, 1) + SourceIndex(0) 2 >Emitted(16, 4) Source(24, 4) + SourceIndex(0) 3 >Emitted(16, 5) Source(24, 5) + SourceIndex(0) -4 >Emitted(16, 6) Source(24, 10) + SourceIndex(0) -5 >Emitted(16, 41) Source(24, 48) + SourceIndex(0) -6 >Emitted(16, 43) Source(24, 13) + SourceIndex(0) -7 >Emitted(16, 56) Source(24, 18) + SourceIndex(0) -8 >Emitted(16, 58) Source(24, 50) + SourceIndex(0) -9 >Emitted(16, 59) Source(24, 51) + SourceIndex(0) -10>Emitted(16, 62) Source(24, 54) + SourceIndex(0) -11>Emitted(16, 63) Source(24, 55) + SourceIndex(0) -12>Emitted(16, 65) Source(24, 57) + SourceIndex(0) -13>Emitted(16, 66) Source(24, 58) + SourceIndex(0) -14>Emitted(16, 69) Source(24, 61) + SourceIndex(0) -15>Emitted(16, 70) Source(24, 62) + SourceIndex(0) -16>Emitted(16, 72) Source(24, 64) + SourceIndex(0) -17>Emitted(16, 73) Source(24, 65) + SourceIndex(0) -18>Emitted(16, 75) Source(24, 67) + SourceIndex(0) -19>Emitted(16, 77) Source(24, 69) + SourceIndex(0) -20>Emitted(16, 78) Source(24, 70) + SourceIndex(0) +4 >Emitted(16, 6) Source(24, 6) + SourceIndex(0) +5 >Emitted(16, 10) Source(24, 6) + SourceIndex(0) +6 >Emitted(16, 41) Source(24, 48) + SourceIndex(0) +7 >Emitted(16, 43) Source(24, 13) + SourceIndex(0) +8 >Emitted(16, 56) Source(24, 18) + SourceIndex(0) +9 >Emitted(16, 58) Source(24, 50) + SourceIndex(0) +10>Emitted(16, 59) Source(24, 51) + SourceIndex(0) +11>Emitted(16, 62) Source(24, 54) + SourceIndex(0) +12>Emitted(16, 63) Source(24, 55) + SourceIndex(0) +13>Emitted(16, 65) Source(24, 57) + SourceIndex(0) +14>Emitted(16, 66) Source(24, 58) + SourceIndex(0) +15>Emitted(16, 69) Source(24, 61) + SourceIndex(0) +16>Emitted(16, 70) Source(24, 62) + SourceIndex(0) +17>Emitted(16, 72) Source(24, 64) + SourceIndex(0) +18>Emitted(16, 73) Source(24, 65) + SourceIndex(0) +19>Emitted(16, 75) Source(24, 67) + SourceIndex(0) +20>Emitted(16, 77) Source(24, 69) + SourceIndex(0) +21>Emitted(16, 78) Source(24, 70) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -620,75 +626,78 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^^^^^^^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^^ -19> ^ -20> ^^ -21> ^ -22> ^^ -23> ^^ -24> ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^ +15> ^^^ +16> ^ +17> ^^ +18> ^ +19> ^^^ +20> ^ +21> ^^ +22> ^ +23> ^^ +24> ^^ +25> ^ 1-> > 2 >for 3 > -4 > (let -5 > [, [primarySkillA, secondarySkillA]] = getMultiRobot() -6 > -7 > [primarySkillA, secondarySkillA] -8 > -9 > primarySkillA -10> , -11> secondarySkillA -12> ]] = getMultiRobot(), -13> i -14> = -15> 0 -16> ; -17> i -18> < -19> 1 -20> ; -21> i -22> ++ -23> ) -24> { +4 > ( +5 > +6 > let [, [primarySkillA, secondarySkillA]] = getMultiRobot() +7 > +8 > [primarySkillA, secondarySkillA] +9 > +10> primarySkillA +11> , +12> secondarySkillA +13> ]] = getMultiRobot(), +14> i +15> = +16> 0 +17> ; +18> i +19> < +20> 1 +21> ; +22> i +23> ++ +24> ) +25> { 1->Emitted(22, 1) Source(30, 1) + SourceIndex(0) 2 >Emitted(22, 4) Source(30, 4) + SourceIndex(0) 3 >Emitted(22, 5) Source(30, 5) + SourceIndex(0) -4 >Emitted(22, 6) Source(30, 10) + SourceIndex(0) -5 >Emitted(22, 30) Source(30, 64) + SourceIndex(0) -6 >Emitted(22, 32) Source(30, 13) + SourceIndex(0) -7 >Emitted(22, 42) Source(30, 45) + SourceIndex(0) -8 >Emitted(22, 44) Source(30, 14) + SourceIndex(0) -9 >Emitted(22, 65) Source(30, 27) + SourceIndex(0) -10>Emitted(22, 67) Source(30, 29) + SourceIndex(0) -11>Emitted(22, 90) Source(30, 44) + SourceIndex(0) -12>Emitted(22, 92) Source(30, 66) + SourceIndex(0) -13>Emitted(22, 93) Source(30, 67) + SourceIndex(0) -14>Emitted(22, 96) Source(30, 70) + SourceIndex(0) -15>Emitted(22, 97) Source(30, 71) + SourceIndex(0) -16>Emitted(22, 99) Source(30, 73) + SourceIndex(0) -17>Emitted(22, 100) Source(30, 74) + SourceIndex(0) -18>Emitted(22, 103) Source(30, 77) + SourceIndex(0) -19>Emitted(22, 104) Source(30, 78) + SourceIndex(0) -20>Emitted(22, 106) Source(30, 80) + SourceIndex(0) -21>Emitted(22, 107) Source(30, 81) + SourceIndex(0) -22>Emitted(22, 109) Source(30, 83) + SourceIndex(0) -23>Emitted(22, 111) Source(30, 85) + SourceIndex(0) -24>Emitted(22, 112) Source(30, 86) + SourceIndex(0) +4 >Emitted(22, 6) Source(30, 6) + SourceIndex(0) +5 >Emitted(22, 10) Source(30, 6) + SourceIndex(0) +6 >Emitted(22, 30) Source(30, 64) + SourceIndex(0) +7 >Emitted(22, 32) Source(30, 13) + SourceIndex(0) +8 >Emitted(22, 42) Source(30, 45) + SourceIndex(0) +9 >Emitted(22, 44) Source(30, 14) + SourceIndex(0) +10>Emitted(22, 65) Source(30, 27) + SourceIndex(0) +11>Emitted(22, 67) Source(30, 29) + SourceIndex(0) +12>Emitted(22, 90) Source(30, 44) + SourceIndex(0) +13>Emitted(22, 92) Source(30, 66) + SourceIndex(0) +14>Emitted(22, 93) Source(30, 67) + SourceIndex(0) +15>Emitted(22, 96) Source(30, 70) + SourceIndex(0) +16>Emitted(22, 97) Source(30, 71) + SourceIndex(0) +17>Emitted(22, 99) Source(30, 73) + SourceIndex(0) +18>Emitted(22, 100) Source(30, 74) + SourceIndex(0) +19>Emitted(22, 103) Source(30, 77) + SourceIndex(0) +20>Emitted(22, 104) Source(30, 78) + SourceIndex(0) +21>Emitted(22, 106) Source(30, 80) + SourceIndex(0) +22>Emitted(22, 107) Source(30, 81) + SourceIndex(0) +23>Emitted(22, 109) Source(30, 83) + SourceIndex(0) +24>Emitted(22, 111) Source(30, 85) + SourceIndex(0) +25>Emitted(22, 112) Source(30, 86) + SourceIndex(0) --- >>> console.log(primarySkillA); 1 >^^^^ @@ -732,75 +741,78 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^^^^^^^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^^ -19> ^ -20> ^^ -21> ^ -22> ^^ -23> ^^ -24> ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^ +15> ^^^ +16> ^ +17> ^^ +18> ^ +19> ^^^ +20> ^ +21> ^^ +22> ^ +23> ^^ +24> ^^ +25> ^ 1-> > 2 >for 3 > -4 > (let -5 > [, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]] -6 > -7 > [primarySkillA, secondarySkillA] -8 > -9 > primarySkillA -10> , -11> secondarySkillA -12> ]] = ["trimmer", ["trimming", "edging"]], -13> i -14> = -15> 0 -16> ; -17> i -18> < -19> 1 -20> ; -21> i -22> ++ -23> ) -24> { +4 > ( +5 > +6 > let [, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]] +7 > +8 > [primarySkillA, secondarySkillA] +9 > +10> primarySkillA +11> , +12> secondarySkillA +13> ]] = ["trimmer", ["trimming", "edging"]], +14> i +15> = +16> 0 +17> ; +18> i +19> < +20> 1 +21> ; +22> i +23> ++ +24> ) +25> { 1->Emitted(25, 1) Source(33, 1) + SourceIndex(0) 2 >Emitted(25, 4) Source(33, 4) + SourceIndex(0) 3 >Emitted(25, 5) Source(33, 5) + SourceIndex(0) -4 >Emitted(25, 6) Source(33, 10) + SourceIndex(0) -5 >Emitted(25, 50) Source(33, 84) + SourceIndex(0) -6 >Emitted(25, 52) Source(33, 13) + SourceIndex(0) -7 >Emitted(25, 62) Source(33, 45) + SourceIndex(0) -8 >Emitted(25, 64) Source(33, 14) + SourceIndex(0) -9 >Emitted(25, 85) Source(33, 27) + SourceIndex(0) -10>Emitted(25, 87) Source(33, 29) + SourceIndex(0) -11>Emitted(25, 110) Source(33, 44) + SourceIndex(0) -12>Emitted(25, 112) Source(33, 86) + SourceIndex(0) -13>Emitted(25, 113) Source(33, 87) + SourceIndex(0) -14>Emitted(25, 116) Source(33, 90) + SourceIndex(0) -15>Emitted(25, 117) Source(33, 91) + SourceIndex(0) -16>Emitted(25, 119) Source(33, 93) + SourceIndex(0) -17>Emitted(25, 120) Source(33, 94) + SourceIndex(0) -18>Emitted(25, 123) Source(33, 97) + SourceIndex(0) -19>Emitted(25, 124) Source(33, 98) + SourceIndex(0) -20>Emitted(25, 126) Source(33, 100) + SourceIndex(0) -21>Emitted(25, 127) Source(33, 101) + SourceIndex(0) -22>Emitted(25, 129) Source(33, 103) + SourceIndex(0) -23>Emitted(25, 131) Source(33, 105) + SourceIndex(0) -24>Emitted(25, 132) Source(33, 106) + SourceIndex(0) +4 >Emitted(25, 6) Source(33, 6) + SourceIndex(0) +5 >Emitted(25, 10) Source(33, 6) + SourceIndex(0) +6 >Emitted(25, 50) Source(33, 84) + SourceIndex(0) +7 >Emitted(25, 52) Source(33, 13) + SourceIndex(0) +8 >Emitted(25, 62) Source(33, 45) + SourceIndex(0) +9 >Emitted(25, 64) Source(33, 14) + SourceIndex(0) +10>Emitted(25, 85) Source(33, 27) + SourceIndex(0) +11>Emitted(25, 87) Source(33, 29) + SourceIndex(0) +12>Emitted(25, 110) Source(33, 44) + SourceIndex(0) +13>Emitted(25, 112) Source(33, 86) + SourceIndex(0) +14>Emitted(25, 113) Source(33, 87) + SourceIndex(0) +15>Emitted(25, 116) Source(33, 90) + SourceIndex(0) +16>Emitted(25, 117) Source(33, 91) + SourceIndex(0) +17>Emitted(25, 119) Source(33, 93) + SourceIndex(0) +18>Emitted(25, 120) Source(33, 94) + SourceIndex(0) +19>Emitted(25, 123) Source(33, 97) + SourceIndex(0) +20>Emitted(25, 124) Source(33, 98) + SourceIndex(0) +21>Emitted(25, 126) Source(33, 100) + SourceIndex(0) +22>Emitted(25, 127) Source(33, 101) + SourceIndex(0) +23>Emitted(25, 129) Source(33, 103) + SourceIndex(0) +24>Emitted(25, 131) Source(33, 105) + SourceIndex(0) +25>Emitted(25, 132) Source(33, 106) + SourceIndex(0) --- >>> console.log(primarySkillA); 1 >^^^^ @@ -1516,75 +1528,78 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^^ -19> ^ -20> ^^ -21> ^ -22> ^^ -23> ^^ -24> ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^ +13> ^^ +14> ^ +15> ^^^ +16> ^ +17> ^^ +18> ^ +19> ^^^ +20> ^ +21> ^^ +22> ^ +23> ^^ +24> ^^ +25> ^ 1-> > 2 >for 3 > -4 > (let -5 > [numberA2, nameA2, skillA2] = getRobot() -6 > -7 > numberA2 -8 > , -9 > nameA2 -10> , -11> skillA2 -12> ] = getRobot(), -13> i -14> = -15> 0 -16> ; -17> i -18> < -19> 1 -20> ; -21> i -22> ++ -23> ) -24> { +4 > ( +5 > +6 > let [numberA2, nameA2, skillA2] = getRobot() +7 > +8 > numberA2 +9 > , +10> nameA2 +11> , +12> skillA2 +13> ] = getRobot(), +14> i +15> = +16> 0 +17> ; +18> i +19> < +20> 1 +21> ; +22> i +23> ++ +24> ) +25> { 1->Emitted(49, 1) Source(59, 1) + SourceIndex(0) 2 >Emitted(49, 4) Source(59, 4) + SourceIndex(0) 3 >Emitted(49, 5) Source(59, 5) + SourceIndex(0) -4 >Emitted(49, 6) Source(59, 10) + SourceIndex(0) -5 >Emitted(49, 25) Source(59, 50) + SourceIndex(0) -6 >Emitted(49, 27) Source(59, 11) + SourceIndex(0) -7 >Emitted(49, 43) Source(59, 19) + SourceIndex(0) -8 >Emitted(49, 45) Source(59, 21) + SourceIndex(0) -9 >Emitted(49, 59) Source(59, 27) + SourceIndex(0) -10>Emitted(49, 61) Source(59, 29) + SourceIndex(0) -11>Emitted(49, 76) Source(59, 36) + SourceIndex(0) -12>Emitted(49, 78) Source(59, 52) + SourceIndex(0) -13>Emitted(49, 79) Source(59, 53) + SourceIndex(0) -14>Emitted(49, 82) Source(59, 56) + SourceIndex(0) -15>Emitted(49, 83) Source(59, 57) + SourceIndex(0) -16>Emitted(49, 85) Source(59, 59) + SourceIndex(0) -17>Emitted(49, 86) Source(59, 60) + SourceIndex(0) -18>Emitted(49, 89) Source(59, 63) + SourceIndex(0) -19>Emitted(49, 90) Source(59, 64) + SourceIndex(0) -20>Emitted(49, 92) Source(59, 66) + SourceIndex(0) -21>Emitted(49, 93) Source(59, 67) + SourceIndex(0) -22>Emitted(49, 95) Source(59, 69) + SourceIndex(0) -23>Emitted(49, 97) Source(59, 71) + SourceIndex(0) -24>Emitted(49, 98) Source(59, 72) + SourceIndex(0) +4 >Emitted(49, 6) Source(59, 6) + SourceIndex(0) +5 >Emitted(49, 10) Source(59, 6) + SourceIndex(0) +6 >Emitted(49, 25) Source(59, 50) + SourceIndex(0) +7 >Emitted(49, 27) Source(59, 11) + SourceIndex(0) +8 >Emitted(49, 43) Source(59, 19) + SourceIndex(0) +9 >Emitted(49, 45) Source(59, 21) + SourceIndex(0) +10>Emitted(49, 59) Source(59, 27) + SourceIndex(0) +11>Emitted(49, 61) Source(59, 29) + SourceIndex(0) +12>Emitted(49, 76) Source(59, 36) + SourceIndex(0) +13>Emitted(49, 78) Source(59, 52) + SourceIndex(0) +14>Emitted(49, 79) Source(59, 53) + SourceIndex(0) +15>Emitted(49, 82) Source(59, 56) + SourceIndex(0) +16>Emitted(49, 83) Source(59, 57) + SourceIndex(0) +17>Emitted(49, 85) Source(59, 59) + SourceIndex(0) +18>Emitted(49, 86) Source(59, 60) + SourceIndex(0) +19>Emitted(49, 89) Source(59, 63) + SourceIndex(0) +20>Emitted(49, 90) Source(59, 64) + SourceIndex(0) +21>Emitted(49, 92) Source(59, 66) + SourceIndex(0) +22>Emitted(49, 93) Source(59, 67) + SourceIndex(0) +23>Emitted(49, 95) Source(59, 69) + SourceIndex(0) +24>Emitted(49, 97) Source(59, 71) + SourceIndex(0) +25>Emitted(49, 98) Source(59, 72) + SourceIndex(0) --- >>> console.log(nameA2); 1 >^^^^ @@ -1628,75 +1643,78 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^ -12> ^^ -13> ^ -14> ^^^ -15> ^ -16> ^^ -17> ^ -18> ^^^ -19> ^ -20> ^^ -21> ^ -22> ^^ -23> ^^ -24> ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^ +13> ^^ +14> ^ +15> ^^^ +16> ^ +17> ^^ +18> ^ +19> ^^^ +20> ^ +21> ^^ +22> ^ +23> ^^ +24> ^^ +25> ^ 1-> > 2 >for 3 > -4 > (let -5 > [numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"] -6 > -7 > numberA2 -8 > , -9 > nameA2 -10> , -11> skillA2 -12> ] = [2, "trimmer", "trimming"], -13> i -14> = -15> 0 -16> ; -17> i -18> < -19> 1 -20> ; -21> i -22> ++ -23> ) -24> { +4 > ( +5 > +6 > let [numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"] +7 > +8 > numberA2 +9 > , +10> nameA2 +11> , +12> skillA2 +13> ] = [2, "trimmer", "trimming"], +14> i +15> = +16> 0 +17> ; +18> i +19> < +20> 1 +21> ; +22> i +23> ++ +24> ) +25> { 1->Emitted(52, 1) Source(62, 1) + SourceIndex(0) 2 >Emitted(52, 4) Source(62, 4) + SourceIndex(0) 3 >Emitted(52, 5) Source(62, 5) + SourceIndex(0) -4 >Emitted(52, 6) Source(62, 10) + SourceIndex(0) -5 >Emitted(52, 41) Source(62, 66) + SourceIndex(0) -6 >Emitted(52, 43) Source(62, 11) + SourceIndex(0) -7 >Emitted(52, 59) Source(62, 19) + SourceIndex(0) -8 >Emitted(52, 61) Source(62, 21) + SourceIndex(0) -9 >Emitted(52, 75) Source(62, 27) + SourceIndex(0) -10>Emitted(52, 77) Source(62, 29) + SourceIndex(0) -11>Emitted(52, 92) Source(62, 36) + SourceIndex(0) -12>Emitted(52, 94) Source(62, 68) + SourceIndex(0) -13>Emitted(52, 95) Source(62, 69) + SourceIndex(0) -14>Emitted(52, 98) Source(62, 72) + SourceIndex(0) -15>Emitted(52, 99) Source(62, 73) + SourceIndex(0) -16>Emitted(52, 101) Source(62, 75) + SourceIndex(0) -17>Emitted(52, 102) Source(62, 76) + SourceIndex(0) -18>Emitted(52, 105) Source(62, 79) + SourceIndex(0) -19>Emitted(52, 106) Source(62, 80) + SourceIndex(0) -20>Emitted(52, 108) Source(62, 82) + SourceIndex(0) -21>Emitted(52, 109) Source(62, 83) + SourceIndex(0) -22>Emitted(52, 111) Source(62, 85) + SourceIndex(0) -23>Emitted(52, 113) Source(62, 87) + SourceIndex(0) -24>Emitted(52, 114) Source(62, 88) + SourceIndex(0) +4 >Emitted(52, 6) Source(62, 6) + SourceIndex(0) +5 >Emitted(52, 10) Source(62, 6) + SourceIndex(0) +6 >Emitted(52, 41) Source(62, 66) + SourceIndex(0) +7 >Emitted(52, 43) Source(62, 11) + SourceIndex(0) +8 >Emitted(52, 59) Source(62, 19) + SourceIndex(0) +9 >Emitted(52, 61) Source(62, 21) + SourceIndex(0) +10>Emitted(52, 75) Source(62, 27) + SourceIndex(0) +11>Emitted(52, 77) Source(62, 29) + SourceIndex(0) +12>Emitted(52, 92) Source(62, 36) + SourceIndex(0) +13>Emitted(52, 94) Source(62, 68) + SourceIndex(0) +14>Emitted(52, 95) Source(62, 69) + SourceIndex(0) +15>Emitted(52, 98) Source(62, 72) + SourceIndex(0) +16>Emitted(52, 99) Source(62, 73) + SourceIndex(0) +17>Emitted(52, 101) Source(62, 75) + SourceIndex(0) +18>Emitted(52, 102) Source(62, 76) + SourceIndex(0) +19>Emitted(52, 105) Source(62, 79) + SourceIndex(0) +20>Emitted(52, 106) Source(62, 80) + SourceIndex(0) +21>Emitted(52, 108) Source(62, 82) + SourceIndex(0) +22>Emitted(52, 109) Source(62, 83) + SourceIndex(0) +23>Emitted(52, 111) Source(62, 85) + SourceIndex(0) +24>Emitted(52, 113) Source(62, 87) + SourceIndex(0) +25>Emitted(52, 114) Source(62, 88) + SourceIndex(0) --- >>> console.log(nameA2); 1 >^^^^ @@ -1852,81 +1870,84 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^^^^^ -12> ^^ -13> ^^^^^^^^^^^^^^^^^^^^^^^ -14> ^^ -15> ^ -16> ^^^ -17> ^ -18> ^^ -19> ^ -20> ^^^ -21> ^ -22> ^^ -23> ^ -24> ^^ -25> ^^ -26> ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^ +17> ^^^ +18> ^ +19> ^^ +20> ^ +21> ^^^ +22> ^ +23> ^^ +24> ^ +25> ^^ +26> ^^ +27> ^ 1-> > 2 >for 3 > -4 > (let -5 > [nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot() -6 > -7 > nameMA -8 > , -9 > [primarySkillA, secondarySkillA] -10> -11> primarySkillA -12> , -13> secondarySkillA -14> ]] = getMultiRobot(), -15> i -16> = -17> 0 -18> ; -19> i -20> < -21> 1 -22> ; -23> i -24> ++ -25> ) -26> { +4 > ( +5 > +6 > let [nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot() +7 > +8 > nameMA +9 > , +10> [primarySkillA, secondarySkillA] +11> +12> primarySkillA +13> , +14> secondarySkillA +15> ]] = getMultiRobot(), +16> i +17> = +18> 0 +19> ; +20> i +21> < +22> 1 +23> ; +24> i +25> ++ +26> ) +27> { 1->Emitted(58, 1) Source(68, 1) + SourceIndex(0) 2 >Emitted(58, 4) Source(68, 4) + SourceIndex(0) 3 >Emitted(58, 5) Source(68, 5) + SourceIndex(0) -4 >Emitted(58, 6) Source(68, 10) + SourceIndex(0) -5 >Emitted(58, 30) Source(68, 70) + SourceIndex(0) -6 >Emitted(58, 32) Source(68, 11) + SourceIndex(0) -7 >Emitted(58, 46) Source(68, 17) + SourceIndex(0) -8 >Emitted(58, 48) Source(68, 19) + SourceIndex(0) -9 >Emitted(58, 58) Source(68, 51) + SourceIndex(0) -10>Emitted(58, 60) Source(68, 20) + SourceIndex(0) -11>Emitted(58, 81) Source(68, 33) + SourceIndex(0) -12>Emitted(58, 83) Source(68, 35) + SourceIndex(0) -13>Emitted(58, 106) Source(68, 50) + SourceIndex(0) -14>Emitted(58, 108) Source(68, 72) + SourceIndex(0) -15>Emitted(58, 109) Source(68, 73) + SourceIndex(0) -16>Emitted(58, 112) Source(68, 76) + SourceIndex(0) -17>Emitted(58, 113) Source(68, 77) + SourceIndex(0) -18>Emitted(58, 115) Source(68, 79) + SourceIndex(0) -19>Emitted(58, 116) Source(68, 80) + SourceIndex(0) -20>Emitted(58, 119) Source(68, 83) + SourceIndex(0) -21>Emitted(58, 120) Source(68, 84) + SourceIndex(0) -22>Emitted(58, 122) Source(68, 86) + SourceIndex(0) -23>Emitted(58, 123) Source(68, 87) + SourceIndex(0) -24>Emitted(58, 125) Source(68, 89) + SourceIndex(0) -25>Emitted(58, 127) Source(68, 91) + SourceIndex(0) -26>Emitted(58, 128) Source(68, 92) + SourceIndex(0) +4 >Emitted(58, 6) Source(68, 6) + SourceIndex(0) +5 >Emitted(58, 10) Source(68, 6) + SourceIndex(0) +6 >Emitted(58, 30) Source(68, 70) + SourceIndex(0) +7 >Emitted(58, 32) Source(68, 11) + SourceIndex(0) +8 >Emitted(58, 46) Source(68, 17) + SourceIndex(0) +9 >Emitted(58, 48) Source(68, 19) + SourceIndex(0) +10>Emitted(58, 58) Source(68, 51) + SourceIndex(0) +11>Emitted(58, 60) Source(68, 20) + SourceIndex(0) +12>Emitted(58, 81) Source(68, 33) + SourceIndex(0) +13>Emitted(58, 83) Source(68, 35) + SourceIndex(0) +14>Emitted(58, 106) Source(68, 50) + SourceIndex(0) +15>Emitted(58, 108) Source(68, 72) + SourceIndex(0) +16>Emitted(58, 109) Source(68, 73) + SourceIndex(0) +17>Emitted(58, 112) Source(68, 76) + SourceIndex(0) +18>Emitted(58, 113) Source(68, 77) + SourceIndex(0) +19>Emitted(58, 115) Source(68, 79) + SourceIndex(0) +20>Emitted(58, 116) Source(68, 80) + SourceIndex(0) +21>Emitted(58, 119) Source(68, 83) + SourceIndex(0) +22>Emitted(58, 120) Source(68, 84) + SourceIndex(0) +23>Emitted(58, 122) Source(68, 86) + SourceIndex(0) +24>Emitted(58, 123) Source(68, 87) + SourceIndex(0) +25>Emitted(58, 125) Source(68, 89) + SourceIndex(0) +26>Emitted(58, 127) Source(68, 91) + SourceIndex(0) +27>Emitted(58, 128) Source(68, 92) + SourceIndex(0) --- >>> console.log(nameMA); 1 >^^^^ @@ -1970,81 +1991,84 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^^^^^ -12> ^^ -13> ^^^^^^^^^^^^^^^^^^^^^^^ -14> ^^ -15> ^ -16> ^^^ -17> ^ -18> ^^ -19> ^ -20> ^^^ -21> ^ -22> ^^ -23> ^ -24> ^^ -25> ^^ -26> ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^ +17> ^^^ +18> ^ +19> ^^ +20> ^ +21> ^^^ +22> ^ +23> ^^ +24> ^ +25> ^^ +26> ^^ +27> ^ 1-> > 2 >for 3 > -4 > (let -5 > [nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]] -6 > -7 > nameMA -8 > , -9 > [primarySkillA, secondarySkillA] -10> -11> primarySkillA -12> , -13> secondarySkillA -14> ]] = ["trimmer", ["trimming", "edging"]], -15> i -16> = -17> 0 -18> ; -19> i -20> < -21> 1 -22> ; -23> i -24> ++ -25> ) -26> { +4 > ( +5 > +6 > let [nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]] +7 > +8 > nameMA +9 > , +10> [primarySkillA, secondarySkillA] +11> +12> primarySkillA +13> , +14> secondarySkillA +15> ]] = ["trimmer", ["trimming", "edging"]], +16> i +17> = +18> 0 +19> ; +20> i +21> < +22> 1 +23> ; +24> i +25> ++ +26> ) +27> { 1->Emitted(61, 1) Source(71, 1) + SourceIndex(0) 2 >Emitted(61, 4) Source(71, 4) + SourceIndex(0) 3 >Emitted(61, 5) Source(71, 5) + SourceIndex(0) -4 >Emitted(61, 6) Source(71, 10) + SourceIndex(0) -5 >Emitted(61, 50) Source(71, 90) + SourceIndex(0) -6 >Emitted(61, 52) Source(71, 11) + SourceIndex(0) -7 >Emitted(61, 66) Source(71, 17) + SourceIndex(0) -8 >Emitted(61, 68) Source(71, 19) + SourceIndex(0) -9 >Emitted(61, 78) Source(71, 51) + SourceIndex(0) -10>Emitted(61, 80) Source(71, 20) + SourceIndex(0) -11>Emitted(61, 101) Source(71, 33) + SourceIndex(0) -12>Emitted(61, 103) Source(71, 35) + SourceIndex(0) -13>Emitted(61, 126) Source(71, 50) + SourceIndex(0) -14>Emitted(61, 128) Source(71, 92) + SourceIndex(0) -15>Emitted(61, 129) Source(71, 93) + SourceIndex(0) -16>Emitted(61, 132) Source(71, 96) + SourceIndex(0) -17>Emitted(61, 133) Source(71, 97) + SourceIndex(0) -18>Emitted(61, 135) Source(71, 99) + SourceIndex(0) -19>Emitted(61, 136) Source(71, 100) + SourceIndex(0) -20>Emitted(61, 139) Source(71, 103) + SourceIndex(0) -21>Emitted(61, 140) Source(71, 104) + SourceIndex(0) -22>Emitted(61, 142) Source(71, 106) + SourceIndex(0) -23>Emitted(61, 143) Source(71, 107) + SourceIndex(0) -24>Emitted(61, 145) Source(71, 109) + SourceIndex(0) -25>Emitted(61, 147) Source(71, 111) + SourceIndex(0) -26>Emitted(61, 148) Source(71, 112) + SourceIndex(0) +4 >Emitted(61, 6) Source(71, 6) + SourceIndex(0) +5 >Emitted(61, 10) Source(71, 6) + SourceIndex(0) +6 >Emitted(61, 50) Source(71, 90) + SourceIndex(0) +7 >Emitted(61, 52) Source(71, 11) + SourceIndex(0) +8 >Emitted(61, 66) Source(71, 17) + SourceIndex(0) +9 >Emitted(61, 68) Source(71, 19) + SourceIndex(0) +10>Emitted(61, 78) Source(71, 51) + SourceIndex(0) +11>Emitted(61, 80) Source(71, 20) + SourceIndex(0) +12>Emitted(61, 101) Source(71, 33) + SourceIndex(0) +13>Emitted(61, 103) Source(71, 35) + SourceIndex(0) +14>Emitted(61, 126) Source(71, 50) + SourceIndex(0) +15>Emitted(61, 128) Source(71, 92) + SourceIndex(0) +16>Emitted(61, 129) Source(71, 93) + SourceIndex(0) +17>Emitted(61, 132) Source(71, 96) + SourceIndex(0) +18>Emitted(61, 133) Source(71, 97) + SourceIndex(0) +19>Emitted(61, 135) Source(71, 99) + SourceIndex(0) +20>Emitted(61, 136) Source(71, 100) + SourceIndex(0) +21>Emitted(61, 139) Source(71, 103) + SourceIndex(0) +22>Emitted(61, 140) Source(71, 104) + SourceIndex(0) +23>Emitted(61, 142) Source(71, 106) + SourceIndex(0) +24>Emitted(61, 143) Source(71, 107) + SourceIndex(0) +25>Emitted(61, 145) Source(71, 109) + SourceIndex(0) +26>Emitted(61, 147) Source(71, 111) + SourceIndex(0) +27>Emitted(61, 148) Source(71, 112) + SourceIndex(0) --- >>> console.log(nameMA); 1 >^^^^ @@ -2189,69 +2213,72 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^ -10> ^^ -11> ^ -12> ^^^ -13> ^ -14> ^^ -15> ^ -16> ^^^ -17> ^ -18> ^^ -19> ^ -20> ^^ -21> ^^ -22> ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^ +13> ^^^ +14> ^ +15> ^^ +16> ^ +17> ^^^ +18> ^ +19> ^^ +20> ^ +21> ^^ +22> ^^ +23> ^ 1-> > 2 >for 3 > -4 > (let -5 > [numberA3, ...robotAInfo] = getRobot() -6 > -7 > numberA3 -8 > , -9 > ...robotAInfo -10> ] = getRobot(), -11> i -12> = -13> 0 -14> ; -15> i -16> < -17> 1 -18> ; -19> i -20> ++ -21> ) -22> { +4 > ( +5 > +6 > let [numberA3, ...robotAInfo] = getRobot() +7 > +8 > numberA3 +9 > , +10> ...robotAInfo +11> ] = getRobot(), +12> i +13> = +14> 0 +15> ; +16> i +17> < +18> 1 +19> ; +20> i +21> ++ +22> ) +23> { 1->Emitted(67, 1) Source(78, 1) + SourceIndex(0) 2 >Emitted(67, 4) Source(78, 4) + SourceIndex(0) 3 >Emitted(67, 5) Source(78, 5) + SourceIndex(0) -4 >Emitted(67, 6) Source(78, 10) + SourceIndex(0) -5 >Emitted(67, 25) Source(78, 48) + SourceIndex(0) -6 >Emitted(67, 27) Source(78, 11) + SourceIndex(0) -7 >Emitted(67, 43) Source(78, 19) + SourceIndex(0) -8 >Emitted(67, 45) Source(78, 21) + SourceIndex(0) -9 >Emitted(67, 69) Source(78, 34) + SourceIndex(0) -10>Emitted(67, 71) Source(78, 50) + SourceIndex(0) -11>Emitted(67, 72) Source(78, 51) + SourceIndex(0) -12>Emitted(67, 75) Source(78, 54) + SourceIndex(0) -13>Emitted(67, 76) Source(78, 55) + SourceIndex(0) -14>Emitted(67, 78) Source(78, 57) + SourceIndex(0) -15>Emitted(67, 79) Source(78, 58) + SourceIndex(0) -16>Emitted(67, 82) Source(78, 61) + SourceIndex(0) -17>Emitted(67, 83) Source(78, 62) + SourceIndex(0) -18>Emitted(67, 85) Source(78, 64) + SourceIndex(0) -19>Emitted(67, 86) Source(78, 65) + SourceIndex(0) -20>Emitted(67, 88) Source(78, 67) + SourceIndex(0) -21>Emitted(67, 90) Source(78, 69) + SourceIndex(0) -22>Emitted(67, 91) Source(78, 70) + SourceIndex(0) +4 >Emitted(67, 6) Source(78, 6) + SourceIndex(0) +5 >Emitted(67, 10) Source(78, 6) + SourceIndex(0) +6 >Emitted(67, 25) Source(78, 48) + SourceIndex(0) +7 >Emitted(67, 27) Source(78, 11) + SourceIndex(0) +8 >Emitted(67, 43) Source(78, 19) + SourceIndex(0) +9 >Emitted(67, 45) Source(78, 21) + SourceIndex(0) +10>Emitted(67, 69) Source(78, 34) + SourceIndex(0) +11>Emitted(67, 71) Source(78, 50) + SourceIndex(0) +12>Emitted(67, 72) Source(78, 51) + SourceIndex(0) +13>Emitted(67, 75) Source(78, 54) + SourceIndex(0) +14>Emitted(67, 76) Source(78, 55) + SourceIndex(0) +15>Emitted(67, 78) Source(78, 57) + SourceIndex(0) +16>Emitted(67, 79) Source(78, 58) + SourceIndex(0) +17>Emitted(67, 82) Source(78, 61) + SourceIndex(0) +18>Emitted(67, 83) Source(78, 62) + SourceIndex(0) +19>Emitted(67, 85) Source(78, 64) + SourceIndex(0) +20>Emitted(67, 86) Source(78, 65) + SourceIndex(0) +21>Emitted(67, 88) Source(78, 67) + SourceIndex(0) +22>Emitted(67, 90) Source(78, 69) + SourceIndex(0) +23>Emitted(67, 91) Source(78, 70) + SourceIndex(0) --- >>> console.log(numberA3); 1 >^^^^ @@ -2295,69 +2322,72 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^ -10> ^^ -11> ^ -12> ^^^ -13> ^ -14> ^^ -15> ^ -16> ^^^ -17> ^ -18> ^^ -19> ^ -20> ^^ -21> ^^ -22> ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^ +13> ^^^ +14> ^ +15> ^^ +16> ^ +17> ^^^ +18> ^ +19> ^^ +20> ^ +21> ^^ +22> ^^ +23> ^ 1-> > 2 >for 3 > -4 > (let -5 > [numberA3, ...robotAInfo] = [2, "trimmer", "trimming"] -6 > -7 > numberA3 -8 > , -9 > ...robotAInfo -10> ] = [2, "trimmer", "trimming"], -11> i -12> = -13> 0 -14> ; -15> i -16> < -17> 1 -18> ; -19> i -20> ++ -21> ) -22> { +4 > ( +5 > +6 > let [numberA3, ...robotAInfo] = [2, "trimmer", "trimming"] +7 > +8 > numberA3 +9 > , +10> ...robotAInfo +11> ] = [2, "trimmer", "trimming"], +12> i +13> = +14> 0 +15> ; +16> i +17> < +18> 1 +19> ; +20> i +21> ++ +22> ) +23> { 1->Emitted(70, 1) Source(81, 1) + SourceIndex(0) 2 >Emitted(70, 4) Source(81, 4) + SourceIndex(0) 3 >Emitted(70, 5) Source(81, 5) + SourceIndex(0) -4 >Emitted(70, 6) Source(81, 10) + SourceIndex(0) -5 >Emitted(70, 41) Source(81, 64) + SourceIndex(0) -6 >Emitted(70, 43) Source(81, 11) + SourceIndex(0) -7 >Emitted(70, 59) Source(81, 19) + SourceIndex(0) -8 >Emitted(70, 61) Source(81, 21) + SourceIndex(0) -9 >Emitted(70, 85) Source(81, 34) + SourceIndex(0) -10>Emitted(70, 87) Source(81, 66) + SourceIndex(0) -11>Emitted(70, 88) Source(81, 67) + SourceIndex(0) -12>Emitted(70, 91) Source(81, 70) + SourceIndex(0) -13>Emitted(70, 92) Source(81, 71) + SourceIndex(0) -14>Emitted(70, 94) Source(81, 73) + SourceIndex(0) -15>Emitted(70, 95) Source(81, 74) + SourceIndex(0) -16>Emitted(70, 98) Source(81, 77) + SourceIndex(0) -17>Emitted(70, 99) Source(81, 78) + SourceIndex(0) -18>Emitted(70, 101) Source(81, 80) + SourceIndex(0) -19>Emitted(70, 102) Source(81, 81) + SourceIndex(0) -20>Emitted(70, 104) Source(81, 83) + SourceIndex(0) -21>Emitted(70, 106) Source(81, 85) + SourceIndex(0) -22>Emitted(70, 107) Source(81, 86) + SourceIndex(0) +4 >Emitted(70, 6) Source(81, 6) + SourceIndex(0) +5 >Emitted(70, 10) Source(81, 6) + SourceIndex(0) +6 >Emitted(70, 41) Source(81, 64) + SourceIndex(0) +7 >Emitted(70, 43) Source(81, 11) + SourceIndex(0) +8 >Emitted(70, 59) Source(81, 19) + SourceIndex(0) +9 >Emitted(70, 61) Source(81, 21) + SourceIndex(0) +10>Emitted(70, 85) Source(81, 34) + SourceIndex(0) +11>Emitted(70, 87) Source(81, 66) + SourceIndex(0) +12>Emitted(70, 88) Source(81, 67) + SourceIndex(0) +13>Emitted(70, 91) Source(81, 70) + SourceIndex(0) +14>Emitted(70, 92) Source(81, 71) + SourceIndex(0) +15>Emitted(70, 94) Source(81, 73) + SourceIndex(0) +16>Emitted(70, 95) Source(81, 74) + SourceIndex(0) +17>Emitted(70, 98) Source(81, 77) + SourceIndex(0) +18>Emitted(70, 99) Source(81, 78) + SourceIndex(0) +19>Emitted(70, 101) Source(81, 80) + SourceIndex(0) +20>Emitted(70, 102) Source(81, 81) + SourceIndex(0) +21>Emitted(70, 104) Source(81, 83) + SourceIndex(0) +22>Emitted(70, 106) Source(81, 85) + SourceIndex(0) +23>Emitted(70, 107) Source(81, 86) + SourceIndex(0) --- >>> console.log(numberA3); 1 >^^^^ diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.js.map index a007a60e41f..046cd61ad40 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringForArrayBindingPattern2.js.map] -{"version":3,"file":"sourceMapValidationDestructuringForArrayBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForArrayBindingPattern2.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED,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;AACzE;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,IAAI,KAAa,EAAE,aAAqB,EAAE,eAAuB,CAAC;AAClE,IAAI,OAAe,EAAE,KAAa,CAAC;AACnC,IAAI,QAAgB,EAAE,MAAc,EAAE,OAAe,EAAE,MAAc,CAAC;AACtE,IAAI,QAAgB,EAAE,UAA+B,EAAE,eAA8C,CAAC;AACtG,IAAI,CAAS,CAAC;AAEd,GAAG,CAAC,CAAC,CAAG,iBAAK,EAAI,MAAM,CAAA,EAAE,CAAC,GAAG,CA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AC,eAAe,CAAC,CAAC;AACjC,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringForArrayBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForArrayBindingPattern2.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED,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;AACzE;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,IAAI,KAAa,EAAE,aAAqB,EAAE,eAAuB,CAAC;AAClE,IAAI,OAAe,EAAE,KAAa,CAAC;AACnC,IAAI,QAAgB,EAAE,MAAc,EAAE,OAAe,EAAE,MAAc,CAAC;AACtE,IAAI,QAAgB,EAAE,UAA+B,EAAE,eAA8C,CAAC;AACtG,IAAI,CAAS,CAAC;AAEd,GAAG,CAAC,CAAC,CAAG,iBAAK,EAAI,MAAM,CAAA,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACzC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,eAAsB,EAAnB,aAAK,KAAc,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC7C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,+BAAsC,EAAnC,aAAK,KAA8B,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,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CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,+BAA6D,EAA5D,gBAAQ,EAAE,wBAAa,KAAqC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACpF,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,CAAC,sCAAkB,EAAI,WAAW,CAAA,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACzD,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,oBAAsC,EAArC,6BAAkB,KAAmB,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC7D,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,wCAA6E,EAA5E,6BAAkB,KAA0D,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACpG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.sourcemap.txt index 87d063f6ca5..186dc717e61 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPattern2.sourcemap.txt @@ -1043,9 +1043,9 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern2.ts 2 >for 3 > 4 > ( -5 > -6 > [numberB] = robotA -7 > +5 > [ +6 > numberB +7 > ] = 8 > robotA 9 > 10> , @@ -1065,8 +1065,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern2.ts 2 >Emitted(33, 4) Source(43, 4) + SourceIndex(0) 3 >Emitted(33, 5) Source(43, 5) + SourceIndex(0) 4 >Emitted(33, 6) Source(43, 6) + SourceIndex(0) -5 >Emitted(33, 7) Source(43, 6) + SourceIndex(0) -6 >Emitted(33, 26) Source(43, 24) + SourceIndex(0) +5 >Emitted(33, 7) Source(43, 7) + SourceIndex(0) +6 >Emitted(33, 26) Source(43, 14) + SourceIndex(0) 7 >Emitted(33, 28) Source(43, 18) + SourceIndex(0) 8 >Emitted(33, 34) Source(43, 24) + SourceIndex(0) 9 >Emitted(33, 35) Source(43, 24) + SourceIndex(0) @@ -1152,8 +1152,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern2.ts 5 > 6 > [numberB] = getRobot() 7 > -8 > [numberB] = getRobot() -9 > +8 > numberB +9 > ] = getRobot() 10> , 11> i 12> = @@ -1173,8 +1173,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern2.ts 4 >Emitted(36, 6) Source(46, 6) + SourceIndex(0) 5 >Emitted(36, 7) Source(46, 6) + SourceIndex(0) 6 >Emitted(36, 22) Source(46, 28) + SourceIndex(0) -7 >Emitted(36, 24) Source(46, 6) + SourceIndex(0) -8 >Emitted(36, 39) Source(46, 28) + SourceIndex(0) +7 >Emitted(36, 24) Source(46, 7) + SourceIndex(0) +8 >Emitted(36, 39) Source(46, 14) + SourceIndex(0) 9 >Emitted(36, 44) Source(46, 28) + SourceIndex(0) 10>Emitted(36, 46) Source(46, 30) + SourceIndex(0) 11>Emitted(36, 47) Source(46, 31) + SourceIndex(0) @@ -1258,8 +1258,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern2.ts 5 > 6 > [numberB] = [2, "trimmer", "trimming"] 7 > -8 > [numberB] = [2, "trimmer", "trimming"] -9 > +8 > numberB +9 > ] = [2, "trimmer", "trimming"] 10> , 11> i 12> = @@ -1279,8 +1279,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern2.ts 4 >Emitted(39, 6) Source(49, 6) + SourceIndex(0) 5 >Emitted(39, 7) Source(49, 6) + SourceIndex(0) 6 >Emitted(39, 38) Source(49, 44) + SourceIndex(0) -7 >Emitted(39, 40) Source(49, 6) + SourceIndex(0) -8 >Emitted(39, 55) Source(49, 44) + SourceIndex(0) +7 >Emitted(39, 40) Source(49, 7) + SourceIndex(0) +8 >Emitted(39, 55) Source(49, 14) + SourceIndex(0) 9 >Emitted(39, 60) Source(49, 44) + SourceIndex(0) 10>Emitted(39, 62) Source(49, 46) + SourceIndex(0) 11>Emitted(39, 63) Source(49, 47) + SourceIndex(0) @@ -1361,9 +1361,9 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern2.ts 2 >for 3 > 4 > ( -5 > -6 > [nameB] = multiRobotA -7 > +5 > [ +6 > nameB +7 > ] = 8 > multiRobotA 9 > 10> , @@ -1383,8 +1383,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern2.ts 2 >Emitted(42, 4) Source(52, 4) + SourceIndex(0) 3 >Emitted(42, 5) Source(52, 5) + SourceIndex(0) 4 >Emitted(42, 6) Source(52, 6) + SourceIndex(0) -5 >Emitted(42, 7) Source(52, 6) + SourceIndex(0) -6 >Emitted(42, 29) Source(52, 27) + SourceIndex(0) +5 >Emitted(42, 7) Source(52, 7) + SourceIndex(0) +6 >Emitted(42, 29) Source(52, 12) + SourceIndex(0) 7 >Emitted(42, 31) Source(52, 16) + SourceIndex(0) 8 >Emitted(42, 42) Source(52, 27) + SourceIndex(0) 9 >Emitted(42, 43) Source(52, 27) + SourceIndex(0) @@ -1470,8 +1470,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern2.ts 5 > 6 > [nameB] = getMultiRobot() 7 > -8 > [nameB] = getMultiRobot() -9 > +8 > nameB +9 > ] = getMultiRobot() 10> , 11> i 12> = @@ -1491,8 +1491,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern2.ts 4 >Emitted(45, 6) Source(55, 6) + SourceIndex(0) 5 >Emitted(45, 7) Source(55, 6) + SourceIndex(0) 6 >Emitted(45, 27) Source(55, 31) + SourceIndex(0) -7 >Emitted(45, 29) Source(55, 6) + SourceIndex(0) -8 >Emitted(45, 42) Source(55, 31) + SourceIndex(0) +7 >Emitted(45, 29) Source(55, 7) + SourceIndex(0) +8 >Emitted(45, 42) Source(55, 12) + SourceIndex(0) 9 >Emitted(45, 47) Source(55, 31) + SourceIndex(0) 10>Emitted(45, 49) Source(55, 33) + SourceIndex(0) 11>Emitted(45, 50) Source(55, 34) + SourceIndex(0) @@ -1576,8 +1576,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern2.ts 5 > 6 > [nameB] = ["trimmer", ["trimming", "edging"]] 7 > -8 > [nameB] = ["trimmer", ["trimming", "edging"]] -9 > +8 > nameB +9 > ] = ["trimmer", ["trimming", "edging"]] 10> , 11> i 12> = @@ -1597,8 +1597,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern2.ts 4 >Emitted(48, 6) Source(58, 6) + SourceIndex(0) 5 >Emitted(48, 7) Source(58, 6) + SourceIndex(0) 6 >Emitted(48, 47) Source(58, 51) + SourceIndex(0) -7 >Emitted(48, 49) Source(58, 6) + SourceIndex(0) -8 >Emitted(48, 62) Source(58, 51) + SourceIndex(0) +7 >Emitted(48, 49) Source(58, 7) + SourceIndex(0) +8 >Emitted(48, 62) Source(58, 12) + SourceIndex(0) 9 >Emitted(48, 67) Source(58, 51) + SourceIndex(0) 10>Emitted(48, 69) Source(58, 53) + SourceIndex(0) 11>Emitted(48, 70) Source(58, 54) + SourceIndex(0) @@ -2743,9 +2743,9 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern2.ts 2 >for 3 > 4 > ( -5 > -6 > [...multiRobotAInfo] = multiRobotA -7 > +5 > [ +6 > ...multiRobotAInfo +7 > ] = 8 > multiRobotA 9 > 10> , @@ -2765,8 +2765,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern2.ts 2 >Emitted(78, 4) Source(90, 4) + SourceIndex(0) 3 >Emitted(78, 5) Source(90, 5) + SourceIndex(0) 4 >Emitted(78, 6) Source(90, 6) + SourceIndex(0) -5 >Emitted(78, 7) Source(90, 6) + SourceIndex(0) -6 >Emitted(78, 45) Source(90, 40) + SourceIndex(0) +5 >Emitted(78, 7) Source(90, 7) + SourceIndex(0) +6 >Emitted(78, 45) Source(90, 25) + SourceIndex(0) 7 >Emitted(78, 47) Source(90, 29) + SourceIndex(0) 8 >Emitted(78, 58) Source(90, 40) + SourceIndex(0) 9 >Emitted(78, 59) Source(90, 40) + SourceIndex(0) @@ -2852,8 +2852,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern2.ts 5 > 6 > [...multiRobotAInfo] = getMultiRobot() 7 > -8 > [...multiRobotAInfo] = getMultiRobot() -9 > +8 > ...multiRobotAInfo +9 > ] = getMultiRobot() 10> , 11> i 12> = @@ -2873,8 +2873,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern2.ts 4 >Emitted(81, 6) Source(93, 6) + SourceIndex(0) 5 >Emitted(81, 7) Source(93, 6) + SourceIndex(0) 6 >Emitted(81, 27) Source(93, 44) + SourceIndex(0) -7 >Emitted(81, 29) Source(93, 6) + SourceIndex(0) -8 >Emitted(81, 58) Source(93, 44) + SourceIndex(0) +7 >Emitted(81, 29) Source(93, 7) + SourceIndex(0) +8 >Emitted(81, 58) Source(93, 25) + SourceIndex(0) 9 >Emitted(81, 63) Source(93, 44) + SourceIndex(0) 10>Emitted(81, 65) Source(93, 46) + SourceIndex(0) 11>Emitted(81, 66) Source(93, 47) + SourceIndex(0) @@ -2958,8 +2958,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern2.ts 5 > 6 > [...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]] 7 > -8 > [...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]] -9 > +8 > ...multiRobotAInfo +9 > ] = ["trimmer", ["trimming", "edging"]] 10> , 11> i 12> = @@ -2979,8 +2979,8 @@ sourceFile:sourceMapValidationDestructuringForArrayBindingPattern2.ts 4 >Emitted(84, 6) Source(96, 6) + SourceIndex(0) 5 >Emitted(84, 7) Source(96, 6) + SourceIndex(0) 6 >Emitted(84, 47) Source(96, 83) + SourceIndex(0) -7 >Emitted(84, 49) Source(96, 6) + SourceIndex(0) -8 >Emitted(84, 78) Source(96, 83) + SourceIndex(0) +7 >Emitted(84, 49) Source(96, 7) + SourceIndex(0) +8 >Emitted(84, 78) Source(96, 25) + SourceIndex(0) 9 >Emitted(84, 83) Source(96, 83) + SourceIndex(0) 10>Emitted(84, 85) Source(96, 85) + SourceIndex(0) 11>Emitted(84, 86) Source(96, 86) + SourceIndex(0) diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.js.map index ba21829737b..d9f2e446f04 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringForObjectBindingPattern.js.map] -{"version":3,"file":"sourceMapValidationDestructuringForObjectBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForObjectBindingPattern.ts"],"names":[],"mappings":"AAgBA,IAAI,KAAK,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACtD,IAAI,UAAU,GAAe,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;AACjG;IACI,MAAM,CAAC,KAAK,CAAC;AACjB,CAAC;AACD;IACI,MAAM,CAAC,UAAU,CAAC;AACtB,CAAC;AAED,GAAG,CAAC,CAAM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AC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAK,mBAA0C,EAAzC,eAAW,EAAE,iBAAa,EAAiB,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACrE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAK,+CAA6E,EAA5E,eAAW,EAAE,iBAAa,EAAoD,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACxG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAM,2BAAW,EAAE,sBAAoD,EAA1C,qBAAiB,EAAE,yBAAqB,EAAmB,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC5G,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAK,wBAAsF,EAArF,eAAW,EAAE,cAAoD,EAA1C,qBAAiB,EAAE,yBAAqB,EAAwB,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjH,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAK,kFACgF,EAD/E,eAAW,EAAE,cAAoD,EAA1C,qBAAiB,EAAE,yBAAqB,EAErE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACpB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringForObjectBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForObjectBindingPattern.ts"],"names":[],"mappings":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,CAAC;AACD,GAAG,CAAC,CAAC,IAAA,8EACoF,EAD/E,eAAW,EAAE,cAAoD,EAA1C,qBAAiB,EAAE,yBAAqB,EAErE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACpB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.sourcemap.txt index d68da51e880..61689b46799 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.sourcemap.txt @@ -917,69 +917,72 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^ -10> ^^ -11> ^ -12> ^^^ -13> ^ -14> ^^ -15> ^ -16> ^^^ -17> ^ -18> ^^ -19> ^ -20> ^^ -21> ^^ -22> ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^ +13> ^^^ +14> ^ +15> ^^ +16> ^ +17> ^^^ +18> ^ +19> ^^ +20> ^ +21> ^^ +22> ^^ +23> ^ 1-> > 2 >for 3 > -4 > (let -5 > {name: nameA, skill: skillA } = getRobot() -6 > -7 > name: nameA -8 > , -9 > skill: skillA -10> } = getRobot(), -11> i -12> = -13> 0 -14> ; -15> i -16> < -17> 1 -18> ; -19> i -20> ++ -21> ) -22> { +4 > ( +5 > +6 > let {name: nameA, skill: skillA } = getRobot() +7 > +8 > name: nameA +9 > , +10> skill: skillA +11> } = getRobot(), +12> i +13> = +14> 0 +15> ; +16> i +17> < +18> 1 +19> ; +20> i +21> ++ +22> ) +23> { 1->Emitted(30, 1) Source(50, 1) + SourceIndex(0) 2 >Emitted(30, 4) Source(50, 4) + SourceIndex(0) 3 >Emitted(30, 5) Source(50, 5) + SourceIndex(0) -4 >Emitted(30, 6) Source(50, 10) + SourceIndex(0) -5 >Emitted(30, 25) Source(50, 52) + SourceIndex(0) -6 >Emitted(30, 27) Source(50, 11) + SourceIndex(0) -7 >Emitted(30, 42) Source(50, 22) + SourceIndex(0) -8 >Emitted(30, 44) Source(50, 24) + SourceIndex(0) -9 >Emitted(30, 61) Source(50, 37) + SourceIndex(0) -10>Emitted(30, 63) Source(50, 54) + SourceIndex(0) -11>Emitted(30, 64) Source(50, 55) + SourceIndex(0) -12>Emitted(30, 67) Source(50, 58) + SourceIndex(0) -13>Emitted(30, 68) Source(50, 59) + SourceIndex(0) -14>Emitted(30, 70) Source(50, 61) + SourceIndex(0) -15>Emitted(30, 71) Source(50, 62) + SourceIndex(0) -16>Emitted(30, 74) Source(50, 65) + SourceIndex(0) -17>Emitted(30, 75) Source(50, 66) + SourceIndex(0) -18>Emitted(30, 77) Source(50, 68) + SourceIndex(0) -19>Emitted(30, 78) Source(50, 69) + SourceIndex(0) -20>Emitted(30, 80) Source(50, 71) + SourceIndex(0) -21>Emitted(30, 82) Source(50, 73) + SourceIndex(0) -22>Emitted(30, 83) Source(50, 74) + SourceIndex(0) +4 >Emitted(30, 6) Source(50, 6) + SourceIndex(0) +5 >Emitted(30, 10) Source(50, 6) + SourceIndex(0) +6 >Emitted(30, 25) Source(50, 52) + SourceIndex(0) +7 >Emitted(30, 27) Source(50, 11) + SourceIndex(0) +8 >Emitted(30, 42) Source(50, 22) + SourceIndex(0) +9 >Emitted(30, 44) Source(50, 24) + SourceIndex(0) +10>Emitted(30, 61) Source(50, 37) + SourceIndex(0) +11>Emitted(30, 63) Source(50, 54) + SourceIndex(0) +12>Emitted(30, 64) Source(50, 55) + SourceIndex(0) +13>Emitted(30, 67) Source(50, 58) + SourceIndex(0) +14>Emitted(30, 68) Source(50, 59) + SourceIndex(0) +15>Emitted(30, 70) Source(50, 61) + SourceIndex(0) +16>Emitted(30, 71) Source(50, 62) + SourceIndex(0) +17>Emitted(30, 74) Source(50, 65) + SourceIndex(0) +18>Emitted(30, 75) Source(50, 66) + SourceIndex(0) +19>Emitted(30, 77) Source(50, 68) + SourceIndex(0) +20>Emitted(30, 78) Source(50, 69) + SourceIndex(0) +21>Emitted(30, 80) Source(50, 71) + SourceIndex(0) +22>Emitted(30, 82) Source(50, 73) + SourceIndex(0) +23>Emitted(30, 83) Source(50, 74) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -1023,69 +1026,72 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^ -10> ^^ -11> ^ -12> ^^^ -13> ^ -14> ^^ -15> ^ -16> ^^^ -17> ^ -18> ^^ -19> ^ -20> ^^ -21> ^^ -22> ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^ +13> ^^^ +14> ^ +15> ^^ +16> ^ +17> ^^^ +18> ^ +19> ^^ +20> ^ +21> ^^ +22> ^^ +23> ^ 1-> > 2 >for 3 > -4 > (let -5 > {name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" } -6 > -7 > name: nameA -8 > , -9 > skill: skillA -10> } = { name: "trimmer", skill: "trimming" }, -11> i -12> = -13> 0 -14> ; -15> i -16> < -17> 1 -18> ; -19> i -20> ++ -21> ) -22> { +4 > ( +5 > +6 > let {name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" } +7 > +8 > name: nameA +9 > , +10> skill: skillA +11> } = { name: "trimmer", skill: "trimming" }, +12> i +13> = +14> 0 +15> ; +16> i +17> < +18> 1 +19> ; +20> i +21> ++ +22> ) +23> { 1->Emitted(33, 1) Source(53, 1) + SourceIndex(0) 2 >Emitted(33, 4) Source(53, 4) + SourceIndex(0) 3 >Emitted(33, 5) Source(53, 5) + SourceIndex(0) -4 >Emitted(33, 6) Source(53, 10) + SourceIndex(0) -5 >Emitted(33, 53) Source(53, 87) + SourceIndex(0) -6 >Emitted(33, 55) Source(53, 11) + SourceIndex(0) -7 >Emitted(33, 70) Source(53, 22) + SourceIndex(0) -8 >Emitted(33, 72) Source(53, 24) + SourceIndex(0) -9 >Emitted(33, 89) Source(53, 37) + SourceIndex(0) -10>Emitted(33, 91) Source(53, 89) + SourceIndex(0) -11>Emitted(33, 92) Source(53, 90) + SourceIndex(0) -12>Emitted(33, 95) Source(53, 93) + SourceIndex(0) -13>Emitted(33, 96) Source(53, 94) + SourceIndex(0) -14>Emitted(33, 98) Source(53, 96) + SourceIndex(0) -15>Emitted(33, 99) Source(53, 97) + SourceIndex(0) -16>Emitted(33, 102) Source(53, 100) + SourceIndex(0) -17>Emitted(33, 103) Source(53, 101) + SourceIndex(0) -18>Emitted(33, 105) Source(53, 103) + SourceIndex(0) -19>Emitted(33, 106) Source(53, 104) + SourceIndex(0) -20>Emitted(33, 108) Source(53, 106) + SourceIndex(0) -21>Emitted(33, 110) Source(53, 108) + SourceIndex(0) -22>Emitted(33, 111) Source(53, 109) + SourceIndex(0) +4 >Emitted(33, 6) Source(53, 6) + SourceIndex(0) +5 >Emitted(33, 10) Source(53, 6) + SourceIndex(0) +6 >Emitted(33, 53) Source(53, 87) + SourceIndex(0) +7 >Emitted(33, 55) Source(53, 11) + SourceIndex(0) +8 >Emitted(33, 70) Source(53, 22) + SourceIndex(0) +9 >Emitted(33, 72) Source(53, 24) + SourceIndex(0) +10>Emitted(33, 89) Source(53, 37) + SourceIndex(0) +11>Emitted(33, 91) Source(53, 89) + SourceIndex(0) +12>Emitted(33, 92) Source(53, 90) + SourceIndex(0) +13>Emitted(33, 95) Source(53, 93) + SourceIndex(0) +14>Emitted(33, 96) Source(53, 94) + SourceIndex(0) +15>Emitted(33, 98) Source(53, 96) + SourceIndex(0) +16>Emitted(33, 99) Source(53, 97) + SourceIndex(0) +17>Emitted(33, 102) Source(53, 100) + SourceIndex(0) +18>Emitted(33, 103) Source(53, 101) + SourceIndex(0) +19>Emitted(33, 105) Source(53, 103) + SourceIndex(0) +20>Emitted(33, 106) Source(53, 104) + SourceIndex(0) +21>Emitted(33, 108) Source(53, 106) + SourceIndex(0) +22>Emitted(33, 110) Source(53, 108) + SourceIndex(0) +23>Emitted(33, 111) Source(53, 109) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -1241,81 +1247,84 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^^^^^ -12> ^^ -13> ^^^^^^^^^^^^^^^^^^^^^^^^^ -14> ^^ -15> ^ -16> ^^^ -17> ^ -18> ^^ -19> ^ -20> ^^^ -21> ^ -22> ^^ -23> ^ -24> ^^ -25> ^^ -26> ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^ +17> ^^^ +18> ^ +19> ^^ +20> ^ +21> ^^^ +22> ^ +23> ^^ +24> ^ +25> ^^ +26> ^^ +27> ^ 1-> > 2 >for 3 > -4 > (let -5 > {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot() -6 > -7 > name: nameA -8 > , -9 > skills: { primary: primaryA, secondary: secondaryA } -10> -11> primary: primaryA -12> , -13> secondary: secondaryA -14> } } = getMultiRobot(), -15> i -16> = -17> 0 -18> ; -19> i -20> < -21> 1 -22> ; -23> i -24> ++ -25> ) -26> { +4 > ( +5 > +6 > let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot() +7 > +8 > name: nameA +9 > , +10> skills: { primary: primaryA, secondary: secondaryA } +11> +12> primary: primaryA +13> , +14> secondary: secondaryA +15> } } = getMultiRobot(), +16> i +17> = +18> 0 +19> ; +20> i +21> < +22> 1 +23> ; +24> i +25> ++ +26> ) +27> { 1->Emitted(39, 1) Source(59, 1) + SourceIndex(0) 2 >Emitted(39, 4) Source(59, 4) + SourceIndex(0) 3 >Emitted(39, 5) Source(59, 5) + SourceIndex(0) -4 >Emitted(39, 6) Source(59, 10) + SourceIndex(0) -5 >Emitted(39, 30) Source(59, 96) + SourceIndex(0) -6 >Emitted(39, 32) Source(59, 11) + SourceIndex(0) -7 >Emitted(39, 47) Source(59, 22) + SourceIndex(0) -8 >Emitted(39, 49) Source(59, 24) + SourceIndex(0) -9 >Emitted(39, 63) Source(59, 76) + SourceIndex(0) -10>Emitted(39, 65) Source(59, 34) + SourceIndex(0) -11>Emitted(39, 86) Source(59, 51) + SourceIndex(0) -12>Emitted(39, 88) Source(59, 53) + SourceIndex(0) -13>Emitted(39, 113) Source(59, 74) + SourceIndex(0) -14>Emitted(39, 115) Source(59, 98) + SourceIndex(0) -15>Emitted(39, 116) Source(59, 99) + SourceIndex(0) -16>Emitted(39, 119) Source(59, 102) + SourceIndex(0) -17>Emitted(39, 120) Source(59, 103) + SourceIndex(0) -18>Emitted(39, 122) Source(59, 105) + SourceIndex(0) -19>Emitted(39, 123) Source(59, 106) + SourceIndex(0) -20>Emitted(39, 126) Source(59, 109) + SourceIndex(0) -21>Emitted(39, 127) Source(59, 110) + SourceIndex(0) -22>Emitted(39, 129) Source(59, 112) + SourceIndex(0) -23>Emitted(39, 130) Source(59, 113) + SourceIndex(0) -24>Emitted(39, 132) Source(59, 115) + SourceIndex(0) -25>Emitted(39, 134) Source(59, 117) + SourceIndex(0) -26>Emitted(39, 135) Source(59, 118) + SourceIndex(0) +4 >Emitted(39, 6) Source(59, 6) + SourceIndex(0) +5 >Emitted(39, 10) Source(59, 6) + SourceIndex(0) +6 >Emitted(39, 30) Source(59, 96) + SourceIndex(0) +7 >Emitted(39, 32) Source(59, 11) + SourceIndex(0) +8 >Emitted(39, 47) Source(59, 22) + SourceIndex(0) +9 >Emitted(39, 49) Source(59, 24) + SourceIndex(0) +10>Emitted(39, 63) Source(59, 76) + SourceIndex(0) +11>Emitted(39, 65) Source(59, 34) + SourceIndex(0) +12>Emitted(39, 86) Source(59, 51) + SourceIndex(0) +13>Emitted(39, 88) Source(59, 53) + SourceIndex(0) +14>Emitted(39, 113) Source(59, 74) + SourceIndex(0) +15>Emitted(39, 115) Source(59, 98) + SourceIndex(0) +16>Emitted(39, 116) Source(59, 99) + SourceIndex(0) +17>Emitted(39, 119) Source(59, 102) + SourceIndex(0) +18>Emitted(39, 120) Source(59, 103) + SourceIndex(0) +19>Emitted(39, 122) Source(59, 105) + SourceIndex(0) +20>Emitted(39, 123) Source(59, 106) + SourceIndex(0) +21>Emitted(39, 126) Source(59, 109) + SourceIndex(0) +22>Emitted(39, 127) Source(59, 110) + SourceIndex(0) +23>Emitted(39, 129) Source(59, 112) + SourceIndex(0) +24>Emitted(39, 130) Source(59, 113) + SourceIndex(0) +25>Emitted(39, 132) Source(59, 115) + SourceIndex(0) +26>Emitted(39, 134) Source(59, 117) + SourceIndex(0) +27>Emitted(39, 135) Source(59, 118) + SourceIndex(0) --- >>> console.log(primaryA); 1 >^^^^ @@ -1359,84 +1368,87 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^^^^^ -12> ^^ -13> ^^^^^^^^^^^^^^^^^^^^^^^^^ -14> ^^ -15> ^ -16> ^^^ -17> ^ -18> ^^ -19> ^ -20> ^^^ -21> ^ -22> ^^ -23> ^ -24> ^^ -25> ^^ -26> ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^ +17> ^^^ +18> ^ +19> ^^ +20> ^ +21> ^^^ +22> ^ +23> ^^ +24> ^ +25> ^^ +26> ^^ +27> ^ 1-> > 2 >for 3 > -4 > (let -5 > {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = - > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } -6 > -7 > name: nameA -8 > , -9 > skills: { primary: primaryA, secondary: secondaryA } -10> -11> primary: primaryA -12> , -13> secondary: secondaryA -14> } } = +4 > ( +5 > +6 > let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } +7 > +8 > name: nameA +9 > , +10> skills: { primary: primaryA, secondary: secondaryA } +11> +12> primary: primaryA +13> , +14> secondary: secondaryA +15> } } = > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, > -15> i -16> = -17> 0 -18> ; -19> i -20> < -21> 1 -22> ; -23> i -24> ++ -25> ) -26> { +16> i +17> = +18> 0 +19> ; +20> i +21> < +22> 1 +23> ; +24> i +25> ++ +26> ) +27> { 1->Emitted(42, 1) Source(62, 1) + SourceIndex(0) 2 >Emitted(42, 4) Source(62, 4) + SourceIndex(0) 3 >Emitted(42, 5) Source(62, 5) + SourceIndex(0) -4 >Emitted(42, 6) Source(62, 10) + SourceIndex(0) -5 >Emitted(42, 88) Source(63, 90) + SourceIndex(0) -6 >Emitted(42, 90) Source(62, 11) + SourceIndex(0) -7 >Emitted(42, 105) Source(62, 22) + SourceIndex(0) -8 >Emitted(42, 107) Source(62, 24) + SourceIndex(0) -9 >Emitted(42, 121) Source(62, 76) + SourceIndex(0) -10>Emitted(42, 123) Source(62, 34) + SourceIndex(0) -11>Emitted(42, 144) Source(62, 51) + SourceIndex(0) -12>Emitted(42, 146) Source(62, 53) + SourceIndex(0) -13>Emitted(42, 171) Source(62, 74) + SourceIndex(0) -14>Emitted(42, 173) Source(64, 5) + SourceIndex(0) -15>Emitted(42, 174) Source(64, 6) + SourceIndex(0) -16>Emitted(42, 177) Source(64, 9) + SourceIndex(0) -17>Emitted(42, 178) Source(64, 10) + SourceIndex(0) -18>Emitted(42, 180) Source(64, 12) + SourceIndex(0) -19>Emitted(42, 181) Source(64, 13) + SourceIndex(0) -20>Emitted(42, 184) Source(64, 16) + SourceIndex(0) -21>Emitted(42, 185) Source(64, 17) + SourceIndex(0) -22>Emitted(42, 187) Source(64, 19) + SourceIndex(0) -23>Emitted(42, 188) Source(64, 20) + SourceIndex(0) -24>Emitted(42, 190) Source(64, 22) + SourceIndex(0) -25>Emitted(42, 192) Source(64, 24) + SourceIndex(0) -26>Emitted(42, 193) Source(64, 25) + SourceIndex(0) +4 >Emitted(42, 6) Source(62, 6) + SourceIndex(0) +5 >Emitted(42, 10) Source(62, 6) + SourceIndex(0) +6 >Emitted(42, 88) Source(63, 90) + SourceIndex(0) +7 >Emitted(42, 90) Source(62, 11) + SourceIndex(0) +8 >Emitted(42, 105) Source(62, 22) + SourceIndex(0) +9 >Emitted(42, 107) Source(62, 24) + SourceIndex(0) +10>Emitted(42, 121) Source(62, 76) + SourceIndex(0) +11>Emitted(42, 123) Source(62, 34) + SourceIndex(0) +12>Emitted(42, 144) Source(62, 51) + SourceIndex(0) +13>Emitted(42, 146) Source(62, 53) + SourceIndex(0) +14>Emitted(42, 171) Source(62, 74) + SourceIndex(0) +15>Emitted(42, 173) Source(64, 5) + SourceIndex(0) +16>Emitted(42, 174) Source(64, 6) + SourceIndex(0) +17>Emitted(42, 177) Source(64, 9) + SourceIndex(0) +18>Emitted(42, 178) Source(64, 10) + SourceIndex(0) +19>Emitted(42, 180) Source(64, 12) + SourceIndex(0) +20>Emitted(42, 181) Source(64, 13) + SourceIndex(0) +21>Emitted(42, 184) Source(64, 16) + SourceIndex(0) +22>Emitted(42, 185) Source(64, 17) + SourceIndex(0) +23>Emitted(42, 187) Source(64, 19) + SourceIndex(0) +24>Emitted(42, 188) Source(64, 20) + SourceIndex(0) +25>Emitted(42, 190) Source(64, 22) + SourceIndex(0) +26>Emitted(42, 192) Source(64, 24) + SourceIndex(0) +27>Emitted(42, 193) Source(64, 25) + SourceIndex(0) --- >>> console.log(primaryA); 1 >^^^^ diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.js.map index 83ec7f83efa..cb6d6d9fe4a 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringForObjectBindingPattern2.js.map] -{"version":3,"file":"sourceMapValidationDestructuringForObjectBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForObjectBindingPattern2.ts"],"names":[],"mappings":"AAgBA,IAAI,KAAK,GAAU,EAAE,IAAI,E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AC,CAAE,sBAAI,EAAU,sBAAsB,EAApB,oBAAO,EAAE,wBAAS,EAAO,UAAU,CAAA,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC5E,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,oBAA0D,EAAxD,cAAI,EAAU,cAAsB,EAApB,oBAAO,EAAE,wBAAS,KAAsB,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjF,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,8EACoF,EADlF,cAAI,EAAU,cAAsB,EAApB,oBAAO,EAAE,wBAAS,KACgD;IACrF,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACpB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringForObjectBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForObjectBindingPattern2.ts"],"names":[],"mappings":"AAgBA,IAAI,KAAK,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACtD,IAAI,UAAU,GAAe,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;AACjG;IACI,MAAM,CAAC,KAAK,CAAC;AACjB,CAAC;AACD;IACI,MAAM,CAAC,UAAU,CAAC;AACtB,CAAC;AAED,IAAI,KAAa,EAAE,QAAgB,EAAE,UAAkB,EAAE,CAAS,EAAE,MAAc,CAAC;AACnF,IAAI,IAAY,EAAE,OAAe,EAA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CAAC;IACjF,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,8EACoF,EADlF,cAAI,EAAE,cAA8B,EAApB,oBAAO,EAAE,wBAAS,KACgD;IACrF,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACpB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.sourcemap.txt index 18aea40d2f2..3744cc2e7ab 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern2.sourcemap.txt @@ -311,9 +311,9 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 2 >for 3 > 4 > ( -5 > -6 > { name: nameA } = robot -7 > +5 > { +6 > name: nameA +7 > } = 8 > robot 9 > 10> , @@ -333,8 +333,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 2 >Emitted(11, 4) Source(29, 4) + SourceIndex(0) 3 >Emitted(11, 5) Source(29, 5) + SourceIndex(0) 4 >Emitted(11, 6) Source(29, 6) + SourceIndex(0) -5 >Emitted(11, 7) Source(29, 6) + SourceIndex(0) -6 >Emitted(11, 25) Source(29, 29) + SourceIndex(0) +5 >Emitted(11, 7) Source(29, 8) + SourceIndex(0) +6 >Emitted(11, 25) Source(29, 19) + SourceIndex(0) 7 >Emitted(11, 27) Source(29, 24) + SourceIndex(0) 8 >Emitted(11, 32) Source(29, 29) + SourceIndex(0) 9 >Emitted(11, 33) Source(29, 29) + SourceIndex(0) @@ -420,8 +420,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 5 > 6 > { name: nameA } = getRobot() 7 > -8 > { name: nameA } = getRobot() -9 > +8 > name: nameA +9 > } = getRobot() 10> , 11> i 12> = @@ -441,8 +441,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 4 >Emitted(14, 6) Source(32, 6) + SourceIndex(0) 5 >Emitted(14, 7) Source(32, 6) + SourceIndex(0) 6 >Emitted(14, 22) Source(32, 34) + SourceIndex(0) -7 >Emitted(14, 24) Source(32, 6) + SourceIndex(0) -8 >Emitted(14, 39) Source(32, 34) + SourceIndex(0) +7 >Emitted(14, 24) Source(32, 8) + SourceIndex(0) +8 >Emitted(14, 39) Source(32, 19) + SourceIndex(0) 9 >Emitted(14, 44) Source(32, 34) + SourceIndex(0) 10>Emitted(14, 46) Source(32, 36) + SourceIndex(0) 11>Emitted(14, 47) Source(32, 37) + SourceIndex(0) @@ -526,8 +526,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 5 > 6 > { name: nameA } = { name: "trimmer", skill: "trimming" } 7 > -8 > { name: nameA } = { name: "trimmer", skill: "trimming" } -9 > +8 > name: nameA +9 > } = { name: "trimmer", skill: "trimming" } 10> , 11> i 12> = @@ -547,8 +547,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 4 >Emitted(17, 6) Source(35, 6) + SourceIndex(0) 5 >Emitted(17, 7) Source(35, 6) + SourceIndex(0) 6 >Emitted(17, 50) Source(35, 69) + SourceIndex(0) -7 >Emitted(17, 52) Source(35, 6) + SourceIndex(0) -8 >Emitted(17, 67) Source(35, 69) + SourceIndex(0) +7 >Emitted(17, 52) Source(35, 8) + SourceIndex(0) +8 >Emitted(17, 67) Source(35, 19) + SourceIndex(0) 9 >Emitted(17, 72) Source(35, 69) + SourceIndex(0) 10>Emitted(17, 74) Source(35, 71) + SourceIndex(0) 11>Emitted(17, 75) Source(35, 72) + SourceIndex(0) @@ -633,8 +633,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 2 >for 3 > 4 > ( -5 > { skills: -6 > { primary: primaryA, secondary: secondaryA } +5 > { +6 > skills: { primary: primaryA, secondary: secondaryA } 7 > 8 > primary: primaryA 9 > , @@ -659,7 +659,7 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 2 >Emitted(20, 4) Source(38, 4) + SourceIndex(0) 3 >Emitted(20, 5) Source(38, 5) + SourceIndex(0) 4 >Emitted(20, 6) Source(38, 6) + SourceIndex(0) -5 >Emitted(20, 7) Source(38, 16) + SourceIndex(0) +5 >Emitted(20, 7) Source(38, 8) + SourceIndex(0) 6 >Emitted(20, 29) Source(38, 60) + SourceIndex(0) 7 >Emitted(20, 31) Source(38, 18) + SourceIndex(0) 8 >Emitted(20, 52) Source(38, 35) + SourceIndex(0) @@ -754,7 +754,7 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 5 > 6 > { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot() 7 > -8 > { primary: primaryA, secondary: secondaryA } +8 > skills: { primary: primaryA, secondary: secondaryA } 9 > 10> primary: primaryA 11> , @@ -779,7 +779,7 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 4 >Emitted(23, 6) Source(41, 6) + SourceIndex(0) 5 >Emitted(23, 7) Source(41, 6) + SourceIndex(0) 6 >Emitted(23, 27) Source(41, 80) + SourceIndex(0) -7 >Emitted(23, 29) Source(41, 16) + SourceIndex(0) +7 >Emitted(23, 29) Source(41, 8) + SourceIndex(0) 8 >Emitted(23, 43) Source(41, 60) + SourceIndex(0) 9 >Emitted(23, 45) Source(41, 18) + SourceIndex(0) 10>Emitted(23, 66) Source(41, 35) + SourceIndex(0) @@ -860,7 +860,7 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 6 > { skills: { primary: primaryA, secondary: secondaryA } } = > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } 7 > -8 > { primary: primaryA, secondary: secondaryA } +8 > skills: { primary: primaryA, secondary: secondaryA } 9 > 10> primary: primaryA 11> , @@ -873,7 +873,7 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 4 >Emitted(26, 6) Source(44, 6) + SourceIndex(0) 5 >Emitted(26, 7) Source(44, 6) + SourceIndex(0) 6 >Emitted(26, 85) Source(45, 90) + SourceIndex(0) -7 >Emitted(26, 87) Source(44, 16) + SourceIndex(0) +7 >Emitted(26, 87) Source(44, 8) + SourceIndex(0) 8 >Emitted(26, 101) Source(44, 60) + SourceIndex(0) 9 >Emitted(26, 103) Source(44, 18) + SourceIndex(0) 10>Emitted(26, 124) Source(44, 35) + SourceIndex(0) @@ -989,9 +989,9 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 2 >for 3 > 4 > ( -5 > -6 > { name } = robot -7 > +5 > { +6 > name +7 > } = 8 > robot 9 > 10> , @@ -1011,8 +1011,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 2 >Emitted(30, 4) Source(49, 4) + SourceIndex(0) 3 >Emitted(30, 5) Source(49, 5) + SourceIndex(0) 4 >Emitted(30, 6) Source(49, 6) + SourceIndex(0) -5 >Emitted(30, 7) Source(49, 6) + SourceIndex(0) -6 >Emitted(30, 24) Source(49, 22) + SourceIndex(0) +5 >Emitted(30, 7) Source(49, 8) + SourceIndex(0) +6 >Emitted(30, 24) Source(49, 12) + SourceIndex(0) 7 >Emitted(30, 26) Source(49, 17) + SourceIndex(0) 8 >Emitted(30, 31) Source(49, 22) + SourceIndex(0) 9 >Emitted(30, 32) Source(49, 22) + SourceIndex(0) @@ -1098,8 +1098,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 5 > 6 > { name } = getRobot() 7 > -8 > { name } = getRobot() -9 > +8 > name +9 > } = getRobot() 10> , 11> i 12> = @@ -1119,8 +1119,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 4 >Emitted(33, 6) Source(52, 6) + SourceIndex(0) 5 >Emitted(33, 7) Source(52, 6) + SourceIndex(0) 6 >Emitted(33, 22) Source(52, 27) + SourceIndex(0) -7 >Emitted(33, 24) Source(52, 6) + SourceIndex(0) -8 >Emitted(33, 38) Source(52, 27) + SourceIndex(0) +7 >Emitted(33, 24) Source(52, 8) + SourceIndex(0) +8 >Emitted(33, 38) Source(52, 12) + SourceIndex(0) 9 >Emitted(33, 43) Source(52, 27) + SourceIndex(0) 10>Emitted(33, 45) Source(52, 29) + SourceIndex(0) 11>Emitted(33, 46) Source(52, 30) + SourceIndex(0) @@ -1204,8 +1204,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 5 > 6 > { name } = { name: "trimmer", skill: "trimming" } 7 > -8 > { name } = { name: "trimmer", skill: "trimming" } -9 > +8 > name +9 > } = { name: "trimmer", skill: "trimming" } 10> , 11> i 12> = @@ -1225,8 +1225,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 4 >Emitted(36, 6) Source(55, 6) + SourceIndex(0) 5 >Emitted(36, 7) Source(55, 6) + SourceIndex(0) 6 >Emitted(36, 50) Source(55, 62) + SourceIndex(0) -7 >Emitted(36, 52) Source(55, 6) + SourceIndex(0) -8 >Emitted(36, 66) Source(55, 62) + SourceIndex(0) +7 >Emitted(36, 52) Source(55, 8) + SourceIndex(0) +8 >Emitted(36, 66) Source(55, 12) + SourceIndex(0) 9 >Emitted(36, 71) Source(55, 62) + SourceIndex(0) 10>Emitted(36, 73) Source(55, 64) + SourceIndex(0) 11>Emitted(36, 74) Source(55, 65) + SourceIndex(0) @@ -1311,8 +1311,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 2 >for 3 > 4 > ( -5 > { skills: -6 > { primary, secondary } +5 > { +6 > skills: { primary, secondary } 7 > 8 > primary 9 > , @@ -1337,7 +1337,7 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 2 >Emitted(39, 4) Source(58, 4) + SourceIndex(0) 3 >Emitted(39, 5) Source(58, 5) + SourceIndex(0) 4 >Emitted(39, 6) Source(58, 6) + SourceIndex(0) -5 >Emitted(39, 7) Source(58, 16) + SourceIndex(0) +5 >Emitted(39, 7) Source(58, 8) + SourceIndex(0) 6 >Emitted(39, 29) Source(58, 38) + SourceIndex(0) 7 >Emitted(39, 31) Source(58, 18) + SourceIndex(0) 8 >Emitted(39, 51) Source(58, 25) + SourceIndex(0) @@ -1432,7 +1432,7 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 5 > 6 > { skills: { primary, secondary } } = getMultiRobot() 7 > -8 > { primary, secondary } +8 > skills: { primary, secondary } 9 > 10> primary 11> , @@ -1457,7 +1457,7 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 4 >Emitted(42, 6) Source(61, 6) + SourceIndex(0) 5 >Emitted(42, 7) Source(61, 6) + SourceIndex(0) 6 >Emitted(42, 27) Source(61, 58) + SourceIndex(0) -7 >Emitted(42, 29) Source(61, 16) + SourceIndex(0) +7 >Emitted(42, 29) Source(61, 8) + SourceIndex(0) 8 >Emitted(42, 43) Source(61, 38) + SourceIndex(0) 9 >Emitted(42, 45) Source(61, 18) + SourceIndex(0) 10>Emitted(42, 65) Source(61, 25) + SourceIndex(0) @@ -1538,7 +1538,7 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 6 > { skills: { primary, secondary } } = > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } 7 > -8 > { primary, secondary } +8 > skills: { primary, secondary } 9 > 10> primary 11> , @@ -1551,7 +1551,7 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 4 >Emitted(45, 6) Source(64, 6) + SourceIndex(0) 5 >Emitted(45, 7) Source(64, 6) + SourceIndex(0) 6 >Emitted(45, 85) Source(65, 90) + SourceIndex(0) -7 >Emitted(45, 87) Source(64, 16) + SourceIndex(0) +7 >Emitted(45, 87) Source(64, 8) + SourceIndex(0) 8 >Emitted(45, 101) Source(64, 38) + SourceIndex(0) 9 >Emitted(45, 103) Source(64, 18) + SourceIndex(0) 10>Emitted(45, 123) Source(64, 25) + SourceIndex(0) @@ -2013,8 +2013,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 4 > ( 5 > { 6 > name: nameA -7 > , skills: -8 > { primary: primaryA, secondary: secondaryA } +7 > , +8 > skills: { primary: primaryA, secondary: secondaryA } 9 > 10> primary: primaryA 11> , @@ -2041,7 +2041,7 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 4 >Emitted(58, 6) Source(80, 6) + SourceIndex(0) 5 >Emitted(58, 7) Source(80, 8) + SourceIndex(0) 6 >Emitted(58, 30) Source(80, 19) + SourceIndex(0) -7 >Emitted(58, 32) Source(80, 29) + SourceIndex(0) +7 >Emitted(58, 32) Source(80, 21) + SourceIndex(0) 8 >Emitted(58, 54) Source(80, 73) + SourceIndex(0) 9 >Emitted(58, 56) Source(80, 31) + SourceIndex(0) 10>Emitted(58, 77) Source(80, 48) + SourceIndex(0) @@ -2139,8 +2139,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 6 > { name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot() 7 > 8 > name: nameA -9 > , skills: -10> { primary: primaryA, secondary: secondaryA } +9 > , +10> skills: { primary: primaryA, secondary: secondaryA } 11> 12> primary: primaryA 13> , @@ -2167,7 +2167,7 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 6 >Emitted(61, 27) Source(83, 93) + SourceIndex(0) 7 >Emitted(61, 29) Source(83, 8) + SourceIndex(0) 8 >Emitted(61, 44) Source(83, 19) + SourceIndex(0) -9 >Emitted(61, 46) Source(83, 29) + SourceIndex(0) +9 >Emitted(61, 46) Source(83, 21) + SourceIndex(0) 10>Emitted(61, 60) Source(83, 73) + SourceIndex(0) 11>Emitted(61, 62) Source(83, 31) + SourceIndex(0) 12>Emitted(61, 83) Source(83, 48) + SourceIndex(0) @@ -2251,8 +2251,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } 7 > 8 > name: nameA -9 > , skills: -10> { primary: primaryA, secondary: secondaryA } +9 > , +10> skills: { primary: primaryA, secondary: secondaryA } 11> 12> primary: primaryA 13> , @@ -2267,7 +2267,7 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 6 >Emitted(64, 85) Source(87, 90) + SourceIndex(0) 7 >Emitted(64, 87) Source(86, 8) + SourceIndex(0) 8 >Emitted(64, 102) Source(86, 19) + SourceIndex(0) -9 >Emitted(64, 104) Source(86, 29) + SourceIndex(0) +9 >Emitted(64, 104) Source(86, 21) + SourceIndex(0) 10>Emitted(64, 118) Source(86, 73) + SourceIndex(0) 11>Emitted(64, 120) Source(86, 31) + SourceIndex(0) 12>Emitted(64, 141) Source(86, 48) + SourceIndex(0) @@ -2727,8 +2727,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 4 > ( 5 > { 6 > name -7 > , skills: -8 > { primary, secondary } +7 > , +8 > skills: { primary, secondary } 9 > 10> primary 11> , @@ -2755,7 +2755,7 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 4 >Emitted(77, 6) Source(100, 6) + SourceIndex(0) 5 >Emitted(77, 7) Source(100, 8) + SourceIndex(0) 6 >Emitted(77, 29) Source(100, 12) + SourceIndex(0) -7 >Emitted(77, 31) Source(100, 22) + SourceIndex(0) +7 >Emitted(77, 31) Source(100, 14) + SourceIndex(0) 8 >Emitted(77, 53) Source(100, 44) + SourceIndex(0) 9 >Emitted(77, 55) Source(100, 24) + SourceIndex(0) 10>Emitted(77, 75) Source(100, 31) + SourceIndex(0) @@ -2853,8 +2853,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 6 > { name, skills: { primary, secondary } } = getMultiRobot() 7 > 8 > name -9 > , skills: -10> { primary, secondary } +9 > , +10> skills: { primary, secondary } 11> 12> primary 13> , @@ -2881,7 +2881,7 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 6 >Emitted(80, 27) Source(103, 64) + SourceIndex(0) 7 >Emitted(80, 29) Source(103, 8) + SourceIndex(0) 8 >Emitted(80, 43) Source(103, 12) + SourceIndex(0) -9 >Emitted(80, 45) Source(103, 22) + SourceIndex(0) +9 >Emitted(80, 45) Source(103, 14) + SourceIndex(0) 10>Emitted(80, 59) Source(103, 44) + SourceIndex(0) 11>Emitted(80, 61) Source(103, 24) + SourceIndex(0) 12>Emitted(80, 81) Source(103, 31) + SourceIndex(0) @@ -2965,8 +2965,8 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } 7 > 8 > name -9 > , skills: -10> { primary, secondary } +9 > , +10> skills: { primary, secondary } 11> 12> primary 13> , @@ -2981,7 +2981,7 @@ sourceFile:sourceMapValidationDestructuringForObjectBindingPattern2.ts 6 >Emitted(83, 85) Source(107, 90) + SourceIndex(0) 7 >Emitted(83, 87) Source(106, 8) + SourceIndex(0) 8 >Emitted(83, 101) Source(106, 12) + SourceIndex(0) -9 >Emitted(83, 103) Source(106, 22) + SourceIndex(0) +9 >Emitted(83, 103) Source(106, 14) + SourceIndex(0) 10>Emitted(83, 117) Source(106, 44) + SourceIndex(0) 11>Emitted(83, 119) Source(106, 24) + SourceIndex(0) 12>Emitted(83, 139) Source(106, 31) + SourceIndex(0) diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.js.map index fa0a2e18ac9..ca3d6f8d90f 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringForOfArrayBindingPattern2.js.map] -{"version":3,"file":"sourceMapValidationDestructuringForOfArrayB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C,CAAC;CAChC;AACD,GAAG,CAAC,CAAyB,WAA0B,EAA1B,OAAC,WAAW,EAAE,WAAW,CAAC,EAA1B,gBAA0B,EAA1B,KAA0B,CAAC;IAAnD,mCAAoB;IACrB,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;CAChC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringForOfArrayBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForOfArrayBindingPattern2.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAC/C,IAAI,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9B;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED,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;AACzE,IAAI,WAAW,GAAG,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAC7C;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,IAAI,KAAa,EAAE,aAAqB,EAAE,eAAuB,CAAC;AAClE,IAAI,OAAe,EAAE,KAAa,CAAC;AACnC,IAAI,QAAgB,EAAE,MAAc,EAAE,OAAe,EAAE,MAAc,CAAC;AACtE,IAAI,QAAgB,EAAE,UAA+B,EAAE,eAA8C,CAAC;AAEtG,GAAG,CAAC,CAAc,UAAM,EAAN,iBAAM,EAAN,oBAAM,EAAN,IAAM,CAAC;IAApB,mBAAG,aAAK;IACT,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAAc,UAAW,EAA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,WAAgB,EAAhB,MAAA,cAAc,EAAE,EAAhB,gBAAgB,EAAhB,KAAgB,CAAC;IAAxC,mCAAkB;IACpB,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;CAChC;AACD,GAAG,CAAC,CAAyB,WAA0B,EAA1B,OAAC,WAAW,EAAE,WAAW,CAAC,EAA1B,gBAA0B,EAA1B,KAA0B,CAAC;IAAlD,mCAAkB;IACpB,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;CAChC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.sourcemap.txt index 409629e1081..60c28ff0174 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.sourcemap.txt @@ -474,17 +474,14 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _a = robots_1[_i], nameA = _a[1]; 1 >^^^^ -2 > ^^^^^^^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^ 1 > -2 > [, nameA] -3 > -4 > nameA +2 > [, +3 > nameA 1 >Emitted(18, 5) Source(26, 6) + SourceIndex(0) -2 >Emitted(18, 22) Source(26, 15) + SourceIndex(0) -3 >Emitted(18, 24) Source(26, 9) + SourceIndex(0) -4 >Emitted(18, 37) Source(26, 14) + SourceIndex(0) +2 >Emitted(18, 24) Source(26, 9) + SourceIndex(0) +3 >Emitted(18, 37) Source(26, 14) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -567,17 +564,14 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _d = _c[_b], nameA = _d[1]; 1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^ 1 > -2 > [, nameA] -3 > -4 > nameA +2 > [, +3 > nameA 1 >Emitted(22, 5) Source(29, 6) + SourceIndex(0) -2 >Emitted(22, 16) Source(29, 15) + SourceIndex(0) -3 >Emitted(22, 18) Source(29, 9) + SourceIndex(0) -4 >Emitted(22, 31) Source(29, 14) + SourceIndex(0) +2 >Emitted(22, 18) Source(29, 9) + SourceIndex(0) +3 >Emitted(22, 31) Source(29, 14) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -666,17 +660,14 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _g = _f[_e], nameA = _g[1]; 1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^ 1 > -2 > [, nameA] -3 > -4 > nameA +2 > [, +3 > nameA 1 >Emitted(26, 5) Source(32, 6) + SourceIndex(0) -2 >Emitted(26, 16) Source(32, 15) + SourceIndex(0) -3 >Emitted(26, 18) Source(32, 9) + SourceIndex(0) -4 >Emitted(26, 31) Source(32, 14) + SourceIndex(0) +2 >Emitted(26, 18) Source(32, 9) + SourceIndex(0) +3 >Emitted(26, 31) Source(32, 14) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -754,29 +745,26 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _j = multiRobots_1[_h], _k = _j[1], primarySkillA = _k[0], secondarySkillA = _k[1]; 1->^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^^^^^^^^^^ -7 > ^^ -8 > ^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > [, [primarySkillA, secondarySkillA]] -3 > -4 > [primarySkillA, secondarySkillA] -5 > -6 > primarySkillA -7 > , -8 > secondarySkillA +2 > [, +3 > [primarySkillA, secondarySkillA] +4 > +5 > primarySkillA +6 > , +7 > secondarySkillA 1->Emitted(30, 5) Source(35, 6) + SourceIndex(0) -2 >Emitted(30, 27) Source(35, 42) + SourceIndex(0) -3 >Emitted(30, 29) Source(35, 9) + SourceIndex(0) -4 >Emitted(30, 39) Source(35, 41) + SourceIndex(0) -5 >Emitted(30, 41) Source(35, 10) + SourceIndex(0) -6 >Emitted(30, 62) Source(35, 23) + SourceIndex(0) -7 >Emitted(30, 64) Source(35, 25) + SourceIndex(0) -8 >Emitted(30, 87) Source(35, 40) + SourceIndex(0) +2 >Emitted(30, 29) Source(35, 9) + SourceIndex(0) +3 >Emitted(30, 39) Source(35, 41) + SourceIndex(0) +4 >Emitted(30, 41) Source(35, 10) + SourceIndex(0) +5 >Emitted(30, 62) Source(35, 23) + SourceIndex(0) +6 >Emitted(30, 64) Source(35, 25) + SourceIndex(0) +7 >Emitted(30, 87) Source(35, 40) + SourceIndex(0) --- >>> console.log(primarySkillA); 1 >^^^^ @@ -860,29 +848,26 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _o = _m[_l], _p = _o[1], primarySkillA = _p[0], secondarySkillA = _p[1]; 1->^^^^ -2 > ^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^^^^^^^^^^ -7 > ^^ -8 > ^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^ +3 > ^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > [, [primarySkillA, secondarySkillA]] -3 > -4 > [primarySkillA, secondarySkillA] -5 > -6 > primarySkillA -7 > , -8 > secondarySkillA +2 > [, +3 > [primarySkillA, secondarySkillA] +4 > +5 > primarySkillA +6 > , +7 > secondarySkillA 1->Emitted(34, 5) Source(38, 6) + SourceIndex(0) -2 >Emitted(34, 16) Source(38, 42) + SourceIndex(0) -3 >Emitted(34, 18) Source(38, 9) + SourceIndex(0) -4 >Emitted(34, 28) Source(38, 41) + SourceIndex(0) -5 >Emitted(34, 30) Source(38, 10) + SourceIndex(0) -6 >Emitted(34, 51) Source(38, 23) + SourceIndex(0) -7 >Emitted(34, 53) Source(38, 25) + SourceIndex(0) -8 >Emitted(34, 76) Source(38, 40) + SourceIndex(0) +2 >Emitted(34, 18) Source(38, 9) + SourceIndex(0) +3 >Emitted(34, 28) Source(38, 41) + SourceIndex(0) +4 >Emitted(34, 30) Source(38, 10) + SourceIndex(0) +5 >Emitted(34, 51) Source(38, 23) + SourceIndex(0) +6 >Emitted(34, 53) Source(38, 25) + SourceIndex(0) +7 >Emitted(34, 76) Source(38, 40) + SourceIndex(0) --- >>> console.log(primarySkillA); 1 >^^^^ @@ -972,29 +957,26 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _s = _r[_q], _t = _s[1], primarySkillA = _t[0], secondarySkillA = _t[1]; 1->^^^^ -2 > ^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^^^^^^^^^^ -7 > ^^ -8 > ^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^ +3 > ^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > [, [primarySkillA, secondarySkillA]] -3 > -4 > [primarySkillA, secondarySkillA] -5 > -6 > primarySkillA -7 > , -8 > secondarySkillA +2 > [, +3 > [primarySkillA, secondarySkillA] +4 > +5 > primarySkillA +6 > , +7 > secondarySkillA 1->Emitted(38, 5) Source(41, 6) + SourceIndex(0) -2 >Emitted(38, 16) Source(41, 42) + SourceIndex(0) -3 >Emitted(38, 18) Source(41, 9) + SourceIndex(0) -4 >Emitted(38, 28) Source(41, 41) + SourceIndex(0) -5 >Emitted(38, 30) Source(41, 10) + SourceIndex(0) -6 >Emitted(38, 51) Source(41, 23) + SourceIndex(0) -7 >Emitted(38, 53) Source(41, 25) + SourceIndex(0) -8 >Emitted(38, 76) Source(41, 40) + SourceIndex(0) +2 >Emitted(38, 18) Source(41, 9) + SourceIndex(0) +3 >Emitted(38, 28) Source(41, 41) + SourceIndex(0) +4 >Emitted(38, 30) Source(41, 10) + SourceIndex(0) +5 >Emitted(38, 51) Source(41, 23) + SourceIndex(0) +6 >Emitted(38, 53) Source(41, 25) + SourceIndex(0) +7 >Emitted(38, 76) Source(41, 40) + SourceIndex(0) --- >>> console.log(primarySkillA); 1 >^^^^ @@ -1074,9 +1056,9 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > [numberB] -1 >Emitted(42, 5) Source(45, 6) + SourceIndex(0) -2 >Emitted(42, 30) Source(45, 15) + SourceIndex(0) +2 > numberB +1 >Emitted(42, 5) Source(45, 7) + SourceIndex(0) +2 >Emitted(42, 30) Source(45, 14) + SourceIndex(0) --- >>> console.log(numberB); 1 >^^^^ @@ -1087,7 +1069,7 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts 6 > ^^^^^^^ 7 > ^ 8 > ^ -1 > of robots) { +1 >] of robots) { > 2 > console 3 > . @@ -1162,9 +1144,9 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts 2 > ^^^^^^^^^^^^^^^^^^^ 3 > ^^^-> 1 > -2 > [numberB] -1 >Emitted(46, 5) Source(48, 6) + SourceIndex(0) -2 >Emitted(46, 24) Source(48, 15) + SourceIndex(0) +2 > numberB +1 >Emitted(46, 5) Source(48, 7) + SourceIndex(0) +2 >Emitted(46, 24) Source(48, 14) + SourceIndex(0) --- >>> console.log(numberB); 1->^^^^ @@ -1175,7 +1157,7 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts 6 > ^^^^^^^ 7 > ^ 8 > ^ -1-> of getRobots()) { +1->] of getRobots()) { > 2 > console 3 > . @@ -1256,9 +1238,9 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts 2 > ^^^^^^^^^^^^^^^^^^^ 3 > ^^^-> 1 > -2 > [numberB] -1 >Emitted(50, 5) Source(51, 6) + SourceIndex(0) -2 >Emitted(50, 24) Source(51, 15) + SourceIndex(0) +2 > numberB +1 >Emitted(50, 5) Source(51, 7) + SourceIndex(0) +2 >Emitted(50, 24) Source(51, 14) + SourceIndex(0) --- >>> console.log(numberB); 1->^^^^ @@ -1269,7 +1251,7 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts 6 > ^^^^^^^ 7 > ^ 8 > ^ -1-> of [robotA, robotB]) { +1->] of [robotA, robotB]) { > 2 > console 3 > . @@ -1337,9 +1319,9 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > [nameB] -1 >Emitted(54, 5) Source(54, 6) + SourceIndex(0) -2 >Emitted(54, 33) Source(54, 13) + SourceIndex(0) +2 > nameB +1 >Emitted(54, 5) Source(54, 7) + SourceIndex(0) +2 >Emitted(54, 33) Source(54, 12) + SourceIndex(0) --- >>> console.log(nameB); 1 >^^^^ @@ -1350,7 +1332,7 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts 6 > ^^^^^ 7 > ^ 8 > ^ -1 > of multiRobots) { +1 >] of multiRobots) { > 2 > console 3 > . @@ -1425,9 +1407,9 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts 2 > ^^^^^^^^^^^^^^^^^ 3 > ^^^-> 1 > -2 > [nameB] -1 >Emitted(58, 5) Source(57, 6) + SourceIndex(0) -2 >Emitted(58, 22) Source(57, 13) + SourceIndex(0) +2 > nameB +1 >Emitted(58, 5) Source(57, 7) + SourceIndex(0) +2 >Emitted(58, 22) Source(57, 12) + SourceIndex(0) --- >>> console.log(nameB); 1->^^^^ @@ -1438,7 +1420,7 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts 6 > ^^^^^ 7 > ^ 8 > ^ -1-> of getMultiRobots()) { +1->] of getMultiRobots()) { > 2 > console 3 > . @@ -1519,9 +1501,9 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts 2 > ^^^^^^^^^^^^^^^^^ 3 > ^^^-> 1 > -2 > [nameB] -1 >Emitted(62, 5) Source(60, 6) + SourceIndex(0) -2 >Emitted(62, 22) Source(60, 13) + SourceIndex(0) +2 > nameB +1 >Emitted(62, 5) Source(60, 7) + SourceIndex(0) +2 >Emitted(62, 22) Source(60, 12) + SourceIndex(0) --- >>> console.log(nameB); 1->^^^^ @@ -1532,7 +1514,7 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts 6 > ^^^^^ 7 > ^ 8 > ^ -1-> of [multiRobotA, multiRobotB]) { +1->] of [multiRobotA, multiRobotB]) { > 2 > console 3 > . @@ -1600,29 +1582,26 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _5 = robots_3[_4], numberA2 = _5[0], nameA2 = _5[1], skillA2 = _5[2]; 1->^^^^ -2 > ^^^^^^^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^^^ -7 > ^^ -8 > ^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^ 1-> -2 > [numberA2, nameA2, skillA2] -3 > -4 > numberA2 -5 > , -6 > nameA2 -7 > , -8 > skillA2 +2 > [ +3 > numberA2 +4 > , +5 > nameA2 +6 > , +7 > skillA2 1->Emitted(66, 5) Source(64, 6) + SourceIndex(0) -2 >Emitted(66, 22) Source(64, 33) + SourceIndex(0) -3 >Emitted(66, 24) Source(64, 7) + SourceIndex(0) -4 >Emitted(66, 40) Source(64, 15) + SourceIndex(0) -5 >Emitted(66, 42) Source(64, 17) + SourceIndex(0) -6 >Emitted(66, 56) Source(64, 23) + SourceIndex(0) -7 >Emitted(66, 58) Source(64, 25) + SourceIndex(0) -8 >Emitted(66, 73) Source(64, 32) + SourceIndex(0) +2 >Emitted(66, 24) Source(64, 7) + SourceIndex(0) +3 >Emitted(66, 40) Source(64, 15) + SourceIndex(0) +4 >Emitted(66, 42) Source(64, 17) + SourceIndex(0) +5 >Emitted(66, 56) Source(64, 23) + SourceIndex(0) +6 >Emitted(66, 58) Source(64, 25) + SourceIndex(0) +7 >Emitted(66, 73) Source(64, 32) + SourceIndex(0) --- >>> console.log(nameA2); 1 >^^^^ @@ -1706,29 +1685,26 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _8 = _7[_6], numberA2 = _8[0], nameA2 = _8[1], skillA2 = _8[2]; 1->^^^^ -2 > ^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^^^ -7 > ^^ -8 > ^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^ 1-> -2 > [numberA2, nameA2, skillA2] -3 > -4 > numberA2 -5 > , -6 > nameA2 -7 > , -8 > skillA2 +2 > [ +3 > numberA2 +4 > , +5 > nameA2 +6 > , +7 > skillA2 1->Emitted(70, 5) Source(67, 6) + SourceIndex(0) -2 >Emitted(70, 16) Source(67, 33) + SourceIndex(0) -3 >Emitted(70, 18) Source(67, 7) + SourceIndex(0) -4 >Emitted(70, 34) Source(67, 15) + SourceIndex(0) -5 >Emitted(70, 36) Source(67, 17) + SourceIndex(0) -6 >Emitted(70, 50) Source(67, 23) + SourceIndex(0) -7 >Emitted(70, 52) Source(67, 25) + SourceIndex(0) -8 >Emitted(70, 67) Source(67, 32) + SourceIndex(0) +2 >Emitted(70, 18) Source(67, 7) + SourceIndex(0) +3 >Emitted(70, 34) Source(67, 15) + SourceIndex(0) +4 >Emitted(70, 36) Source(67, 17) + SourceIndex(0) +5 >Emitted(70, 50) Source(67, 23) + SourceIndex(0) +6 >Emitted(70, 52) Source(67, 25) + SourceIndex(0) +7 >Emitted(70, 67) Source(67, 32) + SourceIndex(0) --- >>> console.log(nameA2); 1 >^^^^ @@ -1818,29 +1794,26 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _11 = _10[_9], numberA2 = _11[0], nameA2 = _11[1], skillA2 = _11[2]; 1->^^^^ -2 > ^^^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^^^^ -7 > ^^ -8 > ^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^ 1-> -2 > [numberA2, nameA2, skillA2] -3 > -4 > numberA2 -5 > , -6 > nameA2 -7 > , -8 > skillA2 +2 > [ +3 > numberA2 +4 > , +5 > nameA2 +6 > , +7 > skillA2 1->Emitted(74, 5) Source(70, 6) + SourceIndex(0) -2 >Emitted(74, 18) Source(70, 33) + SourceIndex(0) -3 >Emitted(74, 20) Source(70, 7) + SourceIndex(0) -4 >Emitted(74, 37) Source(70, 15) + SourceIndex(0) -5 >Emitted(74, 39) Source(70, 17) + SourceIndex(0) -6 >Emitted(74, 54) Source(70, 23) + SourceIndex(0) -7 >Emitted(74, 56) Source(70, 25) + SourceIndex(0) -8 >Emitted(74, 72) Source(70, 32) + SourceIndex(0) +2 >Emitted(74, 20) Source(70, 7) + SourceIndex(0) +3 >Emitted(74, 37) Source(70, 15) + SourceIndex(0) +4 >Emitted(74, 39) Source(70, 17) + SourceIndex(0) +5 >Emitted(74, 54) Source(70, 23) + SourceIndex(0) +6 >Emitted(74, 56) Source(70, 25) + SourceIndex(0) +7 >Emitted(74, 72) Source(70, 32) + SourceIndex(0) --- >>> console.log(nameA2); 1 >^^^^ @@ -1918,35 +1891,32 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _13 = multiRobots_3[_12], nameMA = _13[0], _14 = _13[1], primarySkillA = _14[0], secondarySkillA = _14[1]; 1->^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^ -7 > ^^ -8 > ^^^^^^^^^^^^^^^^^^^^^^ -9 > ^^ -10> ^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > [nameMA, [primarySkillA, secondarySkillA]] -3 > -4 > nameMA -5 > , -6 > [primarySkillA, secondarySkillA] -7 > -8 > primarySkillA -9 > , -10> secondarySkillA +2 > [ +3 > nameMA +4 > , +5 > [primarySkillA, secondarySkillA] +6 > +7 > primarySkillA +8 > , +9 > secondarySkillA 1->Emitted(78, 5) Source(73, 6) + SourceIndex(0) -2 >Emitted(78, 29) Source(73, 48) + SourceIndex(0) -3 >Emitted(78, 31) Source(73, 7) + SourceIndex(0) -4 >Emitted(78, 46) Source(73, 13) + SourceIndex(0) -5 >Emitted(78, 48) Source(73, 15) + SourceIndex(0) -6 >Emitted(78, 60) Source(73, 47) + SourceIndex(0) -7 >Emitted(78, 62) Source(73, 16) + SourceIndex(0) -8 >Emitted(78, 84) Source(73, 29) + SourceIndex(0) -9 >Emitted(78, 86) Source(73, 31) + SourceIndex(0) -10>Emitted(78, 110) Source(73, 46) + SourceIndex(0) +2 >Emitted(78, 31) Source(73, 7) + SourceIndex(0) +3 >Emitted(78, 46) Source(73, 13) + SourceIndex(0) +4 >Emitted(78, 48) Source(73, 15) + SourceIndex(0) +5 >Emitted(78, 60) Source(73, 47) + SourceIndex(0) +6 >Emitted(78, 62) Source(73, 16) + SourceIndex(0) +7 >Emitted(78, 84) Source(73, 29) + SourceIndex(0) +8 >Emitted(78, 86) Source(73, 31) + SourceIndex(0) +9 >Emitted(78, 110) Source(73, 46) + SourceIndex(0) --- >>> console.log(nameMA); 1 >^^^^ @@ -2030,35 +2000,32 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _17 = _16[_15], nameMA = _17[0], _18 = _17[1], primarySkillA = _18[0], secondarySkillA = _18[1]; 1->^^^^ -2 > ^^^^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^ -7 > ^^ -8 > ^^^^^^^^^^^^^^^^^^^^^^ -9 > ^^ -10> ^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > [nameMA, [primarySkillA, secondarySkillA]] -3 > -4 > nameMA -5 > , -6 > [primarySkillA, secondarySkillA] -7 > -8 > primarySkillA -9 > , -10> secondarySkillA +2 > [ +3 > nameMA +4 > , +5 > [primarySkillA, secondarySkillA] +6 > +7 > primarySkillA +8 > , +9 > secondarySkillA 1->Emitted(82, 5) Source(76, 6) + SourceIndex(0) -2 >Emitted(82, 19) Source(76, 48) + SourceIndex(0) -3 >Emitted(82, 21) Source(76, 7) + SourceIndex(0) -4 >Emitted(82, 36) Source(76, 13) + SourceIndex(0) -5 >Emitted(82, 38) Source(76, 15) + SourceIndex(0) -6 >Emitted(82, 50) Source(76, 47) + SourceIndex(0) -7 >Emitted(82, 52) Source(76, 16) + SourceIndex(0) -8 >Emitted(82, 74) Source(76, 29) + SourceIndex(0) -9 >Emitted(82, 76) Source(76, 31) + SourceIndex(0) -10>Emitted(82, 100) Source(76, 46) + SourceIndex(0) +2 >Emitted(82, 21) Source(76, 7) + SourceIndex(0) +3 >Emitted(82, 36) Source(76, 13) + SourceIndex(0) +4 >Emitted(82, 38) Source(76, 15) + SourceIndex(0) +5 >Emitted(82, 50) Source(76, 47) + SourceIndex(0) +6 >Emitted(82, 52) Source(76, 16) + SourceIndex(0) +7 >Emitted(82, 74) Source(76, 29) + SourceIndex(0) +8 >Emitted(82, 76) Source(76, 31) + SourceIndex(0) +9 >Emitted(82, 100) Source(76, 46) + SourceIndex(0) --- >>> console.log(nameMA); 1 >^^^^ @@ -2148,35 +2115,32 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _21 = _20[_19], nameMA = _21[0], _22 = _21[1], primarySkillA = _22[0], secondarySkillA = _22[1]; 1->^^^^ -2 > ^^^^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^ -7 > ^^ -8 > ^^^^^^^^^^^^^^^^^^^^^^ -9 > ^^ -10> ^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > [nameMA, [primarySkillA, secondarySkillA]] -3 > -4 > nameMA -5 > , -6 > [primarySkillA, secondarySkillA] -7 > -8 > primarySkillA -9 > , -10> secondarySkillA +2 > [ +3 > nameMA +4 > , +5 > [primarySkillA, secondarySkillA] +6 > +7 > primarySkillA +8 > , +9 > secondarySkillA 1->Emitted(86, 5) Source(79, 6) + SourceIndex(0) -2 >Emitted(86, 19) Source(79, 48) + SourceIndex(0) -3 >Emitted(86, 21) Source(79, 7) + SourceIndex(0) -4 >Emitted(86, 36) Source(79, 13) + SourceIndex(0) -5 >Emitted(86, 38) Source(79, 15) + SourceIndex(0) -6 >Emitted(86, 50) Source(79, 47) + SourceIndex(0) -7 >Emitted(86, 52) Source(79, 16) + SourceIndex(0) -8 >Emitted(86, 74) Source(79, 29) + SourceIndex(0) -9 >Emitted(86, 76) Source(79, 31) + SourceIndex(0) -10>Emitted(86, 100) Source(79, 46) + SourceIndex(0) +2 >Emitted(86, 21) Source(79, 7) + SourceIndex(0) +3 >Emitted(86, 36) Source(79, 13) + SourceIndex(0) +4 >Emitted(86, 38) Source(79, 15) + SourceIndex(0) +5 >Emitted(86, 50) Source(79, 47) + SourceIndex(0) +6 >Emitted(86, 52) Source(79, 16) + SourceIndex(0) +7 >Emitted(86, 74) Source(79, 29) + SourceIndex(0) +8 >Emitted(86, 76) Source(79, 31) + SourceIndex(0) +9 >Emitted(86, 100) Source(79, 46) + SourceIndex(0) --- >>> console.log(nameMA); 1 >^^^^ @@ -2255,23 +2219,20 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _24 = robots_4[_23], numberA3 = _24[0], robotAInfo = _24.slice(1); 1->^^^^ -2 > ^^^^^^^^^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > [numberA3, ...robotAInfo] -3 > -4 > numberA3 -5 > , -6 > ...robotAInfo +2 > [ +3 > numberA3 +4 > , +5 > ...robotAInfo 1->Emitted(90, 5) Source(83, 6) + SourceIndex(0) -2 >Emitted(90, 24) Source(83, 31) + SourceIndex(0) -3 >Emitted(90, 26) Source(83, 7) + SourceIndex(0) -4 >Emitted(90, 43) Source(83, 15) + SourceIndex(0) -5 >Emitted(90, 45) Source(83, 17) + SourceIndex(0) -6 >Emitted(90, 70) Source(83, 30) + SourceIndex(0) +2 >Emitted(90, 26) Source(83, 7) + SourceIndex(0) +3 >Emitted(90, 43) Source(83, 15) + SourceIndex(0) +4 >Emitted(90, 45) Source(83, 17) + SourceIndex(0) +5 >Emitted(90, 70) Source(83, 30) + SourceIndex(0) --- >>> console.log(numberA3); 1 >^^^^ @@ -2355,23 +2316,20 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _27 = _26[_25], numberA3 = _27[0], robotAInfo = _27.slice(1); 1->^^^^ -2 > ^^^^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > [numberA3, ...robotAInfo] -3 > -4 > numberA3 -5 > , -6 > ...robotAInfo +2 > [ +3 > numberA3 +4 > , +5 > ...robotAInfo 1->Emitted(94, 5) Source(86, 6) + SourceIndex(0) -2 >Emitted(94, 19) Source(86, 31) + SourceIndex(0) -3 >Emitted(94, 21) Source(86, 7) + SourceIndex(0) -4 >Emitted(94, 38) Source(86, 15) + SourceIndex(0) -5 >Emitted(94, 40) Source(86, 17) + SourceIndex(0) -6 >Emitted(94, 65) Source(86, 30) + SourceIndex(0) +2 >Emitted(94, 21) Source(86, 7) + SourceIndex(0) +3 >Emitted(94, 38) Source(86, 15) + SourceIndex(0) +4 >Emitted(94, 40) Source(86, 17) + SourceIndex(0) +5 >Emitted(94, 65) Source(86, 30) + SourceIndex(0) --- >>> console.log(numberA3); 1 >^^^^ @@ -2460,23 +2418,20 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _30 = _29[_28], numberA3 = _30[0], robotAInfo = _30.slice(1); 1 >^^^^ -2 > ^^^^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > [numberA3, ...robotAInfo] -3 > -4 > numberA3 -5 > , -6 > ...robotAInfo +2 > [ +3 > numberA3 +4 > , +5 > ...robotAInfo 1 >Emitted(98, 5) Source(89, 6) + SourceIndex(0) -2 >Emitted(98, 19) Source(89, 31) + SourceIndex(0) -3 >Emitted(98, 21) Source(89, 7) + SourceIndex(0) -4 >Emitted(98, 38) Source(89, 15) + SourceIndex(0) -5 >Emitted(98, 40) Source(89, 17) + SourceIndex(0) -6 >Emitted(98, 65) Source(89, 30) + SourceIndex(0) +2 >Emitted(98, 21) Source(89, 7) + SourceIndex(0) +3 >Emitted(98, 38) Source(89, 15) + SourceIndex(0) +4 >Emitted(98, 40) Source(89, 17) + SourceIndex(0) +5 >Emitted(98, 65) Source(89, 30) + SourceIndex(0) --- >>> console.log(numberA3); 1 >^^^^ @@ -2555,9 +2510,9 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > [...multiRobotAInfo] -1 >Emitted(102, 5) Source(92, 6) + SourceIndex(0) -2 >Emitted(102, 50) Source(92, 26) + SourceIndex(0) +2 > ...multiRobotAInfo +1 >Emitted(102, 5) Source(92, 7) + SourceIndex(0) +2 >Emitted(102, 50) Source(92, 25) + SourceIndex(0) --- >>> console.log(multiRobotAInfo); 1 >^^^^ @@ -2568,7 +2523,7 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts 6 > ^^^^^^^^^^^^^^^ 7 > ^ 8 > ^ -1 > of multiRobots) { +1 >] of multiRobots) { > 2 > console 3 > . @@ -2642,9 +2597,9 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > [...multiRobotAInfo] -1 >Emitted(106, 5) Source(95, 6) + SourceIndex(0) -2 >Emitted(106, 40) Source(95, 26) + SourceIndex(0) +2 > ...multiRobotAInfo +1 >Emitted(106, 5) Source(95, 7) + SourceIndex(0) +2 >Emitted(106, 40) Source(95, 25) + SourceIndex(0) --- >>> console.log(multiRobotAInfo); 1 >^^^^ @@ -2655,7 +2610,7 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts 6 > ^^^^^^^^^^^^^^^ 7 > ^ 8 > ^ -1 > of getMultiRobots()) { +1 >] of getMultiRobots()) { > 2 > console 3 > . @@ -2735,9 +2690,9 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > [...multiRobotAInfo] -1 >Emitted(110, 5) Source(98, 6) + SourceIndex(0) -2 >Emitted(110, 40) Source(98, 26) + SourceIndex(0) +2 > ...multiRobotAInfo +1 >Emitted(110, 5) Source(98, 7) + SourceIndex(0) +2 >Emitted(110, 40) Source(98, 25) + SourceIndex(0) --- >>> console.log(multiRobotAInfo); 1 >^^^^ @@ -2748,7 +2703,7 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts 6 > ^^^^^^^^^^^^^^^ 7 > ^ 8 > ^ -1 > of [multiRobotA, multiRobotB]) { +1 >] of [multiRobotA, multiRobotB]) { > 2 > console 3 > . diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.js.map index 2fb57235dec..c779b1ebe26 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringForOfObjectBindingPattern2.js.map] -{"version":3,"file":"sourceMapValidationDestructuringForOfObjectBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForOfObjectBindingPattern2.ts"],"names":[],"mappings":"AAgBA,IAAI,MAAM,GAAY,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;AACnG,IAAI,WAAW,GAAiB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE;IAChG,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;AAE/E;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,IAAI,KAAa,EAAE,QAAgB,EAAE,UAAkB,EAAE,CAAS,EAAE,MAAc,CAAC;AACnF,IAAI,IAAY,EAAE,OAAe,EAAE,SAAiB,EAAE,KAAa,CAAC;AAEpE,GAAG,CAAC,CA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B;AACD,GAAG,CAAC,CAA4C,WAAgB,EAAhB,MAAA,cAAc,EAAE,EAAhB,gBAAgB,EAAhB,KAAgB,CAAC;IAA5D,cAAuC,EAAtC,eAAI,EAAU,gBAAsB,EAApB,qBAAO,EAAE,yBAAS;IACpC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAA4C,WAC8B,EAD9B,OAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE;IAChH,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,EAD9B,gBAC8B,EAD9B,KAC8B,CAAC;IAD1E,cAAuC,EAAtC,eAAI,EAAU,gBAAsB,EAApB,qBAAO,EAAE,yBAAS;IAEpC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringForOfObjectBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForOfObjectBindingPattern2.ts"],"names":[],"mappings":"AAgBA,IAAI,MAAM,GAAY,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;AACnG,IAAI,WAAW,GAAiB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE;IAChG,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;AAE/E;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;A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X,KAAW,CAAC;IAAvD,0BAAC,eAAI,EAAE,gBAA8B,EAApB,qBAAO,EAAE,yBAAS;IACpC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAA4C,WAAgB,EAAhB,MAAA,cAAc,EAAE,EAAhB,gBAAgB,EAAhB,KAAgB,CAAC;IAA5D,gBAAC,eAAI,EAAE,gBAA8B,EAApB,qBAAO,EAAE,yBAAS;IACpC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAA4C,WAC8B,EAD9B,OAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE;IAChH,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,EAD9B,gBAC8B,EAD9B,KAC8B,CAAC;IAD1E,gBAAC,eAAI,EAAE,gBAA8B,EAApB,qBAAO,EAAE,yBAAS;IAEpC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.sourcemap.txt index bde5b81177d..17802c4e86a 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.sourcemap.txt @@ -426,9 +426,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > {name: nameA } -1 >Emitted(13, 5) Source(32, 6) + SourceIndex(0) -2 >Emitted(13, 30) Source(32, 20) + SourceIndex(0) +2 > name: nameA +1 >Emitted(13, 5) Source(32, 7) + SourceIndex(0) +2 >Emitted(13, 30) Source(32, 18) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -439,7 +439,7 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 6 > ^^^^^ 7 > ^ 8 > ^ -1 > of robots) { +1 > } of robots) { > 2 > console 3 > . @@ -514,9 +514,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 2 > ^^^^^^^^^^^^^^^^^^^ 3 > ^-> 1 > -2 > {name: nameA } -1 >Emitted(17, 5) Source(35, 6) + SourceIndex(0) -2 >Emitted(17, 24) Source(35, 20) + SourceIndex(0) +2 > name: nameA +1 >Emitted(17, 5) Source(35, 7) + SourceIndex(0) +2 >Emitted(17, 24) Source(35, 18) + SourceIndex(0) --- >>> console.log(nameA); 1->^^^^ @@ -527,7 +527,7 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 6 > ^^^^^ 7 > ^ 8 > ^ -1-> of getRobots()) { +1-> } of getRobots()) { > 2 > console 3 > . @@ -656,9 +656,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 2 > ^^^^^^^^^^^^^^^^^^^ 3 > ^-> 1 > -2 > {name: nameA } -1 >Emitted(21, 5) Source(38, 6) + SourceIndex(0) -2 >Emitted(21, 24) Source(38, 20) + SourceIndex(0) +2 > name: nameA +1 >Emitted(21, 5) Source(38, 7) + SourceIndex(0) +2 >Emitted(21, 24) Source(38, 18) + SourceIndex(0) --- >>> console.log(nameA); 1->^^^^ @@ -669,7 +669,7 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 6 > ^^^^^ 7 > ^ 8 > ^ -1-> of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +1-> } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { > 2 > console 3 > . @@ -742,12 +742,12 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 5 > ^^ 6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > { primary: primaryA, secondary: secondaryA } +2 > skills: { primary: primaryA, secondary: secondaryA } 3 > 4 > primary: primaryA 5 > , 6 > secondary: secondaryA -1->Emitted(25, 5) Source(41, 16) + SourceIndex(0) +1->Emitted(25, 5) Source(41, 8) + SourceIndex(0) 2 >Emitted(25, 34) Source(41, 60) + SourceIndex(0) 3 >Emitted(25, 36) Source(41, 18) + SourceIndex(0) 4 >Emitted(25, 57) Source(41, 35) + SourceIndex(0) @@ -842,12 +842,12 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 5 > ^^ 6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > { primary: primaryA, secondary: secondaryA } +2 > skills: { primary: primaryA, secondary: secondaryA } 3 > 4 > primary: primaryA 5 > , 6 > secondary: secondaryA -1->Emitted(29, 5) Source(44, 16) + SourceIndex(0) +1->Emitted(29, 5) Source(44, 8) + SourceIndex(0) 2 >Emitted(29, 23) Source(44, 60) + SourceIndex(0) 3 >Emitted(29, 25) Source(44, 18) + SourceIndex(0) 4 >Emitted(29, 46) Source(44, 35) + SourceIndex(0) @@ -1050,12 +1050,12 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 5 > ^^ 6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > { primary: primaryA, secondary: secondaryA } +2 > skills: { primary: primaryA, secondary: secondaryA } 3 > 4 > primary: primaryA 5 > , 6 > secondary: secondaryA -1 >Emitted(34, 5) Source(47, 16) + SourceIndex(0) +1 >Emitted(34, 5) Source(47, 8) + SourceIndex(0) 2 >Emitted(34, 23) Source(47, 60) + SourceIndex(0) 3 >Emitted(34, 25) Source(47, 18) + SourceIndex(0) 4 >Emitted(34, 46) Source(47, 35) + SourceIndex(0) @@ -1140,9 +1140,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > {name } -1 >Emitted(38, 5) Source(51, 6) + SourceIndex(0) -2 >Emitted(38, 29) Source(51, 13) + SourceIndex(0) +2 > name +1 >Emitted(38, 5) Source(51, 7) + SourceIndex(0) +2 >Emitted(38, 29) Source(51, 11) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -1153,7 +1153,7 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 6 > ^^^^^ 7 > ^ 8 > ^ -1 > of robots) { +1 > } of robots) { > 2 > console 3 > . @@ -1228,9 +1228,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 2 > ^^^^^^^^^^^^^^^^^^ 3 > ^^-> 1 > -2 > {name } -1 >Emitted(42, 5) Source(54, 6) + SourceIndex(0) -2 >Emitted(42, 23) Source(54, 13) + SourceIndex(0) +2 > name +1 >Emitted(42, 5) Source(54, 7) + SourceIndex(0) +2 >Emitted(42, 23) Source(54, 11) + SourceIndex(0) --- >>> console.log(nameA); 1->^^^^ @@ -1241,7 +1241,7 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 6 > ^^^^^ 7 > ^ 8 > ^ -1-> of getRobots()) { +1-> } of getRobots()) { > 2 > console 3 > . @@ -1370,9 +1370,9 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 2 > ^^^^^^^^^^^^^^^^^^ 3 > ^^-> 1 > -2 > {name } -1 >Emitted(46, 5) Source(57, 6) + SourceIndex(0) -2 >Emitted(46, 23) Source(57, 13) + SourceIndex(0) +2 > name +1 >Emitted(46, 5) Source(57, 7) + SourceIndex(0) +2 >Emitted(46, 23) Source(57, 11) + SourceIndex(0) --- >>> console.log(nameA); 1->^^^^ @@ -1383,7 +1383,7 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 6 > ^^^^^ 7 > ^ 8 > ^ -1-> of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +1-> } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { > 2 > console 3 > . @@ -1456,12 +1456,12 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 5 > ^^ 6 > ^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > { primary, secondary } +2 > skills: { primary, secondary } 3 > 4 > primary 5 > , 6 > secondary -1->Emitted(50, 5) Source(60, 16) + SourceIndex(0) +1->Emitted(50, 5) Source(60, 8) + SourceIndex(0) 2 >Emitted(50, 34) Source(60, 38) + SourceIndex(0) 3 >Emitted(50, 36) Source(60, 18) + SourceIndex(0) 4 >Emitted(50, 56) Source(60, 25) + SourceIndex(0) @@ -1556,12 +1556,12 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 5 > ^^ 6 > ^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > { primary, secondary } +2 > skills: { primary, secondary } 3 > 4 > primary 5 > , 6 > secondary -1->Emitted(54, 5) Source(63, 16) + SourceIndex(0) +1->Emitted(54, 5) Source(63, 8) + SourceIndex(0) 2 >Emitted(54, 23) Source(63, 38) + SourceIndex(0) 3 >Emitted(54, 25) Source(63, 18) + SourceIndex(0) 4 >Emitted(54, 45) Source(63, 25) + SourceIndex(0) @@ -1764,12 +1764,12 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts 5 > ^^ 6 > ^^^^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > { primary, secondary } +2 > skills: { primary, secondary } 3 > 4 > primary 5 > , 6 > secondary -1 >Emitted(59, 5) Source(66, 16) + SourceIndex(0) +1 >Emitted(59, 5) Source(66, 8) + SourceIndex(0) 2 >Emitted(59, 23) Source(66, 38) + SourceIndex(0) 3 >Emitted(59, 25) Source(66, 18) + SourceIndex(0) 4 >Emitted(59, 45) Source(66, 25) + SourceIndex(0) @@ -1854,23 +1854,20 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts --- >>> _2 = robots_3[_1], nameA = _2.name, skillA = _2.skill; 1 >^^^^ -2 > ^^^^^^^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^ 1 > -2 > {name: nameA, skill: skillA } -3 > -4 > name: nameA -5 > , -6 > skill: skillA +2 > { +3 > name: nameA +4 > , +5 > skill: skillA 1 >Emitted(63, 5) Source(72, 6) + SourceIndex(0) -2 >Emitted(63, 22) Source(72, 35) + SourceIndex(0) -3 >Emitted(63, 24) Source(72, 7) + SourceIndex(0) -4 >Emitted(63, 39) Source(72, 18) + SourceIndex(0) -5 >Emitted(63, 41) Source(72, 20) + SourceIndex(0) -6 >Emitted(63, 58) Source(72, 33) + SourceIndex(0) +2 >Emitted(63, 24) Source(72, 7) + SourceIndex(0) +3 >Emitted(63, 39) Source(72, 18) + SourceIndex(0) +4 >Emitted(63, 41) Source(72, 20) + SourceIndex(0) +5 >Emitted(63, 58) Source(72, 33) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -1953,23 +1950,20 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts --- >>> _5 = _4[_3], nameA = _5.name, skillA = _5.skill; 1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^ 1 > -2 > {name: nameA, skill: skillA } -3 > -4 > name: nameA -5 > , -6 > skill: skillA +2 > { +3 > name: nameA +4 > , +5 > skill: skillA 1 >Emitted(67, 5) Source(75, 6) + SourceIndex(0) -2 >Emitted(67, 16) Source(75, 35) + SourceIndex(0) -3 >Emitted(67, 18) Source(75, 7) + SourceIndex(0) -4 >Emitted(67, 33) Source(75, 18) + SourceIndex(0) -5 >Emitted(67, 35) Source(75, 20) + SourceIndex(0) -6 >Emitted(67, 52) Source(75, 33) + SourceIndex(0) +2 >Emitted(67, 18) Source(75, 7) + SourceIndex(0) +3 >Emitted(67, 33) Source(75, 18) + SourceIndex(0) +4 >Emitted(67, 35) Source(75, 20) + SourceIndex(0) +5 >Emitted(67, 52) Source(75, 33) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -2106,23 +2100,20 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts --- >>> _8 = _7[_6], nameA = _8.name, skillA = _8.skill; 1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^ 1 > -2 > {name: nameA, skill: skillA } -3 > -4 > name: nameA -5 > , -6 > skill: skillA +2 > { +3 > name: nameA +4 > , +5 > skill: skillA 1 >Emitted(71, 5) Source(78, 6) + SourceIndex(0) -2 >Emitted(71, 16) Source(78, 35) + SourceIndex(0) -3 >Emitted(71, 18) Source(78, 7) + SourceIndex(0) -4 >Emitted(71, 33) Source(78, 18) + SourceIndex(0) -5 >Emitted(71, 35) Source(78, 20) + SourceIndex(0) -6 >Emitted(71, 52) Source(78, 33) + SourceIndex(0) +2 >Emitted(71, 18) Source(78, 7) + SourceIndex(0) +3 >Emitted(71, 33) Source(78, 18) + SourceIndex(0) +4 >Emitted(71, 35) Source(78, 20) + SourceIndex(0) +5 >Emitted(71, 52) Source(78, 33) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -2200,35 +2191,32 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts --- >>> _10 = multiRobots_3[_9], nameA = _10.name, _11 = _10.skills, primaryA = _11.primary, secondaryA = _11.secondary; 1->^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^^^^^ -7 > ^^ -8 > ^^^^^^^^^^^^^^^^^^^^^^ -9 > ^^ -10> ^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } -3 > -4 > name: nameA -5 > , skills: -6 > { primary: primaryA, secondary: secondaryA } -7 > -8 > primary: primaryA -9 > , -10> secondary: secondaryA +2 > { +3 > name: nameA +4 > , +5 > skills: { primary: primaryA, secondary: secondaryA } +6 > +7 > primary: primaryA +8 > , +9 > secondary: secondaryA 1->Emitted(75, 5) Source(81, 6) + SourceIndex(0) -2 >Emitted(75, 28) Source(81, 74) + SourceIndex(0) -3 >Emitted(75, 30) Source(81, 7) + SourceIndex(0) -4 >Emitted(75, 46) Source(81, 18) + SourceIndex(0) -5 >Emitted(75, 48) Source(81, 28) + SourceIndex(0) -6 >Emitted(75, 64) Source(81, 72) + SourceIndex(0) -7 >Emitted(75, 66) Source(81, 30) + SourceIndex(0) -8 >Emitted(75, 88) Source(81, 47) + SourceIndex(0) -9 >Emitted(75, 90) Source(81, 49) + SourceIndex(0) -10>Emitted(75, 116) Source(81, 70) + SourceIndex(0) +2 >Emitted(75, 30) Source(81, 7) + SourceIndex(0) +3 >Emitted(75, 46) Source(81, 18) + SourceIndex(0) +4 >Emitted(75, 48) Source(81, 20) + SourceIndex(0) +5 >Emitted(75, 64) Source(81, 72) + SourceIndex(0) +6 >Emitted(75, 66) Source(81, 30) + SourceIndex(0) +7 >Emitted(75, 88) Source(81, 47) + SourceIndex(0) +8 >Emitted(75, 90) Source(81, 49) + SourceIndex(0) +9 >Emitted(75, 116) Source(81, 70) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -2312,35 +2300,32 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts --- >>> _14 = _13[_12], nameA = _14.name, _15 = _14.skills, primaryA = _15.primary, secondaryA = _15.secondary; 1->^^^^ -2 > ^^^^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^^^^^ -7 > ^^ -8 > ^^^^^^^^^^^^^^^^^^^^^^ -9 > ^^ -10> ^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } -3 > -4 > name: nameA -5 > , skills: -6 > { primary: primaryA, secondary: secondaryA } -7 > -8 > primary: primaryA -9 > , -10> secondary: secondaryA +2 > { +3 > name: nameA +4 > , +5 > skills: { primary: primaryA, secondary: secondaryA } +6 > +7 > primary: primaryA +8 > , +9 > secondary: secondaryA 1->Emitted(79, 5) Source(84, 6) + SourceIndex(0) -2 >Emitted(79, 19) Source(84, 74) + SourceIndex(0) -3 >Emitted(79, 21) Source(84, 7) + SourceIndex(0) -4 >Emitted(79, 37) Source(84, 18) + SourceIndex(0) -5 >Emitted(79, 39) Source(84, 28) + SourceIndex(0) -6 >Emitted(79, 55) Source(84, 72) + SourceIndex(0) -7 >Emitted(79, 57) Source(84, 30) + SourceIndex(0) -8 >Emitted(79, 79) Source(84, 47) + SourceIndex(0) -9 >Emitted(79, 81) Source(84, 49) + SourceIndex(0) -10>Emitted(79, 107) Source(84, 70) + SourceIndex(0) +2 >Emitted(79, 21) Source(84, 7) + SourceIndex(0) +3 >Emitted(79, 37) Source(84, 18) + SourceIndex(0) +4 >Emitted(79, 39) Source(84, 20) + SourceIndex(0) +5 >Emitted(79, 55) Source(84, 72) + SourceIndex(0) +6 >Emitted(79, 57) Source(84, 30) + SourceIndex(0) +7 >Emitted(79, 79) Source(84, 47) + SourceIndex(0) +8 >Emitted(79, 81) Source(84, 49) + SourceIndex(0) +9 >Emitted(79, 107) Source(84, 70) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -2533,35 +2518,32 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts --- >>> _18 = _17[_16], nameA = _18.name, _19 = _18.skills, primaryA = _19.primary, secondaryA = _19.secondary; 1->^^^^ -2 > ^^^^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^^^^^ -7 > ^^ -8 > ^^^^^^^^^^^^^^^^^^^^^^ -9 > ^^ -10> ^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } -3 > -4 > name: nameA -5 > , skills: -6 > { primary: primaryA, secondary: secondaryA } -7 > -8 > primary: primaryA -9 > , -10> secondary: secondaryA +2 > { +3 > name: nameA +4 > , +5 > skills: { primary: primaryA, secondary: secondaryA } +6 > +7 > primary: primaryA +8 > , +9 > secondary: secondaryA 1->Emitted(84, 5) Source(87, 6) + SourceIndex(0) -2 >Emitted(84, 19) Source(87, 74) + SourceIndex(0) -3 >Emitted(84, 21) Source(87, 7) + SourceIndex(0) -4 >Emitted(84, 37) Source(87, 18) + SourceIndex(0) -5 >Emitted(84, 39) Source(87, 28) + SourceIndex(0) -6 >Emitted(84, 55) Source(87, 72) + SourceIndex(0) -7 >Emitted(84, 57) Source(87, 30) + SourceIndex(0) -8 >Emitted(84, 79) Source(87, 47) + SourceIndex(0) -9 >Emitted(84, 81) Source(87, 49) + SourceIndex(0) -10>Emitted(84, 107) Source(87, 70) + SourceIndex(0) +2 >Emitted(84, 21) Source(87, 7) + SourceIndex(0) +3 >Emitted(84, 37) Source(87, 18) + SourceIndex(0) +4 >Emitted(84, 39) Source(87, 20) + SourceIndex(0) +5 >Emitted(84, 55) Source(87, 72) + SourceIndex(0) +6 >Emitted(84, 57) Source(87, 30) + SourceIndex(0) +7 >Emitted(84, 79) Source(87, 47) + SourceIndex(0) +8 >Emitted(84, 81) Source(87, 49) + SourceIndex(0) +9 >Emitted(84, 107) Source(87, 70) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -2639,23 +2621,20 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts --- >>> _21 = robots_4[_20], name = _21.name, skill = _21.skill; 1 >^^^^ -2 > ^^^^^^^^^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^ 1 > -2 > {name, skill } -3 > -4 > name -5 > , -6 > skill +2 > { +3 > name +4 > , +5 > skill 1 >Emitted(88, 5) Source(91, 6) + SourceIndex(0) -2 >Emitted(88, 24) Source(91, 20) + SourceIndex(0) -3 >Emitted(88, 26) Source(91, 7) + SourceIndex(0) -4 >Emitted(88, 41) Source(91, 11) + SourceIndex(0) -5 >Emitted(88, 43) Source(91, 13) + SourceIndex(0) -6 >Emitted(88, 60) Source(91, 18) + SourceIndex(0) +2 >Emitted(88, 26) Source(91, 7) + SourceIndex(0) +3 >Emitted(88, 41) Source(91, 11) + SourceIndex(0) +4 >Emitted(88, 43) Source(91, 13) + SourceIndex(0) +5 >Emitted(88, 60) Source(91, 18) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -2738,23 +2717,20 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts --- >>> _24 = _23[_22], name = _24.name, skill = _24.skill; 1 >^^^^ -2 > ^^^^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^ 1 > -2 > {name, skill } -3 > -4 > name -5 > , -6 > skill +2 > { +3 > name +4 > , +5 > skill 1 >Emitted(92, 5) Source(94, 6) + SourceIndex(0) -2 >Emitted(92, 19) Source(94, 20) + SourceIndex(0) -3 >Emitted(92, 21) Source(94, 7) + SourceIndex(0) -4 >Emitted(92, 36) Source(94, 11) + SourceIndex(0) -5 >Emitted(92, 38) Source(94, 13) + SourceIndex(0) -6 >Emitted(92, 55) Source(94, 18) + SourceIndex(0) +2 >Emitted(92, 21) Source(94, 7) + SourceIndex(0) +3 >Emitted(92, 36) Source(94, 11) + SourceIndex(0) +4 >Emitted(92, 38) Source(94, 13) + SourceIndex(0) +5 >Emitted(92, 55) Source(94, 18) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -2891,23 +2867,20 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts --- >>> _27 = _26[_25], name = _27.name, skill = _27.skill; 1 >^^^^ -2 > ^^^^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^ 1 > -2 > {name, skill } -3 > -4 > name -5 > , -6 > skill +2 > { +3 > name +4 > , +5 > skill 1 >Emitted(96, 5) Source(97, 6) + SourceIndex(0) -2 >Emitted(96, 19) Source(97, 20) + SourceIndex(0) -3 >Emitted(96, 21) Source(97, 7) + SourceIndex(0) -4 >Emitted(96, 36) Source(97, 11) + SourceIndex(0) -5 >Emitted(96, 38) Source(97, 13) + SourceIndex(0) -6 >Emitted(96, 55) Source(97, 18) + SourceIndex(0) +2 >Emitted(96, 21) Source(97, 7) + SourceIndex(0) +3 >Emitted(96, 36) Source(97, 11) + SourceIndex(0) +4 >Emitted(96, 38) Source(97, 13) + SourceIndex(0) +5 >Emitted(96, 55) Source(97, 18) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -2985,35 +2958,32 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts --- >>> _29 = multiRobots_4[_28], name = _29.name, _30 = _29.skills, primary = _30.primary, secondary = _30.secondary; 1->^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^^^^^ -7 > ^^ -8 > ^^^^^^^^^^^^^^^^^^^^^ -9 > ^^ -10> ^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > {name, skills: { primary, secondary } } -3 > -4 > name -5 > , skills: -6 > { primary, secondary } -7 > -8 > primary -9 > , -10> secondary +2 > { +3 > name +4 > , +5 > skills: { primary, secondary } +6 > +7 > primary +8 > , +9 > secondary 1->Emitted(100, 5) Source(100, 6) + SourceIndex(0) -2 >Emitted(100, 29) Source(100, 45) + SourceIndex(0) -3 >Emitted(100, 31) Source(100, 7) + SourceIndex(0) -4 >Emitted(100, 46) Source(100, 11) + SourceIndex(0) -5 >Emitted(100, 48) Source(100, 21) + SourceIndex(0) -6 >Emitted(100, 64) Source(100, 43) + SourceIndex(0) -7 >Emitted(100, 66) Source(100, 23) + SourceIndex(0) -8 >Emitted(100, 87) Source(100, 30) + SourceIndex(0) -9 >Emitted(100, 89) Source(100, 32) + SourceIndex(0) -10>Emitted(100, 114) Source(100, 41) + SourceIndex(0) +2 >Emitted(100, 31) Source(100, 7) + SourceIndex(0) +3 >Emitted(100, 46) Source(100, 11) + SourceIndex(0) +4 >Emitted(100, 48) Source(100, 13) + SourceIndex(0) +5 >Emitted(100, 64) Source(100, 43) + SourceIndex(0) +6 >Emitted(100, 66) Source(100, 23) + SourceIndex(0) +7 >Emitted(100, 87) Source(100, 30) + SourceIndex(0) +8 >Emitted(100, 89) Source(100, 32) + SourceIndex(0) +9 >Emitted(100, 114) Source(100, 41) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -3097,35 +3067,32 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts --- >>> _33 = _32[_31], name = _33.name, _34 = _33.skills, primary = _34.primary, secondary = _34.secondary; 1->^^^^ -2 > ^^^^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^^^^^ -7 > ^^ -8 > ^^^^^^^^^^^^^^^^^^^^^ -9 > ^^ -10> ^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > {name, skills: { primary, secondary } } -3 > -4 > name -5 > , skills: -6 > { primary, secondary } -7 > -8 > primary -9 > , -10> secondary +2 > { +3 > name +4 > , +5 > skills: { primary, secondary } +6 > +7 > primary +8 > , +9 > secondary 1->Emitted(104, 5) Source(103, 6) + SourceIndex(0) -2 >Emitted(104, 19) Source(103, 45) + SourceIndex(0) -3 >Emitted(104, 21) Source(103, 7) + SourceIndex(0) -4 >Emitted(104, 36) Source(103, 11) + SourceIndex(0) -5 >Emitted(104, 38) Source(103, 21) + SourceIndex(0) -6 >Emitted(104, 54) Source(103, 43) + SourceIndex(0) -7 >Emitted(104, 56) Source(103, 23) + SourceIndex(0) -8 >Emitted(104, 77) Source(103, 30) + SourceIndex(0) -9 >Emitted(104, 79) Source(103, 32) + SourceIndex(0) -10>Emitted(104, 104) Source(103, 41) + SourceIndex(0) +2 >Emitted(104, 21) Source(103, 7) + SourceIndex(0) +3 >Emitted(104, 36) Source(103, 11) + SourceIndex(0) +4 >Emitted(104, 38) Source(103, 13) + SourceIndex(0) +5 >Emitted(104, 54) Source(103, 43) + SourceIndex(0) +6 >Emitted(104, 56) Source(103, 23) + SourceIndex(0) +7 >Emitted(104, 77) Source(103, 30) + SourceIndex(0) +8 >Emitted(104, 79) Source(103, 32) + SourceIndex(0) +9 >Emitted(104, 104) Source(103, 41) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -3318,35 +3285,32 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts --- >>> _37 = _36[_35], name = _37.name, _38 = _37.skills, primary = _38.primary, secondary = _38.secondary; 1->^^^^ -2 > ^^^^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^^^^^ -7 > ^^ -8 > ^^^^^^^^^^^^^^^^^^^^^ -9 > ^^ -10> ^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > {name, skills: { primary, secondary } } -3 > -4 > name -5 > , skills: -6 > { primary, secondary } -7 > -8 > primary -9 > , -10> secondary +2 > { +3 > name +4 > , +5 > skills: { primary, secondary } +6 > +7 > primary +8 > , +9 > secondary 1->Emitted(109, 5) Source(106, 6) + SourceIndex(0) -2 >Emitted(109, 19) Source(106, 45) + SourceIndex(0) -3 >Emitted(109, 21) Source(106, 7) + SourceIndex(0) -4 >Emitted(109, 36) Source(106, 11) + SourceIndex(0) -5 >Emitted(109, 38) Source(106, 21) + SourceIndex(0) -6 >Emitted(109, 54) Source(106, 43) + SourceIndex(0) -7 >Emitted(109, 56) Source(106, 23) + SourceIndex(0) -8 >Emitted(109, 77) Source(106, 30) + SourceIndex(0) -9 >Emitted(109, 79) Source(106, 32) + SourceIndex(0) -10>Emitted(109, 104) Source(106, 41) + SourceIndex(0) +2 >Emitted(109, 21) Source(106, 7) + SourceIndex(0) +3 >Emitted(109, 36) Source(106, 11) + SourceIndex(0) +4 >Emitted(109, 38) Source(106, 13) + SourceIndex(0) +5 >Emitted(109, 54) Source(106, 43) + SourceIndex(0) +6 >Emitted(109, 56) Source(106, 23) + SourceIndex(0) +7 >Emitted(109, 77) Source(106, 30) + SourceIndex(0) +8 >Emitted(109, 79) Source(106, 32) + SourceIndex(0) +9 >Emitted(109, 104) Source(106, 41) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.js.map index 782a7682168..17d9a9b0411 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,uBAAW,CAAY;AACvB,uBAAW,EAAE,qBAAa,CAAY;AACxC,kDAA0E,EAAxE,eAAW,EAAE,iBAAa,CAA+C;AAC/E,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AACD,IAAI,CAAC,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"} \ 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,uBAAW,CAAY;AACvB,uBAAW,EAAE,qBAAa,CAAY;AAC5C,IAAA,8CAA8E,EAAxE,eAAW,EAAE,iBAAa,CAA+C;AAC/E,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AACD,IAAI,CAAC,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.sourcemap.txt index b58075c8b70..f066ec465cf 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.sourcemap.txt @@ -161,27 +161,30 @@ sourceFile:sourceMapValidationDestructuringVariableStatement.ts --- >>>var _a = { name: "Edger", skill: "cutting edges" }, nameC = _a.name, skillC = _a.skill; 1-> -2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^^^^^^ -7 > ^ +2 >^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^ 1-> - >var -2 >{ name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" } -3 > -4 > name: nameC -5 > , -6 > skill: skillC -7 > } = { name: "Edger", skill: "cutting edges" }; -1->Emitted(6, 1) Source(13, 5) + SourceIndex(0) -2 >Emitted(6, 51) Source(13, 79) + SourceIndex(0) -3 >Emitted(6, 53) Source(13, 7) + SourceIndex(0) -4 >Emitted(6, 68) Source(13, 18) + SourceIndex(0) -5 >Emitted(6, 70) Source(13, 20) + SourceIndex(0) -6 >Emitted(6, 87) Source(13, 33) + SourceIndex(0) -7 >Emitted(6, 88) Source(13, 80) + SourceIndex(0) + > +2 > +3 > var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" } +4 > +5 > name: nameC +6 > , +7 > skill: skillC +8 > } = { name: "Edger", skill: "cutting edges" }; +1->Emitted(6, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(6, 5) Source(13, 1) + 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) +8 >Emitted(6, 88) Source(13, 80) + SourceIndex(0) --- >>>if (nameA == nameB) { 1 > diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js.map index 3db6913ce13..cf91be353da 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,qBAAK,CAAW;AAClB,uBAAO,CAAW;AAClB,wBAAQ,EAAE,kBAAM,EAAE,mBAAO,CAAW;AAEpC,iDAAQ,CAAoC;AAC7C,wCAA0D,EAAzD,eAAO,EAAE,aAAK,EAAE,cAAM,CAAoC;AAE1D,wBAAQ,EAAE,4BAAa,CAAW;AAEvC,EAAE,CAAC,CAAC,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC;IAClB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC"} \ 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,qBAAK,CAAW;AAClB,uBAAO,CAAW;AAClB,wBAAQ,EAAE,kBAAM,EAAE,mBAAO,CAAW;AAEpC,iDAAQ,CAAoC;AACjD,IAAA,oCAA8D,EAAzD,eAAO,EAAE,aAAK,EAAE,cAAM,CAAoC;AAE1D,wBAAQ,EAAE,4BAAa,CAAW;AAEvC,EAAE,CAAC,CAAC,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC;IAClB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt index 6aa11106d90..43bcf108a9d 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt @@ -158,33 +158,36 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern. --- >>>var _a = [3, "edging", "Trimming edges"], numberC = _a[0], nameC = _a[1], skillC = _a[2]; 1-> -2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^^ -7 > ^^ -8 > ^^^^^^^^^^^^^^ -9 > ^ +2 >^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^ +10> ^ 1-> - >let -2 >[numberC, nameC, skillC] = [3, "edging", "Trimming edges"] -3 > -4 > numberC -5 > , -6 > nameC -7 > , -8 > skillC -9 > ] = [3, "edging", "Trimming edges"]; -1->Emitted(7, 1) Source(14, 5) + SourceIndex(0) -2 >Emitted(7, 41) Source(14, 63) + SourceIndex(0) -3 >Emitted(7, 43) Source(14, 6) + SourceIndex(0) -4 >Emitted(7, 58) Source(14, 13) + SourceIndex(0) -5 >Emitted(7, 60) Source(14, 15) + SourceIndex(0) -6 >Emitted(7, 73) Source(14, 20) + SourceIndex(0) -7 >Emitted(7, 75) Source(14, 22) + SourceIndex(0) -8 >Emitted(7, 89) Source(14, 28) + SourceIndex(0) -9 >Emitted(7, 90) Source(14, 64) + SourceIndex(0) + > +2 > +3 > let [numberC, nameC, skillC] = [3, "edging", "Trimming edges"] +4 > +5 > numberC +6 > , +7 > nameC +8 > , +9 > skillC +10> ] = [3, "edging", "Trimming edges"]; +1->Emitted(7, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(7, 5) Source(14, 1) + SourceIndex(0) +3 >Emitted(7, 41) Source(14, 63) + SourceIndex(0) +4 >Emitted(7, 43) Source(14, 6) + SourceIndex(0) +5 >Emitted(7, 58) Source(14, 13) + SourceIndex(0) +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) +10>Emitted(7, 90) Source(14, 64) + SourceIndex(0) --- >>>var numberA3 = robotA[0], robotAInfo = robotA.slice(1); 1 > diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js.map index 581a6a4bc5d..6d0bcc3b9b2 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,2BAAM,CAAgB;AACxB,2BAAM,CAAgB;AACtB,2BAAM,EAAE,mBAAgC,EAA/B,qBAAa,EAAE,uBAAe,CAAiB;AAExD,iDAAM,CAAsC;AAC7C,0CAA+E,EAA9E,eAAO,EAAE,UAAgC,EAA/B,qBAAa,EAAE,uBAAe,CAAuC;AAE/E,0CAAkB,CAAgB;AAEvC,EAAE,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC,CAAC;IACnB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvC,CAAC"} \ 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,2BAAM,CAAgB;AACxB,2BAAM,CAAgB;AACtB,2BAAM,EAAE,mBAAgC,EAA/B,qBAAa,EAAE,uBAAe,CAAiB;AAExD,iDAAM,CAAsC;AACjD,IAAA,sCAAmF,EAA9E,eAAO,EAAE,UAAgC,EAA/B,qBAAa,EAAE,uBAAe,CAAuC;AAE/E,0CAAkB,CAAgB;AAEvC,EAAE,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC,CAAC;IACnB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt index d0293fdaac9..64e22a28771 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt @@ -175,39 +175,42 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern2 --- >>>var _b = ["roomba", ["vaccum", "mopping"]], nameMC2 = _b[0], _c = _b[1], primarySkillC = _c[0], secondarySkillC = _c[1]; 1-> -2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^ -7 > ^^ -8 > ^^^^^^^^^^^^^^^^^^^^^ -9 > ^^ -10> ^^^^^^^^^^^^^^^^^^^^^^^ -11> ^ +2 >^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^ +12> ^ 1-> - >let -2 >[nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vaccum", "mopping"]] -3 > -4 > nameMC2 -5 > , -6 > [primarySkillC, secondarySkillC] -7 > -8 > primarySkillC -9 > , -10> secondarySkillC -11> ]] = ["roomba", ["vaccum", "mopping"]]; -1->Emitted(7, 1) Source(13, 5) + SourceIndex(0) -2 >Emitted(7, 43) Source(13, 84) + SourceIndex(0) -3 >Emitted(7, 45) Source(13, 6) + SourceIndex(0) -4 >Emitted(7, 60) Source(13, 13) + SourceIndex(0) -5 >Emitted(7, 62) Source(13, 15) + SourceIndex(0) -6 >Emitted(7, 72) Source(13, 47) + SourceIndex(0) -7 >Emitted(7, 74) Source(13, 16) + SourceIndex(0) -8 >Emitted(7, 95) Source(13, 29) + SourceIndex(0) -9 >Emitted(7, 97) Source(13, 31) + SourceIndex(0) -10>Emitted(7, 120) Source(13, 46) + SourceIndex(0) -11>Emitted(7, 121) Source(13, 85) + SourceIndex(0) + > +2 > +3 > let [nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vaccum", "mopping"]] +4 > +5 > nameMC2 +6 > , +7 > [primarySkillC, secondarySkillC] +8 > +9 > primarySkillC +10> , +11> secondarySkillC +12> ]] = ["roomba", ["vaccum", "mopping"]]; +1->Emitted(7, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(7, 5) Source(13, 1) + SourceIndex(0) +3 >Emitted(7, 43) Source(13, 84) + SourceIndex(0) +4 >Emitted(7, 45) Source(13, 6) + SourceIndex(0) +5 >Emitted(7, 60) Source(13, 13) + SourceIndex(0) +6 >Emitted(7, 62) Source(13, 15) + SourceIndex(0) +7 >Emitted(7, 72) Source(13, 47) + SourceIndex(0) +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) +12>Emitted(7, 121) Source(13, 85) + SourceIndex(0) --- >>>var multiRobotAInfo = multiRobotA.slice(0); 1 > diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js.map index 61afc3ab57b..1b6c788952d 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js.map] -{"version":3,"file":"sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAC/C,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;AAEzE,IAAI,KAAa,EAAE,OAAe,EAAE,KAAa,EAAE,MAAc,CAAC;AAClE,IAAI,UAA+B,CAAC;AAEpC,IAAI,WAA6B,EAAE,MAAc,EAAE,aAAqB,EAAE,eAAuB,CAAC;AAClG,IAAI,eAA8C,CAAC;AAEhD,iBAAK,CAAW;AACnB,gBAAuB,EAApB,aAAK,CAAgB;AACxB,+BAAsC,EAAnC,aAAK,CAA+B;AACpC,4BAAW,CAAgB;AAC9B,qBAAkC,EAA/B,mBAAW,CAAqB;AACnC,sCAAmD,EAAhD,mBAAW,CAAsC;AAEpD,mBAAkB,CAAC;AACnB,wBAAuB,CAAC;AACxB,uCAAsC,CAAC;AACvC,uBAAsB,CAAC;AACvB,4BAA2B,CAAC;AAC5B,+CAA8C,CAAC;AAE9C,mBAAO,EAAE,iBAAK,EAAE,kBAAM,CAAW;AAClC,gBAAsC,EAArC,eAAO,EAAE,aAAK,EAAE,cAAM,CAAgB;AACvC,+BAAqD,EAApD,eAAO,EAAE,aAAK,EAAE,cAAM,CAA+B;AACrD,uBAAM,EAAE,mBAAgC,EAA/B,qBAAa,EAAE,uBAAe,CAAiB;AACzD,qBAA6D,EAA5D,cAAM,EAAE,UAAgC,EAA/B,qBAAa,EAAE,uBAAe,CAAsB;AAC9D,wCAAgF,EAA/E,cAAM,EAAE,UAAgC,EAA/B,qBAAa,EAAE,uBAAe,CAAyC;AAEhF,mBAAO,EAAE,4BAAa,CAAW;AAClC,gBAAsC,EAArC,eAAO,EAAE,wBAAa,CAAgB;AACvC,+BAA4D,EAA3D,eAAO,EAAE,wBAAa,CAAsC;AAC7D,sCAAkC,CAAC;AACnC,2CAAuC,CAAC;AACxC,8DAA0D,CAAC;AAE3D,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAC/C,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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I,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.sourcemap.txt index 3c02134201b..466b36630c3 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.sourcemap.txt @@ -391,11 +391,11 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern3 4 > ^^^^^^-> 1 > > - > -2 >[numberB] = robotB -3 > ; -1 >Emitted(15, 1) Source(25, 1) + SourceIndex(0) -2 >Emitted(15, 20) Source(25, 19) + SourceIndex(0) + >[ +2 >numberB +3 > ] = robotB; +1 >Emitted(15, 1) Source(25, 2) + SourceIndex(0) +2 >Emitted(15, 20) Source(25, 9) + SourceIndex(0) 3 >Emitted(15, 21) Source(25, 20) + SourceIndex(0) --- >>>numberB = getRobotB()[0]; @@ -404,11 +404,11 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern3 3 > ^ 4 > ^^^^^^^^^^^^^^^^-> 1-> - > -2 >[numberB] = getRobotB() -3 > ; -1->Emitted(16, 1) Source(26, 1) + SourceIndex(0) -2 >Emitted(16, 25) Source(26, 24) + SourceIndex(0) + >[ +2 >numberB +3 > ] = getRobotB(); +1->Emitted(16, 1) Source(26, 2) + SourceIndex(0) +2 >Emitted(16, 25) Source(26, 9) + SourceIndex(0) 3 >Emitted(16, 26) Source(26, 25) + SourceIndex(0) --- >>>numberB = [2, "trimmer", "trimming"][0]; @@ -416,11 +416,11 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern3 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^ 1-> - > -2 >[numberB] = [2, "trimmer", "trimming"] -3 > ; -1->Emitted(17, 1) Source(27, 1) + SourceIndex(0) -2 >Emitted(17, 40) Source(27, 39) + SourceIndex(0) + >[ +2 >numberB +3 > ] = [2, "trimmer", "trimming"]; +1->Emitted(17, 1) Source(27, 2) + SourceIndex(0) +2 >Emitted(17, 40) Source(27, 9) + SourceIndex(0) 3 >Emitted(17, 41) Source(27, 40) + SourceIndex(0) --- >>>nameMB = multiRobotB[0]; @@ -429,11 +429,11 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern3 3 > ^ 4 > ^^^^^^-> 1 > - > -2 >[nameMB] = multiRobotB -3 > ; -1 >Emitted(18, 1) Source(28, 1) + SourceIndex(0) -2 >Emitted(18, 24) Source(28, 23) + SourceIndex(0) + >[ +2 >nameMB +3 > ] = multiRobotB; +1 >Emitted(18, 1) Source(28, 2) + SourceIndex(0) +2 >Emitted(18, 24) Source(28, 8) + SourceIndex(0) 3 >Emitted(18, 25) Source(28, 24) + SourceIndex(0) --- >>>nameMB = getMultiRobotB()[0]; @@ -442,11 +442,11 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern3 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^-> 1-> - > -2 >[nameMB] = getMultiRobotB() -3 > ; -1->Emitted(19, 1) Source(29, 1) + SourceIndex(0) -2 >Emitted(19, 29) Source(29, 28) + SourceIndex(0) + >[ +2 >nameMB +3 > ] = getMultiRobotB(); +1->Emitted(19, 1) Source(29, 2) + SourceIndex(0) +2 >Emitted(19, 29) Source(29, 8) + SourceIndex(0) 3 >Emitted(19, 30) Source(29, 29) + SourceIndex(0) --- >>>nameMB = ["trimmer", ["trimming", "edging"]][0]; @@ -455,11 +455,11 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern3 3 > ^ 4 > ^^^^^^^^^^^^-> 1-> - > -2 >[nameMB] = ["trimmer", ["trimming", "edging"]] -3 > ; -1->Emitted(20, 1) Source(30, 1) + SourceIndex(0) -2 >Emitted(20, 48) Source(30, 47) + SourceIndex(0) + >[ +2 >nameMB +3 > ] = ["trimmer", ["trimming", "edging"]]; +1->Emitted(20, 1) Source(30, 2) + SourceIndex(0) +2 >Emitted(20, 48) Source(30, 8) + SourceIndex(0) 3 >Emitted(20, 49) Source(30, 48) + SourceIndex(0) --- >>>numberB = robotB[0], nameB = robotB[1], skillB = robotB[2]; @@ -729,11 +729,11 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern3 3 > ^ 4 > ^^^^^^-> 1 > - > -2 >[...multiRobotAInfo] = multiRobotA -3 > ; -1 >Emitted(30, 1) Source(42, 1) + SourceIndex(0) -2 >Emitted(30, 39) Source(42, 35) + SourceIndex(0) + >[ +2 >...multiRobotAInfo +3 > ] = multiRobotA; +1 >Emitted(30, 1) Source(42, 2) + SourceIndex(0) +2 >Emitted(30, 39) Source(42, 20) + SourceIndex(0) 3 >Emitted(30, 40) Source(42, 36) + SourceIndex(0) --- >>>multiRobotAInfo = getMultiRobotB().slice(0); @@ -742,11 +742,11 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern3 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^-> 1-> - > -2 >[...multiRobotAInfo] = getMultiRobotB() -3 > ; -1->Emitted(31, 1) Source(43, 1) + SourceIndex(0) -2 >Emitted(31, 44) Source(43, 40) + SourceIndex(0) + >[ +2 >...multiRobotAInfo +3 > ] = getMultiRobotB(); +1->Emitted(31, 1) Source(43, 2) + SourceIndex(0) +2 >Emitted(31, 44) Source(43, 20) + SourceIndex(0) 3 >Emitted(31, 45) Source(43, 41) + SourceIndex(0) --- >>>multiRobotAInfo = ["trimmer", ["trimming", "edging"]].slice(0); @@ -754,11 +754,11 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern3 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^ 1-> - > -2 >[...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]] -3 > ; -1->Emitted(32, 1) Source(44, 1) + SourceIndex(0) -2 >Emitted(32, 63) Source(44, 59) + SourceIndex(0) + >[ +2 >...multiRobotAInfo +3 > ] = ["trimmer", ["trimming", "edging"]]; +1->Emitted(32, 1) Source(44, 2) + SourceIndex(0) +2 >Emitted(32, 63) Source(44, 20) + SourceIndex(0) 3 >Emitted(32, 64) Source(44, 60) + SourceIndex(0) --- >>>if (nameA == nameB) { diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js.map index 41074c2d999..cd7a9813374 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,sBAAoD,EAA1C,qBAAiB,EAAE,yBAAqB,CAAc;AAChE,uBAAW,EAAE,kBAAoD,EAA1C,qBAAiB,EAAE,yBAAqB,CAAc;AAC/E,uFAAsJ,EAApJ,eAAW,EAAE,cAAoD,EAA1C,qBAAiB,EAAE,yBAAqB,CAAsF;AAE3J,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,IAAI,CAAC,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"} \ 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,sBAAoD,EAA1C,qBAAiB,EAAE,yBAAqB,CAAc;AAChE,uBAAW,EAAE,kBAAoD,EAA1C,qBAAiB,EAAE,yBAAqB,CAAc;AACnF,IAAA,mFAA0J,EAApJ,eAAW,EAAE,cAAoD,EAA1C,qBAAiB,EAAE,yBAAqB,CAAsF;AAE3J,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,IAAI,CAAC,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.sourcemap.txt index deb5b3918f9..4d0845e1a75 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.sourcemap.txt @@ -215,39 +215,42 @@ sourceFile:sourceMapValidationDestructuringVariableStatementNestedObjectBindingP --- >>>var _c = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }, nameC = _c.name, _d = _c.skills, primaryB = _d.primary, secondaryB = _d.secondary; 1-> -2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^^^^^^^^^ -7 > ^^ -8 > ^^^^^^^^^^^^^^^^^^^^^ -9 > ^^ -10> ^^^^^^^^^^^^^^^^^^^^^^^^^ -11> ^ +2 >^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^ 1-> - >var -2 >{ name: nameC, skills: { primary: primaryB, secondary: secondaryB } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } -3 > -4 > name: nameC -5 > , -6 > skills: { primary: primaryB, secondary: secondaryB } -7 > -8 > primary: primaryB -9 > , -10> secondary: secondaryB -11> } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; -1->Emitted(5, 1) Source(16, 5) + SourceIndex(0) -2 >Emitted(5, 88) Source(16, 155) + SourceIndex(0) -3 >Emitted(5, 90) Source(16, 7) + SourceIndex(0) -4 >Emitted(5, 105) Source(16, 18) + SourceIndex(0) -5 >Emitted(5, 107) Source(16, 20) + SourceIndex(0) -6 >Emitted(5, 121) Source(16, 72) + SourceIndex(0) -7 >Emitted(5, 123) Source(16, 30) + SourceIndex(0) -8 >Emitted(5, 144) Source(16, 47) + SourceIndex(0) -9 >Emitted(5, 146) Source(16, 49) + SourceIndex(0) -10>Emitted(5, 171) Source(16, 70) + SourceIndex(0) -11>Emitted(5, 172) Source(16, 156) + SourceIndex(0) + > +2 > +3 > var { name: nameC, skills: { primary: primaryB, secondary: secondaryB } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } +4 > +5 > name: nameC +6 > , +7 > skills: { primary: primaryB, secondary: secondaryB } +8 > +9 > primary: primaryB +10> , +11> secondary: secondaryB +12> } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; +1->Emitted(5, 1) Source(16, 1) + SourceIndex(0) +2 >Emitted(5, 5) Source(16, 1) + SourceIndex(0) +3 >Emitted(5, 88) Source(16, 155) + SourceIndex(0) +4 >Emitted(5, 90) Source(16, 7) + SourceIndex(0) +5 >Emitted(5, 105) Source(16, 18) + SourceIndex(0) +6 >Emitted(5, 107) Source(16, 20) + SourceIndex(0) +7 >Emitted(5, 121) Source(16, 72) + SourceIndex(0) +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) +12>Emitted(5, 172) Source(16, 156) + SourceIndex(0) --- >>>if (nameB == nameB) { 1 > From 631e62d7ba30f098992c199019c2853fd4ea5b67 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 10 Dec 2015 14:44:46 -0800 Subject: [PATCH 043/209] Tests for source map of variable declarations with binding pattern in differnt order in the declaration list --- ...lidationDestructuringVariableStatement1.js | 49 ++ ...tionDestructuringVariableStatement1.js.map | 2 + ...tructuringVariableStatement1.sourcemap.txt | 571 ++++++++++++++++++ ...ionDestructuringVariableStatement1.symbols | 127 ++++ ...ationDestructuringVariableStatement1.types | 149 +++++ ...lidationDestructuringVariableStatement1.ts | 28 + 6 files changed, 926 insertions(+) create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.types create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringVariableStatement1.ts diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.js b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.js new file mode 100644 index 00000000000..cdf4451195e --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.js @@ -0,0 +1,49 @@ +//// [sourceMapValidationDestructuringVariableStatement1.ts] +interface Robot { + name: string; + skill: string; +} +declare var console: { + log(msg: string): void; +} +var hello = "hello"; +var robotA: Robot = { name: "mower", skill: "mowing" }; +var robotB: Robot = { name: "trimmer", skill: "trimming" }; +var a: string, { name: nameA } = robotA; +var b: string, { name: nameB, skill: skillB } = robotB; +var c: string, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }; + +var { name: nameA } = robotA, a = hello; +var { name: nameB, skill: skillB } = robotB, b = " hello"; +var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c = hello; + +var a = hello, { name: nameA } = robotA, a1= "hello"; +var b = hello, { name: nameB, skill: skillB } = robotB, b1 = "hello"; +var c = hello, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c1 = hello; +if (nameA == nameB) { + console.log(skillB); +} +else { + console.log(nameC); +} + +//// [sourceMapValidationDestructuringVariableStatement1.js] +var hello = "hello"; +var robotA = { name: "mower", skill: "mowing" }; +var robotB = { name: "trimmer", skill: "trimming" }; +var a, nameA = robotA.name; +var b, nameB = robotB.name, skillB = robotB.skill; +var c, _a = { name: "Edger", skill: "cutting edges" }, nameC = _a.name, skillC = _a.skill; +var nameA = robotA.name, a = hello; +var nameB = robotB.name, skillB = robotB.skill, b = " hello"; +var _b = { name: "Edger", skill: "cutting edges" }, nameC = _b.name, skillC = _b.skill, c = hello; +var a = hello, nameA = robotA.name, a1 = "hello"; +var b = hello, nameB = robotB.name, skillB = robotB.skill, b1 = "hello"; +var c = hello, _c = { name: "Edger", skill: "cutting edges" }, nameC = _c.name, skillC = _c.skill, c1 = hello; +if (nameA == nameB) { + console.log(skillB); +} +else { + console.log(nameC); +} +//# sourceMappingURL=sourceMapValidationDestructuringVariableStatement1.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.js.map new file mode 100644 index 00000000000..cc2ae54143d --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.js.map @@ -0,0 +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;AAC3D,IAAI,CAAS,EAAI,mBAAW,CAAY;AACxC,IAAI,CAAS,EAAI,mBAAW,EAAE,qBAAa,CAAY;AACvD,IAAI,CAAS,EAAE,8CAA0E,EAAxE,eAAW,EAAE,iBAAa,CAA+C;AAEpF,uBAAW,EAAa,CAAC,GAAG,KAAK,CAAC;AAClC,uBAAW,EAAE,qBAAa,EAAa,CAAC,GAAG,QAAQ,CAAC;AAC1D,IAAA,8CAA8E,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,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AACD,IAAI,CAAC,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.sourcemap.txt new file mode 100644 index 00000000000..70407ad9f81 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.sourcemap.txt @@ -0,0 +1,571 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringVariableStatement1.js +mapUrl: sourceMapValidationDestructuringVariableStatement1.js.map +sourceRoot: +sources: sourceMapValidationDestructuringVariableStatement1.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatement1.js +sourceFile:sourceMapValidationDestructuringVariableStatement1.ts +------------------------------------------------------------------- +>>>var hello = "hello"; +1 > +2 >^^^^ +3 > ^^^^^ +4 > ^^^ +5 > ^^^^^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 >interface Robot { + > name: string; + > skill: string; + >} + >declare var console: { + > log(msg: string): void; + >} + > +2 >var +3 > hello +4 > = +5 > "hello" +6 > ; +1 >Emitted(1, 1) Source(8, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(8, 5) + SourceIndex(0) +3 >Emitted(1, 10) Source(8, 10) + SourceIndex(0) +4 >Emitted(1, 13) Source(8, 13) + SourceIndex(0) +5 >Emitted(1, 20) Source(8, 20) + SourceIndex(0) +6 >Emitted(1, 21) Source(8, 21) + SourceIndex(0) +--- +>>>var robotA = { name: "mower", skill: "mowing" }; +1-> +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^^ +6 > ^^^^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^ +11> ^^ +12> ^^^^^^^^ +13> ^^ +14> ^ +15> ^^^^^-> +1-> + > +2 >var +3 > robotA +4 > : Robot = +5 > { +6 > name +7 > : +8 > "mower" +9 > , +10> skill +11> : +12> "mowing" +13> } +14> ; +1->Emitted(2, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(9, 5) + SourceIndex(0) +3 >Emitted(2, 11) Source(9, 11) + SourceIndex(0) +4 >Emitted(2, 14) Source(9, 21) + SourceIndex(0) +5 >Emitted(2, 16) Source(9, 23) + SourceIndex(0) +6 >Emitted(2, 20) Source(9, 27) + SourceIndex(0) +7 >Emitted(2, 22) Source(9, 29) + SourceIndex(0) +8 >Emitted(2, 29) Source(9, 36) + SourceIndex(0) +9 >Emitted(2, 31) Source(9, 38) + SourceIndex(0) +10>Emitted(2, 36) Source(9, 43) + SourceIndex(0) +11>Emitted(2, 38) Source(9, 45) + SourceIndex(0) +12>Emitted(2, 46) Source(9, 53) + SourceIndex(0) +13>Emitted(2, 48) Source(9, 55) + SourceIndex(0) +14>Emitted(2, 49) Source(9, 56) + SourceIndex(0) +--- +>>>var robotB = { name: "trimmer", skill: "trimming" }; +1-> +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^^ +6 > ^^^^ +7 > ^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^ +1-> + > +2 >var +3 > robotB +4 > : Robot = +5 > { +6 > name +7 > : +8 > "trimmer" +9 > , +10> skill +11> : +12> "trimming" +13> } +14> ; +1->Emitted(3, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(10, 5) + SourceIndex(0) +3 >Emitted(3, 11) Source(10, 11) + SourceIndex(0) +4 >Emitted(3, 14) Source(10, 21) + SourceIndex(0) +5 >Emitted(3, 16) Source(10, 23) + SourceIndex(0) +6 >Emitted(3, 20) Source(10, 27) + SourceIndex(0) +7 >Emitted(3, 22) Source(10, 29) + SourceIndex(0) +8 >Emitted(3, 31) Source(10, 38) + SourceIndex(0) +9 >Emitted(3, 33) Source(10, 40) + SourceIndex(0) +10>Emitted(3, 38) Source(10, 45) + SourceIndex(0) +11>Emitted(3, 40) Source(10, 47) + SourceIndex(0) +12>Emitted(3, 50) Source(10, 57) + SourceIndex(0) +13>Emitted(3, 52) Source(10, 59) + SourceIndex(0) +14>Emitted(3, 53) Source(10, 60) + SourceIndex(0) +--- +>>>var a, nameA = robotA.name; +1 > +2 >^^^^ +3 > ^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >var +3 > a: string +4 > , { +5 > name: nameA +6 > } = robotA; +1 >Emitted(4, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(4, 5) Source(11, 5) + SourceIndex(0) +3 >Emitted(4, 6) Source(11, 14) + SourceIndex(0) +4 >Emitted(4, 8) Source(11, 18) + SourceIndex(0) +5 >Emitted(4, 27) Source(11, 29) + SourceIndex(0) +6 >Emitted(4, 28) Source(11, 41) + SourceIndex(0) +--- +>>>var b, nameB = robotB.name, skillB = robotB.skill; +1-> +2 >^^^^ +3 > ^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^ +8 > ^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >var +3 > b: string +4 > , { +5 > name: nameB +6 > , +7 > skill: skillB +8 > } = robotB; +1->Emitted(5, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(5, 5) Source(12, 5) + SourceIndex(0) +3 >Emitted(5, 6) Source(12, 14) + SourceIndex(0) +4 >Emitted(5, 8) Source(12, 18) + SourceIndex(0) +5 >Emitted(5, 27) Source(12, 29) + SourceIndex(0) +6 >Emitted(5, 29) Source(12, 31) + SourceIndex(0) +7 >Emitted(5, 50) Source(12, 44) + SourceIndex(0) +8 >Emitted(5, 51) Source(12, 56) + SourceIndex(0) +--- +>>>var c, _a = { name: "Edger", skill: "cutting edges" }, nameC = _a.name, skillC = _a.skill; +1-> +2 >^^^^ +3 > ^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^ +10> ^ +1-> + > +2 >var +3 > c: string +4 > , +5 > { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" } +6 > +7 > name: nameC +8 > , +9 > skill: skillC +10> } = { name: "Edger", skill: "cutting edges" }; +1->Emitted(6, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(6, 5) Source(13, 5) + SourceIndex(0) +3 >Emitted(6, 6) Source(13, 14) + SourceIndex(0) +4 >Emitted(6, 8) Source(13, 16) + SourceIndex(0) +5 >Emitted(6, 54) Source(13, 90) + SourceIndex(0) +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) +10>Emitted(6, 91) Source(13, 91) + SourceIndex(0) +--- +>>>var nameA = robotA.name, a = hello; +1 > +2 >^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^ +5 > ^^^ +6 > ^^^^^ +7 > ^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + >var { +2 >name: nameA +3 > } = robotA, +4 > a +5 > = +6 > hello +7 > ; +1 >Emitted(7, 1) Source(15, 7) + SourceIndex(0) +2 >Emitted(7, 24) Source(15, 18) + SourceIndex(0) +3 >Emitted(7, 26) Source(15, 31) + SourceIndex(0) +4 >Emitted(7, 27) Source(15, 32) + SourceIndex(0) +5 >Emitted(7, 30) Source(15, 35) + SourceIndex(0) +6 >Emitted(7, 35) Source(15, 40) + SourceIndex(0) +7 >Emitted(7, 36) Source(15, 41) + SourceIndex(0) +--- +>>>var nameB = robotB.name, skillB = robotB.skill, b = " hello"; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^ +7 > ^^^ +8 > ^^^^^^^^ +9 > ^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + >var { +2 >name: nameB +3 > , +4 > skill: skillB +5 > } = robotB, +6 > b +7 > = +8 > " hello" +9 > ; +1->Emitted(8, 1) Source(16, 7) + SourceIndex(0) +2 >Emitted(8, 24) Source(16, 18) + SourceIndex(0) +3 >Emitted(8, 26) Source(16, 20) + SourceIndex(0) +4 >Emitted(8, 47) Source(16, 33) + SourceIndex(0) +5 >Emitted(8, 49) Source(16, 46) + SourceIndex(0) +6 >Emitted(8, 50) Source(16, 47) + SourceIndex(0) +7 >Emitted(8, 53) Source(16, 50) + SourceIndex(0) +8 >Emitted(8, 61) Source(16, 58) + SourceIndex(0) +9 >Emitted(8, 62) Source(16, 59) + SourceIndex(0) +--- +>>>var _b = { name: "Edger", skill: "cutting edges" }, nameC = _b.name, skillC = _b.skill, c = hello; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^^^^^ +12> ^ +1-> + > +2 > +3 > var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" } +4 > +5 > name: nameC +6 > , +7 > skill: skillC +8 > } = { name: "Edger", skill: "cutting edges" }, +9 > c +10> = +11> hello +12> ; +1->Emitted(9, 1) Source(17, 1) + SourceIndex(0) +2 >Emitted(9, 5) Source(17, 1) + SourceIndex(0) +3 >Emitted(9, 51) Source(17, 79) + SourceIndex(0) +4 >Emitted(9, 53) Source(17, 7) + SourceIndex(0) +5 >Emitted(9, 68) Source(17, 18) + SourceIndex(0) +6 >Emitted(9, 70) Source(17, 20) + SourceIndex(0) +7 >Emitted(9, 87) Source(17, 33) + SourceIndex(0) +8 >Emitted(9, 89) Source(17, 81) + SourceIndex(0) +9 >Emitted(9, 90) Source(17, 82) + SourceIndex(0) +10>Emitted(9, 93) Source(17, 85) + SourceIndex(0) +11>Emitted(9, 98) Source(17, 90) + SourceIndex(0) +12>Emitted(9, 99) Source(17, 91) + SourceIndex(0) +--- +>>>var a = hello, nameA = robotA.name, a1 = "hello"; +1 > +2 >^^^^ +3 > ^ +4 > ^^^ +5 > ^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^ +10> ^^^ +11> ^^^^^^^ +12> ^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >var +3 > a +4 > = +5 > hello +6 > , { +7 > name: nameA +8 > } = robotA, +9 > a1 +10> = +11> "hello" +12> ; +1 >Emitted(10, 1) Source(19, 1) + SourceIndex(0) +2 >Emitted(10, 5) Source(19, 5) + SourceIndex(0) +3 >Emitted(10, 6) Source(19, 6) + SourceIndex(0) +4 >Emitted(10, 9) Source(19, 9) + SourceIndex(0) +5 >Emitted(10, 14) Source(19, 14) + SourceIndex(0) +6 >Emitted(10, 16) Source(19, 18) + SourceIndex(0) +7 >Emitted(10, 35) Source(19, 29) + SourceIndex(0) +8 >Emitted(10, 37) Source(19, 42) + SourceIndex(0) +9 >Emitted(10, 39) Source(19, 44) + SourceIndex(0) +10>Emitted(10, 42) Source(19, 46) + SourceIndex(0) +11>Emitted(10, 49) Source(19, 53) + SourceIndex(0) +12>Emitted(10, 50) Source(19, 54) + SourceIndex(0) +--- +>>>var b = hello, nameB = robotB.name, skillB = robotB.skill, b1 = "hello"; +1-> +2 >^^^^ +3 > ^ +4 > ^^^ +5 > ^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^ +12> ^^^ +13> ^^^^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >var +3 > b +4 > = +5 > hello +6 > , { +7 > name: nameB +8 > , +9 > skill: skillB +10> } = robotB, +11> b1 +12> = +13> "hello" +14> ; +1->Emitted(11, 1) Source(20, 1) + SourceIndex(0) +2 >Emitted(11, 5) Source(20, 5) + SourceIndex(0) +3 >Emitted(11, 6) Source(20, 6) + SourceIndex(0) +4 >Emitted(11, 9) Source(20, 9) + SourceIndex(0) +5 >Emitted(11, 14) Source(20, 14) + SourceIndex(0) +6 >Emitted(11, 16) Source(20, 18) + SourceIndex(0) +7 >Emitted(11, 35) Source(20, 29) + SourceIndex(0) +8 >Emitted(11, 37) Source(20, 31) + SourceIndex(0) +9 >Emitted(11, 58) Source(20, 44) + SourceIndex(0) +10>Emitted(11, 60) Source(20, 57) + SourceIndex(0) +11>Emitted(11, 62) Source(20, 59) + SourceIndex(0) +12>Emitted(11, 65) Source(20, 62) + SourceIndex(0) +13>Emitted(11, 72) Source(20, 69) + SourceIndex(0) +14>Emitted(11, 73) Source(20, 70) + SourceIndex(0) +--- +>>>var c = hello, _c = { name: "Edger", skill: "cutting edges" }, nameC = _c.name, skillC = _c.skill, c1 = hello; +1-> +2 >^^^^ +3 > ^ +4 > ^^^ +5 > ^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^ +14> ^^^ +15> ^^^^^ +16> ^ +1-> + > +2 >var +3 > c +4 > = +5 > hello +6 > , +7 > { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" } +8 > +9 > name: nameC +10> , +11> skill: skillC +12> } = { name: "Edger", skill: "cutting edges" }, +13> c1 +14> = +15> hello +16> ; +1->Emitted(12, 1) Source(21, 1) + SourceIndex(0) +2 >Emitted(12, 5) Source(21, 5) + SourceIndex(0) +3 >Emitted(12, 6) Source(21, 6) + SourceIndex(0) +4 >Emitted(12, 9) Source(21, 9) + SourceIndex(0) +5 >Emitted(12, 14) Source(21, 14) + SourceIndex(0) +6 >Emitted(12, 16) Source(21, 16) + SourceIndex(0) +7 >Emitted(12, 62) Source(21, 90) + SourceIndex(0) +8 >Emitted(12, 64) Source(21, 18) + SourceIndex(0) +9 >Emitted(12, 79) Source(21, 29) + SourceIndex(0) +10>Emitted(12, 81) Source(21, 31) + SourceIndex(0) +11>Emitted(12, 98) Source(21, 44) + SourceIndex(0) +12>Emitted(12, 100) Source(21, 92) + SourceIndex(0) +13>Emitted(12, 102) Source(21, 94) + SourceIndex(0) +14>Emitted(12, 105) Source(21, 97) + SourceIndex(0) +15>Emitted(12, 110) Source(21, 102) + SourceIndex(0) +16>Emitted(12, 111) Source(21, 103) + SourceIndex(0) +--- +>>>if (nameA == nameB) { +1 > +2 >^^ +3 > ^ +4 > ^ +5 > ^^^^^ +6 > ^^^^ +7 > ^^^^^ +8 > ^ +9 > ^ +10> ^ +11> ^^^^-> +1 > + > +2 >if +3 > +4 > ( +5 > nameA +6 > == +7 > nameB +8 > ) +9 > +10> { +1 >Emitted(13, 1) Source(22, 1) + SourceIndex(0) +2 >Emitted(13, 3) Source(22, 3) + SourceIndex(0) +3 >Emitted(13, 4) Source(22, 4) + SourceIndex(0) +4 >Emitted(13, 5) Source(22, 5) + SourceIndex(0) +5 >Emitted(13, 10) Source(22, 10) + SourceIndex(0) +6 >Emitted(13, 14) Source(22, 14) + SourceIndex(0) +7 >Emitted(13, 19) Source(22, 19) + SourceIndex(0) +8 >Emitted(13, 20) Source(22, 20) + SourceIndex(0) +9 >Emitted(13, 21) Source(22, 21) + SourceIndex(0) +10>Emitted(13, 22) Source(22, 22) + SourceIndex(0) +--- +>>> console.log(skillB); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1-> + > +2 > console +3 > . +4 > log +5 > ( +6 > skillB +7 > ) +8 > ; +1->Emitted(14, 5) Source(23, 5) + SourceIndex(0) +2 >Emitted(14, 12) Source(23, 12) + SourceIndex(0) +3 >Emitted(14, 13) Source(23, 13) + SourceIndex(0) +4 >Emitted(14, 16) Source(23, 16) + SourceIndex(0) +5 >Emitted(14, 17) Source(23, 17) + SourceIndex(0) +6 >Emitted(14, 23) Source(23, 23) + SourceIndex(0) +7 >Emitted(14, 24) Source(23, 24) + SourceIndex(0) +8 >Emitted(14, 25) Source(23, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^-> +1 > + > +2 >} +1 >Emitted(15, 1) Source(24, 1) + SourceIndex(0) +2 >Emitted(15, 2) Source(24, 2) + SourceIndex(0) +--- +>>>else { +1-> +2 >^^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >else +3 > +4 > { +1->Emitted(16, 1) Source(25, 1) + SourceIndex(0) +2 >Emitted(16, 5) Source(25, 5) + SourceIndex(0) +3 >Emitted(16, 6) Source(25, 6) + SourceIndex(0) +4 >Emitted(16, 7) Source(25, 7) + SourceIndex(0) +--- +>>> console.log(nameC); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1-> + > +2 > console +3 > . +4 > log +5 > ( +6 > nameC +7 > ) +8 > ; +1->Emitted(17, 5) Source(26, 5) + SourceIndex(0) +2 >Emitted(17, 12) Source(26, 12) + SourceIndex(0) +3 >Emitted(17, 13) Source(26, 13) + SourceIndex(0) +4 >Emitted(17, 16) Source(26, 16) + SourceIndex(0) +5 >Emitted(17, 17) Source(26, 17) + SourceIndex(0) +6 >Emitted(17, 22) Source(26, 22) + SourceIndex(0) +7 >Emitted(17, 23) Source(26, 23) + SourceIndex(0) +8 >Emitted(17, 24) Source(26, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(18, 1) Source(27, 1) + SourceIndex(0) +2 >Emitted(18, 2) Source(27, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatement1.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.symbols b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.symbols new file mode 100644 index 00000000000..eb009ba9ad7 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.symbols @@ -0,0 +1,127 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatement1.ts === +interface Robot { +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 0, 0)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 0, 17)) + + skill: string; +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 1, 17)) +} +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 4, 11)) + + log(msg: string): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 4, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 5, 8)) +} +var hello = "hello"; +>hello : Symbol(hello, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 7, 3)) + +var robotA: Robot = { name: "mower", skill: "mowing" }; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 8, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 0, 0)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 8, 21)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 8, 36)) + +var robotB: Robot = { name: "trimmer", skill: "trimming" }; +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 9, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 0, 0)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 9, 21)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 9, 38)) + +var a: string, { name: nameA } = robotA; +>a : Symbol(a, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 10, 3), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 14, 29), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 18, 3)) +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 0, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 10, 16), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 14, 5), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 18, 16)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 8, 3)) + +var b: string, { name: nameB, skill: skillB } = robotB; +>b : Symbol(b, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 11, 3), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 15, 44), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 19, 3)) +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 0, 17)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 11, 16), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 15, 5), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 19, 16)) +>skill : Symbol(Robot.skill, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 1, 17)) +>skillB : Symbol(skillB, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 11, 29), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 15, 18), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 19, 29)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 9, 3)) + +var c: string, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }; +>c : Symbol(c, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 12, 3), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 16, 79), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 20, 3)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 12, 49)) +>nameC : Symbol(nameC, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 12, 16), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 16, 5), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 20, 16)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 12, 64)) +>skillC : Symbol(skillC, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 12, 29), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 16, 18), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 20, 29)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 12, 49)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 12, 64)) + +var { name: nameA } = robotA, a = hello; +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 0, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 10, 16), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 14, 5), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 18, 16)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 8, 3)) +>a : Symbol(a, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 10, 3), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 14, 29), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 18, 3)) +>hello : Symbol(hello, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 7, 3)) + +var { name: nameB, skill: skillB } = robotB, b = " hello"; +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 0, 17)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 11, 16), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 15, 5), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 19, 16)) +>skill : Symbol(Robot.skill, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 1, 17)) +>skillB : Symbol(skillB, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 11, 29), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 15, 18), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 19, 29)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 9, 3)) +>b : Symbol(b, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 11, 3), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 15, 44), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 19, 3)) + +var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c = hello; +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 16, 38)) +>nameC : Symbol(nameC, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 12, 16), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 16, 5), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 20, 16)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 16, 53)) +>skillC : Symbol(skillC, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 12, 29), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 16, 18), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 20, 29)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 16, 38)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 16, 53)) +>c : Symbol(c, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 12, 3), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 16, 79), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 20, 3)) +>hello : Symbol(hello, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 7, 3)) + +var a = hello, { name: nameA } = robotA, a1= "hello"; +>a : Symbol(a, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 10, 3), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 14, 29), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 18, 3)) +>hello : Symbol(hello, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 7, 3)) +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 0, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 10, 16), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 14, 5), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 18, 16)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 8, 3)) +>a1 : Symbol(a1, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 18, 40)) + +var b = hello, { name: nameB, skill: skillB } = robotB, b1 = "hello"; +>b : Symbol(b, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 11, 3), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 15, 44), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 19, 3)) +>hello : Symbol(hello, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 7, 3)) +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 0, 17)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 11, 16), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 15, 5), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 19, 16)) +>skill : Symbol(Robot.skill, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 1, 17)) +>skillB : Symbol(skillB, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 11, 29), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 15, 18), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 19, 29)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 9, 3)) +>b1 : Symbol(b1, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 19, 55)) + +var c = hello, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c1 = hello; +>c : Symbol(c, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 12, 3), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 16, 79), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 20, 3)) +>hello : Symbol(hello, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 7, 3)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 20, 49)) +>nameC : Symbol(nameC, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 12, 16), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 16, 5), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 20, 16)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 20, 64)) +>skillC : Symbol(skillC, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 12, 29), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 16, 18), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 20, 29)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 20, 49)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 20, 64)) +>c1 : Symbol(c1, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 20, 90)) +>hello : Symbol(hello, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 7, 3)) + +if (nameA == nameB) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 10, 16), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 14, 5), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 18, 16)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 11, 16), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 15, 5), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 19, 16)) + + console.log(skillB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 4, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 4, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 4, 22)) +>skillB : Symbol(skillB, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 11, 29), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 15, 18), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 19, 29)) +} +else { + console.log(nameC); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 4, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 4, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 4, 22)) +>nameC : Symbol(nameC, Decl(sourceMapValidationDestructuringVariableStatement1.ts, 12, 16), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 16, 5), Decl(sourceMapValidationDestructuringVariableStatement1.ts, 20, 16)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.types new file mode 100644 index 00000000000..9d8023f5f74 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.types @@ -0,0 +1,149 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatement1.ts === +interface Robot { +>Robot : Robot + + name: string; +>name : string + + skill: string; +>skill : string +} +declare var console: { +>console : { log(msg: string): void; } + + log(msg: string): void; +>log : (msg: string) => void +>msg : string +} +var hello = "hello"; +>hello : string +>"hello" : string + +var robotA: Robot = { name: "mower", skill: "mowing" }; +>robotA : Robot +>Robot : Robot +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string + +var robotB: Robot = { name: "trimmer", skill: "trimming" }; +>robotB : Robot +>Robot : Robot +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string + +var a: string, { name: nameA } = robotA; +>a : string +>name : any +>nameA : string +>robotA : Robot + +var b: string, { name: nameB, skill: skillB } = robotB; +>b : string +>name : any +>nameB : string +>skill : any +>skillB : string +>robotB : Robot + +var c: string, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }; +>c : string +>name : any +>nameC : string +>skill : any +>skillC : string +>{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } +>name : string +>"Edger" : string +>skill : string +>"cutting edges" : string + +var { name: nameA } = robotA, a = hello; +>name : any +>nameA : string +>robotA : Robot +>a : string +>hello : string + +var { name: nameB, skill: skillB } = robotB, b = " hello"; +>name : any +>nameB : string +>skill : any +>skillB : string +>robotB : Robot +>b : string +>" hello" : string + +var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c = hello; +>name : any +>nameC : string +>skill : any +>skillC : string +>{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } +>name : string +>"Edger" : string +>skill : string +>"cutting edges" : string +>c : string +>hello : string + +var a = hello, { name: nameA } = robotA, a1= "hello"; +>a : string +>hello : string +>name : any +>nameA : string +>robotA : Robot +>a1 : string +>"hello" : string + +var b = hello, { name: nameB, skill: skillB } = robotB, b1 = "hello"; +>b : string +>hello : string +>name : any +>nameB : string +>skill : any +>skillB : string +>robotB : Robot +>b1 : string +>"hello" : string + +var c = hello, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c1 = hello; +>c : string +>hello : string +>name : any +>nameC : string +>skill : any +>skillC : string +>{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } +>name : string +>"Edger" : string +>skill : string +>"cutting edges" : string +>c1 : string +>hello : string + +if (nameA == nameB) { +>nameA == nameB : boolean +>nameA : string +>nameB : string + + console.log(skillB); +>console.log(skillB) : void +>console.log : (msg: string) => void +>console : { log(msg: string): void; } +>log : (msg: string) => void +>skillB : string +} +else { + console.log(nameC); +>console.log(nameC) : void +>console.log : (msg: string) => void +>console : { log(msg: string): void; } +>log : (msg: string) => void +>nameC : string +} diff --git a/tests/cases/compiler/sourceMapValidationDestructuringVariableStatement1.ts b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatement1.ts new file mode 100644 index 00000000000..3697402bbcf --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatement1.ts @@ -0,0 +1,28 @@ +// @sourcemap: true +interface Robot { + name: string; + skill: string; +} +declare var console: { + log(msg: string): void; +} +var hello = "hello"; +var robotA: Robot = { name: "mower", skill: "mowing" }; +var robotB: Robot = { name: "trimmer", skill: "trimming" }; +var a: string, { name: nameA } = robotA; +var b: string, { name: nameB, skill: skillB } = robotB; +var c: string, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }; + +var { name: nameA } = robotA, a = hello; +var { name: nameB, skill: skillB } = robotB, b = " hello"; +var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c = hello; + +var a = hello, { name: nameA } = robotA, a1= "hello"; +var b = hello, { name: nameB, skill: skillB } = robotB, b1 = "hello"; +var c = hello, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c1 = hello; +if (nameA == nameB) { + console.log(skillB); +} +else { + console.log(nameC); +} \ No newline at end of file From 513e1f5fce5edfb2151eab9087f8aa82ef2bbf4a Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 10 Dec 2015 15:03:10 -0800 Subject: [PATCH 044/209] If the destructuring assignment is synthetic use the left side as source map This helps in scenarios like below where the assignment is created synthetically for ({a} of {a: string}) { } --- src/compiler/emitter.ts | 5 +- ...tructuringForOfArrayBindingPattern2.js.map | 2 +- ...ingForOfArrayBindingPattern2.sourcemap.txt | 513 ++++++++++-------- ...ructuringForOfObjectBindingPattern2.js.map | 2 +- ...ngForOfObjectBindingPattern2.sourcemap.txt | 468 ++++++++-------- 5 files changed, 537 insertions(+), 453 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index f152618312a..a4bbe9b7528 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -3955,7 +3955,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } else if (isAssignmentExpressionStatement) { // Source map node for root.left = root.right is root - emitDestructuringAssignment(target, value, root); + // but if root is synthetic, which could be in below case, use the target which is { a } + // for ({a} of {a: string}) { + // } + emitDestructuringAssignment(target, value, nodeIsSynthesized(root) ? target : root); } else { if (root.parent.kind !== SyntaxKind.ParenthesizedExpression) { diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.js.map index ca3d6f8d90f..cae221df0f2 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringForOfArrayBindingPattern2.js.map] -{"version":3,"file":"sourceMapValidationDestructuringForOfArrayBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForOfArrayBindingPattern2.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAC/C,IAAI,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9B;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED,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;AACzE,IAAI,WAAW,GAAG,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAC7C;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,IAAI,KAAa,EAAE,aAAqB,EAAE,eAAuB,CAAC;AAClE,IAAI,OAAe,EAAE,KAAa,CAAC;AACnC,IAAI,QAAgB,EAAE,MAAc,EAAE,OAAe,EAAE,MAAc,CAAC;AACtE,IAAI,QAAgB,EAAE,UAA+B,EAAE,eAA8C,CAAC;AAEtG,GAAG,CAAC,CAAc,UAAM,EAAN,iBAAM,EAAN,oBAAM,EAAN,IAAM,CAAC;IAApB,mBAAG,aAAK;IACT,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAAc,UAAW,EAAX,KAAA,SAAS,EAAE,EAAX,cAAW,EAAX,IAAW,CAAC;IAAzB,aAAG,aAAK;IACT,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAAc,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AAG,CAAC,CAAyB,WAA0B,EAA1B,OAAC,WAAW,EAAE,WAAW,CAAC,EAA1B,gBAA0B,EAA1B,KAA0B,CAAC;IAAlD,mCAAkB;IACpB,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;CAChC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringForOfArrayBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForOfArrayBindingPattern2.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAC/C,IAAI,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9B;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED,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;AACzE,IAAI,WAAW,GAAG,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAC7C;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,IAAI,KAAa,EAAE,aAAqB,EAAE,eAAuB,CAAC;AAClE,IAAI,OAAe,EAAE,KAAa,CAAC;AACnC,IAAI,QAAgB,EAAE,MAAc,EAAE,OAAe,EAAE,MAAc,CAAC;AACtE,IAAI,QAAgB,EAAE,UAA+B,EAAE,eAA8C,CAAC;AAEtG,GAAG,CAAC,CAAc,UAAM,EAAN,iBAAM,EAAN,oBAAM,EAAN,IAAM,CAAC;IAApB,iBAAS,EAAN,aAAK;IACT,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAAc,UAAW,EAAX,KAAA,SAAS,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;IAAnC,6CAAkB;IACpB,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;CAChC;AACD,GAAG,CAAC,CAAyB,WAAgB,EAAhB,MAAA,cAAc,EAAE,EAAhB,gBAAgB,EAAhB,KAAgB,CAAC;IAAxC,mCAAkB;IACpB,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;CAChC;AACD,GAAG,CAAC,CAAyB,WAA0B,EAA1B,OAAC,WAAW,EAAE,WAAW,CAAC,EAA1B,gBAA0B,EAA1B,KAA0B,CAAC;IAAlD,mCAAkB;IACpB,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;CAChC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.sourcemap.txt index 60c28ff0174..72970488233 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPattern2.sourcemap.txt @@ -474,14 +474,17 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _a = robots_1[_i], nameA = _a[1]; 1 >^^^^ -2 > ^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^ 1 > -2 > [, -3 > nameA +2 > [, nameA] +3 > +4 > nameA 1 >Emitted(18, 5) Source(26, 6) + SourceIndex(0) -2 >Emitted(18, 24) Source(26, 9) + SourceIndex(0) -3 >Emitted(18, 37) Source(26, 14) + SourceIndex(0) +2 >Emitted(18, 22) Source(26, 15) + SourceIndex(0) +3 >Emitted(18, 24) Source(26, 9) + SourceIndex(0) +4 >Emitted(18, 37) Source(26, 14) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -564,14 +567,17 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _d = _c[_b], nameA = _d[1]; 1 >^^^^ -2 > ^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^ 1 > -2 > [, -3 > nameA +2 > [, nameA] +3 > +4 > nameA 1 >Emitted(22, 5) Source(29, 6) + SourceIndex(0) -2 >Emitted(22, 18) Source(29, 9) + SourceIndex(0) -3 >Emitted(22, 31) Source(29, 14) + SourceIndex(0) +2 >Emitted(22, 16) Source(29, 15) + SourceIndex(0) +3 >Emitted(22, 18) Source(29, 9) + SourceIndex(0) +4 >Emitted(22, 31) Source(29, 14) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -660,14 +666,17 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _g = _f[_e], nameA = _g[1]; 1 >^^^^ -2 > ^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^ 1 > -2 > [, -3 > nameA +2 > [, nameA] +3 > +4 > nameA 1 >Emitted(26, 5) Source(32, 6) + SourceIndex(0) -2 >Emitted(26, 18) Source(32, 9) + SourceIndex(0) -3 >Emitted(26, 31) Source(32, 14) + SourceIndex(0) +2 >Emitted(26, 16) Source(32, 15) + SourceIndex(0) +3 >Emitted(26, 18) Source(32, 9) + SourceIndex(0) +4 >Emitted(26, 31) Source(32, 14) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -745,26 +754,29 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _j = multiRobots_1[_h], _k = _j[1], primarySkillA = _k[0], secondarySkillA = _k[1]; 1->^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > [, -3 > [primarySkillA, secondarySkillA] -4 > -5 > primarySkillA -6 > , -7 > secondarySkillA +2 > [, [primarySkillA, secondarySkillA]] +3 > +4 > [primarySkillA, secondarySkillA] +5 > +6 > primarySkillA +7 > , +8 > secondarySkillA 1->Emitted(30, 5) Source(35, 6) + SourceIndex(0) -2 >Emitted(30, 29) Source(35, 9) + SourceIndex(0) -3 >Emitted(30, 39) Source(35, 41) + SourceIndex(0) -4 >Emitted(30, 41) Source(35, 10) + SourceIndex(0) -5 >Emitted(30, 62) Source(35, 23) + SourceIndex(0) -6 >Emitted(30, 64) Source(35, 25) + SourceIndex(0) -7 >Emitted(30, 87) Source(35, 40) + SourceIndex(0) +2 >Emitted(30, 27) Source(35, 42) + SourceIndex(0) +3 >Emitted(30, 29) Source(35, 9) + SourceIndex(0) +4 >Emitted(30, 39) Source(35, 41) + SourceIndex(0) +5 >Emitted(30, 41) Source(35, 10) + SourceIndex(0) +6 >Emitted(30, 62) Source(35, 23) + SourceIndex(0) +7 >Emitted(30, 64) Source(35, 25) + SourceIndex(0) +8 >Emitted(30, 87) Source(35, 40) + SourceIndex(0) --- >>> console.log(primarySkillA); 1 >^^^^ @@ -848,26 +860,29 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _o = _m[_l], _p = _o[1], primarySkillA = _p[0], secondarySkillA = _p[1]; 1->^^^^ -2 > ^^^^^^^^^^^^^ -3 > ^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > [, -3 > [primarySkillA, secondarySkillA] -4 > -5 > primarySkillA -6 > , -7 > secondarySkillA +2 > [, [primarySkillA, secondarySkillA]] +3 > +4 > [primarySkillA, secondarySkillA] +5 > +6 > primarySkillA +7 > , +8 > secondarySkillA 1->Emitted(34, 5) Source(38, 6) + SourceIndex(0) -2 >Emitted(34, 18) Source(38, 9) + SourceIndex(0) -3 >Emitted(34, 28) Source(38, 41) + SourceIndex(0) -4 >Emitted(34, 30) Source(38, 10) + SourceIndex(0) -5 >Emitted(34, 51) Source(38, 23) + SourceIndex(0) -6 >Emitted(34, 53) Source(38, 25) + SourceIndex(0) -7 >Emitted(34, 76) Source(38, 40) + SourceIndex(0) +2 >Emitted(34, 16) Source(38, 42) + SourceIndex(0) +3 >Emitted(34, 18) Source(38, 9) + SourceIndex(0) +4 >Emitted(34, 28) Source(38, 41) + SourceIndex(0) +5 >Emitted(34, 30) Source(38, 10) + SourceIndex(0) +6 >Emitted(34, 51) Source(38, 23) + SourceIndex(0) +7 >Emitted(34, 53) Source(38, 25) + SourceIndex(0) +8 >Emitted(34, 76) Source(38, 40) + SourceIndex(0) --- >>> console.log(primarySkillA); 1 >^^^^ @@ -957,26 +972,29 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _s = _r[_q], _t = _s[1], primarySkillA = _t[0], secondarySkillA = _t[1]; 1->^^^^ -2 > ^^^^^^^^^^^^^ -3 > ^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > [, -3 > [primarySkillA, secondarySkillA] -4 > -5 > primarySkillA -6 > , -7 > secondarySkillA +2 > [, [primarySkillA, secondarySkillA]] +3 > +4 > [primarySkillA, secondarySkillA] +5 > +6 > primarySkillA +7 > , +8 > secondarySkillA 1->Emitted(38, 5) Source(41, 6) + SourceIndex(0) -2 >Emitted(38, 18) Source(41, 9) + SourceIndex(0) -3 >Emitted(38, 28) Source(41, 41) + SourceIndex(0) -4 >Emitted(38, 30) Source(41, 10) + SourceIndex(0) -5 >Emitted(38, 51) Source(41, 23) + SourceIndex(0) -6 >Emitted(38, 53) Source(41, 25) + SourceIndex(0) -7 >Emitted(38, 76) Source(41, 40) + SourceIndex(0) +2 >Emitted(38, 16) Source(41, 42) + SourceIndex(0) +3 >Emitted(38, 18) Source(41, 9) + SourceIndex(0) +4 >Emitted(38, 28) Source(41, 41) + SourceIndex(0) +5 >Emitted(38, 30) Source(41, 10) + SourceIndex(0) +6 >Emitted(38, 51) Source(41, 23) + SourceIndex(0) +7 >Emitted(38, 53) Source(41, 25) + SourceIndex(0) +8 >Emitted(38, 76) Source(41, 40) + SourceIndex(0) --- >>> console.log(primarySkillA); 1 >^^^^ @@ -1582,26 +1600,29 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _5 = robots_3[_4], numberA2 = _5[0], nameA2 = _5[1], skillA2 = _5[2]; 1->^^^^ -2 > ^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^ 1-> -2 > [ -3 > numberA2 -4 > , -5 > nameA2 -6 > , -7 > skillA2 +2 > [numberA2, nameA2, skillA2] +3 > +4 > numberA2 +5 > , +6 > nameA2 +7 > , +8 > skillA2 1->Emitted(66, 5) Source(64, 6) + SourceIndex(0) -2 >Emitted(66, 24) Source(64, 7) + SourceIndex(0) -3 >Emitted(66, 40) Source(64, 15) + SourceIndex(0) -4 >Emitted(66, 42) Source(64, 17) + SourceIndex(0) -5 >Emitted(66, 56) Source(64, 23) + SourceIndex(0) -6 >Emitted(66, 58) Source(64, 25) + SourceIndex(0) -7 >Emitted(66, 73) Source(64, 32) + SourceIndex(0) +2 >Emitted(66, 22) Source(64, 33) + SourceIndex(0) +3 >Emitted(66, 24) Source(64, 7) + SourceIndex(0) +4 >Emitted(66, 40) Source(64, 15) + SourceIndex(0) +5 >Emitted(66, 42) Source(64, 17) + SourceIndex(0) +6 >Emitted(66, 56) Source(64, 23) + SourceIndex(0) +7 >Emitted(66, 58) Source(64, 25) + SourceIndex(0) +8 >Emitted(66, 73) Source(64, 32) + SourceIndex(0) --- >>> console.log(nameA2); 1 >^^^^ @@ -1685,26 +1706,29 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _8 = _7[_6], numberA2 = _8[0], nameA2 = _8[1], skillA2 = _8[2]; 1->^^^^ -2 > ^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^ 1-> -2 > [ -3 > numberA2 -4 > , -5 > nameA2 -6 > , -7 > skillA2 +2 > [numberA2, nameA2, skillA2] +3 > +4 > numberA2 +5 > , +6 > nameA2 +7 > , +8 > skillA2 1->Emitted(70, 5) Source(67, 6) + SourceIndex(0) -2 >Emitted(70, 18) Source(67, 7) + SourceIndex(0) -3 >Emitted(70, 34) Source(67, 15) + SourceIndex(0) -4 >Emitted(70, 36) Source(67, 17) + SourceIndex(0) -5 >Emitted(70, 50) Source(67, 23) + SourceIndex(0) -6 >Emitted(70, 52) Source(67, 25) + SourceIndex(0) -7 >Emitted(70, 67) Source(67, 32) + SourceIndex(0) +2 >Emitted(70, 16) Source(67, 33) + SourceIndex(0) +3 >Emitted(70, 18) Source(67, 7) + SourceIndex(0) +4 >Emitted(70, 34) Source(67, 15) + SourceIndex(0) +5 >Emitted(70, 36) Source(67, 17) + SourceIndex(0) +6 >Emitted(70, 50) Source(67, 23) + SourceIndex(0) +7 >Emitted(70, 52) Source(67, 25) + SourceIndex(0) +8 >Emitted(70, 67) Source(67, 32) + SourceIndex(0) --- >>> console.log(nameA2); 1 >^^^^ @@ -1794,26 +1818,29 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _11 = _10[_9], numberA2 = _11[0], nameA2 = _11[1], skillA2 = _11[2]; 1->^^^^ -2 > ^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^ 1-> -2 > [ -3 > numberA2 -4 > , -5 > nameA2 -6 > , -7 > skillA2 +2 > [numberA2, nameA2, skillA2] +3 > +4 > numberA2 +5 > , +6 > nameA2 +7 > , +8 > skillA2 1->Emitted(74, 5) Source(70, 6) + SourceIndex(0) -2 >Emitted(74, 20) Source(70, 7) + SourceIndex(0) -3 >Emitted(74, 37) Source(70, 15) + SourceIndex(0) -4 >Emitted(74, 39) Source(70, 17) + SourceIndex(0) -5 >Emitted(74, 54) Source(70, 23) + SourceIndex(0) -6 >Emitted(74, 56) Source(70, 25) + SourceIndex(0) -7 >Emitted(74, 72) Source(70, 32) + SourceIndex(0) +2 >Emitted(74, 18) Source(70, 33) + SourceIndex(0) +3 >Emitted(74, 20) Source(70, 7) + SourceIndex(0) +4 >Emitted(74, 37) Source(70, 15) + SourceIndex(0) +5 >Emitted(74, 39) Source(70, 17) + SourceIndex(0) +6 >Emitted(74, 54) Source(70, 23) + SourceIndex(0) +7 >Emitted(74, 56) Source(70, 25) + SourceIndex(0) +8 >Emitted(74, 72) Source(70, 32) + SourceIndex(0) --- >>> console.log(nameA2); 1 >^^^^ @@ -1891,32 +1918,35 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _13 = multiRobots_3[_12], nameMA = _13[0], _14 = _13[1], primarySkillA = _14[0], secondarySkillA = _14[1]; 1->^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > [ -3 > nameMA -4 > , -5 > [primarySkillA, secondarySkillA] -6 > -7 > primarySkillA -8 > , -9 > secondarySkillA +2 > [nameMA, [primarySkillA, secondarySkillA]] +3 > +4 > nameMA +5 > , +6 > [primarySkillA, secondarySkillA] +7 > +8 > primarySkillA +9 > , +10> secondarySkillA 1->Emitted(78, 5) Source(73, 6) + SourceIndex(0) -2 >Emitted(78, 31) Source(73, 7) + SourceIndex(0) -3 >Emitted(78, 46) Source(73, 13) + SourceIndex(0) -4 >Emitted(78, 48) Source(73, 15) + SourceIndex(0) -5 >Emitted(78, 60) Source(73, 47) + SourceIndex(0) -6 >Emitted(78, 62) Source(73, 16) + SourceIndex(0) -7 >Emitted(78, 84) Source(73, 29) + SourceIndex(0) -8 >Emitted(78, 86) Source(73, 31) + SourceIndex(0) -9 >Emitted(78, 110) Source(73, 46) + SourceIndex(0) +2 >Emitted(78, 29) Source(73, 48) + SourceIndex(0) +3 >Emitted(78, 31) Source(73, 7) + SourceIndex(0) +4 >Emitted(78, 46) Source(73, 13) + SourceIndex(0) +5 >Emitted(78, 48) Source(73, 15) + SourceIndex(0) +6 >Emitted(78, 60) Source(73, 47) + SourceIndex(0) +7 >Emitted(78, 62) Source(73, 16) + SourceIndex(0) +8 >Emitted(78, 84) Source(73, 29) + SourceIndex(0) +9 >Emitted(78, 86) Source(73, 31) + SourceIndex(0) +10>Emitted(78, 110) Source(73, 46) + SourceIndex(0) --- >>> console.log(nameMA); 1 >^^^^ @@ -2000,32 +2030,35 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _17 = _16[_15], nameMA = _17[0], _18 = _17[1], primarySkillA = _18[0], secondarySkillA = _18[1]; 1->^^^^ -2 > ^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > [ -3 > nameMA -4 > , -5 > [primarySkillA, secondarySkillA] -6 > -7 > primarySkillA -8 > , -9 > secondarySkillA +2 > [nameMA, [primarySkillA, secondarySkillA]] +3 > +4 > nameMA +5 > , +6 > [primarySkillA, secondarySkillA] +7 > +8 > primarySkillA +9 > , +10> secondarySkillA 1->Emitted(82, 5) Source(76, 6) + SourceIndex(0) -2 >Emitted(82, 21) Source(76, 7) + SourceIndex(0) -3 >Emitted(82, 36) Source(76, 13) + SourceIndex(0) -4 >Emitted(82, 38) Source(76, 15) + SourceIndex(0) -5 >Emitted(82, 50) Source(76, 47) + SourceIndex(0) -6 >Emitted(82, 52) Source(76, 16) + SourceIndex(0) -7 >Emitted(82, 74) Source(76, 29) + SourceIndex(0) -8 >Emitted(82, 76) Source(76, 31) + SourceIndex(0) -9 >Emitted(82, 100) Source(76, 46) + SourceIndex(0) +2 >Emitted(82, 19) Source(76, 48) + SourceIndex(0) +3 >Emitted(82, 21) Source(76, 7) + SourceIndex(0) +4 >Emitted(82, 36) Source(76, 13) + SourceIndex(0) +5 >Emitted(82, 38) Source(76, 15) + SourceIndex(0) +6 >Emitted(82, 50) Source(76, 47) + SourceIndex(0) +7 >Emitted(82, 52) Source(76, 16) + SourceIndex(0) +8 >Emitted(82, 74) Source(76, 29) + SourceIndex(0) +9 >Emitted(82, 76) Source(76, 31) + SourceIndex(0) +10>Emitted(82, 100) Source(76, 46) + SourceIndex(0) --- >>> console.log(nameMA); 1 >^^^^ @@ -2115,32 +2148,35 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _21 = _20[_19], nameMA = _21[0], _22 = _21[1], primarySkillA = _22[0], secondarySkillA = _22[1]; 1->^^^^ -2 > ^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > [ -3 > nameMA -4 > , -5 > [primarySkillA, secondarySkillA] -6 > -7 > primarySkillA -8 > , -9 > secondarySkillA +2 > [nameMA, [primarySkillA, secondarySkillA]] +3 > +4 > nameMA +5 > , +6 > [primarySkillA, secondarySkillA] +7 > +8 > primarySkillA +9 > , +10> secondarySkillA 1->Emitted(86, 5) Source(79, 6) + SourceIndex(0) -2 >Emitted(86, 21) Source(79, 7) + SourceIndex(0) -3 >Emitted(86, 36) Source(79, 13) + SourceIndex(0) -4 >Emitted(86, 38) Source(79, 15) + SourceIndex(0) -5 >Emitted(86, 50) Source(79, 47) + SourceIndex(0) -6 >Emitted(86, 52) Source(79, 16) + SourceIndex(0) -7 >Emitted(86, 74) Source(79, 29) + SourceIndex(0) -8 >Emitted(86, 76) Source(79, 31) + SourceIndex(0) -9 >Emitted(86, 100) Source(79, 46) + SourceIndex(0) +2 >Emitted(86, 19) Source(79, 48) + SourceIndex(0) +3 >Emitted(86, 21) Source(79, 7) + SourceIndex(0) +4 >Emitted(86, 36) Source(79, 13) + SourceIndex(0) +5 >Emitted(86, 38) Source(79, 15) + SourceIndex(0) +6 >Emitted(86, 50) Source(79, 47) + SourceIndex(0) +7 >Emitted(86, 52) Source(79, 16) + SourceIndex(0) +8 >Emitted(86, 74) Source(79, 29) + SourceIndex(0) +9 >Emitted(86, 76) Source(79, 31) + SourceIndex(0) +10>Emitted(86, 100) Source(79, 46) + SourceIndex(0) --- >>> console.log(nameMA); 1 >^^^^ @@ -2219,20 +2255,23 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _24 = robots_4[_23], numberA3 = _24[0], robotAInfo = _24.slice(1); 1->^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > [ -3 > numberA3 -4 > , -5 > ...robotAInfo +2 > [numberA3, ...robotAInfo] +3 > +4 > numberA3 +5 > , +6 > ...robotAInfo 1->Emitted(90, 5) Source(83, 6) + SourceIndex(0) -2 >Emitted(90, 26) Source(83, 7) + SourceIndex(0) -3 >Emitted(90, 43) Source(83, 15) + SourceIndex(0) -4 >Emitted(90, 45) Source(83, 17) + SourceIndex(0) -5 >Emitted(90, 70) Source(83, 30) + SourceIndex(0) +2 >Emitted(90, 24) Source(83, 31) + SourceIndex(0) +3 >Emitted(90, 26) Source(83, 7) + SourceIndex(0) +4 >Emitted(90, 43) Source(83, 15) + SourceIndex(0) +5 >Emitted(90, 45) Source(83, 17) + SourceIndex(0) +6 >Emitted(90, 70) Source(83, 30) + SourceIndex(0) --- >>> console.log(numberA3); 1 >^^^^ @@ -2316,20 +2355,23 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _27 = _26[_25], numberA3 = _27[0], robotAInfo = _27.slice(1); 1->^^^^ -2 > ^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > [ -3 > numberA3 -4 > , -5 > ...robotAInfo +2 > [numberA3, ...robotAInfo] +3 > +4 > numberA3 +5 > , +6 > ...robotAInfo 1->Emitted(94, 5) Source(86, 6) + SourceIndex(0) -2 >Emitted(94, 21) Source(86, 7) + SourceIndex(0) -3 >Emitted(94, 38) Source(86, 15) + SourceIndex(0) -4 >Emitted(94, 40) Source(86, 17) + SourceIndex(0) -5 >Emitted(94, 65) Source(86, 30) + SourceIndex(0) +2 >Emitted(94, 19) Source(86, 31) + SourceIndex(0) +3 >Emitted(94, 21) Source(86, 7) + SourceIndex(0) +4 >Emitted(94, 38) Source(86, 15) + SourceIndex(0) +5 >Emitted(94, 40) Source(86, 17) + SourceIndex(0) +6 >Emitted(94, 65) Source(86, 30) + SourceIndex(0) --- >>> console.log(numberA3); 1 >^^^^ @@ -2418,20 +2460,23 @@ sourceFile:sourceMapValidationDestructuringForOfArrayBindingPattern2.ts --- >>> _30 = _29[_28], numberA3 = _30[0], robotAInfo = _30.slice(1); 1 >^^^^ -2 > ^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > -2 > [ -3 > numberA3 -4 > , -5 > ...robotAInfo +2 > [numberA3, ...robotAInfo] +3 > +4 > numberA3 +5 > , +6 > ...robotAInfo 1 >Emitted(98, 5) Source(89, 6) + SourceIndex(0) -2 >Emitted(98, 21) Source(89, 7) + SourceIndex(0) -3 >Emitted(98, 38) Source(89, 15) + SourceIndex(0) -4 >Emitted(98, 40) Source(89, 17) + SourceIndex(0) -5 >Emitted(98, 65) Source(89, 30) + SourceIndex(0) +2 >Emitted(98, 19) Source(89, 31) + SourceIndex(0) +3 >Emitted(98, 21) Source(89, 7) + SourceIndex(0) +4 >Emitted(98, 38) Source(89, 15) + SourceIndex(0) +5 >Emitted(98, 40) Source(89, 17) + SourceIndex(0) +6 >Emitted(98, 65) Source(89, 30) + SourceIndex(0) --- >>> console.log(numberA3); 1 >^^^^ diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.js.map index c779b1ebe26..c8610cbeef8 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringForOfObjectBindingPattern2.js.map] -{"version":3,"file":"sourceMapValidationDestructuringForOfObjectBind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yBAAS;IAEpC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringForOfObjectBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForOfObjectBindingPattern2.ts"],"names":[],"mappings":"AAgBA,IAAI,MAAM,GAAY,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;AACnG,IAAI,WAAW,GAAiB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE;IAChG,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;AAE/E;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,IAAI,KAAa,EAAE,QAAgB,EAAE,UAAkB,EAAE,CAAS,EAAE,MAAc,CAAC;AACnF,IAAI,IAAY,EAAE,OAAe,EAAE,SAAiB,EAAE,KAAa,CAAC;AAEpE,GAAG,CAAC,CAAmB,UAAM,EAAN,iBAAM,EAAN,oBAAM,EAAN,IAAM,CAAC;IAAxB,yBAAW;IACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAAmB,UAAW,EAAX,KAAA,SAAS,EAAE,EAAX,cAAW,EAAX,IAAW,CAAC;IAA7B,mBAAW;IACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAAmB,UAA4E,EAA5E,MAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAA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AAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,EAD9B,gBAC8B,EAD9B,KAC8B,CAAC;IAD1E,cAAuC,EAAtC,eAAI,EAAE,gBAA8B,EAApB,qBAAO,EAAE,yBAAS;IAEpC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.sourcemap.txt index 17802c4e86a..8a603317954 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern2.sourcemap.txt @@ -1854,20 +1854,23 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts --- >>> _2 = robots_3[_1], nameA = _2.name, skillA = _2.skill; 1 >^^^^ -2 > ^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^ 1 > -2 > { -3 > name: nameA -4 > , -5 > skill: skillA +2 > {name: nameA, skill: skillA } +3 > +4 > name: nameA +5 > , +6 > skill: skillA 1 >Emitted(63, 5) Source(72, 6) + SourceIndex(0) -2 >Emitted(63, 24) Source(72, 7) + SourceIndex(0) -3 >Emitted(63, 39) Source(72, 18) + SourceIndex(0) -4 >Emitted(63, 41) Source(72, 20) + SourceIndex(0) -5 >Emitted(63, 58) Source(72, 33) + SourceIndex(0) +2 >Emitted(63, 22) Source(72, 35) + SourceIndex(0) +3 >Emitted(63, 24) Source(72, 7) + SourceIndex(0) +4 >Emitted(63, 39) Source(72, 18) + SourceIndex(0) +5 >Emitted(63, 41) Source(72, 20) + SourceIndex(0) +6 >Emitted(63, 58) Source(72, 33) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -1950,20 +1953,23 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts --- >>> _5 = _4[_3], nameA = _5.name, skillA = _5.skill; 1 >^^^^ -2 > ^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^ 1 > -2 > { -3 > name: nameA -4 > , -5 > skill: skillA +2 > {name: nameA, skill: skillA } +3 > +4 > name: nameA +5 > , +6 > skill: skillA 1 >Emitted(67, 5) Source(75, 6) + SourceIndex(0) -2 >Emitted(67, 18) Source(75, 7) + SourceIndex(0) -3 >Emitted(67, 33) Source(75, 18) + SourceIndex(0) -4 >Emitted(67, 35) Source(75, 20) + SourceIndex(0) -5 >Emitted(67, 52) Source(75, 33) + SourceIndex(0) +2 >Emitted(67, 16) Source(75, 35) + SourceIndex(0) +3 >Emitted(67, 18) Source(75, 7) + SourceIndex(0) +4 >Emitted(67, 33) Source(75, 18) + SourceIndex(0) +5 >Emitted(67, 35) Source(75, 20) + SourceIndex(0) +6 >Emitted(67, 52) Source(75, 33) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -2100,20 +2106,23 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts --- >>> _8 = _7[_6], nameA = _8.name, skillA = _8.skill; 1 >^^^^ -2 > ^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^ 1 > -2 > { -3 > name: nameA -4 > , -5 > skill: skillA +2 > {name: nameA, skill: skillA } +3 > +4 > name: nameA +5 > , +6 > skill: skillA 1 >Emitted(71, 5) Source(78, 6) + SourceIndex(0) -2 >Emitted(71, 18) Source(78, 7) + SourceIndex(0) -3 >Emitted(71, 33) Source(78, 18) + SourceIndex(0) -4 >Emitted(71, 35) Source(78, 20) + SourceIndex(0) -5 >Emitted(71, 52) Source(78, 33) + SourceIndex(0) +2 >Emitted(71, 16) Source(78, 35) + SourceIndex(0) +3 >Emitted(71, 18) Source(78, 7) + SourceIndex(0) +4 >Emitted(71, 33) Source(78, 18) + SourceIndex(0) +5 >Emitted(71, 35) Source(78, 20) + SourceIndex(0) +6 >Emitted(71, 52) Source(78, 33) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -2191,32 +2200,35 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts --- >>> _10 = multiRobots_3[_9], nameA = _10.name, _11 = _10.skills, primaryA = _11.primary, secondaryA = _11.secondary; 1->^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > { -3 > name: nameA -4 > , -5 > skills: { primary: primaryA, secondary: secondaryA } -6 > -7 > primary: primaryA -8 > , -9 > secondary: secondaryA +2 > {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } +3 > +4 > name: nameA +5 > , +6 > skills: { primary: primaryA, secondary: secondaryA } +7 > +8 > primary: primaryA +9 > , +10> secondary: secondaryA 1->Emitted(75, 5) Source(81, 6) + SourceIndex(0) -2 >Emitted(75, 30) Source(81, 7) + SourceIndex(0) -3 >Emitted(75, 46) Source(81, 18) + SourceIndex(0) -4 >Emitted(75, 48) Source(81, 20) + SourceIndex(0) -5 >Emitted(75, 64) Source(81, 72) + SourceIndex(0) -6 >Emitted(75, 66) Source(81, 30) + SourceIndex(0) -7 >Emitted(75, 88) Source(81, 47) + SourceIndex(0) -8 >Emitted(75, 90) Source(81, 49) + SourceIndex(0) -9 >Emitted(75, 116) Source(81, 70) + SourceIndex(0) +2 >Emitted(75, 28) Source(81, 74) + SourceIndex(0) +3 >Emitted(75, 30) Source(81, 7) + SourceIndex(0) +4 >Emitted(75, 46) Source(81, 18) + SourceIndex(0) +5 >Emitted(75, 48) Source(81, 20) + SourceIndex(0) +6 >Emitted(75, 64) Source(81, 72) + SourceIndex(0) +7 >Emitted(75, 66) Source(81, 30) + SourceIndex(0) +8 >Emitted(75, 88) Source(81, 47) + SourceIndex(0) +9 >Emitted(75, 90) Source(81, 49) + SourceIndex(0) +10>Emitted(75, 116) Source(81, 70) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -2300,32 +2312,35 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts --- >>> _14 = _13[_12], nameA = _14.name, _15 = _14.skills, primaryA = _15.primary, secondaryA = _15.secondary; 1->^^^^ -2 > ^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > { -3 > name: nameA -4 > , -5 > skills: { primary: primaryA, secondary: secondaryA } -6 > -7 > primary: primaryA -8 > , -9 > secondary: secondaryA +2 > {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } +3 > +4 > name: nameA +5 > , +6 > skills: { primary: primaryA, secondary: secondaryA } +7 > +8 > primary: primaryA +9 > , +10> secondary: secondaryA 1->Emitted(79, 5) Source(84, 6) + SourceIndex(0) -2 >Emitted(79, 21) Source(84, 7) + SourceIndex(0) -3 >Emitted(79, 37) Source(84, 18) + SourceIndex(0) -4 >Emitted(79, 39) Source(84, 20) + SourceIndex(0) -5 >Emitted(79, 55) Source(84, 72) + SourceIndex(0) -6 >Emitted(79, 57) Source(84, 30) + SourceIndex(0) -7 >Emitted(79, 79) Source(84, 47) + SourceIndex(0) -8 >Emitted(79, 81) Source(84, 49) + SourceIndex(0) -9 >Emitted(79, 107) Source(84, 70) + SourceIndex(0) +2 >Emitted(79, 19) Source(84, 74) + SourceIndex(0) +3 >Emitted(79, 21) Source(84, 7) + SourceIndex(0) +4 >Emitted(79, 37) Source(84, 18) + SourceIndex(0) +5 >Emitted(79, 39) Source(84, 20) + SourceIndex(0) +6 >Emitted(79, 55) Source(84, 72) + SourceIndex(0) +7 >Emitted(79, 57) Source(84, 30) + SourceIndex(0) +8 >Emitted(79, 79) Source(84, 47) + SourceIndex(0) +9 >Emitted(79, 81) Source(84, 49) + SourceIndex(0) +10>Emitted(79, 107) Source(84, 70) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -2518,32 +2533,35 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts --- >>> _18 = _17[_16], nameA = _18.name, _19 = _18.skills, primaryA = _19.primary, secondaryA = _19.secondary; 1->^^^^ -2 > ^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > { -3 > name: nameA -4 > , -5 > skills: { primary: primaryA, secondary: secondaryA } -6 > -7 > primary: primaryA -8 > , -9 > secondary: secondaryA +2 > {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } +3 > +4 > name: nameA +5 > , +6 > skills: { primary: primaryA, secondary: secondaryA } +7 > +8 > primary: primaryA +9 > , +10> secondary: secondaryA 1->Emitted(84, 5) Source(87, 6) + SourceIndex(0) -2 >Emitted(84, 21) Source(87, 7) + SourceIndex(0) -3 >Emitted(84, 37) Source(87, 18) + SourceIndex(0) -4 >Emitted(84, 39) Source(87, 20) + SourceIndex(0) -5 >Emitted(84, 55) Source(87, 72) + SourceIndex(0) -6 >Emitted(84, 57) Source(87, 30) + SourceIndex(0) -7 >Emitted(84, 79) Source(87, 47) + SourceIndex(0) -8 >Emitted(84, 81) Source(87, 49) + SourceIndex(0) -9 >Emitted(84, 107) Source(87, 70) + SourceIndex(0) +2 >Emitted(84, 19) Source(87, 74) + SourceIndex(0) +3 >Emitted(84, 21) Source(87, 7) + SourceIndex(0) +4 >Emitted(84, 37) Source(87, 18) + SourceIndex(0) +5 >Emitted(84, 39) Source(87, 20) + SourceIndex(0) +6 >Emitted(84, 55) Source(87, 72) + SourceIndex(0) +7 >Emitted(84, 57) Source(87, 30) + SourceIndex(0) +8 >Emitted(84, 79) Source(87, 47) + SourceIndex(0) +9 >Emitted(84, 81) Source(87, 49) + SourceIndex(0) +10>Emitted(84, 107) Source(87, 70) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -2621,20 +2639,23 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts --- >>> _21 = robots_4[_20], name = _21.name, skill = _21.skill; 1 >^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^ 1 > -2 > { -3 > name -4 > , -5 > skill +2 > {name, skill } +3 > +4 > name +5 > , +6 > skill 1 >Emitted(88, 5) Source(91, 6) + SourceIndex(0) -2 >Emitted(88, 26) Source(91, 7) + SourceIndex(0) -3 >Emitted(88, 41) Source(91, 11) + SourceIndex(0) -4 >Emitted(88, 43) Source(91, 13) + SourceIndex(0) -5 >Emitted(88, 60) Source(91, 18) + SourceIndex(0) +2 >Emitted(88, 24) Source(91, 20) + SourceIndex(0) +3 >Emitted(88, 26) Source(91, 7) + SourceIndex(0) +4 >Emitted(88, 41) Source(91, 11) + SourceIndex(0) +5 >Emitted(88, 43) Source(91, 13) + SourceIndex(0) +6 >Emitted(88, 60) Source(91, 18) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -2717,20 +2738,23 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts --- >>> _24 = _23[_22], name = _24.name, skill = _24.skill; 1 >^^^^ -2 > ^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^ 1 > -2 > { -3 > name -4 > , -5 > skill +2 > {name, skill } +3 > +4 > name +5 > , +6 > skill 1 >Emitted(92, 5) Source(94, 6) + SourceIndex(0) -2 >Emitted(92, 21) Source(94, 7) + SourceIndex(0) -3 >Emitted(92, 36) Source(94, 11) + SourceIndex(0) -4 >Emitted(92, 38) Source(94, 13) + SourceIndex(0) -5 >Emitted(92, 55) Source(94, 18) + SourceIndex(0) +2 >Emitted(92, 19) Source(94, 20) + SourceIndex(0) +3 >Emitted(92, 21) Source(94, 7) + SourceIndex(0) +4 >Emitted(92, 36) Source(94, 11) + SourceIndex(0) +5 >Emitted(92, 38) Source(94, 13) + SourceIndex(0) +6 >Emitted(92, 55) Source(94, 18) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -2867,20 +2891,23 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts --- >>> _27 = _26[_25], name = _27.name, skill = _27.skill; 1 >^^^^ -2 > ^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^ 1 > -2 > { -3 > name -4 > , -5 > skill +2 > {name, skill } +3 > +4 > name +5 > , +6 > skill 1 >Emitted(96, 5) Source(97, 6) + SourceIndex(0) -2 >Emitted(96, 21) Source(97, 7) + SourceIndex(0) -3 >Emitted(96, 36) Source(97, 11) + SourceIndex(0) -4 >Emitted(96, 38) Source(97, 13) + SourceIndex(0) -5 >Emitted(96, 55) Source(97, 18) + SourceIndex(0) +2 >Emitted(96, 19) Source(97, 20) + SourceIndex(0) +3 >Emitted(96, 21) Source(97, 7) + SourceIndex(0) +4 >Emitted(96, 36) Source(97, 11) + SourceIndex(0) +5 >Emitted(96, 38) Source(97, 13) + SourceIndex(0) +6 >Emitted(96, 55) Source(97, 18) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -2958,32 +2985,35 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts --- >>> _29 = multiRobots_4[_28], name = _29.name, _30 = _29.skills, primary = _30.primary, secondary = _30.secondary; 1->^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > { -3 > name -4 > , -5 > skills: { primary, secondary } -6 > -7 > primary -8 > , -9 > secondary +2 > {name, skills: { primary, secondary } } +3 > +4 > name +5 > , +6 > skills: { primary, secondary } +7 > +8 > primary +9 > , +10> secondary 1->Emitted(100, 5) Source(100, 6) + SourceIndex(0) -2 >Emitted(100, 31) Source(100, 7) + SourceIndex(0) -3 >Emitted(100, 46) Source(100, 11) + SourceIndex(0) -4 >Emitted(100, 48) Source(100, 13) + SourceIndex(0) -5 >Emitted(100, 64) Source(100, 43) + SourceIndex(0) -6 >Emitted(100, 66) Source(100, 23) + SourceIndex(0) -7 >Emitted(100, 87) Source(100, 30) + SourceIndex(0) -8 >Emitted(100, 89) Source(100, 32) + SourceIndex(0) -9 >Emitted(100, 114) Source(100, 41) + SourceIndex(0) +2 >Emitted(100, 29) Source(100, 45) + SourceIndex(0) +3 >Emitted(100, 31) Source(100, 7) + SourceIndex(0) +4 >Emitted(100, 46) Source(100, 11) + SourceIndex(0) +5 >Emitted(100, 48) Source(100, 13) + SourceIndex(0) +6 >Emitted(100, 64) Source(100, 43) + SourceIndex(0) +7 >Emitted(100, 66) Source(100, 23) + SourceIndex(0) +8 >Emitted(100, 87) Source(100, 30) + SourceIndex(0) +9 >Emitted(100, 89) Source(100, 32) + SourceIndex(0) +10>Emitted(100, 114) Source(100, 41) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -3067,32 +3097,35 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts --- >>> _33 = _32[_31], name = _33.name, _34 = _33.skills, primary = _34.primary, secondary = _34.secondary; 1->^^^^ -2 > ^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > { -3 > name -4 > , -5 > skills: { primary, secondary } -6 > -7 > primary -8 > , -9 > secondary +2 > {name, skills: { primary, secondary } } +3 > +4 > name +5 > , +6 > skills: { primary, secondary } +7 > +8 > primary +9 > , +10> secondary 1->Emitted(104, 5) Source(103, 6) + SourceIndex(0) -2 >Emitted(104, 21) Source(103, 7) + SourceIndex(0) -3 >Emitted(104, 36) Source(103, 11) + SourceIndex(0) -4 >Emitted(104, 38) Source(103, 13) + SourceIndex(0) -5 >Emitted(104, 54) Source(103, 43) + SourceIndex(0) -6 >Emitted(104, 56) Source(103, 23) + SourceIndex(0) -7 >Emitted(104, 77) Source(103, 30) + SourceIndex(0) -8 >Emitted(104, 79) Source(103, 32) + SourceIndex(0) -9 >Emitted(104, 104) Source(103, 41) + SourceIndex(0) +2 >Emitted(104, 19) Source(103, 45) + SourceIndex(0) +3 >Emitted(104, 21) Source(103, 7) + SourceIndex(0) +4 >Emitted(104, 36) Source(103, 11) + SourceIndex(0) +5 >Emitted(104, 38) Source(103, 13) + SourceIndex(0) +6 >Emitted(104, 54) Source(103, 43) + SourceIndex(0) +7 >Emitted(104, 56) Source(103, 23) + SourceIndex(0) +8 >Emitted(104, 77) Source(103, 30) + SourceIndex(0) +9 >Emitted(104, 79) Source(103, 32) + SourceIndex(0) +10>Emitted(104, 104) Source(103, 41) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ @@ -3285,32 +3318,35 @@ sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern2.ts --- >>> _37 = _36[_35], name = _37.name, _38 = _37.skills, primary = _38.primary, secondary = _38.secondary; 1->^^^^ -2 > ^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > { -3 > name -4 > , -5 > skills: { primary, secondary } -6 > -7 > primary -8 > , -9 > secondary +2 > {name, skills: { primary, secondary } } +3 > +4 > name +5 > , +6 > skills: { primary, secondary } +7 > +8 > primary +9 > , +10> secondary 1->Emitted(109, 5) Source(106, 6) + SourceIndex(0) -2 >Emitted(109, 21) Source(106, 7) + SourceIndex(0) -3 >Emitted(109, 36) Source(106, 11) + SourceIndex(0) -4 >Emitted(109, 38) Source(106, 13) + SourceIndex(0) -5 >Emitted(109, 54) Source(106, 43) + SourceIndex(0) -6 >Emitted(109, 56) Source(106, 23) + SourceIndex(0) -7 >Emitted(109, 77) Source(106, 30) + SourceIndex(0) -8 >Emitted(109, 79) Source(106, 32) + SourceIndex(0) -9 >Emitted(109, 104) Source(106, 41) + SourceIndex(0) +2 >Emitted(109, 19) Source(106, 45) + SourceIndex(0) +3 >Emitted(109, 21) Source(106, 7) + SourceIndex(0) +4 >Emitted(109, 36) Source(106, 11) + SourceIndex(0) +5 >Emitted(109, 38) Source(106, 13) + SourceIndex(0) +6 >Emitted(109, 54) Source(106, 43) + SourceIndex(0) +7 >Emitted(109, 56) Source(106, 23) + SourceIndex(0) +8 >Emitted(109, 77) Source(106, 30) + SourceIndex(0) +9 >Emitted(109, 79) Source(106, 32) + SourceIndex(0) +10>Emitted(109, 104) Source(106, 41) + SourceIndex(0) --- >>> console.log(nameA); 1 >^^^^ From 9c413f7d5554e8e62510628a874caebd681ccbb9 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 10 Dec 2015 15:20:32 -0800 Subject: [PATCH 045/209] Accepting existing test cases baseline after verification --- tests/baselines/reference/ES5For-of26.js.map | 2 +- .../reference/ES5For-of26.sourcemap.txt | 57 +++-- tests/baselines/reference/ES5For-of8.js.map | 2 +- .../reference/ES5For-of8.sourcemap.txt | 9 +- .../reference/isolatedModulesSourceMap.js.map | 2 +- .../isolatedModulesSourceMap.sourcemap.txt | 35 +-- .../reference/sourceMapSample.js.map | 2 +- .../reference/sourceMapSample.sourcemap.txt | 188 ++++++++-------- .../sourceMapValidationClasses.js.map | 2 +- .../sourceMapValidationClasses.sourcemap.txt | 188 ++++++++-------- .../reference/sourceMapValidationFor.js.map | 2 +- .../sourceMapValidationFor.sourcemap.txt | 201 +++++++++--------- .../reference/sourceMapValidationForIn.js.map | 2 +- .../sourceMapValidationForIn.sourcemap.txt | 90 ++++---- .../sourceMapValidationStatements.js.map | 2 +- ...ourceMapValidationStatements.sourcemap.txt | 126 ++++++----- 16 files changed, 437 insertions(+), 473 deletions(-) diff --git a/tests/baselines/reference/ES5For-of26.js.map b/tests/baselines/reference/ES5For-of26.js.map index 5e128b4674c..9dcebf97134 100644 --- a/tests/baselines/reference/ES5For-of26.js.map +++ b/tests/baselines/reference/ES5For-of26.js.map @@ -1,2 +1,2 @@ //// [ES5For-of26.js.map] -{"version":3,"file":"ES5For-of26.js","sourceRoot":"","sources":["ES5For-of26.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAuB,UAAM,EAAN,MAAC,CAAC,EAAE,CAAC,CAAC,EAAN,cAAM,EAAN,IAAM,CAAC;IAA7B,IAAA,WAAkB,EAAb,UAAK,EAAL,0BAAK,EAAE,UAAK,EAAL,0BAAK;IAClB,CAAC,CAAC;IACF,CAAC,CAAC;CACL"} \ No newline at end of file +{"version":3,"file":"ES5For-of26.js","sourceRoot":"","sources":["ES5For-of26.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAuB,UAAM,EAAN,MAAC,CAAC,EAAE,CAAC,CAAC,EAAN,cAAM,EAAN,IAAM,CAAC;IAA7B,eAAkB,EAAb,UAAK,EAAL,0BAAK,EAAE,UAAK,EAAL,0BAAK;IAClB,CAAC,CAAC;IACF,CAAC,CAAC;CACL"} \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of26.sourcemap.txt b/tests/baselines/reference/ES5For-of26.sourcemap.txt index 112fb65c596..00a1cc55f37 100644 --- a/tests/baselines/reference/ES5For-of26.sourcemap.txt +++ b/tests/baselines/reference/ES5For-of26.sourcemap.txt @@ -61,38 +61,35 @@ sourceFile:ES5For-of26.ts --- >>> var _b = _a[_i], _c = _b[0], a = _c === void 0 ? 0 : _c, _d = _b[1], b = _d === void 0 ? 1 : _d; 1->^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^ -9 > ^^^^^^^^^^ -10> ^^ -11> ^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -2 > -3 > var [a = 0, b = 1] -4 > -5 > a = 0 -6 > -7 > a = 0 -8 > , -9 > b = 1 -10> -11> b = 1 +2 > var [a = 0, b = 1] +3 > +4 > a = 0 +5 > +6 > a = 0 +7 > , +8 > b = 1 +9 > +10> b = 1 1->Emitted(2, 5) Source(1, 6) + SourceIndex(0) -2 >Emitted(2, 9) Source(1, 6) + SourceIndex(0) -3 >Emitted(2, 20) Source(1, 24) + SourceIndex(0) -4 >Emitted(2, 22) Source(1, 11) + SourceIndex(0) -5 >Emitted(2, 32) Source(1, 16) + SourceIndex(0) -6 >Emitted(2, 34) Source(1, 11) + SourceIndex(0) -7 >Emitted(2, 60) Source(1, 16) + SourceIndex(0) -8 >Emitted(2, 62) Source(1, 18) + SourceIndex(0) -9 >Emitted(2, 72) Source(1, 23) + SourceIndex(0) -10>Emitted(2, 74) Source(1, 18) + SourceIndex(0) -11>Emitted(2, 100) Source(1, 23) + SourceIndex(0) +2 >Emitted(2, 20) Source(1, 24) + SourceIndex(0) +3 >Emitted(2, 22) Source(1, 11) + SourceIndex(0) +4 >Emitted(2, 32) Source(1, 16) + SourceIndex(0) +5 >Emitted(2, 34) Source(1, 11) + SourceIndex(0) +6 >Emitted(2, 60) Source(1, 16) + SourceIndex(0) +7 >Emitted(2, 62) Source(1, 18) + SourceIndex(0) +8 >Emitted(2, 72) Source(1, 23) + SourceIndex(0) +9 >Emitted(2, 74) Source(1, 18) + SourceIndex(0) +10>Emitted(2, 100) Source(1, 23) + SourceIndex(0) --- >>> a; 1 >^^^^ diff --git a/tests/baselines/reference/ES5For-of8.js.map b/tests/baselines/reference/ES5For-of8.js.map index 65efa797e0d..3a1497eadcd 100644 --- a/tests/baselines/reference/ES5For-of8.js.map +++ b/tests/baselines/reference/ES5For-of8.js.map @@ -1,2 +1,2 @@ //// [ES5For-of8.js.map] -{"version":3,"file":"ES5For-of8.js","sourceRoot":"","sources":["ES5For-of8.ts"],"names":[],"mappings":"AAAA;IACI,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AACpB,CAAC;AACD,GAAG,CAAC,CAAY,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAf,cAAe,EAAf,IAAe,CAAC;IAA3B,GAAG,EAAE,CAAC,CAAC,GAAP,MAAO;IACR,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;CACnB"} \ No newline at end of file +{"version":3,"file":"ES5For-of8.js","sourceRoot":"","sources":["ES5For-of8.ts"],"names":[],"mappings":"AAAA;IACI,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AACpB,CAAC;AACD,GAAG,CAAC,CAAY,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAf,cAAe,EAAf,IAAe,CAAC;IAA3B,GAAG,EAAE,CAAC,CAAC,SAAA;IACR,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;CACnB"} \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of8.sourcemap.txt b/tests/baselines/reference/ES5For-of8.sourcemap.txt index 8bc3f3d7aba..dbfce707ca6 100644 --- a/tests/baselines/reference/ES5For-of8.sourcemap.txt +++ b/tests/baselines/reference/ES5For-of8.sourcemap.txt @@ -117,23 +117,20 @@ sourceFile:ES5For-of8.ts 3 > ^^ 4 > ^ 5 > ^ -6 > ^^^ -7 > ^^^^^^ -8 > ^-> +6 > ^^^^^^^^^ +7 > ^-> 1 > 2 > foo 3 > () 4 > . 5 > x 6 > -7 > foo().x 1 >Emitted(5, 5) Source(4, 6) + SourceIndex(0) 2 >Emitted(5, 8) Source(4, 9) + SourceIndex(0) 3 >Emitted(5, 10) Source(4, 11) + SourceIndex(0) 4 >Emitted(5, 11) Source(4, 12) + SourceIndex(0) 5 >Emitted(5, 12) Source(4, 13) + SourceIndex(0) -6 >Emitted(5, 15) Source(4, 6) + SourceIndex(0) -7 >Emitted(5, 21) Source(4, 13) + SourceIndex(0) +6 >Emitted(5, 21) Source(4, 13) + SourceIndex(0) --- >>> var p = foo().x; 1->^^^^ diff --git a/tests/baselines/reference/isolatedModulesSourceMap.js.map b/tests/baselines/reference/isolatedModulesSourceMap.js.map index 3d86a0a7144..a6778476dda 100644 --- a/tests/baselines/reference/isolatedModulesSourceMap.js.map +++ b/tests/baselines/reference/isolatedModulesSourceMap.js.map @@ -1,2 +1,2 @@ //// [file1.js.map] -{"version":3,"file":"file1.js","sourceRoot":"","sources":["file1.ts"],"names":[],"mappings":"AACA,WAAW,CAAC,GAAG,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"file1.js","sourceRoot":"","sources":["file1.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/isolatedModulesSourceMap.sourcemap.txt b/tests/baselines/reference/isolatedModulesSourceMap.sourcemap.txt index 7edf071f5d1..57f604125d3 100644 --- a/tests/baselines/reference/isolatedModulesSourceMap.sourcemap.txt +++ b/tests/baselines/reference/isolatedModulesSourceMap.sourcemap.txt @@ -10,24 +10,27 @@ sourceFile:file1.ts ------------------------------------------------------------------- >>>export var x = 1; 1 > -2 >^^^^^^^^^^^ -3 > ^ -4 > ^^^ -5 > ^ -6 > ^ -7 > ^^^^^^^^^^^^^^^-> +2 >^^^^^^^ +3 > ^^^^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^ +8 > ^^^^^^^^^^^^^^^-> 1 > > -2 >export var -3 > x -4 > = -5 > 1 -6 > ; +2 >export +3 > var +4 > x +5 > = +6 > 1 +7 > ; 1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(1, 12) Source(2, 12) + SourceIndex(0) -3 >Emitted(1, 13) Source(2, 13) + SourceIndex(0) -4 >Emitted(1, 16) Source(2, 16) + SourceIndex(0) -5 >Emitted(1, 17) Source(2, 17) + SourceIndex(0) -6 >Emitted(1, 18) Source(2, 18) + SourceIndex(0) +2 >Emitted(1, 8) Source(2, 8) + SourceIndex(0) +3 >Emitted(1, 12) Source(2, 12) + SourceIndex(0) +4 >Emitted(1, 13) Source(2, 13) + SourceIndex(0) +5 >Emitted(1, 16) Source(2, 16) + SourceIndex(0) +6 >Emitted(1, 17) Source(2, 17) + SourceIndex(0) +7 >Emitted(1, 18) Source(2, 18) + SourceIndex(0) --- >>>//# sourceMappingURL=file1.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapSample.js.map b/tests/baselines/reference/sourceMapSample.js.map index 2429a04c88b..0617ba4c1ba 100644 --- a/tests/baselines/reference/sourceMapSample.js.map +++ b/tests/baselines/reference/sourceMapSample.js.map @@ -1,2 +1,2 @@ //// [sourceMapSample.js.map] -{"version":3,"file":"sourceMapSample.js","sourceRoot":"","sources":["sourceMapSample.ts"],"names":[],"mappings":"AAAA,IAAO,GAAG,CAkCT;AAlCD,WAAO,GAAG;IAAC,IAAA,GAAG,CAkCb;IAlCU,WAAA,GAAG,EAAC,CAAC;QACZ,YAAY,CAAC;QAEb;YACI,iBAAmB,QAAgB;gBAAhB,aAAQ,GAAR,QAAQ,CAAQ;YACnC,CAAC;YAED,uBAAK,GAAL;gBACI,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;YAC5C,CAAC;YACL,cAAC;QAAD,CAAC,AAPD,IAOC;QAGD,aAAa,QAAgB;YACzB,MAAM,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;QACjC,CAAC;QAED,IAAI,OAAO,GAAG,IAAI,OAAO,CAAC,eAAe,CAAC,CAAC;QAC3C,IAAI,GAAG,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;QAE1B,cAAc,QAAgB;YAAE,uBAA0B;iBAA1B,WAA0B,CAA1B,sBAA0B,CAA1B,IAA0B;gBAA1B,sCAA0B;;YACtD,IAAI,QAAQ,GAAc,EAAE,CAAC;YAC7B,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;YACpC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,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1B,WAA0B,CAA1B,sBAA0B,CAA1B,IAA0B;gBAA1B,sCAA0B;;YACtD,IAAI,QAAQ,GAAc,EAAE,CAAC;YAC7B,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;YACpC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC5C,QAAQ,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACjD,CAAC;YAED,MAAM,CAAC,QAAQ,CAAC;QACpB,CAAC;QAED,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QACpC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAChC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;QACjB,CAAC;IACL,CAAC,EAlCU,GAAG,GAAH,OAAG,KAAH,OAAG,QAkCb;AAAD,CAAC,EAlCM,GAAG,KAAH,GAAG,QAkCT"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapSample.sourcemap.txt b/tests/baselines/reference/sourceMapSample.sourcemap.txt index 8ea198b3129..97dd8db6cae 100644 --- a/tests/baselines/reference/sourceMapSample.sourcemap.txt +++ b/tests/baselines/reference/sourceMapSample.sourcemap.txt @@ -525,64 +525,61 @@ sourceFile:sourceMapSample.ts 2 > ^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^ -8 > ^^^ -9 > ^ -10> ^^ -11> ^ -12> ^^^ -13> ^^^^^^^^^^^^^ -14> ^ -15> ^^^^^^ -16> ^^ -17> ^ -18> ^^ -19> ^^ -20> ^ -21> ^^-> +5 > ^^^^ +6 > ^ +7 > ^^^ +8 > ^ +9 > ^^ +10> ^ +11> ^^^ +12> ^^^^^^^^^^^^^ +13> ^ +14> ^^^^^^ +15> ^^ +16> ^ +17> ^^ +18> ^^ +19> ^ +20> ^^-> 1-> > 2 > for 3 > 4 > ( -5 > var -6 > -7 > i -8 > = -9 > 0 -10> ; -11> i -12> < -13> restGreetings -14> . -15> length -16> ; -17> i -18> ++ -19> ) -20> { +5 > var +6 > i +7 > = +8 > 0 +9 > ; +10> i +11> < +12> restGreetings +13> . +14> length +15> ; +16> i +17> ++ +18> ) +19> { 1->Emitted(27, 13) Source(24, 9) + SourceIndex(0) 2 >Emitted(27, 16) Source(24, 12) + SourceIndex(0) 3 >Emitted(27, 17) Source(24, 13) + SourceIndex(0) 4 >Emitted(27, 18) Source(24, 14) + SourceIndex(0) -5 >Emitted(27, 21) Source(24, 17) + SourceIndex(0) -6 >Emitted(27, 22) Source(24, 18) + SourceIndex(0) -7 >Emitted(27, 23) Source(24, 19) + SourceIndex(0) -8 >Emitted(27, 26) Source(24, 22) + SourceIndex(0) -9 >Emitted(27, 27) Source(24, 23) + SourceIndex(0) -10>Emitted(27, 29) Source(24, 25) + SourceIndex(0) -11>Emitted(27, 30) Source(24, 26) + SourceIndex(0) -12>Emitted(27, 33) Source(24, 29) + SourceIndex(0) -13>Emitted(27, 46) Source(24, 42) + SourceIndex(0) -14>Emitted(27, 47) Source(24, 43) + SourceIndex(0) -15>Emitted(27, 53) Source(24, 49) + SourceIndex(0) -16>Emitted(27, 55) Source(24, 51) + SourceIndex(0) -17>Emitted(27, 56) Source(24, 52) + SourceIndex(0) -18>Emitted(27, 58) Source(24, 54) + SourceIndex(0) -19>Emitted(27, 60) Source(24, 56) + SourceIndex(0) -20>Emitted(27, 61) Source(24, 57) + SourceIndex(0) +5 >Emitted(27, 22) Source(24, 18) + SourceIndex(0) +6 >Emitted(27, 23) Source(24, 19) + SourceIndex(0) +7 >Emitted(27, 26) Source(24, 22) + SourceIndex(0) +8 >Emitted(27, 27) Source(24, 23) + SourceIndex(0) +9 >Emitted(27, 29) Source(24, 25) + SourceIndex(0) +10>Emitted(27, 30) Source(24, 26) + SourceIndex(0) +11>Emitted(27, 33) Source(24, 29) + SourceIndex(0) +12>Emitted(27, 46) Source(24, 42) + SourceIndex(0) +13>Emitted(27, 47) Source(24, 43) + SourceIndex(0) +14>Emitted(27, 53) Source(24, 49) + SourceIndex(0) +15>Emitted(27, 55) Source(24, 51) + SourceIndex(0) +16>Emitted(27, 56) Source(24, 52) + SourceIndex(0) +17>Emitted(27, 58) Source(24, 54) + SourceIndex(0) +18>Emitted(27, 60) Source(24, 56) + SourceIndex(0) +19>Emitted(27, 61) Source(24, 57) + SourceIndex(0) --- >>> greeters.push(new Greeter(restGreetings[i])); 1->^^^^^^^^^^^^^^^^ @@ -720,63 +717,60 @@ sourceFile:sourceMapSample.ts 2 > ^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^ -8 > ^^^ -9 > ^ -10> ^^ -11> ^ -12> ^^^ -13> ^ -14> ^ -15> ^^^^^^ -16> ^^ -17> ^ -18> ^^ -19> ^^ -20> ^ +5 > ^^^^ +6 > ^ +7 > ^^^ +8 > ^ +9 > ^^ +10> ^ +11> ^^^ +12> ^ +13> ^ +14> ^^^^^^ +15> ^^ +16> ^ +17> ^^ +18> ^^ +19> ^ 1-> > 2 > for 3 > 4 > ( -5 > var -6 > -7 > j -8 > = -9 > 0 -10> ; -11> j -12> < -13> b -14> . -15> length -16> ; -17> j -18> ++ -19> ) -20> { +5 > var +6 > j +7 > = +8 > 0 +9 > ; +10> j +11> < +12> b +13> . +14> length +15> ; +16> j +17> ++ +18> ) +19> { 1->Emitted(33, 9) Source(32, 5) + SourceIndex(0) 2 >Emitted(33, 12) Source(32, 8) + SourceIndex(0) 3 >Emitted(33, 13) Source(32, 9) + SourceIndex(0) 4 >Emitted(33, 14) Source(32, 10) + SourceIndex(0) -5 >Emitted(33, 17) Source(32, 13) + SourceIndex(0) -6 >Emitted(33, 18) Source(32, 14) + SourceIndex(0) -7 >Emitted(33, 19) Source(32, 15) + SourceIndex(0) -8 >Emitted(33, 22) Source(32, 18) + SourceIndex(0) -9 >Emitted(33, 23) Source(32, 19) + SourceIndex(0) -10>Emitted(33, 25) Source(32, 21) + SourceIndex(0) -11>Emitted(33, 26) Source(32, 22) + SourceIndex(0) -12>Emitted(33, 29) Source(32, 25) + SourceIndex(0) -13>Emitted(33, 30) Source(32, 26) + SourceIndex(0) -14>Emitted(33, 31) Source(32, 27) + SourceIndex(0) -15>Emitted(33, 37) Source(32, 33) + SourceIndex(0) -16>Emitted(33, 39) Source(32, 35) + SourceIndex(0) -17>Emitted(33, 40) Source(32, 36) + SourceIndex(0) -18>Emitted(33, 42) Source(32, 38) + SourceIndex(0) -19>Emitted(33, 44) Source(32, 40) + SourceIndex(0) -20>Emitted(33, 45) Source(32, 41) + SourceIndex(0) +5 >Emitted(33, 18) Source(32, 14) + SourceIndex(0) +6 >Emitted(33, 19) Source(32, 15) + SourceIndex(0) +7 >Emitted(33, 22) Source(32, 18) + SourceIndex(0) +8 >Emitted(33, 23) Source(32, 19) + SourceIndex(0) +9 >Emitted(33, 25) Source(32, 21) + SourceIndex(0) +10>Emitted(33, 26) Source(32, 22) + SourceIndex(0) +11>Emitted(33, 29) Source(32, 25) + SourceIndex(0) +12>Emitted(33, 30) Source(32, 26) + SourceIndex(0) +13>Emitted(33, 31) Source(32, 27) + SourceIndex(0) +14>Emitted(33, 37) Source(32, 33) + SourceIndex(0) +15>Emitted(33, 39) Source(32, 35) + SourceIndex(0) +16>Emitted(33, 40) Source(32, 36) + SourceIndex(0) +17>Emitted(33, 42) Source(32, 38) + SourceIndex(0) +18>Emitted(33, 44) Source(32, 40) + SourceIndex(0) +19>Emitted(33, 45) Source(32, 41) + SourceIndex(0) --- >>> b[j].greet(); 1 >^^^^^^^^^^^^ diff --git a/tests/baselines/reference/sourceMapValidationClasses.js.map b/tests/baselines/reference/sourceMapValidationClasses.js.map index 08ed68ebca7..bddc7694f10 100644 --- a/tests/baselines/reference/sourceMapValidationClasses.js.map +++ b/tests/baselines/reference/sourceMapValidationClasses.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationClasses.js.map] -{"version":3,"file":"sourceMapValidationClasses.js","sourceRoot":"","sources":["sourceMapValidationClasses.ts"],"names":[],"mappings":"AAAA,IAAO,GAAG,CAmCT;AAnCD,WAAO,GAAG;IAAC,IAAA,GAAG,CAmCb;IAnCU,WAAA,GAAG,EAAC,CAAC;QACZ,YAAY,CAAC;QAEb;YACI,iBAAmB,QAAgB;gBAAhB,aAAQ,GAAR,QAAQ,CAAQ;YACnC,CAAC;YAED,uBAAK,GAAL;gBACI,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;YAC5C,CAAC;YACL,cAAC;QAAD,CAAC,AAPD,IAOC;QAGD,aAAa,QAAgB;YACzB,MAAM,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;QACjC,CAAC;QAED,IAAI,OAAO,GAAG,IAAI,OAAO,CAAC,eAAe,CAAC,CAAC;QAC3C,IAAI,GAAG,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;QAE1B,cAAc,QAAgB;YAAE,kBAAiB,mBAAmB,MAAU;iBAA9C,WAA8C,CAA9C,sBAA8C,CAA9C,IAA8C;gBAA9C,cAAiB,mBAAmB,yBAAU;;YAC1E,IAAI,QAAQ,GAAc,EAAE,CAAC,CAAC,0BAA0B;YACxD,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;YACpC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC5C,QAAQ,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACjD,CAAC;YAED,MAAM,CAAC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C,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;YACpC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC5C,QAAQ,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACjD,CAAC;YAED,MAAM,CAAC,QAAQ,CAAC;QACpB,CAAC;QAED,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QACpC,qCAAqC;QACrC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAChC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;QACjB,CAAC;IACL,CAAC,EAnCU,GAAG,GAAH,OAAG,KAAH,OAAG,QAmCb;AAAD,CAAC,EAnCM,GAAG,KAAH,GAAG,QAmCT"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationClasses.sourcemap.txt b/tests/baselines/reference/sourceMapValidationClasses.sourcemap.txt index bbf9aa3eb2e..0a19c58c8eb 100644 --- a/tests/baselines/reference/sourceMapValidationClasses.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClasses.sourcemap.txt @@ -545,64 +545,61 @@ sourceFile:sourceMapValidationClasses.ts 2 > ^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^ -8 > ^^^ -9 > ^ -10> ^^ -11> ^ -12> ^^^ -13> ^^^^^^^^^^^^^ -14> ^ -15> ^^^^^^ -16> ^^ -17> ^ -18> ^^ -19> ^^ -20> ^ -21> ^^-> +5 > ^^^^ +6 > ^ +7 > ^^^ +8 > ^ +9 > ^^ +10> ^ +11> ^^^ +12> ^^^^^^^^^^^^^ +13> ^ +14> ^^^^^^ +15> ^^ +16> ^ +17> ^^ +18> ^^ +19> ^ +20> ^^-> 1-> > 2 > for 3 > 4 > ( -5 > var -6 > -7 > i -8 > = -9 > 0 -10> ; -11> i -12> < -13> restGreetings -14> . -15> length -16> ; -17> i -18> ++ -19> ) -20> { +5 > var +6 > i +7 > = +8 > 0 +9 > ; +10> i +11> < +12> restGreetings +13> . +14> length +15> ; +16> i +17> ++ +18> ) +19> { 1->Emitted(27, 13) Source(24, 9) + SourceIndex(0) 2 >Emitted(27, 16) Source(24, 12) + SourceIndex(0) 3 >Emitted(27, 17) Source(24, 13) + SourceIndex(0) 4 >Emitted(27, 18) Source(24, 14) + SourceIndex(0) -5 >Emitted(27, 21) Source(24, 17) + SourceIndex(0) -6 >Emitted(27, 22) Source(24, 18) + SourceIndex(0) -7 >Emitted(27, 23) Source(24, 19) + SourceIndex(0) -8 >Emitted(27, 26) Source(24, 22) + SourceIndex(0) -9 >Emitted(27, 27) Source(24, 23) + SourceIndex(0) -10>Emitted(27, 29) Source(24, 25) + SourceIndex(0) -11>Emitted(27, 30) Source(24, 26) + SourceIndex(0) -12>Emitted(27, 33) Source(24, 29) + SourceIndex(0) -13>Emitted(27, 46) Source(24, 42) + SourceIndex(0) -14>Emitted(27, 47) Source(24, 43) + SourceIndex(0) -15>Emitted(27, 53) Source(24, 49) + SourceIndex(0) -16>Emitted(27, 55) Source(24, 51) + SourceIndex(0) -17>Emitted(27, 56) Source(24, 52) + SourceIndex(0) -18>Emitted(27, 58) Source(24, 54) + SourceIndex(0) -19>Emitted(27, 60) Source(24, 56) + SourceIndex(0) -20>Emitted(27, 61) Source(24, 57) + SourceIndex(0) +5 >Emitted(27, 22) Source(24, 18) + SourceIndex(0) +6 >Emitted(27, 23) Source(24, 19) + SourceIndex(0) +7 >Emitted(27, 26) Source(24, 22) + SourceIndex(0) +8 >Emitted(27, 27) Source(24, 23) + SourceIndex(0) +9 >Emitted(27, 29) Source(24, 25) + SourceIndex(0) +10>Emitted(27, 30) Source(24, 26) + SourceIndex(0) +11>Emitted(27, 33) Source(24, 29) + SourceIndex(0) +12>Emitted(27, 46) Source(24, 42) + SourceIndex(0) +13>Emitted(27, 47) Source(24, 43) + SourceIndex(0) +14>Emitted(27, 53) Source(24, 49) + SourceIndex(0) +15>Emitted(27, 55) Source(24, 51) + SourceIndex(0) +16>Emitted(27, 56) Source(24, 52) + SourceIndex(0) +17>Emitted(27, 58) Source(24, 54) + SourceIndex(0) +18>Emitted(27, 60) Source(24, 56) + SourceIndex(0) +19>Emitted(27, 61) Source(24, 57) + SourceIndex(0) --- >>> greeters.push(new Greeter(restGreetings[i])); 1->^^^^^^^^^^^^^^^^ @@ -749,63 +746,60 @@ sourceFile:sourceMapValidationClasses.ts 2 > ^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^ -8 > ^^^ -9 > ^ -10> ^^ -11> ^ -12> ^^^ -13> ^ -14> ^ -15> ^^^^^^ -16> ^^ -17> ^ -18> ^^ -19> ^^ -20> ^ +5 > ^^^^ +6 > ^ +7 > ^^^ +8 > ^ +9 > ^^ +10> ^ +11> ^^^ +12> ^ +13> ^ +14> ^^^^^^ +15> ^^ +16> ^ +17> ^^ +18> ^^ +19> ^ 1 > > 2 > for 3 > 4 > ( -5 > var -6 > -7 > j -8 > = -9 > 0 -10> ; -11> j -12> < -13> b -14> . -15> length -16> ; -17> j -18> ++ -19> ) -20> { +5 > var +6 > j +7 > = +8 > 0 +9 > ; +10> j +11> < +12> b +13> . +14> length +15> ; +16> j +17> ++ +18> ) +19> { 1 >Emitted(34, 9) Source(33, 5) + SourceIndex(0) 2 >Emitted(34, 12) Source(33, 8) + SourceIndex(0) 3 >Emitted(34, 13) Source(33, 9) + SourceIndex(0) 4 >Emitted(34, 14) Source(33, 10) + SourceIndex(0) -5 >Emitted(34, 17) Source(33, 13) + SourceIndex(0) -6 >Emitted(34, 18) Source(33, 14) + SourceIndex(0) -7 >Emitted(34, 19) Source(33, 15) + SourceIndex(0) -8 >Emitted(34, 22) Source(33, 18) + SourceIndex(0) -9 >Emitted(34, 23) Source(33, 19) + SourceIndex(0) -10>Emitted(34, 25) Source(33, 21) + SourceIndex(0) -11>Emitted(34, 26) Source(33, 22) + SourceIndex(0) -12>Emitted(34, 29) Source(33, 25) + SourceIndex(0) -13>Emitted(34, 30) Source(33, 26) + SourceIndex(0) -14>Emitted(34, 31) Source(33, 27) + SourceIndex(0) -15>Emitted(34, 37) Source(33, 33) + SourceIndex(0) -16>Emitted(34, 39) Source(33, 35) + SourceIndex(0) -17>Emitted(34, 40) Source(33, 36) + SourceIndex(0) -18>Emitted(34, 42) Source(33, 38) + SourceIndex(0) -19>Emitted(34, 44) Source(33, 40) + SourceIndex(0) -20>Emitted(34, 45) Source(33, 41) + SourceIndex(0) +5 >Emitted(34, 18) Source(33, 14) + SourceIndex(0) +6 >Emitted(34, 19) Source(33, 15) + SourceIndex(0) +7 >Emitted(34, 22) Source(33, 18) + SourceIndex(0) +8 >Emitted(34, 23) Source(33, 19) + SourceIndex(0) +9 >Emitted(34, 25) Source(33, 21) + SourceIndex(0) +10>Emitted(34, 26) Source(33, 22) + SourceIndex(0) +11>Emitted(34, 29) Source(33, 25) + SourceIndex(0) +12>Emitted(34, 30) Source(33, 26) + SourceIndex(0) +13>Emitted(34, 31) Source(33, 27) + SourceIndex(0) +14>Emitted(34, 37) Source(33, 33) + SourceIndex(0) +15>Emitted(34, 39) Source(33, 35) + SourceIndex(0) +16>Emitted(34, 40) Source(33, 36) + SourceIndex(0) +17>Emitted(34, 42) Source(33, 38) + SourceIndex(0) +18>Emitted(34, 44) Source(33, 40) + SourceIndex(0) +19>Emitted(34, 45) Source(33, 41) + SourceIndex(0) --- >>> b[j].greet(); 1 >^^^^^^^^^^^^ diff --git a/tests/baselines/reference/sourceMapValidationFor.js.map b/tests/baselines/reference/sourceMapValidationFor.js.map index 15d038297c7..5d6491ae1e5 100644 --- a/tests/baselines/reference/sourceMapValidationFor.js.map +++ b/tests/baselines/reference/sourceMapValidationFor.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationFor.js.map] -{"version":3,"file":"sourceMapValidationFor.js","sourceRoot":"","sources":["sourceMapValidationFor.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;IAC1B,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;AAC5B,CAAC;AACD,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EACvB,CAAC;IACG,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;AAC5B,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,GAAI,CAAC;IACvB,CAAC,EAAE,CAAC;IACJ,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACT,QAAQ,CAAC;IACb,CAAC;AACL,CAAC;AACD,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,GAClB,CAAC;IACG,CAAC,EAAE,CAAC;AACR,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAChB,CAAC;AACD,CAAC;AACD,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;AACrB,CAAC;AACD,GAAG,CAAC,CAAC,IAAI,CAAC;IACN,CAAC,EAAE,CAAC;AACR,CAAC;AACD,GAAG,CAAC,CAAC,IACL,CAAC;IACG,CAAC,EAAE,CAAC;AACR,CAAC;AACD,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;AAC1C,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationFor.js","sourceRoot":"","sources":["sourceMapValidationFor.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;IAC1B,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;AAC5B,CAAC;AACD,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EACvB,CAAC;IACG,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;AAC5B,CAAC;AACD,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,GAAI,CAAC;IACvB,CAAC,EAAE,CAAC;IACJ,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACT,QAAQ,CAAC;IACb,CAAC;AACL,CAAC;AACD,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,GAClB,CAAC;IACG,CAAC,EAAE,CAAC;AACR,CAAC;AACD,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAChB,CAAC;AACD,CAAC;AACD,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;AACrB,CAAC;AACD,GAAG,CAAC,CAAC,IAAI,CAAC;IACN,CAAC,EAAE,CAAC;AACR,CAAC;AACD,GAAG,CAAC,CAAC,IACL,CAAC;IACG,CAAC,EAAE,CAAC;AACR,CAAC;AACD,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;AAC1C,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationFor.sourcemap.txt b/tests/baselines/reference/sourceMapValidationFor.sourcemap.txt index 609f9548a6b..583e60d75cf 100644 --- a/tests/baselines/reference/sourceMapValidationFor.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationFor.sourcemap.txt @@ -13,56 +13,53 @@ sourceFile:sourceMapValidationFor.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^ -8 > ^^^ -9 > ^ -10> ^^ -11> ^ -12> ^^^ -13> ^^ -14> ^^ -15> ^ -16> ^^ -17> ^^ -18> ^ +5 > ^^^^ +6 > ^ +7 > ^^^ +8 > ^ +9 > ^^ +10> ^ +11> ^^^ +12> ^^ +13> ^^ +14> ^ +15> ^^ +16> ^^ +17> ^ 1 > 2 >for 3 > 4 > ( -5 > var -6 > -7 > i -8 > = -9 > 0 -10> ; -11> i -12> < -13> 10 -14> ; -15> i -16> ++ -17> ) -18> { +5 > var +6 > i +7 > = +8 > 0 +9 > ; +10> i +11> < +12> 10 +13> ; +14> i +15> ++ +16> ) +17> { 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) 2 >Emitted(1, 4) Source(1, 4) + SourceIndex(0) 3 >Emitted(1, 5) Source(1, 5) + SourceIndex(0) 4 >Emitted(1, 6) Source(1, 6) + SourceIndex(0) -5 >Emitted(1, 9) Source(1, 9) + SourceIndex(0) -6 >Emitted(1, 10) Source(1, 10) + SourceIndex(0) -7 >Emitted(1, 11) Source(1, 11) + SourceIndex(0) -8 >Emitted(1, 14) Source(1, 14) + SourceIndex(0) -9 >Emitted(1, 15) Source(1, 15) + SourceIndex(0) -10>Emitted(1, 17) Source(1, 17) + SourceIndex(0) -11>Emitted(1, 18) Source(1, 18) + SourceIndex(0) -12>Emitted(1, 21) Source(1, 21) + SourceIndex(0) -13>Emitted(1, 23) Source(1, 23) + SourceIndex(0) -14>Emitted(1, 25) Source(1, 25) + SourceIndex(0) -15>Emitted(1, 26) Source(1, 26) + SourceIndex(0) -16>Emitted(1, 28) Source(1, 28) + SourceIndex(0) -17>Emitted(1, 30) Source(1, 30) + SourceIndex(0) -18>Emitted(1, 31) Source(1, 31) + SourceIndex(0) +5 >Emitted(1, 10) Source(1, 10) + SourceIndex(0) +6 >Emitted(1, 11) Source(1, 11) + SourceIndex(0) +7 >Emitted(1, 14) Source(1, 14) + SourceIndex(0) +8 >Emitted(1, 15) Source(1, 15) + SourceIndex(0) +9 >Emitted(1, 17) Source(1, 17) + SourceIndex(0) +10>Emitted(1, 18) Source(1, 18) + SourceIndex(0) +11>Emitted(1, 21) Source(1, 21) + SourceIndex(0) +12>Emitted(1, 23) Source(1, 23) + SourceIndex(0) +13>Emitted(1, 25) Source(1, 25) + SourceIndex(0) +14>Emitted(1, 26) Source(1, 26) + SourceIndex(0) +15>Emitted(1, 28) Source(1, 28) + SourceIndex(0) +16>Emitted(1, 30) Source(1, 30) + SourceIndex(0) +17>Emitted(1, 31) Source(1, 31) + SourceIndex(0) --- >>> WScript.Echo("i: " + i); 1 >^^^^ @@ -208,48 +205,45 @@ sourceFile:sourceMapValidationFor.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^ -8 > ^^^ -9 > ^ -10> ^^ -11> ^ -12> ^^^ -13> ^^ -14> ^^^ -15> ^ +5 > ^^^^ +6 > ^ +7 > ^^^ +8 > ^ +9 > ^^ +10> ^ +11> ^^^ +12> ^^ +13> ^^^ +14> ^ 1-> > 2 >for 3 > 4 > ( -5 > var -6 > -7 > j -8 > = -9 > 0 -10> ; -11> j -12> < -13> 10 -14> ; ) -15> { +5 > var +6 > j +7 > = +8 > 0 +9 > ; +10> j +11> < +12> 10 +13> ; ) +14> { 1->Emitted(7, 1) Source(8, 1) + SourceIndex(0) 2 >Emitted(7, 4) Source(8, 4) + SourceIndex(0) 3 >Emitted(7, 5) Source(8, 5) + SourceIndex(0) 4 >Emitted(7, 6) Source(8, 6) + SourceIndex(0) -5 >Emitted(7, 9) Source(8, 9) + SourceIndex(0) -6 >Emitted(7, 10) Source(8, 10) + SourceIndex(0) -7 >Emitted(7, 11) Source(8, 11) + SourceIndex(0) -8 >Emitted(7, 14) Source(8, 14) + SourceIndex(0) -9 >Emitted(7, 15) Source(8, 15) + SourceIndex(0) -10>Emitted(7, 17) Source(8, 17) + SourceIndex(0) -11>Emitted(7, 18) Source(8, 18) + SourceIndex(0) -12>Emitted(7, 21) Source(8, 21) + SourceIndex(0) -13>Emitted(7, 23) Source(8, 23) + SourceIndex(0) -14>Emitted(7, 26) Source(8, 27) + SourceIndex(0) -15>Emitted(7, 27) Source(8, 28) + SourceIndex(0) +5 >Emitted(7, 10) Source(8, 10) + SourceIndex(0) +6 >Emitted(7, 11) Source(8, 11) + SourceIndex(0) +7 >Emitted(7, 14) Source(8, 14) + SourceIndex(0) +8 >Emitted(7, 15) Source(8, 15) + SourceIndex(0) +9 >Emitted(7, 17) Source(8, 17) + SourceIndex(0) +10>Emitted(7, 18) Source(8, 18) + SourceIndex(0) +11>Emitted(7, 21) Source(8, 21) + SourceIndex(0) +12>Emitted(7, 23) Source(8, 23) + SourceIndex(0) +13>Emitted(7, 26) Source(8, 27) + SourceIndex(0) +14>Emitted(7, 27) Source(8, 28) + SourceIndex(0) --- >>> j++; 1 >^^^^ @@ -405,45 +399,42 @@ sourceFile:sourceMapValidationFor.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^ -8 > ^^^ -9 > ^ -10> ^^^ -11> ^ -12> ^^ -13> ^^ -14> ^ +5 > ^^^^ +6 > ^ +7 > ^^^ +8 > ^ +9 > ^^^ +10> ^ +11> ^^ +12> ^^ +13> ^ 1-> > 2 >for 3 > 4 > ( -5 > var -6 > -7 > k -8 > = -9 > 0 -10> ;; -11> k -12> ++ -13> ) -14> { +5 > var +6 > k +7 > = +8 > 0 +9 > ;; +10> k +11> ++ +12> ) +13> { 1->Emitted(16, 1) Source(18, 1) + SourceIndex(0) 2 >Emitted(16, 4) Source(18, 4) + SourceIndex(0) 3 >Emitted(16, 5) Source(18, 5) + SourceIndex(0) 4 >Emitted(16, 6) Source(18, 6) + SourceIndex(0) -5 >Emitted(16, 9) Source(18, 9) + SourceIndex(0) -6 >Emitted(16, 10) Source(18, 10) + SourceIndex(0) -7 >Emitted(16, 11) Source(18, 11) + SourceIndex(0) -8 >Emitted(16, 14) Source(18, 14) + SourceIndex(0) -9 >Emitted(16, 15) Source(18, 15) + SourceIndex(0) -10>Emitted(16, 18) Source(18, 18) + SourceIndex(0) -11>Emitted(16, 19) Source(18, 19) + SourceIndex(0) -12>Emitted(16, 21) Source(18, 21) + SourceIndex(0) -13>Emitted(16, 23) Source(18, 23) + SourceIndex(0) -14>Emitted(16, 24) Source(18, 24) + SourceIndex(0) +5 >Emitted(16, 10) Source(18, 10) + SourceIndex(0) +6 >Emitted(16, 11) Source(18, 11) + SourceIndex(0) +7 >Emitted(16, 14) Source(18, 14) + SourceIndex(0) +8 >Emitted(16, 15) Source(18, 15) + SourceIndex(0) +9 >Emitted(16, 18) Source(18, 18) + SourceIndex(0) +10>Emitted(16, 19) Source(18, 19) + SourceIndex(0) +11>Emitted(16, 21) Source(18, 21) + SourceIndex(0) +12>Emitted(16, 23) Source(18, 23) + SourceIndex(0) +13>Emitted(16, 24) Source(18, 24) + SourceIndex(0) --- >>>} 1 > diff --git a/tests/baselines/reference/sourceMapValidationForIn.js.map b/tests/baselines/reference/sourceMapValidationForIn.js.map index 2c12dd5cdc1..2281e36f605 100644 --- a/tests/baselines/reference/sourceMapValidationForIn.js.map +++ b/tests/baselines/reference/sourceMapValidationForIn.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationForIn.js.map] -{"version":3,"file":"sourceMapValidationForIn.js","sourceRoot":"","sources":["sourceMapValidationForIn.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC;IACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC;AACD,GAAG,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC;IACf,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,IAAI,MAAM,CAAC,CACtB,CAAC;IACG,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACrB,CAAC;AACD,GAAG,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,CACjB,CAAC;IACG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationForIn.js","sourceRoot":"","sources":["sourceMapValidationForIn.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC;IACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC;AACD,GAAG,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC;IACf,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC;AACD,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,MAAM,CAAC,CACtB,CAAC;IACG,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACrB,CAAC;AACD,GAAG,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,CACjB,CAAC;IACG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationForIn.sourcemap.txt b/tests/baselines/reference/sourceMapValidationForIn.sourcemap.txt index ae7e34c025c..e84bb2323c4 100644 --- a/tests/baselines/reference/sourceMapValidationForIn.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationForIn.sourcemap.txt @@ -13,38 +13,35 @@ sourceFile:sourceMapValidationForIn.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^ -8 > ^^^^ -9 > ^^^^^^ -10> ^ -11> ^ -12> ^ +5 > ^^^^ +6 > ^ +7 > ^^^^ +8 > ^^^^^^ +9 > ^ +10> ^ +11> ^ 1 > 2 >for 3 > 4 > ( -5 > var -6 > -7 > x -8 > in -9 > String -10> ) -11> -12> { +5 > var +6 > x +7 > in +8 > String +9 > ) +10> +11> { 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) 2 >Emitted(1, 4) Source(1, 4) + SourceIndex(0) 3 >Emitted(1, 5) Source(1, 5) + SourceIndex(0) 4 >Emitted(1, 6) Source(1, 6) + SourceIndex(0) -5 >Emitted(1, 9) Source(1, 9) + SourceIndex(0) -6 >Emitted(1, 10) Source(1, 10) + SourceIndex(0) -7 >Emitted(1, 11) Source(1, 11) + SourceIndex(0) -8 >Emitted(1, 15) Source(1, 15) + SourceIndex(0) -9 >Emitted(1, 21) Source(1, 21) + SourceIndex(0) -10>Emitted(1, 22) Source(1, 22) + SourceIndex(0) -11>Emitted(1, 23) Source(1, 23) + SourceIndex(0) -12>Emitted(1, 24) Source(1, 24) + SourceIndex(0) +5 >Emitted(1, 10) Source(1, 10) + SourceIndex(0) +6 >Emitted(1, 11) Source(1, 11) + SourceIndex(0) +7 >Emitted(1, 15) Source(1, 15) + SourceIndex(0) +8 >Emitted(1, 21) Source(1, 21) + SourceIndex(0) +9 >Emitted(1, 22) Source(1, 22) + SourceIndex(0) +10>Emitted(1, 23) Source(1, 23) + SourceIndex(0) +11>Emitted(1, 24) Source(1, 24) + SourceIndex(0) --- >>> WScript.Echo(x); 1 >^^^^ @@ -159,40 +156,37 @@ sourceFile:sourceMapValidationForIn.ts 2 >^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^^ -8 > ^^^^ -9 > ^^^^^^ -10> ^ -11> ^ -12> ^ +5 > ^^^^ +6 > ^^ +7 > ^^^^ +8 > ^^^^^^ +9 > ^ +10> ^ +11> ^ 1-> > 2 >for 3 > 4 > ( -5 > var -6 > -7 > x2 -8 > in -9 > String -10> ) -11> +5 > var +6 > x2 +7 > in +8 > String +9 > ) +10> > -12> { +11> { 1->Emitted(7, 1) Source(7, 1) + SourceIndex(0) 2 >Emitted(7, 4) Source(7, 4) + SourceIndex(0) 3 >Emitted(7, 5) Source(7, 5) + SourceIndex(0) 4 >Emitted(7, 6) Source(7, 6) + SourceIndex(0) -5 >Emitted(7, 9) Source(7, 9) + SourceIndex(0) -6 >Emitted(7, 10) Source(7, 10) + SourceIndex(0) -7 >Emitted(7, 12) Source(7, 12) + SourceIndex(0) -8 >Emitted(7, 16) Source(7, 16) + SourceIndex(0) -9 >Emitted(7, 22) Source(7, 22) + SourceIndex(0) -10>Emitted(7, 23) Source(7, 23) + SourceIndex(0) -11>Emitted(7, 24) Source(8, 1) + SourceIndex(0) -12>Emitted(7, 25) Source(8, 2) + SourceIndex(0) +5 >Emitted(7, 10) Source(7, 10) + SourceIndex(0) +6 >Emitted(7, 12) Source(7, 12) + SourceIndex(0) +7 >Emitted(7, 16) Source(7, 16) + SourceIndex(0) +8 >Emitted(7, 22) Source(7, 22) + SourceIndex(0) +9 >Emitted(7, 23) Source(7, 23) + SourceIndex(0) +10>Emitted(7, 24) Source(8, 1) + SourceIndex(0) +11>Emitted(7, 25) Source(8, 2) + SourceIndex(0) --- >>> WScript.Echo(x2); 1 >^^^^ diff --git a/tests/baselines/reference/sourceMapValidationStatements.js.map b/tests/baselines/reference/sourceMapValidationStatements.js.map index b4b5c48fc22..464ab4dc002 100644 --- a/tests/baselines/reference/sourceMapValidationStatements.js.map +++ b/tests/baselines/reference/sourceMapValidationStatements.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationStatements.js.map] -{"version":3,"file":"sourceMapValidationStatements.js","sourceRoot":"","sources":["sourceMapValidationStatements.ts"],"names":[],"mappings":"AAAA;IACI,IAAI,CAAC,CAAC;IACN,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;QAC1B,CAAC,IAAI,CAAC,CAAC;QACP,CAAC,IAAI,CAAC,CAAC;IACX,CAAC;IACD,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACT,CAAC,IAAI,CAAC,CAAC;IACX,CAAC;IAAC,IAAI,CAAC,CAAC;QACJ,CAAC,IAAI,EAAE,CAAC;QACR,CAAC,EAAE,CAAC;IACR,CAAC;IACD,IAAI,CAAC,GAAG;QACJ,CAAC;QACD,CAAC;QACD,CAAC;KACJ,CAAC;IACF,IAAI,GAAG,GAAG;QACN,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,OAAO;KACb,CAAC;IACF,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACd,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACb,IAAI,CAAC,GAAG,EAAE,CAAC;IACf,CAAC;IACD,IAAI,CAAC;QACD,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IACnB,CAAE;IAAA,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACT,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YACb,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;QACf,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;QAClB,CAAC;IACL,CAAC;IACD,IAAI,CAAC;QACD,MAAM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AC;AACd,CAAC,CAAC;AACF,CAAC,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationStatements.js","sourceRoot":"","sources":["sourceMapValidationStatements.ts"],"names":[],"mappings":"AAAA;IACI,IAAI,CAAC,CAAC;IACN,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;QAC1B,CAAC,IAAI,CAAC,CAAC;QACP,CAAC,IAAI,CAAC,CAAC;IACX,CAAC;IACD,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACT,CAAC,IAAI,CAAC,CAAC;IACX,CAAC;IAAC,IAAI,CAAC,CAAC;QACJ,CAAC,IAAI,EAAE,CAAC;QACR,CAAC,EAAE,CAAC;IACR,CAAC;IACD,IAAI,CAAC,GAAG;QACJ,CAAC;QACD,CAAC;QACD,CAAC;KACJ,CAAC;IACF,IAAI,GAAG,GAAG;QACN,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,OAAO;KACb,CAAC;IACF,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACd,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACb,IAAI,CAAC,GAAG,EAAE,CAAC;IACf,CAAC;IACD,IAAI,CAAC;QACD,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IACnB,CAAE;IAAA,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACT,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YACb,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;QACf,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;QAClB,CAAC;IACL,CAAC;IACD,IAAI,CAAC;QACD,MAAM,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C;AACd,CAAC,CAAC;AACF,CAAC,EAAE,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationStatements.sourcemap.txt b/tests/baselines/reference/sourceMapValidationStatements.sourcemap.txt index 41212b9b3db..ed7c9395d2f 100644 --- a/tests/baselines/reference/sourceMapValidationStatements.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationStatements.sourcemap.txt @@ -57,57 +57,54 @@ sourceFile:sourceMapValidationStatements.ts 2 > ^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^ -8 > ^^^ -9 > ^ -10> ^^ -11> ^ -12> ^^^ -13> ^^ -14> ^^ -15> ^ -16> ^^ -17> ^^ -18> ^ +5 > ^^^^ +6 > ^ +7 > ^^^ +8 > ^ +9 > ^^ +10> ^ +11> ^^^ +12> ^^ +13> ^^ +14> ^ +15> ^^ +16> ^^ +17> ^ 1-> > 2 > for 3 > 4 > ( -5 > var -6 > -7 > i -8 > = -9 > 0 -10> ; -11> i -12> < -13> 10 -14> ; -15> i -16> ++ -17> ) -18> { +5 > var +6 > i +7 > = +8 > 0 +9 > ; +10> i +11> < +12> 10 +13> ; +14> i +15> ++ +16> ) +17> { 1->Emitted(4, 5) Source(4, 5) + SourceIndex(0) 2 >Emitted(4, 8) Source(4, 8) + SourceIndex(0) 3 >Emitted(4, 9) Source(4, 9) + SourceIndex(0) 4 >Emitted(4, 10) Source(4, 10) + SourceIndex(0) -5 >Emitted(4, 13) Source(4, 13) + SourceIndex(0) -6 >Emitted(4, 14) Source(4, 14) + SourceIndex(0) -7 >Emitted(4, 15) Source(4, 15) + SourceIndex(0) -8 >Emitted(4, 18) Source(4, 18) + SourceIndex(0) -9 >Emitted(4, 19) Source(4, 19) + SourceIndex(0) -10>Emitted(4, 21) Source(4, 21) + SourceIndex(0) -11>Emitted(4, 22) Source(4, 22) + SourceIndex(0) -12>Emitted(4, 25) Source(4, 25) + SourceIndex(0) -13>Emitted(4, 27) Source(4, 27) + SourceIndex(0) -14>Emitted(4, 29) Source(4, 29) + SourceIndex(0) -15>Emitted(4, 30) Source(4, 30) + SourceIndex(0) -16>Emitted(4, 32) Source(4, 32) + SourceIndex(0) -17>Emitted(4, 34) Source(4, 34) + SourceIndex(0) -18>Emitted(4, 35) Source(4, 35) + SourceIndex(0) +5 >Emitted(4, 14) Source(4, 14) + SourceIndex(0) +6 >Emitted(4, 15) Source(4, 15) + SourceIndex(0) +7 >Emitted(4, 18) Source(4, 18) + SourceIndex(0) +8 >Emitted(4, 19) Source(4, 19) + SourceIndex(0) +9 >Emitted(4, 21) Source(4, 21) + SourceIndex(0) +10>Emitted(4, 22) Source(4, 22) + SourceIndex(0) +11>Emitted(4, 25) Source(4, 25) + SourceIndex(0) +12>Emitted(4, 27) Source(4, 27) + SourceIndex(0) +13>Emitted(4, 29) Source(4, 29) + SourceIndex(0) +14>Emitted(4, 30) Source(4, 30) + SourceIndex(0) +15>Emitted(4, 32) Source(4, 32) + SourceIndex(0) +16>Emitted(4, 34) Source(4, 34) + SourceIndex(0) +17>Emitted(4, 35) Source(4, 35) + SourceIndex(0) --- >>> x += i; 1 >^^^^^^^^ @@ -390,39 +387,36 @@ sourceFile:sourceMapValidationStatements.ts 2 > ^^^ 3 > ^ 4 > ^ -5 > ^^^ -6 > ^ -7 > ^ -8 > ^^^^ -9 > ^ -10> ^ -11> ^ -12> ^ +5 > ^^^^ +6 > ^ +7 > ^^^^ +8 > ^ +9 > ^ +10> ^ +11> ^ 1-> > 2 > for 3 > 4 > ( -5 > var -6 > -7 > j -8 > in -9 > a -10> ) -11> -12> { +5 > var +6 > j +7 > in +8 > a +9 > ) +10> +11> { 1->Emitted(24, 5) Source(23, 5) + SourceIndex(0) 2 >Emitted(24, 8) Source(23, 8) + SourceIndex(0) 3 >Emitted(24, 9) Source(23, 9) + SourceIndex(0) 4 >Emitted(24, 10) Source(23, 10) + SourceIndex(0) -5 >Emitted(24, 13) Source(23, 13) + SourceIndex(0) -6 >Emitted(24, 14) Source(23, 14) + SourceIndex(0) -7 >Emitted(24, 15) Source(23, 15) + SourceIndex(0) -8 >Emitted(24, 19) Source(23, 19) + SourceIndex(0) -9 >Emitted(24, 20) Source(23, 20) + SourceIndex(0) -10>Emitted(24, 21) Source(23, 21) + SourceIndex(0) -11>Emitted(24, 22) Source(23, 22) + SourceIndex(0) -12>Emitted(24, 23) Source(23, 23) + SourceIndex(0) +5 >Emitted(24, 14) Source(23, 14) + SourceIndex(0) +6 >Emitted(24, 15) Source(23, 15) + SourceIndex(0) +7 >Emitted(24, 19) Source(23, 19) + SourceIndex(0) +8 >Emitted(24, 20) Source(23, 20) + SourceIndex(0) +9 >Emitted(24, 21) Source(23, 21) + SourceIndex(0) +10>Emitted(24, 22) Source(23, 22) + SourceIndex(0) +11>Emitted(24, 23) Source(23, 23) + SourceIndex(0) --- >>> obj.z = a[j]; 1 >^^^^^^^^ From df3a74b6ca2d340aedf06e8595ce28fcf8320751 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 10 Dec 2015 15:35:47 -0800 Subject: [PATCH 046/209] Removed some unnecessary changes and added comments --- src/compiler/emitter.ts | 4 +++- src/compiler/sourcemap.ts | 15 ++++++--------- src/compiler/utilities.ts | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index a4bbe9b7528..8084ac3c4f1 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -2832,6 +2832,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi else { write("var "); } + // Note here we specifically dont emit end so that if we are going to emit binding pattern + // we can alter the source map correctly return true; } @@ -3732,7 +3734,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi const isVariableDeclarationOrBindingElement = name.parent && (name.parent.kind === SyntaxKind.VariableDeclaration || name.parent.kind === SyntaxKind.BindingElement); - // If this is first var declaration, we need to stary at var/let/const keyword instead + // If this is first var declaration, we need to start at var/let/const keyword instead // otherwise use nodeForSourceMap as the start position emitStart(isFirstVariableDeclaration(nodeForSourceMap) ? nodeForSourceMap.parent : nodeForSourceMap); withTemporaryNoSourceMap(() => { diff --git a/src/compiler/sourcemap.ts b/src/compiler/sourcemap.ts index ab079c642ea..0e90cee1fb1 100644 --- a/src/compiler/sourcemap.ts +++ b/src/compiler/sourcemap.ts @@ -232,20 +232,17 @@ namespace ts { sourceMapData.sourceMapDecodedMappings.push(lastEncodedSourceMapSpan); } - function getSourceLinePos(pos: number) { - const sourceLinePos = getLineAndCharacterOfPosition(currentSourceFile, pos); - // Convert the location to be one-based. - sourceLinePos.line++; - sourceLinePos.character++; - return sourceLinePos; - } - function emitPos(pos: number) { if (pos === -1) { return; } - const sourceLinePos = getSourceLinePos(pos); + const sourceLinePos = getLineAndCharacterOfPosition(currentSourceFile, pos); + + // Convert the location to be one-based. + sourceLinePos.line++; + sourceLinePos.character++; + const emittedLine = writer.getLine(); const emittedColumn = writer.getColumn(); diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 0f0f50719c1..95bf4ff7fa3 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1616,7 +1616,7 @@ namespace ts { return node.kind === SyntaxKind.QualifiedName; } - export function nodeIsSynthesized(node: Node | TextRange): boolean { + export function nodeIsSynthesized(node: Node): boolean { return node.pos === -1; } From 59982aba224075cec05a7b365dc11adcc3cc0155 Mon Sep 17 00:00:00 2001 From: Yui T Date: Thu, 10 Dec 2015 17:35:10 -0800 Subject: [PATCH 047/209] Update testcases --- tests/cases/fourslash/tsxCompletion11.ts | 7 ----- tests/cases/fourslash/tsxCompletion13.ts | 8 ----- tests/cases/fourslash/tsxCompletion14.ts | 8 ----- tests/cases/fourslash/tsxCompletion15.ts | 9 ------ tests/cases/fourslash/tsxCompletion16.ts | 7 ----- tests/cases/fourslash/tsxCompletion17.ts | 8 ----- tests/cases/fourslash/tsxCompletion18.ts | 30 ------------------- ...ion12.ts => tsxCompletionOnClosingTag1.ts} | 0 .../fourslash/tsxCompletionOnClosingTag2.ts | 14 +++++++++ .../fourslash/tsxCompletionOnClosingTag3.ts | 20 +++++++++++++ .../fourslash/tsxCompletionOnClosingTag4.ts | 14 +++++++++ 11 files changed, 48 insertions(+), 77 deletions(-) delete mode 100644 tests/cases/fourslash/tsxCompletion11.ts delete mode 100644 tests/cases/fourslash/tsxCompletion13.ts delete mode 100644 tests/cases/fourslash/tsxCompletion14.ts delete mode 100644 tests/cases/fourslash/tsxCompletion15.ts delete mode 100644 tests/cases/fourslash/tsxCompletion16.ts delete mode 100644 tests/cases/fourslash/tsxCompletion17.ts delete mode 100644 tests/cases/fourslash/tsxCompletion18.ts rename tests/cases/fourslash/{tsxCompletion12.ts => tsxCompletionOnClosingTag1.ts} (100%) create mode 100644 tests/cases/fourslash/tsxCompletionOnClosingTag2.ts create mode 100644 tests/cases/fourslash/tsxCompletionOnClosingTag3.ts create mode 100644 tests/cases/fourslash/tsxCompletionOnClosingTag4.ts diff --git a/tests/cases/fourslash/tsxCompletion11.ts b/tests/cases/fourslash/tsxCompletion11.ts deleted file mode 100644 index 70626a84791..00000000000 --- a/tests/cases/fourslash/tsxCompletion11.ts +++ /dev/null @@ -1,7 +0,0 @@ -/// - -//@Filename: file.tsx -//// var x1 = - -//@Filename: file.tsx -//// class MyElement {} -//// var x1 = - -//@Filename: file.tsx -//// class MyElement {} -//// var x1 = - -//@Filename: file.tsx -//// class MyElement {} -//// var x1 = - -//@Filename: file.tsx -//// var x1 = - -//@Filename: file.tsx -//// var x1 = - -//@Filename: file.tsx -//// var x =
-////

-//// -//// -//// - -goTo.marker("1"); -verify.memberListCount(1); -verify.completionListContains('h1'); - -goTo.marker("2"); -verify.memberListCount(1); -verify.completionListContains('div'); - -goTo.marker("3"); -verify.memberListCount(0); - -goTo.marker("4"); -verify.memberListCount(1); -verify.completionListContains('div'); - -goTo.marker("5"); -verify.memberListCount(0); - -goTo.marker("6"); -verify.memberListCount(1); -verify.completionListContains('div'); \ No newline at end of file diff --git a/tests/cases/fourslash/tsxCompletion12.ts b/tests/cases/fourslash/tsxCompletionOnClosingTag1.ts similarity index 100% rename from tests/cases/fourslash/tsxCompletion12.ts rename to tests/cases/fourslash/tsxCompletionOnClosingTag1.ts diff --git a/tests/cases/fourslash/tsxCompletionOnClosingTag2.ts b/tests/cases/fourslash/tsxCompletionOnClosingTag2.ts new file mode 100644 index 00000000000..54a0b61879f --- /dev/null +++ b/tests/cases/fourslash/tsxCompletionOnClosingTag2.ts @@ -0,0 +1,14 @@ +/// + +//@Filename: file.tsx +//// declare module JSX { +//// interface Element { } +//// interface IntrinsicElements { +//// div: { ONE: string; TWO: number; } +//// } +//// } +//// var x1 =
+ +//@Filename: file.tsx +//// declare module JSX { +//// interface Element { } +//// interface IntrinsicElements { +//// div: { ONE: string; TWO: number; } +//// } +//// } +//// var x1 =
+////

Hello world +//// + +goTo.marker("1"); +verify.memberListCount(1); +verify.completionListContains('div'); + +goTo.marker("2"); +verify.memberListCount(1); +verify.completionListContains('h1') diff --git a/tests/cases/fourslash/tsxCompletionOnClosingTag4.ts b/tests/cases/fourslash/tsxCompletionOnClosingTag4.ts new file mode 100644 index 00000000000..a36a933127d --- /dev/null +++ b/tests/cases/fourslash/tsxCompletionOnClosingTag4.ts @@ -0,0 +1,14 @@ +/// + +//@Filename: file.tsx +//// var x1 =
+////

Hello world +//// + +goTo.marker("1"); +verify.memberListCount(1); +verify.completionListContains('div'); + +goTo.marker("2"); +verify.memberListCount(1); +verify.completionListContains('h1') From 5fa7bec22688fd81c191abc430ecb7424abf144b Mon Sep 17 00:00:00 2001 From: Zhengbo Li Date: Thu, 10 Dec 2015 17:52:25 -0800 Subject: [PATCH 048/209] revert back to polling watching for approaching release --- src/compiler/sys.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 5482e549ebf..0cb0258de3f 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -352,7 +352,7 @@ namespace ts { // to increase the chunk size or decrease the interval // time dynamically to match the large reference set? const pollingWatchedFileSet = createPollingWatchedFileSet(); - const watchedFileSet = createWatchedFileSet(); + // const watchedFileSet = createWatchedFileSet(); function isNode4OrLater(): Boolean { return parseInt(process.version.charAt(1)) >= 4; @@ -456,7 +456,8 @@ namespace ts { // and is more efficient than `fs.watchFile` (ref: https://github.com/nodejs/node/pull/2649 // and https://github.com/Microsoft/TypeScript/issues/4643), therefore // if the current node.js version is newer than 4, use `fs.watch` instead. - let fileSet = isNode4OrLater() ? watchedFileSet : pollingWatchedFileSet; + // let fileSet = isNode4OrLater() ? watchedFileSet : pollingWatchedFileSet; + let fileSet = pollingWatchedFileSet; const watchedFile = fileSet.addFile(fileName, callback); return { close: () => fileSet.removeFile(watchedFile) From 36cc0e017b7199e87a7bb1d18580f8380fd42107 Mon Sep 17 00:00:00 2001 From: Zhengbo Li Date: Thu, 10 Dec 2015 17:59:07 -0800 Subject: [PATCH 049/209] fix linter errors --- src/compiler/sys.ts | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 0cb0258de3f..cbb7e320780 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -293,49 +293,49 @@ namespace ts { removeFile: removeFile }; } - + function createWatchedFileSet() { - let watchedDirectories: { [path: string]: FileWatcher } = {}; - let watchedFiles: { [fileName: string]: (fileName: string, removed?: boolean) => void; } = {}; - + const watchedDirectories: { [path: string]: FileWatcher } = {}; + const watchedFiles: { [fileName: string]: (fileName: string, removed?: boolean) => void; } = {}; + function addFile(fileName: string, callback: (fileName: string, removed?: boolean) => void): WatchedFile { const file: WatchedFile = { fileName, callback }; - let watchedPaths = Object.keys(watchedDirectories); + const watchedPaths = Object.keys(watchedDirectories); // Try to find parent paths that are already watched. If found, don't add directory watchers - let watchedParentPaths = watchedPaths.filter(path => fileName.indexOf(path) === 0); + const watchedParentPaths = watchedPaths.filter(path => fileName.indexOf(path) === 0); // If adding new watchers, try to find children paths that are already watched. If found, close them. if (watchedParentPaths.length === 0) { - let pathToWatch = ts.getDirectoryPath(fileName); - for (let watchedPath in watchedDirectories) { + const pathToWatch = ts.getDirectoryPath(fileName); + for (const watchedPath in watchedDirectories) { if (watchedPath.indexOf(pathToWatch) === 0) { watchedDirectories[watchedPath].close(); delete watchedDirectories[watchedPath]; } } watchedDirectories[pathToWatch] = _fs.watch( - pathToWatch, + pathToWatch, (eventName: string, relativeFileName: string) => fileEventHandler(eventName, ts.normalizePath(ts.combinePaths(pathToWatch, relativeFileName))) ); } watchedFiles[fileName] = callback; - return { fileName, callback } + return { fileName, callback }; } - + function removeFile(file: WatchedFile) { delete watchedFiles[file.fileName]; } - + function fileEventHandler(eventName: string, fileName: string) { if (watchedFiles[fileName]) { - let callback = watchedFiles[fileName]; + const callback = watchedFiles[fileName]; callback(fileName); } } - + return { addFile: addFile, removeFile: removeFile - } + }; } // REVIEW: for now this implementation uses polling. @@ -456,11 +456,9 @@ namespace ts { // and is more efficient than `fs.watchFile` (ref: https://github.com/nodejs/node/pull/2649 // and https://github.com/Microsoft/TypeScript/issues/4643), therefore // if the current node.js version is newer than 4, use `fs.watch` instead. - // let fileSet = isNode4OrLater() ? watchedFileSet : pollingWatchedFileSet; - let fileSet = pollingWatchedFileSet; - const watchedFile = fileSet.addFile(fileName, callback); + const watchedFile = pollingWatchedFileSet.addFile(fileName, callback); return { - close: () => fileSet.removeFile(watchedFile) + close: () => pollingWatchedFileSet.removeFile(watchedFile) }; }, watchDirectory: (path, callback, recursive) => { From 9e6c196c36ce70178e0f4adc8bc4046fb8978266 Mon Sep 17 00:00:00 2001 From: Yui T Date: Thu, 10 Dec 2015 18:09:02 -0800 Subject: [PATCH 050/209] Remove includeGlobalSymbol boolean --- src/compiler/checker.ts | 6 ++---- src/compiler/types.ts | 2 +- src/services/services.ts | 13 +++++-------- tests/cases/fourslash/tsxCompletionOnClosingTag3.ts | 2 +- tests/cases/fourslash/tsxCompletionOnClosingTag4.ts | 2 +- 5 files changed, 10 insertions(+), 15 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 6077e76ed04..16b598ec211 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -14576,7 +14576,7 @@ namespace ts { return false; } - function getSymbolsInScope(location: Node, meaning: SymbolFlags, includeGlobalSymbols: boolean): Symbol[] { + function getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[] { const symbols: SymbolTable = {}; let memberFlags: NodeFlags = 0; @@ -14639,9 +14639,7 @@ namespace ts { location = location.parent; } - if (includeGlobalSymbols) { - copySymbols(globals, meaning); - } + copySymbols(globals, meaning); } /** diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 9cec9dda241..0cb182e378b 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1717,7 +1717,7 @@ namespace ts { getBaseTypes(type: InterfaceType): ObjectType[]; getReturnTypeOfSignature(signature: Signature): Type; - getSymbolsInScope(location: Node, meaning: SymbolFlags, includeGlobalSymbols: boolean): Symbol[]; + getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; getSymbolAtLocation(node: Node): Symbol; getShorthandAssignmentValueSymbol(location: Node): Symbol; getTypeAtLocation(node: Node): Type; diff --git a/src/services/services.ts b/src/services/services.ts index 552af68ce40..6e8aa237f47 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -3114,11 +3114,8 @@ namespace ts { } else if (isRightOfOpenTag) { let tagSymbols = typeChecker.getJsxIntrinsicTagNames(); - // In this case, we are handling completion list inside JSX opening tag. For example: - // !!(s.flags & SymbolFlags.Value))); } else { @@ -3142,7 +3139,7 @@ namespace ts { // For JavaScript or TypeScript, if we're not after a dot, then just try to get the // global symbols in scope. These results should be valid for either language as // the set of symbols that can be referenced from this location. - if (!tryGetGlobalSymbols(/*includeGlobalSymbols*/ true)) { + if (!tryGetGlobalSymbols()) { return undefined; } } @@ -3202,7 +3199,7 @@ namespace ts { } } - function tryGetGlobalSymbols(includeGlobalSymbols: boolean): boolean { + function tryGetGlobalSymbols(): boolean { let objectLikeContainer: ObjectLiteralExpression | BindingPattern; let namedImportsOrExports: NamedImportsOrExports; let jsxContainer: JsxOpeningLikeElement; @@ -3273,7 +3270,7 @@ namespace ts { /// TODO filter meaning based on the current context let symbolMeanings = SymbolFlags.Type | SymbolFlags.Value | SymbolFlags.Namespace | SymbolFlags.Alias; - symbols = typeChecker.getSymbolsInScope(scopeNode, symbolMeanings, includeGlobalSymbols); + symbols = typeChecker.getSymbolsInScope(scopeNode, symbolMeanings); return true; } diff --git a/tests/cases/fourslash/tsxCompletionOnClosingTag3.ts b/tests/cases/fourslash/tsxCompletionOnClosingTag3.ts index 80d2b0c00ba..a39740df586 100644 --- a/tests/cases/fourslash/tsxCompletionOnClosingTag3.ts +++ b/tests/cases/fourslash/tsxCompletionOnClosingTag3.ts @@ -9,7 +9,7 @@ //// } //// var x1 =
////

Hello world -//// +//// goTo.marker("1"); verify.memberListCount(1); diff --git a/tests/cases/fourslash/tsxCompletionOnClosingTag4.ts b/tests/cases/fourslash/tsxCompletionOnClosingTag4.ts index a36a933127d..04176ba7fcb 100644 --- a/tests/cases/fourslash/tsxCompletionOnClosingTag4.ts +++ b/tests/cases/fourslash/tsxCompletionOnClosingTag4.ts @@ -3,7 +3,7 @@ //@Filename: file.tsx //// var x1 =
////

Hello world -//// +//// goTo.marker("1"); verify.memberListCount(1); From c7258db2b3096a9122d568d8a5db7082a07e6bad Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 11 Dec 2015 10:44:16 -0800 Subject: [PATCH 051/209] Test case for variable destructuring statement with object binding pattern and with default values --- ...ructuringVariableStatementDefaultValues.js | 35 ++ ...uringVariableStatementDefaultValues.js.map | 2 + ...riableStatementDefaultValues.sourcemap.txt | 344 +++++++++++++ ...ringVariableStatementDefaultValues.symbols | 69 +++ ...turingVariableStatementDefaultValues.types | 87 ++++ ...edObjectBindingPatternWithDefaultValues.js | 55 ++ ...jectBindingPatternWithDefaultValues.js.map | 2 + ...dingPatternWithDefaultValues.sourcemap.txt | 484 ++++++++++++++++++ ...ectBindingPatternWithDefaultValues.symbols | 127 +++++ ...bjectBindingPatternWithDefaultValues.types | 163 ++++++ ...ructuringVariableStatementDefaultValues.ts | 20 + ...edObjectBindingPatternWithDefaultValues.ts | 41 ++ 12 files changed, 1429 insertions(+) create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.types create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.types create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringVariableStatementDefaultValues.ts create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.js b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.js new file mode 100644 index 00000000000..64dea954ae7 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.js @@ -0,0 +1,35 @@ +//// [sourceMapValidationDestructuringVariableStatementDefaultValues.ts] +interface Robot { + name: string; + skill: string; +} +declare var console: { + log(msg: string): void; +} +var hello = "hello"; +var robotA: Robot = { name: "mower", skill: "mowing" }; +var robotB: Robot = { name: "trimmer", skill: "trimming" }; +var { name: nameA = "" } = robotA; +var { name: nameB = "", skill: skillB = "" } = robotB; +var { name: nameC = "", skill: skillC = "" } = { name: "Edger", skill: "cutting edges" }; +if (nameA == nameB) { + console.log(skillB); +} +else { + console.log(nameC); +} + +//// [sourceMapValidationDestructuringVariableStatementDefaultValues.js] +var hello = "hello"; +var robotA = { name: "mower", skill: "mowing" }; +var robotB = { name: "trimmer", skill: "trimming" }; +var _a = robotA.name, nameA = _a === void 0 ? "" : _a; +var _b = robotB.name, nameB = _b === void 0 ? "" : _b, _c = robotB.skill, skillB = _c === void 0 ? "" : _c; +var _d = { name: "Edger", skill: "cutting edges" }, _e = _d.name, nameC = _e === void 0 ? "" : _e, _f = _d.skill, skillC = _f === void 0 ? "" : _f; +if (nameA == nameB) { + console.log(skillB); +} +else { + console.log(nameC); +} +//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementDefaultValues.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.js.map new file mode 100644 index 00000000000..d85d9d2d669 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.js.map @@ -0,0 +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,oBAAwB,EAAxB,uCAAwB,CAAY;AACpC,oBAAwB,EAAxB,uCAAwB,EAAE,iBAAoC,EAApC,kDAAoC,CAAY;AAChF,IAAA,8CAAkH,EAA5G,YAAwB,EAAxB,uCAAwB,EAAE,aAAoC,EAApC,kDAAoC,CAA+C;AACnH,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AACD,IAAI,CAAC,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.sourcemap.txt new file mode 100644 index 00000000000..12e5526e77c --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.sourcemap.txt @@ -0,0 +1,344 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringVariableStatementDefaultValues.js +mapUrl: sourceMapValidationDestructuringVariableStatementDefaultValues.js.map +sourceRoot: +sources: sourceMapValidationDestructuringVariableStatementDefaultValues.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatementDefaultValues.js +sourceFile:sourceMapValidationDestructuringVariableStatementDefaultValues.ts +------------------------------------------------------------------- +>>>var hello = "hello"; +1 > +2 >^^^^ +3 > ^^^^^ +4 > ^^^ +5 > ^^^^^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 >interface Robot { + > name: string; + > skill: string; + >} + >declare var console: { + > log(msg: string): void; + >} + > +2 >var +3 > hello +4 > = +5 > "hello" +6 > ; +1 >Emitted(1, 1) Source(8, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(8, 5) + SourceIndex(0) +3 >Emitted(1, 10) Source(8, 10) + SourceIndex(0) +4 >Emitted(1, 13) Source(8, 13) + SourceIndex(0) +5 >Emitted(1, 20) Source(8, 20) + SourceIndex(0) +6 >Emitted(1, 21) Source(8, 21) + SourceIndex(0) +--- +>>>var robotA = { name: "mower", skill: "mowing" }; +1-> +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^^ +6 > ^^^^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^ +11> ^^ +12> ^^^^^^^^ +13> ^^ +14> ^ +15> ^^^^^-> +1-> + > +2 >var +3 > robotA +4 > : Robot = +5 > { +6 > name +7 > : +8 > "mower" +9 > , +10> skill +11> : +12> "mowing" +13> } +14> ; +1->Emitted(2, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(9, 5) + SourceIndex(0) +3 >Emitted(2, 11) Source(9, 11) + SourceIndex(0) +4 >Emitted(2, 14) Source(9, 21) + SourceIndex(0) +5 >Emitted(2, 16) Source(9, 23) + SourceIndex(0) +6 >Emitted(2, 20) Source(9, 27) + SourceIndex(0) +7 >Emitted(2, 22) Source(9, 29) + SourceIndex(0) +8 >Emitted(2, 29) Source(9, 36) + SourceIndex(0) +9 >Emitted(2, 31) Source(9, 38) + SourceIndex(0) +10>Emitted(2, 36) Source(9, 43) + SourceIndex(0) +11>Emitted(2, 38) Source(9, 45) + SourceIndex(0) +12>Emitted(2, 46) Source(9, 53) + SourceIndex(0) +13>Emitted(2, 48) Source(9, 55) + SourceIndex(0) +14>Emitted(2, 49) Source(9, 56) + SourceIndex(0) +--- +>>>var robotB = { name: "trimmer", skill: "trimming" }; +1-> +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^^ +6 > ^^^^ +7 > ^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^ +15> ^^^^^^^^^^^-> +1-> + > +2 >var +3 > robotB +4 > : Robot = +5 > { +6 > name +7 > : +8 > "trimmer" +9 > , +10> skill +11> : +12> "trimming" +13> } +14> ; +1->Emitted(3, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(10, 5) + SourceIndex(0) +3 >Emitted(3, 11) Source(10, 11) + SourceIndex(0) +4 >Emitted(3, 14) Source(10, 21) + SourceIndex(0) +5 >Emitted(3, 16) Source(10, 23) + SourceIndex(0) +6 >Emitted(3, 20) Source(10, 27) + SourceIndex(0) +7 >Emitted(3, 22) Source(10, 29) + SourceIndex(0) +8 >Emitted(3, 31) Source(10, 38) + SourceIndex(0) +9 >Emitted(3, 33) Source(10, 40) + SourceIndex(0) +10>Emitted(3, 38) Source(10, 45) + SourceIndex(0) +11>Emitted(3, 40) Source(10, 47) + SourceIndex(0) +12>Emitted(3, 50) Source(10, 57) + SourceIndex(0) +13>Emitted(3, 52) Source(10, 59) + SourceIndex(0) +14>Emitted(3, 53) Source(10, 60) + SourceIndex(0) +--- +>>>var _a = robotA.name, nameA = _a === void 0 ? "" : _a; +1-> +2 >^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + >var { +2 >name: nameA = "" +3 > +4 > name: nameA = "" +5 > } = robotA; +1->Emitted(4, 1) Source(11, 7) + SourceIndex(0) +2 >Emitted(4, 21) Source(11, 31) + SourceIndex(0) +3 >Emitted(4, 23) Source(11, 7) + SourceIndex(0) +4 >Emitted(4, 62) Source(11, 31) + SourceIndex(0) +5 >Emitted(4, 63) Source(11, 43) + SourceIndex(0) +--- +>>>var _b = robotB.name, nameB = _b === void 0 ? "" : _b, _c = robotB.skill, skillB = _c === void 0 ? "" : _c; +1-> +2 >^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + >var { +2 >name: nameB = "" +3 > +4 > name: nameB = "" +5 > , +6 > skill: skillB = "" +7 > +8 > skill: skillB = "" +9 > } = robotB; +1->Emitted(5, 1) Source(12, 7) + SourceIndex(0) +2 >Emitted(5, 21) Source(12, 31) + SourceIndex(0) +3 >Emitted(5, 23) Source(12, 7) + SourceIndex(0) +4 >Emitted(5, 62) Source(12, 31) + SourceIndex(0) +5 >Emitted(5, 64) Source(12, 33) + SourceIndex(0) +6 >Emitted(5, 81) Source(12, 69) + SourceIndex(0) +7 >Emitted(5, 83) Source(12, 33) + SourceIndex(0) +8 >Emitted(5, 133) Source(12, 69) + SourceIndex(0) +9 >Emitted(5, 134) Source(12, 81) + SourceIndex(0) +--- +>>>var _d = { name: "Edger", skill: "cutting edges" }, _e = _d.name, nameC = _e === void 0 ? "" : _e, _f = _d.skill, skillC = _f === void 0 ? "" : _f; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^ +1-> + > +2 > +3 > var { name: nameC = "", skill: skillC = "" } = { name: "Edger", skill: "cutting edges" } +4 > +5 > name: nameC = "" +6 > +7 > name: nameC = "" +8 > , +9 > skill: skillC = "" +10> +11> skill: skillC = "" +12> } = { name: "Edger", skill: "cutting edges" }; +1->Emitted(6, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(6, 5) Source(13, 1) + SourceIndex(0) +3 >Emitted(6, 51) Source(13, 115) + SourceIndex(0) +4 >Emitted(6, 53) Source(13, 7) + SourceIndex(0) +5 >Emitted(6, 65) Source(13, 31) + SourceIndex(0) +6 >Emitted(6, 67) Source(13, 7) + SourceIndex(0) +7 >Emitted(6, 106) Source(13, 31) + SourceIndex(0) +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) +12>Emitted(6, 174) Source(13, 116) + SourceIndex(0) +--- +>>>if (nameA == nameB) { +1 > +2 >^^ +3 > ^ +4 > ^ +5 > ^^^^^ +6 > ^^^^ +7 > ^^^^^ +8 > ^ +9 > ^ +10> ^ +11> ^^^^-> +1 > + > +2 >if +3 > +4 > ( +5 > nameA +6 > == +7 > nameB +8 > ) +9 > +10> { +1 >Emitted(7, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(7, 3) Source(14, 3) + SourceIndex(0) +3 >Emitted(7, 4) Source(14, 4) + SourceIndex(0) +4 >Emitted(7, 5) Source(14, 5) + SourceIndex(0) +5 >Emitted(7, 10) Source(14, 10) + SourceIndex(0) +6 >Emitted(7, 14) Source(14, 14) + SourceIndex(0) +7 >Emitted(7, 19) Source(14, 19) + SourceIndex(0) +8 >Emitted(7, 20) Source(14, 20) + SourceIndex(0) +9 >Emitted(7, 21) Source(14, 21) + SourceIndex(0) +10>Emitted(7, 22) Source(14, 22) + SourceIndex(0) +--- +>>> console.log(skillB); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1-> + > +2 > console +3 > . +4 > log +5 > ( +6 > skillB +7 > ) +8 > ; +1->Emitted(8, 5) Source(15, 5) + SourceIndex(0) +2 >Emitted(8, 12) Source(15, 12) + SourceIndex(0) +3 >Emitted(8, 13) Source(15, 13) + SourceIndex(0) +4 >Emitted(8, 16) Source(15, 16) + SourceIndex(0) +5 >Emitted(8, 17) Source(15, 17) + SourceIndex(0) +6 >Emitted(8, 23) Source(15, 23) + SourceIndex(0) +7 >Emitted(8, 24) Source(15, 24) + SourceIndex(0) +8 >Emitted(8, 25) Source(15, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^-> +1 > + > +2 >} +1 >Emitted(9, 1) Source(16, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(16, 2) + SourceIndex(0) +--- +>>>else { +1-> +2 >^^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >else +3 > +4 > { +1->Emitted(10, 1) Source(17, 1) + SourceIndex(0) +2 >Emitted(10, 5) Source(17, 5) + SourceIndex(0) +3 >Emitted(10, 6) Source(17, 6) + SourceIndex(0) +4 >Emitted(10, 7) Source(17, 7) + SourceIndex(0) +--- +>>> console.log(nameC); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1-> + > +2 > console +3 > . +4 > log +5 > ( +6 > nameC +7 > ) +8 > ; +1->Emitted(11, 5) Source(18, 5) + SourceIndex(0) +2 >Emitted(11, 12) Source(18, 12) + SourceIndex(0) +3 >Emitted(11, 13) Source(18, 13) + SourceIndex(0) +4 >Emitted(11, 16) Source(18, 16) + SourceIndex(0) +5 >Emitted(11, 17) Source(18, 17) + SourceIndex(0) +6 >Emitted(11, 22) Source(18, 22) + SourceIndex(0) +7 >Emitted(11, 23) Source(18, 23) + SourceIndex(0) +8 >Emitted(11, 24) Source(18, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(12, 1) Source(19, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(19, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementDefaultValues.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.symbols b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.symbols new file mode 100644 index 00000000000..1fc07bf4a17 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.symbols @@ -0,0 +1,69 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementDefaultValues.ts === +interface Robot { +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 0, 0)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 0, 17)) + + skill: string; +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 1, 17)) +} +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 4, 11)) + + log(msg: string): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 4, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 5, 8)) +} +var hello = "hello"; +>hello : Symbol(hello, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 7, 3)) + +var robotA: Robot = { name: "mower", skill: "mowing" }; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 8, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 0, 0)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 8, 21)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 8, 36)) + +var robotB: Robot = { name: "trimmer", skill: "trimming" }; +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 9, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 0, 0)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 9, 21)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 9, 38)) + +var { name: nameA = "" } = robotA; +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 0, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 10, 5)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 8, 3)) + +var { name: nameB = "", skill: skillB = "" } = robotB; +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 0, 17)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 11, 5)) +>skill : Symbol(Robot.skill, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 1, 17)) +>skillB : Symbol(skillB, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 11, 31)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 9, 3)) + +var { name: nameC = "", skill: skillC = "" } = { name: "Edger", skill: "cutting edges" }; +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 12, 74)) +>nameC : Symbol(nameC, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 12, 5)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 12, 89)) +>skillC : Symbol(skillC, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 12, 31)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 12, 74)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 12, 89)) + +if (nameA == nameB) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 10, 5)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 11, 5)) + + console.log(skillB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 4, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 4, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 4, 22)) +>skillB : Symbol(skillB, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 11, 31)) +} +else { + console.log(nameC); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 4, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 4, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 4, 22)) +>nameC : Symbol(nameC, Decl(sourceMapValidationDestructuringVariableStatementDefaultValues.ts, 12, 5)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.types new file mode 100644 index 00000000000..0ad3330e867 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.types @@ -0,0 +1,87 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementDefaultValues.ts === +interface Robot { +>Robot : Robot + + name: string; +>name : string + + skill: string; +>skill : string +} +declare var console: { +>console : { log(msg: string): void; } + + log(msg: string): void; +>log : (msg: string) => void +>msg : string +} +var hello = "hello"; +>hello : string +>"hello" : string + +var robotA: Robot = { name: "mower", skill: "mowing" }; +>robotA : Robot +>Robot : Robot +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string + +var robotB: Robot = { name: "trimmer", skill: "trimming" }; +>robotB : Robot +>Robot : Robot +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string + +var { name: nameA = "" } = robotA; +>name : any +>nameA : string +>"" : string +>robotA : Robot + +var { name: nameB = "", skill: skillB = "" } = robotB; +>name : any +>nameB : string +>"" : string +>skill : any +>skillB : string +>"" : string +>robotB : Robot + +var { name: nameC = "", skill: skillC = "" } = { name: "Edger", skill: "cutting edges" }; +>name : any +>nameC : string +>"" : string +>skill : any +>skillC : string +>"" : string +>{ name: "Edger", skill: "cutting edges" } : { name?: string; skill?: string; } +>name : string +>"Edger" : string +>skill : string +>"cutting edges" : string + +if (nameA == nameB) { +>nameA == nameB : boolean +>nameA : string +>nameB : string + + console.log(skillB); +>console.log(skillB) : void +>console.log : (msg: string) => void +>console : { log(msg: string): void; } +>log : (msg: string) => void +>skillB : string +} +else { + console.log(nameC); +>console.log(nameC) : void +>console.log : (msg: string) => void +>console : { log(msg: string): void; } +>log : (msg: string) => void +>nameC : string +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.js b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.js new file mode 100644 index 00000000000..694f1d9d30c --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.js @@ -0,0 +1,55 @@ +//// [sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts] +declare var console: { + log(msg: string): void; +} +interface Robot { + name: string; + skills: { + primary?: string; + secondary?: string; + }; +} +var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +var robotB: Robot = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }; + +var { + skills: { + primary: primaryA = "noSkill", + secondary: secondaryA = "noSkill" + } = { primary: "noSkill", secondary: "noSkill" } +} = robotA; +var { + name: nameB = "noNameSpecified", + skills: { + primary: primaryB = "noSkill", + secondary: secondaryB = "noSkill" + } = { primary: "noSkill", secondary: "noSkill" } +} = robotB; +var { + name: nameC = "noNameSpecified", + skills: { + primary: primaryB = "noSkill", + secondary: secondaryB = "noSkill" + } = { primary: "noSkill", secondary: "noSkill" } +} = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; + +if (nameB == nameB) { + console.log(nameC); +} +else { + console.log(nameC); +} + +//// [sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.js] +var robotA = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +var robotB = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }; +var _a = robotA.skills, _b = _a === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _a, _c = _b.primary, primaryA = _c === void 0 ? "noSkill" : _c, _d = _b.secondary, secondaryA = _d === void 0 ? "noSkill" : _d; +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; +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; +if (nameB == nameB) { + console.log(nameC); +} +else { + console.log(nameC); +} +//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.js.map new file mode 100644 index 00000000000..9ad442f4698 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.js.map @@ -0,0 +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,sBAGgD,EAHhD,sEAGgD,EAF5C,eAA6B,EAA7B,yCAA6B,EAC7B,iBAAiC,EAAjC,2CAAiC,CAE9B;AAEP,oBAA+B,EAA/B,8CAA+B,EAC/B,kBAGgD,EAHhD,sEAGgD,EAF5C,eAA6B,EAA7B,yCAA6B,EAC7B,iBAAiC,EAAjC,2CAAiC,CAE9B;AACX,IAAA,mFAMyF,EALrF,YAA+B,EAA/B,8CAA+B,EAC/B,cAGgD,EAHhD,sEAGgD,EAF5C,eAA6B,EAA7B,yCAA6B,EAC7B,iBAAiC,EAAjC,2CAAiC,CAEiD;AAE1F,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,IAAI,CAAC,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.sourcemap.txt new file mode 100644 index 00000000000..5e007440890 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.sourcemap.txt @@ -0,0 +1,484 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.js +mapUrl: sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.js.map +sourceRoot: +sources: sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.js +sourceFile:sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts +------------------------------------------------------------------- +>>>var robotA = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^^ +6 > ^^^^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^^ +12> ^^ +13> ^^^^^^^ +14> ^^ +15> ^^^^^^^^ +16> ^^ +17> ^^^^^^^^^ +18> ^^ +19> ^^^^^^ +20> ^^ +21> ^^ +22> ^ +23> ^^^^^^^-> +1 >declare var console: { + > log(msg: string): void; + >} + >interface Robot { + > name: string; + > skills: { + > primary?: string; + > secondary?: string; + > }; + >} + > +2 >var +3 > robotA +4 > : Robot = +5 > { +6 > name +7 > : +8 > "mower" +9 > , +10> skills +11> : +12> { +13> primary +14> : +15> "mowing" +16> , +17> secondary +18> : +19> "none" +20> } +21> } +22> ; +1 >Emitted(1, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(11, 5) + SourceIndex(0) +3 >Emitted(1, 11) Source(11, 11) + SourceIndex(0) +4 >Emitted(1, 14) Source(11, 21) + SourceIndex(0) +5 >Emitted(1, 16) Source(11, 23) + SourceIndex(0) +6 >Emitted(1, 20) Source(11, 27) + SourceIndex(0) +7 >Emitted(1, 22) Source(11, 29) + SourceIndex(0) +8 >Emitted(1, 29) Source(11, 36) + SourceIndex(0) +9 >Emitted(1, 31) Source(11, 38) + SourceIndex(0) +10>Emitted(1, 37) Source(11, 44) + SourceIndex(0) +11>Emitted(1, 39) Source(11, 46) + SourceIndex(0) +12>Emitted(1, 41) Source(11, 48) + SourceIndex(0) +13>Emitted(1, 48) Source(11, 55) + SourceIndex(0) +14>Emitted(1, 50) Source(11, 57) + SourceIndex(0) +15>Emitted(1, 58) Source(11, 65) + SourceIndex(0) +16>Emitted(1, 60) Source(11, 67) + SourceIndex(0) +17>Emitted(1, 69) Source(11, 76) + SourceIndex(0) +18>Emitted(1, 71) Source(11, 78) + SourceIndex(0) +19>Emitted(1, 77) Source(11, 84) + SourceIndex(0) +20>Emitted(1, 79) Source(11, 86) + SourceIndex(0) +21>Emitted(1, 81) Source(11, 88) + SourceIndex(0) +22>Emitted(1, 82) Source(11, 89) + SourceIndex(0) +--- +>>>var robotB = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }; +1-> +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^^ +6 > ^^^^ +7 > ^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^^ +12> ^^ +13> ^^^^^^^ +14> ^^ +15> ^^^^^^^^^^ +16> ^^ +17> ^^^^^^^^^ +18> ^^ +19> ^^^^^^^^ +20> ^^ +21> ^^ +22> ^ +23> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >var +3 > robotB +4 > : Robot = +5 > { +6 > name +7 > : +8 > "trimmer" +9 > , +10> skills +11> : +12> { +13> primary +14> : +15> "trimming" +16> , +17> secondary +18> : +19> "edging" +20> } +21> } +22> ; +1->Emitted(2, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(12, 5) + SourceIndex(0) +3 >Emitted(2, 11) Source(12, 11) + SourceIndex(0) +4 >Emitted(2, 14) Source(12, 21) + SourceIndex(0) +5 >Emitted(2, 16) Source(12, 23) + SourceIndex(0) +6 >Emitted(2, 20) Source(12, 27) + SourceIndex(0) +7 >Emitted(2, 22) Source(12, 29) + SourceIndex(0) +8 >Emitted(2, 31) Source(12, 38) + SourceIndex(0) +9 >Emitted(2, 33) Source(12, 40) + SourceIndex(0) +10>Emitted(2, 39) Source(12, 46) + SourceIndex(0) +11>Emitted(2, 41) Source(12, 48) + SourceIndex(0) +12>Emitted(2, 43) Source(12, 50) + SourceIndex(0) +13>Emitted(2, 50) Source(12, 57) + SourceIndex(0) +14>Emitted(2, 52) Source(12, 59) + SourceIndex(0) +15>Emitted(2, 62) Source(12, 69) + SourceIndex(0) +16>Emitted(2, 64) Source(12, 71) + SourceIndex(0) +17>Emitted(2, 73) Source(12, 80) + SourceIndex(0) +18>Emitted(2, 75) Source(12, 82) + SourceIndex(0) +19>Emitted(2, 83) Source(12, 90) + SourceIndex(0) +20>Emitted(2, 85) Source(12, 92) + SourceIndex(0) +21>Emitted(2, 87) Source(12, 94) + SourceIndex(0) +22>Emitted(2, 88) Source(12, 95) + SourceIndex(0) +--- +>>>var _a = robotA.skills, _b = _a === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _a, _c = _b.primary, primaryA = _c === void 0 ? "noSkill" : _c, _d = _b.secondary, secondaryA = _d === void 0 ? "noSkill" : _d; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + >var { + > +2 >skills: { + > primary: primaryA = "noSkill", + > secondary: secondaryA = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } +3 > +4 > skills: { + > primary: primaryA = "noSkill", + > secondary: secondaryA = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } +5 > +6 > primary: primaryA = "noSkill" +7 > +8 > primary: primaryA = "noSkill" +9 > , + > +10> secondary: secondaryA = "noSkill" +11> +12> secondary: secondaryA = "noSkill" +13> + > } = { primary: "noSkill", secondary: "noSkill" } + > } = robotA; +1->Emitted(3, 1) Source(15, 5) + SourceIndex(0) +2 >Emitted(3, 23) Source(18, 53) + SourceIndex(0) +3 >Emitted(3, 25) Source(15, 5) + SourceIndex(0) +4 >Emitted(3, 95) Source(18, 53) + SourceIndex(0) +5 >Emitted(3, 97) Source(16, 9) + SourceIndex(0) +6 >Emitted(3, 112) Source(16, 38) + SourceIndex(0) +7 >Emitted(3, 114) Source(16, 9) + SourceIndex(0) +8 >Emitted(3, 155) Source(16, 38) + SourceIndex(0) +9 >Emitted(3, 157) Source(17, 9) + SourceIndex(0) +10>Emitted(3, 174) Source(17, 42) + SourceIndex(0) +11>Emitted(3, 176) Source(17, 9) + SourceIndex(0) +12>Emitted(3, 219) Source(17, 42) + SourceIndex(0) +13>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; +1-> +2 >^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +17> ^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + >var { + > +2 >name: nameB = "noNameSpecified" +3 > +4 > name: nameB = "noNameSpecified" +5 > , + > +6 > skills: { + > primary: primaryB = "noSkill", + > secondary: secondaryB = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } +7 > +8 > skills: { + > primary: primaryB = "noSkill", + > secondary: secondaryB = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } +9 > +10> primary: primaryB = "noSkill" +11> +12> primary: primaryB = "noSkill" +13> , + > +14> secondary: secondaryB = "noSkill" +15> +16> secondary: secondaryB = "noSkill" +17> + > } = { primary: "noSkill", secondary: "noSkill" } + > } = robotB; +1->Emitted(4, 1) Source(21, 5) + SourceIndex(0) +2 >Emitted(4, 21) Source(21, 36) + SourceIndex(0) +3 >Emitted(4, 23) Source(21, 5) + SourceIndex(0) +4 >Emitted(4, 69) Source(21, 36) + SourceIndex(0) +5 >Emitted(4, 71) Source(22, 5) + SourceIndex(0) +6 >Emitted(4, 89) Source(25, 53) + SourceIndex(0) +7 >Emitted(4, 91) Source(22, 5) + SourceIndex(0) +8 >Emitted(4, 161) Source(25, 53) + SourceIndex(0) +9 >Emitted(4, 163) Source(23, 9) + SourceIndex(0) +10>Emitted(4, 178) Source(23, 38) + SourceIndex(0) +11>Emitted(4, 180) Source(23, 9) + SourceIndex(0) +12>Emitted(4, 221) Source(23, 38) + SourceIndex(0) +13>Emitted(4, 223) Source(24, 9) + SourceIndex(0) +14>Emitted(4, 240) Source(24, 42) + SourceIndex(0) +15>Emitted(4, 242) Source(24, 9) + SourceIndex(0) +16>Emitted(4, 285) Source(24, 42) + SourceIndex(0) +17>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; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +16> ^^ +17> ^^^^^^^^^^^^^^^^^ +18> ^^ +19> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +20> ^ +1-> + > +2 > +3 > var { + > name: nameC = "noNameSpecified", + > skills: { + > primary: primaryB = "noSkill", + > secondary: secondaryB = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } + > } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } +4 > +5 > name: nameC = "noNameSpecified" +6 > +7 > name: nameC = "noNameSpecified" +8 > , + > +9 > skills: { + > primary: primaryB = "noSkill", + > secondary: secondaryB = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } +10> +11> skills: { + > primary: primaryB = "noSkill", + > secondary: secondaryB = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } +12> +13> primary: primaryB = "noSkill" +14> +15> primary: primaryB = "noSkill" +16> , + > +17> secondary: secondaryB = "noSkill" +18> +19> secondary: secondaryB = "noSkill" +20> + > } = { primary: "noSkill", secondary: "noSkill" } + > } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; +1->Emitted(5, 1) Source(27, 1) + SourceIndex(0) +2 >Emitted(5, 5) Source(27, 1) + SourceIndex(0) +3 >Emitted(5, 88) Source(33, 90) + SourceIndex(0) +4 >Emitted(5, 90) Source(28, 5) + SourceIndex(0) +5 >Emitted(5, 102) Source(28, 36) + SourceIndex(0) +6 >Emitted(5, 104) Source(28, 5) + SourceIndex(0) +7 >Emitted(5, 150) Source(28, 36) + SourceIndex(0) +8 >Emitted(5, 152) Source(29, 5) + SourceIndex(0) +9 >Emitted(5, 166) Source(32, 53) + SourceIndex(0) +10>Emitted(5, 168) Source(29, 5) + SourceIndex(0) +11>Emitted(5, 238) Source(32, 53) + SourceIndex(0) +12>Emitted(5, 240) Source(30, 9) + SourceIndex(0) +13>Emitted(5, 255) Source(30, 38) + SourceIndex(0) +14>Emitted(5, 257) Source(30, 9) + SourceIndex(0) +15>Emitted(5, 298) Source(30, 38) + SourceIndex(0) +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) +20>Emitted(5, 363) Source(33, 91) + SourceIndex(0) +--- +>>>if (nameB == nameB) { +1 > +2 >^^ +3 > ^ +4 > ^ +5 > ^^^^^ +6 > ^^^^ +7 > ^^^^^ +8 > ^ +9 > ^ +10> ^ +11> ^^^-> +1 > + > + > +2 >if +3 > +4 > ( +5 > nameB +6 > == +7 > nameB +8 > ) +9 > +10> { +1 >Emitted(6, 1) Source(35, 1) + SourceIndex(0) +2 >Emitted(6, 3) Source(35, 3) + SourceIndex(0) +3 >Emitted(6, 4) Source(35, 4) + SourceIndex(0) +4 >Emitted(6, 5) Source(35, 5) + SourceIndex(0) +5 >Emitted(6, 10) Source(35, 10) + SourceIndex(0) +6 >Emitted(6, 14) Source(35, 14) + SourceIndex(0) +7 >Emitted(6, 19) Source(35, 19) + SourceIndex(0) +8 >Emitted(6, 20) Source(35, 20) + SourceIndex(0) +9 >Emitted(6, 21) Source(35, 21) + SourceIndex(0) +10>Emitted(6, 22) Source(35, 22) + SourceIndex(0) +--- +>>> console.log(nameC); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1-> + > +2 > console +3 > . +4 > log +5 > ( +6 > nameC +7 > ) +8 > ; +1->Emitted(7, 5) Source(36, 5) + SourceIndex(0) +2 >Emitted(7, 12) Source(36, 12) + SourceIndex(0) +3 >Emitted(7, 13) Source(36, 13) + SourceIndex(0) +4 >Emitted(7, 16) Source(36, 16) + SourceIndex(0) +5 >Emitted(7, 17) Source(36, 17) + SourceIndex(0) +6 >Emitted(7, 22) Source(36, 22) + SourceIndex(0) +7 >Emitted(7, 23) Source(36, 23) + SourceIndex(0) +8 >Emitted(7, 24) Source(36, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^-> +1 > + > +2 >} +1 >Emitted(8, 1) Source(37, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(37, 2) + SourceIndex(0) +--- +>>>else { +1-> +2 >^^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >else +3 > +4 > { +1->Emitted(9, 1) Source(38, 1) + SourceIndex(0) +2 >Emitted(9, 5) Source(38, 5) + SourceIndex(0) +3 >Emitted(9, 6) Source(38, 6) + SourceIndex(0) +4 >Emitted(9, 7) Source(38, 7) + SourceIndex(0) +--- +>>> console.log(nameC); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1-> + > +2 > console +3 > . +4 > log +5 > ( +6 > nameC +7 > ) +8 > ; +1->Emitted(10, 5) Source(39, 5) + SourceIndex(0) +2 >Emitted(10, 12) Source(39, 12) + SourceIndex(0) +3 >Emitted(10, 13) Source(39, 13) + SourceIndex(0) +4 >Emitted(10, 16) Source(39, 16) + SourceIndex(0) +5 >Emitted(10, 17) Source(39, 17) + SourceIndex(0) +6 >Emitted(10, 22) Source(39, 22) + SourceIndex(0) +7 >Emitted(10, 23) Source(39, 23) + SourceIndex(0) +8 >Emitted(10, 24) Source(39, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(11, 1) Source(40, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(40, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.symbols b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.symbols new file mode 100644 index 00000000000..a9a3a91f824 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.symbols @@ -0,0 +1,127 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 0, 11)) + + log(msg: string): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 1, 8)) +} +interface Robot { +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 2, 1)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 3, 17)) + + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 4, 17)) + + primary?: string; +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 5, 13)) + + secondary?: string; +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 6, 25)) + + }; +} +var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 10, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 10, 21)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 10, 36)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 10, 46)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 10, 65)) + +var robotB: Robot = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }; +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 11, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 11, 21)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 11, 38)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 11, 48)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 11, 69)) + +var { + skills: { +>skills : Symbol(Robot.skills, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 4, 17)) + + primary: primaryA = "noSkill", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 5, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 14, 13)) + + secondary: secondaryA = "noSkill" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 6, 25)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 15, 38)) + + } = { primary: "noSkill", secondary: "noSkill" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 17, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 17, 29)) + +} = robotA; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 10, 3)) + +var { + name: nameB = "noNameSpecified", +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 3, 17)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 19, 5)) + + skills: { +>skills : Symbol(Robot.skills, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 4, 17)) + + primary: primaryB = "noSkill", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 5, 13)) +>primaryB : Symbol(primaryB, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 21, 13), Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 28, 13)) + + secondary: secondaryB = "noSkill" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 6, 25)) +>secondaryB : Symbol(secondaryB, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 22, 38), Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 29, 38)) + + } = { primary: "noSkill", secondary: "noSkill" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 24, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 24, 29)) + +} = robotB; +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 11, 3)) + +var { + name: nameC = "noNameSpecified", +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 3, 17)) +>nameC : Symbol(nameC, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 26, 5)) + + skills: { +>skills : Symbol(Robot.skills, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 4, 17)) + + primary: primaryB = "noSkill", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 5, 13)) +>primaryB : Symbol(primaryB, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 21, 13), Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 28, 13)) + + secondary: secondaryB = "noSkill" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 6, 25)) +>secondaryB : Symbol(secondaryB, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 22, 38), Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 29, 38)) + + } = { primary: "noSkill", secondary: "noSkill" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 31, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 31, 29)) + +} = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 32, 12)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 32, 27)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 32, 37)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 32, 56)) + +if (nameB == nameB) { +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 19, 5)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 19, 5)) + + console.log(nameC); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 0, 22)) +>nameC : Symbol(nameC, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 26, 5)) +} +else { + console.log(nameC); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 0, 22)) +>nameC : Symbol(nameC, Decl(sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts, 26, 5)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.types new file mode 100644 index 00000000000..e3fdec19339 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.types @@ -0,0 +1,163 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts === +declare var console: { +>console : { log(msg: string): void; } + + log(msg: string): void; +>log : (msg: string) => void +>msg : string +} +interface Robot { +>Robot : Robot + + name: string; +>name : string + + skills: { +>skills : { primary?: string; secondary?: string; } + + primary?: string; +>primary : string + + secondary?: string; +>secondary : string + + }; +} +var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +>robotA : Robot +>Robot : Robot +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"mower" : string +>skills : { primary: string; secondary: string; } +>{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } +>primary : string +>"mowing" : string +>secondary : string +>"none" : string + +var robotB: Robot = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }; +>robotB : Robot +>Robot : Robot +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + +var { + skills: { +>skills : any + + primary: primaryA = "noSkill", +>primary : any +>primaryA : string +>"noSkill" : string + + secondary: secondaryA = "noSkill" +>secondary : any +>secondaryA : string +>"noSkill" : string + + } = { primary: "noSkill", secondary: "noSkill" } +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>primary : string +>"noSkill" : string +>secondary : string +>"noSkill" : string + +} = robotA; +>robotA : Robot + +var { + name: nameB = "noNameSpecified", +>name : any +>nameB : string +>"noNameSpecified" : string + + skills: { +>skills : any + + primary: primaryB = "noSkill", +>primary : any +>primaryB : string +>"noSkill" : string + + secondary: secondaryB = "noSkill" +>secondary : any +>secondaryB : string +>"noSkill" : string + + } = { primary: "noSkill", secondary: "noSkill" } +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>primary : string +>"noSkill" : string +>secondary : string +>"noSkill" : string + +} = robotB; +>robotB : Robot + +var { + name: nameC = "noNameSpecified", +>name : any +>nameC : string +>"noNameSpecified" : string + + skills: { +>skills : any + + primary: primaryB = "noSkill", +>primary : any +>primaryB : string +>"noSkill" : string + + secondary: secondaryB = "noSkill" +>secondary : any +>secondaryB : string +>"noSkill" : string + + } = { primary: "noSkill", secondary: "noSkill" } +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>primary : string +>"noSkill" : string +>secondary : string +>"noSkill" : string + +} = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; +>{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : Robot +>Robot : Robot +>{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"Edger" : string +>skills : { primary: string; secondary: string; } +>{ primary: "edging", secondary: "branch trimming" } : { primary: string; secondary: string; } +>primary : string +>"edging" : string +>secondary : string +>"branch trimming" : string + +if (nameB == nameB) { +>nameB == nameB : boolean +>nameB : string +>nameB : string + + console.log(nameC); +>console.log(nameC) : void +>console.log : (msg: string) => void +>console : { log(msg: string): void; } +>log : (msg: string) => void +>nameC : string +} +else { + console.log(nameC); +>console.log(nameC) : void +>console.log : (msg: string) => void +>console : { log(msg: string): void; } +>log : (msg: string) => void +>nameC : string +} diff --git a/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementDefaultValues.ts b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementDefaultValues.ts new file mode 100644 index 00000000000..b95e7e5464a --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementDefaultValues.ts @@ -0,0 +1,20 @@ +// @sourcemap: true +interface Robot { + name: string; + skill: string; +} +declare var console: { + log(msg: string): void; +} +var hello = "hello"; +var robotA: Robot = { name: "mower", skill: "mowing" }; +var robotB: Robot = { name: "trimmer", skill: "trimming" }; +var { name: nameA = "" } = robotA; +var { name: nameB = "", skill: skillB = "" } = robotB; +var { name: nameC = "", skill: skillC = "" } = { name: "Edger", skill: "cutting edges" }; +if (nameA == nameB) { + console.log(skillB); +} +else { + console.log(nameC); +} \ No newline at end of file diff --git a/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts new file mode 100644 index 00000000000..95eda6f2050 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts @@ -0,0 +1,41 @@ +// @sourcemap: true +declare var console: { + log(msg: string): void; +} +interface Robot { + name: string; + skills: { + primary?: string; + secondary?: string; + }; +} +var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +var robotB: Robot = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }; + +var { + skills: { + primary: primaryA = "noSkill", + secondary: secondaryA = "noSkill" + } = { primary: "noSkill", secondary: "noSkill" } +} = robotA; +var { + name: nameB = "noNameSpecified", + skills: { + primary: primaryB = "noSkill", + secondary: secondaryB = "noSkill" + } = { primary: "noSkill", secondary: "noSkill" } +} = robotB; +var { + name: nameC = "noNameSpecified", + skills: { + primary: primaryB = "noSkill", + secondary: secondaryB = "noSkill" + } = { primary: "noSkill", secondary: "noSkill" } +} = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; + +if (nameB == nameB) { + console.log(nameC); +} +else { + console.log(nameC); +} \ No newline at end of file From 321062a4d449079e7071a47d78c7d583d99c6a9c Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 11 Dec 2015 10:59:46 -0800 Subject: [PATCH 052/209] Test case for variable destructuring statement with array binding pattern and with default values --- ...atementArrayBindingPatternDefaultValues.js | 34 ++ ...entArrayBindingPatternDefaultValues.js.map | 2 + ...yBindingPatternDefaultValues.sourcemap.txt | 342 ++++++++++++++++ ...ntArrayBindingPatternDefaultValues.symbols | 56 +++ ...mentArrayBindingPatternDefaultValues.types | 90 +++++ ...tementArrayBindingPatternDefaultValues2.js | 31 ++ ...ntArrayBindingPatternDefaultValues2.js.map | 2 + ...BindingPatternDefaultValues2.sourcemap.txt | 377 ++++++++++++++++++ ...tArrayBindingPatternDefaultValues2.symbols | 52 +++ ...entArrayBindingPatternDefaultValues2.types | 97 +++++ ...atementArrayBindingPatternDefaultValues.ts | 20 + ...tementArrayBindingPatternDefaultValues2.ts | 18 + 12 files changed, 1121 insertions(+) create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.types create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.types create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.js b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.js new file mode 100644 index 00000000000..8cc61944e76 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.js @@ -0,0 +1,34 @@ +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts] +declare var console: { + log(msg: string): void; +} +type Robot = [number, string, string]; +var robotA: Robot = [1, "mower", "mowing"]; +var robotB: Robot = [2, "trimmer", "trimming"]; + +let [, nameA = "noName"] = robotA; +let [numberB = -1] = robotB; +let [numberA2 = -1, nameA2 = "noName", skillA2 = "noSkill"] = robotA; + +let [numberC2 = -1] = [3, "edging", "Trimming edges"]; +let [numberC = -1, nameC = "noName", skillC = "noSkill"] = [3, "edging", "Trimming edges"]; + +let [numberA3 = -1, ...robotAInfo] = robotA; + +if (nameA == nameA2) { + console.log(skillA2); +} + +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.js] +var robotA = [1, "mower", "mowing"]; +var robotB = [2, "trimmer", "trimming"]; +var _a = robotA[1], nameA = _a === void 0 ? "noName" : _a; +var _b = robotB[0], numberB = _b === void 0 ? -1 : _b; +var _c = robotA[0], numberA2 = _c === void 0 ? -1 : _c, _d = robotA[1], nameA2 = _d === void 0 ? "noName" : _d, _e = robotA[2], skillA2 = _e === void 0 ? "noSkill" : _e; +var _f = [3, "edging", "Trimming edges"][0], numberC2 = _f === void 0 ? -1 : _f; +var _g = [3, "edging", "Trimming edges"], _h = _g[0], numberC = _h === void 0 ? -1 : _h, _j = _g[1], nameC = _j === void 0 ? "noName" : _j, _k = _g[2], skillC = _k === void 0 ? "noSkill" : _k; +var _l = robotA[0], numberA3 = _l === void 0 ? -1 : _l, robotAInfo = robotA.slice(1); +if (nameA == nameA2) { + console.log(skillA2); +} +//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.js.map new file mode 100644 index 00000000000..ce017fbbbcd --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.js.map @@ -0,0 +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,kBAAgB,EAAhB,qCAAgB,CAAW;AAC7B,kBAAY,EAAZ,iCAAY,CAAW;AACvB,kBAAa,EAAb,kCAAa,EAAE,cAAiB,EAAjB,sCAAiB,EAAE,cAAmB,EAAnB,wCAAmB,CAAW;AAEhE,2CAAa,EAAb,kCAAa,CAAoC;AACtD,IAAA,oCAA0F,EAArF,UAAY,EAAZ,iCAAY,EAAE,UAAgB,EAAhB,qCAAgB,EAAE,UAAkB,EAAlB,uCAAkB,CAAoC;AAEtF,kBAAa,EAAb,kCAAa,EAAE,4BAAa,CAAW;AAE5C,EAAE,CAAC,CAAC,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC;IAClB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.sourcemap.txt new file mode 100644 index 00000000000..9df44518ca1 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.sourcemap.txt @@ -0,0 +1,342 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.js +mapUrl: sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.js.map +sourceRoot: +sources: sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.js +sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts +------------------------------------------------------------------- +>>>var robotA = [1, "mower", "mowing"]; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^^^^ +11> ^ +12> ^ +13> ^^^^^-> +1 >declare var console: { + > log(msg: string): void; + >} + >type Robot = [number, string, string]; + > +2 >var +3 > robotA +4 > : Robot = +5 > [ +6 > 1 +7 > , +8 > "mower" +9 > , +10> "mowing" +11> ] +12> ; +1 >Emitted(1, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(5, 5) + SourceIndex(0) +3 >Emitted(1, 11) Source(5, 11) + SourceIndex(0) +4 >Emitted(1, 14) Source(5, 21) + SourceIndex(0) +5 >Emitted(1, 15) Source(5, 22) + SourceIndex(0) +6 >Emitted(1, 16) Source(5, 23) + SourceIndex(0) +7 >Emitted(1, 18) Source(5, 25) + SourceIndex(0) +8 >Emitted(1, 25) Source(5, 32) + SourceIndex(0) +9 >Emitted(1, 27) Source(5, 34) + SourceIndex(0) +10>Emitted(1, 35) Source(5, 42) + SourceIndex(0) +11>Emitted(1, 36) Source(5, 43) + SourceIndex(0) +12>Emitted(1, 37) Source(5, 44) + SourceIndex(0) +--- +>>>var robotB = [2, "trimmer", "trimming"]; +1-> +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^ +11> ^ +12> ^ +13> ^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >var +3 > robotB +4 > : Robot = +5 > [ +6 > 2 +7 > , +8 > "trimmer" +9 > , +10> "trimming" +11> ] +12> ; +1->Emitted(2, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(6, 5) + SourceIndex(0) +3 >Emitted(2, 11) Source(6, 11) + SourceIndex(0) +4 >Emitted(2, 14) Source(6, 21) + SourceIndex(0) +5 >Emitted(2, 15) Source(6, 22) + SourceIndex(0) +6 >Emitted(2, 16) Source(6, 23) + SourceIndex(0) +7 >Emitted(2, 18) Source(6, 25) + SourceIndex(0) +8 >Emitted(2, 27) Source(6, 34) + SourceIndex(0) +9 >Emitted(2, 29) Source(6, 36) + SourceIndex(0) +10>Emitted(2, 39) Source(6, 46) + SourceIndex(0) +11>Emitted(2, 40) Source(6, 47) + SourceIndex(0) +12>Emitted(2, 41) Source(6, 48) + SourceIndex(0) +--- +>>>var _a = robotA[1], nameA = _a === void 0 ? "noName" : _a; +1-> +2 >^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +1-> + > + >let [, +2 >nameA = "noName" +3 > +4 > nameA = "noName" +5 > ] = robotA; +1->Emitted(3, 1) Source(8, 8) + SourceIndex(0) +2 >Emitted(3, 19) Source(8, 24) + SourceIndex(0) +3 >Emitted(3, 21) Source(8, 8) + SourceIndex(0) +4 >Emitted(3, 58) Source(8, 24) + SourceIndex(0) +5 >Emitted(3, 59) Source(8, 35) + SourceIndex(0) +--- +>>>var _b = robotB[0], numberB = _b === void 0 ? -1 : _b; +1 > +2 >^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >let [ +2 >numberB = -1 +3 > +4 > numberB = -1 +5 > ] = robotB; +1 >Emitted(4, 1) Source(9, 6) + SourceIndex(0) +2 >Emitted(4, 19) Source(9, 18) + SourceIndex(0) +3 >Emitted(4, 21) Source(9, 6) + SourceIndex(0) +4 >Emitted(4, 54) Source(9, 18) + SourceIndex(0) +5 >Emitted(4, 55) Source(9, 29) + SourceIndex(0) +--- +>>>var _c = robotA[0], numberA2 = _c === void 0 ? -1 : _c, _d = robotA[1], nameA2 = _d === void 0 ? "noName" : _d, _e = robotA[2], skillA2 = _e === void 0 ? "noSkill" : _e; +1-> +2 >^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^ +1-> + >let [ +2 >numberA2 = -1 +3 > +4 > numberA2 = -1 +5 > , +6 > nameA2 = "noName" +7 > +8 > nameA2 = "noName" +9 > , +10> skillA2 = "noSkill" +11> +12> skillA2 = "noSkill" +13> ] = robotA; +1->Emitted(5, 1) Source(10, 6) + SourceIndex(0) +2 >Emitted(5, 19) Source(10, 19) + SourceIndex(0) +3 >Emitted(5, 21) Source(10, 6) + SourceIndex(0) +4 >Emitted(5, 55) Source(10, 19) + SourceIndex(0) +5 >Emitted(5, 57) Source(10, 21) + SourceIndex(0) +6 >Emitted(5, 71) Source(10, 38) + SourceIndex(0) +7 >Emitted(5, 73) Source(10, 21) + SourceIndex(0) +8 >Emitted(5, 111) Source(10, 38) + SourceIndex(0) +9 >Emitted(5, 113) Source(10, 40) + SourceIndex(0) +10>Emitted(5, 127) Source(10, 59) + SourceIndex(0) +11>Emitted(5, 129) Source(10, 40) + SourceIndex(0) +12>Emitted(5, 169) Source(10, 59) + SourceIndex(0) +13>Emitted(5, 170) Source(10, 70) + SourceIndex(0) +--- +>>>var _f = [3, "edging", "Trimming edges"][0], numberC2 = _f === void 0 ? -1 : _f; +1 > +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + >let [ +2 >numberC2 = -1 +3 > +4 > numberC2 = -1 +5 > ] = [3, "edging", "Trimming edges"]; +1 >Emitted(6, 1) Source(12, 6) + SourceIndex(0) +2 >Emitted(6, 44) Source(12, 19) + SourceIndex(0) +3 >Emitted(6, 46) Source(12, 6) + SourceIndex(0) +4 >Emitted(6, 80) Source(12, 19) + SourceIndex(0) +5 >Emitted(6, 81) Source(12, 55) + SourceIndex(0) +--- +>>>var _g = [3, "edging", "Trimming edges"], _h = _g[0], numberC = _h === void 0 ? -1 : _h, _j = _g[1], nameC = _j === void 0 ? "noName" : _j, _k = _g[2], skillC = _k === void 0 ? "noSkill" : _k; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^^^^^^ +14> ^^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +16> ^ +1-> + > +2 > +3 > let [numberC = -1, nameC = "noName", skillC = "noSkill"] = [3, "edging", "Trimming edges"] +4 > +5 > numberC = -1 +6 > +7 > numberC = -1 +8 > , +9 > nameC = "noName" +10> +11> nameC = "noName" +12> , +13> skillC = "noSkill" +14> +15> skillC = "noSkill" +16> ] = [3, "edging", "Trimming edges"]; +1->Emitted(7, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(7, 5) Source(13, 1) + SourceIndex(0) +3 >Emitted(7, 41) Source(13, 91) + SourceIndex(0) +4 >Emitted(7, 43) Source(13, 6) + SourceIndex(0) +5 >Emitted(7, 53) Source(13, 18) + SourceIndex(0) +6 >Emitted(7, 55) Source(13, 6) + SourceIndex(0) +7 >Emitted(7, 88) Source(13, 18) + SourceIndex(0) +8 >Emitted(7, 90) Source(13, 20) + SourceIndex(0) +9 >Emitted(7, 100) Source(13, 36) + SourceIndex(0) +10>Emitted(7, 102) Source(13, 20) + SourceIndex(0) +11>Emitted(7, 139) Source(13, 36) + SourceIndex(0) +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) +16>Emitted(7, 193) Source(13, 92) + SourceIndex(0) +--- +>>>var _l = robotA[0], numberA3 = _l === void 0 ? -1 : _l, robotAInfo = robotA.slice(1); +1 > +2 >^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^ +1 > + > + >let [ +2 >numberA3 = -1 +3 > +4 > numberA3 = -1 +5 > , +6 > ...robotAInfo +7 > ] = robotA; +1 >Emitted(8, 1) Source(15, 6) + SourceIndex(0) +2 >Emitted(8, 19) Source(15, 19) + SourceIndex(0) +3 >Emitted(8, 21) Source(15, 6) + SourceIndex(0) +4 >Emitted(8, 55) Source(15, 19) + SourceIndex(0) +5 >Emitted(8, 57) Source(15, 21) + SourceIndex(0) +6 >Emitted(8, 85) Source(15, 34) + SourceIndex(0) +7 >Emitted(8, 86) Source(15, 45) + SourceIndex(0) +--- +>>>if (nameA == nameA2) { +1 > +2 >^^ +3 > ^ +4 > ^ +5 > ^^^^^ +6 > ^^^^ +7 > ^^^^^^ +8 > ^ +9 > ^ +10> ^ +11> ^^^^-> +1 > + > + > +2 >if +3 > +4 > ( +5 > nameA +6 > == +7 > nameA2 +8 > ) +9 > +10> { +1 >Emitted(9, 1) Source(17, 1) + SourceIndex(0) +2 >Emitted(9, 3) Source(17, 3) + SourceIndex(0) +3 >Emitted(9, 4) Source(17, 4) + SourceIndex(0) +4 >Emitted(9, 5) Source(17, 5) + SourceIndex(0) +5 >Emitted(9, 10) Source(17, 10) + SourceIndex(0) +6 >Emitted(9, 14) Source(17, 14) + SourceIndex(0) +7 >Emitted(9, 20) Source(17, 20) + SourceIndex(0) +8 >Emitted(9, 21) Source(17, 21) + SourceIndex(0) +9 >Emitted(9, 22) Source(17, 22) + SourceIndex(0) +10>Emitted(9, 23) Source(17, 23) + SourceIndex(0) +--- +>>> console.log(skillA2); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1-> + > +2 > console +3 > . +4 > log +5 > ( +6 > skillA2 +7 > ) +8 > ; +1->Emitted(10, 5) Source(18, 5) + SourceIndex(0) +2 >Emitted(10, 12) Source(18, 12) + SourceIndex(0) +3 >Emitted(10, 13) Source(18, 13) + SourceIndex(0) +4 >Emitted(10, 16) Source(18, 16) + SourceIndex(0) +5 >Emitted(10, 17) Source(18, 17) + SourceIndex(0) +6 >Emitted(10, 24) Source(18, 24) + SourceIndex(0) +7 >Emitted(10, 25) Source(18, 25) + SourceIndex(0) +8 >Emitted(10, 26) Source(18, 26) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(11, 1) Source(19, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(19, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.symbols b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.symbols new file mode 100644 index 00000000000..1800b3bd03c --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.symbols @@ -0,0 +1,56 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 0, 11)) + + log(msg: string): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 1, 8)) +} +type Robot = [number, string, string]; +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 2, 1)) + +var robotA: Robot = [1, "mower", "mowing"]; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 4, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 2, 1)) + +var robotB: Robot = [2, "trimmer", "trimming"]; +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 5, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 2, 1)) + +let [, nameA = "noName"] = robotA; +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 7, 6)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 4, 3)) + +let [numberB = -1] = robotB; +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 8, 5)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 5, 3)) + +let [numberA2 = -1, nameA2 = "noName", skillA2 = "noSkill"] = robotA; +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 9, 5)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 9, 19)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 9, 38)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 4, 3)) + +let [numberC2 = -1] = [3, "edging", "Trimming edges"]; +>numberC2 : Symbol(numberC2, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 11, 5)) + +let [numberC = -1, nameC = "noName", skillC = "noSkill"] = [3, "edging", "Trimming edges"]; +>numberC : Symbol(numberC, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 12, 5)) +>nameC : Symbol(nameC, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 12, 18)) +>skillC : Symbol(skillC, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 12, 36)) + +let [numberA3 = -1, ...robotAInfo] = robotA; +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 14, 5)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 14, 19)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 4, 3)) + +if (nameA == nameA2) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 7, 6)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 9, 19)) + + console.log(skillA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 0, 22)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts, 9, 38)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.types new file mode 100644 index 00000000000..2dad459725e --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.types @@ -0,0 +1,90 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts === +declare var console: { +>console : { log(msg: string): void; } + + log(msg: string): void; +>log : (msg: string) => void +>msg : string +} +type Robot = [number, string, string]; +>Robot : [number, string, string] + +var robotA: Robot = [1, "mower", "mowing"]; +>robotA : [number, string, string] +>Robot : [number, string, string] +>[1, "mower", "mowing"] : [number, string, string] +>1 : number +>"mower" : string +>"mowing" : string + +var robotB: Robot = [2, "trimmer", "trimming"]; +>robotB : [number, string, string] +>Robot : [number, string, string] +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + +let [, nameA = "noName"] = robotA; +> : undefined +>nameA : string +>"noName" : string +>robotA : [number, string, string] + +let [numberB = -1] = robotB; +>numberB : number +>-1 : number +>1 : number +>robotB : [number, string, string] + +let [numberA2 = -1, nameA2 = "noName", skillA2 = "noSkill"] = robotA; +>numberA2 : number +>-1 : number +>1 : number +>nameA2 : string +>"noName" : string +>skillA2 : string +>"noSkill" : string +>robotA : [number, string, string] + +let [numberC2 = -1] = [3, "edging", "Trimming edges"]; +>numberC2 : number +>-1 : number +>1 : number +>[3, "edging", "Trimming edges"] : [number, string, string] +>3 : number +>"edging" : string +>"Trimming edges" : string + +let [numberC = -1, nameC = "noName", skillC = "noSkill"] = [3, "edging", "Trimming edges"]; +>numberC : number +>-1 : number +>1 : number +>nameC : string +>"noName" : string +>skillC : string +>"noSkill" : string +>[3, "edging", "Trimming edges"] : [number, string, string] +>3 : number +>"edging" : string +>"Trimming edges" : string + +let [numberA3 = -1, ...robotAInfo] = robotA; +>numberA3 : number +>-1 : number +>1 : number +>robotAInfo : (number | string)[] +>robotA : [number, string, string] + +if (nameA == nameA2) { +>nameA == nameA2 : boolean +>nameA : string +>nameA2 : string + + console.log(skillA2); +>console.log(skillA2) : void +>console.log : (msg: string) => void +>console : { log(msg: string): void; } +>log : (msg: string) => void +>skillA2 : string +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.js b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.js new file mode 100644 index 00000000000..b20e0be4fe0 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.js @@ -0,0 +1,31 @@ +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts] +declare var console: { + log(msg: string): void; +} +type MultiSkilledRobot = [string, string[]]; +var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; + +let [, skillA = ["noSkill", "noSkill"]] = multiRobotA; +let [nameMB = "noName" ] = multiRobotB; +let [nameMA = "noName", [primarySkillA = "noSkill", secondarySkillA = "noSkill"] = ["noSkill", "noSkill"]] = multiRobotA; + +let [nameMC = "noName" ] = ["roomba", ["vaccum", "mopping"]]; +let [nameMC2 = "noName", [primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"]] = ["roomba", ["vaccum", "mopping"]]; + +if (nameMB == nameMA) { + console.log(skillA[0] + skillA[1]); +} + +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.js] +var multiRobotA = ["mower", ["mowing", ""]]; +var multiRobotB = ["trimmer", ["trimming", "edging"]]; +var _a = multiRobotA[1], skillA = _a === void 0 ? ["noSkill", "noSkill"] : _a; +var _b = multiRobotB[0], nameMB = _b === void 0 ? "noName" : _b; +var _c = multiRobotA[0], nameMA = _c === void 0 ? "noName" : _c, _d = multiRobotA[1], _e = _d === void 0 ? ["noSkill", "noSkill"] : _d, _f = _e[0], primarySkillA = _f === void 0 ? "noSkill" : _f, _g = _e[1], secondarySkillA = _g === void 0 ? "noSkill" : _g; +var _h = ["roomba", ["vaccum", "mopping"]][0], nameMC = _h === void 0 ? "noName" : _h; +var _j = ["roomba", ["vaccum", "mopping"]], _k = _j[0], nameMC2 = _k === void 0 ? "noName" : _k, _l = _j[1], _m = _l === void 0 ? ["noSkill", "noSkill"] : _l, _o = _m[0], primarySkillC = _o === void 0 ? "noSkill" : _o, _p = _m[1], secondarySkillC = _p === void 0 ? "noSkill" : _p; +if (nameMB == nameMA) { + console.log(skillA[0] + skillA[1]); +} +//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.js.map new file mode 100644 index 00000000000..11ca67c19ad --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.js.map @@ -0,0 +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,uBAA+B,EAA/B,oDAA+B,CAAgB;AACjD,uBAAiB,EAAjB,sCAAiB,CAAiB;AAClC,uBAAiB,EAAjB,sCAAiB,EAAE,mBAAiF,EAAjF,gDAAiF,EAAhF,UAAyB,EAAzB,8CAAyB,EAAE,UAA2B,EAA3B,gDAA2B,CAA0C;AAEpH,6CAAiB,EAAjB,sCAAiB,CAAuC;AAC7D,IAAA,sCAA+I,EAA1I,UAAkB,EAAlB,uCAAkB,EAAE,UAAiF,EAAjF,gDAAiF,EAAhF,UAAyB,EAAzB,8CAAyB,EAAE,UAA2B,EAA3B,gDAA2B,CAAgE;AAEhJ,EAAE,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC,CAAC;IACnB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.sourcemap.txt new file mode 100644 index 00000000000..30f2ee65592 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.sourcemap.txt @@ -0,0 +1,377 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.js +mapUrl: sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.js.map +sourceRoot: +sources: sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.js +sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts +------------------------------------------------------------------- +>>>var multiRobotA = ["mower", ["mowing", ""]]; +1 > +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^ +10> ^^ +11> ^^ +12> ^ +13> ^ +14> ^ +15> ^^^^^^^^^^^-> +1 >declare var console: { + > log(msg: string): void; + >} + >type MultiSkilledRobot = [string, string[]]; + > +2 >var +3 > multiRobotA +4 > : MultiSkilledRobot = +5 > [ +6 > "mower" +7 > , +8 > [ +9 > "mowing" +10> , +11> "" +12> ] +13> ] +14> ; +1 >Emitted(1, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(5, 5) + SourceIndex(0) +3 >Emitted(1, 16) Source(5, 16) + SourceIndex(0) +4 >Emitted(1, 19) Source(5, 38) + SourceIndex(0) +5 >Emitted(1, 20) Source(5, 39) + SourceIndex(0) +6 >Emitted(1, 27) Source(5, 46) + SourceIndex(0) +7 >Emitted(1, 29) Source(5, 48) + SourceIndex(0) +8 >Emitted(1, 30) Source(5, 49) + SourceIndex(0) +9 >Emitted(1, 38) Source(5, 57) + SourceIndex(0) +10>Emitted(1, 40) Source(5, 59) + SourceIndex(0) +11>Emitted(1, 42) Source(5, 61) + SourceIndex(0) +12>Emitted(1, 43) Source(5, 62) + SourceIndex(0) +13>Emitted(1, 44) Source(5, 63) + SourceIndex(0) +14>Emitted(1, 45) Source(5, 64) + SourceIndex(0) +--- +>>>var multiRobotB = ["trimmer", ["trimming", "edging"]]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^ +12> ^ +13> ^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >var +3 > multiRobotB +4 > : MultiSkilledRobot = +5 > [ +6 > "trimmer" +7 > , +8 > [ +9 > "trimming" +10> , +11> "edging" +12> ] +13> ] +14> ; +1->Emitted(2, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(6, 5) + SourceIndex(0) +3 >Emitted(2, 16) Source(6, 16) + SourceIndex(0) +4 >Emitted(2, 19) Source(6, 38) + SourceIndex(0) +5 >Emitted(2, 20) Source(6, 39) + SourceIndex(0) +6 >Emitted(2, 29) Source(6, 48) + SourceIndex(0) +7 >Emitted(2, 31) Source(6, 50) + SourceIndex(0) +8 >Emitted(2, 32) Source(6, 51) + SourceIndex(0) +9 >Emitted(2, 42) Source(6, 61) + SourceIndex(0) +10>Emitted(2, 44) Source(6, 63) + SourceIndex(0) +11>Emitted(2, 52) Source(6, 71) + SourceIndex(0) +12>Emitted(2, 53) Source(6, 72) + SourceIndex(0) +13>Emitted(2, 54) Source(6, 73) + SourceIndex(0) +14>Emitted(2, 55) Source(6, 74) + SourceIndex(0) +--- +>>>var _a = multiRobotA[1], skillA = _a === void 0 ? ["noSkill", "noSkill"] : _a; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +1-> + > + >let [, +2 >skillA = ["noSkill", "noSkill"] +3 > +4 > skillA = ["noSkill", "noSkill"] +5 > ] = multiRobotA; +1->Emitted(3, 1) Source(8, 8) + SourceIndex(0) +2 >Emitted(3, 24) Source(8, 39) + SourceIndex(0) +3 >Emitted(3, 26) Source(8, 8) + SourceIndex(0) +4 >Emitted(3, 78) Source(8, 39) + SourceIndex(0) +5 >Emitted(3, 79) Source(8, 55) + SourceIndex(0) +--- +>>>var _b = multiRobotB[0], nameMB = _b === void 0 ? "noName" : _b; +1 > +2 >^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >let [ +2 >nameMB = "noName" +3 > +4 > nameMB = "noName" +5 > ] = multiRobotB; +1 >Emitted(4, 1) Source(9, 6) + SourceIndex(0) +2 >Emitted(4, 24) Source(9, 23) + SourceIndex(0) +3 >Emitted(4, 26) Source(9, 6) + SourceIndex(0) +4 >Emitted(4, 64) Source(9, 23) + SourceIndex(0) +5 >Emitted(4, 65) Source(9, 40) + SourceIndex(0) +--- +>>>var _c = multiRobotA[0], nameMA = _c === void 0 ? "noName" : _c, _d = multiRobotA[1], _e = _d === void 0 ? ["noSkill", "noSkill"] : _d, _f = _e[0], primarySkillA = _f === void 0 ? "noSkill" : _f, _g = _e[1], secondarySkillA = _g === void 0 ? "noSkill" : _g; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +17> ^ +1-> + >let [ +2 >nameMA = "noName" +3 > +4 > nameMA = "noName" +5 > , +6 > [primarySkillA = "noSkill", secondarySkillA = "noSkill"] = ["noSkill", "noSkill"] +7 > +8 > [primarySkillA = "noSkill", secondarySkillA = "noSkill"] = ["noSkill", "noSkill"] +9 > +10> primarySkillA = "noSkill" +11> +12> primarySkillA = "noSkill" +13> , +14> secondarySkillA = "noSkill" +15> +16> secondarySkillA = "noSkill" +17> ] = ["noSkill", "noSkill"]] = multiRobotA; +1->Emitted(5, 1) Source(10, 6) + SourceIndex(0) +2 >Emitted(5, 24) Source(10, 23) + SourceIndex(0) +3 >Emitted(5, 26) Source(10, 6) + SourceIndex(0) +4 >Emitted(5, 64) Source(10, 23) + SourceIndex(0) +5 >Emitted(5, 66) Source(10, 25) + SourceIndex(0) +6 >Emitted(5, 85) Source(10, 106) + SourceIndex(0) +7 >Emitted(5, 87) Source(10, 25) + SourceIndex(0) +8 >Emitted(5, 135) Source(10, 106) + SourceIndex(0) +9 >Emitted(5, 137) Source(10, 26) + SourceIndex(0) +10>Emitted(5, 147) Source(10, 51) + SourceIndex(0) +11>Emitted(5, 149) Source(10, 26) + SourceIndex(0) +12>Emitted(5, 195) Source(10, 51) + SourceIndex(0) +13>Emitted(5, 197) Source(10, 53) + SourceIndex(0) +14>Emitted(5, 207) Source(10, 80) + SourceIndex(0) +15>Emitted(5, 209) Source(10, 53) + SourceIndex(0) +16>Emitted(5, 257) Source(10, 80) + SourceIndex(0) +17>Emitted(5, 258) Source(10, 122) + SourceIndex(0) +--- +>>>var _h = ["roomba", ["vaccum", "mopping"]][0], nameMC = _h === void 0 ? "noName" : _h; +1 > +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + >let [ +2 >nameMC = "noName" +3 > +4 > nameMC = "noName" +5 > ] = ["roomba", ["vaccum", "mopping"]]; +1 >Emitted(6, 1) Source(12, 6) + SourceIndex(0) +2 >Emitted(6, 46) Source(12, 23) + SourceIndex(0) +3 >Emitted(6, 48) Source(12, 6) + SourceIndex(0) +4 >Emitted(6, 86) Source(12, 23) + SourceIndex(0) +5 >Emitted(6, 87) Source(12, 62) + SourceIndex(0) +--- +>>>var _j = ["roomba", ["vaccum", "mopping"]], _k = _j[0], nameMC2 = _k === void 0 ? "noName" : _k, _l = _j[1], _m = _l === void 0 ? ["noSkill", "noSkill"] : _l, _o = _m[0], primarySkillC = _o === void 0 ? "noSkill" : _o, _p = _m[1], secondarySkillC = _p === void 0 ? "noSkill" : _p; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^^^^^^ +14> ^^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +16> ^^ +17> ^^^^^^^^^^ +18> ^^ +19> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +20> ^ +1-> + > +2 > +3 > let [nameMC2 = "noName", [primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"]] = ["roomba", ["vaccum", "mopping"]] +4 > +5 > nameMC2 = "noName" +6 > +7 > nameMC2 = "noName" +8 > , +9 > [primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"] +10> +11> [primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"] +12> +13> primarySkillC = "noSkill" +14> +15> primarySkillC = "noSkill" +16> , +17> secondarySkillC = "noSkill" +18> +19> secondarySkillC = "noSkill" +20> ] = ["noSkill", "noSkill"]] = ["roomba", ["vaccum", "mopping"]]; +1->Emitted(7, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(7, 5) Source(13, 1) + SourceIndex(0) +3 >Emitted(7, 43) Source(13, 144) + SourceIndex(0) +4 >Emitted(7, 45) Source(13, 6) + SourceIndex(0) +5 >Emitted(7, 55) Source(13, 24) + SourceIndex(0) +6 >Emitted(7, 57) Source(13, 6) + SourceIndex(0) +7 >Emitted(7, 96) Source(13, 24) + SourceIndex(0) +8 >Emitted(7, 98) Source(13, 26) + SourceIndex(0) +9 >Emitted(7, 108) Source(13, 107) + SourceIndex(0) +10>Emitted(7, 110) Source(13, 26) + SourceIndex(0) +11>Emitted(7, 158) Source(13, 107) + SourceIndex(0) +12>Emitted(7, 160) Source(13, 27) + SourceIndex(0) +13>Emitted(7, 170) Source(13, 52) + SourceIndex(0) +14>Emitted(7, 172) Source(13, 27) + SourceIndex(0) +15>Emitted(7, 218) Source(13, 52) + SourceIndex(0) +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) +20>Emitted(7, 281) Source(13, 145) + SourceIndex(0) +--- +>>>if (nameMB == nameMA) { +1 > +2 >^^ +3 > ^ +4 > ^ +5 > ^^^^^^ +6 > ^^^^ +7 > ^^^^^^ +8 > ^ +9 > ^ +10> ^ +11> ^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >if +3 > +4 > ( +5 > nameMB +6 > == +7 > nameMA +8 > ) +9 > +10> { +1 >Emitted(8, 1) Source(15, 1) + SourceIndex(0) +2 >Emitted(8, 3) Source(15, 3) + SourceIndex(0) +3 >Emitted(8, 4) Source(15, 4) + SourceIndex(0) +4 >Emitted(8, 5) Source(15, 5) + SourceIndex(0) +5 >Emitted(8, 11) Source(15, 11) + SourceIndex(0) +6 >Emitted(8, 15) Source(15, 15) + SourceIndex(0) +7 >Emitted(8, 21) Source(15, 21) + SourceIndex(0) +8 >Emitted(8, 22) Source(15, 22) + SourceIndex(0) +9 >Emitted(8, 23) Source(15, 23) + SourceIndex(0) +10>Emitted(8, 24) Source(15, 24) + SourceIndex(0) +--- +>>> console.log(skillA[0] + skillA[1]); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +9 > ^ +10> ^^^ +11> ^^^^^^ +12> ^ +13> ^ +14> ^ +15> ^ +16> ^ +1-> + > +2 > console +3 > . +4 > log +5 > ( +6 > skillA +7 > [ +8 > 0 +9 > ] +10> + +11> skillA +12> [ +13> 1 +14> ] +15> ) +16> ; +1->Emitted(9, 5) Source(16, 5) + SourceIndex(0) +2 >Emitted(9, 12) Source(16, 12) + SourceIndex(0) +3 >Emitted(9, 13) Source(16, 13) + SourceIndex(0) +4 >Emitted(9, 16) Source(16, 16) + SourceIndex(0) +5 >Emitted(9, 17) Source(16, 17) + SourceIndex(0) +6 >Emitted(9, 23) Source(16, 23) + SourceIndex(0) +7 >Emitted(9, 24) Source(16, 24) + SourceIndex(0) +8 >Emitted(9, 25) Source(16, 25) + SourceIndex(0) +9 >Emitted(9, 26) Source(16, 26) + SourceIndex(0) +10>Emitted(9, 29) Source(16, 29) + SourceIndex(0) +11>Emitted(9, 35) Source(16, 35) + SourceIndex(0) +12>Emitted(9, 36) Source(16, 36) + SourceIndex(0) +13>Emitted(9, 37) Source(16, 37) + SourceIndex(0) +14>Emitted(9, 38) Source(16, 38) + SourceIndex(0) +15>Emitted(9, 39) Source(16, 39) + SourceIndex(0) +16>Emitted(9, 40) Source(16, 40) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(10, 1) Source(17, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(17, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.symbols b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.symbols new file mode 100644 index 00000000000..76be77a8095 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.symbols @@ -0,0 +1,52 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts, 0, 11)) + + log(msg: string): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts, 1, 8)) +} +type MultiSkilledRobot = [string, string[]]; +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts, 2, 1)) + +var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts, 4, 3)) +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts, 2, 1)) + +var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts, 5, 3)) +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts, 2, 1)) + +let [, skillA = ["noSkill", "noSkill"]] = multiRobotA; +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts, 7, 6)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts, 4, 3)) + +let [nameMB = "noName" ] = multiRobotB; +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts, 8, 5)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts, 5, 3)) + +let [nameMA = "noName", [primarySkillA = "noSkill", secondarySkillA = "noSkill"] = ["noSkill", "noSkill"]] = multiRobotA; +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts, 9, 5)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts, 9, 25)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts, 9, 51)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts, 4, 3)) + +let [nameMC = "noName" ] = ["roomba", ["vaccum", "mopping"]]; +>nameMC : Symbol(nameMC, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts, 11, 5)) + +let [nameMC2 = "noName", [primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"]] = ["roomba", ["vaccum", "mopping"]]; +>nameMC2 : Symbol(nameMC2, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts, 12, 5)) +>primarySkillC : Symbol(primarySkillC, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts, 12, 26)) +>secondarySkillC : Symbol(secondarySkillC, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts, 12, 52)) + +if (nameMB == nameMA) { +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts, 8, 5)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts, 9, 5)) + + console.log(skillA[0] + skillA[1]); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts, 0, 22)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts, 7, 6)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts, 7, 6)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.types new file mode 100644 index 00000000000..12215507d4a --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.types @@ -0,0 +1,97 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts === +declare var console: { +>console : { log(msg: string): void; } + + log(msg: string): void; +>log : (msg: string) => void +>msg : string +} +type MultiSkilledRobot = [string, string[]]; +>MultiSkilledRobot : [string, string[]] + +var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +>multiRobotA : [string, string[]] +>MultiSkilledRobot : [string, string[]] +>["mower", ["mowing", ""]] : [string, string[]] +>"mower" : string +>["mowing", ""] : string[] +>"mowing" : string +>"" : string + +var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +>multiRobotB : [string, string[]] +>MultiSkilledRobot : [string, string[]] +>["trimmer", ["trimming", "edging"]] : [string, string[]] +>"trimmer" : string +>["trimming", "edging"] : string[] +>"trimming" : string +>"edging" : string + +let [, skillA = ["noSkill", "noSkill"]] = multiRobotA; +> : undefined +>skillA : string[] +>["noSkill", "noSkill"] : string[] +>"noSkill" : string +>"noSkill" : string +>multiRobotA : [string, string[]] + +let [nameMB = "noName" ] = multiRobotB; +>nameMB : string +>"noName" : string +>multiRobotB : [string, string[]] + +let [nameMA = "noName", [primarySkillA = "noSkill", secondarySkillA = "noSkill"] = ["noSkill", "noSkill"]] = multiRobotA; +>nameMA : string +>"noName" : string +>primarySkillA : string +>"noSkill" : string +>secondarySkillA : string +>"noSkill" : string +>["noSkill", "noSkill"] : [string, string] +>"noSkill" : string +>"noSkill" : string +>multiRobotA : [string, string[]] + +let [nameMC = "noName" ] = ["roomba", ["vaccum", "mopping"]]; +>nameMC : string +>"noName" : string +>["roomba", ["vaccum", "mopping"]] : [string, string[]] +>"roomba" : string +>["vaccum", "mopping"] : string[] +>"vaccum" : string +>"mopping" : string + +let [nameMC2 = "noName", [primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"]] = ["roomba", ["vaccum", "mopping"]]; +>nameMC2 : string +>"noName" : string +>primarySkillC : string +>"noSkill" : string +>secondarySkillC : string +>"noSkill" : string +>["noSkill", "noSkill"] : [string, string] +>"noSkill" : string +>"noSkill" : string +>["roomba", ["vaccum", "mopping"]] : [string, [string, string]] +>"roomba" : string +>["vaccum", "mopping"] : [string, string] +>"vaccum" : string +>"mopping" : string + +if (nameMB == nameMA) { +>nameMB == nameMA : boolean +>nameMB : string +>nameMA : string + + console.log(skillA[0] + skillA[1]); +>console.log(skillA[0] + skillA[1]) : void +>console.log : (msg: string) => void +>console : { log(msg: string): void; } +>log : (msg: string) => void +>skillA[0] + skillA[1] : string +>skillA[0] : string +>skillA : string[] +>0 : number +>skillA[1] : string +>skillA : string[] +>1 : number +} diff --git a/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts new file mode 100644 index 00000000000..fb942310389 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts @@ -0,0 +1,20 @@ +// @sourcemap: true +declare var console: { + log(msg: string): void; +} +type Robot = [number, string, string]; +var robotA: Robot = [1, "mower", "mowing"]; +var robotB: Robot = [2, "trimmer", "trimming"]; + +let [, nameA = "noName"] = robotA; +let [numberB = -1] = robotB; +let [numberA2 = -1, nameA2 = "noName", skillA2 = "noSkill"] = robotA; + +let [numberC2 = -1] = [3, "edging", "Trimming edges"]; +let [numberC = -1, nameC = "noName", skillC = "noSkill"] = [3, "edging", "Trimming edges"]; + +let [numberA3 = -1, ...robotAInfo] = robotA; + +if (nameA == nameA2) { + console.log(skillA2); +} \ No newline at end of file diff --git a/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts new file mode 100644 index 00000000000..4b4ef07d232 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts @@ -0,0 +1,18 @@ +// @sourcemap: true +declare var console: { + log(msg: string): void; +} +type MultiSkilledRobot = [string, string[]]; +var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; + +let [, skillA = ["noSkill", "noSkill"]] = multiRobotA; +let [nameMB = "noName" ] = multiRobotB; +let [nameMA = "noName", [primarySkillA = "noSkill", secondarySkillA = "noSkill"] = ["noSkill", "noSkill"]] = multiRobotA; + +let [nameMC = "noName" ] = ["roomba", ["vaccum", "mopping"]]; +let [nameMC2 = "noName", [primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"]] = ["roomba", ["vaccum", "mopping"]]; + +if (nameMB == nameMA) { + console.log(skillA[0] + skillA[1]); +} \ No newline at end of file From e362cb2c722f1ac2c4e520ac6cad8445a7745dc7 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 11 Dec 2015 11:00:55 -0800 Subject: [PATCH 053/209] Test case for array binding pattern destructuring assignment with default values --- ...tementArrayBindingPatternDefaultValues3.js | 97 ++ ...ntArrayBindingPatternDefaultValues3.js.map | 2 + ...BindingPatternDefaultValues3.sourcemap.txt | 1090 +++++++++++++++++ ...tArrayBindingPatternDefaultValues3.symbols | 167 +++ ...entArrayBindingPatternDefaultValues3.types | 361 ++++++ ...tementArrayBindingPatternDefaultValues3.ts | 55 + 6 files changed, 1772 insertions(+) create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.types create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js new file mode 100644 index 00000000000..deb2680000f --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js @@ -0,0 +1,97 @@ +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts] +declare var console: { + log(msg: any): void; +} +type Robot = [number, string, string]; +type MultiSkilledRobot = [string, string[]]; + +var robotA: Robot = [1, "mower", "mowing"]; +var robotB: Robot = [2, "trimmer", "trimming"]; +var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; + +let nameA: string, numberB: number, nameB: string, skillB: string; +let robotAInfo: (number | string)[]; + +let multiSkillB: string[], nameMB: string, primarySkillB: string, secondarySkillB: string; +let multiRobotAInfo: (string | string[])[]; + +[, nameA = "helloNoName"] = robotA; +[, nameB = "helloNoName"] = getRobotB(); +[, nameB = "helloNoName"] = [2, "trimmer", "trimming"]; +[, multiSkillB = []] = multiRobotB; +[, multiSkillB = []] = getMultiRobotB(); +[, multiSkillB = []] = ["roomba", ["vaccum", "mopping"]]; + +[numberB = -1] = robotB; +[numberB = -1] = getRobotB(); +[numberB = -1] = [2, "trimmer", "trimming"]; +[nameMB = "helloNoName"] = multiRobotB; +[nameMB = "helloNoName"] = getMultiRobotB(); +[nameMB = "helloNoName"] = ["trimmer", ["trimming", "edging"]]; + +[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = robotB; +[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = getRobotB(); +[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = [2, "trimmer", "trimming"]; +[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB; +[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB(); +[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = + ["trimmer", ["trimming", "edging"]]; + +[numberB = -1, ...robotAInfo] = robotB; +[numberB = -1, ...robotAInfo] = getRobotB(); +[numberB = -1, ...robotAInfo] = [2, "trimmer", "trimming"]; + +if (nameA == nameB) { + console.log(skillB); +} + +function getRobotB() { + return robotB; +} + +function getMultiRobotB() { + return multiRobotB; +} + +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js] +var robotA = [1, "mower", "mowing"]; +var robotB = [2, "trimmer", "trimming"]; +var multiRobotA = ["mower", ["mowing", ""]]; +var multiRobotB = ["trimmer", ["trimming", "edging"]]; +var nameA, numberB, nameB, skillB; +var robotAInfo; +var multiSkillB, nameMB, primarySkillB, secondarySkillB; +var multiRobotAInfo; +_a = robotA[1], nameA = _a === void 0 ? "helloNoName" : _a; +_b = getRobotB(), _c = _b[1], nameB = _c === void 0 ? "helloNoName" : _c; +_d = [2, "trimmer", "trimming"], _e = _d[1], nameB = _e === void 0 ? "helloNoName" : _e; +_f = multiRobotB[1], multiSkillB = _f === void 0 ? [] : _f; +_g = getMultiRobotB(), _h = _g[1], multiSkillB = _h === void 0 ? [] : _h; +_j = ["roomba", ["vaccum", "mopping"]], _k = _j[1], multiSkillB = _k === void 0 ? [] : _k; +_l = robotB[0], numberB = _l === void 0 ? -1 : _l; +_m = getRobotB()[0], numberB = _m === void 0 ? -1 : _m; +_o = [2, "trimmer", "trimming"][0], numberB = _o === void 0 ? -1 : _o; +_p = multiRobotB[0], nameMB = _p === void 0 ? "helloNoName" : _p; +_q = getMultiRobotB()[0], nameMB = _q === void 0 ? "helloNoName" : _q; +_r = ["trimmer", ["trimming", "edging"]][0], nameMB = _r === void 0 ? "helloNoName" : _r; +_s = robotB[0], numberB = _s === void 0 ? -1 : _s, _t = robotB[1], nameB = _t === void 0 ? "helloNoName" : _t, _u = robotB[2], skillB = _u === void 0 ? "noSkill" : _u; +_v = getRobotB(), _w = _v[0], numberB = _w === void 0 ? -1 : _w, _x = _v[1], nameB = _x === void 0 ? "helloNoName" : _x, _y = _v[2], skillB = _y === void 0 ? "noSkill" : _y; +_z = [2, "trimmer", "trimming"], _0 = _z[0], numberB = _0 === void 0 ? -1 : _0, _1 = _z[1], nameB = _1 === void 0 ? "helloNoName" : _1, _2 = _z[2], skillB = _2 === void 0 ? "noSkill" : _2; +_3 = multiRobotB[0], nameMB = _3 === void 0 ? "helloNoName" : _3, _4 = multiRobotB[1], _5 = _4 === void 0 ? [] : _4, _6 = _5[0], primarySkillB = _6 === void 0 ? "noSkill" : _6, _7 = _5[1], secondarySkillB = _7 === void 0 ? "noSkill" : _7; +_8 = getMultiRobotB(), _9 = _8[0], nameMB = _9 === void 0 ? "helloNoName" : _9, _10 = _8[1], _11 = _10 === void 0 ? [] : _10, _12 = _11[0], primarySkillB = _12 === void 0 ? "noSkill" : _12, _13 = _11[1], secondarySkillB = _13 === void 0 ? "noSkill" : _13; +_14 = ["trimmer", ["trimming", "edging"]], _15 = _14[0], nameMB = _15 === void 0 ? "helloNoName" : _15, _16 = _14[1], _17 = _16 === void 0 ? [] : _16, _18 = _17[0], primarySkillB = _18 === void 0 ? "noSkill" : _18, _19 = _17[1], secondarySkillB = _19 === void 0 ? "noSkill" : _19; +_20 = robotB[0], numberB = _20 === void 0 ? -1 : _20, robotAInfo = robotB.slice(1); +_21 = getRobotB(), _22 = _21[0], numberB = _22 === void 0 ? -1 : _22, robotAInfo = _21.slice(1); +_23 = [2, "trimmer", "trimming"], _24 = _23[0], numberB = _24 === void 0 ? -1 : _24, robotAInfo = _23.slice(1); +if (nameA == nameB) { + console.log(skillB); +} +function getRobotB() { + return robotB; +} +function getMultiRobotB() { + return multiRobotB; +} +var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24; +//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js.map new file mode 100644 index 00000000000..1b7453826e4 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js.map] +{"version":3,"file":"sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js","sourceRoot":"","sources":["sourceMapValidationD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AgB;AACxE,+BAAsF,EAArF,UAAY,EAAZ,iCAAY,EAAE,UAAqB,EAArB,0CAAqB,EAAE,UAAkB,EAAlB,uCAAkB,CAA+B;AACtF,mBAAsB,EAAtB,2CAAsB,EAAE,mBAA6D,EAA7D,4BAA6D,EAA5D,UAAyB,EAAzB,8CAAyB,EAAE,UAA2B,EAA3B,gDAA2B,CAAsB;AACtG,qBAA0G,EAAzG,UAAsB,EAAtB,2CAAsB,EAAE,WAA6D,EAA7D,+BAA6D,EAA5D,YAAyB,EAAzB,gDAAyB,EAAE,YAA2B,EAA3B,kDAA2B,CAA2B;AAC3G,yCACuC,EADtC,YAAsB,EAAtB,6CAAsB,EAAE,YAA6D,EAA7D,+BAA6D,EAA5D,YAAyB,EAAzB,gDAAyB,EAAE,YAA2B,EAA3B,kDAA2B,CACxC;AAEvC,eAAY,EAAZ,mCAAY,EAAE,4BAAa,CAAW;AACvC,iBAA2C,EAA1C,YAAY,EAAZ,mCAAY,EAAE,yBAAa,CAAgB;AAC5C,gCAAiE,EAAhE,YAAY,EAAZ,mCAAY,EAAE,yBAAa,CAAsC;AAElE,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.sourcemap.txt new file mode 100644 index 00000000000..c9784dc30a3 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.sourcemap.txt @@ -0,0 +1,1090 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js +mapUrl: sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js.map +sourceRoot: +sources: sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js +sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts +------------------------------------------------------------------- +>>>var robotA = [1, "mower", "mowing"]; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^^^^ +11> ^ +12> ^ +13> ^^^^^-> +1 >declare var console: { + > log(msg: any): void; + >} + >type Robot = [number, string, string]; + >type MultiSkilledRobot = [string, string[]]; + > + > +2 >var +3 > robotA +4 > : Robot = +5 > [ +6 > 1 +7 > , +8 > "mower" +9 > , +10> "mowing" +11> ] +12> ; +1 >Emitted(1, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(7, 5) + SourceIndex(0) +3 >Emitted(1, 11) Source(7, 11) + SourceIndex(0) +4 >Emitted(1, 14) Source(7, 21) + SourceIndex(0) +5 >Emitted(1, 15) Source(7, 22) + SourceIndex(0) +6 >Emitted(1, 16) Source(7, 23) + SourceIndex(0) +7 >Emitted(1, 18) Source(7, 25) + SourceIndex(0) +8 >Emitted(1, 25) Source(7, 32) + SourceIndex(0) +9 >Emitted(1, 27) Source(7, 34) + SourceIndex(0) +10>Emitted(1, 35) Source(7, 42) + SourceIndex(0) +11>Emitted(1, 36) Source(7, 43) + SourceIndex(0) +12>Emitted(1, 37) Source(7, 44) + SourceIndex(0) +--- +>>>var robotB = [2, "trimmer", "trimming"]; +1-> +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^ +11> ^ +12> ^ +13> ^^^^^-> +1-> + > +2 >var +3 > robotB +4 > : Robot = +5 > [ +6 > 2 +7 > , +8 > "trimmer" +9 > , +10> "trimming" +11> ] +12> ; +1->Emitted(2, 1) Source(8, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(8, 5) + SourceIndex(0) +3 >Emitted(2, 11) Source(8, 11) + SourceIndex(0) +4 >Emitted(2, 14) Source(8, 21) + SourceIndex(0) +5 >Emitted(2, 15) Source(8, 22) + SourceIndex(0) +6 >Emitted(2, 16) Source(8, 23) + SourceIndex(0) +7 >Emitted(2, 18) Source(8, 25) + SourceIndex(0) +8 >Emitted(2, 27) Source(8, 34) + SourceIndex(0) +9 >Emitted(2, 29) Source(8, 36) + SourceIndex(0) +10>Emitted(2, 39) Source(8, 46) + SourceIndex(0) +11>Emitted(2, 40) Source(8, 47) + SourceIndex(0) +12>Emitted(2, 41) Source(8, 48) + SourceIndex(0) +--- +>>>var multiRobotA = ["mower", ["mowing", ""]]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^ +10> ^^ +11> ^^ +12> ^ +13> ^ +14> ^ +15> ^^^^^^^^^^^-> +1-> + > +2 >var +3 > multiRobotA +4 > : MultiSkilledRobot = +5 > [ +6 > "mower" +7 > , +8 > [ +9 > "mowing" +10> , +11> "" +12> ] +13> ] +14> ; +1->Emitted(3, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(9, 5) + SourceIndex(0) +3 >Emitted(3, 16) Source(9, 16) + SourceIndex(0) +4 >Emitted(3, 19) Source(9, 38) + SourceIndex(0) +5 >Emitted(3, 20) Source(9, 39) + SourceIndex(0) +6 >Emitted(3, 27) Source(9, 46) + SourceIndex(0) +7 >Emitted(3, 29) Source(9, 48) + SourceIndex(0) +8 >Emitted(3, 30) Source(9, 49) + SourceIndex(0) +9 >Emitted(3, 38) Source(9, 57) + SourceIndex(0) +10>Emitted(3, 40) Source(9, 59) + SourceIndex(0) +11>Emitted(3, 42) Source(9, 61) + SourceIndex(0) +12>Emitted(3, 43) Source(9, 62) + SourceIndex(0) +13>Emitted(3, 44) Source(9, 63) + SourceIndex(0) +14>Emitted(3, 45) Source(9, 64) + SourceIndex(0) +--- +>>>var multiRobotB = ["trimmer", ["trimming", "edging"]]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^ +12> ^ +13> ^ +14> ^ +1-> + > +2 >var +3 > multiRobotB +4 > : MultiSkilledRobot = +5 > [ +6 > "trimmer" +7 > , +8 > [ +9 > "trimming" +10> , +11> "edging" +12> ] +13> ] +14> ; +1->Emitted(4, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(4, 5) Source(10, 5) + SourceIndex(0) +3 >Emitted(4, 16) Source(10, 16) + SourceIndex(0) +4 >Emitted(4, 19) Source(10, 38) + SourceIndex(0) +5 >Emitted(4, 20) Source(10, 39) + SourceIndex(0) +6 >Emitted(4, 29) Source(10, 48) + SourceIndex(0) +7 >Emitted(4, 31) Source(10, 50) + SourceIndex(0) +8 >Emitted(4, 32) Source(10, 51) + SourceIndex(0) +9 >Emitted(4, 42) Source(10, 61) + SourceIndex(0) +10>Emitted(4, 44) Source(10, 63) + SourceIndex(0) +11>Emitted(4, 52) Source(10, 71) + SourceIndex(0) +12>Emitted(4, 53) Source(10, 72) + SourceIndex(0) +13>Emitted(4, 54) Source(10, 73) + SourceIndex(0) +14>Emitted(4, 55) Source(10, 74) + SourceIndex(0) +--- +>>>var nameA, numberB, nameB, skillB; +1 > +2 >^^^^ +3 > ^^^^^ +4 > ^^ +5 > ^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^ +9 > ^^^^^^ +10> ^ +1 > + > + > +2 >let +3 > nameA: string +4 > , +5 > numberB: number +6 > , +7 > nameB: string +8 > , +9 > skillB: string +10> ; +1 >Emitted(5, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(5, 5) Source(12, 5) + SourceIndex(0) +3 >Emitted(5, 10) Source(12, 18) + SourceIndex(0) +4 >Emitted(5, 12) Source(12, 20) + SourceIndex(0) +5 >Emitted(5, 19) Source(12, 35) + SourceIndex(0) +6 >Emitted(5, 21) Source(12, 37) + SourceIndex(0) +7 >Emitted(5, 26) Source(12, 50) + SourceIndex(0) +8 >Emitted(5, 28) Source(12, 52) + SourceIndex(0) +9 >Emitted(5, 34) Source(12, 66) + SourceIndex(0) +10>Emitted(5, 35) Source(12, 67) + SourceIndex(0) +--- +>>>var robotAInfo; +1 > +2 >^^^^ +3 > ^^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >let +3 > robotAInfo: (number | string)[] +4 > ; +1 >Emitted(6, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(6, 5) Source(13, 5) + SourceIndex(0) +3 >Emitted(6, 15) Source(13, 36) + SourceIndex(0) +4 >Emitted(6, 16) Source(13, 37) + SourceIndex(0) +--- +>>>var multiSkillB, nameMB, primarySkillB, secondarySkillB; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^ +10> ^ +1-> + > + > +2 >let +3 > multiSkillB: string[] +4 > , +5 > nameMB: string +6 > , +7 > primarySkillB: string +8 > , +9 > secondarySkillB: string +10> ; +1->Emitted(7, 1) Source(15, 1) + SourceIndex(0) +2 >Emitted(7, 5) Source(15, 5) + SourceIndex(0) +3 >Emitted(7, 16) Source(15, 26) + SourceIndex(0) +4 >Emitted(7, 18) Source(15, 28) + SourceIndex(0) +5 >Emitted(7, 24) Source(15, 42) + SourceIndex(0) +6 >Emitted(7, 26) Source(15, 44) + SourceIndex(0) +7 >Emitted(7, 39) Source(15, 65) + SourceIndex(0) +8 >Emitted(7, 41) Source(15, 67) + SourceIndex(0) +9 >Emitted(7, 56) Source(15, 90) + SourceIndex(0) +10>Emitted(7, 57) Source(15, 91) + SourceIndex(0) +--- +>>>var multiRobotAInfo; +1 > +2 >^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >let +3 > multiRobotAInfo: (string | string[])[] +4 > ; +1 >Emitted(8, 1) Source(16, 1) + SourceIndex(0) +2 >Emitted(8, 5) Source(16, 5) + SourceIndex(0) +3 >Emitted(8, 20) Source(16, 43) + SourceIndex(0) +4 >Emitted(8, 21) Source(16, 44) + SourceIndex(0) +--- +>>>_a = robotA[1], nameA = _a === void 0 ? "helloNoName" : _a; +1-> +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^-> +1-> + > + >[, +2 >nameA = "helloNoName" +3 > +4 > nameA = "helloNoName" +5 > ] = robotA; +1->Emitted(9, 1) Source(18, 4) + SourceIndex(0) +2 >Emitted(9, 15) Source(18, 25) + SourceIndex(0) +3 >Emitted(9, 17) Source(18, 4) + SourceIndex(0) +4 >Emitted(9, 59) Source(18, 25) + SourceIndex(0) +5 >Emitted(9, 60) Source(18, 36) + SourceIndex(0) +--- +>>>_b = getRobotB(), _c = _b[1], nameB = _c === void 0 ? "helloNoName" : _c; +1-> +2 >^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^ +8 > ^^^^^^^^^^^^^^^^-> +1-> + > +2 >[, nameB = "helloNoName"] = getRobotB() +3 > +4 > nameB = "helloNoName" +5 > +6 > nameB = "helloNoName" +7 > ] = getRobotB(); +1->Emitted(10, 1) Source(19, 1) + SourceIndex(0) +2 >Emitted(10, 17) Source(19, 40) + SourceIndex(0) +3 >Emitted(10, 19) Source(19, 4) + SourceIndex(0) +4 >Emitted(10, 29) Source(19, 25) + SourceIndex(0) +5 >Emitted(10, 31) Source(19, 4) + SourceIndex(0) +6 >Emitted(10, 73) Source(19, 25) + SourceIndex(0) +7 >Emitted(10, 74) Source(19, 41) + SourceIndex(0) +--- +>>>_d = [2, "trimmer", "trimming"], _e = _d[1], nameB = _e === void 0 ? "helloNoName" : _e; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^ +1-> + > +2 >[, nameB = "helloNoName"] = [2, "trimmer", "trimming"] +3 > +4 > nameB = "helloNoName" +5 > +6 > nameB = "helloNoName" +7 > ] = [2, "trimmer", "trimming"]; +1->Emitted(11, 1) Source(20, 1) + SourceIndex(0) +2 >Emitted(11, 32) Source(20, 55) + SourceIndex(0) +3 >Emitted(11, 34) Source(20, 4) + SourceIndex(0) +4 >Emitted(11, 44) Source(20, 25) + SourceIndex(0) +5 >Emitted(11, 46) Source(20, 4) + SourceIndex(0) +6 >Emitted(11, 88) Source(20, 25) + SourceIndex(0) +7 >Emitted(11, 89) Source(20, 56) + SourceIndex(0) +--- +>>>_f = multiRobotB[1], multiSkillB = _f === void 0 ? [] : _f; +1 > +2 >^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^-> +1 > + >[, +2 >multiSkillB = [] +3 > +4 > multiSkillB = [] +5 > ] = multiRobotB; +1 >Emitted(12, 1) Source(21, 4) + SourceIndex(0) +2 >Emitted(12, 20) Source(21, 20) + SourceIndex(0) +3 >Emitted(12, 22) Source(21, 4) + SourceIndex(0) +4 >Emitted(12, 59) Source(21, 20) + SourceIndex(0) +5 >Emitted(12, 60) Source(21, 36) + SourceIndex(0) +--- +>>>_g = getMultiRobotB(), _h = _g[1], multiSkillB = _h === void 0 ? [] : _h; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^ +8 > ^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >[, multiSkillB = []] = getMultiRobotB() +3 > +4 > multiSkillB = [] +5 > +6 > multiSkillB = [] +7 > ] = getMultiRobotB(); +1->Emitted(13, 1) Source(22, 1) + SourceIndex(0) +2 >Emitted(13, 22) Source(22, 40) + SourceIndex(0) +3 >Emitted(13, 24) Source(22, 4) + SourceIndex(0) +4 >Emitted(13, 34) Source(22, 20) + SourceIndex(0) +5 >Emitted(13, 36) Source(22, 4) + SourceIndex(0) +6 >Emitted(13, 73) Source(22, 20) + SourceIndex(0) +7 >Emitted(13, 74) Source(22, 41) + SourceIndex(0) +--- +>>>_j = ["roomba", ["vaccum", "mopping"]], _k = _j[1], multiSkillB = _k === void 0 ? [] : _k; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^ +1-> + > +2 >[, multiSkillB = []] = ["roomba", ["vaccum", "mopping"]] +3 > +4 > multiSkillB = [] +5 > +6 > multiSkillB = [] +7 > ] = ["roomba", ["vaccum", "mopping"]]; +1->Emitted(14, 1) Source(23, 1) + SourceIndex(0) +2 >Emitted(14, 39) Source(23, 57) + SourceIndex(0) +3 >Emitted(14, 41) Source(23, 4) + SourceIndex(0) +4 >Emitted(14, 51) Source(23, 20) + SourceIndex(0) +5 >Emitted(14, 53) Source(23, 4) + SourceIndex(0) +6 >Emitted(14, 90) Source(23, 20) + SourceIndex(0) +7 >Emitted(14, 91) Source(23, 58) + SourceIndex(0) +--- +>>>_l = robotB[0], numberB = _l === void 0 ? -1 : _l; +1 > +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +6 > ^^^^^^-> +1 > + > + >[ +2 >numberB = -1 +3 > +4 > numberB = -1 +5 > ] = robotB; +1 >Emitted(15, 1) Source(25, 2) + SourceIndex(0) +2 >Emitted(15, 15) Source(25, 14) + SourceIndex(0) +3 >Emitted(15, 17) Source(25, 2) + SourceIndex(0) +4 >Emitted(15, 50) Source(25, 14) + SourceIndex(0) +5 >Emitted(15, 51) Source(25, 25) + SourceIndex(0) +--- +>>>_m = getRobotB()[0], numberB = _m === void 0 ? -1 : _m; +1-> +2 >^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^-> +1-> + >[ +2 >numberB = -1 +3 > +4 > numberB = -1 +5 > ] = getRobotB(); +1->Emitted(16, 1) Source(26, 2) + SourceIndex(0) +2 >Emitted(16, 20) Source(26, 14) + SourceIndex(0) +3 >Emitted(16, 22) Source(26, 2) + SourceIndex(0) +4 >Emitted(16, 55) Source(26, 14) + SourceIndex(0) +5 >Emitted(16, 56) Source(26, 30) + SourceIndex(0) +--- +>>>_o = [2, "trimmer", "trimming"][0], numberB = _o === void 0 ? -1 : _o; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +1-> + >[ +2 >numberB = -1 +3 > +4 > numberB = -1 +5 > ] = [2, "trimmer", "trimming"]; +1->Emitted(17, 1) Source(27, 2) + SourceIndex(0) +2 >Emitted(17, 35) Source(27, 14) + SourceIndex(0) +3 >Emitted(17, 37) Source(27, 2) + SourceIndex(0) +4 >Emitted(17, 70) Source(27, 14) + SourceIndex(0) +5 >Emitted(17, 71) Source(27, 45) + SourceIndex(0) +--- +>>>_p = multiRobotB[0], nameMB = _p === void 0 ? "helloNoName" : _p; +1 > +2 >^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +6 > ^^^^^^-> +1 > + >[ +2 >nameMB = "helloNoName" +3 > +4 > nameMB = "helloNoName" +5 > ] = multiRobotB; +1 >Emitted(18, 1) Source(28, 2) + SourceIndex(0) +2 >Emitted(18, 20) Source(28, 24) + SourceIndex(0) +3 >Emitted(18, 22) Source(28, 2) + SourceIndex(0) +4 >Emitted(18, 65) Source(28, 24) + SourceIndex(0) +5 >Emitted(18, 66) Source(28, 40) + SourceIndex(0) +--- +>>>_q = getMultiRobotB()[0], nameMB = _q === void 0 ? "helloNoName" : _q; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^-> +1-> + >[ +2 >nameMB = "helloNoName" +3 > +4 > nameMB = "helloNoName" +5 > ] = getMultiRobotB(); +1->Emitted(19, 1) Source(29, 2) + SourceIndex(0) +2 >Emitted(19, 25) Source(29, 24) + SourceIndex(0) +3 >Emitted(19, 27) Source(29, 2) + SourceIndex(0) +4 >Emitted(19, 70) Source(29, 24) + SourceIndex(0) +5 >Emitted(19, 71) Source(29, 45) + SourceIndex(0) +--- +>>>_r = ["trimmer", ["trimming", "edging"]][0], nameMB = _r === void 0 ? "helloNoName" : _r; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + >[ +2 >nameMB = "helloNoName" +3 > +4 > nameMB = "helloNoName" +5 > ] = ["trimmer", ["trimming", "edging"]]; +1->Emitted(20, 1) Source(30, 2) + SourceIndex(0) +2 >Emitted(20, 44) Source(30, 24) + SourceIndex(0) +3 >Emitted(20, 46) Source(30, 2) + SourceIndex(0) +4 >Emitted(20, 89) Source(30, 24) + SourceIndex(0) +5 >Emitted(20, 90) Source(30, 64) + SourceIndex(0) +--- +>>>_s = robotB[0], numberB = _s === void 0 ? -1 : _s, _t = robotB[1], nameB = _t === void 0 ? "helloNoName" : _t, _u = robotB[2], skillB = _u === void 0 ? "noSkill" : _u; +1-> +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^ +14> ^^^^^^^-> +1-> + > + >[ +2 >numberB = -1 +3 > +4 > numberB = -1 +5 > , +6 > nameB = "helloNoName" +7 > +8 > nameB = "helloNoName" +9 > , +10> skillB = "noSkill" +11> +12> skillB = "noSkill" +13> ] = robotB; +1->Emitted(21, 1) Source(32, 2) + SourceIndex(0) +2 >Emitted(21, 15) Source(32, 14) + SourceIndex(0) +3 >Emitted(21, 17) Source(32, 2) + SourceIndex(0) +4 >Emitted(21, 50) Source(32, 14) + SourceIndex(0) +5 >Emitted(21, 52) Source(32, 16) + SourceIndex(0) +6 >Emitted(21, 66) Source(32, 37) + SourceIndex(0) +7 >Emitted(21, 68) Source(32, 16) + SourceIndex(0) +8 >Emitted(21, 110) Source(32, 37) + SourceIndex(0) +9 >Emitted(21, 112) Source(32, 39) + SourceIndex(0) +10>Emitted(21, 126) Source(32, 57) + SourceIndex(0) +11>Emitted(21, 128) Source(32, 39) + SourceIndex(0) +12>Emitted(21, 167) Source(32, 57) + SourceIndex(0) +13>Emitted(21, 168) Source(32, 68) + SourceIndex(0) +--- +>>>_v = getRobotB(), _w = _v[0], numberB = _w === void 0 ? -1 : _w, _x = _v[1], nameB = _x === void 0 ? "helloNoName" : _x, _y = _v[2], skillB = _y === void 0 ? "noSkill" : _y; +1-> +2 >^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^ +16> ^^^^^^^^^^^^^^^^-> +1-> + > +2 >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = getRobotB() +3 > +4 > numberB = -1 +5 > +6 > numberB = -1 +7 > , +8 > nameB = "helloNoName" +9 > +10> nameB = "helloNoName" +11> , +12> skillB = "noSkill" +13> +14> skillB = "noSkill" +15> ] = getRobotB(); +1->Emitted(22, 1) Source(33, 1) + SourceIndex(0) +2 >Emitted(22, 17) Source(33, 72) + SourceIndex(0) +3 >Emitted(22, 19) Source(33, 2) + SourceIndex(0) +4 >Emitted(22, 29) Source(33, 14) + SourceIndex(0) +5 >Emitted(22, 31) Source(33, 2) + SourceIndex(0) +6 >Emitted(22, 64) Source(33, 14) + SourceIndex(0) +7 >Emitted(22, 66) Source(33, 16) + SourceIndex(0) +8 >Emitted(22, 76) Source(33, 37) + SourceIndex(0) +9 >Emitted(22, 78) Source(33, 16) + SourceIndex(0) +10>Emitted(22, 120) Source(33, 37) + SourceIndex(0) +11>Emitted(22, 122) Source(33, 39) + SourceIndex(0) +12>Emitted(22, 132) Source(33, 57) + SourceIndex(0) +13>Emitted(22, 134) Source(33, 39) + SourceIndex(0) +14>Emitted(22, 173) Source(33, 57) + SourceIndex(0) +15>Emitted(22, 174) Source(33, 73) + SourceIndex(0) +--- +>>>_z = [2, "trimmer", "trimming"], _0 = _z[0], numberB = _0 === void 0 ? -1 : _0, _1 = _z[1], nameB = _1 === void 0 ? "helloNoName" : _1, _2 = _z[2], skillB = _2 === void 0 ? "noSkill" : _2; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^ +16> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = [2, "trimmer", "trimming"] +3 > +4 > numberB = -1 +5 > +6 > numberB = -1 +7 > , +8 > nameB = "helloNoName" +9 > +10> nameB = "helloNoName" +11> , +12> skillB = "noSkill" +13> +14> skillB = "noSkill" +15> ] = [2, "trimmer", "trimming"]; +1->Emitted(23, 1) Source(34, 1) + SourceIndex(0) +2 >Emitted(23, 32) Source(34, 87) + SourceIndex(0) +3 >Emitted(23, 34) Source(34, 2) + SourceIndex(0) +4 >Emitted(23, 44) Source(34, 14) + SourceIndex(0) +5 >Emitted(23, 46) Source(34, 2) + SourceIndex(0) +6 >Emitted(23, 79) Source(34, 14) + SourceIndex(0) +7 >Emitted(23, 81) Source(34, 16) + SourceIndex(0) +8 >Emitted(23, 91) Source(34, 37) + SourceIndex(0) +9 >Emitted(23, 93) Source(34, 16) + SourceIndex(0) +10>Emitted(23, 135) Source(34, 37) + SourceIndex(0) +11>Emitted(23, 137) Source(34, 39) + SourceIndex(0) +12>Emitted(23, 147) Source(34, 57) + SourceIndex(0) +13>Emitted(23, 149) Source(34, 39) + SourceIndex(0) +14>Emitted(23, 188) Source(34, 57) + SourceIndex(0) +15>Emitted(23, 189) Source(34, 88) + SourceIndex(0) +--- +>>>_3 = multiRobotB[0], nameMB = _3 === void 0 ? "helloNoName" : _3, _4 = multiRobotB[1], _5 = _4 === void 0 ? [] : _4, _6 = _5[0], primarySkillB = _6 === void 0 ? "noSkill" : _6, _7 = _5[1], secondarySkillB = _7 === void 0 ? "noSkill" : _7; +1-> +2 >^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +17> ^ +18> ^^^^^^^^^^^^^^^^^^-> +1-> + >[ +2 >nameMB = "helloNoName" +3 > +4 > nameMB = "helloNoName" +5 > , +6 > [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] +7 > +8 > [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] +9 > +10> primarySkillB = "noSkill" +11> +12> primarySkillB = "noSkill" +13> , +14> secondarySkillB = "noSkill" +15> +16> secondarySkillB = "noSkill" +17> ] = []] = multiRobotB; +1->Emitted(24, 1) Source(35, 2) + SourceIndex(0) +2 >Emitted(24, 20) Source(35, 24) + SourceIndex(0) +3 >Emitted(24, 22) Source(35, 2) + SourceIndex(0) +4 >Emitted(24, 65) Source(35, 24) + SourceIndex(0) +5 >Emitted(24, 67) Source(35, 26) + SourceIndex(0) +6 >Emitted(24, 86) Source(35, 87) + SourceIndex(0) +7 >Emitted(24, 88) Source(35, 26) + SourceIndex(0) +8 >Emitted(24, 116) Source(35, 87) + SourceIndex(0) +9 >Emitted(24, 118) Source(35, 27) + SourceIndex(0) +10>Emitted(24, 128) Source(35, 52) + SourceIndex(0) +11>Emitted(24, 130) Source(35, 27) + SourceIndex(0) +12>Emitted(24, 176) Source(35, 52) + SourceIndex(0) +13>Emitted(24, 178) Source(35, 54) + SourceIndex(0) +14>Emitted(24, 188) Source(35, 81) + SourceIndex(0) +15>Emitted(24, 190) Source(35, 54) + SourceIndex(0) +16>Emitted(24, 238) Source(35, 81) + SourceIndex(0) +17>Emitted(24, 239) Source(35, 103) + SourceIndex(0) +--- +>>>_8 = getMultiRobotB(), _9 = _8[0], nameMB = _9 === void 0 ? "helloNoName" : _9, _10 = _8[1], _11 = _10 === void 0 ? [] : _10, _12 = _11[0], primarySkillB = _12 === void 0 ? "noSkill" : _12, _13 = _11[1], secondarySkillB = _13 === void 0 ? "noSkill" : _13; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +19> ^ +20> ^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB() +3 > +4 > nameMB = "helloNoName" +5 > +6 > nameMB = "helloNoName" +7 > , +8 > [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] +9 > +10> [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] +11> +12> primarySkillB = "noSkill" +13> +14> primarySkillB = "noSkill" +15> , +16> secondarySkillB = "noSkill" +17> +18> secondarySkillB = "noSkill" +19> ] = []] = getMultiRobotB(); +1->Emitted(25, 1) Source(36, 1) + SourceIndex(0) +2 >Emitted(25, 22) Source(36, 107) + SourceIndex(0) +3 >Emitted(25, 24) Source(36, 2) + SourceIndex(0) +4 >Emitted(25, 34) Source(36, 24) + SourceIndex(0) +5 >Emitted(25, 36) Source(36, 2) + SourceIndex(0) +6 >Emitted(25, 79) Source(36, 24) + SourceIndex(0) +7 >Emitted(25, 81) Source(36, 26) + SourceIndex(0) +8 >Emitted(25, 92) Source(36, 87) + SourceIndex(0) +9 >Emitted(25, 94) Source(36, 26) + SourceIndex(0) +10>Emitted(25, 125) Source(36, 87) + SourceIndex(0) +11>Emitted(25, 127) Source(36, 27) + SourceIndex(0) +12>Emitted(25, 139) Source(36, 52) + SourceIndex(0) +13>Emitted(25, 141) Source(36, 27) + SourceIndex(0) +14>Emitted(25, 189) Source(36, 52) + SourceIndex(0) +15>Emitted(25, 191) Source(36, 54) + SourceIndex(0) +16>Emitted(25, 203) Source(36, 81) + SourceIndex(0) +17>Emitted(25, 205) Source(36, 54) + SourceIndex(0) +18>Emitted(25, 255) Source(36, 81) + SourceIndex(0) +19>Emitted(25, 256) Source(36, 108) + SourceIndex(0) +--- +>>>_14 = ["trimmer", ["trimming", "edging"]], _15 = _14[0], nameMB = _15 === void 0 ? "helloNoName" : _15, _16 = _14[1], _17 = _16 === void 0 ? [] : _16, _18 = _17[0], primarySkillB = _18 === void 0 ? "noSkill" : _18, _19 = _17[1], secondarySkillB = _19 === void 0 ? "noSkill" : _19; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +19> ^ +1-> + > +2 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = + > ["trimmer", ["trimming", "edging"]] +3 > +4 > nameMB = "helloNoName" +5 > +6 > nameMB = "helloNoName" +7 > , +8 > [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] +9 > +10> [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] +11> +12> primarySkillB = "noSkill" +13> +14> primarySkillB = "noSkill" +15> , +16> secondarySkillB = "noSkill" +17> +18> secondarySkillB = "noSkill" +19> ] = []] = + > ["trimmer", ["trimming", "edging"]]; +1->Emitted(26, 1) Source(37, 1) + SourceIndex(0) +2 >Emitted(26, 42) Source(38, 40) + SourceIndex(0) +3 >Emitted(26, 44) Source(37, 2) + SourceIndex(0) +4 >Emitted(26, 56) Source(37, 24) + SourceIndex(0) +5 >Emitted(26, 58) Source(37, 2) + SourceIndex(0) +6 >Emitted(26, 103) Source(37, 24) + SourceIndex(0) +7 >Emitted(26, 105) Source(37, 26) + SourceIndex(0) +8 >Emitted(26, 117) Source(37, 87) + SourceIndex(0) +9 >Emitted(26, 119) Source(37, 26) + SourceIndex(0) +10>Emitted(26, 150) Source(37, 87) + SourceIndex(0) +11>Emitted(26, 152) Source(37, 27) + SourceIndex(0) +12>Emitted(26, 164) Source(37, 52) + SourceIndex(0) +13>Emitted(26, 166) Source(37, 27) + SourceIndex(0) +14>Emitted(26, 214) Source(37, 52) + SourceIndex(0) +15>Emitted(26, 216) Source(37, 54) + SourceIndex(0) +16>Emitted(26, 228) Source(37, 81) + SourceIndex(0) +17>Emitted(26, 230) Source(37, 54) + SourceIndex(0) +18>Emitted(26, 280) Source(37, 81) + SourceIndex(0) +19>Emitted(26, 281) Source(38, 41) + SourceIndex(0) +--- +>>>_20 = robotB[0], numberB = _20 === void 0 ? -1 : _20, robotAInfo = robotB.slice(1); +1 > +2 >^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^ +8 > ^^^^^^^^^^^^^^-> +1 > + > + >[ +2 >numberB = -1 +3 > +4 > numberB = -1 +5 > , +6 > ...robotAInfo +7 > ] = robotB; +1 >Emitted(27, 1) Source(40, 2) + SourceIndex(0) +2 >Emitted(27, 16) Source(40, 14) + SourceIndex(0) +3 >Emitted(27, 18) Source(40, 2) + SourceIndex(0) +4 >Emitted(27, 53) Source(40, 14) + SourceIndex(0) +5 >Emitted(27, 55) Source(40, 16) + SourceIndex(0) +6 >Emitted(27, 83) Source(40, 29) + SourceIndex(0) +7 >Emitted(27, 84) Source(40, 40) + SourceIndex(0) +--- +>>>_21 = getRobotB(), _22 = _21[0], numberB = _22 === void 0 ? -1 : _22, robotAInfo = _21.slice(1); +1-> +2 >^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^ +10> ^^^^^^^^^^^^^^^^-> +1-> + > +2 >[numberB = -1, ...robotAInfo] = getRobotB() +3 > +4 > numberB = -1 +5 > +6 > numberB = -1 +7 > , +8 > ...robotAInfo +9 > ] = getRobotB(); +1->Emitted(28, 1) Source(41, 1) + SourceIndex(0) +2 >Emitted(28, 18) Source(41, 44) + SourceIndex(0) +3 >Emitted(28, 20) Source(41, 2) + SourceIndex(0) +4 >Emitted(28, 32) Source(41, 14) + SourceIndex(0) +5 >Emitted(28, 34) Source(41, 2) + SourceIndex(0) +6 >Emitted(28, 69) Source(41, 14) + SourceIndex(0) +7 >Emitted(28, 71) Source(41, 16) + SourceIndex(0) +8 >Emitted(28, 96) Source(41, 29) + SourceIndex(0) +9 >Emitted(28, 97) Source(41, 45) + SourceIndex(0) +--- +>>>_23 = [2, "trimmer", "trimming"], _24 = _23[0], numberB = _24 === void 0 ? -1 : _24, robotAInfo = _23.slice(1); +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^ +1-> + > +2 >[numberB = -1, ...robotAInfo] = [2, "trimmer", "trimming"] +3 > +4 > numberB = -1 +5 > +6 > numberB = -1 +7 > , +8 > ...robotAInfo +9 > ] = [2, "trimmer", "trimming"]; +1->Emitted(29, 1) Source(42, 1) + SourceIndex(0) +2 >Emitted(29, 33) Source(42, 66) + SourceIndex(0) +3 >Emitted(29, 35) Source(42, 2) + SourceIndex(0) +4 >Emitted(29, 47) Source(42, 14) + SourceIndex(0) +5 >Emitted(29, 49) Source(42, 2) + SourceIndex(0) +6 >Emitted(29, 84) Source(42, 14) + SourceIndex(0) +7 >Emitted(29, 86) Source(42, 16) + SourceIndex(0) +8 >Emitted(29, 111) Source(42, 29) + SourceIndex(0) +9 >Emitted(29, 112) Source(42, 67) + SourceIndex(0) +--- +>>>if (nameA == nameB) { +1 > +2 >^^ +3 > ^ +4 > ^ +5 > ^^^^^ +6 > ^^^^ +7 > ^^^^^ +8 > ^ +9 > ^ +10> ^ +11> ^^^^-> +1 > + > + > +2 >if +3 > +4 > ( +5 > nameA +6 > == +7 > nameB +8 > ) +9 > +10> { +1 >Emitted(30, 1) Source(44, 1) + SourceIndex(0) +2 >Emitted(30, 3) Source(44, 3) + SourceIndex(0) +3 >Emitted(30, 4) Source(44, 4) + SourceIndex(0) +4 >Emitted(30, 5) Source(44, 5) + SourceIndex(0) +5 >Emitted(30, 10) Source(44, 10) + SourceIndex(0) +6 >Emitted(30, 14) Source(44, 14) + SourceIndex(0) +7 >Emitted(30, 19) Source(44, 19) + SourceIndex(0) +8 >Emitted(30, 20) Source(44, 20) + SourceIndex(0) +9 >Emitted(30, 21) Source(44, 21) + SourceIndex(0) +10>Emitted(30, 22) Source(44, 22) + SourceIndex(0) +--- +>>> console.log(skillB); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1-> + > +2 > console +3 > . +4 > log +5 > ( +6 > skillB +7 > ) +8 > ; +1->Emitted(31, 5) Source(45, 5) + SourceIndex(0) +2 >Emitted(31, 12) Source(45, 12) + SourceIndex(0) +3 >Emitted(31, 13) Source(45, 13) + SourceIndex(0) +4 >Emitted(31, 16) Source(45, 16) + SourceIndex(0) +5 >Emitted(31, 17) Source(45, 17) + SourceIndex(0) +6 >Emitted(31, 23) Source(45, 23) + SourceIndex(0) +7 >Emitted(31, 24) Source(45, 24) + SourceIndex(0) +8 >Emitted(31, 25) Source(45, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(32, 1) Source(46, 1) + SourceIndex(0) +2 >Emitted(32, 2) Source(46, 2) + SourceIndex(0) +--- +>>>function getRobotB() { +1-> +2 >^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +1->Emitted(33, 1) Source(48, 1) + SourceIndex(0) +--- +>>> return robotB; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +1->function getRobotB() { + > +2 > return +3 > +4 > robotB +5 > ; +1->Emitted(34, 5) Source(49, 5) + SourceIndex(0) +2 >Emitted(34, 11) Source(49, 11) + SourceIndex(0) +3 >Emitted(34, 12) Source(49, 12) + SourceIndex(0) +4 >Emitted(34, 18) Source(49, 18) + SourceIndex(0) +5 >Emitted(34, 19) Source(49, 19) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(35, 1) Source(50, 1) + SourceIndex(0) +2 >Emitted(35, 2) Source(50, 2) + SourceIndex(0) +--- +>>>function getMultiRobotB() { +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +1->Emitted(36, 1) Source(52, 1) + SourceIndex(0) +--- +>>> return multiRobotB; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^ +5 > ^ +1->function getMultiRobotB() { + > +2 > return +3 > +4 > multiRobotB +5 > ; +1->Emitted(37, 5) Source(53, 5) + SourceIndex(0) +2 >Emitted(37, 11) Source(53, 11) + SourceIndex(0) +3 >Emitted(37, 12) Source(53, 12) + SourceIndex(0) +4 >Emitted(37, 23) Source(53, 23) + SourceIndex(0) +5 >Emitted(37, 24) Source(53, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(38, 1) Source(54, 1) + SourceIndex(0) +2 >Emitted(38, 2) Source(54, 2) + SourceIndex(0) +--- +>>>var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24; +>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.symbols b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.symbols new file mode 100644 index 00000000000..c4d6b52fc4a --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.symbols @@ -0,0 +1,167 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 0, 11)) + + log(msg: any): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 1, 8)) +} +type Robot = [number, string, string]; +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 2, 1)) + +type MultiSkilledRobot = [string, string[]]; +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 3, 38)) + +var robotA: Robot = [1, "mower", "mowing"]; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 6, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 2, 1)) + +var robotB: Robot = [2, "trimmer", "trimming"]; +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 7, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 2, 1)) + +var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 8, 3)) +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 3, 38)) + +var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 9, 3)) +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 3, 38)) + +let nameA: string, numberB: number, nameB: string, skillB: string; +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 3)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 18)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 35)) +>skillB : Symbol(skillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 50)) + +let robotAInfo: (number | string)[]; +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 12, 3)) + +let multiSkillB: string[], nameMB: string, primarySkillB: string, secondarySkillB: string; +>multiSkillB : Symbol(multiSkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 3)) +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 26)) +>primarySkillB : Symbol(primarySkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 42)) +>secondarySkillB : Symbol(secondarySkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 65)) + +let multiRobotAInfo: (string | string[])[]; +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 15, 3)) + +[, nameA = "helloNoName"] = robotA; +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 3)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 6, 3)) + +[, nameB = "helloNoName"] = getRobotB(); +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 35)) +>getRobotB : Symbol(getRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 45, 1)) + +[, nameB = "helloNoName"] = [2, "trimmer", "trimming"]; +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 35)) + +[, multiSkillB = []] = multiRobotB; +>multiSkillB : Symbol(multiSkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 3)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 9, 3)) + +[, multiSkillB = []] = getMultiRobotB(); +>multiSkillB : Symbol(multiSkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 3)) +>getMultiRobotB : Symbol(getMultiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 49, 1)) + +[, multiSkillB = []] = ["roomba", ["vaccum", "mopping"]]; +>multiSkillB : Symbol(multiSkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 3)) + +[numberB = -1] = robotB; +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 18)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 7, 3)) + +[numberB = -1] = getRobotB(); +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 18)) +>getRobotB : Symbol(getRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 45, 1)) + +[numberB = -1] = [2, "trimmer", "trimming"]; +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 18)) + +[nameMB = "helloNoName"] = multiRobotB; +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 26)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 9, 3)) + +[nameMB = "helloNoName"] = getMultiRobotB(); +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 26)) +>getMultiRobotB : Symbol(getMultiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 49, 1)) + +[nameMB = "helloNoName"] = ["trimmer", ["trimming", "edging"]]; +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 26)) + +[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = robotB; +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 18)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 35)) +>skillB : Symbol(skillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 50)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 7, 3)) + +[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = getRobotB(); +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 18)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 35)) +>skillB : Symbol(skillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 50)) +>getRobotB : Symbol(getRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 45, 1)) + +[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = [2, "trimmer", "trimming"]; +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 18)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 35)) +>skillB : Symbol(skillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 50)) + +[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB; +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 26)) +>primarySkillB : Symbol(primarySkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 42)) +>secondarySkillB : Symbol(secondarySkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 65)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 9, 3)) + +[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB(); +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 26)) +>primarySkillB : Symbol(primarySkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 42)) +>secondarySkillB : Symbol(secondarySkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 65)) +>getMultiRobotB : Symbol(getMultiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 49, 1)) + +[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 26)) +>primarySkillB : Symbol(primarySkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 42)) +>secondarySkillB : Symbol(secondarySkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 65)) + + ["trimmer", ["trimming", "edging"]]; + +[numberB = -1, ...robotAInfo] = robotB; +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 18)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 12, 3)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 7, 3)) + +[numberB = -1, ...robotAInfo] = getRobotB(); +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 18)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 12, 3)) +>getRobotB : Symbol(getRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 45, 1)) + +[numberB = -1, ...robotAInfo] = [2, "trimmer", "trimming"]; +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 18)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 12, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 2, 1)) + +if (nameA == nameB) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 3)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 35)) + + console.log(skillB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 0, 22)) +>skillB : Symbol(skillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 50)) +} + +function getRobotB() { +>getRobotB : Symbol(getRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 45, 1)) + + return robotB; +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 7, 3)) +} + +function getMultiRobotB() { +>getMultiRobotB : Symbol(getMultiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 49, 1)) + + return multiRobotB; +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 9, 3)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.types new file mode 100644 index 00000000000..7edf6c63e4a --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.types @@ -0,0 +1,361 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts === +declare var console: { +>console : { log(msg: any): void; } + + log(msg: any): void; +>log : (msg: any) => void +>msg : any +} +type Robot = [number, string, string]; +>Robot : [number, string, string] + +type MultiSkilledRobot = [string, string[]]; +>MultiSkilledRobot : [string, string[]] + +var robotA: Robot = [1, "mower", "mowing"]; +>robotA : [number, string, string] +>Robot : [number, string, string] +>[1, "mower", "mowing"] : [number, string, string] +>1 : number +>"mower" : string +>"mowing" : string + +var robotB: Robot = [2, "trimmer", "trimming"]; +>robotB : [number, string, string] +>Robot : [number, string, string] +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + +var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +>multiRobotA : [string, string[]] +>MultiSkilledRobot : [string, string[]] +>["mower", ["mowing", ""]] : [string, string[]] +>"mower" : string +>["mowing", ""] : string[] +>"mowing" : string +>"" : string + +var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +>multiRobotB : [string, string[]] +>MultiSkilledRobot : [string, string[]] +>["trimmer", ["trimming", "edging"]] : [string, string[]] +>"trimmer" : string +>["trimming", "edging"] : string[] +>"trimming" : string +>"edging" : string + +let nameA: string, numberB: number, nameB: string, skillB: string; +>nameA : string +>numberB : number +>nameB : string +>skillB : string + +let robotAInfo: (number | string)[]; +>robotAInfo : (number | string)[] + +let multiSkillB: string[], nameMB: string, primarySkillB: string, secondarySkillB: string; +>multiSkillB : string[] +>nameMB : string +>primarySkillB : string +>secondarySkillB : string + +let multiRobotAInfo: (string | string[])[]; +>multiRobotAInfo : (string | string[])[] + +[, nameA = "helloNoName"] = robotA; +>[, nameA = "helloNoName"] = robotA : [number, string, string] +>[, nameA = "helloNoName"] : [undefined, string] +> : undefined +>nameA = "helloNoName" : string +>nameA : string +>"helloNoName" : string +>robotA : [number, string, string] + +[, nameB = "helloNoName"] = getRobotB(); +>[, nameB = "helloNoName"] = getRobotB() : [number, string, string] +>[, nameB = "helloNoName"] : [undefined, string] +> : undefined +>nameB = "helloNoName" : string +>nameB : string +>"helloNoName" : string +>getRobotB() : [number, string, string] +>getRobotB : () => [number, string, string] + +[, nameB = "helloNoName"] = [2, "trimmer", "trimming"]; +>[, nameB = "helloNoName"] = [2, "trimmer", "trimming"] : [number, string, string] +>[, nameB = "helloNoName"] : [undefined, string] +> : undefined +>nameB = "helloNoName" : string +>nameB : string +>"helloNoName" : string +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + +[, multiSkillB = []] = multiRobotB; +>[, multiSkillB = []] = multiRobotB : [string, string[]] +>[, multiSkillB = []] : [undefined, undefined[]] +> : undefined +>multiSkillB = [] : undefined[] +>multiSkillB : string[] +>[] : undefined[] +>multiRobotB : [string, string[]] + +[, multiSkillB = []] = getMultiRobotB(); +>[, multiSkillB = []] = getMultiRobotB() : [string, string[]] +>[, multiSkillB = []] : [undefined, undefined[]] +> : undefined +>multiSkillB = [] : undefined[] +>multiSkillB : string[] +>[] : undefined[] +>getMultiRobotB() : [string, string[]] +>getMultiRobotB : () => [string, string[]] + +[, multiSkillB = []] = ["roomba", ["vaccum", "mopping"]]; +>[, multiSkillB = []] = ["roomba", ["vaccum", "mopping"]] : [string, string[]] +>[, multiSkillB = []] : [undefined, undefined[]] +> : undefined +>multiSkillB = [] : undefined[] +>multiSkillB : string[] +>[] : undefined[] +>["roomba", ["vaccum", "mopping"]] : [string, string[]] +>"roomba" : string +>["vaccum", "mopping"] : string[] +>"vaccum" : string +>"mopping" : string + +[numberB = -1] = robotB; +>[numberB = -1] = robotB : [number, string, string] +>[numberB = -1] : [number] +>numberB = -1 : number +>numberB : number +>-1 : number +>1 : number +>robotB : [number, string, string] + +[numberB = -1] = getRobotB(); +>[numberB = -1] = getRobotB() : [number, string, string] +>[numberB = -1] : [number] +>numberB = -1 : number +>numberB : number +>-1 : number +>1 : number +>getRobotB() : [number, string, string] +>getRobotB : () => [number, string, string] + +[numberB = -1] = [2, "trimmer", "trimming"]; +>[numberB = -1] = [2, "trimmer", "trimming"] : [number, string, string] +>[numberB = -1] : [number] +>numberB = -1 : number +>numberB : number +>-1 : number +>1 : number +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + +[nameMB = "helloNoName"] = multiRobotB; +>[nameMB = "helloNoName"] = multiRobotB : [string, string[]] +>[nameMB = "helloNoName"] : [string] +>nameMB = "helloNoName" : string +>nameMB : string +>"helloNoName" : string +>multiRobotB : [string, string[]] + +[nameMB = "helloNoName"] = getMultiRobotB(); +>[nameMB = "helloNoName"] = getMultiRobotB() : [string, string[]] +>[nameMB = "helloNoName"] : [string] +>nameMB = "helloNoName" : string +>nameMB : string +>"helloNoName" : string +>getMultiRobotB() : [string, string[]] +>getMultiRobotB : () => [string, string[]] + +[nameMB = "helloNoName"] = ["trimmer", ["trimming", "edging"]]; +>[nameMB = "helloNoName"] = ["trimmer", ["trimming", "edging"]] : [string, string[]] +>[nameMB = "helloNoName"] : [string] +>nameMB = "helloNoName" : string +>nameMB : string +>"helloNoName" : string +>["trimmer", ["trimming", "edging"]] : [string, string[]] +>"trimmer" : string +>["trimming", "edging"] : string[] +>"trimming" : string +>"edging" : string + +[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = robotB; +>[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = robotB : [number, string, string] +>[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] : [number, string, string] +>numberB = -1 : number +>numberB : number +>-1 : number +>1 : number +>nameB = "helloNoName" : string +>nameB : string +>"helloNoName" : string +>skillB = "noSkill" : string +>skillB : string +>"noSkill" : string +>robotB : [number, string, string] + +[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = getRobotB(); +>[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = getRobotB() : [number, string, string] +>[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] : [number, string, string] +>numberB = -1 : number +>numberB : number +>-1 : number +>1 : number +>nameB = "helloNoName" : string +>nameB : string +>"helloNoName" : string +>skillB = "noSkill" : string +>skillB : string +>"noSkill" : string +>getRobotB() : [number, string, string] +>getRobotB : () => [number, string, string] + +[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = [2, "trimmer", "trimming"]; +>[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = [2, "trimmer", "trimming"] : [number, string, string] +>[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] : [number, string, string] +>numberB = -1 : number +>numberB : number +>-1 : number +>1 : number +>nameB = "helloNoName" : string +>nameB : string +>"helloNoName" : string +>skillB = "noSkill" : string +>skillB : string +>"noSkill" : string +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + +[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB; +>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB : [string, string[]] +>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] : [string, [string, string]] +>nameMB = "helloNoName" : string +>nameMB : string +>"helloNoName" : string +>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] : [string, string] +>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] : [string, string] +>primarySkillB = "noSkill" : string +>primarySkillB : string +>"noSkill" : string +>secondarySkillB = "noSkill" : string +>secondarySkillB : string +>"noSkill" : string +>[] : [string, string] +>multiRobotB : [string, string[]] + +[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB(); +>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB() : [string, string[]] +>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] : [string, [string, string]] +>nameMB = "helloNoName" : string +>nameMB : string +>"helloNoName" : string +>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] : [string, string] +>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] : [string, string] +>primarySkillB = "noSkill" : string +>primarySkillB : string +>"noSkill" : string +>secondarySkillB = "noSkill" : string +>secondarySkillB : string +>"noSkill" : string +>[] : [string, string] +>getMultiRobotB() : [string, string[]] +>getMultiRobotB : () => [string, string[]] + +[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = +>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = ["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] : [string, [string, string]] +>nameMB = "helloNoName" : string +>nameMB : string +>"helloNoName" : string +>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] : [string, string] +>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] : [string, string] +>primarySkillB = "noSkill" : string +>primarySkillB : string +>"noSkill" : string +>secondarySkillB = "noSkill" : string +>secondarySkillB : string +>"noSkill" : string +>[] : [string, string] + + ["trimmer", ["trimming", "edging"]]; +>["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>"trimmer" : string +>["trimming", "edging"] : [string, string] +>"trimming" : string +>"edging" : string + +[numberB = -1, ...robotAInfo] = robotB; +>[numberB = -1, ...robotAInfo] = robotB : [number, string, string] +>[numberB = -1, ...robotAInfo] : (number | string)[] +>numberB = -1 : number +>numberB : number +>-1 : number +>1 : number +>...robotAInfo : number | string +>robotAInfo : (number | string)[] +>robotB : [number, string, string] + +[numberB = -1, ...robotAInfo] = getRobotB(); +>[numberB = -1, ...robotAInfo] = getRobotB() : [number, string, string] +>[numberB = -1, ...robotAInfo] : (number | string)[] +>numberB = -1 : number +>numberB : number +>-1 : number +>1 : number +>...robotAInfo : number | string +>robotAInfo : (number | string)[] +>getRobotB() : [number, string, string] +>getRobotB : () => [number, string, string] + +[numberB = -1, ...robotAInfo] = [2, "trimmer", "trimming"]; +>[numberB = -1, ...robotAInfo] = [2, "trimmer", "trimming"] : [number, string, string] +>[numberB = -1, ...robotAInfo] : (number | string)[] +>numberB = -1 : number +>numberB : number +>-1 : number +>1 : number +>...robotAInfo : number | string +>robotAInfo : (number | string)[] +>[2, "trimmer", "trimming"] : [number, string, string] +>Robot : [number, string, string] +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + +if (nameA == nameB) { +>nameA == nameB : boolean +>nameA : string +>nameB : string + + console.log(skillB); +>console.log(skillB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>skillB : string +} + +function getRobotB() { +>getRobotB : () => [number, string, string] + + return robotB; +>robotB : [number, string, string] +} + +function getMultiRobotB() { +>getMultiRobotB : () => [string, string[]] + + return multiRobotB; +>multiRobotB : [string, string[]] +} diff --git a/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts new file mode 100644 index 00000000000..253d96d4b35 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts @@ -0,0 +1,55 @@ +// @sourcemap: true +declare var console: { + log(msg: any): void; +} +type Robot = [number, string, string]; +type MultiSkilledRobot = [string, string[]]; + +var robotA: Robot = [1, "mower", "mowing"]; +var robotB: Robot = [2, "trimmer", "trimming"]; +var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; + +let nameA: string, numberB: number, nameB: string, skillB: string; +let robotAInfo: (number | string)[]; + +let multiSkillB: string[], nameMB: string, primarySkillB: string, secondarySkillB: string; +let multiRobotAInfo: (string | string[])[]; + +[, nameA = "helloNoName"] = robotA; +[, nameB = "helloNoName"] = getRobotB(); +[, nameB = "helloNoName"] = [2, "trimmer", "trimming"]; +[, multiSkillB = []] = multiRobotB; +[, multiSkillB = []] = getMultiRobotB(); +[, multiSkillB = []] = ["roomba", ["vaccum", "mopping"]]; + +[numberB = -1] = robotB; +[numberB = -1] = getRobotB(); +[numberB = -1] = [2, "trimmer", "trimming"]; +[nameMB = "helloNoName"] = multiRobotB; +[nameMB = "helloNoName"] = getMultiRobotB(); +[nameMB = "helloNoName"] = ["trimmer", ["trimming", "edging"]]; + +[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = robotB; +[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = getRobotB(); +[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = [2, "trimmer", "trimming"]; +[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB; +[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB(); +[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = + ["trimmer", ["trimming", "edging"]]; + +[numberB = -1, ...robotAInfo] = robotB; +[numberB = -1, ...robotAInfo] = getRobotB(); +[numberB = -1, ...robotAInfo] = [2, "trimmer", "trimming"]; + +if (nameA == nameB) { + console.log(skillB); +} + +function getRobotB() { + return robotB; +} + +function getMultiRobotB() { + return multiRobotB; +} \ No newline at end of file From 25c6b168941eb91c216f2540a6bec35f7a8d0c9b Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 11 Dec 2015 13:54:49 -0800 Subject: [PATCH 054/209] Test cases for destructuring with default values in parameter position --- ...NestedObjectBindingPatternDefaultValues.js | 67 ++ ...edObjectBindingPatternDefaultValues.js.map | 2 + ...tBindingPatternDefaultValues.sourcemap.txt | 669 ++++++++++++++++++ ...dObjectBindingPatternDefaultValues.symbols | 143 ++++ ...tedObjectBindingPatternDefaultValues.types | 219 ++++++ ...ameterObjectBindingPatternDefaultValues.js | 53 ++ ...erObjectBindingPatternDefaultValues.js.map | 2 + ...tBindingPatternDefaultValues.sourcemap.txt | 500 +++++++++++++ ...rObjectBindingPatternDefaultValues.symbols | 91 +++ ...terObjectBindingPatternDefaultValues.types | 120 ++++ ...ametertArrayBindingPatternDefaultValues.js | 62 ++ ...ertArrayBindingPatternDefaultValues.js.map | 2 + ...yBindingPatternDefaultValues.sourcemap.txt | 610 ++++++++++++++++ ...rtArrayBindingPatternDefaultValues.symbols | 94 +++ ...tertArrayBindingPatternDefaultValues.types | 156 ++++ ...metertArrayBindingPatternDefaultValues2.js | 52 ++ ...rtArrayBindingPatternDefaultValues2.js.map | 2 + ...BindingPatternDefaultValues2.sourcemap.txt | 512 ++++++++++++++ ...tArrayBindingPatternDefaultValues2.symbols | 80 +++ ...ertArrayBindingPatternDefaultValues2.types | 139 ++++ ...NestedObjectBindingPatternDefaultValues.ts | 44 ++ ...ameterObjectBindingPatternDefaultValues.ts | 29 + ...ametertArrayBindingPatternDefaultValues.ts | 34 + ...metertArrayBindingPatternDefaultValues2.ts | 30 + 24 files changed, 3712 insertions(+) create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.types create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.types create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.types create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.types create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.js b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.js new file mode 100644 index 00000000000..b67f5047965 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.js @@ -0,0 +1,67 @@ +//// [sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts] +declare var console: { + log(msg: string): void; +} +interface Robot { + name: string; + skills: { + primary?: string; + secondary?: string; + }; +} +var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; + +function foo1( + { + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "SomeSkill", secondary: "someSkill" } + }: Robot = robotA) { + console.log(primaryA); +} +function foo2( + { + name: nameC = "name", + skills: { + primary: primaryB = "primary", + secondary: secondaryB = "secondary" + } = { primary: "SomeSkill", secondary: "someSkill" } + }: Robot = robotA) { + console.log(secondaryB); +} +function foo3({ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA) { + console.log(skills.primary); +} + +foo1(robotA); +foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); + +foo2(robotA); +foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); + +foo3(robotA); +foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); + + +//// [sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.js] +var robotA = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +function foo1(_a) { + var _b = (_a === void 0 ? robotA : _a).skills, _c = _b === void 0 ? { primary: "SomeSkill", secondary: "someSkill" } : _b, _d = _c.primary, primaryA = _d === void 0 ? "primary" : _d, _e = _c.secondary, secondaryA = _e === void 0 ? "secondary" : _e; + console.log(primaryA); +} +function foo2(_a) { + var _b = _a === void 0 ? robotA : _a, _c = _b.name, nameC = _c === void 0 ? "name" : _c, _d = _b.skills, _e = _d === void 0 ? { primary: "SomeSkill", secondary: "someSkill" } : _d, _f = _e.primary, primaryB = _f === void 0 ? "primary" : _f, _g = _e.secondary, secondaryB = _g === void 0 ? "secondary" : _g; + console.log(secondaryB); +} +function foo3(_a) { + var _b = (_a === void 0 ? robotA : _a).skills, skills = _b === void 0 ? { primary: "SomeSkill", secondary: "someSkill" } : _b; + console.log(skills.primary); +} +foo1(robotA); +foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +foo2(robotA); +foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +foo3(robotA); +foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +//# sourceMappingURL=sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.js.map b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.js.map new file mode 100644 index 00000000000..0fdd3c9bcec --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.js.map] +{"version":3,"file":"sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.js","sourceRoot":"","sources":["sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.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;AAExF,cACI,EAKiB;QAJb,yCAGoD,EAHpD,0EAGoD,EAFhD,eAA6B,EAA7B,yCAA6B,EAC7B,iBAAmC,EAAnC,6CAAmC;IAG3C,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,cACI,EAMiB;QANjB,gCAMiB,EALb,YAAoB,EAApB,mCAAoB,EACpB,cAGoD,EAHpD,0EAGoD,EAFhD,eAA6B,EAA7B,yCAA6B,EAC7B,iBAAmC,EAAnC,6CAAmC;IAG3C,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AAC5B,CAAC;AACD,cAAc,EAA8E;QAA5E,yCAAyD,EAAzD,8EAAyD;IACrE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAChC,CAAC;AAED,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,iBAAiB,EAAE,EAAE,CAAC,CAAC;AAErF,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,iBAAiB,EAAE,EAAE,CAAC,CAAC;AAErF,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,iBAAiB,EAAE,EAAE,CAAC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.sourcemap.txt new file mode 100644 index 00000000000..aca1d58bcac --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.sourcemap.txt @@ -0,0 +1,669 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.js +mapUrl: sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.js.map +sourceRoot: +sources: sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.js +sourceFile:sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts +------------------------------------------------------------------- +>>>var robotA = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^^ +6 > ^^^^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^^ +12> ^^ +13> ^^^^^^^ +14> ^^ +15> ^^^^^^^^ +16> ^^ +17> ^^^^^^^^^ +18> ^^ +19> ^^^^^^ +20> ^^ +21> ^^ +22> ^ +1 >declare var console: { + > log(msg: string): void; + >} + >interface Robot { + > name: string; + > skills: { + > primary?: string; + > secondary?: string; + > }; + >} + > +2 >var +3 > robotA +4 > : Robot = +5 > { +6 > name +7 > : +8 > "mower" +9 > , +10> skills +11> : +12> { +13> primary +14> : +15> "mowing" +16> , +17> secondary +18> : +19> "none" +20> } +21> } +22> ; +1 >Emitted(1, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(11, 5) + SourceIndex(0) +3 >Emitted(1, 11) Source(11, 11) + SourceIndex(0) +4 >Emitted(1, 14) Source(11, 21) + SourceIndex(0) +5 >Emitted(1, 16) Source(11, 23) + SourceIndex(0) +6 >Emitted(1, 20) Source(11, 27) + SourceIndex(0) +7 >Emitted(1, 22) Source(11, 29) + SourceIndex(0) +8 >Emitted(1, 29) Source(11, 36) + SourceIndex(0) +9 >Emitted(1, 31) Source(11, 38) + SourceIndex(0) +10>Emitted(1, 37) Source(11, 44) + SourceIndex(0) +11>Emitted(1, 39) Source(11, 46) + SourceIndex(0) +12>Emitted(1, 41) Source(11, 48) + SourceIndex(0) +13>Emitted(1, 48) Source(11, 55) + SourceIndex(0) +14>Emitted(1, 50) Source(11, 57) + SourceIndex(0) +15>Emitted(1, 58) Source(11, 65) + SourceIndex(0) +16>Emitted(1, 60) Source(11, 67) + SourceIndex(0) +17>Emitted(1, 69) Source(11, 76) + SourceIndex(0) +18>Emitted(1, 71) Source(11, 78) + SourceIndex(0) +19>Emitted(1, 77) Source(11, 84) + SourceIndex(0) +20>Emitted(1, 79) Source(11, 86) + SourceIndex(0) +21>Emitted(1, 81) Source(11, 88) + SourceIndex(0) +22>Emitted(1, 82) Source(11, 89) + SourceIndex(0) +--- +>>>function foo1(_a) { +1 > +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >function foo1( + > +3 > { + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "SomeSkill", secondary: "someSkill" } + > }: Robot = robotA +1 >Emitted(2, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(2, 15) Source(14, 5) + SourceIndex(0) +3 >Emitted(2, 17) Source(19, 22) + SourceIndex(0) +--- +>>> var _b = (_a === void 0 ? robotA : _a).skills, _c = _b === void 0 ? { primary: "SomeSkill", secondary: "someSkill" } : _b, _d = _c.primary, primaryA = _d === void 0 ? "primary" : _d, _e = _c.secondary, secondaryA = _e === void 0 ? "secondary" : _e; +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "SomeSkill", secondary: "someSkill" } +3 > +4 > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "SomeSkill", secondary: "someSkill" } +5 > +6 > primary: primaryA = "primary" +7 > +8 > primary: primaryA = "primary" +9 > , + > +10> secondary: secondaryA = "secondary" +11> +12> secondary: secondaryA = "secondary" +1->Emitted(3, 9) Source(15, 9) + SourceIndex(0) +2 >Emitted(3, 50) Source(18, 61) + SourceIndex(0) +3 >Emitted(3, 52) Source(15, 9) + SourceIndex(0) +4 >Emitted(3, 126) Source(18, 61) + SourceIndex(0) +5 >Emitted(3, 128) Source(16, 13) + SourceIndex(0) +6 >Emitted(3, 143) Source(16, 42) + SourceIndex(0) +7 >Emitted(3, 145) Source(16, 13) + SourceIndex(0) +8 >Emitted(3, 186) Source(16, 42) + SourceIndex(0) +9 >Emitted(3, 188) Source(17, 13) + SourceIndex(0) +10>Emitted(3, 205) Source(17, 48) + SourceIndex(0) +11>Emitted(3, 207) Source(17, 13) + SourceIndex(0) +12>Emitted(3, 252) Source(17, 48) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > } = { primary: "SomeSkill", secondary: "someSkill" } + > }: Robot = robotA) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(4, 5) Source(20, 5) + SourceIndex(0) +2 >Emitted(4, 12) Source(20, 12) + SourceIndex(0) +3 >Emitted(4, 13) Source(20, 13) + SourceIndex(0) +4 >Emitted(4, 16) Source(20, 16) + SourceIndex(0) +5 >Emitted(4, 17) Source(20, 17) + SourceIndex(0) +6 >Emitted(4, 25) Source(20, 25) + SourceIndex(0) +7 >Emitted(4, 26) Source(20, 26) + SourceIndex(0) +8 >Emitted(4, 27) Source(20, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(5, 1) Source(21, 1) + SourceIndex(0) +2 >Emitted(5, 2) Source(21, 2) + SourceIndex(0) +--- +>>>function foo2(_a) { +1-> +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >function foo2( + > +3 > { + > name: nameC = "name", + > skills: { + > primary: primaryB = "primary", + > secondary: secondaryB = "secondary" + > } = { primary: "SomeSkill", secondary: "someSkill" } + > }: Robot = robotA +1->Emitted(6, 1) Source(22, 1) + SourceIndex(0) +2 >Emitted(6, 15) Source(23, 5) + SourceIndex(0) +3 >Emitted(6, 17) Source(29, 22) + SourceIndex(0) +--- +>>> var _b = _a === void 0 ? robotA : _a, _c = _b.name, nameC = _c === void 0 ? "name" : _c, _d = _b.skills, _e = _d === void 0 ? { primary: "SomeSkill", secondary: "someSkill" } : _d, _f = _e.primary, primaryB = _f === void 0 ? "primary" : _f, _g = _e.secondary, secondaryB = _g === void 0 ? "secondary" : _g; +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > { + > name: nameC = "name", + > skills: { + > primary: primaryB = "primary", + > secondary: secondaryB = "secondary" + > } = { primary: "SomeSkill", secondary: "someSkill" } + > }: Robot = robotA +3 > +4 > name: nameC = "name" +5 > +6 > name: nameC = "name" +7 > , + > +8 > skills: { + > primary: primaryB = "primary", + > secondary: secondaryB = "secondary" + > } = { primary: "SomeSkill", secondary: "someSkill" } +9 > +10> skills: { + > primary: primaryB = "primary", + > secondary: secondaryB = "secondary" + > } = { primary: "SomeSkill", secondary: "someSkill" } +11> +12> primary: primaryB = "primary" +13> +14> primary: primaryB = "primary" +15> , + > +16> secondary: secondaryB = "secondary" +17> +18> secondary: secondaryB = "secondary" +1->Emitted(7, 9) Source(23, 5) + SourceIndex(0) +2 >Emitted(7, 41) Source(29, 22) + SourceIndex(0) +3 >Emitted(7, 43) Source(24, 9) + SourceIndex(0) +4 >Emitted(7, 55) Source(24, 29) + SourceIndex(0) +5 >Emitted(7, 57) Source(24, 9) + SourceIndex(0) +6 >Emitted(7, 92) Source(24, 29) + SourceIndex(0) +7 >Emitted(7, 94) Source(25, 9) + SourceIndex(0) +8 >Emitted(7, 108) Source(28, 61) + SourceIndex(0) +9 >Emitted(7, 110) Source(25, 9) + SourceIndex(0) +10>Emitted(7, 184) Source(28, 61) + SourceIndex(0) +11>Emitted(7, 186) Source(26, 13) + SourceIndex(0) +12>Emitted(7, 201) Source(26, 42) + SourceIndex(0) +13>Emitted(7, 203) Source(26, 13) + SourceIndex(0) +14>Emitted(7, 244) Source(26, 42) + SourceIndex(0) +15>Emitted(7, 246) Source(27, 13) + SourceIndex(0) +16>Emitted(7, 263) Source(27, 48) + SourceIndex(0) +17>Emitted(7, 265) Source(27, 13) + SourceIndex(0) +18>Emitted(7, 310) Source(27, 48) + SourceIndex(0) +--- +>>> console.log(secondaryB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^ +7 > ^ +8 > ^ +1 > + > } = { primary: "SomeSkill", secondary: "someSkill" } + > }: Robot = robotA) { + > +2 > console +3 > . +4 > log +5 > ( +6 > secondaryB +7 > ) +8 > ; +1 >Emitted(8, 5) Source(30, 5) + SourceIndex(0) +2 >Emitted(8, 12) Source(30, 12) + SourceIndex(0) +3 >Emitted(8, 13) Source(30, 13) + SourceIndex(0) +4 >Emitted(8, 16) Source(30, 16) + SourceIndex(0) +5 >Emitted(8, 17) Source(30, 17) + SourceIndex(0) +6 >Emitted(8, 27) Source(30, 27) + SourceIndex(0) +7 >Emitted(8, 28) Source(30, 28) + SourceIndex(0) +8 >Emitted(8, 29) Source(30, 29) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(9, 1) Source(31, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(31, 2) + SourceIndex(0) +--- +>>>function foo3(_a) { +1-> +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >function foo3( +3 > { skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA +1->Emitted(10, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(10, 15) Source(32, 15) + SourceIndex(0) +3 >Emitted(10, 17) Source(32, 93) + SourceIndex(0) +--- +>>> var _b = (_a === void 0 ? robotA : _a).skills, skills = _b === void 0 ? { primary: "SomeSkill", secondary: "someSkill" } : _b; +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > skills = { primary: "SomeSkill", secondary: "someSkill" } +3 > +4 > skills = { primary: "SomeSkill", secondary: "someSkill" } +1->Emitted(11, 9) Source(32, 17) + SourceIndex(0) +2 >Emitted(11, 50) Source(32, 74) + SourceIndex(0) +3 >Emitted(11, 52) Source(32, 17) + SourceIndex(0) +4 >Emitted(11, 130) Source(32, 74) + SourceIndex(0) +--- +>>> console.log(skills.primary); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^^^^^^^ +9 > ^ +10> ^ +1 > }: Robot = robotA) { + > +2 > console +3 > . +4 > log +5 > ( +6 > skills +7 > . +8 > primary +9 > ) +10> ; +1 >Emitted(12, 5) Source(33, 5) + SourceIndex(0) +2 >Emitted(12, 12) Source(33, 12) + SourceIndex(0) +3 >Emitted(12, 13) Source(33, 13) + SourceIndex(0) +4 >Emitted(12, 16) Source(33, 16) + SourceIndex(0) +5 >Emitted(12, 17) Source(33, 17) + SourceIndex(0) +6 >Emitted(12, 23) Source(33, 23) + SourceIndex(0) +7 >Emitted(12, 24) Source(33, 24) + SourceIndex(0) +8 >Emitted(12, 31) Source(33, 31) + SourceIndex(0) +9 >Emitted(12, 32) Source(33, 32) + SourceIndex(0) +10>Emitted(12, 33) Source(33, 33) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(13, 1) Source(34, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(34, 2) + SourceIndex(0) +--- +>>>foo1(robotA); +1-> +2 >^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +2 >foo1 +3 > ( +4 > robotA +5 > ) +6 > ; +1->Emitted(14, 1) Source(36, 1) + SourceIndex(0) +2 >Emitted(14, 5) Source(36, 5) + SourceIndex(0) +3 >Emitted(14, 6) Source(36, 6) + SourceIndex(0) +4 >Emitted(14, 12) Source(36, 12) + SourceIndex(0) +5 >Emitted(14, 13) Source(36, 13) + SourceIndex(0) +6 >Emitted(14, 14) Source(36, 14) + SourceIndex(0) +--- +>>>foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +1-> +2 >^^^^ +3 > ^ +4 > ^^ +5 > ^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^ +9 > ^^^^^^ +10> ^^ +11> ^^ +12> ^^^^^^^ +13> ^^ +14> ^^^^^^^^ +15> ^^ +16> ^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^ +19> ^^ +20> ^^ +21> ^ +22> ^ +1-> + > +2 >foo1 +3 > ( +4 > { +5 > name +6 > : +7 > "Edger" +8 > , +9 > skills +10> : +11> { +12> primary +13> : +14> "edging" +15> , +16> secondary +17> : +18> "branch trimming" +19> } +20> } +21> ) +22> ; +1->Emitted(15, 1) Source(37, 1) + SourceIndex(0) +2 >Emitted(15, 5) Source(37, 5) + SourceIndex(0) +3 >Emitted(15, 6) Source(37, 6) + SourceIndex(0) +4 >Emitted(15, 8) Source(37, 8) + SourceIndex(0) +5 >Emitted(15, 12) Source(37, 12) + SourceIndex(0) +6 >Emitted(15, 14) Source(37, 14) + SourceIndex(0) +7 >Emitted(15, 21) Source(37, 21) + SourceIndex(0) +8 >Emitted(15, 23) Source(37, 23) + SourceIndex(0) +9 >Emitted(15, 29) Source(37, 29) + SourceIndex(0) +10>Emitted(15, 31) Source(37, 31) + SourceIndex(0) +11>Emitted(15, 33) Source(37, 33) + SourceIndex(0) +12>Emitted(15, 40) Source(37, 40) + SourceIndex(0) +13>Emitted(15, 42) Source(37, 42) + SourceIndex(0) +14>Emitted(15, 50) Source(37, 50) + SourceIndex(0) +15>Emitted(15, 52) Source(37, 52) + SourceIndex(0) +16>Emitted(15, 61) Source(37, 61) + SourceIndex(0) +17>Emitted(15, 63) Source(37, 63) + SourceIndex(0) +18>Emitted(15, 80) Source(37, 80) + SourceIndex(0) +19>Emitted(15, 82) Source(37, 82) + SourceIndex(0) +20>Emitted(15, 84) Source(37, 84) + SourceIndex(0) +21>Emitted(15, 85) Source(37, 85) + SourceIndex(0) +22>Emitted(15, 86) Source(37, 86) + SourceIndex(0) +--- +>>>foo2(robotA); +1 > +2 >^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >foo2 +3 > ( +4 > robotA +5 > ) +6 > ; +1 >Emitted(16, 1) Source(39, 1) + SourceIndex(0) +2 >Emitted(16, 5) Source(39, 5) + SourceIndex(0) +3 >Emitted(16, 6) Source(39, 6) + SourceIndex(0) +4 >Emitted(16, 12) Source(39, 12) + SourceIndex(0) +5 >Emitted(16, 13) Source(39, 13) + SourceIndex(0) +6 >Emitted(16, 14) Source(39, 14) + SourceIndex(0) +--- +>>>foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +1-> +2 >^^^^ +3 > ^ +4 > ^^ +5 > ^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^ +9 > ^^^^^^ +10> ^^ +11> ^^ +12> ^^^^^^^ +13> ^^ +14> ^^^^^^^^ +15> ^^ +16> ^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^ +19> ^^ +20> ^^ +21> ^ +22> ^ +1-> + > +2 >foo2 +3 > ( +4 > { +5 > name +6 > : +7 > "Edger" +8 > , +9 > skills +10> : +11> { +12> primary +13> : +14> "edging" +15> , +16> secondary +17> : +18> "branch trimming" +19> } +20> } +21> ) +22> ; +1->Emitted(17, 1) Source(40, 1) + SourceIndex(0) +2 >Emitted(17, 5) Source(40, 5) + SourceIndex(0) +3 >Emitted(17, 6) Source(40, 6) + SourceIndex(0) +4 >Emitted(17, 8) Source(40, 8) + SourceIndex(0) +5 >Emitted(17, 12) Source(40, 12) + SourceIndex(0) +6 >Emitted(17, 14) Source(40, 14) + SourceIndex(0) +7 >Emitted(17, 21) Source(40, 21) + SourceIndex(0) +8 >Emitted(17, 23) Source(40, 23) + SourceIndex(0) +9 >Emitted(17, 29) Source(40, 29) + SourceIndex(0) +10>Emitted(17, 31) Source(40, 31) + SourceIndex(0) +11>Emitted(17, 33) Source(40, 33) + SourceIndex(0) +12>Emitted(17, 40) Source(40, 40) + SourceIndex(0) +13>Emitted(17, 42) Source(40, 42) + SourceIndex(0) +14>Emitted(17, 50) Source(40, 50) + SourceIndex(0) +15>Emitted(17, 52) Source(40, 52) + SourceIndex(0) +16>Emitted(17, 61) Source(40, 61) + SourceIndex(0) +17>Emitted(17, 63) Source(40, 63) + SourceIndex(0) +18>Emitted(17, 80) Source(40, 80) + SourceIndex(0) +19>Emitted(17, 82) Source(40, 82) + SourceIndex(0) +20>Emitted(17, 84) Source(40, 84) + SourceIndex(0) +21>Emitted(17, 85) Source(40, 85) + SourceIndex(0) +22>Emitted(17, 86) Source(40, 86) + SourceIndex(0) +--- +>>>foo3(robotA); +1 > +2 >^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >foo3 +3 > ( +4 > robotA +5 > ) +6 > ; +1 >Emitted(18, 1) Source(42, 1) + SourceIndex(0) +2 >Emitted(18, 5) Source(42, 5) + SourceIndex(0) +3 >Emitted(18, 6) Source(42, 6) + SourceIndex(0) +4 >Emitted(18, 12) Source(42, 12) + SourceIndex(0) +5 >Emitted(18, 13) Source(42, 13) + SourceIndex(0) +6 >Emitted(18, 14) Source(42, 14) + SourceIndex(0) +--- +>>>foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +1-> +2 >^^^^ +3 > ^ +4 > ^^ +5 > ^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^ +9 > ^^^^^^ +10> ^^ +11> ^^ +12> ^^^^^^^ +13> ^^ +14> ^^^^^^^^ +15> ^^ +16> ^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^ +19> ^^ +20> ^^ +21> ^ +22> ^ +23> ^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >foo3 +3 > ( +4 > { +5 > name +6 > : +7 > "Edger" +8 > , +9 > skills +10> : +11> { +12> primary +13> : +14> "edging" +15> , +16> secondary +17> : +18> "branch trimming" +19> } +20> } +21> ) +22> ; +1->Emitted(19, 1) Source(43, 1) + SourceIndex(0) +2 >Emitted(19, 5) Source(43, 5) + SourceIndex(0) +3 >Emitted(19, 6) Source(43, 6) + SourceIndex(0) +4 >Emitted(19, 8) Source(43, 8) + SourceIndex(0) +5 >Emitted(19, 12) Source(43, 12) + SourceIndex(0) +6 >Emitted(19, 14) Source(43, 14) + SourceIndex(0) +7 >Emitted(19, 21) Source(43, 21) + SourceIndex(0) +8 >Emitted(19, 23) Source(43, 23) + SourceIndex(0) +9 >Emitted(19, 29) Source(43, 29) + SourceIndex(0) +10>Emitted(19, 31) Source(43, 31) + SourceIndex(0) +11>Emitted(19, 33) Source(43, 33) + SourceIndex(0) +12>Emitted(19, 40) Source(43, 40) + SourceIndex(0) +13>Emitted(19, 42) Source(43, 42) + SourceIndex(0) +14>Emitted(19, 50) Source(43, 50) + SourceIndex(0) +15>Emitted(19, 52) Source(43, 52) + SourceIndex(0) +16>Emitted(19, 61) Source(43, 61) + SourceIndex(0) +17>Emitted(19, 63) Source(43, 63) + SourceIndex(0) +18>Emitted(19, 80) Source(43, 80) + SourceIndex(0) +19>Emitted(19, 82) Source(43, 82) + SourceIndex(0) +20>Emitted(19, 84) Source(43, 84) + SourceIndex(0) +21>Emitted(19, 85) Source(43, 85) + SourceIndex(0) +22>Emitted(19, 86) Source(43, 86) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.symbols b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.symbols new file mode 100644 index 00000000000..229e9acb6da --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.symbols @@ -0,0 +1,143 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 0, 11)) + + log(msg: string): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 1, 8)) +} +interface Robot { +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 2, 1)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 3, 17)) + + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 4, 17)) + + primary?: string; +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 5, 13)) + + secondary?: string; +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 6, 25)) + + }; +} +var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 10, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 10, 21)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 10, 36)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 10, 46)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 10, 65)) + +function foo1( +>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 10, 88)) + { + skills: { +>skills : Symbol(Robot.skills, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 4, 17)) + + primary: primaryA = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 5, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 14, 17)) + + secondary: secondaryA = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 6, 25)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 15, 42)) + + } = { primary: "SomeSkill", secondary: "someSkill" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 17, 13)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 17, 35)) + + }: Robot = robotA) { +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 2, 1)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 10, 3)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 14, 17)) +} +function foo2( +>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 20, 1)) + { + name: nameC = "name", +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 3, 17)) +>nameC : Symbol(nameC, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 22, 5)) + + skills: { +>skills : Symbol(Robot.skills, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 4, 17)) + + primary: primaryB = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 5, 13)) +>primaryB : Symbol(primaryB, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 24, 17)) + + secondary: secondaryB = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 6, 25)) +>secondaryB : Symbol(secondaryB, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 25, 42)) + + } = { primary: "SomeSkill", secondary: "someSkill" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 27, 13)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 27, 35)) + + }: Robot = robotA) { +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 2, 1)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 10, 3)) + + console.log(secondaryB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 0, 22)) +>secondaryB : Symbol(secondaryB, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 25, 42)) +} +function foo3({ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA) { +>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 30, 1)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 31, 15)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 31, 26)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 31, 48)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 2, 1)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 10, 3)) + + console.log(skills.primary); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 0, 22)) +>skills.primary : Symbol(primary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 5, 13)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 31, 15)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 5, 13)) +} + +foo1(robotA); +>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 10, 88)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 10, 3)) + +foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 10, 88)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 36, 6)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 36, 21)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 36, 31)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 36, 50)) + +foo2(robotA); +>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 20, 1)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 10, 3)) + +foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 20, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 39, 6)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 39, 21)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 39, 31)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 39, 50)) + +foo3(robotA); +>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 30, 1)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 10, 3)) + +foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 30, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 42, 6)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 42, 21)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 42, 31)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts, 42, 50)) + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.types b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.types new file mode 100644 index 00000000000..a9e5c2d6ee6 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.types @@ -0,0 +1,219 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts === +declare var console: { +>console : { log(msg: string): void; } + + log(msg: string): void; +>log : (msg: string) => void +>msg : string +} +interface Robot { +>Robot : Robot + + name: string; +>name : string + + skills: { +>skills : { primary?: string; secondary?: string; } + + primary?: string; +>primary : string + + secondary?: string; +>secondary : string + + }; +} +var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +>robotA : Robot +>Robot : Robot +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"mower" : string +>skills : { primary: string; secondary: string; } +>{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } +>primary : string +>"mowing" : string +>secondary : string +>"none" : string + +function foo1( +>foo1 : ({ + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "SomeSkill", secondary: "someSkill" } + }?: Robot) => void + { + skills: { +>skills : any + + primary: primaryA = "primary", +>primary : any +>primaryA : string +>"primary" : string + + secondary: secondaryA = "secondary" +>secondary : any +>secondaryA : string +>"secondary" : string + + } = { primary: "SomeSkill", secondary: "someSkill" } +>{ primary: "SomeSkill", secondary: "someSkill" } : { primary?: string; secondary?: string; } +>primary : string +>"SomeSkill" : string +>secondary : string +>"someSkill" : string + + }: Robot = robotA) { +>Robot : Robot +>robotA : Robot + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: string) => void +>console : { log(msg: string): void; } +>log : (msg: string) => void +>primaryA : string +} +function foo2( +>foo2 : ({ + name: nameC = "name", + skills: { + primary: primaryB = "primary", + secondary: secondaryB = "secondary" + } = { primary: "SomeSkill", secondary: "someSkill" } + }?: Robot) => void + { + name: nameC = "name", +>name : any +>nameC : string +>"name" : string + + skills: { +>skills : any + + primary: primaryB = "primary", +>primary : any +>primaryB : string +>"primary" : string + + secondary: secondaryB = "secondary" +>secondary : any +>secondaryB : string +>"secondary" : string + + } = { primary: "SomeSkill", secondary: "someSkill" } +>{ primary: "SomeSkill", secondary: "someSkill" } : { primary?: string; secondary?: string; } +>primary : string +>"SomeSkill" : string +>secondary : string +>"someSkill" : string + + }: Robot = robotA) { +>Robot : Robot +>robotA : Robot + + console.log(secondaryB); +>console.log(secondaryB) : void +>console.log : (msg: string) => void +>console : { log(msg: string): void; } +>log : (msg: string) => void +>secondaryB : string +} +function foo3({ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA) { +>foo3 : ({ skills = { primary: "SomeSkill", secondary: "someSkill" } }?: Robot) => void +>skills : { primary?: string; secondary?: string; } +>{ primary: "SomeSkill", secondary: "someSkill" } : { primary: string; secondary: string; } +>primary : string +>"SomeSkill" : string +>secondary : string +>"someSkill" : string +>Robot : Robot +>robotA : Robot + + console.log(skills.primary); +>console.log(skills.primary) : void +>console.log : (msg: string) => void +>console : { log(msg: string): void; } +>log : (msg: string) => void +>skills.primary : string +>skills : { primary?: string; secondary?: string; } +>primary : string +} + +foo1(robotA); +>foo1(robotA) : void +>foo1 : ({ + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "SomeSkill", secondary: "someSkill" } + }?: Robot) => void +>robotA : Robot + +foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +>foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) : void +>foo1 : ({ + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "SomeSkill", secondary: "someSkill" } + }?: Robot) => void +>{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"Edger" : string +>skills : { primary: string; secondary: string; } +>{ primary: "edging", secondary: "branch trimming" } : { primary: string; secondary: string; } +>primary : string +>"edging" : string +>secondary : string +>"branch trimming" : string + +foo2(robotA); +>foo2(robotA) : void +>foo2 : ({ + name: nameC = "name", + skills: { + primary: primaryB = "primary", + secondary: secondaryB = "secondary" + } = { primary: "SomeSkill", secondary: "someSkill" } + }?: Robot) => void +>robotA : Robot + +foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +>foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) : void +>foo2 : ({ + name: nameC = "name", + skills: { + primary: primaryB = "primary", + secondary: secondaryB = "secondary" + } = { primary: "SomeSkill", secondary: "someSkill" } + }?: Robot) => void +>{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"Edger" : string +>skills : { primary: string; secondary: string; } +>{ primary: "edging", secondary: "branch trimming" } : { primary: string; secondary: string; } +>primary : string +>"edging" : string +>secondary : string +>"branch trimming" : string + +foo3(robotA); +>foo3(robotA) : void +>foo3 : ({ skills = { primary: "SomeSkill", secondary: "someSkill" } }?: Robot) => void +>robotA : Robot + +foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +>foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) : void +>foo3 : ({ skills = { primary: "SomeSkill", secondary: "someSkill" } }?: Robot) => void +>{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"Edger" : string +>skills : { primary: string; secondary: string; } +>{ primary: "edging", secondary: "branch trimming" } : { primary: string; secondary: string; } +>primary : string +>"edging" : string +>secondary : string +>"branch trimming" : string + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.js b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.js new file mode 100644 index 00000000000..9fd269c62cc --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.js @@ -0,0 +1,53 @@ +//// [sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts] +interface Robot { + name?: string; + skill?: string; +} +declare var console: { + log(msg: string): void; +} +var hello = "hello"; +var robotA: Robot = { name: "mower", skill: "mowing" }; + +function foo1({ name: nameA = "" }: Robot = { }) { + console.log(nameA); +} +function foo2({ name: nameB = "", skill: skillB = "noSkill" }: Robot = {}) { + console.log(nameB); +} +function foo3({ name = "" }: Robot = {}) { + console.log(name); +} + +foo1(robotA); +foo1({ name: "Edger", skill: "cutting edges" }); + +foo2(robotA); +foo2({ name: "Edger", skill: "cutting edges" }); + +foo3(robotA); +foo3({ name: "Edger", skill: "cutting edges" }); + + +//// [sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.js] +var hello = "hello"; +var robotA = { name: "mower", skill: "mowing" }; +function foo1(_a) { + var _b = (_a === void 0 ? {} : _a).name, nameA = _b === void 0 ? "" : _b; + console.log(nameA); +} +function foo2(_a) { + var _b = _a === void 0 ? {} : _a, _c = _b.name, nameB = _c === void 0 ? "" : _c, _d = _b.skill, skillB = _d === void 0 ? "noSkill" : _d; + console.log(nameB); +} +function foo3(_a) { + var _b = (_a === void 0 ? {} : _a).name, name = _b === void 0 ? "" : _b; + console.log(name); +} +foo1(robotA); +foo1({ name: "Edger", skill: "cutting edges" }); +foo2(robotA); +foo2({ name: "Edger", skill: "cutting edges" }); +foo3(robotA); +foo3({ name: "Edger", skill: "cutting edges" }); +//# sourceMappingURL=sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.js.map b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.js.map new file mode 100644 index 00000000000..ddf41d9e59f --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.js.map] +{"version":3,"file":"sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.js","sourceRoot":"","sources":["sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts"],"names":[],"mappings":"AAOA,IAAI,KAAK,GAAG,OAAO,CAAC;AACpB,IAAI,MAAM,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AAEvD,cAAc,EAAyC;QAAvC,mCAAwB,EAAxB,uCAAwB;IACpC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,cAAc,EAAmE;QAAnE,4BAAmE,EAAjE,YAAwB,EAAxB,uCAAwB,EAAE,aAAyB,EAAzB,uCAAyB;IAC/D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,cAAc,EAAiC;QAA/B,mCAAiB,EAAjB,sCAAiB;IAC7B,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACtB,CAAC;AAED,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,CAAC;AAEhD,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,CAAC;AAEhD,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.sourcemap.txt new file mode 100644 index 00000000000..555bc560797 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.sourcemap.txt @@ -0,0 +1,500 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.js +mapUrl: sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.js.map +sourceRoot: +sources: sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.js +sourceFile:sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts +------------------------------------------------------------------- +>>>var hello = "hello"; +1 > +2 >^^^^ +3 > ^^^^^ +4 > ^^^ +5 > ^^^^^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 >interface Robot { + > name?: string; + > skill?: string; + >} + >declare var console: { + > log(msg: string): void; + >} + > +2 >var +3 > hello +4 > = +5 > "hello" +6 > ; +1 >Emitted(1, 1) Source(8, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(8, 5) + SourceIndex(0) +3 >Emitted(1, 10) Source(8, 10) + SourceIndex(0) +4 >Emitted(1, 13) Source(8, 13) + SourceIndex(0) +5 >Emitted(1, 20) Source(8, 20) + SourceIndex(0) +6 >Emitted(1, 21) Source(8, 21) + SourceIndex(0) +--- +>>>var robotA = { name: "mower", skill: "mowing" }; +1-> +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^^ +6 > ^^^^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^ +11> ^^ +12> ^^^^^^^^ +13> ^^ +14> ^ +1-> + > +2 >var +3 > robotA +4 > : Robot = +5 > { +6 > name +7 > : +8 > "mower" +9 > , +10> skill +11> : +12> "mowing" +13> } +14> ; +1->Emitted(2, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(9, 5) + SourceIndex(0) +3 >Emitted(2, 11) Source(9, 11) + SourceIndex(0) +4 >Emitted(2, 14) Source(9, 21) + SourceIndex(0) +5 >Emitted(2, 16) Source(9, 23) + SourceIndex(0) +6 >Emitted(2, 20) Source(9, 27) + SourceIndex(0) +7 >Emitted(2, 22) Source(9, 29) + SourceIndex(0) +8 >Emitted(2, 29) Source(9, 36) + SourceIndex(0) +9 >Emitted(2, 31) Source(9, 38) + SourceIndex(0) +10>Emitted(2, 36) Source(9, 43) + SourceIndex(0) +11>Emitted(2, 38) Source(9, 45) + SourceIndex(0) +12>Emitted(2, 46) Source(9, 53) + SourceIndex(0) +13>Emitted(2, 48) Source(9, 55) + SourceIndex(0) +14>Emitted(2, 49) Source(9, 56) + SourceIndex(0) +--- +>>>function foo1(_a) { +1 > +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >function foo1( +3 > { name: nameA = "" }: Robot = { } +1 >Emitted(3, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(3, 15) Source(11, 15) + SourceIndex(0) +3 >Emitted(3, 17) Source(11, 56) + SourceIndex(0) +--- +>>> var _b = (_a === void 0 ? {} : _a).name, nameA = _b === void 0 ? "" : _b; +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > name: nameA = "" +3 > +4 > name: nameA = "" +1->Emitted(4, 9) Source(11, 17) + SourceIndex(0) +2 >Emitted(4, 44) Source(11, 41) + SourceIndex(0) +3 >Emitted(4, 46) Source(11, 17) + SourceIndex(0) +4 >Emitted(4, 85) Source(11, 41) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > }: Robot = { }) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(5, 5) Source(12, 5) + SourceIndex(0) +2 >Emitted(5, 12) Source(12, 12) + SourceIndex(0) +3 >Emitted(5, 13) Source(12, 13) + SourceIndex(0) +4 >Emitted(5, 16) Source(12, 16) + SourceIndex(0) +5 >Emitted(5, 17) Source(12, 17) + SourceIndex(0) +6 >Emitted(5, 22) Source(12, 22) + SourceIndex(0) +7 >Emitted(5, 23) Source(12, 23) + SourceIndex(0) +8 >Emitted(5, 24) Source(12, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(6, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(13, 2) + SourceIndex(0) +--- +>>>function foo2(_a) { +1-> +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >function foo2( +3 > { name: nameB = "", skill: skillB = "noSkill" }: Robot = {} +1->Emitted(7, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(7, 15) Source(14, 15) + SourceIndex(0) +3 >Emitted(7, 17) Source(14, 82) + SourceIndex(0) +--- +>>> var _b = _a === void 0 ? {} : _a, _c = _b.name, nameB = _c === void 0 ? "" : _c, _d = _b.skill, skillB = _d === void 0 ? "noSkill" : _d; +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > { name: nameB = "", skill: skillB = "noSkill" }: Robot = {} +3 > +4 > name: nameB = "" +5 > +6 > name: nameB = "" +7 > , +8 > skill: skillB = "noSkill" +9 > +10> skill: skillB = "noSkill" +1->Emitted(8, 9) Source(14, 15) + SourceIndex(0) +2 >Emitted(8, 37) Source(14, 82) + SourceIndex(0) +3 >Emitted(8, 39) Source(14, 17) + SourceIndex(0) +4 >Emitted(8, 51) Source(14, 41) + SourceIndex(0) +5 >Emitted(8, 53) Source(14, 17) + SourceIndex(0) +6 >Emitted(8, 92) Source(14, 41) + SourceIndex(0) +7 >Emitted(8, 94) Source(14, 43) + SourceIndex(0) +8 >Emitted(8, 107) Source(14, 68) + SourceIndex(0) +9 >Emitted(8, 109) Source(14, 43) + SourceIndex(0) +10>Emitted(8, 148) Source(14, 68) + SourceIndex(0) +--- +>>> console.log(nameB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > }: Robot = {}) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameB +7 > ) +8 > ; +1 >Emitted(9, 5) Source(15, 5) + SourceIndex(0) +2 >Emitted(9, 12) Source(15, 12) + SourceIndex(0) +3 >Emitted(9, 13) Source(15, 13) + SourceIndex(0) +4 >Emitted(9, 16) Source(15, 16) + SourceIndex(0) +5 >Emitted(9, 17) Source(15, 17) + SourceIndex(0) +6 >Emitted(9, 22) Source(15, 22) + SourceIndex(0) +7 >Emitted(9, 23) Source(15, 23) + SourceIndex(0) +8 >Emitted(9, 24) Source(15, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(10, 1) Source(16, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(16, 2) + SourceIndex(0) +--- +>>>function foo3(_a) { +1-> +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >function foo3( +3 > { name = "" }: Robot = {} +1->Emitted(11, 1) Source(17, 1) + SourceIndex(0) +2 >Emitted(11, 15) Source(17, 15) + SourceIndex(0) +3 >Emitted(11, 17) Source(17, 48) + SourceIndex(0) +--- +>>> var _b = (_a === void 0 ? {} : _a).name, name = _b === void 0 ? "" : _b; +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > name = "" +3 > +4 > name = "" +1->Emitted(12, 9) Source(17, 17) + SourceIndex(0) +2 >Emitted(12, 44) Source(17, 34) + SourceIndex(0) +3 >Emitted(12, 46) Source(17, 17) + SourceIndex(0) +4 >Emitted(12, 84) Source(17, 34) + SourceIndex(0) +--- +>>> console.log(name); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^ +7 > ^ +8 > ^ +1 > }: Robot = {}) { + > +2 > console +3 > . +4 > log +5 > ( +6 > name +7 > ) +8 > ; +1 >Emitted(13, 5) Source(18, 5) + SourceIndex(0) +2 >Emitted(13, 12) Source(18, 12) + SourceIndex(0) +3 >Emitted(13, 13) Source(18, 13) + SourceIndex(0) +4 >Emitted(13, 16) Source(18, 16) + SourceIndex(0) +5 >Emitted(13, 17) Source(18, 17) + SourceIndex(0) +6 >Emitted(13, 21) Source(18, 21) + SourceIndex(0) +7 >Emitted(13, 22) Source(18, 22) + SourceIndex(0) +8 >Emitted(13, 23) Source(18, 23) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(14, 1) Source(19, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(19, 2) + SourceIndex(0) +--- +>>>foo1(robotA); +1-> +2 >^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +2 >foo1 +3 > ( +4 > robotA +5 > ) +6 > ; +1->Emitted(15, 1) Source(21, 1) + SourceIndex(0) +2 >Emitted(15, 5) Source(21, 5) + SourceIndex(0) +3 >Emitted(15, 6) Source(21, 6) + SourceIndex(0) +4 >Emitted(15, 12) Source(21, 12) + SourceIndex(0) +5 >Emitted(15, 13) Source(21, 13) + SourceIndex(0) +6 >Emitted(15, 14) Source(21, 14) + SourceIndex(0) +--- +>>>foo1({ name: "Edger", skill: "cutting edges" }); +1-> +2 >^^^^ +3 > ^ +4 > ^^ +5 > ^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^ +9 > ^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^ +12> ^^ +13> ^ +14> ^ +1-> + > +2 >foo1 +3 > ( +4 > { +5 > name +6 > : +7 > "Edger" +8 > , +9 > skill +10> : +11> "cutting edges" +12> } +13> ) +14> ; +1->Emitted(16, 1) Source(22, 1) + SourceIndex(0) +2 >Emitted(16, 5) Source(22, 5) + SourceIndex(0) +3 >Emitted(16, 6) Source(22, 6) + SourceIndex(0) +4 >Emitted(16, 8) Source(22, 8) + SourceIndex(0) +5 >Emitted(16, 12) Source(22, 12) + SourceIndex(0) +6 >Emitted(16, 14) Source(22, 14) + SourceIndex(0) +7 >Emitted(16, 21) Source(22, 21) + SourceIndex(0) +8 >Emitted(16, 23) Source(22, 23) + SourceIndex(0) +9 >Emitted(16, 28) Source(22, 28) + SourceIndex(0) +10>Emitted(16, 30) Source(22, 30) + SourceIndex(0) +11>Emitted(16, 45) Source(22, 45) + SourceIndex(0) +12>Emitted(16, 47) Source(22, 47) + SourceIndex(0) +13>Emitted(16, 48) Source(22, 48) + SourceIndex(0) +14>Emitted(16, 49) Source(22, 49) + SourceIndex(0) +--- +>>>foo2(robotA); +1 > +2 >^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >foo2 +3 > ( +4 > robotA +5 > ) +6 > ; +1 >Emitted(17, 1) Source(24, 1) + SourceIndex(0) +2 >Emitted(17, 5) Source(24, 5) + SourceIndex(0) +3 >Emitted(17, 6) Source(24, 6) + SourceIndex(0) +4 >Emitted(17, 12) Source(24, 12) + SourceIndex(0) +5 >Emitted(17, 13) Source(24, 13) + SourceIndex(0) +6 >Emitted(17, 14) Source(24, 14) + SourceIndex(0) +--- +>>>foo2({ name: "Edger", skill: "cutting edges" }); +1-> +2 >^^^^ +3 > ^ +4 > ^^ +5 > ^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^ +9 > ^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^ +12> ^^ +13> ^ +14> ^ +1-> + > +2 >foo2 +3 > ( +4 > { +5 > name +6 > : +7 > "Edger" +8 > , +9 > skill +10> : +11> "cutting edges" +12> } +13> ) +14> ; +1->Emitted(18, 1) Source(25, 1) + SourceIndex(0) +2 >Emitted(18, 5) Source(25, 5) + SourceIndex(0) +3 >Emitted(18, 6) Source(25, 6) + SourceIndex(0) +4 >Emitted(18, 8) Source(25, 8) + SourceIndex(0) +5 >Emitted(18, 12) Source(25, 12) + SourceIndex(0) +6 >Emitted(18, 14) Source(25, 14) + SourceIndex(0) +7 >Emitted(18, 21) Source(25, 21) + SourceIndex(0) +8 >Emitted(18, 23) Source(25, 23) + SourceIndex(0) +9 >Emitted(18, 28) Source(25, 28) + SourceIndex(0) +10>Emitted(18, 30) Source(25, 30) + SourceIndex(0) +11>Emitted(18, 45) Source(25, 45) + SourceIndex(0) +12>Emitted(18, 47) Source(25, 47) + SourceIndex(0) +13>Emitted(18, 48) Source(25, 48) + SourceIndex(0) +14>Emitted(18, 49) Source(25, 49) + SourceIndex(0) +--- +>>>foo3(robotA); +1 > +2 >^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >foo3 +3 > ( +4 > robotA +5 > ) +6 > ; +1 >Emitted(19, 1) Source(27, 1) + SourceIndex(0) +2 >Emitted(19, 5) Source(27, 5) + SourceIndex(0) +3 >Emitted(19, 6) Source(27, 6) + SourceIndex(0) +4 >Emitted(19, 12) Source(27, 12) + SourceIndex(0) +5 >Emitted(19, 13) Source(27, 13) + SourceIndex(0) +6 >Emitted(19, 14) Source(27, 14) + SourceIndex(0) +--- +>>>foo3({ name: "Edger", skill: "cutting edges" }); +1-> +2 >^^^^ +3 > ^ +4 > ^^ +5 > ^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^ +9 > ^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^ +12> ^^ +13> ^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >foo3 +3 > ( +4 > { +5 > name +6 > : +7 > "Edger" +8 > , +9 > skill +10> : +11> "cutting edges" +12> } +13> ) +14> ; +1->Emitted(20, 1) Source(28, 1) + SourceIndex(0) +2 >Emitted(20, 5) Source(28, 5) + SourceIndex(0) +3 >Emitted(20, 6) Source(28, 6) + SourceIndex(0) +4 >Emitted(20, 8) Source(28, 8) + SourceIndex(0) +5 >Emitted(20, 12) Source(28, 12) + SourceIndex(0) +6 >Emitted(20, 14) Source(28, 14) + SourceIndex(0) +7 >Emitted(20, 21) Source(28, 21) + SourceIndex(0) +8 >Emitted(20, 23) Source(28, 23) + SourceIndex(0) +9 >Emitted(20, 28) Source(28, 28) + SourceIndex(0) +10>Emitted(20, 30) Source(28, 30) + SourceIndex(0) +11>Emitted(20, 45) Source(28, 45) + SourceIndex(0) +12>Emitted(20, 47) Source(28, 47) + SourceIndex(0) +13>Emitted(20, 48) Source(28, 48) + SourceIndex(0) +14>Emitted(20, 49) Source(28, 49) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.symbols b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.symbols new file mode 100644 index 00000000000..7e3804a5e88 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.symbols @@ -0,0 +1,91 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts === +interface Robot { +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 0, 0)) + + name?: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 0, 17)) + + skill?: string; +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 1, 18)) +} +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 4, 11)) + + log(msg: string): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 4, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 5, 8)) +} +var hello = "hello"; +>hello : Symbol(hello, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 7, 3)) + +var robotA: Robot = { name: "mower", skill: "mowing" }; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 8, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 0, 0)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 8, 21)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 8, 36)) + +function foo1({ name: nameA = "" }: Robot = { }) { +>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 8, 55)) +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 0, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 10, 15)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 0, 0)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 4, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 4, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 4, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 10, 15)) +} +function foo2({ name: nameB = "", skill: skillB = "noSkill" }: Robot = {}) { +>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 12, 1)) +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 0, 17)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 13, 15)) +>skill : Symbol(Robot.skill, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 1, 18)) +>skillB : Symbol(skillB, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 13, 41)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 0, 0)) + + console.log(nameB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 4, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 4, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 4, 22)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 13, 15)) +} +function foo3({ name = "" }: Robot = {}) { +>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 15, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 16, 15)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 0, 0)) + + console.log(name); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 4, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 4, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 4, 22)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 16, 15)) +} + +foo1(robotA); +>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 8, 55)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 8, 3)) + +foo1({ name: "Edger", skill: "cutting edges" }); +>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 8, 55)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 21, 6)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 21, 21)) + +foo2(robotA); +>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 12, 1)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 8, 3)) + +foo2({ name: "Edger", skill: "cutting edges" }); +>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 12, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 24, 6)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 24, 21)) + +foo3(robotA); +>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 15, 1)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 8, 3)) + +foo3({ name: "Edger", skill: "cutting edges" }); +>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 15, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 27, 6)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 27, 21)) + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.types b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.types new file mode 100644 index 00000000000..669708f412f --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.types @@ -0,0 +1,120 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts === +interface Robot { +>Robot : Robot + + name?: string; +>name : string + + skill?: string; +>skill : string +} +declare var console: { +>console : { log(msg: string): void; } + + log(msg: string): void; +>log : (msg: string) => void +>msg : string +} +var hello = "hello"; +>hello : string +>"hello" : string + +var robotA: Robot = { name: "mower", skill: "mowing" }; +>robotA : Robot +>Robot : Robot +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string + +function foo1({ name: nameA = "" }: Robot = { }) { +>foo1 : ({ name: nameA = "" }?: Robot) => void +>name : any +>nameA : string +>"" : string +>Robot : Robot +>{ } : {} + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: string) => void +>console : { log(msg: string): void; } +>log : (msg: string) => void +>nameA : string +} +function foo2({ name: nameB = "", skill: skillB = "noSkill" }: Robot = {}) { +>foo2 : ({ name: nameB = "", skill: skillB = "noSkill" }?: Robot) => void +>name : any +>nameB : string +>"" : string +>skill : any +>skillB : string +>"noSkill" : string +>Robot : Robot +>{} : {} + + console.log(nameB); +>console.log(nameB) : void +>console.log : (msg: string) => void +>console : { log(msg: string): void; } +>log : (msg: string) => void +>nameB : string +} +function foo3({ name = "" }: Robot = {}) { +>foo3 : ({ name = "" }?: Robot) => void +>name : string +>"" : string +>Robot : Robot +>{} : {} + + console.log(name); +>console.log(name) : void +>console.log : (msg: string) => void +>console : { log(msg: string): void; } +>log : (msg: string) => void +>name : string +} + +foo1(robotA); +>foo1(robotA) : void +>foo1 : ({ name: nameA = "" }?: Robot) => void +>robotA : Robot + +foo1({ name: "Edger", skill: "cutting edges" }); +>foo1({ name: "Edger", skill: "cutting edges" }) : void +>foo1 : ({ name: nameA = "" }?: Robot) => void +>{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } +>name : string +>"Edger" : string +>skill : string +>"cutting edges" : string + +foo2(robotA); +>foo2(robotA) : void +>foo2 : ({ name: nameB = "", skill: skillB = "noSkill" }?: Robot) => void +>robotA : Robot + +foo2({ name: "Edger", skill: "cutting edges" }); +>foo2({ name: "Edger", skill: "cutting edges" }) : void +>foo2 : ({ name: nameB = "", skill: skillB = "noSkill" }?: Robot) => void +>{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } +>name : string +>"Edger" : string +>skill : string +>"cutting edges" : string + +foo3(robotA); +>foo3(robotA) : void +>foo3 : ({ name = "" }?: Robot) => void +>robotA : Robot + +foo3({ name: "Edger", skill: "cutting edges" }); +>foo3({ name: "Edger", skill: "cutting edges" }) : void +>foo3 : ({ name = "" }?: Robot) => void +>{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } +>name : string +>"Edger" : string +>skill : string +>"cutting edges" : string + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.js b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.js new file mode 100644 index 00000000000..327791a6416 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.js @@ -0,0 +1,62 @@ +//// [sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts] +declare var console: { + log(msg: any): void; +} +type Robot = [number, string, string]; +var robotA: Robot = [1, "mower", "mowing"]; + +function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) { + console.log(nameA); +} + +function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) { + console.log(numberB); +} + +function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) { + console.log(nameA2); +} + +function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) { + console.log(robotAInfo); +} + +foo1(robotA); +foo1([2, "trimmer", "trimming"]); + +foo2(robotA); +foo2([2, "trimmer", "trimming"]); + +foo3(robotA); +foo3([2, "trimmer", "trimming"]); + +foo4(robotA); +foo4([2, "trimmer", "trimming"]); + +//// [sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.js] +var robotA = [1, "mower", "mowing"]; +function foo1(_a) { + var _b = _a === void 0 ? [-1, "name", "skill"] : _a, _c = _b[1], nameA = _c === void 0 ? "noName" : _c; + console.log(nameA); +} +function foo2(_a) { + var _b = (_a === void 0 ? [-1, "name", "skill"] : _a)[0], numberB = _b === void 0 ? -1 : _b; + console.log(numberB); +} +function foo3(_a) { + var _b = _a === void 0 ? [-1, "name", "skill"] : _a, _c = _b[0], numberA2 = _c === void 0 ? -1 : _c, _d = _b[1], nameA2 = _d === void 0 ? "name" : _d, _e = _b[2], skillA2 = _e === void 0 ? "skill" : _e; + console.log(nameA2); +} +function foo4(_a) { + var _b = _a === void 0 ? [-1, "name", "skill"] : _a, _c = _b[0], numberA3 = _c === void 0 ? -1 : _c, robotAInfo = _b.slice(1); + console.log(robotAInfo); +} +foo1(robotA); +foo1([2, "trimmer", "trimming"]); +foo2(robotA); +foo2([2, "trimmer", "trimming"]); +foo3(robotA); +foo3([2, "trimmer", "trimming"]); +foo4(robotA); +foo4([2, "trimmer", "trimming"]); +//# sourceMappingURL=sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.js.map b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.js.map new file mode 100644 index 00000000000..7fdda34358b --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.js.map] +{"version":3,"file":"sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.js","sourceRoot":"","sources":["sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts"],"names":[],"mappings":"AAIA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAE3C,cAAc,EAAmD;QAAnD,+CAAmD,EAAhD,UAAgB,EAAhB,qCAAgB;IAC7B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AAED,cAAc,EAA6C;QAA5C,oDAAY,EAAZ,iCAAY;IACvB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC;AAED,cAAc,EAAkF;QAAlF,+CAAkF,EAAjF,UAAa,EAAb,kCAAa,EAAE,UAAe,EAAf,oCAAe,EAAE,UAAiB,EAAjB,sCAAiB;IAC5D,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,cAAc,EAA6D;QAA7D,+CAA6D,EAA5D,UAAa,EAAb,kCAAa,EAAE,wBAAa;IACvC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AAC5B,CAAC;AAED,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AAEjC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AAEjC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AAEjC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.sourcemap.txt new file mode 100644 index 00000000000..250d7ec2931 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.sourcemap.txt @@ -0,0 +1,610 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.js +mapUrl: sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.js.map +sourceRoot: +sources: sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.js +sourceFile:sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts +------------------------------------------------------------------- +>>>var robotA = [1, "mower", "mowing"]; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^^^^ +11> ^ +12> ^ +1 >declare var console: { + > log(msg: any): void; + >} + >type Robot = [number, string, string]; + > +2 >var +3 > robotA +4 > : Robot = +5 > [ +6 > 1 +7 > , +8 > "mower" +9 > , +10> "mowing" +11> ] +12> ; +1 >Emitted(1, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(5, 5) + SourceIndex(0) +3 >Emitted(1, 11) Source(5, 11) + SourceIndex(0) +4 >Emitted(1, 14) Source(5, 21) + SourceIndex(0) +5 >Emitted(1, 15) Source(5, 22) + SourceIndex(0) +6 >Emitted(1, 16) Source(5, 23) + SourceIndex(0) +7 >Emitted(1, 18) Source(5, 25) + SourceIndex(0) +8 >Emitted(1, 25) Source(5, 32) + SourceIndex(0) +9 >Emitted(1, 27) Source(5, 34) + SourceIndex(0) +10>Emitted(1, 35) Source(5, 42) + SourceIndex(0) +11>Emitted(1, 36) Source(5, 43) + SourceIndex(0) +12>Emitted(1, 37) Source(5, 44) + SourceIndex(0) +--- +>>>function foo1(_a) { +1 > +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >function foo1( +3 > [, nameA = "noName"]: Robot = [-1, "name", "skill"] +1 >Emitted(2, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(2, 15) Source(7, 15) + SourceIndex(0) +3 >Emitted(2, 17) Source(7, 66) + SourceIndex(0) +--- +>>> var _b = _a === void 0 ? [-1, "name", "skill"] : _a, _c = _b[1], nameA = _c === void 0 ? "noName" : _c; +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [, nameA = "noName"]: Robot = [-1, "name", "skill"] +3 > +4 > nameA = "noName" +5 > +6 > nameA = "noName" +1->Emitted(3, 9) Source(7, 15) + SourceIndex(0) +2 >Emitted(3, 56) Source(7, 66) + SourceIndex(0) +3 >Emitted(3, 58) Source(7, 18) + SourceIndex(0) +4 >Emitted(3, 68) Source(7, 34) + SourceIndex(0) +5 >Emitted(3, 70) Source(7, 18) + SourceIndex(0) +6 >Emitted(3, 107) Source(7, 34) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 >]: Robot = [-1, "name", "skill"]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(4, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(4, 12) Source(8, 12) + SourceIndex(0) +3 >Emitted(4, 13) Source(8, 13) + SourceIndex(0) +4 >Emitted(4, 16) Source(8, 16) + SourceIndex(0) +5 >Emitted(4, 17) Source(8, 17) + SourceIndex(0) +6 >Emitted(4, 22) Source(8, 22) + SourceIndex(0) +7 >Emitted(4, 23) Source(8, 23) + SourceIndex(0) +8 >Emitted(4, 24) Source(8, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(5, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(5, 2) Source(9, 2) + SourceIndex(0) +--- +>>>function foo2(_a) { +1-> +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +2 >function foo2( +3 > [numberB = -1]: Robot = [-1, "name", "skill"] +1->Emitted(6, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(6, 15) Source(11, 15) + SourceIndex(0) +3 >Emitted(6, 17) Source(11, 60) + SourceIndex(0) +--- +>>> var _b = (_a === void 0 ? [-1, "name", "skill"] : _a)[0], numberB = _b === void 0 ? -1 : _b; +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > numberB = -1 +3 > +4 > numberB = -1 +1->Emitted(7, 9) Source(11, 16) + SourceIndex(0) +2 >Emitted(7, 61) Source(11, 28) + SourceIndex(0) +3 >Emitted(7, 63) Source(11, 16) + SourceIndex(0) +4 >Emitted(7, 96) Source(11, 28) + SourceIndex(0) +--- +>>> console.log(numberB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1 >]: Robot = [-1, "name", "skill"]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > numberB +7 > ) +8 > ; +1 >Emitted(8, 5) Source(12, 5) + SourceIndex(0) +2 >Emitted(8, 12) Source(12, 12) + SourceIndex(0) +3 >Emitted(8, 13) Source(12, 13) + SourceIndex(0) +4 >Emitted(8, 16) Source(12, 16) + SourceIndex(0) +5 >Emitted(8, 17) Source(12, 17) + SourceIndex(0) +6 >Emitted(8, 24) Source(12, 24) + SourceIndex(0) +7 >Emitted(8, 25) Source(12, 25) + SourceIndex(0) +8 >Emitted(8, 26) Source(12, 26) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(9, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(13, 2) + SourceIndex(0) +--- +>>>function foo3(_a) { +1-> +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +2 >function foo3( +3 > [numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"] +1->Emitted(10, 1) Source(15, 1) + SourceIndex(0) +2 >Emitted(10, 15) Source(15, 15) + SourceIndex(0) +3 >Emitted(10, 17) Source(15, 97) + SourceIndex(0) +--- +>>> var _b = _a === void 0 ? [-1, "name", "skill"] : _a, _c = _b[0], numberA2 = _c === void 0 ? -1 : _c, _d = _b[1], nameA2 = _d === void 0 ? "name" : _d, _e = _b[2], skillA2 = _e === void 0 ? "skill" : _e; +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"] +3 > +4 > numberA2 = -1 +5 > +6 > numberA2 = -1 +7 > , +8 > nameA2 = "name" +9 > +10> nameA2 = "name" +11> , +12> skillA2 = "skill" +13> +14> skillA2 = "skill" +1->Emitted(11, 9) Source(15, 15) + SourceIndex(0) +2 >Emitted(11, 56) Source(15, 97) + SourceIndex(0) +3 >Emitted(11, 58) Source(15, 16) + SourceIndex(0) +4 >Emitted(11, 68) Source(15, 29) + SourceIndex(0) +5 >Emitted(11, 70) Source(15, 16) + SourceIndex(0) +6 >Emitted(11, 104) Source(15, 29) + SourceIndex(0) +7 >Emitted(11, 106) Source(15, 31) + SourceIndex(0) +8 >Emitted(11, 116) Source(15, 46) + SourceIndex(0) +9 >Emitted(11, 118) Source(15, 31) + SourceIndex(0) +10>Emitted(11, 154) Source(15, 46) + SourceIndex(0) +11>Emitted(11, 156) Source(15, 48) + SourceIndex(0) +12>Emitted(11, 166) Source(15, 65) + SourceIndex(0) +13>Emitted(11, 168) Source(15, 48) + SourceIndex(0) +14>Emitted(11, 206) Source(15, 65) + SourceIndex(0) +--- +>>> console.log(nameA2); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 >]: Robot = [-1, "name", "skill"]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA2 +7 > ) +8 > ; +1 >Emitted(12, 5) Source(16, 5) + SourceIndex(0) +2 >Emitted(12, 12) Source(16, 12) + SourceIndex(0) +3 >Emitted(12, 13) Source(16, 13) + SourceIndex(0) +4 >Emitted(12, 16) Source(16, 16) + SourceIndex(0) +5 >Emitted(12, 17) Source(16, 17) + SourceIndex(0) +6 >Emitted(12, 23) Source(16, 23) + SourceIndex(0) +7 >Emitted(12, 24) Source(16, 24) + SourceIndex(0) +8 >Emitted(12, 25) Source(16, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(13, 1) Source(17, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(17, 2) + SourceIndex(0) +--- +>>>function foo4(_a) { +1-> +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +2 >function foo4( +3 > [numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"] +1->Emitted(14, 1) Source(19, 1) + SourceIndex(0) +2 >Emitted(14, 15) Source(19, 15) + SourceIndex(0) +3 >Emitted(14, 17) Source(19, 76) + SourceIndex(0) +--- +>>> var _b = _a === void 0 ? [-1, "name", "skill"] : _a, _c = _b[0], numberA3 = _c === void 0 ? -1 : _c, robotAInfo = _b.slice(1); +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"] +3 > +4 > numberA3 = -1 +5 > +6 > numberA3 = -1 +7 > , +8 > ...robotAInfo +1->Emitted(15, 9) Source(19, 15) + SourceIndex(0) +2 >Emitted(15, 56) Source(19, 76) + SourceIndex(0) +3 >Emitted(15, 58) Source(19, 16) + SourceIndex(0) +4 >Emitted(15, 68) Source(19, 29) + SourceIndex(0) +5 >Emitted(15, 70) Source(19, 16) + SourceIndex(0) +6 >Emitted(15, 104) Source(19, 29) + SourceIndex(0) +7 >Emitted(15, 106) Source(19, 31) + SourceIndex(0) +8 >Emitted(15, 130) Source(19, 44) + SourceIndex(0) +--- +>>> console.log(robotAInfo); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^ +7 > ^ +8 > ^ +1 >]: Robot = [-1, "name", "skill"]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > robotAInfo +7 > ) +8 > ; +1 >Emitted(16, 5) Source(20, 5) + SourceIndex(0) +2 >Emitted(16, 12) Source(20, 12) + SourceIndex(0) +3 >Emitted(16, 13) Source(20, 13) + SourceIndex(0) +4 >Emitted(16, 16) Source(20, 16) + SourceIndex(0) +5 >Emitted(16, 17) Source(20, 17) + SourceIndex(0) +6 >Emitted(16, 27) Source(20, 27) + SourceIndex(0) +7 >Emitted(16, 28) Source(20, 28) + SourceIndex(0) +8 >Emitted(16, 29) Source(20, 29) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(17, 1) Source(21, 1) + SourceIndex(0) +2 >Emitted(17, 2) Source(21, 2) + SourceIndex(0) +--- +>>>foo1(robotA); +1-> +2 >^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +2 >foo1 +3 > ( +4 > robotA +5 > ) +6 > ; +1->Emitted(18, 1) Source(23, 1) + SourceIndex(0) +2 >Emitted(18, 5) Source(23, 5) + SourceIndex(0) +3 >Emitted(18, 6) Source(23, 6) + SourceIndex(0) +4 >Emitted(18, 12) Source(23, 12) + SourceIndex(0) +5 >Emitted(18, 13) Source(23, 13) + SourceIndex(0) +6 >Emitted(18, 14) Source(23, 14) + SourceIndex(0) +--- +>>>foo1([2, "trimmer", "trimming"]); +1-> +2 >^^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^ +7 > ^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^ +10> ^ +11> ^ +12> ^ +1-> + > +2 >foo1 +3 > ( +4 > [ +5 > 2 +6 > , +7 > "trimmer" +8 > , +9 > "trimming" +10> ] +11> ) +12> ; +1->Emitted(19, 1) Source(24, 1) + SourceIndex(0) +2 >Emitted(19, 5) Source(24, 5) + SourceIndex(0) +3 >Emitted(19, 6) Source(24, 6) + SourceIndex(0) +4 >Emitted(19, 7) Source(24, 7) + SourceIndex(0) +5 >Emitted(19, 8) Source(24, 8) + SourceIndex(0) +6 >Emitted(19, 10) Source(24, 10) + SourceIndex(0) +7 >Emitted(19, 19) Source(24, 19) + SourceIndex(0) +8 >Emitted(19, 21) Source(24, 21) + SourceIndex(0) +9 >Emitted(19, 31) Source(24, 31) + SourceIndex(0) +10>Emitted(19, 32) Source(24, 32) + SourceIndex(0) +11>Emitted(19, 33) Source(24, 33) + SourceIndex(0) +12>Emitted(19, 34) Source(24, 34) + SourceIndex(0) +--- +>>>foo2(robotA); +1 > +2 >^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >foo2 +3 > ( +4 > robotA +5 > ) +6 > ; +1 >Emitted(20, 1) Source(26, 1) + SourceIndex(0) +2 >Emitted(20, 5) Source(26, 5) + SourceIndex(0) +3 >Emitted(20, 6) Source(26, 6) + SourceIndex(0) +4 >Emitted(20, 12) Source(26, 12) + SourceIndex(0) +5 >Emitted(20, 13) Source(26, 13) + SourceIndex(0) +6 >Emitted(20, 14) Source(26, 14) + SourceIndex(0) +--- +>>>foo2([2, "trimmer", "trimming"]); +1-> +2 >^^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^ +7 > ^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^ +10> ^ +11> ^ +12> ^ +1-> + > +2 >foo2 +3 > ( +4 > [ +5 > 2 +6 > , +7 > "trimmer" +8 > , +9 > "trimming" +10> ] +11> ) +12> ; +1->Emitted(21, 1) Source(27, 1) + SourceIndex(0) +2 >Emitted(21, 5) Source(27, 5) + SourceIndex(0) +3 >Emitted(21, 6) Source(27, 6) + SourceIndex(0) +4 >Emitted(21, 7) Source(27, 7) + SourceIndex(0) +5 >Emitted(21, 8) Source(27, 8) + SourceIndex(0) +6 >Emitted(21, 10) Source(27, 10) + SourceIndex(0) +7 >Emitted(21, 19) Source(27, 19) + SourceIndex(0) +8 >Emitted(21, 21) Source(27, 21) + SourceIndex(0) +9 >Emitted(21, 31) Source(27, 31) + SourceIndex(0) +10>Emitted(21, 32) Source(27, 32) + SourceIndex(0) +11>Emitted(21, 33) Source(27, 33) + SourceIndex(0) +12>Emitted(21, 34) Source(27, 34) + SourceIndex(0) +--- +>>>foo3(robotA); +1 > +2 >^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >foo3 +3 > ( +4 > robotA +5 > ) +6 > ; +1 >Emitted(22, 1) Source(29, 1) + SourceIndex(0) +2 >Emitted(22, 5) Source(29, 5) + SourceIndex(0) +3 >Emitted(22, 6) Source(29, 6) + SourceIndex(0) +4 >Emitted(22, 12) Source(29, 12) + SourceIndex(0) +5 >Emitted(22, 13) Source(29, 13) + SourceIndex(0) +6 >Emitted(22, 14) Source(29, 14) + SourceIndex(0) +--- +>>>foo3([2, "trimmer", "trimming"]); +1-> +2 >^^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^ +7 > ^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^ +10> ^ +11> ^ +12> ^ +1-> + > +2 >foo3 +3 > ( +4 > [ +5 > 2 +6 > , +7 > "trimmer" +8 > , +9 > "trimming" +10> ] +11> ) +12> ; +1->Emitted(23, 1) Source(30, 1) + SourceIndex(0) +2 >Emitted(23, 5) Source(30, 5) + SourceIndex(0) +3 >Emitted(23, 6) Source(30, 6) + SourceIndex(0) +4 >Emitted(23, 7) Source(30, 7) + SourceIndex(0) +5 >Emitted(23, 8) Source(30, 8) + SourceIndex(0) +6 >Emitted(23, 10) Source(30, 10) + SourceIndex(0) +7 >Emitted(23, 19) Source(30, 19) + SourceIndex(0) +8 >Emitted(23, 21) Source(30, 21) + SourceIndex(0) +9 >Emitted(23, 31) Source(30, 31) + SourceIndex(0) +10>Emitted(23, 32) Source(30, 32) + SourceIndex(0) +11>Emitted(23, 33) Source(30, 33) + SourceIndex(0) +12>Emitted(23, 34) Source(30, 34) + SourceIndex(0) +--- +>>>foo4(robotA); +1 > +2 >^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >foo4 +3 > ( +4 > robotA +5 > ) +6 > ; +1 >Emitted(24, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(24, 5) Source(32, 5) + SourceIndex(0) +3 >Emitted(24, 6) Source(32, 6) + SourceIndex(0) +4 >Emitted(24, 12) Source(32, 12) + SourceIndex(0) +5 >Emitted(24, 13) Source(32, 13) + SourceIndex(0) +6 >Emitted(24, 14) Source(32, 14) + SourceIndex(0) +--- +>>>foo4([2, "trimmer", "trimming"]); +1-> +2 >^^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^ +7 > ^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^ +10> ^ +11> ^ +12> ^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >foo4 +3 > ( +4 > [ +5 > 2 +6 > , +7 > "trimmer" +8 > , +9 > "trimming" +10> ] +11> ) +12> ; +1->Emitted(25, 1) Source(33, 1) + SourceIndex(0) +2 >Emitted(25, 5) Source(33, 5) + SourceIndex(0) +3 >Emitted(25, 6) Source(33, 6) + SourceIndex(0) +4 >Emitted(25, 7) Source(33, 7) + SourceIndex(0) +5 >Emitted(25, 8) Source(33, 8) + SourceIndex(0) +6 >Emitted(25, 10) Source(33, 10) + SourceIndex(0) +7 >Emitted(25, 19) Source(33, 19) + SourceIndex(0) +8 >Emitted(25, 21) Source(33, 21) + SourceIndex(0) +9 >Emitted(25, 31) Source(33, 31) + SourceIndex(0) +10>Emitted(25, 32) Source(33, 32) + SourceIndex(0) +11>Emitted(25, 33) Source(33, 33) + SourceIndex(0) +12>Emitted(25, 34) Source(33, 34) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.symbols b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.symbols new file mode 100644 index 00000000000..e3502b769a8 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.symbols @@ -0,0 +1,94 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 0, 11)) + + log(msg: any): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 1, 8)) +} +type Robot = [number, string, string]; +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 2, 1)) + +var robotA: Robot = [1, "mower", "mowing"]; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 4, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 2, 1)) + +function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) { +>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 4, 43)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 6, 16)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 2, 1)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 6, 16)) +} + +function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) { +>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 8, 1)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 10, 15)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 2, 1)) + + console.log(numberB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 0, 22)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 10, 15)) +} + +function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) { +>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 12, 1)) +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 14, 15)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 14, 29)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 14, 46)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 2, 1)) + + console.log(nameA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 0, 22)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 14, 29)) +} + +function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) { +>foo4 : Symbol(foo4, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 16, 1)) +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 18, 15)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 18, 29)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 2, 1)) + + console.log(robotAInfo); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 0, 22)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 18, 29)) +} + +foo1(robotA); +>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 4, 43)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 4, 3)) + +foo1([2, "trimmer", "trimming"]); +>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 4, 43)) + +foo2(robotA); +>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 8, 1)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 4, 3)) + +foo2([2, "trimmer", "trimming"]); +>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 8, 1)) + +foo3(robotA); +>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 12, 1)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 4, 3)) + +foo3([2, "trimmer", "trimming"]); +>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 12, 1)) + +foo4(robotA); +>foo4 : Symbol(foo4, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 16, 1)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 4, 3)) + +foo4([2, "trimmer", "trimming"]); +>foo4 : Symbol(foo4, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts, 16, 1)) + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.types b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.types new file mode 100644 index 00000000000..8e12e876b1d --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.types @@ -0,0 +1,156 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts === +declare var console: { +>console : { log(msg: any): void; } + + log(msg: any): void; +>log : (msg: any) => void +>msg : any +} +type Robot = [number, string, string]; +>Robot : [number, string, string] + +var robotA: Robot = [1, "mower", "mowing"]; +>robotA : [number, string, string] +>Robot : [number, string, string] +>[1, "mower", "mowing"] : [number, string, string] +>1 : number +>"mower" : string +>"mowing" : string + +function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) { +>foo1 : ([, nameA = "noName"]?: [number, string, string]) => void +> : undefined +>nameA : string +>"noName" : string +>Robot : [number, string, string] +>[-1, "name", "skill"] : [number, string, string] +>-1 : number +>1 : number +>"name" : string +>"skill" : string + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} + +function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) { +>foo2 : ([numberB = -1]?: [number, string, string]) => void +>numberB : number +>-1 : number +>1 : number +>Robot : [number, string, string] +>[-1, "name", "skill"] : [number, string, string] +>-1 : number +>1 : number +>"name" : string +>"skill" : string + + console.log(numberB); +>console.log(numberB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberB : number +} + +function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) { +>foo3 : ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]?: [number, string, string]) => void +>numberA2 : number +>-1 : number +>1 : number +>nameA2 : string +>"name" : string +>skillA2 : string +>"skill" : string +>Robot : [number, string, string] +>[-1, "name", "skill"] : [number, string, string] +>-1 : number +>1 : number +>"name" : string +>"skill" : string + + console.log(nameA2); +>console.log(nameA2) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA2 : string +} + +function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) { +>foo4 : ([numberA3 = -1, ...robotAInfo]?: [number, string, string]) => void +>numberA3 : number +>-1 : number +>1 : number +>robotAInfo : (number | string)[] +>Robot : [number, string, string] +>[-1, "name", "skill"] : [number, string, string] +>-1 : number +>1 : number +>"name" : string +>"skill" : string + + console.log(robotAInfo); +>console.log(robotAInfo) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>robotAInfo : (number | string)[] +} + +foo1(robotA); +>foo1(robotA) : void +>foo1 : ([, nameA = "noName"]?: [number, string, string]) => void +>robotA : [number, string, string] + +foo1([2, "trimmer", "trimming"]); +>foo1([2, "trimmer", "trimming"]) : void +>foo1 : ([, nameA = "noName"]?: [number, string, string]) => void +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + +foo2(robotA); +>foo2(robotA) : void +>foo2 : ([numberB = -1]?: [number, string, string]) => void +>robotA : [number, string, string] + +foo2([2, "trimmer", "trimming"]); +>foo2([2, "trimmer", "trimming"]) : void +>foo2 : ([numberB = -1]?: [number, string, string]) => void +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + +foo3(robotA); +>foo3(robotA) : void +>foo3 : ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]?: [number, string, string]) => void +>robotA : [number, string, string] + +foo3([2, "trimmer", "trimming"]); +>foo3([2, "trimmer", "trimming"]) : void +>foo3 : ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]?: [number, string, string]) => void +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + +foo4(robotA); +>foo4(robotA) : void +>foo4 : ([numberA3 = -1, ...robotAInfo]?: [number, string, string]) => void +>robotA : [number, string, string] + +foo4([2, "trimmer", "trimming"]); +>foo4([2, "trimmer", "trimming"]) : void +>foo4 : ([numberA3 = -1, ...robotAInfo]?: [number, string, string]) => void +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.js b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.js new file mode 100644 index 00000000000..81add872b0d --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.js @@ -0,0 +1,52 @@ +//// [sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts] +declare var console: { + log(msg: any): void; +} +type Robot = [string, string[]]; +var robotA: Robot = ["trimmer", ["trimming", "edging"]]; + +function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]]) { + console.log(skillA); +} + +function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) { + console.log(nameMB); +} + +function foo3([nameMA = "noName", [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["noSkill", "noSkill"]]: Robot) { + console.log(nameMA); +} + +foo1(robotA); +foo1(["roomba", ["vaccum", "mopping"]]); + +foo2(robotA); +foo2(["roomba", ["vaccum", "mopping"]]); + +foo3(robotA); +foo3(["roomba", ["vaccum", "mopping"]]); + +//// [sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.js] +var robotA = ["trimmer", ["trimming", "edging"]]; +function foo1(_a) { + var _b = _a === void 0 ? ["name", ["skill1", "skill2"]] : _a, _c = _b[1], skillA = _c === void 0 ? ["noSkill", "noSkill"] : _c; + console.log(skillA); +} +function foo2(_a) { + var _b = (_a === void 0 ? ["name", ["skill1", "skill2"]] : _a)[0], nameMB = _b === void 0 ? "noName" : _b; + console.log(nameMB); +} +function foo3(_a) { + var _b = _a[0], nameMA = _b === void 0 ? "noName" : _b, _c = _a[1], _d = _c === void 0 ? ["noSkill", "noSkill"] : _c, _e = _d[0], primarySkillA = _e === void 0 ? "primary" : _e, _f = _d[1], secondarySkillA = _f === void 0 ? "secondary" : _f; + console.log(nameMA); +} +foo1(robotA); +foo1(["roomba", ["vaccum", "mopping"]]); +foo2(robotA); +foo2(["roomba", ["vaccum", "mopping"]]); +foo3(robotA); +foo3(["roomba", ["vaccum", "mopping"]]); +//# sourceMappingURL=sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.js.map new file mode 100644 index 00000000000..a489a3e41bf --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.js.map] +{"version":3,"file":"sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts"],"names":[],"mappings":"AAIA,IAAI,MAAM,GAAU,CAAC,SAAS,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;AAExD,cAAc,EAA0E;QAA1E,wDAA0E,EAAvE,UAA+B,EAA/B,oDAA+B;IAC5C,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,cAAc,EAA2D;QAA1D,6DAAiB,EAAjB,sCAAiB;IAC5B,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,cAAc,EAGoB;QAHnB,UAAiB,EAAjB,sCAAiB,EAAE,UAGR,EAHQ,gDAGR,EAFtB,UAAyB,EAAzB,8CAAyB,EACzB,UAA6B,EAA7B,kDAA6B;IAE7B,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAExC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAExC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.sourcemap.txt new file mode 100644 index 00000000000..28f94da65a1 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.sourcemap.txt @@ -0,0 +1,512 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.js +mapUrl: sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.js.map +sourceRoot: +sources: sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.js +sourceFile:sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts +------------------------------------------------------------------- +>>>var robotA = ["trimmer", ["trimming", "edging"]]; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^ +12> ^ +13> ^ +14> ^ +1 >declare var console: { + > log(msg: any): void; + >} + >type Robot = [string, string[]]; + > +2 >var +3 > robotA +4 > : Robot = +5 > [ +6 > "trimmer" +7 > , +8 > [ +9 > "trimming" +10> , +11> "edging" +12> ] +13> ] +14> ; +1 >Emitted(1, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(5, 5) + SourceIndex(0) +3 >Emitted(1, 11) Source(5, 11) + SourceIndex(0) +4 >Emitted(1, 14) Source(5, 21) + SourceIndex(0) +5 >Emitted(1, 15) Source(5, 22) + SourceIndex(0) +6 >Emitted(1, 24) Source(5, 31) + SourceIndex(0) +7 >Emitted(1, 26) Source(5, 33) + SourceIndex(0) +8 >Emitted(1, 27) Source(5, 34) + SourceIndex(0) +9 >Emitted(1, 37) Source(5, 44) + SourceIndex(0) +10>Emitted(1, 39) Source(5, 46) + SourceIndex(0) +11>Emitted(1, 47) Source(5, 54) + SourceIndex(0) +12>Emitted(1, 48) Source(5, 55) + SourceIndex(0) +13>Emitted(1, 49) Source(5, 56) + SourceIndex(0) +14>Emitted(1, 50) Source(5, 57) + SourceIndex(0) +--- +>>>function foo1(_a) { +1 > +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >function foo1( +3 > [, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]] +1 >Emitted(2, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(2, 15) Source(7, 15) + SourceIndex(0) +3 >Emitted(2, 17) Source(7, 89) + SourceIndex(0) +--- +>>> var _b = _a === void 0 ? ["name", ["skill1", "skill2"]] : _a, _c = _b[1], skillA = _c === void 0 ? ["noSkill", "noSkill"] : _c; +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]] +3 > +4 > skillA = ["noSkill", "noSkill"] +5 > +6 > skillA = ["noSkill", "noSkill"] +1->Emitted(3, 9) Source(7, 15) + SourceIndex(0) +2 >Emitted(3, 65) Source(7, 89) + SourceIndex(0) +3 >Emitted(3, 67) Source(7, 18) + SourceIndex(0) +4 >Emitted(3, 77) Source(7, 49) + SourceIndex(0) +5 >Emitted(3, 79) Source(7, 18) + SourceIndex(0) +6 >Emitted(3, 131) Source(7, 49) + SourceIndex(0) +--- +>>> console.log(skillA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 >]: Robot= ["name", ["skill1", "skill2"]]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > skillA +7 > ) +8 > ; +1 >Emitted(4, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(4, 12) Source(8, 12) + SourceIndex(0) +3 >Emitted(4, 13) Source(8, 13) + SourceIndex(0) +4 >Emitted(4, 16) Source(8, 16) + SourceIndex(0) +5 >Emitted(4, 17) Source(8, 17) + SourceIndex(0) +6 >Emitted(4, 23) Source(8, 23) + SourceIndex(0) +7 >Emitted(4, 24) Source(8, 24) + SourceIndex(0) +8 >Emitted(4, 25) Source(8, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(5, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(5, 2) Source(9, 2) + SourceIndex(0) +--- +>>>function foo2(_a) { +1-> +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +2 >function foo2( +3 > [nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]] +1->Emitted(6, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(6, 15) Source(11, 15) + SourceIndex(0) +3 >Emitted(6, 17) Source(11, 74) + SourceIndex(0) +--- +>>> var _b = (_a === void 0 ? ["name", ["skill1", "skill2"]] : _a)[0], nameMB = _b === void 0 ? "noName" : _b; +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > nameMB = "noName" +3 > +4 > nameMB = "noName" +1->Emitted(7, 9) Source(11, 16) + SourceIndex(0) +2 >Emitted(7, 70) Source(11, 33) + SourceIndex(0) +3 >Emitted(7, 72) Source(11, 16) + SourceIndex(0) +4 >Emitted(7, 110) Source(11, 33) + SourceIndex(0) +--- +>>> console.log(nameMB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 >]: Robot = ["name", ["skill1", "skill2"]]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMB +7 > ) +8 > ; +1 >Emitted(8, 5) Source(12, 5) + SourceIndex(0) +2 >Emitted(8, 12) Source(12, 12) + SourceIndex(0) +3 >Emitted(8, 13) Source(12, 13) + SourceIndex(0) +4 >Emitted(8, 16) Source(12, 16) + SourceIndex(0) +5 >Emitted(8, 17) Source(12, 17) + SourceIndex(0) +6 >Emitted(8, 23) Source(12, 23) + SourceIndex(0) +7 >Emitted(8, 24) Source(12, 24) + SourceIndex(0) +8 >Emitted(8, 25) Source(12, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(9, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(13, 2) + SourceIndex(0) +--- +>>>function foo3(_a) { +1-> +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +2 >function foo3( +3 > [nameMA = "noName", [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["noSkill", "noSkill"]]: Robot +1->Emitted(10, 1) Source(15, 1) + SourceIndex(0) +2 >Emitted(10, 15) Source(15, 15) + SourceIndex(0) +3 >Emitted(10, 17) Source(18, 35) + SourceIndex(0) +--- +>>> var _b = _a[0], nameMA = _b === void 0 ? "noName" : _b, _c = _a[1], _d = _c === void 0 ? ["noSkill", "noSkill"] : _c, _e = _d[0], primarySkillA = _e === void 0 ? "primary" : _e, _f = _d[1], secondarySkillA = _f === void 0 ? "secondary" : _f; +1->^^^^^^^^ +2 > ^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > nameMA = "noName" +3 > +4 > nameMA = "noName" +5 > , +6 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["noSkill", "noSkill"] +7 > +8 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["noSkill", "noSkill"] +9 > +10> primarySkillA = "primary" +11> +12> primarySkillA = "primary" +13> , + > +14> secondarySkillA = "secondary" +15> +16> secondarySkillA = "secondary" +1->Emitted(11, 9) Source(15, 16) + SourceIndex(0) +2 >Emitted(11, 19) Source(15, 33) + SourceIndex(0) +3 >Emitted(11, 21) Source(15, 16) + SourceIndex(0) +4 >Emitted(11, 59) Source(15, 33) + SourceIndex(0) +5 >Emitted(11, 61) Source(15, 35) + SourceIndex(0) +6 >Emitted(11, 71) Source(18, 27) + SourceIndex(0) +7 >Emitted(11, 73) Source(15, 35) + SourceIndex(0) +8 >Emitted(11, 121) Source(18, 27) + SourceIndex(0) +9 >Emitted(11, 123) Source(16, 5) + SourceIndex(0) +10>Emitted(11, 133) Source(16, 30) + SourceIndex(0) +11>Emitted(11, 135) Source(16, 5) + SourceIndex(0) +12>Emitted(11, 181) Source(16, 30) + SourceIndex(0) +13>Emitted(11, 183) Source(17, 5) + SourceIndex(0) +14>Emitted(11, 193) Source(17, 34) + SourceIndex(0) +15>Emitted(11, 195) Source(17, 5) + SourceIndex(0) +16>Emitted(11, 245) Source(17, 34) + SourceIndex(0) +--- +>>> console.log(nameMA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + >] = ["noSkill", "noSkill"]]: Robot) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMA +7 > ) +8 > ; +1 >Emitted(12, 5) Source(19, 5) + SourceIndex(0) +2 >Emitted(12, 12) Source(19, 12) + SourceIndex(0) +3 >Emitted(12, 13) Source(19, 13) + SourceIndex(0) +4 >Emitted(12, 16) Source(19, 16) + SourceIndex(0) +5 >Emitted(12, 17) Source(19, 17) + SourceIndex(0) +6 >Emitted(12, 23) Source(19, 23) + SourceIndex(0) +7 >Emitted(12, 24) Source(19, 24) + SourceIndex(0) +8 >Emitted(12, 25) Source(19, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(13, 1) Source(20, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(20, 2) + SourceIndex(0) +--- +>>>foo1(robotA); +1-> +2 >^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +2 >foo1 +3 > ( +4 > robotA +5 > ) +6 > ; +1->Emitted(14, 1) Source(22, 1) + SourceIndex(0) +2 >Emitted(14, 5) Source(22, 5) + SourceIndex(0) +3 >Emitted(14, 6) Source(22, 6) + SourceIndex(0) +4 >Emitted(14, 12) Source(22, 12) + SourceIndex(0) +5 >Emitted(14, 13) Source(22, 13) + SourceIndex(0) +6 >Emitted(14, 14) Source(22, 14) + SourceIndex(0) +--- +>>>foo1(["roomba", ["vaccum", "mopping"]]); +1-> +2 >^^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^ +6 > ^^ +7 > ^ +8 > ^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^ +11> ^ +12> ^ +13> ^ +14> ^ +1-> + > +2 >foo1 +3 > ( +4 > [ +5 > "roomba" +6 > , +7 > [ +8 > "vaccum" +9 > , +10> "mopping" +11> ] +12> ] +13> ) +14> ; +1->Emitted(15, 1) Source(23, 1) + SourceIndex(0) +2 >Emitted(15, 5) Source(23, 5) + SourceIndex(0) +3 >Emitted(15, 6) Source(23, 6) + SourceIndex(0) +4 >Emitted(15, 7) Source(23, 7) + SourceIndex(0) +5 >Emitted(15, 15) Source(23, 15) + SourceIndex(0) +6 >Emitted(15, 17) Source(23, 17) + SourceIndex(0) +7 >Emitted(15, 18) Source(23, 18) + SourceIndex(0) +8 >Emitted(15, 26) Source(23, 26) + SourceIndex(0) +9 >Emitted(15, 28) Source(23, 28) + SourceIndex(0) +10>Emitted(15, 37) Source(23, 37) + SourceIndex(0) +11>Emitted(15, 38) Source(23, 38) + SourceIndex(0) +12>Emitted(15, 39) Source(23, 39) + SourceIndex(0) +13>Emitted(15, 40) Source(23, 40) + SourceIndex(0) +14>Emitted(15, 41) Source(23, 41) + SourceIndex(0) +--- +>>>foo2(robotA); +1 > +2 >^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >foo2 +3 > ( +4 > robotA +5 > ) +6 > ; +1 >Emitted(16, 1) Source(25, 1) + SourceIndex(0) +2 >Emitted(16, 5) Source(25, 5) + SourceIndex(0) +3 >Emitted(16, 6) Source(25, 6) + SourceIndex(0) +4 >Emitted(16, 12) Source(25, 12) + SourceIndex(0) +5 >Emitted(16, 13) Source(25, 13) + SourceIndex(0) +6 >Emitted(16, 14) Source(25, 14) + SourceIndex(0) +--- +>>>foo2(["roomba", ["vaccum", "mopping"]]); +1-> +2 >^^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^ +6 > ^^ +7 > ^ +8 > ^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^ +11> ^ +12> ^ +13> ^ +14> ^ +1-> + > +2 >foo2 +3 > ( +4 > [ +5 > "roomba" +6 > , +7 > [ +8 > "vaccum" +9 > , +10> "mopping" +11> ] +12> ] +13> ) +14> ; +1->Emitted(17, 1) Source(26, 1) + SourceIndex(0) +2 >Emitted(17, 5) Source(26, 5) + SourceIndex(0) +3 >Emitted(17, 6) Source(26, 6) + SourceIndex(0) +4 >Emitted(17, 7) Source(26, 7) + SourceIndex(0) +5 >Emitted(17, 15) Source(26, 15) + SourceIndex(0) +6 >Emitted(17, 17) Source(26, 17) + SourceIndex(0) +7 >Emitted(17, 18) Source(26, 18) + SourceIndex(0) +8 >Emitted(17, 26) Source(26, 26) + SourceIndex(0) +9 >Emitted(17, 28) Source(26, 28) + SourceIndex(0) +10>Emitted(17, 37) Source(26, 37) + SourceIndex(0) +11>Emitted(17, 38) Source(26, 38) + SourceIndex(0) +12>Emitted(17, 39) Source(26, 39) + SourceIndex(0) +13>Emitted(17, 40) Source(26, 40) + SourceIndex(0) +14>Emitted(17, 41) Source(26, 41) + SourceIndex(0) +--- +>>>foo3(robotA); +1 > +2 >^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +2 >foo3 +3 > ( +4 > robotA +5 > ) +6 > ; +1 >Emitted(18, 1) Source(28, 1) + SourceIndex(0) +2 >Emitted(18, 5) Source(28, 5) + SourceIndex(0) +3 >Emitted(18, 6) Source(28, 6) + SourceIndex(0) +4 >Emitted(18, 12) Source(28, 12) + SourceIndex(0) +5 >Emitted(18, 13) Source(28, 13) + SourceIndex(0) +6 >Emitted(18, 14) Source(28, 14) + SourceIndex(0) +--- +>>>foo3(["roomba", ["vaccum", "mopping"]]); +1-> +2 >^^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^ +6 > ^^ +7 > ^ +8 > ^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^ +11> ^ +12> ^ +13> ^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >foo3 +3 > ( +4 > [ +5 > "roomba" +6 > , +7 > [ +8 > "vaccum" +9 > , +10> "mopping" +11> ] +12> ] +13> ) +14> ; +1->Emitted(19, 1) Source(29, 1) + SourceIndex(0) +2 >Emitted(19, 5) Source(29, 5) + SourceIndex(0) +3 >Emitted(19, 6) Source(29, 6) + SourceIndex(0) +4 >Emitted(19, 7) Source(29, 7) + SourceIndex(0) +5 >Emitted(19, 15) Source(29, 15) + SourceIndex(0) +6 >Emitted(19, 17) Source(29, 17) + SourceIndex(0) +7 >Emitted(19, 18) Source(29, 18) + SourceIndex(0) +8 >Emitted(19, 26) Source(29, 26) + SourceIndex(0) +9 >Emitted(19, 28) Source(29, 28) + SourceIndex(0) +10>Emitted(19, 37) Source(29, 37) + SourceIndex(0) +11>Emitted(19, 38) Source(29, 38) + SourceIndex(0) +12>Emitted(19, 39) Source(29, 39) + SourceIndex(0) +13>Emitted(19, 40) Source(29, 40) + SourceIndex(0) +14>Emitted(19, 41) Source(29, 41) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.symbols b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.symbols new file mode 100644 index 00000000000..923e8327e6c --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.symbols @@ -0,0 +1,80 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 0, 11)) + + log(msg: any): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 1, 8)) +} +type Robot = [string, string[]]; +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 2, 1)) + +var robotA: Robot = ["trimmer", ["trimming", "edging"]]; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 4, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 2, 1)) + +function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]]) { +>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 4, 56)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 6, 16)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 2, 1)) + + console.log(skillA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 0, 22)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 6, 16)) +} + +function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) { +>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 8, 1)) +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 10, 15)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 2, 1)) + + console.log(nameMB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 0, 22)) +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 10, 15)) +} + +function foo3([nameMA = "noName", [ +>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 12, 1)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 14, 15)) + + primarySkillA = "primary", +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 14, 35)) + + secondarySkillA = "secondary" +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 15, 30)) + +] = ["noSkill", "noSkill"]]: Robot) { +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 2, 1)) + + console.log(nameMA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 0, 22)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 14, 15)) +} + +foo1(robotA); +>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 4, 56)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 4, 3)) + +foo1(["roomba", ["vaccum", "mopping"]]); +>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 4, 56)) + +foo2(robotA); +>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 8, 1)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 4, 3)) + +foo2(["roomba", ["vaccum", "mopping"]]); +>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 8, 1)) + +foo3(robotA); +>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 12, 1)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 4, 3)) + +foo3(["roomba", ["vaccum", "mopping"]]); +>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts, 12, 1)) + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.types b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.types new file mode 100644 index 00000000000..52423dfce21 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.types @@ -0,0 +1,139 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts === +declare var console: { +>console : { log(msg: any): void; } + + log(msg: any): void; +>log : (msg: any) => void +>msg : any +} +type Robot = [string, string[]]; +>Robot : [string, string[]] + +var robotA: Robot = ["trimmer", ["trimming", "edging"]]; +>robotA : [string, string[]] +>Robot : [string, string[]] +>["trimmer", ["trimming", "edging"]] : [string, string[]] +>"trimmer" : string +>["trimming", "edging"] : string[] +>"trimming" : string +>"edging" : string + +function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]]) { +>foo1 : ([, skillA = ["noSkill", "noSkill"]]?: [string, string[]]) => void +> : undefined +>skillA : string[] +>["noSkill", "noSkill"] : string[] +>"noSkill" : string +>"noSkill" : string +>Robot : [string, string[]] +>["name", ["skill1", "skill2"]] : [string, string[]] +>"name" : string +>["skill1", "skill2"] : string[] +>"skill1" : string +>"skill2" : string + + console.log(skillA); +>console.log(skillA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>skillA : string[] +} + +function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) { +>foo2 : ([nameMB = "noName"]?: [string, string[]]) => void +>nameMB : string +>"noName" : string +>Robot : [string, string[]] +>["name", ["skill1", "skill2"]] : [string, string[]] +>"name" : string +>["skill1", "skill2"] : string[] +>"skill1" : string +>"skill2" : string + + console.log(nameMB); +>console.log(nameMB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMB : string +} + +function foo3([nameMA = "noName", [ +>foo3 : ([nameMA = "noName", [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["noSkill", "noSkill"]]: [string, string[]]) => void +>nameMA : string +>"noName" : string + + primarySkillA = "primary", +>primarySkillA : string +>"primary" : string + + secondarySkillA = "secondary" +>secondarySkillA : string +>"secondary" : string + +] = ["noSkill", "noSkill"]]: Robot) { +>["noSkill", "noSkill"] : [string, string] +>"noSkill" : string +>"noSkill" : string +>Robot : [string, string[]] + + console.log(nameMA); +>console.log(nameMA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMA : string +} + +foo1(robotA); +>foo1(robotA) : void +>foo1 : ([, skillA = ["noSkill", "noSkill"]]?: [string, string[]]) => void +>robotA : [string, string[]] + +foo1(["roomba", ["vaccum", "mopping"]]); +>foo1(["roomba", ["vaccum", "mopping"]]) : void +>foo1 : ([, skillA = ["noSkill", "noSkill"]]?: [string, string[]]) => void +>["roomba", ["vaccum", "mopping"]] : [string, string[]] +>"roomba" : string +>["vaccum", "mopping"] : string[] +>"vaccum" : string +>"mopping" : string + +foo2(robotA); +>foo2(robotA) : void +>foo2 : ([nameMB = "noName"]?: [string, string[]]) => void +>robotA : [string, string[]] + +foo2(["roomba", ["vaccum", "mopping"]]); +>foo2(["roomba", ["vaccum", "mopping"]]) : void +>foo2 : ([nameMB = "noName"]?: [string, string[]]) => void +>["roomba", ["vaccum", "mopping"]] : [string, string[]] +>"roomba" : string +>["vaccum", "mopping"] : string[] +>"vaccum" : string +>"mopping" : string + +foo3(robotA); +>foo3(robotA) : void +>foo3 : ([nameMA = "noName", [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["noSkill", "noSkill"]]: [string, string[]]) => void +>robotA : [string, string[]] + +foo3(["roomba", ["vaccum", "mopping"]]); +>foo3(["roomba", ["vaccum", "mopping"]]) : void +>foo3 : ([nameMA = "noName", [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["noSkill", "noSkill"]]: [string, string[]]) => void +>["roomba", ["vaccum", "mopping"]] : [string, string[]] +>"roomba" : string +>["vaccum", "mopping"] : string[] +>"vaccum" : string +>"mopping" : string + diff --git a/tests/cases/compiler/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts b/tests/cases/compiler/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts new file mode 100644 index 00000000000..c9dd735e8b6 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts @@ -0,0 +1,44 @@ +// @sourcemap: true +declare var console: { + log(msg: string): void; +} +interface Robot { + name: string; + skills: { + primary?: string; + secondary?: string; + }; +} +var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; + +function foo1( + { + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "SomeSkill", secondary: "someSkill" } + }: Robot = robotA) { + console.log(primaryA); +} +function foo2( + { + name: nameC = "name", + skills: { + primary: primaryB = "primary", + secondary: secondaryB = "secondary" + } = { primary: "SomeSkill", secondary: "someSkill" } + }: Robot = robotA) { + console.log(secondaryB); +} +function foo3({ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA) { + console.log(skills.primary); +} + +foo1(robotA); +foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); + +foo2(robotA); +foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); + +foo3(robotA); +foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); diff --git a/tests/cases/compiler/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts b/tests/cases/compiler/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts new file mode 100644 index 00000000000..6fc9c5a605e --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts @@ -0,0 +1,29 @@ +// @sourcemap: true +interface Robot { + name?: string; + skill?: string; +} +declare var console: { + log(msg: string): void; +} +var hello = "hello"; +var robotA: Robot = { name: "mower", skill: "mowing" }; + +function foo1({ name: nameA = "" }: Robot = { }) { + console.log(nameA); +} +function foo2({ name: nameB = "", skill: skillB = "noSkill" }: Robot = {}) { + console.log(nameB); +} +function foo3({ name = "" }: Robot = {}) { + console.log(name); +} + +foo1(robotA); +foo1({ name: "Edger", skill: "cutting edges" }); + +foo2(robotA); +foo2({ name: "Edger", skill: "cutting edges" }); + +foo3(robotA); +foo3({ name: "Edger", skill: "cutting edges" }); diff --git a/tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts b/tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts new file mode 100644 index 00000000000..345d3965156 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts @@ -0,0 +1,34 @@ +// @sourcemap: true +declare var console: { + log(msg: any): void; +} +type Robot = [number, string, string]; +var robotA: Robot = [1, "mower", "mowing"]; + +function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) { + console.log(nameA); +} + +function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) { + console.log(numberB); +} + +function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) { + console.log(nameA2); +} + +function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) { + console.log(robotAInfo); +} + +foo1(robotA); +foo1([2, "trimmer", "trimming"]); + +foo2(robotA); +foo2([2, "trimmer", "trimming"]); + +foo3(robotA); +foo3([2, "trimmer", "trimming"]); + +foo4(robotA); +foo4([2, "trimmer", "trimming"]); \ No newline at end of file diff --git a/tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts b/tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts new file mode 100644 index 00000000000..83f95c09c02 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts @@ -0,0 +1,30 @@ +// @sourcemap: true +declare var console: { + log(msg: any): void; +} +type Robot = [string, string[]]; +var robotA: Robot = ["trimmer", ["trimming", "edging"]]; + +function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]]) { + console.log(skillA); +} + +function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) { + console.log(nameMB); +} + +function foo3([nameMA = "noName", [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["noSkill", "noSkill"]]: Robot) { + console.log(nameMA); +} + +foo1(robotA); +foo1(["roomba", ["vaccum", "mopping"]]); + +foo2(robotA); +foo2(["roomba", ["vaccum", "mopping"]]); + +foo3(robotA); +foo3(["roomba", ["vaccum", "mopping"]]); \ No newline at end of file From 15ac9b32abf66acff66cdeb78c0718b55386d29f Mon Sep 17 00:00:00 2001 From: Yui T Date: Fri, 11 Dec 2015 14:12:57 -0800 Subject: [PATCH 055/209] Update tests --- .../fourslash/tsxCompletionOnClosingTag1.ts | 6 ++++++ .../fourslash/tsxCompletionOnClosingTag2.ts | 12 ++++++++--- .../fourslash/tsxCompletionOnClosingTag3.ts | 20 ------------------- .../tsxCompletionOnClosingTagWithoutJSX1.ts | 8 ++++++++ ...> tsxCompletionOnClosingTagWithoutJSX2.ts} | 0 .../tsxCompletionOnOpeningTagWithoutJSX1.ts | 8 ++++++++ 6 files changed, 31 insertions(+), 23 deletions(-) delete mode 100644 tests/cases/fourslash/tsxCompletionOnClosingTag3.ts create mode 100644 tests/cases/fourslash/tsxCompletionOnClosingTagWithoutJSX1.ts rename tests/cases/fourslash/{tsxCompletionOnClosingTag4.ts => tsxCompletionOnClosingTagWithoutJSX2.ts} (100%) create mode 100644 tests/cases/fourslash/tsxCompletionOnOpeningTagWithoutJSX1.ts diff --git a/tests/cases/fourslash/tsxCompletionOnClosingTag1.ts b/tests/cases/fourslash/tsxCompletionOnClosingTag1.ts index 742009b487e..54a0b61879f 100644 --- a/tests/cases/fourslash/tsxCompletionOnClosingTag1.ts +++ b/tests/cases/fourslash/tsxCompletionOnClosingTag1.ts @@ -1,6 +1,12 @@ /// //@Filename: file.tsx +//// declare module JSX { +//// interface Element { } +//// interface IntrinsicElements { +//// div: { ONE: string; TWO: number; } +//// } +//// } //// var x1 =
+////

Hello world +//// -goTo.marker(); +goTo.marker("1"); verify.memberListCount(1); -verify.completionListContains('div'); \ No newline at end of file +verify.completionListContains('div'); + +goTo.marker("2"); +verify.memberListCount(1); +verify.completionListContains('h1') diff --git a/tests/cases/fourslash/tsxCompletionOnClosingTag3.ts b/tests/cases/fourslash/tsxCompletionOnClosingTag3.ts deleted file mode 100644 index a39740df586..00000000000 --- a/tests/cases/fourslash/tsxCompletionOnClosingTag3.ts +++ /dev/null @@ -1,20 +0,0 @@ -/// - -//@Filename: file.tsx -//// declare module JSX { -//// interface Element { } -//// interface IntrinsicElements { -//// div: { ONE: string; TWO: number; } -//// } -//// } -//// var x1 =
-////

Hello world -//// - -goTo.marker("1"); -verify.memberListCount(1); -verify.completionListContains('div'); - -goTo.marker("2"); -verify.memberListCount(1); -verify.completionListContains('h1') diff --git a/tests/cases/fourslash/tsxCompletionOnClosingTagWithoutJSX1.ts b/tests/cases/fourslash/tsxCompletionOnClosingTagWithoutJSX1.ts new file mode 100644 index 00000000000..742009b487e --- /dev/null +++ b/tests/cases/fourslash/tsxCompletionOnClosingTagWithoutJSX1.ts @@ -0,0 +1,8 @@ +/// + +//@Filename: file.tsx +//// var x1 =
+ +//@Filename: file.tsx +//// var x =
Date: Fri, 11 Dec 2015 14:18:31 -0800 Subject: [PATCH 056/209] Test cases for destructuring with default values in "for of" --- ...ngForOfArrayBindingPatternDefaultValues.js | 204 + ...rOfArrayBindingPatternDefaultValues.js.map | 2 + ...yBindingPatternDefaultValues.sourcemap.txt | 2742 ++++++++++++ ...OfArrayBindingPatternDefaultValues.symbols | 325 ++ ...orOfArrayBindingPatternDefaultValues.types | 452 ++ ...gForOfArrayBindingPatternDefaultValues2.js | 214 + ...OfArrayBindingPatternDefaultValues2.js.map | 2 + ...BindingPatternDefaultValues2.sourcemap.txt | 2853 ++++++++++++ ...fArrayBindingPatternDefaultValues2.symbols | 345 ++ ...rOfArrayBindingPatternDefaultValues2.types | 544 +++ ...gForOfObjectBindingPatternDefaultValues.js | 152 + ...OfObjectBindingPatternDefaultValues.js.map | 2 + ...tBindingPatternDefaultValues.sourcemap.txt | 2082 +++++++++ ...fObjectBindingPatternDefaultValues.symbols | 314 ++ ...rOfObjectBindingPatternDefaultValues.types | 428 ++ ...ForOfObjectBindingPatternDefaultValues2.js | 282 ++ ...fObjectBindingPatternDefaultValues2.js.map | 2 + ...BindingPatternDefaultValues2.sourcemap.txt | 3951 +++++++++++++++++ ...ObjectBindingPatternDefaultValues2.symbols | 564 +++ ...OfObjectBindingPatternDefaultValues2.types | 829 ++++ ...ngForOfArrayBindingPatternDefaultValues.ts | 105 + ...gForOfArrayBindingPatternDefaultValues2.ts | 110 + ...gForOfObjectBindingPatternDefaultValues.ts | 90 + ...ForOfObjectBindingPatternDefaultValues2.ts | 167 + 24 files changed, 16761 insertions(+) create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.types create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.types create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.types create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.types create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.js b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.js new file mode 100644 index 00000000000..ff692af87f2 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.js @@ -0,0 +1,204 @@ +//// [sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts] +declare var console: { + log(msg: any): void; +} +type Robot = [number, string, string]; +type MultiSkilledRobot = [string, [string, string]]; + +let robotA: Robot = [1, "mower", "mowing"]; +let robotB: Robot = [2, "trimmer", "trimming"]; +let robots = [robotA, robotB]; +function getRobots() { + return robots; +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +let multiRobots = [multiRobotA, multiRobotB]; +function getMultiRobots() { + return multiRobots; +} + +for (let [, nameA = "noName"] of robots) { + console.log(nameA); +} +for (let [, nameA = "noName"] of getRobots()) { + console.log(nameA); +} +for (let [, nameA = "noName"] of [robotA, robotB]) { + console.log(nameA); +} +for (let [, [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["skill1", "skill2"]] of multiRobots) { + console.log(primarySkillA); +} +for (let [, [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["skill1", "skill2"]] of getMultiRobots()) { + console.log(primarySkillA); +} +for (let [, [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { + console.log(primarySkillA); +} + +for (let [numberB = -1] of robots) { + console.log(numberB); +} +for (let [numberB = -1] of getRobots()) { + console.log(numberB); +} +for (let [numberB = -1] of [robotA, robotB]) { + console.log(numberB); +} +for (let [nameB = "noName"] of multiRobots) { + console.log(nameB); +} +for (let [nameB = "noName"] of getMultiRobots()) { + console.log(nameB); +} +for (let [nameB = "noName"] of [multiRobotA, multiRobotB]) { + console.log(nameB); +} + +for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { + console.log(nameA2); +} +for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { + console.log(nameA2); +} +for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) { + console.log(nameA2); +} +for (let [nameMA = "noName", [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["skill1", "skill2"]] of multiRobots) { + console.log(nameMA); +} +for (let [nameMA = "noName", [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["skill1", "skill2"]] of getMultiRobots()) { + console.log(nameMA); +} +for (let [nameMA = "noName", [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { + console.log(nameMA); +} + +for (let [numberA3 = -1, ...robotAInfo] of robots) { + console.log(numberA3); +} +for (let [numberA3 = -1, ...robotAInfo] of getRobots()) { + console.log(numberA3); +} +for (let [numberA3 = -1, ...robotAInfo] of [robotA, robotB]) { + console.log(numberA3); +} + +//// [sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.js] +var robotA = [1, "mower", "mowing"]; +var robotB = [2, "trimmer", "trimming"]; +var robots = [robotA, robotB]; +function getRobots() { + return robots; +} +var multiRobotA = ["mower", ["mowing", ""]]; +var multiRobotB = ["trimmer", ["trimming", "edging"]]; +var multiRobots = [multiRobotA, multiRobotB]; +function getMultiRobots() { + return multiRobots; +} +for (var _i = 0, robots_1 = robots; _i < robots_1.length; _i++) { + var _a = robots_1[_i], _b = _a[1], nameA = _b === void 0 ? "noName" : _b; + console.log(nameA); +} +for (var _c = 0, _d = getRobots(); _c < _d.length; _c++) { + var _e = _d[_c], _f = _e[1], nameA = _f === void 0 ? "noName" : _f; + console.log(nameA); +} +for (var _g = 0, _h = [robotA, robotB]; _g < _h.length; _g++) { + var _j = _h[_g], _k = _j[1], nameA = _k === void 0 ? "noName" : _k; + console.log(nameA); +} +for (var _l = 0, multiRobots_1 = multiRobots; _l < multiRobots_1.length; _l++) { + var _m = multiRobots_1[_l], _o = _m[1], _p = _o === void 0 ? ["skill1", "skill2"] : _o, _q = _p[0], primarySkillA = _q === void 0 ? "primary" : _q, _r = _p[1], secondarySkillA = _r === void 0 ? "secondary" : _r; + console.log(primarySkillA); +} +for (var _s = 0, _t = getMultiRobots(); _s < _t.length; _s++) { + var _u = _t[_s], _v = _u[1], _w = _v === void 0 ? ["skill1", "skill2"] : _v, _x = _w[0], primarySkillA = _x === void 0 ? "primary" : _x, _y = _w[1], secondarySkillA = _y === void 0 ? "secondary" : _y; + console.log(primarySkillA); +} +for (var _z = 0, _0 = [multiRobotA, multiRobotB]; _z < _0.length; _z++) { + var _1 = _0[_z], _2 = _1[1], _3 = _2 === void 0 ? ["skill1", "skill2"] : _2, _4 = _3[0], primarySkillA = _4 === void 0 ? "primary" : _4, _5 = _3[1], secondarySkillA = _5 === void 0 ? "secondary" : _5; + console.log(primarySkillA); +} +for (var _6 = 0, robots_2 = robots; _6 < robots_2.length; _6++) { + var _7 = robots_2[_6][0], numberB = _7 === void 0 ? -1 : _7; + console.log(numberB); +} +for (var _8 = 0, _9 = getRobots(); _8 < _9.length; _8++) { + var _10 = _9[_8][0], numberB = _10 === void 0 ? -1 : _10; + console.log(numberB); +} +for (var _11 = 0, _12 = [robotA, robotB]; _11 < _12.length; _11++) { + var _13 = _12[_11][0], numberB = _13 === void 0 ? -1 : _13; + console.log(numberB); +} +for (var _14 = 0, multiRobots_2 = multiRobots; _14 < multiRobots_2.length; _14++) { + var _15 = multiRobots_2[_14][0], nameB = _15 === void 0 ? "noName" : _15; + console.log(nameB); +} +for (var _16 = 0, _17 = getMultiRobots(); _16 < _17.length; _16++) { + var _18 = _17[_16][0], nameB = _18 === void 0 ? "noName" : _18; + console.log(nameB); +} +for (var _19 = 0, _20 = [multiRobotA, multiRobotB]; _19 < _20.length; _19++) { + var _21 = _20[_19][0], nameB = _21 === void 0 ? "noName" : _21; + console.log(nameB); +} +for (var _22 = 0, robots_3 = robots; _22 < robots_3.length; _22++) { + var _23 = robots_3[_22], _24 = _23[0], numberA2 = _24 === void 0 ? -1 : _24, _25 = _23[1], nameA2 = _25 === void 0 ? "noName" : _25, _26 = _23[2], skillA2 = _26 === void 0 ? "skill" : _26; + console.log(nameA2); +} +for (var _27 = 0, _28 = getRobots(); _27 < _28.length; _27++) { + var _29 = _28[_27], _30 = _29[0], numberA2 = _30 === void 0 ? -1 : _30, _31 = _29[1], nameA2 = _31 === void 0 ? "noName" : _31, _32 = _29[2], skillA2 = _32 === void 0 ? "skill" : _32; + console.log(nameA2); +} +for (var _33 = 0, _34 = [robotA, robotB]; _33 < _34.length; _33++) { + var _35 = _34[_33], _36 = _35[0], numberA2 = _36 === void 0 ? -1 : _36, _37 = _35[1], nameA2 = _37 === void 0 ? "noName" : _37, _38 = _35[2], skillA2 = _38 === void 0 ? "skill" : _38; + console.log(nameA2); +} +for (var _39 = 0, multiRobots_3 = multiRobots; _39 < multiRobots_3.length; _39++) { + var _40 = multiRobots_3[_39], _41 = _40[0], nameMA = _41 === void 0 ? "noName" : _41, _42 = _40[1], _43 = _42 === void 0 ? ["skill1", "skill2"] : _42, _44 = _43[0], primarySkillA = _44 === void 0 ? "primary" : _44, _45 = _43[1], secondarySkillA = _45 === void 0 ? "secondary" : _45; + console.log(nameMA); +} +for (var _46 = 0, _47 = getMultiRobots(); _46 < _47.length; _46++) { + var _48 = _47[_46], _49 = _48[0], nameMA = _49 === void 0 ? "noName" : _49, _50 = _48[1], _51 = _50 === void 0 ? ["skill1", "skill2"] : _50, _52 = _51[0], primarySkillA = _52 === void 0 ? "primary" : _52, _53 = _51[1], secondarySkillA = _53 === void 0 ? "secondary" : _53; + console.log(nameMA); +} +for (var _54 = 0, _55 = [multiRobotA, multiRobotB]; _54 < _55.length; _54++) { + var _56 = _55[_54], _57 = _56[0], nameMA = _57 === void 0 ? "noName" : _57, _58 = _56[1], _59 = _58 === void 0 ? ["skill1", "skill2"] : _58, _60 = _59[0], primarySkillA = _60 === void 0 ? "primary" : _60, _61 = _59[1], secondarySkillA = _61 === void 0 ? "secondary" : _61; + console.log(nameMA); +} +for (var _62 = 0, robots_4 = robots; _62 < robots_4.length; _62++) { + var _63 = robots_4[_62], _64 = _63[0], numberA3 = _64 === void 0 ? -1 : _64, robotAInfo = _63.slice(1); + console.log(numberA3); +} +for (var _65 = 0, _66 = getRobots(); _65 < _66.length; _65++) { + var _67 = _66[_65], _68 = _67[0], numberA3 = _68 === void 0 ? -1 : _68, robotAInfo = _67.slice(1); + console.log(numberA3); +} +for (var _69 = 0, _70 = [robotA, robotB]; _69 < _70.length; _69++) { + var _71 = _70[_69], _72 = _71[0], numberA3 = _72 === void 0 ? -1 : _72, robotAInfo = _71.slice(1); + console.log(numberA3); +} +//# sourceMappingURL=sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.js.map new file mode 100644 index 00000000000..4d12f811df1 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.js.map] +{"version":3,"file":"sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAC/C,IAAI,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9B;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED,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;AACzE,IAAI,WAAW,GAAG,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAC7C;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,GAAG,CAAC,CAA6B,UAAM,EAAN,iBAAM,EAAN,oBAAM,EAAN,IAAM,CAAC;IAAnC,qBAAwB,EAAjB,UAAgB,EAAhB,qCAAgB;IACxB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAA6B,UAAW,EAAX,KAAA,SAAS,EAAE,EAAX,cAAW,EAAX,IAAW,CAAC;IAAxC,eAAwB,EAAjB,UAAgB,EAAhB,qCAAgB;IACxB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAA6B,UAAgB,E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C,CAAuC,WAAW,EAAX,MAAA,SAAS,EAAE,EAAX,gBAAW,EAAX,KAAW,CAAC;IAAlD,kBAAkC,EAA7B,YAAa,EAAb,oCAAa,EAAE,yBAAa;IAClC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;CACzB;AACD,GAAG,CAAC,CAAuC,WAAgB,EAAhB,OAAC,MAAM,EAAE,MAAM,CAAC,EAAhB,gBAAgB,EAAhB,KAAgB,CAAC;IAAvD,kBAAkC,EAA7B,YAAa,EAAb,oCAAa,EAAE,yBAAa;IAClC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;CACzB"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.sourcemap.txt new file mode 100644 index 00000000000..de9a60de903 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.sourcemap.txt @@ -0,0 +1,2742 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.js +mapUrl: sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.js.map +sourceRoot: +sources: sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.js +sourceFile:sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts +------------------------------------------------------------------- +>>>var robotA = [1, "mower", "mowing"]; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^^^^ +11> ^ +12> ^ +13> ^^^^^-> +1 >declare var console: { + > log(msg: any): void; + >} + >type Robot = [number, string, string]; + >type MultiSkilledRobot = [string, [string, string]]; + > + > +2 >let +3 > robotA +4 > : Robot = +5 > [ +6 > 1 +7 > , +8 > "mower" +9 > , +10> "mowing" +11> ] +12> ; +1 >Emitted(1, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(7, 5) + SourceIndex(0) +3 >Emitted(1, 11) Source(7, 11) + SourceIndex(0) +4 >Emitted(1, 14) Source(7, 21) + SourceIndex(0) +5 >Emitted(1, 15) Source(7, 22) + SourceIndex(0) +6 >Emitted(1, 16) Source(7, 23) + SourceIndex(0) +7 >Emitted(1, 18) Source(7, 25) + SourceIndex(0) +8 >Emitted(1, 25) Source(7, 32) + SourceIndex(0) +9 >Emitted(1, 27) Source(7, 34) + SourceIndex(0) +10>Emitted(1, 35) Source(7, 42) + SourceIndex(0) +11>Emitted(1, 36) Source(7, 43) + SourceIndex(0) +12>Emitted(1, 37) Source(7, 44) + SourceIndex(0) +--- +>>>var robotB = [2, "trimmer", "trimming"]; +1-> +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^ +11> ^ +12> ^ +1-> + > +2 >let +3 > robotB +4 > : Robot = +5 > [ +6 > 2 +7 > , +8 > "trimmer" +9 > , +10> "trimming" +11> ] +12> ; +1->Emitted(2, 1) Source(8, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(8, 5) + SourceIndex(0) +3 >Emitted(2, 11) Source(8, 11) + SourceIndex(0) +4 >Emitted(2, 14) Source(8, 21) + SourceIndex(0) +5 >Emitted(2, 15) Source(8, 22) + SourceIndex(0) +6 >Emitted(2, 16) Source(8, 23) + SourceIndex(0) +7 >Emitted(2, 18) Source(8, 25) + SourceIndex(0) +8 >Emitted(2, 27) Source(8, 34) + SourceIndex(0) +9 >Emitted(2, 29) Source(8, 36) + SourceIndex(0) +10>Emitted(2, 39) Source(8, 46) + SourceIndex(0) +11>Emitted(2, 40) Source(8, 47) + SourceIndex(0) +12>Emitted(2, 41) Source(8, 48) + SourceIndex(0) +--- +>>>var robots = [robotA, robotB]; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^^ +8 > ^^^^^^ +9 > ^ +10> ^ +1 > + > +2 >let +3 > robots +4 > = +5 > [ +6 > robotA +7 > , +8 > robotB +9 > ] +10> ; +1 >Emitted(3, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(9, 5) + SourceIndex(0) +3 >Emitted(3, 11) Source(9, 11) + SourceIndex(0) +4 >Emitted(3, 14) Source(9, 14) + SourceIndex(0) +5 >Emitted(3, 15) Source(9, 15) + SourceIndex(0) +6 >Emitted(3, 21) Source(9, 21) + SourceIndex(0) +7 >Emitted(3, 23) Source(9, 23) + SourceIndex(0) +8 >Emitted(3, 29) Source(9, 29) + SourceIndex(0) +9 >Emitted(3, 30) Source(9, 30) + SourceIndex(0) +10>Emitted(3, 31) Source(9, 31) + SourceIndex(0) +--- +>>>function getRobots() { +1 > +2 >^^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(4, 1) Source(10, 1) + SourceIndex(0) +--- +>>> return robots; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +1->function getRobots() { + > +2 > return +3 > +4 > robots +5 > ; +1->Emitted(5, 5) Source(11, 5) + SourceIndex(0) +2 >Emitted(5, 11) Source(11, 11) + SourceIndex(0) +3 >Emitted(5, 12) Source(11, 12) + SourceIndex(0) +4 >Emitted(5, 18) Source(11, 18) + SourceIndex(0) +5 >Emitted(5, 19) Source(11, 19) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(6, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(12, 2) + SourceIndex(0) +--- +>>>var multiRobotA = ["mower", ["mowing", ""]]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^ +10> ^^ +11> ^^ +12> ^ +13> ^ +14> ^ +15> ^^^^^^^^^^^-> +1-> + > + > +2 >let +3 > multiRobotA +4 > : MultiSkilledRobot = +5 > [ +6 > "mower" +7 > , +8 > [ +9 > "mowing" +10> , +11> "" +12> ] +13> ] +14> ; +1->Emitted(7, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(7, 5) Source(14, 5) + SourceIndex(0) +3 >Emitted(7, 16) Source(14, 16) + SourceIndex(0) +4 >Emitted(7, 19) Source(14, 38) + SourceIndex(0) +5 >Emitted(7, 20) Source(14, 39) + SourceIndex(0) +6 >Emitted(7, 27) Source(14, 46) + SourceIndex(0) +7 >Emitted(7, 29) Source(14, 48) + SourceIndex(0) +8 >Emitted(7, 30) Source(14, 49) + SourceIndex(0) +9 >Emitted(7, 38) Source(14, 57) + SourceIndex(0) +10>Emitted(7, 40) Source(14, 59) + SourceIndex(0) +11>Emitted(7, 42) Source(14, 61) + SourceIndex(0) +12>Emitted(7, 43) Source(14, 62) + SourceIndex(0) +13>Emitted(7, 44) Source(14, 63) + SourceIndex(0) +14>Emitted(7, 45) Source(14, 64) + SourceIndex(0) +--- +>>>var multiRobotB = ["trimmer", ["trimming", "edging"]]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^ +12> ^ +13> ^ +14> ^ +1-> + > +2 >let +3 > multiRobotB +4 > : MultiSkilledRobot = +5 > [ +6 > "trimmer" +7 > , +8 > [ +9 > "trimming" +10> , +11> "edging" +12> ] +13> ] +14> ; +1->Emitted(8, 1) Source(15, 1) + SourceIndex(0) +2 >Emitted(8, 5) Source(15, 5) + SourceIndex(0) +3 >Emitted(8, 16) Source(15, 16) + SourceIndex(0) +4 >Emitted(8, 19) Source(15, 38) + SourceIndex(0) +5 >Emitted(8, 20) Source(15, 39) + SourceIndex(0) +6 >Emitted(8, 29) Source(15, 48) + SourceIndex(0) +7 >Emitted(8, 31) Source(15, 50) + SourceIndex(0) +8 >Emitted(8, 32) Source(15, 51) + SourceIndex(0) +9 >Emitted(8, 42) Source(15, 61) + SourceIndex(0) +10>Emitted(8, 44) Source(15, 63) + SourceIndex(0) +11>Emitted(8, 52) Source(15, 71) + SourceIndex(0) +12>Emitted(8, 53) Source(15, 72) + SourceIndex(0) +13>Emitted(8, 54) Source(15, 73) + SourceIndex(0) +14>Emitted(8, 55) Source(15, 74) + SourceIndex(0) +--- +>>>var multiRobots = [multiRobotA, multiRobotB]; +1 > +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^ +9 > ^ +10> ^ +1 > + > +2 >let +3 > multiRobots +4 > = +5 > [ +6 > multiRobotA +7 > , +8 > multiRobotB +9 > ] +10> ; +1 >Emitted(9, 1) Source(16, 1) + SourceIndex(0) +2 >Emitted(9, 5) Source(16, 5) + SourceIndex(0) +3 >Emitted(9, 16) Source(16, 16) + SourceIndex(0) +4 >Emitted(9, 19) Source(16, 19) + SourceIndex(0) +5 >Emitted(9, 20) Source(16, 20) + SourceIndex(0) +6 >Emitted(9, 31) Source(16, 31) + SourceIndex(0) +7 >Emitted(9, 33) Source(16, 33) + SourceIndex(0) +8 >Emitted(9, 44) Source(16, 44) + SourceIndex(0) +9 >Emitted(9, 45) Source(16, 45) + SourceIndex(0) +10>Emitted(9, 46) Source(16, 46) + SourceIndex(0) +--- +>>>function getMultiRobots() { +1 > +2 >^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(10, 1) Source(17, 1) + SourceIndex(0) +--- +>>> return multiRobots; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^ +5 > ^ +1->function getMultiRobots() { + > +2 > return +3 > +4 > multiRobots +5 > ; +1->Emitted(11, 5) Source(18, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(18, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(18, 12) + SourceIndex(0) +4 >Emitted(11, 23) Source(18, 23) + SourceIndex(0) +5 >Emitted(11, 24) Source(18, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(12, 1) Source(19, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(19, 2) + SourceIndex(0) +--- +>>>for (var _i = 0, robots_1 = robots; _i < robots_1.length; _i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +13> ^^^^^^^^^^^^^^^-> +1-> + > + > +2 >for +3 > +4 > (let [, nameA = "noName"] of +5 > robots +6 > +7 > robots +8 > +9 > robots +10> +11> robots +12> ) +1->Emitted(13, 1) Source(21, 1) + SourceIndex(0) +2 >Emitted(13, 4) Source(21, 4) + SourceIndex(0) +3 >Emitted(13, 5) Source(21, 5) + SourceIndex(0) +4 >Emitted(13, 6) Source(21, 34) + SourceIndex(0) +5 >Emitted(13, 16) Source(21, 40) + SourceIndex(0) +6 >Emitted(13, 18) Source(21, 34) + SourceIndex(0) +7 >Emitted(13, 35) Source(21, 40) + SourceIndex(0) +8 >Emitted(13, 37) Source(21, 34) + SourceIndex(0) +9 >Emitted(13, 57) Source(21, 40) + SourceIndex(0) +10>Emitted(13, 59) Source(21, 34) + SourceIndex(0) +11>Emitted(13, 63) Source(21, 40) + SourceIndex(0) +12>Emitted(13, 64) Source(21, 41) + SourceIndex(0) +--- +>>> var _a = robots_1[_i], _b = _a[1], nameA = _b === void 0 ? "noName" : _b; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let [, nameA = "noName"] +3 > +4 > nameA = "noName" +5 > +6 > nameA = "noName" +1->Emitted(14, 5) Source(21, 6) + SourceIndex(0) +2 >Emitted(14, 26) Source(21, 30) + SourceIndex(0) +3 >Emitted(14, 28) Source(21, 13) + SourceIndex(0) +4 >Emitted(14, 38) Source(21, 29) + SourceIndex(0) +5 >Emitted(14, 40) Source(21, 13) + SourceIndex(0) +6 >Emitted(14, 77) Source(21, 29) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 >] of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(15, 5) Source(22, 5) + SourceIndex(0) +2 >Emitted(15, 12) Source(22, 12) + SourceIndex(0) +3 >Emitted(15, 13) Source(22, 13) + SourceIndex(0) +4 >Emitted(15, 16) Source(22, 16) + SourceIndex(0) +5 >Emitted(15, 17) Source(22, 17) + SourceIndex(0) +6 >Emitted(15, 22) Source(22, 22) + SourceIndex(0) +7 >Emitted(15, 23) Source(22, 23) + SourceIndex(0) +8 >Emitted(15, 24) Source(22, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(16, 2) Source(23, 2) + SourceIndex(0) +--- +>>>for (var _c = 0, _d = getRobots(); _c < _d.length; _c++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let [, nameA = "noName"] of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> getRobots() +12> +13> getRobots() +14> ) +1->Emitted(17, 1) Source(24, 1) + SourceIndex(0) +2 >Emitted(17, 4) Source(24, 4) + SourceIndex(0) +3 >Emitted(17, 5) Source(24, 5) + SourceIndex(0) +4 >Emitted(17, 6) Source(24, 34) + SourceIndex(0) +5 >Emitted(17, 16) Source(24, 45) + SourceIndex(0) +6 >Emitted(17, 18) Source(24, 34) + SourceIndex(0) +7 >Emitted(17, 23) Source(24, 34) + SourceIndex(0) +8 >Emitted(17, 32) Source(24, 43) + SourceIndex(0) +9 >Emitted(17, 34) Source(24, 45) + SourceIndex(0) +10>Emitted(17, 36) Source(24, 34) + SourceIndex(0) +11>Emitted(17, 50) Source(24, 45) + SourceIndex(0) +12>Emitted(17, 52) Source(24, 34) + SourceIndex(0) +13>Emitted(17, 56) Source(24, 45) + SourceIndex(0) +14>Emitted(17, 57) Source(24, 46) + SourceIndex(0) +--- +>>> var _e = _d[_c], _f = _e[1], nameA = _f === void 0 ? "noName" : _f; +1->^^^^ +2 > ^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let [, nameA = "noName"] +3 > +4 > nameA = "noName" +5 > +6 > nameA = "noName" +1->Emitted(18, 5) Source(24, 6) + SourceIndex(0) +2 >Emitted(18, 20) Source(24, 30) + SourceIndex(0) +3 >Emitted(18, 22) Source(24, 13) + SourceIndex(0) +4 >Emitted(18, 32) Source(24, 29) + SourceIndex(0) +5 >Emitted(18, 34) Source(24, 13) + SourceIndex(0) +6 >Emitted(18, 71) Source(24, 29) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 >] of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(19, 5) Source(25, 5) + SourceIndex(0) +2 >Emitted(19, 12) Source(25, 12) + SourceIndex(0) +3 >Emitted(19, 13) Source(25, 13) + SourceIndex(0) +4 >Emitted(19, 16) Source(25, 16) + SourceIndex(0) +5 >Emitted(19, 17) Source(25, 17) + SourceIndex(0) +6 >Emitted(19, 22) Source(25, 22) + SourceIndex(0) +7 >Emitted(19, 23) Source(25, 23) + SourceIndex(0) +8 >Emitted(19, 24) Source(25, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(20, 2) Source(26, 2) + SourceIndex(0) +--- +>>>for (var _g = 0, _h = [robotA, robotB]; _g < _h.length; _g++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^ +16> ^ +17> ^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let [, nameA = "noName"] of +5 > [robotA, robotB] +6 > +7 > [ +8 > robotA +9 > , +10> robotB +11> ] +12> +13> [robotA, robotB] +14> +15> [robotA, robotB] +16> ) +1->Emitted(21, 1) Source(27, 1) + SourceIndex(0) +2 >Emitted(21, 4) Source(27, 4) + SourceIndex(0) +3 >Emitted(21, 5) Source(27, 5) + SourceIndex(0) +4 >Emitted(21, 6) Source(27, 34) + SourceIndex(0) +5 >Emitted(21, 16) Source(27, 50) + SourceIndex(0) +6 >Emitted(21, 18) Source(27, 34) + SourceIndex(0) +7 >Emitted(21, 24) Source(27, 35) + SourceIndex(0) +8 >Emitted(21, 30) Source(27, 41) + SourceIndex(0) +9 >Emitted(21, 32) Source(27, 43) + SourceIndex(0) +10>Emitted(21, 38) Source(27, 49) + SourceIndex(0) +11>Emitted(21, 39) Source(27, 50) + SourceIndex(0) +12>Emitted(21, 41) Source(27, 34) + SourceIndex(0) +13>Emitted(21, 55) Source(27, 50) + SourceIndex(0) +14>Emitted(21, 57) Source(27, 34) + SourceIndex(0) +15>Emitted(21, 61) Source(27, 50) + SourceIndex(0) +16>Emitted(21, 62) Source(27, 51) + SourceIndex(0) +--- +>>> var _j = _h[_g], _k = _j[1], nameA = _k === void 0 ? "noName" : _k; +1->^^^^ +2 > ^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let [, nameA = "noName"] +3 > +4 > nameA = "noName" +5 > +6 > nameA = "noName" +1->Emitted(22, 5) Source(27, 6) + SourceIndex(0) +2 >Emitted(22, 20) Source(27, 30) + SourceIndex(0) +3 >Emitted(22, 22) Source(27, 13) + SourceIndex(0) +4 >Emitted(22, 32) Source(27, 29) + SourceIndex(0) +5 >Emitted(22, 34) Source(27, 13) + SourceIndex(0) +6 >Emitted(22, 71) Source(27, 29) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 >] of [robotA, robotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(23, 5) Source(28, 5) + SourceIndex(0) +2 >Emitted(23, 12) Source(28, 12) + SourceIndex(0) +3 >Emitted(23, 13) Source(28, 13) + SourceIndex(0) +4 >Emitted(23, 16) Source(28, 16) + SourceIndex(0) +5 >Emitted(23, 17) Source(28, 17) + SourceIndex(0) +6 >Emitted(23, 22) Source(28, 22) + SourceIndex(0) +7 >Emitted(23, 23) Source(28, 23) + SourceIndex(0) +8 >Emitted(23, 24) Source(28, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(24, 2) Source(29, 2) + SourceIndex(0) +--- +>>>for (var _l = 0, multiRobots_1 = multiRobots; _l < multiRobots_1.length; _l++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let [, [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"]] of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > multiRobots +10> +11> multiRobots +12> ) +1->Emitted(25, 1) Source(30, 1) + SourceIndex(0) +2 >Emitted(25, 4) Source(30, 4) + SourceIndex(0) +3 >Emitted(25, 5) Source(30, 5) + SourceIndex(0) +4 >Emitted(25, 6) Source(33, 30) + SourceIndex(0) +5 >Emitted(25, 16) Source(33, 41) + SourceIndex(0) +6 >Emitted(25, 18) Source(33, 30) + SourceIndex(0) +7 >Emitted(25, 45) Source(33, 41) + SourceIndex(0) +8 >Emitted(25, 47) Source(33, 30) + SourceIndex(0) +9 >Emitted(25, 72) Source(33, 41) + SourceIndex(0) +10>Emitted(25, 74) Source(33, 30) + SourceIndex(0) +11>Emitted(25, 78) Source(33, 41) + SourceIndex(0) +12>Emitted(25, 79) Source(33, 42) + SourceIndex(0) +--- +>>> var _m = multiRobots_1[_l], _o = _m[1], _p = _o === void 0 ? ["skill1", "skill2"] : _o, _q = _p[0], primarySkillA = _q === void 0 ? "primary" : _q, _r = _p[1], secondarySkillA = _r === void 0 ? "secondary" : _r; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let [, [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"]] +3 > +4 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"] +5 > +6 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"] +7 > +8 > primarySkillA = "primary" +9 > +10> primarySkillA = "primary" +11> , + > +12> secondarySkillA = "secondary" +13> +14> secondarySkillA = "secondary" +1->Emitted(26, 5) Source(30, 6) + SourceIndex(0) +2 >Emitted(26, 31) Source(33, 26) + SourceIndex(0) +3 >Emitted(26, 33) Source(30, 13) + SourceIndex(0) +4 >Emitted(26, 43) Source(33, 25) + SourceIndex(0) +5 >Emitted(26, 45) Source(30, 13) + SourceIndex(0) +6 >Emitted(26, 91) Source(33, 25) + SourceIndex(0) +7 >Emitted(26, 93) Source(31, 5) + SourceIndex(0) +8 >Emitted(26, 103) Source(31, 30) + SourceIndex(0) +9 >Emitted(26, 105) Source(31, 5) + SourceIndex(0) +10>Emitted(26, 151) Source(31, 30) + SourceIndex(0) +11>Emitted(26, 153) Source(32, 5) + SourceIndex(0) +12>Emitted(26, 163) Source(32, 34) + SourceIndex(0) +13>Emitted(26, 165) Source(32, 5) + SourceIndex(0) +14>Emitted(26, 215) Source(32, 34) + SourceIndex(0) +--- +>>> console.log(primarySkillA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > + >] = ["skill1", "skill2"]] of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primarySkillA +7 > ) +8 > ; +1 >Emitted(27, 5) Source(34, 5) + SourceIndex(0) +2 >Emitted(27, 12) Source(34, 12) + SourceIndex(0) +3 >Emitted(27, 13) Source(34, 13) + SourceIndex(0) +4 >Emitted(27, 16) Source(34, 16) + SourceIndex(0) +5 >Emitted(27, 17) Source(34, 17) + SourceIndex(0) +6 >Emitted(27, 30) Source(34, 30) + SourceIndex(0) +7 >Emitted(27, 31) Source(34, 31) + SourceIndex(0) +8 >Emitted(27, 32) Source(34, 32) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(28, 2) Source(35, 2) + SourceIndex(0) +--- +>>>for (var _s = 0, _t = getMultiRobots(); _s < _t.length; _s++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let [, [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"]] of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> getMultiRobots() +12> +13> getMultiRobots() +14> ) +1->Emitted(29, 1) Source(36, 1) + SourceIndex(0) +2 >Emitted(29, 4) Source(36, 4) + SourceIndex(0) +3 >Emitted(29, 5) Source(36, 5) + SourceIndex(0) +4 >Emitted(29, 6) Source(39, 30) + SourceIndex(0) +5 >Emitted(29, 16) Source(39, 46) + SourceIndex(0) +6 >Emitted(29, 18) Source(39, 30) + SourceIndex(0) +7 >Emitted(29, 23) Source(39, 30) + SourceIndex(0) +8 >Emitted(29, 37) Source(39, 44) + SourceIndex(0) +9 >Emitted(29, 39) Source(39, 46) + SourceIndex(0) +10>Emitted(29, 41) Source(39, 30) + SourceIndex(0) +11>Emitted(29, 55) Source(39, 46) + SourceIndex(0) +12>Emitted(29, 57) Source(39, 30) + SourceIndex(0) +13>Emitted(29, 61) Source(39, 46) + SourceIndex(0) +14>Emitted(29, 62) Source(39, 47) + SourceIndex(0) +--- +>>> var _u = _t[_s], _v = _u[1], _w = _v === void 0 ? ["skill1", "skill2"] : _v, _x = _w[0], primarySkillA = _x === void 0 ? "primary" : _x, _y = _w[1], secondarySkillA = _y === void 0 ? "secondary" : _y; +1->^^^^ +2 > ^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let [, [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"]] +3 > +4 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"] +5 > +6 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"] +7 > +8 > primarySkillA = "primary" +9 > +10> primarySkillA = "primary" +11> , + > +12> secondarySkillA = "secondary" +13> +14> secondarySkillA = "secondary" +1->Emitted(30, 5) Source(36, 6) + SourceIndex(0) +2 >Emitted(30, 20) Source(39, 26) + SourceIndex(0) +3 >Emitted(30, 22) Source(36, 13) + SourceIndex(0) +4 >Emitted(30, 32) Source(39, 25) + SourceIndex(0) +5 >Emitted(30, 34) Source(36, 13) + SourceIndex(0) +6 >Emitted(30, 80) Source(39, 25) + SourceIndex(0) +7 >Emitted(30, 82) Source(37, 5) + SourceIndex(0) +8 >Emitted(30, 92) Source(37, 30) + SourceIndex(0) +9 >Emitted(30, 94) Source(37, 5) + SourceIndex(0) +10>Emitted(30, 140) Source(37, 30) + SourceIndex(0) +11>Emitted(30, 142) Source(38, 5) + SourceIndex(0) +12>Emitted(30, 152) Source(38, 34) + SourceIndex(0) +13>Emitted(30, 154) Source(38, 5) + SourceIndex(0) +14>Emitted(30, 204) Source(38, 34) + SourceIndex(0) +--- +>>> console.log(primarySkillA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > + >] = ["skill1", "skill2"]] of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primarySkillA +7 > ) +8 > ; +1 >Emitted(31, 5) Source(40, 5) + SourceIndex(0) +2 >Emitted(31, 12) Source(40, 12) + SourceIndex(0) +3 >Emitted(31, 13) Source(40, 13) + SourceIndex(0) +4 >Emitted(31, 16) Source(40, 16) + SourceIndex(0) +5 >Emitted(31, 17) Source(40, 17) + SourceIndex(0) +6 >Emitted(31, 30) Source(40, 30) + SourceIndex(0) +7 >Emitted(31, 31) Source(40, 31) + SourceIndex(0) +8 >Emitted(31, 32) Source(40, 32) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(32, 2) Source(41, 2) + SourceIndex(0) +--- +>>>for (var _z = 0, _0 = [multiRobotA, multiRobotB]; _z < _0.length; _z++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^ +16> ^ +17> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let [, [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"]] of +5 > [multiRobotA, multiRobotB] +6 > +7 > [ +8 > multiRobotA +9 > , +10> multiRobotB +11> ] +12> +13> [multiRobotA, multiRobotB] +14> +15> [multiRobotA, multiRobotB] +16> ) +1->Emitted(33, 1) Source(42, 1) + SourceIndex(0) +2 >Emitted(33, 4) Source(42, 4) + SourceIndex(0) +3 >Emitted(33, 5) Source(42, 5) + SourceIndex(0) +4 >Emitted(33, 6) Source(45, 30) + SourceIndex(0) +5 >Emitted(33, 16) Source(45, 56) + SourceIndex(0) +6 >Emitted(33, 18) Source(45, 30) + SourceIndex(0) +7 >Emitted(33, 24) Source(45, 31) + SourceIndex(0) +8 >Emitted(33, 35) Source(45, 42) + SourceIndex(0) +9 >Emitted(33, 37) Source(45, 44) + SourceIndex(0) +10>Emitted(33, 48) Source(45, 55) + SourceIndex(0) +11>Emitted(33, 49) Source(45, 56) + SourceIndex(0) +12>Emitted(33, 51) Source(45, 30) + SourceIndex(0) +13>Emitted(33, 65) Source(45, 56) + SourceIndex(0) +14>Emitted(33, 67) Source(45, 30) + SourceIndex(0) +15>Emitted(33, 71) Source(45, 56) + SourceIndex(0) +16>Emitted(33, 72) Source(45, 57) + SourceIndex(0) +--- +>>> var _1 = _0[_z], _2 = _1[1], _3 = _2 === void 0 ? ["skill1", "skill2"] : _2, _4 = _3[0], primarySkillA = _4 === void 0 ? "primary" : _4, _5 = _3[1], secondarySkillA = _5 === void 0 ? "secondary" : _5; +1->^^^^ +2 > ^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let [, [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"]] +3 > +4 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"] +5 > +6 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"] +7 > +8 > primarySkillA = "primary" +9 > +10> primarySkillA = "primary" +11> , + > +12> secondarySkillA = "secondary" +13> +14> secondarySkillA = "secondary" +1->Emitted(34, 5) Source(42, 6) + SourceIndex(0) +2 >Emitted(34, 20) Source(45, 26) + SourceIndex(0) +3 >Emitted(34, 22) Source(42, 13) + SourceIndex(0) +4 >Emitted(34, 32) Source(45, 25) + SourceIndex(0) +5 >Emitted(34, 34) Source(42, 13) + SourceIndex(0) +6 >Emitted(34, 80) Source(45, 25) + SourceIndex(0) +7 >Emitted(34, 82) Source(43, 5) + SourceIndex(0) +8 >Emitted(34, 92) Source(43, 30) + SourceIndex(0) +9 >Emitted(34, 94) Source(43, 5) + SourceIndex(0) +10>Emitted(34, 140) Source(43, 30) + SourceIndex(0) +11>Emitted(34, 142) Source(44, 5) + SourceIndex(0) +12>Emitted(34, 152) Source(44, 34) + SourceIndex(0) +13>Emitted(34, 154) Source(44, 5) + SourceIndex(0) +14>Emitted(34, 204) Source(44, 34) + SourceIndex(0) +--- +>>> console.log(primarySkillA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > + >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primarySkillA +7 > ) +8 > ; +1 >Emitted(35, 5) Source(46, 5) + SourceIndex(0) +2 >Emitted(35, 12) Source(46, 12) + SourceIndex(0) +3 >Emitted(35, 13) Source(46, 13) + SourceIndex(0) +4 >Emitted(35, 16) Source(46, 16) + SourceIndex(0) +5 >Emitted(35, 17) Source(46, 17) + SourceIndex(0) +6 >Emitted(35, 30) Source(46, 30) + SourceIndex(0) +7 >Emitted(35, 31) Source(46, 31) + SourceIndex(0) +8 >Emitted(35, 32) Source(46, 32) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(36, 2) Source(47, 2) + SourceIndex(0) +--- +>>>for (var _6 = 0, robots_2 = robots; _6 < robots_2.length; _6++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +13> ^^-> +1-> + > + > +2 >for +3 > +4 > (let [numberB = -1] of +5 > robots +6 > +7 > robots +8 > +9 > robots +10> +11> robots +12> ) +1->Emitted(37, 1) Source(49, 1) + SourceIndex(0) +2 >Emitted(37, 4) Source(49, 4) + SourceIndex(0) +3 >Emitted(37, 5) Source(49, 5) + SourceIndex(0) +4 >Emitted(37, 6) Source(49, 28) + SourceIndex(0) +5 >Emitted(37, 16) Source(49, 34) + SourceIndex(0) +6 >Emitted(37, 18) Source(49, 28) + SourceIndex(0) +7 >Emitted(37, 35) Source(49, 34) + SourceIndex(0) +8 >Emitted(37, 37) Source(49, 28) + SourceIndex(0) +9 >Emitted(37, 57) Source(49, 34) + SourceIndex(0) +10>Emitted(37, 59) Source(49, 28) + SourceIndex(0) +11>Emitted(37, 63) Source(49, 34) + SourceIndex(0) +12>Emitted(37, 64) Source(49, 35) + SourceIndex(0) +--- +>>> var _7 = robots_2[_6][0], numberB = _7 === void 0 ? -1 : _7; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > numberB = -1 +3 > +4 > numberB = -1 +1->Emitted(38, 5) Source(49, 11) + SourceIndex(0) +2 >Emitted(38, 29) Source(49, 23) + SourceIndex(0) +3 >Emitted(38, 31) Source(49, 11) + SourceIndex(0) +4 >Emitted(38, 64) Source(49, 23) + SourceIndex(0) +--- +>>> console.log(numberB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1 >] of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > numberB +7 > ) +8 > ; +1 >Emitted(39, 5) Source(50, 5) + SourceIndex(0) +2 >Emitted(39, 12) Source(50, 12) + SourceIndex(0) +3 >Emitted(39, 13) Source(50, 13) + SourceIndex(0) +4 >Emitted(39, 16) Source(50, 16) + SourceIndex(0) +5 >Emitted(39, 17) Source(50, 17) + SourceIndex(0) +6 >Emitted(39, 24) Source(50, 24) + SourceIndex(0) +7 >Emitted(39, 25) Source(50, 25) + SourceIndex(0) +8 >Emitted(39, 26) Source(50, 26) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(40, 2) Source(51, 2) + SourceIndex(0) +--- +>>>for (var _8 = 0, _9 = getRobots(); _8 < _9.length; _8++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +15> ^^^^^^-> +1-> + > +2 >for +3 > +4 > (let [numberB = -1] of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> getRobots() +12> +13> getRobots() +14> ) +1->Emitted(41, 1) Source(52, 1) + SourceIndex(0) +2 >Emitted(41, 4) Source(52, 4) + SourceIndex(0) +3 >Emitted(41, 5) Source(52, 5) + SourceIndex(0) +4 >Emitted(41, 6) Source(52, 28) + SourceIndex(0) +5 >Emitted(41, 16) Source(52, 39) + SourceIndex(0) +6 >Emitted(41, 18) Source(52, 28) + SourceIndex(0) +7 >Emitted(41, 23) Source(52, 28) + SourceIndex(0) +8 >Emitted(41, 32) Source(52, 37) + SourceIndex(0) +9 >Emitted(41, 34) Source(52, 39) + SourceIndex(0) +10>Emitted(41, 36) Source(52, 28) + SourceIndex(0) +11>Emitted(41, 50) Source(52, 39) + SourceIndex(0) +12>Emitted(41, 52) Source(52, 28) + SourceIndex(0) +13>Emitted(41, 56) Source(52, 39) + SourceIndex(0) +14>Emitted(41, 57) Source(52, 40) + SourceIndex(0) +--- +>>> var _10 = _9[_8][0], numberB = _10 === void 0 ? -1 : _10; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > numberB = -1 +3 > +4 > numberB = -1 +1->Emitted(42, 5) Source(52, 11) + SourceIndex(0) +2 >Emitted(42, 24) Source(52, 23) + SourceIndex(0) +3 >Emitted(42, 26) Source(52, 11) + SourceIndex(0) +4 >Emitted(42, 61) Source(52, 23) + SourceIndex(0) +--- +>>> console.log(numberB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1 >] of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > numberB +7 > ) +8 > ; +1 >Emitted(43, 5) Source(53, 5) + SourceIndex(0) +2 >Emitted(43, 12) Source(53, 12) + SourceIndex(0) +3 >Emitted(43, 13) Source(53, 13) + SourceIndex(0) +4 >Emitted(43, 16) Source(53, 16) + SourceIndex(0) +5 >Emitted(43, 17) Source(53, 17) + SourceIndex(0) +6 >Emitted(43, 24) Source(53, 24) + SourceIndex(0) +7 >Emitted(43, 25) Source(53, 25) + SourceIndex(0) +8 >Emitted(43, 26) Source(53, 26) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(44, 2) Source(54, 2) + SourceIndex(0) +--- +>>>for (var _11 = 0, _12 = [robotA, robotB]; _11 < _12.length; _11++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^^ +16> ^ +1-> + > +2 >for +3 > +4 > (let [numberB = -1] of +5 > [robotA, robotB] +6 > +7 > [ +8 > robotA +9 > , +10> robotB +11> ] +12> +13> [robotA, robotB] +14> +15> [robotA, robotB] +16> ) +1->Emitted(45, 1) Source(55, 1) + SourceIndex(0) +2 >Emitted(45, 4) Source(55, 4) + SourceIndex(0) +3 >Emitted(45, 5) Source(55, 5) + SourceIndex(0) +4 >Emitted(45, 6) Source(55, 28) + SourceIndex(0) +5 >Emitted(45, 17) Source(55, 44) + SourceIndex(0) +6 >Emitted(45, 19) Source(55, 28) + SourceIndex(0) +7 >Emitted(45, 26) Source(55, 29) + SourceIndex(0) +8 >Emitted(45, 32) Source(55, 35) + SourceIndex(0) +9 >Emitted(45, 34) Source(55, 37) + SourceIndex(0) +10>Emitted(45, 40) Source(55, 43) + SourceIndex(0) +11>Emitted(45, 41) Source(55, 44) + SourceIndex(0) +12>Emitted(45, 43) Source(55, 28) + SourceIndex(0) +13>Emitted(45, 59) Source(55, 44) + SourceIndex(0) +14>Emitted(45, 61) Source(55, 28) + SourceIndex(0) +15>Emitted(45, 66) Source(55, 44) + SourceIndex(0) +16>Emitted(45, 67) Source(55, 45) + SourceIndex(0) +--- +>>> var _13 = _12[_11][0], numberB = _13 === void 0 ? -1 : _13; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > numberB = -1 +3 > +4 > numberB = -1 +1 >Emitted(46, 5) Source(55, 11) + SourceIndex(0) +2 >Emitted(46, 26) Source(55, 23) + SourceIndex(0) +3 >Emitted(46, 28) Source(55, 11) + SourceIndex(0) +4 >Emitted(46, 63) Source(55, 23) + SourceIndex(0) +--- +>>> console.log(numberB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1 >] of [robotA, robotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > numberB +7 > ) +8 > ; +1 >Emitted(47, 5) Source(56, 5) + SourceIndex(0) +2 >Emitted(47, 12) Source(56, 12) + SourceIndex(0) +3 >Emitted(47, 13) Source(56, 13) + SourceIndex(0) +4 >Emitted(47, 16) Source(56, 16) + SourceIndex(0) +5 >Emitted(47, 17) Source(56, 17) + SourceIndex(0) +6 >Emitted(47, 24) Source(56, 24) + SourceIndex(0) +7 >Emitted(47, 25) Source(56, 25) + SourceIndex(0) +8 >Emitted(47, 26) Source(56, 26) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(48, 2) Source(57, 2) + SourceIndex(0) +--- +>>>for (var _14 = 0, multiRobots_2 = multiRobots; _14 < multiRobots_2.length; _14++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^ +12> ^ +1-> + > +2 >for +3 > +4 > (let [nameB = "noName"] of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > multiRobots +10> +11> multiRobots +12> ) +1->Emitted(49, 1) Source(58, 1) + SourceIndex(0) +2 >Emitted(49, 4) Source(58, 4) + SourceIndex(0) +3 >Emitted(49, 5) Source(58, 5) + SourceIndex(0) +4 >Emitted(49, 6) Source(58, 32) + SourceIndex(0) +5 >Emitted(49, 17) Source(58, 43) + SourceIndex(0) +6 >Emitted(49, 19) Source(58, 32) + SourceIndex(0) +7 >Emitted(49, 46) Source(58, 43) + SourceIndex(0) +8 >Emitted(49, 48) Source(58, 32) + SourceIndex(0) +9 >Emitted(49, 74) Source(58, 43) + SourceIndex(0) +10>Emitted(49, 76) Source(58, 32) + SourceIndex(0) +11>Emitted(49, 81) Source(58, 43) + SourceIndex(0) +12>Emitted(49, 82) Source(58, 44) + SourceIndex(0) +--- +>>> var _15 = multiRobots_2[_14][0], nameB = _15 === void 0 ? "noName" : _15; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > nameB = "noName" +3 > +4 > nameB = "noName" +1 >Emitted(50, 5) Source(58, 11) + SourceIndex(0) +2 >Emitted(50, 36) Source(58, 27) + SourceIndex(0) +3 >Emitted(50, 38) Source(58, 11) + SourceIndex(0) +4 >Emitted(50, 77) Source(58, 27) + SourceIndex(0) +--- +>>> console.log(nameB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 >] of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameB +7 > ) +8 > ; +1 >Emitted(51, 5) Source(59, 5) + SourceIndex(0) +2 >Emitted(51, 12) Source(59, 12) + SourceIndex(0) +3 >Emitted(51, 13) Source(59, 13) + SourceIndex(0) +4 >Emitted(51, 16) Source(59, 16) + SourceIndex(0) +5 >Emitted(51, 17) Source(59, 17) + SourceIndex(0) +6 >Emitted(51, 22) Source(59, 22) + SourceIndex(0) +7 >Emitted(51, 23) Source(59, 23) + SourceIndex(0) +8 >Emitted(51, 24) Source(59, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(52, 2) Source(60, 2) + SourceIndex(0) +--- +>>>for (var _16 = 0, _17 = getMultiRobots(); _16 < _17.length; _16++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^ +15> ^^-> +1-> + > +2 >for +3 > +4 > (let [nameB = "noName"] of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> getMultiRobots() +12> +13> getMultiRobots() +14> ) +1->Emitted(53, 1) Source(61, 1) + SourceIndex(0) +2 >Emitted(53, 4) Source(61, 4) + SourceIndex(0) +3 >Emitted(53, 5) Source(61, 5) + SourceIndex(0) +4 >Emitted(53, 6) Source(61, 32) + SourceIndex(0) +5 >Emitted(53, 17) Source(61, 48) + SourceIndex(0) +6 >Emitted(53, 19) Source(61, 32) + SourceIndex(0) +7 >Emitted(53, 25) Source(61, 32) + SourceIndex(0) +8 >Emitted(53, 39) Source(61, 46) + SourceIndex(0) +9 >Emitted(53, 41) Source(61, 48) + SourceIndex(0) +10>Emitted(53, 43) Source(61, 32) + SourceIndex(0) +11>Emitted(53, 59) Source(61, 48) + SourceIndex(0) +12>Emitted(53, 61) Source(61, 32) + SourceIndex(0) +13>Emitted(53, 66) Source(61, 48) + SourceIndex(0) +14>Emitted(53, 67) Source(61, 49) + SourceIndex(0) +--- +>>> var _18 = _17[_16][0], nameB = _18 === void 0 ? "noName" : _18; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > nameB = "noName" +3 > +4 > nameB = "noName" +1->Emitted(54, 5) Source(61, 11) + SourceIndex(0) +2 >Emitted(54, 26) Source(61, 27) + SourceIndex(0) +3 >Emitted(54, 28) Source(61, 11) + SourceIndex(0) +4 >Emitted(54, 67) Source(61, 27) + SourceIndex(0) +--- +>>> console.log(nameB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 >] of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameB +7 > ) +8 > ; +1 >Emitted(55, 5) Source(62, 5) + SourceIndex(0) +2 >Emitted(55, 12) Source(62, 12) + SourceIndex(0) +3 >Emitted(55, 13) Source(62, 13) + SourceIndex(0) +4 >Emitted(55, 16) Source(62, 16) + SourceIndex(0) +5 >Emitted(55, 17) Source(62, 17) + SourceIndex(0) +6 >Emitted(55, 22) Source(62, 22) + SourceIndex(0) +7 >Emitted(55, 23) Source(62, 23) + SourceIndex(0) +8 >Emitted(55, 24) Source(62, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(56, 2) Source(63, 2) + SourceIndex(0) +--- +>>>for (var _19 = 0, _20 = [multiRobotA, multiRobotB]; _19 < _20.length; _19++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^^ +16> ^ +1-> + > +2 >for +3 > +4 > (let [nameB = "noName"] of +5 > [multiRobotA, multiRobotB] +6 > +7 > [ +8 > multiRobotA +9 > , +10> multiRobotB +11> ] +12> +13> [multiRobotA, multiRobotB] +14> +15> [multiRobotA, multiRobotB] +16> ) +1->Emitted(57, 1) Source(64, 1) + SourceIndex(0) +2 >Emitted(57, 4) Source(64, 4) + SourceIndex(0) +3 >Emitted(57, 5) Source(64, 5) + SourceIndex(0) +4 >Emitted(57, 6) Source(64, 32) + SourceIndex(0) +5 >Emitted(57, 17) Source(64, 58) + SourceIndex(0) +6 >Emitted(57, 19) Source(64, 32) + SourceIndex(0) +7 >Emitted(57, 26) Source(64, 33) + SourceIndex(0) +8 >Emitted(57, 37) Source(64, 44) + SourceIndex(0) +9 >Emitted(57, 39) Source(64, 46) + SourceIndex(0) +10>Emitted(57, 50) Source(64, 57) + SourceIndex(0) +11>Emitted(57, 51) Source(64, 58) + SourceIndex(0) +12>Emitted(57, 53) Source(64, 32) + SourceIndex(0) +13>Emitted(57, 69) Source(64, 58) + SourceIndex(0) +14>Emitted(57, 71) Source(64, 32) + SourceIndex(0) +15>Emitted(57, 76) Source(64, 58) + SourceIndex(0) +16>Emitted(57, 77) Source(64, 59) + SourceIndex(0) +--- +>>> var _21 = _20[_19][0], nameB = _21 === void 0 ? "noName" : _21; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > nameB = "noName" +3 > +4 > nameB = "noName" +1 >Emitted(58, 5) Source(64, 11) + SourceIndex(0) +2 >Emitted(58, 26) Source(64, 27) + SourceIndex(0) +3 >Emitted(58, 28) Source(64, 11) + SourceIndex(0) +4 >Emitted(58, 67) Source(64, 27) + SourceIndex(0) +--- +>>> console.log(nameB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 >] of [multiRobotA, multiRobotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameB +7 > ) +8 > ; +1 >Emitted(59, 5) Source(65, 5) + SourceIndex(0) +2 >Emitted(59, 12) Source(65, 12) + SourceIndex(0) +3 >Emitted(59, 13) Source(65, 13) + SourceIndex(0) +4 >Emitted(59, 16) Source(65, 16) + SourceIndex(0) +5 >Emitted(59, 17) Source(65, 17) + SourceIndex(0) +6 >Emitted(59, 22) Source(65, 22) + SourceIndex(0) +7 >Emitted(59, 23) Source(65, 23) + SourceIndex(0) +8 >Emitted(59, 24) Source(65, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(60, 2) Source(66, 2) + SourceIndex(0) +--- +>>>for (var _22 = 0, robots_3 = robots; _22 < robots_3.length; _22++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^ +12> ^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +2 >for +3 > +4 > (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of +5 > robots +6 > +7 > robots +8 > +9 > robots +10> +11> robots +12> ) +1->Emitted(61, 1) Source(68, 1) + SourceIndex(0) +2 >Emitted(61, 4) Source(68, 4) + SourceIndex(0) +3 >Emitted(61, 5) Source(68, 5) + SourceIndex(0) +4 >Emitted(61, 6) Source(68, 67) + SourceIndex(0) +5 >Emitted(61, 17) Source(68, 73) + SourceIndex(0) +6 >Emitted(61, 19) Source(68, 67) + SourceIndex(0) +7 >Emitted(61, 36) Source(68, 73) + SourceIndex(0) +8 >Emitted(61, 38) Source(68, 67) + SourceIndex(0) +9 >Emitted(61, 59) Source(68, 73) + SourceIndex(0) +10>Emitted(61, 61) Source(68, 67) + SourceIndex(0) +11>Emitted(61, 66) Source(68, 73) + SourceIndex(0) +12>Emitted(61, 67) Source(68, 74) + SourceIndex(0) +--- +>>> var _23 = robots_3[_22], _24 = _23[0], numberA2 = _24 === void 0 ? -1 : _24, _25 = _23[1], nameA2 = _25 === void 0 ? "noName" : _25, _26 = _23[2], skillA2 = _26 === void 0 ? "skill" : _26; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] +3 > +4 > numberA2 = -1 +5 > +6 > numberA2 = -1 +7 > , +8 > nameA2 = "noName" +9 > +10> nameA2 = "noName" +11> , +12> skillA2 = "skill" +13> +14> skillA2 = "skill" +1->Emitted(62, 5) Source(68, 6) + SourceIndex(0) +2 >Emitted(62, 28) Source(68, 63) + SourceIndex(0) +3 >Emitted(62, 30) Source(68, 11) + SourceIndex(0) +4 >Emitted(62, 42) Source(68, 24) + SourceIndex(0) +5 >Emitted(62, 44) Source(68, 11) + SourceIndex(0) +6 >Emitted(62, 80) Source(68, 24) + SourceIndex(0) +7 >Emitted(62, 82) Source(68, 26) + SourceIndex(0) +8 >Emitted(62, 94) Source(68, 43) + SourceIndex(0) +9 >Emitted(62, 96) Source(68, 26) + SourceIndex(0) +10>Emitted(62, 136) Source(68, 43) + SourceIndex(0) +11>Emitted(62, 138) Source(68, 45) + SourceIndex(0) +12>Emitted(62, 150) Source(68, 62) + SourceIndex(0) +13>Emitted(62, 152) Source(68, 45) + SourceIndex(0) +14>Emitted(62, 192) Source(68, 62) + SourceIndex(0) +--- +>>> console.log(nameA2); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 >] of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA2 +7 > ) +8 > ; +1 >Emitted(63, 5) Source(69, 5) + SourceIndex(0) +2 >Emitted(63, 12) Source(69, 12) + SourceIndex(0) +3 >Emitted(63, 13) Source(69, 13) + SourceIndex(0) +4 >Emitted(63, 16) Source(69, 16) + SourceIndex(0) +5 >Emitted(63, 17) Source(69, 17) + SourceIndex(0) +6 >Emitted(63, 23) Source(69, 23) + SourceIndex(0) +7 >Emitted(63, 24) Source(69, 24) + SourceIndex(0) +8 >Emitted(63, 25) Source(69, 25) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(64, 2) Source(70, 2) + SourceIndex(0) +--- +>>>for (var _27 = 0, _28 = getRobots(); _27 < _28.length; _27++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> getRobots() +12> +13> getRobots() +14> ) +1->Emitted(65, 1) Source(71, 1) + SourceIndex(0) +2 >Emitted(65, 4) Source(71, 4) + SourceIndex(0) +3 >Emitted(65, 5) Source(71, 5) + SourceIndex(0) +4 >Emitted(65, 6) Source(71, 67) + SourceIndex(0) +5 >Emitted(65, 17) Source(71, 78) + SourceIndex(0) +6 >Emitted(65, 19) Source(71, 67) + SourceIndex(0) +7 >Emitted(65, 25) Source(71, 67) + SourceIndex(0) +8 >Emitted(65, 34) Source(71, 76) + SourceIndex(0) +9 >Emitted(65, 36) Source(71, 78) + SourceIndex(0) +10>Emitted(65, 38) Source(71, 67) + SourceIndex(0) +11>Emitted(65, 54) Source(71, 78) + SourceIndex(0) +12>Emitted(65, 56) Source(71, 67) + SourceIndex(0) +13>Emitted(65, 61) Source(71, 78) + SourceIndex(0) +14>Emitted(65, 62) Source(71, 79) + SourceIndex(0) +--- +>>> var _29 = _28[_27], _30 = _29[0], numberA2 = _30 === void 0 ? -1 : _30, _31 = _29[1], nameA2 = _31 === void 0 ? "noName" : _31, _32 = _29[2], skillA2 = _32 === void 0 ? "skill" : _32; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] +3 > +4 > numberA2 = -1 +5 > +6 > numberA2 = -1 +7 > , +8 > nameA2 = "noName" +9 > +10> nameA2 = "noName" +11> , +12> skillA2 = "skill" +13> +14> skillA2 = "skill" +1->Emitted(66, 5) Source(71, 6) + SourceIndex(0) +2 >Emitted(66, 23) Source(71, 63) + SourceIndex(0) +3 >Emitted(66, 25) Source(71, 11) + SourceIndex(0) +4 >Emitted(66, 37) Source(71, 24) + SourceIndex(0) +5 >Emitted(66, 39) Source(71, 11) + SourceIndex(0) +6 >Emitted(66, 75) Source(71, 24) + SourceIndex(0) +7 >Emitted(66, 77) Source(71, 26) + SourceIndex(0) +8 >Emitted(66, 89) Source(71, 43) + SourceIndex(0) +9 >Emitted(66, 91) Source(71, 26) + SourceIndex(0) +10>Emitted(66, 131) Source(71, 43) + SourceIndex(0) +11>Emitted(66, 133) Source(71, 45) + SourceIndex(0) +12>Emitted(66, 145) Source(71, 62) + SourceIndex(0) +13>Emitted(66, 147) Source(71, 45) + SourceIndex(0) +14>Emitted(66, 187) Source(71, 62) + SourceIndex(0) +--- +>>> console.log(nameA2); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 >] of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA2 +7 > ) +8 > ; +1 >Emitted(67, 5) Source(72, 5) + SourceIndex(0) +2 >Emitted(67, 12) Source(72, 12) + SourceIndex(0) +3 >Emitted(67, 13) Source(72, 13) + SourceIndex(0) +4 >Emitted(67, 16) Source(72, 16) + SourceIndex(0) +5 >Emitted(67, 17) Source(72, 17) + SourceIndex(0) +6 >Emitted(67, 23) Source(72, 23) + SourceIndex(0) +7 >Emitted(67, 24) Source(72, 24) + SourceIndex(0) +8 >Emitted(67, 25) Source(72, 25) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(68, 2) Source(73, 2) + SourceIndex(0) +--- +>>>for (var _33 = 0, _34 = [robotA, robotB]; _33 < _34.length; _33++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^^ +16> ^ +17> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of +5 > [robotA, robotB] +6 > +7 > [ +8 > robotA +9 > , +10> robotB +11> ] +12> +13> [robotA, robotB] +14> +15> [robotA, robotB] +16> ) +1->Emitted(69, 1) Source(74, 1) + SourceIndex(0) +2 >Emitted(69, 4) Source(74, 4) + SourceIndex(0) +3 >Emitted(69, 5) Source(74, 5) + SourceIndex(0) +4 >Emitted(69, 6) Source(74, 67) + SourceIndex(0) +5 >Emitted(69, 17) Source(74, 83) + SourceIndex(0) +6 >Emitted(69, 19) Source(74, 67) + SourceIndex(0) +7 >Emitted(69, 26) Source(74, 68) + SourceIndex(0) +8 >Emitted(69, 32) Source(74, 74) + SourceIndex(0) +9 >Emitted(69, 34) Source(74, 76) + SourceIndex(0) +10>Emitted(69, 40) Source(74, 82) + SourceIndex(0) +11>Emitted(69, 41) Source(74, 83) + SourceIndex(0) +12>Emitted(69, 43) Source(74, 67) + SourceIndex(0) +13>Emitted(69, 59) Source(74, 83) + SourceIndex(0) +14>Emitted(69, 61) Source(74, 67) + SourceIndex(0) +15>Emitted(69, 66) Source(74, 83) + SourceIndex(0) +16>Emitted(69, 67) Source(74, 84) + SourceIndex(0) +--- +>>> var _35 = _34[_33], _36 = _35[0], numberA2 = _36 === void 0 ? -1 : _36, _37 = _35[1], nameA2 = _37 === void 0 ? "noName" : _37, _38 = _35[2], skillA2 = _38 === void 0 ? "skill" : _38; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] +3 > +4 > numberA2 = -1 +5 > +6 > numberA2 = -1 +7 > , +8 > nameA2 = "noName" +9 > +10> nameA2 = "noName" +11> , +12> skillA2 = "skill" +13> +14> skillA2 = "skill" +1->Emitted(70, 5) Source(74, 6) + SourceIndex(0) +2 >Emitted(70, 23) Source(74, 63) + SourceIndex(0) +3 >Emitted(70, 25) Source(74, 11) + SourceIndex(0) +4 >Emitted(70, 37) Source(74, 24) + SourceIndex(0) +5 >Emitted(70, 39) Source(74, 11) + SourceIndex(0) +6 >Emitted(70, 75) Source(74, 24) + SourceIndex(0) +7 >Emitted(70, 77) Source(74, 26) + SourceIndex(0) +8 >Emitted(70, 89) Source(74, 43) + SourceIndex(0) +9 >Emitted(70, 91) Source(74, 26) + SourceIndex(0) +10>Emitted(70, 131) Source(74, 43) + SourceIndex(0) +11>Emitted(70, 133) Source(74, 45) + SourceIndex(0) +12>Emitted(70, 145) Source(74, 62) + SourceIndex(0) +13>Emitted(70, 147) Source(74, 45) + SourceIndex(0) +14>Emitted(70, 187) Source(74, 62) + SourceIndex(0) +--- +>>> console.log(nameA2); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 >] of [robotA, robotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA2 +7 > ) +8 > ; +1 >Emitted(71, 5) Source(75, 5) + SourceIndex(0) +2 >Emitted(71, 12) Source(75, 12) + SourceIndex(0) +3 >Emitted(71, 13) Source(75, 13) + SourceIndex(0) +4 >Emitted(71, 16) Source(75, 16) + SourceIndex(0) +5 >Emitted(71, 17) Source(75, 17) + SourceIndex(0) +6 >Emitted(71, 23) Source(75, 23) + SourceIndex(0) +7 >Emitted(71, 24) Source(75, 24) + SourceIndex(0) +8 >Emitted(71, 25) Source(75, 25) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(72, 2) Source(76, 2) + SourceIndex(0) +--- +>>>for (var _39 = 0, multiRobots_3 = multiRobots; _39 < multiRobots_3.length; _39++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^ +12> ^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let [nameMA = "noName", [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"]] of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > multiRobots +10> +11> multiRobots +12> ) +1->Emitted(73, 1) Source(77, 1) + SourceIndex(0) +2 >Emitted(73, 4) Source(77, 4) + SourceIndex(0) +3 >Emitted(73, 5) Source(77, 5) + SourceIndex(0) +4 >Emitted(73, 6) Source(80, 30) + SourceIndex(0) +5 >Emitted(73, 17) Source(80, 41) + SourceIndex(0) +6 >Emitted(73, 19) Source(80, 30) + SourceIndex(0) +7 >Emitted(73, 46) Source(80, 41) + SourceIndex(0) +8 >Emitted(73, 48) Source(80, 30) + SourceIndex(0) +9 >Emitted(73, 74) Source(80, 41) + SourceIndex(0) +10>Emitted(73, 76) Source(80, 30) + SourceIndex(0) +11>Emitted(73, 81) Source(80, 41) + SourceIndex(0) +12>Emitted(73, 82) Source(80, 42) + SourceIndex(0) +--- +>>> var _40 = multiRobots_3[_39], _41 = _40[0], nameMA = _41 === void 0 ? "noName" : _41, _42 = _40[1], _43 = _42 === void 0 ? ["skill1", "skill2"] : _42, _44 = _43[0], primarySkillA = _44 === void 0 ? "primary" : _44, _45 = _43[1], secondarySkillA = _45 === void 0 ? "secondary" : _45; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let [nameMA = "noName", [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"]] +3 > +4 > nameMA = "noName" +5 > +6 > nameMA = "noName" +7 > , +8 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"] +9 > +10> [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"] +11> +12> primarySkillA = "primary" +13> +14> primarySkillA = "primary" +15> , + > +16> secondarySkillA = "secondary" +17> +18> secondarySkillA = "secondary" +1->Emitted(74, 5) Source(77, 6) + SourceIndex(0) +2 >Emitted(74, 33) Source(80, 26) + SourceIndex(0) +3 >Emitted(74, 35) Source(77, 11) + SourceIndex(0) +4 >Emitted(74, 47) Source(77, 28) + SourceIndex(0) +5 >Emitted(74, 49) Source(77, 11) + SourceIndex(0) +6 >Emitted(74, 89) Source(77, 28) + SourceIndex(0) +7 >Emitted(74, 91) Source(77, 30) + SourceIndex(0) +8 >Emitted(74, 103) Source(80, 25) + SourceIndex(0) +9 >Emitted(74, 105) Source(77, 30) + SourceIndex(0) +10>Emitted(74, 154) Source(80, 25) + SourceIndex(0) +11>Emitted(74, 156) Source(78, 5) + SourceIndex(0) +12>Emitted(74, 168) Source(78, 30) + SourceIndex(0) +13>Emitted(74, 170) Source(78, 5) + SourceIndex(0) +14>Emitted(74, 218) Source(78, 30) + SourceIndex(0) +15>Emitted(74, 220) Source(79, 5) + SourceIndex(0) +16>Emitted(74, 232) Source(79, 34) + SourceIndex(0) +17>Emitted(74, 234) Source(79, 5) + SourceIndex(0) +18>Emitted(74, 286) Source(79, 34) + SourceIndex(0) +--- +>>> console.log(nameMA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + >] = ["skill1", "skill2"]] of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMA +7 > ) +8 > ; +1 >Emitted(75, 5) Source(81, 5) + SourceIndex(0) +2 >Emitted(75, 12) Source(81, 12) + SourceIndex(0) +3 >Emitted(75, 13) Source(81, 13) + SourceIndex(0) +4 >Emitted(75, 16) Source(81, 16) + SourceIndex(0) +5 >Emitted(75, 17) Source(81, 17) + SourceIndex(0) +6 >Emitted(75, 23) Source(81, 23) + SourceIndex(0) +7 >Emitted(75, 24) Source(81, 24) + SourceIndex(0) +8 >Emitted(75, 25) Source(81, 25) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(76, 2) Source(82, 2) + SourceIndex(0) +--- +>>>for (var _46 = 0, _47 = getMultiRobots(); _46 < _47.length; _46++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let [nameMA = "noName", [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"]] of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> getMultiRobots() +12> +13> getMultiRobots() +14> ) +1->Emitted(77, 1) Source(83, 1) + SourceIndex(0) +2 >Emitted(77, 4) Source(83, 4) + SourceIndex(0) +3 >Emitted(77, 5) Source(83, 5) + SourceIndex(0) +4 >Emitted(77, 6) Source(86, 30) + SourceIndex(0) +5 >Emitted(77, 17) Source(86, 46) + SourceIndex(0) +6 >Emitted(77, 19) Source(86, 30) + SourceIndex(0) +7 >Emitted(77, 25) Source(86, 30) + SourceIndex(0) +8 >Emitted(77, 39) Source(86, 44) + SourceIndex(0) +9 >Emitted(77, 41) Source(86, 46) + SourceIndex(0) +10>Emitted(77, 43) Source(86, 30) + SourceIndex(0) +11>Emitted(77, 59) Source(86, 46) + SourceIndex(0) +12>Emitted(77, 61) Source(86, 30) + SourceIndex(0) +13>Emitted(77, 66) Source(86, 46) + SourceIndex(0) +14>Emitted(77, 67) Source(86, 47) + SourceIndex(0) +--- +>>> var _48 = _47[_46], _49 = _48[0], nameMA = _49 === void 0 ? "noName" : _49, _50 = _48[1], _51 = _50 === void 0 ? ["skill1", "skill2"] : _50, _52 = _51[0], primarySkillA = _52 === void 0 ? "primary" : _52, _53 = _51[1], secondarySkillA = _53 === void 0 ? "secondary" : _53; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let [nameMA = "noName", [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"]] +3 > +4 > nameMA = "noName" +5 > +6 > nameMA = "noName" +7 > , +8 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"] +9 > +10> [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"] +11> +12> primarySkillA = "primary" +13> +14> primarySkillA = "primary" +15> , + > +16> secondarySkillA = "secondary" +17> +18> secondarySkillA = "secondary" +1->Emitted(78, 5) Source(83, 6) + SourceIndex(0) +2 >Emitted(78, 23) Source(86, 26) + SourceIndex(0) +3 >Emitted(78, 25) Source(83, 11) + SourceIndex(0) +4 >Emitted(78, 37) Source(83, 28) + SourceIndex(0) +5 >Emitted(78, 39) Source(83, 11) + SourceIndex(0) +6 >Emitted(78, 79) Source(83, 28) + SourceIndex(0) +7 >Emitted(78, 81) Source(83, 30) + SourceIndex(0) +8 >Emitted(78, 93) Source(86, 25) + SourceIndex(0) +9 >Emitted(78, 95) Source(83, 30) + SourceIndex(0) +10>Emitted(78, 144) Source(86, 25) + SourceIndex(0) +11>Emitted(78, 146) Source(84, 5) + SourceIndex(0) +12>Emitted(78, 158) Source(84, 30) + SourceIndex(0) +13>Emitted(78, 160) Source(84, 5) + SourceIndex(0) +14>Emitted(78, 208) Source(84, 30) + SourceIndex(0) +15>Emitted(78, 210) Source(85, 5) + SourceIndex(0) +16>Emitted(78, 222) Source(85, 34) + SourceIndex(0) +17>Emitted(78, 224) Source(85, 5) + SourceIndex(0) +18>Emitted(78, 276) Source(85, 34) + SourceIndex(0) +--- +>>> console.log(nameMA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + >] = ["skill1", "skill2"]] of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMA +7 > ) +8 > ; +1 >Emitted(79, 5) Source(87, 5) + SourceIndex(0) +2 >Emitted(79, 12) Source(87, 12) + SourceIndex(0) +3 >Emitted(79, 13) Source(87, 13) + SourceIndex(0) +4 >Emitted(79, 16) Source(87, 16) + SourceIndex(0) +5 >Emitted(79, 17) Source(87, 17) + SourceIndex(0) +6 >Emitted(79, 23) Source(87, 23) + SourceIndex(0) +7 >Emitted(79, 24) Source(87, 24) + SourceIndex(0) +8 >Emitted(79, 25) Source(87, 25) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(80, 2) Source(88, 2) + SourceIndex(0) +--- +>>>for (var _54 = 0, _55 = [multiRobotA, multiRobotB]; _54 < _55.length; _54++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^^ +16> ^ +17> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let [nameMA = "noName", [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"]] of +5 > [multiRobotA, multiRobotB] +6 > +7 > [ +8 > multiRobotA +9 > , +10> multiRobotB +11> ] +12> +13> [multiRobotA, multiRobotB] +14> +15> [multiRobotA, multiRobotB] +16> ) +1->Emitted(81, 1) Source(89, 1) + SourceIndex(0) +2 >Emitted(81, 4) Source(89, 4) + SourceIndex(0) +3 >Emitted(81, 5) Source(89, 5) + SourceIndex(0) +4 >Emitted(81, 6) Source(92, 30) + SourceIndex(0) +5 >Emitted(81, 17) Source(92, 56) + SourceIndex(0) +6 >Emitted(81, 19) Source(92, 30) + SourceIndex(0) +7 >Emitted(81, 26) Source(92, 31) + SourceIndex(0) +8 >Emitted(81, 37) Source(92, 42) + SourceIndex(0) +9 >Emitted(81, 39) Source(92, 44) + SourceIndex(0) +10>Emitted(81, 50) Source(92, 55) + SourceIndex(0) +11>Emitted(81, 51) Source(92, 56) + SourceIndex(0) +12>Emitted(81, 53) Source(92, 30) + SourceIndex(0) +13>Emitted(81, 69) Source(92, 56) + SourceIndex(0) +14>Emitted(81, 71) Source(92, 30) + SourceIndex(0) +15>Emitted(81, 76) Source(92, 56) + SourceIndex(0) +16>Emitted(81, 77) Source(92, 57) + SourceIndex(0) +--- +>>> var _56 = _55[_54], _57 = _56[0], nameMA = _57 === void 0 ? "noName" : _57, _58 = _56[1], _59 = _58 === void 0 ? ["skill1", "skill2"] : _58, _60 = _59[0], primarySkillA = _60 === void 0 ? "primary" : _60, _61 = _59[1], secondarySkillA = _61 === void 0 ? "secondary" : _61; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let [nameMA = "noName", [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"]] +3 > +4 > nameMA = "noName" +5 > +6 > nameMA = "noName" +7 > , +8 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"] +9 > +10> [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"] +11> +12> primarySkillA = "primary" +13> +14> primarySkillA = "primary" +15> , + > +16> secondarySkillA = "secondary" +17> +18> secondarySkillA = "secondary" +1->Emitted(82, 5) Source(89, 6) + SourceIndex(0) +2 >Emitted(82, 23) Source(92, 26) + SourceIndex(0) +3 >Emitted(82, 25) Source(89, 11) + SourceIndex(0) +4 >Emitted(82, 37) Source(89, 28) + SourceIndex(0) +5 >Emitted(82, 39) Source(89, 11) + SourceIndex(0) +6 >Emitted(82, 79) Source(89, 28) + SourceIndex(0) +7 >Emitted(82, 81) Source(89, 30) + SourceIndex(0) +8 >Emitted(82, 93) Source(92, 25) + SourceIndex(0) +9 >Emitted(82, 95) Source(89, 30) + SourceIndex(0) +10>Emitted(82, 144) Source(92, 25) + SourceIndex(0) +11>Emitted(82, 146) Source(90, 5) + SourceIndex(0) +12>Emitted(82, 158) Source(90, 30) + SourceIndex(0) +13>Emitted(82, 160) Source(90, 5) + SourceIndex(0) +14>Emitted(82, 208) Source(90, 30) + SourceIndex(0) +15>Emitted(82, 210) Source(91, 5) + SourceIndex(0) +16>Emitted(82, 222) Source(91, 34) + SourceIndex(0) +17>Emitted(82, 224) Source(91, 5) + SourceIndex(0) +18>Emitted(82, 276) Source(91, 34) + SourceIndex(0) +--- +>>> console.log(nameMA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMA +7 > ) +8 > ; +1 >Emitted(83, 5) Source(93, 5) + SourceIndex(0) +2 >Emitted(83, 12) Source(93, 12) + SourceIndex(0) +3 >Emitted(83, 13) Source(93, 13) + SourceIndex(0) +4 >Emitted(83, 16) Source(93, 16) + SourceIndex(0) +5 >Emitted(83, 17) Source(93, 17) + SourceIndex(0) +6 >Emitted(83, 23) Source(93, 23) + SourceIndex(0) +7 >Emitted(83, 24) Source(93, 24) + SourceIndex(0) +8 >Emitted(83, 25) Source(93, 25) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(84, 2) Source(94, 2) + SourceIndex(0) +--- +>>>for (var _62 = 0, robots_4 = robots; _62 < robots_4.length; _62++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^ +12> ^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +2 >for +3 > +4 > (let [numberA3 = -1, ...robotAInfo] of +5 > robots +6 > +7 > robots +8 > +9 > robots +10> +11> robots +12> ) +1->Emitted(85, 1) Source(96, 1) + SourceIndex(0) +2 >Emitted(85, 4) Source(96, 4) + SourceIndex(0) +3 >Emitted(85, 5) Source(96, 5) + SourceIndex(0) +4 >Emitted(85, 6) Source(96, 44) + SourceIndex(0) +5 >Emitted(85, 17) Source(96, 50) + SourceIndex(0) +6 >Emitted(85, 19) Source(96, 44) + SourceIndex(0) +7 >Emitted(85, 36) Source(96, 50) + SourceIndex(0) +8 >Emitted(85, 38) Source(96, 44) + SourceIndex(0) +9 >Emitted(85, 59) Source(96, 50) + SourceIndex(0) +10>Emitted(85, 61) Source(96, 44) + SourceIndex(0) +11>Emitted(85, 66) Source(96, 50) + SourceIndex(0) +12>Emitted(85, 67) Source(96, 51) + SourceIndex(0) +--- +>>> var _63 = robots_4[_62], _64 = _63[0], numberA3 = _64 === void 0 ? -1 : _64, robotAInfo = _63.slice(1); +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let [numberA3 = -1, ...robotAInfo] +3 > +4 > numberA3 = -1 +5 > +6 > numberA3 = -1 +7 > , +8 > ...robotAInfo +1->Emitted(86, 5) Source(96, 6) + SourceIndex(0) +2 >Emitted(86, 28) Source(96, 40) + SourceIndex(0) +3 >Emitted(86, 30) Source(96, 11) + SourceIndex(0) +4 >Emitted(86, 42) Source(96, 24) + SourceIndex(0) +5 >Emitted(86, 44) Source(96, 11) + SourceIndex(0) +6 >Emitted(86, 80) Source(96, 24) + SourceIndex(0) +7 >Emitted(86, 82) Source(96, 26) + SourceIndex(0) +8 >Emitted(86, 107) Source(96, 39) + SourceIndex(0) +--- +>>> console.log(numberA3); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 >] of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > numberA3 +7 > ) +8 > ; +1 >Emitted(87, 5) Source(97, 5) + SourceIndex(0) +2 >Emitted(87, 12) Source(97, 12) + SourceIndex(0) +3 >Emitted(87, 13) Source(97, 13) + SourceIndex(0) +4 >Emitted(87, 16) Source(97, 16) + SourceIndex(0) +5 >Emitted(87, 17) Source(97, 17) + SourceIndex(0) +6 >Emitted(87, 25) Source(97, 25) + SourceIndex(0) +7 >Emitted(87, 26) Source(97, 26) + SourceIndex(0) +8 >Emitted(87, 27) Source(97, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(88, 2) Source(98, 2) + SourceIndex(0) +--- +>>>for (var _65 = 0, _66 = getRobots(); _65 < _66.length; _65++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let [numberA3 = -1, ...robotAInfo] of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> getRobots() +12> +13> getRobots() +14> ) +1->Emitted(89, 1) Source(99, 1) + SourceIndex(0) +2 >Emitted(89, 4) Source(99, 4) + SourceIndex(0) +3 >Emitted(89, 5) Source(99, 5) + SourceIndex(0) +4 >Emitted(89, 6) Source(99, 44) + SourceIndex(0) +5 >Emitted(89, 17) Source(99, 55) + SourceIndex(0) +6 >Emitted(89, 19) Source(99, 44) + SourceIndex(0) +7 >Emitted(89, 25) Source(99, 44) + SourceIndex(0) +8 >Emitted(89, 34) Source(99, 53) + SourceIndex(0) +9 >Emitted(89, 36) Source(99, 55) + SourceIndex(0) +10>Emitted(89, 38) Source(99, 44) + SourceIndex(0) +11>Emitted(89, 54) Source(99, 55) + SourceIndex(0) +12>Emitted(89, 56) Source(99, 44) + SourceIndex(0) +13>Emitted(89, 61) Source(99, 55) + SourceIndex(0) +14>Emitted(89, 62) Source(99, 56) + SourceIndex(0) +--- +>>> var _67 = _66[_65], _68 = _67[0], numberA3 = _68 === void 0 ? -1 : _68, robotAInfo = _67.slice(1); +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let [numberA3 = -1, ...robotAInfo] +3 > +4 > numberA3 = -1 +5 > +6 > numberA3 = -1 +7 > , +8 > ...robotAInfo +1->Emitted(90, 5) Source(99, 6) + SourceIndex(0) +2 >Emitted(90, 23) Source(99, 40) + SourceIndex(0) +3 >Emitted(90, 25) Source(99, 11) + SourceIndex(0) +4 >Emitted(90, 37) Source(99, 24) + SourceIndex(0) +5 >Emitted(90, 39) Source(99, 11) + SourceIndex(0) +6 >Emitted(90, 75) Source(99, 24) + SourceIndex(0) +7 >Emitted(90, 77) Source(99, 26) + SourceIndex(0) +8 >Emitted(90, 102) Source(99, 39) + SourceIndex(0) +--- +>>> console.log(numberA3); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 >] of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > numberA3 +7 > ) +8 > ; +1 >Emitted(91, 5) Source(100, 5) + SourceIndex(0) +2 >Emitted(91, 12) Source(100, 12) + SourceIndex(0) +3 >Emitted(91, 13) Source(100, 13) + SourceIndex(0) +4 >Emitted(91, 16) Source(100, 16) + SourceIndex(0) +5 >Emitted(91, 17) Source(100, 17) + SourceIndex(0) +6 >Emitted(91, 25) Source(100, 25) + SourceIndex(0) +7 >Emitted(91, 26) Source(100, 26) + SourceIndex(0) +8 >Emitted(91, 27) Source(100, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(92, 2) Source(101, 2) + SourceIndex(0) +--- +>>>for (var _69 = 0, _70 = [robotA, robotB]; _69 < _70.length; _69++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^^ +16> ^ +17> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let [numberA3 = -1, ...robotAInfo] of +5 > [robotA, robotB] +6 > +7 > [ +8 > robotA +9 > , +10> robotB +11> ] +12> +13> [robotA, robotB] +14> +15> [robotA, robotB] +16> ) +1->Emitted(93, 1) Source(102, 1) + SourceIndex(0) +2 >Emitted(93, 4) Source(102, 4) + SourceIndex(0) +3 >Emitted(93, 5) Source(102, 5) + SourceIndex(0) +4 >Emitted(93, 6) Source(102, 44) + SourceIndex(0) +5 >Emitted(93, 17) Source(102, 60) + SourceIndex(0) +6 >Emitted(93, 19) Source(102, 44) + SourceIndex(0) +7 >Emitted(93, 26) Source(102, 45) + SourceIndex(0) +8 >Emitted(93, 32) Source(102, 51) + SourceIndex(0) +9 >Emitted(93, 34) Source(102, 53) + SourceIndex(0) +10>Emitted(93, 40) Source(102, 59) + SourceIndex(0) +11>Emitted(93, 41) Source(102, 60) + SourceIndex(0) +12>Emitted(93, 43) Source(102, 44) + SourceIndex(0) +13>Emitted(93, 59) Source(102, 60) + SourceIndex(0) +14>Emitted(93, 61) Source(102, 44) + SourceIndex(0) +15>Emitted(93, 66) Source(102, 60) + SourceIndex(0) +16>Emitted(93, 67) Source(102, 61) + SourceIndex(0) +--- +>>> var _71 = _70[_69], _72 = _71[0], numberA3 = _72 === void 0 ? -1 : _72, robotAInfo = _71.slice(1); +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let [numberA3 = -1, ...robotAInfo] +3 > +4 > numberA3 = -1 +5 > +6 > numberA3 = -1 +7 > , +8 > ...robotAInfo +1->Emitted(94, 5) Source(102, 6) + SourceIndex(0) +2 >Emitted(94, 23) Source(102, 40) + SourceIndex(0) +3 >Emitted(94, 25) Source(102, 11) + SourceIndex(0) +4 >Emitted(94, 37) Source(102, 24) + SourceIndex(0) +5 >Emitted(94, 39) Source(102, 11) + SourceIndex(0) +6 >Emitted(94, 75) Source(102, 24) + SourceIndex(0) +7 >Emitted(94, 77) Source(102, 26) + SourceIndex(0) +8 >Emitted(94, 102) Source(102, 39) + SourceIndex(0) +--- +>>> console.log(numberA3); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 >] of [robotA, robotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > numberA3 +7 > ) +8 > ; +1 >Emitted(95, 5) Source(103, 5) + SourceIndex(0) +2 >Emitted(95, 12) Source(103, 12) + SourceIndex(0) +3 >Emitted(95, 13) Source(103, 13) + SourceIndex(0) +4 >Emitted(95, 16) Source(103, 16) + SourceIndex(0) +5 >Emitted(95, 17) Source(103, 17) + SourceIndex(0) +6 >Emitted(95, 25) Source(103, 25) + SourceIndex(0) +7 >Emitted(95, 26) Source(103, 26) + SourceIndex(0) +8 >Emitted(95, 27) Source(103, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(96, 2) Source(104, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.symbols b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.symbols new file mode 100644 index 00000000000..b398a8e6af5 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.symbols @@ -0,0 +1,325 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 11)) + + log(msg: any): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 1, 8)) +} +type Robot = [number, string, string]; +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 2, 1)) + +type MultiSkilledRobot = [string, [string, string]]; +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 3, 38)) + +let robotA: Robot = [1, "mower", "mowing"]; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 6, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 2, 1)) + +let robotB: Robot = [2, "trimmer", "trimming"]; +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 7, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 2, 1)) + +let robots = [robotA, robotB]; +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 8, 3)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 6, 3)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 7, 3)) + +function getRobots() { +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 8, 30)) + + return robots; +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 8, 3)) +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 13, 3)) +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 3, 38)) + +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 14, 3)) +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 3, 38)) + +let multiRobots = [multiRobotA, multiRobotB]; +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 15, 3)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 13, 3)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 14, 3)) + +function getMultiRobots() { +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 15, 45)) + + return multiRobots; +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 15, 3)) +} + +for (let [, nameA = "noName"] of robots) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 20, 11)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 8, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 20, 11)) +} +for (let [, nameA = "noName"] of getRobots()) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 23, 11)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 8, 30)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 23, 11)) +} +for (let [, nameA = "noName"] of [robotA, robotB]) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 26, 11)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 6, 3)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 7, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 26, 11)) +} +for (let [, [ + primarySkillA = "primary", +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 29, 13)) + + secondarySkillA = "secondary" +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 30, 30)) + +] = ["skill1", "skill2"]] of multiRobots) { +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 15, 3)) + + console.log(primarySkillA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 29, 13)) +} +for (let [, [ + primarySkillA = "primary", +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 35, 13)) + + secondarySkillA = "secondary" +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 36, 30)) + +] = ["skill1", "skill2"]] of getMultiRobots()) { +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 15, 45)) + + console.log(primarySkillA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 35, 13)) +} +for (let [, [ + primarySkillA = "primary", +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 41, 13)) + + secondarySkillA = "secondary" +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 42, 30)) + +] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 13, 3)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 14, 3)) + + console.log(primarySkillA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 41, 13)) +} + +for (let [numberB = -1] of robots) { +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 48, 10)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 8, 3)) + + console.log(numberB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 48, 10)) +} +for (let [numberB = -1] of getRobots()) { +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 51, 10)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 8, 30)) + + console.log(numberB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 51, 10)) +} +for (let [numberB = -1] of [robotA, robotB]) { +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 54, 10)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 6, 3)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 7, 3)) + + console.log(numberB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 54, 10)) +} +for (let [nameB = "noName"] of multiRobots) { +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 57, 10)) +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 15, 3)) + + console.log(nameB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 57, 10)) +} +for (let [nameB = "noName"] of getMultiRobots()) { +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 60, 10)) +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 15, 45)) + + console.log(nameB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 60, 10)) +} +for (let [nameB = "noName"] of [multiRobotA, multiRobotB]) { +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 63, 10)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 13, 3)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 14, 3)) + + console.log(nameB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 63, 10)) +} + +for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 67, 10)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 67, 24)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 67, 43)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 8, 3)) + + console.log(nameA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 67, 24)) +} +for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 70, 10)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 70, 24)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 70, 43)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 8, 30)) + + console.log(nameA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 70, 24)) +} +for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) { +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 73, 10)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 73, 24)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 73, 43)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 6, 3)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 7, 3)) + + console.log(nameA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 73, 24)) +} +for (let [nameMA = "noName", [ +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 76, 10)) + + primarySkillA = "primary", +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 76, 30)) + + secondarySkillA = "secondary" +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 77, 30)) + +] = ["skill1", "skill2"]] of multiRobots) { +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 15, 3)) + + console.log(nameMA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 76, 10)) +} +for (let [nameMA = "noName", [ +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 82, 10)) + + primarySkillA = "primary", +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 82, 30)) + + secondarySkillA = "secondary" +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 83, 30)) + +] = ["skill1", "skill2"]] of getMultiRobots()) { +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 15, 45)) + + console.log(nameMA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 82, 10)) +} +for (let [nameMA = "noName", [ +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 88, 10)) + + primarySkillA = "primary", +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 88, 30)) + + secondarySkillA = "secondary" +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 89, 30)) + +] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 13, 3)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 14, 3)) + + console.log(nameMA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 88, 10)) +} + +for (let [numberA3 = -1, ...robotAInfo] of robots) { +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 95, 10)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 95, 24)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 8, 3)) + + console.log(numberA3); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 95, 10)) +} +for (let [numberA3 = -1, ...robotAInfo] of getRobots()) { +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 98, 10)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 98, 24)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 8, 30)) + + console.log(numberA3); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 98, 10)) +} +for (let [numberA3 = -1, ...robotAInfo] of [robotA, robotB]) { +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 101, 10)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 101, 24)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 6, 3)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 7, 3)) + + console.log(numberA3); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 0, 22)) +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts, 101, 10)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.types b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.types new file mode 100644 index 00000000000..488b5c46145 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.types @@ -0,0 +1,452 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts === +declare var console: { +>console : { log(msg: any): void; } + + log(msg: any): void; +>log : (msg: any) => void +>msg : any +} +type Robot = [number, string, string]; +>Robot : [number, string, string] + +type MultiSkilledRobot = [string, [string, string]]; +>MultiSkilledRobot : [string, [string, string]] + +let robotA: Robot = [1, "mower", "mowing"]; +>robotA : [number, string, string] +>Robot : [number, string, string] +>[1, "mower", "mowing"] : [number, string, string] +>1 : number +>"mower" : string +>"mowing" : string + +let robotB: Robot = [2, "trimmer", "trimming"]; +>robotB : [number, string, string] +>Robot : [number, string, string] +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + +let robots = [robotA, robotB]; +>robots : [number, string, string][] +>[robotA, robotB] : [number, string, string][] +>robotA : [number, string, string] +>robotB : [number, string, string] + +function getRobots() { +>getRobots : () => [number, string, string][] + + return robots; +>robots : [number, string, string][] +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +>multiRobotA : [string, [string, string]] +>MultiSkilledRobot : [string, [string, string]] +>["mower", ["mowing", ""]] : [string, [string, string]] +>"mower" : string +>["mowing", ""] : [string, string] +>"mowing" : string +>"" : string + +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +>multiRobotB : [string, [string, string]] +>MultiSkilledRobot : [string, [string, string]] +>["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>"trimmer" : string +>["trimming", "edging"] : [string, string] +>"trimming" : string +>"edging" : string + +let multiRobots = [multiRobotA, multiRobotB]; +>multiRobots : [string, [string, string]][] +>[multiRobotA, multiRobotB] : [string, [string, string]][] +>multiRobotA : [string, [string, string]] +>multiRobotB : [string, [string, string]] + +function getMultiRobots() { +>getMultiRobots : () => [string, [string, string]][] + + return multiRobots; +>multiRobots : [string, [string, string]][] +} + +for (let [, nameA = "noName"] of robots) { +> : undefined +>nameA : string +>"noName" : string +>robots : [number, string, string][] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let [, nameA = "noName"] of getRobots()) { +> : undefined +>nameA : string +>"noName" : string +>getRobots() : [number, string, string][] +>getRobots : () => [number, string, string][] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let [, nameA = "noName"] of [robotA, robotB]) { +> : undefined +>nameA : string +>"noName" : string +>[robotA, robotB] : [number, string, string][] +>robotA : [number, string, string] +>robotB : [number, string, string] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let [, [ +> : undefined + + primarySkillA = "primary", +>primarySkillA : string +>"primary" : string + + secondarySkillA = "secondary" +>secondarySkillA : string +>"secondary" : string + +] = ["skill1", "skill2"]] of multiRobots) { +>["skill1", "skill2"] : [string, string] +>"skill1" : string +>"skill2" : string +>multiRobots : [string, [string, string]][] + + console.log(primarySkillA); +>console.log(primarySkillA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primarySkillA : string +} +for (let [, [ +> : undefined + + primarySkillA = "primary", +>primarySkillA : string +>"primary" : string + + secondarySkillA = "secondary" +>secondarySkillA : string +>"secondary" : string + +] = ["skill1", "skill2"]] of getMultiRobots()) { +>["skill1", "skill2"] : [string, string] +>"skill1" : string +>"skill2" : string +>getMultiRobots() : [string, [string, string]][] +>getMultiRobots : () => [string, [string, string]][] + + console.log(primarySkillA); +>console.log(primarySkillA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primarySkillA : string +} +for (let [, [ +> : undefined + + primarySkillA = "primary", +>primarySkillA : string +>"primary" : string + + secondarySkillA = "secondary" +>secondarySkillA : string +>"secondary" : string + +] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { +>["skill1", "skill2"] : [string, string] +>"skill1" : string +>"skill2" : string +>[multiRobotA, multiRobotB] : [string, [string, string]][] +>multiRobotA : [string, [string, string]] +>multiRobotB : [string, [string, string]] + + console.log(primarySkillA); +>console.log(primarySkillA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primarySkillA : string +} + +for (let [numberB = -1] of robots) { +>numberB : number +>-1 : number +>1 : number +>robots : [number, string, string][] + + console.log(numberB); +>console.log(numberB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberB : number +} +for (let [numberB = -1] of getRobots()) { +>numberB : number +>-1 : number +>1 : number +>getRobots() : [number, string, string][] +>getRobots : () => [number, string, string][] + + console.log(numberB); +>console.log(numberB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberB : number +} +for (let [numberB = -1] of [robotA, robotB]) { +>numberB : number +>-1 : number +>1 : number +>[robotA, robotB] : [number, string, string][] +>robotA : [number, string, string] +>robotB : [number, string, string] + + console.log(numberB); +>console.log(numberB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberB : number +} +for (let [nameB = "noName"] of multiRobots) { +>nameB : string +>"noName" : string +>multiRobots : [string, [string, string]][] + + console.log(nameB); +>console.log(nameB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameB : string +} +for (let [nameB = "noName"] of getMultiRobots()) { +>nameB : string +>"noName" : string +>getMultiRobots() : [string, [string, string]][] +>getMultiRobots : () => [string, [string, string]][] + + console.log(nameB); +>console.log(nameB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameB : string +} +for (let [nameB = "noName"] of [multiRobotA, multiRobotB]) { +>nameB : string +>"noName" : string +>[multiRobotA, multiRobotB] : [string, [string, string]][] +>multiRobotA : [string, [string, string]] +>multiRobotB : [string, [string, string]] + + console.log(nameB); +>console.log(nameB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameB : string +} + +for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { +>numberA2 : number +>-1 : number +>1 : number +>nameA2 : string +>"noName" : string +>skillA2 : string +>"skill" : string +>robots : [number, string, string][] + + console.log(nameA2); +>console.log(nameA2) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA2 : string +} +for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { +>numberA2 : number +>-1 : number +>1 : number +>nameA2 : string +>"noName" : string +>skillA2 : string +>"skill" : string +>getRobots() : [number, string, string][] +>getRobots : () => [number, string, string][] + + console.log(nameA2); +>console.log(nameA2) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA2 : string +} +for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) { +>numberA2 : number +>-1 : number +>1 : number +>nameA2 : string +>"noName" : string +>skillA2 : string +>"skill" : string +>[robotA, robotB] : [number, string, string][] +>robotA : [number, string, string] +>robotB : [number, string, string] + + console.log(nameA2); +>console.log(nameA2) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA2 : string +} +for (let [nameMA = "noName", [ +>nameMA : string +>"noName" : string + + primarySkillA = "primary", +>primarySkillA : string +>"primary" : string + + secondarySkillA = "secondary" +>secondarySkillA : string +>"secondary" : string + +] = ["skill1", "skill2"]] of multiRobots) { +>["skill1", "skill2"] : [string, string] +>"skill1" : string +>"skill2" : string +>multiRobots : [string, [string, string]][] + + console.log(nameMA); +>console.log(nameMA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMA : string +} +for (let [nameMA = "noName", [ +>nameMA : string +>"noName" : string + + primarySkillA = "primary", +>primarySkillA : string +>"primary" : string + + secondarySkillA = "secondary" +>secondarySkillA : string +>"secondary" : string + +] = ["skill1", "skill2"]] of getMultiRobots()) { +>["skill1", "skill2"] : [string, string] +>"skill1" : string +>"skill2" : string +>getMultiRobots() : [string, [string, string]][] +>getMultiRobots : () => [string, [string, string]][] + + console.log(nameMA); +>console.log(nameMA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMA : string +} +for (let [nameMA = "noName", [ +>nameMA : string +>"noName" : string + + primarySkillA = "primary", +>primarySkillA : string +>"primary" : string + + secondarySkillA = "secondary" +>secondarySkillA : string +>"secondary" : string + +] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { +>["skill1", "skill2"] : [string, string] +>"skill1" : string +>"skill2" : string +>[multiRobotA, multiRobotB] : [string, [string, string]][] +>multiRobotA : [string, [string, string]] +>multiRobotB : [string, [string, string]] + + console.log(nameMA); +>console.log(nameMA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMA : string +} + +for (let [numberA3 = -1, ...robotAInfo] of robots) { +>numberA3 : number +>-1 : number +>1 : number +>robotAInfo : (number | string)[] +>robots : [number, string, string][] + + console.log(numberA3); +>console.log(numberA3) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberA3 : number +} +for (let [numberA3 = -1, ...robotAInfo] of getRobots()) { +>numberA3 : number +>-1 : number +>1 : number +>robotAInfo : (number | string)[] +>getRobots() : [number, string, string][] +>getRobots : () => [number, string, string][] + + console.log(numberA3); +>console.log(numberA3) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberA3 : number +} +for (let [numberA3 = -1, ...robotAInfo] of [robotA, robotB]) { +>numberA3 : number +>-1 : number +>1 : number +>robotAInfo : (number | string)[] +>[robotA, robotB] : [number, string, string][] +>robotA : [number, string, string] +>robotB : [number, string, string] + + console.log(numberA3); +>console.log(numberA3) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberA3 : number +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.js b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.js new file mode 100644 index 00000000000..9cff7412ea9 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.js @@ -0,0 +1,214 @@ +//// [sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts] +declare var console: { + log(msg: any): void; +} +type Robot = [number, string, string]; +type MultiSkilledRobot = [string, [string, string]]; + +let robotA: Robot = [1, "mower", "mowing"]; +let robotB: Robot = [2, "trimmer", "trimming"]; +let robots = [robotA, robotB]; +function getRobots() { + return robots; +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +let multiRobots = [multiRobotA, multiRobotB]; +function getMultiRobots() { + return multiRobots; +} + +let nameA: string, primarySkillA: string, secondarySkillA: string; +let numberB: number, nameB: string; +let numberA2: number, nameA2: string, skillA2: string, nameMA: string; +let numberA3: number, robotAInfo: (number | string)[], multiRobotAInfo: (string | [string, string])[]; + +for ([, nameA = "noName"] of robots) { + console.log(nameA); +} +for ([, nameA = "noName"] of getRobots()) { + console.log(nameA); +} +for ([, nameA = "noName"] of [robotA, robotB]) { + console.log(nameA); +} +for ([, [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["skill1", "skill2"]] of multiRobots) { + console.log(primarySkillA); +} +for ([, [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["skill1", "skill2"]] of getMultiRobots()) { + console.log(primarySkillA); +} +for ([, [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { + console.log(primarySkillA); +} + +for ([numberB = -1] of robots) { + console.log(numberB); +} +for ([numberB = -1] of getRobots()) { + console.log(numberB); +} +for ([numberB = -1] of [robotA, robotB]) { + console.log(numberB); +} +for ([nameB = "noName"] of multiRobots) { + console.log(nameB); +} +for ([nameB = "noName"] of getMultiRobots()) { + console.log(nameB); +} +for ([nameB = "noName"] of [multiRobotA, multiRobotB]) { + console.log(nameB); +} + +for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { + console.log(nameA2); +} +for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { + console.log(nameA2); +} +for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) { + console.log(nameA2); +} +for ([nameMA = "noName", [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["skill1", "skill2"]] of multiRobots) { + console.log(nameMA); +} +for ([nameMA = "noName", [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["skill1", "skill2"]] of getMultiRobots()) { + console.log(nameMA); +} +for ([nameMA = "noName", [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { + console.log(nameMA); +} + +for ([numberA3 = -1, ...robotAInfo] of robots) { + console.log(numberA3); +} +for ([numberA3 = -1, ...robotAInfo] of getRobots()) { + console.log(numberA3); +} +for ([numberA3 = -1, ...robotAInfo] of [robotA, robotB]) { + console.log(numberA3); +} + +//// [sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.js] +var robotA = [1, "mower", "mowing"]; +var robotB = [2, "trimmer", "trimming"]; +var robots = [robotA, robotB]; +function getRobots() { + return robots; +} +var multiRobotA = ["mower", ["mowing", ""]]; +var multiRobotB = ["trimmer", ["trimming", "edging"]]; +var multiRobots = [multiRobotA, multiRobotB]; +function getMultiRobots() { + return multiRobots; +} +var nameA, primarySkillA, secondarySkillA; +var numberB, nameB; +var numberA2, nameA2, skillA2, nameMA; +var numberA3, robotAInfo, multiRobotAInfo; +for (var _i = 0, robots_1 = robots; _i < robots_1.length; _i++) { + _a = robots_1[_i], _b = _a[1], nameA = _b === void 0 ? "noName" : _b; + console.log(nameA); +} +for (var _c = 0, _d = getRobots(); _c < _d.length; _c++) { + _e = _d[_c], _f = _e[1], nameA = _f === void 0 ? "noName" : _f; + console.log(nameA); +} +for (var _g = 0, _h = [robotA, robotB]; _g < _h.length; _g++) { + _j = _h[_g], _k = _j[1], nameA = _k === void 0 ? "noName" : _k; + console.log(nameA); +} +for (var _l = 0, multiRobots_1 = multiRobots; _l < multiRobots_1.length; _l++) { + _m = multiRobots_1[_l], _o = _m[1], _p = _o === void 0 ? ["skill1", "skill2"] : _o, _q = _p[0], primarySkillA = _q === void 0 ? "primary" : _q, _r = _p[1], secondarySkillA = _r === void 0 ? "secondary" : _r; + console.log(primarySkillA); +} +for (var _s = 0, _t = getMultiRobots(); _s < _t.length; _s++) { + _u = _t[_s], _v = _u[1], _w = _v === void 0 ? ["skill1", "skill2"] : _v, _x = _w[0], primarySkillA = _x === void 0 ? "primary" : _x, _y = _w[1], secondarySkillA = _y === void 0 ? "secondary" : _y; + console.log(primarySkillA); +} +for (var _z = 0, _0 = [multiRobotA, multiRobotB]; _z < _0.length; _z++) { + _1 = _0[_z], _2 = _1[1], _3 = _2 === void 0 ? ["skill1", "skill2"] : _2, _4 = _3[0], primarySkillA = _4 === void 0 ? "primary" : _4, _5 = _3[1], secondarySkillA = _5 === void 0 ? "secondary" : _5; + console.log(primarySkillA); +} +for (var _6 = 0, robots_2 = robots; _6 < robots_2.length; _6++) { + _7 = robots_2[_6][0], numberB = _7 === void 0 ? -1 : _7; + console.log(numberB); +} +for (var _8 = 0, _9 = getRobots(); _8 < _9.length; _8++) { + _10 = _9[_8][0], numberB = _10 === void 0 ? -1 : _10; + console.log(numberB); +} +for (var _11 = 0, _12 = [robotA, robotB]; _11 < _12.length; _11++) { + _13 = _12[_11][0], numberB = _13 === void 0 ? -1 : _13; + console.log(numberB); +} +for (var _14 = 0, multiRobots_2 = multiRobots; _14 < multiRobots_2.length; _14++) { + _15 = multiRobots_2[_14][0], nameB = _15 === void 0 ? "noName" : _15; + console.log(nameB); +} +for (var _16 = 0, _17 = getMultiRobots(); _16 < _17.length; _16++) { + _18 = _17[_16][0], nameB = _18 === void 0 ? "noName" : _18; + console.log(nameB); +} +for (var _19 = 0, _20 = [multiRobotA, multiRobotB]; _19 < _20.length; _19++) { + _21 = _20[_19][0], nameB = _21 === void 0 ? "noName" : _21; + console.log(nameB); +} +for (var _22 = 0, robots_3 = robots; _22 < robots_3.length; _22++) { + _23 = robots_3[_22], _24 = _23[0], numberA2 = _24 === void 0 ? -1 : _24, _25 = _23[1], nameA2 = _25 === void 0 ? "noName" : _25, _26 = _23[2], skillA2 = _26 === void 0 ? "skill" : _26; + console.log(nameA2); +} +for (var _27 = 0, _28 = getRobots(); _27 < _28.length; _27++) { + _29 = _28[_27], _30 = _29[0], numberA2 = _30 === void 0 ? -1 : _30, _31 = _29[1], nameA2 = _31 === void 0 ? "noName" : _31, _32 = _29[2], skillA2 = _32 === void 0 ? "skill" : _32; + console.log(nameA2); +} +for (var _33 = 0, _34 = [robotA, robotB]; _33 < _34.length; _33++) { + _35 = _34[_33], _36 = _35[0], numberA2 = _36 === void 0 ? -1 : _36, _37 = _35[1], nameA2 = _37 === void 0 ? "noName" : _37, _38 = _35[2], skillA2 = _38 === void 0 ? "skill" : _38; + console.log(nameA2); +} +for (var _39 = 0, multiRobots_3 = multiRobots; _39 < multiRobots_3.length; _39++) { + _40 = multiRobots_3[_39], _41 = _40[0], nameMA = _41 === void 0 ? "noName" : _41, _42 = _40[1], _43 = _42 === void 0 ? ["skill1", "skill2"] : _42, _44 = _43[0], primarySkillA = _44 === void 0 ? "primary" : _44, _45 = _43[1], secondarySkillA = _45 === void 0 ? "secondary" : _45; + console.log(nameMA); +} +for (var _46 = 0, _47 = getMultiRobots(); _46 < _47.length; _46++) { + _48 = _47[_46], _49 = _48[0], nameMA = _49 === void 0 ? "noName" : _49, _50 = _48[1], _51 = _50 === void 0 ? ["skill1", "skill2"] : _50, _52 = _51[0], primarySkillA = _52 === void 0 ? "primary" : _52, _53 = _51[1], secondarySkillA = _53 === void 0 ? "secondary" : _53; + console.log(nameMA); +} +for (var _54 = 0, _55 = [multiRobotA, multiRobotB]; _54 < _55.length; _54++) { + _56 = _55[_54], _57 = _56[0], nameMA = _57 === void 0 ? "noName" : _57, _58 = _56[1], _59 = _58 === void 0 ? ["skill1", "skill2"] : _58, _60 = _59[0], primarySkillA = _60 === void 0 ? "primary" : _60, _61 = _59[1], secondarySkillA = _61 === void 0 ? "secondary" : _61; + console.log(nameMA); +} +for (var _62 = 0, robots_4 = robots; _62 < robots_4.length; _62++) { + _63 = robots_4[_62], _64 = _63[0], numberA3 = _64 === void 0 ? -1 : _64, robotAInfo = _63.slice(1); + console.log(numberA3); +} +for (var _65 = 0, _66 = getRobots(); _65 < _66.length; _65++) { + _67 = _66[_65], _68 = _67[0], numberA3 = _68 === void 0 ? -1 : _68, robotAInfo = _67.slice(1); + console.log(numberA3); +} +for (var _69 = 0, _70 = [robotA, robotB]; _69 < _70.length; _69++) { + _71 = _70[_69], _72 = _71[0], numberA3 = _72 === void 0 ? -1 : _72, robotAInfo = _71.slice(1); + console.log(numberA3); +} +var _a, _b, _e, _f, _j, _k, _m, _o, _p, _q, _r, _u, _v, _w, _x, _y, _1, _2, _3, _4, _5, _7, _10, _13, _15, _18, _21, _23, _24, _25, _26, _29, _30, _31, _32, _35, _36, _37, _38, _40, _41, _42, _43, _44, _45, _48, _49, _50, _51, _52, _53, _56, _57, _58, _59, _60, _61, _63, _64, _67, _68, _71, _72; +//# sourceMappingURL=sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.js.map new file mode 100644 index 00000000000..ccee72c33bf --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.js.map] +{"version":3,"file":"sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAC/C,IAAI,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9B;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED,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;AACzE,IAAI,WAAW,GAAG,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAC7C;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,IAAI,KAAa,EAAE,aAAqB,EAAE,eAAuB,CAAC;AAClE,IAAI,OAAe,EAAE,KAAa,CAAC;AACnC,IAAI,QAAgB,EAAE,MAAc,EAAE,OAAe,EAAE,MAAc,CAAC;AACtE,IAAI,QAAgB,EAAE,UAA+B,EAAE,eAA8C,CAAC;AAEtG,GAAG,CAAC,CAAyB,UAAM,EAAN,iBAAM,EAAN,oBAAM,EAAN,IAAM,CAAC;IAA/B,iBAAoB,EAAjB,UAAgB,EAAhB,qCAAgB;IACpB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CA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AAC,MAAM,CAAC,CAAC;CACvB;AAED,GAAG,CAAC,CAAmC,WAAM,EAAN,iBAAM,EAAN,qBAAM,EAAN,KAAM,CAAC;IAAzC,mBAA8B,EAA7B,YAAa,EAAb,oCAAa,EAAE,yBAAa;IAC9B,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;CACzB;AACD,GAAG,CAAC,CAAmC,WAAW,EAAX,MAAA,SAAS,EAAE,EAAX,gBAAW,EAAX,KAAW,CAAC;IAA9C,cAA8B,EAA7B,YAAa,EAAb,oCAAa,EAAE,yBAAa;IAC9B,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;CACzB;AACD,GAAG,CAAC,CAAmC,WAAgB,EAAhB,OAAC,MAAM,EAAE,MAAM,CAAC,EAAhB,gBAAgB,EAAhB,KAAgB,CAAC;IAAnD,cAA8B,EAA7B,YAAa,EAAb,oCAAa,EAAE,yBAAa;IAC9B,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;CACzB"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.sourcemap.txt new file mode 100644 index 00000000000..dc11eb52da9 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.sourcemap.txt @@ -0,0 +1,2853 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.js +mapUrl: sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.js.map +sourceRoot: +sources: sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.js +sourceFile:sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts +------------------------------------------------------------------- +>>>var robotA = [1, "mower", "mowing"]; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^^^^ +11> ^ +12> ^ +13> ^^^^^-> +1 >declare var console: { + > log(msg: any): void; + >} + >type Robot = [number, string, string]; + >type MultiSkilledRobot = [string, [string, string]]; + > + > +2 >let +3 > robotA +4 > : Robot = +5 > [ +6 > 1 +7 > , +8 > "mower" +9 > , +10> "mowing" +11> ] +12> ; +1 >Emitted(1, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(7, 5) + SourceIndex(0) +3 >Emitted(1, 11) Source(7, 11) + SourceIndex(0) +4 >Emitted(1, 14) Source(7, 21) + SourceIndex(0) +5 >Emitted(1, 15) Source(7, 22) + SourceIndex(0) +6 >Emitted(1, 16) Source(7, 23) + SourceIndex(0) +7 >Emitted(1, 18) Source(7, 25) + SourceIndex(0) +8 >Emitted(1, 25) Source(7, 32) + SourceIndex(0) +9 >Emitted(1, 27) Source(7, 34) + SourceIndex(0) +10>Emitted(1, 35) Source(7, 42) + SourceIndex(0) +11>Emitted(1, 36) Source(7, 43) + SourceIndex(0) +12>Emitted(1, 37) Source(7, 44) + SourceIndex(0) +--- +>>>var robotB = [2, "trimmer", "trimming"]; +1-> +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^ +11> ^ +12> ^ +1-> + > +2 >let +3 > robotB +4 > : Robot = +5 > [ +6 > 2 +7 > , +8 > "trimmer" +9 > , +10> "trimming" +11> ] +12> ; +1->Emitted(2, 1) Source(8, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(8, 5) + SourceIndex(0) +3 >Emitted(2, 11) Source(8, 11) + SourceIndex(0) +4 >Emitted(2, 14) Source(8, 21) + SourceIndex(0) +5 >Emitted(2, 15) Source(8, 22) + SourceIndex(0) +6 >Emitted(2, 16) Source(8, 23) + SourceIndex(0) +7 >Emitted(2, 18) Source(8, 25) + SourceIndex(0) +8 >Emitted(2, 27) Source(8, 34) + SourceIndex(0) +9 >Emitted(2, 29) Source(8, 36) + SourceIndex(0) +10>Emitted(2, 39) Source(8, 46) + SourceIndex(0) +11>Emitted(2, 40) Source(8, 47) + SourceIndex(0) +12>Emitted(2, 41) Source(8, 48) + SourceIndex(0) +--- +>>>var robots = [robotA, robotB]; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^^ +8 > ^^^^^^ +9 > ^ +10> ^ +1 > + > +2 >let +3 > robots +4 > = +5 > [ +6 > robotA +7 > , +8 > robotB +9 > ] +10> ; +1 >Emitted(3, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(9, 5) + SourceIndex(0) +3 >Emitted(3, 11) Source(9, 11) + SourceIndex(0) +4 >Emitted(3, 14) Source(9, 14) + SourceIndex(0) +5 >Emitted(3, 15) Source(9, 15) + SourceIndex(0) +6 >Emitted(3, 21) Source(9, 21) + SourceIndex(0) +7 >Emitted(3, 23) Source(9, 23) + SourceIndex(0) +8 >Emitted(3, 29) Source(9, 29) + SourceIndex(0) +9 >Emitted(3, 30) Source(9, 30) + SourceIndex(0) +10>Emitted(3, 31) Source(9, 31) + SourceIndex(0) +--- +>>>function getRobots() { +1 > +2 >^^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(4, 1) Source(10, 1) + SourceIndex(0) +--- +>>> return robots; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +1->function getRobots() { + > +2 > return +3 > +4 > robots +5 > ; +1->Emitted(5, 5) Source(11, 5) + SourceIndex(0) +2 >Emitted(5, 11) Source(11, 11) + SourceIndex(0) +3 >Emitted(5, 12) Source(11, 12) + SourceIndex(0) +4 >Emitted(5, 18) Source(11, 18) + SourceIndex(0) +5 >Emitted(5, 19) Source(11, 19) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(6, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(12, 2) + SourceIndex(0) +--- +>>>var multiRobotA = ["mower", ["mowing", ""]]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^ +10> ^^ +11> ^^ +12> ^ +13> ^ +14> ^ +15> ^^^^^^^^^^^-> +1-> + > + > +2 >let +3 > multiRobotA +4 > : MultiSkilledRobot = +5 > [ +6 > "mower" +7 > , +8 > [ +9 > "mowing" +10> , +11> "" +12> ] +13> ] +14> ; +1->Emitted(7, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(7, 5) Source(14, 5) + SourceIndex(0) +3 >Emitted(7, 16) Source(14, 16) + SourceIndex(0) +4 >Emitted(7, 19) Source(14, 38) + SourceIndex(0) +5 >Emitted(7, 20) Source(14, 39) + SourceIndex(0) +6 >Emitted(7, 27) Source(14, 46) + SourceIndex(0) +7 >Emitted(7, 29) Source(14, 48) + SourceIndex(0) +8 >Emitted(7, 30) Source(14, 49) + SourceIndex(0) +9 >Emitted(7, 38) Source(14, 57) + SourceIndex(0) +10>Emitted(7, 40) Source(14, 59) + SourceIndex(0) +11>Emitted(7, 42) Source(14, 61) + SourceIndex(0) +12>Emitted(7, 43) Source(14, 62) + SourceIndex(0) +13>Emitted(7, 44) Source(14, 63) + SourceIndex(0) +14>Emitted(7, 45) Source(14, 64) + SourceIndex(0) +--- +>>>var multiRobotB = ["trimmer", ["trimming", "edging"]]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^ +12> ^ +13> ^ +14> ^ +1-> + > +2 >let +3 > multiRobotB +4 > : MultiSkilledRobot = +5 > [ +6 > "trimmer" +7 > , +8 > [ +9 > "trimming" +10> , +11> "edging" +12> ] +13> ] +14> ; +1->Emitted(8, 1) Source(15, 1) + SourceIndex(0) +2 >Emitted(8, 5) Source(15, 5) + SourceIndex(0) +3 >Emitted(8, 16) Source(15, 16) + SourceIndex(0) +4 >Emitted(8, 19) Source(15, 38) + SourceIndex(0) +5 >Emitted(8, 20) Source(15, 39) + SourceIndex(0) +6 >Emitted(8, 29) Source(15, 48) + SourceIndex(0) +7 >Emitted(8, 31) Source(15, 50) + SourceIndex(0) +8 >Emitted(8, 32) Source(15, 51) + SourceIndex(0) +9 >Emitted(8, 42) Source(15, 61) + SourceIndex(0) +10>Emitted(8, 44) Source(15, 63) + SourceIndex(0) +11>Emitted(8, 52) Source(15, 71) + SourceIndex(0) +12>Emitted(8, 53) Source(15, 72) + SourceIndex(0) +13>Emitted(8, 54) Source(15, 73) + SourceIndex(0) +14>Emitted(8, 55) Source(15, 74) + SourceIndex(0) +--- +>>>var multiRobots = [multiRobotA, multiRobotB]; +1 > +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^ +9 > ^ +10> ^ +1 > + > +2 >let +3 > multiRobots +4 > = +5 > [ +6 > multiRobotA +7 > , +8 > multiRobotB +9 > ] +10> ; +1 >Emitted(9, 1) Source(16, 1) + SourceIndex(0) +2 >Emitted(9, 5) Source(16, 5) + SourceIndex(0) +3 >Emitted(9, 16) Source(16, 16) + SourceIndex(0) +4 >Emitted(9, 19) Source(16, 19) + SourceIndex(0) +5 >Emitted(9, 20) Source(16, 20) + SourceIndex(0) +6 >Emitted(9, 31) Source(16, 31) + SourceIndex(0) +7 >Emitted(9, 33) Source(16, 33) + SourceIndex(0) +8 >Emitted(9, 44) Source(16, 44) + SourceIndex(0) +9 >Emitted(9, 45) Source(16, 45) + SourceIndex(0) +10>Emitted(9, 46) Source(16, 46) + SourceIndex(0) +--- +>>>function getMultiRobots() { +1 > +2 >^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(10, 1) Source(17, 1) + SourceIndex(0) +--- +>>> return multiRobots; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^ +5 > ^ +1->function getMultiRobots() { + > +2 > return +3 > +4 > multiRobots +5 > ; +1->Emitted(11, 5) Source(18, 5) + SourceIndex(0) +2 >Emitted(11, 11) Source(18, 11) + SourceIndex(0) +3 >Emitted(11, 12) Source(18, 12) + SourceIndex(0) +4 >Emitted(11, 23) Source(18, 23) + SourceIndex(0) +5 >Emitted(11, 24) Source(18, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(12, 1) Source(19, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(19, 2) + SourceIndex(0) +--- +>>>var nameA, primarySkillA, secondarySkillA; +1-> +2 >^^^^ +3 > ^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^ +8 > ^ +1-> + > + > +2 >let +3 > nameA: string +4 > , +5 > primarySkillA: string +6 > , +7 > secondarySkillA: string +8 > ; +1->Emitted(13, 1) Source(21, 1) + SourceIndex(0) +2 >Emitted(13, 5) Source(21, 5) + SourceIndex(0) +3 >Emitted(13, 10) Source(21, 18) + SourceIndex(0) +4 >Emitted(13, 12) Source(21, 20) + SourceIndex(0) +5 >Emitted(13, 25) Source(21, 41) + SourceIndex(0) +6 >Emitted(13, 27) Source(21, 43) + SourceIndex(0) +7 >Emitted(13, 42) Source(21, 66) + SourceIndex(0) +8 >Emitted(13, 43) Source(21, 67) + SourceIndex(0) +--- +>>>var numberB, nameB; +1 > +2 >^^^^ +3 > ^^^^^^^ +4 > ^^ +5 > ^^^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >let +3 > numberB: number +4 > , +5 > nameB: string +6 > ; +1 >Emitted(14, 1) Source(22, 1) + SourceIndex(0) +2 >Emitted(14, 5) Source(22, 5) + SourceIndex(0) +3 >Emitted(14, 12) Source(22, 20) + SourceIndex(0) +4 >Emitted(14, 14) Source(22, 22) + SourceIndex(0) +5 >Emitted(14, 19) Source(22, 35) + SourceIndex(0) +6 >Emitted(14, 20) Source(22, 36) + SourceIndex(0) +--- +>>>var numberA2, nameA2, skillA2, nameMA; +1-> +2 >^^^^ +3 > ^^^^^^^^ +4 > ^^ +5 > ^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^ +9 > ^^^^^^ +10> ^ +11> ^^^^^-> +1-> + > +2 >let +3 > numberA2: number +4 > , +5 > nameA2: string +6 > , +7 > skillA2: string +8 > , +9 > nameMA: string +10> ; +1->Emitted(15, 1) Source(23, 1) + SourceIndex(0) +2 >Emitted(15, 5) Source(23, 5) + SourceIndex(0) +3 >Emitted(15, 13) Source(23, 21) + SourceIndex(0) +4 >Emitted(15, 15) Source(23, 23) + SourceIndex(0) +5 >Emitted(15, 21) Source(23, 37) + SourceIndex(0) +6 >Emitted(15, 23) Source(23, 39) + SourceIndex(0) +7 >Emitted(15, 30) Source(23, 54) + SourceIndex(0) +8 >Emitted(15, 32) Source(23, 56) + SourceIndex(0) +9 >Emitted(15, 38) Source(23, 70) + SourceIndex(0) +10>Emitted(15, 39) Source(23, 71) + SourceIndex(0) +--- +>>>var numberA3, robotAInfo, multiRobotAInfo; +1-> +2 >^^^^ +3 > ^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^ +8 > ^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >let +3 > numberA3: number +4 > , +5 > robotAInfo: (number | string)[] +6 > , +7 > multiRobotAInfo: (string | [string, string])[] +8 > ; +1->Emitted(16, 1) Source(24, 1) + SourceIndex(0) +2 >Emitted(16, 5) Source(24, 5) + SourceIndex(0) +3 >Emitted(16, 13) Source(24, 21) + SourceIndex(0) +4 >Emitted(16, 15) Source(24, 23) + SourceIndex(0) +5 >Emitted(16, 25) Source(24, 54) + SourceIndex(0) +6 >Emitted(16, 27) Source(24, 56) + SourceIndex(0) +7 >Emitted(16, 42) Source(24, 102) + SourceIndex(0) +8 >Emitted(16, 43) Source(24, 103) + SourceIndex(0) +--- +>>>for (var _i = 0, robots_1 = robots; _i < robots_1.length; _i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +13> ^^^^^^^^^^^-> +1-> + > + > +2 >for +3 > +4 > ([, nameA = "noName"] of +5 > robots +6 > +7 > robots +8 > +9 > robots +10> +11> robots +12> ) +1->Emitted(17, 1) Source(26, 1) + SourceIndex(0) +2 >Emitted(17, 4) Source(26, 4) + SourceIndex(0) +3 >Emitted(17, 5) Source(26, 5) + SourceIndex(0) +4 >Emitted(17, 6) Source(26, 30) + SourceIndex(0) +5 >Emitted(17, 16) Source(26, 36) + SourceIndex(0) +6 >Emitted(17, 18) Source(26, 30) + SourceIndex(0) +7 >Emitted(17, 35) Source(26, 36) + SourceIndex(0) +8 >Emitted(17, 37) Source(26, 30) + SourceIndex(0) +9 >Emitted(17, 57) Source(26, 36) + SourceIndex(0) +10>Emitted(17, 59) Source(26, 30) + SourceIndex(0) +11>Emitted(17, 63) Source(26, 36) + SourceIndex(0) +12>Emitted(17, 64) Source(26, 37) + SourceIndex(0) +--- +>>> _a = robots_1[_i], _b = _a[1], nameA = _b === void 0 ? "noName" : _b; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [, nameA = "noName"] +3 > +4 > nameA = "noName" +5 > +6 > nameA = "noName" +1->Emitted(18, 5) Source(26, 6) + SourceIndex(0) +2 >Emitted(18, 22) Source(26, 26) + SourceIndex(0) +3 >Emitted(18, 24) Source(26, 9) + SourceIndex(0) +4 >Emitted(18, 34) Source(26, 25) + SourceIndex(0) +5 >Emitted(18, 36) Source(26, 9) + SourceIndex(0) +6 >Emitted(18, 73) Source(26, 25) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 >] of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(19, 5) Source(27, 5) + SourceIndex(0) +2 >Emitted(19, 12) Source(27, 12) + SourceIndex(0) +3 >Emitted(19, 13) Source(27, 13) + SourceIndex(0) +4 >Emitted(19, 16) Source(27, 16) + SourceIndex(0) +5 >Emitted(19, 17) Source(27, 17) + SourceIndex(0) +6 >Emitted(19, 22) Source(27, 22) + SourceIndex(0) +7 >Emitted(19, 23) Source(27, 23) + SourceIndex(0) +8 >Emitted(19, 24) Source(27, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(20, 2) Source(28, 2) + SourceIndex(0) +--- +>>>for (var _c = 0, _d = getRobots(); _c < _d.length; _c++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +15> ^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ([, nameA = "noName"] of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> getRobots() +12> +13> getRobots() +14> ) +1->Emitted(21, 1) Source(29, 1) + SourceIndex(0) +2 >Emitted(21, 4) Source(29, 4) + SourceIndex(0) +3 >Emitted(21, 5) Source(29, 5) + SourceIndex(0) +4 >Emitted(21, 6) Source(29, 30) + SourceIndex(0) +5 >Emitted(21, 16) Source(29, 41) + SourceIndex(0) +6 >Emitted(21, 18) Source(29, 30) + SourceIndex(0) +7 >Emitted(21, 23) Source(29, 30) + SourceIndex(0) +8 >Emitted(21, 32) Source(29, 39) + SourceIndex(0) +9 >Emitted(21, 34) Source(29, 41) + SourceIndex(0) +10>Emitted(21, 36) Source(29, 30) + SourceIndex(0) +11>Emitted(21, 50) Source(29, 41) + SourceIndex(0) +12>Emitted(21, 52) Source(29, 30) + SourceIndex(0) +13>Emitted(21, 56) Source(29, 41) + SourceIndex(0) +14>Emitted(21, 57) Source(29, 42) + SourceIndex(0) +--- +>>> _e = _d[_c], _f = _e[1], nameA = _f === void 0 ? "noName" : _f; +1->^^^^ +2 > ^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [, nameA = "noName"] +3 > +4 > nameA = "noName" +5 > +6 > nameA = "noName" +1->Emitted(22, 5) Source(29, 6) + SourceIndex(0) +2 >Emitted(22, 16) Source(29, 26) + SourceIndex(0) +3 >Emitted(22, 18) Source(29, 9) + SourceIndex(0) +4 >Emitted(22, 28) Source(29, 25) + SourceIndex(0) +5 >Emitted(22, 30) Source(29, 9) + SourceIndex(0) +6 >Emitted(22, 67) Source(29, 25) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 >] of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(23, 5) Source(30, 5) + SourceIndex(0) +2 >Emitted(23, 12) Source(30, 12) + SourceIndex(0) +3 >Emitted(23, 13) Source(30, 13) + SourceIndex(0) +4 >Emitted(23, 16) Source(30, 16) + SourceIndex(0) +5 >Emitted(23, 17) Source(30, 17) + SourceIndex(0) +6 >Emitted(23, 22) Source(30, 22) + SourceIndex(0) +7 >Emitted(23, 23) Source(30, 23) + SourceIndex(0) +8 >Emitted(23, 24) Source(30, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(24, 2) Source(31, 2) + SourceIndex(0) +--- +>>>for (var _g = 0, _h = [robotA, robotB]; _g < _h.length; _g++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^ +16> ^ +17> ^^^^^^^-> +1-> + > +2 >for +3 > +4 > ([, nameA = "noName"] of +5 > [robotA, robotB] +6 > +7 > [ +8 > robotA +9 > , +10> robotB +11> ] +12> +13> [robotA, robotB] +14> +15> [robotA, robotB] +16> ) +1->Emitted(25, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(25, 4) Source(32, 4) + SourceIndex(0) +3 >Emitted(25, 5) Source(32, 5) + SourceIndex(0) +4 >Emitted(25, 6) Source(32, 30) + SourceIndex(0) +5 >Emitted(25, 16) Source(32, 46) + SourceIndex(0) +6 >Emitted(25, 18) Source(32, 30) + SourceIndex(0) +7 >Emitted(25, 24) Source(32, 31) + SourceIndex(0) +8 >Emitted(25, 30) Source(32, 37) + SourceIndex(0) +9 >Emitted(25, 32) Source(32, 39) + SourceIndex(0) +10>Emitted(25, 38) Source(32, 45) + SourceIndex(0) +11>Emitted(25, 39) Source(32, 46) + SourceIndex(0) +12>Emitted(25, 41) Source(32, 30) + SourceIndex(0) +13>Emitted(25, 55) Source(32, 46) + SourceIndex(0) +14>Emitted(25, 57) Source(32, 30) + SourceIndex(0) +15>Emitted(25, 61) Source(32, 46) + SourceIndex(0) +16>Emitted(25, 62) Source(32, 47) + SourceIndex(0) +--- +>>> _j = _h[_g], _k = _j[1], nameA = _k === void 0 ? "noName" : _k; +1->^^^^ +2 > ^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [, nameA = "noName"] +3 > +4 > nameA = "noName" +5 > +6 > nameA = "noName" +1->Emitted(26, 5) Source(32, 6) + SourceIndex(0) +2 >Emitted(26, 16) Source(32, 26) + SourceIndex(0) +3 >Emitted(26, 18) Source(32, 9) + SourceIndex(0) +4 >Emitted(26, 28) Source(32, 25) + SourceIndex(0) +5 >Emitted(26, 30) Source(32, 9) + SourceIndex(0) +6 >Emitted(26, 67) Source(32, 25) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 >] of [robotA, robotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(27, 5) Source(33, 5) + SourceIndex(0) +2 >Emitted(27, 12) Source(33, 12) + SourceIndex(0) +3 >Emitted(27, 13) Source(33, 13) + SourceIndex(0) +4 >Emitted(27, 16) Source(33, 16) + SourceIndex(0) +5 >Emitted(27, 17) Source(33, 17) + SourceIndex(0) +6 >Emitted(27, 22) Source(33, 22) + SourceIndex(0) +7 >Emitted(27, 23) Source(33, 23) + SourceIndex(0) +8 >Emitted(27, 24) Source(33, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(28, 2) Source(34, 2) + SourceIndex(0) +--- +>>>for (var _l = 0, multiRobots_1 = multiRobots; _l < multiRobots_1.length; _l++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ([, [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"]] of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > multiRobots +10> +11> multiRobots +12> ) +1->Emitted(29, 1) Source(35, 1) + SourceIndex(0) +2 >Emitted(29, 4) Source(35, 4) + SourceIndex(0) +3 >Emitted(29, 5) Source(35, 5) + SourceIndex(0) +4 >Emitted(29, 6) Source(38, 30) + SourceIndex(0) +5 >Emitted(29, 16) Source(38, 41) + SourceIndex(0) +6 >Emitted(29, 18) Source(38, 30) + SourceIndex(0) +7 >Emitted(29, 45) Source(38, 41) + SourceIndex(0) +8 >Emitted(29, 47) Source(38, 30) + SourceIndex(0) +9 >Emitted(29, 72) Source(38, 41) + SourceIndex(0) +10>Emitted(29, 74) Source(38, 30) + SourceIndex(0) +11>Emitted(29, 78) Source(38, 41) + SourceIndex(0) +12>Emitted(29, 79) Source(38, 42) + SourceIndex(0) +--- +>>> _m = multiRobots_1[_l], _o = _m[1], _p = _o === void 0 ? ["skill1", "skill2"] : _o, _q = _p[0], primarySkillA = _q === void 0 ? "primary" : _q, _r = _p[1], secondarySkillA = _r === void 0 ? "secondary" : _r; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [, [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"]] +3 > +4 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"] +5 > +6 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"] +7 > +8 > primarySkillA = "primary" +9 > +10> primarySkillA = "primary" +11> , + > +12> secondarySkillA = "secondary" +13> +14> secondarySkillA = "secondary" +1->Emitted(30, 5) Source(35, 6) + SourceIndex(0) +2 >Emitted(30, 27) Source(38, 26) + SourceIndex(0) +3 >Emitted(30, 29) Source(35, 9) + SourceIndex(0) +4 >Emitted(30, 39) Source(38, 25) + SourceIndex(0) +5 >Emitted(30, 41) Source(35, 9) + SourceIndex(0) +6 >Emitted(30, 87) Source(38, 25) + SourceIndex(0) +7 >Emitted(30, 89) Source(36, 5) + SourceIndex(0) +8 >Emitted(30, 99) Source(36, 30) + SourceIndex(0) +9 >Emitted(30, 101) Source(36, 5) + SourceIndex(0) +10>Emitted(30, 147) Source(36, 30) + SourceIndex(0) +11>Emitted(30, 149) Source(37, 5) + SourceIndex(0) +12>Emitted(30, 159) Source(37, 34) + SourceIndex(0) +13>Emitted(30, 161) Source(37, 5) + SourceIndex(0) +14>Emitted(30, 211) Source(37, 34) + SourceIndex(0) +--- +>>> console.log(primarySkillA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > + >] = ["skill1", "skill2"]] of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primarySkillA +7 > ) +8 > ; +1 >Emitted(31, 5) Source(39, 5) + SourceIndex(0) +2 >Emitted(31, 12) Source(39, 12) + SourceIndex(0) +3 >Emitted(31, 13) Source(39, 13) + SourceIndex(0) +4 >Emitted(31, 16) Source(39, 16) + SourceIndex(0) +5 >Emitted(31, 17) Source(39, 17) + SourceIndex(0) +6 >Emitted(31, 30) Source(39, 30) + SourceIndex(0) +7 >Emitted(31, 31) Source(39, 31) + SourceIndex(0) +8 >Emitted(31, 32) Source(39, 32) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(32, 2) Source(40, 2) + SourceIndex(0) +--- +>>>for (var _s = 0, _t = getMultiRobots(); _s < _t.length; _s++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ([, [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"]] of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> getMultiRobots() +12> +13> getMultiRobots() +14> ) +1->Emitted(33, 1) Source(41, 1) + SourceIndex(0) +2 >Emitted(33, 4) Source(41, 4) + SourceIndex(0) +3 >Emitted(33, 5) Source(41, 5) + SourceIndex(0) +4 >Emitted(33, 6) Source(44, 30) + SourceIndex(0) +5 >Emitted(33, 16) Source(44, 46) + SourceIndex(0) +6 >Emitted(33, 18) Source(44, 30) + SourceIndex(0) +7 >Emitted(33, 23) Source(44, 30) + SourceIndex(0) +8 >Emitted(33, 37) Source(44, 44) + SourceIndex(0) +9 >Emitted(33, 39) Source(44, 46) + SourceIndex(0) +10>Emitted(33, 41) Source(44, 30) + SourceIndex(0) +11>Emitted(33, 55) Source(44, 46) + SourceIndex(0) +12>Emitted(33, 57) Source(44, 30) + SourceIndex(0) +13>Emitted(33, 61) Source(44, 46) + SourceIndex(0) +14>Emitted(33, 62) Source(44, 47) + SourceIndex(0) +--- +>>> _u = _t[_s], _v = _u[1], _w = _v === void 0 ? ["skill1", "skill2"] : _v, _x = _w[0], primarySkillA = _x === void 0 ? "primary" : _x, _y = _w[1], secondarySkillA = _y === void 0 ? "secondary" : _y; +1->^^^^ +2 > ^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [, [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"]] +3 > +4 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"] +5 > +6 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"] +7 > +8 > primarySkillA = "primary" +9 > +10> primarySkillA = "primary" +11> , + > +12> secondarySkillA = "secondary" +13> +14> secondarySkillA = "secondary" +1->Emitted(34, 5) Source(41, 6) + SourceIndex(0) +2 >Emitted(34, 16) Source(44, 26) + SourceIndex(0) +3 >Emitted(34, 18) Source(41, 9) + SourceIndex(0) +4 >Emitted(34, 28) Source(44, 25) + SourceIndex(0) +5 >Emitted(34, 30) Source(41, 9) + SourceIndex(0) +6 >Emitted(34, 76) Source(44, 25) + SourceIndex(0) +7 >Emitted(34, 78) Source(42, 5) + SourceIndex(0) +8 >Emitted(34, 88) Source(42, 30) + SourceIndex(0) +9 >Emitted(34, 90) Source(42, 5) + SourceIndex(0) +10>Emitted(34, 136) Source(42, 30) + SourceIndex(0) +11>Emitted(34, 138) Source(43, 5) + SourceIndex(0) +12>Emitted(34, 148) Source(43, 34) + SourceIndex(0) +13>Emitted(34, 150) Source(43, 5) + SourceIndex(0) +14>Emitted(34, 200) Source(43, 34) + SourceIndex(0) +--- +>>> console.log(primarySkillA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > + >] = ["skill1", "skill2"]] of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primarySkillA +7 > ) +8 > ; +1 >Emitted(35, 5) Source(45, 5) + SourceIndex(0) +2 >Emitted(35, 12) Source(45, 12) + SourceIndex(0) +3 >Emitted(35, 13) Source(45, 13) + SourceIndex(0) +4 >Emitted(35, 16) Source(45, 16) + SourceIndex(0) +5 >Emitted(35, 17) Source(45, 17) + SourceIndex(0) +6 >Emitted(35, 30) Source(45, 30) + SourceIndex(0) +7 >Emitted(35, 31) Source(45, 31) + SourceIndex(0) +8 >Emitted(35, 32) Source(45, 32) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(36, 2) Source(46, 2) + SourceIndex(0) +--- +>>>for (var _z = 0, _0 = [multiRobotA, multiRobotB]; _z < _0.length; _z++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^ +16> ^ +17> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ([, [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"]] of +5 > [multiRobotA, multiRobotB] +6 > +7 > [ +8 > multiRobotA +9 > , +10> multiRobotB +11> ] +12> +13> [multiRobotA, multiRobotB] +14> +15> [multiRobotA, multiRobotB] +16> ) +1->Emitted(37, 1) Source(47, 1) + SourceIndex(0) +2 >Emitted(37, 4) Source(47, 4) + SourceIndex(0) +3 >Emitted(37, 5) Source(47, 5) + SourceIndex(0) +4 >Emitted(37, 6) Source(50, 30) + SourceIndex(0) +5 >Emitted(37, 16) Source(50, 56) + SourceIndex(0) +6 >Emitted(37, 18) Source(50, 30) + SourceIndex(0) +7 >Emitted(37, 24) Source(50, 31) + SourceIndex(0) +8 >Emitted(37, 35) Source(50, 42) + SourceIndex(0) +9 >Emitted(37, 37) Source(50, 44) + SourceIndex(0) +10>Emitted(37, 48) Source(50, 55) + SourceIndex(0) +11>Emitted(37, 49) Source(50, 56) + SourceIndex(0) +12>Emitted(37, 51) Source(50, 30) + SourceIndex(0) +13>Emitted(37, 65) Source(50, 56) + SourceIndex(0) +14>Emitted(37, 67) Source(50, 30) + SourceIndex(0) +15>Emitted(37, 71) Source(50, 56) + SourceIndex(0) +16>Emitted(37, 72) Source(50, 57) + SourceIndex(0) +--- +>>> _1 = _0[_z], _2 = _1[1], _3 = _2 === void 0 ? ["skill1", "skill2"] : _2, _4 = _3[0], primarySkillA = _4 === void 0 ? "primary" : _4, _5 = _3[1], secondarySkillA = _5 === void 0 ? "secondary" : _5; +1->^^^^ +2 > ^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [, [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"]] +3 > +4 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"] +5 > +6 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"] +7 > +8 > primarySkillA = "primary" +9 > +10> primarySkillA = "primary" +11> , + > +12> secondarySkillA = "secondary" +13> +14> secondarySkillA = "secondary" +1->Emitted(38, 5) Source(47, 6) + SourceIndex(0) +2 >Emitted(38, 16) Source(50, 26) + SourceIndex(0) +3 >Emitted(38, 18) Source(47, 9) + SourceIndex(0) +4 >Emitted(38, 28) Source(50, 25) + SourceIndex(0) +5 >Emitted(38, 30) Source(47, 9) + SourceIndex(0) +6 >Emitted(38, 76) Source(50, 25) + SourceIndex(0) +7 >Emitted(38, 78) Source(48, 5) + SourceIndex(0) +8 >Emitted(38, 88) Source(48, 30) + SourceIndex(0) +9 >Emitted(38, 90) Source(48, 5) + SourceIndex(0) +10>Emitted(38, 136) Source(48, 30) + SourceIndex(0) +11>Emitted(38, 138) Source(49, 5) + SourceIndex(0) +12>Emitted(38, 148) Source(49, 34) + SourceIndex(0) +13>Emitted(38, 150) Source(49, 5) + SourceIndex(0) +14>Emitted(38, 200) Source(49, 34) + SourceIndex(0) +--- +>>> console.log(primarySkillA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > + >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primarySkillA +7 > ) +8 > ; +1 >Emitted(39, 5) Source(51, 5) + SourceIndex(0) +2 >Emitted(39, 12) Source(51, 12) + SourceIndex(0) +3 >Emitted(39, 13) Source(51, 13) + SourceIndex(0) +4 >Emitted(39, 16) Source(51, 16) + SourceIndex(0) +5 >Emitted(39, 17) Source(51, 17) + SourceIndex(0) +6 >Emitted(39, 30) Source(51, 30) + SourceIndex(0) +7 >Emitted(39, 31) Source(51, 31) + SourceIndex(0) +8 >Emitted(39, 32) Source(51, 32) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(40, 2) Source(52, 2) + SourceIndex(0) +--- +>>>for (var _6 = 0, robots_2 = robots; _6 < robots_2.length; _6++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +1-> + > + > +2 >for +3 > +4 > ([numberB = -1] of +5 > robots +6 > +7 > robots +8 > +9 > robots +10> +11> robots +12> ) +1->Emitted(41, 1) Source(54, 1) + SourceIndex(0) +2 >Emitted(41, 4) Source(54, 4) + SourceIndex(0) +3 >Emitted(41, 5) Source(54, 5) + SourceIndex(0) +4 >Emitted(41, 6) Source(54, 24) + SourceIndex(0) +5 >Emitted(41, 16) Source(54, 30) + SourceIndex(0) +6 >Emitted(41, 18) Source(54, 24) + SourceIndex(0) +7 >Emitted(41, 35) Source(54, 30) + SourceIndex(0) +8 >Emitted(41, 37) Source(54, 24) + SourceIndex(0) +9 >Emitted(41, 57) Source(54, 30) + SourceIndex(0) +10>Emitted(41, 59) Source(54, 24) + SourceIndex(0) +11>Emitted(41, 63) Source(54, 30) + SourceIndex(0) +12>Emitted(41, 64) Source(54, 31) + SourceIndex(0) +--- +>>> _7 = robots_2[_6][0], numberB = _7 === void 0 ? -1 : _7; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > numberB = -1 +3 > +4 > numberB = -1 +1 >Emitted(42, 5) Source(54, 7) + SourceIndex(0) +2 >Emitted(42, 25) Source(54, 19) + SourceIndex(0) +3 >Emitted(42, 27) Source(54, 7) + SourceIndex(0) +4 >Emitted(42, 60) Source(54, 19) + SourceIndex(0) +--- +>>> console.log(numberB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1 >] of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > numberB +7 > ) +8 > ; +1 >Emitted(43, 5) Source(55, 5) + SourceIndex(0) +2 >Emitted(43, 12) Source(55, 12) + SourceIndex(0) +3 >Emitted(43, 13) Source(55, 13) + SourceIndex(0) +4 >Emitted(43, 16) Source(55, 16) + SourceIndex(0) +5 >Emitted(43, 17) Source(55, 17) + SourceIndex(0) +6 >Emitted(43, 24) Source(55, 24) + SourceIndex(0) +7 >Emitted(43, 25) Source(55, 25) + SourceIndex(0) +8 >Emitted(43, 26) Source(55, 26) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(44, 2) Source(56, 2) + SourceIndex(0) +--- +>>>for (var _8 = 0, _9 = getRobots(); _8 < _9.length; _8++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +15> ^^-> +1-> + > +2 >for +3 > +4 > ([numberB = -1] of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> getRobots() +12> +13> getRobots() +14> ) +1->Emitted(45, 1) Source(57, 1) + SourceIndex(0) +2 >Emitted(45, 4) Source(57, 4) + SourceIndex(0) +3 >Emitted(45, 5) Source(57, 5) + SourceIndex(0) +4 >Emitted(45, 6) Source(57, 24) + SourceIndex(0) +5 >Emitted(45, 16) Source(57, 35) + SourceIndex(0) +6 >Emitted(45, 18) Source(57, 24) + SourceIndex(0) +7 >Emitted(45, 23) Source(57, 24) + SourceIndex(0) +8 >Emitted(45, 32) Source(57, 33) + SourceIndex(0) +9 >Emitted(45, 34) Source(57, 35) + SourceIndex(0) +10>Emitted(45, 36) Source(57, 24) + SourceIndex(0) +11>Emitted(45, 50) Source(57, 35) + SourceIndex(0) +12>Emitted(45, 52) Source(57, 24) + SourceIndex(0) +13>Emitted(45, 56) Source(57, 35) + SourceIndex(0) +14>Emitted(45, 57) Source(57, 36) + SourceIndex(0) +--- +>>> _10 = _9[_8][0], numberB = _10 === void 0 ? -1 : _10; +1->^^^^ +2 > ^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > numberB = -1 +3 > +4 > numberB = -1 +1->Emitted(46, 5) Source(57, 7) + SourceIndex(0) +2 >Emitted(46, 20) Source(57, 19) + SourceIndex(0) +3 >Emitted(46, 22) Source(57, 7) + SourceIndex(0) +4 >Emitted(46, 57) Source(57, 19) + SourceIndex(0) +--- +>>> console.log(numberB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1 >] of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > numberB +7 > ) +8 > ; +1 >Emitted(47, 5) Source(58, 5) + SourceIndex(0) +2 >Emitted(47, 12) Source(58, 12) + SourceIndex(0) +3 >Emitted(47, 13) Source(58, 13) + SourceIndex(0) +4 >Emitted(47, 16) Source(58, 16) + SourceIndex(0) +5 >Emitted(47, 17) Source(58, 17) + SourceIndex(0) +6 >Emitted(47, 24) Source(58, 24) + SourceIndex(0) +7 >Emitted(47, 25) Source(58, 25) + SourceIndex(0) +8 >Emitted(47, 26) Source(58, 26) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(48, 2) Source(59, 2) + SourceIndex(0) +--- +>>>for (var _11 = 0, _12 = [robotA, robotB]; _11 < _12.length; _11++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^^ +16> ^ +1-> + > +2 >for +3 > +4 > ([numberB = -1] of +5 > [robotA, robotB] +6 > +7 > [ +8 > robotA +9 > , +10> robotB +11> ] +12> +13> [robotA, robotB] +14> +15> [robotA, robotB] +16> ) +1->Emitted(49, 1) Source(60, 1) + SourceIndex(0) +2 >Emitted(49, 4) Source(60, 4) + SourceIndex(0) +3 >Emitted(49, 5) Source(60, 5) + SourceIndex(0) +4 >Emitted(49, 6) Source(60, 24) + SourceIndex(0) +5 >Emitted(49, 17) Source(60, 40) + SourceIndex(0) +6 >Emitted(49, 19) Source(60, 24) + SourceIndex(0) +7 >Emitted(49, 26) Source(60, 25) + SourceIndex(0) +8 >Emitted(49, 32) Source(60, 31) + SourceIndex(0) +9 >Emitted(49, 34) Source(60, 33) + SourceIndex(0) +10>Emitted(49, 40) Source(60, 39) + SourceIndex(0) +11>Emitted(49, 41) Source(60, 40) + SourceIndex(0) +12>Emitted(49, 43) Source(60, 24) + SourceIndex(0) +13>Emitted(49, 59) Source(60, 40) + SourceIndex(0) +14>Emitted(49, 61) Source(60, 24) + SourceIndex(0) +15>Emitted(49, 66) Source(60, 40) + SourceIndex(0) +16>Emitted(49, 67) Source(60, 41) + SourceIndex(0) +--- +>>> _13 = _12[_11][0], numberB = _13 === void 0 ? -1 : _13; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > numberB = -1 +3 > +4 > numberB = -1 +1 >Emitted(50, 5) Source(60, 7) + SourceIndex(0) +2 >Emitted(50, 22) Source(60, 19) + SourceIndex(0) +3 >Emitted(50, 24) Source(60, 7) + SourceIndex(0) +4 >Emitted(50, 59) Source(60, 19) + SourceIndex(0) +--- +>>> console.log(numberB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1 >] of [robotA, robotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > numberB +7 > ) +8 > ; +1 >Emitted(51, 5) Source(61, 5) + SourceIndex(0) +2 >Emitted(51, 12) Source(61, 12) + SourceIndex(0) +3 >Emitted(51, 13) Source(61, 13) + SourceIndex(0) +4 >Emitted(51, 16) Source(61, 16) + SourceIndex(0) +5 >Emitted(51, 17) Source(61, 17) + SourceIndex(0) +6 >Emitted(51, 24) Source(61, 24) + SourceIndex(0) +7 >Emitted(51, 25) Source(61, 25) + SourceIndex(0) +8 >Emitted(51, 26) Source(61, 26) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(52, 2) Source(62, 2) + SourceIndex(0) +--- +>>>for (var _14 = 0, multiRobots_2 = multiRobots; _14 < multiRobots_2.length; _14++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^ +12> ^ +1-> + > +2 >for +3 > +4 > ([nameB = "noName"] of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > multiRobots +10> +11> multiRobots +12> ) +1->Emitted(53, 1) Source(63, 1) + SourceIndex(0) +2 >Emitted(53, 4) Source(63, 4) + SourceIndex(0) +3 >Emitted(53, 5) Source(63, 5) + SourceIndex(0) +4 >Emitted(53, 6) Source(63, 28) + SourceIndex(0) +5 >Emitted(53, 17) Source(63, 39) + SourceIndex(0) +6 >Emitted(53, 19) Source(63, 28) + SourceIndex(0) +7 >Emitted(53, 46) Source(63, 39) + SourceIndex(0) +8 >Emitted(53, 48) Source(63, 28) + SourceIndex(0) +9 >Emitted(53, 74) Source(63, 39) + SourceIndex(0) +10>Emitted(53, 76) Source(63, 28) + SourceIndex(0) +11>Emitted(53, 81) Source(63, 39) + SourceIndex(0) +12>Emitted(53, 82) Source(63, 40) + SourceIndex(0) +--- +>>> _15 = multiRobots_2[_14][0], nameB = _15 === void 0 ? "noName" : _15; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > nameB = "noName" +3 > +4 > nameB = "noName" +1 >Emitted(54, 5) Source(63, 7) + SourceIndex(0) +2 >Emitted(54, 32) Source(63, 23) + SourceIndex(0) +3 >Emitted(54, 34) Source(63, 7) + SourceIndex(0) +4 >Emitted(54, 73) Source(63, 23) + SourceIndex(0) +--- +>>> console.log(nameB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 >] of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameB +7 > ) +8 > ; +1 >Emitted(55, 5) Source(64, 5) + SourceIndex(0) +2 >Emitted(55, 12) Source(64, 12) + SourceIndex(0) +3 >Emitted(55, 13) Source(64, 13) + SourceIndex(0) +4 >Emitted(55, 16) Source(64, 16) + SourceIndex(0) +5 >Emitted(55, 17) Source(64, 17) + SourceIndex(0) +6 >Emitted(55, 22) Source(64, 22) + SourceIndex(0) +7 >Emitted(55, 23) Source(64, 23) + SourceIndex(0) +8 >Emitted(55, 24) Source(64, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(56, 2) Source(65, 2) + SourceIndex(0) +--- +>>>for (var _16 = 0, _17 = getMultiRobots(); _16 < _17.length; _16++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^ +1-> + > +2 >for +3 > +4 > ([nameB = "noName"] of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> getMultiRobots() +12> +13> getMultiRobots() +14> ) +1->Emitted(57, 1) Source(66, 1) + SourceIndex(0) +2 >Emitted(57, 4) Source(66, 4) + SourceIndex(0) +3 >Emitted(57, 5) Source(66, 5) + SourceIndex(0) +4 >Emitted(57, 6) Source(66, 28) + SourceIndex(0) +5 >Emitted(57, 17) Source(66, 44) + SourceIndex(0) +6 >Emitted(57, 19) Source(66, 28) + SourceIndex(0) +7 >Emitted(57, 25) Source(66, 28) + SourceIndex(0) +8 >Emitted(57, 39) Source(66, 42) + SourceIndex(0) +9 >Emitted(57, 41) Source(66, 44) + SourceIndex(0) +10>Emitted(57, 43) Source(66, 28) + SourceIndex(0) +11>Emitted(57, 59) Source(66, 44) + SourceIndex(0) +12>Emitted(57, 61) Source(66, 28) + SourceIndex(0) +13>Emitted(57, 66) Source(66, 44) + SourceIndex(0) +14>Emitted(57, 67) Source(66, 45) + SourceIndex(0) +--- +>>> _18 = _17[_16][0], nameB = _18 === void 0 ? "noName" : _18; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > nameB = "noName" +3 > +4 > nameB = "noName" +1 >Emitted(58, 5) Source(66, 7) + SourceIndex(0) +2 >Emitted(58, 22) Source(66, 23) + SourceIndex(0) +3 >Emitted(58, 24) Source(66, 7) + SourceIndex(0) +4 >Emitted(58, 63) Source(66, 23) + SourceIndex(0) +--- +>>> console.log(nameB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 >] of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameB +7 > ) +8 > ; +1 >Emitted(59, 5) Source(67, 5) + SourceIndex(0) +2 >Emitted(59, 12) Source(67, 12) + SourceIndex(0) +3 >Emitted(59, 13) Source(67, 13) + SourceIndex(0) +4 >Emitted(59, 16) Source(67, 16) + SourceIndex(0) +5 >Emitted(59, 17) Source(67, 17) + SourceIndex(0) +6 >Emitted(59, 22) Source(67, 22) + SourceIndex(0) +7 >Emitted(59, 23) Source(67, 23) + SourceIndex(0) +8 >Emitted(59, 24) Source(67, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(60, 2) Source(68, 2) + SourceIndex(0) +--- +>>>for (var _19 = 0, _20 = [multiRobotA, multiRobotB]; _19 < _20.length; _19++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^^ +16> ^ +1-> + > +2 >for +3 > +4 > ([nameB = "noName"] of +5 > [multiRobotA, multiRobotB] +6 > +7 > [ +8 > multiRobotA +9 > , +10> multiRobotB +11> ] +12> +13> [multiRobotA, multiRobotB] +14> +15> [multiRobotA, multiRobotB] +16> ) +1->Emitted(61, 1) Source(69, 1) + SourceIndex(0) +2 >Emitted(61, 4) Source(69, 4) + SourceIndex(0) +3 >Emitted(61, 5) Source(69, 5) + SourceIndex(0) +4 >Emitted(61, 6) Source(69, 28) + SourceIndex(0) +5 >Emitted(61, 17) Source(69, 54) + SourceIndex(0) +6 >Emitted(61, 19) Source(69, 28) + SourceIndex(0) +7 >Emitted(61, 26) Source(69, 29) + SourceIndex(0) +8 >Emitted(61, 37) Source(69, 40) + SourceIndex(0) +9 >Emitted(61, 39) Source(69, 42) + SourceIndex(0) +10>Emitted(61, 50) Source(69, 53) + SourceIndex(0) +11>Emitted(61, 51) Source(69, 54) + SourceIndex(0) +12>Emitted(61, 53) Source(69, 28) + SourceIndex(0) +13>Emitted(61, 69) Source(69, 54) + SourceIndex(0) +14>Emitted(61, 71) Source(69, 28) + SourceIndex(0) +15>Emitted(61, 76) Source(69, 54) + SourceIndex(0) +16>Emitted(61, 77) Source(69, 55) + SourceIndex(0) +--- +>>> _21 = _20[_19][0], nameB = _21 === void 0 ? "noName" : _21; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > nameB = "noName" +3 > +4 > nameB = "noName" +1 >Emitted(62, 5) Source(69, 7) + SourceIndex(0) +2 >Emitted(62, 22) Source(69, 23) + SourceIndex(0) +3 >Emitted(62, 24) Source(69, 7) + SourceIndex(0) +4 >Emitted(62, 63) Source(69, 23) + SourceIndex(0) +--- +>>> console.log(nameB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 >] of [multiRobotA, multiRobotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameB +7 > ) +8 > ; +1 >Emitted(63, 5) Source(70, 5) + SourceIndex(0) +2 >Emitted(63, 12) Source(70, 12) + SourceIndex(0) +3 >Emitted(63, 13) Source(70, 13) + SourceIndex(0) +4 >Emitted(63, 16) Source(70, 16) + SourceIndex(0) +5 >Emitted(63, 17) Source(70, 17) + SourceIndex(0) +6 >Emitted(63, 22) Source(70, 22) + SourceIndex(0) +7 >Emitted(63, 23) Source(70, 23) + SourceIndex(0) +8 >Emitted(63, 24) Source(70, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(64, 2) Source(71, 2) + SourceIndex(0) +--- +>>>for (var _22 = 0, robots_3 = robots; _22 < robots_3.length; _22++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^ +12> ^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +2 >for +3 > +4 > ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of +5 > robots +6 > +7 > robots +8 > +9 > robots +10> +11> robots +12> ) +1->Emitted(65, 1) Source(73, 1) + SourceIndex(0) +2 >Emitted(65, 4) Source(73, 4) + SourceIndex(0) +3 >Emitted(65, 5) Source(73, 5) + SourceIndex(0) +4 >Emitted(65, 6) Source(73, 63) + SourceIndex(0) +5 >Emitted(65, 17) Source(73, 69) + SourceIndex(0) +6 >Emitted(65, 19) Source(73, 63) + SourceIndex(0) +7 >Emitted(65, 36) Source(73, 69) + SourceIndex(0) +8 >Emitted(65, 38) Source(73, 63) + SourceIndex(0) +9 >Emitted(65, 59) Source(73, 69) + SourceIndex(0) +10>Emitted(65, 61) Source(73, 63) + SourceIndex(0) +11>Emitted(65, 66) Source(73, 69) + SourceIndex(0) +12>Emitted(65, 67) Source(73, 70) + SourceIndex(0) +--- +>>> _23 = robots_3[_22], _24 = _23[0], numberA2 = _24 === void 0 ? -1 : _24, _25 = _23[1], nameA2 = _25 === void 0 ? "noName" : _25, _26 = _23[2], skillA2 = _26 === void 0 ? "skill" : _26; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] +3 > +4 > numberA2 = -1 +5 > +6 > numberA2 = -1 +7 > , +8 > nameA2 = "noName" +9 > +10> nameA2 = "noName" +11> , +12> skillA2 = "skill" +13> +14> skillA2 = "skill" +1->Emitted(66, 5) Source(73, 6) + SourceIndex(0) +2 >Emitted(66, 24) Source(73, 59) + SourceIndex(0) +3 >Emitted(66, 26) Source(73, 7) + SourceIndex(0) +4 >Emitted(66, 38) Source(73, 20) + SourceIndex(0) +5 >Emitted(66, 40) Source(73, 7) + SourceIndex(0) +6 >Emitted(66, 76) Source(73, 20) + SourceIndex(0) +7 >Emitted(66, 78) Source(73, 22) + SourceIndex(0) +8 >Emitted(66, 90) Source(73, 39) + SourceIndex(0) +9 >Emitted(66, 92) Source(73, 22) + SourceIndex(0) +10>Emitted(66, 132) Source(73, 39) + SourceIndex(0) +11>Emitted(66, 134) Source(73, 41) + SourceIndex(0) +12>Emitted(66, 146) Source(73, 58) + SourceIndex(0) +13>Emitted(66, 148) Source(73, 41) + SourceIndex(0) +14>Emitted(66, 188) Source(73, 58) + SourceIndex(0) +--- +>>> console.log(nameA2); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 >] of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA2 +7 > ) +8 > ; +1 >Emitted(67, 5) Source(74, 5) + SourceIndex(0) +2 >Emitted(67, 12) Source(74, 12) + SourceIndex(0) +3 >Emitted(67, 13) Source(74, 13) + SourceIndex(0) +4 >Emitted(67, 16) Source(74, 16) + SourceIndex(0) +5 >Emitted(67, 17) Source(74, 17) + SourceIndex(0) +6 >Emitted(67, 23) Source(74, 23) + SourceIndex(0) +7 >Emitted(67, 24) Source(74, 24) + SourceIndex(0) +8 >Emitted(67, 25) Source(74, 25) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(68, 2) Source(75, 2) + SourceIndex(0) +--- +>>>for (var _27 = 0, _28 = getRobots(); _27 < _28.length; _27++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> getRobots() +12> +13> getRobots() +14> ) +1->Emitted(69, 1) Source(76, 1) + SourceIndex(0) +2 >Emitted(69, 4) Source(76, 4) + SourceIndex(0) +3 >Emitted(69, 5) Source(76, 5) + SourceIndex(0) +4 >Emitted(69, 6) Source(76, 63) + SourceIndex(0) +5 >Emitted(69, 17) Source(76, 74) + SourceIndex(0) +6 >Emitted(69, 19) Source(76, 63) + SourceIndex(0) +7 >Emitted(69, 25) Source(76, 63) + SourceIndex(0) +8 >Emitted(69, 34) Source(76, 72) + SourceIndex(0) +9 >Emitted(69, 36) Source(76, 74) + SourceIndex(0) +10>Emitted(69, 38) Source(76, 63) + SourceIndex(0) +11>Emitted(69, 54) Source(76, 74) + SourceIndex(0) +12>Emitted(69, 56) Source(76, 63) + SourceIndex(0) +13>Emitted(69, 61) Source(76, 74) + SourceIndex(0) +14>Emitted(69, 62) Source(76, 75) + SourceIndex(0) +--- +>>> _29 = _28[_27], _30 = _29[0], numberA2 = _30 === void 0 ? -1 : _30, _31 = _29[1], nameA2 = _31 === void 0 ? "noName" : _31, _32 = _29[2], skillA2 = _32 === void 0 ? "skill" : _32; +1->^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] +3 > +4 > numberA2 = -1 +5 > +6 > numberA2 = -1 +7 > , +8 > nameA2 = "noName" +9 > +10> nameA2 = "noName" +11> , +12> skillA2 = "skill" +13> +14> skillA2 = "skill" +1->Emitted(70, 5) Source(76, 6) + SourceIndex(0) +2 >Emitted(70, 19) Source(76, 59) + SourceIndex(0) +3 >Emitted(70, 21) Source(76, 7) + SourceIndex(0) +4 >Emitted(70, 33) Source(76, 20) + SourceIndex(0) +5 >Emitted(70, 35) Source(76, 7) + SourceIndex(0) +6 >Emitted(70, 71) Source(76, 20) + SourceIndex(0) +7 >Emitted(70, 73) Source(76, 22) + SourceIndex(0) +8 >Emitted(70, 85) Source(76, 39) + SourceIndex(0) +9 >Emitted(70, 87) Source(76, 22) + SourceIndex(0) +10>Emitted(70, 127) Source(76, 39) + SourceIndex(0) +11>Emitted(70, 129) Source(76, 41) + SourceIndex(0) +12>Emitted(70, 141) Source(76, 58) + SourceIndex(0) +13>Emitted(70, 143) Source(76, 41) + SourceIndex(0) +14>Emitted(70, 183) Source(76, 58) + SourceIndex(0) +--- +>>> console.log(nameA2); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 >] of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA2 +7 > ) +8 > ; +1 >Emitted(71, 5) Source(77, 5) + SourceIndex(0) +2 >Emitted(71, 12) Source(77, 12) + SourceIndex(0) +3 >Emitted(71, 13) Source(77, 13) + SourceIndex(0) +4 >Emitted(71, 16) Source(77, 16) + SourceIndex(0) +5 >Emitted(71, 17) Source(77, 17) + SourceIndex(0) +6 >Emitted(71, 23) Source(77, 23) + SourceIndex(0) +7 >Emitted(71, 24) Source(77, 24) + SourceIndex(0) +8 >Emitted(71, 25) Source(77, 25) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(72, 2) Source(78, 2) + SourceIndex(0) +--- +>>>for (var _33 = 0, _34 = [robotA, robotB]; _33 < _34.length; _33++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^^ +16> ^ +17> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of +5 > [robotA, robotB] +6 > +7 > [ +8 > robotA +9 > , +10> robotB +11> ] +12> +13> [robotA, robotB] +14> +15> [robotA, robotB] +16> ) +1->Emitted(73, 1) Source(79, 1) + SourceIndex(0) +2 >Emitted(73, 4) Source(79, 4) + SourceIndex(0) +3 >Emitted(73, 5) Source(79, 5) + SourceIndex(0) +4 >Emitted(73, 6) Source(79, 63) + SourceIndex(0) +5 >Emitted(73, 17) Source(79, 79) + SourceIndex(0) +6 >Emitted(73, 19) Source(79, 63) + SourceIndex(0) +7 >Emitted(73, 26) Source(79, 64) + SourceIndex(0) +8 >Emitted(73, 32) Source(79, 70) + SourceIndex(0) +9 >Emitted(73, 34) Source(79, 72) + SourceIndex(0) +10>Emitted(73, 40) Source(79, 78) + SourceIndex(0) +11>Emitted(73, 41) Source(79, 79) + SourceIndex(0) +12>Emitted(73, 43) Source(79, 63) + SourceIndex(0) +13>Emitted(73, 59) Source(79, 79) + SourceIndex(0) +14>Emitted(73, 61) Source(79, 63) + SourceIndex(0) +15>Emitted(73, 66) Source(79, 79) + SourceIndex(0) +16>Emitted(73, 67) Source(79, 80) + SourceIndex(0) +--- +>>> _35 = _34[_33], _36 = _35[0], numberA2 = _36 === void 0 ? -1 : _36, _37 = _35[1], nameA2 = _37 === void 0 ? "noName" : _37, _38 = _35[2], skillA2 = _38 === void 0 ? "skill" : _38; +1->^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] +3 > +4 > numberA2 = -1 +5 > +6 > numberA2 = -1 +7 > , +8 > nameA2 = "noName" +9 > +10> nameA2 = "noName" +11> , +12> skillA2 = "skill" +13> +14> skillA2 = "skill" +1->Emitted(74, 5) Source(79, 6) + SourceIndex(0) +2 >Emitted(74, 19) Source(79, 59) + SourceIndex(0) +3 >Emitted(74, 21) Source(79, 7) + SourceIndex(0) +4 >Emitted(74, 33) Source(79, 20) + SourceIndex(0) +5 >Emitted(74, 35) Source(79, 7) + SourceIndex(0) +6 >Emitted(74, 71) Source(79, 20) + SourceIndex(0) +7 >Emitted(74, 73) Source(79, 22) + SourceIndex(0) +8 >Emitted(74, 85) Source(79, 39) + SourceIndex(0) +9 >Emitted(74, 87) Source(79, 22) + SourceIndex(0) +10>Emitted(74, 127) Source(79, 39) + SourceIndex(0) +11>Emitted(74, 129) Source(79, 41) + SourceIndex(0) +12>Emitted(74, 141) Source(79, 58) + SourceIndex(0) +13>Emitted(74, 143) Source(79, 41) + SourceIndex(0) +14>Emitted(74, 183) Source(79, 58) + SourceIndex(0) +--- +>>> console.log(nameA2); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 >] of [robotA, robotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA2 +7 > ) +8 > ; +1 >Emitted(75, 5) Source(80, 5) + SourceIndex(0) +2 >Emitted(75, 12) Source(80, 12) + SourceIndex(0) +3 >Emitted(75, 13) Source(80, 13) + SourceIndex(0) +4 >Emitted(75, 16) Source(80, 16) + SourceIndex(0) +5 >Emitted(75, 17) Source(80, 17) + SourceIndex(0) +6 >Emitted(75, 23) Source(80, 23) + SourceIndex(0) +7 >Emitted(75, 24) Source(80, 24) + SourceIndex(0) +8 >Emitted(75, 25) Source(80, 25) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(76, 2) Source(81, 2) + SourceIndex(0) +--- +>>>for (var _39 = 0, multiRobots_3 = multiRobots; _39 < multiRobots_3.length; _39++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^ +12> ^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ([nameMA = "noName", [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"]] of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > multiRobots +10> +11> multiRobots +12> ) +1->Emitted(77, 1) Source(82, 1) + SourceIndex(0) +2 >Emitted(77, 4) Source(82, 4) + SourceIndex(0) +3 >Emitted(77, 5) Source(82, 5) + SourceIndex(0) +4 >Emitted(77, 6) Source(85, 30) + SourceIndex(0) +5 >Emitted(77, 17) Source(85, 41) + SourceIndex(0) +6 >Emitted(77, 19) Source(85, 30) + SourceIndex(0) +7 >Emitted(77, 46) Source(85, 41) + SourceIndex(0) +8 >Emitted(77, 48) Source(85, 30) + SourceIndex(0) +9 >Emitted(77, 74) Source(85, 41) + SourceIndex(0) +10>Emitted(77, 76) Source(85, 30) + SourceIndex(0) +11>Emitted(77, 81) Source(85, 41) + SourceIndex(0) +12>Emitted(77, 82) Source(85, 42) + SourceIndex(0) +--- +>>> _40 = multiRobots_3[_39], _41 = _40[0], nameMA = _41 === void 0 ? "noName" : _41, _42 = _40[1], _43 = _42 === void 0 ? ["skill1", "skill2"] : _42, _44 = _43[0], primarySkillA = _44 === void 0 ? "primary" : _44, _45 = _43[1], secondarySkillA = _45 === void 0 ? "secondary" : _45; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [nameMA = "noName", [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"]] +3 > +4 > nameMA = "noName" +5 > +6 > nameMA = "noName" +7 > , +8 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"] +9 > +10> [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"] +11> +12> primarySkillA = "primary" +13> +14> primarySkillA = "primary" +15> , + > +16> secondarySkillA = "secondary" +17> +18> secondarySkillA = "secondary" +1->Emitted(78, 5) Source(82, 6) + SourceIndex(0) +2 >Emitted(78, 29) Source(85, 26) + SourceIndex(0) +3 >Emitted(78, 31) Source(82, 7) + SourceIndex(0) +4 >Emitted(78, 43) Source(82, 24) + SourceIndex(0) +5 >Emitted(78, 45) Source(82, 7) + SourceIndex(0) +6 >Emitted(78, 85) Source(82, 24) + SourceIndex(0) +7 >Emitted(78, 87) Source(82, 26) + SourceIndex(0) +8 >Emitted(78, 99) Source(85, 25) + SourceIndex(0) +9 >Emitted(78, 101) Source(82, 26) + SourceIndex(0) +10>Emitted(78, 150) Source(85, 25) + SourceIndex(0) +11>Emitted(78, 152) Source(83, 5) + SourceIndex(0) +12>Emitted(78, 164) Source(83, 30) + SourceIndex(0) +13>Emitted(78, 166) Source(83, 5) + SourceIndex(0) +14>Emitted(78, 214) Source(83, 30) + SourceIndex(0) +15>Emitted(78, 216) Source(84, 5) + SourceIndex(0) +16>Emitted(78, 228) Source(84, 34) + SourceIndex(0) +17>Emitted(78, 230) Source(84, 5) + SourceIndex(0) +18>Emitted(78, 282) Source(84, 34) + SourceIndex(0) +--- +>>> console.log(nameMA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + >] = ["skill1", "skill2"]] of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMA +7 > ) +8 > ; +1 >Emitted(79, 5) Source(86, 5) + SourceIndex(0) +2 >Emitted(79, 12) Source(86, 12) + SourceIndex(0) +3 >Emitted(79, 13) Source(86, 13) + SourceIndex(0) +4 >Emitted(79, 16) Source(86, 16) + SourceIndex(0) +5 >Emitted(79, 17) Source(86, 17) + SourceIndex(0) +6 >Emitted(79, 23) Source(86, 23) + SourceIndex(0) +7 >Emitted(79, 24) Source(86, 24) + SourceIndex(0) +8 >Emitted(79, 25) Source(86, 25) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(80, 2) Source(87, 2) + SourceIndex(0) +--- +>>>for (var _46 = 0, _47 = getMultiRobots(); _46 < _47.length; _46++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ([nameMA = "noName", [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"]] of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> getMultiRobots() +12> +13> getMultiRobots() +14> ) +1->Emitted(81, 1) Source(88, 1) + SourceIndex(0) +2 >Emitted(81, 4) Source(88, 4) + SourceIndex(0) +3 >Emitted(81, 5) Source(88, 5) + SourceIndex(0) +4 >Emitted(81, 6) Source(91, 30) + SourceIndex(0) +5 >Emitted(81, 17) Source(91, 46) + SourceIndex(0) +6 >Emitted(81, 19) Source(91, 30) + SourceIndex(0) +7 >Emitted(81, 25) Source(91, 30) + SourceIndex(0) +8 >Emitted(81, 39) Source(91, 44) + SourceIndex(0) +9 >Emitted(81, 41) Source(91, 46) + SourceIndex(0) +10>Emitted(81, 43) Source(91, 30) + SourceIndex(0) +11>Emitted(81, 59) Source(91, 46) + SourceIndex(0) +12>Emitted(81, 61) Source(91, 30) + SourceIndex(0) +13>Emitted(81, 66) Source(91, 46) + SourceIndex(0) +14>Emitted(81, 67) Source(91, 47) + SourceIndex(0) +--- +>>> _48 = _47[_46], _49 = _48[0], nameMA = _49 === void 0 ? "noName" : _49, _50 = _48[1], _51 = _50 === void 0 ? ["skill1", "skill2"] : _50, _52 = _51[0], primarySkillA = _52 === void 0 ? "primary" : _52, _53 = _51[1], secondarySkillA = _53 === void 0 ? "secondary" : _53; +1->^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [nameMA = "noName", [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"]] +3 > +4 > nameMA = "noName" +5 > +6 > nameMA = "noName" +7 > , +8 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"] +9 > +10> [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"] +11> +12> primarySkillA = "primary" +13> +14> primarySkillA = "primary" +15> , + > +16> secondarySkillA = "secondary" +17> +18> secondarySkillA = "secondary" +1->Emitted(82, 5) Source(88, 6) + SourceIndex(0) +2 >Emitted(82, 19) Source(91, 26) + SourceIndex(0) +3 >Emitted(82, 21) Source(88, 7) + SourceIndex(0) +4 >Emitted(82, 33) Source(88, 24) + SourceIndex(0) +5 >Emitted(82, 35) Source(88, 7) + SourceIndex(0) +6 >Emitted(82, 75) Source(88, 24) + SourceIndex(0) +7 >Emitted(82, 77) Source(88, 26) + SourceIndex(0) +8 >Emitted(82, 89) Source(91, 25) + SourceIndex(0) +9 >Emitted(82, 91) Source(88, 26) + SourceIndex(0) +10>Emitted(82, 140) Source(91, 25) + SourceIndex(0) +11>Emitted(82, 142) Source(89, 5) + SourceIndex(0) +12>Emitted(82, 154) Source(89, 30) + SourceIndex(0) +13>Emitted(82, 156) Source(89, 5) + SourceIndex(0) +14>Emitted(82, 204) Source(89, 30) + SourceIndex(0) +15>Emitted(82, 206) Source(90, 5) + SourceIndex(0) +16>Emitted(82, 218) Source(90, 34) + SourceIndex(0) +17>Emitted(82, 220) Source(90, 5) + SourceIndex(0) +18>Emitted(82, 272) Source(90, 34) + SourceIndex(0) +--- +>>> console.log(nameMA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + >] = ["skill1", "skill2"]] of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMA +7 > ) +8 > ; +1 >Emitted(83, 5) Source(92, 5) + SourceIndex(0) +2 >Emitted(83, 12) Source(92, 12) + SourceIndex(0) +3 >Emitted(83, 13) Source(92, 13) + SourceIndex(0) +4 >Emitted(83, 16) Source(92, 16) + SourceIndex(0) +5 >Emitted(83, 17) Source(92, 17) + SourceIndex(0) +6 >Emitted(83, 23) Source(92, 23) + SourceIndex(0) +7 >Emitted(83, 24) Source(92, 24) + SourceIndex(0) +8 >Emitted(83, 25) Source(92, 25) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(84, 2) Source(93, 2) + SourceIndex(0) +--- +>>>for (var _54 = 0, _55 = [multiRobotA, multiRobotB]; _54 < _55.length; _54++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^^ +16> ^ +17> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ([nameMA = "noName", [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"]] of +5 > [multiRobotA, multiRobotB] +6 > +7 > [ +8 > multiRobotA +9 > , +10> multiRobotB +11> ] +12> +13> [multiRobotA, multiRobotB] +14> +15> [multiRobotA, multiRobotB] +16> ) +1->Emitted(85, 1) Source(94, 1) + SourceIndex(0) +2 >Emitted(85, 4) Source(94, 4) + SourceIndex(0) +3 >Emitted(85, 5) Source(94, 5) + SourceIndex(0) +4 >Emitted(85, 6) Source(97, 30) + SourceIndex(0) +5 >Emitted(85, 17) Source(97, 56) + SourceIndex(0) +6 >Emitted(85, 19) Source(97, 30) + SourceIndex(0) +7 >Emitted(85, 26) Source(97, 31) + SourceIndex(0) +8 >Emitted(85, 37) Source(97, 42) + SourceIndex(0) +9 >Emitted(85, 39) Source(97, 44) + SourceIndex(0) +10>Emitted(85, 50) Source(97, 55) + SourceIndex(0) +11>Emitted(85, 51) Source(97, 56) + SourceIndex(0) +12>Emitted(85, 53) Source(97, 30) + SourceIndex(0) +13>Emitted(85, 69) Source(97, 56) + SourceIndex(0) +14>Emitted(85, 71) Source(97, 30) + SourceIndex(0) +15>Emitted(85, 76) Source(97, 56) + SourceIndex(0) +16>Emitted(85, 77) Source(97, 57) + SourceIndex(0) +--- +>>> _56 = _55[_54], _57 = _56[0], nameMA = _57 === void 0 ? "noName" : _57, _58 = _56[1], _59 = _58 === void 0 ? ["skill1", "skill2"] : _58, _60 = _59[0], primarySkillA = _60 === void 0 ? "primary" : _60, _61 = _59[1], secondarySkillA = _61 === void 0 ? "secondary" : _61; +1->^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [nameMA = "noName", [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"]] +3 > +4 > nameMA = "noName" +5 > +6 > nameMA = "noName" +7 > , +8 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"] +9 > +10> [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["skill1", "skill2"] +11> +12> primarySkillA = "primary" +13> +14> primarySkillA = "primary" +15> , + > +16> secondarySkillA = "secondary" +17> +18> secondarySkillA = "secondary" +1->Emitted(86, 5) Source(94, 6) + SourceIndex(0) +2 >Emitted(86, 19) Source(97, 26) + SourceIndex(0) +3 >Emitted(86, 21) Source(94, 7) + SourceIndex(0) +4 >Emitted(86, 33) Source(94, 24) + SourceIndex(0) +5 >Emitted(86, 35) Source(94, 7) + SourceIndex(0) +6 >Emitted(86, 75) Source(94, 24) + SourceIndex(0) +7 >Emitted(86, 77) Source(94, 26) + SourceIndex(0) +8 >Emitted(86, 89) Source(97, 25) + SourceIndex(0) +9 >Emitted(86, 91) Source(94, 26) + SourceIndex(0) +10>Emitted(86, 140) Source(97, 25) + SourceIndex(0) +11>Emitted(86, 142) Source(95, 5) + SourceIndex(0) +12>Emitted(86, 154) Source(95, 30) + SourceIndex(0) +13>Emitted(86, 156) Source(95, 5) + SourceIndex(0) +14>Emitted(86, 204) Source(95, 30) + SourceIndex(0) +15>Emitted(86, 206) Source(96, 5) + SourceIndex(0) +16>Emitted(86, 218) Source(96, 34) + SourceIndex(0) +17>Emitted(86, 220) Source(96, 5) + SourceIndex(0) +18>Emitted(86, 272) Source(96, 34) + SourceIndex(0) +--- +>>> console.log(nameMA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMA +7 > ) +8 > ; +1 >Emitted(87, 5) Source(98, 5) + SourceIndex(0) +2 >Emitted(87, 12) Source(98, 12) + SourceIndex(0) +3 >Emitted(87, 13) Source(98, 13) + SourceIndex(0) +4 >Emitted(87, 16) Source(98, 16) + SourceIndex(0) +5 >Emitted(87, 17) Source(98, 17) + SourceIndex(0) +6 >Emitted(87, 23) Source(98, 23) + SourceIndex(0) +7 >Emitted(87, 24) Source(98, 24) + SourceIndex(0) +8 >Emitted(87, 25) Source(98, 25) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(88, 2) Source(99, 2) + SourceIndex(0) +--- +>>>for (var _62 = 0, robots_4 = robots; _62 < robots_4.length; _62++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^ +12> ^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +2 >for +3 > +4 > ([numberA3 = -1, ...robotAInfo] of +5 > robots +6 > +7 > robots +8 > +9 > robots +10> +11> robots +12> ) +1->Emitted(89, 1) Source(101, 1) + SourceIndex(0) +2 >Emitted(89, 4) Source(101, 4) + SourceIndex(0) +3 >Emitted(89, 5) Source(101, 5) + SourceIndex(0) +4 >Emitted(89, 6) Source(101, 40) + SourceIndex(0) +5 >Emitted(89, 17) Source(101, 46) + SourceIndex(0) +6 >Emitted(89, 19) Source(101, 40) + SourceIndex(0) +7 >Emitted(89, 36) Source(101, 46) + SourceIndex(0) +8 >Emitted(89, 38) Source(101, 40) + SourceIndex(0) +9 >Emitted(89, 59) Source(101, 46) + SourceIndex(0) +10>Emitted(89, 61) Source(101, 40) + SourceIndex(0) +11>Emitted(89, 66) Source(101, 46) + SourceIndex(0) +12>Emitted(89, 67) Source(101, 47) + SourceIndex(0) +--- +>>> _63 = robots_4[_62], _64 = _63[0], numberA3 = _64 === void 0 ? -1 : _64, robotAInfo = _63.slice(1); +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [numberA3 = -1, ...robotAInfo] +3 > +4 > numberA3 = -1 +5 > +6 > numberA3 = -1 +7 > , +8 > ...robotAInfo +1->Emitted(90, 5) Source(101, 6) + SourceIndex(0) +2 >Emitted(90, 24) Source(101, 36) + SourceIndex(0) +3 >Emitted(90, 26) Source(101, 7) + SourceIndex(0) +4 >Emitted(90, 38) Source(101, 20) + SourceIndex(0) +5 >Emitted(90, 40) Source(101, 7) + SourceIndex(0) +6 >Emitted(90, 76) Source(101, 20) + SourceIndex(0) +7 >Emitted(90, 78) Source(101, 22) + SourceIndex(0) +8 >Emitted(90, 103) Source(101, 35) + SourceIndex(0) +--- +>>> console.log(numberA3); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 >] of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > numberA3 +7 > ) +8 > ; +1 >Emitted(91, 5) Source(102, 5) + SourceIndex(0) +2 >Emitted(91, 12) Source(102, 12) + SourceIndex(0) +3 >Emitted(91, 13) Source(102, 13) + SourceIndex(0) +4 >Emitted(91, 16) Source(102, 16) + SourceIndex(0) +5 >Emitted(91, 17) Source(102, 17) + SourceIndex(0) +6 >Emitted(91, 25) Source(102, 25) + SourceIndex(0) +7 >Emitted(91, 26) Source(102, 26) + SourceIndex(0) +8 >Emitted(91, 27) Source(102, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(92, 2) Source(103, 2) + SourceIndex(0) +--- +>>>for (var _65 = 0, _66 = getRobots(); _65 < _66.length; _65++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ([numberA3 = -1, ...robotAInfo] of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> getRobots() +12> +13> getRobots() +14> ) +1->Emitted(93, 1) Source(104, 1) + SourceIndex(0) +2 >Emitted(93, 4) Source(104, 4) + SourceIndex(0) +3 >Emitted(93, 5) Source(104, 5) + SourceIndex(0) +4 >Emitted(93, 6) Source(104, 40) + SourceIndex(0) +5 >Emitted(93, 17) Source(104, 51) + SourceIndex(0) +6 >Emitted(93, 19) Source(104, 40) + SourceIndex(0) +7 >Emitted(93, 25) Source(104, 40) + SourceIndex(0) +8 >Emitted(93, 34) Source(104, 49) + SourceIndex(0) +9 >Emitted(93, 36) Source(104, 51) + SourceIndex(0) +10>Emitted(93, 38) Source(104, 40) + SourceIndex(0) +11>Emitted(93, 54) Source(104, 51) + SourceIndex(0) +12>Emitted(93, 56) Source(104, 40) + SourceIndex(0) +13>Emitted(93, 61) Source(104, 51) + SourceIndex(0) +14>Emitted(93, 62) Source(104, 52) + SourceIndex(0) +--- +>>> _67 = _66[_65], _68 = _67[0], numberA3 = _68 === void 0 ? -1 : _68, robotAInfo = _67.slice(1); +1->^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [numberA3 = -1, ...robotAInfo] +3 > +4 > numberA3 = -1 +5 > +6 > numberA3 = -1 +7 > , +8 > ...robotAInfo +1->Emitted(94, 5) Source(104, 6) + SourceIndex(0) +2 >Emitted(94, 19) Source(104, 36) + SourceIndex(0) +3 >Emitted(94, 21) Source(104, 7) + SourceIndex(0) +4 >Emitted(94, 33) Source(104, 20) + SourceIndex(0) +5 >Emitted(94, 35) Source(104, 7) + SourceIndex(0) +6 >Emitted(94, 71) Source(104, 20) + SourceIndex(0) +7 >Emitted(94, 73) Source(104, 22) + SourceIndex(0) +8 >Emitted(94, 98) Source(104, 35) + SourceIndex(0) +--- +>>> console.log(numberA3); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 >] of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > numberA3 +7 > ) +8 > ; +1 >Emitted(95, 5) Source(105, 5) + SourceIndex(0) +2 >Emitted(95, 12) Source(105, 12) + SourceIndex(0) +3 >Emitted(95, 13) Source(105, 13) + SourceIndex(0) +4 >Emitted(95, 16) Source(105, 16) + SourceIndex(0) +5 >Emitted(95, 17) Source(105, 17) + SourceIndex(0) +6 >Emitted(95, 25) Source(105, 25) + SourceIndex(0) +7 >Emitted(95, 26) Source(105, 26) + SourceIndex(0) +8 >Emitted(95, 27) Source(105, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(96, 2) Source(106, 2) + SourceIndex(0) +--- +>>>for (var _69 = 0, _70 = [robotA, robotB]; _69 < _70.length; _69++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^ +12> ^^ +13> ^^^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^^ +16> ^ +17> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ([numberA3 = -1, ...robotAInfo] of +5 > [robotA, robotB] +6 > +7 > [ +8 > robotA +9 > , +10> robotB +11> ] +12> +13> [robotA, robotB] +14> +15> [robotA, robotB] +16> ) +1->Emitted(97, 1) Source(107, 1) + SourceIndex(0) +2 >Emitted(97, 4) Source(107, 4) + SourceIndex(0) +3 >Emitted(97, 5) Source(107, 5) + SourceIndex(0) +4 >Emitted(97, 6) Source(107, 40) + SourceIndex(0) +5 >Emitted(97, 17) Source(107, 56) + SourceIndex(0) +6 >Emitted(97, 19) Source(107, 40) + SourceIndex(0) +7 >Emitted(97, 26) Source(107, 41) + SourceIndex(0) +8 >Emitted(97, 32) Source(107, 47) + SourceIndex(0) +9 >Emitted(97, 34) Source(107, 49) + SourceIndex(0) +10>Emitted(97, 40) Source(107, 55) + SourceIndex(0) +11>Emitted(97, 41) Source(107, 56) + SourceIndex(0) +12>Emitted(97, 43) Source(107, 40) + SourceIndex(0) +13>Emitted(97, 59) Source(107, 56) + SourceIndex(0) +14>Emitted(97, 61) Source(107, 40) + SourceIndex(0) +15>Emitted(97, 66) Source(107, 56) + SourceIndex(0) +16>Emitted(97, 67) Source(107, 57) + SourceIndex(0) +--- +>>> _71 = _70[_69], _72 = _71[0], numberA3 = _72 === void 0 ? -1 : _72, robotAInfo = _71.slice(1); +1->^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > [numberA3 = -1, ...robotAInfo] +3 > +4 > numberA3 = -1 +5 > +6 > numberA3 = -1 +7 > , +8 > ...robotAInfo +1->Emitted(98, 5) Source(107, 6) + SourceIndex(0) +2 >Emitted(98, 19) Source(107, 36) + SourceIndex(0) +3 >Emitted(98, 21) Source(107, 7) + SourceIndex(0) +4 >Emitted(98, 33) Source(107, 20) + SourceIndex(0) +5 >Emitted(98, 35) Source(107, 7) + SourceIndex(0) +6 >Emitted(98, 71) Source(107, 20) + SourceIndex(0) +7 >Emitted(98, 73) Source(107, 22) + SourceIndex(0) +8 >Emitted(98, 98) Source(107, 35) + SourceIndex(0) +--- +>>> console.log(numberA3); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 >] of [robotA, robotB]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > numberA3 +7 > ) +8 > ; +1 >Emitted(99, 5) Source(108, 5) + SourceIndex(0) +2 >Emitted(99, 12) Source(108, 12) + SourceIndex(0) +3 >Emitted(99, 13) Source(108, 13) + SourceIndex(0) +4 >Emitted(99, 16) Source(108, 16) + SourceIndex(0) +5 >Emitted(99, 17) Source(108, 17) + SourceIndex(0) +6 >Emitted(99, 25) Source(108, 25) + SourceIndex(0) +7 >Emitted(99, 26) Source(108, 26) + SourceIndex(0) +8 >Emitted(99, 27) Source(108, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(100, 2) Source(109, 2) + SourceIndex(0) +--- +>>>var _a, _b, _e, _f, _j, _k, _m, _o, _p, _q, _r, _u, _v, _w, _x, _y, _1, _2, _3, _4, _5, _7, _10, _13, _15, _18, _21, _23, _24, _25, _26, _29, _30, _31, _32, _35, _36, _37, _38, _40, _41, _42, _43, _44, _45, _48, _49, _50, _51, _52, _53, _56, _57, _58, _59, _60, _61, _63, _64, _67, _68, _71, _72; +>>>//# sourceMappingURL=sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.symbols b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.symbols new file mode 100644 index 00000000000..6b16ace03ea --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.symbols @@ -0,0 +1,345 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 11)) + + log(msg: any): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 1, 8)) +} +type Robot = [number, string, string]; +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 2, 1)) + +type MultiSkilledRobot = [string, [string, string]]; +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 3, 38)) + +let robotA: Robot = [1, "mower", "mowing"]; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 6, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 2, 1)) + +let robotB: Robot = [2, "trimmer", "trimming"]; +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 7, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 2, 1)) + +let robots = [robotA, robotB]; +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 8, 3)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 6, 3)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 7, 3)) + +function getRobots() { +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 8, 30)) + + return robots; +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 8, 3)) +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 13, 3)) +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 3, 38)) + +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 14, 3)) +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 3, 38)) + +let multiRobots = [multiRobotA, multiRobotB]; +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 15, 3)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 13, 3)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 14, 3)) + +function getMultiRobots() { +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 15, 45)) + + return multiRobots; +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 15, 3)) +} + +let nameA: string, primarySkillA: string, secondarySkillA: string; +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 20, 3)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 20, 18)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 20, 41)) + +let numberB: number, nameB: string; +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 21, 3)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 21, 20)) + +let numberA2: number, nameA2: string, skillA2: string, nameMA: string; +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 22, 3)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 22, 21)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 22, 37)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 22, 54)) + +let numberA3: number, robotAInfo: (number | string)[], multiRobotAInfo: (string | [string, string])[]; +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 23, 3)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 23, 21)) +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 23, 54)) + +for ([, nameA = "noName"] of robots) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 20, 3)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 8, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 20, 3)) +} +for ([, nameA = "noName"] of getRobots()) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 20, 3)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 8, 30)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 20, 3)) +} +for ([, nameA = "noName"] of [robotA, robotB]) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 20, 3)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 6, 3)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 7, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 20, 3)) +} +for ([, [ + primarySkillA = "primary", +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 20, 18)) + + secondarySkillA = "secondary" +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 20, 41)) + +] = ["skill1", "skill2"]] of multiRobots) { +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 15, 3)) + + console.log(primarySkillA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 20, 18)) +} +for ([, [ + primarySkillA = "primary", +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 20, 18)) + + secondarySkillA = "secondary" +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 20, 41)) + +] = ["skill1", "skill2"]] of getMultiRobots()) { +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 15, 45)) + + console.log(primarySkillA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 20, 18)) +} +for ([, [ + primarySkillA = "primary", +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 20, 18)) + + secondarySkillA = "secondary" +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 20, 41)) + +] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 13, 3)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 14, 3)) + + console.log(primarySkillA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 20, 18)) +} + +for ([numberB = -1] of robots) { +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 21, 3)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 8, 3)) + + console.log(numberB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 21, 3)) +} +for ([numberB = -1] of getRobots()) { +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 21, 3)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 8, 30)) + + console.log(numberB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 21, 3)) +} +for ([numberB = -1] of [robotA, robotB]) { +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 21, 3)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 6, 3)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 7, 3)) + + console.log(numberB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 21, 3)) +} +for ([nameB = "noName"] of multiRobots) { +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 21, 20)) +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 15, 3)) + + console.log(nameB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 21, 20)) +} +for ([nameB = "noName"] of getMultiRobots()) { +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 21, 20)) +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 15, 45)) + + console.log(nameB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 21, 20)) +} +for ([nameB = "noName"] of [multiRobotA, multiRobotB]) { +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 21, 20)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 13, 3)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 14, 3)) + + console.log(nameB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 21, 20)) +} + +for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 22, 3)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 22, 21)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 22, 37)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 8, 3)) + + console.log(nameA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 22, 21)) +} +for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 22, 3)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 22, 21)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 22, 37)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 8, 30)) + + console.log(nameA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 22, 21)) +} +for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) { +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 22, 3)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 22, 21)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 22, 37)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 6, 3)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 7, 3)) + + console.log(nameA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 22, 21)) +} +for ([nameMA = "noName", [ +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 22, 54)) + + primarySkillA = "primary", +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 20, 18)) + + secondarySkillA = "secondary" +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 20, 41)) + +] = ["skill1", "skill2"]] of multiRobots) { +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 15, 3)) + + console.log(nameMA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 22, 54)) +} +for ([nameMA = "noName", [ +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 22, 54)) + + primarySkillA = "primary", +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 20, 18)) + + secondarySkillA = "secondary" +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 20, 41)) + +] = ["skill1", "skill2"]] of getMultiRobots()) { +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 15, 45)) + + console.log(nameMA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 22, 54)) +} +for ([nameMA = "noName", [ +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 22, 54)) + + primarySkillA = "primary", +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 20, 18)) + + secondarySkillA = "secondary" +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 20, 41)) + +] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 13, 3)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 14, 3)) + + console.log(nameMA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 22, 54)) +} + +for ([numberA3 = -1, ...robotAInfo] of robots) { +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 23, 3)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 23, 21)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 8, 3)) + + console.log(numberA3); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 23, 3)) +} +for ([numberA3 = -1, ...robotAInfo] of getRobots()) { +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 23, 3)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 23, 21)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 8, 30)) + + console.log(numberA3); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 23, 3)) +} +for ([numberA3 = -1, ...robotAInfo] of [robotA, robotB]) { +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 23, 3)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 23, 21)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 6, 3)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 7, 3)) + + console.log(numberA3); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 0, 22)) +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts, 23, 3)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.types b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.types new file mode 100644 index 00000000000..14189ad9d81 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.types @@ -0,0 +1,544 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts === +declare var console: { +>console : { log(msg: any): void; } + + log(msg: any): void; +>log : (msg: any) => void +>msg : any +} +type Robot = [number, string, string]; +>Robot : [number, string, string] + +type MultiSkilledRobot = [string, [string, string]]; +>MultiSkilledRobot : [string, [string, string]] + +let robotA: Robot = [1, "mower", "mowing"]; +>robotA : [number, string, string] +>Robot : [number, string, string] +>[1, "mower", "mowing"] : [number, string, string] +>1 : number +>"mower" : string +>"mowing" : string + +let robotB: Robot = [2, "trimmer", "trimming"]; +>robotB : [number, string, string] +>Robot : [number, string, string] +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + +let robots = [robotA, robotB]; +>robots : [number, string, string][] +>[robotA, robotB] : [number, string, string][] +>robotA : [number, string, string] +>robotB : [number, string, string] + +function getRobots() { +>getRobots : () => [number, string, string][] + + return robots; +>robots : [number, string, string][] +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +>multiRobotA : [string, [string, string]] +>MultiSkilledRobot : [string, [string, string]] +>["mower", ["mowing", ""]] : [string, [string, string]] +>"mower" : string +>["mowing", ""] : [string, string] +>"mowing" : string +>"" : string + +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +>multiRobotB : [string, [string, string]] +>MultiSkilledRobot : [string, [string, string]] +>["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>"trimmer" : string +>["trimming", "edging"] : [string, string] +>"trimming" : string +>"edging" : string + +let multiRobots = [multiRobotA, multiRobotB]; +>multiRobots : [string, [string, string]][] +>[multiRobotA, multiRobotB] : [string, [string, string]][] +>multiRobotA : [string, [string, string]] +>multiRobotB : [string, [string, string]] + +function getMultiRobots() { +>getMultiRobots : () => [string, [string, string]][] + + return multiRobots; +>multiRobots : [string, [string, string]][] +} + +let nameA: string, primarySkillA: string, secondarySkillA: string; +>nameA : string +>primarySkillA : string +>secondarySkillA : string + +let numberB: number, nameB: string; +>numberB : number +>nameB : string + +let numberA2: number, nameA2: string, skillA2: string, nameMA: string; +>numberA2 : number +>nameA2 : string +>skillA2 : string +>nameMA : string + +let numberA3: number, robotAInfo: (number | string)[], multiRobotAInfo: (string | [string, string])[]; +>numberA3 : number +>robotAInfo : (number | string)[] +>multiRobotAInfo : (string | [string, string])[] + +for ([, nameA = "noName"] of robots) { +>[, nameA = "noName"] : string[] +> : undefined +>nameA = "noName" : string +>nameA : string +>"noName" : string +>robots : [number, string, string][] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ([, nameA = "noName"] of getRobots()) { +>[, nameA = "noName"] : string[] +> : undefined +>nameA = "noName" : string +>nameA : string +>"noName" : string +>getRobots() : [number, string, string][] +>getRobots : () => [number, string, string][] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ([, nameA = "noName"] of [robotA, robotB]) { +>[, nameA = "noName"] : string[] +> : undefined +>nameA = "noName" : string +>nameA : string +>"noName" : string +>[robotA, robotB] : [number, string, string][] +>robotA : [number, string, string] +>robotB : [number, string, string] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ([, [ +>[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"]] : [string, string][] +> : undefined +>[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"] : [string, string] +>[ primarySkillA = "primary", secondarySkillA = "secondary"] : [string, string] + + primarySkillA = "primary", +>primarySkillA = "primary" : string +>primarySkillA : string +>"primary" : string + + secondarySkillA = "secondary" +>secondarySkillA = "secondary" : string +>secondarySkillA : string +>"secondary" : string + +] = ["skill1", "skill2"]] of multiRobots) { +>["skill1", "skill2"] : [string, string] +>"skill1" : string +>"skill2" : string +>multiRobots : [string, [string, string]][] + + console.log(primarySkillA); +>console.log(primarySkillA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primarySkillA : string +} +for ([, [ +>[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"]] : [string, string][] +> : undefined +>[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"] : [string, string] +>[ primarySkillA = "primary", secondarySkillA = "secondary"] : [string, string] + + primarySkillA = "primary", +>primarySkillA = "primary" : string +>primarySkillA : string +>"primary" : string + + secondarySkillA = "secondary" +>secondarySkillA = "secondary" : string +>secondarySkillA : string +>"secondary" : string + +] = ["skill1", "skill2"]] of getMultiRobots()) { +>["skill1", "skill2"] : [string, string] +>"skill1" : string +>"skill2" : string +>getMultiRobots() : [string, [string, string]][] +>getMultiRobots : () => [string, [string, string]][] + + console.log(primarySkillA); +>console.log(primarySkillA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primarySkillA : string +} +for ([, [ +>[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"]] : [string, string][] +> : undefined +>[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"] : [string, string] +>[ primarySkillA = "primary", secondarySkillA = "secondary"] : [string, string] + + primarySkillA = "primary", +>primarySkillA = "primary" : string +>primarySkillA : string +>"primary" : string + + secondarySkillA = "secondary" +>secondarySkillA = "secondary" : string +>secondarySkillA : string +>"secondary" : string + +] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { +>["skill1", "skill2"] : [string, string] +>"skill1" : string +>"skill2" : string +>[multiRobotA, multiRobotB] : [string, [string, string]][] +>multiRobotA : [string, [string, string]] +>multiRobotB : [string, [string, string]] + + console.log(primarySkillA); +>console.log(primarySkillA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primarySkillA : string +} + +for ([numberB = -1] of robots) { +>[numberB = -1] : number[] +>numberB = -1 : number +>numberB : number +>-1 : number +>1 : number +>robots : [number, string, string][] + + console.log(numberB); +>console.log(numberB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberB : number +} +for ([numberB = -1] of getRobots()) { +>[numberB = -1] : number[] +>numberB = -1 : number +>numberB : number +>-1 : number +>1 : number +>getRobots() : [number, string, string][] +>getRobots : () => [number, string, string][] + + console.log(numberB); +>console.log(numberB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberB : number +} +for ([numberB = -1] of [robotA, robotB]) { +>[numberB = -1] : number[] +>numberB = -1 : number +>numberB : number +>-1 : number +>1 : number +>[robotA, robotB] : [number, string, string][] +>robotA : [number, string, string] +>robotB : [number, string, string] + + console.log(numberB); +>console.log(numberB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberB : number +} +for ([nameB = "noName"] of multiRobots) { +>[nameB = "noName"] : string[] +>nameB = "noName" : string +>nameB : string +>"noName" : string +>multiRobots : [string, [string, string]][] + + console.log(nameB); +>console.log(nameB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameB : string +} +for ([nameB = "noName"] of getMultiRobots()) { +>[nameB = "noName"] : string[] +>nameB = "noName" : string +>nameB : string +>"noName" : string +>getMultiRobots() : [string, [string, string]][] +>getMultiRobots : () => [string, [string, string]][] + + console.log(nameB); +>console.log(nameB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameB : string +} +for ([nameB = "noName"] of [multiRobotA, multiRobotB]) { +>[nameB = "noName"] : string[] +>nameB = "noName" : string +>nameB : string +>"noName" : string +>[multiRobotA, multiRobotB] : [string, [string, string]][] +>multiRobotA : [string, [string, string]] +>multiRobotB : [string, [string, string]] + + console.log(nameB); +>console.log(nameB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameB : string +} + +for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { +>[numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] : (number | string)[] +>numberA2 = -1 : number +>numberA2 : number +>-1 : number +>1 : number +>nameA2 = "noName" : string +>nameA2 : string +>"noName" : string +>skillA2 = "skill" : string +>skillA2 : string +>"skill" : string +>robots : [number, string, string][] + + console.log(nameA2); +>console.log(nameA2) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA2 : string +} +for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { +>[numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] : (number | string)[] +>numberA2 = -1 : number +>numberA2 : number +>-1 : number +>1 : number +>nameA2 = "noName" : string +>nameA2 : string +>"noName" : string +>skillA2 = "skill" : string +>skillA2 : string +>"skill" : string +>getRobots() : [number, string, string][] +>getRobots : () => [number, string, string][] + + console.log(nameA2); +>console.log(nameA2) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA2 : string +} +for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) { +>[numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] : (number | string)[] +>numberA2 = -1 : number +>numberA2 : number +>-1 : number +>1 : number +>nameA2 = "noName" : string +>nameA2 : string +>"noName" : string +>skillA2 = "skill" : string +>skillA2 : string +>"skill" : string +>[robotA, robotB] : [number, string, string][] +>robotA : [number, string, string] +>robotB : [number, string, string] + + console.log(nameA2); +>console.log(nameA2) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA2 : string +} +for ([nameMA = "noName", [ +>[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"]] : (string | [string, string])[] +>nameMA = "noName" : string +>nameMA : string +>"noName" : string +>[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"] : [string, string] +>[ primarySkillA = "primary", secondarySkillA = "secondary"] : [string, string] + + primarySkillA = "primary", +>primarySkillA = "primary" : string +>primarySkillA : string +>"primary" : string + + secondarySkillA = "secondary" +>secondarySkillA = "secondary" : string +>secondarySkillA : string +>"secondary" : string + +] = ["skill1", "skill2"]] of multiRobots) { +>["skill1", "skill2"] : [string, string] +>"skill1" : string +>"skill2" : string +>multiRobots : [string, [string, string]][] + + console.log(nameMA); +>console.log(nameMA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMA : string +} +for ([nameMA = "noName", [ +>[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"]] : (string | [string, string])[] +>nameMA = "noName" : string +>nameMA : string +>"noName" : string +>[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"] : [string, string] +>[ primarySkillA = "primary", secondarySkillA = "secondary"] : [string, string] + + primarySkillA = "primary", +>primarySkillA = "primary" : string +>primarySkillA : string +>"primary" : string + + secondarySkillA = "secondary" +>secondarySkillA = "secondary" : string +>secondarySkillA : string +>"secondary" : string + +] = ["skill1", "skill2"]] of getMultiRobots()) { +>["skill1", "skill2"] : [string, string] +>"skill1" : string +>"skill2" : string +>getMultiRobots() : [string, [string, string]][] +>getMultiRobots : () => [string, [string, string]][] + + console.log(nameMA); +>console.log(nameMA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMA : string +} +for ([nameMA = "noName", [ +>[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"]] : (string | [string, string])[] +>nameMA = "noName" : string +>nameMA : string +>"noName" : string +>[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["skill1", "skill2"] : [string, string] +>[ primarySkillA = "primary", secondarySkillA = "secondary"] : [string, string] + + primarySkillA = "primary", +>primarySkillA = "primary" : string +>primarySkillA : string +>"primary" : string + + secondarySkillA = "secondary" +>secondarySkillA = "secondary" : string +>secondarySkillA : string +>"secondary" : string + +] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { +>["skill1", "skill2"] : [string, string] +>"skill1" : string +>"skill2" : string +>[multiRobotA, multiRobotB] : [string, [string, string]][] +>multiRobotA : [string, [string, string]] +>multiRobotB : [string, [string, string]] + + console.log(nameMA); +>console.log(nameMA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMA : string +} + +for ([numberA3 = -1, ...robotAInfo] of robots) { +>[numberA3 = -1, ...robotAInfo] : (number | string)[] +>numberA3 = -1 : number +>numberA3 : number +>-1 : number +>1 : number +>...robotAInfo : number | string +>robotAInfo : (number | string)[] +>robots : [number, string, string][] + + console.log(numberA3); +>console.log(numberA3) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberA3 : number +} +for ([numberA3 = -1, ...robotAInfo] of getRobots()) { +>[numberA3 = -1, ...robotAInfo] : (number | string)[] +>numberA3 = -1 : number +>numberA3 : number +>-1 : number +>1 : number +>...robotAInfo : number | string +>robotAInfo : (number | string)[] +>getRobots() : [number, string, string][] +>getRobots : () => [number, string, string][] + + console.log(numberA3); +>console.log(numberA3) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberA3 : number +} +for ([numberA3 = -1, ...robotAInfo] of [robotA, robotB]) { +>[numberA3 = -1, ...robotAInfo] : (number | string)[] +>numberA3 = -1 : number +>numberA3 : number +>-1 : number +>1 : number +>...robotAInfo : number | string +>robotAInfo : (number | string)[] +>[robotA, robotB] : [number, string, string][] +>robotA : [number, string, string] +>robotB : [number, string, string] + + console.log(numberA3); +>console.log(numberA3) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberA3 : number +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.js b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.js new file mode 100644 index 00000000000..08cf3cf5466 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.js @@ -0,0 +1,152 @@ +//// [sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts] +declare var console: { + log(msg: any): void; +} +interface Robot { + name: string; + skill: string; +} + +interface MultiRobot { + name: string; + skills: { + primary?: string; + secondary?: string; + }; +} + +let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; + +function getRobots() { + return robots; +} + +function getMultiRobots() { + return multiRobots; +} + +for (let {name: nameA = "noName" } of robots) { + console.log(nameA); +} +for (let {name: nameA = "noName" } of getRobots()) { + console.log(nameA); +} +for (let {name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + { primary: "nosKill", secondary: "noSkill" } } of multiRobots) { + console.log(primaryA); +} +for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) { + console.log(primaryA); +} +for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + { primary: "nosKill", secondary: "noSkill" } } of + [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(primaryA); +} + +for (let {name: nameA = "noName", skill: skillA = "noSkill" } of robots) { + console.log(nameA); +} +for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { + console.log(nameA); +} +for (let {name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for (let { + name: nameA = "noName", + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "noSkill", secondary: "noSkill" } +} of multiRobots) { + console.log(nameA); +} +for (let { + name: nameA = "noName", + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "noSkill", secondary: "noSkill" } +} of getMultiRobots()) { + console.log(nameA); +} +for (let { + name: nameA = "noName", + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "noSkill", secondary: "noSkill" } +} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(nameA); +} + +//// [sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.js] +var robots = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +var multiRobots = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; +function getRobots() { + return robots; +} +function getMultiRobots() { + return multiRobots; +} +for (var _i = 0, robots_1 = robots; _i < robots_1.length; _i++) { + var _a = robots_1[_i].name, nameA = _a === void 0 ? "noName" : _a; + console.log(nameA); +} +for (var _b = 0, _c = getRobots(); _b < _c.length; _b++) { + var _d = _c[_b].name, nameA = _d === void 0 ? "noName" : _d; + console.log(nameA); +} +for (var _e = 0, _f = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _e < _f.length; _e++) { + var _g = _f[_e].name, nameA = _g === void 0 ? "noName" : _g; + console.log(nameA); +} +for (var _h = 0, multiRobots_1 = multiRobots; _h < multiRobots_1.length; _h++) { + var _j = multiRobots_1[_h].skills, _k = _j === void 0 ? { primary: "nosKill", secondary: "noSkill" } : _j, _l = _k.primary, primaryA = _l === void 0 ? "primary" : _l, _m = _k.secondary, secondaryA = _m === void 0 ? "secondary" : _m; + console.log(primaryA); +} +for (var _o = 0, _p = getMultiRobots(); _o < _p.length; _o++) { + var _q = _p[_o].skills, _r = _q === void 0 ? { primary: "nosKill", secondary: "noSkill" } : _q, _s = _r.primary, primaryA = _s === void 0 ? "primary" : _s, _t = _r.secondary, secondaryA = _t === void 0 ? "secondary" : _t; + console.log(primaryA); +} +for (var _u = 0, _v = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _u < _v.length; _u++) { + var _w = _v[_u].skills, _x = _w === void 0 ? { primary: "nosKill", secondary: "noSkill" } : _w, _y = _x.primary, primaryA = _y === void 0 ? "primary" : _y, _z = _x.secondary, secondaryA = _z === void 0 ? "secondary" : _z; + console.log(primaryA); +} +for (var _0 = 0, robots_2 = robots; _0 < robots_2.length; _0++) { + var _1 = robots_2[_0], _2 = _1.name, nameA = _2 === void 0 ? "noName" : _2, _3 = _1.skill, skillA = _3 === void 0 ? "noSkill" : _3; + console.log(nameA); +} +for (var _4 = 0, _5 = getRobots(); _4 < _5.length; _4++) { + var _6 = _5[_4], _7 = _6.name, nameA = _7 === void 0 ? "noName" : _7, _8 = _6.skill, skillA = _8 === void 0 ? "noSkill" : _8; + console.log(nameA); +} +for (var _9 = 0, _10 = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _9 < _10.length; _9++) { + var _11 = _10[_9], _12 = _11.name, nameA = _12 === void 0 ? "noName" : _12, _13 = _11.skill, skillA = _13 === void 0 ? "noSkill" : _13; + console.log(nameA); +} +for (var _14 = 0, multiRobots_2 = multiRobots; _14 < multiRobots_2.length; _14++) { + var _15 = multiRobots_2[_14], _16 = _15.name, nameA = _16 === void 0 ? "noName" : _16, _17 = _15.skills, _18 = _17 === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _17, _19 = _18.primary, primaryA = _19 === void 0 ? "primary" : _19, _20 = _18.secondary, secondaryA = _20 === void 0 ? "secondary" : _20; + console.log(nameA); +} +for (var _21 = 0, _22 = getMultiRobots(); _21 < _22.length; _21++) { + var _23 = _22[_21], _24 = _23.name, nameA = _24 === void 0 ? "noName" : _24, _25 = _23.skills, _26 = _25 === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _25, _27 = _26.primary, primaryA = _27 === void 0 ? "primary" : _27, _28 = _26.secondary, secondaryA = _28 === void 0 ? "secondary" : _28; + console.log(nameA); +} +for (var _29 = 0, _30 = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _29 < _30.length; _29++) { + var _31 = _30[_29], _32 = _31.name, nameA = _32 === void 0 ? "noName" : _32, _33 = _31.skills, _34 = _33 === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _33, _35 = _34.primary, primaryA = _35 === void 0 ? "primary" : _35, _36 = _34.secondary, secondaryA = _36 === void 0 ? "secondary" : _36; + console.log(nameA); +} +//# sourceMappingURL=sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.js.map new file mode 100644 index 00000000000..89313ae9027 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.js.map] +{"version":3,"file":"sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForOfObjectBindingPat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EAHhD,yEAGgD,EAF5C,iBAA6B,EAA7B,2CAA6B,EAC7B,mBAAmC,EAAnC,+CAAmC;IAIvC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.sourcemap.txt new file mode 100644 index 00000000000..e63344455ae --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.sourcemap.txt @@ -0,0 +1,2082 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.js +mapUrl: sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.js.map +sourceRoot: +sources: sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.js +sourceFile:sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts +------------------------------------------------------------------- +>>>var robots = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^ +7 > ^^^^ +8 > ^^ +9 > ^^^^^^^ +10> ^^ +11> ^^^^^ +12> ^^ +13> ^^^^^^^^ +14> ^^ +15> ^^ +16> ^^ +17> ^^^^ +18> ^^ +19> ^^^^^^^^^ +20> ^^ +21> ^^^^^ +22> ^^ +23> ^^^^^^^^^^ +24> ^^ +25> ^ +26> ^ +1 >declare var console: { + > log(msg: any): void; + >} + >interface Robot { + > name: string; + > skill: string; + >} + > + >interface MultiRobot { + > name: string; + > skills: { + > primary?: string; + > secondary?: string; + > }; + >} + > + > +2 >let +3 > robots +4 > : Robot[] = +5 > [ +6 > { +7 > name +8 > : +9 > "mower" +10> , +11> skill +12> : +13> "mowing" +14> } +15> , +16> { +17> name +18> : +19> "trimmer" +20> , +21> skill +22> : +23> "trimming" +24> } +25> ] +26> ; +1 >Emitted(1, 1) Source(17, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(17, 5) + SourceIndex(0) +3 >Emitted(1, 11) Source(17, 11) + SourceIndex(0) +4 >Emitted(1, 14) Source(17, 23) + SourceIndex(0) +5 >Emitted(1, 15) Source(17, 24) + SourceIndex(0) +6 >Emitted(1, 17) Source(17, 26) + SourceIndex(0) +7 >Emitted(1, 21) Source(17, 30) + SourceIndex(0) +8 >Emitted(1, 23) Source(17, 32) + SourceIndex(0) +9 >Emitted(1, 30) Source(17, 39) + SourceIndex(0) +10>Emitted(1, 32) Source(17, 41) + SourceIndex(0) +11>Emitted(1, 37) Source(17, 46) + SourceIndex(0) +12>Emitted(1, 39) Source(17, 48) + SourceIndex(0) +13>Emitted(1, 47) Source(17, 56) + SourceIndex(0) +14>Emitted(1, 49) Source(17, 58) + SourceIndex(0) +15>Emitted(1, 51) Source(17, 60) + SourceIndex(0) +16>Emitted(1, 53) Source(17, 62) + SourceIndex(0) +17>Emitted(1, 57) Source(17, 66) + SourceIndex(0) +18>Emitted(1, 59) Source(17, 68) + SourceIndex(0) +19>Emitted(1, 68) Source(17, 77) + SourceIndex(0) +20>Emitted(1, 70) Source(17, 79) + SourceIndex(0) +21>Emitted(1, 75) Source(17, 84) + SourceIndex(0) +22>Emitted(1, 77) Source(17, 86) + SourceIndex(0) +23>Emitted(1, 87) Source(17, 96) + SourceIndex(0) +24>Emitted(1, 89) Source(17, 98) + SourceIndex(0) +25>Emitted(1, 90) Source(17, 99) + SourceIndex(0) +26>Emitted(1, 91) Source(17, 100) + SourceIndex(0) +--- +>>>var multiRobots = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +1 > +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^ +7 > ^^^^ +8 > ^^ +9 > ^^^^^^^ +10> ^^ +11> ^^^^^^ +12> ^^ +13> ^^ +14> ^^^^^^^ +15> ^^ +16> ^^^^^^^^ +17> ^^ +18> ^^^^^^^^^ +19> ^^ +20> ^^^^^^ +21> ^^ +22> ^^ +1 > + > +2 >let +3 > multiRobots +4 > : MultiRobot[] = +5 > [ +6 > { +7 > name +8 > : +9 > "mower" +10> , +11> skills +12> : +13> { +14> primary +15> : +16> "mowing" +17> , +18> secondary +19> : +20> "none" +21> } +22> } +1 >Emitted(2, 1) Source(18, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(18, 5) + SourceIndex(0) +3 >Emitted(2, 16) Source(18, 16) + SourceIndex(0) +4 >Emitted(2, 19) Source(18, 33) + SourceIndex(0) +5 >Emitted(2, 20) Source(18, 34) + SourceIndex(0) +6 >Emitted(2, 22) Source(18, 36) + SourceIndex(0) +7 >Emitted(2, 26) Source(18, 40) + SourceIndex(0) +8 >Emitted(2, 28) Source(18, 42) + SourceIndex(0) +9 >Emitted(2, 35) Source(18, 49) + SourceIndex(0) +10>Emitted(2, 37) Source(18, 51) + SourceIndex(0) +11>Emitted(2, 43) Source(18, 57) + SourceIndex(0) +12>Emitted(2, 45) Source(18, 59) + SourceIndex(0) +13>Emitted(2, 47) Source(18, 61) + SourceIndex(0) +14>Emitted(2, 54) Source(18, 68) + SourceIndex(0) +15>Emitted(2, 56) Source(18, 70) + SourceIndex(0) +16>Emitted(2, 64) Source(18, 78) + SourceIndex(0) +17>Emitted(2, 66) Source(18, 80) + SourceIndex(0) +18>Emitted(2, 75) Source(18, 89) + SourceIndex(0) +19>Emitted(2, 77) Source(18, 91) + SourceIndex(0) +20>Emitted(2, 83) Source(18, 97) + SourceIndex(0) +21>Emitted(2, 85) Source(18, 99) + SourceIndex(0) +22>Emitted(2, 87) Source(18, 101) + SourceIndex(0) +--- +>>> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; +1 >^^^^ +2 > ^^ +3 > ^^^^ +4 > ^^ +5 > ^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^ +10> ^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^ +15> ^^ +16> ^^^^^^^^ +17> ^^ +18> ^^ +19> ^ +20> ^ +1 >, + > +2 > { +3 > name +4 > : +5 > "trimmer" +6 > , +7 > skills +8 > : +9 > { +10> primary +11> : +12> "trimming" +13> , +14> secondary +15> : +16> "edging" +17> } +18> } +19> ] +20> ; +1 >Emitted(3, 5) Source(19, 5) + SourceIndex(0) +2 >Emitted(3, 7) Source(19, 7) + SourceIndex(0) +3 >Emitted(3, 11) Source(19, 11) + SourceIndex(0) +4 >Emitted(3, 13) Source(19, 13) + SourceIndex(0) +5 >Emitted(3, 22) Source(19, 22) + SourceIndex(0) +6 >Emitted(3, 24) Source(19, 24) + SourceIndex(0) +7 >Emitted(3, 30) Source(19, 30) + SourceIndex(0) +8 >Emitted(3, 32) Source(19, 32) + SourceIndex(0) +9 >Emitted(3, 34) Source(19, 34) + SourceIndex(0) +10>Emitted(3, 41) Source(19, 41) + SourceIndex(0) +11>Emitted(3, 43) Source(19, 43) + SourceIndex(0) +12>Emitted(3, 53) Source(19, 53) + SourceIndex(0) +13>Emitted(3, 55) Source(19, 55) + SourceIndex(0) +14>Emitted(3, 64) Source(19, 64) + SourceIndex(0) +15>Emitted(3, 66) Source(19, 66) + SourceIndex(0) +16>Emitted(3, 74) Source(19, 74) + SourceIndex(0) +17>Emitted(3, 76) Source(19, 76) + SourceIndex(0) +18>Emitted(3, 78) Source(19, 78) + SourceIndex(0) +19>Emitted(3, 79) Source(19, 79) + SourceIndex(0) +20>Emitted(3, 80) Source(19, 80) + SourceIndex(0) +--- +>>>function getRobots() { +1 > +2 >^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +1 >Emitted(4, 1) Source(21, 1) + SourceIndex(0) +--- +>>> return robots; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +1->function getRobots() { + > +2 > return +3 > +4 > robots +5 > ; +1->Emitted(5, 5) Source(22, 5) + SourceIndex(0) +2 >Emitted(5, 11) Source(22, 11) + SourceIndex(0) +3 >Emitted(5, 12) Source(22, 12) + SourceIndex(0) +4 >Emitted(5, 18) Source(22, 18) + SourceIndex(0) +5 >Emitted(5, 19) Source(22, 19) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(6, 1) Source(23, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(23, 2) + SourceIndex(0) +--- +>>>function getMultiRobots() { +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +1->Emitted(7, 1) Source(25, 1) + SourceIndex(0) +--- +>>> return multiRobots; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^ +5 > ^ +1->function getMultiRobots() { + > +2 > return +3 > +4 > multiRobots +5 > ; +1->Emitted(8, 5) Source(26, 5) + SourceIndex(0) +2 >Emitted(8, 11) Source(26, 11) + SourceIndex(0) +3 >Emitted(8, 12) Source(26, 12) + SourceIndex(0) +4 >Emitted(8, 23) Source(26, 23) + SourceIndex(0) +5 >Emitted(8, 24) Source(26, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(9, 1) Source(27, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(27, 2) + SourceIndex(0) +--- +>>>for (var _i = 0, robots_1 = robots; _i < robots_1.length; _i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +13> ^^^^^^^^-> +1-> + > + > +2 >for +3 > +4 > (let {name: nameA = "noName" } of +5 > robots +6 > +7 > robots +8 > +9 > robots +10> +11> robots +12> ) +1->Emitted(10, 1) Source(29, 1) + SourceIndex(0) +2 >Emitted(10, 4) Source(29, 4) + SourceIndex(0) +3 >Emitted(10, 5) Source(29, 5) + SourceIndex(0) +4 >Emitted(10, 6) Source(29, 39) + SourceIndex(0) +5 >Emitted(10, 16) Source(29, 45) + SourceIndex(0) +6 >Emitted(10, 18) Source(29, 39) + SourceIndex(0) +7 >Emitted(10, 35) Source(29, 45) + SourceIndex(0) +8 >Emitted(10, 37) Source(29, 39) + SourceIndex(0) +9 >Emitted(10, 57) Source(29, 45) + SourceIndex(0) +10>Emitted(10, 59) Source(29, 39) + SourceIndex(0) +11>Emitted(10, 63) Source(29, 45) + SourceIndex(0) +12>Emitted(10, 64) Source(29, 46) + SourceIndex(0) +--- +>>> var _a = robots_1[_i].name, nameA = _a === void 0 ? "noName" : _a; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > name: nameA = "noName" +3 > +4 > name: nameA = "noName" +1->Emitted(11, 5) Source(29, 11) + SourceIndex(0) +2 >Emitted(11, 31) Source(29, 33) + SourceIndex(0) +3 >Emitted(11, 33) Source(29, 11) + SourceIndex(0) +4 >Emitted(11, 70) Source(29, 33) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(12, 5) Source(30, 5) + SourceIndex(0) +2 >Emitted(12, 12) Source(30, 12) + SourceIndex(0) +3 >Emitted(12, 13) Source(30, 13) + SourceIndex(0) +4 >Emitted(12, 16) Source(30, 16) + SourceIndex(0) +5 >Emitted(12, 17) Source(30, 17) + SourceIndex(0) +6 >Emitted(12, 22) Source(30, 22) + SourceIndex(0) +7 >Emitted(12, 23) Source(30, 23) + SourceIndex(0) +8 >Emitted(12, 24) Source(30, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(13, 2) Source(31, 2) + SourceIndex(0) +--- +>>>for (var _b = 0, _c = getRobots(); _b < _c.length; _b++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +15> ^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let {name: nameA = "noName" } of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> getRobots() +12> +13> getRobots() +14> ) +1->Emitted(14, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(14, 4) Source(32, 4) + SourceIndex(0) +3 >Emitted(14, 5) Source(32, 5) + SourceIndex(0) +4 >Emitted(14, 6) Source(32, 39) + SourceIndex(0) +5 >Emitted(14, 16) Source(32, 50) + SourceIndex(0) +6 >Emitted(14, 18) Source(32, 39) + SourceIndex(0) +7 >Emitted(14, 23) Source(32, 39) + SourceIndex(0) +8 >Emitted(14, 32) Source(32, 48) + SourceIndex(0) +9 >Emitted(14, 34) Source(32, 50) + SourceIndex(0) +10>Emitted(14, 36) Source(32, 39) + SourceIndex(0) +11>Emitted(14, 50) Source(32, 50) + SourceIndex(0) +12>Emitted(14, 52) Source(32, 39) + SourceIndex(0) +13>Emitted(14, 56) Source(32, 50) + SourceIndex(0) +14>Emitted(14, 57) Source(32, 51) + SourceIndex(0) +--- +>>> var _d = _c[_b].name, nameA = _d === void 0 ? "noName" : _d; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > name: nameA = "noName" +3 > +4 > name: nameA = "noName" +1->Emitted(15, 5) Source(32, 11) + SourceIndex(0) +2 >Emitted(15, 25) Source(32, 33) + SourceIndex(0) +3 >Emitted(15, 27) Source(32, 11) + SourceIndex(0) +4 >Emitted(15, 64) Source(32, 33) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(16, 5) Source(33, 5) + SourceIndex(0) +2 >Emitted(16, 12) Source(33, 12) + SourceIndex(0) +3 >Emitted(16, 13) Source(33, 13) + SourceIndex(0) +4 >Emitted(16, 16) Source(33, 16) + SourceIndex(0) +5 >Emitted(16, 17) Source(33, 17) + SourceIndex(0) +6 >Emitted(16, 22) Source(33, 22) + SourceIndex(0) +7 >Emitted(16, 23) Source(33, 23) + SourceIndex(0) +8 >Emitted(16, 24) Source(33, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(17, 2) Source(34, 2) + SourceIndex(0) +--- +>>>for (var _e = 0, _f = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _e < _f.length; _e++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^^^ +10> ^^ +11> ^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^^ +15> ^^^^^^^^ +16> ^^ +17> ^^ +18> ^^ +19> ^^^^ +20> ^^ +21> ^^^^^^^^^ +22> ^^ +23> ^^^^^ +24> ^^ +25> ^^^^^^^^^^ +26> ^^ +27> ^ +28> ^^ +29> ^^^^^^^^^^^^^^ +30> ^^ +31> ^^^^ +32> ^ +1-> + > +2 >for +3 > +4 > (let {name: nameA = "noName" } of +5 > [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +6 > +7 > [ +8 > { +9 > name +10> : +11> "mower" +12> , +13> skill +14> : +15> "mowing" +16> } +17> , +18> { +19> name +20> : +21> "trimmer" +22> , +23> skill +24> : +25> "trimming" +26> } +27> ] +28> +29> [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +30> +31> [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +32> ) +1->Emitted(18, 1) Source(35, 1) + SourceIndex(0) +2 >Emitted(18, 4) Source(35, 4) + SourceIndex(0) +3 >Emitted(18, 5) Source(35, 5) + SourceIndex(0) +4 >Emitted(18, 6) Source(35, 39) + SourceIndex(0) +5 >Emitted(18, 16) Source(35, 115) + SourceIndex(0) +6 >Emitted(18, 18) Source(35, 39) + SourceIndex(0) +7 >Emitted(18, 24) Source(35, 40) + SourceIndex(0) +8 >Emitted(18, 26) Source(35, 42) + SourceIndex(0) +9 >Emitted(18, 30) Source(35, 46) + SourceIndex(0) +10>Emitted(18, 32) Source(35, 48) + SourceIndex(0) +11>Emitted(18, 39) Source(35, 55) + SourceIndex(0) +12>Emitted(18, 41) Source(35, 57) + SourceIndex(0) +13>Emitted(18, 46) Source(35, 62) + SourceIndex(0) +14>Emitted(18, 48) Source(35, 64) + SourceIndex(0) +15>Emitted(18, 56) Source(35, 72) + SourceIndex(0) +16>Emitted(18, 58) Source(35, 74) + SourceIndex(0) +17>Emitted(18, 60) Source(35, 76) + SourceIndex(0) +18>Emitted(18, 62) Source(35, 78) + SourceIndex(0) +19>Emitted(18, 66) Source(35, 82) + SourceIndex(0) +20>Emitted(18, 68) Source(35, 84) + SourceIndex(0) +21>Emitted(18, 77) Source(35, 93) + SourceIndex(0) +22>Emitted(18, 79) Source(35, 95) + SourceIndex(0) +23>Emitted(18, 84) Source(35, 100) + SourceIndex(0) +24>Emitted(18, 86) Source(35, 102) + SourceIndex(0) +25>Emitted(18, 96) Source(35, 112) + SourceIndex(0) +26>Emitted(18, 98) Source(35, 114) + SourceIndex(0) +27>Emitted(18, 99) Source(35, 115) + SourceIndex(0) +28>Emitted(18, 101) Source(35, 39) + SourceIndex(0) +29>Emitted(18, 115) Source(35, 115) + SourceIndex(0) +30>Emitted(18, 117) Source(35, 39) + SourceIndex(0) +31>Emitted(18, 121) Source(35, 115) + SourceIndex(0) +32>Emitted(18, 122) Source(35, 116) + SourceIndex(0) +--- +>>> var _g = _f[_e].name, nameA = _g === void 0 ? "noName" : _g; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > name: nameA = "noName" +3 > +4 > name: nameA = "noName" +1 >Emitted(19, 5) Source(35, 11) + SourceIndex(0) +2 >Emitted(19, 25) Source(35, 33) + SourceIndex(0) +3 >Emitted(19, 27) Source(35, 11) + SourceIndex(0) +4 >Emitted(19, 64) Source(35, 33) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(20, 5) Source(36, 5) + SourceIndex(0) +2 >Emitted(20, 12) Source(36, 12) + SourceIndex(0) +3 >Emitted(20, 13) Source(36, 13) + SourceIndex(0) +4 >Emitted(20, 16) Source(36, 16) + SourceIndex(0) +5 >Emitted(20, 17) Source(36, 17) + SourceIndex(0) +6 >Emitted(20, 22) Source(36, 22) + SourceIndex(0) +7 >Emitted(20, 23) Source(36, 23) + SourceIndex(0) +8 >Emitted(20, 24) Source(36, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(21, 2) Source(37, 2) + SourceIndex(0) +--- +>>>for (var _h = 0, multiRobots_1 = multiRobots; _h < multiRobots_1.length; _h++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } } of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > multiRobots +10> +11> multiRobots +12> ) +1->Emitted(22, 1) Source(38, 1) + SourceIndex(0) +2 >Emitted(22, 4) Source(38, 4) + SourceIndex(0) +3 >Emitted(22, 5) Source(38, 5) + SourceIndex(0) +4 >Emitted(22, 6) Source(39, 55) + SourceIndex(0) +5 >Emitted(22, 16) Source(39, 66) + SourceIndex(0) +6 >Emitted(22, 18) Source(39, 55) + SourceIndex(0) +7 >Emitted(22, 45) Source(39, 66) + SourceIndex(0) +8 >Emitted(22, 47) Source(39, 55) + SourceIndex(0) +9 >Emitted(22, 72) Source(39, 66) + SourceIndex(0) +10>Emitted(22, 74) Source(39, 55) + SourceIndex(0) +11>Emitted(22, 78) Source(39, 66) + SourceIndex(0) +12>Emitted(22, 79) Source(39, 67) + SourceIndex(0) +--- +>>> var _j = multiRobots_1[_h].skills, _k = _j === void 0 ? { primary: "nosKill", secondary: "noSkill" } : _j, _l = _k.primary, primaryA = _l === void 0 ? "primary" : _l, _m = _k.secondary, secondaryA = _m === void 0 ? "secondary" : _m; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } +3 > +4 > skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } +5 > +6 > primary: primaryA = "primary" +7 > +8 > primary: primaryA = "primary" +9 > , +10> secondary: secondaryA = "secondary" +11> +12> secondary: secondaryA = "secondary" +1->Emitted(23, 5) Source(38, 12) + SourceIndex(0) +2 >Emitted(23, 38) Source(39, 49) + SourceIndex(0) +3 >Emitted(23, 40) Source(38, 12) + SourceIndex(0) +4 >Emitted(23, 110) Source(39, 49) + SourceIndex(0) +5 >Emitted(23, 112) Source(38, 22) + SourceIndex(0) +6 >Emitted(23, 127) Source(38, 51) + SourceIndex(0) +7 >Emitted(23, 129) Source(38, 22) + SourceIndex(0) +8 >Emitted(23, 170) Source(38, 51) + SourceIndex(0) +9 >Emitted(23, 172) Source(38, 53) + SourceIndex(0) +10>Emitted(23, 189) Source(38, 88) + SourceIndex(0) +11>Emitted(23, 191) Source(38, 53) + SourceIndex(0) +12>Emitted(23, 236) Source(38, 88) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > } = + > { primary: "nosKill", secondary: "noSkill" } } of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(24, 5) Source(40, 5) + SourceIndex(0) +2 >Emitted(24, 12) Source(40, 12) + SourceIndex(0) +3 >Emitted(24, 13) Source(40, 13) + SourceIndex(0) +4 >Emitted(24, 16) Source(40, 16) + SourceIndex(0) +5 >Emitted(24, 17) Source(40, 17) + SourceIndex(0) +6 >Emitted(24, 25) Source(40, 25) + SourceIndex(0) +7 >Emitted(24, 26) Source(40, 26) + SourceIndex(0) +8 >Emitted(24, 27) Source(40, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(25, 2) Source(41, 2) + SourceIndex(0) +--- +>>>for (var _o = 0, _p = getMultiRobots(); _o < _p.length; _o++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } } of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> getMultiRobots() +12> +13> getMultiRobots() +14> ) +1->Emitted(26, 1) Source(42, 1) + SourceIndex(0) +2 >Emitted(26, 4) Source(42, 4) + SourceIndex(0) +3 >Emitted(26, 5) Source(42, 5) + SourceIndex(0) +4 >Emitted(26, 6) Source(43, 55) + SourceIndex(0) +5 >Emitted(26, 16) Source(43, 71) + SourceIndex(0) +6 >Emitted(26, 18) Source(43, 55) + SourceIndex(0) +7 >Emitted(26, 23) Source(43, 55) + SourceIndex(0) +8 >Emitted(26, 37) Source(43, 69) + SourceIndex(0) +9 >Emitted(26, 39) Source(43, 71) + SourceIndex(0) +10>Emitted(26, 41) Source(43, 55) + SourceIndex(0) +11>Emitted(26, 55) Source(43, 71) + SourceIndex(0) +12>Emitted(26, 57) Source(43, 55) + SourceIndex(0) +13>Emitted(26, 61) Source(43, 71) + SourceIndex(0) +14>Emitted(26, 62) Source(43, 72) + SourceIndex(0) +--- +>>> var _q = _p[_o].skills, _r = _q === void 0 ? { primary: "nosKill", secondary: "noSkill" } : _q, _s = _r.primary, primaryA = _s === void 0 ? "primary" : _s, _t = _r.secondary, secondaryA = _t === void 0 ? "secondary" : _t; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } +3 > +4 > skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } +5 > +6 > primary: primaryA = "primary" +7 > +8 > primary: primaryA = "primary" +9 > , +10> secondary: secondaryA = "secondary" +11> +12> secondary: secondaryA = "secondary" +1->Emitted(27, 5) Source(42, 12) + SourceIndex(0) +2 >Emitted(27, 27) Source(43, 49) + SourceIndex(0) +3 >Emitted(27, 29) Source(42, 12) + SourceIndex(0) +4 >Emitted(27, 99) Source(43, 49) + SourceIndex(0) +5 >Emitted(27, 101) Source(42, 22) + SourceIndex(0) +6 >Emitted(27, 116) Source(42, 51) + SourceIndex(0) +7 >Emitted(27, 118) Source(42, 22) + SourceIndex(0) +8 >Emitted(27, 159) Source(42, 51) + SourceIndex(0) +9 >Emitted(27, 161) Source(42, 53) + SourceIndex(0) +10>Emitted(27, 178) Source(42, 88) + SourceIndex(0) +11>Emitted(27, 180) Source(42, 53) + SourceIndex(0) +12>Emitted(27, 225) Source(42, 88) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > } = + > { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(28, 5) Source(44, 5) + SourceIndex(0) +2 >Emitted(28, 12) Source(44, 12) + SourceIndex(0) +3 >Emitted(28, 13) Source(44, 13) + SourceIndex(0) +4 >Emitted(28, 16) Source(44, 16) + SourceIndex(0) +5 >Emitted(28, 17) Source(44, 17) + SourceIndex(0) +6 >Emitted(28, 25) Source(44, 25) + SourceIndex(0) +7 >Emitted(28, 26) Source(44, 26) + SourceIndex(0) +8 >Emitted(28, 27) Source(44, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(29, 2) Source(45, 2) + SourceIndex(0) +--- +>>>for (var _u = 0, _v = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^ +9 > ^^ +10> ^^^^ +11> ^^ +12> ^^^^^^^ +13> ^^ +14> ^^^^^^ +15> ^^ +16> ^^ +17> ^^^^^^^ +18> ^^ +19> ^^^^^^^^ +20> ^^ +21> ^^^^^^^^^ +22> ^^ +23> ^^^^^^ +24> ^^ +25> ^^ +26> ^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } } of + > +5 > [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +6 > +7 > +8 > [ +9 > { +10> name +11> : +12> "mower" +13> , +14> skills +15> : +16> { +17> primary +18> : +19> "mowing" +20> , +21> secondary +22> : +23> "none" +24> } +25> } +1->Emitted(30, 1) Source(46, 1) + SourceIndex(0) +2 >Emitted(30, 4) Source(46, 4) + SourceIndex(0) +3 >Emitted(30, 5) Source(46, 5) + SourceIndex(0) +4 >Emitted(30, 6) Source(48, 5) + SourceIndex(0) +5 >Emitted(30, 16) Source(49, 79) + SourceIndex(0) +6 >Emitted(30, 18) Source(48, 5) + SourceIndex(0) +7 >Emitted(30, 23) Source(48, 19) + SourceIndex(0) +8 >Emitted(30, 24) Source(48, 20) + SourceIndex(0) +9 >Emitted(30, 26) Source(48, 22) + SourceIndex(0) +10>Emitted(30, 30) Source(48, 26) + SourceIndex(0) +11>Emitted(30, 32) Source(48, 28) + SourceIndex(0) +12>Emitted(30, 39) Source(48, 35) + SourceIndex(0) +13>Emitted(30, 41) Source(48, 37) + SourceIndex(0) +14>Emitted(30, 47) Source(48, 43) + SourceIndex(0) +15>Emitted(30, 49) Source(48, 45) + SourceIndex(0) +16>Emitted(30, 51) Source(48, 47) + SourceIndex(0) +17>Emitted(30, 58) Source(48, 54) + SourceIndex(0) +18>Emitted(30, 60) Source(48, 56) + SourceIndex(0) +19>Emitted(30, 68) Source(48, 64) + SourceIndex(0) +20>Emitted(30, 70) Source(48, 66) + SourceIndex(0) +21>Emitted(30, 79) Source(48, 75) + SourceIndex(0) +22>Emitted(30, 81) Source(48, 77) + SourceIndex(0) +23>Emitted(30, 87) Source(48, 83) + SourceIndex(0) +24>Emitted(30, 89) Source(48, 85) + SourceIndex(0) +25>Emitted(30, 91) Source(48, 87) + SourceIndex(0) +--- +>>> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _u < _v.length; _u++) { +1->^^^^ +2 > ^^ +3 > ^^^^ +4 > ^^ +5 > ^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^ +10> ^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^ +15> ^^ +16> ^^^^^^^^ +17> ^^ +18> ^^ +19> ^ +20> ^^ +21> ^^^^^^^^^^^^^^ +22> ^^ +23> ^^^^ +24> ^ +25> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1->, + > +2 > { +3 > name +4 > : +5 > "trimmer" +6 > , +7 > skills +8 > : +9 > { +10> primary +11> : +12> "trimming" +13> , +14> secondary +15> : +16> "edging" +17> } +18> } +19> ] +20> +21> [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +22> +23> [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +24> ) +1->Emitted(31, 5) Source(49, 5) + SourceIndex(0) +2 >Emitted(31, 7) Source(49, 7) + SourceIndex(0) +3 >Emitted(31, 11) Source(49, 11) + SourceIndex(0) +4 >Emitted(31, 13) Source(49, 13) + SourceIndex(0) +5 >Emitted(31, 22) Source(49, 22) + SourceIndex(0) +6 >Emitted(31, 24) Source(49, 24) + SourceIndex(0) +7 >Emitted(31, 30) Source(49, 30) + SourceIndex(0) +8 >Emitted(31, 32) Source(49, 32) + SourceIndex(0) +9 >Emitted(31, 34) Source(49, 34) + SourceIndex(0) +10>Emitted(31, 41) Source(49, 41) + SourceIndex(0) +11>Emitted(31, 43) Source(49, 43) + SourceIndex(0) +12>Emitted(31, 53) Source(49, 53) + SourceIndex(0) +13>Emitted(31, 55) Source(49, 55) + SourceIndex(0) +14>Emitted(31, 64) Source(49, 64) + SourceIndex(0) +15>Emitted(31, 66) Source(49, 66) + SourceIndex(0) +16>Emitted(31, 74) Source(49, 74) + SourceIndex(0) +17>Emitted(31, 76) Source(49, 76) + SourceIndex(0) +18>Emitted(31, 78) Source(49, 78) + SourceIndex(0) +19>Emitted(31, 79) Source(49, 79) + SourceIndex(0) +20>Emitted(31, 81) Source(48, 5) + SourceIndex(0) +21>Emitted(31, 95) Source(49, 79) + SourceIndex(0) +22>Emitted(31, 97) Source(48, 5) + SourceIndex(0) +23>Emitted(31, 101) Source(49, 79) + SourceIndex(0) +24>Emitted(31, 102) Source(49, 80) + SourceIndex(0) +--- +>>> var _w = _v[_u].skills, _x = _w === void 0 ? { primary: "nosKill", secondary: "noSkill" } : _w, _y = _x.primary, primaryA = _y === void 0 ? "primary" : _y, _z = _x.secondary, secondaryA = _z === void 0 ? "secondary" : _z; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } +3 > +4 > skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } +5 > +6 > primary: primaryA = "primary" +7 > +8 > primary: primaryA = "primary" +9 > , +10> secondary: secondaryA = "secondary" +11> +12> secondary: secondaryA = "secondary" +1->Emitted(32, 5) Source(46, 12) + SourceIndex(0) +2 >Emitted(32, 27) Source(47, 49) + SourceIndex(0) +3 >Emitted(32, 29) Source(46, 12) + SourceIndex(0) +4 >Emitted(32, 99) Source(47, 49) + SourceIndex(0) +5 >Emitted(32, 101) Source(46, 22) + SourceIndex(0) +6 >Emitted(32, 116) Source(46, 51) + SourceIndex(0) +7 >Emitted(32, 118) Source(46, 22) + SourceIndex(0) +8 >Emitted(32, 159) Source(46, 51) + SourceIndex(0) +9 >Emitted(32, 161) Source(46, 53) + SourceIndex(0) +10>Emitted(32, 178) Source(46, 88) + SourceIndex(0) +11>Emitted(32, 180) Source(46, 53) + SourceIndex(0) +12>Emitted(32, 225) Source(46, 88) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > } = + > { primary: "nosKill", secondary: "noSkill" } } of + > [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(33, 5) Source(50, 5) + SourceIndex(0) +2 >Emitted(33, 12) Source(50, 12) + SourceIndex(0) +3 >Emitted(33, 13) Source(50, 13) + SourceIndex(0) +4 >Emitted(33, 16) Source(50, 16) + SourceIndex(0) +5 >Emitted(33, 17) Source(50, 17) + SourceIndex(0) +6 >Emitted(33, 25) Source(50, 25) + SourceIndex(0) +7 >Emitted(33, 26) Source(50, 26) + SourceIndex(0) +8 >Emitted(33, 27) Source(50, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(34, 2) Source(51, 2) + SourceIndex(0) +--- +>>>for (var _0 = 0, robots_2 = robots; _0 < robots_2.length; _0++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +2 >for +3 > +4 > (let {name: nameA = "noName", skill: skillA = "noSkill" } of +5 > robots +6 > +7 > robots +8 > +9 > robots +10> +11> robots +12> ) +1->Emitted(35, 1) Source(53, 1) + SourceIndex(0) +2 >Emitted(35, 4) Source(53, 4) + SourceIndex(0) +3 >Emitted(35, 5) Source(53, 5) + SourceIndex(0) +4 >Emitted(35, 6) Source(53, 66) + SourceIndex(0) +5 >Emitted(35, 16) Source(53, 72) + SourceIndex(0) +6 >Emitted(35, 18) Source(53, 66) + SourceIndex(0) +7 >Emitted(35, 35) Source(53, 72) + SourceIndex(0) +8 >Emitted(35, 37) Source(53, 66) + SourceIndex(0) +9 >Emitted(35, 57) Source(53, 72) + SourceIndex(0) +10>Emitted(35, 59) Source(53, 66) + SourceIndex(0) +11>Emitted(35, 63) Source(53, 72) + SourceIndex(0) +12>Emitted(35, 64) Source(53, 73) + SourceIndex(0) +--- +>>> var _1 = robots_2[_0], _2 = _1.name, nameA = _2 === void 0 ? "noName" : _2, _3 = _1.skill, skillA = _3 === void 0 ? "noSkill" : _3; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let {name: nameA = "noName", skill: skillA = "noSkill" } +3 > +4 > name: nameA = "noName" +5 > +6 > name: nameA = "noName" +7 > , +8 > skill: skillA = "noSkill" +9 > +10> skill: skillA = "noSkill" +1->Emitted(36, 5) Source(53, 6) + SourceIndex(0) +2 >Emitted(36, 26) Source(53, 62) + SourceIndex(0) +3 >Emitted(36, 28) Source(53, 11) + SourceIndex(0) +4 >Emitted(36, 40) Source(53, 33) + SourceIndex(0) +5 >Emitted(36, 42) Source(53, 11) + SourceIndex(0) +6 >Emitted(36, 79) Source(53, 33) + SourceIndex(0) +7 >Emitted(36, 81) Source(53, 35) + SourceIndex(0) +8 >Emitted(36, 94) Source(53, 60) + SourceIndex(0) +9 >Emitted(36, 96) Source(53, 35) + SourceIndex(0) +10>Emitted(36, 135) Source(53, 60) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(37, 5) Source(54, 5) + SourceIndex(0) +2 >Emitted(37, 12) Source(54, 12) + SourceIndex(0) +3 >Emitted(37, 13) Source(54, 13) + SourceIndex(0) +4 >Emitted(37, 16) Source(54, 16) + SourceIndex(0) +5 >Emitted(37, 17) Source(54, 17) + SourceIndex(0) +6 >Emitted(37, 22) Source(54, 22) + SourceIndex(0) +7 >Emitted(37, 23) Source(54, 23) + SourceIndex(0) +8 >Emitted(37, 24) Source(54, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(38, 2) Source(55, 2) + SourceIndex(0) +--- +>>>for (var _4 = 0, _5 = getRobots(); _4 < _5.length; _4++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let {name: nameA = "noName", skill: skillA = "noSkill" } of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> getRobots() +12> +13> getRobots() +14> ) +1->Emitted(39, 1) Source(56, 1) + SourceIndex(0) +2 >Emitted(39, 4) Source(56, 4) + SourceIndex(0) +3 >Emitted(39, 5) Source(56, 5) + SourceIndex(0) +4 >Emitted(39, 6) Source(56, 67) + SourceIndex(0) +5 >Emitted(39, 16) Source(56, 78) + SourceIndex(0) +6 >Emitted(39, 18) Source(56, 67) + SourceIndex(0) +7 >Emitted(39, 23) Source(56, 67) + SourceIndex(0) +8 >Emitted(39, 32) Source(56, 76) + SourceIndex(0) +9 >Emitted(39, 34) Source(56, 78) + SourceIndex(0) +10>Emitted(39, 36) Source(56, 67) + SourceIndex(0) +11>Emitted(39, 50) Source(56, 78) + SourceIndex(0) +12>Emitted(39, 52) Source(56, 67) + SourceIndex(0) +13>Emitted(39, 56) Source(56, 78) + SourceIndex(0) +14>Emitted(39, 57) Source(56, 79) + SourceIndex(0) +--- +>>> var _6 = _5[_4], _7 = _6.name, nameA = _7 === void 0 ? "noName" : _7, _8 = _6.skill, skillA = _8 === void 0 ? "noSkill" : _8; +1->^^^^ +2 > ^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let {name: nameA = "noName", skill: skillA = "noSkill" } +3 > +4 > name: nameA = "noName" +5 > +6 > name: nameA = "noName" +7 > , +8 > skill: skillA = "noSkill" +9 > +10> skill: skillA = "noSkill" +1->Emitted(40, 5) Source(56, 6) + SourceIndex(0) +2 >Emitted(40, 20) Source(56, 63) + SourceIndex(0) +3 >Emitted(40, 22) Source(56, 11) + SourceIndex(0) +4 >Emitted(40, 34) Source(56, 33) + SourceIndex(0) +5 >Emitted(40, 36) Source(56, 11) + SourceIndex(0) +6 >Emitted(40, 73) Source(56, 33) + SourceIndex(0) +7 >Emitted(40, 75) Source(56, 35) + SourceIndex(0) +8 >Emitted(40, 88) Source(56, 60) + SourceIndex(0) +9 >Emitted(40, 90) Source(56, 35) + SourceIndex(0) +10>Emitted(40, 129) Source(56, 60) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(41, 5) Source(57, 5) + SourceIndex(0) +2 >Emitted(41, 12) Source(57, 12) + SourceIndex(0) +3 >Emitted(41, 13) Source(57, 13) + SourceIndex(0) +4 >Emitted(41, 16) Source(57, 16) + SourceIndex(0) +5 >Emitted(41, 17) Source(57, 17) + SourceIndex(0) +6 >Emitted(41, 22) Source(57, 22) + SourceIndex(0) +7 >Emitted(41, 23) Source(57, 23) + SourceIndex(0) +8 >Emitted(41, 24) Source(57, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(42, 2) Source(58, 2) + SourceIndex(0) +--- +>>>for (var _9 = 0, _10 = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _9 < _10.length; _9++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^ +9 > ^^^^ +10> ^^ +11> ^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^^ +15> ^^^^^^^^ +16> ^^ +17> ^^ +18> ^^ +19> ^^^^ +20> ^^ +21> ^^^^^^^^^ +22> ^^ +23> ^^^^^ +24> ^^ +25> ^^^^^^^^^^ +26> ^^ +27> ^ +28> ^^ +29> ^^^^^^^^^^^^^^^ +30> ^^ +31> ^^^^ +32> ^ +33> ^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let {name: nameA = "noName", skill: skillA = "noSkill" } of +5 > [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +6 > +7 > [ +8 > { +9 > name +10> : +11> "mower" +12> , +13> skill +14> : +15> "mowing" +16> } +17> , +18> { +19> name +20> : +21> "trimmer" +22> , +23> skill +24> : +25> "trimming" +26> } +27> ] +28> +29> [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +30> +31> [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +32> ) +1->Emitted(43, 1) Source(59, 1) + SourceIndex(0) +2 >Emitted(43, 4) Source(59, 4) + SourceIndex(0) +3 >Emitted(43, 5) Source(59, 5) + SourceIndex(0) +4 >Emitted(43, 6) Source(59, 67) + SourceIndex(0) +5 >Emitted(43, 16) Source(59, 143) + SourceIndex(0) +6 >Emitted(43, 18) Source(59, 67) + SourceIndex(0) +7 >Emitted(43, 25) Source(59, 68) + SourceIndex(0) +8 >Emitted(43, 27) Source(59, 70) + SourceIndex(0) +9 >Emitted(43, 31) Source(59, 74) + SourceIndex(0) +10>Emitted(43, 33) Source(59, 76) + SourceIndex(0) +11>Emitted(43, 40) Source(59, 83) + SourceIndex(0) +12>Emitted(43, 42) Source(59, 85) + SourceIndex(0) +13>Emitted(43, 47) Source(59, 90) + SourceIndex(0) +14>Emitted(43, 49) Source(59, 92) + SourceIndex(0) +15>Emitted(43, 57) Source(59, 100) + SourceIndex(0) +16>Emitted(43, 59) Source(59, 102) + SourceIndex(0) +17>Emitted(43, 61) Source(59, 104) + SourceIndex(0) +18>Emitted(43, 63) Source(59, 106) + SourceIndex(0) +19>Emitted(43, 67) Source(59, 110) + SourceIndex(0) +20>Emitted(43, 69) Source(59, 112) + SourceIndex(0) +21>Emitted(43, 78) Source(59, 121) + SourceIndex(0) +22>Emitted(43, 80) Source(59, 123) + SourceIndex(0) +23>Emitted(43, 85) Source(59, 128) + SourceIndex(0) +24>Emitted(43, 87) Source(59, 130) + SourceIndex(0) +25>Emitted(43, 97) Source(59, 140) + SourceIndex(0) +26>Emitted(43, 99) Source(59, 142) + SourceIndex(0) +27>Emitted(43, 100) Source(59, 143) + SourceIndex(0) +28>Emitted(43, 102) Source(59, 67) + SourceIndex(0) +29>Emitted(43, 117) Source(59, 143) + SourceIndex(0) +30>Emitted(43, 119) Source(59, 67) + SourceIndex(0) +31>Emitted(43, 123) Source(59, 143) + SourceIndex(0) +32>Emitted(43, 124) Source(59, 144) + SourceIndex(0) +--- +>>> var _11 = _10[_9], _12 = _11.name, nameA = _12 === void 0 ? "noName" : _12, _13 = _11.skill, skillA = _13 === void 0 ? "noSkill" : _13; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let {name: nameA = "noName", skill: skillA = "noSkill" } +3 > +4 > name: nameA = "noName" +5 > +6 > name: nameA = "noName" +7 > , +8 > skill: skillA = "noSkill" +9 > +10> skill: skillA = "noSkill" +1->Emitted(44, 5) Source(59, 6) + SourceIndex(0) +2 >Emitted(44, 22) Source(59, 63) + SourceIndex(0) +3 >Emitted(44, 24) Source(59, 11) + SourceIndex(0) +4 >Emitted(44, 38) Source(59, 33) + SourceIndex(0) +5 >Emitted(44, 40) Source(59, 11) + SourceIndex(0) +6 >Emitted(44, 79) Source(59, 33) + SourceIndex(0) +7 >Emitted(44, 81) Source(59, 35) + SourceIndex(0) +8 >Emitted(44, 96) Source(59, 60) + SourceIndex(0) +9 >Emitted(44, 98) Source(59, 35) + SourceIndex(0) +10>Emitted(44, 139) Source(59, 60) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(45, 5) Source(60, 5) + SourceIndex(0) +2 >Emitted(45, 12) Source(60, 12) + SourceIndex(0) +3 >Emitted(45, 13) Source(60, 13) + SourceIndex(0) +4 >Emitted(45, 16) Source(60, 16) + SourceIndex(0) +5 >Emitted(45, 17) Source(60, 17) + SourceIndex(0) +6 >Emitted(45, 22) Source(60, 22) + SourceIndex(0) +7 >Emitted(45, 23) Source(60, 23) + SourceIndex(0) +8 >Emitted(45, 24) Source(60, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(46, 2) Source(61, 2) + SourceIndex(0) +--- +>>>for (var _14 = 0, multiRobots_2 = multiRobots; _14 < multiRobots_2.length; _14++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^ +12> ^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let { + > name: nameA = "noName", + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + > } of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > multiRobots +10> +11> multiRobots +12> ) +1->Emitted(47, 1) Source(62, 1) + SourceIndex(0) +2 >Emitted(47, 4) Source(62, 4) + SourceIndex(0) +3 >Emitted(47, 5) Source(62, 5) + SourceIndex(0) +4 >Emitted(47, 6) Source(68, 6) + SourceIndex(0) +5 >Emitted(47, 17) Source(68, 17) + SourceIndex(0) +6 >Emitted(47, 19) Source(68, 6) + SourceIndex(0) +7 >Emitted(47, 46) Source(68, 17) + SourceIndex(0) +8 >Emitted(47, 48) Source(68, 6) + SourceIndex(0) +9 >Emitted(47, 74) Source(68, 17) + SourceIndex(0) +10>Emitted(47, 76) Source(68, 6) + SourceIndex(0) +11>Emitted(47, 81) Source(68, 17) + SourceIndex(0) +12>Emitted(47, 82) Source(68, 18) + SourceIndex(0) +--- +>>> var _15 = multiRobots_2[_14], _16 = _15.name, nameA = _16 === void 0 ? "noName" : _16, _17 = _15.skills, _18 = _17 === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _17, _19 = _18.primary, primaryA = _19 === void 0 ? "primary" : _19, _20 = _18.secondary, secondaryA = _20 === void 0 ? "secondary" : _20; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let { + > name: nameA = "noName", + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + > } +3 > +4 > name: nameA = "noName" +5 > +6 > name: nameA = "noName" +7 > , + > +8 > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } +9 > +10> skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } +11> +12> primary: primaryA = "primary" +13> +14> primary: primaryA = "primary" +15> , + > +16> secondary: secondaryA = "secondary" +17> +18> secondary: secondaryA = "secondary" +1->Emitted(48, 5) Source(62, 6) + SourceIndex(0) +2 >Emitted(48, 33) Source(68, 2) + SourceIndex(0) +3 >Emitted(48, 35) Source(63, 5) + SourceIndex(0) +4 >Emitted(48, 49) Source(63, 27) + SourceIndex(0) +5 >Emitted(48, 51) Source(63, 5) + SourceIndex(0) +6 >Emitted(48, 90) Source(63, 27) + SourceIndex(0) +7 >Emitted(48, 92) Source(64, 5) + SourceIndex(0) +8 >Emitted(48, 108) Source(67, 53) + SourceIndex(0) +9 >Emitted(48, 110) Source(64, 5) + SourceIndex(0) +10>Emitted(48, 183) Source(67, 53) + SourceIndex(0) +11>Emitted(48, 185) Source(65, 9) + SourceIndex(0) +12>Emitted(48, 202) Source(65, 38) + SourceIndex(0) +13>Emitted(48, 204) Source(65, 9) + SourceIndex(0) +14>Emitted(48, 247) Source(65, 38) + SourceIndex(0) +15>Emitted(48, 249) Source(66, 9) + SourceIndex(0) +16>Emitted(48, 268) Source(66, 44) + SourceIndex(0) +17>Emitted(48, 270) Source(66, 9) + SourceIndex(0) +18>Emitted(48, 317) Source(66, 44) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > } = { primary: "noSkill", secondary: "noSkill" } + >} of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(49, 5) Source(69, 5) + SourceIndex(0) +2 >Emitted(49, 12) Source(69, 12) + SourceIndex(0) +3 >Emitted(49, 13) Source(69, 13) + SourceIndex(0) +4 >Emitted(49, 16) Source(69, 16) + SourceIndex(0) +5 >Emitted(49, 17) Source(69, 17) + SourceIndex(0) +6 >Emitted(49, 22) Source(69, 22) + SourceIndex(0) +7 >Emitted(49, 23) Source(69, 23) + SourceIndex(0) +8 >Emitted(49, 24) Source(69, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(50, 2) Source(70, 2) + SourceIndex(0) +--- +>>>for (var _21 = 0, _22 = getMultiRobots(); _21 < _22.length; _21++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let { + > name: nameA = "noName", + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + > } of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> getMultiRobots() +12> +13> getMultiRobots() +14> ) +1->Emitted(51, 1) Source(71, 1) + SourceIndex(0) +2 >Emitted(51, 4) Source(71, 4) + SourceIndex(0) +3 >Emitted(51, 5) Source(71, 5) + SourceIndex(0) +4 >Emitted(51, 6) Source(77, 6) + SourceIndex(0) +5 >Emitted(51, 17) Source(77, 22) + SourceIndex(0) +6 >Emitted(51, 19) Source(77, 6) + SourceIndex(0) +7 >Emitted(51, 25) Source(77, 6) + SourceIndex(0) +8 >Emitted(51, 39) Source(77, 20) + SourceIndex(0) +9 >Emitted(51, 41) Source(77, 22) + SourceIndex(0) +10>Emitted(51, 43) Source(77, 6) + SourceIndex(0) +11>Emitted(51, 59) Source(77, 22) + SourceIndex(0) +12>Emitted(51, 61) Source(77, 6) + SourceIndex(0) +13>Emitted(51, 66) Source(77, 22) + SourceIndex(0) +14>Emitted(51, 67) Source(77, 23) + SourceIndex(0) +--- +>>> var _23 = _22[_21], _24 = _23.name, nameA = _24 === void 0 ? "noName" : _24, _25 = _23.skills, _26 = _25 === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _25, _27 = _26.primary, primaryA = _27 === void 0 ? "primary" : _27, _28 = _26.secondary, secondaryA = _28 === void 0 ? "secondary" : _28; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let { + > name: nameA = "noName", + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + > } +3 > +4 > name: nameA = "noName" +5 > +6 > name: nameA = "noName" +7 > , + > +8 > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } +9 > +10> skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } +11> +12> primary: primaryA = "primary" +13> +14> primary: primaryA = "primary" +15> , + > +16> secondary: secondaryA = "secondary" +17> +18> secondary: secondaryA = "secondary" +1->Emitted(52, 5) Source(71, 6) + SourceIndex(0) +2 >Emitted(52, 23) Source(77, 2) + SourceIndex(0) +3 >Emitted(52, 25) Source(72, 5) + SourceIndex(0) +4 >Emitted(52, 39) Source(72, 27) + SourceIndex(0) +5 >Emitted(52, 41) Source(72, 5) + SourceIndex(0) +6 >Emitted(52, 80) Source(72, 27) + SourceIndex(0) +7 >Emitted(52, 82) Source(73, 5) + SourceIndex(0) +8 >Emitted(52, 98) Source(76, 53) + SourceIndex(0) +9 >Emitted(52, 100) Source(73, 5) + SourceIndex(0) +10>Emitted(52, 173) Source(76, 53) + SourceIndex(0) +11>Emitted(52, 175) Source(74, 9) + SourceIndex(0) +12>Emitted(52, 192) Source(74, 38) + SourceIndex(0) +13>Emitted(52, 194) Source(74, 9) + SourceIndex(0) +14>Emitted(52, 237) Source(74, 38) + SourceIndex(0) +15>Emitted(52, 239) Source(75, 9) + SourceIndex(0) +16>Emitted(52, 258) Source(75, 44) + SourceIndex(0) +17>Emitted(52, 260) Source(75, 9) + SourceIndex(0) +18>Emitted(52, 307) Source(75, 44) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > } = { primary: "noSkill", secondary: "noSkill" } + >} of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(53, 5) Source(78, 5) + SourceIndex(0) +2 >Emitted(53, 12) Source(78, 12) + SourceIndex(0) +3 >Emitted(53, 13) Source(78, 13) + SourceIndex(0) +4 >Emitted(53, 16) Source(78, 16) + SourceIndex(0) +5 >Emitted(53, 17) Source(78, 17) + SourceIndex(0) +6 >Emitted(53, 22) Source(78, 22) + SourceIndex(0) +7 >Emitted(53, 23) Source(78, 23) + SourceIndex(0) +8 >Emitted(53, 24) Source(78, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(54, 2) Source(79, 2) + SourceIndex(0) +--- +>>>for (var _29 = 0, _30 = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^ +9 > ^^ +10> ^^^^ +11> ^^ +12> ^^^^^^^ +13> ^^ +14> ^^^^^^ +15> ^^ +16> ^^ +17> ^^^^^^^ +18> ^^ +19> ^^^^^^^^ +20> ^^ +21> ^^^^^^^^^ +22> ^^ +23> ^^^^^^ +24> ^^ +25> ^^ +26> ^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let { + > name: nameA = "noName", + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + > } of +5 > [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +6 > +7 > +8 > [ +9 > { +10> name +11> : +12> "mower" +13> , +14> skills +15> : +16> { +17> primary +18> : +19> "mowing" +20> , +21> secondary +22> : +23> "none" +24> } +25> } +1->Emitted(55, 1) Source(80, 1) + SourceIndex(0) +2 >Emitted(55, 4) Source(80, 4) + SourceIndex(0) +3 >Emitted(55, 5) Source(80, 5) + SourceIndex(0) +4 >Emitted(55, 6) Source(86, 6) + SourceIndex(0) +5 >Emitted(55, 17) Source(87, 79) + SourceIndex(0) +6 >Emitted(55, 19) Source(86, 6) + SourceIndex(0) +7 >Emitted(55, 25) Source(86, 20) + SourceIndex(0) +8 >Emitted(55, 26) Source(86, 21) + SourceIndex(0) +9 >Emitted(55, 28) Source(86, 23) + SourceIndex(0) +10>Emitted(55, 32) Source(86, 27) + SourceIndex(0) +11>Emitted(55, 34) Source(86, 29) + SourceIndex(0) +12>Emitted(55, 41) Source(86, 36) + SourceIndex(0) +13>Emitted(55, 43) Source(86, 38) + SourceIndex(0) +14>Emitted(55, 49) Source(86, 44) + SourceIndex(0) +15>Emitted(55, 51) Source(86, 46) + SourceIndex(0) +16>Emitted(55, 53) Source(86, 48) + SourceIndex(0) +17>Emitted(55, 60) Source(86, 55) + SourceIndex(0) +18>Emitted(55, 62) Source(86, 57) + SourceIndex(0) +19>Emitted(55, 70) Source(86, 65) + SourceIndex(0) +20>Emitted(55, 72) Source(86, 67) + SourceIndex(0) +21>Emitted(55, 81) Source(86, 76) + SourceIndex(0) +22>Emitted(55, 83) Source(86, 78) + SourceIndex(0) +23>Emitted(55, 89) Source(86, 84) + SourceIndex(0) +24>Emitted(55, 91) Source(86, 86) + SourceIndex(0) +25>Emitted(55, 93) Source(86, 88) + SourceIndex(0) +--- +>>> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _29 < _30.length; _29++) { +1->^^^^ +2 > ^^ +3 > ^^^^ +4 > ^^ +5 > ^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^ +10> ^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^ +15> ^^ +16> ^^^^^^^^ +17> ^^ +18> ^^ +19> ^ +20> ^^ +21> ^^^^^^^^^^^^^^^^ +22> ^^ +23> ^^^^^ +24> ^ +25> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1->, + > +2 > { +3 > name +4 > : +5 > "trimmer" +6 > , +7 > skills +8 > : +9 > { +10> primary +11> : +12> "trimming" +13> , +14> secondary +15> : +16> "edging" +17> } +18> } +19> ] +20> +21> [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +22> +23> [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +24> ) +1->Emitted(56, 5) Source(87, 5) + SourceIndex(0) +2 >Emitted(56, 7) Source(87, 7) + SourceIndex(0) +3 >Emitted(56, 11) Source(87, 11) + SourceIndex(0) +4 >Emitted(56, 13) Source(87, 13) + SourceIndex(0) +5 >Emitted(56, 22) Source(87, 22) + SourceIndex(0) +6 >Emitted(56, 24) Source(87, 24) + SourceIndex(0) +7 >Emitted(56, 30) Source(87, 30) + SourceIndex(0) +8 >Emitted(56, 32) Source(87, 32) + SourceIndex(0) +9 >Emitted(56, 34) Source(87, 34) + SourceIndex(0) +10>Emitted(56, 41) Source(87, 41) + SourceIndex(0) +11>Emitted(56, 43) Source(87, 43) + SourceIndex(0) +12>Emitted(56, 53) Source(87, 53) + SourceIndex(0) +13>Emitted(56, 55) Source(87, 55) + SourceIndex(0) +14>Emitted(56, 64) Source(87, 64) + SourceIndex(0) +15>Emitted(56, 66) Source(87, 66) + SourceIndex(0) +16>Emitted(56, 74) Source(87, 74) + SourceIndex(0) +17>Emitted(56, 76) Source(87, 76) + SourceIndex(0) +18>Emitted(56, 78) Source(87, 78) + SourceIndex(0) +19>Emitted(56, 79) Source(87, 79) + SourceIndex(0) +20>Emitted(56, 81) Source(86, 6) + SourceIndex(0) +21>Emitted(56, 97) Source(87, 79) + SourceIndex(0) +22>Emitted(56, 99) Source(86, 6) + SourceIndex(0) +23>Emitted(56, 104) Source(87, 79) + SourceIndex(0) +24>Emitted(56, 105) Source(87, 80) + SourceIndex(0) +--- +>>> var _31 = _30[_29], _32 = _31.name, nameA = _32 === void 0 ? "noName" : _32, _33 = _31.skills, _34 = _33 === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _33, _35 = _34.primary, primaryA = _35 === void 0 ? "primary" : _35, _36 = _34.secondary, secondaryA = _36 === void 0 ? "secondary" : _36; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let { + > name: nameA = "noName", + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + > } +3 > +4 > name: nameA = "noName" +5 > +6 > name: nameA = "noName" +7 > , + > +8 > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } +9 > +10> skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } +11> +12> primary: primaryA = "primary" +13> +14> primary: primaryA = "primary" +15> , + > +16> secondary: secondaryA = "secondary" +17> +18> secondary: secondaryA = "secondary" +1->Emitted(57, 5) Source(80, 6) + SourceIndex(0) +2 >Emitted(57, 23) Source(86, 2) + SourceIndex(0) +3 >Emitted(57, 25) Source(81, 5) + SourceIndex(0) +4 >Emitted(57, 39) Source(81, 27) + SourceIndex(0) +5 >Emitted(57, 41) Source(81, 5) + SourceIndex(0) +6 >Emitted(57, 80) Source(81, 27) + SourceIndex(0) +7 >Emitted(57, 82) Source(82, 5) + SourceIndex(0) +8 >Emitted(57, 98) Source(85, 53) + SourceIndex(0) +9 >Emitted(57, 100) Source(82, 5) + SourceIndex(0) +10>Emitted(57, 173) Source(85, 53) + SourceIndex(0) +11>Emitted(57, 175) Source(83, 9) + SourceIndex(0) +12>Emitted(57, 192) Source(83, 38) + SourceIndex(0) +13>Emitted(57, 194) Source(83, 9) + SourceIndex(0) +14>Emitted(57, 237) Source(83, 38) + SourceIndex(0) +15>Emitted(57, 239) Source(84, 9) + SourceIndex(0) +16>Emitted(57, 258) Source(84, 44) + SourceIndex(0) +17>Emitted(57, 260) Source(84, 9) + SourceIndex(0) +18>Emitted(57, 307) Source(84, 44) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > } = { primary: "noSkill", secondary: "noSkill" } + >} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(58, 5) Source(88, 5) + SourceIndex(0) +2 >Emitted(58, 12) Source(88, 12) + SourceIndex(0) +3 >Emitted(58, 13) Source(88, 13) + SourceIndex(0) +4 >Emitted(58, 16) Source(88, 16) + SourceIndex(0) +5 >Emitted(58, 17) Source(88, 17) + SourceIndex(0) +6 >Emitted(58, 22) Source(88, 22) + SourceIndex(0) +7 >Emitted(58, 23) Source(88, 23) + SourceIndex(0) +8 >Emitted(58, 24) Source(88, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(59, 2) Source(89, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.symbols b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.symbols new file mode 100644 index 00000000000..f73adeb7761 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.symbols @@ -0,0 +1,314 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 11)) + + log(msg: any): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 1, 8)) +} +interface Robot { +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 2, 1)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 3, 17)) + + skill: string; +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 4, 17)) +} + +interface MultiRobot { +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 6, 1)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 8, 22)) + + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 9, 17)) + + primary?: string; +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 10, 13)) + + secondary?: string; +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 11, 25)) + + }; +} + +let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 16, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 16, 24)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 16, 39)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 16, 60)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 16, 77)) + +let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 17, 3)) +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 17, 34)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 17, 49)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 17, 59)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 17, 78)) + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 18, 5)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 18, 22)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 18, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 18, 53)) + +function getRobots() { +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 18, 79)) + + return robots; +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 16, 3)) +} + +function getMultiRobots() { +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 22, 1)) + + return multiRobots; +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 17, 3)) +} + +for (let {name: nameA = "noName" } of robots) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 28, 10)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 16, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 28, 10)) +} +for (let {name: nameA = "noName" } of getRobots()) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 31, 10)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 18, 79)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 31, 10)) +} +for (let {name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 34, 40)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 34, 10)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 34, 40)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 34, 55)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 34, 76)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 34, 93)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 34, 10)) +} +for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 9, 17)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 37, 20)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 11, 25)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 37, 51)) + + { primary: "nosKill", secondary: "noSkill" } } of multiRobots) { +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 38, 5)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 38, 25)) +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 17, 3)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 37, 20)) +} +for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 9, 17)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 41, 20)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 11, 25)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 41, 51)) + + { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) { +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 42, 5)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 42, 25)) +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 22, 1)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 41, 20)) +} +for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 9, 17)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 45, 20)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 11, 25)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 45, 51)) + + { primary: "nosKill", secondary: "noSkill" } } of +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 46, 5)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 46, 25)) + + [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 47, 20)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 47, 35)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 47, 45)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 47, 64)) + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 48, 5)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 48, 22)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 48, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 48, 53)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 45, 20)) +} + +for (let {name: nameA = "noName", skill: skillA = "noSkill" } of robots) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 52, 10)) +>skill : Symbol(Robot.skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 4, 17)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 52, 33)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 16, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 52, 10)) +} +for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 55, 10)) +>skill : Symbol(Robot.skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 4, 17)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 55, 33)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 18, 79)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 55, 10)) +} +for (let {name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 58, 68)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 58, 10)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 58, 83)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 58, 33)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 58, 68)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 58, 83)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 58, 104)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 58, 121)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 58, 10)) +} +for (let { + name: nameA = "noName", +>name : Symbol(MultiRobot.name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 8, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 61, 10)) + + skills: { +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 9, 17)) + + primary: primaryA = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 63, 13)) + + secondary: secondaryA = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 11, 25)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 64, 38)) + + } = { primary: "noSkill", secondary: "noSkill" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 66, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 66, 29)) + +} of multiRobots) { +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 17, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 61, 10)) +} +for (let { + name: nameA = "noName", +>name : Symbol(MultiRobot.name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 8, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 70, 10)) + + skills: { +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 9, 17)) + + primary: primaryA = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 72, 13)) + + secondary: secondaryA = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 11, 25)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 73, 38)) + + } = { primary: "noSkill", secondary: "noSkill" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 75, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 75, 29)) + +} of getMultiRobots()) { +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 22, 1)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 70, 10)) +} +for (let { + name: nameA = "noName", +>name : Symbol(MultiRobot.name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 8, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 79, 10)) + + skills: { +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 9, 17)) + + primary: primaryA = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 81, 13)) + + secondary: secondaryA = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 11, 25)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 82, 38)) + + } = { primary: "noSkill", secondary: "noSkill" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 84, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 84, 29)) + +} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 85, 21)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 85, 36)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 85, 46)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 85, 65)) + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 86, 5)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 86, 22)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 86, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 86, 53)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts, 79, 10)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.types b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.types new file mode 100644 index 00000000000..36f67f946f0 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.types @@ -0,0 +1,428 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts === +declare var console: { +>console : { log(msg: any): void; } + + log(msg: any): void; +>log : (msg: any) => void +>msg : any +} +interface Robot { +>Robot : Robot + + name: string; +>name : string + + skill: string; +>skill : string +} + +interface MultiRobot { +>MultiRobot : MultiRobot + + name: string; +>name : string + + skills: { +>skills : { primary?: string; secondary?: string; } + + primary?: string; +>primary : string + + secondary?: string; +>secondary : string + + }; +} + +let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +>robots : Robot[] +>Robot : Robot +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string + +let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>multiRobots : MultiRobot[] +>MultiRobot : MultiRobot +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"mower" : string +>skills : { primary: string; secondary: string; } +>{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } +>primary : string +>"mowing" : string +>secondary : string +>"none" : string + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + +function getRobots() { +>getRobots : () => Robot[] + + return robots; +>robots : Robot[] +} + +function getMultiRobots() { +>getMultiRobots : () => MultiRobot[] + + return multiRobots; +>multiRobots : MultiRobot[] +} + +for (let {name: nameA = "noName" } of robots) { +>name : any +>nameA : string +>"noName" : string +>robots : Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let {name: nameA = "noName" } of getRobots()) { +>name : any +>nameA : string +>"noName" : string +>getRobots() : Robot[] +>getRobots : () => Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let {name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>name : any +>nameA : string +>"noName" : string +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = +>skills : any +>primary : any +>primaryA : string +>"primary" : string +>secondary : any +>secondaryA : string +>"secondary" : string + + { primary: "nosKill", secondary: "noSkill" } } of multiRobots) { +>{ primary: "nosKill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>primary : string +>"nosKill" : string +>secondary : string +>"noSkill" : string +>multiRobots : MultiRobot[] + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = +>skills : any +>primary : any +>primaryA : string +>"primary" : string +>secondary : any +>secondaryA : string +>"secondary" : string + + { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) { +>{ primary: "nosKill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>primary : string +>"nosKill" : string +>secondary : string +>"noSkill" : string +>getMultiRobots() : MultiRobot[] +>getMultiRobots : () => MultiRobot[] + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = +>skills : any +>primary : any +>primaryA : string +>"primary" : string +>secondary : any +>secondaryA : string +>"secondary" : string + + { primary: "nosKill", secondary: "noSkill" } } of +>{ primary: "nosKill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>primary : string +>"nosKill" : string +>secondary : string +>"noSkill" : string + + [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : MultiRobot[] +>MultiRobot : MultiRobot +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"mower" : string +>skills : { primary: string; secondary: string; } +>{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } +>primary : string +>"mowing" : string +>secondary : string +>"none" : string + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} + +for (let {name: nameA = "noName", skill: skillA = "noSkill" } of robots) { +>name : any +>nameA : string +>"noName" : string +>skill : any +>skillA : string +>"noSkill" : string +>robots : Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { +>name : any +>nameA : string +>"noName" : string +>skill : any +>skillA : string +>"noSkill" : string +>getRobots() : Robot[] +>getRobots : () => Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let {name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>name : any +>nameA : string +>"noName" : string +>skill : any +>skillA : string +>"noSkill" : string +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let { + name: nameA = "noName", +>name : any +>nameA : string +>"noName" : string + + skills: { +>skills : any + + primary: primaryA = "primary", +>primary : any +>primaryA : string +>"primary" : string + + secondary: secondaryA = "secondary" +>secondary : any +>secondaryA : string +>"secondary" : string + + } = { primary: "noSkill", secondary: "noSkill" } +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>primary : string +>"noSkill" : string +>secondary : string +>"noSkill" : string + +} of multiRobots) { +>multiRobots : MultiRobot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let { + name: nameA = "noName", +>name : any +>nameA : string +>"noName" : string + + skills: { +>skills : any + + primary: primaryA = "primary", +>primary : any +>primaryA : string +>"primary" : string + + secondary: secondaryA = "secondary" +>secondary : any +>secondaryA : string +>"secondary" : string + + } = { primary: "noSkill", secondary: "noSkill" } +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>primary : string +>"noSkill" : string +>secondary : string +>"noSkill" : string + +} of getMultiRobots()) { +>getMultiRobots() : MultiRobot[] +>getMultiRobots : () => MultiRobot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let { + name: nameA = "noName", +>name : any +>nameA : string +>"noName" : string + + skills: { +>skills : any + + primary: primaryA = "primary", +>primary : any +>primaryA : string +>"primary" : string + + secondary: secondaryA = "secondary" +>secondary : any +>secondaryA : string +>"secondary" : string + + } = { primary: "noSkill", secondary: "noSkill" } +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>primary : string +>"noSkill" : string +>secondary : string +>"noSkill" : string + +} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : MultiRobot[] +>MultiRobot : MultiRobot +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"mower" : string +>skills : { primary: string; secondary: string; } +>{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } +>primary : string +>"mowing" : string +>secondary : string +>"none" : string + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.js b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.js new file mode 100644 index 00000000000..1e18159d3d4 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.js @@ -0,0 +1,282 @@ +//// [sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts] +declare var console: { + log(msg: any): void; +} +interface Robot { + name: string; + skill: string; +} + +interface MultiRobot { + name: string; + skills: { + primary: string; + secondary: string; + }; +} + +let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; + +function getRobots() { + return robots; +} + +function getMultiRobots() { + return multiRobots; +} + +let nameA: string, primaryA: string, secondaryA: string, i: number, skillA: string; +let name: string, primary: string, secondary: string, skill: string; + +for ({name: nameA = "noName" } of robots) { + console.log(nameA); +} +for ({name: nameA = "noName" } of getRobots()) { + console.log(nameA); +} +for ({name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + { primary: "nosKill", secondary: "noSkill" } } of multiRobots) { + console.log(primaryA); +} +for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) { + console.log(primaryA); +} +for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + { primary: "nosKill", secondary: "noSkill" } } of + [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(primaryA); +} + +for ({ name = "noName" } of robots) { + console.log(nameA); +} +for ({ name = "noName" } of getRobots()) { + console.log(nameA); +} +for ({ name = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for ({ + skills: { + primary = "primary", + secondary = "secondary" + } = { primary: "noSkill", secondary: "noSkill" } +} of multiRobots) { + console.log(primaryA); +} +for ({ + skills: { + primary = "primary", + secondary = "secondary" + } = { primary: "noSkill", secondary: "noSkill" } +} of getMultiRobots()) { + console.log(primaryA); +} +for ({ + skills: { + primary = "primary", + secondary = "secondary" + } = { primary: "noSkill", secondary: "noSkill" } +} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(primaryA); +} + + +for ({name: nameA = "noName", skill: skillA = "noSkill" } of robots) { + console.log(nameA); +} +for ({name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { + console.log(nameA); +} +for ({name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for ({ + name: nameA = "noName", + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "noSkill", secondary: "noSkill" } +} of multiRobots) { + console.log(nameA); +} +for ({ + name: nameA = "noName", + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "noSkill", secondary: "noSkill" } +} of getMultiRobots()) { + console.log(nameA); +} +for ({ + name: nameA = "noName", + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "noSkill", secondary: "noSkill" } +} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(nameA); +} + +for ({ name = "noName", skill = "noSkill" } of robots) { + console.log(nameA); +} +for ({ name = "noName", skill = "noSkill" } of getRobots()) { + console.log(nameA); +} +for ({ name = "noName", skill = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for ({ + name = "noName", + skills: { + primary = "primary", + secondary = "secondary" + } = { primary: "noSkill", secondary: "noSkill" } +} of multiRobots) { + console.log(nameA); +} +for ({ + name = "noName", + skills: { + primary = "primary", + secondary = "secondary" + } = { primary: "noSkill", secondary: "noSkill" } +} of getMultiRobots()) { + console.log(nameA); +} +for ({ + name = "noName", + skills: { + primary = "primary", + secondary = "secondary" + } = { primary: "noSkill", secondary: "noSkill" } +} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(nameA); +} + +//// [sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.js] +var robots = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +var multiRobots = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; +function getRobots() { + return robots; +} +function getMultiRobots() { + return multiRobots; +} +var nameA, primaryA, secondaryA, i, skillA; +var name, primary, secondary, skill; +for (var _i = 0, robots_1 = robots; _i < robots_1.length; _i++) { + _a = robots_1[_i].name, nameA = _a === void 0 ? "noName" : _a; + console.log(nameA); +} +for (var _b = 0, _c = getRobots(); _b < _c.length; _b++) { + _d = _c[_b].name, nameA = _d === void 0 ? "noName" : _d; + console.log(nameA); +} +for (var _e = 0, _f = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _e < _f.length; _e++) { + _g = _f[_e].name, nameA = _g === void 0 ? "noName" : _g; + console.log(nameA); +} +for (var _h = 0, multiRobots_1 = multiRobots; _h < multiRobots_1.length; _h++) { + _j = multiRobots_1[_h].skills, _k = _j === void 0 ? { primary: "nosKill", secondary: "noSkill" } : _j, _l = _k.primary, primaryA = _l === void 0 ? "primary" : _l, _m = _k.secondary, secondaryA = _m === void 0 ? "secondary" : _m; + console.log(primaryA); +} +for (var _o = 0, _p = getMultiRobots(); _o < _p.length; _o++) { + _q = _p[_o].skills, _r = _q === void 0 ? { primary: "nosKill", secondary: "noSkill" } : _q, _s = _r.primary, primaryA = _s === void 0 ? "primary" : _s, _t = _r.secondary, secondaryA = _t === void 0 ? "secondary" : _t; + console.log(primaryA); +} +for (var _u = 0, _v = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _u < _v.length; _u++) { + _w = _v[_u].skills, _x = _w === void 0 ? { primary: "nosKill", secondary: "noSkill" } : _w, _y = _x.primary, primaryA = _y === void 0 ? "primary" : _y, _z = _x.secondary, secondaryA = _z === void 0 ? "secondary" : _z; + console.log(primaryA); +} +for (var _0 = 0, robots_2 = robots; _0 < robots_2.length; _0++) { + _1 = robots_2[_0].name, name = _1 === void 0 ? "noName" : _1; + console.log(nameA); +} +for (var _2 = 0, _3 = getRobots(); _2 < _3.length; _2++) { + _4 = _3[_2].name, name = _4 === void 0 ? "noName" : _4; + console.log(nameA); +} +for (var _5 = 0, _6 = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _5 < _6.length; _5++) { + _7 = _6[_5].name, name = _7 === void 0 ? "noName" : _7; + console.log(nameA); +} +for (var _8 = 0, multiRobots_2 = multiRobots; _8 < multiRobots_2.length; _8++) { + _9 = multiRobots_2[_8].skills, _10 = _9 === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _9, _11 = _10.primary, primary = _11 === void 0 ? "primary" : _11, _12 = _10.secondary, secondary = _12 === void 0 ? "secondary" : _12; + console.log(primaryA); +} +for (var _13 = 0, _14 = getMultiRobots(); _13 < _14.length; _13++) { + _15 = _14[_13].skills, _16 = _15 === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _15, _17 = _16.primary, primary = _17 === void 0 ? "primary" : _17, _18 = _16.secondary, secondary = _18 === void 0 ? "secondary" : _18; + console.log(primaryA); +} +for (var _19 = 0, _20 = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _19 < _20.length; _19++) { + _21 = _20[_19].skills, _22 = _21 === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _21, _23 = _22.primary, primary = _23 === void 0 ? "primary" : _23, _24 = _22.secondary, secondary = _24 === void 0 ? "secondary" : _24; + console.log(primaryA); +} +for (var _25 = 0, robots_3 = robots; _25 < robots_3.length; _25++) { + _26 = robots_3[_25], _27 = _26.name, nameA = _27 === void 0 ? "noName" : _27, _28 = _26.skill, skillA = _28 === void 0 ? "noSkill" : _28; + console.log(nameA); +} +for (var _29 = 0, _30 = getRobots(); _29 < _30.length; _29++) { + _31 = _30[_29], _32 = _31.name, nameA = _32 === void 0 ? "noName" : _32, _33 = _31.skill, skillA = _33 === void 0 ? "noSkill" : _33; + console.log(nameA); +} +for (var _34 = 0, _35 = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _34 < _35.length; _34++) { + _36 = _35[_34], _37 = _36.name, nameA = _37 === void 0 ? "noName" : _37, _38 = _36.skill, skillA = _38 === void 0 ? "noSkill" : _38; + console.log(nameA); +} +for (var _39 = 0, multiRobots_3 = multiRobots; _39 < multiRobots_3.length; _39++) { + _40 = multiRobots_3[_39], _41 = _40.name, nameA = _41 === void 0 ? "noName" : _41, _42 = _40.skills, _43 = _42 === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _42, _44 = _43.primary, primaryA = _44 === void 0 ? "primary" : _44, _45 = _43.secondary, secondaryA = _45 === void 0 ? "secondary" : _45; + console.log(nameA); +} +for (var _46 = 0, _47 = getMultiRobots(); _46 < _47.length; _46++) { + _48 = _47[_46], _49 = _48.name, nameA = _49 === void 0 ? "noName" : _49, _50 = _48.skills, _51 = _50 === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _50, _52 = _51.primary, primaryA = _52 === void 0 ? "primary" : _52, _53 = _51.secondary, secondaryA = _53 === void 0 ? "secondary" : _53; + console.log(nameA); +} +for (var _54 = 0, _55 = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _54 < _55.length; _54++) { + _56 = _55[_54], _57 = _56.name, nameA = _57 === void 0 ? "noName" : _57, _58 = _56.skills, _59 = _58 === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _58, _60 = _59.primary, primaryA = _60 === void 0 ? "primary" : _60, _61 = _59.secondary, secondaryA = _61 === void 0 ? "secondary" : _61; + console.log(nameA); +} +for (var _62 = 0, robots_4 = robots; _62 < robots_4.length; _62++) { + _63 = robots_4[_62], _64 = _63.name, name = _64 === void 0 ? "noName" : _64, _65 = _63.skill, skill = _65 === void 0 ? "noSkill" : _65; + console.log(nameA); +} +for (var _66 = 0, _67 = getRobots(); _66 < _67.length; _66++) { + _68 = _67[_66], _69 = _68.name, name = _69 === void 0 ? "noName" : _69, _70 = _68.skill, skill = _70 === void 0 ? "noSkill" : _70; + console.log(nameA); +} +for (var _71 = 0, _72 = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _71 < _72.length; _71++) { + _73 = _72[_71], _74 = _73.name, name = _74 === void 0 ? "noName" : _74, _75 = _73.skill, skill = _75 === void 0 ? "noSkill" : _75; + console.log(nameA); +} +for (var _76 = 0, multiRobots_4 = multiRobots; _76 < multiRobots_4.length; _76++) { + _77 = multiRobots_4[_76], _78 = _77.name, name = _78 === void 0 ? "noName" : _78, _79 = _77.skills, _80 = _79 === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _79, _81 = _80.primary, primary = _81 === void 0 ? "primary" : _81, _82 = _80.secondary, secondary = _82 === void 0 ? "secondary" : _82; + console.log(nameA); +} +for (var _83 = 0, _84 = getMultiRobots(); _83 < _84.length; _83++) { + _85 = _84[_83], _86 = _85.name, name = _86 === void 0 ? "noName" : _86, _87 = _85.skills, _88 = _87 === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _87, _89 = _88.primary, primary = _89 === void 0 ? "primary" : _89, _90 = _88.secondary, secondary = _90 === void 0 ? "secondary" : _90; + console.log(nameA); +} +for (var _91 = 0, _92 = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _91 < _92.length; _91++) { + _93 = _92[_91], _94 = _93.name, name = _94 === void 0 ? "noName" : _94, _95 = _93.skills, _96 = _95 === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _95, _97 = _96.primary, primary = _97 === void 0 ? "primary" : _97, _98 = _96.secondary, secondary = _98 === void 0 ? "secondary" : _98; + console.log(nameA); +} +var _a, _d, _g, _j, _k, _l, _m, _q, _r, _s, _t, _w, _x, _y, _z, _1, _4, _7, _9, _10, _11, _12, _15, _16, _17, _18, _21, _22, _23, _24, _26, _27, _28, _31, _32, _33, _36, _37, _38, _40, _41, _42, _43, _44, _45, _48, _49, _50, _51, _52, _53, _56, _57, _58, _59, _60, _61, _63, _64, _65, _68, _69, _70, _73, _74, _75, _77, _78, _79, _80, _81, _82, _85, _86, _87, _88, _89, _90, _93, _94, _95, _96, _97, _98; +//# sourceMappingURL=sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.js.map new file mode 100644 index 00000000000..0529919c803 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.js.map] +{"version":3,"file":"sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts"],"names":[],"mappings":"AAgBA,IAAI,MAAM,GAAY,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;AACnG,IAAI,WAAW,GAAiB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE;IAChG,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;AAE/E;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,IAAI,KAAa,EAAE,QAAgB,EAAE,UAAkB,EAAE,CAAS,EAAE,MAAc,CAAC;AACnF,IAAI,IAAY,EAAE,OAAe,EAAE,SAAiB,EAAE,KAAa,CAAC;AAEpE,GAAG,CAAC,CAA8B,UAAM,EAAN,iBAAM,EAAN,oBAAM,EAAN,IAAM,CAAC;IAAnC,sBAAsB,EAAtB,qCAAsB;IACxB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAA8B,UAAW,EAAX,KAAA,SAAS,EAAE,EA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,EAAf,sCAAe,EACf,gBAGgD,EAHhD,yEAGgD,EAF5C,iBAAmB,EAAnB,0CAAmB,EACnB,mBAAuB,EAAvB,8CAAuB;IAI3B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.sourcemap.txt new file mode 100644 index 00000000000..f80a065e9ce --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.sourcemap.txt @@ -0,0 +1,3951 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.js +mapUrl: sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.js.map +sourceRoot: +sources: sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.js +sourceFile:sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts +------------------------------------------------------------------- +>>>var robots = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^ +7 > ^^^^ +8 > ^^ +9 > ^^^^^^^ +10> ^^ +11> ^^^^^ +12> ^^ +13> ^^^^^^^^ +14> ^^ +15> ^^ +16> ^^ +17> ^^^^ +18> ^^ +19> ^^^^^^^^^ +20> ^^ +21> ^^^^^ +22> ^^ +23> ^^^^^^^^^^ +24> ^^ +25> ^ +26> ^ +1 >declare var console: { + > log(msg: any): void; + >} + >interface Robot { + > name: string; + > skill: string; + >} + > + >interface MultiRobot { + > name: string; + > skills: { + > primary: string; + > secondary: string; + > }; + >} + > + > +2 >let +3 > robots +4 > : Robot[] = +5 > [ +6 > { +7 > name +8 > : +9 > "mower" +10> , +11> skill +12> : +13> "mowing" +14> } +15> , +16> { +17> name +18> : +19> "trimmer" +20> , +21> skill +22> : +23> "trimming" +24> } +25> ] +26> ; +1 >Emitted(1, 1) Source(17, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(17, 5) + SourceIndex(0) +3 >Emitted(1, 11) Source(17, 11) + SourceIndex(0) +4 >Emitted(1, 14) Source(17, 23) + SourceIndex(0) +5 >Emitted(1, 15) Source(17, 24) + SourceIndex(0) +6 >Emitted(1, 17) Source(17, 26) + SourceIndex(0) +7 >Emitted(1, 21) Source(17, 30) + SourceIndex(0) +8 >Emitted(1, 23) Source(17, 32) + SourceIndex(0) +9 >Emitted(1, 30) Source(17, 39) + SourceIndex(0) +10>Emitted(1, 32) Source(17, 41) + SourceIndex(0) +11>Emitted(1, 37) Source(17, 46) + SourceIndex(0) +12>Emitted(1, 39) Source(17, 48) + SourceIndex(0) +13>Emitted(1, 47) Source(17, 56) + SourceIndex(0) +14>Emitted(1, 49) Source(17, 58) + SourceIndex(0) +15>Emitted(1, 51) Source(17, 60) + SourceIndex(0) +16>Emitted(1, 53) Source(17, 62) + SourceIndex(0) +17>Emitted(1, 57) Source(17, 66) + SourceIndex(0) +18>Emitted(1, 59) Source(17, 68) + SourceIndex(0) +19>Emitted(1, 68) Source(17, 77) + SourceIndex(0) +20>Emitted(1, 70) Source(17, 79) + SourceIndex(0) +21>Emitted(1, 75) Source(17, 84) + SourceIndex(0) +22>Emitted(1, 77) Source(17, 86) + SourceIndex(0) +23>Emitted(1, 87) Source(17, 96) + SourceIndex(0) +24>Emitted(1, 89) Source(17, 98) + SourceIndex(0) +25>Emitted(1, 90) Source(17, 99) + SourceIndex(0) +26>Emitted(1, 91) Source(17, 100) + SourceIndex(0) +--- +>>>var multiRobots = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +1 > +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^ +7 > ^^^^ +8 > ^^ +9 > ^^^^^^^ +10> ^^ +11> ^^^^^^ +12> ^^ +13> ^^ +14> ^^^^^^^ +15> ^^ +16> ^^^^^^^^ +17> ^^ +18> ^^^^^^^^^ +19> ^^ +20> ^^^^^^ +21> ^^ +22> ^^ +1 > + > +2 >let +3 > multiRobots +4 > : MultiRobot[] = +5 > [ +6 > { +7 > name +8 > : +9 > "mower" +10> , +11> skills +12> : +13> { +14> primary +15> : +16> "mowing" +17> , +18> secondary +19> : +20> "none" +21> } +22> } +1 >Emitted(2, 1) Source(18, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(18, 5) + SourceIndex(0) +3 >Emitted(2, 16) Source(18, 16) + SourceIndex(0) +4 >Emitted(2, 19) Source(18, 33) + SourceIndex(0) +5 >Emitted(2, 20) Source(18, 34) + SourceIndex(0) +6 >Emitted(2, 22) Source(18, 36) + SourceIndex(0) +7 >Emitted(2, 26) Source(18, 40) + SourceIndex(0) +8 >Emitted(2, 28) Source(18, 42) + SourceIndex(0) +9 >Emitted(2, 35) Source(18, 49) + SourceIndex(0) +10>Emitted(2, 37) Source(18, 51) + SourceIndex(0) +11>Emitted(2, 43) Source(18, 57) + SourceIndex(0) +12>Emitted(2, 45) Source(18, 59) + SourceIndex(0) +13>Emitted(2, 47) Source(18, 61) + SourceIndex(0) +14>Emitted(2, 54) Source(18, 68) + SourceIndex(0) +15>Emitted(2, 56) Source(18, 70) + SourceIndex(0) +16>Emitted(2, 64) Source(18, 78) + SourceIndex(0) +17>Emitted(2, 66) Source(18, 80) + SourceIndex(0) +18>Emitted(2, 75) Source(18, 89) + SourceIndex(0) +19>Emitted(2, 77) Source(18, 91) + SourceIndex(0) +20>Emitted(2, 83) Source(18, 97) + SourceIndex(0) +21>Emitted(2, 85) Source(18, 99) + SourceIndex(0) +22>Emitted(2, 87) Source(18, 101) + SourceIndex(0) +--- +>>> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; +1 >^^^^ +2 > ^^ +3 > ^^^^ +4 > ^^ +5 > ^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^ +10> ^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^ +15> ^^ +16> ^^^^^^^^ +17> ^^ +18> ^^ +19> ^ +20> ^ +1 >, + > +2 > { +3 > name +4 > : +5 > "trimmer" +6 > , +7 > skills +8 > : +9 > { +10> primary +11> : +12> "trimming" +13> , +14> secondary +15> : +16> "edging" +17> } +18> } +19> ] +20> ; +1 >Emitted(3, 5) Source(19, 5) + SourceIndex(0) +2 >Emitted(3, 7) Source(19, 7) + SourceIndex(0) +3 >Emitted(3, 11) Source(19, 11) + SourceIndex(0) +4 >Emitted(3, 13) Source(19, 13) + SourceIndex(0) +5 >Emitted(3, 22) Source(19, 22) + SourceIndex(0) +6 >Emitted(3, 24) Source(19, 24) + SourceIndex(0) +7 >Emitted(3, 30) Source(19, 30) + SourceIndex(0) +8 >Emitted(3, 32) Source(19, 32) + SourceIndex(0) +9 >Emitted(3, 34) Source(19, 34) + SourceIndex(0) +10>Emitted(3, 41) Source(19, 41) + SourceIndex(0) +11>Emitted(3, 43) Source(19, 43) + SourceIndex(0) +12>Emitted(3, 53) Source(19, 53) + SourceIndex(0) +13>Emitted(3, 55) Source(19, 55) + SourceIndex(0) +14>Emitted(3, 64) Source(19, 64) + SourceIndex(0) +15>Emitted(3, 66) Source(19, 66) + SourceIndex(0) +16>Emitted(3, 74) Source(19, 74) + SourceIndex(0) +17>Emitted(3, 76) Source(19, 76) + SourceIndex(0) +18>Emitted(3, 78) Source(19, 78) + SourceIndex(0) +19>Emitted(3, 79) Source(19, 79) + SourceIndex(0) +20>Emitted(3, 80) Source(19, 80) + SourceIndex(0) +--- +>>>function getRobots() { +1 > +2 >^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +1 >Emitted(4, 1) Source(21, 1) + SourceIndex(0) +--- +>>> return robots; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +1->function getRobots() { + > +2 > return +3 > +4 > robots +5 > ; +1->Emitted(5, 5) Source(22, 5) + SourceIndex(0) +2 >Emitted(5, 11) Source(22, 11) + SourceIndex(0) +3 >Emitted(5, 12) Source(22, 12) + SourceIndex(0) +4 >Emitted(5, 18) Source(22, 18) + SourceIndex(0) +5 >Emitted(5, 19) Source(22, 19) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(6, 1) Source(23, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(23, 2) + SourceIndex(0) +--- +>>>function getMultiRobots() { +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +1->Emitted(7, 1) Source(25, 1) + SourceIndex(0) +--- +>>> return multiRobots; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^ +5 > ^ +1->function getMultiRobots() { + > +2 > return +3 > +4 > multiRobots +5 > ; +1->Emitted(8, 5) Source(26, 5) + SourceIndex(0) +2 >Emitted(8, 11) Source(26, 11) + SourceIndex(0) +3 >Emitted(8, 12) Source(26, 12) + SourceIndex(0) +4 >Emitted(8, 23) Source(26, 23) + SourceIndex(0) +5 >Emitted(8, 24) Source(26, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(9, 1) Source(27, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(27, 2) + SourceIndex(0) +--- +>>>var nameA, primaryA, secondaryA, i, skillA; +1-> +2 >^^^^ +3 > ^^^^^ +4 > ^^ +5 > ^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^ +11> ^^^^^^ +12> ^ +1-> + > + > +2 >let +3 > nameA: string +4 > , +5 > primaryA: string +6 > , +7 > secondaryA: string +8 > , +9 > i: number +10> , +11> skillA: string +12> ; +1->Emitted(10, 1) Source(29, 1) + SourceIndex(0) +2 >Emitted(10, 5) Source(29, 5) + SourceIndex(0) +3 >Emitted(10, 10) Source(29, 18) + SourceIndex(0) +4 >Emitted(10, 12) Source(29, 20) + SourceIndex(0) +5 >Emitted(10, 20) Source(29, 36) + SourceIndex(0) +6 >Emitted(10, 22) Source(29, 38) + SourceIndex(0) +7 >Emitted(10, 32) Source(29, 56) + SourceIndex(0) +8 >Emitted(10, 34) Source(29, 58) + SourceIndex(0) +9 >Emitted(10, 35) Source(29, 67) + SourceIndex(0) +10>Emitted(10, 37) Source(29, 69) + SourceIndex(0) +11>Emitted(10, 43) Source(29, 83) + SourceIndex(0) +12>Emitted(10, 44) Source(29, 84) + SourceIndex(0) +--- +>>>var name, primary, secondary, skill; +1 > +2 >^^^^ +3 > ^^^^ +4 > ^^ +5 > ^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^ +8 > ^^ +9 > ^^^^^ +10> ^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >let +3 > name: string +4 > , +5 > primary: string +6 > , +7 > secondary: string +8 > , +9 > skill: string +10> ; +1 >Emitted(11, 1) Source(30, 1) + SourceIndex(0) +2 >Emitted(11, 5) Source(30, 5) + SourceIndex(0) +3 >Emitted(11, 9) Source(30, 17) + SourceIndex(0) +4 >Emitted(11, 11) Source(30, 19) + SourceIndex(0) +5 >Emitted(11, 18) Source(30, 34) + SourceIndex(0) +6 >Emitted(11, 20) Source(30, 36) + SourceIndex(0) +7 >Emitted(11, 29) Source(30, 53) + SourceIndex(0) +8 >Emitted(11, 31) Source(30, 55) + SourceIndex(0) +9 >Emitted(11, 36) Source(30, 68) + SourceIndex(0) +10>Emitted(11, 37) Source(30, 69) + SourceIndex(0) +--- +>>>for (var _i = 0, robots_1 = robots; _i < robots_1.length; _i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +13> ^^^^-> +1-> + > + > +2 >for +3 > +4 > ({name: nameA = "noName" } of +5 > robots +6 > +7 > robots +8 > +9 > robots +10> +11> robots +12> ) +1->Emitted(12, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(12, 4) Source(32, 4) + SourceIndex(0) +3 >Emitted(12, 5) Source(32, 5) + SourceIndex(0) +4 >Emitted(12, 6) Source(32, 35) + SourceIndex(0) +5 >Emitted(12, 16) Source(32, 41) + SourceIndex(0) +6 >Emitted(12, 18) Source(32, 35) + SourceIndex(0) +7 >Emitted(12, 35) Source(32, 41) + SourceIndex(0) +8 >Emitted(12, 37) Source(32, 35) + SourceIndex(0) +9 >Emitted(12, 57) Source(32, 41) + SourceIndex(0) +10>Emitted(12, 59) Source(32, 35) + SourceIndex(0) +11>Emitted(12, 63) Source(32, 41) + SourceIndex(0) +12>Emitted(12, 64) Source(32, 42) + SourceIndex(0) +--- +>>> _a = robots_1[_i].name, nameA = _a === void 0 ? "noName" : _a; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > name: nameA = "noName" +3 > +4 > name: nameA = "noName" +1->Emitted(13, 5) Source(32, 7) + SourceIndex(0) +2 >Emitted(13, 27) Source(32, 29) + SourceIndex(0) +3 >Emitted(13, 29) Source(32, 7) + SourceIndex(0) +4 >Emitted(13, 66) Source(32, 29) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(14, 5) Source(33, 5) + SourceIndex(0) +2 >Emitted(14, 12) Source(33, 12) + SourceIndex(0) +3 >Emitted(14, 13) Source(33, 13) + SourceIndex(0) +4 >Emitted(14, 16) Source(33, 16) + SourceIndex(0) +5 >Emitted(14, 17) Source(33, 17) + SourceIndex(0) +6 >Emitted(14, 22) Source(33, 22) + SourceIndex(0) +7 >Emitted(14, 23) Source(33, 23) + SourceIndex(0) +8 >Emitted(14, 24) Source(33, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(15, 2) Source(34, 2) + SourceIndex(0) +--- +>>>for (var _b = 0, _c = getRobots(); _b < _c.length; _b++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +15> ^^^^^-> +1-> + > +2 >for +3 > +4 > ({name: nameA = "noName" } of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> getRobots() +12> +13> getRobots() +14> ) +1->Emitted(16, 1) Source(35, 1) + SourceIndex(0) +2 >Emitted(16, 4) Source(35, 4) + SourceIndex(0) +3 >Emitted(16, 5) Source(35, 5) + SourceIndex(0) +4 >Emitted(16, 6) Source(35, 35) + SourceIndex(0) +5 >Emitted(16, 16) Source(35, 46) + SourceIndex(0) +6 >Emitted(16, 18) Source(35, 35) + SourceIndex(0) +7 >Emitted(16, 23) Source(35, 35) + SourceIndex(0) +8 >Emitted(16, 32) Source(35, 44) + SourceIndex(0) +9 >Emitted(16, 34) Source(35, 46) + SourceIndex(0) +10>Emitted(16, 36) Source(35, 35) + SourceIndex(0) +11>Emitted(16, 50) Source(35, 46) + SourceIndex(0) +12>Emitted(16, 52) Source(35, 35) + SourceIndex(0) +13>Emitted(16, 56) Source(35, 46) + SourceIndex(0) +14>Emitted(16, 57) Source(35, 47) + SourceIndex(0) +--- +>>> _d = _c[_b].name, nameA = _d === void 0 ? "noName" : _d; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > name: nameA = "noName" +3 > +4 > name: nameA = "noName" +1->Emitted(17, 5) Source(35, 7) + SourceIndex(0) +2 >Emitted(17, 21) Source(35, 29) + SourceIndex(0) +3 >Emitted(17, 23) Source(35, 7) + SourceIndex(0) +4 >Emitted(17, 60) Source(35, 29) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(18, 5) Source(36, 5) + SourceIndex(0) +2 >Emitted(18, 12) Source(36, 12) + SourceIndex(0) +3 >Emitted(18, 13) Source(36, 13) + SourceIndex(0) +4 >Emitted(18, 16) Source(36, 16) + SourceIndex(0) +5 >Emitted(18, 17) Source(36, 17) + SourceIndex(0) +6 >Emitted(18, 22) Source(36, 22) + SourceIndex(0) +7 >Emitted(18, 23) Source(36, 23) + SourceIndex(0) +8 >Emitted(18, 24) Source(36, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(19, 2) Source(37, 2) + SourceIndex(0) +--- +>>>for (var _e = 0, _f = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _e < _f.length; _e++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^^^ +10> ^^ +11> ^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^^ +15> ^^^^^^^^ +16> ^^ +17> ^^ +18> ^^ +19> ^^^^ +20> ^^ +21> ^^^^^^^^^ +22> ^^ +23> ^^^^^ +24> ^^ +25> ^^^^^^^^^^ +26> ^^ +27> ^ +28> ^^ +29> ^^^^^^^^^^^^^^ +30> ^^ +31> ^^^^ +32> ^ +1-> + > +2 >for +3 > +4 > ({name: nameA = "noName" } of +5 > [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +6 > +7 > [ +8 > { +9 > name +10> : +11> "mower" +12> , +13> skill +14> : +15> "mowing" +16> } +17> , +18> { +19> name +20> : +21> "trimmer" +22> , +23> skill +24> : +25> "trimming" +26> } +27> ] +28> +29> [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +30> +31> [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +32> ) +1->Emitted(20, 1) Source(38, 1) + SourceIndex(0) +2 >Emitted(20, 4) Source(38, 4) + SourceIndex(0) +3 >Emitted(20, 5) Source(38, 5) + SourceIndex(0) +4 >Emitted(20, 6) Source(38, 35) + SourceIndex(0) +5 >Emitted(20, 16) Source(38, 111) + SourceIndex(0) +6 >Emitted(20, 18) Source(38, 35) + SourceIndex(0) +7 >Emitted(20, 24) Source(38, 36) + SourceIndex(0) +8 >Emitted(20, 26) Source(38, 38) + SourceIndex(0) +9 >Emitted(20, 30) Source(38, 42) + SourceIndex(0) +10>Emitted(20, 32) Source(38, 44) + SourceIndex(0) +11>Emitted(20, 39) Source(38, 51) + SourceIndex(0) +12>Emitted(20, 41) Source(38, 53) + SourceIndex(0) +13>Emitted(20, 46) Source(38, 58) + SourceIndex(0) +14>Emitted(20, 48) Source(38, 60) + SourceIndex(0) +15>Emitted(20, 56) Source(38, 68) + SourceIndex(0) +16>Emitted(20, 58) Source(38, 70) + SourceIndex(0) +17>Emitted(20, 60) Source(38, 72) + SourceIndex(0) +18>Emitted(20, 62) Source(38, 74) + SourceIndex(0) +19>Emitted(20, 66) Source(38, 78) + SourceIndex(0) +20>Emitted(20, 68) Source(38, 80) + SourceIndex(0) +21>Emitted(20, 77) Source(38, 89) + SourceIndex(0) +22>Emitted(20, 79) Source(38, 91) + SourceIndex(0) +23>Emitted(20, 84) Source(38, 96) + SourceIndex(0) +24>Emitted(20, 86) Source(38, 98) + SourceIndex(0) +25>Emitted(20, 96) Source(38, 108) + SourceIndex(0) +26>Emitted(20, 98) Source(38, 110) + SourceIndex(0) +27>Emitted(20, 99) Source(38, 111) + SourceIndex(0) +28>Emitted(20, 101) Source(38, 35) + SourceIndex(0) +29>Emitted(20, 115) Source(38, 111) + SourceIndex(0) +30>Emitted(20, 117) Source(38, 35) + SourceIndex(0) +31>Emitted(20, 121) Source(38, 111) + SourceIndex(0) +32>Emitted(20, 122) Source(38, 112) + SourceIndex(0) +--- +>>> _g = _f[_e].name, nameA = _g === void 0 ? "noName" : _g; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > name: nameA = "noName" +3 > +4 > name: nameA = "noName" +1 >Emitted(21, 5) Source(38, 7) + SourceIndex(0) +2 >Emitted(21, 21) Source(38, 29) + SourceIndex(0) +3 >Emitted(21, 23) Source(38, 7) + SourceIndex(0) +4 >Emitted(21, 60) Source(38, 29) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(22, 5) Source(39, 5) + SourceIndex(0) +2 >Emitted(22, 12) Source(39, 12) + SourceIndex(0) +3 >Emitted(22, 13) Source(39, 13) + SourceIndex(0) +4 >Emitted(22, 16) Source(39, 16) + SourceIndex(0) +5 >Emitted(22, 17) Source(39, 17) + SourceIndex(0) +6 >Emitted(22, 22) Source(39, 22) + SourceIndex(0) +7 >Emitted(22, 23) Source(39, 23) + SourceIndex(0) +8 >Emitted(22, 24) Source(39, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(23, 2) Source(40, 2) + SourceIndex(0) +--- +>>>for (var _h = 0, multiRobots_1 = multiRobots; _h < multiRobots_1.length; _h++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } } of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > multiRobots +10> +11> multiRobots +12> ) +1->Emitted(24, 1) Source(41, 1) + SourceIndex(0) +2 >Emitted(24, 4) Source(41, 4) + SourceIndex(0) +3 >Emitted(24, 5) Source(41, 5) + SourceIndex(0) +4 >Emitted(24, 6) Source(42, 55) + SourceIndex(0) +5 >Emitted(24, 16) Source(42, 66) + SourceIndex(0) +6 >Emitted(24, 18) Source(42, 55) + SourceIndex(0) +7 >Emitted(24, 45) Source(42, 66) + SourceIndex(0) +8 >Emitted(24, 47) Source(42, 55) + SourceIndex(0) +9 >Emitted(24, 72) Source(42, 66) + SourceIndex(0) +10>Emitted(24, 74) Source(42, 55) + SourceIndex(0) +11>Emitted(24, 78) Source(42, 66) + SourceIndex(0) +12>Emitted(24, 79) Source(42, 67) + SourceIndex(0) +--- +>>> _j = multiRobots_1[_h].skills, _k = _j === void 0 ? { primary: "nosKill", secondary: "noSkill" } : _j, _l = _k.primary, primaryA = _l === void 0 ? "primary" : _l, _m = _k.secondary, secondaryA = _m === void 0 ? "secondary" : _m; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } +3 > +4 > skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } +5 > +6 > primary: primaryA = "primary" +7 > +8 > primary: primaryA = "primary" +9 > , +10> secondary: secondaryA = "secondary" +11> +12> secondary: secondaryA = "secondary" +1->Emitted(25, 5) Source(41, 8) + SourceIndex(0) +2 >Emitted(25, 34) Source(42, 49) + SourceIndex(0) +3 >Emitted(25, 36) Source(41, 8) + SourceIndex(0) +4 >Emitted(25, 106) Source(42, 49) + SourceIndex(0) +5 >Emitted(25, 108) Source(41, 18) + SourceIndex(0) +6 >Emitted(25, 123) Source(41, 47) + SourceIndex(0) +7 >Emitted(25, 125) Source(41, 18) + SourceIndex(0) +8 >Emitted(25, 166) Source(41, 47) + SourceIndex(0) +9 >Emitted(25, 168) Source(41, 49) + SourceIndex(0) +10>Emitted(25, 185) Source(41, 84) + SourceIndex(0) +11>Emitted(25, 187) Source(41, 49) + SourceIndex(0) +12>Emitted(25, 232) Source(41, 84) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > } = + > { primary: "nosKill", secondary: "noSkill" } } of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(26, 5) Source(43, 5) + SourceIndex(0) +2 >Emitted(26, 12) Source(43, 12) + SourceIndex(0) +3 >Emitted(26, 13) Source(43, 13) + SourceIndex(0) +4 >Emitted(26, 16) Source(43, 16) + SourceIndex(0) +5 >Emitted(26, 17) Source(43, 17) + SourceIndex(0) +6 >Emitted(26, 25) Source(43, 25) + SourceIndex(0) +7 >Emitted(26, 26) Source(43, 26) + SourceIndex(0) +8 >Emitted(26, 27) Source(43, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(27, 2) Source(44, 2) + SourceIndex(0) +--- +>>>for (var _o = 0, _p = getMultiRobots(); _o < _p.length; _o++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } } of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> getMultiRobots() +12> +13> getMultiRobots() +14> ) +1->Emitted(28, 1) Source(45, 1) + SourceIndex(0) +2 >Emitted(28, 4) Source(45, 4) + SourceIndex(0) +3 >Emitted(28, 5) Source(45, 5) + SourceIndex(0) +4 >Emitted(28, 6) Source(46, 55) + SourceIndex(0) +5 >Emitted(28, 16) Source(46, 71) + SourceIndex(0) +6 >Emitted(28, 18) Source(46, 55) + SourceIndex(0) +7 >Emitted(28, 23) Source(46, 55) + SourceIndex(0) +8 >Emitted(28, 37) Source(46, 69) + SourceIndex(0) +9 >Emitted(28, 39) Source(46, 71) + SourceIndex(0) +10>Emitted(28, 41) Source(46, 55) + SourceIndex(0) +11>Emitted(28, 55) Source(46, 71) + SourceIndex(0) +12>Emitted(28, 57) Source(46, 55) + SourceIndex(0) +13>Emitted(28, 61) Source(46, 71) + SourceIndex(0) +14>Emitted(28, 62) Source(46, 72) + SourceIndex(0) +--- +>>> _q = _p[_o].skills, _r = _q === void 0 ? { primary: "nosKill", secondary: "noSkill" } : _q, _s = _r.primary, primaryA = _s === void 0 ? "primary" : _s, _t = _r.secondary, secondaryA = _t === void 0 ? "secondary" : _t; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } +3 > +4 > skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } +5 > +6 > primary: primaryA = "primary" +7 > +8 > primary: primaryA = "primary" +9 > , +10> secondary: secondaryA = "secondary" +11> +12> secondary: secondaryA = "secondary" +1->Emitted(29, 5) Source(45, 8) + SourceIndex(0) +2 >Emitted(29, 23) Source(46, 49) + SourceIndex(0) +3 >Emitted(29, 25) Source(45, 8) + SourceIndex(0) +4 >Emitted(29, 95) Source(46, 49) + SourceIndex(0) +5 >Emitted(29, 97) Source(45, 18) + SourceIndex(0) +6 >Emitted(29, 112) Source(45, 47) + SourceIndex(0) +7 >Emitted(29, 114) Source(45, 18) + SourceIndex(0) +8 >Emitted(29, 155) Source(45, 47) + SourceIndex(0) +9 >Emitted(29, 157) Source(45, 49) + SourceIndex(0) +10>Emitted(29, 174) Source(45, 84) + SourceIndex(0) +11>Emitted(29, 176) Source(45, 49) + SourceIndex(0) +12>Emitted(29, 221) Source(45, 84) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > } = + > { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(30, 5) Source(47, 5) + SourceIndex(0) +2 >Emitted(30, 12) Source(47, 12) + SourceIndex(0) +3 >Emitted(30, 13) Source(47, 13) + SourceIndex(0) +4 >Emitted(30, 16) Source(47, 16) + SourceIndex(0) +5 >Emitted(30, 17) Source(47, 17) + SourceIndex(0) +6 >Emitted(30, 25) Source(47, 25) + SourceIndex(0) +7 >Emitted(30, 26) Source(47, 26) + SourceIndex(0) +8 >Emitted(30, 27) Source(47, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(31, 2) Source(48, 2) + SourceIndex(0) +--- +>>>for (var _u = 0, _v = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^ +9 > ^^ +10> ^^^^ +11> ^^ +12> ^^^^^^^ +13> ^^ +14> ^^^^^^ +15> ^^ +16> ^^ +17> ^^^^^^^ +18> ^^ +19> ^^^^^^^^ +20> ^^ +21> ^^^^^^^^^ +22> ^^ +23> ^^^^^^ +24> ^^ +25> ^^ +26> ^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } } of + > +5 > [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +6 > +7 > +8 > [ +9 > { +10> name +11> : +12> "mower" +13> , +14> skills +15> : +16> { +17> primary +18> : +19> "mowing" +20> , +21> secondary +22> : +23> "none" +24> } +25> } +1->Emitted(32, 1) Source(49, 1) + SourceIndex(0) +2 >Emitted(32, 4) Source(49, 4) + SourceIndex(0) +3 >Emitted(32, 5) Source(49, 5) + SourceIndex(0) +4 >Emitted(32, 6) Source(51, 5) + SourceIndex(0) +5 >Emitted(32, 16) Source(52, 83) + SourceIndex(0) +6 >Emitted(32, 18) Source(51, 5) + SourceIndex(0) +7 >Emitted(32, 23) Source(51, 19) + SourceIndex(0) +8 >Emitted(32, 24) Source(51, 20) + SourceIndex(0) +9 >Emitted(32, 26) Source(51, 22) + SourceIndex(0) +10>Emitted(32, 30) Source(51, 26) + SourceIndex(0) +11>Emitted(32, 32) Source(51, 28) + SourceIndex(0) +12>Emitted(32, 39) Source(51, 35) + SourceIndex(0) +13>Emitted(32, 41) Source(51, 37) + SourceIndex(0) +14>Emitted(32, 47) Source(51, 43) + SourceIndex(0) +15>Emitted(32, 49) Source(51, 45) + SourceIndex(0) +16>Emitted(32, 51) Source(51, 47) + SourceIndex(0) +17>Emitted(32, 58) Source(51, 54) + SourceIndex(0) +18>Emitted(32, 60) Source(51, 56) + SourceIndex(0) +19>Emitted(32, 68) Source(51, 64) + SourceIndex(0) +20>Emitted(32, 70) Source(51, 66) + SourceIndex(0) +21>Emitted(32, 79) Source(51, 75) + SourceIndex(0) +22>Emitted(32, 81) Source(51, 77) + SourceIndex(0) +23>Emitted(32, 87) Source(51, 83) + SourceIndex(0) +24>Emitted(32, 89) Source(51, 85) + SourceIndex(0) +25>Emitted(32, 91) Source(51, 87) + SourceIndex(0) +--- +>>> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _u < _v.length; _u++) { +1->^^^^ +2 > ^^ +3 > ^^^^ +4 > ^^ +5 > ^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^ +10> ^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^ +15> ^^ +16> ^^^^^^^^ +17> ^^ +18> ^^ +19> ^ +20> ^^ +21> ^^^^^^^^^^^^^^ +22> ^^ +23> ^^^^ +24> ^ +25> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1->, + > +2 > { +3 > name +4 > : +5 > "trimmer" +6 > , +7 > skills +8 > : +9 > { +10> primary +11> : +12> "trimming" +13> , +14> secondary +15> : +16> "edging" +17> } +18> } +19> ] +20> +21> [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +22> +23> [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +24> ) +1->Emitted(33, 5) Source(52, 9) + SourceIndex(0) +2 >Emitted(33, 7) Source(52, 11) + SourceIndex(0) +3 >Emitted(33, 11) Source(52, 15) + SourceIndex(0) +4 >Emitted(33, 13) Source(52, 17) + SourceIndex(0) +5 >Emitted(33, 22) Source(52, 26) + SourceIndex(0) +6 >Emitted(33, 24) Source(52, 28) + SourceIndex(0) +7 >Emitted(33, 30) Source(52, 34) + SourceIndex(0) +8 >Emitted(33, 32) Source(52, 36) + SourceIndex(0) +9 >Emitted(33, 34) Source(52, 38) + SourceIndex(0) +10>Emitted(33, 41) Source(52, 45) + SourceIndex(0) +11>Emitted(33, 43) Source(52, 47) + SourceIndex(0) +12>Emitted(33, 53) Source(52, 57) + SourceIndex(0) +13>Emitted(33, 55) Source(52, 59) + SourceIndex(0) +14>Emitted(33, 64) Source(52, 68) + SourceIndex(0) +15>Emitted(33, 66) Source(52, 70) + SourceIndex(0) +16>Emitted(33, 74) Source(52, 78) + SourceIndex(0) +17>Emitted(33, 76) Source(52, 80) + SourceIndex(0) +18>Emitted(33, 78) Source(52, 82) + SourceIndex(0) +19>Emitted(33, 79) Source(52, 83) + SourceIndex(0) +20>Emitted(33, 81) Source(51, 5) + SourceIndex(0) +21>Emitted(33, 95) Source(52, 83) + SourceIndex(0) +22>Emitted(33, 97) Source(51, 5) + SourceIndex(0) +23>Emitted(33, 101) Source(52, 83) + SourceIndex(0) +24>Emitted(33, 102) Source(52, 84) + SourceIndex(0) +--- +>>> _w = _v[_u].skills, _x = _w === void 0 ? { primary: "nosKill", secondary: "noSkill" } : _w, _y = _x.primary, primaryA = _y === void 0 ? "primary" : _y, _z = _x.secondary, secondaryA = _z === void 0 ? "secondary" : _z; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } +3 > +4 > skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } +5 > +6 > primary: primaryA = "primary" +7 > +8 > primary: primaryA = "primary" +9 > , +10> secondary: secondaryA = "secondary" +11> +12> secondary: secondaryA = "secondary" +1->Emitted(34, 5) Source(49, 8) + SourceIndex(0) +2 >Emitted(34, 23) Source(50, 49) + SourceIndex(0) +3 >Emitted(34, 25) Source(49, 8) + SourceIndex(0) +4 >Emitted(34, 95) Source(50, 49) + SourceIndex(0) +5 >Emitted(34, 97) Source(49, 18) + SourceIndex(0) +6 >Emitted(34, 112) Source(49, 47) + SourceIndex(0) +7 >Emitted(34, 114) Source(49, 18) + SourceIndex(0) +8 >Emitted(34, 155) Source(49, 47) + SourceIndex(0) +9 >Emitted(34, 157) Source(49, 49) + SourceIndex(0) +10>Emitted(34, 174) Source(49, 84) + SourceIndex(0) +11>Emitted(34, 176) Source(49, 49) + SourceIndex(0) +12>Emitted(34, 221) Source(49, 84) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > } = + > { primary: "nosKill", secondary: "noSkill" } } of + > [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(35, 5) Source(53, 5) + SourceIndex(0) +2 >Emitted(35, 12) Source(53, 12) + SourceIndex(0) +3 >Emitted(35, 13) Source(53, 13) + SourceIndex(0) +4 >Emitted(35, 16) Source(53, 16) + SourceIndex(0) +5 >Emitted(35, 17) Source(53, 17) + SourceIndex(0) +6 >Emitted(35, 25) Source(53, 25) + SourceIndex(0) +7 >Emitted(35, 26) Source(53, 26) + SourceIndex(0) +8 >Emitted(35, 27) Source(53, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(36, 2) Source(54, 2) + SourceIndex(0) +--- +>>>for (var _0 = 0, robots_2 = robots; _0 < robots_2.length; _0++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +13> ^^^-> +1-> + > + > +2 >for +3 > +4 > ({ name = "noName" } of +5 > robots +6 > +7 > robots +8 > +9 > robots +10> +11> robots +12> ) +1->Emitted(37, 1) Source(56, 1) + SourceIndex(0) +2 >Emitted(37, 4) Source(56, 4) + SourceIndex(0) +3 >Emitted(37, 5) Source(56, 5) + SourceIndex(0) +4 >Emitted(37, 6) Source(56, 29) + SourceIndex(0) +5 >Emitted(37, 16) Source(56, 35) + SourceIndex(0) +6 >Emitted(37, 18) Source(56, 29) + SourceIndex(0) +7 >Emitted(37, 35) Source(56, 35) + SourceIndex(0) +8 >Emitted(37, 37) Source(56, 29) + SourceIndex(0) +9 >Emitted(37, 57) Source(56, 35) + SourceIndex(0) +10>Emitted(37, 59) Source(56, 29) + SourceIndex(0) +11>Emitted(37, 63) Source(56, 35) + SourceIndex(0) +12>Emitted(37, 64) Source(56, 36) + SourceIndex(0) +--- +>>> _1 = robots_2[_0].name, name = _1 === void 0 ? "noName" : _1; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > name = "noName" +3 > +4 > name = "noName" +1->Emitted(38, 5) Source(56, 8) + SourceIndex(0) +2 >Emitted(38, 27) Source(56, 23) + SourceIndex(0) +3 >Emitted(38, 29) Source(56, 8) + SourceIndex(0) +4 >Emitted(38, 65) Source(56, 23) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(39, 5) Source(57, 5) + SourceIndex(0) +2 >Emitted(39, 12) Source(57, 12) + SourceIndex(0) +3 >Emitted(39, 13) Source(57, 13) + SourceIndex(0) +4 >Emitted(39, 16) Source(57, 16) + SourceIndex(0) +5 >Emitted(39, 17) Source(57, 17) + SourceIndex(0) +6 >Emitted(39, 22) Source(57, 22) + SourceIndex(0) +7 >Emitted(39, 23) Source(57, 23) + SourceIndex(0) +8 >Emitted(39, 24) Source(57, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(40, 2) Source(58, 2) + SourceIndex(0) +--- +>>>for (var _2 = 0, _3 = getRobots(); _2 < _3.length; _2++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +15> ^^^^-> +1-> + > +2 >for +3 > +4 > ({ name = "noName" } of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> getRobots() +12> +13> getRobots() +14> ) +1->Emitted(41, 1) Source(59, 1) + SourceIndex(0) +2 >Emitted(41, 4) Source(59, 4) + SourceIndex(0) +3 >Emitted(41, 5) Source(59, 5) + SourceIndex(0) +4 >Emitted(41, 6) Source(59, 29) + SourceIndex(0) +5 >Emitted(41, 16) Source(59, 40) + SourceIndex(0) +6 >Emitted(41, 18) Source(59, 29) + SourceIndex(0) +7 >Emitted(41, 23) Source(59, 29) + SourceIndex(0) +8 >Emitted(41, 32) Source(59, 38) + SourceIndex(0) +9 >Emitted(41, 34) Source(59, 40) + SourceIndex(0) +10>Emitted(41, 36) Source(59, 29) + SourceIndex(0) +11>Emitted(41, 50) Source(59, 40) + SourceIndex(0) +12>Emitted(41, 52) Source(59, 29) + SourceIndex(0) +13>Emitted(41, 56) Source(59, 40) + SourceIndex(0) +14>Emitted(41, 57) Source(59, 41) + SourceIndex(0) +--- +>>> _4 = _3[_2].name, name = _4 === void 0 ? "noName" : _4; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > name = "noName" +3 > +4 > name = "noName" +1->Emitted(42, 5) Source(59, 8) + SourceIndex(0) +2 >Emitted(42, 21) Source(59, 23) + SourceIndex(0) +3 >Emitted(42, 23) Source(59, 8) + SourceIndex(0) +4 >Emitted(42, 59) Source(59, 23) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(43, 5) Source(60, 5) + SourceIndex(0) +2 >Emitted(43, 12) Source(60, 12) + SourceIndex(0) +3 >Emitted(43, 13) Source(60, 13) + SourceIndex(0) +4 >Emitted(43, 16) Source(60, 16) + SourceIndex(0) +5 >Emitted(43, 17) Source(60, 17) + SourceIndex(0) +6 >Emitted(43, 22) Source(60, 22) + SourceIndex(0) +7 >Emitted(43, 23) Source(60, 23) + SourceIndex(0) +8 >Emitted(43, 24) Source(60, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(44, 2) Source(61, 2) + SourceIndex(0) +--- +>>>for (var _5 = 0, _6 = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _5 < _6.length; _5++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^^^ +10> ^^ +11> ^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^^ +15> ^^^^^^^^ +16> ^^ +17> ^^ +18> ^^ +19> ^^^^ +20> ^^ +21> ^^^^^^^^^ +22> ^^ +23> ^^^^^ +24> ^^ +25> ^^^^^^^^^^ +26> ^^ +27> ^ +28> ^^ +29> ^^^^^^^^^^^^^^ +30> ^^ +31> ^^^^ +32> ^ +1-> + > +2 >for +3 > +4 > ({ name = "noName" } of +5 > [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +6 > +7 > [ +8 > { +9 > name +10> : +11> "mower" +12> , +13> skill +14> : +15> "mowing" +16> } +17> , +18> { +19> name +20> : +21> "trimmer" +22> , +23> skill +24> : +25> "trimming" +26> } +27> ] +28> +29> [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +30> +31> [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +32> ) +1->Emitted(45, 1) Source(62, 1) + SourceIndex(0) +2 >Emitted(45, 4) Source(62, 4) + SourceIndex(0) +3 >Emitted(45, 5) Source(62, 5) + SourceIndex(0) +4 >Emitted(45, 6) Source(62, 29) + SourceIndex(0) +5 >Emitted(45, 16) Source(62, 105) + SourceIndex(0) +6 >Emitted(45, 18) Source(62, 29) + SourceIndex(0) +7 >Emitted(45, 24) Source(62, 30) + SourceIndex(0) +8 >Emitted(45, 26) Source(62, 32) + SourceIndex(0) +9 >Emitted(45, 30) Source(62, 36) + SourceIndex(0) +10>Emitted(45, 32) Source(62, 38) + SourceIndex(0) +11>Emitted(45, 39) Source(62, 45) + SourceIndex(0) +12>Emitted(45, 41) Source(62, 47) + SourceIndex(0) +13>Emitted(45, 46) Source(62, 52) + SourceIndex(0) +14>Emitted(45, 48) Source(62, 54) + SourceIndex(0) +15>Emitted(45, 56) Source(62, 62) + SourceIndex(0) +16>Emitted(45, 58) Source(62, 64) + SourceIndex(0) +17>Emitted(45, 60) Source(62, 66) + SourceIndex(0) +18>Emitted(45, 62) Source(62, 68) + SourceIndex(0) +19>Emitted(45, 66) Source(62, 72) + SourceIndex(0) +20>Emitted(45, 68) Source(62, 74) + SourceIndex(0) +21>Emitted(45, 77) Source(62, 83) + SourceIndex(0) +22>Emitted(45, 79) Source(62, 85) + SourceIndex(0) +23>Emitted(45, 84) Source(62, 90) + SourceIndex(0) +24>Emitted(45, 86) Source(62, 92) + SourceIndex(0) +25>Emitted(45, 96) Source(62, 102) + SourceIndex(0) +26>Emitted(45, 98) Source(62, 104) + SourceIndex(0) +27>Emitted(45, 99) Source(62, 105) + SourceIndex(0) +28>Emitted(45, 101) Source(62, 29) + SourceIndex(0) +29>Emitted(45, 115) Source(62, 105) + SourceIndex(0) +30>Emitted(45, 117) Source(62, 29) + SourceIndex(0) +31>Emitted(45, 121) Source(62, 105) + SourceIndex(0) +32>Emitted(45, 122) Source(62, 106) + SourceIndex(0) +--- +>>> _7 = _6[_5].name, name = _7 === void 0 ? "noName" : _7; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > name = "noName" +3 > +4 > name = "noName" +1 >Emitted(46, 5) Source(62, 8) + SourceIndex(0) +2 >Emitted(46, 21) Source(62, 23) + SourceIndex(0) +3 >Emitted(46, 23) Source(62, 8) + SourceIndex(0) +4 >Emitted(46, 59) Source(62, 23) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(47, 5) Source(63, 5) + SourceIndex(0) +2 >Emitted(47, 12) Source(63, 12) + SourceIndex(0) +3 >Emitted(47, 13) Source(63, 13) + SourceIndex(0) +4 >Emitted(47, 16) Source(63, 16) + SourceIndex(0) +5 >Emitted(47, 17) Source(63, 17) + SourceIndex(0) +6 >Emitted(47, 22) Source(63, 22) + SourceIndex(0) +7 >Emitted(47, 23) Source(63, 23) + SourceIndex(0) +8 >Emitted(47, 24) Source(63, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(48, 2) Source(64, 2) + SourceIndex(0) +--- +>>>for (var _8 = 0, multiRobots_2 = multiRobots; _8 < multiRobots_2.length; _8++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ({ + > skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + > } of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > multiRobots +10> +11> multiRobots +12> ) +1->Emitted(49, 1) Source(65, 1) + SourceIndex(0) +2 >Emitted(49, 4) Source(65, 4) + SourceIndex(0) +3 >Emitted(49, 5) Source(65, 5) + SourceIndex(0) +4 >Emitted(49, 6) Source(70, 6) + SourceIndex(0) +5 >Emitted(49, 16) Source(70, 17) + SourceIndex(0) +6 >Emitted(49, 18) Source(70, 6) + SourceIndex(0) +7 >Emitted(49, 45) Source(70, 17) + SourceIndex(0) +8 >Emitted(49, 47) Source(70, 6) + SourceIndex(0) +9 >Emitted(49, 72) Source(70, 17) + SourceIndex(0) +10>Emitted(49, 74) Source(70, 6) + SourceIndex(0) +11>Emitted(49, 78) Source(70, 17) + SourceIndex(0) +12>Emitted(49, 79) Source(70, 18) + SourceIndex(0) +--- +>>> _9 = multiRobots_2[_8].skills, _10 = _9 === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _9, _11 = _10.primary, primary = _11 === void 0 ? "primary" : _11, _12 = _10.secondary, secondary = _12 === void 0 ? "secondary" : _12; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } +3 > +4 > skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } +5 > +6 > primary = "primary" +7 > +8 > primary = "primary" +9 > , + > +10> secondary = "secondary" +11> +12> secondary = "secondary" +1->Emitted(50, 5) Source(66, 5) + SourceIndex(0) +2 >Emitted(50, 34) Source(69, 53) + SourceIndex(0) +3 >Emitted(50, 36) Source(66, 5) + SourceIndex(0) +4 >Emitted(50, 107) Source(69, 53) + SourceIndex(0) +5 >Emitted(50, 109) Source(67, 9) + SourceIndex(0) +6 >Emitted(50, 126) Source(67, 28) + SourceIndex(0) +7 >Emitted(50, 128) Source(67, 9) + SourceIndex(0) +8 >Emitted(50, 170) Source(67, 28) + SourceIndex(0) +9 >Emitted(50, 172) Source(68, 9) + SourceIndex(0) +10>Emitted(50, 191) Source(68, 32) + SourceIndex(0) +11>Emitted(50, 193) Source(68, 9) + SourceIndex(0) +12>Emitted(50, 239) Source(68, 32) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > } = { primary: "noSkill", secondary: "noSkill" } + >} of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(51, 5) Source(71, 5) + SourceIndex(0) +2 >Emitted(51, 12) Source(71, 12) + SourceIndex(0) +3 >Emitted(51, 13) Source(71, 13) + SourceIndex(0) +4 >Emitted(51, 16) Source(71, 16) + SourceIndex(0) +5 >Emitted(51, 17) Source(71, 17) + SourceIndex(0) +6 >Emitted(51, 25) Source(71, 25) + SourceIndex(0) +7 >Emitted(51, 26) Source(71, 26) + SourceIndex(0) +8 >Emitted(51, 27) Source(71, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(52, 2) Source(72, 2) + SourceIndex(0) +--- +>>>for (var _13 = 0, _14 = getMultiRobots(); _13 < _14.length; _13++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ({ + > skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + > } of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> getMultiRobots() +12> +13> getMultiRobots() +14> ) +1->Emitted(53, 1) Source(73, 1) + SourceIndex(0) +2 >Emitted(53, 4) Source(73, 4) + SourceIndex(0) +3 >Emitted(53, 5) Source(73, 5) + SourceIndex(0) +4 >Emitted(53, 6) Source(78, 6) + SourceIndex(0) +5 >Emitted(53, 17) Source(78, 22) + SourceIndex(0) +6 >Emitted(53, 19) Source(78, 6) + SourceIndex(0) +7 >Emitted(53, 25) Source(78, 6) + SourceIndex(0) +8 >Emitted(53, 39) Source(78, 20) + SourceIndex(0) +9 >Emitted(53, 41) Source(78, 22) + SourceIndex(0) +10>Emitted(53, 43) Source(78, 6) + SourceIndex(0) +11>Emitted(53, 59) Source(78, 22) + SourceIndex(0) +12>Emitted(53, 61) Source(78, 6) + SourceIndex(0) +13>Emitted(53, 66) Source(78, 22) + SourceIndex(0) +14>Emitted(53, 67) Source(78, 23) + SourceIndex(0) +--- +>>> _15 = _14[_13].skills, _16 = _15 === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _15, _17 = _16.primary, primary = _17 === void 0 ? "primary" : _17, _18 = _16.secondary, secondary = _18 === void 0 ? "secondary" : _18; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } +3 > +4 > skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } +5 > +6 > primary = "primary" +7 > +8 > primary = "primary" +9 > , + > +10> secondary = "secondary" +11> +12> secondary = "secondary" +1->Emitted(54, 5) Source(74, 5) + SourceIndex(0) +2 >Emitted(54, 26) Source(77, 53) + SourceIndex(0) +3 >Emitted(54, 28) Source(74, 5) + SourceIndex(0) +4 >Emitted(54, 101) Source(77, 53) + SourceIndex(0) +5 >Emitted(54, 103) Source(75, 9) + SourceIndex(0) +6 >Emitted(54, 120) Source(75, 28) + SourceIndex(0) +7 >Emitted(54, 122) Source(75, 9) + SourceIndex(0) +8 >Emitted(54, 164) Source(75, 28) + SourceIndex(0) +9 >Emitted(54, 166) Source(76, 9) + SourceIndex(0) +10>Emitted(54, 185) Source(76, 32) + SourceIndex(0) +11>Emitted(54, 187) Source(76, 9) + SourceIndex(0) +12>Emitted(54, 233) Source(76, 32) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > } = { primary: "noSkill", secondary: "noSkill" } + >} of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(55, 5) Source(79, 5) + SourceIndex(0) +2 >Emitted(55, 12) Source(79, 12) + SourceIndex(0) +3 >Emitted(55, 13) Source(79, 13) + SourceIndex(0) +4 >Emitted(55, 16) Source(79, 16) + SourceIndex(0) +5 >Emitted(55, 17) Source(79, 17) + SourceIndex(0) +6 >Emitted(55, 25) Source(79, 25) + SourceIndex(0) +7 >Emitted(55, 26) Source(79, 26) + SourceIndex(0) +8 >Emitted(55, 27) Source(79, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(56, 2) Source(80, 2) + SourceIndex(0) +--- +>>>for (var _19 = 0, _20 = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^ +9 > ^^^^ +10> ^^ +11> ^^^^^^^ +12> ^^ +13> ^^^^^^ +14> ^^ +15> ^^ +16> ^^^^^^^ +17> ^^ +18> ^^^^^^^^ +19> ^^ +20> ^^^^^^^^^ +21> ^^ +22> ^^^^^^ +23> ^^ +24> ^^ +25> ^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ({ + > skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + > } of +5 > [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +6 > +7 > [ +8 > { +9 > name +10> : +11> "mower" +12> , +13> skills +14> : +15> { +16> primary +17> : +18> "mowing" +19> , +20> secondary +21> : +22> "none" +23> } +24> } +1->Emitted(57, 1) Source(81, 1) + SourceIndex(0) +2 >Emitted(57, 4) Source(81, 4) + SourceIndex(0) +3 >Emitted(57, 5) Source(81, 5) + SourceIndex(0) +4 >Emitted(57, 6) Source(86, 6) + SourceIndex(0) +5 >Emitted(57, 17) Source(87, 79) + SourceIndex(0) +6 >Emitted(57, 19) Source(86, 6) + SourceIndex(0) +7 >Emitted(57, 26) Source(86, 7) + SourceIndex(0) +8 >Emitted(57, 28) Source(86, 9) + SourceIndex(0) +9 >Emitted(57, 32) Source(86, 13) + SourceIndex(0) +10>Emitted(57, 34) Source(86, 15) + SourceIndex(0) +11>Emitted(57, 41) Source(86, 22) + SourceIndex(0) +12>Emitted(57, 43) Source(86, 24) + SourceIndex(0) +13>Emitted(57, 49) Source(86, 30) + SourceIndex(0) +14>Emitted(57, 51) Source(86, 32) + SourceIndex(0) +15>Emitted(57, 53) Source(86, 34) + SourceIndex(0) +16>Emitted(57, 60) Source(86, 41) + SourceIndex(0) +17>Emitted(57, 62) Source(86, 43) + SourceIndex(0) +18>Emitted(57, 70) Source(86, 51) + SourceIndex(0) +19>Emitted(57, 72) Source(86, 53) + SourceIndex(0) +20>Emitted(57, 81) Source(86, 62) + SourceIndex(0) +21>Emitted(57, 83) Source(86, 64) + SourceIndex(0) +22>Emitted(57, 89) Source(86, 70) + SourceIndex(0) +23>Emitted(57, 91) Source(86, 72) + SourceIndex(0) +24>Emitted(57, 93) Source(86, 74) + SourceIndex(0) +--- +>>> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _19 < _20.length; _19++) { +1->^^^^ +2 > ^^ +3 > ^^^^ +4 > ^^ +5 > ^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^ +10> ^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^ +15> ^^ +16> ^^^^^^^^ +17> ^^ +18> ^^ +19> ^ +20> ^^ +21> ^^^^^^^^^^^^^^^^ +22> ^^ +23> ^^^^^ +24> ^ +25> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1->, + > +2 > { +3 > name +4 > : +5 > "trimmer" +6 > , +7 > skills +8 > : +9 > { +10> primary +11> : +12> "trimming" +13> , +14> secondary +15> : +16> "edging" +17> } +18> } +19> ] +20> +21> [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +22> +23> [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +24> ) +1->Emitted(58, 5) Source(87, 5) + SourceIndex(0) +2 >Emitted(58, 7) Source(87, 7) + SourceIndex(0) +3 >Emitted(58, 11) Source(87, 11) + SourceIndex(0) +4 >Emitted(58, 13) Source(87, 13) + SourceIndex(0) +5 >Emitted(58, 22) Source(87, 22) + SourceIndex(0) +6 >Emitted(58, 24) Source(87, 24) + SourceIndex(0) +7 >Emitted(58, 30) Source(87, 30) + SourceIndex(0) +8 >Emitted(58, 32) Source(87, 32) + SourceIndex(0) +9 >Emitted(58, 34) Source(87, 34) + SourceIndex(0) +10>Emitted(58, 41) Source(87, 41) + SourceIndex(0) +11>Emitted(58, 43) Source(87, 43) + SourceIndex(0) +12>Emitted(58, 53) Source(87, 53) + SourceIndex(0) +13>Emitted(58, 55) Source(87, 55) + SourceIndex(0) +14>Emitted(58, 64) Source(87, 64) + SourceIndex(0) +15>Emitted(58, 66) Source(87, 66) + SourceIndex(0) +16>Emitted(58, 74) Source(87, 74) + SourceIndex(0) +17>Emitted(58, 76) Source(87, 76) + SourceIndex(0) +18>Emitted(58, 78) Source(87, 78) + SourceIndex(0) +19>Emitted(58, 79) Source(87, 79) + SourceIndex(0) +20>Emitted(58, 81) Source(86, 6) + SourceIndex(0) +21>Emitted(58, 97) Source(87, 79) + SourceIndex(0) +22>Emitted(58, 99) Source(86, 6) + SourceIndex(0) +23>Emitted(58, 104) Source(87, 79) + SourceIndex(0) +24>Emitted(58, 105) Source(87, 80) + SourceIndex(0) +--- +>>> _21 = _20[_19].skills, _22 = _21 === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _21, _23 = _22.primary, primary = _23 === void 0 ? "primary" : _23, _24 = _22.secondary, secondary = _24 === void 0 ? "secondary" : _24; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } +3 > +4 > skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } +5 > +6 > primary = "primary" +7 > +8 > primary = "primary" +9 > , + > +10> secondary = "secondary" +11> +12> secondary = "secondary" +1->Emitted(59, 5) Source(82, 5) + SourceIndex(0) +2 >Emitted(59, 26) Source(85, 53) + SourceIndex(0) +3 >Emitted(59, 28) Source(82, 5) + SourceIndex(0) +4 >Emitted(59, 101) Source(85, 53) + SourceIndex(0) +5 >Emitted(59, 103) Source(83, 9) + SourceIndex(0) +6 >Emitted(59, 120) Source(83, 28) + SourceIndex(0) +7 >Emitted(59, 122) Source(83, 9) + SourceIndex(0) +8 >Emitted(59, 164) Source(83, 28) + SourceIndex(0) +9 >Emitted(59, 166) Source(84, 9) + SourceIndex(0) +10>Emitted(59, 185) Source(84, 32) + SourceIndex(0) +11>Emitted(59, 187) Source(84, 9) + SourceIndex(0) +12>Emitted(59, 233) Source(84, 32) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > } = { primary: "noSkill", secondary: "noSkill" } + >} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(60, 5) Source(88, 5) + SourceIndex(0) +2 >Emitted(60, 12) Source(88, 12) + SourceIndex(0) +3 >Emitted(60, 13) Source(88, 13) + SourceIndex(0) +4 >Emitted(60, 16) Source(88, 16) + SourceIndex(0) +5 >Emitted(60, 17) Source(88, 17) + SourceIndex(0) +6 >Emitted(60, 25) Source(88, 25) + SourceIndex(0) +7 >Emitted(60, 26) Source(88, 26) + SourceIndex(0) +8 >Emitted(60, 27) Source(88, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(61, 2) Source(89, 2) + SourceIndex(0) +--- +>>>for (var _25 = 0, robots_3 = robots; _25 < robots_3.length; _25++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^ +12> ^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > + > +2 >for +3 > +4 > ({name: nameA = "noName", skill: skillA = "noSkill" } of +5 > robots +6 > +7 > robots +8 > +9 > robots +10> +11> robots +12> ) +1->Emitted(62, 1) Source(92, 1) + SourceIndex(0) +2 >Emitted(62, 4) Source(92, 4) + SourceIndex(0) +3 >Emitted(62, 5) Source(92, 5) + SourceIndex(0) +4 >Emitted(62, 6) Source(92, 62) + SourceIndex(0) +5 >Emitted(62, 17) Source(92, 68) + SourceIndex(0) +6 >Emitted(62, 19) Source(92, 62) + SourceIndex(0) +7 >Emitted(62, 36) Source(92, 68) + SourceIndex(0) +8 >Emitted(62, 38) Source(92, 62) + SourceIndex(0) +9 >Emitted(62, 59) Source(92, 68) + SourceIndex(0) +10>Emitted(62, 61) Source(92, 62) + SourceIndex(0) +11>Emitted(62, 66) Source(92, 68) + SourceIndex(0) +12>Emitted(62, 67) Source(92, 69) + SourceIndex(0) +--- +>>> _26 = robots_3[_25], _27 = _26.name, nameA = _27 === void 0 ? "noName" : _27, _28 = _26.skill, skillA = _28 === void 0 ? "noSkill" : _28; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > {name: nameA = "noName", skill: skillA = "noSkill" } +3 > +4 > name: nameA = "noName" +5 > +6 > name: nameA = "noName" +7 > , +8 > skill: skillA = "noSkill" +9 > +10> skill: skillA = "noSkill" +1->Emitted(63, 5) Source(92, 6) + SourceIndex(0) +2 >Emitted(63, 24) Source(92, 58) + SourceIndex(0) +3 >Emitted(63, 26) Source(92, 7) + SourceIndex(0) +4 >Emitted(63, 40) Source(92, 29) + SourceIndex(0) +5 >Emitted(63, 42) Source(92, 7) + SourceIndex(0) +6 >Emitted(63, 81) Source(92, 29) + SourceIndex(0) +7 >Emitted(63, 83) Source(92, 31) + SourceIndex(0) +8 >Emitted(63, 98) Source(92, 56) + SourceIndex(0) +9 >Emitted(63, 100) Source(92, 31) + SourceIndex(0) +10>Emitted(63, 141) Source(92, 56) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(64, 5) Source(93, 5) + SourceIndex(0) +2 >Emitted(64, 12) Source(93, 12) + SourceIndex(0) +3 >Emitted(64, 13) Source(93, 13) + SourceIndex(0) +4 >Emitted(64, 16) Source(93, 16) + SourceIndex(0) +5 >Emitted(64, 17) Source(93, 17) + SourceIndex(0) +6 >Emitted(64, 22) Source(93, 22) + SourceIndex(0) +7 >Emitted(64, 23) Source(93, 23) + SourceIndex(0) +8 >Emitted(64, 24) Source(93, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(65, 2) Source(94, 2) + SourceIndex(0) +--- +>>>for (var _29 = 0, _30 = getRobots(); _29 < _30.length; _29++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ({name: nameA = "noName", skill: skillA = "noSkill" } of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> getRobots() +12> +13> getRobots() +14> ) +1->Emitted(66, 1) Source(95, 1) + SourceIndex(0) +2 >Emitted(66, 4) Source(95, 4) + SourceIndex(0) +3 >Emitted(66, 5) Source(95, 5) + SourceIndex(0) +4 >Emitted(66, 6) Source(95, 63) + SourceIndex(0) +5 >Emitted(66, 17) Source(95, 74) + SourceIndex(0) +6 >Emitted(66, 19) Source(95, 63) + SourceIndex(0) +7 >Emitted(66, 25) Source(95, 63) + SourceIndex(0) +8 >Emitted(66, 34) Source(95, 72) + SourceIndex(0) +9 >Emitted(66, 36) Source(95, 74) + SourceIndex(0) +10>Emitted(66, 38) Source(95, 63) + SourceIndex(0) +11>Emitted(66, 54) Source(95, 74) + SourceIndex(0) +12>Emitted(66, 56) Source(95, 63) + SourceIndex(0) +13>Emitted(66, 61) Source(95, 74) + SourceIndex(0) +14>Emitted(66, 62) Source(95, 75) + SourceIndex(0) +--- +>>> _31 = _30[_29], _32 = _31.name, nameA = _32 === void 0 ? "noName" : _32, _33 = _31.skill, skillA = _33 === void 0 ? "noSkill" : _33; +1->^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > {name: nameA = "noName", skill: skillA = "noSkill" } +3 > +4 > name: nameA = "noName" +5 > +6 > name: nameA = "noName" +7 > , +8 > skill: skillA = "noSkill" +9 > +10> skill: skillA = "noSkill" +1->Emitted(67, 5) Source(95, 6) + SourceIndex(0) +2 >Emitted(67, 19) Source(95, 59) + SourceIndex(0) +3 >Emitted(67, 21) Source(95, 7) + SourceIndex(0) +4 >Emitted(67, 35) Source(95, 29) + SourceIndex(0) +5 >Emitted(67, 37) Source(95, 7) + SourceIndex(0) +6 >Emitted(67, 76) Source(95, 29) + SourceIndex(0) +7 >Emitted(67, 78) Source(95, 31) + SourceIndex(0) +8 >Emitted(67, 93) Source(95, 56) + SourceIndex(0) +9 >Emitted(67, 95) Source(95, 31) + SourceIndex(0) +10>Emitted(67, 136) Source(95, 56) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(68, 5) Source(96, 5) + SourceIndex(0) +2 >Emitted(68, 12) Source(96, 12) + SourceIndex(0) +3 >Emitted(68, 13) Source(96, 13) + SourceIndex(0) +4 >Emitted(68, 16) Source(96, 16) + SourceIndex(0) +5 >Emitted(68, 17) Source(96, 17) + SourceIndex(0) +6 >Emitted(68, 22) Source(96, 22) + SourceIndex(0) +7 >Emitted(68, 23) Source(96, 23) + SourceIndex(0) +8 >Emitted(68, 24) Source(96, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(69, 2) Source(97, 2) + SourceIndex(0) +--- +>>>for (var _34 = 0, _35 = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _34 < _35.length; _34++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^ +9 > ^^^^ +10> ^^ +11> ^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^^ +15> ^^^^^^^^ +16> ^^ +17> ^^ +18> ^^ +19> ^^^^ +20> ^^ +21> ^^^^^^^^^ +22> ^^ +23> ^^^^^ +24> ^^ +25> ^^^^^^^^^^ +26> ^^ +27> ^ +28> ^^ +29> ^^^^^^^^^^^^^^^^ +30> ^^ +31> ^^^^^ +32> ^ +33> ^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ({name: nameA = "noName", skill: skillA = "noSkill" } of +5 > [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +6 > +7 > [ +8 > { +9 > name +10> : +11> "mower" +12> , +13> skill +14> : +15> "mowing" +16> } +17> , +18> { +19> name +20> : +21> "trimmer" +22> , +23> skill +24> : +25> "trimming" +26> } +27> ] +28> +29> [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +30> +31> [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +32> ) +1->Emitted(70, 1) Source(98, 1) + SourceIndex(0) +2 >Emitted(70, 4) Source(98, 4) + SourceIndex(0) +3 >Emitted(70, 5) Source(98, 5) + SourceIndex(0) +4 >Emitted(70, 6) Source(98, 63) + SourceIndex(0) +5 >Emitted(70, 17) Source(98, 139) + SourceIndex(0) +6 >Emitted(70, 19) Source(98, 63) + SourceIndex(0) +7 >Emitted(70, 26) Source(98, 64) + SourceIndex(0) +8 >Emitted(70, 28) Source(98, 66) + SourceIndex(0) +9 >Emitted(70, 32) Source(98, 70) + SourceIndex(0) +10>Emitted(70, 34) Source(98, 72) + SourceIndex(0) +11>Emitted(70, 41) Source(98, 79) + SourceIndex(0) +12>Emitted(70, 43) Source(98, 81) + SourceIndex(0) +13>Emitted(70, 48) Source(98, 86) + SourceIndex(0) +14>Emitted(70, 50) Source(98, 88) + SourceIndex(0) +15>Emitted(70, 58) Source(98, 96) + SourceIndex(0) +16>Emitted(70, 60) Source(98, 98) + SourceIndex(0) +17>Emitted(70, 62) Source(98, 100) + SourceIndex(0) +18>Emitted(70, 64) Source(98, 102) + SourceIndex(0) +19>Emitted(70, 68) Source(98, 106) + SourceIndex(0) +20>Emitted(70, 70) Source(98, 108) + SourceIndex(0) +21>Emitted(70, 79) Source(98, 117) + SourceIndex(0) +22>Emitted(70, 81) Source(98, 119) + SourceIndex(0) +23>Emitted(70, 86) Source(98, 124) + SourceIndex(0) +24>Emitted(70, 88) Source(98, 126) + SourceIndex(0) +25>Emitted(70, 98) Source(98, 136) + SourceIndex(0) +26>Emitted(70, 100) Source(98, 138) + SourceIndex(0) +27>Emitted(70, 101) Source(98, 139) + SourceIndex(0) +28>Emitted(70, 103) Source(98, 63) + SourceIndex(0) +29>Emitted(70, 119) Source(98, 139) + SourceIndex(0) +30>Emitted(70, 121) Source(98, 63) + SourceIndex(0) +31>Emitted(70, 126) Source(98, 139) + SourceIndex(0) +32>Emitted(70, 127) Source(98, 140) + SourceIndex(0) +--- +>>> _36 = _35[_34], _37 = _36.name, nameA = _37 === void 0 ? "noName" : _37, _38 = _36.skill, skillA = _38 === void 0 ? "noSkill" : _38; +1->^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > {name: nameA = "noName", skill: skillA = "noSkill" } +3 > +4 > name: nameA = "noName" +5 > +6 > name: nameA = "noName" +7 > , +8 > skill: skillA = "noSkill" +9 > +10> skill: skillA = "noSkill" +1->Emitted(71, 5) Source(98, 6) + SourceIndex(0) +2 >Emitted(71, 19) Source(98, 59) + SourceIndex(0) +3 >Emitted(71, 21) Source(98, 7) + SourceIndex(0) +4 >Emitted(71, 35) Source(98, 29) + SourceIndex(0) +5 >Emitted(71, 37) Source(98, 7) + SourceIndex(0) +6 >Emitted(71, 76) Source(98, 29) + SourceIndex(0) +7 >Emitted(71, 78) Source(98, 31) + SourceIndex(0) +8 >Emitted(71, 93) Source(98, 56) + SourceIndex(0) +9 >Emitted(71, 95) Source(98, 31) + SourceIndex(0) +10>Emitted(71, 136) Source(98, 56) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(72, 5) Source(99, 5) + SourceIndex(0) +2 >Emitted(72, 12) Source(99, 12) + SourceIndex(0) +3 >Emitted(72, 13) Source(99, 13) + SourceIndex(0) +4 >Emitted(72, 16) Source(99, 16) + SourceIndex(0) +5 >Emitted(72, 17) Source(99, 17) + SourceIndex(0) +6 >Emitted(72, 22) Source(99, 22) + SourceIndex(0) +7 >Emitted(72, 23) Source(99, 23) + SourceIndex(0) +8 >Emitted(72, 24) Source(99, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(73, 2) Source(100, 2) + SourceIndex(0) +--- +>>>for (var _39 = 0, multiRobots_3 = multiRobots; _39 < multiRobots_3.length; _39++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^ +12> ^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ({ + > name: nameA = "noName", + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + > } of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > multiRobots +10> +11> multiRobots +12> ) +1->Emitted(74, 1) Source(101, 1) + SourceIndex(0) +2 >Emitted(74, 4) Source(101, 4) + SourceIndex(0) +3 >Emitted(74, 5) Source(101, 5) + SourceIndex(0) +4 >Emitted(74, 6) Source(107, 6) + SourceIndex(0) +5 >Emitted(74, 17) Source(107, 17) + SourceIndex(0) +6 >Emitted(74, 19) Source(107, 6) + SourceIndex(0) +7 >Emitted(74, 46) Source(107, 17) + SourceIndex(0) +8 >Emitted(74, 48) Source(107, 6) + SourceIndex(0) +9 >Emitted(74, 74) Source(107, 17) + SourceIndex(0) +10>Emitted(74, 76) Source(107, 6) + SourceIndex(0) +11>Emitted(74, 81) Source(107, 17) + SourceIndex(0) +12>Emitted(74, 82) Source(107, 18) + SourceIndex(0) +--- +>>> _40 = multiRobots_3[_39], _41 = _40.name, nameA = _41 === void 0 ? "noName" : _41, _42 = _40.skills, _43 = _42 === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _42, _44 = _43.primary, primaryA = _44 === void 0 ? "primary" : _44, _45 = _43.secondary, secondaryA = _45 === void 0 ? "secondary" : _45; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > { + > name: nameA = "noName", + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + > } +3 > +4 > name: nameA = "noName" +5 > +6 > name: nameA = "noName" +7 > , + > +8 > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } +9 > +10> skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } +11> +12> primary: primaryA = "primary" +13> +14> primary: primaryA = "primary" +15> , + > +16> secondary: secondaryA = "secondary" +17> +18> secondary: secondaryA = "secondary" +1->Emitted(75, 5) Source(101, 6) + SourceIndex(0) +2 >Emitted(75, 29) Source(107, 2) + SourceIndex(0) +3 >Emitted(75, 31) Source(102, 5) + SourceIndex(0) +4 >Emitted(75, 45) Source(102, 27) + SourceIndex(0) +5 >Emitted(75, 47) Source(102, 5) + SourceIndex(0) +6 >Emitted(75, 86) Source(102, 27) + SourceIndex(0) +7 >Emitted(75, 88) Source(103, 5) + SourceIndex(0) +8 >Emitted(75, 104) Source(106, 53) + SourceIndex(0) +9 >Emitted(75, 106) Source(103, 5) + SourceIndex(0) +10>Emitted(75, 179) Source(106, 53) + SourceIndex(0) +11>Emitted(75, 181) Source(104, 9) + SourceIndex(0) +12>Emitted(75, 198) Source(104, 38) + SourceIndex(0) +13>Emitted(75, 200) Source(104, 9) + SourceIndex(0) +14>Emitted(75, 243) Source(104, 38) + SourceIndex(0) +15>Emitted(75, 245) Source(105, 9) + SourceIndex(0) +16>Emitted(75, 264) Source(105, 44) + SourceIndex(0) +17>Emitted(75, 266) Source(105, 9) + SourceIndex(0) +18>Emitted(75, 313) Source(105, 44) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > } = { primary: "noSkill", secondary: "noSkill" } + >} of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(76, 5) Source(108, 5) + SourceIndex(0) +2 >Emitted(76, 12) Source(108, 12) + SourceIndex(0) +3 >Emitted(76, 13) Source(108, 13) + SourceIndex(0) +4 >Emitted(76, 16) Source(108, 16) + SourceIndex(0) +5 >Emitted(76, 17) Source(108, 17) + SourceIndex(0) +6 >Emitted(76, 22) Source(108, 22) + SourceIndex(0) +7 >Emitted(76, 23) Source(108, 23) + SourceIndex(0) +8 >Emitted(76, 24) Source(108, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(77, 2) Source(109, 2) + SourceIndex(0) +--- +>>>for (var _46 = 0, _47 = getMultiRobots(); _46 < _47.length; _46++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ({ + > name: nameA = "noName", + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + > } of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> getMultiRobots() +12> +13> getMultiRobots() +14> ) +1->Emitted(78, 1) Source(110, 1) + SourceIndex(0) +2 >Emitted(78, 4) Source(110, 4) + SourceIndex(0) +3 >Emitted(78, 5) Source(110, 5) + SourceIndex(0) +4 >Emitted(78, 6) Source(116, 6) + SourceIndex(0) +5 >Emitted(78, 17) Source(116, 22) + SourceIndex(0) +6 >Emitted(78, 19) Source(116, 6) + SourceIndex(0) +7 >Emitted(78, 25) Source(116, 6) + SourceIndex(0) +8 >Emitted(78, 39) Source(116, 20) + SourceIndex(0) +9 >Emitted(78, 41) Source(116, 22) + SourceIndex(0) +10>Emitted(78, 43) Source(116, 6) + SourceIndex(0) +11>Emitted(78, 59) Source(116, 22) + SourceIndex(0) +12>Emitted(78, 61) Source(116, 6) + SourceIndex(0) +13>Emitted(78, 66) Source(116, 22) + SourceIndex(0) +14>Emitted(78, 67) Source(116, 23) + SourceIndex(0) +--- +>>> _48 = _47[_46], _49 = _48.name, nameA = _49 === void 0 ? "noName" : _49, _50 = _48.skills, _51 = _50 === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _50, _52 = _51.primary, primaryA = _52 === void 0 ? "primary" : _52, _53 = _51.secondary, secondaryA = _53 === void 0 ? "secondary" : _53; +1->^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > { + > name: nameA = "noName", + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + > } +3 > +4 > name: nameA = "noName" +5 > +6 > name: nameA = "noName" +7 > , + > +8 > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } +9 > +10> skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } +11> +12> primary: primaryA = "primary" +13> +14> primary: primaryA = "primary" +15> , + > +16> secondary: secondaryA = "secondary" +17> +18> secondary: secondaryA = "secondary" +1->Emitted(79, 5) Source(110, 6) + SourceIndex(0) +2 >Emitted(79, 19) Source(116, 2) + SourceIndex(0) +3 >Emitted(79, 21) Source(111, 5) + SourceIndex(0) +4 >Emitted(79, 35) Source(111, 27) + SourceIndex(0) +5 >Emitted(79, 37) Source(111, 5) + SourceIndex(0) +6 >Emitted(79, 76) Source(111, 27) + SourceIndex(0) +7 >Emitted(79, 78) Source(112, 5) + SourceIndex(0) +8 >Emitted(79, 94) Source(115, 53) + SourceIndex(0) +9 >Emitted(79, 96) Source(112, 5) + SourceIndex(0) +10>Emitted(79, 169) Source(115, 53) + SourceIndex(0) +11>Emitted(79, 171) Source(113, 9) + SourceIndex(0) +12>Emitted(79, 188) Source(113, 38) + SourceIndex(0) +13>Emitted(79, 190) Source(113, 9) + SourceIndex(0) +14>Emitted(79, 233) Source(113, 38) + SourceIndex(0) +15>Emitted(79, 235) Source(114, 9) + SourceIndex(0) +16>Emitted(79, 254) Source(114, 44) + SourceIndex(0) +17>Emitted(79, 256) Source(114, 9) + SourceIndex(0) +18>Emitted(79, 303) Source(114, 44) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > } = { primary: "noSkill", secondary: "noSkill" } + >} of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(80, 5) Source(117, 5) + SourceIndex(0) +2 >Emitted(80, 12) Source(117, 12) + SourceIndex(0) +3 >Emitted(80, 13) Source(117, 13) + SourceIndex(0) +4 >Emitted(80, 16) Source(117, 16) + SourceIndex(0) +5 >Emitted(80, 17) Source(117, 17) + SourceIndex(0) +6 >Emitted(80, 22) Source(117, 22) + SourceIndex(0) +7 >Emitted(80, 23) Source(117, 23) + SourceIndex(0) +8 >Emitted(80, 24) Source(117, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(81, 2) Source(118, 2) + SourceIndex(0) +--- +>>>for (var _54 = 0, _55 = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^ +9 > ^^ +10> ^^^^ +11> ^^ +12> ^^^^^^^ +13> ^^ +14> ^^^^^^ +15> ^^ +16> ^^ +17> ^^^^^^^ +18> ^^ +19> ^^^^^^^^ +20> ^^ +21> ^^^^^^^^^ +22> ^^ +23> ^^^^^^ +24> ^^ +25> ^^ +26> ^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ({ + > name: nameA = "noName", + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + > } of +5 > [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +6 > +7 > +8 > [ +9 > { +10> name +11> : +12> "mower" +13> , +14> skills +15> : +16> { +17> primary +18> : +19> "mowing" +20> , +21> secondary +22> : +23> "none" +24> } +25> } +1->Emitted(82, 1) Source(119, 1) + SourceIndex(0) +2 >Emitted(82, 4) Source(119, 4) + SourceIndex(0) +3 >Emitted(82, 5) Source(119, 5) + SourceIndex(0) +4 >Emitted(82, 6) Source(125, 6) + SourceIndex(0) +5 >Emitted(82, 17) Source(126, 79) + SourceIndex(0) +6 >Emitted(82, 19) Source(125, 6) + SourceIndex(0) +7 >Emitted(82, 25) Source(125, 20) + SourceIndex(0) +8 >Emitted(82, 26) Source(125, 21) + SourceIndex(0) +9 >Emitted(82, 28) Source(125, 23) + SourceIndex(0) +10>Emitted(82, 32) Source(125, 27) + SourceIndex(0) +11>Emitted(82, 34) Source(125, 29) + SourceIndex(0) +12>Emitted(82, 41) Source(125, 36) + SourceIndex(0) +13>Emitted(82, 43) Source(125, 38) + SourceIndex(0) +14>Emitted(82, 49) Source(125, 44) + SourceIndex(0) +15>Emitted(82, 51) Source(125, 46) + SourceIndex(0) +16>Emitted(82, 53) Source(125, 48) + SourceIndex(0) +17>Emitted(82, 60) Source(125, 55) + SourceIndex(0) +18>Emitted(82, 62) Source(125, 57) + SourceIndex(0) +19>Emitted(82, 70) Source(125, 65) + SourceIndex(0) +20>Emitted(82, 72) Source(125, 67) + SourceIndex(0) +21>Emitted(82, 81) Source(125, 76) + SourceIndex(0) +22>Emitted(82, 83) Source(125, 78) + SourceIndex(0) +23>Emitted(82, 89) Source(125, 84) + SourceIndex(0) +24>Emitted(82, 91) Source(125, 86) + SourceIndex(0) +25>Emitted(82, 93) Source(125, 88) + SourceIndex(0) +--- +>>> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _54 < _55.length; _54++) { +1->^^^^ +2 > ^^ +3 > ^^^^ +4 > ^^ +5 > ^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^ +10> ^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^ +15> ^^ +16> ^^^^^^^^ +17> ^^ +18> ^^ +19> ^ +20> ^^ +21> ^^^^^^^^^^^^^^^^ +22> ^^ +23> ^^^^^ +24> ^ +25> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1->, + > +2 > { +3 > name +4 > : +5 > "trimmer" +6 > , +7 > skills +8 > : +9 > { +10> primary +11> : +12> "trimming" +13> , +14> secondary +15> : +16> "edging" +17> } +18> } +19> ] +20> +21> [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +22> +23> [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +24> ) +1->Emitted(83, 5) Source(126, 5) + SourceIndex(0) +2 >Emitted(83, 7) Source(126, 7) + SourceIndex(0) +3 >Emitted(83, 11) Source(126, 11) + SourceIndex(0) +4 >Emitted(83, 13) Source(126, 13) + SourceIndex(0) +5 >Emitted(83, 22) Source(126, 22) + SourceIndex(0) +6 >Emitted(83, 24) Source(126, 24) + SourceIndex(0) +7 >Emitted(83, 30) Source(126, 30) + SourceIndex(0) +8 >Emitted(83, 32) Source(126, 32) + SourceIndex(0) +9 >Emitted(83, 34) Source(126, 34) + SourceIndex(0) +10>Emitted(83, 41) Source(126, 41) + SourceIndex(0) +11>Emitted(83, 43) Source(126, 43) + SourceIndex(0) +12>Emitted(83, 53) Source(126, 53) + SourceIndex(0) +13>Emitted(83, 55) Source(126, 55) + SourceIndex(0) +14>Emitted(83, 64) Source(126, 64) + SourceIndex(0) +15>Emitted(83, 66) Source(126, 66) + SourceIndex(0) +16>Emitted(83, 74) Source(126, 74) + SourceIndex(0) +17>Emitted(83, 76) Source(126, 76) + SourceIndex(0) +18>Emitted(83, 78) Source(126, 78) + SourceIndex(0) +19>Emitted(83, 79) Source(126, 79) + SourceIndex(0) +20>Emitted(83, 81) Source(125, 6) + SourceIndex(0) +21>Emitted(83, 97) Source(126, 79) + SourceIndex(0) +22>Emitted(83, 99) Source(125, 6) + SourceIndex(0) +23>Emitted(83, 104) Source(126, 79) + SourceIndex(0) +24>Emitted(83, 105) Source(126, 80) + SourceIndex(0) +--- +>>> _56 = _55[_54], _57 = _56.name, nameA = _57 === void 0 ? "noName" : _57, _58 = _56.skills, _59 = _58 === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _58, _60 = _59.primary, primaryA = _60 === void 0 ? "primary" : _60, _61 = _59.secondary, secondaryA = _61 === void 0 ? "secondary" : _61; +1->^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > { + > name: nameA = "noName", + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + > } +3 > +4 > name: nameA = "noName" +5 > +6 > name: nameA = "noName" +7 > , + > +8 > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } +9 > +10> skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } +11> +12> primary: primaryA = "primary" +13> +14> primary: primaryA = "primary" +15> , + > +16> secondary: secondaryA = "secondary" +17> +18> secondary: secondaryA = "secondary" +1->Emitted(84, 5) Source(119, 6) + SourceIndex(0) +2 >Emitted(84, 19) Source(125, 2) + SourceIndex(0) +3 >Emitted(84, 21) Source(120, 5) + SourceIndex(0) +4 >Emitted(84, 35) Source(120, 27) + SourceIndex(0) +5 >Emitted(84, 37) Source(120, 5) + SourceIndex(0) +6 >Emitted(84, 76) Source(120, 27) + SourceIndex(0) +7 >Emitted(84, 78) Source(121, 5) + SourceIndex(0) +8 >Emitted(84, 94) Source(124, 53) + SourceIndex(0) +9 >Emitted(84, 96) Source(121, 5) + SourceIndex(0) +10>Emitted(84, 169) Source(124, 53) + SourceIndex(0) +11>Emitted(84, 171) Source(122, 9) + SourceIndex(0) +12>Emitted(84, 188) Source(122, 38) + SourceIndex(0) +13>Emitted(84, 190) Source(122, 9) + SourceIndex(0) +14>Emitted(84, 233) Source(122, 38) + SourceIndex(0) +15>Emitted(84, 235) Source(123, 9) + SourceIndex(0) +16>Emitted(84, 254) Source(123, 44) + SourceIndex(0) +17>Emitted(84, 256) Source(123, 9) + SourceIndex(0) +18>Emitted(84, 303) Source(123, 44) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > } = { primary: "noSkill", secondary: "noSkill" } + >} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(85, 5) Source(127, 5) + SourceIndex(0) +2 >Emitted(85, 12) Source(127, 12) + SourceIndex(0) +3 >Emitted(85, 13) Source(127, 13) + SourceIndex(0) +4 >Emitted(85, 16) Source(127, 16) + SourceIndex(0) +5 >Emitted(85, 17) Source(127, 17) + SourceIndex(0) +6 >Emitted(85, 22) Source(127, 22) + SourceIndex(0) +7 >Emitted(85, 23) Source(127, 23) + SourceIndex(0) +8 >Emitted(85, 24) Source(127, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(86, 2) Source(128, 2) + SourceIndex(0) +--- +>>>for (var _62 = 0, robots_4 = robots; _62 < robots_4.length; _62++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^ +12> ^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +2 >for +3 > +4 > ({ name = "noName", skill = "noSkill" } of +5 > robots +6 > +7 > robots +8 > +9 > robots +10> +11> robots +12> ) +1->Emitted(87, 1) Source(130, 1) + SourceIndex(0) +2 >Emitted(87, 4) Source(130, 4) + SourceIndex(0) +3 >Emitted(87, 5) Source(130, 5) + SourceIndex(0) +4 >Emitted(87, 6) Source(130, 49) + SourceIndex(0) +5 >Emitted(87, 17) Source(130, 55) + SourceIndex(0) +6 >Emitted(87, 19) Source(130, 49) + SourceIndex(0) +7 >Emitted(87, 36) Source(130, 55) + SourceIndex(0) +8 >Emitted(87, 38) Source(130, 49) + SourceIndex(0) +9 >Emitted(87, 59) Source(130, 55) + SourceIndex(0) +10>Emitted(87, 61) Source(130, 49) + SourceIndex(0) +11>Emitted(87, 66) Source(130, 55) + SourceIndex(0) +12>Emitted(87, 67) Source(130, 56) + SourceIndex(0) +--- +>>> _63 = robots_4[_62], _64 = _63.name, name = _64 === void 0 ? "noName" : _64, _65 = _63.skill, skill = _65 === void 0 ? "noSkill" : _65; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > { name = "noName", skill = "noSkill" } +3 > +4 > name = "noName" +5 > +6 > name = "noName" +7 > , +8 > skill = "noSkill" +9 > +10> skill = "noSkill" +1->Emitted(88, 5) Source(130, 6) + SourceIndex(0) +2 >Emitted(88, 24) Source(130, 45) + SourceIndex(0) +3 >Emitted(88, 26) Source(130, 8) + SourceIndex(0) +4 >Emitted(88, 40) Source(130, 23) + SourceIndex(0) +5 >Emitted(88, 42) Source(130, 8) + SourceIndex(0) +6 >Emitted(88, 80) Source(130, 23) + SourceIndex(0) +7 >Emitted(88, 82) Source(130, 25) + SourceIndex(0) +8 >Emitted(88, 97) Source(130, 43) + SourceIndex(0) +9 >Emitted(88, 99) Source(130, 25) + SourceIndex(0) +10>Emitted(88, 139) Source(130, 43) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(89, 5) Source(131, 5) + SourceIndex(0) +2 >Emitted(89, 12) Source(131, 12) + SourceIndex(0) +3 >Emitted(89, 13) Source(131, 13) + SourceIndex(0) +4 >Emitted(89, 16) Source(131, 16) + SourceIndex(0) +5 >Emitted(89, 17) Source(131, 17) + SourceIndex(0) +6 >Emitted(89, 22) Source(131, 22) + SourceIndex(0) +7 >Emitted(89, 23) Source(131, 23) + SourceIndex(0) +8 >Emitted(89, 24) Source(131, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(90, 2) Source(132, 2) + SourceIndex(0) +--- +>>>for (var _66 = 0, _67 = getRobots(); _66 < _67.length; _66++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ({ name = "noName", skill = "noSkill" } of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> getRobots() +12> +13> getRobots() +14> ) +1->Emitted(91, 1) Source(133, 1) + SourceIndex(0) +2 >Emitted(91, 4) Source(133, 4) + SourceIndex(0) +3 >Emitted(91, 5) Source(133, 5) + SourceIndex(0) +4 >Emitted(91, 6) Source(133, 49) + SourceIndex(0) +5 >Emitted(91, 17) Source(133, 60) + SourceIndex(0) +6 >Emitted(91, 19) Source(133, 49) + SourceIndex(0) +7 >Emitted(91, 25) Source(133, 49) + SourceIndex(0) +8 >Emitted(91, 34) Source(133, 58) + SourceIndex(0) +9 >Emitted(91, 36) Source(133, 60) + SourceIndex(0) +10>Emitted(91, 38) Source(133, 49) + SourceIndex(0) +11>Emitted(91, 54) Source(133, 60) + SourceIndex(0) +12>Emitted(91, 56) Source(133, 49) + SourceIndex(0) +13>Emitted(91, 61) Source(133, 60) + SourceIndex(0) +14>Emitted(91, 62) Source(133, 61) + SourceIndex(0) +--- +>>> _68 = _67[_66], _69 = _68.name, name = _69 === void 0 ? "noName" : _69, _70 = _68.skill, skill = _70 === void 0 ? "noSkill" : _70; +1->^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > { name = "noName", skill = "noSkill" } +3 > +4 > name = "noName" +5 > +6 > name = "noName" +7 > , +8 > skill = "noSkill" +9 > +10> skill = "noSkill" +1->Emitted(92, 5) Source(133, 6) + SourceIndex(0) +2 >Emitted(92, 19) Source(133, 45) + SourceIndex(0) +3 >Emitted(92, 21) Source(133, 8) + SourceIndex(0) +4 >Emitted(92, 35) Source(133, 23) + SourceIndex(0) +5 >Emitted(92, 37) Source(133, 8) + SourceIndex(0) +6 >Emitted(92, 75) Source(133, 23) + SourceIndex(0) +7 >Emitted(92, 77) Source(133, 25) + SourceIndex(0) +8 >Emitted(92, 92) Source(133, 42) + SourceIndex(0) +9 >Emitted(92, 94) Source(133, 25) + SourceIndex(0) +10>Emitted(92, 134) Source(133, 42) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(93, 5) Source(134, 5) + SourceIndex(0) +2 >Emitted(93, 12) Source(134, 12) + SourceIndex(0) +3 >Emitted(93, 13) Source(134, 13) + SourceIndex(0) +4 >Emitted(93, 16) Source(134, 16) + SourceIndex(0) +5 >Emitted(93, 17) Source(134, 17) + SourceIndex(0) +6 >Emitted(93, 22) Source(134, 22) + SourceIndex(0) +7 >Emitted(93, 23) Source(134, 23) + SourceIndex(0) +8 >Emitted(93, 24) Source(134, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(94, 2) Source(135, 2) + SourceIndex(0) +--- +>>>for (var _71 = 0, _72 = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _71 < _72.length; _71++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^ +9 > ^^^^ +10> ^^ +11> ^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^^ +15> ^^^^^^^^ +16> ^^ +17> ^^ +18> ^^ +19> ^^^^ +20> ^^ +21> ^^^^^^^^^ +22> ^^ +23> ^^^^^ +24> ^^ +25> ^^^^^^^^^^ +26> ^^ +27> ^ +28> ^^ +29> ^^^^^^^^^^^^^^^^ +30> ^^ +31> ^^^^^ +32> ^ +33> ^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ({ name = "noName", skill = "noSkill" } of +5 > [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +6 > +7 > [ +8 > { +9 > name +10> : +11> "mower" +12> , +13> skill +14> : +15> "mowing" +16> } +17> , +18> { +19> name +20> : +21> "trimmer" +22> , +23> skill +24> : +25> "trimming" +26> } +27> ] +28> +29> [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +30> +31> [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +32> ) +1->Emitted(95, 1) Source(136, 1) + SourceIndex(0) +2 >Emitted(95, 4) Source(136, 4) + SourceIndex(0) +3 >Emitted(95, 5) Source(136, 5) + SourceIndex(0) +4 >Emitted(95, 6) Source(136, 49) + SourceIndex(0) +5 >Emitted(95, 17) Source(136, 125) + SourceIndex(0) +6 >Emitted(95, 19) Source(136, 49) + SourceIndex(0) +7 >Emitted(95, 26) Source(136, 50) + SourceIndex(0) +8 >Emitted(95, 28) Source(136, 52) + SourceIndex(0) +9 >Emitted(95, 32) Source(136, 56) + SourceIndex(0) +10>Emitted(95, 34) Source(136, 58) + SourceIndex(0) +11>Emitted(95, 41) Source(136, 65) + SourceIndex(0) +12>Emitted(95, 43) Source(136, 67) + SourceIndex(0) +13>Emitted(95, 48) Source(136, 72) + SourceIndex(0) +14>Emitted(95, 50) Source(136, 74) + SourceIndex(0) +15>Emitted(95, 58) Source(136, 82) + SourceIndex(0) +16>Emitted(95, 60) Source(136, 84) + SourceIndex(0) +17>Emitted(95, 62) Source(136, 86) + SourceIndex(0) +18>Emitted(95, 64) Source(136, 88) + SourceIndex(0) +19>Emitted(95, 68) Source(136, 92) + SourceIndex(0) +20>Emitted(95, 70) Source(136, 94) + SourceIndex(0) +21>Emitted(95, 79) Source(136, 103) + SourceIndex(0) +22>Emitted(95, 81) Source(136, 105) + SourceIndex(0) +23>Emitted(95, 86) Source(136, 110) + SourceIndex(0) +24>Emitted(95, 88) Source(136, 112) + SourceIndex(0) +25>Emitted(95, 98) Source(136, 122) + SourceIndex(0) +26>Emitted(95, 100) Source(136, 124) + SourceIndex(0) +27>Emitted(95, 101) Source(136, 125) + SourceIndex(0) +28>Emitted(95, 103) Source(136, 49) + SourceIndex(0) +29>Emitted(95, 119) Source(136, 125) + SourceIndex(0) +30>Emitted(95, 121) Source(136, 49) + SourceIndex(0) +31>Emitted(95, 126) Source(136, 125) + SourceIndex(0) +32>Emitted(95, 127) Source(136, 126) + SourceIndex(0) +--- +>>> _73 = _72[_71], _74 = _73.name, name = _74 === void 0 ? "noName" : _74, _75 = _73.skill, skill = _75 === void 0 ? "noSkill" : _75; +1->^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > { name = "noName", skill = "noSkill" } +3 > +4 > name = "noName" +5 > +6 > name = "noName" +7 > , +8 > skill = "noSkill" +9 > +10> skill = "noSkill" +1->Emitted(96, 5) Source(136, 6) + SourceIndex(0) +2 >Emitted(96, 19) Source(136, 45) + SourceIndex(0) +3 >Emitted(96, 21) Source(136, 8) + SourceIndex(0) +4 >Emitted(96, 35) Source(136, 23) + SourceIndex(0) +5 >Emitted(96, 37) Source(136, 8) + SourceIndex(0) +6 >Emitted(96, 75) Source(136, 23) + SourceIndex(0) +7 >Emitted(96, 77) Source(136, 25) + SourceIndex(0) +8 >Emitted(96, 92) Source(136, 43) + SourceIndex(0) +9 >Emitted(96, 94) Source(136, 25) + SourceIndex(0) +10>Emitted(96, 134) Source(136, 43) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(97, 5) Source(137, 5) + SourceIndex(0) +2 >Emitted(97, 12) Source(137, 12) + SourceIndex(0) +3 >Emitted(97, 13) Source(137, 13) + SourceIndex(0) +4 >Emitted(97, 16) Source(137, 16) + SourceIndex(0) +5 >Emitted(97, 17) Source(137, 17) + SourceIndex(0) +6 >Emitted(97, 22) Source(137, 22) + SourceIndex(0) +7 >Emitted(97, 23) Source(137, 23) + SourceIndex(0) +8 >Emitted(97, 24) Source(137, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(98, 2) Source(138, 2) + SourceIndex(0) +--- +>>>for (var _76 = 0, multiRobots_4 = multiRobots; _76 < multiRobots_4.length; _76++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^ +12> ^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ({ + > name = "noName", + > skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + > } of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > multiRobots +10> +11> multiRobots +12> ) +1->Emitted(99, 1) Source(139, 1) + SourceIndex(0) +2 >Emitted(99, 4) Source(139, 4) + SourceIndex(0) +3 >Emitted(99, 5) Source(139, 5) + SourceIndex(0) +4 >Emitted(99, 6) Source(145, 6) + SourceIndex(0) +5 >Emitted(99, 17) Source(145, 17) + SourceIndex(0) +6 >Emitted(99, 19) Source(145, 6) + SourceIndex(0) +7 >Emitted(99, 46) Source(145, 17) + SourceIndex(0) +8 >Emitted(99, 48) Source(145, 6) + SourceIndex(0) +9 >Emitted(99, 74) Source(145, 17) + SourceIndex(0) +10>Emitted(99, 76) Source(145, 6) + SourceIndex(0) +11>Emitted(99, 81) Source(145, 17) + SourceIndex(0) +12>Emitted(99, 82) Source(145, 18) + SourceIndex(0) +--- +>>> _77 = multiRobots_4[_76], _78 = _77.name, name = _78 === void 0 ? "noName" : _78, _79 = _77.skills, _80 = _79 === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _79, _81 = _80.primary, primary = _81 === void 0 ? "primary" : _81, _82 = _80.secondary, secondary = _82 === void 0 ? "secondary" : _82; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > { + > name = "noName", + > skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + > } +3 > +4 > name = "noName" +5 > +6 > name = "noName" +7 > , + > +8 > skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } +9 > +10> skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } +11> +12> primary = "primary" +13> +14> primary = "primary" +15> , + > +16> secondary = "secondary" +17> +18> secondary = "secondary" +1->Emitted(100, 5) Source(139, 6) + SourceIndex(0) +2 >Emitted(100, 29) Source(145, 2) + SourceIndex(0) +3 >Emitted(100, 31) Source(140, 5) + SourceIndex(0) +4 >Emitted(100, 45) Source(140, 20) + SourceIndex(0) +5 >Emitted(100, 47) Source(140, 5) + SourceIndex(0) +6 >Emitted(100, 85) Source(140, 20) + SourceIndex(0) +7 >Emitted(100, 87) Source(141, 5) + SourceIndex(0) +8 >Emitted(100, 103) Source(144, 53) + SourceIndex(0) +9 >Emitted(100, 105) Source(141, 5) + SourceIndex(0) +10>Emitted(100, 178) Source(144, 53) + SourceIndex(0) +11>Emitted(100, 180) Source(142, 9) + SourceIndex(0) +12>Emitted(100, 197) Source(142, 28) + SourceIndex(0) +13>Emitted(100, 199) Source(142, 9) + SourceIndex(0) +14>Emitted(100, 241) Source(142, 28) + SourceIndex(0) +15>Emitted(100, 243) Source(143, 9) + SourceIndex(0) +16>Emitted(100, 262) Source(143, 32) + SourceIndex(0) +17>Emitted(100, 264) Source(143, 9) + SourceIndex(0) +18>Emitted(100, 310) Source(143, 32) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > } = { primary: "noSkill", secondary: "noSkill" } + >} of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(101, 5) Source(146, 5) + SourceIndex(0) +2 >Emitted(101, 12) Source(146, 12) + SourceIndex(0) +3 >Emitted(101, 13) Source(146, 13) + SourceIndex(0) +4 >Emitted(101, 16) Source(146, 16) + SourceIndex(0) +5 >Emitted(101, 17) Source(146, 17) + SourceIndex(0) +6 >Emitted(101, 22) Source(146, 22) + SourceIndex(0) +7 >Emitted(101, 23) Source(146, 23) + SourceIndex(0) +8 >Emitted(101, 24) Source(146, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(102, 2) Source(147, 2) + SourceIndex(0) +--- +>>>for (var _83 = 0, _84 = getMultiRobots(); _83 < _84.length; _83++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ({ + > name = "noName", + > skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + > } of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> getMultiRobots() +12> +13> getMultiRobots() +14> ) +1->Emitted(103, 1) Source(148, 1) + SourceIndex(0) +2 >Emitted(103, 4) Source(148, 4) + SourceIndex(0) +3 >Emitted(103, 5) Source(148, 5) + SourceIndex(0) +4 >Emitted(103, 6) Source(154, 6) + SourceIndex(0) +5 >Emitted(103, 17) Source(154, 22) + SourceIndex(0) +6 >Emitted(103, 19) Source(154, 6) + SourceIndex(0) +7 >Emitted(103, 25) Source(154, 6) + SourceIndex(0) +8 >Emitted(103, 39) Source(154, 20) + SourceIndex(0) +9 >Emitted(103, 41) Source(154, 22) + SourceIndex(0) +10>Emitted(103, 43) Source(154, 6) + SourceIndex(0) +11>Emitted(103, 59) Source(154, 22) + SourceIndex(0) +12>Emitted(103, 61) Source(154, 6) + SourceIndex(0) +13>Emitted(103, 66) Source(154, 22) + SourceIndex(0) +14>Emitted(103, 67) Source(154, 23) + SourceIndex(0) +--- +>>> _85 = _84[_83], _86 = _85.name, name = _86 === void 0 ? "noName" : _86, _87 = _85.skills, _88 = _87 === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _87, _89 = _88.primary, primary = _89 === void 0 ? "primary" : _89, _90 = _88.secondary, secondary = _90 === void 0 ? "secondary" : _90; +1->^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > { + > name = "noName", + > skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + > } +3 > +4 > name = "noName" +5 > +6 > name = "noName" +7 > , + > +8 > skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } +9 > +10> skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } +11> +12> primary = "primary" +13> +14> primary = "primary" +15> , + > +16> secondary = "secondary" +17> +18> secondary = "secondary" +1->Emitted(104, 5) Source(148, 6) + SourceIndex(0) +2 >Emitted(104, 19) Source(154, 2) + SourceIndex(0) +3 >Emitted(104, 21) Source(149, 5) + SourceIndex(0) +4 >Emitted(104, 35) Source(149, 20) + SourceIndex(0) +5 >Emitted(104, 37) Source(149, 5) + SourceIndex(0) +6 >Emitted(104, 75) Source(149, 20) + SourceIndex(0) +7 >Emitted(104, 77) Source(150, 5) + SourceIndex(0) +8 >Emitted(104, 93) Source(153, 53) + SourceIndex(0) +9 >Emitted(104, 95) Source(150, 5) + SourceIndex(0) +10>Emitted(104, 168) Source(153, 53) + SourceIndex(0) +11>Emitted(104, 170) Source(151, 9) + SourceIndex(0) +12>Emitted(104, 187) Source(151, 28) + SourceIndex(0) +13>Emitted(104, 189) Source(151, 9) + SourceIndex(0) +14>Emitted(104, 231) Source(151, 28) + SourceIndex(0) +15>Emitted(104, 233) Source(152, 9) + SourceIndex(0) +16>Emitted(104, 252) Source(152, 32) + SourceIndex(0) +17>Emitted(104, 254) Source(152, 9) + SourceIndex(0) +18>Emitted(104, 300) Source(152, 32) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > } = { primary: "noSkill", secondary: "noSkill" } + >} of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(105, 5) Source(155, 5) + SourceIndex(0) +2 >Emitted(105, 12) Source(155, 12) + SourceIndex(0) +3 >Emitted(105, 13) Source(155, 13) + SourceIndex(0) +4 >Emitted(105, 16) Source(155, 16) + SourceIndex(0) +5 >Emitted(105, 17) Source(155, 17) + SourceIndex(0) +6 >Emitted(105, 22) Source(155, 22) + SourceIndex(0) +7 >Emitted(105, 23) Source(155, 23) + SourceIndex(0) +8 >Emitted(105, 24) Source(155, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(106, 2) Source(156, 2) + SourceIndex(0) +--- +>>>for (var _91 = 0, _92 = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^ +9 > ^^^^ +10> ^^ +11> ^^^^^^^ +12> ^^ +13> ^^^^^^ +14> ^^ +15> ^^ +16> ^^^^^^^ +17> ^^ +18> ^^^^^^^^ +19> ^^ +20> ^^^^^^^^^ +21> ^^ +22> ^^^^^^ +23> ^^ +24> ^^ +25> ^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > ({ + > name = "noName", + > skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + > } of +5 > [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +6 > +7 > [ +8 > { +9 > name +10> : +11> "mower" +12> , +13> skills +14> : +15> { +16> primary +17> : +18> "mowing" +19> , +20> secondary +21> : +22> "none" +23> } +24> } +1->Emitted(107, 1) Source(157, 1) + SourceIndex(0) +2 >Emitted(107, 4) Source(157, 4) + SourceIndex(0) +3 >Emitted(107, 5) Source(157, 5) + SourceIndex(0) +4 >Emitted(107, 6) Source(163, 6) + SourceIndex(0) +5 >Emitted(107, 17) Source(164, 79) + SourceIndex(0) +6 >Emitted(107, 19) Source(163, 6) + SourceIndex(0) +7 >Emitted(107, 26) Source(163, 7) + SourceIndex(0) +8 >Emitted(107, 28) Source(163, 9) + SourceIndex(0) +9 >Emitted(107, 32) Source(163, 13) + SourceIndex(0) +10>Emitted(107, 34) Source(163, 15) + SourceIndex(0) +11>Emitted(107, 41) Source(163, 22) + SourceIndex(0) +12>Emitted(107, 43) Source(163, 24) + SourceIndex(0) +13>Emitted(107, 49) Source(163, 30) + SourceIndex(0) +14>Emitted(107, 51) Source(163, 32) + SourceIndex(0) +15>Emitted(107, 53) Source(163, 34) + SourceIndex(0) +16>Emitted(107, 60) Source(163, 41) + SourceIndex(0) +17>Emitted(107, 62) Source(163, 43) + SourceIndex(0) +18>Emitted(107, 70) Source(163, 51) + SourceIndex(0) +19>Emitted(107, 72) Source(163, 53) + SourceIndex(0) +20>Emitted(107, 81) Source(163, 62) + SourceIndex(0) +21>Emitted(107, 83) Source(163, 64) + SourceIndex(0) +22>Emitted(107, 89) Source(163, 70) + SourceIndex(0) +23>Emitted(107, 91) Source(163, 72) + SourceIndex(0) +24>Emitted(107, 93) Source(163, 74) + SourceIndex(0) +--- +>>> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _91 < _92.length; _91++) { +1->^^^^ +2 > ^^ +3 > ^^^^ +4 > ^^ +5 > ^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^ +10> ^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^ +15> ^^ +16> ^^^^^^^^ +17> ^^ +18> ^^ +19> ^ +20> ^^ +21> ^^^^^^^^^^^^^^^^ +22> ^^ +23> ^^^^^ +24> ^ +25> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1->, + > +2 > { +3 > name +4 > : +5 > "trimmer" +6 > , +7 > skills +8 > : +9 > { +10> primary +11> : +12> "trimming" +13> , +14> secondary +15> : +16> "edging" +17> } +18> } +19> ] +20> +21> [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +22> +23> [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +24> ) +1->Emitted(108, 5) Source(164, 5) + SourceIndex(0) +2 >Emitted(108, 7) Source(164, 7) + SourceIndex(0) +3 >Emitted(108, 11) Source(164, 11) + SourceIndex(0) +4 >Emitted(108, 13) Source(164, 13) + SourceIndex(0) +5 >Emitted(108, 22) Source(164, 22) + SourceIndex(0) +6 >Emitted(108, 24) Source(164, 24) + SourceIndex(0) +7 >Emitted(108, 30) Source(164, 30) + SourceIndex(0) +8 >Emitted(108, 32) Source(164, 32) + SourceIndex(0) +9 >Emitted(108, 34) Source(164, 34) + SourceIndex(0) +10>Emitted(108, 41) Source(164, 41) + SourceIndex(0) +11>Emitted(108, 43) Source(164, 43) + SourceIndex(0) +12>Emitted(108, 53) Source(164, 53) + SourceIndex(0) +13>Emitted(108, 55) Source(164, 55) + SourceIndex(0) +14>Emitted(108, 64) Source(164, 64) + SourceIndex(0) +15>Emitted(108, 66) Source(164, 66) + SourceIndex(0) +16>Emitted(108, 74) Source(164, 74) + SourceIndex(0) +17>Emitted(108, 76) Source(164, 76) + SourceIndex(0) +18>Emitted(108, 78) Source(164, 78) + SourceIndex(0) +19>Emitted(108, 79) Source(164, 79) + SourceIndex(0) +20>Emitted(108, 81) Source(163, 6) + SourceIndex(0) +21>Emitted(108, 97) Source(164, 79) + SourceIndex(0) +22>Emitted(108, 99) Source(163, 6) + SourceIndex(0) +23>Emitted(108, 104) Source(164, 79) + SourceIndex(0) +24>Emitted(108, 105) Source(164, 80) + SourceIndex(0) +--- +>>> _93 = _92[_91], _94 = _93.name, name = _94 === void 0 ? "noName" : _94, _95 = _93.skills, _96 = _95 === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _95, _97 = _96.primary, primary = _97 === void 0 ? "primary" : _97, _98 = _96.secondary, secondary = _98 === void 0 ? "secondary" : _98; +1->^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > { + > name = "noName", + > skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + > } +3 > +4 > name = "noName" +5 > +6 > name = "noName" +7 > , + > +8 > skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } +9 > +10> skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } +11> +12> primary = "primary" +13> +14> primary = "primary" +15> , + > +16> secondary = "secondary" +17> +18> secondary = "secondary" +1->Emitted(109, 5) Source(157, 6) + SourceIndex(0) +2 >Emitted(109, 19) Source(163, 2) + SourceIndex(0) +3 >Emitted(109, 21) Source(158, 5) + SourceIndex(0) +4 >Emitted(109, 35) Source(158, 20) + SourceIndex(0) +5 >Emitted(109, 37) Source(158, 5) + SourceIndex(0) +6 >Emitted(109, 75) Source(158, 20) + SourceIndex(0) +7 >Emitted(109, 77) Source(159, 5) + SourceIndex(0) +8 >Emitted(109, 93) Source(162, 53) + SourceIndex(0) +9 >Emitted(109, 95) Source(159, 5) + SourceIndex(0) +10>Emitted(109, 168) Source(162, 53) + SourceIndex(0) +11>Emitted(109, 170) Source(160, 9) + SourceIndex(0) +12>Emitted(109, 187) Source(160, 28) + SourceIndex(0) +13>Emitted(109, 189) Source(160, 9) + SourceIndex(0) +14>Emitted(109, 231) Source(160, 28) + SourceIndex(0) +15>Emitted(109, 233) Source(161, 9) + SourceIndex(0) +16>Emitted(109, 252) Source(161, 32) + SourceIndex(0) +17>Emitted(109, 254) Source(161, 9) + SourceIndex(0) +18>Emitted(109, 300) Source(161, 32) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > } = { primary: "noSkill", secondary: "noSkill" } + >} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(110, 5) Source(165, 5) + SourceIndex(0) +2 >Emitted(110, 12) Source(165, 12) + SourceIndex(0) +3 >Emitted(110, 13) Source(165, 13) + SourceIndex(0) +4 >Emitted(110, 16) Source(165, 16) + SourceIndex(0) +5 >Emitted(110, 17) Source(165, 17) + SourceIndex(0) +6 >Emitted(110, 22) Source(165, 22) + SourceIndex(0) +7 >Emitted(110, 23) Source(165, 23) + SourceIndex(0) +8 >Emitted(110, 24) Source(165, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(111, 2) Source(166, 2) + SourceIndex(0) +--- +>>>var _a, _d, _g, _j, _k, _l, _m, _q, _r, _s, _t, _w, _x, _y, _z, _1, _4, _7, _9, _10, _11, _12, _15, _16, _17, _18, _21, _22, _23, _24, _26, _27, _28, _31, _32, _33, _36, _37, _38, _40, _41, _42, _43, _44, _45, _48, _49, _50, _51, _52, _53, _56, _57, _58, _59, _60, _61, _63, _64, _65, _68, _69, _70, _73, _74, _75, _77, _78, _79, _80, _81, _82, _85, _86, _87, _88, _89, _90, _93, _94, _95, _96, _97, _98; +>>>//# sourceMappingURL=sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.symbols b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.symbols new file mode 100644 index 00000000000..7194270c784 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.symbols @@ -0,0 +1,564 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 11)) + + log(msg: any): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 1, 8)) +} +interface Robot { +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 2, 1)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 3, 17)) + + skill: string; +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 4, 17)) +} + +interface MultiRobot { +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 6, 1)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 8, 22)) + + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 9, 17)) + + primary: string; +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 10, 13)) + + secondary: string; +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 11, 24)) + + }; +} + +let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 16, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 16, 24)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 16, 39)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 16, 60)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 16, 77)) + +let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 17, 3)) +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 17, 34)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 17, 49)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 17, 59)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 17, 78)) + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 18, 5)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 18, 22)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 18, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 18, 53)) + +function getRobots() { +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 18, 79)) + + return robots; +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 16, 3)) +} + +function getMultiRobots() { +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 22, 1)) + + return multiRobots; +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 17, 3)) +} + +let nameA: string, primaryA: string, secondaryA: string, i: number, skillA: string; +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 18)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 36)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 56)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 67)) + +let name: string, primary: string, secondary: string, skill: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 29, 3)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 29, 17)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 29, 34)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 29, 53)) + +for ({name: nameA = "noName" } of robots) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 31, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 16, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) +} +for ({name: nameA = "noName" } of getRobots()) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 34, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 18, 79)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) +} +for ({name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 37, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 37, 36)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 37, 51)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 37, 72)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 37, 89)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) +} +for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 40, 6)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 40, 16)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 18)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 40, 47)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 36)) + + { primary: "nosKill", secondary: "noSkill" } } of multiRobots) { +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 41, 5)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 41, 25)) +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 17, 3)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 18)) +} +for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 44, 6)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 44, 16)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 18)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 44, 47)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 36)) + + { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) { +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 45, 5)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 45, 25)) +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 22, 1)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 18)) +} +for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 48, 6)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 48, 16)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 18)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 48, 47)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 36)) + + { primary: "nosKill", secondary: "noSkill" } } of +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 49, 5)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 49, 25)) + + [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 50, 20)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 50, 35)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 50, 45)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 50, 64)) + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 51, 9)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 51, 26)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 51, 36)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 51, 57)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 18)) +} + +for ({ name = "noName" } of robots) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 55, 6)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 16, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) +} +for ({ name = "noName" } of getRobots()) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 58, 6)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 18, 79)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) +} +for ({ name = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 61, 6)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 61, 30)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 61, 45)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 61, 66)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 61, 83)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) +} +for ({ + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 64, 6)) + + primary = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 65, 13)) + + secondary = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 66, 28)) + + } = { primary: "noSkill", secondary: "noSkill" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 68, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 68, 29)) + +} of multiRobots) { +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 17, 3)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 18)) +} +for ({ + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 72, 6)) + + primary = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 73, 13)) + + secondary = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 74, 28)) + + } = { primary: "noSkill", secondary: "noSkill" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 76, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 76, 29)) + +} of getMultiRobots()) { +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 22, 1)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 18)) +} +for ({ + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 80, 6)) + + primary = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 81, 13)) + + secondary = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 82, 28)) + + } = { primary: "noSkill", secondary: "noSkill" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 84, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 84, 29)) + +} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 85, 7)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 85, 22)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 85, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 85, 51)) + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 86, 5)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 86, 22)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 86, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 86, 53)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 18)) +} + + +for ({name: nameA = "noName", skill: skillA = "noSkill" } of robots) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 91, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 91, 29)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 67)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 16, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) +} +for ({name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 94, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 94, 29)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 67)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 18, 79)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) +} +for ({name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 97, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 97, 29)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 67)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 97, 64)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 97, 79)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 97, 100)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 97, 117)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) +} +for ({ + name: nameA = "noName", +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 100, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) + + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 101, 27)) + + primary: primaryA = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 102, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 18)) + + secondary: secondaryA = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 103, 38)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 36)) + + } = { primary: "noSkill", secondary: "noSkill" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 105, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 105, 29)) + +} of multiRobots) { +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 17, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) +} +for ({ + name: nameA = "noName", +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 109, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) + + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 110, 27)) + + primary: primaryA = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 111, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 18)) + + secondary: secondaryA = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 112, 38)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 36)) + + } = { primary: "noSkill", secondary: "noSkill" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 114, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 114, 29)) + +} of getMultiRobots()) { +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 22, 1)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) +} +for ({ + name: nameA = "noName", +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 118, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) + + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 119, 27)) + + primary: primaryA = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 120, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 18)) + + secondary: secondaryA = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 121, 38)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 36)) + + } = { primary: "noSkill", secondary: "noSkill" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 123, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 123, 29)) + +} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 124, 21)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 124, 36)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 124, 46)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 124, 65)) + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 125, 5)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 125, 22)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 125, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 125, 53)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) +} + +for ({ name = "noName", skill = "noSkill" } of robots) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 129, 6)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 129, 23)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 16, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) +} +for ({ name = "noName", skill = "noSkill" } of getRobots()) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 132, 6)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 132, 23)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 18, 79)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) +} +for ({ name = "noName", skill = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 135, 6)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 135, 23)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 135, 50)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 135, 65)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 135, 86)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 135, 103)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) +} +for ({ + name = "noName", +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 138, 6)) + + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 139, 20)) + + primary = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 140, 13)) + + secondary = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 141, 28)) + + } = { primary: "noSkill", secondary: "noSkill" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 143, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 143, 29)) + +} of multiRobots) { +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 17, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) +} +for ({ + name = "noName", +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 147, 6)) + + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 148, 20)) + + primary = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 149, 13)) + + secondary = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 150, 28)) + + } = { primary: "noSkill", secondary: "noSkill" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 152, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 152, 29)) + +} of getMultiRobots()) { +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 22, 1)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) +} +for ({ + name = "noName", +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 156, 6)) + + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 157, 20)) + + primary = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 158, 13)) + + secondary = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 159, 28)) + + } = { primary: "noSkill", secondary: "noSkill" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 161, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 161, 29)) + +} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 162, 7)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 162, 22)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 162, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 162, 51)) + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 163, 5)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 163, 22)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 163, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 163, 53)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts, 28, 3)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.types b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.types new file mode 100644 index 00000000000..fe630aafccc --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.types @@ -0,0 +1,829 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts === +declare var console: { +>console : { log(msg: any): void; } + + log(msg: any): void; +>log : (msg: any) => void +>msg : any +} +interface Robot { +>Robot : Robot + + name: string; +>name : string + + skill: string; +>skill : string +} + +interface MultiRobot { +>MultiRobot : MultiRobot + + name: string; +>name : string + + skills: { +>skills : { primary: string; secondary: string; } + + primary: string; +>primary : string + + secondary: string; +>secondary : string + + }; +} + +let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +>robots : Robot[] +>Robot : Robot +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string + +let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>multiRobots : MultiRobot[] +>MultiRobot : MultiRobot +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"mower" : string +>skills : { primary: string; secondary: string; } +>{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } +>primary : string +>"mowing" : string +>secondary : string +>"none" : string + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + +function getRobots() { +>getRobots : () => Robot[] + + return robots; +>robots : Robot[] +} + +function getMultiRobots() { +>getMultiRobots : () => MultiRobot[] + + return multiRobots; +>multiRobots : MultiRobot[] +} + +let nameA: string, primaryA: string, secondaryA: string, i: number, skillA: string; +>nameA : string +>primaryA : string +>secondaryA : string +>i : number +>skillA : string + +let name: string, primary: string, secondary: string, skill: string; +>name : string +>primary : string +>secondary : string +>skill : string + +for ({name: nameA = "noName" } of robots) { +>{name: nameA = "noName" } : { name: string; } +>name : Robot +>nameA = "noName" : string +>nameA : string +>"noName" : string +>robots : Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({name: nameA = "noName" } of getRobots()) { +>{name: nameA = "noName" } : { name: string; } +>name : Robot +>nameA = "noName" : string +>nameA : string +>"noName" : string +>getRobots() : Robot[] +>getRobots : () => Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>{name: nameA = "noName" } : { name: string; } +>name : { name: string; skill: string; } +>nameA = "noName" : string +>nameA : string +>"noName" : string +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = +>{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "nosKill", secondary: "noSkill" } } : { skills: { primary?: string; secondary?: string; }; } +>skills : MultiRobot +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "nosKill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: string; secondary?: string; } +>primary : string +>primaryA = "primary" : string +>primaryA : string +>"primary" : string +>secondary : string +>secondaryA = "secondary" : string +>secondaryA : string +>"secondary" : string + + { primary: "nosKill", secondary: "noSkill" } } of multiRobots) { +>{ primary: "nosKill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>primary : string +>"nosKill" : string +>secondary : string +>"noSkill" : string +>multiRobots : MultiRobot[] + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = +>{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "nosKill", secondary: "noSkill" } } : { skills: { primary?: string; secondary?: string; }; } +>skills : MultiRobot +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "nosKill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: string; secondary?: string; } +>primary : string +>primaryA = "primary" : string +>primaryA : string +>"primary" : string +>secondary : string +>secondaryA = "secondary" : string +>secondaryA : string +>"secondary" : string + + { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) { +>{ primary: "nosKill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>primary : string +>"nosKill" : string +>secondary : string +>"noSkill" : string +>getMultiRobots() : MultiRobot[] +>getMultiRobots : () => MultiRobot[] + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = +>{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "nosKill", secondary: "noSkill" } } : { skills: { primary?: string; secondary?: string; }; } +>skills : MultiRobot +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "nosKill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: string; secondary?: string; } +>primary : string +>primaryA = "primary" : string +>primaryA : string +>"primary" : string +>secondary : string +>secondaryA = "secondary" : string +>secondaryA : string +>"secondary" : string + + { primary: "nosKill", secondary: "noSkill" } } of +>{ primary: "nosKill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>primary : string +>"nosKill" : string +>secondary : string +>"noSkill" : string + + [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : MultiRobot[] +>MultiRobot : MultiRobot +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"mower" : string +>skills : { primary: string; secondary: string; } +>{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } +>primary : string +>"mowing" : string +>secondary : string +>"none" : string + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} + +for ({ name = "noName" } of robots) { +>{ name = "noName" } : { name: string; } +>name : Robot +>robots : Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ name = "noName" } of getRobots()) { +>{ name = "noName" } : { name: string; } +>name : Robot +>getRobots() : Robot[] +>getRobots : () => Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ name = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>{ name = "noName" } : { name: string; } +>name : { name: string; skill: string; } +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ +>{ skills: { primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" }} : { skills: { primary?: string; secondary?: string; }; } + + skills: { +>skills : MultiRobot +>{ primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>{ primary = "primary", secondary = "secondary" } : { primary?: string; secondary?: string; } + + primary = "primary", +>primary : string + + secondary = "secondary" +>secondary : string + + } = { primary: "noSkill", secondary: "noSkill" } +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>primary : string +>"noSkill" : string +>secondary : string +>"noSkill" : string + +} of multiRobots) { +>multiRobots : MultiRobot[] + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for ({ +>{ skills: { primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" }} : { skills: { primary?: string; secondary?: string; }; } + + skills: { +>skills : MultiRobot +>{ primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>{ primary = "primary", secondary = "secondary" } : { primary?: string; secondary?: string; } + + primary = "primary", +>primary : string + + secondary = "secondary" +>secondary : string + + } = { primary: "noSkill", secondary: "noSkill" } +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>primary : string +>"noSkill" : string +>secondary : string +>"noSkill" : string + +} of getMultiRobots()) { +>getMultiRobots() : MultiRobot[] +>getMultiRobots : () => MultiRobot[] + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for ({ +>{ skills: { primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" }} : { skills: { primary?: string; secondary?: string; }; } + + skills: { +>skills : { name: string; skills: { primary: string; secondary: string; }; } +>{ primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>{ primary = "primary", secondary = "secondary" } : { primary?: string; secondary?: string; } + + primary = "primary", +>primary : string + + secondary = "secondary" +>secondary : string + + } = { primary: "noSkill", secondary: "noSkill" } +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>primary : string +>"noSkill" : string +>secondary : string +>"noSkill" : string + +} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"mower" : string +>skills : { primary: string; secondary: string; } +>{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } +>primary : string +>"mowing" : string +>secondary : string +>"none" : string + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} + + +for ({name: nameA = "noName", skill: skillA = "noSkill" } of robots) { +>{name: nameA = "noName", skill: skillA = "noSkill" } : { name: string; skill: string; } +>name : Robot +>nameA = "noName" : string +>nameA : string +>"noName" : string +>skill : Robot +>skillA = "noSkill" : string +>skillA : string +>"noSkill" : string +>robots : Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { +>{name: nameA = "noName", skill: skillA = "noSkill" } : { name: string; skill: string; } +>name : Robot +>nameA = "noName" : string +>nameA : string +>"noName" : string +>skill : Robot +>skillA = "noSkill" : string +>skillA : string +>"noSkill" : string +>getRobots() : Robot[] +>getRobots : () => Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>{name: nameA = "noName", skill: skillA = "noSkill" } : { name: string; skill: string; } +>name : { name: string; skill: string; } +>nameA = "noName" : string +>nameA : string +>"noName" : string +>skill : { name: string; skill: string; } +>skillA = "noSkill" : string +>skillA : string +>"noSkill" : string +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ +>{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "noSkill", secondary: "noSkill" }} : { name: string; skills: { primary?: string; secondary?: string; }; } + + name: nameA = "noName", +>name : MultiRobot +>nameA = "noName" : string +>nameA : string +>"noName" : string + + skills: { +>skills : MultiRobot +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: string; secondary?: string; } + + primary: primaryA = "primary", +>primary : string +>primaryA = "primary" : string +>primaryA : string +>"primary" : string + + secondary: secondaryA = "secondary" +>secondary : string +>secondaryA = "secondary" : string +>secondaryA : string +>"secondary" : string + + } = { primary: "noSkill", secondary: "noSkill" } +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>primary : string +>"noSkill" : string +>secondary : string +>"noSkill" : string + +} of multiRobots) { +>multiRobots : MultiRobot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ +>{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "noSkill", secondary: "noSkill" }} : { name: string; skills: { primary?: string; secondary?: string; }; } + + name: nameA = "noName", +>name : MultiRobot +>nameA = "noName" : string +>nameA : string +>"noName" : string + + skills: { +>skills : MultiRobot +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: string; secondary?: string; } + + primary: primaryA = "primary", +>primary : string +>primaryA = "primary" : string +>primaryA : string +>"primary" : string + + secondary: secondaryA = "secondary" +>secondary : string +>secondaryA = "secondary" : string +>secondaryA : string +>"secondary" : string + + } = { primary: "noSkill", secondary: "noSkill" } +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>primary : string +>"noSkill" : string +>secondary : string +>"noSkill" : string + +} of getMultiRobots()) { +>getMultiRobots() : MultiRobot[] +>getMultiRobots : () => MultiRobot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ +>{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "noSkill", secondary: "noSkill" }} : { name: string; skills: { primary?: string; secondary?: string; }; } + + name: nameA = "noName", +>name : MultiRobot +>nameA = "noName" : string +>nameA : string +>"noName" : string + + skills: { +>skills : MultiRobot +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: string; secondary?: string; } + + primary: primaryA = "primary", +>primary : string +>primaryA = "primary" : string +>primaryA : string +>"primary" : string + + secondary: secondaryA = "secondary" +>secondary : string +>secondaryA = "secondary" : string +>secondaryA : string +>"secondary" : string + + } = { primary: "noSkill", secondary: "noSkill" } +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>primary : string +>"noSkill" : string +>secondary : string +>"noSkill" : string + +} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : MultiRobot[] +>MultiRobot : MultiRobot +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"mower" : string +>skills : { primary: string; secondary: string; } +>{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } +>primary : string +>"mowing" : string +>secondary : string +>"none" : string + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} + +for ({ name = "noName", skill = "noSkill" } of robots) { +>{ name = "noName", skill = "noSkill" } : { name: string; skill: string; } +>name : Robot +>skill : Robot +>robots : Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ name = "noName", skill = "noSkill" } of getRobots()) { +>{ name = "noName", skill = "noSkill" } : { name: string; skill: string; } +>name : Robot +>skill : Robot +>getRobots() : Robot[] +>getRobots : () => Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ name = "noName", skill = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>{ name = "noName", skill = "noSkill" } : { name: string; skill: string; } +>name : { name: string; skill: string; } +>skill : { name: string; skill: string; } +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ +>{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" }} : { name: string; skills: { primary?: string; secondary?: string; }; } + + name = "noName", +>name : MultiRobot + + skills: { +>skills : MultiRobot +>{ primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>{ primary = "primary", secondary = "secondary" } : { primary?: string; secondary?: string; } + + primary = "primary", +>primary : string + + secondary = "secondary" +>secondary : string + + } = { primary: "noSkill", secondary: "noSkill" } +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>primary : string +>"noSkill" : string +>secondary : string +>"noSkill" : string + +} of multiRobots) { +>multiRobots : MultiRobot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ +>{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" }} : { name: string; skills: { primary?: string; secondary?: string; }; } + + name = "noName", +>name : MultiRobot + + skills: { +>skills : MultiRobot +>{ primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>{ primary = "primary", secondary = "secondary" } : { primary?: string; secondary?: string; } + + primary = "primary", +>primary : string + + secondary = "secondary" +>secondary : string + + } = { primary: "noSkill", secondary: "noSkill" } +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>primary : string +>"noSkill" : string +>secondary : string +>"noSkill" : string + +} of getMultiRobots()) { +>getMultiRobots() : MultiRobot[] +>getMultiRobots : () => MultiRobot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ +>{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" }} : { name: string; skills: { primary?: string; secondary?: string; }; } + + name = "noName", +>name : { name: string; skills: { primary: string; secondary: string; }; } + + skills: { +>skills : { name: string; skills: { primary: string; secondary: string; }; } +>{ primary = "primary", secondary = "secondary" } = { primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>{ primary = "primary", secondary = "secondary" } : { primary?: string; secondary?: string; } + + primary = "primary", +>primary : string + + secondary = "secondary" +>secondary : string + + } = { primary: "noSkill", secondary: "noSkill" } +>{ primary: "noSkill", secondary: "noSkill" } : { primary?: string; secondary?: string; } +>primary : string +>"noSkill" : string +>secondary : string +>"noSkill" : string + +} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"mower" : string +>skills : { primary: string; secondary: string; } +>{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } +>primary : string +>"mowing" : string +>secondary : string +>"none" : string + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} diff --git a/tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts b/tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts new file mode 100644 index 00000000000..a619fc1c42f --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts @@ -0,0 +1,105 @@ +// @sourcemap: true +declare var console: { + log(msg: any): void; +} +type Robot = [number, string, string]; +type MultiSkilledRobot = [string, [string, string]]; + +let robotA: Robot = [1, "mower", "mowing"]; +let robotB: Robot = [2, "trimmer", "trimming"]; +let robots = [robotA, robotB]; +function getRobots() { + return robots; +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +let multiRobots = [multiRobotA, multiRobotB]; +function getMultiRobots() { + return multiRobots; +} + +for (let [, nameA = "noName"] of robots) { + console.log(nameA); +} +for (let [, nameA = "noName"] of getRobots()) { + console.log(nameA); +} +for (let [, nameA = "noName"] of [robotA, robotB]) { + console.log(nameA); +} +for (let [, [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["skill1", "skill2"]] of multiRobots) { + console.log(primarySkillA); +} +for (let [, [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["skill1", "skill2"]] of getMultiRobots()) { + console.log(primarySkillA); +} +for (let [, [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { + console.log(primarySkillA); +} + +for (let [numberB = -1] of robots) { + console.log(numberB); +} +for (let [numberB = -1] of getRobots()) { + console.log(numberB); +} +for (let [numberB = -1] of [robotA, robotB]) { + console.log(numberB); +} +for (let [nameB = "noName"] of multiRobots) { + console.log(nameB); +} +for (let [nameB = "noName"] of getMultiRobots()) { + console.log(nameB); +} +for (let [nameB = "noName"] of [multiRobotA, multiRobotB]) { + console.log(nameB); +} + +for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { + console.log(nameA2); +} +for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { + console.log(nameA2); +} +for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) { + console.log(nameA2); +} +for (let [nameMA = "noName", [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["skill1", "skill2"]] of multiRobots) { + console.log(nameMA); +} +for (let [nameMA = "noName", [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["skill1", "skill2"]] of getMultiRobots()) { + console.log(nameMA); +} +for (let [nameMA = "noName", [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { + console.log(nameMA); +} + +for (let [numberA3 = -1, ...robotAInfo] of robots) { + console.log(numberA3); +} +for (let [numberA3 = -1, ...robotAInfo] of getRobots()) { + console.log(numberA3); +} +for (let [numberA3 = -1, ...robotAInfo] of [robotA, robotB]) { + console.log(numberA3); +} \ No newline at end of file diff --git a/tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts b/tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts new file mode 100644 index 00000000000..ac0c8774567 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts @@ -0,0 +1,110 @@ +// @sourcemap: true +declare var console: { + log(msg: any): void; +} +type Robot = [number, string, string]; +type MultiSkilledRobot = [string, [string, string]]; + +let robotA: Robot = [1, "mower", "mowing"]; +let robotB: Robot = [2, "trimmer", "trimming"]; +let robots = [robotA, robotB]; +function getRobots() { + return robots; +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +let multiRobots = [multiRobotA, multiRobotB]; +function getMultiRobots() { + return multiRobots; +} + +let nameA: string, primarySkillA: string, secondarySkillA: string; +let numberB: number, nameB: string; +let numberA2: number, nameA2: string, skillA2: string, nameMA: string; +let numberA3: number, robotAInfo: (number | string)[], multiRobotAInfo: (string | [string, string])[]; + +for ([, nameA = "noName"] of robots) { + console.log(nameA); +} +for ([, nameA = "noName"] of getRobots()) { + console.log(nameA); +} +for ([, nameA = "noName"] of [robotA, robotB]) { + console.log(nameA); +} +for ([, [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["skill1", "skill2"]] of multiRobots) { + console.log(primarySkillA); +} +for ([, [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["skill1", "skill2"]] of getMultiRobots()) { + console.log(primarySkillA); +} +for ([, [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { + console.log(primarySkillA); +} + +for ([numberB = -1] of robots) { + console.log(numberB); +} +for ([numberB = -1] of getRobots()) { + console.log(numberB); +} +for ([numberB = -1] of [robotA, robotB]) { + console.log(numberB); +} +for ([nameB = "noName"] of multiRobots) { + console.log(nameB); +} +for ([nameB = "noName"] of getMultiRobots()) { + console.log(nameB); +} +for ([nameB = "noName"] of [multiRobotA, multiRobotB]) { + console.log(nameB); +} + +for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { + console.log(nameA2); +} +for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { + console.log(nameA2); +} +for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) { + console.log(nameA2); +} +for ([nameMA = "noName", [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["skill1", "skill2"]] of multiRobots) { + console.log(nameMA); +} +for ([nameMA = "noName", [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["skill1", "skill2"]] of getMultiRobots()) { + console.log(nameMA); +} +for ([nameMA = "noName", [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { + console.log(nameMA); +} + +for ([numberA3 = -1, ...robotAInfo] of robots) { + console.log(numberA3); +} +for ([numberA3 = -1, ...robotAInfo] of getRobots()) { + console.log(numberA3); +} +for ([numberA3 = -1, ...robotAInfo] of [robotA, robotB]) { + console.log(numberA3); +} \ No newline at end of file diff --git a/tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts b/tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts new file mode 100644 index 00000000000..d8f88189c01 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts @@ -0,0 +1,90 @@ +// @sourcemap: true +declare var console: { + log(msg: any): void; +} +interface Robot { + name: string; + skill: string; +} + +interface MultiRobot { + name: string; + skills: { + primary?: string; + secondary?: string; + }; +} + +let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; + +function getRobots() { + return robots; +} + +function getMultiRobots() { + return multiRobots; +} + +for (let {name: nameA = "noName" } of robots) { + console.log(nameA); +} +for (let {name: nameA = "noName" } of getRobots()) { + console.log(nameA); +} +for (let {name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + { primary: "nosKill", secondary: "noSkill" } } of multiRobots) { + console.log(primaryA); +} +for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) { + console.log(primaryA); +} +for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + { primary: "nosKill", secondary: "noSkill" } } of + [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(primaryA); +} + +for (let {name: nameA = "noName", skill: skillA = "noSkill" } of robots) { + console.log(nameA); +} +for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { + console.log(nameA); +} +for (let {name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for (let { + name: nameA = "noName", + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "noSkill", secondary: "noSkill" } +} of multiRobots) { + console.log(nameA); +} +for (let { + name: nameA = "noName", + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "noSkill", secondary: "noSkill" } +} of getMultiRobots()) { + console.log(nameA); +} +for (let { + name: nameA = "noName", + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "noSkill", secondary: "noSkill" } +} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(nameA); +} \ No newline at end of file diff --git a/tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts b/tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts new file mode 100644 index 00000000000..01d2f6133a3 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts @@ -0,0 +1,167 @@ +// @sourcemap: true +declare var console: { + log(msg: any): void; +} +interface Robot { + name: string; + skill: string; +} + +interface MultiRobot { + name: string; + skills: { + primary: string; + secondary: string; + }; +} + +let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; + +function getRobots() { + return robots; +} + +function getMultiRobots() { + return multiRobots; +} + +let nameA: string, primaryA: string, secondaryA: string, i: number, skillA: string; +let name: string, primary: string, secondary: string, skill: string; + +for ({name: nameA = "noName" } of robots) { + console.log(nameA); +} +for ({name: nameA = "noName" } of getRobots()) { + console.log(nameA); +} +for ({name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + { primary: "nosKill", secondary: "noSkill" } } of multiRobots) { + console.log(primaryA); +} +for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) { + console.log(primaryA); +} +for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + { primary: "nosKill", secondary: "noSkill" } } of + [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(primaryA); +} + +for ({ name = "noName" } of robots) { + console.log(nameA); +} +for ({ name = "noName" } of getRobots()) { + console.log(nameA); +} +for ({ name = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for ({ + skills: { + primary = "primary", + secondary = "secondary" + } = { primary: "noSkill", secondary: "noSkill" } +} of multiRobots) { + console.log(primaryA); +} +for ({ + skills: { + primary = "primary", + secondary = "secondary" + } = { primary: "noSkill", secondary: "noSkill" } +} of getMultiRobots()) { + console.log(primaryA); +} +for ({ + skills: { + primary = "primary", + secondary = "secondary" + } = { primary: "noSkill", secondary: "noSkill" } +} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(primaryA); +} + + +for ({name: nameA = "noName", skill: skillA = "noSkill" } of robots) { + console.log(nameA); +} +for ({name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { + console.log(nameA); +} +for ({name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for ({ + name: nameA = "noName", + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "noSkill", secondary: "noSkill" } +} of multiRobots) { + console.log(nameA); +} +for ({ + name: nameA = "noName", + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "noSkill", secondary: "noSkill" } +} of getMultiRobots()) { + console.log(nameA); +} +for ({ + name: nameA = "noName", + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "noSkill", secondary: "noSkill" } +} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(nameA); +} + +for ({ name = "noName", skill = "noSkill" } of robots) { + console.log(nameA); +} +for ({ name = "noName", skill = "noSkill" } of getRobots()) { + console.log(nameA); +} +for ({ name = "noName", skill = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for ({ + name = "noName", + skills: { + primary = "primary", + secondary = "secondary" + } = { primary: "noSkill", secondary: "noSkill" } +} of multiRobots) { + console.log(nameA); +} +for ({ + name = "noName", + skills: { + primary = "primary", + secondary = "secondary" + } = { primary: "noSkill", secondary: "noSkill" } +} of getMultiRobots()) { + console.log(nameA); +} +for ({ + name = "noName", + skills: { + primary = "primary", + secondary = "secondary" + } = { primary: "noSkill", secondary: "noSkill" } +} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(nameA); +} \ No newline at end of file From cee3388a295ce4e7710f65f387f9c4b87ea5e442 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 11 Dec 2015 14:42:25 -0800 Subject: [PATCH 057/209] Test cases for destructuring with default values in "for" --- ...ringForArrayBindingPatternDefaultValues.js | 184 + ...ForArrayBindingPatternDefaultValues.js.map | 2 + ...yBindingPatternDefaultValues.sourcemap.txt | 2752 +++++++++++++ ...orArrayBindingPatternDefaultValues.symbols | 367 ++ ...gForArrayBindingPatternDefaultValues.types | 599 +++ ...ingForArrayBindingPatternDefaultValues2.js | 196 + ...orArrayBindingPatternDefaultValues2.js.map | 2 + ...BindingPatternDefaultValues2.sourcemap.txt | 3030 ++++++++++++++ ...rArrayBindingPatternDefaultValues2.symbols | 391 ++ ...ForArrayBindingPatternDefaultValues2.types | 752 ++++ ...ingForObjectBindingPatternDefaultValues.js | 145 + ...orObjectBindingPatternDefaultValues.js.map | 2 + ...tBindingPatternDefaultValues.sourcemap.txt | 1740 ++++++++ ...rObjectBindingPatternDefaultValues.symbols | 350 ++ ...ForObjectBindingPatternDefaultValues.types | 484 +++ ...ngForObjectBindingPatternDefaultValues2.js | 265 ++ ...rObjectBindingPatternDefaultValues2.js.map | 2 + ...BindingPatternDefaultValues2.sourcemap.txt | 3589 +++++++++++++++++ ...ObjectBindingPatternDefaultValues2.symbols | 628 +++ ...orObjectBindingPatternDefaultValues2.types | 1020 +++++ ...ringForArrayBindingPatternDefaultValues.ts | 109 + ...ingForArrayBindingPatternDefaultValues2.ts | 115 + ...ingForObjectBindingPatternDefaultValues.ts | 98 + ...ngForObjectBindingPatternDefaultValues2.ts | 175 + 24 files changed, 16997 insertions(+) create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.types create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.types create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.types create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.types create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.js b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.js new file mode 100644 index 00000000000..24701d01b08 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.js @@ -0,0 +1,184 @@ +//// [sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts] +declare var console: { + log(msg: any): void; +} +type Robot = [number, string, string]; +type MultiSkilledRobot = [string, string[]]; + +let robotA: Robot = [1, "mower", "mowing"]; +function getRobot() { + return robotA; +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +function getMultiRobot() { + return multiRobotA; +} + +for (let [, nameA ="name"] = robotA, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let [, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for (let [, nameA = "name"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(nameA); +} +for (let [, [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["none", "none"]] = multiRobotA, i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for (let [, [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["none", "none"]] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for (let [, [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(primarySkillA); +} + +for (let [numberB = -1] = robotA, i = 0; i < 1; i++) { + console.log(numberB); +} +for (let [numberB = -1] = getRobot(), i = 0; i < 1; i++) { + console.log(numberB); +} +for (let [numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(numberB); +} +for (let [nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { + console.log(nameB); +} +for (let [nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(nameB); +} +for (let [nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(nameB); +} + +for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { + console.log(nameA2); +} +for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { + console.log(nameA2); +} +for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(nameA2); +} +for (let + [nameMA = "noName", + [ + primarySkillA = "primary", + secondarySkillA = "secondary" + ] = ["none", "none"] + ] = multiRobotA, i = 0; i < 1; i++) { + console.log(nameMA); +} +for (let [nameMA = "noName", + [ + primarySkillA = "primary", + secondarySkillA = "secondary" + ] = ["none", "none"] +] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(nameMA); +} +for (let [nameMA = "noName", + [ + primarySkillA = "primary", + secondarySkillA = "secondary" + ] = ["none", "none"] +] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(nameMA); +} + +for (let [numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + console.log(numberA3); +} +for (let [numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + console.log(numberA3); +} +for (let [numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(numberA3); +} + +//// [sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.js] +var robotA = [1, "mower", "mowing"]; +function getRobot() { + return robotA; +} +var multiRobotA = ["mower", ["mowing", ""]]; +var multiRobotB = ["trimmer", ["trimming", "edging"]]; +function getMultiRobot() { + return multiRobotA; +} +for (var _a = robotA[1], nameA = _a === void 0 ? "name" : _a, i = 0; i < 1; i++) { + console.log(nameA); +} +for (var _b = getRobot(), _c = _b[1], nameA = _c === void 0 ? "name" : _c, i = 0; i < 1; i++) { + console.log(nameA); +} +for (var _d = [2, "trimmer", "trimming"], _e = _d[1], nameA = _e === void 0 ? "name" : _e, i = 0; i < 1; i++) { + console.log(nameA); +} +for (var _f = multiRobotA[1], _g = _f === void 0 ? ["none", "none"] : _f, _h = _g[0], primarySkillA = _h === void 0 ? "primary" : _h, _j = _g[1], secondarySkillA = _j === void 0 ? "secondary" : _j, i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for (var _k = getMultiRobot(), _l = _k[1], _m = _l === void 0 ? ["none", "none"] : _l, _o = _m[0], primarySkillA = _o === void 0 ? "primary" : _o, _p = _m[1], secondarySkillA = _p === void 0 ? "secondary" : _p, i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for (var _q = ["trimmer", ["trimming", "edging"]], _r = _q[1], _s = _r === void 0 ? ["none", "none"] : _r, _t = _s[0], primarySkillA = _t === void 0 ? "primary" : _t, _u = _s[1], secondarySkillA = _u === void 0 ? "secondary" : _u, i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for (var _v = robotA[0], numberB = _v === void 0 ? -1 : _v, i = 0; i < 1; i++) { + console.log(numberB); +} +for (var _w = getRobot()[0], numberB = _w === void 0 ? -1 : _w, i = 0; i < 1; i++) { + console.log(numberB); +} +for (var _x = [2, "trimmer", "trimming"][0], numberB = _x === void 0 ? -1 : _x, i = 0; i < 1; i++) { + console.log(numberB); +} +for (var _y = multiRobotA[0], nameB = _y === void 0 ? "name" : _y, i = 0; i < 1; i++) { + console.log(nameB); +} +for (var _z = getMultiRobot()[0], nameB = _z === void 0 ? "name" : _z, i = 0; i < 1; i++) { + console.log(nameB); +} +for (var _0 = ["trimmer", ["trimming", "edging"]][0], nameB = _0 === void 0 ? "name" : _0, i = 0; i < 1; i++) { + console.log(nameB); +} +for (var _1 = robotA[0], numberA2 = _1 === void 0 ? -1 : _1, _2 = robotA[1], nameA2 = _2 === void 0 ? "name" : _2, _3 = robotA[2], skillA2 = _3 === void 0 ? "skill" : _3, i = 0; i < 1; i++) { + console.log(nameA2); +} +for (var _4 = getRobot(), _5 = _4[0], numberA2 = _5 === void 0 ? -1 : _5, _6 = _4[1], nameA2 = _6 === void 0 ? "name" : _6, _7 = _4[2], skillA2 = _7 === void 0 ? "skill" : _7, i = 0; i < 1; i++) { + console.log(nameA2); +} +for (var _8 = [2, "trimmer", "trimming"], _9 = _8[0], numberA2 = _9 === void 0 ? -1 : _9, _10 = _8[1], nameA2 = _10 === void 0 ? "name" : _10, _11 = _8[2], skillA2 = _11 === void 0 ? "skill" : _11, i = 0; i < 1; i++) { + console.log(nameA2); +} +for (var _12 = multiRobotA[0], nameMA = _12 === void 0 ? "noName" : _12, _13 = multiRobotA[1], _14 = _13 === void 0 ? ["none", "none"] : _13, _15 = _14[0], primarySkillA = _15 === void 0 ? "primary" : _15, _16 = _14[1], secondarySkillA = _16 === void 0 ? "secondary" : _16, i = 0; i < 1; i++) { + console.log(nameMA); +} +for (var _17 = getMultiRobot(), _18 = _17[0], nameMA = _18 === void 0 ? "noName" : _18, _19 = _17[1], _20 = _19 === void 0 ? ["none", "none"] : _19, _21 = _20[0], primarySkillA = _21 === void 0 ? "primary" : _21, _22 = _20[1], secondarySkillA = _22 === void 0 ? "secondary" : _22, i = 0; i < 1; i++) { + console.log(nameMA); +} +for (var _23 = ["trimmer", ["trimming", "edging"]], _24 = _23[0], nameMA = _24 === void 0 ? "noName" : _24, _25 = _23[1], _26 = _25 === void 0 ? ["none", "none"] : _25, _27 = _26[0], primarySkillA = _27 === void 0 ? "primary" : _27, _28 = _26[1], secondarySkillA = _28 === void 0 ? "secondary" : _28, i = 0; i < 1; i++) { + console.log(nameMA); +} +for (var _29 = robotA[0], numberA3 = _29 === void 0 ? -1 : _29, robotAInfo = robotA.slice(1), i = 0; i < 1; i++) { + console.log(numberA3); +} +for (var _30 = getRobot(), _31 = _30[0], numberA3 = _31 === void 0 ? -1 : _31, robotAInfo = _30.slice(1), i = 0; i < 1; i++) { + console.log(numberA3); +} +for (var _32 = [2, "trimmer", "trimming"], _33 = _32[0], numberA3 = _33 === void 0 ? -1 : _33, robotAInfo = _32.slice(1), i = 0; i < 1; i++) { + console.log(numberA3); +} +//# sourceMappingURL=sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.js.map new file mode 100644 index 00000000000..28053eaf603 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.js.map] +{"version":3,"file":"sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED,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;AACzE;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,GAAG,CAAC,CAAQ,kBAAa,EAAb,mCAAa,EAAY,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACrD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,IAAA,eAAmC,EAA5B,UAAc,EAAd,mCAAc,EAAgB,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC1D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,IAAA,+BAAmD,EAA5C,UAAc,EAAd,mCAAc,EAAgC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC1E,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAQ,uBAGQ,EAHR,0CAGQ,EAFhB,UAAyB,EAAzB,8CAAyB,EACzB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G,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACtE,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,IAAA,gCAA+D,EAA1D,YAAa,EAAb,oCAAa,EAAE,yBAAa,EAAgC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACtF,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.sourcemap.txt new file mode 100644 index 00000000000..764825e68a2 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.sourcemap.txt @@ -0,0 +1,2752 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.js +mapUrl: sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.js.map +sourceRoot: +sources: sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.js +sourceFile:sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts +------------------------------------------------------------------- +>>>var robotA = [1, "mower", "mowing"]; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^^^^ +11> ^ +12> ^ +1 >declare var console: { + > log(msg: any): void; + >} + >type Robot = [number, string, string]; + >type MultiSkilledRobot = [string, string[]]; + > + > +2 >let +3 > robotA +4 > : Robot = +5 > [ +6 > 1 +7 > , +8 > "mower" +9 > , +10> "mowing" +11> ] +12> ; +1 >Emitted(1, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(7, 5) + SourceIndex(0) +3 >Emitted(1, 11) Source(7, 11) + SourceIndex(0) +4 >Emitted(1, 14) Source(7, 21) + SourceIndex(0) +5 >Emitted(1, 15) Source(7, 22) + SourceIndex(0) +6 >Emitted(1, 16) Source(7, 23) + SourceIndex(0) +7 >Emitted(1, 18) Source(7, 25) + SourceIndex(0) +8 >Emitted(1, 25) Source(7, 32) + SourceIndex(0) +9 >Emitted(1, 27) Source(7, 34) + SourceIndex(0) +10>Emitted(1, 35) Source(7, 42) + SourceIndex(0) +11>Emitted(1, 36) Source(7, 43) + SourceIndex(0) +12>Emitted(1, 37) Source(7, 44) + SourceIndex(0) +--- +>>>function getRobot() { +1 > +2 >^^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(2, 1) Source(8, 1) + SourceIndex(0) +--- +>>> return robotA; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +1->function getRobot() { + > +2 > return +3 > +4 > robotA +5 > ; +1->Emitted(3, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(3, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(3, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(3, 18) Source(9, 18) + SourceIndex(0) +5 >Emitted(3, 19) Source(9, 19) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(4, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(4, 2) Source(10, 2) + SourceIndex(0) +--- +>>>var multiRobotA = ["mower", ["mowing", ""]]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^ +10> ^^ +11> ^^ +12> ^ +13> ^ +14> ^ +15> ^^^^^^^^^^^-> +1-> + > + > +2 >let +3 > multiRobotA +4 > : MultiSkilledRobot = +5 > [ +6 > "mower" +7 > , +8 > [ +9 > "mowing" +10> , +11> "" +12> ] +13> ] +14> ; +1->Emitted(5, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(5, 5) Source(12, 5) + SourceIndex(0) +3 >Emitted(5, 16) Source(12, 16) + SourceIndex(0) +4 >Emitted(5, 19) Source(12, 38) + SourceIndex(0) +5 >Emitted(5, 20) Source(12, 39) + SourceIndex(0) +6 >Emitted(5, 27) Source(12, 46) + SourceIndex(0) +7 >Emitted(5, 29) Source(12, 48) + SourceIndex(0) +8 >Emitted(5, 30) Source(12, 49) + SourceIndex(0) +9 >Emitted(5, 38) Source(12, 57) + SourceIndex(0) +10>Emitted(5, 40) Source(12, 59) + SourceIndex(0) +11>Emitted(5, 42) Source(12, 61) + SourceIndex(0) +12>Emitted(5, 43) Source(12, 62) + SourceIndex(0) +13>Emitted(5, 44) Source(12, 63) + SourceIndex(0) +14>Emitted(5, 45) Source(12, 64) + SourceIndex(0) +--- +>>>var multiRobotB = ["trimmer", ["trimming", "edging"]]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^ +12> ^ +13> ^ +14> ^ +1-> + > +2 >let +3 > multiRobotB +4 > : MultiSkilledRobot = +5 > [ +6 > "trimmer" +7 > , +8 > [ +9 > "trimming" +10> , +11> "edging" +12> ] +13> ] +14> ; +1->Emitted(6, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(6, 5) Source(13, 5) + SourceIndex(0) +3 >Emitted(6, 16) Source(13, 16) + SourceIndex(0) +4 >Emitted(6, 19) Source(13, 38) + SourceIndex(0) +5 >Emitted(6, 20) Source(13, 39) + SourceIndex(0) +6 >Emitted(6, 29) Source(13, 48) + SourceIndex(0) +7 >Emitted(6, 31) Source(13, 50) + SourceIndex(0) +8 >Emitted(6, 32) Source(13, 51) + SourceIndex(0) +9 >Emitted(6, 42) Source(13, 61) + SourceIndex(0) +10>Emitted(6, 44) Source(13, 63) + SourceIndex(0) +11>Emitted(6, 52) Source(13, 71) + SourceIndex(0) +12>Emitted(6, 53) Source(13, 72) + SourceIndex(0) +13>Emitted(6, 54) Source(13, 73) + SourceIndex(0) +14>Emitted(6, 55) Source(13, 74) + SourceIndex(0) +--- +>>>function getMultiRobot() { +1 > +2 >^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(7, 1) Source(14, 1) + SourceIndex(0) +--- +>>> return multiRobotA; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^ +5 > ^ +1->function getMultiRobot() { + > +2 > return +3 > +4 > multiRobotA +5 > ; +1->Emitted(8, 5) Source(15, 5) + SourceIndex(0) +2 >Emitted(8, 11) Source(15, 11) + SourceIndex(0) +3 >Emitted(8, 12) Source(15, 12) + SourceIndex(0) +4 >Emitted(8, 23) Source(15, 23) + SourceIndex(0) +5 >Emitted(8, 24) Source(15, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(9, 1) Source(16, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(16, 2) + SourceIndex(0) +--- +>>>for (var _a = robotA[1], nameA = _a === void 0 ? "name" : _a, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ +1-> + > + > +2 >for +3 > +4 > (let [, +5 > nameA ="name" +6 > +7 > nameA ="name" +8 > ] = robotA, +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { +1->Emitted(10, 1) Source(18, 1) + SourceIndex(0) +2 >Emitted(10, 4) Source(18, 4) + SourceIndex(0) +3 >Emitted(10, 5) Source(18, 5) + SourceIndex(0) +4 >Emitted(10, 6) Source(18, 13) + SourceIndex(0) +5 >Emitted(10, 24) Source(18, 26) + SourceIndex(0) +6 >Emitted(10, 26) Source(18, 13) + SourceIndex(0) +7 >Emitted(10, 61) Source(18, 26) + SourceIndex(0) +8 >Emitted(10, 63) Source(18, 38) + SourceIndex(0) +9 >Emitted(10, 64) Source(18, 39) + SourceIndex(0) +10>Emitted(10, 67) Source(18, 42) + SourceIndex(0) +11>Emitted(10, 68) Source(18, 43) + SourceIndex(0) +12>Emitted(10, 70) Source(18, 45) + SourceIndex(0) +13>Emitted(10, 71) Source(18, 46) + SourceIndex(0) +14>Emitted(10, 74) Source(18, 49) + SourceIndex(0) +15>Emitted(10, 75) Source(18, 50) + SourceIndex(0) +16>Emitted(10, 77) Source(18, 52) + SourceIndex(0) +17>Emitted(10, 78) Source(18, 53) + SourceIndex(0) +18>Emitted(10, 80) Source(18, 55) + SourceIndex(0) +19>Emitted(10, 82) Source(18, 57) + SourceIndex(0) +20>Emitted(10, 83) Source(18, 58) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(11, 5) Source(19, 5) + SourceIndex(0) +2 >Emitted(11, 12) Source(19, 12) + SourceIndex(0) +3 >Emitted(11, 13) Source(19, 13) + SourceIndex(0) +4 >Emitted(11, 16) Source(19, 16) + SourceIndex(0) +5 >Emitted(11, 17) Source(19, 17) + SourceIndex(0) +6 >Emitted(11, 22) Source(19, 22) + SourceIndex(0) +7 >Emitted(11, 23) Source(19, 23) + SourceIndex(0) +8 >Emitted(11, 24) Source(19, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(12, 1) Source(20, 1) + SourceIndex(0) +2 >Emitted(12, 2) Source(20, 2) + SourceIndex(0) +--- +>>>for (var _b = getRobot(), _c = _b[1], nameA = _c === void 0 ? "name" : _c, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^ +13> ^^^ +14> ^ +15> ^^ +16> ^ +17> ^^^ +18> ^ +19> ^^ +20> ^ +21> ^^ +22> ^^ +23> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > let [, nameA = "name"] = getRobot() +7 > +8 > nameA = "name" +9 > +10> nameA = "name" +11> ] = getRobot(), +12> i +13> = +14> 0 +15> ; +16> i +17> < +18> 1 +19> ; +20> i +21> ++ +22> ) +23> { +1->Emitted(13, 1) Source(21, 1) + SourceIndex(0) +2 >Emitted(13, 4) Source(21, 4) + SourceIndex(0) +3 >Emitted(13, 5) Source(21, 5) + SourceIndex(0) +4 >Emitted(13, 6) Source(21, 6) + SourceIndex(0) +5 >Emitted(13, 10) Source(21, 6) + SourceIndex(0) +6 >Emitted(13, 25) Source(21, 41) + SourceIndex(0) +7 >Emitted(13, 27) Source(21, 13) + SourceIndex(0) +8 >Emitted(13, 37) Source(21, 27) + SourceIndex(0) +9 >Emitted(13, 39) Source(21, 13) + SourceIndex(0) +10>Emitted(13, 74) Source(21, 27) + SourceIndex(0) +11>Emitted(13, 76) Source(21, 43) + SourceIndex(0) +12>Emitted(13, 77) Source(21, 44) + SourceIndex(0) +13>Emitted(13, 80) Source(21, 47) + SourceIndex(0) +14>Emitted(13, 81) Source(21, 48) + SourceIndex(0) +15>Emitted(13, 83) Source(21, 50) + SourceIndex(0) +16>Emitted(13, 84) Source(21, 51) + SourceIndex(0) +17>Emitted(13, 87) Source(21, 54) + SourceIndex(0) +18>Emitted(13, 88) Source(21, 55) + SourceIndex(0) +19>Emitted(13, 90) Source(21, 57) + SourceIndex(0) +20>Emitted(13, 91) Source(21, 58) + SourceIndex(0) +21>Emitted(13, 93) Source(21, 60) + SourceIndex(0) +22>Emitted(13, 95) Source(21, 62) + SourceIndex(0) +23>Emitted(13, 96) Source(21, 63) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(14, 5) Source(22, 5) + SourceIndex(0) +2 >Emitted(14, 12) Source(22, 12) + SourceIndex(0) +3 >Emitted(14, 13) Source(22, 13) + SourceIndex(0) +4 >Emitted(14, 16) Source(22, 16) + SourceIndex(0) +5 >Emitted(14, 17) Source(22, 17) + SourceIndex(0) +6 >Emitted(14, 22) Source(22, 22) + SourceIndex(0) +7 >Emitted(14, 23) Source(22, 23) + SourceIndex(0) +8 >Emitted(14, 24) Source(22, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(15, 1) Source(23, 1) + SourceIndex(0) +2 >Emitted(15, 2) Source(23, 2) + SourceIndex(0) +--- +>>>for (var _d = [2, "trimmer", "trimming"], _e = _d[1], nameA = _e === void 0 ? "name" : _e, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^ +13> ^^^ +14> ^ +15> ^^ +16> ^ +17> ^^^ +18> ^ +19> ^^ +20> ^ +21> ^^ +22> ^^ +23> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > let [, nameA = "name"] = [2, "trimmer", "trimming"] +7 > +8 > nameA = "name" +9 > +10> nameA = "name" +11> ] = [2, "trimmer", "trimming"], +12> i +13> = +14> 0 +15> ; +16> i +17> < +18> 1 +19> ; +20> i +21> ++ +22> ) +23> { +1->Emitted(16, 1) Source(24, 1) + SourceIndex(0) +2 >Emitted(16, 4) Source(24, 4) + SourceIndex(0) +3 >Emitted(16, 5) Source(24, 5) + SourceIndex(0) +4 >Emitted(16, 6) Source(24, 6) + SourceIndex(0) +5 >Emitted(16, 10) Source(24, 6) + SourceIndex(0) +6 >Emitted(16, 41) Source(24, 57) + SourceIndex(0) +7 >Emitted(16, 43) Source(24, 13) + SourceIndex(0) +8 >Emitted(16, 53) Source(24, 27) + SourceIndex(0) +9 >Emitted(16, 55) Source(24, 13) + SourceIndex(0) +10>Emitted(16, 90) Source(24, 27) + SourceIndex(0) +11>Emitted(16, 92) Source(24, 59) + SourceIndex(0) +12>Emitted(16, 93) Source(24, 60) + SourceIndex(0) +13>Emitted(16, 96) Source(24, 63) + SourceIndex(0) +14>Emitted(16, 97) Source(24, 64) + SourceIndex(0) +15>Emitted(16, 99) Source(24, 66) + SourceIndex(0) +16>Emitted(16, 100) Source(24, 67) + SourceIndex(0) +17>Emitted(16, 103) Source(24, 70) + SourceIndex(0) +18>Emitted(16, 104) Source(24, 71) + SourceIndex(0) +19>Emitted(16, 106) Source(24, 73) + SourceIndex(0) +20>Emitted(16, 107) Source(24, 74) + SourceIndex(0) +21>Emitted(16, 109) Source(24, 76) + SourceIndex(0) +22>Emitted(16, 111) Source(24, 78) + SourceIndex(0) +23>Emitted(16, 112) Source(24, 79) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(17, 5) Source(25, 5) + SourceIndex(0) +2 >Emitted(17, 12) Source(25, 12) + SourceIndex(0) +3 >Emitted(17, 13) Source(25, 13) + SourceIndex(0) +4 >Emitted(17, 16) Source(25, 16) + SourceIndex(0) +5 >Emitted(17, 17) Source(25, 17) + SourceIndex(0) +6 >Emitted(17, 22) Source(25, 22) + SourceIndex(0) +7 >Emitted(17, 23) Source(25, 23) + SourceIndex(0) +8 >Emitted(17, 24) Source(25, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(18, 1) Source(26, 1) + SourceIndex(0) +2 >Emitted(18, 2) Source(26, 2) + SourceIndex(0) +--- +>>>for (var _f = multiRobotA[1], _g = _f === void 0 ? ["none", "none"] : _f, _h = _g[0], primarySkillA = _h === void 0 ? "primary" : _h, _j = _g[1], secondarySkillA = _j === void 0 ? "secondary" : _j, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^^^^^^ +14> ^^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^ +27> ^^ +28> ^ +1-> + > +2 >for +3 > +4 > (let [, +5 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] +6 > +7 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] +8 > +9 > primarySkillA = "primary" +10> +11> primarySkillA = "primary" +12> , + > +13> secondarySkillA = "secondary" +14> +15> secondarySkillA = "secondary" +16> + > ] = ["none", "none"]] = multiRobotA, +17> i +18> = +19> 0 +20> ; +21> i +22> < +23> 1 +24> ; +25> i +26> ++ +27> ) +28> { +1->Emitted(19, 1) Source(27, 1) + SourceIndex(0) +2 >Emitted(19, 4) Source(27, 4) + SourceIndex(0) +3 >Emitted(19, 5) Source(27, 5) + SourceIndex(0) +4 >Emitted(19, 6) Source(27, 13) + SourceIndex(0) +5 >Emitted(19, 29) Source(30, 21) + SourceIndex(0) +6 >Emitted(19, 31) Source(27, 13) + SourceIndex(0) +7 >Emitted(19, 73) Source(30, 21) + SourceIndex(0) +8 >Emitted(19, 75) Source(28, 5) + SourceIndex(0) +9 >Emitted(19, 85) Source(28, 30) + SourceIndex(0) +10>Emitted(19, 87) Source(28, 5) + SourceIndex(0) +11>Emitted(19, 133) Source(28, 30) + SourceIndex(0) +12>Emitted(19, 135) Source(29, 5) + SourceIndex(0) +13>Emitted(19, 145) Source(29, 34) + SourceIndex(0) +14>Emitted(19, 147) Source(29, 5) + SourceIndex(0) +15>Emitted(19, 197) Source(29, 34) + SourceIndex(0) +16>Emitted(19, 199) Source(30, 38) + SourceIndex(0) +17>Emitted(19, 200) Source(30, 39) + SourceIndex(0) +18>Emitted(19, 203) Source(30, 42) + SourceIndex(0) +19>Emitted(19, 204) Source(30, 43) + SourceIndex(0) +20>Emitted(19, 206) Source(30, 45) + SourceIndex(0) +21>Emitted(19, 207) Source(30, 46) + SourceIndex(0) +22>Emitted(19, 210) Source(30, 49) + SourceIndex(0) +23>Emitted(19, 211) Source(30, 50) + SourceIndex(0) +24>Emitted(19, 213) Source(30, 52) + SourceIndex(0) +25>Emitted(19, 214) Source(30, 53) + SourceIndex(0) +26>Emitted(19, 216) Source(30, 55) + SourceIndex(0) +27>Emitted(19, 218) Source(30, 57) + SourceIndex(0) +28>Emitted(19, 219) Source(30, 58) + SourceIndex(0) +--- +>>> console.log(primarySkillA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primarySkillA +7 > ) +8 > ; +1 >Emitted(20, 5) Source(31, 5) + SourceIndex(0) +2 >Emitted(20, 12) Source(31, 12) + SourceIndex(0) +3 >Emitted(20, 13) Source(31, 13) + SourceIndex(0) +4 >Emitted(20, 16) Source(31, 16) + SourceIndex(0) +5 >Emitted(20, 17) Source(31, 17) + SourceIndex(0) +6 >Emitted(20, 30) Source(31, 30) + SourceIndex(0) +7 >Emitted(20, 31) Source(31, 31) + SourceIndex(0) +8 >Emitted(20, 32) Source(31, 32) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(21, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(21, 2) Source(32, 2) + SourceIndex(0) +--- +>>>for (var _k = getMultiRobot(), _l = _k[1], _m = _l === void 0 ? ["none", "none"] : _l, _o = _m[0], primarySkillA = _o === void 0 ? "primary" : _o, _p = _m[1], secondarySkillA = _p === void 0 ? "secondary" : _p, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +19> ^^ +20> ^ +21> ^^^ +22> ^ +23> ^^ +24> ^ +25> ^^^ +26> ^ +27> ^^ +28> ^ +29> ^^ +30> ^^ +31> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > let [, [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"]] = getMultiRobot() +7 > +8 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] +9 > +10> [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] +11> +12> primarySkillA = "primary" +13> +14> primarySkillA = "primary" +15> , + > +16> secondarySkillA = "secondary" +17> +18> secondarySkillA = "secondary" +19> + > ] = ["none", "none"]] = getMultiRobot(), +20> i +21> = +22> 0 +23> ; +24> i +25> < +26> 1 +27> ; +28> i +29> ++ +30> ) +31> { +1->Emitted(22, 1) Source(33, 1) + SourceIndex(0) +2 >Emitted(22, 4) Source(33, 4) + SourceIndex(0) +3 >Emitted(22, 5) Source(33, 5) + SourceIndex(0) +4 >Emitted(22, 6) Source(33, 6) + SourceIndex(0) +5 >Emitted(22, 10) Source(33, 6) + SourceIndex(0) +6 >Emitted(22, 30) Source(36, 40) + SourceIndex(0) +7 >Emitted(22, 32) Source(33, 13) + SourceIndex(0) +8 >Emitted(22, 42) Source(36, 21) + SourceIndex(0) +9 >Emitted(22, 44) Source(33, 13) + SourceIndex(0) +10>Emitted(22, 86) Source(36, 21) + SourceIndex(0) +11>Emitted(22, 88) Source(34, 5) + SourceIndex(0) +12>Emitted(22, 98) Source(34, 30) + SourceIndex(0) +13>Emitted(22, 100) Source(34, 5) + SourceIndex(0) +14>Emitted(22, 146) Source(34, 30) + SourceIndex(0) +15>Emitted(22, 148) Source(35, 5) + SourceIndex(0) +16>Emitted(22, 158) Source(35, 34) + SourceIndex(0) +17>Emitted(22, 160) Source(35, 5) + SourceIndex(0) +18>Emitted(22, 210) Source(35, 34) + SourceIndex(0) +19>Emitted(22, 212) Source(36, 42) + SourceIndex(0) +20>Emitted(22, 213) Source(36, 43) + SourceIndex(0) +21>Emitted(22, 216) Source(36, 46) + SourceIndex(0) +22>Emitted(22, 217) Source(36, 47) + SourceIndex(0) +23>Emitted(22, 219) Source(36, 49) + SourceIndex(0) +24>Emitted(22, 220) Source(36, 50) + SourceIndex(0) +25>Emitted(22, 223) Source(36, 53) + SourceIndex(0) +26>Emitted(22, 224) Source(36, 54) + SourceIndex(0) +27>Emitted(22, 226) Source(36, 56) + SourceIndex(0) +28>Emitted(22, 227) Source(36, 57) + SourceIndex(0) +29>Emitted(22, 229) Source(36, 59) + SourceIndex(0) +30>Emitted(22, 231) Source(36, 61) + SourceIndex(0) +31>Emitted(22, 232) Source(36, 62) + SourceIndex(0) +--- +>>> console.log(primarySkillA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primarySkillA +7 > ) +8 > ; +1 >Emitted(23, 5) Source(37, 5) + SourceIndex(0) +2 >Emitted(23, 12) Source(37, 12) + SourceIndex(0) +3 >Emitted(23, 13) Source(37, 13) + SourceIndex(0) +4 >Emitted(23, 16) Source(37, 16) + SourceIndex(0) +5 >Emitted(23, 17) Source(37, 17) + SourceIndex(0) +6 >Emitted(23, 30) Source(37, 30) + SourceIndex(0) +7 >Emitted(23, 31) Source(37, 31) + SourceIndex(0) +8 >Emitted(23, 32) Source(37, 32) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(24, 1) Source(38, 1) + SourceIndex(0) +2 >Emitted(24, 2) Source(38, 2) + SourceIndex(0) +--- +>>>for (var _q = ["trimmer", ["trimming", "edging"]], _r = _q[1], _s = _r === void 0 ? ["none", "none"] : _r, _t = _s[0], primarySkillA = _t === void 0 ? "primary" : _t, _u = _s[1], secondarySkillA = _u === void 0 ? "secondary" : _u, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +19> ^^ +20> ^ +21> ^^^ +22> ^ +23> ^^ +24> ^ +25> ^^^ +26> ^ +27> ^^ +28> ^ +29> ^^ +30> ^^ +31> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > let [, [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]] +7 > +8 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] +9 > +10> [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] +11> +12> primarySkillA = "primary" +13> +14> primarySkillA = "primary" +15> , + > +16> secondarySkillA = "secondary" +17> +18> secondarySkillA = "secondary" +19> + > ] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], +20> i +21> = +22> 0 +23> ; +24> i +25> < +26> 1 +27> ; +28> i +29> ++ +30> ) +31> { +1->Emitted(25, 1) Source(39, 1) + SourceIndex(0) +2 >Emitted(25, 4) Source(39, 4) + SourceIndex(0) +3 >Emitted(25, 5) Source(39, 5) + SourceIndex(0) +4 >Emitted(25, 6) Source(39, 6) + SourceIndex(0) +5 >Emitted(25, 10) Source(39, 6) + SourceIndex(0) +6 >Emitted(25, 50) Source(42, 60) + SourceIndex(0) +7 >Emitted(25, 52) Source(39, 13) + SourceIndex(0) +8 >Emitted(25, 62) Source(42, 21) + SourceIndex(0) +9 >Emitted(25, 64) Source(39, 13) + SourceIndex(0) +10>Emitted(25, 106) Source(42, 21) + SourceIndex(0) +11>Emitted(25, 108) Source(40, 5) + SourceIndex(0) +12>Emitted(25, 118) Source(40, 30) + SourceIndex(0) +13>Emitted(25, 120) Source(40, 5) + SourceIndex(0) +14>Emitted(25, 166) Source(40, 30) + SourceIndex(0) +15>Emitted(25, 168) Source(41, 5) + SourceIndex(0) +16>Emitted(25, 178) Source(41, 34) + SourceIndex(0) +17>Emitted(25, 180) Source(41, 5) + SourceIndex(0) +18>Emitted(25, 230) Source(41, 34) + SourceIndex(0) +19>Emitted(25, 232) Source(42, 62) + SourceIndex(0) +20>Emitted(25, 233) Source(42, 63) + SourceIndex(0) +21>Emitted(25, 236) Source(42, 66) + SourceIndex(0) +22>Emitted(25, 237) Source(42, 67) + SourceIndex(0) +23>Emitted(25, 239) Source(42, 69) + SourceIndex(0) +24>Emitted(25, 240) Source(42, 70) + SourceIndex(0) +25>Emitted(25, 243) Source(42, 73) + SourceIndex(0) +26>Emitted(25, 244) Source(42, 74) + SourceIndex(0) +27>Emitted(25, 246) Source(42, 76) + SourceIndex(0) +28>Emitted(25, 247) Source(42, 77) + SourceIndex(0) +29>Emitted(25, 249) Source(42, 79) + SourceIndex(0) +30>Emitted(25, 251) Source(42, 81) + SourceIndex(0) +31>Emitted(25, 252) Source(42, 82) + SourceIndex(0) +--- +>>> console.log(primarySkillA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primarySkillA +7 > ) +8 > ; +1 >Emitted(26, 5) Source(43, 5) + SourceIndex(0) +2 >Emitted(26, 12) Source(43, 12) + SourceIndex(0) +3 >Emitted(26, 13) Source(43, 13) + SourceIndex(0) +4 >Emitted(26, 16) Source(43, 16) + SourceIndex(0) +5 >Emitted(26, 17) Source(43, 17) + SourceIndex(0) +6 >Emitted(26, 30) Source(43, 30) + SourceIndex(0) +7 >Emitted(26, 31) Source(43, 31) + SourceIndex(0) +8 >Emitted(26, 32) Source(43, 32) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(27, 1) Source(44, 1) + SourceIndex(0) +2 >Emitted(27, 2) Source(44, 2) + SourceIndex(0) +--- +>>>for (var _v = robotA[0], numberB = _v === void 0 ? -1 : _v, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ +1-> + > + > +2 >for +3 > +4 > (let [ +5 > numberB = -1 +6 > +7 > numberB = -1 +8 > ] = robotA, +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { +1->Emitted(28, 1) Source(46, 1) + SourceIndex(0) +2 >Emitted(28, 4) Source(46, 4) + SourceIndex(0) +3 >Emitted(28, 5) Source(46, 5) + SourceIndex(0) +4 >Emitted(28, 6) Source(46, 11) + SourceIndex(0) +5 >Emitted(28, 24) Source(46, 23) + SourceIndex(0) +6 >Emitted(28, 26) Source(46, 11) + SourceIndex(0) +7 >Emitted(28, 59) Source(46, 23) + SourceIndex(0) +8 >Emitted(28, 61) Source(46, 35) + SourceIndex(0) +9 >Emitted(28, 62) Source(46, 36) + SourceIndex(0) +10>Emitted(28, 65) Source(46, 39) + SourceIndex(0) +11>Emitted(28, 66) Source(46, 40) + SourceIndex(0) +12>Emitted(28, 68) Source(46, 42) + SourceIndex(0) +13>Emitted(28, 69) Source(46, 43) + SourceIndex(0) +14>Emitted(28, 72) Source(46, 46) + SourceIndex(0) +15>Emitted(28, 73) Source(46, 47) + SourceIndex(0) +16>Emitted(28, 75) Source(46, 49) + SourceIndex(0) +17>Emitted(28, 76) Source(46, 50) + SourceIndex(0) +18>Emitted(28, 78) Source(46, 52) + SourceIndex(0) +19>Emitted(28, 80) Source(46, 54) + SourceIndex(0) +20>Emitted(28, 81) Source(46, 55) + SourceIndex(0) +--- +>>> console.log(numberB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > numberB +7 > ) +8 > ; +1 >Emitted(29, 5) Source(47, 5) + SourceIndex(0) +2 >Emitted(29, 12) Source(47, 12) + SourceIndex(0) +3 >Emitted(29, 13) Source(47, 13) + SourceIndex(0) +4 >Emitted(29, 16) Source(47, 16) + SourceIndex(0) +5 >Emitted(29, 17) Source(47, 17) + SourceIndex(0) +6 >Emitted(29, 24) Source(47, 24) + SourceIndex(0) +7 >Emitted(29, 25) Source(47, 25) + SourceIndex(0) +8 >Emitted(29, 26) Source(47, 26) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(30, 1) Source(48, 1) + SourceIndex(0) +2 >Emitted(30, 2) Source(48, 2) + SourceIndex(0) +--- +>>>for (var _w = getRobot()[0], numberB = _w === void 0 ? -1 : _w, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ +1-> + > +2 >for +3 > +4 > (let [ +5 > numberB = -1 +6 > +7 > numberB = -1 +8 > ] = getRobot(), +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { +1->Emitted(31, 1) Source(49, 1) + SourceIndex(0) +2 >Emitted(31, 4) Source(49, 4) + SourceIndex(0) +3 >Emitted(31, 5) Source(49, 5) + SourceIndex(0) +4 >Emitted(31, 6) Source(49, 11) + SourceIndex(0) +5 >Emitted(31, 28) Source(49, 23) + SourceIndex(0) +6 >Emitted(31, 30) Source(49, 11) + SourceIndex(0) +7 >Emitted(31, 63) Source(49, 23) + SourceIndex(0) +8 >Emitted(31, 65) Source(49, 39) + SourceIndex(0) +9 >Emitted(31, 66) Source(49, 40) + SourceIndex(0) +10>Emitted(31, 69) Source(49, 43) + SourceIndex(0) +11>Emitted(31, 70) Source(49, 44) + SourceIndex(0) +12>Emitted(31, 72) Source(49, 46) + SourceIndex(0) +13>Emitted(31, 73) Source(49, 47) + SourceIndex(0) +14>Emitted(31, 76) Source(49, 50) + SourceIndex(0) +15>Emitted(31, 77) Source(49, 51) + SourceIndex(0) +16>Emitted(31, 79) Source(49, 53) + SourceIndex(0) +17>Emitted(31, 80) Source(49, 54) + SourceIndex(0) +18>Emitted(31, 82) Source(49, 56) + SourceIndex(0) +19>Emitted(31, 84) Source(49, 58) + SourceIndex(0) +20>Emitted(31, 85) Source(49, 59) + SourceIndex(0) +--- +>>> console.log(numberB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > numberB +7 > ) +8 > ; +1 >Emitted(32, 5) Source(50, 5) + SourceIndex(0) +2 >Emitted(32, 12) Source(50, 12) + SourceIndex(0) +3 >Emitted(32, 13) Source(50, 13) + SourceIndex(0) +4 >Emitted(32, 16) Source(50, 16) + SourceIndex(0) +5 >Emitted(32, 17) Source(50, 17) + SourceIndex(0) +6 >Emitted(32, 24) Source(50, 24) + SourceIndex(0) +7 >Emitted(32, 25) Source(50, 25) + SourceIndex(0) +8 >Emitted(32, 26) Source(50, 26) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(33, 1) Source(51, 1) + SourceIndex(0) +2 >Emitted(33, 2) Source(51, 2) + SourceIndex(0) +--- +>>>for (var _x = [2, "trimmer", "trimming"][0], numberB = _x === void 0 ? -1 : _x, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ +1-> + > +2 >for +3 > +4 > (let [ +5 > numberB = -1 +6 > +7 > numberB = -1 +8 > ] = [2, "trimmer", "trimming"], +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { +1->Emitted(34, 1) Source(52, 1) + SourceIndex(0) +2 >Emitted(34, 4) Source(52, 4) + SourceIndex(0) +3 >Emitted(34, 5) Source(52, 5) + SourceIndex(0) +4 >Emitted(34, 6) Source(52, 11) + SourceIndex(0) +5 >Emitted(34, 44) Source(52, 23) + SourceIndex(0) +6 >Emitted(34, 46) Source(52, 11) + SourceIndex(0) +7 >Emitted(34, 79) Source(52, 23) + SourceIndex(0) +8 >Emitted(34, 81) Source(52, 55) + SourceIndex(0) +9 >Emitted(34, 82) Source(52, 56) + SourceIndex(0) +10>Emitted(34, 85) Source(52, 59) + SourceIndex(0) +11>Emitted(34, 86) Source(52, 60) + SourceIndex(0) +12>Emitted(34, 88) Source(52, 62) + SourceIndex(0) +13>Emitted(34, 89) Source(52, 63) + SourceIndex(0) +14>Emitted(34, 92) Source(52, 66) + SourceIndex(0) +15>Emitted(34, 93) Source(52, 67) + SourceIndex(0) +16>Emitted(34, 95) Source(52, 69) + SourceIndex(0) +17>Emitted(34, 96) Source(52, 70) + SourceIndex(0) +18>Emitted(34, 98) Source(52, 72) + SourceIndex(0) +19>Emitted(34, 100) Source(52, 74) + SourceIndex(0) +20>Emitted(34, 101) Source(52, 75) + SourceIndex(0) +--- +>>> console.log(numberB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > numberB +7 > ) +8 > ; +1 >Emitted(35, 5) Source(53, 5) + SourceIndex(0) +2 >Emitted(35, 12) Source(53, 12) + SourceIndex(0) +3 >Emitted(35, 13) Source(53, 13) + SourceIndex(0) +4 >Emitted(35, 16) Source(53, 16) + SourceIndex(0) +5 >Emitted(35, 17) Source(53, 17) + SourceIndex(0) +6 >Emitted(35, 24) Source(53, 24) + SourceIndex(0) +7 >Emitted(35, 25) Source(53, 25) + SourceIndex(0) +8 >Emitted(35, 26) Source(53, 26) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(36, 1) Source(54, 1) + SourceIndex(0) +2 >Emitted(36, 2) Source(54, 2) + SourceIndex(0) +--- +>>>for (var _y = multiRobotA[0], nameB = _y === void 0 ? "name" : _y, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ +1-> + > +2 >for +3 > +4 > (let [ +5 > nameB = "name" +6 > +7 > nameB = "name" +8 > ] = multiRobotA, +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { +1->Emitted(37, 1) Source(55, 1) + SourceIndex(0) +2 >Emitted(37, 4) Source(55, 4) + SourceIndex(0) +3 >Emitted(37, 5) Source(55, 5) + SourceIndex(0) +4 >Emitted(37, 6) Source(55, 11) + SourceIndex(0) +5 >Emitted(37, 29) Source(55, 25) + SourceIndex(0) +6 >Emitted(37, 31) Source(55, 11) + SourceIndex(0) +7 >Emitted(37, 66) Source(55, 25) + SourceIndex(0) +8 >Emitted(37, 68) Source(55, 42) + SourceIndex(0) +9 >Emitted(37, 69) Source(55, 43) + SourceIndex(0) +10>Emitted(37, 72) Source(55, 46) + SourceIndex(0) +11>Emitted(37, 73) Source(55, 47) + SourceIndex(0) +12>Emitted(37, 75) Source(55, 49) + SourceIndex(0) +13>Emitted(37, 76) Source(55, 50) + SourceIndex(0) +14>Emitted(37, 79) Source(55, 53) + SourceIndex(0) +15>Emitted(37, 80) Source(55, 54) + SourceIndex(0) +16>Emitted(37, 82) Source(55, 56) + SourceIndex(0) +17>Emitted(37, 83) Source(55, 57) + SourceIndex(0) +18>Emitted(37, 85) Source(55, 59) + SourceIndex(0) +19>Emitted(37, 87) Source(55, 61) + SourceIndex(0) +20>Emitted(37, 88) Source(55, 62) + SourceIndex(0) +--- +>>> console.log(nameB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameB +7 > ) +8 > ; +1 >Emitted(38, 5) Source(56, 5) + SourceIndex(0) +2 >Emitted(38, 12) Source(56, 12) + SourceIndex(0) +3 >Emitted(38, 13) Source(56, 13) + SourceIndex(0) +4 >Emitted(38, 16) Source(56, 16) + SourceIndex(0) +5 >Emitted(38, 17) Source(56, 17) + SourceIndex(0) +6 >Emitted(38, 22) Source(56, 22) + SourceIndex(0) +7 >Emitted(38, 23) Source(56, 23) + SourceIndex(0) +8 >Emitted(38, 24) Source(56, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(39, 1) Source(57, 1) + SourceIndex(0) +2 >Emitted(39, 2) Source(57, 2) + SourceIndex(0) +--- +>>>for (var _z = getMultiRobot()[0], nameB = _z === void 0 ? "name" : _z, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ +1-> + > +2 >for +3 > +4 > (let [ +5 > nameB = "name" +6 > +7 > nameB = "name" +8 > ] = getMultiRobot(), +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { +1->Emitted(40, 1) Source(58, 1) + SourceIndex(0) +2 >Emitted(40, 4) Source(58, 4) + SourceIndex(0) +3 >Emitted(40, 5) Source(58, 5) + SourceIndex(0) +4 >Emitted(40, 6) Source(58, 11) + SourceIndex(0) +5 >Emitted(40, 33) Source(58, 25) + SourceIndex(0) +6 >Emitted(40, 35) Source(58, 11) + SourceIndex(0) +7 >Emitted(40, 70) Source(58, 25) + SourceIndex(0) +8 >Emitted(40, 72) Source(58, 46) + SourceIndex(0) +9 >Emitted(40, 73) Source(58, 47) + SourceIndex(0) +10>Emitted(40, 76) Source(58, 50) + SourceIndex(0) +11>Emitted(40, 77) Source(58, 51) + SourceIndex(0) +12>Emitted(40, 79) Source(58, 53) + SourceIndex(0) +13>Emitted(40, 80) Source(58, 54) + SourceIndex(0) +14>Emitted(40, 83) Source(58, 57) + SourceIndex(0) +15>Emitted(40, 84) Source(58, 58) + SourceIndex(0) +16>Emitted(40, 86) Source(58, 60) + SourceIndex(0) +17>Emitted(40, 87) Source(58, 61) + SourceIndex(0) +18>Emitted(40, 89) Source(58, 63) + SourceIndex(0) +19>Emitted(40, 91) Source(58, 65) + SourceIndex(0) +20>Emitted(40, 92) Source(58, 66) + SourceIndex(0) +--- +>>> console.log(nameB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameB +7 > ) +8 > ; +1 >Emitted(41, 5) Source(59, 5) + SourceIndex(0) +2 >Emitted(41, 12) Source(59, 12) + SourceIndex(0) +3 >Emitted(41, 13) Source(59, 13) + SourceIndex(0) +4 >Emitted(41, 16) Source(59, 16) + SourceIndex(0) +5 >Emitted(41, 17) Source(59, 17) + SourceIndex(0) +6 >Emitted(41, 22) Source(59, 22) + SourceIndex(0) +7 >Emitted(41, 23) Source(59, 23) + SourceIndex(0) +8 >Emitted(41, 24) Source(59, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(42, 1) Source(60, 1) + SourceIndex(0) +2 >Emitted(42, 2) Source(60, 2) + SourceIndex(0) +--- +>>>for (var _0 = ["trimmer", ["trimming", "edging"]][0], nameB = _0 === void 0 ? "name" : _0, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ +1-> + > +2 >for +3 > +4 > (let [ +5 > nameB = "name" +6 > +7 > nameB = "name" +8 > ] = ["trimmer", ["trimming", "edging"]], +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { +1->Emitted(43, 1) Source(61, 1) + SourceIndex(0) +2 >Emitted(43, 4) Source(61, 4) + SourceIndex(0) +3 >Emitted(43, 5) Source(61, 5) + SourceIndex(0) +4 >Emitted(43, 6) Source(61, 11) + SourceIndex(0) +5 >Emitted(43, 53) Source(61, 25) + SourceIndex(0) +6 >Emitted(43, 55) Source(61, 11) + SourceIndex(0) +7 >Emitted(43, 90) Source(61, 25) + SourceIndex(0) +8 >Emitted(43, 92) Source(61, 66) + SourceIndex(0) +9 >Emitted(43, 93) Source(61, 67) + SourceIndex(0) +10>Emitted(43, 96) Source(61, 70) + SourceIndex(0) +11>Emitted(43, 97) Source(61, 71) + SourceIndex(0) +12>Emitted(43, 99) Source(61, 73) + SourceIndex(0) +13>Emitted(43, 100) Source(61, 74) + SourceIndex(0) +14>Emitted(43, 103) Source(61, 77) + SourceIndex(0) +15>Emitted(43, 104) Source(61, 78) + SourceIndex(0) +16>Emitted(43, 106) Source(61, 80) + SourceIndex(0) +17>Emitted(43, 107) Source(61, 81) + SourceIndex(0) +18>Emitted(43, 109) Source(61, 83) + SourceIndex(0) +19>Emitted(43, 111) Source(61, 85) + SourceIndex(0) +20>Emitted(43, 112) Source(61, 86) + SourceIndex(0) +--- +>>> console.log(nameB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameB +7 > ) +8 > ; +1 >Emitted(44, 5) Source(62, 5) + SourceIndex(0) +2 >Emitted(44, 12) Source(62, 12) + SourceIndex(0) +3 >Emitted(44, 13) Source(62, 13) + SourceIndex(0) +4 >Emitted(44, 16) Source(62, 16) + SourceIndex(0) +5 >Emitted(44, 17) Source(62, 17) + SourceIndex(0) +6 >Emitted(44, 22) Source(62, 22) + SourceIndex(0) +7 >Emitted(44, 23) Source(62, 23) + SourceIndex(0) +8 >Emitted(44, 24) Source(62, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(45, 1) Source(63, 1) + SourceIndex(0) +2 >Emitted(45, 2) Source(63, 2) + SourceIndex(0) +--- +>>>for (var _1 = robotA[0], numberA2 = _1 === void 0 ? -1 : _1, _2 = robotA[1], nameA2 = _2 === void 0 ? "name" : _2, _3 = robotA[2], skillA2 = _3 === void 0 ? "skill" : _3, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^ +27> ^^ +28> ^ +1-> + > + > +2 >for +3 > +4 > (let [ +5 > numberA2 = -1 +6 > +7 > numberA2 = -1 +8 > , +9 > nameA2 = "name" +10> +11> nameA2 = "name" +12> , +13> skillA2 = "skill" +14> +15> skillA2 = "skill" +16> ] = robotA, +17> i +18> = +19> 0 +20> ; +21> i +22> < +23> 1 +24> ; +25> i +26> ++ +27> ) +28> { +1->Emitted(46, 1) Source(65, 1) + SourceIndex(0) +2 >Emitted(46, 4) Source(65, 4) + SourceIndex(0) +3 >Emitted(46, 5) Source(65, 5) + SourceIndex(0) +4 >Emitted(46, 6) Source(65, 11) + SourceIndex(0) +5 >Emitted(46, 24) Source(65, 24) + SourceIndex(0) +6 >Emitted(46, 26) Source(65, 11) + SourceIndex(0) +7 >Emitted(46, 60) Source(65, 24) + SourceIndex(0) +8 >Emitted(46, 62) Source(65, 26) + SourceIndex(0) +9 >Emitted(46, 76) Source(65, 41) + SourceIndex(0) +10>Emitted(46, 78) Source(65, 26) + SourceIndex(0) +11>Emitted(46, 114) Source(65, 41) + SourceIndex(0) +12>Emitted(46, 116) Source(65, 43) + SourceIndex(0) +13>Emitted(46, 130) Source(65, 60) + SourceIndex(0) +14>Emitted(46, 132) Source(65, 43) + SourceIndex(0) +15>Emitted(46, 170) Source(65, 60) + SourceIndex(0) +16>Emitted(46, 172) Source(65, 72) + SourceIndex(0) +17>Emitted(46, 173) Source(65, 73) + SourceIndex(0) +18>Emitted(46, 176) Source(65, 76) + SourceIndex(0) +19>Emitted(46, 177) Source(65, 77) + SourceIndex(0) +20>Emitted(46, 179) Source(65, 79) + SourceIndex(0) +21>Emitted(46, 180) Source(65, 80) + SourceIndex(0) +22>Emitted(46, 183) Source(65, 83) + SourceIndex(0) +23>Emitted(46, 184) Source(65, 84) + SourceIndex(0) +24>Emitted(46, 186) Source(65, 86) + SourceIndex(0) +25>Emitted(46, 187) Source(65, 87) + SourceIndex(0) +26>Emitted(46, 189) Source(65, 89) + SourceIndex(0) +27>Emitted(46, 191) Source(65, 91) + SourceIndex(0) +28>Emitted(46, 192) Source(65, 92) + SourceIndex(0) +--- +>>> console.log(nameA2); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA2 +7 > ) +8 > ; +1 >Emitted(47, 5) Source(66, 5) + SourceIndex(0) +2 >Emitted(47, 12) Source(66, 12) + SourceIndex(0) +3 >Emitted(47, 13) Source(66, 13) + SourceIndex(0) +4 >Emitted(47, 16) Source(66, 16) + SourceIndex(0) +5 >Emitted(47, 17) Source(66, 17) + SourceIndex(0) +6 >Emitted(47, 23) Source(66, 23) + SourceIndex(0) +7 >Emitted(47, 24) Source(66, 24) + SourceIndex(0) +8 >Emitted(47, 25) Source(66, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(48, 1) Source(67, 1) + SourceIndex(0) +2 >Emitted(48, 2) Source(67, 2) + SourceIndex(0) +--- +>>>for (var _4 = getRobot(), _5 = _4[0], numberA2 = _5 === void 0 ? -1 : _5, _6 = _4[1], nameA2 = _6 === void 0 ? "name" : _6, _7 = _4[2], skillA2 = _7 === void 0 ? "skill" : _7, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +19> ^^ +20> ^ +21> ^^^ +22> ^ +23> ^^ +24> ^ +25> ^^^ +26> ^ +27> ^^ +28> ^ +29> ^^ +30> ^^ +31> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot() +7 > +8 > numberA2 = -1 +9 > +10> numberA2 = -1 +11> , +12> nameA2 = "name" +13> +14> nameA2 = "name" +15> , +16> skillA2 = "skill" +17> +18> skillA2 = "skill" +19> ] = getRobot(), +20> i +21> = +22> 0 +23> ; +24> i +25> < +26> 1 +27> ; +28> i +29> ++ +30> ) +31> { +1->Emitted(49, 1) Source(68, 1) + SourceIndex(0) +2 >Emitted(49, 4) Source(68, 4) + SourceIndex(0) +3 >Emitted(49, 5) Source(68, 5) + SourceIndex(0) +4 >Emitted(49, 6) Source(68, 6) + SourceIndex(0) +5 >Emitted(49, 10) Source(68, 6) + SourceIndex(0) +6 >Emitted(49, 25) Source(68, 74) + SourceIndex(0) +7 >Emitted(49, 27) Source(68, 11) + SourceIndex(0) +8 >Emitted(49, 37) Source(68, 24) + SourceIndex(0) +9 >Emitted(49, 39) Source(68, 11) + SourceIndex(0) +10>Emitted(49, 73) Source(68, 24) + SourceIndex(0) +11>Emitted(49, 75) Source(68, 26) + SourceIndex(0) +12>Emitted(49, 85) Source(68, 41) + SourceIndex(0) +13>Emitted(49, 87) Source(68, 26) + SourceIndex(0) +14>Emitted(49, 123) Source(68, 41) + SourceIndex(0) +15>Emitted(49, 125) Source(68, 43) + SourceIndex(0) +16>Emitted(49, 135) Source(68, 60) + SourceIndex(0) +17>Emitted(49, 137) Source(68, 43) + SourceIndex(0) +18>Emitted(49, 175) Source(68, 60) + SourceIndex(0) +19>Emitted(49, 177) Source(68, 76) + SourceIndex(0) +20>Emitted(49, 178) Source(68, 77) + SourceIndex(0) +21>Emitted(49, 181) Source(68, 80) + SourceIndex(0) +22>Emitted(49, 182) Source(68, 81) + SourceIndex(0) +23>Emitted(49, 184) Source(68, 83) + SourceIndex(0) +24>Emitted(49, 185) Source(68, 84) + SourceIndex(0) +25>Emitted(49, 188) Source(68, 87) + SourceIndex(0) +26>Emitted(49, 189) Source(68, 88) + SourceIndex(0) +27>Emitted(49, 191) Source(68, 90) + SourceIndex(0) +28>Emitted(49, 192) Source(68, 91) + SourceIndex(0) +29>Emitted(49, 194) Source(68, 93) + SourceIndex(0) +30>Emitted(49, 196) Source(68, 95) + SourceIndex(0) +31>Emitted(49, 197) Source(68, 96) + SourceIndex(0) +--- +>>> console.log(nameA2); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA2 +7 > ) +8 > ; +1 >Emitted(50, 5) Source(69, 5) + SourceIndex(0) +2 >Emitted(50, 12) Source(69, 12) + SourceIndex(0) +3 >Emitted(50, 13) Source(69, 13) + SourceIndex(0) +4 >Emitted(50, 16) Source(69, 16) + SourceIndex(0) +5 >Emitted(50, 17) Source(69, 17) + SourceIndex(0) +6 >Emitted(50, 23) Source(69, 23) + SourceIndex(0) +7 >Emitted(50, 24) Source(69, 24) + SourceIndex(0) +8 >Emitted(50, 25) Source(69, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(51, 1) Source(70, 1) + SourceIndex(0) +2 >Emitted(51, 2) Source(70, 2) + SourceIndex(0) +--- +>>>for (var _8 = [2, "trimmer", "trimming"], _9 = _8[0], numberA2 = _9 === void 0 ? -1 : _9, _10 = _8[1], nameA2 = _10 === void 0 ? "name" : _10, _11 = _8[2], skillA2 = _11 === void 0 ? "skill" : _11, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +19> ^^ +20> ^ +21> ^^^ +22> ^ +23> ^^ +24> ^ +25> ^^^ +26> ^ +27> ^^ +28> ^ +29> ^^ +30> ^^ +31> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"] +7 > +8 > numberA2 = -1 +9 > +10> numberA2 = -1 +11> , +12> nameA2 = "name" +13> +14> nameA2 = "name" +15> , +16> skillA2 = "skill" +17> +18> skillA2 = "skill" +19> ] = [2, "trimmer", "trimming"], +20> i +21> = +22> 0 +23> ; +24> i +25> < +26> 1 +27> ; +28> i +29> ++ +30> ) +31> { +1->Emitted(52, 1) Source(71, 1) + SourceIndex(0) +2 >Emitted(52, 4) Source(71, 4) + SourceIndex(0) +3 >Emitted(52, 5) Source(71, 5) + SourceIndex(0) +4 >Emitted(52, 6) Source(71, 6) + SourceIndex(0) +5 >Emitted(52, 10) Source(71, 6) + SourceIndex(0) +6 >Emitted(52, 41) Source(71, 90) + SourceIndex(0) +7 >Emitted(52, 43) Source(71, 11) + SourceIndex(0) +8 >Emitted(52, 53) Source(71, 24) + SourceIndex(0) +9 >Emitted(52, 55) Source(71, 11) + SourceIndex(0) +10>Emitted(52, 89) Source(71, 24) + SourceIndex(0) +11>Emitted(52, 91) Source(71, 26) + SourceIndex(0) +12>Emitted(52, 102) Source(71, 41) + SourceIndex(0) +13>Emitted(52, 104) Source(71, 26) + SourceIndex(0) +14>Emitted(52, 142) Source(71, 41) + SourceIndex(0) +15>Emitted(52, 144) Source(71, 43) + SourceIndex(0) +16>Emitted(52, 155) Source(71, 60) + SourceIndex(0) +17>Emitted(52, 157) Source(71, 43) + SourceIndex(0) +18>Emitted(52, 197) Source(71, 60) + SourceIndex(0) +19>Emitted(52, 199) Source(71, 92) + SourceIndex(0) +20>Emitted(52, 200) Source(71, 93) + SourceIndex(0) +21>Emitted(52, 203) Source(71, 96) + SourceIndex(0) +22>Emitted(52, 204) Source(71, 97) + SourceIndex(0) +23>Emitted(52, 206) Source(71, 99) + SourceIndex(0) +24>Emitted(52, 207) Source(71, 100) + SourceIndex(0) +25>Emitted(52, 210) Source(71, 103) + SourceIndex(0) +26>Emitted(52, 211) Source(71, 104) + SourceIndex(0) +27>Emitted(52, 213) Source(71, 106) + SourceIndex(0) +28>Emitted(52, 214) Source(71, 107) + SourceIndex(0) +29>Emitted(52, 216) Source(71, 109) + SourceIndex(0) +30>Emitted(52, 218) Source(71, 111) + SourceIndex(0) +31>Emitted(52, 219) Source(71, 112) + SourceIndex(0) +--- +>>> console.log(nameA2); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA2 +7 > ) +8 > ; +1 >Emitted(53, 5) Source(72, 5) + SourceIndex(0) +2 >Emitted(53, 12) Source(72, 12) + SourceIndex(0) +3 >Emitted(53, 13) Source(72, 13) + SourceIndex(0) +4 >Emitted(53, 16) Source(72, 16) + SourceIndex(0) +5 >Emitted(53, 17) Source(72, 17) + SourceIndex(0) +6 >Emitted(53, 23) Source(72, 23) + SourceIndex(0) +7 >Emitted(53, 24) Source(72, 24) + SourceIndex(0) +8 >Emitted(53, 25) Source(72, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(54, 1) Source(73, 1) + SourceIndex(0) +2 >Emitted(54, 2) Source(73, 2) + SourceIndex(0) +--- +>>>for (var _12 = multiRobotA[0], nameMA = _12 === void 0 ? "noName" : _12, _13 = multiRobotA[1], _14 = _13 === void 0 ? ["none", "none"] : _13, _15 = _14[0], primarySkillA = _15 === void 0 ? "primary" : _15, _16 = _14[1], secondarySkillA = _16 === void 0 ? "secondary" : _16, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^^^^^^^^ +14> ^^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +16> ^^ +17> ^^^^^^^^^^^^ +18> ^^ +19> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^^ +27> ^ +28> ^^ +29> ^ +30> ^^ +31> ^^ +32> ^ +1-> + > +2 >for +3 > +4 > (let + > [ +5 > nameMA = "noName" +6 > +7 > nameMA = "noName" +8 > , + > +9 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] +10> +11> [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] +12> +13> primarySkillA = "primary" +14> +15> primarySkillA = "primary" +16> , + > +17> secondarySkillA = "secondary" +18> +19> secondarySkillA = "secondary" +20> + > ] = ["none", "none"] + > ] = multiRobotA, +21> i +22> = +23> 0 +24> ; +25> i +26> < +27> 1 +28> ; +29> i +30> ++ +31> ) +32> { +1->Emitted(55, 1) Source(74, 1) + SourceIndex(0) +2 >Emitted(55, 4) Source(74, 4) + SourceIndex(0) +3 >Emitted(55, 5) Source(74, 5) + SourceIndex(0) +4 >Emitted(55, 6) Source(75, 6) + SourceIndex(0) +5 >Emitted(55, 30) Source(75, 23) + SourceIndex(0) +6 >Emitted(55, 32) Source(75, 6) + SourceIndex(0) +7 >Emitted(55, 72) Source(75, 23) + SourceIndex(0) +8 >Emitted(55, 74) Source(76, 9) + SourceIndex(0) +9 >Emitted(55, 94) Source(79, 29) + SourceIndex(0) +10>Emitted(55, 96) Source(76, 9) + SourceIndex(0) +11>Emitted(55, 141) Source(79, 29) + SourceIndex(0) +12>Emitted(55, 143) Source(77, 13) + SourceIndex(0) +13>Emitted(55, 155) Source(77, 38) + SourceIndex(0) +14>Emitted(55, 157) Source(77, 13) + SourceIndex(0) +15>Emitted(55, 205) Source(77, 38) + SourceIndex(0) +16>Emitted(55, 207) Source(78, 13) + SourceIndex(0) +17>Emitted(55, 219) Source(78, 42) + SourceIndex(0) +18>Emitted(55, 221) Source(78, 13) + SourceIndex(0) +19>Emitted(55, 273) Source(78, 42) + SourceIndex(0) +20>Emitted(55, 275) Source(80, 22) + SourceIndex(0) +21>Emitted(55, 276) Source(80, 23) + SourceIndex(0) +22>Emitted(55, 279) Source(80, 26) + SourceIndex(0) +23>Emitted(55, 280) Source(80, 27) + SourceIndex(0) +24>Emitted(55, 282) Source(80, 29) + SourceIndex(0) +25>Emitted(55, 283) Source(80, 30) + SourceIndex(0) +26>Emitted(55, 286) Source(80, 33) + SourceIndex(0) +27>Emitted(55, 287) Source(80, 34) + SourceIndex(0) +28>Emitted(55, 289) Source(80, 36) + SourceIndex(0) +29>Emitted(55, 290) Source(80, 37) + SourceIndex(0) +30>Emitted(55, 292) Source(80, 39) + SourceIndex(0) +31>Emitted(55, 294) Source(80, 41) + SourceIndex(0) +32>Emitted(55, 295) Source(80, 42) + SourceIndex(0) +--- +>>> console.log(nameMA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMA +7 > ) +8 > ; +1 >Emitted(56, 5) Source(81, 5) + SourceIndex(0) +2 >Emitted(56, 12) Source(81, 12) + SourceIndex(0) +3 >Emitted(56, 13) Source(81, 13) + SourceIndex(0) +4 >Emitted(56, 16) Source(81, 16) + SourceIndex(0) +5 >Emitted(56, 17) Source(81, 17) + SourceIndex(0) +6 >Emitted(56, 23) Source(81, 23) + SourceIndex(0) +7 >Emitted(56, 24) Source(81, 24) + SourceIndex(0) +8 >Emitted(56, 25) Source(81, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(57, 1) Source(82, 1) + SourceIndex(0) +2 >Emitted(57, 2) Source(82, 2) + SourceIndex(0) +--- +>>>for (var _17 = getMultiRobot(), _18 = _17[0], nameMA = _18 === void 0 ? "noName" : _18, _19 = _17[1], _20 = _19 === void 0 ? ["none", "none"] : _19, _21 = _20[0], primarySkillA = _21 === void 0 ? "primary" : _21, _22 = _20[1], secondarySkillA = _22 === void 0 ? "secondary" : _22, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +19> ^^ +20> ^^^^^^^^^^^^ +21> ^^ +22> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +23> ^^ +24> ^ +25> ^^^ +26> ^ +27> ^^ +28> ^ +29> ^^^ +30> ^ +31> ^^ +32> ^ +33> ^^ +34> ^^ +35> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > let [nameMA = "noName", + > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] + > ] = getMultiRobot() +7 > +8 > nameMA = "noName" +9 > +10> nameMA = "noName" +11> , + > +12> [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] +13> +14> [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] +15> +16> primarySkillA = "primary" +17> +18> primarySkillA = "primary" +19> , + > +20> secondarySkillA = "secondary" +21> +22> secondarySkillA = "secondary" +23> + > ] = ["none", "none"] + > ] = getMultiRobot(), +24> i +25> = +26> 0 +27> ; +28> i +29> < +30> 1 +31> ; +32> i +33> ++ +34> ) +35> { +1->Emitted(58, 1) Source(83, 1) + SourceIndex(0) +2 >Emitted(58, 4) Source(83, 4) + SourceIndex(0) +3 >Emitted(58, 5) Source(83, 5) + SourceIndex(0) +4 >Emitted(58, 6) Source(83, 6) + SourceIndex(0) +5 >Emitted(58, 10) Source(83, 6) + SourceIndex(0) +6 >Emitted(58, 31) Source(88, 21) + SourceIndex(0) +7 >Emitted(58, 33) Source(83, 11) + SourceIndex(0) +8 >Emitted(58, 45) Source(83, 28) + SourceIndex(0) +9 >Emitted(58, 47) Source(83, 11) + SourceIndex(0) +10>Emitted(58, 87) Source(83, 28) + SourceIndex(0) +11>Emitted(58, 89) Source(84, 5) + SourceIndex(0) +12>Emitted(58, 101) Source(87, 25) + SourceIndex(0) +13>Emitted(58, 103) Source(84, 5) + SourceIndex(0) +14>Emitted(58, 148) Source(87, 25) + SourceIndex(0) +15>Emitted(58, 150) Source(85, 9) + SourceIndex(0) +16>Emitted(58, 162) Source(85, 34) + SourceIndex(0) +17>Emitted(58, 164) Source(85, 9) + SourceIndex(0) +18>Emitted(58, 212) Source(85, 34) + SourceIndex(0) +19>Emitted(58, 214) Source(86, 9) + SourceIndex(0) +20>Emitted(58, 226) Source(86, 38) + SourceIndex(0) +21>Emitted(58, 228) Source(86, 9) + SourceIndex(0) +22>Emitted(58, 280) Source(86, 38) + SourceIndex(0) +23>Emitted(58, 282) Source(88, 23) + SourceIndex(0) +24>Emitted(58, 283) Source(88, 24) + SourceIndex(0) +25>Emitted(58, 286) Source(88, 27) + SourceIndex(0) +26>Emitted(58, 287) Source(88, 28) + SourceIndex(0) +27>Emitted(58, 289) Source(88, 30) + SourceIndex(0) +28>Emitted(58, 290) Source(88, 31) + SourceIndex(0) +29>Emitted(58, 293) Source(88, 34) + SourceIndex(0) +30>Emitted(58, 294) Source(88, 35) + SourceIndex(0) +31>Emitted(58, 296) Source(88, 37) + SourceIndex(0) +32>Emitted(58, 297) Source(88, 38) + SourceIndex(0) +33>Emitted(58, 299) Source(88, 40) + SourceIndex(0) +34>Emitted(58, 301) Source(88, 42) + SourceIndex(0) +35>Emitted(58, 302) Source(88, 43) + SourceIndex(0) +--- +>>> console.log(nameMA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMA +7 > ) +8 > ; +1 >Emitted(59, 5) Source(89, 5) + SourceIndex(0) +2 >Emitted(59, 12) Source(89, 12) + SourceIndex(0) +3 >Emitted(59, 13) Source(89, 13) + SourceIndex(0) +4 >Emitted(59, 16) Source(89, 16) + SourceIndex(0) +5 >Emitted(59, 17) Source(89, 17) + SourceIndex(0) +6 >Emitted(59, 23) Source(89, 23) + SourceIndex(0) +7 >Emitted(59, 24) Source(89, 24) + SourceIndex(0) +8 >Emitted(59, 25) Source(89, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(60, 1) Source(90, 1) + SourceIndex(0) +2 >Emitted(60, 2) Source(90, 2) + SourceIndex(0) +--- +>>>for (var _23 = ["trimmer", ["trimming", "edging"]], _24 = _23[0], nameMA = _24 === void 0 ? "noName" : _24, _25 = _23[1], _26 = _25 === void 0 ? ["none", "none"] : _25, _27 = _26[0], primarySkillA = _27 === void 0 ? "primary" : _27, _28 = _26[1], secondarySkillA = _28 === void 0 ? "secondary" : _28, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +19> ^^ +20> ^^^^^^^^^^^^ +21> ^^ +22> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +23> ^^ +24> ^ +25> ^^^ +26> ^ +27> ^^ +28> ^ +29> ^^^ +30> ^ +31> ^^ +32> ^ +33> ^^ +34> ^^ +35> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > let [nameMA = "noName", + > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] + > ] = ["trimmer", ["trimming", "edging"]] +7 > +8 > nameMA = "noName" +9 > +10> nameMA = "noName" +11> , + > +12> [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] +13> +14> [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] +15> +16> primarySkillA = "primary" +17> +18> primarySkillA = "primary" +19> , + > +20> secondarySkillA = "secondary" +21> +22> secondarySkillA = "secondary" +23> + > ] = ["none", "none"] + > ] = ["trimmer", ["trimming", "edging"]], +24> i +25> = +26> 0 +27> ; +28> i +29> < +30> 1 +31> ; +32> i +33> ++ +34> ) +35> { +1->Emitted(61, 1) Source(91, 1) + SourceIndex(0) +2 >Emitted(61, 4) Source(91, 4) + SourceIndex(0) +3 >Emitted(61, 5) Source(91, 5) + SourceIndex(0) +4 >Emitted(61, 6) Source(91, 6) + SourceIndex(0) +5 >Emitted(61, 10) Source(91, 6) + SourceIndex(0) +6 >Emitted(61, 51) Source(96, 41) + SourceIndex(0) +7 >Emitted(61, 53) Source(91, 11) + SourceIndex(0) +8 >Emitted(61, 65) Source(91, 28) + SourceIndex(0) +9 >Emitted(61, 67) Source(91, 11) + SourceIndex(0) +10>Emitted(61, 107) Source(91, 28) + SourceIndex(0) +11>Emitted(61, 109) Source(92, 5) + SourceIndex(0) +12>Emitted(61, 121) Source(95, 25) + SourceIndex(0) +13>Emitted(61, 123) Source(92, 5) + SourceIndex(0) +14>Emitted(61, 168) Source(95, 25) + SourceIndex(0) +15>Emitted(61, 170) Source(93, 9) + SourceIndex(0) +16>Emitted(61, 182) Source(93, 34) + SourceIndex(0) +17>Emitted(61, 184) Source(93, 9) + SourceIndex(0) +18>Emitted(61, 232) Source(93, 34) + SourceIndex(0) +19>Emitted(61, 234) Source(94, 9) + SourceIndex(0) +20>Emitted(61, 246) Source(94, 38) + SourceIndex(0) +21>Emitted(61, 248) Source(94, 9) + SourceIndex(0) +22>Emitted(61, 300) Source(94, 38) + SourceIndex(0) +23>Emitted(61, 302) Source(96, 43) + SourceIndex(0) +24>Emitted(61, 303) Source(96, 44) + SourceIndex(0) +25>Emitted(61, 306) Source(96, 47) + SourceIndex(0) +26>Emitted(61, 307) Source(96, 48) + SourceIndex(0) +27>Emitted(61, 309) Source(96, 50) + SourceIndex(0) +28>Emitted(61, 310) Source(96, 51) + SourceIndex(0) +29>Emitted(61, 313) Source(96, 54) + SourceIndex(0) +30>Emitted(61, 314) Source(96, 55) + SourceIndex(0) +31>Emitted(61, 316) Source(96, 57) + SourceIndex(0) +32>Emitted(61, 317) Source(96, 58) + SourceIndex(0) +33>Emitted(61, 319) Source(96, 60) + SourceIndex(0) +34>Emitted(61, 321) Source(96, 62) + SourceIndex(0) +35>Emitted(61, 322) Source(96, 63) + SourceIndex(0) +--- +>>> console.log(nameMA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMA +7 > ) +8 > ; +1 >Emitted(62, 5) Source(97, 5) + SourceIndex(0) +2 >Emitted(62, 12) Source(97, 12) + SourceIndex(0) +3 >Emitted(62, 13) Source(97, 13) + SourceIndex(0) +4 >Emitted(62, 16) Source(97, 16) + SourceIndex(0) +5 >Emitted(62, 17) Source(97, 17) + SourceIndex(0) +6 >Emitted(62, 23) Source(97, 23) + SourceIndex(0) +7 >Emitted(62, 24) Source(97, 24) + SourceIndex(0) +8 >Emitted(62, 25) Source(97, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(63, 1) Source(98, 1) + SourceIndex(0) +2 >Emitted(63, 2) Source(98, 2) + SourceIndex(0) +--- +>>>for (var _29 = robotA[0], numberA3 = _29 === void 0 ? -1 : _29, robotAInfo = robotA.slice(1), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ +1-> + > + > +2 >for +3 > +4 > (let [ +5 > numberA3 = -1 +6 > +7 > numberA3 = -1 +8 > , +9 > ...robotAInfo +10> ] = robotA, +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { +1->Emitted(64, 1) Source(100, 1) + SourceIndex(0) +2 >Emitted(64, 4) Source(100, 4) + SourceIndex(0) +3 >Emitted(64, 5) Source(100, 5) + SourceIndex(0) +4 >Emitted(64, 6) Source(100, 11) + SourceIndex(0) +5 >Emitted(64, 25) Source(100, 24) + SourceIndex(0) +6 >Emitted(64, 27) Source(100, 11) + SourceIndex(0) +7 >Emitted(64, 63) Source(100, 24) + SourceIndex(0) +8 >Emitted(64, 65) Source(100, 26) + SourceIndex(0) +9 >Emitted(64, 93) Source(100, 39) + SourceIndex(0) +10>Emitted(64, 95) Source(100, 51) + SourceIndex(0) +11>Emitted(64, 96) Source(100, 52) + SourceIndex(0) +12>Emitted(64, 99) Source(100, 55) + SourceIndex(0) +13>Emitted(64, 100) Source(100, 56) + SourceIndex(0) +14>Emitted(64, 102) Source(100, 58) + SourceIndex(0) +15>Emitted(64, 103) Source(100, 59) + SourceIndex(0) +16>Emitted(64, 106) Source(100, 62) + SourceIndex(0) +17>Emitted(64, 107) Source(100, 63) + SourceIndex(0) +18>Emitted(64, 109) Source(100, 65) + SourceIndex(0) +19>Emitted(64, 110) Source(100, 66) + SourceIndex(0) +20>Emitted(64, 112) Source(100, 68) + SourceIndex(0) +21>Emitted(64, 114) Source(100, 70) + SourceIndex(0) +22>Emitted(64, 115) Source(100, 71) + SourceIndex(0) +--- +>>> console.log(numberA3); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > numberA3 +7 > ) +8 > ; +1 >Emitted(65, 5) Source(101, 5) + SourceIndex(0) +2 >Emitted(65, 12) Source(101, 12) + SourceIndex(0) +3 >Emitted(65, 13) Source(101, 13) + SourceIndex(0) +4 >Emitted(65, 16) Source(101, 16) + SourceIndex(0) +5 >Emitted(65, 17) Source(101, 17) + SourceIndex(0) +6 >Emitted(65, 25) Source(101, 25) + SourceIndex(0) +7 >Emitted(65, 26) Source(101, 26) + SourceIndex(0) +8 >Emitted(65, 27) Source(101, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(66, 1) Source(102, 1) + SourceIndex(0) +2 >Emitted(66, 2) Source(102, 2) + SourceIndex(0) +--- +>>>for (var _30 = getRobot(), _31 = _30[0], numberA3 = _31 === void 0 ? -1 : _31, robotAInfo = _30.slice(1), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^ +15> ^^^ +16> ^ +17> ^^ +18> ^ +19> ^^^ +20> ^ +21> ^^ +22> ^ +23> ^^ +24> ^^ +25> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > let [numberA3 = -1, ...robotAInfo] = getRobot() +7 > +8 > numberA3 = -1 +9 > +10> numberA3 = -1 +11> , +12> ...robotAInfo +13> ] = getRobot(), +14> i +15> = +16> 0 +17> ; +18> i +19> < +20> 1 +21> ; +22> i +23> ++ +24> ) +25> { +1->Emitted(67, 1) Source(103, 1) + SourceIndex(0) +2 >Emitted(67, 4) Source(103, 4) + SourceIndex(0) +3 >Emitted(67, 5) Source(103, 5) + SourceIndex(0) +4 >Emitted(67, 6) Source(103, 6) + SourceIndex(0) +5 >Emitted(67, 10) Source(103, 6) + SourceIndex(0) +6 >Emitted(67, 26) Source(103, 53) + SourceIndex(0) +7 >Emitted(67, 28) Source(103, 11) + SourceIndex(0) +8 >Emitted(67, 40) Source(103, 24) + SourceIndex(0) +9 >Emitted(67, 42) Source(103, 11) + SourceIndex(0) +10>Emitted(67, 78) Source(103, 24) + SourceIndex(0) +11>Emitted(67, 80) Source(103, 26) + SourceIndex(0) +12>Emitted(67, 105) Source(103, 39) + SourceIndex(0) +13>Emitted(67, 107) Source(103, 55) + SourceIndex(0) +14>Emitted(67, 108) Source(103, 56) + SourceIndex(0) +15>Emitted(67, 111) Source(103, 59) + SourceIndex(0) +16>Emitted(67, 112) Source(103, 60) + SourceIndex(0) +17>Emitted(67, 114) Source(103, 62) + SourceIndex(0) +18>Emitted(67, 115) Source(103, 63) + SourceIndex(0) +19>Emitted(67, 118) Source(103, 66) + SourceIndex(0) +20>Emitted(67, 119) Source(103, 67) + SourceIndex(0) +21>Emitted(67, 121) Source(103, 69) + SourceIndex(0) +22>Emitted(67, 122) Source(103, 70) + SourceIndex(0) +23>Emitted(67, 124) Source(103, 72) + SourceIndex(0) +24>Emitted(67, 126) Source(103, 74) + SourceIndex(0) +25>Emitted(67, 127) Source(103, 75) + SourceIndex(0) +--- +>>> console.log(numberA3); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > numberA3 +7 > ) +8 > ; +1 >Emitted(68, 5) Source(104, 5) + SourceIndex(0) +2 >Emitted(68, 12) Source(104, 12) + SourceIndex(0) +3 >Emitted(68, 13) Source(104, 13) + SourceIndex(0) +4 >Emitted(68, 16) Source(104, 16) + SourceIndex(0) +5 >Emitted(68, 17) Source(104, 17) + SourceIndex(0) +6 >Emitted(68, 25) Source(104, 25) + SourceIndex(0) +7 >Emitted(68, 26) Source(104, 26) + SourceIndex(0) +8 >Emitted(68, 27) Source(104, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(69, 1) Source(105, 1) + SourceIndex(0) +2 >Emitted(69, 2) Source(105, 2) + SourceIndex(0) +--- +>>>for (var _32 = [2, "trimmer", "trimming"], _33 = _32[0], numberA3 = _33 === void 0 ? -1 : _33, robotAInfo = _32.slice(1), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^ +15> ^^^ +16> ^ +17> ^^ +18> ^ +19> ^^^ +20> ^ +21> ^^ +22> ^ +23> ^^ +24> ^^ +25> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > let [numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"] +7 > +8 > numberA3 = -1 +9 > +10> numberA3 = -1 +11> , +12> ...robotAInfo +13> ] = [2, "trimmer", "trimming"], +14> i +15> = +16> 0 +17> ; +18> i +19> < +20> 1 +21> ; +22> i +23> ++ +24> ) +25> { +1->Emitted(70, 1) Source(106, 1) + SourceIndex(0) +2 >Emitted(70, 4) Source(106, 4) + SourceIndex(0) +3 >Emitted(70, 5) Source(106, 5) + SourceIndex(0) +4 >Emitted(70, 6) Source(106, 6) + SourceIndex(0) +5 >Emitted(70, 10) Source(106, 6) + SourceIndex(0) +6 >Emitted(70, 42) Source(106, 69) + SourceIndex(0) +7 >Emitted(70, 44) Source(106, 11) + SourceIndex(0) +8 >Emitted(70, 56) Source(106, 24) + SourceIndex(0) +9 >Emitted(70, 58) Source(106, 11) + SourceIndex(0) +10>Emitted(70, 94) Source(106, 24) + SourceIndex(0) +11>Emitted(70, 96) Source(106, 26) + SourceIndex(0) +12>Emitted(70, 121) Source(106, 39) + SourceIndex(0) +13>Emitted(70, 123) Source(106, 71) + SourceIndex(0) +14>Emitted(70, 124) Source(106, 72) + SourceIndex(0) +15>Emitted(70, 127) Source(106, 75) + SourceIndex(0) +16>Emitted(70, 128) Source(106, 76) + SourceIndex(0) +17>Emitted(70, 130) Source(106, 78) + SourceIndex(0) +18>Emitted(70, 131) Source(106, 79) + SourceIndex(0) +19>Emitted(70, 134) Source(106, 82) + SourceIndex(0) +20>Emitted(70, 135) Source(106, 83) + SourceIndex(0) +21>Emitted(70, 137) Source(106, 85) + SourceIndex(0) +22>Emitted(70, 138) Source(106, 86) + SourceIndex(0) +23>Emitted(70, 140) Source(106, 88) + SourceIndex(0) +24>Emitted(70, 142) Source(106, 90) + SourceIndex(0) +25>Emitted(70, 143) Source(106, 91) + SourceIndex(0) +--- +>>> console.log(numberA3); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > numberA3 +7 > ) +8 > ; +1 >Emitted(71, 5) Source(107, 5) + SourceIndex(0) +2 >Emitted(71, 12) Source(107, 12) + SourceIndex(0) +3 >Emitted(71, 13) Source(107, 13) + SourceIndex(0) +4 >Emitted(71, 16) Source(107, 16) + SourceIndex(0) +5 >Emitted(71, 17) Source(107, 17) + SourceIndex(0) +6 >Emitted(71, 25) Source(107, 25) + SourceIndex(0) +7 >Emitted(71, 26) Source(107, 26) + SourceIndex(0) +8 >Emitted(71, 27) Source(107, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(72, 1) Source(108, 1) + SourceIndex(0) +2 >Emitted(72, 2) Source(108, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.symbols b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.symbols new file mode 100644 index 00000000000..523cde331fc --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.symbols @@ -0,0 +1,367 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 11)) + + log(msg: any): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 1, 8)) +} +type Robot = [number, string, string]; +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 2, 1)) + +type MultiSkilledRobot = [string, string[]]; +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 3, 38)) + +let robotA: Robot = [1, "mower", "mowing"]; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 6, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 2, 1)) + +function getRobot() { +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 6, 43)) + + return robotA; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 6, 3)) +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 11, 3)) +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 3, 38)) + +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 12, 3)) +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 3, 38)) + +function getMultiRobot() { +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 12, 73)) + + return multiRobotA; +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 11, 3)) +} + +for (let [, nameA ="name"] = robotA, i = 0; i < 1; i++) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 17, 11)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 6, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 17, 36)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 17, 36)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 17, 36)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 17, 11)) +} +for (let [, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 20, 11)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 6, 43)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 20, 41)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 20, 41)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 20, 41)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 20, 11)) +} +for (let [, nameA = "name"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 23, 11)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 23, 57)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 23, 57)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 23, 57)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 23, 11)) +} +for (let [, [ + primarySkillA = "primary", +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 26, 13)) + + secondarySkillA = "secondary" +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 27, 30)) + +] = ["none", "none"]] = multiRobotA, i = 0; i < 1; i++) { +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 11, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 29, 36)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 29, 36)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 29, 36)) + + console.log(primarySkillA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 26, 13)) +} +for (let [, [ + primarySkillA = "primary", +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 32, 13)) + + secondarySkillA = "secondary" +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 33, 30)) + +] = ["none", "none"]] = getMultiRobot(), i = 0; i < 1; i++) { +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 12, 73)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 35, 40)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 35, 40)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 35, 40)) + + console.log(primarySkillA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 32, 13)) +} +for (let [, [ + primarySkillA = "primary", +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 38, 13)) + + secondarySkillA = "secondary" +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 39, 30)) + +] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 41, 60)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 41, 60)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 41, 60)) + + console.log(primarySkillA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 38, 13)) +} + +for (let [numberB = -1] = robotA, i = 0; i < 1; i++) { +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 45, 10)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 6, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 45, 33)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 45, 33)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 45, 33)) + + console.log(numberB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 45, 10)) +} +for (let [numberB = -1] = getRobot(), i = 0; i < 1; i++) { +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 48, 10)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 6, 43)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 48, 37)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 48, 37)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 48, 37)) + + console.log(numberB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 48, 10)) +} +for (let [numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 51, 10)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 51, 53)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 51, 53)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 51, 53)) + + console.log(numberB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 51, 10)) +} +for (let [nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 54, 10)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 11, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 54, 40)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 54, 40)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 54, 40)) + + console.log(nameB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 54, 10)) +} +for (let [nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 57, 10)) +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 12, 73)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 57, 44)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 57, 44)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 57, 44)) + + console.log(nameB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 57, 10)) +} +for (let [nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 60, 10)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 60, 64)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 60, 64)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 60, 64)) + + console.log(nameB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 60, 10)) +} + +for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 64, 10)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 64, 24)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 64, 41)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 6, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 64, 70)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 64, 70)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 64, 70)) + + console.log(nameA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 64, 24)) +} +for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 67, 10)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 67, 24)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 67, 41)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 6, 43)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 67, 74)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 67, 74)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 67, 74)) + + console.log(nameA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 67, 24)) +} +for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 70, 10)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 70, 24)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 70, 41)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 70, 90)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 70, 90)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 70, 90)) + + console.log(nameA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 70, 24)) +} +for (let + [nameMA = "noName", +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 74, 5)) + + [ + primarySkillA = "primary", +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 75, 9)) + + secondarySkillA = "secondary" +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 76, 38)) + + ] = ["none", "none"] + ] = multiRobotA, i = 0; i < 1; i++) { +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 11, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 79, 20)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 79, 20)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 79, 20)) + + console.log(nameMA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 74, 5)) +} +for (let [nameMA = "noName", +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 82, 10)) + + [ + primarySkillA = "primary", +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 83, 5)) + + secondarySkillA = "secondary" +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 84, 34)) + + ] = ["none", "none"] +] = getMultiRobot(), i = 0; i < 1; i++) { +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 12, 73)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 87, 21)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 87, 21)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 87, 21)) + + console.log(nameMA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 82, 10)) +} +for (let [nameMA = "noName", +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 90, 10)) + + [ + primarySkillA = "primary", +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 91, 5)) + + secondarySkillA = "secondary" +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 92, 34)) + + ] = ["none", "none"] +] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 95, 41)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 95, 41)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 95, 41)) + + console.log(nameMA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 90, 10)) +} + +for (let [numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 99, 10)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 99, 24)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 6, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 99, 49)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 99, 49)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 99, 49)) + + console.log(numberA3); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 99, 10)) +} +for (let [numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 102, 10)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 102, 24)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 6, 43)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 102, 53)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 102, 53)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 102, 53)) + + console.log(numberA3); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 102, 10)) +} +for (let [numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 105, 10)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 105, 24)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 105, 69)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 105, 69)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 105, 69)) + + console.log(numberA3); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 0, 22)) +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts, 105, 10)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.types b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.types new file mode 100644 index 00000000000..245328296eb --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.types @@ -0,0 +1,599 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts === +declare var console: { +>console : { log(msg: any): void; } + + log(msg: any): void; +>log : (msg: any) => void +>msg : any +} +type Robot = [number, string, string]; +>Robot : [number, string, string] + +type MultiSkilledRobot = [string, string[]]; +>MultiSkilledRobot : [string, string[]] + +let robotA: Robot = [1, "mower", "mowing"]; +>robotA : [number, string, string] +>Robot : [number, string, string] +>[1, "mower", "mowing"] : [number, string, string] +>1 : number +>"mower" : string +>"mowing" : string + +function getRobot() { +>getRobot : () => [number, string, string] + + return robotA; +>robotA : [number, string, string] +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +>multiRobotA : [string, string[]] +>MultiSkilledRobot : [string, string[]] +>["mower", ["mowing", ""]] : [string, string[]] +>"mower" : string +>["mowing", ""] : string[] +>"mowing" : string +>"" : string + +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +>multiRobotB : [string, string[]] +>MultiSkilledRobot : [string, string[]] +>["trimmer", ["trimming", "edging"]] : [string, string[]] +>"trimmer" : string +>["trimming", "edging"] : string[] +>"trimming" : string +>"edging" : string + +function getMultiRobot() { +>getMultiRobot : () => [string, string[]] + + return multiRobotA; +>multiRobotA : [string, string[]] +} + +for (let [, nameA ="name"] = robotA, i = 0; i < 1; i++) { +> : undefined +>nameA : string +>"name" : string +>robotA : [number, string, string] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let [, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { +> : undefined +>nameA : string +>"name" : string +>getRobot() : [number, string, string] +>getRobot : () => [number, string, string] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let [, nameA = "name"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +> : undefined +>nameA : string +>"name" : string +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let [, [ +> : undefined + + primarySkillA = "primary", +>primarySkillA : string +>"primary" : string + + secondarySkillA = "secondary" +>secondarySkillA : string +>"secondary" : string + +] = ["none", "none"]] = multiRobotA, i = 0; i < 1; i++) { +>["none", "none"] : [string, string] +>"none" : string +>"none" : string +>multiRobotA : [string, string[]] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primarySkillA); +>console.log(primarySkillA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primarySkillA : string +} +for (let [, [ +> : undefined + + primarySkillA = "primary", +>primarySkillA : string +>"primary" : string + + secondarySkillA = "secondary" +>secondarySkillA : string +>"secondary" : string + +] = ["none", "none"]] = getMultiRobot(), i = 0; i < 1; i++) { +>["none", "none"] : [string, string] +>"none" : string +>"none" : string +>getMultiRobot() : [string, string[]] +>getMultiRobot : () => [string, string[]] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primarySkillA); +>console.log(primarySkillA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primarySkillA : string +} +for (let [, [ +> : undefined + + primarySkillA = "primary", +>primarySkillA : string +>"primary" : string + + secondarySkillA = "secondary" +>secondarySkillA : string +>"secondary" : string + +] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +>["none", "none"] : [string, string] +>"none" : string +>"none" : string +>["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>"trimmer" : string +>["trimming", "edging"] : [string, string] +>"trimming" : string +>"edging" : string +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primarySkillA); +>console.log(primarySkillA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primarySkillA : string +} + +for (let [numberB = -1] = robotA, i = 0; i < 1; i++) { +>numberB : number +>-1 : number +>1 : number +>robotA : [number, string, string] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(numberB); +>console.log(numberB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberB : number +} +for (let [numberB = -1] = getRobot(), i = 0; i < 1; i++) { +>numberB : number +>-1 : number +>1 : number +>getRobot() : [number, string, string] +>getRobot : () => [number, string, string] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(numberB); +>console.log(numberB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberB : number +} +for (let [numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>numberB : number +>-1 : number +>1 : number +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(numberB); +>console.log(numberB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberB : number +} +for (let [nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { +>nameB : string +>"name" : string +>multiRobotA : [string, string[]] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameB); +>console.log(nameB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameB : string +} +for (let [nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { +>nameB : string +>"name" : string +>getMultiRobot() : [string, string[]] +>getMultiRobot : () => [string, string[]] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameB); +>console.log(nameB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameB : string +} +for (let [nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +>nameB : string +>"name" : string +>["trimmer", ["trimming", "edging"]] : [string, string[]] +>"trimmer" : string +>["trimming", "edging"] : string[] +>"trimming" : string +>"edging" : string +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameB); +>console.log(nameB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameB : string +} + +for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { +>numberA2 : number +>-1 : number +>1 : number +>nameA2 : string +>"name" : string +>skillA2 : string +>"skill" : string +>robotA : [number, string, string] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA2); +>console.log(nameA2) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA2 : string +} +for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { +>numberA2 : number +>-1 : number +>1 : number +>nameA2 : string +>"name" : string +>skillA2 : string +>"skill" : string +>getRobot() : [number, string, string] +>getRobot : () => [number, string, string] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA2); +>console.log(nameA2) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA2 : string +} +for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>numberA2 : number +>-1 : number +>1 : number +>nameA2 : string +>"name" : string +>skillA2 : string +>"skill" : string +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA2); +>console.log(nameA2) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA2 : string +} +for (let + [nameMA = "noName", +>nameMA : string +>"noName" : string + + [ + primarySkillA = "primary", +>primarySkillA : string +>"primary" : string + + secondarySkillA = "secondary" +>secondarySkillA : string +>"secondary" : string + + ] = ["none", "none"] +>["none", "none"] : [string, string] +>"none" : string +>"none" : string + + ] = multiRobotA, i = 0; i < 1; i++) { +>multiRobotA : [string, string[]] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameMA); +>console.log(nameMA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMA : string +} +for (let [nameMA = "noName", +>nameMA : string +>"noName" : string + + [ + primarySkillA = "primary", +>primarySkillA : string +>"primary" : string + + secondarySkillA = "secondary" +>secondarySkillA : string +>"secondary" : string + + ] = ["none", "none"] +>["none", "none"] : [string, string] +>"none" : string +>"none" : string + +] = getMultiRobot(), i = 0; i < 1; i++) { +>getMultiRobot() : [string, string[]] +>getMultiRobot : () => [string, string[]] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameMA); +>console.log(nameMA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMA : string +} +for (let [nameMA = "noName", +>nameMA : string +>"noName" : string + + [ + primarySkillA = "primary", +>primarySkillA : string +>"primary" : string + + secondarySkillA = "secondary" +>secondarySkillA : string +>"secondary" : string + + ] = ["none", "none"] +>["none", "none"] : [string, string] +>"none" : string +>"none" : string + +] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +>["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>"trimmer" : string +>["trimming", "edging"] : [string, string] +>"trimming" : string +>"edging" : string +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameMA); +>console.log(nameMA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMA : string +} + +for (let [numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { +>numberA3 : number +>-1 : number +>1 : number +>robotAInfo : (number | string)[] +>robotA : [number, string, string] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(numberA3); +>console.log(numberA3) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberA3 : number +} +for (let [numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { +>numberA3 : number +>-1 : number +>1 : number +>robotAInfo : (number | string)[] +>getRobot() : [number, string, string] +>getRobot : () => [number, string, string] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(numberA3); +>console.log(numberA3) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberA3 : number +} +for (let [numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>numberA3 : number | string +>-1 : number +>1 : number +>robotAInfo : (number | string)[] +>[2, "trimmer", "trimming"] : (number | string)[] +>2 : number +>"trimmer" : string +>"trimming" : string +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(numberA3); +>console.log(numberA3) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberA3 : number | string +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.js b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.js new file mode 100644 index 00000000000..fb2fa4f81f8 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.js @@ -0,0 +1,196 @@ +//// [sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts] +declare var console: { + log(msg: any): void; +} +type Robot = [number, string, string]; +type MultiSkilledRobot = [string, [string, string]]; + +let robotA: Robot = [1, "mower", "mowing"]; +function getRobot() { + return robotA; +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +function getMultiRobot() { + return multiRobotA; +} + +let nameA: string, primarySkillA: string, secondarySkillA: string; +let numberB: number, nameB: string; +let numberA2: number, nameA2: string, skillA2: string, nameMA: string; +let numberA3: number, robotAInfo: (number | string)[], multiRobotAInfo: (string | [string, string])[]; +let i: number; + +for ([, nameA = "name"] = robotA, i = 0; i < 1; i++) { + console.log(nameA); +} +for ([, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for ([, nameA = "name"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(nameA); +} +for ([, [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["none", "none"]] = multiRobotA, i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for ([, [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["none", "none"]] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for ([, [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(primarySkillA); +} + +for ([numberB = -1] = robotA, i = 0; i < 1; i++) { + console.log(numberB); +} +for ([numberB = -1] = getRobot(), i = 0; i < 1; i++) { + console.log(numberB); +} +for ([numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(numberB); +} +for ([nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { + console.log(nameB); +} +for ([nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(nameB); +} +for ([nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(nameB); +} + +for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { + console.log(nameA2); +} +for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { + console.log(nameA2); +} +for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(nameA2); +} +for (let + [nameMA = "noName", + [ + primarySkillA = "primary", + secondarySkillA = "secondary" + ] = ["none", "none"] + ] = multiRobotA, i = 0; i < 1; i++) { + console.log(nameMA); +} +for ([nameMA = "noName", + [ + primarySkillA = "primary", + secondarySkillA = "secondary" + ] = ["none", "none"] +] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(nameMA); +} +for ([nameMA = "noName", + [ + primarySkillA = "primary", + secondarySkillA = "secondary" + ] = ["none", "none"] +] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(nameMA); +} + +for ([numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + console.log(numberA3); +} +for ([numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + console.log(numberA3); +} +for ([numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(numberA3); +} + +//// [sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.js] +var robotA = [1, "mower", "mowing"]; +function getRobot() { + return robotA; +} +var multiRobotA = ["mower", ["mowing", ""]]; +var multiRobotB = ["trimmer", ["trimming", "edging"]]; +function getMultiRobot() { + return multiRobotA; +} +var nameA, primarySkillA, secondarySkillA; +var numberB, nameB; +var numberA2, nameA2, skillA2, nameMA; +var numberA3, robotAInfo, multiRobotAInfo; +var i; +for ((_a = robotA[1], nameA = _a === void 0 ? "name" : _a, robotA), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_b = getRobot(), _c = _b[1], nameA = _c === void 0 ? "name" : _c, _b), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_d = [2, "trimmer", "trimming"], _e = _d[1], nameA = _e === void 0 ? "name" : _e, _d), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_f = multiRobotA[1], _g = _f === void 0 ? ["none", "none"] : _f, _h = _g[0], primarySkillA = _h === void 0 ? "primary" : _h, _j = _g[1], secondarySkillA = _j === void 0 ? "secondary" : _j, multiRobotA), i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for ((_k = getMultiRobot(), _l = _k[1], _m = _l === void 0 ? ["none", "none"] : _l, _o = _m[0], primarySkillA = _o === void 0 ? "primary" : _o, _p = _m[1], secondarySkillA = _p === void 0 ? "secondary" : _p, _k), i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for ((_q = ["trimmer", ["trimming", "edging"]], _r = _q[1], _s = _r === void 0 ? ["none", "none"] : _r, _t = _s[0], primarySkillA = _t === void 0 ? "primary" : _t, _u = _s[1], secondarySkillA = _u === void 0 ? "secondary" : _u, _q), i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for ((_v = robotA[0], numberB = _v === void 0 ? -1 : _v, robotA), i = 0; i < 1; i++) { + console.log(numberB); +} +for ((_w = getRobot(), _x = _w[0], numberB = _x === void 0 ? -1 : _x, _w), i = 0; i < 1; i++) { + console.log(numberB); +} +for ((_y = [2, "trimmer", "trimming"], _z = _y[0], numberB = _z === void 0 ? -1 : _z, _y), i = 0; i < 1; i++) { + console.log(numberB); +} +for ((_0 = multiRobotA[0], nameB = _0 === void 0 ? "name" : _0, multiRobotA), i = 0; i < 1; i++) { + console.log(nameB); +} +for ((_1 = getMultiRobot(), _2 = _1[0], nameB = _2 === void 0 ? "name" : _2, _1), i = 0; i < 1; i++) { + console.log(nameB); +} +for ((_3 = ["trimmer", ["trimming", "edging"]], _4 = _3[0], nameB = _4 === void 0 ? "name" : _4, _3), i = 0; i < 1; i++) { + console.log(nameB); +} +for ((_5 = robotA[0], numberA2 = _5 === void 0 ? -1 : _5, _6 = robotA[1], nameA2 = _6 === void 0 ? "name" : _6, _7 = robotA[2], skillA2 = _7 === void 0 ? "skill" : _7, robotA), i = 0; i < 1; i++) { + console.log(nameA2); +} +for ((_8 = getRobot(), _9 = _8[0], numberA2 = _9 === void 0 ? -1 : _9, _10 = _8[1], nameA2 = _10 === void 0 ? "name" : _10, _11 = _8[2], skillA2 = _11 === void 0 ? "skill" : _11, _8), i = 0; i < 1; i++) { + console.log(nameA2); +} +for ((_12 = [2, "trimmer", "trimming"], _13 = _12[0], numberA2 = _13 === void 0 ? -1 : _13, _14 = _12[1], nameA2 = _14 === void 0 ? "name" : _14, _15 = _12[2], skillA2 = _15 === void 0 ? "skill" : _15, _12), i = 0; i < 1; i++) { + console.log(nameA2); +} +for (var _16 = multiRobotA[0], nameMA_1 = _16 === void 0 ? "noName" : _16, _17 = multiRobotA[1], _18 = _17 === void 0 ? ["none", "none"] : _17, _19 = _18[0], primarySkillA_1 = _19 === void 0 ? "primary" : _19, _20 = _18[1], secondarySkillA_1 = _20 === void 0 ? "secondary" : _20, i_1 = 0; i_1 < 1; i_1++) { + console.log(nameMA_1); +} +for ((_21 = getMultiRobot(), _22 = _21[0], nameMA = _22 === void 0 ? "noName" : _22, _23 = _21[1], _24 = _23 === void 0 ? ["none", "none"] : _23, _25 = _24[0], primarySkillA = _25 === void 0 ? "primary" : _25, _26 = _24[1], secondarySkillA = _26 === void 0 ? "secondary" : _26, _21), i = 0; i < 1; i++) { + console.log(nameMA); +} +for ((_27 = ["trimmer", ["trimming", "edging"]], _28 = _27[0], nameMA = _28 === void 0 ? "noName" : _28, _29 = _27[1], _30 = _29 === void 0 ? ["none", "none"] : _29, _31 = _30[0], primarySkillA = _31 === void 0 ? "primary" : _31, _32 = _30[1], secondarySkillA = _32 === void 0 ? "secondary" : _32, _27), i = 0; i < 1; i++) { + console.log(nameMA); +} +for ((_33 = robotA[0], numberA3 = _33 === void 0 ? -1 : _33, robotAInfo = robotA.slice(1), robotA), i = 0; i < 1; i++) { + console.log(numberA3); +} +for ((_34 = getRobot(), _35 = _34[0], numberA3 = _35 === void 0 ? -1 : _35, robotAInfo = _34.slice(1), _34), i = 0; i < 1; i++) { + console.log(numberA3); +} +for ((_36 = [2, "trimmer", "trimming"], _37 = _36[0], numberA3 = _37 === void 0 ? -1 : _37, robotAInfo = _36.slice(1), _36), i = 0; i < 1; i++) { + console.log(numberA3); +} +var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37; +//# sourceMappingURL=sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.js.map new file mode 100644 index 00000000000..6446d14319e --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.js.map] +{"version":3,"file":"sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED,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;AACzE;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,IAAI,KAAa,EAAE,aAAqB,EAAE,eAAuB,CAAC;AAClE,IAAI,OAAe,EAAE,KAAa,CAAC;AACnC,IAAI,QAAgB,EAAE,MAAc,EAAE,OAAe,EAAE,MAAc,CAAC;AACtE,IAAI,QAAgB,EAAE,UAA+B,EAAE,eAA8C,CAAC;AACtG,IAAI,CAAS,CAAC;AAEd,GAAG,CAAC,CAAC,CAAG,cAAc,EAAd,mCAAc,EAAI,MAAM,CAAA,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAClD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,eAA+B,EAA5B,UAAc,EAAd,mCAAc,KAAc,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACtD,OAAO,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CAKkC,EALjC,YAAiB,EAAjB,wCAAiB,EACnB,YAGoB,EAHpB,6CAGoB,EAFhB,YAAyB,EAAzB,gDAAyB,EACzB,YAA6B,EAA7B,oDAA6B,MAEE,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACzD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,GAAG,CAAC,CAAC,CAAC,eAAa,EAAb,oCAAa,EAAE,4BAAa,EAAI,MAAM,CAAA,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC9D,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,gBAA2C,EAA1C,YAAa,EAAb,oCAAa,EAAE,yBAAa,MAAc,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAClE,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,gCAAkE,EAAjE,YAAa,EAAb,oCAAa,EAAE,yBAAa,MAAqC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACzF,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.sourcemap.txt new file mode 100644 index 00000000000..bab5f369194 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.sourcemap.txt @@ -0,0 +1,3030 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.js +mapUrl: sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.js.map +sourceRoot: +sources: sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.js +sourceFile:sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts +------------------------------------------------------------------- +>>>var robotA = [1, "mower", "mowing"]; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^^^^ +11> ^ +12> ^ +1 >declare var console: { + > log(msg: any): void; + >} + >type Robot = [number, string, string]; + >type MultiSkilledRobot = [string, [string, string]]; + > + > +2 >let +3 > robotA +4 > : Robot = +5 > [ +6 > 1 +7 > , +8 > "mower" +9 > , +10> "mowing" +11> ] +12> ; +1 >Emitted(1, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(7, 5) + SourceIndex(0) +3 >Emitted(1, 11) Source(7, 11) + SourceIndex(0) +4 >Emitted(1, 14) Source(7, 21) + SourceIndex(0) +5 >Emitted(1, 15) Source(7, 22) + SourceIndex(0) +6 >Emitted(1, 16) Source(7, 23) + SourceIndex(0) +7 >Emitted(1, 18) Source(7, 25) + SourceIndex(0) +8 >Emitted(1, 25) Source(7, 32) + SourceIndex(0) +9 >Emitted(1, 27) Source(7, 34) + SourceIndex(0) +10>Emitted(1, 35) Source(7, 42) + SourceIndex(0) +11>Emitted(1, 36) Source(7, 43) + SourceIndex(0) +12>Emitted(1, 37) Source(7, 44) + SourceIndex(0) +--- +>>>function getRobot() { +1 > +2 >^^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(2, 1) Source(8, 1) + SourceIndex(0) +--- +>>> return robotA; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +1->function getRobot() { + > +2 > return +3 > +4 > robotA +5 > ; +1->Emitted(3, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(3, 11) Source(9, 11) + SourceIndex(0) +3 >Emitted(3, 12) Source(9, 12) + SourceIndex(0) +4 >Emitted(3, 18) Source(9, 18) + SourceIndex(0) +5 >Emitted(3, 19) Source(9, 19) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(4, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(4, 2) Source(10, 2) + SourceIndex(0) +--- +>>>var multiRobotA = ["mower", ["mowing", ""]]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^ +10> ^^ +11> ^^ +12> ^ +13> ^ +14> ^ +15> ^^^^^^^^^^^-> +1-> + > + > +2 >let +3 > multiRobotA +4 > : MultiSkilledRobot = +5 > [ +6 > "mower" +7 > , +8 > [ +9 > "mowing" +10> , +11> "" +12> ] +13> ] +14> ; +1->Emitted(5, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(5, 5) Source(12, 5) + SourceIndex(0) +3 >Emitted(5, 16) Source(12, 16) + SourceIndex(0) +4 >Emitted(5, 19) Source(12, 38) + SourceIndex(0) +5 >Emitted(5, 20) Source(12, 39) + SourceIndex(0) +6 >Emitted(5, 27) Source(12, 46) + SourceIndex(0) +7 >Emitted(5, 29) Source(12, 48) + SourceIndex(0) +8 >Emitted(5, 30) Source(12, 49) + SourceIndex(0) +9 >Emitted(5, 38) Source(12, 57) + SourceIndex(0) +10>Emitted(5, 40) Source(12, 59) + SourceIndex(0) +11>Emitted(5, 42) Source(12, 61) + SourceIndex(0) +12>Emitted(5, 43) Source(12, 62) + SourceIndex(0) +13>Emitted(5, 44) Source(12, 63) + SourceIndex(0) +14>Emitted(5, 45) Source(12, 64) + SourceIndex(0) +--- +>>>var multiRobotB = ["trimmer", ["trimming", "edging"]]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^ +12> ^ +13> ^ +14> ^ +1-> + > +2 >let +3 > multiRobotB +4 > : MultiSkilledRobot = +5 > [ +6 > "trimmer" +7 > , +8 > [ +9 > "trimming" +10> , +11> "edging" +12> ] +13> ] +14> ; +1->Emitted(6, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(6, 5) Source(13, 5) + SourceIndex(0) +3 >Emitted(6, 16) Source(13, 16) + SourceIndex(0) +4 >Emitted(6, 19) Source(13, 38) + SourceIndex(0) +5 >Emitted(6, 20) Source(13, 39) + SourceIndex(0) +6 >Emitted(6, 29) Source(13, 48) + SourceIndex(0) +7 >Emitted(6, 31) Source(13, 50) + SourceIndex(0) +8 >Emitted(6, 32) Source(13, 51) + SourceIndex(0) +9 >Emitted(6, 42) Source(13, 61) + SourceIndex(0) +10>Emitted(6, 44) Source(13, 63) + SourceIndex(0) +11>Emitted(6, 52) Source(13, 71) + SourceIndex(0) +12>Emitted(6, 53) Source(13, 72) + SourceIndex(0) +13>Emitted(6, 54) Source(13, 73) + SourceIndex(0) +14>Emitted(6, 55) Source(13, 74) + SourceIndex(0) +--- +>>>function getMultiRobot() { +1 > +2 >^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(7, 1) Source(14, 1) + SourceIndex(0) +--- +>>> return multiRobotA; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^ +5 > ^ +1->function getMultiRobot() { + > +2 > return +3 > +4 > multiRobotA +5 > ; +1->Emitted(8, 5) Source(15, 5) + SourceIndex(0) +2 >Emitted(8, 11) Source(15, 11) + SourceIndex(0) +3 >Emitted(8, 12) Source(15, 12) + SourceIndex(0) +4 >Emitted(8, 23) Source(15, 23) + SourceIndex(0) +5 >Emitted(8, 24) Source(15, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(9, 1) Source(16, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(16, 2) + SourceIndex(0) +--- +>>>var nameA, primarySkillA, secondarySkillA; +1-> +2 >^^^^ +3 > ^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^ +8 > ^ +1-> + > + > +2 >let +3 > nameA: string +4 > , +5 > primarySkillA: string +6 > , +7 > secondarySkillA: string +8 > ; +1->Emitted(10, 1) Source(18, 1) + SourceIndex(0) +2 >Emitted(10, 5) Source(18, 5) + SourceIndex(0) +3 >Emitted(10, 10) Source(18, 18) + SourceIndex(0) +4 >Emitted(10, 12) Source(18, 20) + SourceIndex(0) +5 >Emitted(10, 25) Source(18, 41) + SourceIndex(0) +6 >Emitted(10, 27) Source(18, 43) + SourceIndex(0) +7 >Emitted(10, 42) Source(18, 66) + SourceIndex(0) +8 >Emitted(10, 43) Source(18, 67) + SourceIndex(0) +--- +>>>var numberB, nameB; +1 > +2 >^^^^ +3 > ^^^^^^^ +4 > ^^ +5 > ^^^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >let +3 > numberB: number +4 > , +5 > nameB: string +6 > ; +1 >Emitted(11, 1) Source(19, 1) + SourceIndex(0) +2 >Emitted(11, 5) Source(19, 5) + SourceIndex(0) +3 >Emitted(11, 12) Source(19, 20) + SourceIndex(0) +4 >Emitted(11, 14) Source(19, 22) + SourceIndex(0) +5 >Emitted(11, 19) Source(19, 35) + SourceIndex(0) +6 >Emitted(11, 20) Source(19, 36) + SourceIndex(0) +--- +>>>var numberA2, nameA2, skillA2, nameMA; +1-> +2 >^^^^ +3 > ^^^^^^^^ +4 > ^^ +5 > ^^^^^^ +6 > ^^ +7 > ^^^^^^^ +8 > ^^ +9 > ^^^^^^ +10> ^ +11> ^^^^^-> +1-> + > +2 >let +3 > numberA2: number +4 > , +5 > nameA2: string +6 > , +7 > skillA2: string +8 > , +9 > nameMA: string +10> ; +1->Emitted(12, 1) Source(20, 1) + SourceIndex(0) +2 >Emitted(12, 5) Source(20, 5) + SourceIndex(0) +3 >Emitted(12, 13) Source(20, 21) + SourceIndex(0) +4 >Emitted(12, 15) Source(20, 23) + SourceIndex(0) +5 >Emitted(12, 21) Source(20, 37) + SourceIndex(0) +6 >Emitted(12, 23) Source(20, 39) + SourceIndex(0) +7 >Emitted(12, 30) Source(20, 54) + SourceIndex(0) +8 >Emitted(12, 32) Source(20, 56) + SourceIndex(0) +9 >Emitted(12, 38) Source(20, 70) + SourceIndex(0) +10>Emitted(12, 39) Source(20, 71) + SourceIndex(0) +--- +>>>var numberA3, robotAInfo, multiRobotAInfo; +1-> +2 >^^^^ +3 > ^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^ +8 > ^ +1-> + > +2 >let +3 > numberA3: number +4 > , +5 > robotAInfo: (number | string)[] +6 > , +7 > multiRobotAInfo: (string | [string, string])[] +8 > ; +1->Emitted(13, 1) Source(21, 1) + SourceIndex(0) +2 >Emitted(13, 5) Source(21, 5) + SourceIndex(0) +3 >Emitted(13, 13) Source(21, 21) + SourceIndex(0) +4 >Emitted(13, 15) Source(21, 23) + SourceIndex(0) +5 >Emitted(13, 25) Source(21, 54) + SourceIndex(0) +6 >Emitted(13, 27) Source(21, 56) + SourceIndex(0) +7 >Emitted(13, 42) Source(21, 102) + SourceIndex(0) +8 >Emitted(13, 43) Source(21, 103) + SourceIndex(0) +--- +>>>var i; +1 > +2 >^^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >let +3 > i: number +4 > ; +1 >Emitted(14, 1) Source(22, 1) + SourceIndex(0) +2 >Emitted(14, 5) Source(22, 5) + SourceIndex(0) +3 >Emitted(14, 6) Source(22, 14) + SourceIndex(0) +4 >Emitted(14, 7) Source(22, 15) + SourceIndex(0) +--- +>>>for ((_a = robotA[1], nameA = _a === void 0 ? "name" : _a, robotA), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > + > +2 >for +3 > +4 > ( +5 > [, +6 > nameA = "name" +7 > +8 > nameA = "name" +9 > ] = +10> robotA +11> +12> , +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(15, 1) Source(24, 1) + SourceIndex(0) +2 >Emitted(15, 4) Source(24, 4) + SourceIndex(0) +3 >Emitted(15, 5) Source(24, 5) + SourceIndex(0) +4 >Emitted(15, 6) Source(24, 6) + SourceIndex(0) +5 >Emitted(15, 7) Source(24, 9) + SourceIndex(0) +6 >Emitted(15, 21) Source(24, 23) + SourceIndex(0) +7 >Emitted(15, 23) Source(24, 9) + SourceIndex(0) +8 >Emitted(15, 58) Source(24, 23) + SourceIndex(0) +9 >Emitted(15, 60) Source(24, 27) + SourceIndex(0) +10>Emitted(15, 66) Source(24, 33) + SourceIndex(0) +11>Emitted(15, 67) Source(24, 33) + SourceIndex(0) +12>Emitted(15, 69) Source(24, 35) + SourceIndex(0) +13>Emitted(15, 70) Source(24, 36) + SourceIndex(0) +14>Emitted(15, 73) Source(24, 39) + SourceIndex(0) +15>Emitted(15, 74) Source(24, 40) + SourceIndex(0) +16>Emitted(15, 76) Source(24, 42) + SourceIndex(0) +17>Emitted(15, 77) Source(24, 43) + SourceIndex(0) +18>Emitted(15, 80) Source(24, 46) + SourceIndex(0) +19>Emitted(15, 81) Source(24, 47) + SourceIndex(0) +20>Emitted(15, 83) Source(24, 49) + SourceIndex(0) +21>Emitted(15, 84) Source(24, 50) + SourceIndex(0) +22>Emitted(15, 86) Source(24, 52) + SourceIndex(0) +23>Emitted(15, 88) Source(24, 54) + SourceIndex(0) +24>Emitted(15, 89) Source(24, 55) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(16, 5) Source(25, 5) + SourceIndex(0) +2 >Emitted(16, 12) Source(25, 12) + SourceIndex(0) +3 >Emitted(16, 13) Source(25, 13) + SourceIndex(0) +4 >Emitted(16, 16) Source(25, 16) + SourceIndex(0) +5 >Emitted(16, 17) Source(25, 17) + SourceIndex(0) +6 >Emitted(16, 22) Source(25, 22) + SourceIndex(0) +7 >Emitted(16, 23) Source(25, 23) + SourceIndex(0) +8 >Emitted(16, 24) Source(25, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(17, 1) Source(26, 1) + SourceIndex(0) +2 >Emitted(17, 2) Source(26, 2) + SourceIndex(0) +--- +>>>for ((_b = getRobot(), _c = _b[1], nameA = _c === void 0 ? "name" : _c, _b), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [, nameA = "name"] = getRobot() +7 > +8 > nameA = "name" +9 > +10> nameA = "name" +11> ] = getRobot() +12> , +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(18, 1) Source(27, 1) + SourceIndex(0) +2 >Emitted(18, 4) Source(27, 4) + SourceIndex(0) +3 >Emitted(18, 5) Source(27, 5) + SourceIndex(0) +4 >Emitted(18, 6) Source(27, 6) + SourceIndex(0) +5 >Emitted(18, 7) Source(27, 6) + SourceIndex(0) +6 >Emitted(18, 22) Source(27, 37) + SourceIndex(0) +7 >Emitted(18, 24) Source(27, 9) + SourceIndex(0) +8 >Emitted(18, 34) Source(27, 23) + SourceIndex(0) +9 >Emitted(18, 36) Source(27, 9) + SourceIndex(0) +10>Emitted(18, 71) Source(27, 23) + SourceIndex(0) +11>Emitted(18, 76) Source(27, 37) + SourceIndex(0) +12>Emitted(18, 78) Source(27, 39) + SourceIndex(0) +13>Emitted(18, 79) Source(27, 40) + SourceIndex(0) +14>Emitted(18, 82) Source(27, 43) + SourceIndex(0) +15>Emitted(18, 83) Source(27, 44) + SourceIndex(0) +16>Emitted(18, 85) Source(27, 46) + SourceIndex(0) +17>Emitted(18, 86) Source(27, 47) + SourceIndex(0) +18>Emitted(18, 89) Source(27, 50) + SourceIndex(0) +19>Emitted(18, 90) Source(27, 51) + SourceIndex(0) +20>Emitted(18, 92) Source(27, 53) + SourceIndex(0) +21>Emitted(18, 93) Source(27, 54) + SourceIndex(0) +22>Emitted(18, 95) Source(27, 56) + SourceIndex(0) +23>Emitted(18, 97) Source(27, 58) + SourceIndex(0) +24>Emitted(18, 98) Source(27, 59) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(19, 5) Source(28, 5) + SourceIndex(0) +2 >Emitted(19, 12) Source(28, 12) + SourceIndex(0) +3 >Emitted(19, 13) Source(28, 13) + SourceIndex(0) +4 >Emitted(19, 16) Source(28, 16) + SourceIndex(0) +5 >Emitted(19, 17) Source(28, 17) + SourceIndex(0) +6 >Emitted(19, 22) Source(28, 22) + SourceIndex(0) +7 >Emitted(19, 23) Source(28, 23) + SourceIndex(0) +8 >Emitted(19, 24) Source(28, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(20, 1) Source(29, 1) + SourceIndex(0) +2 >Emitted(20, 2) Source(29, 2) + SourceIndex(0) +--- +>>>for ((_d = [2, "trimmer", "trimming"], _e = _d[1], nameA = _e === void 0 ? "name" : _e, _d), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [, nameA = "name"] = [2, "trimmer", "trimming"] +7 > +8 > nameA = "name" +9 > +10> nameA = "name" +11> ] = [2, "trimmer", "trimming"] +12> , +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(21, 1) Source(30, 1) + SourceIndex(0) +2 >Emitted(21, 4) Source(30, 4) + SourceIndex(0) +3 >Emitted(21, 5) Source(30, 5) + SourceIndex(0) +4 >Emitted(21, 6) Source(30, 6) + SourceIndex(0) +5 >Emitted(21, 7) Source(30, 6) + SourceIndex(0) +6 >Emitted(21, 38) Source(30, 53) + SourceIndex(0) +7 >Emitted(21, 40) Source(30, 9) + SourceIndex(0) +8 >Emitted(21, 50) Source(30, 23) + SourceIndex(0) +9 >Emitted(21, 52) Source(30, 9) + SourceIndex(0) +10>Emitted(21, 87) Source(30, 23) + SourceIndex(0) +11>Emitted(21, 92) Source(30, 53) + SourceIndex(0) +12>Emitted(21, 94) Source(30, 55) + SourceIndex(0) +13>Emitted(21, 95) Source(30, 56) + SourceIndex(0) +14>Emitted(21, 98) Source(30, 59) + SourceIndex(0) +15>Emitted(21, 99) Source(30, 60) + SourceIndex(0) +16>Emitted(21, 101) Source(30, 62) + SourceIndex(0) +17>Emitted(21, 102) Source(30, 63) + SourceIndex(0) +18>Emitted(21, 105) Source(30, 66) + SourceIndex(0) +19>Emitted(21, 106) Source(30, 67) + SourceIndex(0) +20>Emitted(21, 108) Source(30, 69) + SourceIndex(0) +21>Emitted(21, 109) Source(30, 70) + SourceIndex(0) +22>Emitted(21, 111) Source(30, 72) + SourceIndex(0) +23>Emitted(21, 113) Source(30, 74) + SourceIndex(0) +24>Emitted(21, 114) Source(30, 75) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(22, 5) Source(31, 5) + SourceIndex(0) +2 >Emitted(22, 12) Source(31, 12) + SourceIndex(0) +3 >Emitted(22, 13) Source(31, 13) + SourceIndex(0) +4 >Emitted(22, 16) Source(31, 16) + SourceIndex(0) +5 >Emitted(22, 17) Source(31, 17) + SourceIndex(0) +6 >Emitted(22, 22) Source(31, 22) + SourceIndex(0) +7 >Emitted(22, 23) Source(31, 23) + SourceIndex(0) +8 >Emitted(22, 24) Source(31, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(23, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(23, 2) Source(32, 2) + SourceIndex(0) +--- +>>>for ((_f = multiRobotA[1], _g = _f === void 0 ? ["none", "none"] : _f, _h = _g[0], primarySkillA = _h === void 0 ? "primary" : _h, _j = _g[1], secondarySkillA = _j === void 0 ? "secondary" : _j, multiRobotA), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^ +19> ^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^^ +27> ^ +28> ^^ +29> ^ +30> ^^ +31> ^^ +32> ^ +1-> + > +2 >for +3 > +4 > ( +5 > [, +6 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] +7 > +8 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] +9 > +10> primarySkillA = "primary" +11> +12> primarySkillA = "primary" +13> , + > +14> secondarySkillA = "secondary" +15> +16> secondarySkillA = "secondary" +17> + > ] = ["none", "none"]] = +18> multiRobotA +19> +20> , +21> i +22> = +23> 0 +24> ; +25> i +26> < +27> 1 +28> ; +29> i +30> ++ +31> ) +32> { +1->Emitted(24, 1) Source(33, 1) + SourceIndex(0) +2 >Emitted(24, 4) Source(33, 4) + SourceIndex(0) +3 >Emitted(24, 5) Source(33, 5) + SourceIndex(0) +4 >Emitted(24, 6) Source(33, 6) + SourceIndex(0) +5 >Emitted(24, 7) Source(33, 9) + SourceIndex(0) +6 >Emitted(24, 26) Source(36, 21) + SourceIndex(0) +7 >Emitted(24, 28) Source(33, 9) + SourceIndex(0) +8 >Emitted(24, 70) Source(36, 21) + SourceIndex(0) +9 >Emitted(24, 72) Source(34, 5) + SourceIndex(0) +10>Emitted(24, 82) Source(34, 30) + SourceIndex(0) +11>Emitted(24, 84) Source(34, 5) + SourceIndex(0) +12>Emitted(24, 130) Source(34, 30) + SourceIndex(0) +13>Emitted(24, 132) Source(35, 5) + SourceIndex(0) +14>Emitted(24, 142) Source(35, 34) + SourceIndex(0) +15>Emitted(24, 144) Source(35, 5) + SourceIndex(0) +16>Emitted(24, 194) Source(35, 34) + SourceIndex(0) +17>Emitted(24, 196) Source(36, 25) + SourceIndex(0) +18>Emitted(24, 207) Source(36, 36) + SourceIndex(0) +19>Emitted(24, 208) Source(36, 36) + SourceIndex(0) +20>Emitted(24, 210) Source(36, 38) + SourceIndex(0) +21>Emitted(24, 211) Source(36, 39) + SourceIndex(0) +22>Emitted(24, 214) Source(36, 42) + SourceIndex(0) +23>Emitted(24, 215) Source(36, 43) + SourceIndex(0) +24>Emitted(24, 217) Source(36, 45) + SourceIndex(0) +25>Emitted(24, 218) Source(36, 46) + SourceIndex(0) +26>Emitted(24, 221) Source(36, 49) + SourceIndex(0) +27>Emitted(24, 222) Source(36, 50) + SourceIndex(0) +28>Emitted(24, 224) Source(36, 52) + SourceIndex(0) +29>Emitted(24, 225) Source(36, 53) + SourceIndex(0) +30>Emitted(24, 227) Source(36, 55) + SourceIndex(0) +31>Emitted(24, 229) Source(36, 57) + SourceIndex(0) +32>Emitted(24, 230) Source(36, 58) + SourceIndex(0) +--- +>>> console.log(primarySkillA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primarySkillA +7 > ) +8 > ; +1 >Emitted(25, 5) Source(37, 5) + SourceIndex(0) +2 >Emitted(25, 12) Source(37, 12) + SourceIndex(0) +3 >Emitted(25, 13) Source(37, 13) + SourceIndex(0) +4 >Emitted(25, 16) Source(37, 16) + SourceIndex(0) +5 >Emitted(25, 17) Source(37, 17) + SourceIndex(0) +6 >Emitted(25, 30) Source(37, 30) + SourceIndex(0) +7 >Emitted(25, 31) Source(37, 31) + SourceIndex(0) +8 >Emitted(25, 32) Source(37, 32) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(26, 1) Source(38, 1) + SourceIndex(0) +2 >Emitted(26, 2) Source(38, 2) + SourceIndex(0) +--- +>>>for ((_k = getMultiRobot(), _l = _k[1], _m = _l === void 0 ? ["none", "none"] : _l, _o = _m[0], primarySkillA = _o === void 0 ? "primary" : _o, _p = _m[1], secondarySkillA = _p === void 0 ? "secondary" : _p, _k), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +19> ^^^^^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^^ +27> ^ +28> ^^ +29> ^ +30> ^^ +31> ^^ +32> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [, [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"]] = getMultiRobot() +7 > +8 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] +9 > +10> [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] +11> +12> primarySkillA = "primary" +13> +14> primarySkillA = "primary" +15> , + > +16> secondarySkillA = "secondary" +17> +18> secondarySkillA = "secondary" +19> + > ] = ["none", "none"]] = getMultiRobot() +20> , +21> i +22> = +23> 0 +24> ; +25> i +26> < +27> 1 +28> ; +29> i +30> ++ +31> ) +32> { +1->Emitted(27, 1) Source(39, 1) + SourceIndex(0) +2 >Emitted(27, 4) Source(39, 4) + SourceIndex(0) +3 >Emitted(27, 5) Source(39, 5) + SourceIndex(0) +4 >Emitted(27, 6) Source(39, 6) + SourceIndex(0) +5 >Emitted(27, 7) Source(39, 6) + SourceIndex(0) +6 >Emitted(27, 27) Source(42, 40) + SourceIndex(0) +7 >Emitted(27, 29) Source(39, 9) + SourceIndex(0) +8 >Emitted(27, 39) Source(42, 21) + SourceIndex(0) +9 >Emitted(27, 41) Source(39, 9) + SourceIndex(0) +10>Emitted(27, 83) Source(42, 21) + SourceIndex(0) +11>Emitted(27, 85) Source(40, 5) + SourceIndex(0) +12>Emitted(27, 95) Source(40, 30) + SourceIndex(0) +13>Emitted(27, 97) Source(40, 5) + SourceIndex(0) +14>Emitted(27, 143) Source(40, 30) + SourceIndex(0) +15>Emitted(27, 145) Source(41, 5) + SourceIndex(0) +16>Emitted(27, 155) Source(41, 34) + SourceIndex(0) +17>Emitted(27, 157) Source(41, 5) + SourceIndex(0) +18>Emitted(27, 207) Source(41, 34) + SourceIndex(0) +19>Emitted(27, 212) Source(42, 40) + SourceIndex(0) +20>Emitted(27, 214) Source(42, 42) + SourceIndex(0) +21>Emitted(27, 215) Source(42, 43) + SourceIndex(0) +22>Emitted(27, 218) Source(42, 46) + SourceIndex(0) +23>Emitted(27, 219) Source(42, 47) + SourceIndex(0) +24>Emitted(27, 221) Source(42, 49) + SourceIndex(0) +25>Emitted(27, 222) Source(42, 50) + SourceIndex(0) +26>Emitted(27, 225) Source(42, 53) + SourceIndex(0) +27>Emitted(27, 226) Source(42, 54) + SourceIndex(0) +28>Emitted(27, 228) Source(42, 56) + SourceIndex(0) +29>Emitted(27, 229) Source(42, 57) + SourceIndex(0) +30>Emitted(27, 231) Source(42, 59) + SourceIndex(0) +31>Emitted(27, 233) Source(42, 61) + SourceIndex(0) +32>Emitted(27, 234) Source(42, 62) + SourceIndex(0) +--- +>>> console.log(primarySkillA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primarySkillA +7 > ) +8 > ; +1 >Emitted(28, 5) Source(43, 5) + SourceIndex(0) +2 >Emitted(28, 12) Source(43, 12) + SourceIndex(0) +3 >Emitted(28, 13) Source(43, 13) + SourceIndex(0) +4 >Emitted(28, 16) Source(43, 16) + SourceIndex(0) +5 >Emitted(28, 17) Source(43, 17) + SourceIndex(0) +6 >Emitted(28, 30) Source(43, 30) + SourceIndex(0) +7 >Emitted(28, 31) Source(43, 31) + SourceIndex(0) +8 >Emitted(28, 32) Source(43, 32) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(29, 1) Source(44, 1) + SourceIndex(0) +2 >Emitted(29, 2) Source(44, 2) + SourceIndex(0) +--- +>>>for ((_q = ["trimmer", ["trimming", "edging"]], _r = _q[1], _s = _r === void 0 ? ["none", "none"] : _r, _t = _s[0], primarySkillA = _t === void 0 ? "primary" : _t, _u = _s[1], secondarySkillA = _u === void 0 ? "secondary" : _u, _q), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +19> ^^^^^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^^ +27> ^ +28> ^^ +29> ^ +30> ^^ +31> ^^ +32> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [, [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]] +7 > +8 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] +9 > +10> [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] +11> +12> primarySkillA = "primary" +13> +14> primarySkillA = "primary" +15> , + > +16> secondarySkillA = "secondary" +17> +18> secondarySkillA = "secondary" +19> + > ] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]] +20> , +21> i +22> = +23> 0 +24> ; +25> i +26> < +27> 1 +28> ; +29> i +30> ++ +31> ) +32> { +1->Emitted(30, 1) Source(45, 1) + SourceIndex(0) +2 >Emitted(30, 4) Source(45, 4) + SourceIndex(0) +3 >Emitted(30, 5) Source(45, 5) + SourceIndex(0) +4 >Emitted(30, 6) Source(45, 6) + SourceIndex(0) +5 >Emitted(30, 7) Source(45, 6) + SourceIndex(0) +6 >Emitted(30, 47) Source(48, 60) + SourceIndex(0) +7 >Emitted(30, 49) Source(45, 9) + SourceIndex(0) +8 >Emitted(30, 59) Source(48, 21) + SourceIndex(0) +9 >Emitted(30, 61) Source(45, 9) + SourceIndex(0) +10>Emitted(30, 103) Source(48, 21) + SourceIndex(0) +11>Emitted(30, 105) Source(46, 5) + SourceIndex(0) +12>Emitted(30, 115) Source(46, 30) + SourceIndex(0) +13>Emitted(30, 117) Source(46, 5) + SourceIndex(0) +14>Emitted(30, 163) Source(46, 30) + SourceIndex(0) +15>Emitted(30, 165) Source(47, 5) + SourceIndex(0) +16>Emitted(30, 175) Source(47, 34) + SourceIndex(0) +17>Emitted(30, 177) Source(47, 5) + SourceIndex(0) +18>Emitted(30, 227) Source(47, 34) + SourceIndex(0) +19>Emitted(30, 232) Source(48, 60) + SourceIndex(0) +20>Emitted(30, 234) Source(48, 62) + SourceIndex(0) +21>Emitted(30, 235) Source(48, 63) + SourceIndex(0) +22>Emitted(30, 238) Source(48, 66) + SourceIndex(0) +23>Emitted(30, 239) Source(48, 67) + SourceIndex(0) +24>Emitted(30, 241) Source(48, 69) + SourceIndex(0) +25>Emitted(30, 242) Source(48, 70) + SourceIndex(0) +26>Emitted(30, 245) Source(48, 73) + SourceIndex(0) +27>Emitted(30, 246) Source(48, 74) + SourceIndex(0) +28>Emitted(30, 248) Source(48, 76) + SourceIndex(0) +29>Emitted(30, 249) Source(48, 77) + SourceIndex(0) +30>Emitted(30, 251) Source(48, 79) + SourceIndex(0) +31>Emitted(30, 253) Source(48, 81) + SourceIndex(0) +32>Emitted(30, 254) Source(48, 82) + SourceIndex(0) +--- +>>> console.log(primarySkillA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primarySkillA +7 > ) +8 > ; +1 >Emitted(31, 5) Source(49, 5) + SourceIndex(0) +2 >Emitted(31, 12) Source(49, 12) + SourceIndex(0) +3 >Emitted(31, 13) Source(49, 13) + SourceIndex(0) +4 >Emitted(31, 16) Source(49, 16) + SourceIndex(0) +5 >Emitted(31, 17) Source(49, 17) + SourceIndex(0) +6 >Emitted(31, 30) Source(49, 30) + SourceIndex(0) +7 >Emitted(31, 31) Source(49, 31) + SourceIndex(0) +8 >Emitted(31, 32) Source(49, 32) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(32, 1) Source(50, 1) + SourceIndex(0) +2 >Emitted(32, 2) Source(50, 2) + SourceIndex(0) +--- +>>>for ((_v = robotA[0], numberB = _v === void 0 ? -1 : _v, robotA), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > + > +2 >for +3 > +4 > ( +5 > [ +6 > numberB = -1 +7 > +8 > numberB = -1 +9 > ] = +10> robotA +11> +12> , +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(33, 1) Source(52, 1) + SourceIndex(0) +2 >Emitted(33, 4) Source(52, 4) + SourceIndex(0) +3 >Emitted(33, 5) Source(52, 5) + SourceIndex(0) +4 >Emitted(33, 6) Source(52, 6) + SourceIndex(0) +5 >Emitted(33, 7) Source(52, 7) + SourceIndex(0) +6 >Emitted(33, 21) Source(52, 19) + SourceIndex(0) +7 >Emitted(33, 23) Source(52, 7) + SourceIndex(0) +8 >Emitted(33, 56) Source(52, 19) + SourceIndex(0) +9 >Emitted(33, 58) Source(52, 23) + SourceIndex(0) +10>Emitted(33, 64) Source(52, 29) + SourceIndex(0) +11>Emitted(33, 65) Source(52, 29) + SourceIndex(0) +12>Emitted(33, 67) Source(52, 31) + SourceIndex(0) +13>Emitted(33, 68) Source(52, 32) + SourceIndex(0) +14>Emitted(33, 71) Source(52, 35) + SourceIndex(0) +15>Emitted(33, 72) Source(52, 36) + SourceIndex(0) +16>Emitted(33, 74) Source(52, 38) + SourceIndex(0) +17>Emitted(33, 75) Source(52, 39) + SourceIndex(0) +18>Emitted(33, 78) Source(52, 42) + SourceIndex(0) +19>Emitted(33, 79) Source(52, 43) + SourceIndex(0) +20>Emitted(33, 81) Source(52, 45) + SourceIndex(0) +21>Emitted(33, 82) Source(52, 46) + SourceIndex(0) +22>Emitted(33, 84) Source(52, 48) + SourceIndex(0) +23>Emitted(33, 86) Source(52, 50) + SourceIndex(0) +24>Emitted(33, 87) Source(52, 51) + SourceIndex(0) +--- +>>> console.log(numberB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > numberB +7 > ) +8 > ; +1 >Emitted(34, 5) Source(53, 5) + SourceIndex(0) +2 >Emitted(34, 12) Source(53, 12) + SourceIndex(0) +3 >Emitted(34, 13) Source(53, 13) + SourceIndex(0) +4 >Emitted(34, 16) Source(53, 16) + SourceIndex(0) +5 >Emitted(34, 17) Source(53, 17) + SourceIndex(0) +6 >Emitted(34, 24) Source(53, 24) + SourceIndex(0) +7 >Emitted(34, 25) Source(53, 25) + SourceIndex(0) +8 >Emitted(34, 26) Source(53, 26) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(35, 1) Source(54, 1) + SourceIndex(0) +2 >Emitted(35, 2) Source(54, 2) + SourceIndex(0) +--- +>>>for ((_w = getRobot(), _x = _w[0], numberB = _x === void 0 ? -1 : _x, _w), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [numberB = -1] = getRobot() +7 > +8 > numberB = -1 +9 > +10> numberB = -1 +11> ] = getRobot() +12> , +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(36, 1) Source(55, 1) + SourceIndex(0) +2 >Emitted(36, 4) Source(55, 4) + SourceIndex(0) +3 >Emitted(36, 5) Source(55, 5) + SourceIndex(0) +4 >Emitted(36, 6) Source(55, 6) + SourceIndex(0) +5 >Emitted(36, 7) Source(55, 6) + SourceIndex(0) +6 >Emitted(36, 22) Source(55, 33) + SourceIndex(0) +7 >Emitted(36, 24) Source(55, 7) + SourceIndex(0) +8 >Emitted(36, 34) Source(55, 19) + SourceIndex(0) +9 >Emitted(36, 36) Source(55, 7) + SourceIndex(0) +10>Emitted(36, 69) Source(55, 19) + SourceIndex(0) +11>Emitted(36, 74) Source(55, 33) + SourceIndex(0) +12>Emitted(36, 76) Source(55, 35) + SourceIndex(0) +13>Emitted(36, 77) Source(55, 36) + SourceIndex(0) +14>Emitted(36, 80) Source(55, 39) + SourceIndex(0) +15>Emitted(36, 81) Source(55, 40) + SourceIndex(0) +16>Emitted(36, 83) Source(55, 42) + SourceIndex(0) +17>Emitted(36, 84) Source(55, 43) + SourceIndex(0) +18>Emitted(36, 87) Source(55, 46) + SourceIndex(0) +19>Emitted(36, 88) Source(55, 47) + SourceIndex(0) +20>Emitted(36, 90) Source(55, 49) + SourceIndex(0) +21>Emitted(36, 91) Source(55, 50) + SourceIndex(0) +22>Emitted(36, 93) Source(55, 52) + SourceIndex(0) +23>Emitted(36, 95) Source(55, 54) + SourceIndex(0) +24>Emitted(36, 96) Source(55, 55) + SourceIndex(0) +--- +>>> console.log(numberB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > numberB +7 > ) +8 > ; +1 >Emitted(37, 5) Source(56, 5) + SourceIndex(0) +2 >Emitted(37, 12) Source(56, 12) + SourceIndex(0) +3 >Emitted(37, 13) Source(56, 13) + SourceIndex(0) +4 >Emitted(37, 16) Source(56, 16) + SourceIndex(0) +5 >Emitted(37, 17) Source(56, 17) + SourceIndex(0) +6 >Emitted(37, 24) Source(56, 24) + SourceIndex(0) +7 >Emitted(37, 25) Source(56, 25) + SourceIndex(0) +8 >Emitted(37, 26) Source(56, 26) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(38, 1) Source(57, 1) + SourceIndex(0) +2 >Emitted(38, 2) Source(57, 2) + SourceIndex(0) +--- +>>>for ((_y = [2, "trimmer", "trimming"], _z = _y[0], numberB = _z === void 0 ? -1 : _z, _y), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [numberB = -1] = [2, "trimmer", "trimming"] +7 > +8 > numberB = -1 +9 > +10> numberB = -1 +11> ] = [2, "trimmer", "trimming"] +12> , +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(39, 1) Source(58, 1) + SourceIndex(0) +2 >Emitted(39, 4) Source(58, 4) + SourceIndex(0) +3 >Emitted(39, 5) Source(58, 5) + SourceIndex(0) +4 >Emitted(39, 6) Source(58, 6) + SourceIndex(0) +5 >Emitted(39, 7) Source(58, 6) + SourceIndex(0) +6 >Emitted(39, 38) Source(58, 49) + SourceIndex(0) +7 >Emitted(39, 40) Source(58, 7) + SourceIndex(0) +8 >Emitted(39, 50) Source(58, 19) + SourceIndex(0) +9 >Emitted(39, 52) Source(58, 7) + SourceIndex(0) +10>Emitted(39, 85) Source(58, 19) + SourceIndex(0) +11>Emitted(39, 90) Source(58, 49) + SourceIndex(0) +12>Emitted(39, 92) Source(58, 51) + SourceIndex(0) +13>Emitted(39, 93) Source(58, 52) + SourceIndex(0) +14>Emitted(39, 96) Source(58, 55) + SourceIndex(0) +15>Emitted(39, 97) Source(58, 56) + SourceIndex(0) +16>Emitted(39, 99) Source(58, 58) + SourceIndex(0) +17>Emitted(39, 100) Source(58, 59) + SourceIndex(0) +18>Emitted(39, 103) Source(58, 62) + SourceIndex(0) +19>Emitted(39, 104) Source(58, 63) + SourceIndex(0) +20>Emitted(39, 106) Source(58, 65) + SourceIndex(0) +21>Emitted(39, 107) Source(58, 66) + SourceIndex(0) +22>Emitted(39, 109) Source(58, 68) + SourceIndex(0) +23>Emitted(39, 111) Source(58, 70) + SourceIndex(0) +24>Emitted(39, 112) Source(58, 71) + SourceIndex(0) +--- +>>> console.log(numberB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > numberB +7 > ) +8 > ; +1 >Emitted(40, 5) Source(59, 5) + SourceIndex(0) +2 >Emitted(40, 12) Source(59, 12) + SourceIndex(0) +3 >Emitted(40, 13) Source(59, 13) + SourceIndex(0) +4 >Emitted(40, 16) Source(59, 16) + SourceIndex(0) +5 >Emitted(40, 17) Source(59, 17) + SourceIndex(0) +6 >Emitted(40, 24) Source(59, 24) + SourceIndex(0) +7 >Emitted(40, 25) Source(59, 25) + SourceIndex(0) +8 >Emitted(40, 26) Source(59, 26) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(41, 1) Source(60, 1) + SourceIndex(0) +2 >Emitted(41, 2) Source(60, 2) + SourceIndex(0) +--- +>>>for ((_0 = multiRobotA[0], nameB = _0 === void 0 ? "name" : _0, multiRobotA), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > +2 >for +3 > +4 > ( +5 > [ +6 > nameB = "name" +7 > +8 > nameB = "name" +9 > ] = +10> multiRobotA +11> +12> , +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(42, 1) Source(61, 1) + SourceIndex(0) +2 >Emitted(42, 4) Source(61, 4) + SourceIndex(0) +3 >Emitted(42, 5) Source(61, 5) + SourceIndex(0) +4 >Emitted(42, 6) Source(61, 6) + SourceIndex(0) +5 >Emitted(42, 7) Source(61, 7) + SourceIndex(0) +6 >Emitted(42, 26) Source(61, 21) + SourceIndex(0) +7 >Emitted(42, 28) Source(61, 7) + SourceIndex(0) +8 >Emitted(42, 63) Source(61, 21) + SourceIndex(0) +9 >Emitted(42, 65) Source(61, 25) + SourceIndex(0) +10>Emitted(42, 76) Source(61, 36) + SourceIndex(0) +11>Emitted(42, 77) Source(61, 36) + SourceIndex(0) +12>Emitted(42, 79) Source(61, 38) + SourceIndex(0) +13>Emitted(42, 80) Source(61, 39) + SourceIndex(0) +14>Emitted(42, 83) Source(61, 42) + SourceIndex(0) +15>Emitted(42, 84) Source(61, 43) + SourceIndex(0) +16>Emitted(42, 86) Source(61, 45) + SourceIndex(0) +17>Emitted(42, 87) Source(61, 46) + SourceIndex(0) +18>Emitted(42, 90) Source(61, 49) + SourceIndex(0) +19>Emitted(42, 91) Source(61, 50) + SourceIndex(0) +20>Emitted(42, 93) Source(61, 52) + SourceIndex(0) +21>Emitted(42, 94) Source(61, 53) + SourceIndex(0) +22>Emitted(42, 96) Source(61, 55) + SourceIndex(0) +23>Emitted(42, 98) Source(61, 57) + SourceIndex(0) +24>Emitted(42, 99) Source(61, 58) + SourceIndex(0) +--- +>>> console.log(nameB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameB +7 > ) +8 > ; +1 >Emitted(43, 5) Source(62, 5) + SourceIndex(0) +2 >Emitted(43, 12) Source(62, 12) + SourceIndex(0) +3 >Emitted(43, 13) Source(62, 13) + SourceIndex(0) +4 >Emitted(43, 16) Source(62, 16) + SourceIndex(0) +5 >Emitted(43, 17) Source(62, 17) + SourceIndex(0) +6 >Emitted(43, 22) Source(62, 22) + SourceIndex(0) +7 >Emitted(43, 23) Source(62, 23) + SourceIndex(0) +8 >Emitted(43, 24) Source(62, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(44, 1) Source(63, 1) + SourceIndex(0) +2 >Emitted(44, 2) Source(63, 2) + SourceIndex(0) +--- +>>>for ((_1 = getMultiRobot(), _2 = _1[0], nameB = _2 === void 0 ? "name" : _2, _1), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [nameB = "name"] = getMultiRobot() +7 > +8 > nameB = "name" +9 > +10> nameB = "name" +11> ] = getMultiRobot() +12> , +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(45, 1) Source(64, 1) + SourceIndex(0) +2 >Emitted(45, 4) Source(64, 4) + SourceIndex(0) +3 >Emitted(45, 5) Source(64, 5) + SourceIndex(0) +4 >Emitted(45, 6) Source(64, 6) + SourceIndex(0) +5 >Emitted(45, 7) Source(64, 6) + SourceIndex(0) +6 >Emitted(45, 27) Source(64, 40) + SourceIndex(0) +7 >Emitted(45, 29) Source(64, 7) + SourceIndex(0) +8 >Emitted(45, 39) Source(64, 21) + SourceIndex(0) +9 >Emitted(45, 41) Source(64, 7) + SourceIndex(0) +10>Emitted(45, 76) Source(64, 21) + SourceIndex(0) +11>Emitted(45, 81) Source(64, 40) + SourceIndex(0) +12>Emitted(45, 83) Source(64, 42) + SourceIndex(0) +13>Emitted(45, 84) Source(64, 43) + SourceIndex(0) +14>Emitted(45, 87) Source(64, 46) + SourceIndex(0) +15>Emitted(45, 88) Source(64, 47) + SourceIndex(0) +16>Emitted(45, 90) Source(64, 49) + SourceIndex(0) +17>Emitted(45, 91) Source(64, 50) + SourceIndex(0) +18>Emitted(45, 94) Source(64, 53) + SourceIndex(0) +19>Emitted(45, 95) Source(64, 54) + SourceIndex(0) +20>Emitted(45, 97) Source(64, 56) + SourceIndex(0) +21>Emitted(45, 98) Source(64, 57) + SourceIndex(0) +22>Emitted(45, 100) Source(64, 59) + SourceIndex(0) +23>Emitted(45, 102) Source(64, 61) + SourceIndex(0) +24>Emitted(45, 103) Source(64, 62) + SourceIndex(0) +--- +>>> console.log(nameB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameB +7 > ) +8 > ; +1 >Emitted(46, 5) Source(65, 5) + SourceIndex(0) +2 >Emitted(46, 12) Source(65, 12) + SourceIndex(0) +3 >Emitted(46, 13) Source(65, 13) + SourceIndex(0) +4 >Emitted(46, 16) Source(65, 16) + SourceIndex(0) +5 >Emitted(46, 17) Source(65, 17) + SourceIndex(0) +6 >Emitted(46, 22) Source(65, 22) + SourceIndex(0) +7 >Emitted(46, 23) Source(65, 23) + SourceIndex(0) +8 >Emitted(46, 24) Source(65, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(47, 1) Source(66, 1) + SourceIndex(0) +2 >Emitted(47, 2) Source(66, 2) + SourceIndex(0) +--- +>>>for ((_3 = ["trimmer", ["trimming", "edging"]], _4 = _3[0], nameB = _4 === void 0 ? "name" : _4, _3), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [nameB = "name"] = ["trimmer", ["trimming", "edging"]] +7 > +8 > nameB = "name" +9 > +10> nameB = "name" +11> ] = ["trimmer", ["trimming", "edging"]] +12> , +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(48, 1) Source(67, 1) + SourceIndex(0) +2 >Emitted(48, 4) Source(67, 4) + SourceIndex(0) +3 >Emitted(48, 5) Source(67, 5) + SourceIndex(0) +4 >Emitted(48, 6) Source(67, 6) + SourceIndex(0) +5 >Emitted(48, 7) Source(67, 6) + SourceIndex(0) +6 >Emitted(48, 47) Source(67, 60) + SourceIndex(0) +7 >Emitted(48, 49) Source(67, 7) + SourceIndex(0) +8 >Emitted(48, 59) Source(67, 21) + SourceIndex(0) +9 >Emitted(48, 61) Source(67, 7) + SourceIndex(0) +10>Emitted(48, 96) Source(67, 21) + SourceIndex(0) +11>Emitted(48, 101) Source(67, 60) + SourceIndex(0) +12>Emitted(48, 103) Source(67, 62) + SourceIndex(0) +13>Emitted(48, 104) Source(67, 63) + SourceIndex(0) +14>Emitted(48, 107) Source(67, 66) + SourceIndex(0) +15>Emitted(48, 108) Source(67, 67) + SourceIndex(0) +16>Emitted(48, 110) Source(67, 69) + SourceIndex(0) +17>Emitted(48, 111) Source(67, 70) + SourceIndex(0) +18>Emitted(48, 114) Source(67, 73) + SourceIndex(0) +19>Emitted(48, 115) Source(67, 74) + SourceIndex(0) +20>Emitted(48, 117) Source(67, 76) + SourceIndex(0) +21>Emitted(48, 118) Source(67, 77) + SourceIndex(0) +22>Emitted(48, 120) Source(67, 79) + SourceIndex(0) +23>Emitted(48, 122) Source(67, 81) + SourceIndex(0) +24>Emitted(48, 123) Source(67, 82) + SourceIndex(0) +--- +>>> console.log(nameB); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameB +7 > ) +8 > ; +1 >Emitted(49, 5) Source(68, 5) + SourceIndex(0) +2 >Emitted(49, 12) Source(68, 12) + SourceIndex(0) +3 >Emitted(49, 13) Source(68, 13) + SourceIndex(0) +4 >Emitted(49, 16) Source(68, 16) + SourceIndex(0) +5 >Emitted(49, 17) Source(68, 17) + SourceIndex(0) +6 >Emitted(49, 22) Source(68, 22) + SourceIndex(0) +7 >Emitted(49, 23) Source(68, 23) + SourceIndex(0) +8 >Emitted(49, 24) Source(68, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(50, 1) Source(69, 1) + SourceIndex(0) +2 >Emitted(50, 2) Source(69, 2) + SourceIndex(0) +--- +>>>for ((_5 = robotA[0], numberA2 = _5 === void 0 ? -1 : _5, _6 = robotA[1], nameA2 = _6 === void 0 ? "name" : _6, _7 = robotA[2], skillA2 = _7 === void 0 ? "skill" : _7, robotA), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^ +19> ^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^^ +27> ^ +28> ^^ +29> ^ +30> ^^ +31> ^^ +32> ^ +1-> + > + > +2 >for +3 > +4 > ( +5 > [ +6 > numberA2 = -1 +7 > +8 > numberA2 = -1 +9 > , +10> nameA2 = "name" +11> +12> nameA2 = "name" +13> , +14> skillA2 = "skill" +15> +16> skillA2 = "skill" +17> ] = +18> robotA +19> +20> , +21> i +22> = +23> 0 +24> ; +25> i +26> < +27> 1 +28> ; +29> i +30> ++ +31> ) +32> { +1->Emitted(51, 1) Source(71, 1) + SourceIndex(0) +2 >Emitted(51, 4) Source(71, 4) + SourceIndex(0) +3 >Emitted(51, 5) Source(71, 5) + SourceIndex(0) +4 >Emitted(51, 6) Source(71, 6) + SourceIndex(0) +5 >Emitted(51, 7) Source(71, 7) + SourceIndex(0) +6 >Emitted(51, 21) Source(71, 20) + SourceIndex(0) +7 >Emitted(51, 23) Source(71, 7) + SourceIndex(0) +8 >Emitted(51, 57) Source(71, 20) + SourceIndex(0) +9 >Emitted(51, 59) Source(71, 22) + SourceIndex(0) +10>Emitted(51, 73) Source(71, 37) + SourceIndex(0) +11>Emitted(51, 75) Source(71, 22) + SourceIndex(0) +12>Emitted(51, 111) Source(71, 37) + SourceIndex(0) +13>Emitted(51, 113) Source(71, 39) + SourceIndex(0) +14>Emitted(51, 127) Source(71, 56) + SourceIndex(0) +15>Emitted(51, 129) Source(71, 39) + SourceIndex(0) +16>Emitted(51, 167) Source(71, 56) + SourceIndex(0) +17>Emitted(51, 169) Source(71, 60) + SourceIndex(0) +18>Emitted(51, 175) Source(71, 66) + SourceIndex(0) +19>Emitted(51, 176) Source(71, 66) + SourceIndex(0) +20>Emitted(51, 178) Source(71, 68) + SourceIndex(0) +21>Emitted(51, 179) Source(71, 69) + SourceIndex(0) +22>Emitted(51, 182) Source(71, 72) + SourceIndex(0) +23>Emitted(51, 183) Source(71, 73) + SourceIndex(0) +24>Emitted(51, 185) Source(71, 75) + SourceIndex(0) +25>Emitted(51, 186) Source(71, 76) + SourceIndex(0) +26>Emitted(51, 189) Source(71, 79) + SourceIndex(0) +27>Emitted(51, 190) Source(71, 80) + SourceIndex(0) +28>Emitted(51, 192) Source(71, 82) + SourceIndex(0) +29>Emitted(51, 193) Source(71, 83) + SourceIndex(0) +30>Emitted(51, 195) Source(71, 85) + SourceIndex(0) +31>Emitted(51, 197) Source(71, 87) + SourceIndex(0) +32>Emitted(51, 198) Source(71, 88) + SourceIndex(0) +--- +>>> console.log(nameA2); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA2 +7 > ) +8 > ; +1 >Emitted(52, 5) Source(72, 5) + SourceIndex(0) +2 >Emitted(52, 12) Source(72, 12) + SourceIndex(0) +3 >Emitted(52, 13) Source(72, 13) + SourceIndex(0) +4 >Emitted(52, 16) Source(72, 16) + SourceIndex(0) +5 >Emitted(52, 17) Source(72, 17) + SourceIndex(0) +6 >Emitted(52, 23) Source(72, 23) + SourceIndex(0) +7 >Emitted(52, 24) Source(72, 24) + SourceIndex(0) +8 >Emitted(52, 25) Source(72, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(53, 1) Source(73, 1) + SourceIndex(0) +2 >Emitted(53, 2) Source(73, 2) + SourceIndex(0) +--- +>>>for ((_8 = getRobot(), _9 = _8[0], numberA2 = _9 === void 0 ? -1 : _9, _10 = _8[1], nameA2 = _10 === void 0 ? "name" : _10, _11 = _8[2], skillA2 = _11 === void 0 ? "skill" : _11, _8), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +19> ^^^^^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^^ +27> ^ +28> ^^ +29> ^ +30> ^^ +31> ^^ +32> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot() +7 > +8 > numberA2 = -1 +9 > +10> numberA2 = -1 +11> , +12> nameA2 = "name" +13> +14> nameA2 = "name" +15> , +16> skillA2 = "skill" +17> +18> skillA2 = "skill" +19> ] = getRobot() +20> , +21> i +22> = +23> 0 +24> ; +25> i +26> < +27> 1 +28> ; +29> i +30> ++ +31> ) +32> { +1->Emitted(54, 1) Source(74, 1) + SourceIndex(0) +2 >Emitted(54, 4) Source(74, 4) + SourceIndex(0) +3 >Emitted(54, 5) Source(74, 5) + SourceIndex(0) +4 >Emitted(54, 6) Source(74, 6) + SourceIndex(0) +5 >Emitted(54, 7) Source(74, 6) + SourceIndex(0) +6 >Emitted(54, 22) Source(74, 70) + SourceIndex(0) +7 >Emitted(54, 24) Source(74, 7) + SourceIndex(0) +8 >Emitted(54, 34) Source(74, 20) + SourceIndex(0) +9 >Emitted(54, 36) Source(74, 7) + SourceIndex(0) +10>Emitted(54, 70) Source(74, 20) + SourceIndex(0) +11>Emitted(54, 72) Source(74, 22) + SourceIndex(0) +12>Emitted(54, 83) Source(74, 37) + SourceIndex(0) +13>Emitted(54, 85) Source(74, 22) + SourceIndex(0) +14>Emitted(54, 123) Source(74, 37) + SourceIndex(0) +15>Emitted(54, 125) Source(74, 39) + SourceIndex(0) +16>Emitted(54, 136) Source(74, 56) + SourceIndex(0) +17>Emitted(54, 138) Source(74, 39) + SourceIndex(0) +18>Emitted(54, 178) Source(74, 56) + SourceIndex(0) +19>Emitted(54, 183) Source(74, 70) + SourceIndex(0) +20>Emitted(54, 185) Source(74, 72) + SourceIndex(0) +21>Emitted(54, 186) Source(74, 73) + SourceIndex(0) +22>Emitted(54, 189) Source(74, 76) + SourceIndex(0) +23>Emitted(54, 190) Source(74, 77) + SourceIndex(0) +24>Emitted(54, 192) Source(74, 79) + SourceIndex(0) +25>Emitted(54, 193) Source(74, 80) + SourceIndex(0) +26>Emitted(54, 196) Source(74, 83) + SourceIndex(0) +27>Emitted(54, 197) Source(74, 84) + SourceIndex(0) +28>Emitted(54, 199) Source(74, 86) + SourceIndex(0) +29>Emitted(54, 200) Source(74, 87) + SourceIndex(0) +30>Emitted(54, 202) Source(74, 89) + SourceIndex(0) +31>Emitted(54, 204) Source(74, 91) + SourceIndex(0) +32>Emitted(54, 205) Source(74, 92) + SourceIndex(0) +--- +>>> console.log(nameA2); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA2 +7 > ) +8 > ; +1 >Emitted(55, 5) Source(75, 5) + SourceIndex(0) +2 >Emitted(55, 12) Source(75, 12) + SourceIndex(0) +3 >Emitted(55, 13) Source(75, 13) + SourceIndex(0) +4 >Emitted(55, 16) Source(75, 16) + SourceIndex(0) +5 >Emitted(55, 17) Source(75, 17) + SourceIndex(0) +6 >Emitted(55, 23) Source(75, 23) + SourceIndex(0) +7 >Emitted(55, 24) Source(75, 24) + SourceIndex(0) +8 >Emitted(55, 25) Source(75, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(56, 1) Source(76, 1) + SourceIndex(0) +2 >Emitted(56, 2) Source(76, 2) + SourceIndex(0) +--- +>>>for ((_12 = [2, "trimmer", "trimming"], _13 = _12[0], numberA2 = _13 === void 0 ? -1 : _13, _14 = _12[1], nameA2 = _14 === void 0 ? "name" : _14, _15 = _12[2], skillA2 = _15 === void 0 ? "skill" : _15, _12), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +19> ^^^^^^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^^ +27> ^ +28> ^^ +29> ^ +30> ^^ +31> ^^ +32> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"] +7 > +8 > numberA2 = -1 +9 > +10> numberA2 = -1 +11> , +12> nameA2 = "name" +13> +14> nameA2 = "name" +15> , +16> skillA2 = "skill" +17> +18> skillA2 = "skill" +19> ] = [2, "trimmer", "trimming"] +20> , +21> i +22> = +23> 0 +24> ; +25> i +26> < +27> 1 +28> ; +29> i +30> ++ +31> ) +32> { +1->Emitted(57, 1) Source(77, 1) + SourceIndex(0) +2 >Emitted(57, 4) Source(77, 4) + SourceIndex(0) +3 >Emitted(57, 5) Source(77, 5) + SourceIndex(0) +4 >Emitted(57, 6) Source(77, 6) + SourceIndex(0) +5 >Emitted(57, 7) Source(77, 6) + SourceIndex(0) +6 >Emitted(57, 39) Source(77, 86) + SourceIndex(0) +7 >Emitted(57, 41) Source(77, 7) + SourceIndex(0) +8 >Emitted(57, 53) Source(77, 20) + SourceIndex(0) +9 >Emitted(57, 55) Source(77, 7) + SourceIndex(0) +10>Emitted(57, 91) Source(77, 20) + SourceIndex(0) +11>Emitted(57, 93) Source(77, 22) + SourceIndex(0) +12>Emitted(57, 105) Source(77, 37) + SourceIndex(0) +13>Emitted(57, 107) Source(77, 22) + SourceIndex(0) +14>Emitted(57, 145) Source(77, 37) + SourceIndex(0) +15>Emitted(57, 147) Source(77, 39) + SourceIndex(0) +16>Emitted(57, 159) Source(77, 56) + SourceIndex(0) +17>Emitted(57, 161) Source(77, 39) + SourceIndex(0) +18>Emitted(57, 201) Source(77, 56) + SourceIndex(0) +19>Emitted(57, 207) Source(77, 86) + SourceIndex(0) +20>Emitted(57, 209) Source(77, 88) + SourceIndex(0) +21>Emitted(57, 210) Source(77, 89) + SourceIndex(0) +22>Emitted(57, 213) Source(77, 92) + SourceIndex(0) +23>Emitted(57, 214) Source(77, 93) + SourceIndex(0) +24>Emitted(57, 216) Source(77, 95) + SourceIndex(0) +25>Emitted(57, 217) Source(77, 96) + SourceIndex(0) +26>Emitted(57, 220) Source(77, 99) + SourceIndex(0) +27>Emitted(57, 221) Source(77, 100) + SourceIndex(0) +28>Emitted(57, 223) Source(77, 102) + SourceIndex(0) +29>Emitted(57, 224) Source(77, 103) + SourceIndex(0) +30>Emitted(57, 226) Source(77, 105) + SourceIndex(0) +31>Emitted(57, 228) Source(77, 107) + SourceIndex(0) +32>Emitted(57, 229) Source(77, 108) + SourceIndex(0) +--- +>>> console.log(nameA2); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA2 +7 > ) +8 > ; +1 >Emitted(58, 5) Source(78, 5) + SourceIndex(0) +2 >Emitted(58, 12) Source(78, 12) + SourceIndex(0) +3 >Emitted(58, 13) Source(78, 13) + SourceIndex(0) +4 >Emitted(58, 16) Source(78, 16) + SourceIndex(0) +5 >Emitted(58, 17) Source(78, 17) + SourceIndex(0) +6 >Emitted(58, 23) Source(78, 23) + SourceIndex(0) +7 >Emitted(58, 24) Source(78, 24) + SourceIndex(0) +8 >Emitted(58, 25) Source(78, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(59, 1) Source(79, 1) + SourceIndex(0) +2 >Emitted(59, 2) Source(79, 2) + SourceIndex(0) +--- +>>>for (var _16 = multiRobotA[0], nameMA_1 = _16 === void 0 ? "noName" : _16, _17 = multiRobotA[1], _18 = _17 === void 0 ? ["none", "none"] : _17, _19 = _18[0], primarySkillA_1 = _19 === void 0 ? "primary" : _19, _20 = _18[1], secondarySkillA_1 = _20 === void 0 ? "secondary" : _20, i_1 = 0; i_1 < 1; i_1++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^^^^^^^^ +14> ^^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +16> ^^ +17> ^^^^^^^^^^^^ +18> ^^ +19> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +20> ^^ +21> ^^^ +22> ^^^ +23> ^ +24> ^^ +25> ^^^ +26> ^^^ +27> ^ +28> ^^ +29> ^^^ +30> ^^ +31> ^^ +32> ^ +1-> + > +2 >for +3 > +4 > (let + > [ +5 > nameMA = "noName" +6 > +7 > nameMA = "noName" +8 > , + > +9 > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] +10> +11> [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] +12> +13> primarySkillA = "primary" +14> +15> primarySkillA = "primary" +16> , + > +17> secondarySkillA = "secondary" +18> +19> secondarySkillA = "secondary" +20> + > ] = ["none", "none"] + > ] = multiRobotA, +21> i +22> = +23> 0 +24> ; +25> i +26> < +27> 1 +28> ; +29> i +30> ++ +31> ) +32> { +1->Emitted(60, 1) Source(80, 1) + SourceIndex(0) +2 >Emitted(60, 4) Source(80, 4) + SourceIndex(0) +3 >Emitted(60, 5) Source(80, 5) + SourceIndex(0) +4 >Emitted(60, 6) Source(81, 6) + SourceIndex(0) +5 >Emitted(60, 30) Source(81, 23) + SourceIndex(0) +6 >Emitted(60, 32) Source(81, 6) + SourceIndex(0) +7 >Emitted(60, 74) Source(81, 23) + SourceIndex(0) +8 >Emitted(60, 76) Source(82, 9) + SourceIndex(0) +9 >Emitted(60, 96) Source(85, 29) + SourceIndex(0) +10>Emitted(60, 98) Source(82, 9) + SourceIndex(0) +11>Emitted(60, 143) Source(85, 29) + SourceIndex(0) +12>Emitted(60, 145) Source(83, 13) + SourceIndex(0) +13>Emitted(60, 157) Source(83, 38) + SourceIndex(0) +14>Emitted(60, 159) Source(83, 13) + SourceIndex(0) +15>Emitted(60, 209) Source(83, 38) + SourceIndex(0) +16>Emitted(60, 211) Source(84, 13) + SourceIndex(0) +17>Emitted(60, 223) Source(84, 42) + SourceIndex(0) +18>Emitted(60, 225) Source(84, 13) + SourceIndex(0) +19>Emitted(60, 279) Source(84, 42) + SourceIndex(0) +20>Emitted(60, 281) Source(86, 22) + SourceIndex(0) +21>Emitted(60, 284) Source(86, 23) + SourceIndex(0) +22>Emitted(60, 287) Source(86, 26) + SourceIndex(0) +23>Emitted(60, 288) Source(86, 27) + SourceIndex(0) +24>Emitted(60, 290) Source(86, 29) + SourceIndex(0) +25>Emitted(60, 293) Source(86, 30) + SourceIndex(0) +26>Emitted(60, 296) Source(86, 33) + SourceIndex(0) +27>Emitted(60, 297) Source(86, 34) + SourceIndex(0) +28>Emitted(60, 299) Source(86, 36) + SourceIndex(0) +29>Emitted(60, 302) Source(86, 37) + SourceIndex(0) +30>Emitted(60, 304) Source(86, 39) + SourceIndex(0) +31>Emitted(60, 306) Source(86, 41) + SourceIndex(0) +32>Emitted(60, 307) Source(86, 42) + SourceIndex(0) +--- +>>> console.log(nameMA_1); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMA +7 > ) +8 > ; +1 >Emitted(61, 5) Source(87, 5) + SourceIndex(0) +2 >Emitted(61, 12) Source(87, 12) + SourceIndex(0) +3 >Emitted(61, 13) Source(87, 13) + SourceIndex(0) +4 >Emitted(61, 16) Source(87, 16) + SourceIndex(0) +5 >Emitted(61, 17) Source(87, 17) + SourceIndex(0) +6 >Emitted(61, 25) Source(87, 23) + SourceIndex(0) +7 >Emitted(61, 26) Source(87, 24) + SourceIndex(0) +8 >Emitted(61, 27) Source(87, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(62, 1) Source(88, 1) + SourceIndex(0) +2 >Emitted(62, 2) Source(88, 2) + SourceIndex(0) +--- +>>>for ((_21 = getMultiRobot(), _22 = _21[0], nameMA = _22 === void 0 ? "noName" : _22, _23 = _21[1], _24 = _23 === void 0 ? ["none", "none"] : _23, _25 = _24[0], primarySkillA = _25 === void 0 ? "primary" : _25, _26 = _24[1], secondarySkillA = _26 === void 0 ? "secondary" : _26, _21), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +19> ^^ +20> ^^^^^^^^^^^^ +21> ^^ +22> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +23> ^^^^^^ +24> ^^ +25> ^ +26> ^^^ +27> ^ +28> ^^ +29> ^ +30> ^^^ +31> ^ +32> ^^ +33> ^ +34> ^^ +35> ^^ +36> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [nameMA = "noName", + > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] + > ] = getMultiRobot() +7 > +8 > nameMA = "noName" +9 > +10> nameMA = "noName" +11> , + > +12> [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] +13> +14> [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] +15> +16> primarySkillA = "primary" +17> +18> primarySkillA = "primary" +19> , + > +20> secondarySkillA = "secondary" +21> +22> secondarySkillA = "secondary" +23> + > ] = ["none", "none"] + > ] = getMultiRobot() +24> , +25> i +26> = +27> 0 +28> ; +29> i +30> < +31> 1 +32> ; +33> i +34> ++ +35> ) +36> { +1->Emitted(63, 1) Source(89, 1) + SourceIndex(0) +2 >Emitted(63, 4) Source(89, 4) + SourceIndex(0) +3 >Emitted(63, 5) Source(89, 5) + SourceIndex(0) +4 >Emitted(63, 6) Source(89, 6) + SourceIndex(0) +5 >Emitted(63, 7) Source(89, 6) + SourceIndex(0) +6 >Emitted(63, 28) Source(94, 20) + SourceIndex(0) +7 >Emitted(63, 30) Source(89, 7) + SourceIndex(0) +8 >Emitted(63, 42) Source(89, 24) + SourceIndex(0) +9 >Emitted(63, 44) Source(89, 7) + SourceIndex(0) +10>Emitted(63, 84) Source(89, 24) + SourceIndex(0) +11>Emitted(63, 86) Source(90, 5) + SourceIndex(0) +12>Emitted(63, 98) Source(93, 25) + SourceIndex(0) +13>Emitted(63, 100) Source(90, 5) + SourceIndex(0) +14>Emitted(63, 145) Source(93, 25) + SourceIndex(0) +15>Emitted(63, 147) Source(91, 9) + SourceIndex(0) +16>Emitted(63, 159) Source(91, 34) + SourceIndex(0) +17>Emitted(63, 161) Source(91, 9) + SourceIndex(0) +18>Emitted(63, 209) Source(91, 34) + SourceIndex(0) +19>Emitted(63, 211) Source(92, 9) + SourceIndex(0) +20>Emitted(63, 223) Source(92, 38) + SourceIndex(0) +21>Emitted(63, 225) Source(92, 9) + SourceIndex(0) +22>Emitted(63, 277) Source(92, 38) + SourceIndex(0) +23>Emitted(63, 283) Source(94, 20) + SourceIndex(0) +24>Emitted(63, 285) Source(94, 22) + SourceIndex(0) +25>Emitted(63, 286) Source(94, 23) + SourceIndex(0) +26>Emitted(63, 289) Source(94, 26) + SourceIndex(0) +27>Emitted(63, 290) Source(94, 27) + SourceIndex(0) +28>Emitted(63, 292) Source(94, 29) + SourceIndex(0) +29>Emitted(63, 293) Source(94, 30) + SourceIndex(0) +30>Emitted(63, 296) Source(94, 33) + SourceIndex(0) +31>Emitted(63, 297) Source(94, 34) + SourceIndex(0) +32>Emitted(63, 299) Source(94, 36) + SourceIndex(0) +33>Emitted(63, 300) Source(94, 37) + SourceIndex(0) +34>Emitted(63, 302) Source(94, 39) + SourceIndex(0) +35>Emitted(63, 304) Source(94, 41) + SourceIndex(0) +36>Emitted(63, 305) Source(94, 42) + SourceIndex(0) +--- +>>> console.log(nameMA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMA +7 > ) +8 > ; +1 >Emitted(64, 5) Source(95, 5) + SourceIndex(0) +2 >Emitted(64, 12) Source(95, 12) + SourceIndex(0) +3 >Emitted(64, 13) Source(95, 13) + SourceIndex(0) +4 >Emitted(64, 16) Source(95, 16) + SourceIndex(0) +5 >Emitted(64, 17) Source(95, 17) + SourceIndex(0) +6 >Emitted(64, 23) Source(95, 23) + SourceIndex(0) +7 >Emitted(64, 24) Source(95, 24) + SourceIndex(0) +8 >Emitted(64, 25) Source(95, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(65, 1) Source(96, 1) + SourceIndex(0) +2 >Emitted(65, 2) Source(96, 2) + SourceIndex(0) +--- +>>>for ((_27 = ["trimmer", ["trimming", "edging"]], _28 = _27[0], nameMA = _28 === void 0 ? "noName" : _28, _29 = _27[1], _30 = _29 === void 0 ? ["none", "none"] : _29, _31 = _30[0], primarySkillA = _31 === void 0 ? "primary" : _31, _32 = _30[1], secondarySkillA = _32 === void 0 ? "secondary" : _32, _27), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +19> ^^ +20> ^^^^^^^^^^^^ +21> ^^ +22> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +23> ^^^^^^ +24> ^^ +25> ^ +26> ^^^ +27> ^ +28> ^^ +29> ^ +30> ^^^ +31> ^ +32> ^^ +33> ^ +34> ^^ +35> ^^ +36> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [nameMA = "noName", + > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] + > ] = ["trimmer", ["trimming", "edging"]] +7 > +8 > nameMA = "noName" +9 > +10> nameMA = "noName" +11> , + > +12> [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] +13> +14> [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] +15> +16> primarySkillA = "primary" +17> +18> primarySkillA = "primary" +19> , + > +20> secondarySkillA = "secondary" +21> +22> secondarySkillA = "secondary" +23> + > ] = ["none", "none"] + > ] = ["trimmer", ["trimming", "edging"]] +24> , +25> i +26> = +27> 0 +28> ; +29> i +30> < +31> 1 +32> ; +33> i +34> ++ +35> ) +36> { +1->Emitted(66, 1) Source(97, 1) + SourceIndex(0) +2 >Emitted(66, 4) Source(97, 4) + SourceIndex(0) +3 >Emitted(66, 5) Source(97, 5) + SourceIndex(0) +4 >Emitted(66, 6) Source(97, 6) + SourceIndex(0) +5 >Emitted(66, 7) Source(97, 6) + SourceIndex(0) +6 >Emitted(66, 48) Source(102, 40) + SourceIndex(0) +7 >Emitted(66, 50) Source(97, 7) + SourceIndex(0) +8 >Emitted(66, 62) Source(97, 24) + SourceIndex(0) +9 >Emitted(66, 64) Source(97, 7) + SourceIndex(0) +10>Emitted(66, 104) Source(97, 24) + SourceIndex(0) +11>Emitted(66, 106) Source(98, 5) + SourceIndex(0) +12>Emitted(66, 118) Source(101, 25) + SourceIndex(0) +13>Emitted(66, 120) Source(98, 5) + SourceIndex(0) +14>Emitted(66, 165) Source(101, 25) + SourceIndex(0) +15>Emitted(66, 167) Source(99, 9) + SourceIndex(0) +16>Emitted(66, 179) Source(99, 34) + SourceIndex(0) +17>Emitted(66, 181) Source(99, 9) + SourceIndex(0) +18>Emitted(66, 229) Source(99, 34) + SourceIndex(0) +19>Emitted(66, 231) Source(100, 9) + SourceIndex(0) +20>Emitted(66, 243) Source(100, 38) + SourceIndex(0) +21>Emitted(66, 245) Source(100, 9) + SourceIndex(0) +22>Emitted(66, 297) Source(100, 38) + SourceIndex(0) +23>Emitted(66, 303) Source(102, 40) + SourceIndex(0) +24>Emitted(66, 305) Source(102, 42) + SourceIndex(0) +25>Emitted(66, 306) Source(102, 43) + SourceIndex(0) +26>Emitted(66, 309) Source(102, 46) + SourceIndex(0) +27>Emitted(66, 310) Source(102, 47) + SourceIndex(0) +28>Emitted(66, 312) Source(102, 49) + SourceIndex(0) +29>Emitted(66, 313) Source(102, 50) + SourceIndex(0) +30>Emitted(66, 316) Source(102, 53) + SourceIndex(0) +31>Emitted(66, 317) Source(102, 54) + SourceIndex(0) +32>Emitted(66, 319) Source(102, 56) + SourceIndex(0) +33>Emitted(66, 320) Source(102, 57) + SourceIndex(0) +34>Emitted(66, 322) Source(102, 59) + SourceIndex(0) +35>Emitted(66, 324) Source(102, 61) + SourceIndex(0) +36>Emitted(66, 325) Source(102, 62) + SourceIndex(0) +--- +>>> console.log(nameMA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameMA +7 > ) +8 > ; +1 >Emitted(67, 5) Source(103, 5) + SourceIndex(0) +2 >Emitted(67, 12) Source(103, 12) + SourceIndex(0) +3 >Emitted(67, 13) Source(103, 13) + SourceIndex(0) +4 >Emitted(67, 16) Source(103, 16) + SourceIndex(0) +5 >Emitted(67, 17) Source(103, 17) + SourceIndex(0) +6 >Emitted(67, 23) Source(103, 23) + SourceIndex(0) +7 >Emitted(67, 24) Source(103, 24) + SourceIndex(0) +8 >Emitted(67, 25) Source(103, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(68, 1) Source(104, 1) + SourceIndex(0) +2 >Emitted(68, 2) Source(104, 2) + SourceIndex(0) +--- +>>>for ((_33 = robotA[0], numberA3 = _33 === void 0 ? -1 : _33, robotAInfo = robotA.slice(1), robotA), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^^ +21> ^ +22> ^^ +23> ^ +24> ^^ +25> ^^ +26> ^ +1-> + > + > +2 >for +3 > +4 > ( +5 > [ +6 > numberA3 = -1 +7 > +8 > numberA3 = -1 +9 > , +10> ...robotAInfo +11> ] = +12> robotA +13> +14> , +15> i +16> = +17> 0 +18> ; +19> i +20> < +21> 1 +22> ; +23> i +24> ++ +25> ) +26> { +1->Emitted(69, 1) Source(106, 1) + SourceIndex(0) +2 >Emitted(69, 4) Source(106, 4) + SourceIndex(0) +3 >Emitted(69, 5) Source(106, 5) + SourceIndex(0) +4 >Emitted(69, 6) Source(106, 6) + SourceIndex(0) +5 >Emitted(69, 7) Source(106, 7) + SourceIndex(0) +6 >Emitted(69, 22) Source(106, 20) + SourceIndex(0) +7 >Emitted(69, 24) Source(106, 7) + SourceIndex(0) +8 >Emitted(69, 60) Source(106, 20) + SourceIndex(0) +9 >Emitted(69, 62) Source(106, 22) + SourceIndex(0) +10>Emitted(69, 90) Source(106, 35) + SourceIndex(0) +11>Emitted(69, 92) Source(106, 39) + SourceIndex(0) +12>Emitted(69, 98) Source(106, 45) + SourceIndex(0) +13>Emitted(69, 99) Source(106, 45) + SourceIndex(0) +14>Emitted(69, 101) Source(106, 47) + SourceIndex(0) +15>Emitted(69, 102) Source(106, 48) + SourceIndex(0) +16>Emitted(69, 105) Source(106, 51) + SourceIndex(0) +17>Emitted(69, 106) Source(106, 52) + SourceIndex(0) +18>Emitted(69, 108) Source(106, 54) + SourceIndex(0) +19>Emitted(69, 109) Source(106, 55) + SourceIndex(0) +20>Emitted(69, 112) Source(106, 58) + SourceIndex(0) +21>Emitted(69, 113) Source(106, 59) + SourceIndex(0) +22>Emitted(69, 115) Source(106, 61) + SourceIndex(0) +23>Emitted(69, 116) Source(106, 62) + SourceIndex(0) +24>Emitted(69, 118) Source(106, 64) + SourceIndex(0) +25>Emitted(69, 120) Source(106, 66) + SourceIndex(0) +26>Emitted(69, 121) Source(106, 67) + SourceIndex(0) +--- +>>> console.log(numberA3); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > numberA3 +7 > ) +8 > ; +1 >Emitted(70, 5) Source(107, 5) + SourceIndex(0) +2 >Emitted(70, 12) Source(107, 12) + SourceIndex(0) +3 >Emitted(70, 13) Source(107, 13) + SourceIndex(0) +4 >Emitted(70, 16) Source(107, 16) + SourceIndex(0) +5 >Emitted(70, 17) Source(107, 17) + SourceIndex(0) +6 >Emitted(70, 25) Source(107, 25) + SourceIndex(0) +7 >Emitted(70, 26) Source(107, 26) + SourceIndex(0) +8 >Emitted(70, 27) Source(107, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(71, 1) Source(108, 1) + SourceIndex(0) +2 >Emitted(71, 2) Source(108, 2) + SourceIndex(0) +--- +>>>for ((_34 = getRobot(), _35 = _34[0], numberA3 = _35 === void 0 ? -1 : _35, robotAInfo = _34.slice(1), _34), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^^^^^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^^ +21> ^ +22> ^^ +23> ^ +24> ^^ +25> ^^ +26> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [numberA3 = -1, ...robotAInfo] = getRobot() +7 > +8 > numberA3 = -1 +9 > +10> numberA3 = -1 +11> , +12> ...robotAInfo +13> ] = getRobot() +14> , +15> i +16> = +17> 0 +18> ; +19> i +20> < +21> 1 +22> ; +23> i +24> ++ +25> ) +26> { +1->Emitted(72, 1) Source(109, 1) + SourceIndex(0) +2 >Emitted(72, 4) Source(109, 4) + SourceIndex(0) +3 >Emitted(72, 5) Source(109, 5) + SourceIndex(0) +4 >Emitted(72, 6) Source(109, 6) + SourceIndex(0) +5 >Emitted(72, 7) Source(109, 6) + SourceIndex(0) +6 >Emitted(72, 23) Source(109, 49) + SourceIndex(0) +7 >Emitted(72, 25) Source(109, 7) + SourceIndex(0) +8 >Emitted(72, 37) Source(109, 20) + SourceIndex(0) +9 >Emitted(72, 39) Source(109, 7) + SourceIndex(0) +10>Emitted(72, 75) Source(109, 20) + SourceIndex(0) +11>Emitted(72, 77) Source(109, 22) + SourceIndex(0) +12>Emitted(72, 102) Source(109, 35) + SourceIndex(0) +13>Emitted(72, 108) Source(109, 49) + SourceIndex(0) +14>Emitted(72, 110) Source(109, 51) + SourceIndex(0) +15>Emitted(72, 111) Source(109, 52) + SourceIndex(0) +16>Emitted(72, 114) Source(109, 55) + SourceIndex(0) +17>Emitted(72, 115) Source(109, 56) + SourceIndex(0) +18>Emitted(72, 117) Source(109, 58) + SourceIndex(0) +19>Emitted(72, 118) Source(109, 59) + SourceIndex(0) +20>Emitted(72, 121) Source(109, 62) + SourceIndex(0) +21>Emitted(72, 122) Source(109, 63) + SourceIndex(0) +22>Emitted(72, 124) Source(109, 65) + SourceIndex(0) +23>Emitted(72, 125) Source(109, 66) + SourceIndex(0) +24>Emitted(72, 127) Source(109, 68) + SourceIndex(0) +25>Emitted(72, 129) Source(109, 70) + SourceIndex(0) +26>Emitted(72, 130) Source(109, 71) + SourceIndex(0) +--- +>>> console.log(numberA3); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > numberA3 +7 > ) +8 > ; +1 >Emitted(73, 5) Source(110, 5) + SourceIndex(0) +2 >Emitted(73, 12) Source(110, 12) + SourceIndex(0) +3 >Emitted(73, 13) Source(110, 13) + SourceIndex(0) +4 >Emitted(73, 16) Source(110, 16) + SourceIndex(0) +5 >Emitted(73, 17) Source(110, 17) + SourceIndex(0) +6 >Emitted(73, 25) Source(110, 25) + SourceIndex(0) +7 >Emitted(73, 26) Source(110, 26) + SourceIndex(0) +8 >Emitted(73, 27) Source(110, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(74, 1) Source(111, 1) + SourceIndex(0) +2 >Emitted(74, 2) Source(111, 2) + SourceIndex(0) +--- +>>>for ((_36 = [2, "trimmer", "trimming"], _37 = _36[0], numberA3 = _37 === void 0 ? -1 : _37, robotAInfo = _36.slice(1), _36), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^^^^^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^^ +21> ^ +22> ^^ +23> ^ +24> ^^ +25> ^^ +26> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > [numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"] +7 > +8 > numberA3 = -1 +9 > +10> numberA3 = -1 +11> , +12> ...robotAInfo +13> ] = [2, "trimmer", "trimming"] +14> , +15> i +16> = +17> 0 +18> ; +19> i +20> < +21> 1 +22> ; +23> i +24> ++ +25> ) +26> { +1->Emitted(75, 1) Source(112, 1) + SourceIndex(0) +2 >Emitted(75, 4) Source(112, 4) + SourceIndex(0) +3 >Emitted(75, 5) Source(112, 5) + SourceIndex(0) +4 >Emitted(75, 6) Source(112, 6) + SourceIndex(0) +5 >Emitted(75, 7) Source(112, 6) + SourceIndex(0) +6 >Emitted(75, 39) Source(112, 72) + SourceIndex(0) +7 >Emitted(75, 41) Source(112, 7) + SourceIndex(0) +8 >Emitted(75, 53) Source(112, 20) + SourceIndex(0) +9 >Emitted(75, 55) Source(112, 7) + SourceIndex(0) +10>Emitted(75, 91) Source(112, 20) + SourceIndex(0) +11>Emitted(75, 93) Source(112, 22) + SourceIndex(0) +12>Emitted(75, 118) Source(112, 35) + SourceIndex(0) +13>Emitted(75, 124) Source(112, 72) + SourceIndex(0) +14>Emitted(75, 126) Source(112, 74) + SourceIndex(0) +15>Emitted(75, 127) Source(112, 75) + SourceIndex(0) +16>Emitted(75, 130) Source(112, 78) + SourceIndex(0) +17>Emitted(75, 131) Source(112, 79) + SourceIndex(0) +18>Emitted(75, 133) Source(112, 81) + SourceIndex(0) +19>Emitted(75, 134) Source(112, 82) + SourceIndex(0) +20>Emitted(75, 137) Source(112, 85) + SourceIndex(0) +21>Emitted(75, 138) Source(112, 86) + SourceIndex(0) +22>Emitted(75, 140) Source(112, 88) + SourceIndex(0) +23>Emitted(75, 141) Source(112, 89) + SourceIndex(0) +24>Emitted(75, 143) Source(112, 91) + SourceIndex(0) +25>Emitted(75, 145) Source(112, 93) + SourceIndex(0) +26>Emitted(75, 146) Source(112, 94) + SourceIndex(0) +--- +>>> console.log(numberA3); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > numberA3 +7 > ) +8 > ; +1 >Emitted(76, 5) Source(113, 5) + SourceIndex(0) +2 >Emitted(76, 12) Source(113, 12) + SourceIndex(0) +3 >Emitted(76, 13) Source(113, 13) + SourceIndex(0) +4 >Emitted(76, 16) Source(113, 16) + SourceIndex(0) +5 >Emitted(76, 17) Source(113, 17) + SourceIndex(0) +6 >Emitted(76, 25) Source(113, 25) + SourceIndex(0) +7 >Emitted(76, 26) Source(113, 26) + SourceIndex(0) +8 >Emitted(76, 27) Source(113, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(77, 1) Source(114, 1) + SourceIndex(0) +2 >Emitted(77, 2) Source(114, 2) + SourceIndex(0) +--- +>>>var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37; +>>>//# sourceMappingURL=sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.symbols b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.symbols new file mode 100644 index 00000000000..3acec61f78b --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.symbols @@ -0,0 +1,391 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 11)) + + log(msg: any): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 1, 8)) +} +type Robot = [number, string, string]; +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 2, 1)) + +type MultiSkilledRobot = [string, [string, string]]; +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 3, 38)) + +let robotA: Robot = [1, "mower", "mowing"]; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 6, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 2, 1)) + +function getRobot() { +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 6, 43)) + + return robotA; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 6, 3)) +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 11, 3)) +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 3, 38)) + +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 12, 3)) +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 3, 38)) + +function getMultiRobot() { +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 12, 73)) + + return multiRobotA; +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 11, 3)) +} + +let nameA: string, primarySkillA: string, secondarySkillA: string; +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 17, 3)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 17, 18)) +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 17, 41)) + +let numberB: number, nameB: string; +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 18, 3)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 18, 20)) + +let numberA2: number, nameA2: string, skillA2: string, nameMA: string; +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 19, 3)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 19, 21)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 19, 37)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 19, 54)) + +let numberA3: number, robotAInfo: (number | string)[], multiRobotAInfo: (string | [string, string])[]; +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 20, 3)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 20, 21)) +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 20, 54)) + +let i: number; +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) + +for ([, nameA = "name"] = robotA, i = 0; i < 1; i++) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 17, 3)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 6, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 17, 3)) +} +for ([, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 17, 3)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 6, 43)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 17, 3)) +} +for ([, nameA = "name"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 17, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 17, 3)) +} +for ([, [ + primarySkillA = "primary", +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 17, 18)) + + secondarySkillA = "secondary" +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 17, 41)) + +] = ["none", "none"]] = multiRobotA, i = 0; i < 1; i++) { +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 11, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) + + console.log(primarySkillA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 17, 18)) +} +for ([, [ + primarySkillA = "primary", +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 17, 18)) + + secondarySkillA = "secondary" +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 17, 41)) + +] = ["none", "none"]] = getMultiRobot(), i = 0; i < 1; i++) { +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 12, 73)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) + + console.log(primarySkillA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 17, 18)) +} +for ([, [ + primarySkillA = "primary", +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 17, 18)) + + secondarySkillA = "secondary" +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 17, 41)) + +] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) + + console.log(primarySkillA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 17, 18)) +} + +for ([numberB = -1] = robotA, i = 0; i < 1; i++) { +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 18, 3)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 6, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) + + console.log(numberB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 18, 3)) +} +for ([numberB = -1] = getRobot(), i = 0; i < 1; i++) { +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 18, 3)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 6, 43)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) + + console.log(numberB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 18, 3)) +} +for ([numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 18, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) + + console.log(numberB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 18, 3)) +} +for ([nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 18, 20)) +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 11, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) + + console.log(nameB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 18, 20)) +} +for ([nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 18, 20)) +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 12, 73)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) + + console.log(nameB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 18, 20)) +} +for ([nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 18, 20)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) + + console.log(nameB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 18, 20)) +} + +for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 19, 3)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 19, 21)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 19, 37)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 6, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) + + console.log(nameA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 19, 21)) +} +for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 19, 3)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 19, 21)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 19, 37)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 6, 43)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) + + console.log(nameA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 19, 21)) +} +for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>numberA2 : Symbol(numberA2, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 19, 3)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 19, 21)) +>skillA2 : Symbol(skillA2, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 19, 37)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) + + console.log(nameA2); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>nameA2 : Symbol(nameA2, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 19, 21)) +} +for (let + [nameMA = "noName", +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 80, 5)) + + [ + primarySkillA = "primary", +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 81, 9)) + + secondarySkillA = "secondary" +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 82, 38)) + + ] = ["none", "none"] + ] = multiRobotA, i = 0; i < 1; i++) { +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 11, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 85, 20)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 85, 20)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 85, 20)) + + console.log(nameMA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 80, 5)) +} +for ([nameMA = "noName", +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 19, 54)) + + [ + primarySkillA = "primary", +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 17, 18)) + + secondarySkillA = "secondary" +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 17, 41)) + + ] = ["none", "none"] +] = getMultiRobot(), i = 0; i < 1; i++) { +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 12, 73)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) + + console.log(nameMA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 19, 54)) +} +for ([nameMA = "noName", +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 19, 54)) + + [ + primarySkillA = "primary", +>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 17, 18)) + + secondarySkillA = "secondary" +>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 17, 41)) + + ] = ["none", "none"] +] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) + + console.log(nameMA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 19, 54)) +} + +for ([numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 20, 3)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 20, 21)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 6, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) + + console.log(numberA3); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 20, 3)) +} +for ([numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 20, 3)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 20, 21)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 6, 43)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) + + console.log(numberA3); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 20, 3)) +} +for ([numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 20, 3)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 20, 21)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 2, 1)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 21, 3)) + + console.log(numberA3); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 0, 22)) +>numberA3 : Symbol(numberA3, Decl(sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts, 20, 3)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.types b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.types new file mode 100644 index 00000000000..3bef86dcf80 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.types @@ -0,0 +1,752 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts === +declare var console: { +>console : { log(msg: any): void; } + + log(msg: any): void; +>log : (msg: any) => void +>msg : any +} +type Robot = [number, string, string]; +>Robot : [number, string, string] + +type MultiSkilledRobot = [string, [string, string]]; +>MultiSkilledRobot : [string, [string, string]] + +let robotA: Robot = [1, "mower", "mowing"]; +>robotA : [number, string, string] +>Robot : [number, string, string] +>[1, "mower", "mowing"] : [number, string, string] +>1 : number +>"mower" : string +>"mowing" : string + +function getRobot() { +>getRobot : () => [number, string, string] + + return robotA; +>robotA : [number, string, string] +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +>multiRobotA : [string, [string, string]] +>MultiSkilledRobot : [string, [string, string]] +>["mower", ["mowing", ""]] : [string, [string, string]] +>"mower" : string +>["mowing", ""] : [string, string] +>"mowing" : string +>"" : string + +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +>multiRobotB : [string, [string, string]] +>MultiSkilledRobot : [string, [string, string]] +>["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>"trimmer" : string +>["trimming", "edging"] : [string, string] +>"trimming" : string +>"edging" : string + +function getMultiRobot() { +>getMultiRobot : () => [string, [string, string]] + + return multiRobotA; +>multiRobotA : [string, [string, string]] +} + +let nameA: string, primarySkillA: string, secondarySkillA: string; +>nameA : string +>primarySkillA : string +>secondarySkillA : string + +let numberB: number, nameB: string; +>numberB : number +>nameB : string + +let numberA2: number, nameA2: string, skillA2: string, nameMA: string; +>numberA2 : number +>nameA2 : string +>skillA2 : string +>nameMA : string + +let numberA3: number, robotAInfo: (number | string)[], multiRobotAInfo: (string | [string, string])[]; +>numberA3 : number +>robotAInfo : (number | string)[] +>multiRobotAInfo : (string | [string, string])[] + +let i: number; +>i : number + +for ([, nameA = "name"] = robotA, i = 0; i < 1; i++) { +>[, nameA = "name"] = robotA, i = 0 : number +>[, nameA = "name"] = robotA : [number, string, string] +>[, nameA = "name"] : [undefined, string] +> : undefined +>nameA = "name" : string +>nameA : string +>"name" : string +>robotA : [number, string, string] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ([, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { +>[, nameA = "name"] = getRobot(), i = 0 : number +>[, nameA = "name"] = getRobot() : [number, string, string] +>[, nameA = "name"] : [undefined, string] +> : undefined +>nameA = "name" : string +>nameA : string +>"name" : string +>getRobot() : [number, string, string] +>getRobot : () => [number, string, string] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ([, nameA = "name"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>[, nameA = "name"] = [2, "trimmer", "trimming"], i = 0 : number +>[, nameA = "name"] = [2, "trimmer", "trimming"] : [number, string, string] +>[, nameA = "name"] : [undefined, string] +> : undefined +>nameA = "name" : string +>nameA : string +>"name" : string +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ([, [ +>[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] = multiRobotA, i = 0 : number +>[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] = multiRobotA : [string, [string, string]] +>[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] : [undefined, [string, string]] +> : undefined +>[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"] : [string, string] +>[ primarySkillA = "primary", secondarySkillA = "secondary"] : [string, string] + + primarySkillA = "primary", +>primarySkillA = "primary" : string +>primarySkillA : string +>"primary" : string + + secondarySkillA = "secondary" +>secondarySkillA = "secondary" : string +>secondarySkillA : string +>"secondary" : string + +] = ["none", "none"]] = multiRobotA, i = 0; i < 1; i++) { +>["none", "none"] : [string, string] +>"none" : string +>"none" : string +>multiRobotA : [string, [string, string]] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primarySkillA); +>console.log(primarySkillA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primarySkillA : string +} +for ([, [ +>[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] = getMultiRobot(), i = 0 : number +>[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] = getMultiRobot() : [string, [string, string]] +>[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] : [undefined, [string, string]] +> : undefined +>[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"] : [string, string] +>[ primarySkillA = "primary", secondarySkillA = "secondary"] : [string, string] + + primarySkillA = "primary", +>primarySkillA = "primary" : string +>primarySkillA : string +>"primary" : string + + secondarySkillA = "secondary" +>secondarySkillA = "secondary" : string +>secondarySkillA : string +>"secondary" : string + +] = ["none", "none"]] = getMultiRobot(), i = 0; i < 1; i++) { +>["none", "none"] : [string, string] +>"none" : string +>"none" : string +>getMultiRobot() : [string, [string, string]] +>getMultiRobot : () => [string, [string, string]] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primarySkillA); +>console.log(primarySkillA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primarySkillA : string +} +for ([, [ +>[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0 : number +>[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>[, [ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"]] : [undefined, [string, string]] +> : undefined +>[ primarySkillA = "primary", secondarySkillA = "secondary"] = ["none", "none"] : [string, string] +>[ primarySkillA = "primary", secondarySkillA = "secondary"] : [string, string] + + primarySkillA = "primary", +>primarySkillA = "primary" : string +>primarySkillA : string +>"primary" : string + + secondarySkillA = "secondary" +>secondarySkillA = "secondary" : string +>secondarySkillA : string +>"secondary" : string + +] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +>["none", "none"] : [string, string] +>"none" : string +>"none" : string +>["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>"trimmer" : string +>["trimming", "edging"] : [string, string] +>"trimming" : string +>"edging" : string +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primarySkillA); +>console.log(primarySkillA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primarySkillA : string +} + +for ([numberB = -1] = robotA, i = 0; i < 1; i++) { +>[numberB = -1] = robotA, i = 0 : number +>[numberB = -1] = robotA : [number, string, string] +>[numberB = -1] : [number] +>numberB = -1 : number +>numberB : number +>-1 : number +>1 : number +>robotA : [number, string, string] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(numberB); +>console.log(numberB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberB : number +} +for ([numberB = -1] = getRobot(), i = 0; i < 1; i++) { +>[numberB = -1] = getRobot(), i = 0 : number +>[numberB = -1] = getRobot() : [number, string, string] +>[numberB = -1] : [number] +>numberB = -1 : number +>numberB : number +>-1 : number +>1 : number +>getRobot() : [number, string, string] +>getRobot : () => [number, string, string] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(numberB); +>console.log(numberB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberB : number +} +for ([numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>[numberB = -1] = [2, "trimmer", "trimming"], i = 0 : number +>[numberB = -1] = [2, "trimmer", "trimming"] : [number, string, string] +>[numberB = -1] : [number] +>numberB = -1 : number +>numberB : number +>-1 : number +>1 : number +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(numberB); +>console.log(numberB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberB : number +} +for ([nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { +>[nameB = "name"] = multiRobotA, i = 0 : number +>[nameB = "name"] = multiRobotA : [string, [string, string]] +>[nameB = "name"] : [string] +>nameB = "name" : string +>nameB : string +>"name" : string +>multiRobotA : [string, [string, string]] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameB); +>console.log(nameB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameB : string +} +for ([nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { +>[nameB = "name"] = getMultiRobot(), i = 0 : number +>[nameB = "name"] = getMultiRobot() : [string, [string, string]] +>[nameB = "name"] : [string] +>nameB = "name" : string +>nameB : string +>"name" : string +>getMultiRobot() : [string, [string, string]] +>getMultiRobot : () => [string, [string, string]] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameB); +>console.log(nameB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameB : string +} +for ([nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +>[nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0 : number +>[nameB = "name"] = ["trimmer", ["trimming", "edging"]] : [string, string[]] +>[nameB = "name"] : [string] +>nameB = "name" : string +>nameB : string +>"name" : string +>["trimmer", ["trimming", "edging"]] : [string, string[]] +>"trimmer" : string +>["trimming", "edging"] : string[] +>"trimming" : string +>"edging" : string +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameB); +>console.log(nameB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameB : string +} + +for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { +>[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0 : number +>[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA : [number, string, string] +>[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] : [number, string, string] +>numberA2 = -1 : number +>numberA2 : number +>-1 : number +>1 : number +>nameA2 = "name" : string +>nameA2 : string +>"name" : string +>skillA2 = "skill" : string +>skillA2 : string +>"skill" : string +>robotA : [number, string, string] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA2); +>console.log(nameA2) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA2 : string +} +for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { +>[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0 : number +>[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot() : [number, string, string] +>[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] : [number, string, string] +>numberA2 = -1 : number +>numberA2 : number +>-1 : number +>1 : number +>nameA2 = "name" : string +>nameA2 : string +>"name" : string +>skillA2 = "skill" : string +>skillA2 : string +>"skill" : string +>getRobot() : [number, string, string] +>getRobot : () => [number, string, string] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA2); +>console.log(nameA2) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA2 : string +} +for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0 : number +>[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"] : [number, string, string] +>[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] : [number, string, string] +>numberA2 = -1 : number +>numberA2 : number +>-1 : number +>1 : number +>nameA2 = "name" : string +>nameA2 : string +>"name" : string +>skillA2 = "skill" : string +>skillA2 : string +>"skill" : string +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA2); +>console.log(nameA2) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA2 : string +} +for (let + [nameMA = "noName", +>nameMA : string +>"noName" : string + + [ + primarySkillA = "primary", +>primarySkillA : string +>"primary" : string + + secondarySkillA = "secondary" +>secondarySkillA : string +>"secondary" : string + + ] = ["none", "none"] +>["none", "none"] : [string, string] +>"none" : string +>"none" : string + + ] = multiRobotA, i = 0; i < 1; i++) { +>multiRobotA : [string, [string, string]] +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameMA); +>console.log(nameMA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMA : string +} +for ([nameMA = "noName", +>[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary" ] = ["none", "none"]] = getMultiRobot(), i = 0 : number +>[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary" ] = ["none", "none"]] = getMultiRobot() : [string, [string, string]] +>[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary" ] = ["none", "none"]] : [string, [string, string]] +>nameMA = "noName" : string +>nameMA : string +>"noName" : string + + [ +>[ primarySkillA = "primary", secondarySkillA = "secondary" ] = ["none", "none"] : [string, string] +>[ primarySkillA = "primary", secondarySkillA = "secondary" ] : [string, string] + + primarySkillA = "primary", +>primarySkillA = "primary" : string +>primarySkillA : string +>"primary" : string + + secondarySkillA = "secondary" +>secondarySkillA = "secondary" : string +>secondarySkillA : string +>"secondary" : string + + ] = ["none", "none"] +>["none", "none"] : [string, string] +>"none" : string +>"none" : string + +] = getMultiRobot(), i = 0; i < 1; i++) { +>getMultiRobot() : [string, [string, string]] +>getMultiRobot : () => [string, [string, string]] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameMA); +>console.log(nameMA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMA : string +} +for ([nameMA = "noName", +>[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary" ] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0 : number +>[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary" ] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>[nameMA = "noName", [ primarySkillA = "primary", secondarySkillA = "secondary" ] = ["none", "none"]] : [string, [string, string]] +>nameMA = "noName" : string +>nameMA : string +>"noName" : string + + [ +>[ primarySkillA = "primary", secondarySkillA = "secondary" ] = ["none", "none"] : [string, string] +>[ primarySkillA = "primary", secondarySkillA = "secondary" ] : [string, string] + + primarySkillA = "primary", +>primarySkillA = "primary" : string +>primarySkillA : string +>"primary" : string + + secondarySkillA = "secondary" +>secondarySkillA = "secondary" : string +>secondarySkillA : string +>"secondary" : string + + ] = ["none", "none"] +>["none", "none"] : [string, string] +>"none" : string +>"none" : string + +] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +>["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>"trimmer" : string +>["trimming", "edging"] : [string, string] +>"trimming" : string +>"edging" : string +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameMA); +>console.log(nameMA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameMA : string +} + +for ([numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { +>[numberA3 = -1, ...robotAInfo] = robotA, i = 0 : number +>[numberA3 = -1, ...robotAInfo] = robotA : [number, string, string] +>[numberA3 = -1, ...robotAInfo] : (number | string)[] +>numberA3 = -1 : number +>numberA3 : number +>-1 : number +>1 : number +>...robotAInfo : number | string +>robotAInfo : (number | string)[] +>robotA : [number, string, string] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(numberA3); +>console.log(numberA3) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberA3 : number +} +for ([numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { +>[numberA3 = -1, ...robotAInfo] = getRobot(), i = 0 : number +>[numberA3 = -1, ...robotAInfo] = getRobot() : [number, string, string] +>[numberA3 = -1, ...robotAInfo] : (number | string)[] +>numberA3 = -1 : number +>numberA3 : number +>-1 : number +>1 : number +>...robotAInfo : number | string +>robotAInfo : (number | string)[] +>getRobot() : [number, string, string] +>getRobot : () => [number, string, string] +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(numberA3); +>console.log(numberA3) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberA3 : number +} +for ([numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +>[numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0 : number +>[numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"] : [number, string, string] +>[numberA3 = -1, ...robotAInfo] : (number | string)[] +>numberA3 = -1 : number +>numberA3 : number +>-1 : number +>1 : number +>...robotAInfo : number | string +>robotAInfo : (number | string)[] +>[2, "trimmer", "trimming"] : [number, string, string] +>Robot : [number, string, string] +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(numberA3); +>console.log(numberA3) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>numberA3 : number +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.js b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.js new file mode 100644 index 00000000000..785148ba652 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.js @@ -0,0 +1,145 @@ +//// [sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts] +declare var console: { + log(msg: any): void; +} +interface Robot { + name: string; + skill: string; +} + +interface MultiRobot { + name: string; + skills: { + primary?: string; + secondary?: string; + }; +} + +let robot: Robot = { name: "mower", skill: "mowing" }; +let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +function getRobot() { + return robot; +} +function getMultiRobot() { + return multiRobot; +} + +for (let {name: nameA= "noName" } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let { + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "none", secondary: "none" } +} = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for (let { + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "none", secondary: "none" } +} = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for (let { + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "none", secondary: "none" } +} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} + +for (let {name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let { + name: nameA = "noName", + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "none", secondary: "none" } +} = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for (let { + name: nameA = "noName", + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "none", secondary: "none" } +} = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for (let { + name: nameA = "noName", + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "none", secondary: "none" } +} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} + +//// [sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.js] +var robot = { name: "mower", skill: "mowing" }; +var multiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +function getRobot() { + return robot; +} +function getMultiRobot() { + return multiRobot; +} +for (var _a = robot.name, nameA = _a === void 0 ? "noName" : _a, i = 0; i < 1; i++) { + console.log(nameA); +} +for (var _b = getRobot().name, nameA = _b === void 0 ? "noName" : _b, i = 0; i < 1; i++) { + console.log(nameA); +} +for (var _c = { name: "trimmer", skill: "trimming" }.name, nameA = _c === void 0 ? "noName" : _c, i = 0; i < 1; i++) { + console.log(nameA); +} +for (var _d = multiRobot.skills, _e = _d === void 0 ? { primary: "none", secondary: "none" } : _d, _f = _e.primary, primaryA = _f === void 0 ? "primary" : _f, _g = _e.secondary, secondaryA = _g === void 0 ? "secondary" : _g, i = 0; i < 1; i++) { + console.log(primaryA); +} +for (var _h = getMultiRobot().skills, _j = _h === void 0 ? { primary: "none", secondary: "none" } : _h, _k = _j.primary, primaryA = _k === void 0 ? "primary" : _k, _l = _j.secondary, secondaryA = _l === void 0 ? "secondary" : _l, i = 0; i < 1; i++) { + console.log(primaryA); +} +for (var _m = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }.skills, _o = _m === void 0 ? { primary: "none", secondary: "none" } : _m, _p = _o.primary, primaryA = _p === void 0 ? "primary" : _p, _q = _o.secondary, secondaryA = _q === void 0 ? "secondary" : _q, i = 0; i < 1; i++) { + console.log(primaryA); +} +for (var _r = robot.name, nameA = _r === void 0 ? "noName" : _r, _s = robot.skill, skillA = _s === void 0 ? "skill" : _s, i = 0; i < 1; i++) { + console.log(nameA); +} +for (var _t = getRobot(), _u = _t.name, nameA = _u === void 0 ? "noName" : _u, _v = _t.skill, skillA = _v === void 0 ? "skill" : _v, i = 0; i < 1; i++) { + console.log(nameA); +} +for (var _w = { name: "trimmer", skill: "trimming" }, _x = _w.name, nameA = _x === void 0 ? "noName" : _x, _y = _w.skill, skillA = _y === void 0 ? "skill" : _y, i = 0; i < 1; i++) { + console.log(nameA); +} +for (var _z = multiRobot.name, nameA = _z === void 0 ? "noName" : _z, _0 = multiRobot.skills, _1 = _0 === void 0 ? { primary: "none", secondary: "none" } : _0, _2 = _1.primary, primaryA = _2 === void 0 ? "primary" : _2, _3 = _1.secondary, secondaryA = _3 === void 0 ? "secondary" : _3, i = 0; i < 1; i++) { + console.log(primaryA); +} +for (var _4 = getMultiRobot(), _5 = _4.name, nameA = _5 === void 0 ? "noName" : _5, _6 = _4.skills, _7 = _6 === void 0 ? { primary: "none", secondary: "none" } : _6, _8 = _7.primary, primaryA = _8 === void 0 ? "primary" : _8, _9 = _7.secondary, secondaryA = _9 === void 0 ? "secondary" : _9, i = 0; i < 1; i++) { + console.log(primaryA); +} +for (var _10 = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, _11 = _10.name, nameA = _11 === void 0 ? "noName" : _11, _12 = _10.skills, _13 = _12 === void 0 ? { primary: "none", secondary: "none" } : _12, _14 = _13.primary, primaryA = _14 === void 0 ? "primary" : _14, _15 = _13.secondary, secondaryA = _15 === void 0 ? "secondary" : _15, i = 0; i < 1; i++) { + console.log(primaryA); +} +//# sourceMappingURL=sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.js.map new file mode 100644 index 00000000000..b208c41c9a6 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.js.map] +{"version":3,"file":"sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts"],"names":[],"mappings":"AAgBA,IAAI,KAAK,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACtD,IAAI,UAAU,GAAe,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;AACjG;IACI,MAAM,CAAC,KAAK,CAAC;AACjB,CAAC;AACD;IACI,MAAM,CAAC,UAAU,CAAC;AACtB,CAAC;AAED,GAAG,CAAC,CAAM,mBAAqB,EAArB,qCAAqB,EAAY,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC3D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAM,wBAAs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B,EAA7B,2CAA6B,EAC7B,mBAAmC,EAAnC,+CAAmC,EAGvC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACpB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.sourcemap.txt new file mode 100644 index 00000000000..c8c63e66adf --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.sourcemap.txt @@ -0,0 +1,1740 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.js +mapUrl: sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.js.map +sourceRoot: +sources: sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.js +sourceFile:sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts +------------------------------------------------------------------- +>>>var robot = { name: "mower", skill: "mowing" }; +1 > +2 >^^^^ +3 > ^^^^^ +4 > ^^^ +5 > ^^ +6 > ^^^^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^ +11> ^^ +12> ^^^^^^^^ +13> ^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 >declare var console: { + > log(msg: any): void; + >} + >interface Robot { + > name: string; + > skill: string; + >} + > + >interface MultiRobot { + > name: string; + > skills: { + > primary?: string; + > secondary?: string; + > }; + >} + > + > +2 >let +3 > robot +4 > : Robot = +5 > { +6 > name +7 > : +8 > "mower" +9 > , +10> skill +11> : +12> "mowing" +13> } +14> ; +1 >Emitted(1, 1) Source(17, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(17, 5) + SourceIndex(0) +3 >Emitted(1, 10) Source(17, 10) + SourceIndex(0) +4 >Emitted(1, 13) Source(17, 20) + SourceIndex(0) +5 >Emitted(1, 15) Source(17, 22) + SourceIndex(0) +6 >Emitted(1, 19) Source(17, 26) + SourceIndex(0) +7 >Emitted(1, 21) Source(17, 28) + SourceIndex(0) +8 >Emitted(1, 28) Source(17, 35) + SourceIndex(0) +9 >Emitted(1, 30) Source(17, 37) + SourceIndex(0) +10>Emitted(1, 35) Source(17, 42) + SourceIndex(0) +11>Emitted(1, 37) Source(17, 44) + SourceIndex(0) +12>Emitted(1, 45) Source(17, 52) + SourceIndex(0) +13>Emitted(1, 47) Source(17, 54) + SourceIndex(0) +14>Emitted(1, 48) Source(17, 55) + SourceIndex(0) +--- +>>>var multiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +1-> +2 >^^^^ +3 > ^^^^^^^^^^ +4 > ^^^ +5 > ^^ +6 > ^^^^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^^ +12> ^^ +13> ^^^^^^^ +14> ^^ +15> ^^^^^^^^ +16> ^^ +17> ^^^^^^^^^ +18> ^^ +19> ^^^^^^ +20> ^^ +21> ^^ +22> ^ +1-> + > +2 >let +3 > multiRobot +4 > : MultiRobot = +5 > { +6 > name +7 > : +8 > "mower" +9 > , +10> skills +11> : +12> { +13> primary +14> : +15> "mowing" +16> , +17> secondary +18> : +19> "none" +20> } +21> } +22> ; +1->Emitted(2, 1) Source(18, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(18, 5) + SourceIndex(0) +3 >Emitted(2, 15) Source(18, 15) + SourceIndex(0) +4 >Emitted(2, 18) Source(18, 30) + SourceIndex(0) +5 >Emitted(2, 20) Source(18, 32) + SourceIndex(0) +6 >Emitted(2, 24) Source(18, 36) + SourceIndex(0) +7 >Emitted(2, 26) Source(18, 38) + SourceIndex(0) +8 >Emitted(2, 33) Source(18, 45) + SourceIndex(0) +9 >Emitted(2, 35) Source(18, 47) + SourceIndex(0) +10>Emitted(2, 41) Source(18, 53) + SourceIndex(0) +11>Emitted(2, 43) Source(18, 55) + SourceIndex(0) +12>Emitted(2, 45) Source(18, 57) + SourceIndex(0) +13>Emitted(2, 52) Source(18, 64) + SourceIndex(0) +14>Emitted(2, 54) Source(18, 66) + SourceIndex(0) +15>Emitted(2, 62) Source(18, 74) + SourceIndex(0) +16>Emitted(2, 64) Source(18, 76) + SourceIndex(0) +17>Emitted(2, 73) Source(18, 85) + SourceIndex(0) +18>Emitted(2, 75) Source(18, 87) + SourceIndex(0) +19>Emitted(2, 81) Source(18, 93) + SourceIndex(0) +20>Emitted(2, 83) Source(18, 95) + SourceIndex(0) +21>Emitted(2, 85) Source(18, 97) + SourceIndex(0) +22>Emitted(2, 86) Source(18, 98) + SourceIndex(0) +--- +>>>function getRobot() { +1 > +2 >^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(3, 1) Source(19, 1) + SourceIndex(0) +--- +>>> return robot; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^ +5 > ^ +1->function getRobot() { + > +2 > return +3 > +4 > robot +5 > ; +1->Emitted(4, 5) Source(20, 5) + SourceIndex(0) +2 >Emitted(4, 11) Source(20, 11) + SourceIndex(0) +3 >Emitted(4, 12) Source(20, 12) + SourceIndex(0) +4 >Emitted(4, 17) Source(20, 17) + SourceIndex(0) +5 >Emitted(4, 18) Source(20, 18) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(5, 1) Source(21, 1) + SourceIndex(0) +2 >Emitted(5, 2) Source(21, 2) + SourceIndex(0) +--- +>>>function getMultiRobot() { +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +1->Emitted(6, 1) Source(22, 1) + SourceIndex(0) +--- +>>> return multiRobot; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^^^^^ +5 > ^ +1->function getMultiRobot() { + > +2 > return +3 > +4 > multiRobot +5 > ; +1->Emitted(7, 5) Source(23, 5) + SourceIndex(0) +2 >Emitted(7, 11) Source(23, 11) + SourceIndex(0) +3 >Emitted(7, 12) Source(23, 12) + SourceIndex(0) +4 >Emitted(7, 22) Source(23, 22) + SourceIndex(0) +5 >Emitted(7, 23) Source(23, 23) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(8, 1) Source(24, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(24, 2) + SourceIndex(0) +--- +>>>for (var _a = robot.name, nameA = _a === void 0 ? "noName" : _a, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ +1-> + > + > +2 >for +3 > +4 > (let { +5 > name: nameA= "noName" +6 > +7 > name: nameA= "noName" +8 > } = robot, +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { +1->Emitted(9, 1) Source(26, 1) + SourceIndex(0) +2 >Emitted(9, 4) Source(26, 4) + SourceIndex(0) +3 >Emitted(9, 5) Source(26, 5) + SourceIndex(0) +4 >Emitted(9, 6) Source(26, 11) + SourceIndex(0) +5 >Emitted(9, 25) Source(26, 32) + SourceIndex(0) +6 >Emitted(9, 27) Source(26, 11) + SourceIndex(0) +7 >Emitted(9, 64) Source(26, 32) + SourceIndex(0) +8 >Emitted(9, 66) Source(26, 44) + SourceIndex(0) +9 >Emitted(9, 67) Source(26, 45) + SourceIndex(0) +10>Emitted(9, 70) Source(26, 48) + SourceIndex(0) +11>Emitted(9, 71) Source(26, 49) + SourceIndex(0) +12>Emitted(9, 73) Source(26, 51) + SourceIndex(0) +13>Emitted(9, 74) Source(26, 52) + SourceIndex(0) +14>Emitted(9, 77) Source(26, 55) + SourceIndex(0) +15>Emitted(9, 78) Source(26, 56) + SourceIndex(0) +16>Emitted(9, 80) Source(26, 58) + SourceIndex(0) +17>Emitted(9, 81) Source(26, 59) + SourceIndex(0) +18>Emitted(9, 83) Source(26, 61) + SourceIndex(0) +19>Emitted(9, 85) Source(26, 63) + SourceIndex(0) +20>Emitted(9, 86) Source(26, 64) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(10, 5) Source(27, 5) + SourceIndex(0) +2 >Emitted(10, 12) Source(27, 12) + SourceIndex(0) +3 >Emitted(10, 13) Source(27, 13) + SourceIndex(0) +4 >Emitted(10, 16) Source(27, 16) + SourceIndex(0) +5 >Emitted(10, 17) Source(27, 17) + SourceIndex(0) +6 >Emitted(10, 22) Source(27, 22) + SourceIndex(0) +7 >Emitted(10, 23) Source(27, 23) + SourceIndex(0) +8 >Emitted(10, 24) Source(27, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(11, 1) Source(28, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(28, 2) + SourceIndex(0) +--- +>>>for (var _b = getRobot().name, nameA = _b === void 0 ? "noName" : _b, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ +1-> + > +2 >for +3 > +4 > (let { +5 > name: nameA = "noName" +6 > +7 > name: nameA = "noName" +8 > } = getRobot(), +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { +1->Emitted(12, 1) Source(29, 1) + SourceIndex(0) +2 >Emitted(12, 4) Source(29, 4) + SourceIndex(0) +3 >Emitted(12, 5) Source(29, 5) + SourceIndex(0) +4 >Emitted(12, 6) Source(29, 11) + SourceIndex(0) +5 >Emitted(12, 30) Source(29, 33) + SourceIndex(0) +6 >Emitted(12, 32) Source(29, 11) + SourceIndex(0) +7 >Emitted(12, 69) Source(29, 33) + SourceIndex(0) +8 >Emitted(12, 71) Source(29, 50) + SourceIndex(0) +9 >Emitted(12, 72) Source(29, 51) + SourceIndex(0) +10>Emitted(12, 75) Source(29, 54) + SourceIndex(0) +11>Emitted(12, 76) Source(29, 55) + SourceIndex(0) +12>Emitted(12, 78) Source(29, 57) + SourceIndex(0) +13>Emitted(12, 79) Source(29, 58) + SourceIndex(0) +14>Emitted(12, 82) Source(29, 61) + SourceIndex(0) +15>Emitted(12, 83) Source(29, 62) + SourceIndex(0) +16>Emitted(12, 85) Source(29, 64) + SourceIndex(0) +17>Emitted(12, 86) Source(29, 65) + SourceIndex(0) +18>Emitted(12, 88) Source(29, 67) + SourceIndex(0) +19>Emitted(12, 90) Source(29, 69) + SourceIndex(0) +20>Emitted(12, 91) Source(29, 70) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(13, 5) Source(30, 5) + SourceIndex(0) +2 >Emitted(13, 12) Source(30, 12) + SourceIndex(0) +3 >Emitted(13, 13) Source(30, 13) + SourceIndex(0) +4 >Emitted(13, 16) Source(30, 16) + SourceIndex(0) +5 >Emitted(13, 17) Source(30, 17) + SourceIndex(0) +6 >Emitted(13, 22) Source(30, 22) + SourceIndex(0) +7 >Emitted(13, 23) Source(30, 23) + SourceIndex(0) +8 >Emitted(13, 24) Source(30, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(14, 1) Source(31, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(31, 2) + SourceIndex(0) +--- +>>>for (var _c = { name: "trimmer", skill: "trimming" }.name, nameA = _c === void 0 ? "noName" : _c, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ +1-> + > +2 >for +3 > +4 > (let { +5 > name: nameA = "noName" +6 > +7 > name: nameA = "noName" +8 > } = { name: "trimmer", skill: "trimming" }, +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { +1->Emitted(15, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(15, 4) Source(32, 4) + SourceIndex(0) +3 >Emitted(15, 5) Source(32, 5) + SourceIndex(0) +4 >Emitted(15, 6) Source(32, 11) + SourceIndex(0) +5 >Emitted(15, 58) Source(32, 33) + SourceIndex(0) +6 >Emitted(15, 60) Source(32, 11) + SourceIndex(0) +7 >Emitted(15, 97) Source(32, 33) + SourceIndex(0) +8 >Emitted(15, 99) Source(32, 85) + SourceIndex(0) +9 >Emitted(15, 100) Source(32, 86) + SourceIndex(0) +10>Emitted(15, 103) Source(32, 89) + SourceIndex(0) +11>Emitted(15, 104) Source(32, 90) + SourceIndex(0) +12>Emitted(15, 106) Source(32, 92) + SourceIndex(0) +13>Emitted(15, 107) Source(32, 93) + SourceIndex(0) +14>Emitted(15, 110) Source(32, 96) + SourceIndex(0) +15>Emitted(15, 111) Source(32, 97) + SourceIndex(0) +16>Emitted(15, 113) Source(32, 99) + SourceIndex(0) +17>Emitted(15, 114) Source(32, 100) + SourceIndex(0) +18>Emitted(15, 116) Source(32, 102) + SourceIndex(0) +19>Emitted(15, 118) Source(32, 104) + SourceIndex(0) +20>Emitted(15, 119) Source(32, 105) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(16, 5) Source(33, 5) + SourceIndex(0) +2 >Emitted(16, 12) Source(33, 12) + SourceIndex(0) +3 >Emitted(16, 13) Source(33, 13) + SourceIndex(0) +4 >Emitted(16, 16) Source(33, 16) + SourceIndex(0) +5 >Emitted(16, 17) Source(33, 17) + SourceIndex(0) +6 >Emitted(16, 22) Source(33, 22) + SourceIndex(0) +7 >Emitted(16, 23) Source(33, 23) + SourceIndex(0) +8 >Emitted(16, 24) Source(33, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(17, 1) Source(34, 1) + SourceIndex(0) +2 >Emitted(17, 2) Source(34, 2) + SourceIndex(0) +--- +>>>for (var _d = multiRobot.skills, _e = _d === void 0 ? { primary: "none", secondary: "none" } : _d, _f = _e.primary, primaryA = _f === void 0 ? "primary" : _f, _g = _e.secondary, secondaryA = _g === void 0 ? "secondary" : _g, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^ +27> ^^ +28> ^ +1-> + > +2 >for +3 > +4 > (let { + > +5 > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } +6 > +7 > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } +8 > +9 > primary: primaryA = "primary" +10> +11> primary: primaryA = "primary" +12> , + > +13> secondary: secondaryA = "secondary" +14> +15> secondary: secondaryA = "secondary" +16> + > } = { primary: "none", secondary: "none" } + > } = multiRobot, +17> i +18> = +19> 0 +20> ; +21> i +22> < +23> 1 +24> ; +25> i +26> ++ +27> ) +28> { +1->Emitted(18, 1) Source(35, 1) + SourceIndex(0) +2 >Emitted(18, 4) Source(35, 4) + SourceIndex(0) +3 >Emitted(18, 5) Source(35, 5) + SourceIndex(0) +4 >Emitted(18, 6) Source(36, 5) + SourceIndex(0) +5 >Emitted(18, 32) Source(39, 47) + SourceIndex(0) +6 >Emitted(18, 34) Source(36, 5) + SourceIndex(0) +7 >Emitted(18, 98) Source(39, 47) + SourceIndex(0) +8 >Emitted(18, 100) Source(37, 9) + SourceIndex(0) +9 >Emitted(18, 115) Source(37, 38) + SourceIndex(0) +10>Emitted(18, 117) Source(37, 9) + SourceIndex(0) +11>Emitted(18, 158) Source(37, 38) + SourceIndex(0) +12>Emitted(18, 160) Source(38, 9) + SourceIndex(0) +13>Emitted(18, 177) Source(38, 44) + SourceIndex(0) +14>Emitted(18, 179) Source(38, 9) + SourceIndex(0) +15>Emitted(18, 224) Source(38, 44) + SourceIndex(0) +16>Emitted(18, 226) Source(40, 17) + SourceIndex(0) +17>Emitted(18, 227) Source(40, 18) + SourceIndex(0) +18>Emitted(18, 230) Source(40, 21) + SourceIndex(0) +19>Emitted(18, 231) Source(40, 22) + SourceIndex(0) +20>Emitted(18, 233) Source(40, 24) + SourceIndex(0) +21>Emitted(18, 234) Source(40, 25) + SourceIndex(0) +22>Emitted(18, 237) Source(40, 28) + SourceIndex(0) +23>Emitted(18, 238) Source(40, 29) + SourceIndex(0) +24>Emitted(18, 240) Source(40, 31) + SourceIndex(0) +25>Emitted(18, 241) Source(40, 32) + SourceIndex(0) +26>Emitted(18, 243) Source(40, 34) + SourceIndex(0) +27>Emitted(18, 245) Source(40, 36) + SourceIndex(0) +28>Emitted(18, 246) Source(40, 37) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(19, 5) Source(41, 5) + SourceIndex(0) +2 >Emitted(19, 12) Source(41, 12) + SourceIndex(0) +3 >Emitted(19, 13) Source(41, 13) + SourceIndex(0) +4 >Emitted(19, 16) Source(41, 16) + SourceIndex(0) +5 >Emitted(19, 17) Source(41, 17) + SourceIndex(0) +6 >Emitted(19, 25) Source(41, 25) + SourceIndex(0) +7 >Emitted(19, 26) Source(41, 26) + SourceIndex(0) +8 >Emitted(19, 27) Source(41, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(20, 1) Source(42, 1) + SourceIndex(0) +2 >Emitted(20, 2) Source(42, 2) + SourceIndex(0) +--- +>>>for (var _h = getMultiRobot().skills, _j = _h === void 0 ? { primary: "none", secondary: "none" } : _h, _k = _j.primary, primaryA = _k === void 0 ? "primary" : _k, _l = _j.secondary, secondaryA = _l === void 0 ? "secondary" : _l, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^ +27> ^^ +28> ^ +1-> + > +2 >for +3 > +4 > (let { + > +5 > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } +6 > +7 > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } +8 > +9 > primary: primaryA = "primary" +10> +11> primary: primaryA = "primary" +12> , + > +13> secondary: secondaryA = "secondary" +14> +15> secondary: secondaryA = "secondary" +16> + > } = { primary: "none", secondary: "none" } + > } = getMultiRobot(), +17> i +18> = +19> 0 +20> ; +21> i +22> < +23> 1 +24> ; +25> i +26> ++ +27> ) +28> { +1->Emitted(21, 1) Source(43, 1) + SourceIndex(0) +2 >Emitted(21, 4) Source(43, 4) + SourceIndex(0) +3 >Emitted(21, 5) Source(43, 5) + SourceIndex(0) +4 >Emitted(21, 6) Source(44, 5) + SourceIndex(0) +5 >Emitted(21, 37) Source(47, 47) + SourceIndex(0) +6 >Emitted(21, 39) Source(44, 5) + SourceIndex(0) +7 >Emitted(21, 103) Source(47, 47) + SourceIndex(0) +8 >Emitted(21, 105) Source(45, 9) + SourceIndex(0) +9 >Emitted(21, 120) Source(45, 38) + SourceIndex(0) +10>Emitted(21, 122) Source(45, 9) + SourceIndex(0) +11>Emitted(21, 163) Source(45, 38) + SourceIndex(0) +12>Emitted(21, 165) Source(46, 9) + SourceIndex(0) +13>Emitted(21, 182) Source(46, 44) + SourceIndex(0) +14>Emitted(21, 184) Source(46, 9) + SourceIndex(0) +15>Emitted(21, 229) Source(46, 44) + SourceIndex(0) +16>Emitted(21, 231) Source(48, 22) + SourceIndex(0) +17>Emitted(21, 232) Source(48, 23) + SourceIndex(0) +18>Emitted(21, 235) Source(48, 26) + SourceIndex(0) +19>Emitted(21, 236) Source(48, 27) + SourceIndex(0) +20>Emitted(21, 238) Source(48, 29) + SourceIndex(0) +21>Emitted(21, 239) Source(48, 30) + SourceIndex(0) +22>Emitted(21, 242) Source(48, 33) + SourceIndex(0) +23>Emitted(21, 243) Source(48, 34) + SourceIndex(0) +24>Emitted(21, 245) Source(48, 36) + SourceIndex(0) +25>Emitted(21, 246) Source(48, 37) + SourceIndex(0) +26>Emitted(21, 248) Source(48, 39) + SourceIndex(0) +27>Emitted(21, 250) Source(48, 41) + SourceIndex(0) +28>Emitted(21, 251) Source(48, 42) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(22, 5) Source(49, 5) + SourceIndex(0) +2 >Emitted(22, 12) Source(49, 12) + SourceIndex(0) +3 >Emitted(22, 13) Source(49, 13) + SourceIndex(0) +4 >Emitted(22, 16) Source(49, 16) + SourceIndex(0) +5 >Emitted(22, 17) Source(49, 17) + SourceIndex(0) +6 >Emitted(22, 25) Source(49, 25) + SourceIndex(0) +7 >Emitted(22, 26) Source(49, 26) + SourceIndex(0) +8 >Emitted(22, 27) Source(49, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(23, 1) Source(50, 1) + SourceIndex(0) +2 >Emitted(23, 2) Source(50, 2) + SourceIndex(0) +--- +>>>for (var _m = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }.skills, _o = _m === void 0 ? { primary: "none", secondary: "none" } : _m, _p = _o.primary, primaryA = _p === void 0 ? "primary" : _p, _q = _o.secondary, secondaryA = _q === void 0 ? "secondary" : _q, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^ +27> ^^ +28> ^ +1-> + > +2 >for +3 > +4 > (let { + > +5 > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } +6 > +7 > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } +8 > +9 > primary: primaryA = "primary" +10> +11> primary: primaryA = "primary" +12> , + > +13> secondary: secondaryA = "secondary" +14> +15> secondary: secondaryA = "secondary" +16> + > } = { primary: "none", secondary: "none" } + > } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + > +17> i +18> = +19> 0 +20> ; +21> i +22> < +23> 1 +24> ; +25> i +26> ++ +27> ) +28> { +1->Emitted(24, 1) Source(51, 1) + SourceIndex(0) +2 >Emitted(24, 4) Source(51, 4) + SourceIndex(0) +3 >Emitted(24, 5) Source(51, 5) + SourceIndex(0) +4 >Emitted(24, 6) Source(52, 5) + SourceIndex(0) +5 >Emitted(24, 95) Source(55, 47) + SourceIndex(0) +6 >Emitted(24, 97) Source(52, 5) + SourceIndex(0) +7 >Emitted(24, 161) Source(55, 47) + SourceIndex(0) +8 >Emitted(24, 163) Source(53, 9) + SourceIndex(0) +9 >Emitted(24, 178) Source(53, 38) + SourceIndex(0) +10>Emitted(24, 180) Source(53, 9) + SourceIndex(0) +11>Emitted(24, 221) Source(53, 38) + SourceIndex(0) +12>Emitted(24, 223) Source(54, 9) + SourceIndex(0) +13>Emitted(24, 240) Source(54, 44) + SourceIndex(0) +14>Emitted(24, 242) Source(54, 9) + SourceIndex(0) +15>Emitted(24, 287) Source(54, 44) + SourceIndex(0) +16>Emitted(24, 289) Source(57, 5) + SourceIndex(0) +17>Emitted(24, 290) Source(57, 6) + SourceIndex(0) +18>Emitted(24, 293) Source(57, 9) + SourceIndex(0) +19>Emitted(24, 294) Source(57, 10) + SourceIndex(0) +20>Emitted(24, 296) Source(57, 12) + SourceIndex(0) +21>Emitted(24, 297) Source(57, 13) + SourceIndex(0) +22>Emitted(24, 300) Source(57, 16) + SourceIndex(0) +23>Emitted(24, 301) Source(57, 17) + SourceIndex(0) +24>Emitted(24, 303) Source(57, 19) + SourceIndex(0) +25>Emitted(24, 304) Source(57, 20) + SourceIndex(0) +26>Emitted(24, 306) Source(57, 22) + SourceIndex(0) +27>Emitted(24, 308) Source(57, 24) + SourceIndex(0) +28>Emitted(24, 309) Source(57, 25) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(25, 5) Source(58, 5) + SourceIndex(0) +2 >Emitted(25, 12) Source(58, 12) + SourceIndex(0) +3 >Emitted(25, 13) Source(58, 13) + SourceIndex(0) +4 >Emitted(25, 16) Source(58, 16) + SourceIndex(0) +5 >Emitted(25, 17) Source(58, 17) + SourceIndex(0) +6 >Emitted(25, 25) Source(58, 25) + SourceIndex(0) +7 >Emitted(25, 26) Source(58, 26) + SourceIndex(0) +8 >Emitted(25, 27) Source(58, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(26, 1) Source(59, 1) + SourceIndex(0) +2 >Emitted(26, 2) Source(59, 2) + SourceIndex(0) +--- +>>>for (var _r = robot.name, nameA = _r === void 0 ? "noName" : _r, _s = robot.skill, skillA = _s === void 0 ? "skill" : _s, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > + > +2 >for +3 > +4 > (let { +5 > name: nameA = "noName" +6 > +7 > name: nameA = "noName" +8 > , +9 > skill: skillA = "skill" +10> +11> skill: skillA = "skill" +12> } = robot, +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(27, 1) Source(61, 1) + SourceIndex(0) +2 >Emitted(27, 4) Source(61, 4) + SourceIndex(0) +3 >Emitted(27, 5) Source(61, 5) + SourceIndex(0) +4 >Emitted(27, 6) Source(61, 11) + SourceIndex(0) +5 >Emitted(27, 25) Source(61, 33) + SourceIndex(0) +6 >Emitted(27, 27) Source(61, 11) + SourceIndex(0) +7 >Emitted(27, 64) Source(61, 33) + SourceIndex(0) +8 >Emitted(27, 66) Source(61, 35) + SourceIndex(0) +9 >Emitted(27, 82) Source(61, 58) + SourceIndex(0) +10>Emitted(27, 84) Source(61, 35) + SourceIndex(0) +11>Emitted(27, 121) Source(61, 58) + SourceIndex(0) +12>Emitted(27, 123) Source(61, 70) + SourceIndex(0) +13>Emitted(27, 124) Source(61, 71) + SourceIndex(0) +14>Emitted(27, 127) Source(61, 74) + SourceIndex(0) +15>Emitted(27, 128) Source(61, 75) + SourceIndex(0) +16>Emitted(27, 130) Source(61, 77) + SourceIndex(0) +17>Emitted(27, 131) Source(61, 78) + SourceIndex(0) +18>Emitted(27, 134) Source(61, 81) + SourceIndex(0) +19>Emitted(27, 135) Source(61, 82) + SourceIndex(0) +20>Emitted(27, 137) Source(61, 84) + SourceIndex(0) +21>Emitted(27, 138) Source(61, 85) + SourceIndex(0) +22>Emitted(27, 140) Source(61, 87) + SourceIndex(0) +23>Emitted(27, 142) Source(61, 89) + SourceIndex(0) +24>Emitted(27, 143) Source(61, 90) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(28, 5) Source(62, 5) + SourceIndex(0) +2 >Emitted(28, 12) Source(62, 12) + SourceIndex(0) +3 >Emitted(28, 13) Source(62, 13) + SourceIndex(0) +4 >Emitted(28, 16) Source(62, 16) + SourceIndex(0) +5 >Emitted(28, 17) Source(62, 17) + SourceIndex(0) +6 >Emitted(28, 22) Source(62, 22) + SourceIndex(0) +7 >Emitted(28, 23) Source(62, 23) + SourceIndex(0) +8 >Emitted(28, 24) Source(62, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(29, 1) Source(63, 1) + SourceIndex(0) +2 >Emitted(29, 2) Source(63, 2) + SourceIndex(0) +--- +>>>for (var _t = getRobot(), _u = _t.name, nameA = _u === void 0 ? "noName" : _u, _v = _t.skill, skillA = _v === void 0 ? "skill" : _v, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^ +17> ^^^ +18> ^ +19> ^^ +20> ^ +21> ^^^ +22> ^ +23> ^^ +24> ^ +25> ^^ +26> ^^ +27> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > let {name: nameA = "noName", skill: skillA = "skill" } = getRobot() +7 > +8 > name: nameA = "noName" +9 > +10> name: nameA = "noName" +11> , +12> skill: skillA = "skill" +13> +14> skill: skillA = "skill" +15> } = getRobot(), +16> i +17> = +18> 0 +19> ; +20> i +21> < +22> 1 +23> ; +24> i +25> ++ +26> ) +27> { +1->Emitted(30, 1) Source(64, 1) + SourceIndex(0) +2 >Emitted(30, 4) Source(64, 4) + SourceIndex(0) +3 >Emitted(30, 5) Source(64, 5) + SourceIndex(0) +4 >Emitted(30, 6) Source(64, 6) + SourceIndex(0) +5 >Emitted(30, 10) Source(64, 6) + SourceIndex(0) +6 >Emitted(30, 25) Source(64, 73) + SourceIndex(0) +7 >Emitted(30, 27) Source(64, 11) + SourceIndex(0) +8 >Emitted(30, 39) Source(64, 33) + SourceIndex(0) +9 >Emitted(30, 41) Source(64, 11) + SourceIndex(0) +10>Emitted(30, 78) Source(64, 33) + SourceIndex(0) +11>Emitted(30, 80) Source(64, 35) + SourceIndex(0) +12>Emitted(30, 93) Source(64, 58) + SourceIndex(0) +13>Emitted(30, 95) Source(64, 35) + SourceIndex(0) +14>Emitted(30, 132) Source(64, 58) + SourceIndex(0) +15>Emitted(30, 134) Source(64, 75) + SourceIndex(0) +16>Emitted(30, 135) Source(64, 76) + SourceIndex(0) +17>Emitted(30, 138) Source(64, 79) + SourceIndex(0) +18>Emitted(30, 139) Source(64, 80) + SourceIndex(0) +19>Emitted(30, 141) Source(64, 82) + SourceIndex(0) +20>Emitted(30, 142) Source(64, 83) + SourceIndex(0) +21>Emitted(30, 145) Source(64, 86) + SourceIndex(0) +22>Emitted(30, 146) Source(64, 87) + SourceIndex(0) +23>Emitted(30, 148) Source(64, 89) + SourceIndex(0) +24>Emitted(30, 149) Source(64, 90) + SourceIndex(0) +25>Emitted(30, 151) Source(64, 92) + SourceIndex(0) +26>Emitted(30, 153) Source(64, 94) + SourceIndex(0) +27>Emitted(30, 154) Source(64, 95) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(31, 5) Source(65, 5) + SourceIndex(0) +2 >Emitted(31, 12) Source(65, 12) + SourceIndex(0) +3 >Emitted(31, 13) Source(65, 13) + SourceIndex(0) +4 >Emitted(31, 16) Source(65, 16) + SourceIndex(0) +5 >Emitted(31, 17) Source(65, 17) + SourceIndex(0) +6 >Emitted(31, 22) Source(65, 22) + SourceIndex(0) +7 >Emitted(31, 23) Source(65, 23) + SourceIndex(0) +8 >Emitted(31, 24) Source(65, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(32, 1) Source(66, 1) + SourceIndex(0) +2 >Emitted(32, 2) Source(66, 2) + SourceIndex(0) +--- +>>>for (var _w = { name: "trimmer", skill: "trimming" }, _x = _w.name, nameA = _x === void 0 ? "noName" : _x, _y = _w.skill, skillA = _y === void 0 ? "skill" : _y, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^ +17> ^^^ +18> ^ +19> ^^ +20> ^ +21> ^^^ +22> ^ +23> ^^ +24> ^ +25> ^^ +26> ^^ +27> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > let {name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" } +7 > +8 > name: nameA = "noName" +9 > +10> name: nameA = "noName" +11> , +12> skill: skillA = "skill" +13> +14> skill: skillA = "skill" +15> } = { name: "trimmer", skill: "trimming" }, +16> i +17> = +18> 0 +19> ; +20> i +21> < +22> 1 +23> ; +24> i +25> ++ +26> ) +27> { +1->Emitted(33, 1) Source(67, 1) + SourceIndex(0) +2 >Emitted(33, 4) Source(67, 4) + SourceIndex(0) +3 >Emitted(33, 5) Source(67, 5) + SourceIndex(0) +4 >Emitted(33, 6) Source(67, 6) + SourceIndex(0) +5 >Emitted(33, 10) Source(67, 6) + SourceIndex(0) +6 >Emitted(33, 53) Source(67, 108) + SourceIndex(0) +7 >Emitted(33, 55) Source(67, 11) + SourceIndex(0) +8 >Emitted(33, 67) Source(67, 33) + SourceIndex(0) +9 >Emitted(33, 69) Source(67, 11) + SourceIndex(0) +10>Emitted(33, 106) Source(67, 33) + SourceIndex(0) +11>Emitted(33, 108) Source(67, 35) + SourceIndex(0) +12>Emitted(33, 121) Source(67, 58) + SourceIndex(0) +13>Emitted(33, 123) Source(67, 35) + SourceIndex(0) +14>Emitted(33, 160) Source(67, 58) + SourceIndex(0) +15>Emitted(33, 162) Source(67, 110) + SourceIndex(0) +16>Emitted(33, 163) Source(67, 111) + SourceIndex(0) +17>Emitted(33, 166) Source(67, 114) + SourceIndex(0) +18>Emitted(33, 167) Source(67, 115) + SourceIndex(0) +19>Emitted(33, 169) Source(67, 117) + SourceIndex(0) +20>Emitted(33, 170) Source(67, 118) + SourceIndex(0) +21>Emitted(33, 173) Source(67, 121) + SourceIndex(0) +22>Emitted(33, 174) Source(67, 122) + SourceIndex(0) +23>Emitted(33, 176) Source(67, 124) + SourceIndex(0) +24>Emitted(33, 177) Source(67, 125) + SourceIndex(0) +25>Emitted(33, 179) Source(67, 127) + SourceIndex(0) +26>Emitted(33, 181) Source(67, 129) + SourceIndex(0) +27>Emitted(33, 182) Source(67, 130) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(34, 5) Source(68, 5) + SourceIndex(0) +2 >Emitted(34, 12) Source(68, 12) + SourceIndex(0) +3 >Emitted(34, 13) Source(68, 13) + SourceIndex(0) +4 >Emitted(34, 16) Source(68, 16) + SourceIndex(0) +5 >Emitted(34, 17) Source(68, 17) + SourceIndex(0) +6 >Emitted(34, 22) Source(68, 22) + SourceIndex(0) +7 >Emitted(34, 23) Source(68, 23) + SourceIndex(0) +8 >Emitted(34, 24) Source(68, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(35, 1) Source(69, 1) + SourceIndex(0) +2 >Emitted(35, 2) Source(69, 2) + SourceIndex(0) +--- +>>>for (var _z = multiRobot.name, nameA = _z === void 0 ? "noName" : _z, _0 = multiRobot.skills, _1 = _0 === void 0 ? { primary: "none", secondary: "none" } : _0, _2 = _1.primary, primaryA = _2 === void 0 ? "primary" : _2, _3 = _1.secondary, secondaryA = _3 === void 0 ? "secondary" : _3, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^^^^^^^^^^^^ +14> ^^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +16> ^^ +17> ^^^^^^^^^^^^^^^^^ +18> ^^ +19> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^^ +27> ^ +28> ^^ +29> ^ +30> ^^ +31> ^^ +32> ^ +1-> + > +2 >for +3 > +4 > (let { + > +5 > name: nameA = "noName" +6 > +7 > name: nameA = "noName" +8 > , + > +9 > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } +10> +11> skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } +12> +13> primary: primaryA = "primary" +14> +15> primary: primaryA = "primary" +16> , + > +17> secondary: secondaryA = "secondary" +18> +19> secondary: secondaryA = "secondary" +20> + > } = { primary: "none", secondary: "none" } + > } = multiRobot, +21> i +22> = +23> 0 +24> ; +25> i +26> < +27> 1 +28> ; +29> i +30> ++ +31> ) +32> { +1->Emitted(36, 1) Source(70, 1) + SourceIndex(0) +2 >Emitted(36, 4) Source(70, 4) + SourceIndex(0) +3 >Emitted(36, 5) Source(70, 5) + SourceIndex(0) +4 >Emitted(36, 6) Source(71, 5) + SourceIndex(0) +5 >Emitted(36, 30) Source(71, 27) + SourceIndex(0) +6 >Emitted(36, 32) Source(71, 5) + SourceIndex(0) +7 >Emitted(36, 69) Source(71, 27) + SourceIndex(0) +8 >Emitted(36, 71) Source(72, 5) + SourceIndex(0) +9 >Emitted(36, 93) Source(75, 47) + SourceIndex(0) +10>Emitted(36, 95) Source(72, 5) + SourceIndex(0) +11>Emitted(36, 159) Source(75, 47) + SourceIndex(0) +12>Emitted(36, 161) Source(73, 9) + SourceIndex(0) +13>Emitted(36, 176) Source(73, 38) + SourceIndex(0) +14>Emitted(36, 178) Source(73, 9) + SourceIndex(0) +15>Emitted(36, 219) Source(73, 38) + SourceIndex(0) +16>Emitted(36, 221) Source(74, 9) + SourceIndex(0) +17>Emitted(36, 238) Source(74, 44) + SourceIndex(0) +18>Emitted(36, 240) Source(74, 9) + SourceIndex(0) +19>Emitted(36, 285) Source(74, 44) + SourceIndex(0) +20>Emitted(36, 287) Source(76, 17) + SourceIndex(0) +21>Emitted(36, 288) Source(76, 18) + SourceIndex(0) +22>Emitted(36, 291) Source(76, 21) + SourceIndex(0) +23>Emitted(36, 292) Source(76, 22) + SourceIndex(0) +24>Emitted(36, 294) Source(76, 24) + SourceIndex(0) +25>Emitted(36, 295) Source(76, 25) + SourceIndex(0) +26>Emitted(36, 298) Source(76, 28) + SourceIndex(0) +27>Emitted(36, 299) Source(76, 29) + SourceIndex(0) +28>Emitted(36, 301) Source(76, 31) + SourceIndex(0) +29>Emitted(36, 302) Source(76, 32) + SourceIndex(0) +30>Emitted(36, 304) Source(76, 34) + SourceIndex(0) +31>Emitted(36, 306) Source(76, 36) + SourceIndex(0) +32>Emitted(36, 307) Source(76, 37) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(37, 5) Source(77, 5) + SourceIndex(0) +2 >Emitted(37, 12) Source(77, 12) + SourceIndex(0) +3 >Emitted(37, 13) Source(77, 13) + SourceIndex(0) +4 >Emitted(37, 16) Source(77, 16) + SourceIndex(0) +5 >Emitted(37, 17) Source(77, 17) + SourceIndex(0) +6 >Emitted(37, 25) Source(77, 25) + SourceIndex(0) +7 >Emitted(37, 26) Source(77, 26) + SourceIndex(0) +8 >Emitted(37, 27) Source(77, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(38, 1) Source(78, 1) + SourceIndex(0) +2 >Emitted(38, 2) Source(78, 2) + SourceIndex(0) +--- +>>>for (var _4 = getMultiRobot(), _5 = _4.name, nameA = _5 === void 0 ? "noName" : _5, _6 = _4.skills, _7 = _6 === void 0 ? { primary: "none", secondary: "none" } : _6, _8 = _7.primary, primaryA = _8 === void 0 ? "primary" : _8, _9 = _7.secondary, secondaryA = _9 === void 0 ? "secondary" : _9, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +19> ^^ +20> ^^^^^^^^^^^^^^^^^ +21> ^^ +22> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +23> ^^ +24> ^ +25> ^^^ +26> ^ +27> ^^ +28> ^ +29> ^^^ +30> ^ +31> ^^ +32> ^ +33> ^^ +34> ^^ +35> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > let { + > name: nameA = "noName", + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + > } = getMultiRobot() +7 > +8 > name: nameA = "noName" +9 > +10> name: nameA = "noName" +11> , + > +12> skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } +13> +14> skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } +15> +16> primary: primaryA = "primary" +17> +18> primary: primaryA = "primary" +19> , + > +20> secondary: secondaryA = "secondary" +21> +22> secondary: secondaryA = "secondary" +23> + > } = { primary: "none", secondary: "none" } + > } = getMultiRobot(), +24> i +25> = +26> 0 +27> ; +28> i +29> < +30> 1 +31> ; +32> i +33> ++ +34> ) +35> { +1->Emitted(39, 1) Source(79, 1) + SourceIndex(0) +2 >Emitted(39, 4) Source(79, 4) + SourceIndex(0) +3 >Emitted(39, 5) Source(79, 5) + SourceIndex(0) +4 >Emitted(39, 6) Source(79, 6) + SourceIndex(0) +5 >Emitted(39, 10) Source(79, 6) + SourceIndex(0) +6 >Emitted(39, 30) Source(85, 20) + SourceIndex(0) +7 >Emitted(39, 32) Source(80, 5) + SourceIndex(0) +8 >Emitted(39, 44) Source(80, 27) + SourceIndex(0) +9 >Emitted(39, 46) Source(80, 5) + SourceIndex(0) +10>Emitted(39, 83) Source(80, 27) + SourceIndex(0) +11>Emitted(39, 85) Source(81, 5) + SourceIndex(0) +12>Emitted(39, 99) Source(84, 47) + SourceIndex(0) +13>Emitted(39, 101) Source(81, 5) + SourceIndex(0) +14>Emitted(39, 165) Source(84, 47) + SourceIndex(0) +15>Emitted(39, 167) Source(82, 9) + SourceIndex(0) +16>Emitted(39, 182) Source(82, 38) + SourceIndex(0) +17>Emitted(39, 184) Source(82, 9) + SourceIndex(0) +18>Emitted(39, 225) Source(82, 38) + SourceIndex(0) +19>Emitted(39, 227) Source(83, 9) + SourceIndex(0) +20>Emitted(39, 244) Source(83, 44) + SourceIndex(0) +21>Emitted(39, 246) Source(83, 9) + SourceIndex(0) +22>Emitted(39, 291) Source(83, 44) + SourceIndex(0) +23>Emitted(39, 293) Source(85, 22) + SourceIndex(0) +24>Emitted(39, 294) Source(85, 23) + SourceIndex(0) +25>Emitted(39, 297) Source(85, 26) + SourceIndex(0) +26>Emitted(39, 298) Source(85, 27) + SourceIndex(0) +27>Emitted(39, 300) Source(85, 29) + SourceIndex(0) +28>Emitted(39, 301) Source(85, 30) + SourceIndex(0) +29>Emitted(39, 304) Source(85, 33) + SourceIndex(0) +30>Emitted(39, 305) Source(85, 34) + SourceIndex(0) +31>Emitted(39, 307) Source(85, 36) + SourceIndex(0) +32>Emitted(39, 308) Source(85, 37) + SourceIndex(0) +33>Emitted(39, 310) Source(85, 39) + SourceIndex(0) +34>Emitted(39, 312) Source(85, 41) + SourceIndex(0) +35>Emitted(39, 313) Source(85, 42) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(40, 5) Source(86, 5) + SourceIndex(0) +2 >Emitted(40, 12) Source(86, 12) + SourceIndex(0) +3 >Emitted(40, 13) Source(86, 13) + SourceIndex(0) +4 >Emitted(40, 16) Source(86, 16) + SourceIndex(0) +5 >Emitted(40, 17) Source(86, 17) + SourceIndex(0) +6 >Emitted(40, 25) Source(86, 25) + SourceIndex(0) +7 >Emitted(40, 26) Source(86, 26) + SourceIndex(0) +8 >Emitted(40, 27) Source(86, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(41, 1) Source(87, 1) + SourceIndex(0) +2 >Emitted(41, 2) Source(87, 2) + SourceIndex(0) +--- +>>>for (var _10 = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, _11 = _10.name, nameA = _11 === void 0 ? "noName" : _11, _12 = _10.skills, _13 = _12 === void 0 ? { primary: "none", secondary: "none" } : _12, _14 = _13.primary, primaryA = _14 === void 0 ? "primary" : _14, _15 = _13.secondary, secondaryA = _15 === void 0 ? "secondary" : _15, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +19> ^^ +20> ^^^^^^^^^^^^^^^^^^^ +21> ^^ +22> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +23> ^^ +24> ^ +25> ^^^ +26> ^ +27> ^^ +28> ^ +29> ^^^ +30> ^ +31> ^^ +32> ^ +33> ^^ +34> ^^ +35> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > let { + > name: nameA = "noName", + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + > } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } +7 > +8 > name: nameA = "noName" +9 > +10> name: nameA = "noName" +11> , + > +12> skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } +13> +14> skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } +15> +16> primary: primaryA = "primary" +17> +18> primary: primaryA = "primary" +19> , + > +20> secondary: secondaryA = "secondary" +21> +22> secondary: secondaryA = "secondary" +23> + > } = { primary: "none", secondary: "none" } + > } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + > +24> i +25> = +26> 0 +27> ; +28> i +29> < +30> 1 +31> ; +32> i +33> ++ +34> ) +35> { +1->Emitted(42, 1) Source(88, 1) + SourceIndex(0) +2 >Emitted(42, 4) Source(88, 4) + SourceIndex(0) +3 >Emitted(42, 5) Source(88, 5) + SourceIndex(0) +4 >Emitted(42, 6) Source(88, 6) + SourceIndex(0) +5 >Emitted(42, 10) Source(88, 6) + SourceIndex(0) +6 >Emitted(42, 89) Source(94, 90) + SourceIndex(0) +7 >Emitted(42, 91) Source(89, 5) + SourceIndex(0) +8 >Emitted(42, 105) Source(89, 27) + SourceIndex(0) +9 >Emitted(42, 107) Source(89, 5) + SourceIndex(0) +10>Emitted(42, 146) Source(89, 27) + SourceIndex(0) +11>Emitted(42, 148) Source(90, 5) + SourceIndex(0) +12>Emitted(42, 164) Source(93, 47) + SourceIndex(0) +13>Emitted(42, 166) Source(90, 5) + SourceIndex(0) +14>Emitted(42, 233) Source(93, 47) + SourceIndex(0) +15>Emitted(42, 235) Source(91, 9) + SourceIndex(0) +16>Emitted(42, 252) Source(91, 38) + SourceIndex(0) +17>Emitted(42, 254) Source(91, 9) + SourceIndex(0) +18>Emitted(42, 297) Source(91, 38) + SourceIndex(0) +19>Emitted(42, 299) Source(92, 9) + SourceIndex(0) +20>Emitted(42, 318) Source(92, 44) + SourceIndex(0) +21>Emitted(42, 320) Source(92, 9) + SourceIndex(0) +22>Emitted(42, 367) Source(92, 44) + SourceIndex(0) +23>Emitted(42, 369) Source(95, 5) + SourceIndex(0) +24>Emitted(42, 370) Source(95, 6) + SourceIndex(0) +25>Emitted(42, 373) Source(95, 9) + SourceIndex(0) +26>Emitted(42, 374) Source(95, 10) + SourceIndex(0) +27>Emitted(42, 376) Source(95, 12) + SourceIndex(0) +28>Emitted(42, 377) Source(95, 13) + SourceIndex(0) +29>Emitted(42, 380) Source(95, 16) + SourceIndex(0) +30>Emitted(42, 381) Source(95, 17) + SourceIndex(0) +31>Emitted(42, 383) Source(95, 19) + SourceIndex(0) +32>Emitted(42, 384) Source(95, 20) + SourceIndex(0) +33>Emitted(42, 386) Source(95, 22) + SourceIndex(0) +34>Emitted(42, 388) Source(95, 24) + SourceIndex(0) +35>Emitted(42, 389) Source(95, 25) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(43, 5) Source(96, 5) + SourceIndex(0) +2 >Emitted(43, 12) Source(96, 12) + SourceIndex(0) +3 >Emitted(43, 13) Source(96, 13) + SourceIndex(0) +4 >Emitted(43, 16) Source(96, 16) + SourceIndex(0) +5 >Emitted(43, 17) Source(96, 17) + SourceIndex(0) +6 >Emitted(43, 25) Source(96, 25) + SourceIndex(0) +7 >Emitted(43, 26) Source(96, 26) + SourceIndex(0) +8 >Emitted(43, 27) Source(96, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(44, 1) Source(97, 1) + SourceIndex(0) +2 >Emitted(44, 2) Source(97, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.symbols b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.symbols new file mode 100644 index 00000000000..5d47a45699e --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.symbols @@ -0,0 +1,350 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 11)) + + log(msg: any): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 1, 8)) +} +interface Robot { +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 2, 1)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 3, 17)) + + skill: string; +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 4, 17)) +} + +interface MultiRobot { +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 6, 1)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 8, 22)) + + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 9, 17)) + + primary?: string; +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 10, 13)) + + secondary?: string; +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 11, 25)) + + }; +} + +let robot: Robot = { name: "mower", skill: "mowing" }; +>robot : Symbol(robot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 16, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 16, 20)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 16, 35)) + +let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +>multiRobot : Symbol(multiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 17, 3)) +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 17, 30)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 17, 45)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 17, 55)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 17, 74)) + +function getRobot() { +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 17, 97)) + + return robot; +>robot : Symbol(robot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 16, 3)) +} +function getMultiRobot() { +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 20, 1)) + + return multiRobot; +>multiRobot : Symbol(multiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 17, 3)) +} + +for (let {name: nameA= "noName" } = robot, i = 0; i < 1; i++) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 25, 10)) +>robot : Symbol(robot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 16, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 25, 42)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 25, 42)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 25, 42)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 25, 10)) +} +for (let {name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 28, 10)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 17, 97)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 28, 48)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 28, 48)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 28, 48)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 28, 10)) +} +for (let {name: nameA = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 31, 10)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 31, 45)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 31, 62)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 31, 83)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 31, 83)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 31, 83)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 31, 10)) +} +for (let { + skills: { +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 9, 17)) + + primary: primaryA = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 35, 13)) + + secondary: secondaryA = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 11, 25)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 36, 38)) + + } = { primary: "none", secondary: "none" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 38, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 38, 26)) + +} = multiRobot, i = 0; i < 1; i++) { +>multiRobot : Symbol(multiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 17, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 39, 15)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 39, 15)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 39, 15)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 35, 13)) +} +for (let { + skills: { +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 9, 17)) + + primary: primaryA = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 43, 13)) + + secondary: secondaryA = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 11, 25)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 44, 38)) + + } = { primary: "none", secondary: "none" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 46, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 46, 26)) + +} = getMultiRobot(), i = 0; i < 1; i++) { +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 20, 1)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 47, 20)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 47, 20)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 47, 20)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 43, 13)) +} +for (let { + skills: { +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 9, 17)) + + primary: primaryA = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 51, 13)) + + secondary: secondaryA = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 11, 25)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 52, 38)) + + } = { primary: "none", secondary: "none" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 54, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 54, 26)) + +} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 55, 17)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 55, 34)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 55, 44)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 55, 65)) + + i = 0; i < 1; i++) { +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 55, 90)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 55, 90)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 55, 90)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 51, 13)) +} + +for (let {name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i++) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 60, 10)) +>skill : Symbol(Robot.skill, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 4, 17)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 60, 33)) +>robot : Symbol(robot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 16, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 60, 68)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 60, 68)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 60, 68)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 60, 10)) +} +for (let {name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 63, 10)) +>skill : Symbol(Robot.skill, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 4, 17)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 63, 33)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 17, 97)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 63, 73)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 63, 73)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 63, 73)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 63, 10)) +} +for (let {name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 66, 10)) +>skill : Symbol(Robot.skill, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 4, 17)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 66, 33)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 66, 70)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 66, 87)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 66, 108)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 66, 108)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 66, 108)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 66, 10)) +} +for (let { + name: nameA = "noName", +>name : Symbol(MultiRobot.name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 8, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 69, 10)) + + skills: { +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 9, 17)) + + primary: primaryA = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 71, 13)) + + secondary: secondaryA = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 11, 25)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 72, 38)) + + } = { primary: "none", secondary: "none" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 74, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 74, 26)) + +} = multiRobot, i = 0; i < 1; i++) { +>multiRobot : Symbol(multiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 17, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 75, 15)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 75, 15)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 75, 15)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 71, 13)) +} +for (let { + name: nameA = "noName", +>name : Symbol(MultiRobot.name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 8, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 78, 10)) + + skills: { +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 9, 17)) + + primary: primaryA = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 80, 13)) + + secondary: secondaryA = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 11, 25)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 81, 38)) + + } = { primary: "none", secondary: "none" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 83, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 83, 26)) + +} = getMultiRobot(), i = 0; i < 1; i++) { +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 20, 1)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 84, 20)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 84, 20)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 84, 20)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 80, 13)) +} +for (let { + name: nameA = "noName", +>name : Symbol(MultiRobot.name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 8, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 87, 10)) + + skills: { +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 9, 17)) + + primary: primaryA = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 89, 13)) + + secondary: secondaryA = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 11, 25)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 90, 38)) + + } = { primary: "none", secondary: "none" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 92, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 92, 26)) + +} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 93, 17)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 93, 34)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 93, 44)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 93, 65)) + + i = 0; i < 1; i++) { +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 93, 90)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 93, 90)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 93, 90)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts, 89, 13)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.types b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.types new file mode 100644 index 00000000000..c9e76f88581 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.types @@ -0,0 +1,484 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts === +declare var console: { +>console : { log(msg: any): void; } + + log(msg: any): void; +>log : (msg: any) => void +>msg : any +} +interface Robot { +>Robot : Robot + + name: string; +>name : string + + skill: string; +>skill : string +} + +interface MultiRobot { +>MultiRobot : MultiRobot + + name: string; +>name : string + + skills: { +>skills : { primary?: string; secondary?: string; } + + primary?: string; +>primary : string + + secondary?: string; +>secondary : string + + }; +} + +let robot: Robot = { name: "mower", skill: "mowing" }; +>robot : Robot +>Robot : Robot +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string + +let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +>multiRobot : MultiRobot +>MultiRobot : MultiRobot +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"mower" : string +>skills : { primary: string; secondary: string; } +>{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } +>primary : string +>"mowing" : string +>secondary : string +>"none" : string + +function getRobot() { +>getRobot : () => Robot + + return robot; +>robot : Robot +} +function getMultiRobot() { +>getMultiRobot : () => MultiRobot + + return multiRobot; +>multiRobot : MultiRobot +} + +for (let {name: nameA= "noName" } = robot, i = 0; i < 1; i++) { +>name : any +>nameA : string +>"noName" : string +>robot : Robot +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let {name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) { +>name : any +>nameA : string +>"noName" : string +>getRobot() : Robot +>getRobot : () => Robot +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let {name: nameA = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>name : any +>nameA : string +>"noName" : string +>{ name: "trimmer", skill: "trimming" } : Robot +>Robot : Robot +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let { + skills: { +>skills : any + + primary: primaryA = "primary", +>primary : any +>primaryA : string +>"primary" : string + + secondary: secondaryA = "secondary" +>secondary : any +>secondaryA : string +>"secondary" : string + + } = { primary: "none", secondary: "none" } +>{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>primary : string +>"none" : string +>secondary : string +>"none" : string + +} = multiRobot, i = 0; i < 1; i++) { +>multiRobot : MultiRobot +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for (let { + skills: { +>skills : any + + primary: primaryA = "primary", +>primary : any +>primaryA : string +>"primary" : string + + secondary: secondaryA = "secondary" +>secondary : any +>secondaryA : string +>"secondary" : string + + } = { primary: "none", secondary: "none" } +>{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>primary : string +>"none" : string +>secondary : string +>"none" : string + +} = getMultiRobot(), i = 0; i < 1; i++) { +>getMultiRobot() : MultiRobot +>getMultiRobot : () => MultiRobot +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for (let { + skills: { +>skills : any + + primary: primaryA = "primary", +>primary : any +>primaryA : string +>"primary" : string + + secondary: secondaryA = "secondary" +>secondary : any +>secondaryA : string +>"secondary" : string + + } = { primary: "none", secondary: "none" } +>{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>primary : string +>"none" : string +>secondary : string +>"none" : string + +} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot +>MultiRobot : MultiRobot +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + + i = 0; i < 1; i++) { +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} + +for (let {name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i++) { +>name : any +>nameA : string +>"noName" : string +>skill : any +>skillA : string +>"skill" : string +>robot : Robot +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let {name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) { +>name : any +>nameA : string +>"noName" : string +>skill : any +>skillA : string +>"skill" : string +>getRobot() : Robot +>getRobot : () => Robot +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let {name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>name : any +>nameA : string +>"noName" : string +>skill : any +>skillA : string +>"skill" : string +>{ name: "trimmer", skill: "trimming" } : Robot +>Robot : Robot +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let { + name: nameA = "noName", +>name : any +>nameA : string +>"noName" : string + + skills: { +>skills : any + + primary: primaryA = "primary", +>primary : any +>primaryA : string +>"primary" : string + + secondary: secondaryA = "secondary" +>secondary : any +>secondaryA : string +>"secondary" : string + + } = { primary: "none", secondary: "none" } +>{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>primary : string +>"none" : string +>secondary : string +>"none" : string + +} = multiRobot, i = 0; i < 1; i++) { +>multiRobot : MultiRobot +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for (let { + name: nameA = "noName", +>name : any +>nameA : string +>"noName" : string + + skills: { +>skills : any + + primary: primaryA = "primary", +>primary : any +>primaryA : string +>"primary" : string + + secondary: secondaryA = "secondary" +>secondary : any +>secondaryA : string +>"secondary" : string + + } = { primary: "none", secondary: "none" } +>{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>primary : string +>"none" : string +>secondary : string +>"none" : string + +} = getMultiRobot(), i = 0; i < 1; i++) { +>getMultiRobot() : MultiRobot +>getMultiRobot : () => MultiRobot +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for (let { + name: nameA = "noName", +>name : any +>nameA : string +>"noName" : string + + skills: { +>skills : any + + primary: primaryA = "primary", +>primary : any +>primaryA : string +>"primary" : string + + secondary: secondaryA = "secondary" +>secondary : any +>secondaryA : string +>"secondary" : string + + } = { primary: "none", secondary: "none" } +>{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>primary : string +>"none" : string +>secondary : string +>"none" : string + +} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot +>MultiRobot : MultiRobot +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + + i = 0; i < 1; i++) { +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.js b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.js new file mode 100644 index 00000000000..a360326c1ca --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.js @@ -0,0 +1,265 @@ +//// [sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts] +declare var console: { + log(msg: any): void; +} +interface Robot { + name: string; + skill: string; +} + +interface MultiRobot { + name: string; + skills: { + primary?: string; + secondary?: string; + }; +} + +let robot: Robot = { name: "mower", skill: "mowing" }; +let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +function getRobot() { + return robot; +} +function getMultiRobot() { + return multiRobot; +} + +let nameA: string, primaryA: string, secondaryA: string, i: number, skillA: string; +let name: string, primary: string, secondary: string, skill: string; + +for ({name: nameA = "noName" } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for ({name: nameA = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "none", secondary: "none" } +} = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "none", secondary: "none" } +} = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "none", secondary: "none" } +} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} + +for ({ name = "noName" } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name = "noName" } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ + skills: { + primary = "primary", + secondary = "secondary" + } = { primary: "none", secondary: "none" } +} = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ + skills: { + primary = "primary", + secondary = "secondary" + } = { primary: "none", secondary: "none" } +} = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ + skills: { + primary = "primary", + secondary = "secondary" + } = { primary: "none", secondary: "none" } +} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} + + +for ({name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for ({name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ + name: nameA = "noName", + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "none", secondary: "none" } +} = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ + name: nameA = "noName", + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "none", secondary: "none" } +} = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ + name: nameA = "noName", + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "none", secondary: "none" } +} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} + +for ({ name = "noName", skill = "skill" } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name = "noName", skill = "skill" } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name = "noName", skill = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ + name = "noName", + skills: { + primary = "primary", + secondary = "secondary" + } = { primary: "none", secondary: "none" } +} = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ + name = "noName", + skills: { + primary = "primary", + secondary = "secondary" + } = { primary: "none", secondary: "none" } +} = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ + name = "noName", + skills: { + primary = "primary", + secondary = "secondary" + } = { primary: "none", secondary: "none" } +} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} + +//// [sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.js] +var robot = { name: "mower", skill: "mowing" }; +var multiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +function getRobot() { + return robot; +} +function getMultiRobot() { + return multiRobot; +} +var nameA, primaryA, secondaryA, i, skillA; +var name, primary, secondary, skill; +for ((_a = robot.name, nameA = _a === void 0 ? "noName" : _a, robot), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_b = getRobot(), _c = _b.name, nameA = _c === void 0 ? "noName" : _c, _b), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_d = { name: "trimmer", skill: "trimming" }, _e = _d.name, nameA = _e === void 0 ? "noName" : _e, _d), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_f = multiRobot.skills, _g = _f === void 0 ? { primary: "none", secondary: "none" } : _f, _h = _g.primary, primaryA = _h === void 0 ? "primary" : _h, _j = _g.secondary, secondaryA = _j === void 0 ? "secondary" : _j, multiRobot), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ((_k = getMultiRobot(), _l = _k.skills, _m = _l === void 0 ? { primary: "none", secondary: "none" } : _l, _o = _m.primary, primaryA = _o === void 0 ? "primary" : _o, _p = _m.secondary, secondaryA = _p === void 0 ? "secondary" : _p, _k), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ((_q = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, _r = _q.skills, _s = _r === void 0 ? { primary: "none", secondary: "none" } : _r, _t = _s.primary, primaryA = _t === void 0 ? "primary" : _t, _u = _s.secondary, secondaryA = _u === void 0 ? "secondary" : _u, _q), + i = 0; i < 1; i++) { + console.log(primaryA); +} +for ((_v = robot.name, name = _v === void 0 ? "noName" : _v, robot), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_w = getRobot(), _x = _w.name, name = _x === void 0 ? "noName" : _x, _w), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_y = { name: "trimmer", skill: "trimming" }, _z = _y.name, name = _z === void 0 ? "noName" : _z, _y), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_0 = multiRobot.skills, _1 = _0 === void 0 ? { primary: "none", secondary: "none" } : _0, _2 = _1.primary, primary = _2 === void 0 ? "primary" : _2, _3 = _1.secondary, secondary = _3 === void 0 ? "secondary" : _3, multiRobot), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ((_4 = getMultiRobot(), _5 = _4.skills, _6 = _5 === void 0 ? { primary: "none", secondary: "none" } : _5, _7 = _6.primary, primary = _7 === void 0 ? "primary" : _7, _8 = _6.secondary, secondary = _8 === void 0 ? "secondary" : _8, _4), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ((_9 = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, _10 = _9.skills, _11 = _10 === void 0 ? { primary: "none", secondary: "none" } : _10, _12 = _11.primary, primary = _12 === void 0 ? "primary" : _12, _13 = _11.secondary, secondary = _13 === void 0 ? "secondary" : _13, _9), + i = 0; i < 1; i++) { + console.log(primaryA); +} +for ((_14 = robot.name, nameA = _14 === void 0 ? "noName" : _14, _15 = robot.skill, skillA = _15 === void 0 ? "skill" : _15, robot), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_16 = getRobot(), _17 = _16.name, nameA = _17 === void 0 ? "noName" : _17, _18 = _16.skill, skillA = _18 === void 0 ? "skill" : _18, _16), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_19 = { name: "trimmer", skill: "trimming" }, _20 = _19.name, nameA = _20 === void 0 ? "noName" : _20, _21 = _19.skill, skillA = _21 === void 0 ? "skill" : _21, _19), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_22 = multiRobot.name, nameA = _22 === void 0 ? "noName" : _22, _23 = multiRobot.skills, _24 = _23 === void 0 ? { primary: "none", secondary: "none" } : _23, _25 = _24.primary, primaryA = _25 === void 0 ? "primary" : _25, _26 = _24.secondary, secondaryA = _26 === void 0 ? "secondary" : _26, multiRobot), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ((_27 = getMultiRobot(), _28 = _27.name, nameA = _28 === void 0 ? "noName" : _28, _29 = _27.skills, _30 = _29 === void 0 ? { primary: "none", secondary: "none" } : _29, _31 = _30.primary, primaryA = _31 === void 0 ? "primary" : _31, _32 = _30.secondary, secondaryA = _32 === void 0 ? "secondary" : _32, _27), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ((_33 = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, _34 = _33.name, nameA = _34 === void 0 ? "noName" : _34, _35 = _33.skills, _36 = _35 === void 0 ? { primary: "none", secondary: "none" } : _35, _37 = _36.primary, primaryA = _37 === void 0 ? "primary" : _37, _38 = _36.secondary, secondaryA = _38 === void 0 ? "secondary" : _38, _33), + i = 0; i < 1; i++) { + console.log(primaryA); +} +for ((_39 = robot.name, name = _39 === void 0 ? "noName" : _39, _40 = robot.skill, skill = _40 === void 0 ? "skill" : _40, robot), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_41 = getRobot(), _42 = _41.name, name = _42 === void 0 ? "noName" : _42, _43 = _41.skill, skill = _43 === void 0 ? "skill" : _43, _41), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_44 = { name: "trimmer", skill: "trimming" }, _45 = _44.name, name = _45 === void 0 ? "noName" : _45, _46 = _44.skill, skill = _46 === void 0 ? "skill" : _46, _44), i = 0; i < 1; i++) { + console.log(nameA); +} +for ((_47 = multiRobot.name, name = _47 === void 0 ? "noName" : _47, _48 = multiRobot.skills, _49 = _48 === void 0 ? { primary: "none", secondary: "none" } : _48, _50 = _49.primary, primary = _50 === void 0 ? "primary" : _50, _51 = _49.secondary, secondary = _51 === void 0 ? "secondary" : _51, multiRobot), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ((_52 = getMultiRobot(), _53 = _52.name, name = _53 === void 0 ? "noName" : _53, _54 = _52.skills, _55 = _54 === void 0 ? { primary: "none", secondary: "none" } : _54, _56 = _55.primary, primary = _56 === void 0 ? "primary" : _56, _57 = _55.secondary, secondary = _57 === void 0 ? "secondary" : _57, _52), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ((_58 = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, _59 = _58.name, name = _59 === void 0 ? "noName" : _59, _60 = _58.skills, _61 = _60 === void 0 ? { primary: "none", secondary: "none" } : _60, _62 = _61.primary, primary = _62 === void 0 ? "primary" : _62, _63 = _61.secondary, secondary = _63 === void 0 ? "secondary" : _63, _58), + i = 0; i < 1; i++) { + console.log(primaryA); +} +var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63; +//# sourceMappingURL=sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.js.map new file mode 100644 index 00000000000..448921b9cdc --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.js.map] +{"version":3,"file":"sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts"],"names":[],"mappings":"AAgBA,IAAI,KAAK,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACtD,IAAI,UA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AC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,CAAA,+EAMoF,EALrF,cAAe,EAAf,sCAAe,EACf,gBAG0C,EAH1C,mEAG0C,EAFtC,iBAAmB,EAAnB,0CAAmB,EACnB,mBAAuB,EAAvB,8CAAuB,MAE0D;IACrF,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACpB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.sourcemap.txt new file mode 100644 index 00000000000..3e4d7a87855 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.sourcemap.txt @@ -0,0 +1,3589 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.js +mapUrl: sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.js.map +sourceRoot: +sources: sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.js +sourceFile:sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts +------------------------------------------------------------------- +>>>var robot = { name: "mower", skill: "mowing" }; +1 > +2 >^^^^ +3 > ^^^^^ +4 > ^^^ +5 > ^^ +6 > ^^^^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^ +11> ^^ +12> ^^^^^^^^ +13> ^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 >declare var console: { + > log(msg: any): void; + >} + >interface Robot { + > name: string; + > skill: string; + >} + > + >interface MultiRobot { + > name: string; + > skills: { + > primary?: string; + > secondary?: string; + > }; + >} + > + > +2 >let +3 > robot +4 > : Robot = +5 > { +6 > name +7 > : +8 > "mower" +9 > , +10> skill +11> : +12> "mowing" +13> } +14> ; +1 >Emitted(1, 1) Source(17, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(17, 5) + SourceIndex(0) +3 >Emitted(1, 10) Source(17, 10) + SourceIndex(0) +4 >Emitted(1, 13) Source(17, 20) + SourceIndex(0) +5 >Emitted(1, 15) Source(17, 22) + SourceIndex(0) +6 >Emitted(1, 19) Source(17, 26) + SourceIndex(0) +7 >Emitted(1, 21) Source(17, 28) + SourceIndex(0) +8 >Emitted(1, 28) Source(17, 35) + SourceIndex(0) +9 >Emitted(1, 30) Source(17, 37) + SourceIndex(0) +10>Emitted(1, 35) Source(17, 42) + SourceIndex(0) +11>Emitted(1, 37) Source(17, 44) + SourceIndex(0) +12>Emitted(1, 45) Source(17, 52) + SourceIndex(0) +13>Emitted(1, 47) Source(17, 54) + SourceIndex(0) +14>Emitted(1, 48) Source(17, 55) + SourceIndex(0) +--- +>>>var multiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +1-> +2 >^^^^ +3 > ^^^^^^^^^^ +4 > ^^^ +5 > ^^ +6 > ^^^^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^^ +11> ^^ +12> ^^ +13> ^^^^^^^ +14> ^^ +15> ^^^^^^^^ +16> ^^ +17> ^^^^^^^^^ +18> ^^ +19> ^^^^^^ +20> ^^ +21> ^^ +22> ^ +1-> + > +2 >let +3 > multiRobot +4 > : MultiRobot = +5 > { +6 > name +7 > : +8 > "mower" +9 > , +10> skills +11> : +12> { +13> primary +14> : +15> "mowing" +16> , +17> secondary +18> : +19> "none" +20> } +21> } +22> ; +1->Emitted(2, 1) Source(18, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(18, 5) + SourceIndex(0) +3 >Emitted(2, 15) Source(18, 15) + SourceIndex(0) +4 >Emitted(2, 18) Source(18, 30) + SourceIndex(0) +5 >Emitted(2, 20) Source(18, 32) + SourceIndex(0) +6 >Emitted(2, 24) Source(18, 36) + SourceIndex(0) +7 >Emitted(2, 26) Source(18, 38) + SourceIndex(0) +8 >Emitted(2, 33) Source(18, 45) + SourceIndex(0) +9 >Emitted(2, 35) Source(18, 47) + SourceIndex(0) +10>Emitted(2, 41) Source(18, 53) + SourceIndex(0) +11>Emitted(2, 43) Source(18, 55) + SourceIndex(0) +12>Emitted(2, 45) Source(18, 57) + SourceIndex(0) +13>Emitted(2, 52) Source(18, 64) + SourceIndex(0) +14>Emitted(2, 54) Source(18, 66) + SourceIndex(0) +15>Emitted(2, 62) Source(18, 74) + SourceIndex(0) +16>Emitted(2, 64) Source(18, 76) + SourceIndex(0) +17>Emitted(2, 73) Source(18, 85) + SourceIndex(0) +18>Emitted(2, 75) Source(18, 87) + SourceIndex(0) +19>Emitted(2, 81) Source(18, 93) + SourceIndex(0) +20>Emitted(2, 83) Source(18, 95) + SourceIndex(0) +21>Emitted(2, 85) Source(18, 97) + SourceIndex(0) +22>Emitted(2, 86) Source(18, 98) + SourceIndex(0) +--- +>>>function getRobot() { +1 > +2 >^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(3, 1) Source(19, 1) + SourceIndex(0) +--- +>>> return robot; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^ +5 > ^ +1->function getRobot() { + > +2 > return +3 > +4 > robot +5 > ; +1->Emitted(4, 5) Source(20, 5) + SourceIndex(0) +2 >Emitted(4, 11) Source(20, 11) + SourceIndex(0) +3 >Emitted(4, 12) Source(20, 12) + SourceIndex(0) +4 >Emitted(4, 17) Source(20, 17) + SourceIndex(0) +5 >Emitted(4, 18) Source(20, 18) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(5, 1) Source(21, 1) + SourceIndex(0) +2 >Emitted(5, 2) Source(21, 2) + SourceIndex(0) +--- +>>>function getMultiRobot() { +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +1->Emitted(6, 1) Source(22, 1) + SourceIndex(0) +--- +>>> return multiRobot; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^^^^^ +5 > ^ +1->function getMultiRobot() { + > +2 > return +3 > +4 > multiRobot +5 > ; +1->Emitted(7, 5) Source(23, 5) + SourceIndex(0) +2 >Emitted(7, 11) Source(23, 11) + SourceIndex(0) +3 >Emitted(7, 12) Source(23, 12) + SourceIndex(0) +4 >Emitted(7, 22) Source(23, 22) + SourceIndex(0) +5 >Emitted(7, 23) Source(23, 23) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(8, 1) Source(24, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(24, 2) + SourceIndex(0) +--- +>>>var nameA, primaryA, secondaryA, i, skillA; +1-> +2 >^^^^ +3 > ^^^^^ +4 > ^^ +5 > ^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^ +11> ^^^^^^ +12> ^ +1-> + > + > +2 >let +3 > nameA: string +4 > , +5 > primaryA: string +6 > , +7 > secondaryA: string +8 > , +9 > i: number +10> , +11> skillA: string +12> ; +1->Emitted(9, 1) Source(26, 1) + SourceIndex(0) +2 >Emitted(9, 5) Source(26, 5) + SourceIndex(0) +3 >Emitted(9, 10) Source(26, 18) + SourceIndex(0) +4 >Emitted(9, 12) Source(26, 20) + SourceIndex(0) +5 >Emitted(9, 20) Source(26, 36) + SourceIndex(0) +6 >Emitted(9, 22) Source(26, 38) + SourceIndex(0) +7 >Emitted(9, 32) Source(26, 56) + SourceIndex(0) +8 >Emitted(9, 34) Source(26, 58) + SourceIndex(0) +9 >Emitted(9, 35) Source(26, 67) + SourceIndex(0) +10>Emitted(9, 37) Source(26, 69) + SourceIndex(0) +11>Emitted(9, 43) Source(26, 83) + SourceIndex(0) +12>Emitted(9, 44) Source(26, 84) + SourceIndex(0) +--- +>>>var name, primary, secondary, skill; +1 > +2 >^^^^ +3 > ^^^^ +4 > ^^ +5 > ^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^ +8 > ^^ +9 > ^^^^^ +10> ^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >let +3 > name: string +4 > , +5 > primary: string +6 > , +7 > secondary: string +8 > , +9 > skill: string +10> ; +1 >Emitted(10, 1) Source(27, 1) + SourceIndex(0) +2 >Emitted(10, 5) Source(27, 5) + SourceIndex(0) +3 >Emitted(10, 9) Source(27, 17) + SourceIndex(0) +4 >Emitted(10, 11) Source(27, 19) + SourceIndex(0) +5 >Emitted(10, 18) Source(27, 34) + SourceIndex(0) +6 >Emitted(10, 20) Source(27, 36) + SourceIndex(0) +7 >Emitted(10, 29) Source(27, 53) + SourceIndex(0) +8 >Emitted(10, 31) Source(27, 55) + SourceIndex(0) +9 >Emitted(10, 36) Source(27, 68) + SourceIndex(0) +10>Emitted(10, 37) Source(27, 69) + SourceIndex(0) +--- +>>>for ((_a = robot.name, nameA = _a === void 0 ? "noName" : _a, robot), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > + > +2 >for +3 > +4 > ( +5 > { +6 > name: nameA = "noName" +7 > +8 > name: nameA = "noName" +9 > } = +10> robot +11> +12> , +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(11, 1) Source(29, 1) + SourceIndex(0) +2 >Emitted(11, 4) Source(29, 4) + SourceIndex(0) +3 >Emitted(11, 5) Source(29, 5) + SourceIndex(0) +4 >Emitted(11, 6) Source(29, 6) + SourceIndex(0) +5 >Emitted(11, 7) Source(29, 7) + SourceIndex(0) +6 >Emitted(11, 22) Source(29, 29) + SourceIndex(0) +7 >Emitted(11, 24) Source(29, 7) + SourceIndex(0) +8 >Emitted(11, 61) Source(29, 29) + SourceIndex(0) +9 >Emitted(11, 63) Source(29, 34) + SourceIndex(0) +10>Emitted(11, 68) Source(29, 39) + SourceIndex(0) +11>Emitted(11, 69) Source(29, 39) + SourceIndex(0) +12>Emitted(11, 71) Source(29, 41) + SourceIndex(0) +13>Emitted(11, 72) Source(29, 42) + SourceIndex(0) +14>Emitted(11, 75) Source(29, 45) + SourceIndex(0) +15>Emitted(11, 76) Source(29, 46) + SourceIndex(0) +16>Emitted(11, 78) Source(29, 48) + SourceIndex(0) +17>Emitted(11, 79) Source(29, 49) + SourceIndex(0) +18>Emitted(11, 82) Source(29, 52) + SourceIndex(0) +19>Emitted(11, 83) Source(29, 53) + SourceIndex(0) +20>Emitted(11, 85) Source(29, 55) + SourceIndex(0) +21>Emitted(11, 86) Source(29, 56) + SourceIndex(0) +22>Emitted(11, 88) Source(29, 58) + SourceIndex(0) +23>Emitted(11, 90) Source(29, 60) + SourceIndex(0) +24>Emitted(11, 91) Source(29, 61) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(12, 5) Source(30, 5) + SourceIndex(0) +2 >Emitted(12, 12) Source(30, 12) + SourceIndex(0) +3 >Emitted(12, 13) Source(30, 13) + SourceIndex(0) +4 >Emitted(12, 16) Source(30, 16) + SourceIndex(0) +5 >Emitted(12, 17) Source(30, 17) + SourceIndex(0) +6 >Emitted(12, 22) Source(30, 22) + SourceIndex(0) +7 >Emitted(12, 23) Source(30, 23) + SourceIndex(0) +8 >Emitted(12, 24) Source(30, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(13, 1) Source(31, 1) + SourceIndex(0) +2 >Emitted(13, 2) Source(31, 2) + SourceIndex(0) +--- +>>>for ((_b = getRobot(), _c = _b.name, nameA = _c === void 0 ? "noName" : _c, _b), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > {name: nameA = "noName" } = getRobot() +7 > +8 > name: nameA = "noName" +9 > +10> name: nameA = "noName" +11> } = getRobot() +12> , +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(14, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(14, 4) Source(32, 4) + SourceIndex(0) +3 >Emitted(14, 5) Source(32, 5) + SourceIndex(0) +4 >Emitted(14, 6) Source(32, 6) + SourceIndex(0) +5 >Emitted(14, 7) Source(32, 6) + SourceIndex(0) +6 >Emitted(14, 22) Source(32, 44) + SourceIndex(0) +7 >Emitted(14, 24) Source(32, 7) + SourceIndex(0) +8 >Emitted(14, 36) Source(32, 29) + SourceIndex(0) +9 >Emitted(14, 38) Source(32, 7) + SourceIndex(0) +10>Emitted(14, 75) Source(32, 29) + SourceIndex(0) +11>Emitted(14, 80) Source(32, 44) + SourceIndex(0) +12>Emitted(14, 82) Source(32, 46) + SourceIndex(0) +13>Emitted(14, 83) Source(32, 47) + SourceIndex(0) +14>Emitted(14, 86) Source(32, 50) + SourceIndex(0) +15>Emitted(14, 87) Source(32, 51) + SourceIndex(0) +16>Emitted(14, 89) Source(32, 53) + SourceIndex(0) +17>Emitted(14, 90) Source(32, 54) + SourceIndex(0) +18>Emitted(14, 93) Source(32, 57) + SourceIndex(0) +19>Emitted(14, 94) Source(32, 58) + SourceIndex(0) +20>Emitted(14, 96) Source(32, 60) + SourceIndex(0) +21>Emitted(14, 97) Source(32, 61) + SourceIndex(0) +22>Emitted(14, 99) Source(32, 63) + SourceIndex(0) +23>Emitted(14, 101) Source(32, 65) + SourceIndex(0) +24>Emitted(14, 102) Source(32, 66) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(15, 5) Source(33, 5) + SourceIndex(0) +2 >Emitted(15, 12) Source(33, 12) + SourceIndex(0) +3 >Emitted(15, 13) Source(33, 13) + SourceIndex(0) +4 >Emitted(15, 16) Source(33, 16) + SourceIndex(0) +5 >Emitted(15, 17) Source(33, 17) + SourceIndex(0) +6 >Emitted(15, 22) Source(33, 22) + SourceIndex(0) +7 >Emitted(15, 23) Source(33, 23) + SourceIndex(0) +8 >Emitted(15, 24) Source(33, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(16, 1) Source(34, 1) + SourceIndex(0) +2 >Emitted(16, 2) Source(34, 2) + SourceIndex(0) +--- +>>>for ((_d = { name: "trimmer", skill: "trimming" }, _e = _d.name, nameA = _e === void 0 ? "noName" : _e, _d), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > {name: nameA = "noName" } = { name: "trimmer", skill: "trimming" } +7 > +8 > name: nameA = "noName" +9 > +10> name: nameA = "noName" +11> } = { name: "trimmer", skill: "trimming" } +12> , +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(17, 1) Source(35, 1) + SourceIndex(0) +2 >Emitted(17, 4) Source(35, 4) + SourceIndex(0) +3 >Emitted(17, 5) Source(35, 5) + SourceIndex(0) +4 >Emitted(17, 6) Source(35, 6) + SourceIndex(0) +5 >Emitted(17, 7) Source(35, 6) + SourceIndex(0) +6 >Emitted(17, 50) Source(35, 79) + SourceIndex(0) +7 >Emitted(17, 52) Source(35, 7) + SourceIndex(0) +8 >Emitted(17, 64) Source(35, 29) + SourceIndex(0) +9 >Emitted(17, 66) Source(35, 7) + SourceIndex(0) +10>Emitted(17, 103) Source(35, 29) + SourceIndex(0) +11>Emitted(17, 108) Source(35, 79) + SourceIndex(0) +12>Emitted(17, 110) Source(35, 81) + SourceIndex(0) +13>Emitted(17, 111) Source(35, 82) + SourceIndex(0) +14>Emitted(17, 114) Source(35, 85) + SourceIndex(0) +15>Emitted(17, 115) Source(35, 86) + SourceIndex(0) +16>Emitted(17, 117) Source(35, 88) + SourceIndex(0) +17>Emitted(17, 118) Source(35, 89) + SourceIndex(0) +18>Emitted(17, 121) Source(35, 92) + SourceIndex(0) +19>Emitted(17, 122) Source(35, 93) + SourceIndex(0) +20>Emitted(17, 124) Source(35, 95) + SourceIndex(0) +21>Emitted(17, 125) Source(35, 96) + SourceIndex(0) +22>Emitted(17, 127) Source(35, 98) + SourceIndex(0) +23>Emitted(17, 129) Source(35, 100) + SourceIndex(0) +24>Emitted(17, 130) Source(35, 101) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(18, 5) Source(36, 5) + SourceIndex(0) +2 >Emitted(18, 12) Source(36, 12) + SourceIndex(0) +3 >Emitted(18, 13) Source(36, 13) + SourceIndex(0) +4 >Emitted(18, 16) Source(36, 16) + SourceIndex(0) +5 >Emitted(18, 17) Source(36, 17) + SourceIndex(0) +6 >Emitted(18, 22) Source(36, 22) + SourceIndex(0) +7 >Emitted(18, 23) Source(36, 23) + SourceIndex(0) +8 >Emitted(18, 24) Source(36, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(19, 1) Source(37, 1) + SourceIndex(0) +2 >Emitted(19, 2) Source(37, 2) + SourceIndex(0) +--- +>>>for ((_f = multiRobot.skills, _g = _f === void 0 ? { primary: "none", secondary: "none" } : _f, _h = _g.primary, primaryA = _h === void 0 ? "primary" : _h, _j = _g.secondary, secondaryA = _j === void 0 ? "secondary" : _j, multiRobot), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^ +19> ^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^^ +27> ^ +28> ^^ +29> ^ +30> ^^ +31> ^^ +32> ^ +1-> + > +2 >for +3 > +4 > ( +5 > { + > +6 > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } +7 > +8 > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } +9 > +10> primary: primaryA = "primary" +11> +12> primary: primaryA = "primary" +13> , + > +14> secondary: secondaryA = "secondary" +15> +16> secondary: secondaryA = "secondary" +17> + > } = { primary: "none", secondary: "none" } + > } = +18> multiRobot +19> +20> , +21> i +22> = +23> 0 +24> ; +25> i +26> < +27> 1 +28> ; +29> i +30> ++ +31> ) +32> { +1->Emitted(20, 1) Source(38, 1) + SourceIndex(0) +2 >Emitted(20, 4) Source(38, 4) + SourceIndex(0) +3 >Emitted(20, 5) Source(38, 5) + SourceIndex(0) +4 >Emitted(20, 6) Source(38, 6) + SourceIndex(0) +5 >Emitted(20, 7) Source(39, 5) + SourceIndex(0) +6 >Emitted(20, 29) Source(42, 47) + SourceIndex(0) +7 >Emitted(20, 31) Source(39, 5) + SourceIndex(0) +8 >Emitted(20, 95) Source(42, 47) + SourceIndex(0) +9 >Emitted(20, 97) Source(40, 9) + SourceIndex(0) +10>Emitted(20, 112) Source(40, 38) + SourceIndex(0) +11>Emitted(20, 114) Source(40, 9) + SourceIndex(0) +12>Emitted(20, 155) Source(40, 38) + SourceIndex(0) +13>Emitted(20, 157) Source(41, 9) + SourceIndex(0) +14>Emitted(20, 174) Source(41, 44) + SourceIndex(0) +15>Emitted(20, 176) Source(41, 9) + SourceIndex(0) +16>Emitted(20, 221) Source(41, 44) + SourceIndex(0) +17>Emitted(20, 223) Source(43, 5) + SourceIndex(0) +18>Emitted(20, 233) Source(43, 15) + SourceIndex(0) +19>Emitted(20, 234) Source(43, 15) + SourceIndex(0) +20>Emitted(20, 236) Source(43, 17) + SourceIndex(0) +21>Emitted(20, 237) Source(43, 18) + SourceIndex(0) +22>Emitted(20, 240) Source(43, 21) + SourceIndex(0) +23>Emitted(20, 241) Source(43, 22) + SourceIndex(0) +24>Emitted(20, 243) Source(43, 24) + SourceIndex(0) +25>Emitted(20, 244) Source(43, 25) + SourceIndex(0) +26>Emitted(20, 247) Source(43, 28) + SourceIndex(0) +27>Emitted(20, 248) Source(43, 29) + SourceIndex(0) +28>Emitted(20, 250) Source(43, 31) + SourceIndex(0) +29>Emitted(20, 251) Source(43, 32) + SourceIndex(0) +30>Emitted(20, 253) Source(43, 34) + SourceIndex(0) +31>Emitted(20, 255) Source(43, 36) + SourceIndex(0) +32>Emitted(20, 256) Source(43, 37) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(21, 5) Source(44, 5) + SourceIndex(0) +2 >Emitted(21, 12) Source(44, 12) + SourceIndex(0) +3 >Emitted(21, 13) Source(44, 13) + SourceIndex(0) +4 >Emitted(21, 16) Source(44, 16) + SourceIndex(0) +5 >Emitted(21, 17) Source(44, 17) + SourceIndex(0) +6 >Emitted(21, 25) Source(44, 25) + SourceIndex(0) +7 >Emitted(21, 26) Source(44, 26) + SourceIndex(0) +8 >Emitted(21, 27) Source(44, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(22, 1) Source(45, 1) + SourceIndex(0) +2 >Emitted(22, 2) Source(45, 2) + SourceIndex(0) +--- +>>>for ((_k = getMultiRobot(), _l = _k.skills, _m = _l === void 0 ? { primary: "none", secondary: "none" } : _l, _o = _m.primary, primaryA = _o === void 0 ? "primary" : _o, _p = _m.secondary, secondaryA = _p === void 0 ? "secondary" : _p, _k), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +19> ^^^^^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^^ +27> ^ +28> ^^ +29> ^ +30> ^^ +31> ^^ +32> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + > } = getMultiRobot() +7 > +8 > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } +9 > +10> skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } +11> +12> primary: primaryA = "primary" +13> +14> primary: primaryA = "primary" +15> , + > +16> secondary: secondaryA = "secondary" +17> +18> secondary: secondaryA = "secondary" +19> + > } = { primary: "none", secondary: "none" } + > } = getMultiRobot() +20> , +21> i +22> = +23> 0 +24> ; +25> i +26> < +27> 1 +28> ; +29> i +30> ++ +31> ) +32> { +1->Emitted(23, 1) Source(46, 1) + SourceIndex(0) +2 >Emitted(23, 4) Source(46, 4) + SourceIndex(0) +3 >Emitted(23, 5) Source(46, 5) + SourceIndex(0) +4 >Emitted(23, 6) Source(46, 6) + SourceIndex(0) +5 >Emitted(23, 7) Source(46, 6) + SourceIndex(0) +6 >Emitted(23, 27) Source(51, 20) + SourceIndex(0) +7 >Emitted(23, 29) Source(47, 5) + SourceIndex(0) +8 >Emitted(23, 43) Source(50, 47) + SourceIndex(0) +9 >Emitted(23, 45) Source(47, 5) + SourceIndex(0) +10>Emitted(23, 109) Source(50, 47) + SourceIndex(0) +11>Emitted(23, 111) Source(48, 9) + SourceIndex(0) +12>Emitted(23, 126) Source(48, 38) + SourceIndex(0) +13>Emitted(23, 128) Source(48, 9) + SourceIndex(0) +14>Emitted(23, 169) Source(48, 38) + SourceIndex(0) +15>Emitted(23, 171) Source(49, 9) + SourceIndex(0) +16>Emitted(23, 188) Source(49, 44) + SourceIndex(0) +17>Emitted(23, 190) Source(49, 9) + SourceIndex(0) +18>Emitted(23, 235) Source(49, 44) + SourceIndex(0) +19>Emitted(23, 240) Source(51, 20) + SourceIndex(0) +20>Emitted(23, 242) Source(51, 22) + SourceIndex(0) +21>Emitted(23, 243) Source(51, 23) + SourceIndex(0) +22>Emitted(23, 246) Source(51, 26) + SourceIndex(0) +23>Emitted(23, 247) Source(51, 27) + SourceIndex(0) +24>Emitted(23, 249) Source(51, 29) + SourceIndex(0) +25>Emitted(23, 250) Source(51, 30) + SourceIndex(0) +26>Emitted(23, 253) Source(51, 33) + SourceIndex(0) +27>Emitted(23, 254) Source(51, 34) + SourceIndex(0) +28>Emitted(23, 256) Source(51, 36) + SourceIndex(0) +29>Emitted(23, 257) Source(51, 37) + SourceIndex(0) +30>Emitted(23, 259) Source(51, 39) + SourceIndex(0) +31>Emitted(23, 261) Source(51, 41) + SourceIndex(0) +32>Emitted(23, 262) Source(51, 42) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(24, 5) Source(52, 5) + SourceIndex(0) +2 >Emitted(24, 12) Source(52, 12) + SourceIndex(0) +3 >Emitted(24, 13) Source(52, 13) + SourceIndex(0) +4 >Emitted(24, 16) Source(52, 16) + SourceIndex(0) +5 >Emitted(24, 17) Source(52, 17) + SourceIndex(0) +6 >Emitted(24, 25) Source(52, 25) + SourceIndex(0) +7 >Emitted(24, 26) Source(52, 26) + SourceIndex(0) +8 >Emitted(24, 27) Source(52, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(25, 1) Source(53, 1) + SourceIndex(0) +2 >Emitted(25, 2) Source(53, 2) + SourceIndex(0) +--- +>>>for ((_q = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, _r = _q.skills, _s = _r === void 0 ? { primary: "none", secondary: "none" } : _r, _t = _s.primary, primaryA = _t === void 0 ? "primary" : _t, _u = _s.secondary, secondaryA = _u === void 0 ? "secondary" : _u, _q), +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +19> ^^^^^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + > } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } +7 > +8 > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } +9 > +10> skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } +11> +12> primary: primaryA = "primary" +13> +14> primary: primaryA = "primary" +15> , + > +16> secondary: secondaryA = "secondary" +17> +18> secondary: secondaryA = "secondary" +19> + > } = { primary: "none", secondary: "none" } + > } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } +1->Emitted(26, 1) Source(54, 1) + SourceIndex(0) +2 >Emitted(26, 4) Source(54, 4) + SourceIndex(0) +3 >Emitted(26, 5) Source(54, 5) + SourceIndex(0) +4 >Emitted(26, 6) Source(54, 6) + SourceIndex(0) +5 >Emitted(26, 7) Source(54, 6) + SourceIndex(0) +6 >Emitted(26, 85) Source(59, 90) + SourceIndex(0) +7 >Emitted(26, 87) Source(55, 5) + SourceIndex(0) +8 >Emitted(26, 101) Source(58, 47) + SourceIndex(0) +9 >Emitted(26, 103) Source(55, 5) + SourceIndex(0) +10>Emitted(26, 167) Source(58, 47) + SourceIndex(0) +11>Emitted(26, 169) Source(56, 9) + SourceIndex(0) +12>Emitted(26, 184) Source(56, 38) + SourceIndex(0) +13>Emitted(26, 186) Source(56, 9) + SourceIndex(0) +14>Emitted(26, 227) Source(56, 38) + SourceIndex(0) +15>Emitted(26, 229) Source(57, 9) + SourceIndex(0) +16>Emitted(26, 246) Source(57, 44) + SourceIndex(0) +17>Emitted(26, 248) Source(57, 9) + SourceIndex(0) +18>Emitted(26, 293) Source(57, 44) + SourceIndex(0) +19>Emitted(26, 298) Source(59, 90) + SourceIndex(0) +--- +>>> i = 0; i < 1; i++) { +1 >^^^^ +2 > ^ +3 > ^^^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^^^ +8 > ^ +9 > ^^ +10> ^ +11> ^^ +12> ^^ +13> ^ +14> ^^^-> +1 >, + > +2 > i +3 > = +4 > 0 +5 > ; +6 > i +7 > < +8 > 1 +9 > ; +10> i +11> ++ +12> ) +13> { +1 >Emitted(27, 5) Source(60, 5) + SourceIndex(0) +2 >Emitted(27, 6) Source(60, 6) + SourceIndex(0) +3 >Emitted(27, 9) Source(60, 9) + SourceIndex(0) +4 >Emitted(27, 10) Source(60, 10) + SourceIndex(0) +5 >Emitted(27, 12) Source(60, 12) + SourceIndex(0) +6 >Emitted(27, 13) Source(60, 13) + SourceIndex(0) +7 >Emitted(27, 16) Source(60, 16) + SourceIndex(0) +8 >Emitted(27, 17) Source(60, 17) + SourceIndex(0) +9 >Emitted(27, 19) Source(60, 19) + SourceIndex(0) +10>Emitted(27, 20) Source(60, 20) + SourceIndex(0) +11>Emitted(27, 22) Source(60, 22) + SourceIndex(0) +12>Emitted(27, 24) Source(60, 24) + SourceIndex(0) +13>Emitted(27, 25) Source(60, 25) + SourceIndex(0) +--- +>>> console.log(primaryA); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1-> + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1->Emitted(28, 5) Source(61, 5) + SourceIndex(0) +2 >Emitted(28, 12) Source(61, 12) + SourceIndex(0) +3 >Emitted(28, 13) Source(61, 13) + SourceIndex(0) +4 >Emitted(28, 16) Source(61, 16) + SourceIndex(0) +5 >Emitted(28, 17) Source(61, 17) + SourceIndex(0) +6 >Emitted(28, 25) Source(61, 25) + SourceIndex(0) +7 >Emitted(28, 26) Source(61, 26) + SourceIndex(0) +8 >Emitted(28, 27) Source(61, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(29, 1) Source(62, 1) + SourceIndex(0) +2 >Emitted(29, 2) Source(62, 2) + SourceIndex(0) +--- +>>>for ((_v = robot.name, name = _v === void 0 ? "noName" : _v, robot), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > + > +2 >for +3 > +4 > ( +5 > { +6 > name = "noName" +7 > +8 > name = "noName" +9 > } = +10> robot +11> +12> , +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(30, 1) Source(64, 1) + SourceIndex(0) +2 >Emitted(30, 4) Source(64, 4) + SourceIndex(0) +3 >Emitted(30, 5) Source(64, 5) + SourceIndex(0) +4 >Emitted(30, 6) Source(64, 6) + SourceIndex(0) +5 >Emitted(30, 7) Source(64, 8) + SourceIndex(0) +6 >Emitted(30, 22) Source(64, 23) + SourceIndex(0) +7 >Emitted(30, 24) Source(64, 8) + SourceIndex(0) +8 >Emitted(30, 60) Source(64, 23) + SourceIndex(0) +9 >Emitted(30, 62) Source(64, 28) + SourceIndex(0) +10>Emitted(30, 67) Source(64, 33) + SourceIndex(0) +11>Emitted(30, 68) Source(64, 33) + SourceIndex(0) +12>Emitted(30, 70) Source(64, 35) + SourceIndex(0) +13>Emitted(30, 71) Source(64, 36) + SourceIndex(0) +14>Emitted(30, 74) Source(64, 39) + SourceIndex(0) +15>Emitted(30, 75) Source(64, 40) + SourceIndex(0) +16>Emitted(30, 77) Source(64, 42) + SourceIndex(0) +17>Emitted(30, 78) Source(64, 43) + SourceIndex(0) +18>Emitted(30, 81) Source(64, 46) + SourceIndex(0) +19>Emitted(30, 82) Source(64, 47) + SourceIndex(0) +20>Emitted(30, 84) Source(64, 49) + SourceIndex(0) +21>Emitted(30, 85) Source(64, 50) + SourceIndex(0) +22>Emitted(30, 87) Source(64, 52) + SourceIndex(0) +23>Emitted(30, 89) Source(64, 54) + SourceIndex(0) +24>Emitted(30, 90) Source(64, 55) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(31, 5) Source(65, 5) + SourceIndex(0) +2 >Emitted(31, 12) Source(65, 12) + SourceIndex(0) +3 >Emitted(31, 13) Source(65, 13) + SourceIndex(0) +4 >Emitted(31, 16) Source(65, 16) + SourceIndex(0) +5 >Emitted(31, 17) Source(65, 17) + SourceIndex(0) +6 >Emitted(31, 22) Source(65, 22) + SourceIndex(0) +7 >Emitted(31, 23) Source(65, 23) + SourceIndex(0) +8 >Emitted(31, 24) Source(65, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(32, 1) Source(66, 1) + SourceIndex(0) +2 >Emitted(32, 2) Source(66, 2) + SourceIndex(0) +--- +>>>for ((_w = getRobot(), _x = _w.name, name = _x === void 0 ? "noName" : _x, _w), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { name = "noName" } = getRobot() +7 > +8 > name = "noName" +9 > +10> name = "noName" +11> } = getRobot() +12> , +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(33, 1) Source(67, 1) + SourceIndex(0) +2 >Emitted(33, 4) Source(67, 4) + SourceIndex(0) +3 >Emitted(33, 5) Source(67, 5) + SourceIndex(0) +4 >Emitted(33, 6) Source(67, 6) + SourceIndex(0) +5 >Emitted(33, 7) Source(67, 6) + SourceIndex(0) +6 >Emitted(33, 22) Source(67, 38) + SourceIndex(0) +7 >Emitted(33, 24) Source(67, 8) + SourceIndex(0) +8 >Emitted(33, 36) Source(67, 23) + SourceIndex(0) +9 >Emitted(33, 38) Source(67, 8) + SourceIndex(0) +10>Emitted(33, 74) Source(67, 23) + SourceIndex(0) +11>Emitted(33, 79) Source(67, 38) + SourceIndex(0) +12>Emitted(33, 81) Source(67, 40) + SourceIndex(0) +13>Emitted(33, 82) Source(67, 41) + SourceIndex(0) +14>Emitted(33, 85) Source(67, 44) + SourceIndex(0) +15>Emitted(33, 86) Source(67, 45) + SourceIndex(0) +16>Emitted(33, 88) Source(67, 47) + SourceIndex(0) +17>Emitted(33, 89) Source(67, 48) + SourceIndex(0) +18>Emitted(33, 92) Source(67, 51) + SourceIndex(0) +19>Emitted(33, 93) Source(67, 52) + SourceIndex(0) +20>Emitted(33, 95) Source(67, 54) + SourceIndex(0) +21>Emitted(33, 96) Source(67, 55) + SourceIndex(0) +22>Emitted(33, 98) Source(67, 57) + SourceIndex(0) +23>Emitted(33, 100) Source(67, 59) + SourceIndex(0) +24>Emitted(33, 101) Source(67, 60) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(34, 5) Source(68, 5) + SourceIndex(0) +2 >Emitted(34, 12) Source(68, 12) + SourceIndex(0) +3 >Emitted(34, 13) Source(68, 13) + SourceIndex(0) +4 >Emitted(34, 16) Source(68, 16) + SourceIndex(0) +5 >Emitted(34, 17) Source(68, 17) + SourceIndex(0) +6 >Emitted(34, 22) Source(68, 22) + SourceIndex(0) +7 >Emitted(34, 23) Source(68, 23) + SourceIndex(0) +8 >Emitted(34, 24) Source(68, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(35, 1) Source(69, 1) + SourceIndex(0) +2 >Emitted(35, 2) Source(69, 2) + SourceIndex(0) +--- +>>>for ((_y = { name: "trimmer", skill: "trimming" }, _z = _y.name, name = _z === void 0 ? "noName" : _z, _y), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^^^^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^ +23> ^^ +24> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { name = "noName" } = { name: "trimmer", skill: "trimming" } +7 > +8 > name = "noName" +9 > +10> name = "noName" +11> } = { name: "trimmer", skill: "trimming" } +12> , +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(36, 1) Source(70, 1) + SourceIndex(0) +2 >Emitted(36, 4) Source(70, 4) + SourceIndex(0) +3 >Emitted(36, 5) Source(70, 5) + SourceIndex(0) +4 >Emitted(36, 6) Source(70, 6) + SourceIndex(0) +5 >Emitted(36, 7) Source(70, 6) + SourceIndex(0) +6 >Emitted(36, 50) Source(70, 73) + SourceIndex(0) +7 >Emitted(36, 52) Source(70, 8) + SourceIndex(0) +8 >Emitted(36, 64) Source(70, 23) + SourceIndex(0) +9 >Emitted(36, 66) Source(70, 8) + SourceIndex(0) +10>Emitted(36, 102) Source(70, 23) + SourceIndex(0) +11>Emitted(36, 107) Source(70, 73) + SourceIndex(0) +12>Emitted(36, 109) Source(70, 75) + SourceIndex(0) +13>Emitted(36, 110) Source(70, 76) + SourceIndex(0) +14>Emitted(36, 113) Source(70, 79) + SourceIndex(0) +15>Emitted(36, 114) Source(70, 80) + SourceIndex(0) +16>Emitted(36, 116) Source(70, 82) + SourceIndex(0) +17>Emitted(36, 117) Source(70, 83) + SourceIndex(0) +18>Emitted(36, 120) Source(70, 86) + SourceIndex(0) +19>Emitted(36, 121) Source(70, 87) + SourceIndex(0) +20>Emitted(36, 123) Source(70, 89) + SourceIndex(0) +21>Emitted(36, 124) Source(70, 90) + SourceIndex(0) +22>Emitted(36, 126) Source(70, 92) + SourceIndex(0) +23>Emitted(36, 128) Source(70, 94) + SourceIndex(0) +24>Emitted(36, 129) Source(70, 95) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(37, 5) Source(71, 5) + SourceIndex(0) +2 >Emitted(37, 12) Source(71, 12) + SourceIndex(0) +3 >Emitted(37, 13) Source(71, 13) + SourceIndex(0) +4 >Emitted(37, 16) Source(71, 16) + SourceIndex(0) +5 >Emitted(37, 17) Source(71, 17) + SourceIndex(0) +6 >Emitted(37, 22) Source(71, 22) + SourceIndex(0) +7 >Emitted(37, 23) Source(71, 23) + SourceIndex(0) +8 >Emitted(37, 24) Source(71, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(38, 1) Source(72, 1) + SourceIndex(0) +2 >Emitted(38, 2) Source(72, 2) + SourceIndex(0) +--- +>>>for ((_0 = multiRobot.skills, _1 = _0 === void 0 ? { primary: "none", secondary: "none" } : _0, _2 = _1.primary, primary = _2 === void 0 ? "primary" : _2, _3 = _1.secondary, secondary = _3 === void 0 ? "secondary" : _3, multiRobot), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^ +19> ^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^^ +27> ^ +28> ^^ +29> ^ +30> ^^ +31> ^^ +32> ^ +1-> + > +2 >for +3 > +4 > ( +5 > { + > +6 > skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } +7 > +8 > skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } +9 > +10> primary = "primary" +11> +12> primary = "primary" +13> , + > +14> secondary = "secondary" +15> +16> secondary = "secondary" +17> + > } = { primary: "none", secondary: "none" } + > } = +18> multiRobot +19> +20> , +21> i +22> = +23> 0 +24> ; +25> i +26> < +27> 1 +28> ; +29> i +30> ++ +31> ) +32> { +1->Emitted(39, 1) Source(73, 1) + SourceIndex(0) +2 >Emitted(39, 4) Source(73, 4) + SourceIndex(0) +3 >Emitted(39, 5) Source(73, 5) + SourceIndex(0) +4 >Emitted(39, 6) Source(73, 6) + SourceIndex(0) +5 >Emitted(39, 7) Source(74, 5) + SourceIndex(0) +6 >Emitted(39, 29) Source(77, 47) + SourceIndex(0) +7 >Emitted(39, 31) Source(74, 5) + SourceIndex(0) +8 >Emitted(39, 95) Source(77, 47) + SourceIndex(0) +9 >Emitted(39, 97) Source(75, 9) + SourceIndex(0) +10>Emitted(39, 112) Source(75, 28) + SourceIndex(0) +11>Emitted(39, 114) Source(75, 9) + SourceIndex(0) +12>Emitted(39, 154) Source(75, 28) + SourceIndex(0) +13>Emitted(39, 156) Source(76, 9) + SourceIndex(0) +14>Emitted(39, 173) Source(76, 32) + SourceIndex(0) +15>Emitted(39, 175) Source(76, 9) + SourceIndex(0) +16>Emitted(39, 219) Source(76, 32) + SourceIndex(0) +17>Emitted(39, 221) Source(78, 5) + SourceIndex(0) +18>Emitted(39, 231) Source(78, 15) + SourceIndex(0) +19>Emitted(39, 232) Source(78, 15) + SourceIndex(0) +20>Emitted(39, 234) Source(78, 17) + SourceIndex(0) +21>Emitted(39, 235) Source(78, 18) + SourceIndex(0) +22>Emitted(39, 238) Source(78, 21) + SourceIndex(0) +23>Emitted(39, 239) Source(78, 22) + SourceIndex(0) +24>Emitted(39, 241) Source(78, 24) + SourceIndex(0) +25>Emitted(39, 242) Source(78, 25) + SourceIndex(0) +26>Emitted(39, 245) Source(78, 28) + SourceIndex(0) +27>Emitted(39, 246) Source(78, 29) + SourceIndex(0) +28>Emitted(39, 248) Source(78, 31) + SourceIndex(0) +29>Emitted(39, 249) Source(78, 32) + SourceIndex(0) +30>Emitted(39, 251) Source(78, 34) + SourceIndex(0) +31>Emitted(39, 253) Source(78, 36) + SourceIndex(0) +32>Emitted(39, 254) Source(78, 37) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(40, 5) Source(79, 5) + SourceIndex(0) +2 >Emitted(40, 12) Source(79, 12) + SourceIndex(0) +3 >Emitted(40, 13) Source(79, 13) + SourceIndex(0) +4 >Emitted(40, 16) Source(79, 16) + SourceIndex(0) +5 >Emitted(40, 17) Source(79, 17) + SourceIndex(0) +6 >Emitted(40, 25) Source(79, 25) + SourceIndex(0) +7 >Emitted(40, 26) Source(79, 26) + SourceIndex(0) +8 >Emitted(40, 27) Source(79, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(41, 1) Source(80, 1) + SourceIndex(0) +2 >Emitted(41, 2) Source(80, 2) + SourceIndex(0) +--- +>>>for ((_4 = getMultiRobot(), _5 = _4.skills, _6 = _5 === void 0 ? { primary: "none", secondary: "none" } : _5, _7 = _6.primary, primary = _7 === void 0 ? "primary" : _7, _8 = _6.secondary, secondary = _8 === void 0 ? "secondary" : _8, _4), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +19> ^^^^^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^^ +27> ^ +28> ^^ +29> ^ +30> ^^ +31> ^^ +32> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { + > skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } + > } = getMultiRobot() +7 > +8 > skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } +9 > +10> skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } +11> +12> primary = "primary" +13> +14> primary = "primary" +15> , + > +16> secondary = "secondary" +17> +18> secondary = "secondary" +19> + > } = { primary: "none", secondary: "none" } + > } = getMultiRobot() +20> , +21> i +22> = +23> 0 +24> ; +25> i +26> < +27> 1 +28> ; +29> i +30> ++ +31> ) +32> { +1->Emitted(42, 1) Source(81, 1) + SourceIndex(0) +2 >Emitted(42, 4) Source(81, 4) + SourceIndex(0) +3 >Emitted(42, 5) Source(81, 5) + SourceIndex(0) +4 >Emitted(42, 6) Source(81, 6) + SourceIndex(0) +5 >Emitted(42, 7) Source(81, 6) + SourceIndex(0) +6 >Emitted(42, 27) Source(86, 20) + SourceIndex(0) +7 >Emitted(42, 29) Source(82, 5) + SourceIndex(0) +8 >Emitted(42, 43) Source(85, 47) + SourceIndex(0) +9 >Emitted(42, 45) Source(82, 5) + SourceIndex(0) +10>Emitted(42, 109) Source(85, 47) + SourceIndex(0) +11>Emitted(42, 111) Source(83, 9) + SourceIndex(0) +12>Emitted(42, 126) Source(83, 28) + SourceIndex(0) +13>Emitted(42, 128) Source(83, 9) + SourceIndex(0) +14>Emitted(42, 168) Source(83, 28) + SourceIndex(0) +15>Emitted(42, 170) Source(84, 9) + SourceIndex(0) +16>Emitted(42, 187) Source(84, 32) + SourceIndex(0) +17>Emitted(42, 189) Source(84, 9) + SourceIndex(0) +18>Emitted(42, 233) Source(84, 32) + SourceIndex(0) +19>Emitted(42, 238) Source(86, 20) + SourceIndex(0) +20>Emitted(42, 240) Source(86, 22) + SourceIndex(0) +21>Emitted(42, 241) Source(86, 23) + SourceIndex(0) +22>Emitted(42, 244) Source(86, 26) + SourceIndex(0) +23>Emitted(42, 245) Source(86, 27) + SourceIndex(0) +24>Emitted(42, 247) Source(86, 29) + SourceIndex(0) +25>Emitted(42, 248) Source(86, 30) + SourceIndex(0) +26>Emitted(42, 251) Source(86, 33) + SourceIndex(0) +27>Emitted(42, 252) Source(86, 34) + SourceIndex(0) +28>Emitted(42, 254) Source(86, 36) + SourceIndex(0) +29>Emitted(42, 255) Source(86, 37) + SourceIndex(0) +30>Emitted(42, 257) Source(86, 39) + SourceIndex(0) +31>Emitted(42, 259) Source(86, 41) + SourceIndex(0) +32>Emitted(42, 260) Source(86, 42) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(43, 5) Source(87, 5) + SourceIndex(0) +2 >Emitted(43, 12) Source(87, 12) + SourceIndex(0) +3 >Emitted(43, 13) Source(87, 13) + SourceIndex(0) +4 >Emitted(43, 16) Source(87, 16) + SourceIndex(0) +5 >Emitted(43, 17) Source(87, 17) + SourceIndex(0) +6 >Emitted(43, 25) Source(87, 25) + SourceIndex(0) +7 >Emitted(43, 26) Source(87, 26) + SourceIndex(0) +8 >Emitted(43, 27) Source(87, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(44, 1) Source(88, 1) + SourceIndex(0) +2 >Emitted(44, 2) Source(88, 2) + SourceIndex(0) +--- +>>>for ((_9 = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, _10 = _9.skills, _11 = _10 === void 0 ? { primary: "none", secondary: "none" } : _10, _12 = _11.primary, primary = _12 === void 0 ? "primary" : _12, _13 = _11.secondary, secondary = _13 === void 0 ? "secondary" : _13, _9), +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +19> ^^^^^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { + > skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } + > } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } +7 > +8 > skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } +9 > +10> skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } +11> +12> primary = "primary" +13> +14> primary = "primary" +15> , + > +16> secondary = "secondary" +17> +18> secondary = "secondary" +19> + > } = { primary: "none", secondary: "none" } + > } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } +1->Emitted(45, 1) Source(89, 1) + SourceIndex(0) +2 >Emitted(45, 4) Source(89, 4) + SourceIndex(0) +3 >Emitted(45, 5) Source(89, 5) + SourceIndex(0) +4 >Emitted(45, 6) Source(89, 6) + SourceIndex(0) +5 >Emitted(45, 7) Source(89, 6) + SourceIndex(0) +6 >Emitted(45, 85) Source(94, 90) + SourceIndex(0) +7 >Emitted(45, 87) Source(90, 5) + SourceIndex(0) +8 >Emitted(45, 102) Source(93, 47) + SourceIndex(0) +9 >Emitted(45, 104) Source(90, 5) + SourceIndex(0) +10>Emitted(45, 171) Source(93, 47) + SourceIndex(0) +11>Emitted(45, 173) Source(91, 9) + SourceIndex(0) +12>Emitted(45, 190) Source(91, 28) + SourceIndex(0) +13>Emitted(45, 192) Source(91, 9) + SourceIndex(0) +14>Emitted(45, 234) Source(91, 28) + SourceIndex(0) +15>Emitted(45, 236) Source(92, 9) + SourceIndex(0) +16>Emitted(45, 255) Source(92, 32) + SourceIndex(0) +17>Emitted(45, 257) Source(92, 9) + SourceIndex(0) +18>Emitted(45, 303) Source(92, 32) + SourceIndex(0) +19>Emitted(45, 308) Source(94, 90) + SourceIndex(0) +--- +>>> i = 0; i < 1; i++) { +1 >^^^^ +2 > ^ +3 > ^^^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^^^ +8 > ^ +9 > ^^ +10> ^ +11> ^^ +12> ^^ +13> ^ +14> ^^^-> +1 >, + > +2 > i +3 > = +4 > 0 +5 > ; +6 > i +7 > < +8 > 1 +9 > ; +10> i +11> ++ +12> ) +13> { +1 >Emitted(46, 5) Source(95, 5) + SourceIndex(0) +2 >Emitted(46, 6) Source(95, 6) + SourceIndex(0) +3 >Emitted(46, 9) Source(95, 9) + SourceIndex(0) +4 >Emitted(46, 10) Source(95, 10) + SourceIndex(0) +5 >Emitted(46, 12) Source(95, 12) + SourceIndex(0) +6 >Emitted(46, 13) Source(95, 13) + SourceIndex(0) +7 >Emitted(46, 16) Source(95, 16) + SourceIndex(0) +8 >Emitted(46, 17) Source(95, 17) + SourceIndex(0) +9 >Emitted(46, 19) Source(95, 19) + SourceIndex(0) +10>Emitted(46, 20) Source(95, 20) + SourceIndex(0) +11>Emitted(46, 22) Source(95, 22) + SourceIndex(0) +12>Emitted(46, 24) Source(95, 24) + SourceIndex(0) +13>Emitted(46, 25) Source(95, 25) + SourceIndex(0) +--- +>>> console.log(primaryA); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1-> + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1->Emitted(47, 5) Source(96, 5) + SourceIndex(0) +2 >Emitted(47, 12) Source(96, 12) + SourceIndex(0) +3 >Emitted(47, 13) Source(96, 13) + SourceIndex(0) +4 >Emitted(47, 16) Source(96, 16) + SourceIndex(0) +5 >Emitted(47, 17) Source(96, 17) + SourceIndex(0) +6 >Emitted(47, 25) Source(96, 25) + SourceIndex(0) +7 >Emitted(47, 26) Source(96, 26) + SourceIndex(0) +8 >Emitted(47, 27) Source(96, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(48, 1) Source(97, 1) + SourceIndex(0) +2 >Emitted(48, 2) Source(97, 2) + SourceIndex(0) +--- +>>>for ((_14 = robot.name, nameA = _14 === void 0 ? "noName" : _14, _15 = robot.skill, skillA = _15 === void 0 ? "skill" : _15, robot), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^ +27> ^^ +28> ^ +1-> + > + > + > +2 >for +3 > +4 > ( +5 > { +6 > name: nameA = "noName" +7 > +8 > name: nameA = "noName" +9 > , +10> skill: skillA = "skill" +11> +12> skill: skillA = "skill" +13> } = +14> robot +15> +16> , +17> i +18> = +19> 0 +20> ; +21> i +22> < +23> 1 +24> ; +25> i +26> ++ +27> ) +28> { +1->Emitted(49, 1) Source(100, 1) + SourceIndex(0) +2 >Emitted(49, 4) Source(100, 4) + SourceIndex(0) +3 >Emitted(49, 5) Source(100, 5) + SourceIndex(0) +4 >Emitted(49, 6) Source(100, 6) + SourceIndex(0) +5 >Emitted(49, 7) Source(100, 7) + SourceIndex(0) +6 >Emitted(49, 23) Source(100, 29) + SourceIndex(0) +7 >Emitted(49, 25) Source(100, 7) + SourceIndex(0) +8 >Emitted(49, 64) Source(100, 29) + SourceIndex(0) +9 >Emitted(49, 66) Source(100, 31) + SourceIndex(0) +10>Emitted(49, 83) Source(100, 54) + SourceIndex(0) +11>Emitted(49, 85) Source(100, 31) + SourceIndex(0) +12>Emitted(49, 124) Source(100, 54) + SourceIndex(0) +13>Emitted(49, 126) Source(100, 59) + SourceIndex(0) +14>Emitted(49, 131) Source(100, 64) + SourceIndex(0) +15>Emitted(49, 132) Source(100, 64) + SourceIndex(0) +16>Emitted(49, 134) Source(100, 66) + SourceIndex(0) +17>Emitted(49, 135) Source(100, 67) + SourceIndex(0) +18>Emitted(49, 138) Source(100, 70) + SourceIndex(0) +19>Emitted(49, 139) Source(100, 71) + SourceIndex(0) +20>Emitted(49, 141) Source(100, 73) + SourceIndex(0) +21>Emitted(49, 142) Source(100, 74) + SourceIndex(0) +22>Emitted(49, 145) Source(100, 77) + SourceIndex(0) +23>Emitted(49, 146) Source(100, 78) + SourceIndex(0) +24>Emitted(49, 148) Source(100, 80) + SourceIndex(0) +25>Emitted(49, 149) Source(100, 81) + SourceIndex(0) +26>Emitted(49, 151) Source(100, 83) + SourceIndex(0) +27>Emitted(49, 153) Source(100, 85) + SourceIndex(0) +28>Emitted(49, 154) Source(100, 86) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(50, 5) Source(101, 5) + SourceIndex(0) +2 >Emitted(50, 12) Source(101, 12) + SourceIndex(0) +3 >Emitted(50, 13) Source(101, 13) + SourceIndex(0) +4 >Emitted(50, 16) Source(101, 16) + SourceIndex(0) +5 >Emitted(50, 17) Source(101, 17) + SourceIndex(0) +6 >Emitted(50, 22) Source(101, 22) + SourceIndex(0) +7 >Emitted(50, 23) Source(101, 23) + SourceIndex(0) +8 >Emitted(50, 24) Source(101, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(51, 1) Source(102, 1) + SourceIndex(0) +2 >Emitted(51, 2) Source(102, 2) + SourceIndex(0) +--- +>>>for ((_16 = getRobot(), _17 = _16.name, nameA = _17 === void 0 ? "noName" : _17, _18 = _16.skill, skillA = _18 === void 0 ? "skill" : _18, _16), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^^^^^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^ +27> ^^ +28> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > {name: nameA = "noName", skill: skillA = "skill" } = getRobot() +7 > +8 > name: nameA = "noName" +9 > +10> name: nameA = "noName" +11> , +12> skill: skillA = "skill" +13> +14> skill: skillA = "skill" +15> } = getRobot() +16> , +17> i +18> = +19> 0 +20> ; +21> i +22> < +23> 1 +24> ; +25> i +26> ++ +27> ) +28> { +1->Emitted(52, 1) Source(103, 1) + SourceIndex(0) +2 >Emitted(52, 4) Source(103, 4) + SourceIndex(0) +3 >Emitted(52, 5) Source(103, 5) + SourceIndex(0) +4 >Emitted(52, 6) Source(103, 6) + SourceIndex(0) +5 >Emitted(52, 7) Source(103, 6) + SourceIndex(0) +6 >Emitted(52, 23) Source(103, 69) + SourceIndex(0) +7 >Emitted(52, 25) Source(103, 7) + SourceIndex(0) +8 >Emitted(52, 39) Source(103, 29) + SourceIndex(0) +9 >Emitted(52, 41) Source(103, 7) + SourceIndex(0) +10>Emitted(52, 80) Source(103, 29) + SourceIndex(0) +11>Emitted(52, 82) Source(103, 31) + SourceIndex(0) +12>Emitted(52, 97) Source(103, 54) + SourceIndex(0) +13>Emitted(52, 99) Source(103, 31) + SourceIndex(0) +14>Emitted(52, 138) Source(103, 54) + SourceIndex(0) +15>Emitted(52, 144) Source(103, 69) + SourceIndex(0) +16>Emitted(52, 146) Source(103, 71) + SourceIndex(0) +17>Emitted(52, 147) Source(103, 72) + SourceIndex(0) +18>Emitted(52, 150) Source(103, 75) + SourceIndex(0) +19>Emitted(52, 151) Source(103, 76) + SourceIndex(0) +20>Emitted(52, 153) Source(103, 78) + SourceIndex(0) +21>Emitted(52, 154) Source(103, 79) + SourceIndex(0) +22>Emitted(52, 157) Source(103, 82) + SourceIndex(0) +23>Emitted(52, 158) Source(103, 83) + SourceIndex(0) +24>Emitted(52, 160) Source(103, 85) + SourceIndex(0) +25>Emitted(52, 161) Source(103, 86) + SourceIndex(0) +26>Emitted(52, 163) Source(103, 88) + SourceIndex(0) +27>Emitted(52, 165) Source(103, 90) + SourceIndex(0) +28>Emitted(52, 166) Source(103, 91) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(53, 5) Source(104, 5) + SourceIndex(0) +2 >Emitted(53, 12) Source(104, 12) + SourceIndex(0) +3 >Emitted(53, 13) Source(104, 13) + SourceIndex(0) +4 >Emitted(53, 16) Source(104, 16) + SourceIndex(0) +5 >Emitted(53, 17) Source(104, 17) + SourceIndex(0) +6 >Emitted(53, 22) Source(104, 22) + SourceIndex(0) +7 >Emitted(53, 23) Source(104, 23) + SourceIndex(0) +8 >Emitted(53, 24) Source(104, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(54, 1) Source(105, 1) + SourceIndex(0) +2 >Emitted(54, 2) Source(105, 2) + SourceIndex(0) +--- +>>>for ((_19 = { name: "trimmer", skill: "trimming" }, _20 = _19.name, nameA = _20 === void 0 ? "noName" : _20, _21 = _19.skill, skillA = _21 === void 0 ? "skill" : _21, _19), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^^^^^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^ +27> ^^ +28> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > {name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" } +7 > +8 > name: nameA = "noName" +9 > +10> name: nameA = "noName" +11> , +12> skill: skillA = "skill" +13> +14> skill: skillA = "skill" +15> } = { name: "trimmer", skill: "trimming" } +16> , +17> i +18> = +19> 0 +20> ; +21> i +22> < +23> 1 +24> ; +25> i +26> ++ +27> ) +28> { +1->Emitted(55, 1) Source(106, 1) + SourceIndex(0) +2 >Emitted(55, 4) Source(106, 4) + SourceIndex(0) +3 >Emitted(55, 5) Source(106, 5) + SourceIndex(0) +4 >Emitted(55, 6) Source(106, 6) + SourceIndex(0) +5 >Emitted(55, 7) Source(106, 6) + SourceIndex(0) +6 >Emitted(55, 51) Source(106, 104) + SourceIndex(0) +7 >Emitted(55, 53) Source(106, 7) + SourceIndex(0) +8 >Emitted(55, 67) Source(106, 29) + SourceIndex(0) +9 >Emitted(55, 69) Source(106, 7) + SourceIndex(0) +10>Emitted(55, 108) Source(106, 29) + SourceIndex(0) +11>Emitted(55, 110) Source(106, 31) + SourceIndex(0) +12>Emitted(55, 125) Source(106, 54) + SourceIndex(0) +13>Emitted(55, 127) Source(106, 31) + SourceIndex(0) +14>Emitted(55, 166) Source(106, 54) + SourceIndex(0) +15>Emitted(55, 172) Source(106, 104) + SourceIndex(0) +16>Emitted(55, 174) Source(106, 106) + SourceIndex(0) +17>Emitted(55, 175) Source(106, 107) + SourceIndex(0) +18>Emitted(55, 178) Source(106, 110) + SourceIndex(0) +19>Emitted(55, 179) Source(106, 111) + SourceIndex(0) +20>Emitted(55, 181) Source(106, 113) + SourceIndex(0) +21>Emitted(55, 182) Source(106, 114) + SourceIndex(0) +22>Emitted(55, 185) Source(106, 117) + SourceIndex(0) +23>Emitted(55, 186) Source(106, 118) + SourceIndex(0) +24>Emitted(55, 188) Source(106, 120) + SourceIndex(0) +25>Emitted(55, 189) Source(106, 121) + SourceIndex(0) +26>Emitted(55, 191) Source(106, 123) + SourceIndex(0) +27>Emitted(55, 193) Source(106, 125) + SourceIndex(0) +28>Emitted(55, 194) Source(106, 126) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(56, 5) Source(107, 5) + SourceIndex(0) +2 >Emitted(56, 12) Source(107, 12) + SourceIndex(0) +3 >Emitted(56, 13) Source(107, 13) + SourceIndex(0) +4 >Emitted(56, 16) Source(107, 16) + SourceIndex(0) +5 >Emitted(56, 17) Source(107, 17) + SourceIndex(0) +6 >Emitted(56, 22) Source(107, 22) + SourceIndex(0) +7 >Emitted(56, 23) Source(107, 23) + SourceIndex(0) +8 >Emitted(56, 24) Source(107, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(57, 1) Source(108, 1) + SourceIndex(0) +2 >Emitted(57, 2) Source(108, 2) + SourceIndex(0) +--- +>>>for ((_22 = multiRobot.name, nameA = _22 === void 0 ? "noName" : _22, _23 = multiRobot.skills, _24 = _23 === void 0 ? { primary: "none", secondary: "none" } : _23, _25 = _24.primary, primaryA = _25 === void 0 ? "primary" : _25, _26 = _24.secondary, secondaryA = _26 === void 0 ? "secondary" : _26, multiRobot), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^ +19> ^^ +20> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +21> ^^ +22> ^^^^^^^^^^ +23> ^ +24> ^^ +25> ^ +26> ^^^ +27> ^ +28> ^^ +29> ^ +30> ^^^ +31> ^ +32> ^^ +33> ^ +34> ^^ +35> ^^ +36> ^ +1-> + > +2 >for +3 > +4 > ( +5 > { + > +6 > name: nameA = "noName" +7 > +8 > name: nameA = "noName" +9 > , + > +10> skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } +11> +12> skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } +13> +14> primary: primaryA = "primary" +15> +16> primary: primaryA = "primary" +17> , + > +18> secondary: secondaryA = "secondary" +19> +20> secondary: secondaryA = "secondary" +21> + > } = { primary: "none", secondary: "none" } + > } = +22> multiRobot +23> +24> , +25> i +26> = +27> 0 +28> ; +29> i +30> < +31> 1 +32> ; +33> i +34> ++ +35> ) +36> { +1->Emitted(58, 1) Source(109, 1) + SourceIndex(0) +2 >Emitted(58, 4) Source(109, 4) + SourceIndex(0) +3 >Emitted(58, 5) Source(109, 5) + SourceIndex(0) +4 >Emitted(58, 6) Source(109, 6) + SourceIndex(0) +5 >Emitted(58, 7) Source(110, 5) + SourceIndex(0) +6 >Emitted(58, 28) Source(110, 27) + SourceIndex(0) +7 >Emitted(58, 30) Source(110, 5) + SourceIndex(0) +8 >Emitted(58, 69) Source(110, 27) + SourceIndex(0) +9 >Emitted(58, 71) Source(111, 5) + SourceIndex(0) +10>Emitted(58, 94) Source(114, 47) + SourceIndex(0) +11>Emitted(58, 96) Source(111, 5) + SourceIndex(0) +12>Emitted(58, 163) Source(114, 47) + SourceIndex(0) +13>Emitted(58, 165) Source(112, 9) + SourceIndex(0) +14>Emitted(58, 182) Source(112, 38) + SourceIndex(0) +15>Emitted(58, 184) Source(112, 9) + SourceIndex(0) +16>Emitted(58, 227) Source(112, 38) + SourceIndex(0) +17>Emitted(58, 229) Source(113, 9) + SourceIndex(0) +18>Emitted(58, 248) Source(113, 44) + SourceIndex(0) +19>Emitted(58, 250) Source(113, 9) + SourceIndex(0) +20>Emitted(58, 297) Source(113, 44) + SourceIndex(0) +21>Emitted(58, 299) Source(115, 5) + SourceIndex(0) +22>Emitted(58, 309) Source(115, 15) + SourceIndex(0) +23>Emitted(58, 310) Source(115, 15) + SourceIndex(0) +24>Emitted(58, 312) Source(115, 17) + SourceIndex(0) +25>Emitted(58, 313) Source(115, 18) + SourceIndex(0) +26>Emitted(58, 316) Source(115, 21) + SourceIndex(0) +27>Emitted(58, 317) Source(115, 22) + SourceIndex(0) +28>Emitted(58, 319) Source(115, 24) + SourceIndex(0) +29>Emitted(58, 320) Source(115, 25) + SourceIndex(0) +30>Emitted(58, 323) Source(115, 28) + SourceIndex(0) +31>Emitted(58, 324) Source(115, 29) + SourceIndex(0) +32>Emitted(58, 326) Source(115, 31) + SourceIndex(0) +33>Emitted(58, 327) Source(115, 32) + SourceIndex(0) +34>Emitted(58, 329) Source(115, 34) + SourceIndex(0) +35>Emitted(58, 331) Source(115, 36) + SourceIndex(0) +36>Emitted(58, 332) Source(115, 37) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(59, 5) Source(116, 5) + SourceIndex(0) +2 >Emitted(59, 12) Source(116, 12) + SourceIndex(0) +3 >Emitted(59, 13) Source(116, 13) + SourceIndex(0) +4 >Emitted(59, 16) Source(116, 16) + SourceIndex(0) +5 >Emitted(59, 17) Source(116, 17) + SourceIndex(0) +6 >Emitted(59, 25) Source(116, 25) + SourceIndex(0) +7 >Emitted(59, 26) Source(116, 26) + SourceIndex(0) +8 >Emitted(59, 27) Source(116, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(60, 1) Source(117, 1) + SourceIndex(0) +2 >Emitted(60, 2) Source(117, 2) + SourceIndex(0) +--- +>>>for ((_27 = getMultiRobot(), _28 = _27.name, nameA = _28 === void 0 ? "noName" : _28, _29 = _27.skills, _30 = _29 === void 0 ? { primary: "none", secondary: "none" } : _29, _31 = _30.primary, primaryA = _31 === void 0 ? "primary" : _31, _32 = _30.secondary, secondaryA = _32 === void 0 ? "secondary" : _32, _27), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +19> ^^ +20> ^^^^^^^^^^^^^^^^^^^ +21> ^^ +22> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +23> ^^^^^^ +24> ^^ +25> ^ +26> ^^^ +27> ^ +28> ^^ +29> ^ +30> ^^^ +31> ^ +32> ^^ +33> ^ +34> ^^ +35> ^^ +36> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { + > name: nameA = "noName", + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + > } = getMultiRobot() +7 > +8 > name: nameA = "noName" +9 > +10> name: nameA = "noName" +11> , + > +12> skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } +13> +14> skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } +15> +16> primary: primaryA = "primary" +17> +18> primary: primaryA = "primary" +19> , + > +20> secondary: secondaryA = "secondary" +21> +22> secondary: secondaryA = "secondary" +23> + > } = { primary: "none", secondary: "none" } + > } = getMultiRobot() +24> , +25> i +26> = +27> 0 +28> ; +29> i +30> < +31> 1 +32> ; +33> i +34> ++ +35> ) +36> { +1->Emitted(61, 1) Source(118, 1) + SourceIndex(0) +2 >Emitted(61, 4) Source(118, 4) + SourceIndex(0) +3 >Emitted(61, 5) Source(118, 5) + SourceIndex(0) +4 >Emitted(61, 6) Source(118, 6) + SourceIndex(0) +5 >Emitted(61, 7) Source(118, 6) + SourceIndex(0) +6 >Emitted(61, 28) Source(124, 20) + SourceIndex(0) +7 >Emitted(61, 30) Source(119, 5) + SourceIndex(0) +8 >Emitted(61, 44) Source(119, 27) + SourceIndex(0) +9 >Emitted(61, 46) Source(119, 5) + SourceIndex(0) +10>Emitted(61, 85) Source(119, 27) + SourceIndex(0) +11>Emitted(61, 87) Source(120, 5) + SourceIndex(0) +12>Emitted(61, 103) Source(123, 47) + SourceIndex(0) +13>Emitted(61, 105) Source(120, 5) + SourceIndex(0) +14>Emitted(61, 172) Source(123, 47) + SourceIndex(0) +15>Emitted(61, 174) Source(121, 9) + SourceIndex(0) +16>Emitted(61, 191) Source(121, 38) + SourceIndex(0) +17>Emitted(61, 193) Source(121, 9) + SourceIndex(0) +18>Emitted(61, 236) Source(121, 38) + SourceIndex(0) +19>Emitted(61, 238) Source(122, 9) + SourceIndex(0) +20>Emitted(61, 257) Source(122, 44) + SourceIndex(0) +21>Emitted(61, 259) Source(122, 9) + SourceIndex(0) +22>Emitted(61, 306) Source(122, 44) + SourceIndex(0) +23>Emitted(61, 312) Source(124, 20) + SourceIndex(0) +24>Emitted(61, 314) Source(124, 22) + SourceIndex(0) +25>Emitted(61, 315) Source(124, 23) + SourceIndex(0) +26>Emitted(61, 318) Source(124, 26) + SourceIndex(0) +27>Emitted(61, 319) Source(124, 27) + SourceIndex(0) +28>Emitted(61, 321) Source(124, 29) + SourceIndex(0) +29>Emitted(61, 322) Source(124, 30) + SourceIndex(0) +30>Emitted(61, 325) Source(124, 33) + SourceIndex(0) +31>Emitted(61, 326) Source(124, 34) + SourceIndex(0) +32>Emitted(61, 328) Source(124, 36) + SourceIndex(0) +33>Emitted(61, 329) Source(124, 37) + SourceIndex(0) +34>Emitted(61, 331) Source(124, 39) + SourceIndex(0) +35>Emitted(61, 333) Source(124, 41) + SourceIndex(0) +36>Emitted(61, 334) Source(124, 42) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(62, 5) Source(125, 5) + SourceIndex(0) +2 >Emitted(62, 12) Source(125, 12) + SourceIndex(0) +3 >Emitted(62, 13) Source(125, 13) + SourceIndex(0) +4 >Emitted(62, 16) Source(125, 16) + SourceIndex(0) +5 >Emitted(62, 17) Source(125, 17) + SourceIndex(0) +6 >Emitted(62, 25) Source(125, 25) + SourceIndex(0) +7 >Emitted(62, 26) Source(125, 26) + SourceIndex(0) +8 >Emitted(62, 27) Source(125, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(63, 1) Source(126, 1) + SourceIndex(0) +2 >Emitted(63, 2) Source(126, 2) + SourceIndex(0) +--- +>>>for ((_33 = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, _34 = _33.name, nameA = _34 === void 0 ? "noName" : _34, _35 = _33.skills, _36 = _35 === void 0 ? { primary: "none", secondary: "none" } : _35, _37 = _36.primary, primaryA = _37 === void 0 ? "primary" : _37, _38 = _36.secondary, secondaryA = _38 === void 0 ? "secondary" : _38, _33), +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +19> ^^ +20> ^^^^^^^^^^^^^^^^^^^ +21> ^^ +22> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +23> ^^^^^^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { + > name: nameA = "noName", + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + > } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } +7 > +8 > name: nameA = "noName" +9 > +10> name: nameA = "noName" +11> , + > +12> skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } +13> +14> skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } +15> +16> primary: primaryA = "primary" +17> +18> primary: primaryA = "primary" +19> , + > +20> secondary: secondaryA = "secondary" +21> +22> secondary: secondaryA = "secondary" +23> + > } = { primary: "none", secondary: "none" } + > } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } +1->Emitted(64, 1) Source(127, 1) + SourceIndex(0) +2 >Emitted(64, 4) Source(127, 4) + SourceIndex(0) +3 >Emitted(64, 5) Source(127, 5) + SourceIndex(0) +4 >Emitted(64, 6) Source(127, 6) + SourceIndex(0) +5 >Emitted(64, 7) Source(127, 6) + SourceIndex(0) +6 >Emitted(64, 86) Source(133, 90) + SourceIndex(0) +7 >Emitted(64, 88) Source(128, 5) + SourceIndex(0) +8 >Emitted(64, 102) Source(128, 27) + SourceIndex(0) +9 >Emitted(64, 104) Source(128, 5) + SourceIndex(0) +10>Emitted(64, 143) Source(128, 27) + SourceIndex(0) +11>Emitted(64, 145) Source(129, 5) + SourceIndex(0) +12>Emitted(64, 161) Source(132, 47) + SourceIndex(0) +13>Emitted(64, 163) Source(129, 5) + SourceIndex(0) +14>Emitted(64, 230) Source(132, 47) + SourceIndex(0) +15>Emitted(64, 232) Source(130, 9) + SourceIndex(0) +16>Emitted(64, 249) Source(130, 38) + SourceIndex(0) +17>Emitted(64, 251) Source(130, 9) + SourceIndex(0) +18>Emitted(64, 294) Source(130, 38) + SourceIndex(0) +19>Emitted(64, 296) Source(131, 9) + SourceIndex(0) +20>Emitted(64, 315) Source(131, 44) + SourceIndex(0) +21>Emitted(64, 317) Source(131, 9) + SourceIndex(0) +22>Emitted(64, 364) Source(131, 44) + SourceIndex(0) +23>Emitted(64, 370) Source(133, 90) + SourceIndex(0) +--- +>>> i = 0; i < 1; i++) { +1 >^^^^ +2 > ^ +3 > ^^^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^^^ +8 > ^ +9 > ^^ +10> ^ +11> ^^ +12> ^^ +13> ^ +14> ^^^-> +1 >, + > +2 > i +3 > = +4 > 0 +5 > ; +6 > i +7 > < +8 > 1 +9 > ; +10> i +11> ++ +12> ) +13> { +1 >Emitted(65, 5) Source(134, 5) + SourceIndex(0) +2 >Emitted(65, 6) Source(134, 6) + SourceIndex(0) +3 >Emitted(65, 9) Source(134, 9) + SourceIndex(0) +4 >Emitted(65, 10) Source(134, 10) + SourceIndex(0) +5 >Emitted(65, 12) Source(134, 12) + SourceIndex(0) +6 >Emitted(65, 13) Source(134, 13) + SourceIndex(0) +7 >Emitted(65, 16) Source(134, 16) + SourceIndex(0) +8 >Emitted(65, 17) Source(134, 17) + SourceIndex(0) +9 >Emitted(65, 19) Source(134, 19) + SourceIndex(0) +10>Emitted(65, 20) Source(134, 20) + SourceIndex(0) +11>Emitted(65, 22) Source(134, 22) + SourceIndex(0) +12>Emitted(65, 24) Source(134, 24) + SourceIndex(0) +13>Emitted(65, 25) Source(134, 25) + SourceIndex(0) +--- +>>> console.log(primaryA); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1-> + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1->Emitted(66, 5) Source(135, 5) + SourceIndex(0) +2 >Emitted(66, 12) Source(135, 12) + SourceIndex(0) +3 >Emitted(66, 13) Source(135, 13) + SourceIndex(0) +4 >Emitted(66, 16) Source(135, 16) + SourceIndex(0) +5 >Emitted(66, 17) Source(135, 17) + SourceIndex(0) +6 >Emitted(66, 25) Source(135, 25) + SourceIndex(0) +7 >Emitted(66, 26) Source(135, 26) + SourceIndex(0) +8 >Emitted(66, 27) Source(135, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(67, 1) Source(136, 1) + SourceIndex(0) +2 >Emitted(67, 2) Source(136, 2) + SourceIndex(0) +--- +>>>for ((_39 = robot.name, name = _39 === void 0 ? "noName" : _39, _40 = robot.skill, skill = _40 === void 0 ? "skill" : _40, robot), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^ +15> ^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^ +27> ^^ +28> ^ +1-> + > + > +2 >for +3 > +4 > ( +5 > { +6 > name = "noName" +7 > +8 > name = "noName" +9 > , +10> skill = "skill" +11> +12> skill = "skill" +13> } = +14> robot +15> +16> , +17> i +18> = +19> 0 +20> ; +21> i +22> < +23> 1 +24> ; +25> i +26> ++ +27> ) +28> { +1->Emitted(68, 1) Source(138, 1) + SourceIndex(0) +2 >Emitted(68, 4) Source(138, 4) + SourceIndex(0) +3 >Emitted(68, 5) Source(138, 5) + SourceIndex(0) +4 >Emitted(68, 6) Source(138, 6) + SourceIndex(0) +5 >Emitted(68, 7) Source(138, 8) + SourceIndex(0) +6 >Emitted(68, 23) Source(138, 23) + SourceIndex(0) +7 >Emitted(68, 25) Source(138, 8) + SourceIndex(0) +8 >Emitted(68, 63) Source(138, 23) + SourceIndex(0) +9 >Emitted(68, 65) Source(138, 25) + SourceIndex(0) +10>Emitted(68, 82) Source(138, 40) + SourceIndex(0) +11>Emitted(68, 84) Source(138, 25) + SourceIndex(0) +12>Emitted(68, 122) Source(138, 40) + SourceIndex(0) +13>Emitted(68, 124) Source(138, 45) + SourceIndex(0) +14>Emitted(68, 129) Source(138, 50) + SourceIndex(0) +15>Emitted(68, 130) Source(138, 50) + SourceIndex(0) +16>Emitted(68, 132) Source(138, 52) + SourceIndex(0) +17>Emitted(68, 133) Source(138, 53) + SourceIndex(0) +18>Emitted(68, 136) Source(138, 56) + SourceIndex(0) +19>Emitted(68, 137) Source(138, 57) + SourceIndex(0) +20>Emitted(68, 139) Source(138, 59) + SourceIndex(0) +21>Emitted(68, 140) Source(138, 60) + SourceIndex(0) +22>Emitted(68, 143) Source(138, 63) + SourceIndex(0) +23>Emitted(68, 144) Source(138, 64) + SourceIndex(0) +24>Emitted(68, 146) Source(138, 66) + SourceIndex(0) +25>Emitted(68, 147) Source(138, 67) + SourceIndex(0) +26>Emitted(68, 149) Source(138, 69) + SourceIndex(0) +27>Emitted(68, 151) Source(138, 71) + SourceIndex(0) +28>Emitted(68, 152) Source(138, 72) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(69, 5) Source(139, 5) + SourceIndex(0) +2 >Emitted(69, 12) Source(139, 12) + SourceIndex(0) +3 >Emitted(69, 13) Source(139, 13) + SourceIndex(0) +4 >Emitted(69, 16) Source(139, 16) + SourceIndex(0) +5 >Emitted(69, 17) Source(139, 17) + SourceIndex(0) +6 >Emitted(69, 22) Source(139, 22) + SourceIndex(0) +7 >Emitted(69, 23) Source(139, 23) + SourceIndex(0) +8 >Emitted(69, 24) Source(139, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(70, 1) Source(140, 1) + SourceIndex(0) +2 >Emitted(70, 2) Source(140, 2) + SourceIndex(0) +--- +>>>for ((_41 = getRobot(), _42 = _41.name, name = _42 === void 0 ? "noName" : _42, _43 = _41.skill, skill = _43 === void 0 ? "skill" : _43, _41), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^^^^^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^ +27> ^^ +28> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { name = "noName", skill = "skill" } = getRobot() +7 > +8 > name = "noName" +9 > +10> name = "noName" +11> , +12> skill = "skill" +13> +14> skill = "skill" +15> } = getRobot() +16> , +17> i +18> = +19> 0 +20> ; +21> i +22> < +23> 1 +24> ; +25> i +26> ++ +27> ) +28> { +1->Emitted(71, 1) Source(141, 1) + SourceIndex(0) +2 >Emitted(71, 4) Source(141, 4) + SourceIndex(0) +3 >Emitted(71, 5) Source(141, 5) + SourceIndex(0) +4 >Emitted(71, 6) Source(141, 6) + SourceIndex(0) +5 >Emitted(71, 7) Source(141, 6) + SourceIndex(0) +6 >Emitted(71, 23) Source(141, 55) + SourceIndex(0) +7 >Emitted(71, 25) Source(141, 8) + SourceIndex(0) +8 >Emitted(71, 39) Source(141, 23) + SourceIndex(0) +9 >Emitted(71, 41) Source(141, 8) + SourceIndex(0) +10>Emitted(71, 79) Source(141, 23) + SourceIndex(0) +11>Emitted(71, 81) Source(141, 25) + SourceIndex(0) +12>Emitted(71, 96) Source(141, 40) + SourceIndex(0) +13>Emitted(71, 98) Source(141, 25) + SourceIndex(0) +14>Emitted(71, 136) Source(141, 40) + SourceIndex(0) +15>Emitted(71, 142) Source(141, 55) + SourceIndex(0) +16>Emitted(71, 144) Source(141, 57) + SourceIndex(0) +17>Emitted(71, 145) Source(141, 58) + SourceIndex(0) +18>Emitted(71, 148) Source(141, 61) + SourceIndex(0) +19>Emitted(71, 149) Source(141, 62) + SourceIndex(0) +20>Emitted(71, 151) Source(141, 64) + SourceIndex(0) +21>Emitted(71, 152) Source(141, 65) + SourceIndex(0) +22>Emitted(71, 155) Source(141, 68) + SourceIndex(0) +23>Emitted(71, 156) Source(141, 69) + SourceIndex(0) +24>Emitted(71, 158) Source(141, 71) + SourceIndex(0) +25>Emitted(71, 159) Source(141, 72) + SourceIndex(0) +26>Emitted(71, 161) Source(141, 74) + SourceIndex(0) +27>Emitted(71, 163) Source(141, 76) + SourceIndex(0) +28>Emitted(71, 164) Source(141, 77) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(72, 5) Source(142, 5) + SourceIndex(0) +2 >Emitted(72, 12) Source(142, 12) + SourceIndex(0) +3 >Emitted(72, 13) Source(142, 13) + SourceIndex(0) +4 >Emitted(72, 16) Source(142, 16) + SourceIndex(0) +5 >Emitted(72, 17) Source(142, 17) + SourceIndex(0) +6 >Emitted(72, 22) Source(142, 22) + SourceIndex(0) +7 >Emitted(72, 23) Source(142, 23) + SourceIndex(0) +8 >Emitted(72, 24) Source(142, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(73, 1) Source(143, 1) + SourceIndex(0) +2 >Emitted(73, 2) Source(143, 2) + SourceIndex(0) +--- +>>>for ((_44 = { name: "trimmer", skill: "trimming" }, _45 = _44.name, name = _45 === void 0 ? "noName" : _45, _46 = _44.skill, skill = _46 === void 0 ? "skill" : _46, _44), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^^^^^ +16> ^^ +17> ^ +18> ^^^ +19> ^ +20> ^^ +21> ^ +22> ^^^ +23> ^ +24> ^^ +25> ^ +26> ^^ +27> ^^ +28> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { name = "noName", skill = "skill" } = { name: "trimmer", skill: "trimming" } +7 > +8 > name = "noName" +9 > +10> name = "noName" +11> , +12> skill = "skill" +13> +14> skill = "skill" +15> } = { name: "trimmer", skill: "trimming" } +16> , +17> i +18> = +19> 0 +20> ; +21> i +22> < +23> 1 +24> ; +25> i +26> ++ +27> ) +28> { +1->Emitted(74, 1) Source(144, 1) + SourceIndex(0) +2 >Emitted(74, 4) Source(144, 4) + SourceIndex(0) +3 >Emitted(74, 5) Source(144, 5) + SourceIndex(0) +4 >Emitted(74, 6) Source(144, 6) + SourceIndex(0) +5 >Emitted(74, 7) Source(144, 6) + SourceIndex(0) +6 >Emitted(74, 51) Source(144, 90) + SourceIndex(0) +7 >Emitted(74, 53) Source(144, 8) + SourceIndex(0) +8 >Emitted(74, 67) Source(144, 23) + SourceIndex(0) +9 >Emitted(74, 69) Source(144, 8) + SourceIndex(0) +10>Emitted(74, 107) Source(144, 23) + SourceIndex(0) +11>Emitted(74, 109) Source(144, 25) + SourceIndex(0) +12>Emitted(74, 124) Source(144, 40) + SourceIndex(0) +13>Emitted(74, 126) Source(144, 25) + SourceIndex(0) +14>Emitted(74, 164) Source(144, 40) + SourceIndex(0) +15>Emitted(74, 170) Source(144, 90) + SourceIndex(0) +16>Emitted(74, 172) Source(144, 92) + SourceIndex(0) +17>Emitted(74, 173) Source(144, 93) + SourceIndex(0) +18>Emitted(74, 176) Source(144, 96) + SourceIndex(0) +19>Emitted(74, 177) Source(144, 97) + SourceIndex(0) +20>Emitted(74, 179) Source(144, 99) + SourceIndex(0) +21>Emitted(74, 180) Source(144, 100) + SourceIndex(0) +22>Emitted(74, 183) Source(144, 103) + SourceIndex(0) +23>Emitted(74, 184) Source(144, 104) + SourceIndex(0) +24>Emitted(74, 186) Source(144, 106) + SourceIndex(0) +25>Emitted(74, 187) Source(144, 107) + SourceIndex(0) +26>Emitted(74, 189) Source(144, 109) + SourceIndex(0) +27>Emitted(74, 191) Source(144, 111) + SourceIndex(0) +28>Emitted(74, 192) Source(144, 112) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(75, 5) Source(145, 5) + SourceIndex(0) +2 >Emitted(75, 12) Source(145, 12) + SourceIndex(0) +3 >Emitted(75, 13) Source(145, 13) + SourceIndex(0) +4 >Emitted(75, 16) Source(145, 16) + SourceIndex(0) +5 >Emitted(75, 17) Source(145, 17) + SourceIndex(0) +6 >Emitted(75, 22) Source(145, 22) + SourceIndex(0) +7 >Emitted(75, 23) Source(145, 23) + SourceIndex(0) +8 >Emitted(75, 24) Source(145, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(76, 1) Source(146, 1) + SourceIndex(0) +2 >Emitted(76, 2) Source(146, 2) + SourceIndex(0) +--- +>>>for ((_47 = multiRobot.name, name = _47 === void 0 ? "noName" : _47, _48 = multiRobot.skills, _49 = _48 === void 0 ? { primary: "none", secondary: "none" } : _48, _50 = _49.primary, primary = _50 === void 0 ? "primary" : _50, _51 = _49.secondary, secondary = _51 === void 0 ? "secondary" : _51, multiRobot), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^ +19> ^^ +20> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +21> ^^ +22> ^^^^^^^^^^ +23> ^ +24> ^^ +25> ^ +26> ^^^ +27> ^ +28> ^^ +29> ^ +30> ^^^ +31> ^ +32> ^^ +33> ^ +34> ^^ +35> ^^ +36> ^ +1-> + > +2 >for +3 > +4 > ( +5 > { + > +6 > name = "noName" +7 > +8 > name = "noName" +9 > , + > +10> skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } +11> +12> skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } +13> +14> primary = "primary" +15> +16> primary = "primary" +17> , + > +18> secondary = "secondary" +19> +20> secondary = "secondary" +21> + > } = { primary: "none", secondary: "none" } + > } = +22> multiRobot +23> +24> , +25> i +26> = +27> 0 +28> ; +29> i +30> < +31> 1 +32> ; +33> i +34> ++ +35> ) +36> { +1->Emitted(77, 1) Source(147, 1) + SourceIndex(0) +2 >Emitted(77, 4) Source(147, 4) + SourceIndex(0) +3 >Emitted(77, 5) Source(147, 5) + SourceIndex(0) +4 >Emitted(77, 6) Source(147, 6) + SourceIndex(0) +5 >Emitted(77, 7) Source(148, 5) + SourceIndex(0) +6 >Emitted(77, 28) Source(148, 20) + SourceIndex(0) +7 >Emitted(77, 30) Source(148, 5) + SourceIndex(0) +8 >Emitted(77, 68) Source(148, 20) + SourceIndex(0) +9 >Emitted(77, 70) Source(149, 5) + SourceIndex(0) +10>Emitted(77, 93) Source(152, 47) + SourceIndex(0) +11>Emitted(77, 95) Source(149, 5) + SourceIndex(0) +12>Emitted(77, 162) Source(152, 47) + SourceIndex(0) +13>Emitted(77, 164) Source(150, 9) + SourceIndex(0) +14>Emitted(77, 181) Source(150, 28) + SourceIndex(0) +15>Emitted(77, 183) Source(150, 9) + SourceIndex(0) +16>Emitted(77, 225) Source(150, 28) + SourceIndex(0) +17>Emitted(77, 227) Source(151, 9) + SourceIndex(0) +18>Emitted(77, 246) Source(151, 32) + SourceIndex(0) +19>Emitted(77, 248) Source(151, 9) + SourceIndex(0) +20>Emitted(77, 294) Source(151, 32) + SourceIndex(0) +21>Emitted(77, 296) Source(153, 5) + SourceIndex(0) +22>Emitted(77, 306) Source(153, 15) + SourceIndex(0) +23>Emitted(77, 307) Source(153, 15) + SourceIndex(0) +24>Emitted(77, 309) Source(153, 17) + SourceIndex(0) +25>Emitted(77, 310) Source(153, 18) + SourceIndex(0) +26>Emitted(77, 313) Source(153, 21) + SourceIndex(0) +27>Emitted(77, 314) Source(153, 22) + SourceIndex(0) +28>Emitted(77, 316) Source(153, 24) + SourceIndex(0) +29>Emitted(77, 317) Source(153, 25) + SourceIndex(0) +30>Emitted(77, 320) Source(153, 28) + SourceIndex(0) +31>Emitted(77, 321) Source(153, 29) + SourceIndex(0) +32>Emitted(77, 323) Source(153, 31) + SourceIndex(0) +33>Emitted(77, 324) Source(153, 32) + SourceIndex(0) +34>Emitted(77, 326) Source(153, 34) + SourceIndex(0) +35>Emitted(77, 328) Source(153, 36) + SourceIndex(0) +36>Emitted(77, 329) Source(153, 37) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(78, 5) Source(154, 5) + SourceIndex(0) +2 >Emitted(78, 12) Source(154, 12) + SourceIndex(0) +3 >Emitted(78, 13) Source(154, 13) + SourceIndex(0) +4 >Emitted(78, 16) Source(154, 16) + SourceIndex(0) +5 >Emitted(78, 17) Source(154, 17) + SourceIndex(0) +6 >Emitted(78, 25) Source(154, 25) + SourceIndex(0) +7 >Emitted(78, 26) Source(154, 26) + SourceIndex(0) +8 >Emitted(78, 27) Source(154, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(79, 1) Source(155, 1) + SourceIndex(0) +2 >Emitted(79, 2) Source(155, 2) + SourceIndex(0) +--- +>>>for ((_52 = getMultiRobot(), _53 = _52.name, name = _53 === void 0 ? "noName" : _53, _54 = _52.skills, _55 = _54 === void 0 ? { primary: "none", secondary: "none" } : _54, _56 = _55.primary, primary = _56 === void 0 ? "primary" : _56, _57 = _55.secondary, secondary = _57 === void 0 ? "secondary" : _57, _52), i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +19> ^^ +20> ^^^^^^^^^^^^^^^^^^^ +21> ^^ +22> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +23> ^^^^^^ +24> ^^ +25> ^ +26> ^^^ +27> ^ +28> ^^ +29> ^ +30> ^^^ +31> ^ +32> ^^ +33> ^ +34> ^^ +35> ^^ +36> ^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { + > name = "noName", + > skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } + > } = getMultiRobot() +7 > +8 > name = "noName" +9 > +10> name = "noName" +11> , + > +12> skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } +13> +14> skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } +15> +16> primary = "primary" +17> +18> primary = "primary" +19> , + > +20> secondary = "secondary" +21> +22> secondary = "secondary" +23> + > } = { primary: "none", secondary: "none" } + > } = getMultiRobot() +24> , +25> i +26> = +27> 0 +28> ; +29> i +30> < +31> 1 +32> ; +33> i +34> ++ +35> ) +36> { +1->Emitted(80, 1) Source(156, 1) + SourceIndex(0) +2 >Emitted(80, 4) Source(156, 4) + SourceIndex(0) +3 >Emitted(80, 5) Source(156, 5) + SourceIndex(0) +4 >Emitted(80, 6) Source(156, 6) + SourceIndex(0) +5 >Emitted(80, 7) Source(156, 6) + SourceIndex(0) +6 >Emitted(80, 28) Source(162, 20) + SourceIndex(0) +7 >Emitted(80, 30) Source(157, 5) + SourceIndex(0) +8 >Emitted(80, 44) Source(157, 20) + SourceIndex(0) +9 >Emitted(80, 46) Source(157, 5) + SourceIndex(0) +10>Emitted(80, 84) Source(157, 20) + SourceIndex(0) +11>Emitted(80, 86) Source(158, 5) + SourceIndex(0) +12>Emitted(80, 102) Source(161, 47) + SourceIndex(0) +13>Emitted(80, 104) Source(158, 5) + SourceIndex(0) +14>Emitted(80, 171) Source(161, 47) + SourceIndex(0) +15>Emitted(80, 173) Source(159, 9) + SourceIndex(0) +16>Emitted(80, 190) Source(159, 28) + SourceIndex(0) +17>Emitted(80, 192) Source(159, 9) + SourceIndex(0) +18>Emitted(80, 234) Source(159, 28) + SourceIndex(0) +19>Emitted(80, 236) Source(160, 9) + SourceIndex(0) +20>Emitted(80, 255) Source(160, 32) + SourceIndex(0) +21>Emitted(80, 257) Source(160, 9) + SourceIndex(0) +22>Emitted(80, 303) Source(160, 32) + SourceIndex(0) +23>Emitted(80, 309) Source(162, 20) + SourceIndex(0) +24>Emitted(80, 311) Source(162, 22) + SourceIndex(0) +25>Emitted(80, 312) Source(162, 23) + SourceIndex(0) +26>Emitted(80, 315) Source(162, 26) + SourceIndex(0) +27>Emitted(80, 316) Source(162, 27) + SourceIndex(0) +28>Emitted(80, 318) Source(162, 29) + SourceIndex(0) +29>Emitted(80, 319) Source(162, 30) + SourceIndex(0) +30>Emitted(80, 322) Source(162, 33) + SourceIndex(0) +31>Emitted(80, 323) Source(162, 34) + SourceIndex(0) +32>Emitted(80, 325) Source(162, 36) + SourceIndex(0) +33>Emitted(80, 326) Source(162, 37) + SourceIndex(0) +34>Emitted(80, 328) Source(162, 39) + SourceIndex(0) +35>Emitted(80, 330) Source(162, 41) + SourceIndex(0) +36>Emitted(80, 331) Source(162, 42) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(81, 5) Source(163, 5) + SourceIndex(0) +2 >Emitted(81, 12) Source(163, 12) + SourceIndex(0) +3 >Emitted(81, 13) Source(163, 13) + SourceIndex(0) +4 >Emitted(81, 16) Source(163, 16) + SourceIndex(0) +5 >Emitted(81, 17) Source(163, 17) + SourceIndex(0) +6 >Emitted(81, 25) Source(163, 25) + SourceIndex(0) +7 >Emitted(81, 26) Source(163, 26) + SourceIndex(0) +8 >Emitted(81, 27) Source(163, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(82, 1) Source(164, 1) + SourceIndex(0) +2 >Emitted(82, 2) Source(164, 2) + SourceIndex(0) +--- +>>>for ((_58 = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, _59 = _58.name, name = _59 === void 0 ? "noName" : _59, _60 = _58.skills, _61 = _60 === void 0 ? { primary: "none", secondary: "none" } : _60, _62 = _61.primary, primary = _62 === void 0 ? "primary" : _62, _63 = _61.secondary, secondary = _63 === void 0 ? "secondary" : _63, _58), +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +19> ^^ +20> ^^^^^^^^^^^^^^^^^^^ +21> ^^ +22> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +23> ^^^^^^ +1-> + > +2 >for +3 > +4 > ( +5 > +6 > { + > name = "noName", + > skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } + > } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } +7 > +8 > name = "noName" +9 > +10> name = "noName" +11> , + > +12> skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } +13> +14> skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } +15> +16> primary = "primary" +17> +18> primary = "primary" +19> , + > +20> secondary = "secondary" +21> +22> secondary = "secondary" +23> + > } = { primary: "none", secondary: "none" } + > } = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } +1->Emitted(83, 1) Source(165, 1) + SourceIndex(0) +2 >Emitted(83, 4) Source(165, 4) + SourceIndex(0) +3 >Emitted(83, 5) Source(165, 5) + SourceIndex(0) +4 >Emitted(83, 6) Source(165, 6) + SourceIndex(0) +5 >Emitted(83, 7) Source(165, 6) + SourceIndex(0) +6 >Emitted(83, 86) Source(171, 90) + SourceIndex(0) +7 >Emitted(83, 88) Source(166, 5) + SourceIndex(0) +8 >Emitted(83, 102) Source(166, 20) + SourceIndex(0) +9 >Emitted(83, 104) Source(166, 5) + SourceIndex(0) +10>Emitted(83, 142) Source(166, 20) + SourceIndex(0) +11>Emitted(83, 144) Source(167, 5) + SourceIndex(0) +12>Emitted(83, 160) Source(170, 47) + SourceIndex(0) +13>Emitted(83, 162) Source(167, 5) + SourceIndex(0) +14>Emitted(83, 229) Source(170, 47) + SourceIndex(0) +15>Emitted(83, 231) Source(168, 9) + SourceIndex(0) +16>Emitted(83, 248) Source(168, 28) + SourceIndex(0) +17>Emitted(83, 250) Source(168, 9) + SourceIndex(0) +18>Emitted(83, 292) Source(168, 28) + SourceIndex(0) +19>Emitted(83, 294) Source(169, 9) + SourceIndex(0) +20>Emitted(83, 313) Source(169, 32) + SourceIndex(0) +21>Emitted(83, 315) Source(169, 9) + SourceIndex(0) +22>Emitted(83, 361) Source(169, 32) + SourceIndex(0) +23>Emitted(83, 367) Source(171, 90) + SourceIndex(0) +--- +>>> i = 0; i < 1; i++) { +1 >^^^^ +2 > ^ +3 > ^^^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^^^ +8 > ^ +9 > ^^ +10> ^ +11> ^^ +12> ^^ +13> ^ +14> ^^^-> +1 >, + > +2 > i +3 > = +4 > 0 +5 > ; +6 > i +7 > < +8 > 1 +9 > ; +10> i +11> ++ +12> ) +13> { +1 >Emitted(84, 5) Source(172, 5) + SourceIndex(0) +2 >Emitted(84, 6) Source(172, 6) + SourceIndex(0) +3 >Emitted(84, 9) Source(172, 9) + SourceIndex(0) +4 >Emitted(84, 10) Source(172, 10) + SourceIndex(0) +5 >Emitted(84, 12) Source(172, 12) + SourceIndex(0) +6 >Emitted(84, 13) Source(172, 13) + SourceIndex(0) +7 >Emitted(84, 16) Source(172, 16) + SourceIndex(0) +8 >Emitted(84, 17) Source(172, 17) + SourceIndex(0) +9 >Emitted(84, 19) Source(172, 19) + SourceIndex(0) +10>Emitted(84, 20) Source(172, 20) + SourceIndex(0) +11>Emitted(84, 22) Source(172, 22) + SourceIndex(0) +12>Emitted(84, 24) Source(172, 24) + SourceIndex(0) +13>Emitted(84, 25) Source(172, 25) + SourceIndex(0) +--- +>>> console.log(primaryA); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1-> + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1->Emitted(85, 5) Source(173, 5) + SourceIndex(0) +2 >Emitted(85, 12) Source(173, 12) + SourceIndex(0) +3 >Emitted(85, 13) Source(173, 13) + SourceIndex(0) +4 >Emitted(85, 16) Source(173, 16) + SourceIndex(0) +5 >Emitted(85, 17) Source(173, 17) + SourceIndex(0) +6 >Emitted(85, 25) Source(173, 25) + SourceIndex(0) +7 >Emitted(85, 26) Source(173, 26) + SourceIndex(0) +8 >Emitted(85, 27) Source(173, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(86, 1) Source(174, 1) + SourceIndex(0) +2 >Emitted(86, 2) Source(174, 2) + SourceIndex(0) +--- +>>>var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63; +>>>//# sourceMappingURL=sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.symbols b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.symbols new file mode 100644 index 00000000000..20ccd1136c3 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.symbols @@ -0,0 +1,628 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 11)) + + log(msg: any): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 1, 8)) +} +interface Robot { +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 2, 1)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 3, 17)) + + skill: string; +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 4, 17)) +} + +interface MultiRobot { +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 6, 1)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 8, 22)) + + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 9, 17)) + + primary?: string; +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 10, 13)) + + secondary?: string; +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 11, 25)) + + }; +} + +let robot: Robot = { name: "mower", skill: "mowing" }; +>robot : Symbol(robot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 16, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 16, 20)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 16, 35)) + +let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +>multiRobot : Symbol(multiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 17, 3)) +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 17, 30)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 17, 45)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 17, 55)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 17, 74)) + +function getRobot() { +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 17, 97)) + + return robot; +>robot : Symbol(robot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 16, 3)) +} +function getMultiRobot() { +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 20, 1)) + + return multiRobot; +>multiRobot : Symbol(multiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 17, 3)) +} + +let nameA: string, primaryA: string, secondaryA: string, i: number, skillA: string; +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 3)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 18)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 36)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 67)) + +let name: string, primary: string, secondary: string, skill: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 26, 3)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 26, 17)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 26, 34)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 26, 53)) + +for ({name: nameA = "noName" } = robot, i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 28, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 3)) +>robot : Symbol(robot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 16, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 3)) +} +for ({name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 31, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 3)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 17, 97)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 3)) +} +for ({name: nameA = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 34, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 34, 41)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 34, 58)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 3)) +} +for ({ + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 37, 6)) + + primary: primaryA = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 38, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 18)) + + secondary: secondaryA = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 39, 38)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 36)) + + } = { primary: "none", secondary: "none" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 41, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 41, 26)) + +} = multiRobot, i = 0; i < 1; i++) { +>multiRobot : Symbol(multiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 17, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 18)) +} +for ({ + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 45, 6)) + + primary: primaryA = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 46, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 18)) + + secondary: secondaryA = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 47, 38)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 36)) + + } = { primary: "none", secondary: "none" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 49, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 49, 26)) + +} = getMultiRobot(), i = 0; i < 1; i++) { +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 20, 1)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 18)) +} +for ({ + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 53, 6)) + + primary: primaryA = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 54, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 18)) + + secondary: secondaryA = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 55, 38)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 36)) + + } = { primary: "none", secondary: "none" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 57, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 57, 26)) + +} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 58, 17)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 58, 34)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 58, 44)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 58, 65)) + + i = 0; i < 1; i++) { +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 18)) +} + +for ({ name = "noName" } = robot, i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 63, 6)) +>robot : Symbol(robot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 16, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 3)) +} +for ({ name = "noName" } = getRobot(), i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 66, 6)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 17, 97)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 3)) +} +for ({ name = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 69, 6)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 69, 35)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 69, 52)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 3)) +} +for ({ + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 72, 6)) + + primary = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 73, 13)) + + secondary = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 74, 28)) + + } = { primary: "none", secondary: "none" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 76, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 76, 26)) + +} = multiRobot, i = 0; i < 1; i++) { +>multiRobot : Symbol(multiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 17, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 18)) +} +for ({ + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 80, 6)) + + primary = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 81, 13)) + + secondary = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 82, 28)) + + } = { primary: "none", secondary: "none" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 84, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 84, 26)) + +} = getMultiRobot(), i = 0; i < 1; i++) { +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 20, 1)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 18)) +} +for ({ + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 88, 6)) + + primary = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 89, 13)) + + secondary = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 90, 28)) + + } = { primary: "none", secondary: "none" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 92, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 92, 26)) + +} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 93, 17)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 93, 34)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 93, 44)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 93, 65)) + + i = 0; i < 1; i++) { +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 18)) +} + + +for ({name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 99, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 3)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 99, 29)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 67)) +>robot : Symbol(robot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 16, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 3)) +} +for ({name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 102, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 3)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 102, 29)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 67)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 17, 97)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 3)) +} +for ({name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 105, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 3)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 105, 29)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 67)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 105, 66)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 105, 83)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 3)) +} +for ({ + name: nameA = "noName", +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 108, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 3)) + + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 109, 27)) + + primary: primaryA = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 110, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 18)) + + secondary: secondaryA = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 111, 38)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 36)) + + } = { primary: "none", secondary: "none" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 113, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 113, 26)) + +} = multiRobot, i = 0; i < 1; i++) { +>multiRobot : Symbol(multiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 17, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 18)) +} +for ({ + name: nameA = "noName", +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 117, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 3)) + + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 118, 27)) + + primary: primaryA = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 119, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 18)) + + secondary: secondaryA = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 120, 38)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 36)) + + } = { primary: "none", secondary: "none" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 122, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 122, 26)) + +} = getMultiRobot(), i = 0; i < 1; i++) { +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 20, 1)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 18)) +} +for ({ + name: nameA = "noName", +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 126, 6)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 3)) + + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 127, 27)) + + primary: primaryA = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 128, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 18)) + + secondary: secondaryA = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 129, 38)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 36)) + + } = { primary: "none", secondary: "none" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 131, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 131, 26)) + +} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 132, 17)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 132, 34)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 132, 44)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 132, 65)) + + i = 0; i < 1; i++) { +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 18)) +} + +for ({ name = "noName", skill = "skill" } = robot, i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 137, 6)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 137, 23)) +>robot : Symbol(robot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 16, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 3)) +} +for ({ name = "noName", skill = "skill" } = getRobot(), i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 140, 6)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 140, 23)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 17, 97)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 3)) +} +for ({ name = "noName", skill = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 143, 6)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 143, 23)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 143, 52)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 143, 69)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 3)) +} +for ({ + name = "noName", +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 146, 6)) + + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 147, 20)) + + primary = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 148, 13)) + + secondary = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 149, 28)) + + } = { primary: "none", secondary: "none" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 151, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 151, 26)) + +} = multiRobot, i = 0; i < 1; i++) { +>multiRobot : Symbol(multiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 17, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 18)) +} +for ({ + name = "noName", +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 155, 6)) + + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 156, 20)) + + primary = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 157, 13)) + + secondary = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 158, 28)) + + } = { primary: "none", secondary: "none" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 160, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 160, 26)) + +} = getMultiRobot(), i = 0; i < 1; i++) { +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 20, 1)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 18)) +} +for ({ + name = "noName", +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 164, 6)) + + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 165, 20)) + + primary = "primary", +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 166, 13)) + + secondary = "secondary" +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 167, 28)) + + } = { primary: "none", secondary: "none" } +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 169, 9)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 169, 26)) + +} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 170, 17)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 170, 34)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 170, 44)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 170, 65)) + + i = 0; i < 1; i++) { +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 56)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts, 25, 18)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.types b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.types new file mode 100644 index 00000000000..aa8c95bae01 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.types @@ -0,0 +1,1020 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts === +declare var console: { +>console : { log(msg: any): void; } + + log(msg: any): void; +>log : (msg: any) => void +>msg : any +} +interface Robot { +>Robot : Robot + + name: string; +>name : string + + skill: string; +>skill : string +} + +interface MultiRobot { +>MultiRobot : MultiRobot + + name: string; +>name : string + + skills: { +>skills : { primary?: string; secondary?: string; } + + primary?: string; +>primary : string + + secondary?: string; +>secondary : string + + }; +} + +let robot: Robot = { name: "mower", skill: "mowing" }; +>robot : Robot +>Robot : Robot +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string + +let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +>multiRobot : MultiRobot +>MultiRobot : MultiRobot +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"mower" : string +>skills : { primary: string; secondary: string; } +>{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } +>primary : string +>"mowing" : string +>secondary : string +>"none" : string + +function getRobot() { +>getRobot : () => Robot + + return robot; +>robot : Robot +} +function getMultiRobot() { +>getMultiRobot : () => MultiRobot + + return multiRobot; +>multiRobot : MultiRobot +} + +let nameA: string, primaryA: string, secondaryA: string, i: number, skillA: string; +>nameA : string +>primaryA : string +>secondaryA : string +>i : number +>skillA : string + +let name: string, primary: string, secondary: string, skill: string; +>name : string +>primary : string +>secondary : string +>skill : string + +for ({name: nameA = "noName" } = robot, i = 0; i < 1; i++) { +>{name: nameA = "noName" } = robot, i = 0 : number +>{name: nameA = "noName" } = robot : Robot +>{name: nameA = "noName" } : { name?: string; } +>name : string +>nameA = "noName" : string +>nameA : string +>"noName" : string +>robot : Robot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) { +>{name: nameA = "noName" } = getRobot(), i = 0 : number +>{name: nameA = "noName" } = getRobot() : Robot +>{name: nameA = "noName" } : { name?: string; } +>name : string +>nameA = "noName" : string +>nameA : string +>"noName" : string +>getRobot() : Robot +>getRobot : () => Robot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({name: nameA = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>{name: nameA = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0 : number +>{name: nameA = "noName" } = { name: "trimmer", skill: "trimming" } : Robot +>{name: nameA = "noName" } : { name?: string; } +>name : string +>nameA = "noName" : string +>nameA : string +>"noName" : string +>{ name: "trimmer", skill: "trimming" } : Robot +>Robot : Robot +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ +>{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} = multiRobot, i = 0 : number +>{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} = multiRobot : MultiRobot +>{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} : { skills?: { primary?: string; secondary?: string; }; } + + skills: { +>skills : { primary?: string; secondary?: string; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: string; secondary?: string; } + + primary: primaryA = "primary", +>primary : string +>primaryA = "primary" : string +>primaryA : string +>"primary" : string + + secondary: secondaryA = "secondary" +>secondary : string +>secondaryA = "secondary" : string +>secondaryA : string +>"secondary" : string + + } = { primary: "none", secondary: "none" } +>{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>primary : string +>"none" : string +>secondary : string +>"none" : string + +} = multiRobot, i = 0; i < 1; i++) { +>multiRobot : MultiRobot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for ({ +>{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} = getMultiRobot(), i = 0 : number +>{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} = getMultiRobot() : MultiRobot +>{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} : { skills?: { primary?: string; secondary?: string; }; } + + skills: { +>skills : { primary?: string; secondary?: string; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: string; secondary?: string; } + + primary: primaryA = "primary", +>primary : string +>primaryA = "primary" : string +>primaryA : string +>"primary" : string + + secondary: secondaryA = "secondary" +>secondary : string +>secondaryA = "secondary" : string +>secondaryA : string +>"secondary" : string + + } = { primary: "none", secondary: "none" } +>{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>primary : string +>"none" : string +>secondary : string +>"none" : string + +} = getMultiRobot(), i = 0; i < 1; i++) { +>getMultiRobot() : MultiRobot +>getMultiRobot : () => MultiRobot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for ({ +>{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, i = 0 : number +>{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot +>{ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} : { skills?: { primary?: string; secondary?: string; }; } + + skills: { +>skills : { primary?: string; secondary?: string; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: string; secondary?: string; } + + primary: primaryA = "primary", +>primary : string +>primaryA = "primary" : string +>primaryA : string +>"primary" : string + + secondary: secondaryA = "secondary" +>secondary : string +>secondaryA = "secondary" : string +>secondaryA : string +>"secondary" : string + + } = { primary: "none", secondary: "none" } +>{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>primary : string +>"none" : string +>secondary : string +>"none" : string + +} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot +>MultiRobot : MultiRobot +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + + i = 0; i < 1; i++) { +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} + +for ({ name = "noName" } = robot, i = 0; i < 1; i++) { +>{ name = "noName" } = robot, i = 0 : number +>{ name = "noName" } = robot : Robot +>{ name = "noName" } : { name?: string; } +>name : string +>robot : Robot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ name = "noName" } = getRobot(), i = 0; i < 1; i++) { +>{ name = "noName" } = getRobot(), i = 0 : number +>{ name = "noName" } = getRobot() : Robot +>{ name = "noName" } : { name?: string; } +>name : string +>getRobot() : Robot +>getRobot : () => Robot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ name = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>{ name = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0 : number +>{ name = "noName" } = { name: "trimmer", skill: "trimming" } : Robot +>{ name = "noName" } : { name?: string; } +>name : string +>{ name: "trimmer", skill: "trimming" } : Robot +>Robot : Robot +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ +>{ skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} = multiRobot, i = 0 : number +>{ skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} = multiRobot : MultiRobot +>{ skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} : { skills?: { primary?: string; secondary?: string; }; } + + skills: { +>skills : { primary?: string; secondary?: string; } +>{ primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>{ primary = "primary", secondary = "secondary" } : { primary?: string; secondary?: string; } + + primary = "primary", +>primary : string + + secondary = "secondary" +>secondary : string + + } = { primary: "none", secondary: "none" } +>{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>primary : string +>"none" : string +>secondary : string +>"none" : string + +} = multiRobot, i = 0; i < 1; i++) { +>multiRobot : MultiRobot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for ({ +>{ skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} = getMultiRobot(), i = 0 : number +>{ skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} = getMultiRobot() : MultiRobot +>{ skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} : { skills?: { primary?: string; secondary?: string; }; } + + skills: { +>skills : { primary?: string; secondary?: string; } +>{ primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>{ primary = "primary", secondary = "secondary" } : { primary?: string; secondary?: string; } + + primary = "primary", +>primary : string + + secondary = "secondary" +>secondary : string + + } = { primary: "none", secondary: "none" } +>{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>primary : string +>"none" : string +>secondary : string +>"none" : string + +} = getMultiRobot(), i = 0; i < 1; i++) { +>getMultiRobot() : MultiRobot +>getMultiRobot : () => MultiRobot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for ({ +>{ skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, i = 0 : number +>{ skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot +>{ skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} : { skills?: { primary?: string; secondary?: string; }; } + + skills: { +>skills : { primary?: string; secondary?: string; } +>{ primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>{ primary = "primary", secondary = "secondary" } : { primary?: string; secondary?: string; } + + primary = "primary", +>primary : string + + secondary = "secondary" +>secondary : string + + } = { primary: "none", secondary: "none" } +>{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>primary : string +>"none" : string +>secondary : string +>"none" : string + +} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot +>MultiRobot : MultiRobot +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + + i = 0; i < 1; i++) { +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} + + +for ({name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i++) { +>{name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0 : number +>{name: nameA = "noName", skill: skillA = "skill" } = robot : Robot +>{name: nameA = "noName", skill: skillA = "skill" } : { name?: string; skill?: string; } +>name : string +>nameA = "noName" : string +>nameA : string +>"noName" : string +>skill : string +>skillA = "skill" : string +>skillA : string +>"skill" : string +>robot : Robot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) { +>{name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0 : number +>{name: nameA = "noName", skill: skillA = "skill" } = getRobot() : Robot +>{name: nameA = "noName", skill: skillA = "skill" } : { name?: string; skill?: string; } +>name : string +>nameA = "noName" : string +>nameA : string +>"noName" : string +>skill : string +>skillA = "skill" : string +>skillA : string +>"skill" : string +>getRobot() : Robot +>getRobot : () => Robot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>{name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0 : number +>{name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" } : Robot +>{name: nameA = "noName", skill: skillA = "skill" } : { name?: string; skill?: string; } +>name : string +>nameA = "noName" : string +>nameA : string +>"noName" : string +>skill : string +>skillA = "skill" : string +>skillA : string +>"skill" : string +>{ name: "trimmer", skill: "trimming" } : Robot +>Robot : Robot +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ +>{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} = multiRobot, i = 0 : number +>{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} = multiRobot : MultiRobot +>{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} : { name?: string; skills?: { primary?: string; secondary?: string; }; } + + name: nameA = "noName", +>name : string +>nameA = "noName" : string +>nameA : string +>"noName" : string + + skills: { +>skills : { primary?: string; secondary?: string; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: string; secondary?: string; } + + primary: primaryA = "primary", +>primary : string +>primaryA = "primary" : string +>primaryA : string +>"primary" : string + + secondary: secondaryA = "secondary" +>secondary : string +>secondaryA = "secondary" : string +>secondaryA : string +>"secondary" : string + + } = { primary: "none", secondary: "none" } +>{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>primary : string +>"none" : string +>secondary : string +>"none" : string + +} = multiRobot, i = 0; i < 1; i++) { +>multiRobot : MultiRobot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for ({ +>{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} = getMultiRobot(), i = 0 : number +>{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} = getMultiRobot() : MultiRobot +>{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} : { name?: string; skills?: { primary?: string; secondary?: string; }; } + + name: nameA = "noName", +>name : string +>nameA = "noName" : string +>nameA : string +>"noName" : string + + skills: { +>skills : { primary?: string; secondary?: string; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: string; secondary?: string; } + + primary: primaryA = "primary", +>primary : string +>primaryA = "primary" : string +>primaryA : string +>"primary" : string + + secondary: secondaryA = "secondary" +>secondary : string +>secondaryA = "secondary" : string +>secondaryA : string +>"secondary" : string + + } = { primary: "none", secondary: "none" } +>{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>primary : string +>"none" : string +>secondary : string +>"none" : string + +} = getMultiRobot(), i = 0; i < 1; i++) { +>getMultiRobot() : MultiRobot +>getMultiRobot : () => MultiRobot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for ({ +>{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, i = 0 : number +>{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot +>{ name: nameA = "noName", skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" }} : { name?: string; skills?: { primary?: string; secondary?: string; }; } + + name: nameA = "noName", +>name : string +>nameA = "noName" : string +>nameA : string +>"noName" : string + + skills: { +>skills : { primary?: string; secondary?: string; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>{ primary: primaryA = "primary", secondary: secondaryA = "secondary" } : { primary?: string; secondary?: string; } + + primary: primaryA = "primary", +>primary : string +>primaryA = "primary" : string +>primaryA : string +>"primary" : string + + secondary: secondaryA = "secondary" +>secondary : string +>secondaryA = "secondary" : string +>secondaryA : string +>"secondary" : string + + } = { primary: "none", secondary: "none" } +>{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>primary : string +>"none" : string +>secondary : string +>"none" : string + +} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot +>MultiRobot : MultiRobot +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + + i = 0; i < 1; i++) { +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} + +for ({ name = "noName", skill = "skill" } = robot, i = 0; i < 1; i++) { +>{ name = "noName", skill = "skill" } = robot, i = 0 : number +>{ name = "noName", skill = "skill" } = robot : Robot +>{ name = "noName", skill = "skill" } : { name?: string; skill?: string; } +>name : string +>skill : string +>robot : Robot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ name = "noName", skill = "skill" } = getRobot(), i = 0; i < 1; i++) { +>{ name = "noName", skill = "skill" } = getRobot(), i = 0 : number +>{ name = "noName", skill = "skill" } = getRobot() : Robot +>{ name = "noName", skill = "skill" } : { name?: string; skill?: string; } +>name : string +>skill : string +>getRobot() : Robot +>getRobot : () => Robot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ name = "noName", skill = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>{ name = "noName", skill = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0 : number +>{ name = "noName", skill = "skill" } = { name: "trimmer", skill: "trimming" } : Robot +>{ name = "noName", skill = "skill" } : { name?: string; skill?: string; } +>name : string +>skill : string +>{ name: "trimmer", skill: "trimming" } : Robot +>Robot : Robot +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for ({ +>{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} = multiRobot, i = 0 : number +>{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} = multiRobot : MultiRobot +>{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} : { name?: string; skills?: { primary?: string; secondary?: string; }; } + + name = "noName", +>name : string + + skills: { +>skills : { primary?: string; secondary?: string; } +>{ primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>{ primary = "primary", secondary = "secondary" } : { primary?: string; secondary?: string; } + + primary = "primary", +>primary : string + + secondary = "secondary" +>secondary : string + + } = { primary: "none", secondary: "none" } +>{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>primary : string +>"none" : string +>secondary : string +>"none" : string + +} = multiRobot, i = 0; i < 1; i++) { +>multiRobot : MultiRobot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for ({ +>{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} = getMultiRobot(), i = 0 : number +>{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} = getMultiRobot() : MultiRobot +>{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} : { name?: string; skills?: { primary?: string; secondary?: string; }; } + + name = "noName", +>name : string + + skills: { +>skills : { primary?: string; secondary?: string; } +>{ primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>{ primary = "primary", secondary = "secondary" } : { primary?: string; secondary?: string; } + + primary = "primary", +>primary : string + + secondary = "secondary" +>secondary : string + + } = { primary: "none", secondary: "none" } +>{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>primary : string +>"none" : string +>secondary : string +>"none" : string + +} = getMultiRobot(), i = 0; i < 1; i++) { +>getMultiRobot() : MultiRobot +>getMultiRobot : () => MultiRobot +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for ({ +>{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, i = 0 : number +>{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot +>{ name = "noName", skills: { primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" }} : { name?: string; skills?: { primary?: string; secondary?: string; }; } + + name = "noName", +>name : string + + skills: { +>skills : { primary?: string; secondary?: string; } +>{ primary = "primary", secondary = "secondary" } = { primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>{ primary = "primary", secondary = "secondary" } : { primary?: string; secondary?: string; } + + primary = "primary", +>primary : string + + secondary = "secondary" +>secondary : string + + } = { primary: "none", secondary: "none" } +>{ primary: "none", secondary: "none" } : { primary?: string; secondary?: string; } +>primary : string +>"none" : string +>secondary : string +>"none" : string + +} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot +>MultiRobot : MultiRobot +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + + i = 0; i < 1; i++) { +>i = 0 : number +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} diff --git a/tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts b/tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts new file mode 100644 index 00000000000..36c3c8cb48c --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts @@ -0,0 +1,109 @@ +// @sourcemap: true +declare var console: { + log(msg: any): void; +} +type Robot = [number, string, string]; +type MultiSkilledRobot = [string, string[]]; + +let robotA: Robot = [1, "mower", "mowing"]; +function getRobot() { + return robotA; +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +function getMultiRobot() { + return multiRobotA; +} + +for (let [, nameA ="name"] = robotA, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let [, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for (let [, nameA = "name"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(nameA); +} +for (let [, [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["none", "none"]] = multiRobotA, i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for (let [, [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["none", "none"]] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for (let [, [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(primarySkillA); +} + +for (let [numberB = -1] = robotA, i = 0; i < 1; i++) { + console.log(numberB); +} +for (let [numberB = -1] = getRobot(), i = 0; i < 1; i++) { + console.log(numberB); +} +for (let [numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(numberB); +} +for (let [nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { + console.log(nameB); +} +for (let [nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(nameB); +} +for (let [nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(nameB); +} + +for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { + console.log(nameA2); +} +for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { + console.log(nameA2); +} +for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(nameA2); +} +for (let + [nameMA = "noName", + [ + primarySkillA = "primary", + secondarySkillA = "secondary" + ] = ["none", "none"] + ] = multiRobotA, i = 0; i < 1; i++) { + console.log(nameMA); +} +for (let [nameMA = "noName", + [ + primarySkillA = "primary", + secondarySkillA = "secondary" + ] = ["none", "none"] +] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(nameMA); +} +for (let [nameMA = "noName", + [ + primarySkillA = "primary", + secondarySkillA = "secondary" + ] = ["none", "none"] +] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(nameMA); +} + +for (let [numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + console.log(numberA3); +} +for (let [numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + console.log(numberA3); +} +for (let [numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(numberA3); +} \ No newline at end of file diff --git a/tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts b/tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts new file mode 100644 index 00000000000..4e0e5d053b3 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts @@ -0,0 +1,115 @@ +// @sourcemap: true +declare var console: { + log(msg: any): void; +} +type Robot = [number, string, string]; +type MultiSkilledRobot = [string, [string, string]]; + +let robotA: Robot = [1, "mower", "mowing"]; +function getRobot() { + return robotA; +} + +let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +function getMultiRobot() { + return multiRobotA; +} + +let nameA: string, primarySkillA: string, secondarySkillA: string; +let numberB: number, nameB: string; +let numberA2: number, nameA2: string, skillA2: string, nameMA: string; +let numberA3: number, robotAInfo: (number | string)[], multiRobotAInfo: (string | [string, string])[]; +let i: number; + +for ([, nameA = "name"] = robotA, i = 0; i < 1; i++) { + console.log(nameA); +} +for ([, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for ([, nameA = "name"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(nameA); +} +for ([, [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["none", "none"]] = multiRobotA, i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for ([, [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["none", "none"]] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primarySkillA); +} +for ([, [ + primarySkillA = "primary", + secondarySkillA = "secondary" +] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(primarySkillA); +} + +for ([numberB = -1] = robotA, i = 0; i < 1; i++) { + console.log(numberB); +} +for ([numberB = -1] = getRobot(), i = 0; i < 1; i++) { + console.log(numberB); +} +for ([numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(numberB); +} +for ([nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { + console.log(nameB); +} +for ([nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(nameB); +} +for ([nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(nameB); +} + +for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { + console.log(nameA2); +} +for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { + console.log(nameA2); +} +for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(nameA2); +} +for (let + [nameMA = "noName", + [ + primarySkillA = "primary", + secondarySkillA = "secondary" + ] = ["none", "none"] + ] = multiRobotA, i = 0; i < 1; i++) { + console.log(nameMA); +} +for ([nameMA = "noName", + [ + primarySkillA = "primary", + secondarySkillA = "secondary" + ] = ["none", "none"] +] = getMultiRobot(), i = 0; i < 1; i++) { + console.log(nameMA); +} +for ([nameMA = "noName", + [ + primarySkillA = "primary", + secondarySkillA = "secondary" + ] = ["none", "none"] +] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + console.log(nameMA); +} + +for ([numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + console.log(numberA3); +} +for ([numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + console.log(numberA3); +} +for ([numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + console.log(numberA3); +} \ No newline at end of file diff --git a/tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts b/tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts new file mode 100644 index 00000000000..22c9ecdf66d --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts @@ -0,0 +1,98 @@ +// @sourcemap: true +declare var console: { + log(msg: any): void; +} +interface Robot { + name: string; + skill: string; +} + +interface MultiRobot { + name: string; + skills: { + primary?: string; + secondary?: string; + }; +} + +let robot: Robot = { name: "mower", skill: "mowing" }; +let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +function getRobot() { + return robot; +} +function getMultiRobot() { + return multiRobot; +} + +for (let {name: nameA= "noName" } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let { + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "none", secondary: "none" } +} = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for (let { + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "none", secondary: "none" } +} = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for (let { + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "none", secondary: "none" } +} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} + +for (let {name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let { + name: nameA = "noName", + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "none", secondary: "none" } +} = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for (let { + name: nameA = "noName", + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "none", secondary: "none" } +} = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for (let { + name: nameA = "noName", + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "none", secondary: "none" } +} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} \ No newline at end of file diff --git a/tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts b/tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts new file mode 100644 index 00000000000..0240a82c40b --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts @@ -0,0 +1,175 @@ +// @sourcemap: true +declare var console: { + log(msg: any): void; +} +interface Robot { + name: string; + skill: string; +} + +interface MultiRobot { + name: string; + skills: { + primary?: string; + secondary?: string; + }; +} + +let robot: Robot = { name: "mower", skill: "mowing" }; +let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +function getRobot() { + return robot; +} +function getMultiRobot() { + return multiRobot; +} + +let nameA: string, primaryA: string, secondaryA: string, i: number, skillA: string; +let name: string, primary: string, secondary: string, skill: string; + +for ({name: nameA = "noName" } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for ({name: nameA = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "none", secondary: "none" } +} = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "none", secondary: "none" } +} = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "none", secondary: "none" } +} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} + +for ({ name = "noName" } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name = "noName" } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ + skills: { + primary = "primary", + secondary = "secondary" + } = { primary: "none", secondary: "none" } +} = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ + skills: { + primary = "primary", + secondary = "secondary" + } = { primary: "none", secondary: "none" } +} = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ + skills: { + primary = "primary", + secondary = "secondary" + } = { primary: "none", secondary: "none" } +} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} + + +for ({name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for ({name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ + name: nameA = "noName", + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "none", secondary: "none" } +} = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ + name: nameA = "noName", + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "none", secondary: "none" } +} = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ + name: nameA = "noName", + skills: { + primary: primaryA = "primary", + secondary: secondaryA = "secondary" + } = { primary: "none", secondary: "none" } +} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} + +for ({ name = "noName", skill = "skill" } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name = "noName", skill = "skill" } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ name = "noName", skill = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for ({ + name = "noName", + skills: { + primary = "primary", + secondary = "secondary" + } = { primary: "none", secondary: "none" } +} = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ + name = "noName", + skills: { + primary = "primary", + secondary = "secondary" + } = { primary: "none", secondary: "none" } +} = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for ({ + name = "noName", + skills: { + primary = "primary", + secondary = "secondary" + } = { primary: "none", secondary: "none" } +} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} \ No newline at end of file From c7ae143e62c53fc578c0cf98dc4e4f2d8e73bbee Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 14 Dec 2015 15:03:16 -0800 Subject: [PATCH 058/209] Fix up fourslash test --- .../cases/fourslash/tsxCompletionOnOpeningTagWithoutJSX1.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/cases/fourslash/tsxCompletionOnOpeningTagWithoutJSX1.ts b/tests/cases/fourslash/tsxCompletionOnOpeningTagWithoutJSX1.ts index 43312ade6b2..1b745f6e418 100644 --- a/tests/cases/fourslash/tsxCompletionOnOpeningTagWithoutJSX1.ts +++ b/tests/cases/fourslash/tsxCompletionOnOpeningTagWithoutJSX1.ts @@ -1,8 +1,7 @@ /// //@Filename: file.tsx -//// var x =
Date: Tue, 15 Dec 2015 08:39:51 -0800 Subject: [PATCH 059/209] Use FileMap instead of string array --- src/compiler/sys.ts | 72 ++++++++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 33 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index cbb7e320780..91371e62ec8 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -295,47 +295,52 @@ namespace ts { } function createWatchedFileSet() { - const watchedDirectories: { [path: string]: FileWatcher } = {}; - const watchedFiles: { [fileName: string]: (fileName: string, removed?: boolean) => void; } = {}; + const watchedDirectories = createFileMap(); + const watchedFiles = createFileMap<(fileName: string, removed?: boolean) => void>(); + const currentDirectory = process.cwd(); + + return { addFile, removeFile }; function addFile(fileName: string, callback: (fileName: string, removed?: boolean) => void): WatchedFile { - const file: WatchedFile = { fileName, callback }; - const watchedPaths = Object.keys(watchedDirectories); - // Try to find parent paths that are already watched. If found, don't add directory watchers - const watchedParentPaths = watchedPaths.filter(path => fileName.indexOf(path) === 0); - // If adding new watchers, try to find children paths that are already watched. If found, close them. - if (watchedParentPaths.length === 0) { - const pathToWatch = ts.getDirectoryPath(fileName); - for (const watchedPath in watchedDirectories) { - if (watchedPath.indexOf(pathToWatch) === 0) { - watchedDirectories[watchedPath].close(); - delete watchedDirectories[watchedPath]; - } - } - watchedDirectories[pathToWatch] = _fs.watch( - pathToWatch, - (eventName: string, relativeFileName: string) => fileEventHandler(eventName, ts.normalizePath(ts.combinePaths(pathToWatch, relativeFileName))) - ); + const path = toPath(fileName, currentDirectory, getCanonicalPath); + const parentDirPath = toPath(ts.getDirectoryPath(fileName), currentDirectory, getCanonicalPath); + + if (!watchedDirectories.contains(parentDirPath)) { + watchedDirectories.set(parentDirPath, _fs.watch( + parentDirPath, + (eventName: string, relativeFileName: string) => fileEventHandler(eventName, relativeFileName, parentDirPath) + )); } - watchedFiles[fileName] = callback; + watchedFiles.set(path, callback); return { fileName, callback }; } function removeFile(file: WatchedFile) { - delete watchedFiles[file.fileName]; - } + const path = toPath(file.fileName, currentDirectory, getCanonicalPath); + watchedFiles.remove(path); - function fileEventHandler(eventName: string, fileName: string) { - if (watchedFiles[fileName]) { - const callback = watchedFiles[fileName]; - callback(fileName); + const parentDirPath = toPath(ts.getDirectoryPath(path), currentDirectory, getCanonicalPath); + if (watchedDirectories.contains(parentDirPath)) { + let hasWatchedChildren = false; + watchedFiles.forEachValue((key, _) => { + if (ts.getDirectoryPath(key) === parentDirPath) { + hasWatchedChildren = true; + } + }); + if (!hasWatchedChildren) { + watchedDirectories.get(parentDirPath).close(); + watchedDirectories.remove(parentDirPath); + } } } - return { - addFile: addFile, - removeFile: removeFile - }; + function fileEventHandler(eventName: string, fileName: string, basePath: string) { + const path = ts.toPath(fileName, basePath, getCanonicalPath); + if (watchedFiles.contains(path)) { + const callback = watchedFiles.get(path); + callback(fileName); + } + } } // REVIEW: for now this implementation uses polling. @@ -352,7 +357,7 @@ namespace ts { // to increase the chunk size or decrease the interval // time dynamically to match the large reference set? const pollingWatchedFileSet = createPollingWatchedFileSet(); - // const watchedFileSet = createWatchedFileSet(); + const watchedFileSet = createWatchedFileSet(); function isNode4OrLater(): Boolean { return parseInt(process.version.charAt(1)) >= 4; @@ -456,9 +461,10 @@ namespace ts { // and is more efficient than `fs.watchFile` (ref: https://github.com/nodejs/node/pull/2649 // and https://github.com/Microsoft/TypeScript/issues/4643), therefore // if the current node.js version is newer than 4, use `fs.watch` instead. - const watchedFile = pollingWatchedFileSet.addFile(fileName, callback); + const watchSet = isNode4OrLater() ? watchedFileSet : pollingWatchedFileSet; + const watchedFile = watchSet.addFile(fileName, callback); return { - close: () => pollingWatchedFileSet.removeFile(watchedFile) + close: () => watchSet.removeFile(watchedFile) }; }, watchDirectory: (path, callback, recursive) => { From 834aa95334c488c2760dde4870b7afa14c28223f Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 17 Dec 2015 14:00:34 -0800 Subject: [PATCH 060/209] Make changes to baselining breakpoint validation of current file to use default baseline name --- src/harness/fourslash.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 24f3319285b..118a430cb49 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -1089,9 +1089,15 @@ namespace FourSlash { } public baselineCurrentFileBreakpointLocations() { + let baselineFile = this.testData.globalOptions[metadataOptionNames.baselineFile]; + if (!baselineFile) { + baselineFile = this.activeFile.fileName.replace(this.basePath + "/breakpointValidation", "bpSpan"); + baselineFile = baselineFile.replace(".ts", ".baseline"); + + } Harness.Baseline.runBaseline( "Breakpoint Locations for " + this.activeFile.fileName, - this.testData.globalOptions[metadataOptionNames.baselineFile], + baselineFile, () => { return this.baselineCurrentFileLocations(pos => this.getBreakpointStatementLocation(pos)); }, From 00e253ad883f8db4355f4e21c3709f2b47fff558 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 17 Dec 2015 14:00:56 -0800 Subject: [PATCH 061/209] Add test cases for variable statements with destructuring breakpoint validation --- ...panDestructuringVariableStatement.baseline | 99 ++++++ ...anDestructuringVariableStatement1.baseline | 197 +++++++++++ ...ingVariableStatementDefaultValues.baseline | 99 ++++++ ...atementNestedObjectBindingPattern.baseline | 113 ++++++ ...ctBindingPatternWithDefaultValues.baseline | 329 ++++++++++++++++++ ...alidationDestructuringVariableStatement.ts | 22 ++ ...lidationDestructuringVariableStatement1.ts | 30 ++ ...ructuringVariableStatementDefaultValues.ts | 22 ++ ...ableStatementNestedObjectBindingPattern.ts | 26 ++ ...edObjectBindingPatternWithDefaultValues.ts | 43 +++ 10 files changed, 980 insertions(+) create mode 100644 tests/baselines/reference/bpSpanDestructuringVariableStatement.baseline create mode 100644 tests/baselines/reference/bpSpanDestructuringVariableStatement1.baseline create mode 100644 tests/baselines/reference/bpSpanDestructuringVariableStatementDefaultValues.baseline create mode 100644 tests/baselines/reference/bpSpanDestructuringVariableStatementNestedObjectBindingPattern.baseline create mode 100644 tests/baselines/reference/bpSpanDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.baseline create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringVariableStatement.ts create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringVariableStatement1.ts create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringVariableStatementDefaultValues.ts create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringVariableStatementNestedObjectBindingPattern.ts create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts diff --git a/tests/baselines/reference/bpSpanDestructuringVariableStatement.baseline b/tests/baselines/reference/bpSpanDestructuringVariableStatement.baseline new file mode 100644 index 00000000000..b554d4b969b --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringVariableStatement.baseline @@ -0,0 +1,99 @@ + +1 >interface Robot { + + ~~~~~~~~~~~~~~~~~~ => Pos: (0 to 17) SpanInfo: undefined +-------------------------------- +2 > name: string; + + ~~~~~~~~~~~~~~~~~~ => Pos: (18 to 35) SpanInfo: undefined +-------------------------------- +3 > skill: string; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (36 to 54) SpanInfo: undefined +-------------------------------- +4 >} + + ~~ => Pos: (55 to 56) SpanInfo: undefined +-------------------------------- +5 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (57 to 79) SpanInfo: undefined +-------------------------------- +6 > log(msg: string): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (80 to 107) SpanInfo: undefined +-------------------------------- +7 >} + + ~~ => Pos: (108 to 109) SpanInfo: undefined +-------------------------------- +8 >var hello = "hello"; + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (110 to 130) SpanInfo: {"start":110,"length":19} + >var hello = "hello" + >:=> (line 8, col 0) to (line 8, col 19) +-------------------------------- +9 >var robotA: Robot = { name: "mower", skill: "mowing" }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (131 to 186) SpanInfo: {"start":131,"length":54} + >var robotA: Robot = { name: "mower", skill: "mowing" } + >:=> (line 9, col 0) to (line 9, col 54) +-------------------------------- +10 >var robotB: Robot = { name: "trimmer", skill: "trimming" }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (187 to 246) SpanInfo: {"start":187,"length":58} + >var robotB: Robot = { name: "trimmer", skill: "trimming" } + >:=> (line 10, col 0) to (line 10, col 58) +-------------------------------- +11 >var { name: nameA } = robotA; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (247 to 276) SpanInfo: {"start":247,"length":28} + >var { name: nameA } = robotA + >:=> (line 11, col 0) to (line 11, col 28) +-------------------------------- +12 >var { name: nameB, skill: skillB } = robotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (277 to 321) SpanInfo: {"start":277,"length":43} + >var { name: nameB, skill: skillB } = robotB + >:=> (line 12, col 0) to (line 12, col 43) +-------------------------------- +13 >var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (322 to 401) SpanInfo: {"start":322,"length":78} + >var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" } + >:=> (line 13, col 0) to (line 13, col 78) +-------------------------------- +14 >if (nameA == nameB) { + + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (402 to 423) SpanInfo: {"start":402,"length":19} + >if (nameA == nameB) + >:=> (line 14, col 0) to (line 14, col 19) +-------------------------------- +15 > console.log(skillB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (424 to 448) SpanInfo: {"start":428,"length":19} + >console.log(skillB) + >:=> (line 15, col 4) to (line 15, col 23) +-------------------------------- +16 >} + + ~~ => Pos: (449 to 450) SpanInfo: {"start":428,"length":19} + >console.log(skillB) + >:=> (line 15, col 4) to (line 15, col 23) +-------------------------------- +17 >else { + + ~~~~~~~ => Pos: (451 to 457) SpanInfo: {"start":462,"length":18} + >console.log(nameC) + >:=> (line 18, col 4) to (line 18, col 22) +-------------------------------- +18 > console.log(nameC); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (458 to 481) SpanInfo: {"start":462,"length":18} + >console.log(nameC) + >:=> (line 18, col 4) to (line 18, col 22) +-------------------------------- +19 >} + ~ => Pos: (482 to 482) SpanInfo: {"start":462,"length":18} + >console.log(nameC) + >:=> (line 18, col 4) to (line 18, col 22) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringVariableStatement1.baseline b/tests/baselines/reference/bpSpanDestructuringVariableStatement1.baseline new file mode 100644 index 00000000000..774869428d6 --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringVariableStatement1.baseline @@ -0,0 +1,197 @@ + +1 >interface Robot { + + ~~~~~~~~~~~~~~~~~~ => Pos: (0 to 17) SpanInfo: undefined +-------------------------------- +2 > name: string; + + ~~~~~~~~~~~~~~~~~~ => Pos: (18 to 35) SpanInfo: undefined +-------------------------------- +3 > skill: string; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (36 to 54) SpanInfo: undefined +-------------------------------- +4 >} + + ~~ => Pos: (55 to 56) SpanInfo: undefined +-------------------------------- +5 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (57 to 79) SpanInfo: undefined +-------------------------------- +6 > log(msg: string): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (80 to 107) SpanInfo: undefined +-------------------------------- +7 >} + + ~~ => Pos: (108 to 109) SpanInfo: undefined +-------------------------------- +8 >var hello = "hello"; + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (110 to 130) SpanInfo: {"start":110,"length":19} + >var hello = "hello" + >:=> (line 8, col 0) to (line 8, col 19) +-------------------------------- +9 >var robotA: Robot = { name: "mower", skill: "mowing" }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (131 to 186) SpanInfo: {"start":131,"length":54} + >var robotA: Robot = { name: "mower", skill: "mowing" } + >:=> (line 9, col 0) to (line 9, col 54) +-------------------------------- +10 >var robotB: Robot = { name: "trimmer", skill: "trimming" }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (187 to 246) SpanInfo: {"start":187,"length":58} + >var robotB: Robot = { name: "trimmer", skill: "trimming" } + >:=> (line 10, col 0) to (line 10, col 58) +-------------------------------- +11 >var a: string, { name: nameA } = robotA; + + ~~~~~~~~~~~~~~ => Pos: (247 to 260) SpanInfo: undefined +11 >var a: string, { name: nameA } = robotA; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (261 to 287) SpanInfo: {"start":262,"length":24} + >{ name: nameA } = robotA + >:=> (line 11, col 15) to (line 11, col 39) +-------------------------------- +12 >var b: string, { name: nameB, skill: skillB } = robotB; + + ~~~~~~~~~~~~~~ => Pos: (288 to 301) SpanInfo: undefined +12 >var b: string, { name: nameB, skill: skillB } = robotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (302 to 343) SpanInfo: {"start":303,"length":39} + >{ name: nameB, skill: skillB } = robotB + >:=> (line 12, col 15) to (line 12, col 54) +-------------------------------- +13 >var c: string, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }; + + ~~~~~~~~~~~~~~ => Pos: (344 to 357) SpanInfo: undefined +13 >var c: string, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (358 to 434) SpanInfo: {"start":359,"length":74} + >{ name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" } + >:=> (line 13, col 15) to (line 13, col 89) +-------------------------------- +14 > + + ~ => Pos: (435 to 435) SpanInfo: undefined +-------------------------------- +15 >var { name: nameA } = robotA, a = hello; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (436 to 464) SpanInfo: {"start":436,"length":28} + >var { name: nameA } = robotA + >:=> (line 15, col 0) to (line 15, col 28) +15 >var { name: nameA } = robotA, a = hello; + + ~~~~~~~~~~~~ => Pos: (465 to 476) SpanInfo: {"start":466,"length":9} + >a = hello + >:=> (line 15, col 30) to (line 15, col 39) +-------------------------------- +16 >var { name: nameB, skill: skillB } = robotB, b = " hello"; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (477 to 520) SpanInfo: {"start":477,"length":43} + >var { name: nameB, skill: skillB } = robotB + >:=> (line 16, col 0) to (line 16, col 43) +16 >var { name: nameB, skill: skillB } = robotB, b = " hello"; + + ~~~~~~~~~~~~~~~=> Pos: (521 to 535) SpanInfo: {"start":522,"length":12} + >b = " hello" + >:=> (line 16, col 45) to (line 16, col 57) +-------------------------------- +17 >var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c = hello; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (536 to 614) SpanInfo: {"start":536,"length":78} + >var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" } + >:=> (line 17, col 0) to (line 17, col 78) +17 >var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c = hello; + + ~~~~~~~~~~~~=> Pos: (615 to 626) SpanInfo: {"start":616,"length":9} + >c = hello + >:=> (line 17, col 80) to (line 17, col 89) +-------------------------------- +18 > + + ~ => Pos: (627 to 627) SpanInfo: undefined +-------------------------------- +19 >var a = hello, { name: nameA } = robotA, a1= "hello"; + + ~~~~~~~~~~~~~~ => Pos: (628 to 641) SpanInfo: {"start":628,"length":13} + >var a = hello + >:=> (line 19, col 0) to (line 19, col 13) +19 >var a = hello, { name: nameA } = robotA, a1= "hello"; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (642 to 667) SpanInfo: {"start":643,"length":24} + >{ name: nameA } = robotA + >:=> (line 19, col 15) to (line 19, col 39) +19 >var a = hello, { name: nameA } = robotA, a1= "hello"; + + ~~~~~~~~~~~~~~=> Pos: (668 to 681) SpanInfo: {"start":669,"length":11} + >a1= "hello" + >:=> (line 19, col 41) to (line 19, col 52) +-------------------------------- +20 >var b = hello, { name: nameB, skill: skillB } = robotB, b1 = "hello"; + + ~~~~~~~~~~~~~~ => Pos: (682 to 695) SpanInfo: {"start":682,"length":13} + >var b = hello + >:=> (line 20, col 0) to (line 20, col 13) +20 >var b = hello, { name: nameB, skill: skillB } = robotB, b1 = "hello"; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (696 to 736) SpanInfo: {"start":697,"length":39} + >{ name: nameB, skill: skillB } = robotB + >:=> (line 20, col 15) to (line 20, col 54) +20 >var b = hello, { name: nameB, skill: skillB } = robotB, b1 = "hello"; + + ~~~~~~~~~~~~~~~=> Pos: (737 to 751) SpanInfo: {"start":738,"length":12} + >b1 = "hello" + >:=> (line 20, col 56) to (line 20, col 68) +-------------------------------- +21 >var c = hello, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c1 = hello; + + ~~~~~~~~~~~~~~ => Pos: (752 to 765) SpanInfo: {"start":752,"length":13} + >var c = hello + >:=> (line 21, col 0) to (line 21, col 13) +21 >var c = hello, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c1 = hello; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (766 to 841) SpanInfo: {"start":767,"length":74} + >{ name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" } + >:=> (line 21, col 15) to (line 21, col 89) +21 >var c = hello, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c1 = hello; + + ~~~~~~~~~~~~~=> Pos: (842 to 854) SpanInfo: {"start":843,"length":10} + >c1 = hello + >:=> (line 21, col 91) to (line 21, col 101) +-------------------------------- +22 >if (nameA == nameB) { + + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (855 to 876) SpanInfo: {"start":855,"length":19} + >if (nameA == nameB) + >:=> (line 22, col 0) to (line 22, col 19) +-------------------------------- +23 > console.log(skillB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (877 to 901) SpanInfo: {"start":881,"length":19} + >console.log(skillB) + >:=> (line 23, col 4) to (line 23, col 23) +-------------------------------- +24 >} + + ~~ => Pos: (902 to 903) SpanInfo: {"start":881,"length":19} + >console.log(skillB) + >:=> (line 23, col 4) to (line 23, col 23) +-------------------------------- +25 >else { + + ~~~~~~~ => Pos: (904 to 910) SpanInfo: {"start":915,"length":18} + >console.log(nameC) + >:=> (line 26, col 4) to (line 26, col 22) +-------------------------------- +26 > console.log(nameC); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (911 to 934) SpanInfo: {"start":915,"length":18} + >console.log(nameC) + >:=> (line 26, col 4) to (line 26, col 22) +-------------------------------- +27 >} + ~ => Pos: (935 to 935) SpanInfo: {"start":915,"length":18} + >console.log(nameC) + >:=> (line 26, col 4) to (line 26, col 22) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringVariableStatementDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringVariableStatementDefaultValues.baseline new file mode 100644 index 00000000000..ce6062f70e2 --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringVariableStatementDefaultValues.baseline @@ -0,0 +1,99 @@ + +1 >interface Robot { + + ~~~~~~~~~~~~~~~~~~ => Pos: (0 to 17) SpanInfo: undefined +-------------------------------- +2 > name: string; + + ~~~~~~~~~~~~~~~~~~ => Pos: (18 to 35) SpanInfo: undefined +-------------------------------- +3 > skill: string; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (36 to 54) SpanInfo: undefined +-------------------------------- +4 >} + + ~~ => Pos: (55 to 56) SpanInfo: undefined +-------------------------------- +5 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (57 to 79) SpanInfo: undefined +-------------------------------- +6 > log(msg: string): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (80 to 107) SpanInfo: undefined +-------------------------------- +7 >} + + ~~ => Pos: (108 to 109) SpanInfo: undefined +-------------------------------- +8 >var hello = "hello"; + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (110 to 130) SpanInfo: {"start":110,"length":19} + >var hello = "hello" + >:=> (line 8, col 0) to (line 8, col 19) +-------------------------------- +9 >var robotA: Robot = { name: "mower", skill: "mowing" }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (131 to 186) SpanInfo: {"start":131,"length":54} + >var robotA: Robot = { name: "mower", skill: "mowing" } + >:=> (line 9, col 0) to (line 9, col 54) +-------------------------------- +10 >var robotB: Robot = { name: "trimmer", skill: "trimming" }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (187 to 246) SpanInfo: {"start":187,"length":58} + >var robotB: Robot = { name: "trimmer", skill: "trimming" } + >:=> (line 10, col 0) to (line 10, col 58) +-------------------------------- +11 >var { name: nameA = "" } = robotA; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (247 to 289) SpanInfo: {"start":247,"length":41} + >var { name: nameA = "" } = robotA + >:=> (line 11, col 0) to (line 11, col 41) +-------------------------------- +12 >var { name: nameB = "", skill: skillB = "" } = robotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (290 to 370) SpanInfo: {"start":290,"length":79} + >var { name: nameB = "", skill: skillB = "" } = robotB + >:=> (line 12, col 0) to (line 12, col 79) +-------------------------------- +13 >var { name: nameC = "", skill: skillC = "" } = { name: "Edger", skill: "cutting edges" }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (371 to 486) SpanInfo: {"start":371,"length":114} + >var { name: nameC = "", skill: skillC = "" } = { name: "Edger", skill: "cutting edges" } + >:=> (line 13, col 0) to (line 13, col 114) +-------------------------------- +14 >if (nameA == nameB) { + + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (487 to 508) SpanInfo: {"start":487,"length":19} + >if (nameA == nameB) + >:=> (line 14, col 0) to (line 14, col 19) +-------------------------------- +15 > console.log(skillB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (509 to 533) SpanInfo: {"start":513,"length":19} + >console.log(skillB) + >:=> (line 15, col 4) to (line 15, col 23) +-------------------------------- +16 >} + + ~~ => Pos: (534 to 535) SpanInfo: {"start":513,"length":19} + >console.log(skillB) + >:=> (line 15, col 4) to (line 15, col 23) +-------------------------------- +17 >else { + + ~~~~~~~ => Pos: (536 to 542) SpanInfo: {"start":547,"length":18} + >console.log(nameC) + >:=> (line 18, col 4) to (line 18, col 22) +-------------------------------- +18 > console.log(nameC); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (543 to 566) SpanInfo: {"start":547,"length":18} + >console.log(nameC) + >:=> (line 18, col 4) to (line 18, col 22) +-------------------------------- +19 >} + ~ => Pos: (567 to 567) SpanInfo: {"start":547,"length":18} + >console.log(nameC) + >:=> (line 18, col 4) to (line 18, col 22) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringVariableStatementNestedObjectBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringVariableStatementNestedObjectBindingPattern.baseline new file mode 100644 index 00000000000..4878c375bd7 --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringVariableStatementNestedObjectBindingPattern.baseline @@ -0,0 +1,113 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: string): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 50) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (51 to 52) SpanInfo: undefined +-------------------------------- +4 >interface Robot { + + ~~~~~~~~~~~~~~~~~~ => Pos: (53 to 70) SpanInfo: undefined +-------------------------------- +5 > name: string; + + ~~~~~~~~~~~~~~~~~~ => Pos: (71 to 88) SpanInfo: undefined +-------------------------------- +6 > skills: { + + ~~~~~~~~~~~~~~ => Pos: (89 to 102) SpanInfo: undefined +-------------------------------- +7 > primary: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (103 to 127) SpanInfo: undefined +-------------------------------- +8 > secondary: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (128 to 154) SpanInfo: undefined +-------------------------------- +9 > }; + + ~~~~~~~ => Pos: (155 to 161) SpanInfo: undefined +-------------------------------- +10 >} + + ~~ => Pos: (162 to 163) SpanInfo: undefined +-------------------------------- +11 >var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (164 to 252) SpanInfo: {"start":164,"length":87} + >var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } } + >:=> (line 11, col 0) to (line 11, col 87) +-------------------------------- +12 >var robotB: Robot = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (253 to 347) SpanInfo: {"start":253,"length":93} + >var robotB: Robot = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } + >:=> (line 12, col 0) to (line 12, col 93) +-------------------------------- +13 > + + ~ => Pos: (348 to 348) SpanInfo: undefined +-------------------------------- +14 >var { skills: { primary: primaryA, secondary: secondaryA } } = robotA; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (349 to 419) SpanInfo: {"start":349,"length":69} + >var { skills: { primary: primaryA, secondary: secondaryA } } = robotA + >:=> (line 14, col 0) to (line 14, col 69) +-------------------------------- +15 >var { name: nameB, skills: { primary: primaryB, secondary: secondaryB } } = robotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (420 to 503) SpanInfo: {"start":420,"length":82} + >var { name: nameB, skills: { primary: primaryB, secondary: secondaryB } } = robotB + >:=> (line 15, col 0) to (line 15, col 82) +-------------------------------- +16 >var { name: nameC, skills: { primary: primaryB, secondary: secondaryB } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (504 to 659) SpanInfo: {"start":504,"length":154} + >var { name: nameC, skills: { primary: primaryB, secondary: secondaryB } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } + >:=> (line 16, col 0) to (line 16, col 154) +-------------------------------- +17 > + + ~ => Pos: (660 to 660) SpanInfo: undefined +-------------------------------- +18 >if (nameB == nameB) { + + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (661 to 682) SpanInfo: {"start":661,"length":19} + >if (nameB == nameB) + >:=> (line 18, col 0) to (line 18, col 19) +-------------------------------- +19 > console.log(nameC); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (683 to 706) SpanInfo: {"start":687,"length":18} + >console.log(nameC) + >:=> (line 19, col 4) to (line 19, col 22) +-------------------------------- +20 >} + + ~~ => Pos: (707 to 708) SpanInfo: {"start":687,"length":18} + >console.log(nameC) + >:=> (line 19, col 4) to (line 19, col 22) +-------------------------------- +21 >else { + + ~~~~~~~ => Pos: (709 to 715) SpanInfo: {"start":720,"length":18} + >console.log(nameC) + >:=> (line 22, col 4) to (line 22, col 22) +-------------------------------- +22 > console.log(nameC); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (716 to 739) SpanInfo: {"start":720,"length":18} + >console.log(nameC) + >:=> (line 22, col 4) to (line 22, col 22) +-------------------------------- +23 >} + ~ => Pos: (740 to 740) SpanInfo: {"start":720,"length":18} + >console.log(nameC) + >:=> (line 22, col 4) to (line 22, col 22) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.baseline new file mode 100644 index 00000000000..51ccda7ce26 --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.baseline @@ -0,0 +1,329 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: string): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 50) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (51 to 52) SpanInfo: undefined +-------------------------------- +4 >interface Robot { + + ~~~~~~~~~~~~~~~~~~ => Pos: (53 to 70) SpanInfo: undefined +-------------------------------- +5 > name: string; + + ~~~~~~~~~~~~~~~~~~ => Pos: (71 to 88) SpanInfo: undefined +-------------------------------- +6 > skills: { + + ~~~~~~~~~~~~~~ => Pos: (89 to 102) SpanInfo: undefined +-------------------------------- +7 > primary?: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (103 to 128) SpanInfo: undefined +-------------------------------- +8 > secondary?: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (129 to 156) SpanInfo: undefined +-------------------------------- +9 > }; + + ~~~~~~~ => Pos: (157 to 163) SpanInfo: undefined +-------------------------------- +10 >} + + ~~ => Pos: (164 to 165) SpanInfo: undefined +-------------------------------- +11 >var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (166 to 254) SpanInfo: {"start":166,"length":87} + >var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } } + >:=> (line 11, col 0) to (line 11, col 87) +-------------------------------- +12 >var robotB: Robot = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (255 to 349) SpanInfo: {"start":255,"length":93} + >var robotB: Robot = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } + >:=> (line 12, col 0) to (line 12, col 93) +-------------------------------- +13 > + + ~ => Pos: (350 to 350) SpanInfo: undefined +-------------------------------- +14 >var { + + ~~~~~~ => Pos: (351 to 356) SpanInfo: {"start":351,"length":164} + >var { + > skills: { + > primary: primaryA = "noSkill", + > secondary: secondaryA = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } + >} = robotA + >:=> (line 14, col 0) to (line 19, col 10) +-------------------------------- +15 > skills: { + + ~~~~~~~~~~~~~~ => Pos: (357 to 370) SpanInfo: {"start":351,"length":164} + >var { + > skills: { + > primary: primaryA = "noSkill", + > secondary: secondaryA = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } + >} = robotA + >:=> (line 14, col 0) to (line 19, col 10) +-------------------------------- +16 > primary: primaryA = "noSkill", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (371 to 409) SpanInfo: {"start":351,"length":164} + >var { + > skills: { + > primary: primaryA = "noSkill", + > secondary: secondaryA = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } + >} = robotA + >:=> (line 14, col 0) to (line 19, col 10) +-------------------------------- +17 > secondary: secondaryA = "noSkill" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (410 to 451) SpanInfo: {"start":351,"length":164} + >var { + > skills: { + > primary: primaryA = "noSkill", + > secondary: secondaryA = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } + >} = robotA + >:=> (line 14, col 0) to (line 19, col 10) +-------------------------------- +18 > } = { primary: "noSkill", secondary: "noSkill" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (452 to 504) SpanInfo: {"start":351,"length":164} + >var { + > skills: { + > primary: primaryA = "noSkill", + > secondary: secondaryA = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } + >} = robotA + >:=> (line 14, col 0) to (line 19, col 10) +-------------------------------- +19 >} = robotA; + + ~~~~~~~~~~~~ => Pos: (505 to 516) SpanInfo: {"start":351,"length":164} + >var { + > skills: { + > primary: primaryA = "noSkill", + > secondary: secondaryA = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } + >} = robotA + >:=> (line 14, col 0) to (line 19, col 10) +-------------------------------- +20 >var { + + ~~~~~~ => Pos: (517 to 522) SpanInfo: {"start":517,"length":201} + >var { + > name: nameB = "noNameSpecified", + > skills: { + > primary: primaryB = "noSkill", + > secondary: secondaryB = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } + >} = robotB + >:=> (line 20, col 0) to (line 26, col 10) +-------------------------------- +21 > name: nameB = "noNameSpecified", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (523 to 559) SpanInfo: {"start":517,"length":201} + >var { + > name: nameB = "noNameSpecified", + > skills: { + > primary: primaryB = "noSkill", + > secondary: secondaryB = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } + >} = robotB + >:=> (line 20, col 0) to (line 26, col 10) +-------------------------------- +22 > skills: { + + ~~~~~~~~~~~~~~ => Pos: (560 to 573) SpanInfo: {"start":517,"length":201} + >var { + > name: nameB = "noNameSpecified", + > skills: { + > primary: primaryB = "noSkill", + > secondary: secondaryB = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } + >} = robotB + >:=> (line 20, col 0) to (line 26, col 10) +-------------------------------- +23 > primary: primaryB = "noSkill", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (574 to 612) SpanInfo: {"start":517,"length":201} + >var { + > name: nameB = "noNameSpecified", + > skills: { + > primary: primaryB = "noSkill", + > secondary: secondaryB = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } + >} = robotB + >:=> (line 20, col 0) to (line 26, col 10) +-------------------------------- +24 > secondary: secondaryB = "noSkill" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (613 to 654) SpanInfo: {"start":517,"length":201} + >var { + > name: nameB = "noNameSpecified", + > skills: { + > primary: primaryB = "noSkill", + > secondary: secondaryB = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } + >} = robotB + >:=> (line 20, col 0) to (line 26, col 10) +-------------------------------- +25 > } = { primary: "noSkill", secondary: "noSkill" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (655 to 707) SpanInfo: {"start":517,"length":201} + >var { + > name: nameB = "noNameSpecified", + > skills: { + > primary: primaryB = "noSkill", + > secondary: secondaryB = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } + >} = robotB + >:=> (line 20, col 0) to (line 26, col 10) +-------------------------------- +26 >} = robotB; + + ~~~~~~~~~~~~ => Pos: (708 to 719) SpanInfo: {"start":517,"length":201} + >var { + > name: nameB = "noNameSpecified", + > skills: { + > primary: primaryB = "noSkill", + > secondary: secondaryB = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } + >} = robotB + >:=> (line 20, col 0) to (line 26, col 10) +-------------------------------- +27 >var { + + ~~~~~~ => Pos: (720 to 725) SpanInfo: {"start":720,"length":280} + >var { + > name: nameC = "noNameSpecified", + > skills: { + > primary: primaryB = "noSkill", + > secondary: secondaryB = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } + >} = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } + >:=> (line 27, col 0) to (line 33, col 89) +-------------------------------- +28 > name: nameC = "noNameSpecified", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (726 to 762) SpanInfo: {"start":720,"length":280} + >var { + > name: nameC = "noNameSpecified", + > skills: { + > primary: primaryB = "noSkill", + > secondary: secondaryB = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } + >} = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } + >:=> (line 27, col 0) to (line 33, col 89) +-------------------------------- +29 > skills: { + + ~~~~~~~~~~~~~~ => Pos: (763 to 776) SpanInfo: {"start":720,"length":280} + >var { + > name: nameC = "noNameSpecified", + > skills: { + > primary: primaryB = "noSkill", + > secondary: secondaryB = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } + >} = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } + >:=> (line 27, col 0) to (line 33, col 89) +-------------------------------- +30 > primary: primaryB = "noSkill", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (777 to 815) SpanInfo: {"start":720,"length":280} + >var { + > name: nameC = "noNameSpecified", + > skills: { + > primary: primaryB = "noSkill", + > secondary: secondaryB = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } + >} = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } + >:=> (line 27, col 0) to (line 33, col 89) +-------------------------------- +31 > secondary: secondaryB = "noSkill" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (816 to 857) SpanInfo: {"start":720,"length":280} + >var { + > name: nameC = "noNameSpecified", + > skills: { + > primary: primaryB = "noSkill", + > secondary: secondaryB = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } + >} = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } + >:=> (line 27, col 0) to (line 33, col 89) +-------------------------------- +32 > } = { primary: "noSkill", secondary: "noSkill" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (858 to 910) SpanInfo: {"start":720,"length":280} + >var { + > name: nameC = "noNameSpecified", + > skills: { + > primary: primaryB = "noSkill", + > secondary: secondaryB = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } + >} = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } + >:=> (line 27, col 0) to (line 33, col 89) +-------------------------------- +33 >} = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (911 to 1001) SpanInfo: {"start":720,"length":280} + >var { + > name: nameC = "noNameSpecified", + > skills: { + > primary: primaryB = "noSkill", + > secondary: secondaryB = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } + >} = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } + >:=> (line 27, col 0) to (line 33, col 89) +-------------------------------- +34 > + + ~ => Pos: (1002 to 1002) SpanInfo: undefined +-------------------------------- +35 >if (nameB == nameB) { + + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1003 to 1024) SpanInfo: {"start":1003,"length":19} + >if (nameB == nameB) + >:=> (line 35, col 0) to (line 35, col 19) +-------------------------------- +36 > console.log(nameC); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1025 to 1048) SpanInfo: {"start":1029,"length":18} + >console.log(nameC) + >:=> (line 36, col 4) to (line 36, col 22) +-------------------------------- +37 >} + + ~~ => Pos: (1049 to 1050) SpanInfo: {"start":1029,"length":18} + >console.log(nameC) + >:=> (line 36, col 4) to (line 36, col 22) +-------------------------------- +38 >else { + + ~~~~~~~ => Pos: (1051 to 1057) SpanInfo: {"start":1062,"length":18} + >console.log(nameC) + >:=> (line 39, col 4) to (line 39, col 22) +-------------------------------- +39 > console.log(nameC); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1058 to 1081) SpanInfo: {"start":1062,"length":18} + >console.log(nameC) + >:=> (line 39, col 4) to (line 39, col 22) +-------------------------------- +40 >} + ~ => Pos: (1082 to 1082) SpanInfo: {"start":1062,"length":18} + >console.log(nameC) + >:=> (line 39, col 4) to (line 39, col 22) \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringVariableStatement.ts b/tests/cases/fourslash/breakpointValidationDestructuringVariableStatement.ts new file mode 100644 index 00000000000..311b49c3f95 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringVariableStatement.ts @@ -0,0 +1,22 @@ +/// +////interface Robot { +//// name: string; +//// skill: string; +////} +////declare var console: { +//// log(msg: string): void; +////} +////var hello = "hello"; +////var robotA: Robot = { name: "mower", skill: "mowing" }; +////var robotB: Robot = { name: "trimmer", skill: "trimming" }; +////var { name: nameA } = robotA; +////var { name: nameB, skill: skillB } = robotB; +////var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }; +////if (nameA == nameB) { +//// console.log(skillB); +////} +////else { +//// console.log(nameC); +////} + +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringVariableStatement1.ts b/tests/cases/fourslash/breakpointValidationDestructuringVariableStatement1.ts new file mode 100644 index 00000000000..96dbd9d2ff6 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringVariableStatement1.ts @@ -0,0 +1,30 @@ +/// +////interface Robot { +//// name: string; +//// skill: string; +////} +////declare var console: { +//// log(msg: string): void; +////} +////var hello = "hello"; +////var robotA: Robot = { name: "mower", skill: "mowing" }; +////var robotB: Robot = { name: "trimmer", skill: "trimming" }; +////var a: string, { name: nameA } = robotA; +////var b: string, { name: nameB, skill: skillB } = robotB; +////var c: string, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }; +//// +////var { name: nameA } = robotA, a = hello; +////var { name: nameB, skill: skillB } = robotB, b = " hello"; +////var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c = hello; +//// +////var a = hello, { name: nameA } = robotA, a1= "hello"; +////var b = hello, { name: nameB, skill: skillB } = robotB, b1 = "hello"; +////var c = hello, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c1 = hello; +////if (nameA == nameB) { +//// console.log(skillB); +////} +////else { +//// console.log(nameC); +////} + +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringVariableStatementDefaultValues.ts b/tests/cases/fourslash/breakpointValidationDestructuringVariableStatementDefaultValues.ts new file mode 100644 index 00000000000..0e28887a4c3 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringVariableStatementDefaultValues.ts @@ -0,0 +1,22 @@ +/// +////interface Robot { +//// name: string; +//// skill: string; +////} +////declare var console: { +//// log(msg: string): void; +////} +////var hello = "hello"; +////var robotA: Robot = { name: "mower", skill: "mowing" }; +////var robotB: Robot = { name: "trimmer", skill: "trimming" }; +////var { name: nameA = "" } = robotA; +////var { name: nameB = "", skill: skillB = "" } = robotB; +////var { name: nameC = "", skill: skillC = "" } = { name: "Edger", skill: "cutting edges" }; +////if (nameA == nameB) { +//// console.log(skillB); +////} +////else { +//// console.log(nameC); +////} + +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringVariableStatementNestedObjectBindingPattern.ts b/tests/cases/fourslash/breakpointValidationDestructuringVariableStatementNestedObjectBindingPattern.ts new file mode 100644 index 00000000000..4656fd5c417 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringVariableStatementNestedObjectBindingPattern.ts @@ -0,0 +1,26 @@ +/// +////declare var console: { +//// log(msg: string): void; +////} +////interface Robot { +//// name: string; +//// skills: { +//// primary: string; +//// secondary: string; +//// }; +////} +////var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +////var robotB: Robot = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }; +//// +////var { skills: { primary: primaryA, secondary: secondaryA } } = robotA; +////var { name: nameB, skills: { primary: primaryB, secondary: secondaryB } } = robotB; +////var { name: nameC, skills: { primary: primaryB, secondary: secondaryB } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; +//// +////if (nameB == nameB) { +//// console.log(nameC); +////} +////else { +//// console.log(nameC); +////} + +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts b/tests/cases/fourslash/breakpointValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts new file mode 100644 index 00000000000..282e91a57ce --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts @@ -0,0 +1,43 @@ +/// +////declare var console: { +//// log(msg: string): void; +////} +////interface Robot { +//// name: string; +//// skills: { +//// primary?: string; +//// secondary?: string; +//// }; +////} +////var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +////var robotB: Robot = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }; +//// +////var { +//// skills: { +//// primary: primaryA = "noSkill", +//// secondary: secondaryA = "noSkill" +//// } = { primary: "noSkill", secondary: "noSkill" } +////} = robotA; +////var { +//// name: nameB = "noNameSpecified", +//// skills: { +//// primary: primaryB = "noSkill", +//// secondary: secondaryB = "noSkill" +//// } = { primary: "noSkill", secondary: "noSkill" } +////} = robotB; +////var { +//// name: nameC = "noNameSpecified", +//// skills: { +//// primary: primaryB = "noSkill", +//// secondary: secondaryB = "noSkill" +//// } = { primary: "noSkill", secondary: "noSkill" } +////} = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; +//// +////if (nameB == nameB) { +//// console.log(nameC); +////} +////else { +//// console.log(nameC); +////} + +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file From c25bfe57c6c13a0d77dcef6c05e644039b21eb5f Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 17 Dec 2015 16:31:18 -0800 Subject: [PATCH 062/209] Support for breakpoint spans in object binding pattern --- src/services/breakpoints.ts | 84 +++++-- ...panDestructuringVariableStatement.baseline | 28 ++- ...anDestructuringVariableStatement1.baseline | 84 +++++-- ...ingVariableStatementDefaultValues.baseline | 28 ++- ...atementNestedObjectBindingPattern.baseline | 73 +++++- ...ctBindingPatternWithDefaultValues.baseline | 234 +++++++----------- 6 files changed, 308 insertions(+), 223 deletions(-) diff --git a/src/services/breakpoints.ts b/src/services/breakpoints.ts index 31ab5d2adec..386970cac5a 100644 --- a/src/services/breakpoints.ts +++ b/src/services/breakpoints.ts @@ -212,6 +212,7 @@ namespace ts.BreakpointResolver { case SyntaxKind.EnumMember: case SyntaxKind.CallExpression: case SyntaxKind.NewExpression: + case SyntaxKind.BindingElement: // span on complete node return textSpan(node); @@ -222,6 +223,10 @@ namespace ts.BreakpointResolver { case SyntaxKind.Decorator: return spanInNodeArray(node.parent.decorators); + case SyntaxKind.ObjectBindingPattern: + case SyntaxKind.ArrayBindingPattern: + return spanInBindingPattern(node); + // No breakpoint in interface, type alias case SyntaxKind.InterfaceDeclaration: case SyntaxKind.TypeAliasDeclaration: @@ -279,11 +284,30 @@ namespace ts.BreakpointResolver { return spanInPreviousNode(node); } + // initializer of variable declaration go to previous node + if (node.parent.kind === SyntaxKind.VariableDeclaration && + ((node.parent).initializer === node || + isAssignmentOperator(node.kind))) { + return spanInPreviousNode(node); + } + // Default go to parent to set the breakpoint return spanInNode(node.parent); } } + function textSpanFromVariableDeclaration(variableDeclaration: VariableDeclaration): TextSpan { + let declarations = variableDeclaration.parent.declarations; + if (declarations && declarations[0] === variableDeclaration) { + // First declaration - include let keyword + return textSpan(findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent), variableDeclaration); + } + else { + // Span only on this declaration + return textSpan(variableDeclaration); + } + } + function spanInVariableDeclaration(variableDeclaration: VariableDeclaration): TextSpan { // If declaration of for in statement, just set the span in parent if (variableDeclaration.parent.parent.kind === SyntaxKind.ForInStatement || @@ -291,36 +315,23 @@ namespace ts.BreakpointResolver { return spanInNode(variableDeclaration.parent.parent); } - let isParentVariableStatement = variableDeclaration.parent.parent.kind === SyntaxKind.VariableStatement; - let isDeclarationOfForStatement = variableDeclaration.parent.parent.kind === SyntaxKind.ForStatement && contains(((variableDeclaration.parent.parent).initializer).declarations, variableDeclaration); - let declarations = isParentVariableStatement - ? (variableDeclaration.parent.parent).declarationList.declarations - : isDeclarationOfForStatement - ? ((variableDeclaration.parent.parent).initializer).declarations - : undefined; + // If this is a destructuring pattern set breakpoint in binding pattern + if (isBindingPattern(variableDeclaration.name)) { + return spanInBindingPattern(variableDeclaration.name); + } // Breakpoint is possible in variableDeclaration only if there is initialization if (variableDeclaration.initializer || (variableDeclaration.flags & NodeFlags.Export)) { - if (declarations && declarations[0] === variableDeclaration) { - if (isParentVariableStatement) { - // First declaration - include let keyword - return textSpan(variableDeclaration.parent, variableDeclaration); - } - else { - Debug.assert(isDeclarationOfForStatement); - // Include let keyword from for statement declarations in the span - return textSpan(findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent), variableDeclaration); - } - } - else { - // Span only on this declaration - return textSpan(variableDeclaration); - } + return textSpanFromVariableDeclaration(variableDeclaration); } - else if (declarations && declarations[0] !== variableDeclaration) { + + let declarations = variableDeclaration.parent.declarations; + if (declarations && declarations[0] !== variableDeclaration) { // If we cant set breakpoint on this declaration, set it on previous one - let indexOfCurrentDeclaration = indexOf(declarations, variableDeclaration); - return spanInVariableDeclaration(declarations[indexOfCurrentDeclaration - 1]); + // Because the variable declaration may be binding pattern and + // we would like to set breakpoint in last binding element if thats the case, + // use preceding token instead + return spanInNode(findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent)); } } @@ -421,6 +432,24 @@ namespace ts.BreakpointResolver { } } + function spanInBindingPattern(bindingPattern: BindingPattern): TextSpan { + // Set breakpoint in first binding element + let firstBindingElement = forEach(bindingPattern.elements, + element => element.kind !== SyntaxKind.OmittedExpression ? element : undefined); + + if (firstBindingElement) { + return spanInNode(firstBindingElement); + } + + // Empty binding pattern of binding element, set breakpoint on binding element + if (bindingPattern.parent.kind === SyntaxKind.BindingElement) { + return spanInNode(bindingPattern.parent); + } + + // Variable declaration is used as the span + return textSpanFromVariableDeclaration(bindingPattern.parent); + } + // Tokens: function spanInOpenBraceToken(node: Node): TextSpan { switch (node.parent.kind) { @@ -472,6 +501,11 @@ namespace ts.BreakpointResolver { } return undefined; + case SyntaxKind.ObjectBindingPattern: + // Breakpoint in last binding element or binding pattern if it contains no elements + let bindingPattern = node.parent; + return spanInNode(lastOrUndefined(bindingPattern.elements) || bindingPattern); + // Default to parent node default: return spanInNode(node.parent); diff --git a/tests/baselines/reference/bpSpanDestructuringVariableStatement.baseline b/tests/baselines/reference/bpSpanDestructuringVariableStatement.baseline index b554d4b969b..3939c66c56e 100644 --- a/tests/baselines/reference/bpSpanDestructuringVariableStatement.baseline +++ b/tests/baselines/reference/bpSpanDestructuringVariableStatement.baseline @@ -47,21 +47,31 @@ -------------------------------- 11 >var { name: nameA } = robotA; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (247 to 276) SpanInfo: {"start":247,"length":28} - >var { name: nameA } = robotA - >:=> (line 11, col 0) to (line 11, col 28) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (247 to 276) SpanInfo: {"start":253,"length":11} + >name: nameA + >:=> (line 11, col 6) to (line 11, col 17) -------------------------------- 12 >var { name: nameB, skill: skillB } = robotB; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (277 to 321) SpanInfo: {"start":277,"length":43} - >var { name: nameB, skill: skillB } = robotB - >:=> (line 12, col 0) to (line 12, col 43) + ~~~~~~~~~~~~~~~~~~ => Pos: (277 to 294) SpanInfo: {"start":283,"length":11} + >name: nameB + >:=> (line 12, col 6) to (line 12, col 17) +12 >var { name: nameB, skill: skillB } = robotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (295 to 321) SpanInfo: {"start":296,"length":13} + >skill: skillB + >:=> (line 12, col 19) to (line 12, col 32) -------------------------------- 13 >var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (322 to 401) SpanInfo: {"start":322,"length":78} - >var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" } - >:=> (line 13, col 0) to (line 13, col 78) + ~~~~~~~~~~~~~~~~~~ => Pos: (322 to 339) SpanInfo: {"start":328,"length":11} + >name: nameC + >:=> (line 13, col 6) to (line 13, col 17) +13 >var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (340 to 401) SpanInfo: {"start":341,"length":13} + >skill: skillC + >:=> (line 13, col 19) to (line 13, col 32) -------------------------------- 14 >if (nameA == nameB) { diff --git a/tests/baselines/reference/bpSpanDestructuringVariableStatement1.baseline b/tests/baselines/reference/bpSpanDestructuringVariableStatement1.baseline index 774869428d6..ce1edbb0ee9 100644 --- a/tests/baselines/reference/bpSpanDestructuringVariableStatement1.baseline +++ b/tests/baselines/reference/bpSpanDestructuringVariableStatement1.baseline @@ -50,27 +50,37 @@ ~~~~~~~~~~~~~~ => Pos: (247 to 260) SpanInfo: undefined 11 >var a: string, { name: nameA } = robotA; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (261 to 287) SpanInfo: {"start":262,"length":24} - >{ name: nameA } = robotA - >:=> (line 11, col 15) to (line 11, col 39) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (261 to 287) SpanInfo: {"start":264,"length":11} + >name: nameA + >:=> (line 11, col 17) to (line 11, col 28) -------------------------------- 12 >var b: string, { name: nameB, skill: skillB } = robotB; ~~~~~~~~~~~~~~ => Pos: (288 to 301) SpanInfo: undefined 12 >var b: string, { name: nameB, skill: skillB } = robotB; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (302 to 343) SpanInfo: {"start":303,"length":39} - >{ name: nameB, skill: skillB } = robotB - >:=> (line 12, col 15) to (line 12, col 54) + ~~~~~~~~~~~~~~~ => Pos: (302 to 316) SpanInfo: {"start":305,"length":11} + >name: nameB + >:=> (line 12, col 17) to (line 12, col 28) +12 >var b: string, { name: nameB, skill: skillB } = robotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (317 to 343) SpanInfo: {"start":318,"length":13} + >skill: skillB + >:=> (line 12, col 30) to (line 12, col 43) -------------------------------- 13 >var c: string, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }; ~~~~~~~~~~~~~~ => Pos: (344 to 357) SpanInfo: undefined 13 >var c: string, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (358 to 434) SpanInfo: {"start":359,"length":74} - >{ name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" } - >:=> (line 13, col 15) to (line 13, col 89) + ~~~~~~~~~~~~~~~ => Pos: (358 to 372) SpanInfo: {"start":361,"length":11} + >name: nameC + >:=> (line 13, col 17) to (line 13, col 28) +13 >var c: string, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (373 to 434) SpanInfo: {"start":374,"length":13} + >skill: skillC + >:=> (line 13, col 30) to (line 13, col 43) -------------------------------- 14 > @@ -78,9 +88,9 @@ -------------------------------- 15 >var { name: nameA } = robotA, a = hello; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (436 to 464) SpanInfo: {"start":436,"length":28} - >var { name: nameA } = robotA - >:=> (line 15, col 0) to (line 15, col 28) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (436 to 464) SpanInfo: {"start":442,"length":11} + >name: nameA + >:=> (line 15, col 6) to (line 15, col 17) 15 >var { name: nameA } = robotA, a = hello; ~~~~~~~~~~~~ => Pos: (465 to 476) SpanInfo: {"start":466,"length":9} @@ -89,9 +99,14 @@ -------------------------------- 16 >var { name: nameB, skill: skillB } = robotB, b = " hello"; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (477 to 520) SpanInfo: {"start":477,"length":43} - >var { name: nameB, skill: skillB } = robotB - >:=> (line 16, col 0) to (line 16, col 43) + ~~~~~~~~~~~~~~~~~~ => Pos: (477 to 494) SpanInfo: {"start":483,"length":11} + >name: nameB + >:=> (line 16, col 6) to (line 16, col 17) +16 >var { name: nameB, skill: skillB } = robotB, b = " hello"; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (495 to 520) SpanInfo: {"start":496,"length":13} + >skill: skillB + >:=> (line 16, col 19) to (line 16, col 32) 16 >var { name: nameB, skill: skillB } = robotB, b = " hello"; ~~~~~~~~~~~~~~~=> Pos: (521 to 535) SpanInfo: {"start":522,"length":12} @@ -100,9 +115,14 @@ -------------------------------- 17 >var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c = hello; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (536 to 614) SpanInfo: {"start":536,"length":78} - >var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" } - >:=> (line 17, col 0) to (line 17, col 78) + ~~~~~~~~~~~~~~~~~~ => Pos: (536 to 553) SpanInfo: {"start":542,"length":11} + >name: nameC + >:=> (line 17, col 6) to (line 17, col 17) +17 >var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c = hello; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (554 to 614) SpanInfo: {"start":555,"length":13} + >skill: skillC + >:=> (line 17, col 19) to (line 17, col 32) 17 >var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c = hello; ~~~~~~~~~~~~=> Pos: (615 to 626) SpanInfo: {"start":616,"length":9} @@ -120,9 +140,9 @@ >:=> (line 19, col 0) to (line 19, col 13) 19 >var a = hello, { name: nameA } = robotA, a1= "hello"; - ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (642 to 667) SpanInfo: {"start":643,"length":24} - >{ name: nameA } = robotA - >:=> (line 19, col 15) to (line 19, col 39) + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (642 to 667) SpanInfo: {"start":645,"length":11} + >name: nameA + >:=> (line 19, col 17) to (line 19, col 28) 19 >var a = hello, { name: nameA } = robotA, a1= "hello"; ~~~~~~~~~~~~~~=> Pos: (668 to 681) SpanInfo: {"start":669,"length":11} @@ -136,9 +156,14 @@ >:=> (line 20, col 0) to (line 20, col 13) 20 >var b = hello, { name: nameB, skill: skillB } = robotB, b1 = "hello"; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (696 to 736) SpanInfo: {"start":697,"length":39} - >{ name: nameB, skill: skillB } = robotB - >:=> (line 20, col 15) to (line 20, col 54) + ~~~~~~~~~~~~~~~ => Pos: (696 to 710) SpanInfo: {"start":699,"length":11} + >name: nameB + >:=> (line 20, col 17) to (line 20, col 28) +20 >var b = hello, { name: nameB, skill: skillB } = robotB, b1 = "hello"; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (711 to 736) SpanInfo: {"start":712,"length":13} + >skill: skillB + >:=> (line 20, col 30) to (line 20, col 43) 20 >var b = hello, { name: nameB, skill: skillB } = robotB, b1 = "hello"; ~~~~~~~~~~~~~~~=> Pos: (737 to 751) SpanInfo: {"start":738,"length":12} @@ -152,9 +177,14 @@ >:=> (line 21, col 0) to (line 21, col 13) 21 >var c = hello, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c1 = hello; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (766 to 841) SpanInfo: {"start":767,"length":74} - >{ name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" } - >:=> (line 21, col 15) to (line 21, col 89) + ~~~~~~~~~~~~~~~ => Pos: (766 to 780) SpanInfo: {"start":769,"length":11} + >name: nameC + >:=> (line 21, col 17) to (line 21, col 28) +21 >var c = hello, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c1 = hello; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (781 to 841) SpanInfo: {"start":782,"length":13} + >skill: skillC + >:=> (line 21, col 30) to (line 21, col 43) 21 >var c = hello, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c1 = hello; ~~~~~~~~~~~~~=> Pos: (842 to 854) SpanInfo: {"start":843,"length":10} diff --git a/tests/baselines/reference/bpSpanDestructuringVariableStatementDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringVariableStatementDefaultValues.baseline index ce6062f70e2..60ee5897d48 100644 --- a/tests/baselines/reference/bpSpanDestructuringVariableStatementDefaultValues.baseline +++ b/tests/baselines/reference/bpSpanDestructuringVariableStatementDefaultValues.baseline @@ -47,21 +47,31 @@ -------------------------------- 11 >var { name: nameA = "" } = robotA; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (247 to 289) SpanInfo: {"start":247,"length":41} - >var { name: nameA = "" } = robotA - >:=> (line 11, col 0) to (line 11, col 41) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (247 to 289) SpanInfo: {"start":253,"length":24} + >name: nameA = "" + >:=> (line 11, col 6) to (line 11, col 30) -------------------------------- 12 >var { name: nameB = "", skill: skillB = "" } = robotB; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (290 to 370) SpanInfo: {"start":290,"length":79} - >var { name: nameB = "", skill: skillB = "" } = robotB - >:=> (line 12, col 0) to (line 12, col 79) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (290 to 320) SpanInfo: {"start":296,"length":24} + >name: nameB = "" + >:=> (line 12, col 6) to (line 12, col 30) +12 >var { name: nameB = "", skill: skillB = "" } = robotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (321 to 370) SpanInfo: {"start":322,"length":36} + >skill: skillB = "" + >:=> (line 12, col 32) to (line 12, col 68) -------------------------------- 13 >var { name: nameC = "", skill: skillC = "" } = { name: "Edger", skill: "cutting edges" }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (371 to 486) SpanInfo: {"start":371,"length":114} - >var { name: nameC = "", skill: skillC = "" } = { name: "Edger", skill: "cutting edges" } - >:=> (line 13, col 0) to (line 13, col 114) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (371 to 401) SpanInfo: {"start":377,"length":24} + >name: nameC = "" + >:=> (line 13, col 6) to (line 13, col 30) +13 >var { name: nameC = "", skill: skillC = "" } = { name: "Edger", skill: "cutting edges" }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (402 to 486) SpanInfo: {"start":403,"length":36} + >skill: skillC = "" + >:=> (line 13, col 32) to (line 13, col 68) -------------------------------- 14 >if (nameA == nameB) { diff --git a/tests/baselines/reference/bpSpanDestructuringVariableStatementNestedObjectBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringVariableStatementNestedObjectBindingPattern.baseline index 4878c375bd7..66f814ada9c 100644 --- a/tests/baselines/reference/bpSpanDestructuringVariableStatementNestedObjectBindingPattern.baseline +++ b/tests/baselines/reference/bpSpanDestructuringVariableStatementNestedObjectBindingPattern.baseline @@ -57,21 +57,76 @@ -------------------------------- 14 >var { skills: { primary: primaryA, secondary: secondaryA } } = robotA; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (349 to 419) SpanInfo: {"start":349,"length":69} - >var { skills: { primary: primaryA, secondary: secondaryA } } = robotA - >:=> (line 14, col 0) to (line 14, col 69) + ~~~~~~~~~~~~~ => Pos: (349 to 361) SpanInfo: {"start":355,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 14, col 6) to (line 14, col 58) +14 >var { skills: { primary: primaryA, secondary: secondaryA } } = robotA; + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (362 to 382) SpanInfo: {"start":365,"length":17} + >primary: primaryA + >:=> (line 14, col 16) to (line 14, col 33) +14 >var { skills: { primary: primaryA, secondary: secondaryA } } = robotA; + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (383 to 406) SpanInfo: {"start":384,"length":21} + >secondary: secondaryA + >:=> (line 14, col 35) to (line 14, col 56) +14 >var { skills: { primary: primaryA, secondary: secondaryA } } = robotA; + + ~~~~~~~~~~~~~=> Pos: (407 to 419) SpanInfo: {"start":355,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 14, col 6) to (line 14, col 58) -------------------------------- 15 >var { name: nameB, skills: { primary: primaryB, secondary: secondaryB } } = robotB; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (420 to 503) SpanInfo: {"start":420,"length":82} - >var { name: nameB, skills: { primary: primaryB, secondary: secondaryB } } = robotB - >:=> (line 15, col 0) to (line 15, col 82) + ~~~~~~~~~~~~~~~~~~ => Pos: (420 to 437) SpanInfo: {"start":426,"length":11} + >name: nameB + >:=> (line 15, col 6) to (line 15, col 17) +15 >var { name: nameB, skills: { primary: primaryB, secondary: secondaryB } } = robotB; + + ~~~~~~~~ => Pos: (438 to 445) SpanInfo: {"start":439,"length":52} + >skills: { primary: primaryB, secondary: secondaryB } + >:=> (line 15, col 19) to (line 15, col 71) +15 >var { name: nameB, skills: { primary: primaryB, secondary: secondaryB } } = robotB; + + ~~~~~~~~~~~~~~~~~~~~~=> Pos: (446 to 466) SpanInfo: {"start":449,"length":17} + >primary: primaryB + >:=> (line 15, col 29) to (line 15, col 46) +15 >var { name: nameB, skills: { primary: primaryB, secondary: secondaryB } } = robotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (467 to 490) SpanInfo: {"start":468,"length":21} + >secondary: secondaryB + >:=> (line 15, col 48) to (line 15, col 69) +15 >var { name: nameB, skills: { primary: primaryB, secondary: secondaryB } } = robotB; + + ~~~~~~~~~~~~~=> Pos: (491 to 503) SpanInfo: {"start":439,"length":52} + >skills: { primary: primaryB, secondary: secondaryB } + >:=> (line 15, col 19) to (line 15, col 71) -------------------------------- 16 >var { name: nameC, skills: { primary: primaryB, secondary: secondaryB } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (504 to 659) SpanInfo: {"start":504,"length":154} - >var { name: nameC, skills: { primary: primaryB, secondary: secondaryB } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } - >:=> (line 16, col 0) to (line 16, col 154) + ~~~~~~~~~~~~~~~~~~ => Pos: (504 to 521) SpanInfo: {"start":510,"length":11} + >name: nameC + >:=> (line 16, col 6) to (line 16, col 17) +16 >var { name: nameC, skills: { primary: primaryB, secondary: secondaryB } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; + + ~~~~~~~~ => Pos: (522 to 529) SpanInfo: {"start":523,"length":52} + >skills: { primary: primaryB, secondary: secondaryB } + >:=> (line 16, col 19) to (line 16, col 71) +16 >var { name: nameC, skills: { primary: primaryB, secondary: secondaryB } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; + + ~~~~~~~~~~~~~~~~~~~~~=> Pos: (530 to 550) SpanInfo: {"start":533,"length":17} + >primary: primaryB + >:=> (line 16, col 29) to (line 16, col 46) +16 >var { name: nameC, skills: { primary: primaryB, secondary: secondaryB } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (551 to 574) SpanInfo: {"start":552,"length":21} + >secondary: secondaryB + >:=> (line 16, col 48) to (line 16, col 69) +16 >var { name: nameC, skills: { primary: primaryB, secondary: secondaryB } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (575 to 659) SpanInfo: {"start":523,"length":52} + >skills: { primary: primaryB, secondary: secondaryB } + >:=> (line 16, col 19) to (line 16, col 71) -------------------------------- 17 > diff --git a/tests/baselines/reference/bpSpanDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.baseline index 51ccda7ce26..75b37a0231e 100644 --- a/tests/baselines/reference/bpSpanDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.baseline +++ b/tests/baselines/reference/bpSpanDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.baseline @@ -57,237 +57,183 @@ -------------------------------- 14 >var { - ~~~~~~ => Pos: (351 to 356) SpanInfo: {"start":351,"length":164} - >var { - > skills: { + ~~~~~~ => Pos: (351 to 356) SpanInfo: {"start":361,"length":143} + >skills: { > primary: primaryA = "noSkill", > secondary: secondaryA = "noSkill" > } = { primary: "noSkill", secondary: "noSkill" } - >} = robotA - >:=> (line 14, col 0) to (line 19, col 10) + >:=> (line 15, col 4) to (line 18, col 52) -------------------------------- 15 > skills: { - ~~~~~~~~~~~~~~ => Pos: (357 to 370) SpanInfo: {"start":351,"length":164} - >var { - > skills: { + ~~~~~~~~~~~ => Pos: (357 to 367) SpanInfo: {"start":361,"length":143} + >skills: { > primary: primaryA = "noSkill", > secondary: secondaryA = "noSkill" > } = { primary: "noSkill", secondary: "noSkill" } - >} = robotA - >:=> (line 14, col 0) to (line 19, col 10) + >:=> (line 15, col 4) to (line 18, col 52) +15 > skills: { + + ~~~ => Pos: (368 to 370) SpanInfo: {"start":379,"length":29} + >primary: primaryA = "noSkill" + >:=> (line 16, col 8) to (line 16, col 37) -------------------------------- 16 > primary: primaryA = "noSkill", - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (371 to 409) SpanInfo: {"start":351,"length":164} - >var { - > skills: { - > primary: primaryA = "noSkill", - > secondary: secondaryA = "noSkill" - > } = { primary: "noSkill", secondary: "noSkill" } - >} = robotA - >:=> (line 14, col 0) to (line 19, col 10) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (371 to 409) SpanInfo: {"start":379,"length":29} + >primary: primaryA = "noSkill" + >:=> (line 16, col 8) to (line 16, col 37) -------------------------------- 17 > secondary: secondaryA = "noSkill" - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (410 to 451) SpanInfo: {"start":351,"length":164} - >var { - > skills: { - > primary: primaryA = "noSkill", - > secondary: secondaryA = "noSkill" - > } = { primary: "noSkill", secondary: "noSkill" } - >} = robotA - >:=> (line 14, col 0) to (line 19, col 10) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (410 to 451) SpanInfo: {"start":418,"length":33} + >secondary: secondaryA = "noSkill" + >:=> (line 17, col 8) to (line 17, col 41) -------------------------------- 18 > } = { primary: "noSkill", secondary: "noSkill" } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (452 to 504) SpanInfo: {"start":351,"length":164} - >var { - > skills: { + ~~~~~ => Pos: (452 to 456) SpanInfo: {"start":418,"length":33} + >secondary: secondaryA = "noSkill" + >:=> (line 17, col 8) to (line 17, col 41) +18 > } = { primary: "noSkill", secondary: "noSkill" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (457 to 504) SpanInfo: {"start":361,"length":143} + >skills: { > primary: primaryA = "noSkill", > secondary: secondaryA = "noSkill" > } = { primary: "noSkill", secondary: "noSkill" } - >} = robotA - >:=> (line 14, col 0) to (line 19, col 10) + >:=> (line 15, col 4) to (line 18, col 52) -------------------------------- 19 >} = robotA; - ~~~~~~~~~~~~ => Pos: (505 to 516) SpanInfo: {"start":351,"length":164} - >var { - > skills: { + ~~~~~~~~~~~~ => Pos: (505 to 516) SpanInfo: {"start":361,"length":143} + >skills: { > primary: primaryA = "noSkill", > secondary: secondaryA = "noSkill" > } = { primary: "noSkill", secondary: "noSkill" } - >} = robotA - >:=> (line 14, col 0) to (line 19, col 10) + >:=> (line 15, col 4) to (line 18, col 52) -------------------------------- 20 >var { - ~~~~~~ => Pos: (517 to 522) SpanInfo: {"start":517,"length":201} - >var { - > name: nameB = "noNameSpecified", - > skills: { - > primary: primaryB = "noSkill", - > secondary: secondaryB = "noSkill" - > } = { primary: "noSkill", secondary: "noSkill" } - >} = robotB - >:=> (line 20, col 0) to (line 26, col 10) + ~~~~~~ => Pos: (517 to 522) SpanInfo: {"start":527,"length":31} + >name: nameB = "noNameSpecified" + >:=> (line 21, col 4) to (line 21, col 35) -------------------------------- 21 > name: nameB = "noNameSpecified", - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (523 to 559) SpanInfo: {"start":517,"length":201} - >var { - > name: nameB = "noNameSpecified", - > skills: { - > primary: primaryB = "noSkill", - > secondary: secondaryB = "noSkill" - > } = { primary: "noSkill", secondary: "noSkill" } - >} = robotB - >:=> (line 20, col 0) to (line 26, col 10) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (523 to 559) SpanInfo: {"start":527,"length":31} + >name: nameB = "noNameSpecified" + >:=> (line 21, col 4) to (line 21, col 35) -------------------------------- 22 > skills: { - ~~~~~~~~~~~~~~ => Pos: (560 to 573) SpanInfo: {"start":517,"length":201} - >var { - > name: nameB = "noNameSpecified", - > skills: { + ~~~~~~~~~~~ => Pos: (560 to 570) SpanInfo: {"start":564,"length":143} + >skills: { > primary: primaryB = "noSkill", > secondary: secondaryB = "noSkill" > } = { primary: "noSkill", secondary: "noSkill" } - >} = robotB - >:=> (line 20, col 0) to (line 26, col 10) + >:=> (line 22, col 4) to (line 25, col 52) +22 > skills: { + + ~~~ => Pos: (571 to 573) SpanInfo: {"start":582,"length":29} + >primary: primaryB = "noSkill" + >:=> (line 23, col 8) to (line 23, col 37) -------------------------------- 23 > primary: primaryB = "noSkill", - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (574 to 612) SpanInfo: {"start":517,"length":201} - >var { - > name: nameB = "noNameSpecified", - > skills: { - > primary: primaryB = "noSkill", - > secondary: secondaryB = "noSkill" - > } = { primary: "noSkill", secondary: "noSkill" } - >} = robotB - >:=> (line 20, col 0) to (line 26, col 10) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (574 to 612) SpanInfo: {"start":582,"length":29} + >primary: primaryB = "noSkill" + >:=> (line 23, col 8) to (line 23, col 37) -------------------------------- 24 > secondary: secondaryB = "noSkill" - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (613 to 654) SpanInfo: {"start":517,"length":201} - >var { - > name: nameB = "noNameSpecified", - > skills: { - > primary: primaryB = "noSkill", - > secondary: secondaryB = "noSkill" - > } = { primary: "noSkill", secondary: "noSkill" } - >} = robotB - >:=> (line 20, col 0) to (line 26, col 10) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (613 to 654) SpanInfo: {"start":621,"length":33} + >secondary: secondaryB = "noSkill" + >:=> (line 24, col 8) to (line 24, col 41) -------------------------------- 25 > } = { primary: "noSkill", secondary: "noSkill" } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (655 to 707) SpanInfo: {"start":517,"length":201} - >var { - > name: nameB = "noNameSpecified", - > skills: { + ~~~~~ => Pos: (655 to 659) SpanInfo: {"start":621,"length":33} + >secondary: secondaryB = "noSkill" + >:=> (line 24, col 8) to (line 24, col 41) +25 > } = { primary: "noSkill", secondary: "noSkill" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (660 to 707) SpanInfo: {"start":564,"length":143} + >skills: { > primary: primaryB = "noSkill", > secondary: secondaryB = "noSkill" > } = { primary: "noSkill", secondary: "noSkill" } - >} = robotB - >:=> (line 20, col 0) to (line 26, col 10) + >:=> (line 22, col 4) to (line 25, col 52) -------------------------------- 26 >} = robotB; - ~~~~~~~~~~~~ => Pos: (708 to 719) SpanInfo: {"start":517,"length":201} - >var { - > name: nameB = "noNameSpecified", - > skills: { + ~~~~~~~~~~~~ => Pos: (708 to 719) SpanInfo: {"start":564,"length":143} + >skills: { > primary: primaryB = "noSkill", > secondary: secondaryB = "noSkill" > } = { primary: "noSkill", secondary: "noSkill" } - >} = robotB - >:=> (line 20, col 0) to (line 26, col 10) + >:=> (line 22, col 4) to (line 25, col 52) -------------------------------- 27 >var { - ~~~~~~ => Pos: (720 to 725) SpanInfo: {"start":720,"length":280} - >var { - > name: nameC = "noNameSpecified", - > skills: { - > primary: primaryB = "noSkill", - > secondary: secondaryB = "noSkill" - > } = { primary: "noSkill", secondary: "noSkill" } - >} = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } - >:=> (line 27, col 0) to (line 33, col 89) + ~~~~~~ => Pos: (720 to 725) SpanInfo: {"start":730,"length":31} + >name: nameC = "noNameSpecified" + >:=> (line 28, col 4) to (line 28, col 35) -------------------------------- 28 > name: nameC = "noNameSpecified", - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (726 to 762) SpanInfo: {"start":720,"length":280} - >var { - > name: nameC = "noNameSpecified", - > skills: { - > primary: primaryB = "noSkill", - > secondary: secondaryB = "noSkill" - > } = { primary: "noSkill", secondary: "noSkill" } - >} = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } - >:=> (line 27, col 0) to (line 33, col 89) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (726 to 762) SpanInfo: {"start":730,"length":31} + >name: nameC = "noNameSpecified" + >:=> (line 28, col 4) to (line 28, col 35) -------------------------------- 29 > skills: { - ~~~~~~~~~~~~~~ => Pos: (763 to 776) SpanInfo: {"start":720,"length":280} - >var { - > name: nameC = "noNameSpecified", - > skills: { + ~~~~~~~~~~~ => Pos: (763 to 773) SpanInfo: {"start":767,"length":143} + >skills: { > primary: primaryB = "noSkill", > secondary: secondaryB = "noSkill" > } = { primary: "noSkill", secondary: "noSkill" } - >} = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } - >:=> (line 27, col 0) to (line 33, col 89) + >:=> (line 29, col 4) to (line 32, col 52) +29 > skills: { + + ~~~ => Pos: (774 to 776) SpanInfo: {"start":785,"length":29} + >primary: primaryB = "noSkill" + >:=> (line 30, col 8) to (line 30, col 37) -------------------------------- 30 > primary: primaryB = "noSkill", - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (777 to 815) SpanInfo: {"start":720,"length":280} - >var { - > name: nameC = "noNameSpecified", - > skills: { - > primary: primaryB = "noSkill", - > secondary: secondaryB = "noSkill" - > } = { primary: "noSkill", secondary: "noSkill" } - >} = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } - >:=> (line 27, col 0) to (line 33, col 89) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (777 to 815) SpanInfo: {"start":785,"length":29} + >primary: primaryB = "noSkill" + >:=> (line 30, col 8) to (line 30, col 37) -------------------------------- 31 > secondary: secondaryB = "noSkill" - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (816 to 857) SpanInfo: {"start":720,"length":280} - >var { - > name: nameC = "noNameSpecified", - > skills: { - > primary: primaryB = "noSkill", - > secondary: secondaryB = "noSkill" - > } = { primary: "noSkill", secondary: "noSkill" } - >} = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } - >:=> (line 27, col 0) to (line 33, col 89) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (816 to 857) SpanInfo: {"start":824,"length":33} + >secondary: secondaryB = "noSkill" + >:=> (line 31, col 8) to (line 31, col 41) -------------------------------- 32 > } = { primary: "noSkill", secondary: "noSkill" } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (858 to 910) SpanInfo: {"start":720,"length":280} - >var { - > name: nameC = "noNameSpecified", - > skills: { + ~~~~~ => Pos: (858 to 862) SpanInfo: {"start":824,"length":33} + >secondary: secondaryB = "noSkill" + >:=> (line 31, col 8) to (line 31, col 41) +32 > } = { primary: "noSkill", secondary: "noSkill" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (863 to 910) SpanInfo: {"start":767,"length":143} + >skills: { > primary: primaryB = "noSkill", > secondary: secondaryB = "noSkill" > } = { primary: "noSkill", secondary: "noSkill" } - >} = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } - >:=> (line 27, col 0) to (line 33, col 89) + >:=> (line 29, col 4) to (line 32, col 52) -------------------------------- 33 >} = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (911 to 1001) SpanInfo: {"start":720,"length":280} - >var { - > name: nameC = "noNameSpecified", - > skills: { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (911 to 1001) SpanInfo: {"start":767,"length":143} + >skills: { > primary: primaryB = "noSkill", > secondary: secondaryB = "noSkill" > } = { primary: "noSkill", secondary: "noSkill" } - >} = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } - >:=> (line 27, col 0) to (line 33, col 89) + >:=> (line 29, col 4) to (line 32, col 52) -------------------------------- 34 > From 960e8a76982b9c43369980a1a66383e25359ea4c Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 17 Dec 2015 16:41:28 -0800 Subject: [PATCH 063/209] Test cases for breakpoint span in array binding pattern of variable statement --- ...iableStatementArrayBindingPattern.baseline | 101 +++++++++++++++ ...ableStatementArrayBindingPattern2.baseline | 115 ++++++++++++++++++ ...tArrayBindingPatternDefaultValues.baseline | 101 +++++++++++++++ ...ArrayBindingPatternDefaultValues2.baseline | 102 ++++++++++++++++ ...ingVariableStatementArrayBindingPattern.ts | 15 +++ ...ngVariableStatementArrayBindingPattern2.ts | 19 +++ ...atementArrayBindingPatternDefaultValues.ts | 15 +++ ...tementArrayBindingPatternDefaultValues2.ts | 14 +++ 8 files changed, 482 insertions(+) create mode 100644 tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPattern.baseline create mode 100644 tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPattern2.baseline create mode 100644 tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPatternDefaultValues.baseline create mode 100644 tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPatternDefaultValues2.baseline create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringVariableStatementArrayBindingPattern.ts create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringVariableStatementArrayBindingPattern2.ts create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts diff --git a/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPattern.baseline new file mode 100644 index 00000000000..0263cafa0a6 --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPattern.baseline @@ -0,0 +1,101 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: string): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 50) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (51 to 52) SpanInfo: undefined +-------------------------------- +4 >type Robot = [number, string, string]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (53 to 91) SpanInfo: undefined +-------------------------------- +5 >var robotA: Robot = [1, "mower", "mowing"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (92 to 135) SpanInfo: {"start":92,"length":42} + >var robotA: Robot = [1, "mower", "mowing"] + >:=> (line 5, col 0) to (line 5, col 42) +-------------------------------- +6 >var robotB: Robot = [2, "trimmer", "trimming"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (136 to 183) SpanInfo: {"start":136,"length":46} + >var robotB: Robot = [2, "trimmer", "trimming"] + >:=> (line 6, col 0) to (line 6, col 46) +-------------------------------- +7 >let [, nameA] = robotA; + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (184 to 207) SpanInfo: {"start":191,"length":5} + >nameA + >:=> (line 7, col 7) to (line 7, col 12) +-------------------------------- +8 >let [numberB] = robotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (208 to 231) SpanInfo: {"start":213,"length":7} + >numberB + >:=> (line 8, col 5) to (line 8, col 12) +-------------------------------- +9 >let [numberA2, nameA2, skillA2] = robotA; + + ~~~~~~~~~~~~~~ => Pos: (232 to 245) SpanInfo: {"start":237,"length":8} + >numberA2 + >:=> (line 9, col 5) to (line 9, col 13) +9 >let [numberA2, nameA2, skillA2] = robotA; + + ~~~~~~~~ => Pos: (246 to 253) SpanInfo: {"start":247,"length":6} + >nameA2 + >:=> (line 9, col 15) to (line 9, col 21) +9 >let [numberA2, nameA2, skillA2] = robotA; + + ~~~~~~~~ => Pos: (254 to 261) SpanInfo: {"start":255,"length":7} + >skillA2 + >:=> (line 9, col 23) to (line 9, col 30) +9 >let [numberA2, nameA2, skillA2] = robotA; + + ~~~~~~~~~~~~ => Pos: (262 to 273) SpanInfo: {"start":237,"length":8} + >numberA2 + >:=> (line 9, col 5) to (line 9, col 13) +-------------------------------- +10 >let [numberC2] = [3, "edging", "Trimming edges"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (274 to 323) SpanInfo: {"start":279,"length":8} + >numberC2 + >:=> (line 10, col 5) to (line 10, col 13) +-------------------------------- +11 >let [numberC, nameC, skillC] = [3, "edging", "Trimming edges"]; + + ~~~~~~~~~~~~~ => Pos: (324 to 336) SpanInfo: {"start":329,"length":7} + >numberC + >:=> (line 11, col 5) to (line 11, col 12) +11 >let [numberC, nameC, skillC] = [3, "edging", "Trimming edges"]; + + ~~~~~~~ => Pos: (337 to 343) SpanInfo: {"start":338,"length":5} + >nameC + >:=> (line 11, col 14) to (line 11, col 19) +11 >let [numberC, nameC, skillC] = [3, "edging", "Trimming edges"]; + + ~~~~~~~ => Pos: (344 to 350) SpanInfo: {"start":345,"length":6} + >skillC + >:=> (line 11, col 21) to (line 11, col 27) +11 >let [numberC, nameC, skillC] = [3, "edging", "Trimming edges"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (351 to 387) SpanInfo: {"start":329,"length":7} + >numberC + >:=> (line 11, col 5) to (line 11, col 12) +-------------------------------- +12 >let [numberA3, ...robotAInfo] = robotA; + ~~~~~~~~~~~~~~ => Pos: (388 to 401) SpanInfo: {"start":393,"length":8} + >numberA3 + >:=> (line 12, col 5) to (line 12, col 13) +12 >let [numberA3, ...robotAInfo] = robotA; + ~~~~~~~~~~~~~~ => Pos: (402 to 415) SpanInfo: {"start":403,"length":13} + >...robotAInfo + >:=> (line 12, col 15) to (line 12, col 28) +12 >let [numberA3, ...robotAInfo] = robotA; + ~~~~~~~~~~~ => Pos: (416 to 426) SpanInfo: {"start":393,"length":8} + >numberA3 + >:=> (line 12, col 5) to (line 12, col 13) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPattern2.baseline b/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPattern2.baseline new file mode 100644 index 00000000000..8b80f6420df --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPattern2.baseline @@ -0,0 +1,115 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: string): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 50) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (51 to 52) SpanInfo: undefined +-------------------------------- +4 >type MultiSkilledRobot = [string, [string, string]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (53 to 105) SpanInfo: undefined +-------------------------------- +5 >var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (106 to 169) SpanInfo: {"start":106,"length":62} + >var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]] + >:=> (line 5, col 0) to (line 5, col 62) +-------------------------------- +6 >var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (170 to 243) SpanInfo: {"start":170,"length":72} + >var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]] + >:=> (line 6, col 0) to (line 6, col 72) +-------------------------------- +7 > + + ~ => Pos: (244 to 244) SpanInfo: undefined +-------------------------------- +8 >let [, skillA] = multiRobotA; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (245 to 274) SpanInfo: {"start":252,"length":6} + >skillA + >:=> (line 8, col 7) to (line 8, col 13) +-------------------------------- +9 >let [nameMB] = multiRobotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (275 to 302) SpanInfo: {"start":280,"length":6} + >nameMB + >:=> (line 9, col 5) to (line 9, col 11) +-------------------------------- +10 >let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA; + + ~~~~~~~~~~~~ => Pos: (303 to 314) SpanInfo: {"start":308,"length":6} + >nameMA + >:=> (line 10, col 5) to (line 10, col 11) +10 >let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA; + + ~~~~~~~~~~~~~~~~ => Pos: (315 to 330) SpanInfo: {"start":317,"length":13} + >primarySkillA + >:=> (line 10, col 14) to (line 10, col 27) +10 >let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA; + + ~~~~~~~~~~~~~~~~ => Pos: (331 to 346) SpanInfo: {"start":332,"length":15} + >secondarySkillA + >:=> (line 10, col 29) to (line 10, col 44) +10 >let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA; + + ~ => Pos: (347 to 347) SpanInfo: {"start":317,"length":13} + >primarySkillA + >:=> (line 10, col 14) to (line 10, col 27) +10 >let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA; + + ~~~~~~~~~~~~~~~~~=> Pos: (348 to 364) SpanInfo: {"start":308,"length":6} + >nameMA + >:=> (line 10, col 5) to (line 10, col 11) +-------------------------------- +11 > + + ~ => Pos: (365 to 365) SpanInfo: undefined +-------------------------------- +12 >let [nameMC] = ["roomba", ["vaccum", "mopping"]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (366 to 415) SpanInfo: {"start":371,"length":6} + >nameMC + >:=> (line 12, col 5) to (line 12, col 11) +-------------------------------- +13 >let [nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vaccum", "mopping"]]; + + ~~~~~~~~~~~~~ => Pos: (416 to 428) SpanInfo: {"start":421,"length":7} + >nameMC2 + >:=> (line 13, col 5) to (line 13, col 12) +13 >let [nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vaccum", "mopping"]]; + + ~~~~~~~~~~~~~~~~ => Pos: (429 to 444) SpanInfo: {"start":431,"length":13} + >primarySkillC + >:=> (line 13, col 15) to (line 13, col 28) +13 >let [nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vaccum", "mopping"]]; + + ~~~~~~~~~~~~~~~~ => Pos: (445 to 460) SpanInfo: {"start":446,"length":15} + >secondarySkillC + >:=> (line 13, col 30) to (line 13, col 45) +13 >let [nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vaccum", "mopping"]]; + + ~=> Pos: (461 to 461) SpanInfo: {"start":431,"length":13} + >primarySkillC + >:=> (line 13, col 15) to (line 13, col 28) +13 >let [nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vaccum", "mopping"]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (462 to 500) SpanInfo: {"start":421,"length":7} + >nameMC2 + >:=> (line 13, col 5) to (line 13, col 12) +-------------------------------- +14 > + + ~ => Pos: (501 to 501) SpanInfo: undefined +-------------------------------- +15 >let [...multiRobotAInfo] = multiRobotA; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (502 to 540) SpanInfo: {"start":507,"length":18} + >...multiRobotAInfo + >:=> (line 15, col 5) to (line 15, col 23) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPatternDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPatternDefaultValues.baseline new file mode 100644 index 00000000000..9f025f3646a --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPatternDefaultValues.baseline @@ -0,0 +1,101 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: string): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 50) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (51 to 52) SpanInfo: undefined +-------------------------------- +4 >type Robot = [number, string, string]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (53 to 91) SpanInfo: undefined +-------------------------------- +5 >var robotA: Robot = [1, "mower", "mowing"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (92 to 135) SpanInfo: {"start":92,"length":42} + >var robotA: Robot = [1, "mower", "mowing"] + >:=> (line 5, col 0) to (line 5, col 42) +-------------------------------- +6 >var robotB: Robot = [2, "trimmer", "trimming"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (136 to 183) SpanInfo: {"start":136,"length":46} + >var robotB: Robot = [2, "trimmer", "trimming"] + >:=> (line 6, col 0) to (line 6, col 46) +-------------------------------- +7 >let [, nameA = "noName"] = robotA; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (184 to 218) SpanInfo: {"start":191,"length":16} + >nameA = "noName" + >:=> (line 7, col 7) to (line 7, col 23) +-------------------------------- +8 >let [numberB = -1] = robotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (219 to 247) SpanInfo: {"start":224,"length":12} + >numberB = -1 + >:=> (line 8, col 5) to (line 8, col 17) +-------------------------------- +9 >let [numberA2 = -1, nameA2 = "noName", skillA2 = "noSkill"] = robotA; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (248 to 266) SpanInfo: {"start":253,"length":13} + >numberA2 = -1 + >:=> (line 9, col 5) to (line 9, col 18) +9 >let [numberA2 = -1, nameA2 = "noName", skillA2 = "noSkill"] = robotA; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (267 to 285) SpanInfo: {"start":268,"length":17} + >nameA2 = "noName" + >:=> (line 9, col 20) to (line 9, col 37) +9 >let [numberA2 = -1, nameA2 = "noName", skillA2 = "noSkill"] = robotA; + + ~~~~~~~~~~~~~~~~~~~~=> Pos: (286 to 305) SpanInfo: {"start":287,"length":19} + >skillA2 = "noSkill" + >:=> (line 9, col 39) to (line 9, col 58) +9 >let [numberA2 = -1, nameA2 = "noName", skillA2 = "noSkill"] = robotA; + + ~~~~~~~~~~~~=> Pos: (306 to 317) SpanInfo: {"start":253,"length":13} + >numberA2 = -1 + >:=> (line 9, col 5) to (line 9, col 18) +-------------------------------- +10 >let [numberC2 = -1] = [3, "edging", "Trimming edges"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (318 to 372) SpanInfo: {"start":323,"length":13} + >numberC2 = -1 + >:=> (line 10, col 5) to (line 10, col 18) +-------------------------------- +11 >let [numberC = -1, nameC = "noName", skillC = "noSkill"] = [3, "edging", "Trimming edges"]; + + ~~~~~~~~~~~~~~~~~~ => Pos: (373 to 390) SpanInfo: {"start":378,"length":12} + >numberC = -1 + >:=> (line 11, col 5) to (line 11, col 17) +11 >let [numberC = -1, nameC = "noName", skillC = "noSkill"] = [3, "edging", "Trimming edges"]; + + ~~~~~~~~~~~~~~~~~~ => Pos: (391 to 408) SpanInfo: {"start":392,"length":16} + >nameC = "noName" + >:=> (line 11, col 19) to (line 11, col 35) +11 >let [numberC = -1, nameC = "noName", skillC = "noSkill"] = [3, "edging", "Trimming edges"]; + + ~~~~~~~~~~~~~~~~~~~=> Pos: (409 to 427) SpanInfo: {"start":410,"length":18} + >skillC = "noSkill" + >:=> (line 11, col 37) to (line 11, col 55) +11 >let [numberC = -1, nameC = "noName", skillC = "noSkill"] = [3, "edging", "Trimming edges"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (428 to 464) SpanInfo: {"start":378,"length":12} + >numberC = -1 + >:=> (line 11, col 5) to (line 11, col 17) +-------------------------------- +12 >let [numberA3 = -1, ...robotAInfo] = robotA; + ~~~~~~~~~~~~~~~~~~~ => Pos: (465 to 483) SpanInfo: {"start":470,"length":13} + >numberA3 = -1 + >:=> (line 12, col 5) to (line 12, col 18) +12 >let [numberA3 = -1, ...robotAInfo] = robotA; + ~~~~~~~~~~~~~~ => Pos: (484 to 497) SpanInfo: {"start":485,"length":13} + >...robotAInfo + >:=> (line 12, col 20) to (line 12, col 33) +12 >let [numberA3 = -1, ...robotAInfo] = robotA; + ~~~~~~~~~~~ => Pos: (498 to 508) SpanInfo: {"start":470,"length":13} + >numberA3 = -1 + >:=> (line 12, col 5) to (line 12, col 18) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPatternDefaultValues2.baseline b/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPatternDefaultValues2.baseline new file mode 100644 index 00000000000..7a1667015fd --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPatternDefaultValues2.baseline @@ -0,0 +1,102 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: string): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 50) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (51 to 52) SpanInfo: undefined +-------------------------------- +4 >type MultiSkilledRobot = [string, string[]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (53 to 97) SpanInfo: undefined +-------------------------------- +5 >var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (98 to 161) SpanInfo: {"start":98,"length":62} + >var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]] + >:=> (line 5, col 0) to (line 5, col 62) +-------------------------------- +6 >var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (162 to 235) SpanInfo: {"start":162,"length":72} + >var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]] + >:=> (line 6, col 0) to (line 6, col 72) +-------------------------------- +7 >let [, skillA = ["noSkill", "noSkill"]] = multiRobotA; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (236 to 290) SpanInfo: {"start":243,"length":31} + >skillA = ["noSkill", "noSkill"] + >:=> (line 7, col 7) to (line 7, col 38) +-------------------------------- +8 >let [nameMB = "noName" ] = multiRobotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (291 to 330) SpanInfo: {"start":296,"length":17} + >nameMB = "noName" + >:=> (line 8, col 5) to (line 8, col 22) +-------------------------------- +9 >let [nameMA = "noName", [primarySkillA = "noSkill", secondarySkillA = "noSkill"] = ["noSkill", "noSkill"]] = multiRobotA; + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (331 to 353) SpanInfo: {"start":336,"length":17} + >nameMA = "noName" + >:=> (line 9, col 5) to (line 9, col 22) +9 >let [nameMA = "noName", [primarySkillA = "noSkill", secondarySkillA = "noSkill"] = ["noSkill", "noSkill"]] = multiRobotA; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (354 to 381) SpanInfo: {"start":356,"length":25} + >primarySkillA = "noSkill" + >:=> (line 9, col 25) to (line 9, col 50) +9 >let [nameMA = "noName", [primarySkillA = "noSkill", secondarySkillA = "noSkill"] = ["noSkill", "noSkill"]] = multiRobotA; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (382 to 409) SpanInfo: {"start":383,"length":27} + >secondarySkillA = "noSkill" + >:=> (line 9, col 52) to (line 9, col 79) +9 >let [nameMA = "noName", [primarySkillA = "noSkill", secondarySkillA = "noSkill"] = ["noSkill", "noSkill"]] = multiRobotA; + + ~=> Pos: (410 to 410) SpanInfo: {"start":356,"length":25} + >primarySkillA = "noSkill" + >:=> (line 9, col 25) to (line 9, col 50) +9 >let [nameMA = "noName", [primarySkillA = "noSkill", secondarySkillA = "noSkill"] = ["noSkill", "noSkill"]] = multiRobotA; + + ~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (411 to 435) SpanInfo: {"start":355,"length":81} + >[primarySkillA = "noSkill", secondarySkillA = "noSkill"] = ["noSkill", "noSkill"] + >:=> (line 9, col 24) to (line 9, col 105) +9 >let [nameMA = "noName", [primarySkillA = "noSkill", secondarySkillA = "noSkill"] = ["noSkill", "noSkill"]] = multiRobotA; + + ~~~~~~~~~~~~~~~~~=> Pos: (436 to 452) SpanInfo: {"start":336,"length":17} + >nameMA = "noName" + >:=> (line 9, col 5) to (line 9, col 22) +-------------------------------- +10 >let [nameMC = "noName" ] = ["roomba", ["vaccum", "mopping"]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (453 to 514) SpanInfo: {"start":458,"length":17} + >nameMC = "noName" + >:=> (line 10, col 5) to (line 10, col 22) +-------------------------------- +11 >let [nameMC2 = "noName", [primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"]] = ["roomba", ["vaccum", "mopping"]]; + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (515 to 538) SpanInfo: {"start":520,"length":18} + >nameMC2 = "noName" + >:=> (line 11, col 5) to (line 11, col 23) +11 >let [nameMC2 = "noName", [primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"]] = ["roomba", ["vaccum", "mopping"]]; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (539 to 566) SpanInfo: {"start":541,"length":25} + >primarySkillC = "noSkill" + >:=> (line 11, col 26) to (line 11, col 51) +11 >let [nameMC2 = "noName", [primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"]] = ["roomba", ["vaccum", "mopping"]]; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (567 to 594) SpanInfo: {"start":568,"length":27} + >secondarySkillC = "noSkill" + >:=> (line 11, col 53) to (line 11, col 80) +11 >let [nameMC2 = "noName", [primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"]] = ["roomba", ["vaccum", "mopping"]]; + ~=> Pos: (595 to 595) SpanInfo: {"start":541,"length":25} + >primarySkillC = "noSkill" + >:=> (line 11, col 26) to (line 11, col 51) +11 >let [nameMC2 = "noName", [primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"]] = ["roomba", ["vaccum", "mopping"]]; + ~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (596 to 620) SpanInfo: {"start":540,"length":81} + >[primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"] + >:=> (line 11, col 25) to (line 11, col 106) +11 >let [nameMC2 = "noName", [primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"]] = ["roomba", ["vaccum", "mopping"]]; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (621 to 658) SpanInfo: {"start":520,"length":18} + >nameMC2 = "noName" + >:=> (line 11, col 5) to (line 11, col 23) \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringVariableStatementArrayBindingPattern.ts b/tests/cases/fourslash/breakpointValidationDestructuringVariableStatementArrayBindingPattern.ts new file mode 100644 index 00000000000..eb4e3e17027 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringVariableStatementArrayBindingPattern.ts @@ -0,0 +1,15 @@ +/// +////declare var console: { +//// log(msg: string): void; +////} +////type Robot = [number, string, string]; +////var robotA: Robot = [1, "mower", "mowing"]; +////var robotB: Robot = [2, "trimmer", "trimming"]; +////let [, nameA] = robotA; +////let [numberB] = robotB; +////let [numberA2, nameA2, skillA2] = robotA; +////let [numberC2] = [3, "edging", "Trimming edges"]; +////let [numberC, nameC, skillC] = [3, "edging", "Trimming edges"]; +////let [numberA3, ...robotAInfo] = robotA; + +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringVariableStatementArrayBindingPattern2.ts b/tests/cases/fourslash/breakpointValidationDestructuringVariableStatementArrayBindingPattern2.ts new file mode 100644 index 00000000000..265dae90ab9 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringVariableStatementArrayBindingPattern2.ts @@ -0,0 +1,19 @@ +/// + +////declare var console: { +//// log(msg: string): void; +////} +////type MultiSkilledRobot = [string, [string, string]]; +////var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +////var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +//// +////let [, skillA] = multiRobotA; +////let [nameMB] = multiRobotB; +////let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA; +//// +////let [nameMC] = ["roomba", ["vaccum", "mopping"]]; +////let [nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vaccum", "mopping"]]; +//// +////let [...multiRobotAInfo] = multiRobotA; + +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts b/tests/cases/fourslash/breakpointValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts new file mode 100644 index 00000000000..78b0646661e --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts @@ -0,0 +1,15 @@ +/// +////declare var console: { +//// log(msg: string): void; +////} +////type Robot = [number, string, string]; +////var robotA: Robot = [1, "mower", "mowing"]; +////var robotB: Robot = [2, "trimmer", "trimming"]; +////let [, nameA = "noName"] = robotA; +////let [numberB = -1] = robotB; +////let [numberA2 = -1, nameA2 = "noName", skillA2 = "noSkill"] = robotA; +////let [numberC2 = -1] = [3, "edging", "Trimming edges"]; +////let [numberC = -1, nameC = "noName", skillC = "noSkill"] = [3, "edging", "Trimming edges"]; +////let [numberA3 = -1, ...robotAInfo] = robotA; + +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts b/tests/cases/fourslash/breakpointValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts new file mode 100644 index 00000000000..ac25165696c --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts @@ -0,0 +1,14 @@ +/// +////declare var console: { +//// log(msg: string): void; +////} +////type MultiSkilledRobot = [string, string[]]; +////var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +////var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +////let [, skillA = ["noSkill", "noSkill"]] = multiRobotA; +////let [nameMB = "noName" ] = multiRobotB; +////let [nameMA = "noName", [primarySkillA = "noSkill", secondarySkillA = "noSkill"] = ["noSkill", "noSkill"]] = multiRobotA; +////let [nameMC = "noName" ] = ["roomba", ["vaccum", "mopping"]]; +////let [nameMC2 = "noName", [primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"]] = ["roomba", ["vaccum", "mopping"]]; + +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file From adcc6854568f0187c487ffc26ac2d5b40c9575fb Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 17 Dec 2015 16:39:23 -0800 Subject: [PATCH 064/209] Fix the array binding pattern breakpoint span of variable declaration statement --- src/services/breakpoints.ts | 16 +++++++++++ ...iableStatementArrayBindingPattern.baseline | 22 +++------------ ...ableStatementArrayBindingPattern2.baseline | 26 ++++++----------- ...tArrayBindingPatternDefaultValues.baseline | 22 +++------------ ...ArrayBindingPatternDefaultValues2.baseline | 28 ++++--------------- 5 files changed, 37 insertions(+), 77 deletions(-) diff --git a/src/services/breakpoints.ts b/src/services/breakpoints.ts index 386970cac5a..94fbcb785e8 100644 --- a/src/services/breakpoints.ts +++ b/src/services/breakpoints.ts @@ -245,6 +245,9 @@ namespace ts.BreakpointResolver { case SyntaxKind.CloseBraceToken: return spanInCloseBraceToken(node); + + case SyntaxKind.CloseBracketToken: + return spanInCloseBracketToken(node); case SyntaxKind.OpenParenToken: return spanInOpenParenToken(node); @@ -512,6 +515,19 @@ namespace ts.BreakpointResolver { } } + function spanInCloseBracketToken(node: Node): TextSpan { + switch (node.parent.kind) { + case SyntaxKind.ArrayBindingPattern: + // Breakpoint in last binding element or binding pattern if it contains no elements + let bindingPattern = node.parent; + return spanInNode(lastOrUndefined(bindingPattern.elements) || bindingPattern); + + // Default to parent node + default: + return spanInNode(node.parent); + } + } + function spanInOpenParenToken(node: Node): TextSpan { if (node.parent.kind === SyntaxKind.DoStatement) { // Go to while keyword and do action instead diff --git a/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPattern.baseline index 0263cafa0a6..0639ca49c9d 100644 --- a/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPattern.baseline +++ b/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPattern.baseline @@ -51,14 +51,9 @@ >:=> (line 9, col 15) to (line 9, col 21) 9 >let [numberA2, nameA2, skillA2] = robotA; - ~~~~~~~~ => Pos: (254 to 261) SpanInfo: {"start":255,"length":7} + ~~~~~~~~~~~~~~~~~~~~ => Pos: (254 to 273) SpanInfo: {"start":255,"length":7} >skillA2 >:=> (line 9, col 23) to (line 9, col 30) -9 >let [numberA2, nameA2, skillA2] = robotA; - - ~~~~~~~~~~~~ => Pos: (262 to 273) SpanInfo: {"start":237,"length":8} - >numberA2 - >:=> (line 9, col 5) to (line 9, col 13) -------------------------------- 10 >let [numberC2] = [3, "edging", "Trimming edges"]; @@ -78,24 +73,15 @@ >:=> (line 11, col 14) to (line 11, col 19) 11 >let [numberC, nameC, skillC] = [3, "edging", "Trimming edges"]; - ~~~~~~~ => Pos: (344 to 350) SpanInfo: {"start":345,"length":6} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (344 to 387) SpanInfo: {"start":345,"length":6} >skillC >:=> (line 11, col 21) to (line 11, col 27) -11 >let [numberC, nameC, skillC] = [3, "edging", "Trimming edges"]; - - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (351 to 387) SpanInfo: {"start":329,"length":7} - >numberC - >:=> (line 11, col 5) to (line 11, col 12) -------------------------------- 12 >let [numberA3, ...robotAInfo] = robotA; ~~~~~~~~~~~~~~ => Pos: (388 to 401) SpanInfo: {"start":393,"length":8} >numberA3 >:=> (line 12, col 5) to (line 12, col 13) 12 >let [numberA3, ...robotAInfo] = robotA; - ~~~~~~~~~~~~~~ => Pos: (402 to 415) SpanInfo: {"start":403,"length":13} + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (402 to 426) SpanInfo: {"start":403,"length":13} >...robotAInfo - >:=> (line 12, col 15) to (line 12, col 28) -12 >let [numberA3, ...robotAInfo] = robotA; - ~~~~~~~~~~~ => Pos: (416 to 426) SpanInfo: {"start":393,"length":8} - >numberA3 - >:=> (line 12, col 5) to (line 12, col 13) \ No newline at end of file + >:=> (line 12, col 15) to (line 12, col 28) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPattern2.baseline b/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPattern2.baseline index 8b80f6420df..cb980a37c74 100644 --- a/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPattern2.baseline +++ b/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPattern2.baseline @@ -55,19 +55,14 @@ >:=> (line 10, col 14) to (line 10, col 27) 10 >let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA; - ~~~~~~~~~~~~~~~~ => Pos: (331 to 346) SpanInfo: {"start":332,"length":15} + ~~~~~~~~~~~~~~~~~ => Pos: (331 to 347) SpanInfo: {"start":332,"length":15} >secondarySkillA >:=> (line 10, col 29) to (line 10, col 44) 10 >let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA; - ~ => Pos: (347 to 347) SpanInfo: {"start":317,"length":13} - >primarySkillA - >:=> (line 10, col 14) to (line 10, col 27) -10 >let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA; - - ~~~~~~~~~~~~~~~~~=> Pos: (348 to 364) SpanInfo: {"start":308,"length":6} - >nameMA - >:=> (line 10, col 5) to (line 10, col 11) + ~~~~~~~~~~~~~~~~~=> Pos: (348 to 364) SpanInfo: {"start":316,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 10, col 13) to (line 10, col 45) -------------------------------- 11 > @@ -91,19 +86,14 @@ >:=> (line 13, col 15) to (line 13, col 28) 13 >let [nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vaccum", "mopping"]]; - ~~~~~~~~~~~~~~~~ => Pos: (445 to 460) SpanInfo: {"start":446,"length":15} + ~~~~~~~~~~~~~~~~~=> Pos: (445 to 461) SpanInfo: {"start":446,"length":15} >secondarySkillC >:=> (line 13, col 30) to (line 13, col 45) 13 >let [nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vaccum", "mopping"]]; - ~=> Pos: (461 to 461) SpanInfo: {"start":431,"length":13} - >primarySkillC - >:=> (line 13, col 15) to (line 13, col 28) -13 >let [nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vaccum", "mopping"]]; - - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (462 to 500) SpanInfo: {"start":421,"length":7} - >nameMC2 - >:=> (line 13, col 5) to (line 13, col 12) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (462 to 500) SpanInfo: {"start":430,"length":32} + >[primarySkillC, secondarySkillC] + >:=> (line 13, col 14) to (line 13, col 46) -------------------------------- 14 > diff --git a/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPatternDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPatternDefaultValues.baseline index 9f025f3646a..e3b43164563 100644 --- a/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPatternDefaultValues.baseline +++ b/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPatternDefaultValues.baseline @@ -51,14 +51,9 @@ >:=> (line 9, col 20) to (line 9, col 37) 9 >let [numberA2 = -1, nameA2 = "noName", skillA2 = "noSkill"] = robotA; - ~~~~~~~~~~~~~~~~~~~~=> Pos: (286 to 305) SpanInfo: {"start":287,"length":19} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (286 to 317) SpanInfo: {"start":287,"length":19} >skillA2 = "noSkill" >:=> (line 9, col 39) to (line 9, col 58) -9 >let [numberA2 = -1, nameA2 = "noName", skillA2 = "noSkill"] = robotA; - - ~~~~~~~~~~~~=> Pos: (306 to 317) SpanInfo: {"start":253,"length":13} - >numberA2 = -1 - >:=> (line 9, col 5) to (line 9, col 18) -------------------------------- 10 >let [numberC2 = -1] = [3, "edging", "Trimming edges"]; @@ -78,24 +73,15 @@ >:=> (line 11, col 19) to (line 11, col 35) 11 >let [numberC = -1, nameC = "noName", skillC = "noSkill"] = [3, "edging", "Trimming edges"]; - ~~~~~~~~~~~~~~~~~~~=> Pos: (409 to 427) SpanInfo: {"start":410,"length":18} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (409 to 464) SpanInfo: {"start":410,"length":18} >skillC = "noSkill" >:=> (line 11, col 37) to (line 11, col 55) -11 >let [numberC = -1, nameC = "noName", skillC = "noSkill"] = [3, "edging", "Trimming edges"]; - - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (428 to 464) SpanInfo: {"start":378,"length":12} - >numberC = -1 - >:=> (line 11, col 5) to (line 11, col 17) -------------------------------- 12 >let [numberA3 = -1, ...robotAInfo] = robotA; ~~~~~~~~~~~~~~~~~~~ => Pos: (465 to 483) SpanInfo: {"start":470,"length":13} >numberA3 = -1 >:=> (line 12, col 5) to (line 12, col 18) 12 >let [numberA3 = -1, ...robotAInfo] = robotA; - ~~~~~~~~~~~~~~ => Pos: (484 to 497) SpanInfo: {"start":485,"length":13} + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (484 to 508) SpanInfo: {"start":485,"length":13} >...robotAInfo - >:=> (line 12, col 20) to (line 12, col 33) -12 >let [numberA3 = -1, ...robotAInfo] = robotA; - ~~~~~~~~~~~ => Pos: (498 to 508) SpanInfo: {"start":470,"length":13} - >numberA3 = -1 - >:=> (line 12, col 5) to (line 12, col 18) \ No newline at end of file + >:=> (line 12, col 20) to (line 12, col 33) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPatternDefaultValues2.baseline b/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPatternDefaultValues2.baseline index 7a1667015fd..ddbfdd29268 100644 --- a/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPatternDefaultValues2.baseline +++ b/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPatternDefaultValues2.baseline @@ -51,24 +51,14 @@ >:=> (line 9, col 25) to (line 9, col 50) 9 >let [nameMA = "noName", [primarySkillA = "noSkill", secondarySkillA = "noSkill"] = ["noSkill", "noSkill"]] = multiRobotA; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (382 to 409) SpanInfo: {"start":383,"length":27} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (382 to 410) SpanInfo: {"start":383,"length":27} >secondarySkillA = "noSkill" >:=> (line 9, col 52) to (line 9, col 79) 9 >let [nameMA = "noName", [primarySkillA = "noSkill", secondarySkillA = "noSkill"] = ["noSkill", "noSkill"]] = multiRobotA; - ~=> Pos: (410 to 410) SpanInfo: {"start":356,"length":25} - >primarySkillA = "noSkill" - >:=> (line 9, col 25) to (line 9, col 50) -9 >let [nameMA = "noName", [primarySkillA = "noSkill", secondarySkillA = "noSkill"] = ["noSkill", "noSkill"]] = multiRobotA; - - ~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (411 to 435) SpanInfo: {"start":355,"length":81} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (411 to 452) SpanInfo: {"start":355,"length":81} >[primarySkillA = "noSkill", secondarySkillA = "noSkill"] = ["noSkill", "noSkill"] >:=> (line 9, col 24) to (line 9, col 105) -9 >let [nameMA = "noName", [primarySkillA = "noSkill", secondarySkillA = "noSkill"] = ["noSkill", "noSkill"]] = multiRobotA; - - ~~~~~~~~~~~~~~~~~=> Pos: (436 to 452) SpanInfo: {"start":336,"length":17} - >nameMA = "noName" - >:=> (line 9, col 5) to (line 9, col 22) -------------------------------- 10 >let [nameMC = "noName" ] = ["roomba", ["vaccum", "mopping"]]; @@ -85,18 +75,10 @@ >primarySkillC = "noSkill" >:=> (line 11, col 26) to (line 11, col 51) 11 >let [nameMC2 = "noName", [primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"]] = ["roomba", ["vaccum", "mopping"]]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (567 to 594) SpanInfo: {"start":568,"length":27} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (567 to 595) SpanInfo: {"start":568,"length":27} >secondarySkillC = "noSkill" >:=> (line 11, col 53) to (line 11, col 80) 11 >let [nameMC2 = "noName", [primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"]] = ["roomba", ["vaccum", "mopping"]]; - ~=> Pos: (595 to 595) SpanInfo: {"start":541,"length":25} - >primarySkillC = "noSkill" - >:=> (line 11, col 26) to (line 11, col 51) -11 >let [nameMC2 = "noName", [primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"]] = ["roomba", ["vaccum", "mopping"]]; - ~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (596 to 620) SpanInfo: {"start":540,"length":81} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (596 to 658) SpanInfo: {"start":540,"length":81} >[primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"] - >:=> (line 11, col 25) to (line 11, col 106) -11 >let [nameMC2 = "noName", [primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"]] = ["roomba", ["vaccum", "mopping"]]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (621 to 658) SpanInfo: {"start":520,"length":18} - >nameMC2 = "noName" - >:=> (line 11, col 5) to (line 11, col 23) \ No newline at end of file + >:=> (line 11, col 25) to (line 11, col 106) \ No newline at end of file From 73498e8bc2003ede4067fba58ee80e7cf9a14e76 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 17 Dec 2015 16:53:59 -0800 Subject: [PATCH 065/209] Test cases for parameter destructuring pattern --- ...uringParameterArrayBindingPattern.baseline | 196 ++++++++++++ ...ringParameterArrayBindingPattern2.baseline | 196 ++++++++++++ ...rArrayBindingPatternDefaultValues.baseline | 216 +++++++++++++ ...ArrayBindingPatternDefaultValues2.baseline | 182 +++++++++++ ...rameterNestedObjectBindingPattern.baseline | 200 ++++++++++++ ...ObjectBindingPatternDefaultValues.baseline | 300 ++++++++++++++++++ ...ringParameterObjectBindingPattern.baseline | 164 ++++++++++ ...ObjectBindingPatternDefaultValues.baseline | 179 +++++++++++ ...structuringParameterArrayBindingPattern.ts | 29 ++ ...tructuringParameterArrayBindingPattern2.ts | 29 ++ ...rameterArrayBindingPatternDefaultValues.ts | 28 ++ ...ameterArrayBindingPatternDefaultValues2.ts | 25 ++ ...ringParameterNestedObjectBindingPattern.ts | 28 ++ ...NestedObjectBindingPatternDefaultValues.ts | 41 +++ ...tructuringParameterObjectBindingPattern.ts | 26 ++ ...ameterObjectBindingPatternDefaultValues.ts | 26 ++ 16 files changed, 1865 insertions(+) create mode 100644 tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern.baseline create mode 100644 tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern2.baseline create mode 100644 tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues.baseline create mode 100644 tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues2.baseline create mode 100644 tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPattern.baseline create mode 100644 tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPatternDefaultValues.baseline create mode 100644 tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPattern.baseline create mode 100644 tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPatternDefaultValues.baseline create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPattern.ts create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPattern2.ts create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPatternDefaultValues.ts create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPatternDefaultValues2.ts create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringParameterNestedObjectBindingPattern.ts create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringParameterObjectBindingPattern.ts create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringParameterObjectBindingPatternDefaultValues.ts diff --git a/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern.baseline new file mode 100644 index 00000000000..c0738652a8e --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern.baseline @@ -0,0 +1,196 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: any): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (48 to 49) SpanInfo: undefined +-------------------------------- +4 >type Robot = [number, string, string]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 88) SpanInfo: undefined +-------------------------------- +5 >var robotA: Robot = [1, "mower", "mowing"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (89 to 132) SpanInfo: {"start":89,"length":42} + >var robotA: Robot = [1, "mower", "mowing"] + >:=> (line 5, col 0) to (line 5, col 42) +-------------------------------- +6 >function foo1([, nameA]: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (133 to 146) SpanInfo: {"start":171,"length":18} + >console.log(nameA) + >:=> (line 7, col 4) to (line 7, col 22) +6 >function foo1([, nameA]: Robot) { + + ~~~~~~~~~ => Pos: (147 to 155) SpanInfo: {"start":150,"length":5} + >nameA + >:=> (line 6, col 17) to (line 6, col 22) +6 >function foo1([, nameA]: Robot) { + + ~~~~~~~~~~~ => Pos: (156 to 166) SpanInfo: {"start":171,"length":18} + >console.log(nameA) + >:=> (line 7, col 4) to (line 7, col 22) +-------------------------------- +7 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (167 to 190) SpanInfo: {"start":171,"length":18} + >console.log(nameA) + >:=> (line 7, col 4) to (line 7, col 22) +-------------------------------- +8 >} + + ~~ => Pos: (191 to 192) SpanInfo: {"start":191,"length":1} + >} + >:=> (line 8, col 0) to (line 8, col 1) +-------------------------------- +9 >function foo2([numberB]: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (193 to 206) SpanInfo: {"start":231,"length":20} + >console.log(numberB) + >:=> (line 10, col 4) to (line 10, col 24) +9 >function foo2([numberB]: Robot) { + + ~~~~~~~~~ => Pos: (207 to 215) SpanInfo: {"start":208,"length":7} + >numberB + >:=> (line 9, col 15) to (line 9, col 22) +9 >function foo2([numberB]: Robot) { + + ~~~~~~~~~~~ => Pos: (216 to 226) SpanInfo: {"start":231,"length":20} + >console.log(numberB) + >:=> (line 10, col 4) to (line 10, col 24) +-------------------------------- +10 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (227 to 252) SpanInfo: {"start":231,"length":20} + >console.log(numberB) + >:=> (line 10, col 4) to (line 10, col 24) +-------------------------------- +11 >} + + ~~ => Pos: (253 to 254) SpanInfo: {"start":253,"length":1} + >} + >:=> (line 11, col 0) to (line 11, col 1) +-------------------------------- +12 >function foo3([numberA2, nameA2, skillA2]: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (255 to 268) SpanInfo: {"start":311,"length":19} + >console.log(nameA2) + >:=> (line 13, col 4) to (line 13, col 23) +12 >function foo3([numberA2, nameA2, skillA2]: Robot) { + + ~~~~~~~~~~ => Pos: (269 to 278) SpanInfo: {"start":270,"length":8} + >numberA2 + >:=> (line 12, col 15) to (line 12, col 23) +12 >function foo3([numberA2, nameA2, skillA2]: Robot) { + + ~~~~~~~~ => Pos: (279 to 286) SpanInfo: {"start":280,"length":6} + >nameA2 + >:=> (line 12, col 25) to (line 12, col 31) +12 >function foo3([numberA2, nameA2, skillA2]: Robot) { + + ~~~~~~~~~ => Pos: (287 to 295) SpanInfo: {"start":288,"length":7} + >skillA2 + >:=> (line 12, col 33) to (line 12, col 40) +12 >function foo3([numberA2, nameA2, skillA2]: Robot) { + + ~~~~~~~~~~~=> Pos: (296 to 306) SpanInfo: {"start":311,"length":19} + >console.log(nameA2) + >:=> (line 13, col 4) to (line 13, col 23) +-------------------------------- +13 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (307 to 331) SpanInfo: {"start":311,"length":19} + >console.log(nameA2) + >:=> (line 13, col 4) to (line 13, col 23) +-------------------------------- +14 >} + + ~~ => Pos: (332 to 333) SpanInfo: {"start":332,"length":1} + >} + >:=> (line 14, col 0) to (line 14, col 1) +-------------------------------- +15 >function foo4([numberA3, ...robotAInfo]: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (334 to 347) SpanInfo: {"start":388,"length":23} + >console.log(robotAInfo) + >:=> (line 16, col 4) to (line 16, col 27) +15 >function foo4([numberA3, ...robotAInfo]: Robot) { + + ~~~~~~~~~~ => Pos: (348 to 357) SpanInfo: {"start":349,"length":8} + >numberA3 + >:=> (line 15, col 15) to (line 15, col 23) +15 >function foo4([numberA3, ...robotAInfo]: Robot) { + + ~~~~~~~~~~~~~~~ => Pos: (358 to 372) SpanInfo: {"start":359,"length":13} + >...robotAInfo + >:=> (line 15, col 25) to (line 15, col 38) +15 >function foo4([numberA3, ...robotAInfo]: Robot) { + + ~~~~~~~~~~~=> Pos: (373 to 383) SpanInfo: {"start":388,"length":23} + >console.log(robotAInfo) + >:=> (line 16, col 4) to (line 16, col 27) +-------------------------------- +16 > console.log(robotAInfo); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (384 to 412) SpanInfo: {"start":388,"length":23} + >console.log(robotAInfo) + >:=> (line 16, col 4) to (line 16, col 27) +-------------------------------- +17 >} + + ~~ => Pos: (413 to 414) SpanInfo: {"start":413,"length":1} + >} + >:=> (line 17, col 0) to (line 17, col 1) +-------------------------------- +18 >foo1(robotA); + + ~~~~~~~~~~~~~~ => Pos: (415 to 428) SpanInfo: {"start":415,"length":12} + >foo1(robotA) + >:=> (line 18, col 0) to (line 18, col 12) +-------------------------------- +19 >foo1([2, "trimmer", "trimming"]); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (429 to 462) SpanInfo: {"start":429,"length":32} + >foo1([2, "trimmer", "trimming"]) + >:=> (line 19, col 0) to (line 19, col 32) +-------------------------------- +20 >foo2(robotA); + + ~~~~~~~~~~~~~~ => Pos: (463 to 476) SpanInfo: {"start":463,"length":12} + >foo2(robotA) + >:=> (line 20, col 0) to (line 20, col 12) +-------------------------------- +21 >foo2([2, "trimmer", "trimming"]); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (477 to 510) SpanInfo: {"start":477,"length":32} + >foo2([2, "trimmer", "trimming"]) + >:=> (line 21, col 0) to (line 21, col 32) +-------------------------------- +22 >foo3(robotA); + + ~~~~~~~~~~~~~~ => Pos: (511 to 524) SpanInfo: {"start":511,"length":12} + >foo3(robotA) + >:=> (line 22, col 0) to (line 22, col 12) +-------------------------------- +23 >foo3([2, "trimmer", "trimming"]); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (525 to 558) SpanInfo: {"start":525,"length":32} + >foo3([2, "trimmer", "trimming"]) + >:=> (line 23, col 0) to (line 23, col 32) +-------------------------------- +24 >foo4(robotA); + + ~~~~~~~~~~~~~~ => Pos: (559 to 572) SpanInfo: {"start":559,"length":12} + >foo4(robotA) + >:=> (line 24, col 0) to (line 24, col 12) +-------------------------------- +25 >foo4([2, "trimmer", "trimming"]); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (573 to 605) SpanInfo: {"start":573,"length":32} + >foo4([2, "trimmer", "trimming"]) + >:=> (line 25, col 0) to (line 25, col 32) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern2.baseline b/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern2.baseline new file mode 100644 index 00000000000..254e3a16bb0 --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern2.baseline @@ -0,0 +1,196 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: any): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (48 to 49) SpanInfo: undefined +-------------------------------- +4 >type Robot = [string, [string, string]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 90) SpanInfo: undefined +-------------------------------- +5 >var robotA: Robot = ["trimmer", ["trimming", "edging"]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (91 to 147) SpanInfo: {"start":91,"length":55} + >var robotA: Robot = ["trimmer", ["trimming", "edging"]] + >:=> (line 5, col 0) to (line 5, col 55) +-------------------------------- +6 >function foo1([, skillA]: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (148 to 161) SpanInfo: {"start":187,"length":19} + >console.log(skillA) + >:=> (line 7, col 4) to (line 7, col 23) +6 >function foo1([, skillA]: Robot) { + + ~~~~~~~~~~ => Pos: (162 to 171) SpanInfo: {"start":165,"length":6} + >skillA + >:=> (line 6, col 17) to (line 6, col 23) +6 >function foo1([, skillA]: Robot) { + + ~~~~~~~~~~~ => Pos: (172 to 182) SpanInfo: {"start":187,"length":19} + >console.log(skillA) + >:=> (line 7, col 4) to (line 7, col 23) +-------------------------------- +7 > console.log(skillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (183 to 207) SpanInfo: {"start":187,"length":19} + >console.log(skillA) + >:=> (line 7, col 4) to (line 7, col 23) +-------------------------------- +8 >} + + ~~ => Pos: (208 to 209) SpanInfo: {"start":208,"length":1} + >} + >:=> (line 8, col 0) to (line 8, col 1) +-------------------------------- +9 >function foo2([nameMB]: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (210 to 223) SpanInfo: {"start":247,"length":19} + >console.log(nameMB) + >:=> (line 10, col 4) to (line 10, col 23) +9 >function foo2([nameMB]: Robot) { + + ~~~~~~~~ => Pos: (224 to 231) SpanInfo: {"start":225,"length":6} + >nameMB + >:=> (line 9, col 15) to (line 9, col 21) +9 >function foo2([nameMB]: Robot) { + + ~~~~~~~~~~~ => Pos: (232 to 242) SpanInfo: {"start":247,"length":19} + >console.log(nameMB) + >:=> (line 10, col 4) to (line 10, col 23) +-------------------------------- +10 > console.log(nameMB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (243 to 267) SpanInfo: {"start":247,"length":19} + >console.log(nameMB) + >:=> (line 10, col 4) to (line 10, col 23) +-------------------------------- +11 >} + + ~~ => Pos: (268 to 269) SpanInfo: {"start":268,"length":1} + >} + >:=> (line 11, col 0) to (line 11, col 1) +-------------------------------- +12 >function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (270 to 283) SpanInfo: {"start":341,"length":19} + >console.log(nameMA) + >:=> (line 13, col 4) to (line 13, col 23) +12 >function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) { + + ~~~~~~~~ => Pos: (284 to 291) SpanInfo: {"start":285,"length":6} + >nameMA + >:=> (line 12, col 15) to (line 12, col 21) +12 >function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) { + + ~~~~~~~~~~~~~~~~ => Pos: (292 to 307) SpanInfo: {"start":294,"length":13} + >primarySkillA + >:=> (line 12, col 24) to (line 12, col 37) +12 >function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) { + + ~~~~~~~~~~~~~~~~~=> Pos: (308 to 324) SpanInfo: {"start":309,"length":15} + >secondarySkillA + >:=> (line 12, col 39) to (line 12, col 54) +12 >function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) { + + ~=> Pos: (325 to 325) SpanInfo: {"start":293,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 12, col 23) to (line 12, col 55) +12 >function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) { + + ~~~~~~~~~~~=> Pos: (326 to 336) SpanInfo: {"start":341,"length":19} + >console.log(nameMA) + >:=> (line 13, col 4) to (line 13, col 23) +-------------------------------- +13 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (337 to 361) SpanInfo: {"start":341,"length":19} + >console.log(nameMA) + >:=> (line 13, col 4) to (line 13, col 23) +-------------------------------- +14 >} + + ~~ => Pos: (362 to 363) SpanInfo: {"start":362,"length":1} + >} + >:=> (line 14, col 0) to (line 14, col 1) +-------------------------------- +15 >function foo4([...multiRobotAInfo]: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (364 to 377) SpanInfo: {"start":413,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 16, col 4) to (line 16, col 32) +15 >function foo4([...multiRobotAInfo]: Robot) { + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (378 to 397) SpanInfo: {"start":379,"length":18} + >...multiRobotAInfo + >:=> (line 15, col 15) to (line 15, col 33) +15 >function foo4([...multiRobotAInfo]: Robot) { + + ~~~~~~~~~~~ => Pos: (398 to 408) SpanInfo: {"start":413,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 16, col 4) to (line 16, col 32) +-------------------------------- +16 > console.log(multiRobotAInfo); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (409 to 442) SpanInfo: {"start":413,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 16, col 4) to (line 16, col 32) +-------------------------------- +17 >} + + ~~ => Pos: (443 to 444) SpanInfo: {"start":443,"length":1} + >} + >:=> (line 17, col 0) to (line 17, col 1) +-------------------------------- +18 >foo1(robotA); + + ~~~~~~~~~~~~~~ => Pos: (445 to 458) SpanInfo: {"start":445,"length":12} + >foo1(robotA) + >:=> (line 18, col 0) to (line 18, col 12) +-------------------------------- +19 >foo1(["roomba", ["vaccum", "mopping"]]); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (459 to 499) SpanInfo: {"start":459,"length":39} + >foo1(["roomba", ["vaccum", "mopping"]]) + >:=> (line 19, col 0) to (line 19, col 39) +-------------------------------- +20 >foo2(robotA); + + ~~~~~~~~~~~~~~ => Pos: (500 to 513) SpanInfo: {"start":500,"length":12} + >foo2(robotA) + >:=> (line 20, col 0) to (line 20, col 12) +-------------------------------- +21 >foo2(["roomba", ["vaccum", "mopping"]]); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (514 to 554) SpanInfo: {"start":514,"length":39} + >foo2(["roomba", ["vaccum", "mopping"]]) + >:=> (line 21, col 0) to (line 21, col 39) +-------------------------------- +22 >foo3(robotA); + + ~~~~~~~~~~~~~~ => Pos: (555 to 568) SpanInfo: {"start":555,"length":12} + >foo3(robotA) + >:=> (line 22, col 0) to (line 22, col 12) +-------------------------------- +23 >foo3(["roomba", ["vaccum", "mopping"]]); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (569 to 609) SpanInfo: {"start":569,"length":39} + >foo3(["roomba", ["vaccum", "mopping"]]) + >:=> (line 23, col 0) to (line 23, col 39) +-------------------------------- +24 >foo4(robotA); + + ~~~~~~~~~~~~~~ => Pos: (610 to 623) SpanInfo: {"start":610,"length":12} + >foo4(robotA) + >:=> (line 24, col 0) to (line 24, col 12) +-------------------------------- +25 >foo4(["roomba", ["vaccum", "mopping"]]); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (624 to 663) SpanInfo: {"start":624,"length":39} + >foo4(["roomba", ["vaccum", "mopping"]]) + >:=> (line 25, col 0) to (line 25, col 39) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues.baseline new file mode 100644 index 00000000000..4208b8de46b --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues.baseline @@ -0,0 +1,216 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: any): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (48 to 49) SpanInfo: undefined +-------------------------------- +4 >type Robot = [number, string, string]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 88) SpanInfo: undefined +-------------------------------- +5 >var robotA: Robot = [1, "mower", "mowing"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (89 to 132) SpanInfo: {"start":89,"length":42} + >var robotA: Robot = [1, "mower", "mowing"] + >:=> (line 5, col 0) to (line 5, col 42) +-------------------------------- +6 >function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~ => Pos: (133 to 146) SpanInfo: {"start":206,"length":18} + >console.log(nameA) + >:=> (line 7, col 4) to (line 7, col 22) +6 >function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (147 to 166) SpanInfo: {"start":150,"length":16} + >nameA = "noName" + >:=> (line 6, col 17) to (line 6, col 33) +6 >function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (167 to 198) SpanInfo: {"start":147,"length":51} + >[, nameA = "noName"]: Robot = [-1, "name", "skill"] + >:=> (line 6, col 14) to (line 6, col 65) +6 >function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) { + + ~~~=> Pos: (199 to 201) SpanInfo: {"start":206,"length":18} + >console.log(nameA) + >:=> (line 7, col 4) to (line 7, col 22) +-------------------------------- +7 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (202 to 225) SpanInfo: {"start":206,"length":18} + >console.log(nameA) + >:=> (line 7, col 4) to (line 7, col 22) +-------------------------------- +8 >} + + ~~ => Pos: (226 to 227) SpanInfo: {"start":226,"length":1} + >} + >:=> (line 8, col 0) to (line 8, col 1) +-------------------------------- +9 >function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~ => Pos: (228 to 241) SpanInfo: {"start":295,"length":20} + >console.log(numberB) + >:=> (line 10, col 4) to (line 10, col 24) +9 >function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~ => Pos: (242 to 255) SpanInfo: {"start":243,"length":12} + >numberB = -1 + >:=> (line 9, col 15) to (line 9, col 27) +9 >function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (256 to 287) SpanInfo: {"start":242,"length":45} + >[numberB = -1]: Robot = [-1, "name", "skill"] + >:=> (line 9, col 14) to (line 9, col 59) +9 >function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) { + + ~~~=> Pos: (288 to 290) SpanInfo: {"start":295,"length":20} + >console.log(numberB) + >:=> (line 10, col 4) to (line 10, col 24) +-------------------------------- +10 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (291 to 316) SpanInfo: {"start":295,"length":20} + >console.log(numberB) + >:=> (line 10, col 4) to (line 10, col 24) +-------------------------------- +11 >} + + ~~ => Pos: (317 to 318) SpanInfo: {"start":317,"length":1} + >} + >:=> (line 11, col 0) to (line 11, col 1) +-------------------------------- +12 >function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~ => Pos: (319 to 332) SpanInfo: {"start":423,"length":19} + >console.log(nameA2) + >:=> (line 13, col 4) to (line 13, col 23) +12 >function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~~ => Pos: (333 to 347) SpanInfo: {"start":334,"length":13} + >numberA2 = -1 + >:=> (line 12, col 15) to (line 12, col 28) +12 >function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~~~~=> Pos: (348 to 364) SpanInfo: {"start":349,"length":15} + >nameA2 = "name" + >:=> (line 12, col 30) to (line 12, col 45) +12 >function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (365 to 383) SpanInfo: {"start":366,"length":17} + >skillA2 = "skill" + >:=> (line 12, col 47) to (line 12, col 64) +12 >function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (384 to 415) SpanInfo: {"start":333,"length":82} + >[numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"] + >:=> (line 12, col 14) to (line 12, col 96) +12 >function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) { + + ~~~=> Pos: (416 to 418) SpanInfo: {"start":423,"length":19} + >console.log(nameA2) + >:=> (line 13, col 4) to (line 13, col 23) +-------------------------------- +13 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (419 to 443) SpanInfo: {"start":423,"length":19} + >console.log(nameA2) + >:=> (line 13, col 4) to (line 13, col 23) +-------------------------------- +14 >} + + ~~ => Pos: (444 to 445) SpanInfo: {"start":444,"length":1} + >} + >:=> (line 14, col 0) to (line 14, col 1) +-------------------------------- +15 >function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~ => Pos: (446 to 459) SpanInfo: {"start":529,"length":23} + >console.log(robotAInfo) + >:=> (line 16, col 4) to (line 16, col 27) +15 >function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~~ => Pos: (460 to 474) SpanInfo: {"start":461,"length":13} + >numberA3 = -1 + >:=> (line 15, col 15) to (line 15, col 28) +15 >function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~~ => Pos: (475 to 489) SpanInfo: {"start":476,"length":13} + >...robotAInfo + >:=> (line 15, col 30) to (line 15, col 43) +15 >function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (490 to 521) SpanInfo: {"start":460,"length":61} + >[numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"] + >:=> (line 15, col 14) to (line 15, col 75) +15 >function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) { + + ~~~=> Pos: (522 to 524) SpanInfo: {"start":529,"length":23} + >console.log(robotAInfo) + >:=> (line 16, col 4) to (line 16, col 27) +-------------------------------- +16 > console.log(robotAInfo); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (525 to 553) SpanInfo: {"start":529,"length":23} + >console.log(robotAInfo) + >:=> (line 16, col 4) to (line 16, col 27) +-------------------------------- +17 >} + + ~~ => Pos: (554 to 555) SpanInfo: {"start":554,"length":1} + >} + >:=> (line 17, col 0) to (line 17, col 1) +-------------------------------- +18 >foo1(robotA); + + ~~~~~~~~~~~~~~ => Pos: (556 to 569) SpanInfo: {"start":556,"length":12} + >foo1(robotA) + >:=> (line 18, col 0) to (line 18, col 12) +-------------------------------- +19 >foo1([2, "trimmer", "trimming"]); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (570 to 603) SpanInfo: {"start":570,"length":32} + >foo1([2, "trimmer", "trimming"]) + >:=> (line 19, col 0) to (line 19, col 32) +-------------------------------- +20 >foo2(robotA); + + ~~~~~~~~~~~~~~ => Pos: (604 to 617) SpanInfo: {"start":604,"length":12} + >foo2(robotA) + >:=> (line 20, col 0) to (line 20, col 12) +-------------------------------- +21 >foo2([2, "trimmer", "trimming"]); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (618 to 651) SpanInfo: {"start":618,"length":32} + >foo2([2, "trimmer", "trimming"]) + >:=> (line 21, col 0) to (line 21, col 32) +-------------------------------- +22 >foo3(robotA); + + ~~~~~~~~~~~~~~ => Pos: (652 to 665) SpanInfo: {"start":652,"length":12} + >foo3(robotA) + >:=> (line 22, col 0) to (line 22, col 12) +-------------------------------- +23 >foo3([2, "trimmer", "trimming"]); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (666 to 699) SpanInfo: {"start":666,"length":32} + >foo3([2, "trimmer", "trimming"]) + >:=> (line 23, col 0) to (line 23, col 32) +-------------------------------- +24 >foo4(robotA); + + ~~~~~~~~~~~~~~ => Pos: (700 to 713) SpanInfo: {"start":700,"length":12} + >foo4(robotA) + >:=> (line 24, col 0) to (line 24, col 12) +-------------------------------- +25 >foo4([2, "trimmer", "trimming"]); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (714 to 746) SpanInfo: {"start":714,"length":32} + >foo4([2, "trimmer", "trimming"]) + >:=> (line 25, col 0) to (line 25, col 32) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues2.baseline b/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues2.baseline new file mode 100644 index 00000000000..b2c63f3b2be --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues2.baseline @@ -0,0 +1,182 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: any): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (48 to 49) SpanInfo: undefined +-------------------------------- +4 >type Robot = [string, string[]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 82) SpanInfo: undefined +-------------------------------- +5 >var robotA: Robot = ["trimmer", ["trimming", "edging"]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (83 to 139) SpanInfo: {"start":83,"length":55} + >var robotA: Robot = ["trimmer", ["trimming", "edging"]] + >:=> (line 5, col 0) to (line 5, col 55) +-------------------------------- +6 >function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]]) { + + ~~~~~~~~~~~~~~ => Pos: (140 to 153) SpanInfo: {"start":236,"length":19} + >console.log(skillA) + >:=> (line 7, col 4) to (line 7, col 23) +6 >function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (154 to 188) SpanInfo: {"start":157,"length":31} + >skillA = ["noSkill", "noSkill"] + >:=> (line 6, col 17) to (line 6, col 48) +6 >function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (189 to 228) SpanInfo: {"start":154,"length":74} + >[, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]] + >:=> (line 6, col 14) to (line 6, col 88) +6 >function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]]) { + + ~~~=> Pos: (229 to 231) SpanInfo: {"start":236,"length":19} + >console.log(skillA) + >:=> (line 7, col 4) to (line 7, col 23) +-------------------------------- +7 > console.log(skillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (232 to 256) SpanInfo: {"start":236,"length":19} + >console.log(skillA) + >:=> (line 7, col 4) to (line 7, col 23) +-------------------------------- +8 >} + + ~~ => Pos: (257 to 258) SpanInfo: {"start":257,"length":1} + >} + >:=> (line 8, col 0) to (line 8, col 1) +-------------------------------- +9 >function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) { + + ~~~~~~~~~~~~~~ => Pos: (259 to 272) SpanInfo: {"start":340,"length":19} + >console.log(nameMB) + >:=> (line 10, col 4) to (line 10, col 23) +9 >function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (273 to 291) SpanInfo: {"start":274,"length":17} + >nameMB = "noName" + >:=> (line 9, col 15) to (line 9, col 32) +9 >function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (292 to 332) SpanInfo: {"start":273,"length":59} + >[nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]] + >:=> (line 9, col 14) to (line 9, col 73) +9 >function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) { + + ~~~=> Pos: (333 to 335) SpanInfo: {"start":340,"length":19} + >console.log(nameMB) + >:=> (line 10, col 4) to (line 10, col 23) +-------------------------------- +10 > console.log(nameMB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (336 to 360) SpanInfo: {"start":340,"length":19} + >console.log(nameMB) + >:=> (line 10, col 4) to (line 10, col 23) +-------------------------------- +11 >} + + ~~ => Pos: (361 to 362) SpanInfo: {"start":361,"length":1} + >} + >:=> (line 11, col 0) to (line 11, col 1) +-------------------------------- +12 >function foo3([nameMA = "noName", [ + + ~~~~~~~~~~~~~~ => Pos: (363 to 376) SpanInfo: {"start":506,"length":19} + >console.log(nameMA) + >:=> (line 16, col 4) to (line 16, col 23) +12 >function foo3([nameMA = "noName", [ + + ~~~~~~~~~~~~~~~~~~~ => Pos: (377 to 395) SpanInfo: {"start":378,"length":17} + >nameMA = "noName" + >:=> (line 12, col 15) to (line 12, col 32) +12 >function foo3([nameMA = "noName", [ + + ~~~ => Pos: (396 to 398) SpanInfo: {"start":403,"length":25} + >primarySkillA = "primary" + >:=> (line 13, col 4) to (line 13, col 29) +-------------------------------- +13 > primarySkillA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (399 to 429) SpanInfo: {"start":403,"length":25} + >primarySkillA = "primary" + >:=> (line 13, col 4) to (line 13, col 29) +-------------------------------- +14 > secondarySkillA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (430 to 463) SpanInfo: {"start":434,"length":29} + >secondarySkillA = "secondary" + >:=> (line 14, col 4) to (line 14, col 33) +-------------------------------- +15 >] = ["noSkill", "noSkill"]]: Robot) { + + ~ => Pos: (464 to 464) SpanInfo: {"start":434,"length":29} + >secondarySkillA = "secondary" + >:=> (line 14, col 4) to (line 14, col 33) +15 >] = ["noSkill", "noSkill"]]: Robot) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (465 to 490) SpanInfo: {"start":397,"length":93} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["noSkill", "noSkill"] + >:=> (line 12, col 34) to (line 15, col 26) +15 >] = ["noSkill", "noSkill"]]: Robot) { + + ~~~~~~~~~~~ => Pos: (491 to 501) SpanInfo: {"start":506,"length":19} + >console.log(nameMA) + >:=> (line 16, col 4) to (line 16, col 23) +-------------------------------- +16 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (502 to 526) SpanInfo: {"start":506,"length":19} + >console.log(nameMA) + >:=> (line 16, col 4) to (line 16, col 23) +-------------------------------- +17 >} + + ~~ => Pos: (527 to 528) SpanInfo: {"start":527,"length":1} + >} + >:=> (line 17, col 0) to (line 17, col 1) +-------------------------------- +18 >foo1(robotA); + + ~~~~~~~~~~~~~~ => Pos: (529 to 542) SpanInfo: {"start":529,"length":12} + >foo1(robotA) + >:=> (line 18, col 0) to (line 18, col 12) +-------------------------------- +19 >foo1(["roomba", ["vaccum", "mopping"]]); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (543 to 583) SpanInfo: {"start":543,"length":39} + >foo1(["roomba", ["vaccum", "mopping"]]) + >:=> (line 19, col 0) to (line 19, col 39) +-------------------------------- +20 >foo2(robotA); + + ~~~~~~~~~~~~~~ => Pos: (584 to 597) SpanInfo: {"start":584,"length":12} + >foo2(robotA) + >:=> (line 20, col 0) to (line 20, col 12) +-------------------------------- +21 >foo2(["roomba", ["vaccum", "mopping"]]); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (598 to 638) SpanInfo: {"start":598,"length":39} + >foo2(["roomba", ["vaccum", "mopping"]]) + >:=> (line 21, col 0) to (line 21, col 39) +-------------------------------- +22 >foo3(robotA); + + ~~~~~~~~~~~~~~ => Pos: (639 to 652) SpanInfo: {"start":639,"length":12} + >foo3(robotA) + >:=> (line 22, col 0) to (line 22, col 12) +-------------------------------- +23 >foo3(["roomba", ["vaccum", "mopping"]]); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (653 to 692) SpanInfo: {"start":653,"length":39} + >foo3(["roomba", ["vaccum", "mopping"]]) + >:=> (line 23, col 0) to (line 23, col 39) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPattern.baseline new file mode 100644 index 00000000000..3c17d60d1a4 --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPattern.baseline @@ -0,0 +1,200 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: string): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 50) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (51 to 52) SpanInfo: undefined +-------------------------------- +4 >interface Robot { + + ~~~~~~~~~~~~~~~~~~ => Pos: (53 to 70) SpanInfo: undefined +-------------------------------- +5 > name: string; + + ~~~~~~~~~~~~~~~~~~ => Pos: (71 to 88) SpanInfo: undefined +-------------------------------- +6 > skills: { + + ~~~~~~~~~~~~~~ => Pos: (89 to 102) SpanInfo: undefined +-------------------------------- +7 > primary: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (103 to 127) SpanInfo: undefined +-------------------------------- +8 > secondary: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (128 to 154) SpanInfo: undefined +-------------------------------- +9 > }; + + ~~~~~~~ => Pos: (155 to 161) SpanInfo: undefined +-------------------------------- +10 >} + + ~~ => Pos: (162 to 163) SpanInfo: undefined +-------------------------------- +11 >var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (164 to 252) SpanInfo: {"start":164,"length":87} + >var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } } + >:=> (line 11, col 0) to (line 11, col 87) +-------------------------------- +12 >function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (253 to 266) SpanInfo: {"start":338,"length":21} + >console.log(primaryA) + >:=> (line 13, col 4) to (line 13, col 25) +12 >function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) { + + ~~~~~~~~~ => Pos: (267 to 275) SpanInfo: {"start":269,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 12, col 16) to (line 12, col 68) +12 >function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) { + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (276 to 296) SpanInfo: {"start":279,"length":17} + >primary: primaryA + >:=> (line 12, col 26) to (line 12, col 43) +12 >function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (297 to 320) SpanInfo: {"start":298,"length":21} + >secondary: secondaryA + >:=> (line 12, col 45) to (line 12, col 66) +12 >function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) { + + ~~=> Pos: (321 to 322) SpanInfo: {"start":269,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 12, col 16) to (line 12, col 68) +12 >function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) { + + ~~~~~~~~~~~=> Pos: (323 to 333) SpanInfo: {"start":338,"length":21} + >console.log(primaryA) + >:=> (line 13, col 4) to (line 13, col 25) +-------------------------------- +13 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (334 to 360) SpanInfo: {"start":338,"length":21} + >console.log(primaryA) + >:=> (line 13, col 4) to (line 13, col 25) +-------------------------------- +14 >} + + ~~ => Pos: (361 to 362) SpanInfo: {"start":361,"length":1} + >} + >:=> (line 14, col 0) to (line 14, col 1) +-------------------------------- +15 >function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (363 to 376) SpanInfo: {"start":461,"length":23} + >console.log(secondaryB) + >:=> (line 16, col 4) to (line 16, col 27) +15 >function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (377 to 390) SpanInfo: {"start":379,"length":11} + >name: nameC + >:=> (line 15, col 16) to (line 15, col 27) +15 >function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) { + + ~~~~~~~~ => Pos: (391 to 398) SpanInfo: {"start":392,"length":52} + >skills: { primary: primaryB, secondary: secondaryB } + >:=> (line 15, col 29) to (line 15, col 81) +15 >function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) { + + ~~~~~~~~~~~~~~~~~~~~~=> Pos: (399 to 419) SpanInfo: {"start":402,"length":17} + >primary: primaryB + >:=> (line 15, col 39) to (line 15, col 56) +15 >function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (420 to 443) SpanInfo: {"start":421,"length":21} + >secondary: secondaryB + >:=> (line 15, col 58) to (line 15, col 79) +15 >function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) { + + ~~=> Pos: (444 to 445) SpanInfo: {"start":392,"length":52} + >skills: { primary: primaryB, secondary: secondaryB } + >:=> (line 15, col 29) to (line 15, col 81) +15 >function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) { + + ~~~~~~~~~~~=> Pos: (446 to 456) SpanInfo: {"start":461,"length":23} + >console.log(secondaryB) + >:=> (line 16, col 4) to (line 16, col 27) +-------------------------------- +16 > console.log(secondaryB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (457 to 485) SpanInfo: {"start":461,"length":23} + >console.log(secondaryB) + >:=> (line 16, col 4) to (line 16, col 27) +-------------------------------- +17 >} + + ~~ => Pos: (486 to 487) SpanInfo: {"start":486,"length":1} + >} + >:=> (line 17, col 0) to (line 17, col 1) +-------------------------------- +18 >function foo3({ skills }: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (488 to 501) SpanInfo: {"start":527,"length":27} + >console.log(skills.primary) + >:=> (line 19, col 4) to (line 19, col 31) +18 >function foo3({ skills }: Robot) { + + ~~~~~~~~~~ => Pos: (502 to 511) SpanInfo: {"start":504,"length":6} + >skills + >:=> (line 18, col 16) to (line 18, col 22) +18 >function foo3({ skills }: Robot) { + + ~~~~~~~~~~~ => Pos: (512 to 522) SpanInfo: {"start":527,"length":27} + >console.log(skills.primary) + >:=> (line 19, col 4) to (line 19, col 31) +-------------------------------- +19 > console.log(skills.primary); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (523 to 555) SpanInfo: {"start":527,"length":27} + >console.log(skills.primary) + >:=> (line 19, col 4) to (line 19, col 31) +-------------------------------- +20 >} + + ~~ => Pos: (556 to 557) SpanInfo: {"start":556,"length":1} + >} + >:=> (line 20, col 0) to (line 20, col 1) +-------------------------------- +21 >foo1(robotA); + + ~~~~~~~~~~~~~~ => Pos: (558 to 571) SpanInfo: {"start":558,"length":12} + >foo1(robotA) + >:=> (line 21, col 0) to (line 21, col 12) +-------------------------------- +22 >foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (572 to 657) SpanInfo: {"start":572,"length":84} + >foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) + >:=> (line 22, col 0) to (line 22, col 84) +-------------------------------- +23 >foo2(robotA); + + ~~~~~~~~~~~~~~ => Pos: (658 to 671) SpanInfo: {"start":658,"length":12} + >foo2(robotA) + >:=> (line 23, col 0) to (line 23, col 12) +-------------------------------- +24 >foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (672 to 757) SpanInfo: {"start":672,"length":84} + >foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) + >:=> (line 24, col 0) to (line 24, col 84) +-------------------------------- +25 >foo3(robotA); + + ~~~~~~~~~~~~~~ => Pos: (758 to 771) SpanInfo: {"start":758,"length":12} + >foo3(robotA) + >:=> (line 25, col 0) to (line 25, col 12) +-------------------------------- +26 >foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (772 to 856) SpanInfo: {"start":772,"length":84} + >foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) + >:=> (line 26, col 0) to (line 26, col 84) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPatternDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPatternDefaultValues.baseline new file mode 100644 index 00000000000..9dd4b8dc5b1 --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPatternDefaultValues.baseline @@ -0,0 +1,300 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: string): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 50) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (51 to 52) SpanInfo: undefined +-------------------------------- +4 >interface Robot { + + ~~~~~~~~~~~~~~~~~~ => Pos: (53 to 70) SpanInfo: undefined +-------------------------------- +5 > name: string; + + ~~~~~~~~~~~~~~~~~~ => Pos: (71 to 88) SpanInfo: undefined +-------------------------------- +6 > skills: { + + ~~~~~~~~~~~~~~ => Pos: (89 to 102) SpanInfo: undefined +-------------------------------- +7 > primary?: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (103 to 128) SpanInfo: undefined +-------------------------------- +8 > secondary?: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (129 to 156) SpanInfo: undefined +-------------------------------- +9 > }; + + ~~~~~~~ => Pos: (157 to 163) SpanInfo: undefined +-------------------------------- +10 >} + + ~~ => Pos: (164 to 165) SpanInfo: undefined +-------------------------------- +11 >var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (166 to 254) SpanInfo: {"start":166,"length":87} + >var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } } + >:=> (line 11, col 0) to (line 11, col 87) +-------------------------------- +12 >function foo1( + + ~~~~~~~~~~~~~~~ => Pos: (255 to 269) SpanInfo: {"start":475,"length":21} + >console.log(primaryA) + >:=> (line 19, col 4) to (line 19, col 25) +-------------------------------- +13 > { + + ~~~~~~ => Pos: (270 to 275) SpanInfo: {"start":284,"length":161} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "SomeSkill", secondary: "someSkill" } + >:=> (line 14, col 8) to (line 17, col 60) +-------------------------------- +14 > skills: { + + ~~~~~~~~~~~~~~~ => Pos: (276 to 290) SpanInfo: {"start":284,"length":161} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "SomeSkill", secondary: "someSkill" } + >:=> (line 14, col 8) to (line 17, col 60) +14 > skills: { + + ~~~ => Pos: (291 to 293) SpanInfo: {"start":306,"length":29} + >primary: primaryA = "primary" + >:=> (line 15, col 12) to (line 15, col 41) +-------------------------------- +15 > primary: primaryA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (294 to 336) SpanInfo: {"start":306,"length":29} + >primary: primaryA = "primary" + >:=> (line 15, col 12) to (line 15, col 41) +-------------------------------- +16 > secondary: secondaryA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (337 to 384) SpanInfo: {"start":349,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 16, col 12) to (line 16, col 47) +-------------------------------- +17 > } = { primary: "SomeSkill", secondary: "someSkill" } + + ~~~~~~~~~ => Pos: (385 to 393) SpanInfo: {"start":349,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 16, col 12) to (line 16, col 47) +17 > } = { primary: "SomeSkill", secondary: "someSkill" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (394 to 445) SpanInfo: {"start":284,"length":161} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "SomeSkill", secondary: "someSkill" } + >:=> (line 14, col 8) to (line 17, col 60) +-------------------------------- +18 > }: Robot = robotA) { + + ~~~~~ => Pos: (446 to 450) SpanInfo: {"start":284,"length":161} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "SomeSkill", secondary: "someSkill" } + >:=> (line 14, col 8) to (line 17, col 60) +18 > }: Robot = robotA) { + + ~~~~~~~~~~~~~~~~~ => Pos: (451 to 467) SpanInfo: {"start":274,"length":193} + >{ + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "SomeSkill", secondary: "someSkill" } + > }: Robot = robotA + >:=> (line 13, col 4) to (line 18, col 21) +18 > }: Robot = robotA) { + + ~~~ => Pos: (468 to 470) SpanInfo: {"start":475,"length":21} + >console.log(primaryA) + >:=> (line 19, col 4) to (line 19, col 25) +-------------------------------- +19 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (471 to 497) SpanInfo: {"start":475,"length":21} + >console.log(primaryA) + >:=> (line 19, col 4) to (line 19, col 25) +-------------------------------- +20 >} + + ~~ => Pos: (498 to 499) SpanInfo: {"start":498,"length":1} + >} + >:=> (line 20, col 0) to (line 20, col 1) +-------------------------------- +21 >function foo2( + + ~~~~~~~~~~~~~~~ => Pos: (500 to 514) SpanInfo: {"start":750,"length":23} + >console.log(secondaryB) + >:=> (line 29, col 4) to (line 29, col 27) +-------------------------------- +22 > { + + ~~~~~~ => Pos: (515 to 520) SpanInfo: {"start":529,"length":20} + >name: nameC = "name" + >:=> (line 23, col 8) to (line 23, col 28) +-------------------------------- +23 > name: nameC = "name", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (521 to 550) SpanInfo: {"start":529,"length":20} + >name: nameC = "name" + >:=> (line 23, col 8) to (line 23, col 28) +-------------------------------- +24 > skills: { + + ~~~~~~~~~~~~~~~ => Pos: (551 to 565) SpanInfo: {"start":559,"length":161} + >skills: { + > primary: primaryB = "primary", + > secondary: secondaryB = "secondary" + > } = { primary: "SomeSkill", secondary: "someSkill" } + >:=> (line 24, col 8) to (line 27, col 60) +24 > skills: { + + ~~~ => Pos: (566 to 568) SpanInfo: {"start":581,"length":29} + >primary: primaryB = "primary" + >:=> (line 25, col 12) to (line 25, col 41) +-------------------------------- +25 > primary: primaryB = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (569 to 611) SpanInfo: {"start":581,"length":29} + >primary: primaryB = "primary" + >:=> (line 25, col 12) to (line 25, col 41) +-------------------------------- +26 > secondary: secondaryB = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (612 to 659) SpanInfo: {"start":624,"length":35} + >secondary: secondaryB = "secondary" + >:=> (line 26, col 12) to (line 26, col 47) +-------------------------------- +27 > } = { primary: "SomeSkill", secondary: "someSkill" } + + ~~~~~~~~~ => Pos: (660 to 668) SpanInfo: {"start":624,"length":35} + >secondary: secondaryB = "secondary" + >:=> (line 26, col 12) to (line 26, col 47) +27 > } = { primary: "SomeSkill", secondary: "someSkill" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (669 to 720) SpanInfo: {"start":559,"length":161} + >skills: { + > primary: primaryB = "primary", + > secondary: secondaryB = "secondary" + > } = { primary: "SomeSkill", secondary: "someSkill" } + >:=> (line 24, col 8) to (line 27, col 60) +-------------------------------- +28 > }: Robot = robotA) { + + ~~~~~ => Pos: (721 to 725) SpanInfo: {"start":559,"length":161} + >skills: { + > primary: primaryB = "primary", + > secondary: secondaryB = "secondary" + > } = { primary: "SomeSkill", secondary: "someSkill" } + >:=> (line 24, col 8) to (line 27, col 60) +28 > }: Robot = robotA) { + + ~~~~~~~~~~~~~~~~~ => Pos: (726 to 742) SpanInfo: {"start":519,"length":223} + >{ + > name: nameC = "name", + > skills: { + > primary: primaryB = "primary", + > secondary: secondaryB = "secondary" + > } = { primary: "SomeSkill", secondary: "someSkill" } + > }: Robot = robotA + >:=> (line 22, col 4) to (line 28, col 21) +28 > }: Robot = robotA) { + + ~~~ => Pos: (743 to 745) SpanInfo: {"start":750,"length":23} + >console.log(secondaryB) + >:=> (line 29, col 4) to (line 29, col 27) +-------------------------------- +29 > console.log(secondaryB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (746 to 774) SpanInfo: {"start":750,"length":23} + >console.log(secondaryB) + >:=> (line 29, col 4) to (line 29, col 27) +-------------------------------- +30 >} + + ~~ => Pos: (775 to 776) SpanInfo: {"start":775,"length":1} + >} + >:=> (line 30, col 0) to (line 30, col 1) +-------------------------------- +31 >function foo3({ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA) { + + ~~~~~~~~~~~~~~ => Pos: (777 to 790) SpanInfo: {"start":877,"length":27} + >console.log(skills.primary) + >:=> (line 32, col 4) to (line 32, col 31) +31 >function foo3({ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (791 to 852) SpanInfo: {"start":793,"length":57} + >skills = { primary: "SomeSkill", secondary: "someSkill" } + >:=> (line 31, col 16) to (line 31, col 73) +31 >function foo3({ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA) { + + ~~~~~~~~~~~~~~~~~=> Pos: (853 to 869) SpanInfo: {"start":791,"length":78} + >{ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA + >:=> (line 31, col 14) to (line 31, col 92) +31 >function foo3({ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA) { + + ~~~=> Pos: (870 to 872) SpanInfo: {"start":877,"length":27} + >console.log(skills.primary) + >:=> (line 32, col 4) to (line 32, col 31) +-------------------------------- +32 > console.log(skills.primary); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (873 to 905) SpanInfo: {"start":877,"length":27} + >console.log(skills.primary) + >:=> (line 32, col 4) to (line 32, col 31) +-------------------------------- +33 >} + + ~~ => Pos: (906 to 907) SpanInfo: {"start":906,"length":1} + >} + >:=> (line 33, col 0) to (line 33, col 1) +-------------------------------- +34 >foo1(robotA); + + ~~~~~~~~~~~~~~ => Pos: (908 to 921) SpanInfo: {"start":908,"length":12} + >foo1(robotA) + >:=> (line 34, col 0) to (line 34, col 12) +-------------------------------- +35 >foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (922 to 1007) SpanInfo: {"start":922,"length":84} + >foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) + >:=> (line 35, col 0) to (line 35, col 84) +-------------------------------- +36 >foo2(robotA); + + ~~~~~~~~~~~~~~ => Pos: (1008 to 1021) SpanInfo: {"start":1008,"length":12} + >foo2(robotA) + >:=> (line 36, col 0) to (line 36, col 12) +-------------------------------- +37 >foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1022 to 1107) SpanInfo: {"start":1022,"length":84} + >foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) + >:=> (line 37, col 0) to (line 37, col 84) +-------------------------------- +38 >foo3(robotA); + + ~~~~~~~~~~~~~~ => Pos: (1108 to 1121) SpanInfo: {"start":1108,"length":12} + >foo3(robotA) + >:=> (line 38, col 0) to (line 38, col 12) +-------------------------------- +39 >foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1122 to 1206) SpanInfo: {"start":1122,"length":84} + >foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) + >:=> (line 39, col 0) to (line 39, col 84) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPattern.baseline new file mode 100644 index 00000000000..6279328ed0c --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPattern.baseline @@ -0,0 +1,164 @@ + +1 >interface Robot { + + ~~~~~~~~~~~~~~~~~~ => Pos: (0 to 17) SpanInfo: undefined +-------------------------------- +2 > name: string; + + ~~~~~~~~~~~~~~~~~~ => Pos: (18 to 35) SpanInfo: undefined +-------------------------------- +3 > skill: string; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (36 to 54) SpanInfo: undefined +-------------------------------- +4 >} + + ~~ => Pos: (55 to 56) SpanInfo: undefined +-------------------------------- +5 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (57 to 79) SpanInfo: undefined +-------------------------------- +6 > log(msg: string): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (80 to 107) SpanInfo: undefined +-------------------------------- +7 >} + + ~~ => Pos: (108 to 109) SpanInfo: undefined +-------------------------------- +8 >var hello = "hello"; + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (110 to 130) SpanInfo: {"start":110,"length":19} + >var hello = "hello" + >:=> (line 8, col 0) to (line 8, col 19) +-------------------------------- +9 >var robotA: Robot = { name: "mower", skill: "mowing" }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (131 to 186) SpanInfo: {"start":131,"length":54} + >var robotA: Robot = { name: "mower", skill: "mowing" } + >:=> (line 9, col 0) to (line 9, col 54) +-------------------------------- +10 >function foo1({ name: nameA }: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (187 to 200) SpanInfo: {"start":231,"length":18} + >console.log(nameA) + >:=> (line 11, col 4) to (line 11, col 22) +10 >function foo1({ name: nameA }: Robot) { + + ~~~~~~~~~~~~~~~ => Pos: (201 to 215) SpanInfo: {"start":203,"length":11} + >name: nameA + >:=> (line 10, col 16) to (line 10, col 27) +10 >function foo1({ name: nameA }: Robot) { + + ~~~~~~~~~~~ => Pos: (216 to 226) SpanInfo: {"start":231,"length":18} + >console.log(nameA) + >:=> (line 11, col 4) to (line 11, col 22) +-------------------------------- +11 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (227 to 250) SpanInfo: {"start":231,"length":18} + >console.log(nameA) + >:=> (line 11, col 4) to (line 11, col 22) +-------------------------------- +12 >} + + ~~ => Pos: (251 to 252) SpanInfo: {"start":251,"length":1} + >} + >:=> (line 12, col 0) to (line 12, col 1) +-------------------------------- +13 >function foo2({ name: nameB, skill: skillB }: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (253 to 266) SpanInfo: {"start":312,"length":18} + >console.log(nameB) + >:=> (line 14, col 4) to (line 14, col 22) +13 >function foo2({ name: nameB, skill: skillB }: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (267 to 280) SpanInfo: {"start":269,"length":11} + >name: nameB + >:=> (line 13, col 16) to (line 13, col 27) +13 >function foo2({ name: nameB, skill: skillB }: Robot) { + + ~~~~~~~~~~~~~~~~ => Pos: (281 to 296) SpanInfo: {"start":282,"length":13} + >skill: skillB + >:=> (line 13, col 29) to (line 13, col 42) +13 >function foo2({ name: nameB, skill: skillB }: Robot) { + + ~~~~~~~~~~~=> Pos: (297 to 307) SpanInfo: {"start":312,"length":18} + >console.log(nameB) + >:=> (line 14, col 4) to (line 14, col 22) +-------------------------------- +14 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (308 to 331) SpanInfo: {"start":312,"length":18} + >console.log(nameB) + >:=> (line 14, col 4) to (line 14, col 22) +-------------------------------- +15 >} + + ~~ => Pos: (332 to 333) SpanInfo: {"start":332,"length":1} + >} + >:=> (line 15, col 0) to (line 15, col 1) +-------------------------------- +16 >function foo3({ name }: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (334 to 347) SpanInfo: {"start":371,"length":17} + >console.log(name) + >:=> (line 17, col 4) to (line 17, col 21) +16 >function foo3({ name }: Robot) { + + ~~~~~~~~ => Pos: (348 to 355) SpanInfo: {"start":350,"length":4} + >name + >:=> (line 16, col 16) to (line 16, col 20) +16 >function foo3({ name }: Robot) { + + ~~~~~~~~~~~ => Pos: (356 to 366) SpanInfo: {"start":371,"length":17} + >console.log(name) + >:=> (line 17, col 4) to (line 17, col 21) +-------------------------------- +17 > console.log(name); + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (367 to 389) SpanInfo: {"start":371,"length":17} + >console.log(name) + >:=> (line 17, col 4) to (line 17, col 21) +-------------------------------- +18 >} + + ~~ => Pos: (390 to 391) SpanInfo: {"start":390,"length":1} + >} + >:=> (line 18, col 0) to (line 18, col 1) +-------------------------------- +19 >foo1(robotA); + + ~~~~~~~~~~~~~~ => Pos: (392 to 405) SpanInfo: {"start":392,"length":12} + >foo1(robotA) + >:=> (line 19, col 0) to (line 19, col 12) +-------------------------------- +20 >foo1({ name: "Edger", skill: "cutting edges" }); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (406 to 454) SpanInfo: {"start":406,"length":47} + >foo1({ name: "Edger", skill: "cutting edges" }) + >:=> (line 20, col 0) to (line 20, col 47) +-------------------------------- +21 >foo2(robotA); + + ~~~~~~~~~~~~~~ => Pos: (455 to 468) SpanInfo: {"start":455,"length":12} + >foo2(robotA) + >:=> (line 21, col 0) to (line 21, col 12) +-------------------------------- +22 >foo2({ name: "Edger", skill: "cutting edges" }); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (469 to 517) SpanInfo: {"start":469,"length":47} + >foo2({ name: "Edger", skill: "cutting edges" }) + >:=> (line 22, col 0) to (line 22, col 47) +-------------------------------- +23 >foo3(robotA); + + ~~~~~~~~~~~~~~ => Pos: (518 to 531) SpanInfo: {"start":518,"length":12} + >foo3(robotA) + >:=> (line 23, col 0) to (line 23, col 12) +-------------------------------- +24 >foo3({ name: "Edger", skill: "cutting edges" }); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (532 to 579) SpanInfo: {"start":532,"length":47} + >foo3({ name: "Edger", skill: "cutting edges" }) + >:=> (line 24, col 0) to (line 24, col 47) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPatternDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPatternDefaultValues.baseline new file mode 100644 index 00000000000..a2392f5794c --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPatternDefaultValues.baseline @@ -0,0 +1,179 @@ + +1 >interface Robot { + + ~~~~~~~~~~~~~~~~~~ => Pos: (0 to 17) SpanInfo: undefined +-------------------------------- +2 > name?: string; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (18 to 36) SpanInfo: undefined +-------------------------------- +3 > skill?: string; + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (37 to 56) SpanInfo: undefined +-------------------------------- +4 >} + + ~~ => Pos: (57 to 58) SpanInfo: undefined +-------------------------------- +5 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (59 to 81) SpanInfo: undefined +-------------------------------- +6 > log(msg: string): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (82 to 109) SpanInfo: undefined +-------------------------------- +7 >} + + ~~ => Pos: (110 to 111) SpanInfo: undefined +-------------------------------- +8 >var hello = "hello"; + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (112 to 132) SpanInfo: {"start":112,"length":19} + >var hello = "hello" + >:=> (line 8, col 0) to (line 8, col 19) +-------------------------------- +9 >var robotA: Robot = { name: "mower", skill: "mowing" }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (133 to 188) SpanInfo: {"start":133,"length":54} + >var robotA: Robot = { name: "mower", skill: "mowing" } + >:=> (line 9, col 0) to (line 9, col 54) +-------------------------------- +10 >function foo1({ name: nameA = "" }: Robot = { }) { + + ~~~~~~~~~~~~~~ => Pos: (189 to 202) SpanInfo: {"start":252,"length":18} + >console.log(nameA) + >:=> (line 11, col 4) to (line 11, col 22) +10 >function foo1({ name: nameA = "" }: Robot = { }) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (203 to 230) SpanInfo: {"start":205,"length":24} + >name: nameA = "" + >:=> (line 10, col 16) to (line 10, col 40) +10 >function foo1({ name: nameA = "" }: Robot = { }) { + + ~~~~~~~~~~~~~~=> Pos: (231 to 244) SpanInfo: {"start":203,"length":41} + >{ name: nameA = "" }: Robot = { } + >:=> (line 10, col 14) to (line 10, col 55) +10 >function foo1({ name: nameA = "" }: Robot = { }) { + + ~~~=> Pos: (245 to 247) SpanInfo: {"start":252,"length":18} + >console.log(nameA) + >:=> (line 11, col 4) to (line 11, col 22) +-------------------------------- +11 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (248 to 271) SpanInfo: {"start":252,"length":18} + >console.log(nameA) + >:=> (line 11, col 4) to (line 11, col 22) +-------------------------------- +12 >} + + ~~ => Pos: (272 to 273) SpanInfo: {"start":272,"length":1} + >} + >:=> (line 12, col 0) to (line 12, col 1) +-------------------------------- +13 >function foo2({ name: nameB = "", skill: skillB = "noSkill" }: Robot = {}) { + + ~~~~~~~~~~~~~~ => Pos: (274 to 287) SpanInfo: {"start":363,"length":18} + >console.log(nameB) + >:=> (line 14, col 4) to (line 14, col 22) +13 >function foo2({ name: nameB = "", skill: skillB = "noSkill" }: Robot = {}) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (288 to 314) SpanInfo: {"start":290,"length":24} + >name: nameB = "" + >:=> (line 13, col 16) to (line 13, col 40) +13 >function foo2({ name: nameB = "", skill: skillB = "noSkill" }: Robot = {}) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (315 to 342) SpanInfo: {"start":316,"length":25} + >skill: skillB = "noSkill" + >:=> (line 13, col 42) to (line 13, col 67) +13 >function foo2({ name: nameB = "", skill: skillB = "noSkill" }: Robot = {}) { + + ~~~~~~~~~~~~~=> Pos: (343 to 355) SpanInfo: {"start":288,"length":67} + >{ name: nameB = "", skill: skillB = "noSkill" }: Robot = {} + >:=> (line 13, col 14) to (line 13, col 81) +13 >function foo2({ name: nameB = "", skill: skillB = "noSkill" }: Robot = {}) { + + ~~~=> Pos: (356 to 358) SpanInfo: {"start":363,"length":18} + >console.log(nameB) + >:=> (line 14, col 4) to (line 14, col 22) +-------------------------------- +14 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (359 to 382) SpanInfo: {"start":363,"length":18} + >console.log(nameB) + >:=> (line 14, col 4) to (line 14, col 22) +-------------------------------- +15 >} + + ~~ => Pos: (383 to 384) SpanInfo: {"start":383,"length":1} + >} + >:=> (line 15, col 0) to (line 15, col 1) +-------------------------------- +16 >function foo3({ name = "" }: Robot = {}) { + + ~~~~~~~~~~~~~~ => Pos: (385 to 398) SpanInfo: {"start":440,"length":17} + >console.log(name) + >:=> (line 17, col 4) to (line 17, col 21) +16 >function foo3({ name = "" }: Robot = {}) { + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (399 to 419) SpanInfo: {"start":401,"length":17} + >name = "" + >:=> (line 16, col 16) to (line 16, col 33) +16 >function foo3({ name = "" }: Robot = {}) { + + ~~~~~~~~~~~~~=> Pos: (420 to 432) SpanInfo: {"start":399,"length":33} + >{ name = "" }: Robot = {} + >:=> (line 16, col 14) to (line 16, col 47) +16 >function foo3({ name = "" }: Robot = {}) { + + ~~~=> Pos: (433 to 435) SpanInfo: {"start":440,"length":17} + >console.log(name) + >:=> (line 17, col 4) to (line 17, col 21) +-------------------------------- +17 > console.log(name); + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (436 to 458) SpanInfo: {"start":440,"length":17} + >console.log(name) + >:=> (line 17, col 4) to (line 17, col 21) +-------------------------------- +18 >} + + ~~ => Pos: (459 to 460) SpanInfo: {"start":459,"length":1} + >} + >:=> (line 18, col 0) to (line 18, col 1) +-------------------------------- +19 >foo1(robotA); + + ~~~~~~~~~~~~~~ => Pos: (461 to 474) SpanInfo: {"start":461,"length":12} + >foo1(robotA) + >:=> (line 19, col 0) to (line 19, col 12) +-------------------------------- +20 >foo1({ name: "Edger", skill: "cutting edges" }); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (475 to 523) SpanInfo: {"start":475,"length":47} + >foo1({ name: "Edger", skill: "cutting edges" }) + >:=> (line 20, col 0) to (line 20, col 47) +-------------------------------- +21 >foo2(robotA); + + ~~~~~~~~~~~~~~ => Pos: (524 to 537) SpanInfo: {"start":524,"length":12} + >foo2(robotA) + >:=> (line 21, col 0) to (line 21, col 12) +-------------------------------- +22 >foo2({ name: "Edger", skill: "cutting edges" }); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (538 to 586) SpanInfo: {"start":538,"length":47} + >foo2({ name: "Edger", skill: "cutting edges" }) + >:=> (line 22, col 0) to (line 22, col 47) +-------------------------------- +23 >foo3(robotA); + + ~~~~~~~~~~~~~~ => Pos: (587 to 600) SpanInfo: {"start":587,"length":12} + >foo3(robotA) + >:=> (line 23, col 0) to (line 23, col 12) +-------------------------------- +24 >foo3({ name: "Edger", skill: "cutting edges" }); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (601 to 648) SpanInfo: {"start":601,"length":47} + >foo3({ name: "Edger", skill: "cutting edges" }) + >:=> (line 24, col 0) to (line 24, col 47) \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPattern.ts b/tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPattern.ts new file mode 100644 index 00000000000..c3f91122010 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPattern.ts @@ -0,0 +1,29 @@ +/// + +////declare var console: { +//// log(msg: any): void; +////} +////type Robot = [number, string, string]; +////var robotA: Robot = [1, "mower", "mowing"]; +////function foo1([, nameA]: Robot) { +//// console.log(nameA); +////} +////function foo2([numberB]: Robot) { +//// console.log(numberB); +////} +////function foo3([numberA2, nameA2, skillA2]: Robot) { +//// console.log(nameA2); +////} +////function foo4([numberA3, ...robotAInfo]: Robot) { +//// console.log(robotAInfo); +////} +////foo1(robotA); +////foo1([2, "trimmer", "trimming"]); +////foo2(robotA); +////foo2([2, "trimmer", "trimming"]); +////foo3(robotA); +////foo3([2, "trimmer", "trimming"]); +////foo4(robotA); +////foo4([2, "trimmer", "trimming"]); + +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPattern2.ts b/tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPattern2.ts new file mode 100644 index 00000000000..fbedbe4abb0 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPattern2.ts @@ -0,0 +1,29 @@ +/// + +////declare var console: { +//// log(msg: any): void; +////} +////type Robot = [string, [string, string]]; +////var robotA: Robot = ["trimmer", ["trimming", "edging"]]; +////function foo1([, skillA]: Robot) { +//// console.log(skillA); +////} +////function foo2([nameMB]: Robot) { +//// console.log(nameMB); +////} +////function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) { +//// console.log(nameMA); +////} +////function foo4([...multiRobotAInfo]: Robot) { +//// console.log(multiRobotAInfo); +////} +////foo1(robotA); +////foo1(["roomba", ["vaccum", "mopping"]]); +////foo2(robotA); +////foo2(["roomba", ["vaccum", "mopping"]]); +////foo3(robotA); +////foo3(["roomba", ["vaccum", "mopping"]]); +////foo4(robotA); +////foo4(["roomba", ["vaccum", "mopping"]]); + +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPatternDefaultValues.ts b/tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPatternDefaultValues.ts new file mode 100644 index 00000000000..275135ca520 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPatternDefaultValues.ts @@ -0,0 +1,28 @@ +/// +////declare var console: { +//// log(msg: any): void; +////} +////type Robot = [number, string, string]; +////var robotA: Robot = [1, "mower", "mowing"]; +////function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) { +//// console.log(nameA); +////} +////function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) { +//// console.log(numberB); +////} +////function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) { +//// console.log(nameA2); +////} +////function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) { +//// console.log(robotAInfo); +////} +////foo1(robotA); +////foo1([2, "trimmer", "trimming"]); +////foo2(robotA); +////foo2([2, "trimmer", "trimming"]); +////foo3(robotA); +////foo3([2, "trimmer", "trimming"]); +////foo4(robotA); +////foo4([2, "trimmer", "trimming"]); + +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPatternDefaultValues2.ts b/tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPatternDefaultValues2.ts new file mode 100644 index 00000000000..17d964618d1 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPatternDefaultValues2.ts @@ -0,0 +1,25 @@ +/// +////declare var console: { +//// log(msg: any): void; +////} +////type Robot = [string, string[]]; +////var robotA: Robot = ["trimmer", ["trimming", "edging"]]; +////function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]]) { +//// console.log(skillA); +////} +////function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) { +//// console.log(nameMB); +////} +////function foo3([nameMA = "noName", [ +//// primarySkillA = "primary", +//// secondarySkillA = "secondary" +////] = ["noSkill", "noSkill"]]: Robot) { +//// console.log(nameMA); +////} +////foo1(robotA); +////foo1(["roomba", ["vaccum", "mopping"]]); +////foo2(robotA); +////foo2(["roomba", ["vaccum", "mopping"]]); +////foo3(robotA); +////foo3(["roomba", ["vaccum", "mopping"]]); +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringParameterNestedObjectBindingPattern.ts b/tests/cases/fourslash/breakpointValidationDestructuringParameterNestedObjectBindingPattern.ts new file mode 100644 index 00000000000..34b23d9fca2 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringParameterNestedObjectBindingPattern.ts @@ -0,0 +1,28 @@ +/// +////declare var console: { +//// log(msg: string): void; +////} +////interface Robot { +//// name: string; +//// skills: { +//// primary: string; +//// secondary: string; +//// }; +////} +////var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +////function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) { +//// console.log(primaryA); +////} +////function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) { +//// console.log(secondaryB); +////} +////function foo3({ skills }: Robot) { +//// console.log(skills.primary); +////} +////foo1(robotA); +////foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +////foo2(robotA); +////foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +////foo3(robotA); +////foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +verify.baselineCurrentFileBreakpointLocations(); diff --git a/tests/cases/fourslash/breakpointValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts b/tests/cases/fourslash/breakpointValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts new file mode 100644 index 00000000000..8eab866428b --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts @@ -0,0 +1,41 @@ +/// +////declare var console: { +//// log(msg: string): void; +////} +////interface Robot { +//// name: string; +//// skills: { +//// primary?: string; +//// secondary?: string; +//// }; +////} +////var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +////function foo1( +//// { +//// skills: { +//// primary: primaryA = "primary", +//// secondary: secondaryA = "secondary" +//// } = { primary: "SomeSkill", secondary: "someSkill" } +//// }: Robot = robotA) { +//// console.log(primaryA); +////} +////function foo2( +//// { +//// name: nameC = "name", +//// skills: { +//// primary: primaryB = "primary", +//// secondary: secondaryB = "secondary" +//// } = { primary: "SomeSkill", secondary: "someSkill" } +//// }: Robot = robotA) { +//// console.log(secondaryB); +////} +////function foo3({ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA) { +//// console.log(skills.primary); +////} +////foo1(robotA); +////foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +////foo2(robotA); +////foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +////foo3(robotA); +////foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +verify.baselineCurrentFileBreakpointLocations(); diff --git a/tests/cases/fourslash/breakpointValidationDestructuringParameterObjectBindingPattern.ts b/tests/cases/fourslash/breakpointValidationDestructuringParameterObjectBindingPattern.ts new file mode 100644 index 00000000000..1e3d7c905d4 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringParameterObjectBindingPattern.ts @@ -0,0 +1,26 @@ +/// +////interface Robot { +//// name: string; +//// skill: string; +////} +////declare var console: { +//// log(msg: string): void; +////} +////var hello = "hello"; +////var robotA: Robot = { name: "mower", skill: "mowing" }; +////function foo1({ name: nameA }: Robot) { +//// console.log(nameA); +////} +////function foo2({ name: nameB, skill: skillB }: Robot) { +//// console.log(nameB); +////} +////function foo3({ name }: Robot) { +//// console.log(name); +////} +////foo1(robotA); +////foo1({ name: "Edger", skill: "cutting edges" }); +////foo2(robotA); +////foo2({ name: "Edger", skill: "cutting edges" }); +////foo3(robotA); +////foo3({ name: "Edger", skill: "cutting edges" }); +verify.baselineCurrentFileBreakpointLocations(); diff --git a/tests/cases/fourslash/breakpointValidationDestructuringParameterObjectBindingPatternDefaultValues.ts b/tests/cases/fourslash/breakpointValidationDestructuringParameterObjectBindingPatternDefaultValues.ts new file mode 100644 index 00000000000..bd87e346f6f --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringParameterObjectBindingPatternDefaultValues.ts @@ -0,0 +1,26 @@ +/// +////interface Robot { +//// name?: string; +//// skill?: string; +////} +////declare var console: { +//// log(msg: string): void; +////} +////var hello = "hello"; +////var robotA: Robot = { name: "mower", skill: "mowing" }; +////function foo1({ name: nameA = "" }: Robot = { }) { +//// console.log(nameA); +////} +////function foo2({ name: nameB = "", skill: skillB = "noSkill" }: Robot = {}) { +//// console.log(nameB); +////} +////function foo3({ name = "" }: Robot = {}) { +//// console.log(name); +////} +////foo1(robotA); +////foo1({ name: "Edger", skill: "cutting edges" }); +////foo2(robotA); +////foo2({ name: "Edger", skill: "cutting edges" }); +////foo3(robotA); +////foo3({ name: "Edger", skill: "cutting edges" }); +verify.baselineCurrentFileBreakpointLocations(); From e71b46b25db5388596e5647b7c68cb7d95b5cec7 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 15 Dec 2015 19:21:42 -0800 Subject: [PATCH 066/209] Refactored most of 'isSignatureAssignableTo' to a more general function based on 'signatureRelatedTo'. --- src/compiler/checker.ts | 49 ++++++++++++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 9acd3f321aa..87b7810d4bd 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -4963,6 +4963,10 @@ namespace ts { return checkTypeRelatedTo(source, target, identityRelation, /*errorNode*/ undefined) ? Ternary.True : Ternary.False; } + function compareTypesAssignable(source: Type, target: Type): Ternary { + return checkTypeRelatedTo(source, target, assignableRelation, /*errorNode*/ undefined) ? Ternary.True : Ternary.False; + } + function isTypeSubtypeOf(source: Type, target: Type): boolean { return checkTypeSubtypeOf(source, target, /*errorNode*/ undefined); } @@ -4979,16 +4983,26 @@ namespace ts { return checkTypeRelatedTo(source, target, assignableRelation, errorNode, headMessage, containingMessageChain); } + function isSignatureAssignableTo(source: Signature, + target: Signature, + ignoreReturnTypes: boolean): boolean { + return compareSignaturesRelated(source, target, ignoreReturnTypes, /*errorReporter*/ undefined, compareTypesAssignable) !== Ternary.False; + } + /** * See signatureRelatedTo, compareSignaturesIdentical */ - function isSignatureAssignableTo(source: Signature, target: Signature, ignoreReturnTypes: boolean): boolean { + function compareSignaturesRelated(source: Signature, + target: Signature, + ignoreReturnTypes: boolean, + errorReporter: (d: DiagnosticMessage, arg0?: string, arg1?: string) => void, + compareTypes: (s: Type, t: Type, reportErrors?: boolean) => Ternary): Ternary { // TODO (drosen): De-duplicate code between related functions. if (source === target) { - return true; + return Ternary.True; } if (!target.hasRestParameter && source.minArgumentCount > target.parameters.length) { - return false; + return Ternary.False; } // Spec 1.0 Section 3.8.3 & 3.8.4: @@ -4996,36 +5010,49 @@ namespace ts { source = getErasedSignature(source); target = getErasedSignature(target); + let result = Ternary.True; + const sourceMax = getNumNonRestParameters(source); const targetMax = getNumNonRestParameters(target); const checkCount = getNumParametersToCheckForSignatureRelatability(source, sourceMax, target, targetMax); + const sourceParams = source.parameters; + const targetParams = target.parameters; for (let i = 0; i < checkCount; i++) { - const s = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source); - const t = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target); - const related = isTypeAssignableTo(t, s) || isTypeAssignableTo(s, t); + const s = i < sourceMax ? getTypeOfSymbol(sourceParams[i]) : getRestTypeOfSignature(source); + const t = i < targetMax ? getTypeOfSymbol(targetParams[i]) : getRestTypeOfSignature(target); + const related = compareTypes(t, s, /*reportErrors*/ false) || compareTypes(s, t, !!errorReporter); if (!related) { - return false; + if (errorReporter) { + errorReporter(Diagnostics.Types_of_parameters_0_and_1_are_incompatible, + sourceParams[i < sourceMax ? i : sourceMax].name, + targetParams[i < targetMax ? i : targetMax].name); + } + return Ternary.False; } + result &= related; } if (!ignoreReturnTypes) { const targetReturnType = getReturnTypeOfSignature(target); if (targetReturnType === voidType) { - return true; + return result; } const sourceReturnType = getReturnTypeOfSignature(source); // The following block preserves behavior forbidding boolean returning functions from being assignable to type guard returning functions if (targetReturnType.flags & TypeFlags.PredicateType && (targetReturnType as PredicateType).predicate.kind === TypePredicateKind.Identifier) { if (!(sourceReturnType.flags & TypeFlags.PredicateType)) { - return false; + if (errorReporter) { + errorReporter(Diagnostics.Signature_0_must_have_a_type_predicate, signatureToString(source)); + } + return Ternary.False; } } - return isTypeAssignableTo(sourceReturnType, targetReturnType); + result &= compareTypes(sourceReturnType, targetReturnType, !!errorReporter); } - return true; + return result; } function isImplementationCompatibleWithOverload(implementation: Signature, overload: Signature): boolean { From 5e69332cdadc6e3922df2cef89069180fbe87e22 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 15 Dec 2015 21:17:44 -0800 Subject: [PATCH 067/209] Have 'signatureRelatedTo' just use 'compareSignaturesRelated'. --- src/compiler/checker.ts | 71 ++--------------------------------------- 1 file changed, 2 insertions(+), 69 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 87b7810d4bd..f111ce84cd1 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5735,77 +5735,10 @@ namespace ts { } /** - * See signatureAssignableTo, signatureAssignableTo + * See signatureAssignableTo, compareSignaturesIdentical */ function signatureRelatedTo(source: Signature, target: Signature, reportErrors: boolean): Ternary { - // TODO (drosen): De-duplicate code between related functions. - if (source === target) { - return Ternary.True; - } - if (!target.hasRestParameter && source.minArgumentCount > target.parameters.length) { - return Ternary.False; - } - let sourceMax = source.parameters.length; - let targetMax = target.parameters.length; - let checkCount: number; - if (source.hasRestParameter && target.hasRestParameter) { - checkCount = sourceMax > targetMax ? sourceMax : targetMax; - sourceMax--; - targetMax--; - } - else if (source.hasRestParameter) { - sourceMax--; - checkCount = targetMax; - } - else if (target.hasRestParameter) { - targetMax--; - checkCount = sourceMax; - } - else { - checkCount = sourceMax < targetMax ? sourceMax : targetMax; - } - // Spec 1.0 Section 3.8.3 & 3.8.4: - // M and N (the signatures) are instantiated using type Any as the type argument for all type parameters declared by M and N - source = getErasedSignature(source); - target = getErasedSignature(target); - let result = Ternary.True; - for (let i = 0; i < checkCount; i++) { - const s = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source); - const t = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target); - const saveErrorInfo = errorInfo; - let related = isRelatedTo(s, t, reportErrors); - if (!related) { - related = isRelatedTo(t, s, /*reportErrors*/ false); - if (!related) { - if (reportErrors) { - reportError(Diagnostics.Types_of_parameters_0_and_1_are_incompatible, - source.parameters[i < sourceMax ? i : sourceMax].name, - target.parameters[i < targetMax ? i : targetMax].name); - } - return Ternary.False; - } - errorInfo = saveErrorInfo; - } - result &= related; - } - - const targetReturnType = getReturnTypeOfSignature(target); - if (targetReturnType === voidType) { - return result; - } - const sourceReturnType = getReturnTypeOfSignature(source); - - // The following block preserves behavior forbidding boolean returning functions from being assignable to type guard returning functions - if (targetReturnType.flags & TypeFlags.PredicateType && (targetReturnType as PredicateType).predicate.kind === TypePredicateKind.Identifier) { - if (!(sourceReturnType.flags & TypeFlags.PredicateType)) { - if (reportErrors) { - reportError(Diagnostics.Signature_0_must_have_a_type_predicate, signatureToString(source)); - } - return Ternary.False; - } - } - - return result & isRelatedTo(sourceReturnType, targetReturnType, reportErrors); + return compareSignaturesRelated(source, target, /*ignoreReturnTypes*/ false, reportErrors && reportError, isRelatedTo); } function signaturesIdenticalTo(source: Type, target: Type, kind: SignatureKind): Ternary { From 520884c213fe0b770a3b596d67693c7ceda741eb Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 17 Dec 2015 17:23:19 -0800 Subject: [PATCH 068/209] Accepted regressive baselines. --- .../reference/assignmentCompatWithCallSignatures4.errors.txt | 4 ---- .../assignmentCompatWithConstructSignatures4.errors.txt | 4 ---- .../callSignatureAssignabilityInInheritance3.errors.txt | 4 ---- .../constructSignatureAssignabilityInInheritance3.errors.txt | 4 ---- 4 files changed, 16 deletions(-) diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt index e00d1eea042..bc9a0509fbb 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt @@ -3,8 +3,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'. Types of parameters 'arg2' and 'arg2' are incompatible. Type '{ foo: number; }' is not assignable to type 'Base'. - Types of property 'foo' are incompatible. - Type 'number' is not assignable to type 'string'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(53,9): error TS2322: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'. Types of parameters 'y' and 'y' are incompatible. Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'. @@ -69,8 +67,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'. !!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible. !!! error TS2322: Type '{ foo: number; }' is not assignable to type 'Base'. -!!! error TS2322: Types of property 'foo' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'string'. b8 = a8; // error, { foo: number } and Base are incompatible ~~ !!! error TS2322: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'. diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt index 6cd40f6c8c1..137d481d8e1 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt @@ -3,8 +3,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'. Types of parameters 'arg2' and 'arg2' are incompatible. Type '{ foo: number; }' is not assignable to type 'Base'. - Types of property 'foo' are incompatible. - Type 'number' is not assignable to type 'string'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(53,9): error TS2322: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'. Types of parameters 'y' and 'y' are incompatible. Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'. @@ -83,8 +81,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'. !!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible. !!! error TS2322: Type '{ foo: number; }' is not assignable to type 'Base'. -!!! error TS2322: Types of property 'foo' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'string'. b8 = a8; // error ~~ !!! error TS2322: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'. diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt index 7e9d75b1b41..6120443285b 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt @@ -10,8 +10,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'. Types of parameters 'arg2' and 'arg2' are incompatible. Type '{ foo: number; }' is not assignable to type 'Base'. - Types of property 'foo' are incompatible. - Type 'number' is not assignable to type 'string'. ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts (2 errors) ==== @@ -89,8 +87,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign !!! error TS2430: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'. !!! error TS2430: Types of parameters 'arg2' and 'arg2' are incompatible. !!! error TS2430: Type '{ foo: number; }' is not assignable to type 'Base'. -!!! error TS2430: Types of property 'foo' are incompatible. -!!! error TS2430: Type 'number' is not assignable to type 'string'. a8: (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; // error, type mismatch } diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.errors.txt b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.errors.txt index 8d6273804f7..06fff422fff 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.errors.txt +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.errors.txt @@ -10,8 +10,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/construc Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'. Types of parameters 'arg2' and 'arg2' are incompatible. Type '{ foo: number; }' is not assignable to type 'Base'. - Types of property 'foo' are incompatible. - Type 'number' is not assignable to type 'string'. ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts (2 errors) ==== @@ -79,8 +77,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/construc !!! error TS2430: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'. !!! error TS2430: Types of parameters 'arg2' and 'arg2' are incompatible. !!! error TS2430: Type '{ foo: number; }' is not assignable to type 'Base'. -!!! error TS2430: Types of property 'foo' are incompatible. -!!! error TS2430: Type 'number' is not assignable to type 'string'. a8: new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; // error, type mismatch } From 4e702e5771deae24f7041088825596b02e484251 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 21 Dec 2015 11:39:05 -0800 Subject: [PATCH 069/209] Implement breakpoints in paramters with destructuring binding pattern --- src/services/breakpoints.ts | 24 ++++++++++---- ...uringParameterArrayBindingPattern.baseline | 16 +++++----- ...ringParameterArrayBindingPattern2.baseline | 16 +++++----- ...rArrayBindingPatternDefaultValues.baseline | 28 +++------------- ...ArrayBindingPatternDefaultValues2.baseline | 18 +++-------- ...rameterNestedObjectBindingPattern.baseline | 12 +++---- ...ObjectBindingPatternDefaultValues.baseline | 32 ++----------------- ...ringParameterObjectBindingPattern.baseline | 12 +++---- ...ObjectBindingPatternDefaultValues.baseline | 21 ++---------- 9 files changed, 59 insertions(+), 120 deletions(-) diff --git a/src/services/breakpoints.ts b/src/services/breakpoints.ts index 94fbcb785e8..5b6647e4338 100644 --- a/src/services/breakpoints.ts +++ b/src/services/breakpoints.ts @@ -287,11 +287,15 @@ namespace ts.BreakpointResolver { return spanInPreviousNode(node); } - // initializer of variable declaration go to previous node - if (node.parent.kind === SyntaxKind.VariableDeclaration && - ((node.parent).initializer === node || - isAssignmentOperator(node.kind))) { - return spanInPreviousNode(node); + // initializer of variable/parameter declaration go to previous node + if ((node.parent.kind === SyntaxKind.VariableDeclaration || + node.parent.kind === SyntaxKind.Parameter)) { + const paramOrVarDecl = node.parent; + if (paramOrVarDecl.initializer === node || + paramOrVarDecl.type === node || + isAssignmentOperator(node.kind)) { + return spanInPreviousNode(node); + } } // Default go to parent to set the breakpoint @@ -345,7 +349,11 @@ namespace ts.BreakpointResolver { } function spanInParameterDeclaration(parameter: ParameterDeclaration): TextSpan { - if (canHaveSpanInParameterDeclaration(parameter)) { + if (isBindingPattern(parameter.name)) { + // set breakpoint in binding pattern + return spanInBindingPattern(parameter.name); + } + else if (canHaveSpanInParameterDeclaration(parameter)) { return textSpan(parameter); } else { @@ -562,7 +570,9 @@ namespace ts.BreakpointResolver { function spanInColonToken(node: Node): TextSpan { // Is this : specifying return annotation of the function declaration - if (isFunctionLike(node.parent) || node.parent.kind === SyntaxKind.PropertyAssignment) { + if (isFunctionLike(node.parent) || + node.parent.kind === SyntaxKind.PropertyAssignment || + node.parent.kind === SyntaxKind.Parameter) { return spanInPreviousNode(node); } diff --git a/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern.baseline index c0738652a8e..03f0ee87356 100644 --- a/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern.baseline +++ b/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern.baseline @@ -28,12 +28,12 @@ >:=> (line 7, col 4) to (line 7, col 22) 6 >function foo1([, nameA]: Robot) { - ~~~~~~~~~ => Pos: (147 to 155) SpanInfo: {"start":150,"length":5} + ~~~~~~~~~~~~~~~~~ => Pos: (147 to 163) SpanInfo: {"start":150,"length":5} >nameA >:=> (line 6, col 17) to (line 6, col 22) 6 >function foo1([, nameA]: Robot) { - ~~~~~~~~~~~ => Pos: (156 to 166) SpanInfo: {"start":171,"length":18} + ~~~ => Pos: (164 to 166) SpanInfo: {"start":171,"length":18} >console.log(nameA) >:=> (line 7, col 4) to (line 7, col 22) -------------------------------- @@ -56,12 +56,12 @@ >:=> (line 10, col 4) to (line 10, col 24) 9 >function foo2([numberB]: Robot) { - ~~~~~~~~~ => Pos: (207 to 215) SpanInfo: {"start":208,"length":7} + ~~~~~~~~~~~~~~~~~ => Pos: (207 to 223) SpanInfo: {"start":208,"length":7} >numberB >:=> (line 9, col 15) to (line 9, col 22) 9 >function foo2([numberB]: Robot) { - ~~~~~~~~~~~ => Pos: (216 to 226) SpanInfo: {"start":231,"length":20} + ~~~ => Pos: (224 to 226) SpanInfo: {"start":231,"length":20} >console.log(numberB) >:=> (line 10, col 4) to (line 10, col 24) -------------------------------- @@ -94,12 +94,12 @@ >:=> (line 12, col 25) to (line 12, col 31) 12 >function foo3([numberA2, nameA2, skillA2]: Robot) { - ~~~~~~~~~ => Pos: (287 to 295) SpanInfo: {"start":288,"length":7} + ~~~~~~~~~~~~~~~~~=> Pos: (287 to 303) SpanInfo: {"start":288,"length":7} >skillA2 >:=> (line 12, col 33) to (line 12, col 40) 12 >function foo3([numberA2, nameA2, skillA2]: Robot) { - ~~~~~~~~~~~=> Pos: (296 to 306) SpanInfo: {"start":311,"length":19} + ~~~=> Pos: (304 to 306) SpanInfo: {"start":311,"length":19} >console.log(nameA2) >:=> (line 13, col 4) to (line 13, col 23) -------------------------------- @@ -127,12 +127,12 @@ >:=> (line 15, col 15) to (line 15, col 23) 15 >function foo4([numberA3, ...robotAInfo]: Robot) { - ~~~~~~~~~~~~~~~ => Pos: (358 to 372) SpanInfo: {"start":359,"length":13} + ~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (358 to 380) SpanInfo: {"start":359,"length":13} >...robotAInfo >:=> (line 15, col 25) to (line 15, col 38) 15 >function foo4([numberA3, ...robotAInfo]: Robot) { - ~~~~~~~~~~~=> Pos: (373 to 383) SpanInfo: {"start":388,"length":23} + ~~~=> Pos: (381 to 383) SpanInfo: {"start":388,"length":23} >console.log(robotAInfo) >:=> (line 16, col 4) to (line 16, col 27) -------------------------------- diff --git a/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern2.baseline b/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern2.baseline index 254e3a16bb0..cb9088c99ef 100644 --- a/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern2.baseline +++ b/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern2.baseline @@ -28,12 +28,12 @@ >:=> (line 7, col 4) to (line 7, col 23) 6 >function foo1([, skillA]: Robot) { - ~~~~~~~~~~ => Pos: (162 to 171) SpanInfo: {"start":165,"length":6} + ~~~~~~~~~~~~~~~~~~ => Pos: (162 to 179) SpanInfo: {"start":165,"length":6} >skillA >:=> (line 6, col 17) to (line 6, col 23) 6 >function foo1([, skillA]: Robot) { - ~~~~~~~~~~~ => Pos: (172 to 182) SpanInfo: {"start":187,"length":19} + ~~~ => Pos: (180 to 182) SpanInfo: {"start":187,"length":19} >console.log(skillA) >:=> (line 7, col 4) to (line 7, col 23) -------------------------------- @@ -56,12 +56,12 @@ >:=> (line 10, col 4) to (line 10, col 23) 9 >function foo2([nameMB]: Robot) { - ~~~~~~~~ => Pos: (224 to 231) SpanInfo: {"start":225,"length":6} + ~~~~~~~~~~~~~~~~ => Pos: (224 to 239) SpanInfo: {"start":225,"length":6} >nameMB >:=> (line 9, col 15) to (line 9, col 21) 9 >function foo2([nameMB]: Robot) { - ~~~~~~~~~~~ => Pos: (232 to 242) SpanInfo: {"start":247,"length":19} + ~~~ => Pos: (240 to 242) SpanInfo: {"start":247,"length":19} >console.log(nameMB) >:=> (line 10, col 4) to (line 10, col 23) -------------------------------- @@ -99,12 +99,12 @@ >:=> (line 12, col 39) to (line 12, col 54) 12 >function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) { - ~=> Pos: (325 to 325) SpanInfo: {"start":293,"length":32} + ~~~~~~~~~=> Pos: (325 to 333) SpanInfo: {"start":293,"length":32} >[primarySkillA, secondarySkillA] >:=> (line 12, col 23) to (line 12, col 55) 12 >function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) { - ~~~~~~~~~~~=> Pos: (326 to 336) SpanInfo: {"start":341,"length":19} + ~~~=> Pos: (334 to 336) SpanInfo: {"start":341,"length":19} >console.log(nameMA) >:=> (line 13, col 4) to (line 13, col 23) -------------------------------- @@ -127,12 +127,12 @@ >:=> (line 16, col 4) to (line 16, col 32) 15 >function foo4([...multiRobotAInfo]: Robot) { - ~~~~~~~~~~~~~~~~~~~~ => Pos: (378 to 397) SpanInfo: {"start":379,"length":18} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (378 to 405) SpanInfo: {"start":379,"length":18} >...multiRobotAInfo >:=> (line 15, col 15) to (line 15, col 33) 15 >function foo4([...multiRobotAInfo]: Robot) { - ~~~~~~~~~~~ => Pos: (398 to 408) SpanInfo: {"start":413,"length":28} + ~~~ => Pos: (406 to 408) SpanInfo: {"start":413,"length":28} >console.log(multiRobotAInfo) >:=> (line 16, col 4) to (line 16, col 32) -------------------------------- diff --git a/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues.baseline index 4208b8de46b..d071692b0f2 100644 --- a/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues.baseline +++ b/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues.baseline @@ -28,16 +28,11 @@ >:=> (line 7, col 4) to (line 7, col 22) 6 >function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) { - ~~~~~~~~~~~~~~~~~~~~ => Pos: (147 to 166) SpanInfo: {"start":150,"length":16} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (147 to 198) SpanInfo: {"start":150,"length":16} >nameA = "noName" >:=> (line 6, col 17) to (line 6, col 33) 6 >function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (167 to 198) SpanInfo: {"start":147,"length":51} - >[, nameA = "noName"]: Robot = [-1, "name", "skill"] - >:=> (line 6, col 14) to (line 6, col 65) -6 >function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) { - ~~~=> Pos: (199 to 201) SpanInfo: {"start":206,"length":18} >console.log(nameA) >:=> (line 7, col 4) to (line 7, col 22) @@ -61,16 +56,11 @@ >:=> (line 10, col 4) to (line 10, col 24) 9 >function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) { - ~~~~~~~~~~~~~~ => Pos: (242 to 255) SpanInfo: {"start":243,"length":12} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (242 to 287) SpanInfo: {"start":243,"length":12} >numberB = -1 >:=> (line 9, col 15) to (line 9, col 27) 9 >function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (256 to 287) SpanInfo: {"start":242,"length":45} - >[numberB = -1]: Robot = [-1, "name", "skill"] - >:=> (line 9, col 14) to (line 9, col 59) -9 >function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) { - ~~~=> Pos: (288 to 290) SpanInfo: {"start":295,"length":20} >console.log(numberB) >:=> (line 10, col 4) to (line 10, col 24) @@ -104,16 +94,11 @@ >:=> (line 12, col 30) to (line 12, col 45) 12 >function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) { - ~~~~~~~~~~~~~~~~~~~=> Pos: (365 to 383) SpanInfo: {"start":366,"length":17} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (365 to 415) SpanInfo: {"start":366,"length":17} >skillA2 = "skill" >:=> (line 12, col 47) to (line 12, col 64) 12 >function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (384 to 415) SpanInfo: {"start":333,"length":82} - >[numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"] - >:=> (line 12, col 14) to (line 12, col 96) -12 >function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) { - ~~~=> Pos: (416 to 418) SpanInfo: {"start":423,"length":19} >console.log(nameA2) >:=> (line 13, col 4) to (line 13, col 23) @@ -142,16 +127,11 @@ >:=> (line 15, col 15) to (line 15, col 28) 15 >function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) { - ~~~~~~~~~~~~~~~ => Pos: (475 to 489) SpanInfo: {"start":476,"length":13} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (475 to 521) SpanInfo: {"start":476,"length":13} >...robotAInfo >:=> (line 15, col 30) to (line 15, col 43) 15 >function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (490 to 521) SpanInfo: {"start":460,"length":61} - >[numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"] - >:=> (line 15, col 14) to (line 15, col 75) -15 >function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) { - ~~~=> Pos: (522 to 524) SpanInfo: {"start":529,"length":23} >console.log(robotAInfo) >:=> (line 16, col 4) to (line 16, col 27) diff --git a/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues2.baseline b/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues2.baseline index b2c63f3b2be..34b41cc1218 100644 --- a/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues2.baseline +++ b/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues2.baseline @@ -28,16 +28,11 @@ >:=> (line 7, col 4) to (line 7, col 23) 6 >function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (154 to 188) SpanInfo: {"start":157,"length":31} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (154 to 228) SpanInfo: {"start":157,"length":31} >skillA = ["noSkill", "noSkill"] >:=> (line 6, col 17) to (line 6, col 48) 6 >function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (189 to 228) SpanInfo: {"start":154,"length":74} - >[, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]] - >:=> (line 6, col 14) to (line 6, col 88) -6 >function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]]) { - ~~~=> Pos: (229 to 231) SpanInfo: {"start":236,"length":19} >console.log(skillA) >:=> (line 7, col 4) to (line 7, col 23) @@ -61,16 +56,11 @@ >:=> (line 10, col 4) to (line 10, col 23) 9 >function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) { - ~~~~~~~~~~~~~~~~~~~ => Pos: (273 to 291) SpanInfo: {"start":274,"length":17} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (273 to 332) SpanInfo: {"start":274,"length":17} >nameMB = "noName" >:=> (line 9, col 15) to (line 9, col 32) 9 >function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (292 to 332) SpanInfo: {"start":273,"length":59} - >[nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]] - >:=> (line 9, col 14) to (line 9, col 73) -9 >function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) { - ~~~=> Pos: (333 to 335) SpanInfo: {"start":340,"length":19} >console.log(nameMB) >:=> (line 10, col 4) to (line 10, col 23) @@ -122,7 +112,7 @@ >:=> (line 14, col 4) to (line 14, col 33) 15 >] = ["noSkill", "noSkill"]]: Robot) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (465 to 490) SpanInfo: {"start":397,"length":93} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (465 to 498) SpanInfo: {"start":397,"length":93} >[ > primarySkillA = "primary", > secondarySkillA = "secondary" @@ -130,7 +120,7 @@ >:=> (line 12, col 34) to (line 15, col 26) 15 >] = ["noSkill", "noSkill"]]: Robot) { - ~~~~~~~~~~~ => Pos: (491 to 501) SpanInfo: {"start":506,"length":19} + ~~~ => Pos: (499 to 501) SpanInfo: {"start":506,"length":19} >console.log(nameMA) >:=> (line 16, col 4) to (line 16, col 23) -------------------------------- diff --git a/tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPattern.baseline index 3c17d60d1a4..be773df4530 100644 --- a/tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPattern.baseline +++ b/tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPattern.baseline @@ -67,12 +67,12 @@ >:=> (line 12, col 45) to (line 12, col 66) 12 >function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) { - ~~=> Pos: (321 to 322) SpanInfo: {"start":269,"length":52} + ~~~~~~~~~~=> Pos: (321 to 330) SpanInfo: {"start":269,"length":52} >skills: { primary: primaryA, secondary: secondaryA } >:=> (line 12, col 16) to (line 12, col 68) 12 >function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) { - ~~~~~~~~~~~=> Pos: (323 to 333) SpanInfo: {"start":338,"length":21} + ~~~=> Pos: (331 to 333) SpanInfo: {"start":338,"length":21} >console.log(primaryA) >:=> (line 13, col 4) to (line 13, col 25) -------------------------------- @@ -115,12 +115,12 @@ >:=> (line 15, col 58) to (line 15, col 79) 15 >function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) { - ~~=> Pos: (444 to 445) SpanInfo: {"start":392,"length":52} + ~~~~~~~~~~=> Pos: (444 to 453) SpanInfo: {"start":392,"length":52} >skills: { primary: primaryB, secondary: secondaryB } >:=> (line 15, col 29) to (line 15, col 81) 15 >function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) { - ~~~~~~~~~~~=> Pos: (446 to 456) SpanInfo: {"start":461,"length":23} + ~~~=> Pos: (454 to 456) SpanInfo: {"start":461,"length":23} >console.log(secondaryB) >:=> (line 16, col 4) to (line 16, col 27) -------------------------------- @@ -143,12 +143,12 @@ >:=> (line 19, col 4) to (line 19, col 31) 18 >function foo3({ skills }: Robot) { - ~~~~~~~~~~ => Pos: (502 to 511) SpanInfo: {"start":504,"length":6} + ~~~~~~~~~~~~~~~~~~ => Pos: (502 to 519) SpanInfo: {"start":504,"length":6} >skills >:=> (line 18, col 16) to (line 18, col 22) 18 >function foo3({ skills }: Robot) { - ~~~~~~~~~~~ => Pos: (512 to 522) SpanInfo: {"start":527,"length":27} + ~~~ => Pos: (520 to 522) SpanInfo: {"start":527,"length":27} >console.log(skills.primary) >:=> (line 19, col 4) to (line 19, col 31) -------------------------------- diff --git a/tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPatternDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPatternDefaultValues.baseline index 9dd4b8dc5b1..c06c9b56fe5 100644 --- a/tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPatternDefaultValues.baseline +++ b/tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPatternDefaultValues.baseline @@ -102,7 +102,7 @@ -------------------------------- 18 > }: Robot = robotA) { - ~~~~~ => Pos: (446 to 450) SpanInfo: {"start":284,"length":161} + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (446 to 467) SpanInfo: {"start":284,"length":161} >skills: { > primary: primaryA = "primary", > secondary: secondaryA = "secondary" @@ -110,16 +110,6 @@ >:=> (line 14, col 8) to (line 17, col 60) 18 > }: Robot = robotA) { - ~~~~~~~~~~~~~~~~~ => Pos: (451 to 467) SpanInfo: {"start":274,"length":193} - >{ - > skills: { - > primary: primaryA = "primary", - > secondary: secondaryA = "secondary" - > } = { primary: "SomeSkill", secondary: "someSkill" } - > }: Robot = robotA - >:=> (line 13, col 4) to (line 18, col 21) -18 > }: Robot = robotA) { - ~~~ => Pos: (468 to 470) SpanInfo: {"start":475,"length":21} >console.log(primaryA) >:=> (line 19, col 4) to (line 19, col 25) @@ -196,7 +186,7 @@ -------------------------------- 28 > }: Robot = robotA) { - ~~~~~ => Pos: (721 to 725) SpanInfo: {"start":559,"length":161} + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (721 to 742) SpanInfo: {"start":559,"length":161} >skills: { > primary: primaryB = "primary", > secondary: secondaryB = "secondary" @@ -204,17 +194,6 @@ >:=> (line 24, col 8) to (line 27, col 60) 28 > }: Robot = robotA) { - ~~~~~~~~~~~~~~~~~ => Pos: (726 to 742) SpanInfo: {"start":519,"length":223} - >{ - > name: nameC = "name", - > skills: { - > primary: primaryB = "primary", - > secondary: secondaryB = "secondary" - > } = { primary: "SomeSkill", secondary: "someSkill" } - > }: Robot = robotA - >:=> (line 22, col 4) to (line 28, col 21) -28 > }: Robot = robotA) { - ~~~ => Pos: (743 to 745) SpanInfo: {"start":750,"length":23} >console.log(secondaryB) >:=> (line 29, col 4) to (line 29, col 27) @@ -238,16 +217,11 @@ >:=> (line 32, col 4) to (line 32, col 31) 31 >function foo3({ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (791 to 852) SpanInfo: {"start":793,"length":57} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (791 to 869) SpanInfo: {"start":793,"length":57} >skills = { primary: "SomeSkill", secondary: "someSkill" } >:=> (line 31, col 16) to (line 31, col 73) 31 >function foo3({ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA) { - ~~~~~~~~~~~~~~~~~=> Pos: (853 to 869) SpanInfo: {"start":791,"length":78} - >{ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA - >:=> (line 31, col 14) to (line 31, col 92) -31 >function foo3({ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA) { - ~~~=> Pos: (870 to 872) SpanInfo: {"start":877,"length":27} >console.log(skills.primary) >:=> (line 32, col 4) to (line 32, col 31) diff --git a/tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPattern.baseline index 6279328ed0c..21f11f320ab 100644 --- a/tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPattern.baseline +++ b/tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPattern.baseline @@ -46,12 +46,12 @@ >:=> (line 11, col 4) to (line 11, col 22) 10 >function foo1({ name: nameA }: Robot) { - ~~~~~~~~~~~~~~~ => Pos: (201 to 215) SpanInfo: {"start":203,"length":11} + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (201 to 223) SpanInfo: {"start":203,"length":11} >name: nameA >:=> (line 10, col 16) to (line 10, col 27) 10 >function foo1({ name: nameA }: Robot) { - ~~~~~~~~~~~ => Pos: (216 to 226) SpanInfo: {"start":231,"length":18} + ~~~ => Pos: (224 to 226) SpanInfo: {"start":231,"length":18} >console.log(nameA) >:=> (line 11, col 4) to (line 11, col 22) -------------------------------- @@ -79,12 +79,12 @@ >:=> (line 13, col 16) to (line 13, col 27) 13 >function foo2({ name: nameB, skill: skillB }: Robot) { - ~~~~~~~~~~~~~~~~ => Pos: (281 to 296) SpanInfo: {"start":282,"length":13} + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (281 to 304) SpanInfo: {"start":282,"length":13} >skill: skillB >:=> (line 13, col 29) to (line 13, col 42) 13 >function foo2({ name: nameB, skill: skillB }: Robot) { - ~~~~~~~~~~~=> Pos: (297 to 307) SpanInfo: {"start":312,"length":18} + ~~~=> Pos: (305 to 307) SpanInfo: {"start":312,"length":18} >console.log(nameB) >:=> (line 14, col 4) to (line 14, col 22) -------------------------------- @@ -107,12 +107,12 @@ >:=> (line 17, col 4) to (line 17, col 21) 16 >function foo3({ name }: Robot) { - ~~~~~~~~ => Pos: (348 to 355) SpanInfo: {"start":350,"length":4} + ~~~~~~~~~~~~~~~~ => Pos: (348 to 363) SpanInfo: {"start":350,"length":4} >name >:=> (line 16, col 16) to (line 16, col 20) 16 >function foo3({ name }: Robot) { - ~~~~~~~~~~~ => Pos: (356 to 366) SpanInfo: {"start":371,"length":17} + ~~~ => Pos: (364 to 366) SpanInfo: {"start":371,"length":17} >console.log(name) >:=> (line 17, col 4) to (line 17, col 21) -------------------------------- diff --git a/tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPatternDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPatternDefaultValues.baseline index a2392f5794c..6cb9b39c0d3 100644 --- a/tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPatternDefaultValues.baseline +++ b/tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPatternDefaultValues.baseline @@ -46,16 +46,11 @@ >:=> (line 11, col 4) to (line 11, col 22) 10 >function foo1({ name: nameA = "" }: Robot = { }) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (203 to 230) SpanInfo: {"start":205,"length":24} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (203 to 244) SpanInfo: {"start":205,"length":24} >name: nameA = "" >:=> (line 10, col 16) to (line 10, col 40) 10 >function foo1({ name: nameA = "" }: Robot = { }) { - ~~~~~~~~~~~~~~=> Pos: (231 to 244) SpanInfo: {"start":203,"length":41} - >{ name: nameA = "" }: Robot = { } - >:=> (line 10, col 14) to (line 10, col 55) -10 >function foo1({ name: nameA = "" }: Robot = { }) { - ~~~=> Pos: (245 to 247) SpanInfo: {"start":252,"length":18} >console.log(nameA) >:=> (line 11, col 4) to (line 11, col 22) @@ -84,16 +79,11 @@ >:=> (line 13, col 16) to (line 13, col 40) 13 >function foo2({ name: nameB = "", skill: skillB = "noSkill" }: Robot = {}) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (315 to 342) SpanInfo: {"start":316,"length":25} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (315 to 355) SpanInfo: {"start":316,"length":25} >skill: skillB = "noSkill" >:=> (line 13, col 42) to (line 13, col 67) 13 >function foo2({ name: nameB = "", skill: skillB = "noSkill" }: Robot = {}) { - ~~~~~~~~~~~~~=> Pos: (343 to 355) SpanInfo: {"start":288,"length":67} - >{ name: nameB = "", skill: skillB = "noSkill" }: Robot = {} - >:=> (line 13, col 14) to (line 13, col 81) -13 >function foo2({ name: nameB = "", skill: skillB = "noSkill" }: Robot = {}) { - ~~~=> Pos: (356 to 358) SpanInfo: {"start":363,"length":18} >console.log(nameB) >:=> (line 14, col 4) to (line 14, col 22) @@ -117,16 +107,11 @@ >:=> (line 17, col 4) to (line 17, col 21) 16 >function foo3({ name = "" }: Robot = {}) { - ~~~~~~~~~~~~~~~~~~~~~ => Pos: (399 to 419) SpanInfo: {"start":401,"length":17} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (399 to 432) SpanInfo: {"start":401,"length":17} >name = "" >:=> (line 16, col 16) to (line 16, col 33) 16 >function foo3({ name = "" }: Robot = {}) { - ~~~~~~~~~~~~~=> Pos: (420 to 432) SpanInfo: {"start":399,"length":33} - >{ name = "" }: Robot = {} - >:=> (line 16, col 14) to (line 16, col 47) -16 >function foo3({ name = "" }: Robot = {}) { - ~~~=> Pos: (433 to 435) SpanInfo: {"start":440,"length":17} >console.log(name) >:=> (line 17, col 4) to (line 17, col 21) From 39dbad862cad8123bfe7f58a53cbe53efc82b16d Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 21 Dec 2015 11:47:57 -0800 Subject: [PATCH 070/209] Test cases for breakpoint in destructuring of For Initializers --- ...structuringForArrayBindingPattern.baseline | 1064 ++++++++++++++++ ...rArrayBindingPatternDefaultValues.baseline | 1077 +++++++++++++++++ ...tructuringForObjectBindingPattern.baseline | 653 ++++++++++ ...ObjectBindingPatternDefaultValues.baseline | 857 +++++++++++++ ...tionDestructuringForArrayBindingPattern.ts | 95 ++ ...ringForArrayBindingPatternDefaultValues.ts | 104 ++ ...ionDestructuringForObjectBindingPattern.ts | 64 + ...ingForObjectBindingPatternDefaultValues.ts | 96 ++ 8 files changed, 4010 insertions(+) create mode 100644 tests/baselines/reference/bpSpanDestructuringForArrayBindingPattern.baseline create mode 100644 tests/baselines/reference/bpSpanDestructuringForArrayBindingPatternDefaultValues.baseline create mode 100644 tests/baselines/reference/bpSpanDestructuringForObjectBindingPattern.baseline create mode 100644 tests/baselines/reference/bpSpanDestructuringForObjectBindingPatternDefaultValues.baseline create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringForArrayBindingPattern.ts create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringForArrayBindingPatternDefaultValues.ts create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringForObjectBindingPattern.ts create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringForObjectBindingPatternDefaultValues.ts diff --git a/tests/baselines/reference/bpSpanDestructuringForArrayBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringForArrayBindingPattern.baseline new file mode 100644 index 00000000000..a9de03bb74b --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringForArrayBindingPattern.baseline @@ -0,0 +1,1064 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: any): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (48 to 49) SpanInfo: undefined +-------------------------------- +4 >type Robot = [number, string, string]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 88) SpanInfo: undefined +-------------------------------- +5 >type MultiSkilledRobot = [string, [string, string]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (89 to 141) SpanInfo: undefined +-------------------------------- +6 > + + ~ => Pos: (142 to 142) SpanInfo: undefined +-------------------------------- +7 >let robotA: Robot = [1, "mower", "mowing"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (143 to 186) SpanInfo: {"start":143,"length":42} + >let robotA: Robot = [1, "mower", "mowing"] + >:=> (line 7, col 0) to (line 7, col 42) +-------------------------------- +8 >function getRobot() { + + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (187 to 208) SpanInfo: {"start":213,"length":13} + >return robotA + >:=> (line 9, col 4) to (line 9, col 17) +-------------------------------- +9 > return robotA; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (209 to 227) SpanInfo: {"start":213,"length":13} + >return robotA + >:=> (line 9, col 4) to (line 9, col 17) +-------------------------------- +10 >} + + ~~ => Pos: (228 to 229) SpanInfo: {"start":228,"length":1} + >} + >:=> (line 10, col 0) to (line 10, col 1) +-------------------------------- +11 > + + ~ => Pos: (230 to 230) SpanInfo: undefined +-------------------------------- +12 >let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (231 to 294) SpanInfo: {"start":231,"length":62} + >let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]] + >:=> (line 12, col 0) to (line 12, col 62) +-------------------------------- +13 >let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (295 to 368) SpanInfo: {"start":295,"length":72} + >let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]] + >:=> (line 13, col 0) to (line 13, col 72) +-------------------------------- +14 >function getMultiRobot() { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (369 to 395) SpanInfo: {"start":400,"length":18} + >return multiRobotA + >:=> (line 15, col 4) to (line 15, col 22) +-------------------------------- +15 > return multiRobotA; + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (396 to 419) SpanInfo: {"start":400,"length":18} + >return multiRobotA + >:=> (line 15, col 4) to (line 15, col 22) +-------------------------------- +16 >} + + ~~ => Pos: (420 to 421) SpanInfo: {"start":420,"length":1} + >} + >:=> (line 16, col 0) to (line 16, col 1) +-------------------------------- +17 > + + ~ => Pos: (422 to 422) SpanInfo: undefined +-------------------------------- +18 >for (let [, nameA] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (423 to 450) SpanInfo: {"start":435,"length":5} + >nameA + >:=> (line 18, col 12) to (line 18, col 17) +18 >for (let [, nameA] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (451 to 457) SpanInfo: {"start":452,"length":5} + >i = 0 + >:=> (line 18, col 29) to (line 18, col 34) +18 >for (let [, nameA] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (458 to 464) SpanInfo: {"start":459,"length":5} + >i < 1 + >:=> (line 18, col 36) to (line 18, col 41) +18 >for (let [, nameA] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (465 to 472) SpanInfo: {"start":466,"length":3} + >i++ + >:=> (line 18, col 43) to (line 18, col 46) +-------------------------------- +19 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (473 to 496) SpanInfo: {"start":477,"length":18} + >console.log(nameA) + >:=> (line 19, col 4) to (line 19, col 22) +-------------------------------- +20 >} + + ~~ => Pos: (497 to 498) SpanInfo: {"start":477,"length":18} + >console.log(nameA) + >:=> (line 19, col 4) to (line 19, col 22) +-------------------------------- +21 >for (let [, nameA] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (499 to 518) SpanInfo: {"start":511,"length":5} + >nameA + >:=> (line 21, col 12) to (line 21, col 17) +21 >for (let [, nameA] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~ => Pos: (519 to 530) SpanInfo: {"start":520,"length":10} + >getRobot() + >:=> (line 21, col 21) to (line 21, col 31) +21 >for (let [, nameA] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (531 to 537) SpanInfo: {"start":532,"length":5} + >i = 0 + >:=> (line 21, col 33) to (line 21, col 38) +21 >for (let [, nameA] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (538 to 544) SpanInfo: {"start":539,"length":5} + >i < 1 + >:=> (line 21, col 40) to (line 21, col 45) +21 >for (let [, nameA] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (545 to 552) SpanInfo: {"start":546,"length":3} + >i++ + >:=> (line 21, col 47) to (line 21, col 50) +-------------------------------- +22 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (553 to 576) SpanInfo: {"start":557,"length":18} + >console.log(nameA) + >:=> (line 22, col 4) to (line 22, col 22) +-------------------------------- +23 >} + + ~~ => Pos: (577 to 578) SpanInfo: {"start":557,"length":18} + >console.log(nameA) + >:=> (line 22, col 4) to (line 22, col 22) +-------------------------------- +24 >for (let [, nameA] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (579 to 626) SpanInfo: {"start":591,"length":5} + >nameA + >:=> (line 24, col 12) to (line 24, col 17) +24 >for (let [, nameA] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (627 to 633) SpanInfo: {"start":628,"length":5} + >i = 0 + >:=> (line 24, col 49) to (line 24, col 54) +24 >for (let [, nameA] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (634 to 640) SpanInfo: {"start":635,"length":5} + >i < 1 + >:=> (line 24, col 56) to (line 24, col 61) +24 >for (let [, nameA] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (641 to 648) SpanInfo: {"start":642,"length":3} + >i++ + >:=> (line 24, col 63) to (line 24, col 66) +-------------------------------- +25 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (649 to 672) SpanInfo: {"start":653,"length":18} + >console.log(nameA) + >:=> (line 25, col 4) to (line 25, col 22) +-------------------------------- +26 >} + + ~~ => Pos: (673 to 674) SpanInfo: {"start":653,"length":18} + >console.log(nameA) + >:=> (line 25, col 4) to (line 25, col 22) +-------------------------------- +27 >for (let [, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~ => Pos: (675 to 685) SpanInfo: {"start":687,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 27, col 12) to (line 27, col 44) +27 >for (let [, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~ => Pos: (686 to 701) SpanInfo: {"start":688,"length":13} + >primarySkillA + >:=> (line 27, col 13) to (line 27, col 26) +27 >for (let [, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~ => Pos: (702 to 718) SpanInfo: {"start":703,"length":15} + >secondarySkillA + >:=> (line 27, col 28) to (line 27, col 43) +27 >for (let [, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~=> Pos: (719 to 734) SpanInfo: {"start":687,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 27, col 12) to (line 27, col 44) +27 >for (let [, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (735 to 741) SpanInfo: {"start":736,"length":5} + >i = 0 + >:=> (line 27, col 61) to (line 27, col 66) +27 >for (let [, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (742 to 748) SpanInfo: {"start":743,"length":5} + >i < 1 + >:=> (line 27, col 68) to (line 27, col 73) +27 >for (let [, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (749 to 756) SpanInfo: {"start":750,"length":3} + >i++ + >:=> (line 27, col 75) to (line 27, col 78) +-------------------------------- +28 > console.log(primarySkillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (757 to 788) SpanInfo: {"start":761,"length":26} + >console.log(primarySkillA) + >:=> (line 28, col 4) to (line 28, col 30) +-------------------------------- +29 >} + + ~~ => Pos: (789 to 790) SpanInfo: {"start":761,"length":26} + >console.log(primarySkillA) + >:=> (line 28, col 4) to (line 28, col 30) +-------------------------------- +30 >for (let [, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~ => Pos: (791 to 801) SpanInfo: {"start":803,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 30, col 12) to (line 30, col 44) +30 >for (let [, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~ => Pos: (802 to 817) SpanInfo: {"start":804,"length":13} + >primarySkillA + >:=> (line 30, col 13) to (line 30, col 26) +30 >for (let [, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~ => Pos: (818 to 834) SpanInfo: {"start":819,"length":15} + >secondarySkillA + >:=> (line 30, col 28) to (line 30, col 43) +30 >for (let [, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~=> Pos: (835 to 837) SpanInfo: {"start":803,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 30, col 12) to (line 30, col 44) +30 >for (let [, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~=> Pos: (838 to 854) SpanInfo: {"start":839,"length":15} + >getMultiRobot() + >:=> (line 30, col 48) to (line 30, col 63) +30 >for (let [, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (855 to 861) SpanInfo: {"start":856,"length":5} + >i = 0 + >:=> (line 30, col 65) to (line 30, col 70) +30 >for (let [, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (862 to 868) SpanInfo: {"start":863,"length":5} + >i < 1 + >:=> (line 30, col 72) to (line 30, col 77) +30 >for (let [, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (869 to 876) SpanInfo: {"start":870,"length":3} + >i++ + >:=> (line 30, col 79) to (line 30, col 82) +-------------------------------- +31 > console.log(primarySkillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (877 to 908) SpanInfo: {"start":881,"length":26} + >console.log(primarySkillA) + >:=> (line 31, col 4) to (line 31, col 30) +-------------------------------- +32 >} + + ~~ => Pos: (909 to 910) SpanInfo: {"start":881,"length":26} + >console.log(primarySkillA) + >:=> (line 31, col 4) to (line 31, col 30) +-------------------------------- +33 >for (let [, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~~~~ => Pos: (911 to 921) SpanInfo: {"start":923,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 33, col 12) to (line 33, col 44) +33 >for (let [, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~ => Pos: (922 to 937) SpanInfo: {"start":924,"length":13} + >primarySkillA + >:=> (line 33, col 13) to (line 33, col 26) +33 >for (let [, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~ => Pos: (938 to 954) SpanInfo: {"start":939,"length":15} + >secondarySkillA + >:=> (line 33, col 28) to (line 33, col 43) +33 >for (let [, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (955 to 994) SpanInfo: {"start":923,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 33, col 12) to (line 33, col 44) +33 >for (let [, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (995 to 1001) SpanInfo: {"start":996,"length":5} + >i = 0 + >:=> (line 33, col 85) to (line 33, col 90) +33 >for (let [, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1002 to 1008) SpanInfo: {"start":1003,"length":5} + >i < 1 + >:=> (line 33, col 92) to (line 33, col 97) +33 >for (let [, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1009 to 1016) SpanInfo: {"start":1010,"length":3} + >i++ + >:=> (line 33, col 99) to (line 33, col 102) +-------------------------------- +34 > console.log(primarySkillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1017 to 1048) SpanInfo: {"start":1021,"length":26} + >console.log(primarySkillA) + >:=> (line 34, col 4) to (line 34, col 30) +-------------------------------- +35 >} + + ~~ => Pos: (1049 to 1050) SpanInfo: {"start":1021,"length":26} + >console.log(primarySkillA) + >:=> (line 34, col 4) to (line 34, col 30) +-------------------------------- +36 > + + ~ => Pos: (1051 to 1051) SpanInfo: undefined +-------------------------------- +37 >for (let [numberB] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1052 to 1079) SpanInfo: {"start":1062,"length":7} + >numberB + >:=> (line 37, col 10) to (line 37, col 17) +37 >for (let [numberB] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1080 to 1086) SpanInfo: {"start":1081,"length":5} + >i = 0 + >:=> (line 37, col 29) to (line 37, col 34) +37 >for (let [numberB] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1087 to 1093) SpanInfo: {"start":1088,"length":5} + >i < 1 + >:=> (line 37, col 36) to (line 37, col 41) +37 >for (let [numberB] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1094 to 1101) SpanInfo: {"start":1095,"length":3} + >i++ + >:=> (line 37, col 43) to (line 37, col 46) +-------------------------------- +38 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1102 to 1127) SpanInfo: {"start":1106,"length":20} + >console.log(numberB) + >:=> (line 38, col 4) to (line 38, col 24) +-------------------------------- +39 >} + + ~~ => Pos: (1128 to 1129) SpanInfo: {"start":1106,"length":20} + >console.log(numberB) + >:=> (line 38, col 4) to (line 38, col 24) +-------------------------------- +40 >for (let [numberB] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (1130 to 1149) SpanInfo: {"start":1140,"length":7} + >numberB + >:=> (line 40, col 10) to (line 40, col 17) +40 >for (let [numberB] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~ => Pos: (1150 to 1161) SpanInfo: {"start":1151,"length":10} + >getRobot() + >:=> (line 40, col 21) to (line 40, col 31) +40 >for (let [numberB] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1162 to 1168) SpanInfo: {"start":1163,"length":5} + >i = 0 + >:=> (line 40, col 33) to (line 40, col 38) +40 >for (let [numberB] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1169 to 1175) SpanInfo: {"start":1170,"length":5} + >i < 1 + >:=> (line 40, col 40) to (line 40, col 45) +40 >for (let [numberB] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1176 to 1183) SpanInfo: {"start":1177,"length":3} + >i++ + >:=> (line 40, col 47) to (line 40, col 50) +-------------------------------- +41 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1184 to 1209) SpanInfo: {"start":1188,"length":20} + >console.log(numberB) + >:=> (line 41, col 4) to (line 41, col 24) +-------------------------------- +42 >} + + ~~ => Pos: (1210 to 1211) SpanInfo: {"start":1188,"length":20} + >console.log(numberB) + >:=> (line 41, col 4) to (line 41, col 24) +-------------------------------- +43 >for (let [numberB] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1212 to 1259) SpanInfo: {"start":1222,"length":7} + >numberB + >:=> (line 43, col 10) to (line 43, col 17) +43 >for (let [numberB] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1260 to 1266) SpanInfo: {"start":1261,"length":5} + >i = 0 + >:=> (line 43, col 49) to (line 43, col 54) +43 >for (let [numberB] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1267 to 1273) SpanInfo: {"start":1268,"length":5} + >i < 1 + >:=> (line 43, col 56) to (line 43, col 61) +43 >for (let [numberB] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1274 to 1281) SpanInfo: {"start":1275,"length":3} + >i++ + >:=> (line 43, col 63) to (line 43, col 66) +-------------------------------- +44 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1282 to 1307) SpanInfo: {"start":1286,"length":20} + >console.log(numberB) + >:=> (line 44, col 4) to (line 44, col 24) +-------------------------------- +45 >} + + ~~ => Pos: (1308 to 1309) SpanInfo: {"start":1286,"length":20} + >console.log(numberB) + >:=> (line 44, col 4) to (line 44, col 24) +-------------------------------- +46 >for (let [nameB] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1310 to 1340) SpanInfo: {"start":1320,"length":5} + >nameB + >:=> (line 46, col 10) to (line 46, col 15) +46 >for (let [nameB] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1341 to 1347) SpanInfo: {"start":1342,"length":5} + >i = 0 + >:=> (line 46, col 32) to (line 46, col 37) +46 >for (let [nameB] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1348 to 1354) SpanInfo: {"start":1349,"length":5} + >i < 1 + >:=> (line 46, col 39) to (line 46, col 44) +46 >for (let [nameB] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1355 to 1362) SpanInfo: {"start":1356,"length":3} + >i++ + >:=> (line 46, col 46) to (line 46, col 49) +-------------------------------- +47 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1363 to 1386) SpanInfo: {"start":1367,"length":18} + >console.log(nameB) + >:=> (line 47, col 4) to (line 47, col 22) +-------------------------------- +48 >} + + ~~ => Pos: (1387 to 1388) SpanInfo: {"start":1367,"length":18} + >console.log(nameB) + >:=> (line 47, col 4) to (line 47, col 22) +-------------------------------- +49 >for (let [nameB] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~ => Pos: (1389 to 1406) SpanInfo: {"start":1399,"length":5} + >nameB + >:=> (line 49, col 10) to (line 49, col 15) +49 >for (let [nameB] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~ => Pos: (1407 to 1423) SpanInfo: {"start":1408,"length":15} + >getMultiRobot() + >:=> (line 49, col 19) to (line 49, col 34) +49 >for (let [nameB] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1424 to 1430) SpanInfo: {"start":1425,"length":5} + >i = 0 + >:=> (line 49, col 36) to (line 49, col 41) +49 >for (let [nameB] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1431 to 1437) SpanInfo: {"start":1432,"length":5} + >i < 1 + >:=> (line 49, col 43) to (line 49, col 48) +49 >for (let [nameB] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1438 to 1445) SpanInfo: {"start":1439,"length":3} + >i++ + >:=> (line 49, col 50) to (line 49, col 53) +-------------------------------- +50 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1446 to 1469) SpanInfo: {"start":1450,"length":18} + >console.log(nameB) + >:=> (line 50, col 4) to (line 50, col 22) +-------------------------------- +51 >} + + ~~ => Pos: (1470 to 1471) SpanInfo: {"start":1450,"length":18} + >console.log(nameB) + >:=> (line 50, col 4) to (line 50, col 22) +-------------------------------- +52 >for (let [nameB] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1472 to 1526) SpanInfo: {"start":1482,"length":5} + >nameB + >:=> (line 52, col 10) to (line 52, col 15) +52 >for (let [nameB] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1527 to 1533) SpanInfo: {"start":1528,"length":5} + >i = 0 + >:=> (line 52, col 56) to (line 52, col 61) +52 >for (let [nameB] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1534 to 1540) SpanInfo: {"start":1535,"length":5} + >i < 1 + >:=> (line 52, col 63) to (line 52, col 68) +52 >for (let [nameB] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1541 to 1548) SpanInfo: {"start":1542,"length":3} + >i++ + >:=> (line 52, col 70) to (line 52, col 73) +-------------------------------- +53 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1549 to 1572) SpanInfo: {"start":1553,"length":18} + >console.log(nameB) + >:=> (line 53, col 4) to (line 53, col 22) +-------------------------------- +54 >} + + ~~ => Pos: (1573 to 1574) SpanInfo: {"start":1553,"length":18} + >console.log(nameB) + >:=> (line 53, col 4) to (line 53, col 22) +-------------------------------- +55 > + + ~ => Pos: (1575 to 1575) SpanInfo: undefined +-------------------------------- +56 >for (let [numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1576 to 1594) SpanInfo: {"start":1586,"length":8} + >numberA2 + >:=> (line 56, col 10) to (line 56, col 18) +56 >for (let [numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (1595 to 1602) SpanInfo: {"start":1596,"length":6} + >nameA2 + >:=> (line 56, col 20) to (line 56, col 26) +56 >for (let [numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (1603 to 1621) SpanInfo: {"start":1604,"length":7} + >skillA2 + >:=> (line 56, col 28) to (line 56, col 35) +56 >for (let [numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1622 to 1628) SpanInfo: {"start":1623,"length":5} + >i = 0 + >:=> (line 56, col 47) to (line 56, col 52) +56 >for (let [numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1629 to 1635) SpanInfo: {"start":1630,"length":5} + >i < 1 + >:=> (line 56, col 54) to (line 56, col 59) +56 >for (let [numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1636 to 1643) SpanInfo: {"start":1637,"length":3} + >i++ + >:=> (line 56, col 61) to (line 56, col 64) +-------------------------------- +57 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1644 to 1668) SpanInfo: {"start":1648,"length":19} + >console.log(nameA2) + >:=> (line 57, col 4) to (line 57, col 23) +-------------------------------- +58 >} + + ~~ => Pos: (1669 to 1670) SpanInfo: {"start":1648,"length":19} + >console.log(nameA2) + >:=> (line 57, col 4) to (line 57, col 23) +-------------------------------- +59 >for (let [numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1671 to 1689) SpanInfo: {"start":1681,"length":8} + >numberA2 + >:=> (line 59, col 10) to (line 59, col 18) +59 >for (let [numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (1690 to 1697) SpanInfo: {"start":1691,"length":6} + >nameA2 + >:=> (line 59, col 20) to (line 59, col 26) +59 >for (let [numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~ => Pos: (1698 to 1708) SpanInfo: {"start":1699,"length":7} + >skillA2 + >:=> (line 59, col 28) to (line 59, col 35) +59 >for (let [numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~=> Pos: (1709 to 1720) SpanInfo: {"start":1710,"length":10} + >getRobot() + >:=> (line 59, col 39) to (line 59, col 49) +59 >for (let [numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1721 to 1727) SpanInfo: {"start":1722,"length":5} + >i = 0 + >:=> (line 59, col 51) to (line 59, col 56) +59 >for (let [numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1728 to 1734) SpanInfo: {"start":1729,"length":5} + >i < 1 + >:=> (line 59, col 58) to (line 59, col 63) +59 >for (let [numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1735 to 1742) SpanInfo: {"start":1736,"length":3} + >i++ + >:=> (line 59, col 65) to (line 59, col 68) +-------------------------------- +60 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1743 to 1767) SpanInfo: {"start":1747,"length":19} + >console.log(nameA2) + >:=> (line 60, col 4) to (line 60, col 23) +-------------------------------- +61 >} + + ~~ => Pos: (1768 to 1769) SpanInfo: {"start":1747,"length":19} + >console.log(nameA2) + >:=> (line 60, col 4) to (line 60, col 23) +-------------------------------- +62 >for (let [numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1770 to 1788) SpanInfo: {"start":1780,"length":8} + >numberA2 + >:=> (line 62, col 10) to (line 62, col 18) +62 >for (let [numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (1789 to 1796) SpanInfo: {"start":1790,"length":6} + >nameA2 + >:=> (line 62, col 20) to (line 62, col 26) +62 >for (let [numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1797 to 1835) SpanInfo: {"start":1798,"length":7} + >skillA2 + >:=> (line 62, col 28) to (line 62, col 35) +62 >for (let [numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1836 to 1842) SpanInfo: {"start":1837,"length":5} + >i = 0 + >:=> (line 62, col 67) to (line 62, col 72) +62 >for (let [numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1843 to 1849) SpanInfo: {"start":1844,"length":5} + >i < 1 + >:=> (line 62, col 74) to (line 62, col 79) +62 >for (let [numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1850 to 1857) SpanInfo: {"start":1851,"length":3} + >i++ + >:=> (line 62, col 81) to (line 62, col 84) +-------------------------------- +63 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1858 to 1882) SpanInfo: {"start":1862,"length":19} + >console.log(nameA2) + >:=> (line 63, col 4) to (line 63, col 23) +-------------------------------- +64 >} + + ~~ => Pos: (1883 to 1884) SpanInfo: {"start":1862,"length":19} + >console.log(nameA2) + >:=> (line 63, col 4) to (line 63, col 23) +-------------------------------- +65 >for (let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~ => Pos: (1885 to 1901) SpanInfo: {"start":1895,"length":6} + >nameMA + >:=> (line 65, col 10) to (line 65, col 16) +65 >for (let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~ => Pos: (1902 to 1917) SpanInfo: {"start":1904,"length":13} + >primarySkillA + >:=> (line 65, col 19) to (line 65, col 32) +65 >for (let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~=> Pos: (1918 to 1934) SpanInfo: {"start":1919,"length":15} + >secondarySkillA + >:=> (line 65, col 34) to (line 65, col 49) +65 >for (let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~=> Pos: (1935 to 1950) SpanInfo: {"start":1903,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 65, col 18) to (line 65, col 50) +65 >for (let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1951 to 1957) SpanInfo: {"start":1952,"length":5} + >i = 0 + >:=> (line 65, col 67) to (line 65, col 72) +65 >for (let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1958 to 1964) SpanInfo: {"start":1959,"length":5} + >i < 1 + >:=> (line 65, col 74) to (line 65, col 79) +65 >for (let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1965 to 1972) SpanInfo: {"start":1966,"length":3} + >i++ + >:=> (line 65, col 81) to (line 65, col 84) +-------------------------------- +66 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1973 to 1997) SpanInfo: {"start":1977,"length":19} + >console.log(nameMA) + >:=> (line 66, col 4) to (line 66, col 23) +-------------------------------- +67 >} + + ~~ => Pos: (1998 to 1999) SpanInfo: {"start":1977,"length":19} + >console.log(nameMA) + >:=> (line 66, col 4) to (line 66, col 23) +-------------------------------- +68 >for (let [nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~ => Pos: (2000 to 2016) SpanInfo: {"start":2010,"length":6} + >nameMA + >:=> (line 68, col 10) to (line 68, col 16) +68 >for (let [nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~ => Pos: (2017 to 2032) SpanInfo: {"start":2019,"length":13} + >primarySkillA + >:=> (line 68, col 19) to (line 68, col 32) +68 >for (let [nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~=> Pos: (2033 to 2049) SpanInfo: {"start":2034,"length":15} + >secondarySkillA + >:=> (line 68, col 34) to (line 68, col 49) +68 >for (let [nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~=> Pos: (2050 to 2052) SpanInfo: {"start":2018,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 68, col 18) to (line 68, col 50) +68 >for (let [nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~=> Pos: (2053 to 2069) SpanInfo: {"start":2054,"length":15} + >getMultiRobot() + >:=> (line 68, col 54) to (line 68, col 69) +68 >for (let [nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2070 to 2076) SpanInfo: {"start":2071,"length":5} + >i = 0 + >:=> (line 68, col 71) to (line 68, col 76) +68 >for (let [nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2077 to 2083) SpanInfo: {"start":2078,"length":5} + >i < 1 + >:=> (line 68, col 78) to (line 68, col 83) +68 >for (let [nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2084 to 2091) SpanInfo: {"start":2085,"length":3} + >i++ + >:=> (line 68, col 85) to (line 68, col 88) +-------------------------------- +69 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2092 to 2116) SpanInfo: {"start":2096,"length":19} + >console.log(nameMA) + >:=> (line 69, col 4) to (line 69, col 23) +-------------------------------- +70 >} + + ~~ => Pos: (2117 to 2118) SpanInfo: {"start":2096,"length":19} + >console.log(nameMA) + >:=> (line 69, col 4) to (line 69, col 23) +-------------------------------- +71 >for (let [nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~ => Pos: (2119 to 2135) SpanInfo: {"start":2129,"length":6} + >nameMA + >:=> (line 71, col 10) to (line 71, col 16) +71 >for (let [nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~ => Pos: (2136 to 2151) SpanInfo: {"start":2138,"length":13} + >primarySkillA + >:=> (line 71, col 19) to (line 71, col 32) +71 >for (let [nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~=> Pos: (2152 to 2168) SpanInfo: {"start":2153,"length":15} + >secondarySkillA + >:=> (line 71, col 34) to (line 71, col 49) +71 >for (let [nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2169 to 2208) SpanInfo: {"start":2137,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 71, col 18) to (line 71, col 50) +71 >for (let [nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2209 to 2215) SpanInfo: {"start":2210,"length":5} + >i = 0 + >:=> (line 71, col 91) to (line 71, col 96) +71 >for (let [nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2216 to 2222) SpanInfo: {"start":2217,"length":5} + >i < 1 + >:=> (line 71, col 98) to (line 71, col 103) +71 >for (let [nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2223 to 2230) SpanInfo: {"start":2224,"length":3} + >i++ + >:=> (line 71, col 105) to (line 71, col 108) +-------------------------------- +72 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2231 to 2255) SpanInfo: {"start":2235,"length":19} + >console.log(nameMA) + >:=> (line 72, col 4) to (line 72, col 23) +-------------------------------- +73 >} + + ~~ => Pos: (2256 to 2257) SpanInfo: {"start":2235,"length":19} + >console.log(nameMA) + >:=> (line 72, col 4) to (line 72, col 23) +-------------------------------- +74 > + + ~ => Pos: (2258 to 2258) SpanInfo: undefined +-------------------------------- +75 >for (let [numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (2259 to 2277) SpanInfo: {"start":2269,"length":8} + >numberA3 + >:=> (line 75, col 10) to (line 75, col 18) +75 >for (let [numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2278 to 2302) SpanInfo: {"start":2279,"length":13} + >...robotAInfo + >:=> (line 75, col 20) to (line 75, col 33) +75 >for (let [numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2303 to 2309) SpanInfo: {"start":2304,"length":5} + >i = 0 + >:=> (line 75, col 45) to (line 75, col 50) +75 >for (let [numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2310 to 2316) SpanInfo: {"start":2311,"length":5} + >i < 1 + >:=> (line 75, col 52) to (line 75, col 57) +75 >for (let [numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2317 to 2324) SpanInfo: {"start":2318,"length":3} + >i++ + >:=> (line 75, col 59) to (line 75, col 62) +-------------------------------- +76 > console.log(numberA3); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2325 to 2351) SpanInfo: {"start":2329,"length":21} + >console.log(numberA3) + >:=> (line 76, col 4) to (line 76, col 25) +-------------------------------- +77 >} + + ~~ => Pos: (2352 to 2353) SpanInfo: {"start":2329,"length":21} + >console.log(numberA3) + >:=> (line 76, col 4) to (line 76, col 25) +-------------------------------- +78 >for (let [numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (2354 to 2372) SpanInfo: {"start":2364,"length":8} + >numberA3 + >:=> (line 78, col 10) to (line 78, col 18) +78 >for (let [numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~ => Pos: (2373 to 2389) SpanInfo: {"start":2374,"length":13} + >...robotAInfo + >:=> (line 78, col 20) to (line 78, col 33) +78 >for (let [numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~=> Pos: (2390 to 2401) SpanInfo: {"start":2391,"length":10} + >getRobot() + >:=> (line 78, col 37) to (line 78, col 47) +78 >for (let [numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2402 to 2408) SpanInfo: {"start":2403,"length":5} + >i = 0 + >:=> (line 78, col 49) to (line 78, col 54) +78 >for (let [numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2409 to 2415) SpanInfo: {"start":2410,"length":5} + >i < 1 + >:=> (line 78, col 56) to (line 78, col 61) +78 >for (let [numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2416 to 2423) SpanInfo: {"start":2417,"length":3} + >i++ + >:=> (line 78, col 63) to (line 78, col 66) +-------------------------------- +79 > console.log(numberA3); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2424 to 2450) SpanInfo: {"start":2428,"length":21} + >console.log(numberA3) + >:=> (line 79, col 4) to (line 79, col 25) +-------------------------------- +80 >} + + ~~ => Pos: (2451 to 2452) SpanInfo: {"start":2428,"length":21} + >console.log(numberA3) + >:=> (line 79, col 4) to (line 79, col 25) +-------------------------------- +81 >for (let [numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (2453 to 2471) SpanInfo: {"start":2463,"length":8} + >numberA3 + >:=> (line 81, col 10) to (line 81, col 18) +81 >for (let [numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2472 to 2516) SpanInfo: {"start":2473,"length":13} + >...robotAInfo + >:=> (line 81, col 20) to (line 81, col 33) +81 >for (let [numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2517 to 2523) SpanInfo: {"start":2518,"length":5} + >i = 0 + >:=> (line 81, col 65) to (line 81, col 70) +81 >for (let [numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2524 to 2530) SpanInfo: {"start":2525,"length":5} + >i < 1 + >:=> (line 81, col 72) to (line 81, col 77) +81 >for (let [numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2531 to 2538) SpanInfo: {"start":2532,"length":3} + >i++ + >:=> (line 81, col 79) to (line 81, col 82) +-------------------------------- +82 > console.log(numberA3); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2539 to 2565) SpanInfo: {"start":2543,"length":21} + >console.log(numberA3) + >:=> (line 82, col 4) to (line 82, col 25) +-------------------------------- +83 >} + + ~~ => Pos: (2566 to 2567) SpanInfo: {"start":2543,"length":21} + >console.log(numberA3) + >:=> (line 82, col 4) to (line 82, col 25) +-------------------------------- +84 >for (let [...multiRobotAInfo] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2568 to 2611) SpanInfo: {"start":2578,"length":18} + >...multiRobotAInfo + >:=> (line 84, col 10) to (line 84, col 28) +84 >for (let [...multiRobotAInfo] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2612 to 2618) SpanInfo: {"start":2613,"length":5} + >i = 0 + >:=> (line 84, col 45) to (line 84, col 50) +84 >for (let [...multiRobotAInfo] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2619 to 2625) SpanInfo: {"start":2620,"length":5} + >i < 1 + >:=> (line 84, col 52) to (line 84, col 57) +84 >for (let [...multiRobotAInfo] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2626 to 2633) SpanInfo: {"start":2627,"length":3} + >i++ + >:=> (line 84, col 59) to (line 84, col 62) +-------------------------------- +85 > console.log(multiRobotAInfo); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2634 to 2667) SpanInfo: {"start":2638,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 85, col 4) to (line 85, col 32) +-------------------------------- +86 >} + + ~~ => Pos: (2668 to 2669) SpanInfo: {"start":2638,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 85, col 4) to (line 85, col 32) +-------------------------------- +87 >for (let [...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2670 to 2700) SpanInfo: {"start":2680,"length":18} + >...multiRobotAInfo + >:=> (line 87, col 10) to (line 87, col 28) +87 >for (let [...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~=> Pos: (2701 to 2717) SpanInfo: {"start":2702,"length":15} + >getMultiRobot() + >:=> (line 87, col 32) to (line 87, col 47) +87 >for (let [...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2718 to 2724) SpanInfo: {"start":2719,"length":5} + >i = 0 + >:=> (line 87, col 49) to (line 87, col 54) +87 >for (let [...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2725 to 2731) SpanInfo: {"start":2726,"length":5} + >i < 1 + >:=> (line 87, col 56) to (line 87, col 61) +87 >for (let [...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2732 to 2739) SpanInfo: {"start":2733,"length":3} + >i++ + >:=> (line 87, col 63) to (line 87, col 66) +-------------------------------- +88 > console.log(multiRobotAInfo); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2740 to 2773) SpanInfo: {"start":2744,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 88, col 4) to (line 88, col 32) +-------------------------------- +89 >} + + ~~ => Pos: (2774 to 2775) SpanInfo: {"start":2744,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 88, col 4) to (line 88, col 32) +-------------------------------- +90 >for (let [...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2776 to 2843) SpanInfo: {"start":2786,"length":18} + >...multiRobotAInfo + >:=> (line 90, col 10) to (line 90, col 28) +90 >for (let [...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2844 to 2850) SpanInfo: {"start":2845,"length":5} + >i = 0 + >:=> (line 90, col 69) to (line 90, col 74) +90 >for (let [...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2851 to 2857) SpanInfo: {"start":2852,"length":5} + >i < 1 + >:=> (line 90, col 76) to (line 90, col 81) +90 >for (let [...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2858 to 2865) SpanInfo: {"start":2859,"length":3} + >i++ + >:=> (line 90, col 83) to (line 90, col 86) +-------------------------------- +91 > console.log(multiRobotAInfo); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2866 to 2899) SpanInfo: {"start":2870,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 91, col 4) to (line 91, col 32) +-------------------------------- +92 >} + ~ => Pos: (2900 to 2900) SpanInfo: {"start":2870,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 91, col 4) to (line 91, col 32) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringForArrayBindingPatternDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringForArrayBindingPatternDefaultValues.baseline new file mode 100644 index 00000000000..17fc43d9d9e --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringForArrayBindingPatternDefaultValues.baseline @@ -0,0 +1,1077 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: any): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (48 to 49) SpanInfo: undefined +-------------------------------- +4 >type Robot = [number, string, string]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 88) SpanInfo: undefined +-------------------------------- +5 >type MultiSkilledRobot = [string, string[]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (89 to 133) SpanInfo: undefined +-------------------------------- +6 >let robotA: Robot = [1, "mower", "mowing"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (134 to 177) SpanInfo: {"start":134,"length":42} + >let robotA: Robot = [1, "mower", "mowing"] + >:=> (line 6, col 0) to (line 6, col 42) +-------------------------------- +7 >function getRobot() { + + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (178 to 199) SpanInfo: {"start":204,"length":13} + >return robotA + >:=> (line 8, col 4) to (line 8, col 17) +-------------------------------- +8 > return robotA; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (200 to 218) SpanInfo: {"start":204,"length":13} + >return robotA + >:=> (line 8, col 4) to (line 8, col 17) +-------------------------------- +9 >} + + ~~ => Pos: (219 to 220) SpanInfo: {"start":219,"length":1} + >} + >:=> (line 9, col 0) to (line 9, col 1) +-------------------------------- +10 >let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (221 to 284) SpanInfo: {"start":221,"length":62} + >let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]] + >:=> (line 10, col 0) to (line 10, col 62) +-------------------------------- +11 >let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (285 to 358) SpanInfo: {"start":285,"length":72} + >let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]] + >:=> (line 11, col 0) to (line 11, col 72) +-------------------------------- +12 >function getMultiRobot() { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (359 to 385) SpanInfo: {"start":390,"length":18} + >return multiRobotA + >:=> (line 13, col 4) to (line 13, col 22) +-------------------------------- +13 > return multiRobotA; + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (386 to 409) SpanInfo: {"start":390,"length":18} + >return multiRobotA + >:=> (line 13, col 4) to (line 13, col 22) +-------------------------------- +14 >} + + ~~ => Pos: (410 to 411) SpanInfo: {"start":410,"length":1} + >} + >:=> (line 14, col 0) to (line 14, col 1) +-------------------------------- +15 >for (let [, nameA ="name"] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (412 to 447) SpanInfo: {"start":424,"length":13} + >nameA ="name" + >:=> (line 15, col 12) to (line 15, col 25) +15 >for (let [, nameA ="name"] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (448 to 454) SpanInfo: {"start":449,"length":5} + >i = 0 + >:=> (line 15, col 37) to (line 15, col 42) +15 >for (let [, nameA ="name"] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (455 to 461) SpanInfo: {"start":456,"length":5} + >i < 1 + >:=> (line 15, col 44) to (line 15, col 49) +15 >for (let [, nameA ="name"] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (462 to 469) SpanInfo: {"start":463,"length":3} + >i++ + >:=> (line 15, col 51) to (line 15, col 54) +-------------------------------- +16 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (470 to 493) SpanInfo: {"start":474,"length":18} + >console.log(nameA) + >:=> (line 16, col 4) to (line 16, col 22) +-------------------------------- +17 >} + + ~~ => Pos: (494 to 495) SpanInfo: {"start":474,"length":18} + >console.log(nameA) + >:=> (line 16, col 4) to (line 16, col 22) +-------------------------------- +18 >for (let [, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (496 to 524) SpanInfo: {"start":508,"length":14} + >nameA = "name" + >:=> (line 18, col 12) to (line 18, col 26) +18 >for (let [, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~ => Pos: (525 to 536) SpanInfo: {"start":526,"length":10} + >getRobot() + >:=> (line 18, col 30) to (line 18, col 40) +18 >for (let [, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (537 to 543) SpanInfo: {"start":538,"length":5} + >i = 0 + >:=> (line 18, col 42) to (line 18, col 47) +18 >for (let [, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (544 to 550) SpanInfo: {"start":545,"length":5} + >i < 1 + >:=> (line 18, col 49) to (line 18, col 54) +18 >for (let [, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (551 to 558) SpanInfo: {"start":552,"length":3} + >i++ + >:=> (line 18, col 56) to (line 18, col 59) +-------------------------------- +19 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (559 to 582) SpanInfo: {"start":563,"length":18} + >console.log(nameA) + >:=> (line 19, col 4) to (line 19, col 22) +-------------------------------- +20 >} + + ~~ => Pos: (583 to 584) SpanInfo: {"start":563,"length":18} + >console.log(nameA) + >:=> (line 19, col 4) to (line 19, col 22) +-------------------------------- +21 >for (let [, nameA = "name"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (585 to 641) SpanInfo: {"start":597,"length":14} + >nameA = "name" + >:=> (line 21, col 12) to (line 21, col 26) +21 >for (let [, nameA = "name"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (642 to 648) SpanInfo: {"start":643,"length":5} + >i = 0 + >:=> (line 21, col 58) to (line 21, col 63) +21 >for (let [, nameA = "name"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (649 to 655) SpanInfo: {"start":650,"length":5} + >i < 1 + >:=> (line 21, col 65) to (line 21, col 70) +21 >for (let [, nameA = "name"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (656 to 663) SpanInfo: {"start":657,"length":3} + >i++ + >:=> (line 21, col 72) to (line 21, col 75) +-------------------------------- +22 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (664 to 687) SpanInfo: {"start":668,"length":18} + >console.log(nameA) + >:=> (line 22, col 4) to (line 22, col 22) +-------------------------------- +23 >} + + ~~ => Pos: (688 to 689) SpanInfo: {"start":668,"length":18} + >console.log(nameA) + >:=> (line 22, col 4) to (line 22, col 22) +-------------------------------- +24 >for (let [, [ + + ~~~~~~~~~~~ => Pos: (690 to 700) SpanInfo: {"start":702,"length":87} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["none", "none"] + >:=> (line 24, col 12) to (line 27, col 20) +24 >for (let [, [ + + ~~~ => Pos: (701 to 703) SpanInfo: {"start":708,"length":25} + >primarySkillA = "primary" + >:=> (line 25, col 4) to (line 25, col 29) +-------------------------------- +25 > primarySkillA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (704 to 734) SpanInfo: {"start":708,"length":25} + >primarySkillA = "primary" + >:=> (line 25, col 4) to (line 25, col 29) +-------------------------------- +26 > secondarySkillA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (735 to 768) SpanInfo: {"start":739,"length":29} + >secondarySkillA = "secondary" + >:=> (line 26, col 4) to (line 26, col 33) +-------------------------------- +27 >] = ["none", "none"]] = multiRobotA, i = 0; i < 1; i++) { + + ~ => Pos: (769 to 769) SpanInfo: {"start":739,"length":29} + >secondarySkillA = "secondary" + >:=> (line 26, col 4) to (line 26, col 33) +27 >] = ["none", "none"]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (770 to 804) SpanInfo: {"start":702,"length":87} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["none", "none"] + >:=> (line 24, col 12) to (line 27, col 20) +27 >] = ["none", "none"]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (805 to 811) SpanInfo: {"start":806,"length":5} + >i = 0 + >:=> (line 27, col 37) to (line 27, col 42) +27 >] = ["none", "none"]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (812 to 818) SpanInfo: {"start":813,"length":5} + >i < 1 + >:=> (line 27, col 44) to (line 27, col 49) +27 >] = ["none", "none"]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (819 to 826) SpanInfo: {"start":820,"length":3} + >i++ + >:=> (line 27, col 51) to (line 27, col 54) +-------------------------------- +28 > console.log(primarySkillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (827 to 858) SpanInfo: {"start":831,"length":26} + >console.log(primarySkillA) + >:=> (line 28, col 4) to (line 28, col 30) +-------------------------------- +29 >} + + ~~ => Pos: (859 to 860) SpanInfo: {"start":831,"length":26} + >console.log(primarySkillA) + >:=> (line 28, col 4) to (line 28, col 30) +-------------------------------- +30 >for (let [, [ + + ~~~~~~~~~~~ => Pos: (861 to 871) SpanInfo: {"start":873,"length":87} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["none", "none"] + >:=> (line 30, col 12) to (line 33, col 20) +30 >for (let [, [ + + ~~~ => Pos: (872 to 874) SpanInfo: {"start":879,"length":25} + >primarySkillA = "primary" + >:=> (line 31, col 4) to (line 31, col 29) +-------------------------------- +31 > primarySkillA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (875 to 905) SpanInfo: {"start":879,"length":25} + >primarySkillA = "primary" + >:=> (line 31, col 4) to (line 31, col 29) +-------------------------------- +32 > secondarySkillA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (906 to 939) SpanInfo: {"start":910,"length":29} + >secondarySkillA = "secondary" + >:=> (line 32, col 4) to (line 32, col 33) +-------------------------------- +33 >] = ["none", "none"]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~ => Pos: (940 to 940) SpanInfo: {"start":910,"length":29} + >secondarySkillA = "secondary" + >:=> (line 32, col 4) to (line 32, col 33) +33 >] = ["none", "none"]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (941 to 962) SpanInfo: {"start":873,"length":87} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["none", "none"] + >:=> (line 30, col 12) to (line 33, col 20) +33 >] = ["none", "none"]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~ => Pos: (963 to 979) SpanInfo: {"start":964,"length":15} + >getMultiRobot() + >:=> (line 33, col 24) to (line 33, col 39) +33 >] = ["none", "none"]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (980 to 986) SpanInfo: {"start":981,"length":5} + >i = 0 + >:=> (line 33, col 41) to (line 33, col 46) +33 >] = ["none", "none"]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (987 to 993) SpanInfo: {"start":988,"length":5} + >i < 1 + >:=> (line 33, col 48) to (line 33, col 53) +33 >] = ["none", "none"]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (994 to 1001) SpanInfo: {"start":995,"length":3} + >i++ + >:=> (line 33, col 55) to (line 33, col 58) +-------------------------------- +34 > console.log(primarySkillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1002 to 1033) SpanInfo: {"start":1006,"length":26} + >console.log(primarySkillA) + >:=> (line 34, col 4) to (line 34, col 30) +-------------------------------- +35 >} + + ~~ => Pos: (1034 to 1035) SpanInfo: {"start":1006,"length":26} + >console.log(primarySkillA) + >:=> (line 34, col 4) to (line 34, col 30) +-------------------------------- +36 >for (let [, [ + + ~~~~~~~~~~~ => Pos: (1036 to 1046) SpanInfo: {"start":1048,"length":87} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["none", "none"] + >:=> (line 36, col 12) to (line 39, col 20) +36 >for (let [, [ + + ~~~ => Pos: (1047 to 1049) SpanInfo: {"start":1054,"length":25} + >primarySkillA = "primary" + >:=> (line 37, col 4) to (line 37, col 29) +-------------------------------- +37 > primarySkillA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1050 to 1080) SpanInfo: {"start":1054,"length":25} + >primarySkillA = "primary" + >:=> (line 37, col 4) to (line 37, col 29) +-------------------------------- +38 > secondarySkillA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1081 to 1114) SpanInfo: {"start":1085,"length":29} + >secondarySkillA = "secondary" + >:=> (line 38, col 4) to (line 38, col 33) +-------------------------------- +39 >] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~ => Pos: (1115 to 1115) SpanInfo: {"start":1085,"length":29} + >secondarySkillA = "secondary" + >:=> (line 38, col 4) to (line 38, col 33) +39 >] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1116 to 1174) SpanInfo: {"start":1048,"length":87} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["none", "none"] + >:=> (line 36, col 12) to (line 39, col 20) +39 >] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1175 to 1181) SpanInfo: {"start":1176,"length":5} + >i = 0 + >:=> (line 39, col 61) to (line 39, col 66) +39 >] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1182 to 1188) SpanInfo: {"start":1183,"length":5} + >i < 1 + >:=> (line 39, col 68) to (line 39, col 73) +39 >] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1189 to 1196) SpanInfo: {"start":1190,"length":3} + >i++ + >:=> (line 39, col 75) to (line 39, col 78) +-------------------------------- +40 > console.log(primarySkillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1197 to 1228) SpanInfo: {"start":1201,"length":26} + >console.log(primarySkillA) + >:=> (line 40, col 4) to (line 40, col 30) +-------------------------------- +41 >} + + ~~ => Pos: (1229 to 1230) SpanInfo: {"start":1201,"length":26} + >console.log(primarySkillA) + >:=> (line 40, col 4) to (line 40, col 30) +-------------------------------- +42 >for (let [numberB = -1] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1231 to 1263) SpanInfo: {"start":1241,"length":12} + >numberB = -1 + >:=> (line 42, col 10) to (line 42, col 22) +42 >for (let [numberB = -1] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1264 to 1270) SpanInfo: {"start":1265,"length":5} + >i = 0 + >:=> (line 42, col 34) to (line 42, col 39) +42 >for (let [numberB = -1] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1271 to 1277) SpanInfo: {"start":1272,"length":5} + >i < 1 + >:=> (line 42, col 41) to (line 42, col 46) +42 >for (let [numberB = -1] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1278 to 1285) SpanInfo: {"start":1279,"length":3} + >i++ + >:=> (line 42, col 48) to (line 42, col 51) +-------------------------------- +43 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1286 to 1311) SpanInfo: {"start":1290,"length":20} + >console.log(numberB) + >:=> (line 43, col 4) to (line 43, col 24) +-------------------------------- +44 >} + + ~~ => Pos: (1312 to 1313) SpanInfo: {"start":1290,"length":20} + >console.log(numberB) + >:=> (line 43, col 4) to (line 43, col 24) +-------------------------------- +45 >for (let [numberB = -1] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1314 to 1338) SpanInfo: {"start":1324,"length":12} + >numberB = -1 + >:=> (line 45, col 10) to (line 45, col 22) +45 >for (let [numberB = -1] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~ => Pos: (1339 to 1350) SpanInfo: {"start":1340,"length":10} + >getRobot() + >:=> (line 45, col 26) to (line 45, col 36) +45 >for (let [numberB = -1] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1351 to 1357) SpanInfo: {"start":1352,"length":5} + >i = 0 + >:=> (line 45, col 38) to (line 45, col 43) +45 >for (let [numberB = -1] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1358 to 1364) SpanInfo: {"start":1359,"length":5} + >i < 1 + >:=> (line 45, col 45) to (line 45, col 50) +45 >for (let [numberB = -1] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1365 to 1372) SpanInfo: {"start":1366,"length":3} + >i++ + >:=> (line 45, col 52) to (line 45, col 55) +-------------------------------- +46 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1373 to 1398) SpanInfo: {"start":1377,"length":20} + >console.log(numberB) + >:=> (line 46, col 4) to (line 46, col 24) +-------------------------------- +47 >} + + ~~ => Pos: (1399 to 1400) SpanInfo: {"start":1377,"length":20} + >console.log(numberB) + >:=> (line 46, col 4) to (line 46, col 24) +-------------------------------- +48 >for (let [numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1401 to 1453) SpanInfo: {"start":1411,"length":12} + >numberB = -1 + >:=> (line 48, col 10) to (line 48, col 22) +48 >for (let [numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1454 to 1460) SpanInfo: {"start":1455,"length":5} + >i = 0 + >:=> (line 48, col 54) to (line 48, col 59) +48 >for (let [numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1461 to 1467) SpanInfo: {"start":1462,"length":5} + >i < 1 + >:=> (line 48, col 61) to (line 48, col 66) +48 >for (let [numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1468 to 1475) SpanInfo: {"start":1469,"length":3} + >i++ + >:=> (line 48, col 68) to (line 48, col 71) +-------------------------------- +49 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1476 to 1501) SpanInfo: {"start":1480,"length":20} + >console.log(numberB) + >:=> (line 49, col 4) to (line 49, col 24) +-------------------------------- +50 >} + + ~~ => Pos: (1502 to 1503) SpanInfo: {"start":1480,"length":20} + >console.log(numberB) + >:=> (line 49, col 4) to (line 49, col 24) +-------------------------------- +51 >for (let [nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1504 to 1543) SpanInfo: {"start":1514,"length":14} + >nameB = "name" + >:=> (line 51, col 10) to (line 51, col 24) +51 >for (let [nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1544 to 1550) SpanInfo: {"start":1545,"length":5} + >i = 0 + >:=> (line 51, col 41) to (line 51, col 46) +51 >for (let [nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1551 to 1557) SpanInfo: {"start":1552,"length":5} + >i < 1 + >:=> (line 51, col 48) to (line 51, col 53) +51 >for (let [nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1558 to 1565) SpanInfo: {"start":1559,"length":3} + >i++ + >:=> (line 51, col 55) to (line 51, col 58) +-------------------------------- +52 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1566 to 1589) SpanInfo: {"start":1570,"length":18} + >console.log(nameB) + >:=> (line 52, col 4) to (line 52, col 22) +-------------------------------- +53 >} + + ~~ => Pos: (1590 to 1591) SpanInfo: {"start":1570,"length":18} + >console.log(nameB) + >:=> (line 52, col 4) to (line 52, col 22) +-------------------------------- +54 >for (let [nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1592 to 1618) SpanInfo: {"start":1602,"length":14} + >nameB = "name" + >:=> (line 54, col 10) to (line 54, col 24) +54 >for (let [nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~ => Pos: (1619 to 1635) SpanInfo: {"start":1620,"length":15} + >getMultiRobot() + >:=> (line 54, col 28) to (line 54, col 43) +54 >for (let [nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1636 to 1642) SpanInfo: {"start":1637,"length":5} + >i = 0 + >:=> (line 54, col 45) to (line 54, col 50) +54 >for (let [nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1643 to 1649) SpanInfo: {"start":1644,"length":5} + >i < 1 + >:=> (line 54, col 52) to (line 54, col 57) +54 >for (let [nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1650 to 1657) SpanInfo: {"start":1651,"length":3} + >i++ + >:=> (line 54, col 59) to (line 54, col 62) +-------------------------------- +55 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1658 to 1681) SpanInfo: {"start":1662,"length":18} + >console.log(nameB) + >:=> (line 55, col 4) to (line 55, col 22) +-------------------------------- +56 >} + + ~~ => Pos: (1682 to 1683) SpanInfo: {"start":1662,"length":18} + >console.log(nameB) + >:=> (line 55, col 4) to (line 55, col 22) +-------------------------------- +57 >for (let [nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1684 to 1747) SpanInfo: {"start":1694,"length":14} + >nameB = "name" + >:=> (line 57, col 10) to (line 57, col 24) +57 >for (let [nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1748 to 1754) SpanInfo: {"start":1749,"length":5} + >i = 0 + >:=> (line 57, col 65) to (line 57, col 70) +57 >for (let [nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1755 to 1761) SpanInfo: {"start":1756,"length":5} + >i < 1 + >:=> (line 57, col 72) to (line 57, col 77) +57 >for (let [nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1762 to 1769) SpanInfo: {"start":1763,"length":3} + >i++ + >:=> (line 57, col 79) to (line 57, col 82) +-------------------------------- +58 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1770 to 1793) SpanInfo: {"start":1774,"length":18} + >console.log(nameB) + >:=> (line 58, col 4) to (line 58, col 22) +-------------------------------- +59 >} + + ~~ => Pos: (1794 to 1795) SpanInfo: {"start":1774,"length":18} + >console.log(nameB) + >:=> (line 58, col 4) to (line 58, col 22) +-------------------------------- +60 >for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1796 to 1819) SpanInfo: {"start":1806,"length":13} + >numberA2 = -1 + >:=> (line 60, col 10) to (line 60, col 23) +60 >for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~ => Pos: (1820 to 1836) SpanInfo: {"start":1821,"length":15} + >nameA2 = "name" + >:=> (line 60, col 25) to (line 60, col 40) +60 >for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1837 to 1865) SpanInfo: {"start":1838,"length":17} + >skillA2 = "skill" + >:=> (line 60, col 42) to (line 60, col 59) +60 >for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1866 to 1872) SpanInfo: {"start":1867,"length":5} + >i = 0 + >:=> (line 60, col 71) to (line 60, col 76) +60 >for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1873 to 1879) SpanInfo: {"start":1874,"length":5} + >i < 1 + >:=> (line 60, col 78) to (line 60, col 83) +60 >for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1880 to 1887) SpanInfo: {"start":1881,"length":3} + >i++ + >:=> (line 60, col 85) to (line 60, col 88) +-------------------------------- +61 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1888 to 1912) SpanInfo: {"start":1892,"length":19} + >console.log(nameA2) + >:=> (line 61, col 4) to (line 61, col 23) +-------------------------------- +62 >} + + ~~ => Pos: (1913 to 1914) SpanInfo: {"start":1892,"length":19} + >console.log(nameA2) + >:=> (line 61, col 4) to (line 61, col 23) +-------------------------------- +63 >for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1915 to 1938) SpanInfo: {"start":1925,"length":13} + >numberA2 = -1 + >:=> (line 63, col 10) to (line 63, col 23) +63 >for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~ => Pos: (1939 to 1955) SpanInfo: {"start":1940,"length":15} + >nameA2 = "name" + >:=> (line 63, col 25) to (line 63, col 40) +63 >for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~=> Pos: (1956 to 1976) SpanInfo: {"start":1957,"length":17} + >skillA2 = "skill" + >:=> (line 63, col 42) to (line 63, col 59) +63 >for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~=> Pos: (1977 to 1988) SpanInfo: {"start":1978,"length":10} + >getRobot() + >:=> (line 63, col 63) to (line 63, col 73) +63 >for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1989 to 1995) SpanInfo: {"start":1990,"length":5} + >i = 0 + >:=> (line 63, col 75) to (line 63, col 80) +63 >for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1996 to 2002) SpanInfo: {"start":1997,"length":5} + >i < 1 + >:=> (line 63, col 82) to (line 63, col 87) +63 >for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2003 to 2010) SpanInfo: {"start":2004,"length":3} + >i++ + >:=> (line 63, col 89) to (line 63, col 92) +-------------------------------- +64 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2011 to 2035) SpanInfo: {"start":2015,"length":19} + >console.log(nameA2) + >:=> (line 64, col 4) to (line 64, col 23) +-------------------------------- +65 >} + + ~~ => Pos: (2036 to 2037) SpanInfo: {"start":2015,"length":19} + >console.log(nameA2) + >:=> (line 64, col 4) to (line 64, col 23) +-------------------------------- +66 >for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2038 to 2061) SpanInfo: {"start":2048,"length":13} + >numberA2 = -1 + >:=> (line 66, col 10) to (line 66, col 23) +66 >for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~ => Pos: (2062 to 2078) SpanInfo: {"start":2063,"length":15} + >nameA2 = "name" + >:=> (line 66, col 25) to (line 66, col 40) +66 >for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2079 to 2127) SpanInfo: {"start":2080,"length":17} + >skillA2 = "skill" + >:=> (line 66, col 42) to (line 66, col 59) +66 >for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2128 to 2134) SpanInfo: {"start":2129,"length":5} + >i = 0 + >:=> (line 66, col 91) to (line 66, col 96) +66 >for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2135 to 2141) SpanInfo: {"start":2136,"length":5} + >i < 1 + >:=> (line 66, col 98) to (line 66, col 103) +66 >for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2142 to 2149) SpanInfo: {"start":2143,"length":3} + >i++ + >:=> (line 66, col 105) to (line 66, col 108) +-------------------------------- +67 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2150 to 2174) SpanInfo: {"start":2154,"length":19} + >console.log(nameA2) + >:=> (line 67, col 4) to (line 67, col 23) +-------------------------------- +68 >} + + ~~ => Pos: (2175 to 2176) SpanInfo: {"start":2154,"length":19} + >console.log(nameA2) + >:=> (line 67, col 4) to (line 67, col 23) +-------------------------------- +69 >for (let + + ~~~~~~~~~ => Pos: (2177 to 2185) SpanInfo: {"start":2191,"length":17} + >nameMA = "noName" + >:=> (line 70, col 5) to (line 70, col 22) +-------------------------------- +70 > [nameMA = "noName", + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2186 to 2209) SpanInfo: {"start":2191,"length":17} + >nameMA = "noName" + >:=> (line 70, col 5) to (line 70, col 22) +-------------------------------- +71 > [ + + ~~~~~~~~~~ => Pos: (2210 to 2219) SpanInfo: {"start":2232,"length":25} + >primarySkillA = "primary" + >:=> (line 72, col 12) to (line 72, col 37) +-------------------------------- +72 > primarySkillA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2220 to 2258) SpanInfo: {"start":2232,"length":25} + >primarySkillA = "primary" + >:=> (line 72, col 12) to (line 72, col 37) +-------------------------------- +73 > secondarySkillA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2259 to 2300) SpanInfo: {"start":2271,"length":29} + >secondarySkillA = "secondary" + >:=> (line 73, col 12) to (line 73, col 41) +-------------------------------- +74 > ] = ["none", "none"] + + ~~~~~~~~~ => Pos: (2301 to 2309) SpanInfo: {"start":2271,"length":29} + >secondarySkillA = "secondary" + >:=> (line 73, col 12) to (line 73, col 41) +74 > ] = ["none", "none"] + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (2310 to 2329) SpanInfo: {"start":2218,"length":111} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] + >:=> (line 71, col 8) to (line 74, col 28) +-------------------------------- +75 > ] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (2330 to 2349) SpanInfo: {"start":2218,"length":111} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] + >:=> (line 71, col 8) to (line 74, col 28) +75 > ] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (2350 to 2356) SpanInfo: {"start":2351,"length":5} + >i = 0 + >:=> (line 75, col 21) to (line 75, col 26) +75 > ] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (2357 to 2363) SpanInfo: {"start":2358,"length":5} + >i < 1 + >:=> (line 75, col 28) to (line 75, col 33) +75 > ] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (2364 to 2371) SpanInfo: {"start":2365,"length":3} + >i++ + >:=> (line 75, col 35) to (line 75, col 38) +-------------------------------- +76 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2372 to 2396) SpanInfo: {"start":2376,"length":19} + >console.log(nameMA) + >:=> (line 76, col 4) to (line 76, col 23) +-------------------------------- +77 >} + + ~~ => Pos: (2397 to 2398) SpanInfo: {"start":2376,"length":19} + >console.log(nameMA) + >:=> (line 76, col 4) to (line 76, col 23) +-------------------------------- +78 >for (let [nameMA = "noName", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2399 to 2427) SpanInfo: {"start":2409,"length":17} + >nameMA = "noName" + >:=> (line 78, col 10) to (line 78, col 27) +-------------------------------- +79 > [ + + ~~~~~~ => Pos: (2428 to 2433) SpanInfo: {"start":2442,"length":25} + >primarySkillA = "primary" + >:=> (line 80, col 8) to (line 80, col 33) +-------------------------------- +80 > primarySkillA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2434 to 2468) SpanInfo: {"start":2442,"length":25} + >primarySkillA = "primary" + >:=> (line 80, col 8) to (line 80, col 33) +-------------------------------- +81 > secondarySkillA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2469 to 2506) SpanInfo: {"start":2477,"length":29} + >secondarySkillA = "secondary" + >:=> (line 81, col 8) to (line 81, col 37) +-------------------------------- +82 > ] = ["none", "none"] + + ~~~~~ => Pos: (2507 to 2511) SpanInfo: {"start":2477,"length":29} + >secondarySkillA = "secondary" + >:=> (line 81, col 8) to (line 81, col 37) +82 > ] = ["none", "none"] + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (2512 to 2531) SpanInfo: {"start":2432,"length":99} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] + >:=> (line 79, col 4) to (line 82, col 24) +-------------------------------- +83 >] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~ => Pos: (2532 to 2535) SpanInfo: {"start":2432,"length":99} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] + >:=> (line 79, col 4) to (line 82, col 24) +83 >] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~ => Pos: (2536 to 2552) SpanInfo: {"start":2537,"length":15} + >getMultiRobot() + >:=> (line 83, col 5) to (line 83, col 20) +83 >] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (2553 to 2559) SpanInfo: {"start":2554,"length":5} + >i = 0 + >:=> (line 83, col 22) to (line 83, col 27) +83 >] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (2560 to 2566) SpanInfo: {"start":2561,"length":5} + >i < 1 + >:=> (line 83, col 29) to (line 83, col 34) +83 >] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (2567 to 2574) SpanInfo: {"start":2568,"length":3} + >i++ + >:=> (line 83, col 36) to (line 83, col 39) +-------------------------------- +84 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2575 to 2599) SpanInfo: {"start":2579,"length":19} + >console.log(nameMA) + >:=> (line 84, col 4) to (line 84, col 23) +-------------------------------- +85 >} + + ~~ => Pos: (2600 to 2601) SpanInfo: {"start":2579,"length":19} + >console.log(nameMA) + >:=> (line 84, col 4) to (line 84, col 23) +-------------------------------- +86 >for (let [nameMA = "noName", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2602 to 2630) SpanInfo: {"start":2612,"length":17} + >nameMA = "noName" + >:=> (line 86, col 10) to (line 86, col 27) +-------------------------------- +87 > [ + + ~~~~~~ => Pos: (2631 to 2636) SpanInfo: {"start":2645,"length":25} + >primarySkillA = "primary" + >:=> (line 88, col 8) to (line 88, col 33) +-------------------------------- +88 > primarySkillA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2637 to 2671) SpanInfo: {"start":2645,"length":25} + >primarySkillA = "primary" + >:=> (line 88, col 8) to (line 88, col 33) +-------------------------------- +89 > secondarySkillA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2672 to 2709) SpanInfo: {"start":2680,"length":29} + >secondarySkillA = "secondary" + >:=> (line 89, col 8) to (line 89, col 37) +-------------------------------- +90 > ] = ["none", "none"] + + ~~~~~ => Pos: (2710 to 2714) SpanInfo: {"start":2680,"length":29} + >secondarySkillA = "secondary" + >:=> (line 89, col 8) to (line 89, col 37) +90 > ] = ["none", "none"] + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (2715 to 2734) SpanInfo: {"start":2635,"length":99} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] + >:=> (line 87, col 4) to (line 90, col 24) +-------------------------------- +91 >] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2735 to 2775) SpanInfo: {"start":2635,"length":99} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] + >:=> (line 87, col 4) to (line 90, col 24) +91 >] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2776 to 2782) SpanInfo: {"start":2777,"length":5} + >i = 0 + >:=> (line 91, col 42) to (line 91, col 47) +91 >] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2783 to 2789) SpanInfo: {"start":2784,"length":5} + >i < 1 + >:=> (line 91, col 49) to (line 91, col 54) +91 >] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2790 to 2797) SpanInfo: {"start":2791,"length":3} + >i++ + >:=> (line 91, col 56) to (line 91, col 59) +-------------------------------- +92 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2798 to 2822) SpanInfo: {"start":2802,"length":19} + >console.log(nameMA) + >:=> (line 92, col 4) to (line 92, col 23) +-------------------------------- +93 >} + + ~~ => Pos: (2823 to 2824) SpanInfo: {"start":2802,"length":19} + >console.log(nameMA) + >:=> (line 92, col 4) to (line 92, col 23) +-------------------------------- +94 >for (let [numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2825 to 2848) SpanInfo: {"start":2835,"length":13} + >numberA3 = -1 + >:=> (line 94, col 10) to (line 94, col 23) +94 >for (let [numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2849 to 2873) SpanInfo: {"start":2850,"length":13} + >...robotAInfo + >:=> (line 94, col 25) to (line 94, col 38) +94 >for (let [numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2874 to 2880) SpanInfo: {"start":2875,"length":5} + >i = 0 + >:=> (line 94, col 50) to (line 94, col 55) +94 >for (let [numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2881 to 2887) SpanInfo: {"start":2882,"length":5} + >i < 1 + >:=> (line 94, col 57) to (line 94, col 62) +94 >for (let [numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2888 to 2895) SpanInfo: {"start":2889,"length":3} + >i++ + >:=> (line 94, col 64) to (line 94, col 67) +-------------------------------- +95 > console.log(numberA3); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2896 to 2922) SpanInfo: {"start":2900,"length":21} + >console.log(numberA3) + >:=> (line 95, col 4) to (line 95, col 25) +-------------------------------- +96 >} + + ~~ => Pos: (2923 to 2924) SpanInfo: {"start":2900,"length":21} + >console.log(numberA3) + >:=> (line 95, col 4) to (line 95, col 25) +-------------------------------- +97 >for (let [numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2925 to 2948) SpanInfo: {"start":2935,"length":13} + >numberA3 = -1 + >:=> (line 97, col 10) to (line 97, col 23) +97 >for (let [numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~ => Pos: (2949 to 2965) SpanInfo: {"start":2950,"length":13} + >...robotAInfo + >:=> (line 97, col 25) to (line 97, col 38) +97 >for (let [numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~=> Pos: (2966 to 2977) SpanInfo: {"start":2967,"length":10} + >getRobot() + >:=> (line 97, col 42) to (line 97, col 52) +97 >for (let [numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2978 to 2984) SpanInfo: {"start":2979,"length":5} + >i = 0 + >:=> (line 97, col 54) to (line 97, col 59) +97 >for (let [numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2985 to 2991) SpanInfo: {"start":2986,"length":5} + >i < 1 + >:=> (line 97, col 61) to (line 97, col 66) +97 >for (let [numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2992 to 2999) SpanInfo: {"start":2993,"length":3} + >i++ + >:=> (line 97, col 68) to (line 97, col 71) +-------------------------------- +98 > console.log(numberA3); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3000 to 3026) SpanInfo: {"start":3004,"length":21} + >console.log(numberA3) + >:=> (line 98, col 4) to (line 98, col 25) +-------------------------------- +99 >} + + ~~ => Pos: (3027 to 3028) SpanInfo: {"start":3004,"length":21} + >console.log(numberA3) + >:=> (line 98, col 4) to (line 98, col 25) +-------------------------------- +100>for (let [numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3029 to 3052) SpanInfo: {"start":3039,"length":13} + >numberA3 = -1 + >:=> (line 100, col 10) to (line 100, col 23) +100>for (let [numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (3053 to 3097) SpanInfo: {"start":3054,"length":13} + >...robotAInfo + >:=> (line 100, col 25) to (line 100, col 38) +100>for (let [numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (3098 to 3104) SpanInfo: {"start":3099,"length":5} + >i = 0 + >:=> (line 100, col 70) to (line 100, col 75) +100>for (let [numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (3105 to 3111) SpanInfo: {"start":3106,"length":5} + >i < 1 + >:=> (line 100, col 77) to (line 100, col 82) +100>for (let [numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (3112 to 3119) SpanInfo: {"start":3113,"length":3} + >i++ + >:=> (line 100, col 84) to (line 100, col 87) +-------------------------------- +101> console.log(numberA3); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3120 to 3146) SpanInfo: {"start":3124,"length":21} + >console.log(numberA3) + >:=> (line 101, col 4) to (line 101, col 25) +-------------------------------- +102>} + ~ => Pos: (3147 to 3147) SpanInfo: {"start":3124,"length":21} + >console.log(numberA3) + >:=> (line 101, col 4) to (line 101, col 25) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringForObjectBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringForObjectBindingPattern.baseline new file mode 100644 index 00000000000..5f4ff059dca --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringForObjectBindingPattern.baseline @@ -0,0 +1,653 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: any): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (48 to 49) SpanInfo: undefined +-------------------------------- +4 >interface Robot { + + ~~~~~~~~~~~~~~~~~~ => Pos: (50 to 67) SpanInfo: undefined +-------------------------------- +5 > name: string; + + ~~~~~~~~~~~~~~~~~~ => Pos: (68 to 85) SpanInfo: undefined +-------------------------------- +6 > skill: string; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (86 to 104) SpanInfo: undefined +-------------------------------- +7 >} + + ~~ => Pos: (105 to 106) SpanInfo: undefined +-------------------------------- +8 >interface MultiRobot { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (107 to 129) SpanInfo: undefined +-------------------------------- +9 > name: string; + + ~~~~~~~~~~~~~~~~~~ => Pos: (130 to 147) SpanInfo: undefined +-------------------------------- +10 > skills: { + + ~~~~~~~~~~~~~~ => Pos: (148 to 161) SpanInfo: undefined +-------------------------------- +11 > primary: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (162 to 186) SpanInfo: undefined +-------------------------------- +12 > secondary: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (187 to 213) SpanInfo: undefined +-------------------------------- +13 > }; + + ~~~~~~~ => Pos: (214 to 220) SpanInfo: undefined +-------------------------------- +14 >} + + ~~ => Pos: (221 to 222) SpanInfo: undefined +-------------------------------- +15 >let robot: Robot = { name: "mower", skill: "mowing" }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (223 to 277) SpanInfo: {"start":223,"length":53} + >let robot: Robot = { name: "mower", skill: "mowing" } + >:=> (line 15, col 0) to (line 15, col 53) +-------------------------------- +16 >let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (278 to 375) SpanInfo: {"start":278,"length":96} + >let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } } + >:=> (line 16, col 0) to (line 16, col 96) +-------------------------------- +17 >function getRobot() { + + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (376 to 397) SpanInfo: {"start":402,"length":12} + >return robot + >:=> (line 18, col 4) to (line 18, col 16) +-------------------------------- +18 > return robot; + + ~~~~~~~~~~~~~~~~~~ => Pos: (398 to 415) SpanInfo: {"start":402,"length":12} + >return robot + >:=> (line 18, col 4) to (line 18, col 16) +-------------------------------- +19 >} + + ~~ => Pos: (416 to 417) SpanInfo: {"start":416,"length":1} + >} + >:=> (line 19, col 0) to (line 19, col 1) +-------------------------------- +20 >function getMultiRobot() { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (418 to 444) SpanInfo: {"start":449,"length":17} + >return multiRobot + >:=> (line 21, col 4) to (line 21, col 21) +-------------------------------- +21 > return multiRobot; + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (445 to 467) SpanInfo: {"start":449,"length":17} + >return multiRobot + >:=> (line 21, col 4) to (line 21, col 21) +-------------------------------- +22 >} + + ~~ => Pos: (468 to 469) SpanInfo: {"start":468,"length":1} + >} + >:=> (line 22, col 0) to (line 22, col 1) +-------------------------------- +23 >for (let {name: nameA } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (470 to 501) SpanInfo: {"start":480,"length":11} + >name: nameA + >:=> (line 23, col 10) to (line 23, col 21) +23 >for (let {name: nameA } = robot, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (502 to 508) SpanInfo: {"start":503,"length":5} + >i = 0 + >:=> (line 23, col 33) to (line 23, col 38) +23 >for (let {name: nameA } = robot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (509 to 515) SpanInfo: {"start":510,"length":5} + >i < 1 + >:=> (line 23, col 40) to (line 23, col 45) +23 >for (let {name: nameA } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (516 to 523) SpanInfo: {"start":517,"length":3} + >i++ + >:=> (line 23, col 47) to (line 23, col 50) +-------------------------------- +24 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (524 to 547) SpanInfo: {"start":528,"length":18} + >console.log(nameA) + >:=> (line 24, col 4) to (line 24, col 22) +-------------------------------- +25 >} + + ~~ => Pos: (548 to 549) SpanInfo: {"start":528,"length":18} + >console.log(nameA) + >:=> (line 24, col 4) to (line 24, col 22) +-------------------------------- +26 >for (let {name: nameA } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (550 to 574) SpanInfo: {"start":560,"length":11} + >name: nameA + >:=> (line 26, col 10) to (line 26, col 21) +26 >for (let {name: nameA } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~ => Pos: (575 to 586) SpanInfo: {"start":576,"length":10} + >getRobot() + >:=> (line 26, col 26) to (line 26, col 36) +26 >for (let {name: nameA } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (587 to 593) SpanInfo: {"start":588,"length":5} + >i = 0 + >:=> (line 26, col 38) to (line 26, col 43) +26 >for (let {name: nameA } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (594 to 600) SpanInfo: {"start":595,"length":5} + >i < 1 + >:=> (line 26, col 45) to (line 26, col 50) +26 >for (let {name: nameA } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (601 to 608) SpanInfo: {"start":602,"length":3} + >i++ + >:=> (line 26, col 52) to (line 26, col 55) +-------------------------------- +27 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (609 to 632) SpanInfo: {"start":613,"length":18} + >console.log(nameA) + >:=> (line 27, col 4) to (line 27, col 22) +-------------------------------- +28 >} + + ~~ => Pos: (633 to 634) SpanInfo: {"start":613,"length":18} + >console.log(nameA) + >:=> (line 27, col 4) to (line 27, col 22) +-------------------------------- +29 >for (let {name: nameA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (635 to 706) SpanInfo: {"start":645,"length":11} + >name: nameA + >:=> (line 29, col 10) to (line 29, col 21) +29 >for (let {name: nameA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (707 to 713) SpanInfo: {"start":708,"length":5} + >i = 0 + >:=> (line 29, col 73) to (line 29, col 78) +29 >for (let {name: nameA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (714 to 720) SpanInfo: {"start":715,"length":5} + >i < 1 + >:=> (line 29, col 80) to (line 29, col 85) +29 >for (let {name: nameA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (721 to 728) SpanInfo: {"start":722,"length":3} + >i++ + >:=> (line 29, col 87) to (line 29, col 90) +-------------------------------- +30 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (729 to 752) SpanInfo: {"start":733,"length":18} + >console.log(nameA) + >:=> (line 30, col 4) to (line 30, col 22) +-------------------------------- +31 >} + + ~~ => Pos: (753 to 754) SpanInfo: {"start":733,"length":18} + >console.log(nameA) + >:=> (line 30, col 4) to (line 30, col 22) +-------------------------------- +32 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~ => Pos: (755 to 772) SpanInfo: {"start":766,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 32, col 11) to (line 32, col 63) +32 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (773 to 793) SpanInfo: {"start":776,"length":17} + >primary: primaryA + >:=> (line 32, col 21) to (line 32, col 38) +32 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (794 to 817) SpanInfo: {"start":795,"length":21} + >secondary: secondaryA + >:=> (line 32, col 40) to (line 32, col 61) +32 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~=> Pos: (818 to 833) SpanInfo: {"start":766,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 32, col 11) to (line 32, col 63) +32 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (834 to 840) SpanInfo: {"start":835,"length":5} + >i = 0 + >:=> (line 32, col 80) to (line 32, col 85) +32 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (841 to 847) SpanInfo: {"start":842,"length":5} + >i < 1 + >:=> (line 32, col 87) to (line 32, col 92) +32 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (848 to 855) SpanInfo: {"start":849,"length":3} + >i++ + >:=> (line 32, col 94) to (line 32, col 97) +-------------------------------- +33 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (856 to 882) SpanInfo: {"start":860,"length":21} + >console.log(primaryA) + >:=> (line 33, col 4) to (line 33, col 25) +-------------------------------- +34 >} + + ~~ => Pos: (883 to 884) SpanInfo: {"start":860,"length":21} + >console.log(primaryA) + >:=> (line 33, col 4) to (line 33, col 25) +-------------------------------- +35 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~ => Pos: (885 to 902) SpanInfo: {"start":896,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 35, col 11) to (line 35, col 63) +35 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (903 to 923) SpanInfo: {"start":906,"length":17} + >primary: primaryA + >:=> (line 35, col 21) to (line 35, col 38) +35 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (924 to 947) SpanInfo: {"start":925,"length":21} + >secondary: secondaryA + >:=> (line 35, col 40) to (line 35, col 61) +35 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~=> Pos: (948 to 951) SpanInfo: {"start":896,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 35, col 11) to (line 35, col 63) +35 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~=> Pos: (952 to 968) SpanInfo: {"start":953,"length":15} + >getMultiRobot() + >:=> (line 35, col 68) to (line 35, col 83) +35 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (969 to 975) SpanInfo: {"start":970,"length":5} + >i = 0 + >:=> (line 35, col 85) to (line 35, col 90) +35 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (976 to 982) SpanInfo: {"start":977,"length":5} + >i < 1 + >:=> (line 35, col 92) to (line 35, col 97) +35 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (983 to 990) SpanInfo: {"start":984,"length":3} + >i++ + >:=> (line 35, col 99) to (line 35, col 102) +-------------------------------- +36 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (991 to 1017) SpanInfo: {"start":995,"length":21} + >console.log(primaryA) + >:=> (line 36, col 4) to (line 36, col 25) +-------------------------------- +37 >} + + ~~ => Pos: (1018 to 1019) SpanInfo: {"start":995,"length":21} + >console.log(primaryA) + >:=> (line 36, col 4) to (line 36, col 25) +-------------------------------- +38 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = + + ~~~~~~~~~~~~~~~~~~ => Pos: (1020 to 1037) SpanInfo: {"start":1031,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 38, col 11) to (line 38, col 63) +38 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (1038 to 1058) SpanInfo: {"start":1041,"length":17} + >primary: primaryA + >:=> (line 38, col 21) to (line 38, col 38) +38 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1059 to 1082) SpanInfo: {"start":1060,"length":21} + >secondary: secondaryA + >:=> (line 38, col 40) to (line 38, col 61) +38 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = + + ~~~~~=> Pos: (1083 to 1087) SpanInfo: {"start":1031,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 38, col 11) to (line 38, col 63) +-------------------------------- +39 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1088 to 1178) SpanInfo: {"start":1031,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 38, col 11) to (line 38, col 63) +-------------------------------- +40 > i = 0; i < 1; i++) { + + ~~~~~~~~~~ => Pos: (1179 to 1188) SpanInfo: {"start":1183,"length":5} + >i = 0 + >:=> (line 40, col 4) to (line 40, col 9) +40 > i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1189 to 1195) SpanInfo: {"start":1190,"length":5} + >i < 1 + >:=> (line 40, col 11) to (line 40, col 16) +40 > i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (1196 to 1203) SpanInfo: {"start":1197,"length":3} + >i++ + >:=> (line 40, col 18) to (line 40, col 21) +-------------------------------- +41 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1204 to 1230) SpanInfo: {"start":1208,"length":21} + >console.log(primaryA) + >:=> (line 41, col 4) to (line 41, col 25) +-------------------------------- +42 >} + + ~~ => Pos: (1231 to 1232) SpanInfo: {"start":1208,"length":21} + >console.log(primaryA) + >:=> (line 41, col 4) to (line 41, col 25) +-------------------------------- +43 >for (let {name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1233 to 1254) SpanInfo: {"start":1243,"length":11} + >name: nameA + >:=> (line 43, col 10) to (line 43, col 21) +43 >for (let {name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1255 to 1279) SpanInfo: {"start":1256,"length":13} + >skill: skillA + >:=> (line 43, col 23) to (line 43, col 36) +43 >for (let {name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1280 to 1286) SpanInfo: {"start":1281,"length":5} + >i = 0 + >:=> (line 43, col 48) to (line 43, col 53) +43 >for (let {name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1287 to 1293) SpanInfo: {"start":1288,"length":5} + >i < 1 + >:=> (line 43, col 55) to (line 43, col 60) +43 >for (let {name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1294 to 1301) SpanInfo: {"start":1295,"length":3} + >i++ + >:=> (line 43, col 62) to (line 43, col 65) +-------------------------------- +44 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1302 to 1325) SpanInfo: {"start":1306,"length":18} + >console.log(nameA) + >:=> (line 44, col 4) to (line 44, col 22) +-------------------------------- +45 >} + + ~~ => Pos: (1326 to 1327) SpanInfo: {"start":1306,"length":18} + >console.log(nameA) + >:=> (line 44, col 4) to (line 44, col 22) +-------------------------------- +46 >for (let {name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1328 to 1349) SpanInfo: {"start":1338,"length":11} + >name: nameA + >:=> (line 46, col 10) to (line 46, col 21) +46 >for (let {name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~ => Pos: (1350 to 1367) SpanInfo: {"start":1351,"length":13} + >skill: skillA + >:=> (line 46, col 23) to (line 46, col 36) +46 >for (let {name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~=> Pos: (1368 to 1379) SpanInfo: {"start":1369,"length":10} + >getRobot() + >:=> (line 46, col 41) to (line 46, col 51) +46 >for (let {name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1380 to 1386) SpanInfo: {"start":1381,"length":5} + >i = 0 + >:=> (line 46, col 53) to (line 46, col 58) +46 >for (let {name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1387 to 1393) SpanInfo: {"start":1388,"length":5} + >i < 1 + >:=> (line 46, col 60) to (line 46, col 65) +46 >for (let {name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1394 to 1401) SpanInfo: {"start":1395,"length":3} + >i++ + >:=> (line 46, col 67) to (line 46, col 70) +-------------------------------- +47 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1402 to 1425) SpanInfo: {"start":1406,"length":18} + >console.log(nameA) + >:=> (line 47, col 4) to (line 47, col 22) +-------------------------------- +48 >} + + ~~ => Pos: (1426 to 1427) SpanInfo: {"start":1406,"length":18} + >console.log(nameA) + >:=> (line 47, col 4) to (line 47, col 22) +-------------------------------- +49 >for (let {name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1428 to 1449) SpanInfo: {"start":1438,"length":11} + >name: nameA + >:=> (line 49, col 10) to (line 49, col 21) +49 >for (let {name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1450 to 1514) SpanInfo: {"start":1451,"length":13} + >skill: skillA + >:=> (line 49, col 23) to (line 49, col 36) +49 >for (let {name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1515 to 1521) SpanInfo: {"start":1516,"length":5} + >i = 0 + >:=> (line 49, col 88) to (line 49, col 93) +49 >for (let {name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1522 to 1528) SpanInfo: {"start":1523,"length":5} + >i < 1 + >:=> (line 49, col 95) to (line 49, col 100) +49 >for (let {name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1529 to 1536) SpanInfo: {"start":1530,"length":3} + >i++ + >:=> (line 49, col 102) to (line 49, col 105) +-------------------------------- +50 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1537 to 1560) SpanInfo: {"start":1541,"length":18} + >console.log(nameA) + >:=> (line 50, col 4) to (line 50, col 22) +-------------------------------- +51 >} + + ~~ => Pos: (1561 to 1562) SpanInfo: {"start":1541,"length":18} + >console.log(nameA) + >:=> (line 50, col 4) to (line 50, col 22) +-------------------------------- +52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1563 to 1584) SpanInfo: {"start":1573,"length":11} + >name: nameA + >:=> (line 52, col 10) to (line 52, col 21) +52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (1585 to 1592) SpanInfo: {"start":1586,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 52, col 23) to (line 52, col 75) +52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~=> Pos: (1593 to 1613) SpanInfo: {"start":1596,"length":17} + >primary: primaryA + >:=> (line 52, col 33) to (line 52, col 50) +52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1614 to 1637) SpanInfo: {"start":1615,"length":21} + >secondary: secondaryA + >:=> (line 52, col 52) to (line 52, col 73) +52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~=> Pos: (1638 to 1653) SpanInfo: {"start":1586,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 52, col 23) to (line 52, col 75) +52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1654 to 1660) SpanInfo: {"start":1655,"length":5} + >i = 0 + >:=> (line 52, col 92) to (line 52, col 97) +52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1661 to 1667) SpanInfo: {"start":1662,"length":5} + >i < 1 + >:=> (line 52, col 99) to (line 52, col 104) +52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1668 to 1675) SpanInfo: {"start":1669,"length":3} + >i++ + >:=> (line 52, col 106) to (line 52, col 109) +-------------------------------- +53 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1676 to 1702) SpanInfo: {"start":1680,"length":21} + >console.log(primaryA) + >:=> (line 53, col 4) to (line 53, col 25) +-------------------------------- +54 >} + + ~~ => Pos: (1703 to 1704) SpanInfo: {"start":1680,"length":21} + >console.log(primaryA) + >:=> (line 53, col 4) to (line 53, col 25) +-------------------------------- +55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1705 to 1726) SpanInfo: {"start":1715,"length":11} + >name: nameA + >:=> (line 55, col 10) to (line 55, col 21) +55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (1727 to 1734) SpanInfo: {"start":1728,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 55, col 23) to (line 55, col 75) +55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~=> Pos: (1735 to 1755) SpanInfo: {"start":1738,"length":17} + >primary: primaryA + >:=> (line 55, col 33) to (line 55, col 50) +55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1756 to 1779) SpanInfo: {"start":1757,"length":21} + >secondary: secondaryA + >:=> (line 55, col 52) to (line 55, col 73) +55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~=> Pos: (1780 to 1783) SpanInfo: {"start":1728,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 55, col 23) to (line 55, col 75) +55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~=> Pos: (1784 to 1800) SpanInfo: {"start":1785,"length":15} + >getMultiRobot() + >:=> (line 55, col 80) to (line 55, col 95) +55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1801 to 1807) SpanInfo: {"start":1802,"length":5} + >i = 0 + >:=> (line 55, col 97) to (line 55, col 102) +55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1808 to 1814) SpanInfo: {"start":1809,"length":5} + >i < 1 + >:=> (line 55, col 104) to (line 55, col 109) +55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1815 to 1822) SpanInfo: {"start":1816,"length":3} + >i++ + >:=> (line 55, col 111) to (line 55, col 114) +-------------------------------- +56 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1823 to 1849) SpanInfo: {"start":1827,"length":21} + >console.log(primaryA) + >:=> (line 56, col 4) to (line 56, col 25) +-------------------------------- +57 >} + + ~~ => Pos: (1850 to 1851) SpanInfo: {"start":1827,"length":21} + >console.log(primaryA) + >:=> (line 56, col 4) to (line 56, col 25) +-------------------------------- +58 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = + + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1852 to 1873) SpanInfo: {"start":1862,"length":11} + >name: nameA + >:=> (line 58, col 10) to (line 58, col 21) +58 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = + + ~~~~~~~~ => Pos: (1874 to 1881) SpanInfo: {"start":1875,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 58, col 23) to (line 58, col 75) +58 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = + + ~~~~~~~~~~~~~~~~~~~~~=> Pos: (1882 to 1902) SpanInfo: {"start":1885,"length":17} + >primary: primaryA + >:=> (line 58, col 33) to (line 58, col 50) +58 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1903 to 1926) SpanInfo: {"start":1904,"length":21} + >secondary: secondaryA + >:=> (line 58, col 52) to (line 58, col 73) +58 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = + + ~~~~~=> Pos: (1927 to 1931) SpanInfo: {"start":1875,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 58, col 23) to (line 58, col 75) +-------------------------------- +59 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1932 to 2022) SpanInfo: {"start":1875,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 58, col 23) to (line 58, col 75) +-------------------------------- +60 > i = 0; i < 1; i++) { + + ~~~~~~~~~~ => Pos: (2023 to 2032) SpanInfo: {"start":2027,"length":5} + >i = 0 + >:=> (line 60, col 4) to (line 60, col 9) +60 > i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (2033 to 2039) SpanInfo: {"start":2034,"length":5} + >i < 1 + >:=> (line 60, col 11) to (line 60, col 16) +60 > i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (2040 to 2047) SpanInfo: {"start":2041,"length":3} + >i++ + >:=> (line 60, col 18) to (line 60, col 21) +-------------------------------- +61 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2048 to 2074) SpanInfo: {"start":2052,"length":21} + >console.log(primaryA) + >:=> (line 61, col 4) to (line 61, col 25) +-------------------------------- +62 >} + ~ => Pos: (2075 to 2075) SpanInfo: {"start":2052,"length":21} + >console.log(primaryA) + >:=> (line 61, col 4) to (line 61, col 25) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringForObjectBindingPatternDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringForObjectBindingPatternDefaultValues.baseline new file mode 100644 index 00000000000..6c7735f2b83 --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringForObjectBindingPatternDefaultValues.baseline @@ -0,0 +1,857 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: any): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (48 to 49) SpanInfo: undefined +-------------------------------- +4 >interface Robot { + + ~~~~~~~~~~~~~~~~~~ => Pos: (50 to 67) SpanInfo: undefined +-------------------------------- +5 > name: string; + + ~~~~~~~~~~~~~~~~~~ => Pos: (68 to 85) SpanInfo: undefined +-------------------------------- +6 > skill: string; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (86 to 104) SpanInfo: undefined +-------------------------------- +7 >} + + ~~ => Pos: (105 to 106) SpanInfo: undefined +-------------------------------- +8 >interface MultiRobot { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (107 to 129) SpanInfo: undefined +-------------------------------- +9 > name: string; + + ~~~~~~~~~~~~~~~~~~ => Pos: (130 to 147) SpanInfo: undefined +-------------------------------- +10 > skills: { + + ~~~~~~~~~~~~~~ => Pos: (148 to 161) SpanInfo: undefined +-------------------------------- +11 > primary?: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (162 to 187) SpanInfo: undefined +-------------------------------- +12 > secondary?: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (188 to 215) SpanInfo: undefined +-------------------------------- +13 > }; + + ~~~~~~~ => Pos: (216 to 222) SpanInfo: undefined +-------------------------------- +14 >} + + ~~ => Pos: (223 to 224) SpanInfo: undefined +-------------------------------- +15 >let robot: Robot = { name: "mower", skill: "mowing" }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (225 to 279) SpanInfo: {"start":225,"length":53} + >let robot: Robot = { name: "mower", skill: "mowing" } + >:=> (line 15, col 0) to (line 15, col 53) +-------------------------------- +16 >let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (280 to 377) SpanInfo: {"start":280,"length":96} + >let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } } + >:=> (line 16, col 0) to (line 16, col 96) +-------------------------------- +17 >function getRobot() { + + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (378 to 399) SpanInfo: {"start":404,"length":12} + >return robot + >:=> (line 18, col 4) to (line 18, col 16) +-------------------------------- +18 > return robot; + + ~~~~~~~~~~~~~~~~~~ => Pos: (400 to 417) SpanInfo: {"start":404,"length":12} + >return robot + >:=> (line 18, col 4) to (line 18, col 16) +-------------------------------- +19 >} + + ~~ => Pos: (418 to 419) SpanInfo: {"start":418,"length":1} + >} + >:=> (line 19, col 0) to (line 19, col 1) +-------------------------------- +20 >function getMultiRobot() { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (420 to 446) SpanInfo: {"start":451,"length":17} + >return multiRobot + >:=> (line 21, col 4) to (line 21, col 21) +-------------------------------- +21 > return multiRobot; + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (447 to 469) SpanInfo: {"start":451,"length":17} + >return multiRobot + >:=> (line 21, col 4) to (line 21, col 21) +-------------------------------- +22 >} + + ~~ => Pos: (470 to 471) SpanInfo: {"start":470,"length":1} + >} + >:=> (line 22, col 0) to (line 22, col 1) +-------------------------------- +23 >for (let {name: nameA= "noName" } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (472 to 513) SpanInfo: {"start":482,"length":21} + >name: nameA= "noName" + >:=> (line 23, col 10) to (line 23, col 31) +23 >for (let {name: nameA= "noName" } = robot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (514 to 520) SpanInfo: {"start":515,"length":5} + >i = 0 + >:=> (line 23, col 43) to (line 23, col 48) +23 >for (let {name: nameA= "noName" } = robot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (521 to 527) SpanInfo: {"start":522,"length":5} + >i < 1 + >:=> (line 23, col 50) to (line 23, col 55) +23 >for (let {name: nameA= "noName" } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (528 to 535) SpanInfo: {"start":529,"length":3} + >i++ + >:=> (line 23, col 57) to (line 23, col 60) +-------------------------------- +24 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (536 to 559) SpanInfo: {"start":540,"length":18} + >console.log(nameA) + >:=> (line 24, col 4) to (line 24, col 22) +-------------------------------- +25 >} + + ~~ => Pos: (560 to 561) SpanInfo: {"start":540,"length":18} + >console.log(nameA) + >:=> (line 24, col 4) to (line 24, col 22) +-------------------------------- +26 >for (let {name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (562 to 597) SpanInfo: {"start":572,"length":22} + >name: nameA = "noName" + >:=> (line 26, col 10) to (line 26, col 32) +26 >for (let {name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~=> Pos: (598 to 609) SpanInfo: {"start":599,"length":10} + >getRobot() + >:=> (line 26, col 37) to (line 26, col 47) +26 >for (let {name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (610 to 616) SpanInfo: {"start":611,"length":5} + >i = 0 + >:=> (line 26, col 49) to (line 26, col 54) +26 >for (let {name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (617 to 623) SpanInfo: {"start":618,"length":5} + >i < 1 + >:=> (line 26, col 56) to (line 26, col 61) +26 >for (let {name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (624 to 631) SpanInfo: {"start":625,"length":3} + >i++ + >:=> (line 26, col 63) to (line 26, col 66) +-------------------------------- +27 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (632 to 655) SpanInfo: {"start":636,"length":18} + >console.log(nameA) + >:=> (line 27, col 4) to (line 27, col 22) +-------------------------------- +28 >} + + ~~ => Pos: (656 to 657) SpanInfo: {"start":636,"length":18} + >console.log(nameA) + >:=> (line 27, col 4) to (line 27, col 22) +-------------------------------- +29 >for (let {name: nameA = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (658 to 740) SpanInfo: {"start":668,"length":22} + >name: nameA = "noName" + >:=> (line 29, col 10) to (line 29, col 32) +29 >for (let {name: nameA = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (741 to 747) SpanInfo: {"start":742,"length":5} + >i = 0 + >:=> (line 29, col 84) to (line 29, col 89) +29 >for (let {name: nameA = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (748 to 754) SpanInfo: {"start":749,"length":5} + >i < 1 + >:=> (line 29, col 91) to (line 29, col 96) +29 >for (let {name: nameA = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (755 to 762) SpanInfo: {"start":756,"length":3} + >i++ + >:=> (line 29, col 98) to (line 29, col 101) +-------------------------------- +30 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (763 to 786) SpanInfo: {"start":767,"length":18} + >console.log(nameA) + >:=> (line 30, col 4) to (line 30, col 22) +-------------------------------- +31 >} + + ~~ => Pos: (787 to 788) SpanInfo: {"start":767,"length":18} + >console.log(nameA) + >:=> (line 30, col 4) to (line 30, col 22) +-------------------------------- +32 >for (let { + + ~~~~~~~~~~~ => Pos: (789 to 799) SpanInfo: {"start":804,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 33, col 4) to (line 36, col 46) +-------------------------------- +33 > skills: { + + ~~~~~~~~~~~ => Pos: (800 to 810) SpanInfo: {"start":804,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 33, col 4) to (line 36, col 46) +33 > skills: { + + ~~~ => Pos: (811 to 813) SpanInfo: {"start":822,"length":29} + >primary: primaryA = "primary" + >:=> (line 34, col 8) to (line 34, col 37) +-------------------------------- +34 > primary: primaryA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (814 to 852) SpanInfo: {"start":822,"length":29} + >primary: primaryA = "primary" + >:=> (line 34, col 8) to (line 34, col 37) +-------------------------------- +35 > secondary: secondaryA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (853 to 896) SpanInfo: {"start":861,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 35, col 8) to (line 35, col 43) +-------------------------------- +36 > } = { primary: "none", secondary: "none" } + + ~~~~~ => Pos: (897 to 901) SpanInfo: {"start":861,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 35, col 8) to (line 35, col 43) +36 > } = { primary: "none", secondary: "none" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (902 to 943) SpanInfo: {"start":804,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 33, col 4) to (line 36, col 46) +-------------------------------- +37 >} = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~ => Pos: (944 to 958) SpanInfo: {"start":804,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 33, col 4) to (line 36, col 46) +37 >} = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (959 to 965) SpanInfo: {"start":960,"length":5} + >i = 0 + >:=> (line 37, col 16) to (line 37, col 21) +37 >} = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (966 to 972) SpanInfo: {"start":967,"length":5} + >i < 1 + >:=> (line 37, col 23) to (line 37, col 28) +37 >} = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (973 to 980) SpanInfo: {"start":974,"length":3} + >i++ + >:=> (line 37, col 30) to (line 37, col 33) +-------------------------------- +38 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (981 to 1007) SpanInfo: {"start":985,"length":21} + >console.log(primaryA) + >:=> (line 38, col 4) to (line 38, col 25) +-------------------------------- +39 >} + + ~~ => Pos: (1008 to 1009) SpanInfo: {"start":985,"length":21} + >console.log(primaryA) + >:=> (line 38, col 4) to (line 38, col 25) +-------------------------------- +40 >for (let { + + ~~~~~~~~~~~ => Pos: (1010 to 1020) SpanInfo: {"start":1025,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 41, col 4) to (line 44, col 46) +-------------------------------- +41 > skills: { + + ~~~~~~~~~~~ => Pos: (1021 to 1031) SpanInfo: {"start":1025,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 41, col 4) to (line 44, col 46) +41 > skills: { + + ~~~ => Pos: (1032 to 1034) SpanInfo: {"start":1043,"length":29} + >primary: primaryA = "primary" + >:=> (line 42, col 8) to (line 42, col 37) +-------------------------------- +42 > primary: primaryA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1035 to 1073) SpanInfo: {"start":1043,"length":29} + >primary: primaryA = "primary" + >:=> (line 42, col 8) to (line 42, col 37) +-------------------------------- +43 > secondary: secondaryA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1074 to 1117) SpanInfo: {"start":1082,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 43, col 8) to (line 43, col 43) +-------------------------------- +44 > } = { primary: "none", secondary: "none" } + + ~~~~~ => Pos: (1118 to 1122) SpanInfo: {"start":1082,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 43, col 8) to (line 43, col 43) +44 > } = { primary: "none", secondary: "none" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1123 to 1164) SpanInfo: {"start":1025,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 41, col 4) to (line 44, col 46) +-------------------------------- +45 >} = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~ => Pos: (1165 to 1167) SpanInfo: {"start":1025,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 41, col 4) to (line 44, col 46) +45 >} = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~ => Pos: (1168 to 1184) SpanInfo: {"start":1169,"length":15} + >getMultiRobot() + >:=> (line 45, col 4) to (line 45, col 19) +45 >} = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1185 to 1191) SpanInfo: {"start":1186,"length":5} + >i = 0 + >:=> (line 45, col 21) to (line 45, col 26) +45 >} = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1192 to 1198) SpanInfo: {"start":1193,"length":5} + >i < 1 + >:=> (line 45, col 28) to (line 45, col 33) +45 >} = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (1199 to 1206) SpanInfo: {"start":1200,"length":3} + >i++ + >:=> (line 45, col 35) to (line 45, col 38) +-------------------------------- +46 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1207 to 1233) SpanInfo: {"start":1211,"length":21} + >console.log(primaryA) + >:=> (line 46, col 4) to (line 46, col 25) +-------------------------------- +47 >} + + ~~ => Pos: (1234 to 1235) SpanInfo: {"start":1211,"length":21} + >console.log(primaryA) + >:=> (line 46, col 4) to (line 46, col 25) +-------------------------------- +48 >for (let { + + ~~~~~~~~~~~ => Pos: (1236 to 1246) SpanInfo: {"start":1251,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 49, col 4) to (line 52, col 46) +-------------------------------- +49 > skills: { + + ~~~~~~~~~~~ => Pos: (1247 to 1257) SpanInfo: {"start":1251,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 49, col 4) to (line 52, col 46) +49 > skills: { + + ~~~ => Pos: (1258 to 1260) SpanInfo: {"start":1269,"length":29} + >primary: primaryA = "primary" + >:=> (line 50, col 8) to (line 50, col 37) +-------------------------------- +50 > primary: primaryA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1261 to 1299) SpanInfo: {"start":1269,"length":29} + >primary: primaryA = "primary" + >:=> (line 50, col 8) to (line 50, col 37) +-------------------------------- +51 > secondary: secondaryA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1300 to 1343) SpanInfo: {"start":1308,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 51, col 8) to (line 51, col 43) +-------------------------------- +52 > } = { primary: "none", secondary: "none" } + + ~~~~~ => Pos: (1344 to 1348) SpanInfo: {"start":1308,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 51, col 8) to (line 51, col 43) +52 > } = { primary: "none", secondary: "none" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1349 to 1390) SpanInfo: {"start":1251,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 49, col 4) to (line 52, col 46) +-------------------------------- +53 >} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1391 to 1481) SpanInfo: {"start":1251,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 49, col 4) to (line 52, col 46) +-------------------------------- +54 > i = 0; i < 1; i++) { + + ~~~~~~~~~~ => Pos: (1482 to 1491) SpanInfo: {"start":1486,"length":5} + >i = 0 + >:=> (line 54, col 4) to (line 54, col 9) +54 > i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1492 to 1498) SpanInfo: {"start":1493,"length":5} + >i < 1 + >:=> (line 54, col 11) to (line 54, col 16) +54 > i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (1499 to 1506) SpanInfo: {"start":1500,"length":3} + >i++ + >:=> (line 54, col 18) to (line 54, col 21) +-------------------------------- +55 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1507 to 1533) SpanInfo: {"start":1511,"length":21} + >console.log(primaryA) + >:=> (line 55, col 4) to (line 55, col 25) +-------------------------------- +56 >} + + ~~ => Pos: (1534 to 1535) SpanInfo: {"start":1511,"length":21} + >console.log(primaryA) + >:=> (line 55, col 4) to (line 55, col 25) +-------------------------------- +57 >for (let {name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1536 to 1568) SpanInfo: {"start":1546,"length":22} + >name: nameA = "noName" + >:=> (line 57, col 10) to (line 57, col 32) +57 >for (let {name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1569 to 1603) SpanInfo: {"start":1570,"length":23} + >skill: skillA = "skill" + >:=> (line 57, col 34) to (line 57, col 57) +57 >for (let {name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1604 to 1610) SpanInfo: {"start":1605,"length":5} + >i = 0 + >:=> (line 57, col 69) to (line 57, col 74) +57 >for (let {name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1611 to 1617) SpanInfo: {"start":1612,"length":5} + >i < 1 + >:=> (line 57, col 76) to (line 57, col 81) +57 >for (let {name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1618 to 1625) SpanInfo: {"start":1619,"length":3} + >i++ + >:=> (line 57, col 83) to (line 57, col 86) +-------------------------------- +58 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1626 to 1649) SpanInfo: {"start":1630,"length":18} + >console.log(nameA) + >:=> (line 58, col 4) to (line 58, col 22) +-------------------------------- +59 >} + + ~~ => Pos: (1650 to 1651) SpanInfo: {"start":1630,"length":18} + >console.log(nameA) + >:=> (line 58, col 4) to (line 58, col 22) +-------------------------------- +60 >for (let {name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1652 to 1684) SpanInfo: {"start":1662,"length":22} + >name: nameA = "noName" + >:=> (line 60, col 10) to (line 60, col 32) +60 >for (let {name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1685 to 1712) SpanInfo: {"start":1686,"length":23} + >skill: skillA = "skill" + >:=> (line 60, col 34) to (line 60, col 57) +60 >for (let {name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~=> Pos: (1713 to 1724) SpanInfo: {"start":1714,"length":10} + >getRobot() + >:=> (line 60, col 62) to (line 60, col 72) +60 >for (let {name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1725 to 1731) SpanInfo: {"start":1726,"length":5} + >i = 0 + >:=> (line 60, col 74) to (line 60, col 79) +60 >for (let {name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1732 to 1738) SpanInfo: {"start":1733,"length":5} + >i < 1 + >:=> (line 60, col 81) to (line 60, col 86) +60 >for (let {name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1739 to 1746) SpanInfo: {"start":1740,"length":3} + >i++ + >:=> (line 60, col 88) to (line 60, col 91) +-------------------------------- +61 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1747 to 1770) SpanInfo: {"start":1751,"length":18} + >console.log(nameA) + >:=> (line 61, col 4) to (line 61, col 22) +-------------------------------- +62 >} + + ~~ => Pos: (1771 to 1772) SpanInfo: {"start":1751,"length":18} + >console.log(nameA) + >:=> (line 61, col 4) to (line 61, col 22) +-------------------------------- +63 >for (let {name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1773 to 1805) SpanInfo: {"start":1783,"length":22} + >name: nameA = "noName" + >:=> (line 63, col 10) to (line 63, col 32) +63 >for (let {name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1806 to 1880) SpanInfo: {"start":1807,"length":23} + >skill: skillA = "skill" + >:=> (line 63, col 34) to (line 63, col 57) +63 >for (let {name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1881 to 1887) SpanInfo: {"start":1882,"length":5} + >i = 0 + >:=> (line 63, col 109) to (line 63, col 114) +63 >for (let {name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1888 to 1894) SpanInfo: {"start":1889,"length":5} + >i < 1 + >:=> (line 63, col 116) to (line 63, col 121) +63 >for (let {name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1895 to 1902) SpanInfo: {"start":1896,"length":3} + >i++ + >:=> (line 63, col 123) to (line 63, col 126) +-------------------------------- +64 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1903 to 1926) SpanInfo: {"start":1907,"length":18} + >console.log(nameA) + >:=> (line 64, col 4) to (line 64, col 22) +-------------------------------- +65 >} + + ~~ => Pos: (1927 to 1928) SpanInfo: {"start":1907,"length":18} + >console.log(nameA) + >:=> (line 64, col 4) to (line 64, col 22) +-------------------------------- +66 >for (let { + + ~~~~~~~~~~~ => Pos: (1929 to 1939) SpanInfo: {"start":1944,"length":22} + >name: nameA = "noName" + >:=> (line 67, col 4) to (line 67, col 26) +-------------------------------- +67 > name: nameA = "noName", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1940 to 1967) SpanInfo: {"start":1944,"length":22} + >name: nameA = "noName" + >:=> (line 67, col 4) to (line 67, col 26) +-------------------------------- +68 > skills: { + + ~~~~~~~~~~~ => Pos: (1968 to 1978) SpanInfo: {"start":1972,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 68, col 4) to (line 71, col 46) +68 > skills: { + + ~~~ => Pos: (1979 to 1981) SpanInfo: {"start":1990,"length":29} + >primary: primaryA = "primary" + >:=> (line 69, col 8) to (line 69, col 37) +-------------------------------- +69 > primary: primaryA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1982 to 2020) SpanInfo: {"start":1990,"length":29} + >primary: primaryA = "primary" + >:=> (line 69, col 8) to (line 69, col 37) +-------------------------------- +70 > secondary: secondaryA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2021 to 2064) SpanInfo: {"start":2029,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 70, col 8) to (line 70, col 43) +-------------------------------- +71 > } = { primary: "none", secondary: "none" } + + ~~~~~ => Pos: (2065 to 2069) SpanInfo: {"start":2029,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 70, col 8) to (line 70, col 43) +71 > } = { primary: "none", secondary: "none" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2070 to 2111) SpanInfo: {"start":1972,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 68, col 4) to (line 71, col 46) +-------------------------------- +72 >} = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~ => Pos: (2112 to 2126) SpanInfo: {"start":1972,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 68, col 4) to (line 71, col 46) +72 >} = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (2127 to 2133) SpanInfo: {"start":2128,"length":5} + >i = 0 + >:=> (line 72, col 16) to (line 72, col 21) +72 >} = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (2134 to 2140) SpanInfo: {"start":2135,"length":5} + >i < 1 + >:=> (line 72, col 23) to (line 72, col 28) +72 >} = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (2141 to 2148) SpanInfo: {"start":2142,"length":3} + >i++ + >:=> (line 72, col 30) to (line 72, col 33) +-------------------------------- +73 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2149 to 2175) SpanInfo: {"start":2153,"length":21} + >console.log(primaryA) + >:=> (line 73, col 4) to (line 73, col 25) +-------------------------------- +74 >} + + ~~ => Pos: (2176 to 2177) SpanInfo: {"start":2153,"length":21} + >console.log(primaryA) + >:=> (line 73, col 4) to (line 73, col 25) +-------------------------------- +75 >for (let { + + ~~~~~~~~~~~ => Pos: (2178 to 2188) SpanInfo: {"start":2193,"length":22} + >name: nameA = "noName" + >:=> (line 76, col 4) to (line 76, col 26) +-------------------------------- +76 > name: nameA = "noName", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2189 to 2216) SpanInfo: {"start":2193,"length":22} + >name: nameA = "noName" + >:=> (line 76, col 4) to (line 76, col 26) +-------------------------------- +77 > skills: { + + ~~~~~~~~~~~ => Pos: (2217 to 2227) SpanInfo: {"start":2221,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 77, col 4) to (line 80, col 46) +77 > skills: { + + ~~~ => Pos: (2228 to 2230) SpanInfo: {"start":2239,"length":29} + >primary: primaryA = "primary" + >:=> (line 78, col 8) to (line 78, col 37) +-------------------------------- +78 > primary: primaryA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2231 to 2269) SpanInfo: {"start":2239,"length":29} + >primary: primaryA = "primary" + >:=> (line 78, col 8) to (line 78, col 37) +-------------------------------- +79 > secondary: secondaryA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2270 to 2313) SpanInfo: {"start":2278,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 79, col 8) to (line 79, col 43) +-------------------------------- +80 > } = { primary: "none", secondary: "none" } + + ~~~~~ => Pos: (2314 to 2318) SpanInfo: {"start":2278,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 79, col 8) to (line 79, col 43) +80 > } = { primary: "none", secondary: "none" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2319 to 2360) SpanInfo: {"start":2221,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 77, col 4) to (line 80, col 46) +-------------------------------- +81 >} = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~ => Pos: (2361 to 2363) SpanInfo: {"start":2221,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 77, col 4) to (line 80, col 46) +81 >} = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~ => Pos: (2364 to 2380) SpanInfo: {"start":2365,"length":15} + >getMultiRobot() + >:=> (line 81, col 4) to (line 81, col 19) +81 >} = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (2381 to 2387) SpanInfo: {"start":2382,"length":5} + >i = 0 + >:=> (line 81, col 21) to (line 81, col 26) +81 >} = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (2388 to 2394) SpanInfo: {"start":2389,"length":5} + >i < 1 + >:=> (line 81, col 28) to (line 81, col 33) +81 >} = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (2395 to 2402) SpanInfo: {"start":2396,"length":3} + >i++ + >:=> (line 81, col 35) to (line 81, col 38) +-------------------------------- +82 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2403 to 2429) SpanInfo: {"start":2407,"length":21} + >console.log(primaryA) + >:=> (line 82, col 4) to (line 82, col 25) +-------------------------------- +83 >} + + ~~ => Pos: (2430 to 2431) SpanInfo: {"start":2407,"length":21} + >console.log(primaryA) + >:=> (line 82, col 4) to (line 82, col 25) +-------------------------------- +84 >for (let { + + ~~~~~~~~~~~ => Pos: (2432 to 2442) SpanInfo: {"start":2447,"length":22} + >name: nameA = "noName" + >:=> (line 85, col 4) to (line 85, col 26) +-------------------------------- +85 > name: nameA = "noName", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2443 to 2470) SpanInfo: {"start":2447,"length":22} + >name: nameA = "noName" + >:=> (line 85, col 4) to (line 85, col 26) +-------------------------------- +86 > skills: { + + ~~~~~~~~~~~ => Pos: (2471 to 2481) SpanInfo: {"start":2475,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 86, col 4) to (line 89, col 46) +86 > skills: { + + ~~~ => Pos: (2482 to 2484) SpanInfo: {"start":2493,"length":29} + >primary: primaryA = "primary" + >:=> (line 87, col 8) to (line 87, col 37) +-------------------------------- +87 > primary: primaryA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2485 to 2523) SpanInfo: {"start":2493,"length":29} + >primary: primaryA = "primary" + >:=> (line 87, col 8) to (line 87, col 37) +-------------------------------- +88 > secondary: secondaryA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2524 to 2567) SpanInfo: {"start":2532,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 88, col 8) to (line 88, col 43) +-------------------------------- +89 > } = { primary: "none", secondary: "none" } + + ~~~~~ => Pos: (2568 to 2572) SpanInfo: {"start":2532,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 88, col 8) to (line 88, col 43) +89 > } = { primary: "none", secondary: "none" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2573 to 2614) SpanInfo: {"start":2475,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 86, col 4) to (line 89, col 46) +-------------------------------- +90 >} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2615 to 2705) SpanInfo: {"start":2475,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 86, col 4) to (line 89, col 46) +-------------------------------- +91 > i = 0; i < 1; i++) { + + ~~~~~~~~~~ => Pos: (2706 to 2715) SpanInfo: {"start":2710,"length":5} + >i = 0 + >:=> (line 91, col 4) to (line 91, col 9) +91 > i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (2716 to 2722) SpanInfo: {"start":2717,"length":5} + >i < 1 + >:=> (line 91, col 11) to (line 91, col 16) +91 > i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (2723 to 2730) SpanInfo: {"start":2724,"length":3} + >i++ + >:=> (line 91, col 18) to (line 91, col 21) +-------------------------------- +92 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2731 to 2757) SpanInfo: {"start":2735,"length":21} + >console.log(primaryA) + >:=> (line 92, col 4) to (line 92, col 25) +-------------------------------- +93 >} + ~ => Pos: (2758 to 2758) SpanInfo: {"start":2735,"length":21} + >console.log(primaryA) + >:=> (line 92, col 4) to (line 92, col 25) \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringForArrayBindingPattern.ts b/tests/cases/fourslash/breakpointValidationDestructuringForArrayBindingPattern.ts new file mode 100644 index 00000000000..c86ac7b0f30 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringForArrayBindingPattern.ts @@ -0,0 +1,95 @@ +/// +////declare var console: { +//// log(msg: any): void; +////} +////type Robot = [number, string, string]; +////type MultiSkilledRobot = [string, [string, string]]; +//// +////let robotA: Robot = [1, "mower", "mowing"]; +////function getRobot() { +//// return robotA; +////} +//// +////let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +////let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +////function getMultiRobot() { +//// return multiRobotA; +////} +//// +////for (let [, nameA] = robotA, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for (let [, nameA] = getRobot(), i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for (let [, nameA] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for (let [, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { +//// console.log(primarySkillA); +////} +////for (let [, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { +//// console.log(primarySkillA); +////} +////for (let [, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +//// console.log(primarySkillA); +////} +//// +////for (let [numberB] = robotA, i = 0; i < 1; i++) { +//// console.log(numberB); +////} +////for (let [numberB] = getRobot(), i = 0; i < 1; i++) { +//// console.log(numberB); +////} +////for (let [numberB] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +//// console.log(numberB); +////} +////for (let [nameB] = multiRobotA, i = 0; i < 1; i++) { +//// console.log(nameB); +////} +////for (let [nameB] = getMultiRobot(), i = 0; i < 1; i++) { +//// console.log(nameB); +////} +////for (let [nameB] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +//// console.log(nameB); +////} +//// +////for (let [numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { +//// console.log(nameA2); +////} +////for (let [numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { +//// console.log(nameA2); +////} +////for (let [numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +//// console.log(nameA2); +////} +////for (let [nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { +//// console.log(nameMA); +////} +////for (let [nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { +//// console.log(nameMA); +////} +////for (let [nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +//// console.log(nameMA); +////} +//// +////for (let [numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { +//// console.log(numberA3); +////} +////for (let [numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { +//// console.log(numberA3); +////} +////for (let [numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +//// console.log(numberA3); +////} +////for (let [...multiRobotAInfo] = multiRobotA, i = 0; i < 1; i++) { +//// console.log(multiRobotAInfo); +////} +////for (let [...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { +//// console.log(multiRobotAInfo); +////} +////for (let [...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +//// console.log(multiRobotAInfo); +////} + +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringForArrayBindingPatternDefaultValues.ts b/tests/cases/fourslash/breakpointValidationDestructuringForArrayBindingPatternDefaultValues.ts new file mode 100644 index 00000000000..2ea402297b8 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringForArrayBindingPatternDefaultValues.ts @@ -0,0 +1,104 @@ +/// +////declare var console: { +//// log(msg: any): void; +////} +////type Robot = [number, string, string]; +////type MultiSkilledRobot = [string, string[]]; +////let robotA: Robot = [1, "mower", "mowing"]; +////function getRobot() { +//// return robotA; +////} +////let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +////let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +////function getMultiRobot() { +//// return multiRobotA; +////} +////for (let [, nameA ="name"] = robotA, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for (let [, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for (let [, nameA = "name"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for (let [, [ +//// primarySkillA = "primary", +//// secondarySkillA = "secondary" +////] = ["none", "none"]] = multiRobotA, i = 0; i < 1; i++) { +//// console.log(primarySkillA); +////} +////for (let [, [ +//// primarySkillA = "primary", +//// secondarySkillA = "secondary" +////] = ["none", "none"]] = getMultiRobot(), i = 0; i < 1; i++) { +//// console.log(primarySkillA); +////} +////for (let [, [ +//// primarySkillA = "primary", +//// secondarySkillA = "secondary" +////] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +//// console.log(primarySkillA); +////} +////for (let [numberB = -1] = robotA, i = 0; i < 1; i++) { +//// console.log(numberB); +////} +////for (let [numberB = -1] = getRobot(), i = 0; i < 1; i++) { +//// console.log(numberB); +////} +////for (let [numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +//// console.log(numberB); +////} +////for (let [nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { +//// console.log(nameB); +////} +////for (let [nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { +//// console.log(nameB); +////} +////for (let [nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +//// console.log(nameB); +////} +////for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { +//// console.log(nameA2); +////} +////for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { +//// console.log(nameA2); +////} +////for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +//// console.log(nameA2); +////} +////for (let +//// [nameMA = "noName", +//// [ +//// primarySkillA = "primary", +//// secondarySkillA = "secondary" +//// ] = ["none", "none"] +//// ] = multiRobotA, i = 0; i < 1; i++) { +//// console.log(nameMA); +////} +////for (let [nameMA = "noName", +//// [ +//// primarySkillA = "primary", +//// secondarySkillA = "secondary" +//// ] = ["none", "none"] +////] = getMultiRobot(), i = 0; i < 1; i++) { +//// console.log(nameMA); +////} +////for (let [nameMA = "noName", +//// [ +//// primarySkillA = "primary", +//// secondarySkillA = "secondary" +//// ] = ["none", "none"] +////] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +//// console.log(nameMA); +////} +////for (let [numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { +//// console.log(numberA3); +////} +////for (let [numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { +//// console.log(numberA3); +////} +////for (let [numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +//// console.log(numberA3); +////} +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringForObjectBindingPattern.ts b/tests/cases/fourslash/breakpointValidationDestructuringForObjectBindingPattern.ts new file mode 100644 index 00000000000..fedbe748034 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringForObjectBindingPattern.ts @@ -0,0 +1,64 @@ +/// +////declare var console: { +//// log(msg: any): void; +////} +////interface Robot { +//// name: string; +//// skill: string; +////} +////interface MultiRobot { +//// name: string; +//// skills: { +//// primary: string; +//// secondary: string; +//// }; +////} +////let robot: Robot = { name: "mower", skill: "mowing" }; +////let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +////function getRobot() { +//// return robot; +////} +////function getMultiRobot() { +//// return multiRobot; +////} +////for (let {name: nameA } = robot, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for (let {name: nameA } = getRobot(), i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for (let {name: nameA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for (let { skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for (let { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for (let { skills: { primary: primaryA, secondary: secondaryA } } = +//// { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +//// i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for (let {name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for (let {name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for (let {name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = +//// { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +//// i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringForObjectBindingPatternDefaultValues.ts b/tests/cases/fourslash/breakpointValidationDestructuringForObjectBindingPatternDefaultValues.ts new file mode 100644 index 00000000000..9ee1e75b0bf --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringForObjectBindingPatternDefaultValues.ts @@ -0,0 +1,96 @@ +/// +////declare var console: { +//// log(msg: any): void; +////} +////interface Robot { +//// name: string; +//// skill: string; +////} +////interface MultiRobot { +//// name: string; +//// skills: { +//// primary?: string; +//// secondary?: string; +//// }; +////} +////let robot: Robot = { name: "mower", skill: "mowing" }; +////let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +////function getRobot() { +//// return robot; +////} +////function getMultiRobot() { +//// return multiRobot; +////} +////for (let {name: nameA= "noName" } = robot, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for (let {name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for (let {name: nameA = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for (let { +//// skills: { +//// primary: primaryA = "primary", +//// secondary: secondaryA = "secondary" +//// } = { primary: "none", secondary: "none" } +////} = multiRobot, i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for (let { +//// skills: { +//// primary: primaryA = "primary", +//// secondary: secondaryA = "secondary" +//// } = { primary: "none", secondary: "none" } +////} = getMultiRobot(), i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for (let { +//// skills: { +//// primary: primaryA = "primary", +//// secondary: secondaryA = "secondary" +//// } = { primary: "none", secondary: "none" } +////} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +//// i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for (let {name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for (let {name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for (let {name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for (let { +//// name: nameA = "noName", +//// skills: { +//// primary: primaryA = "primary", +//// secondary: secondaryA = "secondary" +//// } = { primary: "none", secondary: "none" } +////} = multiRobot, i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for (let { +//// name: nameA = "noName", +//// skills: { +//// primary: primaryA = "primary", +//// secondary: secondaryA = "secondary" +//// } = { primary: "none", secondary: "none" } +////} = getMultiRobot(), i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for (let { +//// name: nameA = "noName", +//// skills: { +//// primary: primaryA = "primary", +//// secondary: secondaryA = "secondary" +//// } = { primary: "none", secondary: "none" } +////} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +//// i = 0; i < 1; i++) { +//// console.log(primaryA); +////} + +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file From c5407a36d66fcd925b38865cc3b02d3347d4cea2 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 21 Dec 2015 11:53:31 -0800 Subject: [PATCH 071/209] Test cases for destructuring in For Of statement --- ...ructuringForOfArrayBindingPattern.baseline | 978 +++++++++++++++ ...fArrayBindingPatternDefaultValues.baseline | 1061 +++++++++++++++++ ...ucturingForOfObjectBindingPattern.baseline | 635 ++++++++++ ...ObjectBindingPatternDefaultValues.baseline | 855 +++++++++++++ ...onDestructuringForOfArrayBindingPattern.ts | 91 ++ ...ngForOfArrayBindingPatternDefaultValues.ts | 100 ++ ...nDestructuringForOfObjectBindingPattern.ts | 63 + ...gForOfObjectBindingPatternDefaultValues.ts | 85 ++ 8 files changed, 3868 insertions(+) create mode 100644 tests/baselines/reference/bpSpanDestructuringForOfArrayBindingPattern.baseline create mode 100644 tests/baselines/reference/bpSpanDestructuringForOfArrayBindingPatternDefaultValues.baseline create mode 100644 tests/baselines/reference/bpSpanDestructuringForOfObjectBindingPattern.baseline create mode 100644 tests/baselines/reference/bpSpanDestructuringForOfObjectBindingPatternDefaultValues.baseline create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringForOfArrayBindingPattern.ts create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringForOfArrayBindingPatternDefaultValues.ts create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringForOfObjectBindingPattern.ts create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringForOfObjectBindingPatternDefaultValues.ts diff --git a/tests/baselines/reference/bpSpanDestructuringForOfArrayBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringForOfArrayBindingPattern.baseline new file mode 100644 index 00000000000..ea915b80e6a --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringForOfArrayBindingPattern.baseline @@ -0,0 +1,978 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: any): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (48 to 49) SpanInfo: undefined +-------------------------------- +4 >type Robot = [number, string, string]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 88) SpanInfo: undefined +-------------------------------- +5 >type MultiSkilledRobot = [string, [string, string]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (89 to 141) SpanInfo: undefined +-------------------------------- +6 >let robotA: Robot = [1, "mower", "mowing"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (142 to 185) SpanInfo: {"start":142,"length":42} + >let robotA: Robot = [1, "mower", "mowing"] + >:=> (line 6, col 0) to (line 6, col 42) +-------------------------------- +7 >let robotB: Robot = [2, "trimmer", "trimming"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (186 to 233) SpanInfo: {"start":186,"length":46} + >let robotB: Robot = [2, "trimmer", "trimming"] + >:=> (line 7, col 0) to (line 7, col 46) +-------------------------------- +8 >let robots = [robotA, robotB]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (234 to 264) SpanInfo: {"start":234,"length":29} + >let robots = [robotA, robotB] + >:=> (line 8, col 0) to (line 8, col 29) +-------------------------------- +9 >function getRobots() { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (265 to 287) SpanInfo: {"start":292,"length":13} + >return robots + >:=> (line 10, col 4) to (line 10, col 17) +-------------------------------- +10 > return robots; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (288 to 306) SpanInfo: {"start":292,"length":13} + >return robots + >:=> (line 10, col 4) to (line 10, col 17) +-------------------------------- +11 >} + + ~~ => Pos: (307 to 308) SpanInfo: {"start":307,"length":1} + >} + >:=> (line 11, col 0) to (line 11, col 1) +-------------------------------- +12 >let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (309 to 372) SpanInfo: {"start":309,"length":62} + >let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]] + >:=> (line 12, col 0) to (line 12, col 62) +-------------------------------- +13 >let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (373 to 446) SpanInfo: {"start":373,"length":72} + >let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]] + >:=> (line 13, col 0) to (line 13, col 72) +-------------------------------- +14 >let multiRobots = [multiRobotA, multiRobotB]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (447 to 492) SpanInfo: {"start":447,"length":44} + >let multiRobots = [multiRobotA, multiRobotB] + >:=> (line 14, col 0) to (line 14, col 44) +-------------------------------- +15 >function getMultiRobots() { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (493 to 520) SpanInfo: {"start":525,"length":18} + >return multiRobots + >:=> (line 16, col 4) to (line 16, col 22) +-------------------------------- +16 > return multiRobots; + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (521 to 544) SpanInfo: {"start":525,"length":18} + >return multiRobots + >:=> (line 16, col 4) to (line 16, col 22) +-------------------------------- +17 >} + + ~~ => Pos: (545 to 546) SpanInfo: {"start":545,"length":1} + >} + >:=> (line 17, col 0) to (line 17, col 1) +-------------------------------- +18 >for (let [, nameA] of robots) { + + ~~~~~~~~ => Pos: (547 to 554) SpanInfo: {"start":547,"length":29} + >for (let [, nameA] of robots) + >:=> (line 18, col 0) to (line 18, col 29) +18 >for (let [, nameA] of robots) { + + ~~~~~~~~~~ => Pos: (555 to 564) SpanInfo: {"start":559,"length":5} + >nameA + >:=> (line 18, col 12) to (line 18, col 17) +18 >for (let [, nameA] of robots) { + + ~~~~~~~~~~~~~~ => Pos: (565 to 578) SpanInfo: {"start":547,"length":29} + >for (let [, nameA] of robots) + >:=> (line 18, col 0) to (line 18, col 29) +-------------------------------- +19 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (579 to 602) SpanInfo: {"start":583,"length":18} + >console.log(nameA) + >:=> (line 19, col 4) to (line 19, col 22) +-------------------------------- +20 >} + + ~~ => Pos: (603 to 604) SpanInfo: {"start":583,"length":18} + >console.log(nameA) + >:=> (line 19, col 4) to (line 19, col 22) +-------------------------------- +21 >for (let [, nameA] of getRobots()) { + + ~~~~~~~~ => Pos: (605 to 612) SpanInfo: {"start":605,"length":34} + >for (let [, nameA] of getRobots()) + >:=> (line 21, col 0) to (line 21, col 34) +21 >for (let [, nameA] of getRobots()) { + + ~~~~~~~~~~ => Pos: (613 to 622) SpanInfo: {"start":617,"length":5} + >nameA + >:=> (line 21, col 12) to (line 21, col 17) +21 >for (let [, nameA] of getRobots()) { + + ~~~ => Pos: (623 to 625) SpanInfo: {"start":605,"length":34} + >for (let [, nameA] of getRobots()) + >:=> (line 21, col 0) to (line 21, col 34) +21 >for (let [, nameA] of getRobots()) { + + ~~~~~~~~~~~~ => Pos: (626 to 637) SpanInfo: {"start":627,"length":11} + >getRobots() + >:=> (line 21, col 22) to (line 21, col 33) +21 >for (let [, nameA] of getRobots()) { + + ~~~~ => Pos: (638 to 641) SpanInfo: {"start":605,"length":34} + >for (let [, nameA] of getRobots()) + >:=> (line 21, col 0) to (line 21, col 34) +-------------------------------- +22 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (642 to 665) SpanInfo: {"start":646,"length":18} + >console.log(nameA) + >:=> (line 22, col 4) to (line 22, col 22) +-------------------------------- +23 >} + + ~~ => Pos: (666 to 667) SpanInfo: {"start":646,"length":18} + >console.log(nameA) + >:=> (line 22, col 4) to (line 22, col 22) +-------------------------------- +24 >for (let [, nameA] of [robotA, robotB]) { + + ~~~~~~~~ => Pos: (668 to 675) SpanInfo: {"start":668,"length":39} + >for (let [, nameA] of [robotA, robotB]) + >:=> (line 24, col 0) to (line 24, col 39) +24 >for (let [, nameA] of [robotA, robotB]) { + + ~~~~~~~~~~ => Pos: (676 to 685) SpanInfo: {"start":680,"length":5} + >nameA + >:=> (line 24, col 12) to (line 24, col 17) +24 >for (let [, nameA] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (686 to 709) SpanInfo: {"start":668,"length":39} + >for (let [, nameA] of [robotA, robotB]) + >:=> (line 24, col 0) to (line 24, col 39) +-------------------------------- +25 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (710 to 733) SpanInfo: {"start":714,"length":18} + >console.log(nameA) + >:=> (line 25, col 4) to (line 25, col 22) +-------------------------------- +26 >} + + ~~ => Pos: (734 to 735) SpanInfo: {"start":714,"length":18} + >console.log(nameA) + >:=> (line 25, col 4) to (line 25, col 22) +-------------------------------- +27 >for (let [, [primarySkillA, secondarySkillA]] of multiRobots) { + + ~~~~~~~~ => Pos: (736 to 743) SpanInfo: {"start":736,"length":61} + >for (let [, [primarySkillA, secondarySkillA]] of multiRobots) + >:=> (line 27, col 0) to (line 27, col 61) +27 >for (let [, [primarySkillA, secondarySkillA]] of multiRobots) { + + ~~~ => Pos: (744 to 746) SpanInfo: {"start":748,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 27, col 12) to (line 27, col 44) +27 >for (let [, [primarySkillA, secondarySkillA]] of multiRobots) { + + ~~~~~~~~~~~~~~~~ => Pos: (747 to 762) SpanInfo: {"start":749,"length":13} + >primarySkillA + >:=> (line 27, col 13) to (line 27, col 26) +27 >for (let [, [primarySkillA, secondarySkillA]] of multiRobots) { + + ~~~~~~~~~~~~~~~~~ => Pos: (763 to 779) SpanInfo: {"start":764,"length":15} + >secondarySkillA + >:=> (line 27, col 28) to (line 27, col 43) +27 >for (let [, [primarySkillA, secondarySkillA]] of multiRobots) { + + ~ => Pos: (780 to 780) SpanInfo: {"start":748,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 27, col 12) to (line 27, col 44) +27 >for (let [, [primarySkillA, secondarySkillA]] of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (781 to 799) SpanInfo: {"start":736,"length":61} + >for (let [, [primarySkillA, secondarySkillA]] of multiRobots) + >:=> (line 27, col 0) to (line 27, col 61) +-------------------------------- +28 > console.log(primarySkillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (800 to 831) SpanInfo: {"start":804,"length":26} + >console.log(primarySkillA) + >:=> (line 28, col 4) to (line 28, col 30) +-------------------------------- +29 >} + + ~~ => Pos: (832 to 833) SpanInfo: {"start":804,"length":26} + >console.log(primarySkillA) + >:=> (line 28, col 4) to (line 28, col 30) +-------------------------------- +30 >for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + + ~~~~~~~~ => Pos: (834 to 841) SpanInfo: {"start":834,"length":66} + >for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) + >:=> (line 30, col 0) to (line 30, col 66) +30 >for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + + ~~~ => Pos: (842 to 844) SpanInfo: {"start":846,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 30, col 12) to (line 30, col 44) +30 >for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~ => Pos: (845 to 860) SpanInfo: {"start":847,"length":13} + >primarySkillA + >:=> (line 30, col 13) to (line 30, col 26) +30 >for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~ => Pos: (861 to 877) SpanInfo: {"start":862,"length":15} + >secondarySkillA + >:=> (line 30, col 28) to (line 30, col 43) +30 >for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + + ~ => Pos: (878 to 878) SpanInfo: {"start":846,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 30, col 12) to (line 30, col 44) +30 >for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + + ~~~=> Pos: (879 to 881) SpanInfo: {"start":834,"length":66} + >for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) + >:=> (line 30, col 0) to (line 30, col 66) +30 >for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~=> Pos: (882 to 898) SpanInfo: {"start":883,"length":16} + >getMultiRobots() + >:=> (line 30, col 49) to (line 30, col 65) +30 >for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + + ~~~~=> Pos: (899 to 902) SpanInfo: {"start":834,"length":66} + >for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) + >:=> (line 30, col 0) to (line 30, col 66) +-------------------------------- +31 > console.log(primarySkillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (903 to 934) SpanInfo: {"start":907,"length":26} + >console.log(primarySkillA) + >:=> (line 31, col 4) to (line 31, col 30) +-------------------------------- +32 >} + + ~~ => Pos: (935 to 936) SpanInfo: {"start":907,"length":26} + >console.log(primarySkillA) + >:=> (line 31, col 4) to (line 31, col 30) +-------------------------------- +33 >for (let [, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~ => Pos: (937 to 944) SpanInfo: {"start":937,"length":76} + >for (let [, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) + >:=> (line 33, col 0) to (line 33, col 76) +33 >for (let [, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + + ~~~ => Pos: (945 to 947) SpanInfo: {"start":949,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 33, col 12) to (line 33, col 44) +33 >for (let [, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~ => Pos: (948 to 963) SpanInfo: {"start":950,"length":13} + >primarySkillA + >:=> (line 33, col 13) to (line 33, col 26) +33 >for (let [, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~~ => Pos: (964 to 980) SpanInfo: {"start":965,"length":15} + >secondarySkillA + >:=> (line 33, col 28) to (line 33, col 43) +33 >for (let [, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + + ~ => Pos: (981 to 981) SpanInfo: {"start":949,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 33, col 12) to (line 33, col 44) +33 >for (let [, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (982 to 1015) SpanInfo: {"start":937,"length":76} + >for (let [, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) + >:=> (line 33, col 0) to (line 33, col 76) +-------------------------------- +34 > console.log(primarySkillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1016 to 1047) SpanInfo: {"start":1020,"length":26} + >console.log(primarySkillA) + >:=> (line 34, col 4) to (line 34, col 30) +-------------------------------- +35 >} + + ~~ => Pos: (1048 to 1049) SpanInfo: {"start":1020,"length":26} + >console.log(primarySkillA) + >:=> (line 34, col 4) to (line 34, col 30) +-------------------------------- +36 >for (let [numberB] of robots) { + + ~~~~~~~~ => Pos: (1050 to 1057) SpanInfo: {"start":1050,"length":29} + >for (let [numberB] of robots) + >:=> (line 36, col 0) to (line 36, col 29) +36 >for (let [numberB] of robots) { + + ~~~~~~~~~~ => Pos: (1058 to 1067) SpanInfo: {"start":1060,"length":7} + >numberB + >:=> (line 36, col 10) to (line 36, col 17) +36 >for (let [numberB] of robots) { + + ~~~~~~~~~~~~~~ => Pos: (1068 to 1081) SpanInfo: {"start":1050,"length":29} + >for (let [numberB] of robots) + >:=> (line 36, col 0) to (line 36, col 29) +-------------------------------- +37 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1082 to 1107) SpanInfo: {"start":1086,"length":20} + >console.log(numberB) + >:=> (line 37, col 4) to (line 37, col 24) +-------------------------------- +38 >} + + ~~ => Pos: (1108 to 1109) SpanInfo: {"start":1086,"length":20} + >console.log(numberB) + >:=> (line 37, col 4) to (line 37, col 24) +-------------------------------- +39 >for (let [numberB] of getRobots()) { + + ~~~~~~~~ => Pos: (1110 to 1117) SpanInfo: {"start":1110,"length":34} + >for (let [numberB] of getRobots()) + >:=> (line 39, col 0) to (line 39, col 34) +39 >for (let [numberB] of getRobots()) { + + ~~~~~~~~~~ => Pos: (1118 to 1127) SpanInfo: {"start":1120,"length":7} + >numberB + >:=> (line 39, col 10) to (line 39, col 17) +39 >for (let [numberB] of getRobots()) { + + ~~~ => Pos: (1128 to 1130) SpanInfo: {"start":1110,"length":34} + >for (let [numberB] of getRobots()) + >:=> (line 39, col 0) to (line 39, col 34) +39 >for (let [numberB] of getRobots()) { + + ~~~~~~~~~~~~ => Pos: (1131 to 1142) SpanInfo: {"start":1132,"length":11} + >getRobots() + >:=> (line 39, col 22) to (line 39, col 33) +39 >for (let [numberB] of getRobots()) { + + ~~~~ => Pos: (1143 to 1146) SpanInfo: {"start":1110,"length":34} + >for (let [numberB] of getRobots()) + >:=> (line 39, col 0) to (line 39, col 34) +-------------------------------- +40 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1147 to 1172) SpanInfo: {"start":1151,"length":20} + >console.log(numberB) + >:=> (line 40, col 4) to (line 40, col 24) +-------------------------------- +41 >} + + ~~ => Pos: (1173 to 1174) SpanInfo: {"start":1151,"length":20} + >console.log(numberB) + >:=> (line 40, col 4) to (line 40, col 24) +-------------------------------- +42 >for (let [numberB] of [robotA, robotB]) { + + ~~~~~~~~ => Pos: (1175 to 1182) SpanInfo: {"start":1175,"length":39} + >for (let [numberB] of [robotA, robotB]) + >:=> (line 42, col 0) to (line 42, col 39) +42 >for (let [numberB] of [robotA, robotB]) { + + ~~~~~~~~~~ => Pos: (1183 to 1192) SpanInfo: {"start":1185,"length":7} + >numberB + >:=> (line 42, col 10) to (line 42, col 17) +42 >for (let [numberB] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1193 to 1216) SpanInfo: {"start":1175,"length":39} + >for (let [numberB] of [robotA, robotB]) + >:=> (line 42, col 0) to (line 42, col 39) +-------------------------------- +43 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1217 to 1242) SpanInfo: {"start":1221,"length":20} + >console.log(numberB) + >:=> (line 43, col 4) to (line 43, col 24) +-------------------------------- +44 >} + + ~~ => Pos: (1243 to 1244) SpanInfo: {"start":1221,"length":20} + >console.log(numberB) + >:=> (line 43, col 4) to (line 43, col 24) +-------------------------------- +45 >for (let [nameB] of multiRobots) { + + ~~~~~~~~ => Pos: (1245 to 1252) SpanInfo: {"start":1245,"length":32} + >for (let [nameB] of multiRobots) + >:=> (line 45, col 0) to (line 45, col 32) +45 >for (let [nameB] of multiRobots) { + + ~~~~~~~~ => Pos: (1253 to 1260) SpanInfo: {"start":1255,"length":5} + >nameB + >:=> (line 45, col 10) to (line 45, col 15) +45 >for (let [nameB] of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1261 to 1279) SpanInfo: {"start":1245,"length":32} + >for (let [nameB] of multiRobots) + >:=> (line 45, col 0) to (line 45, col 32) +-------------------------------- +46 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1280 to 1303) SpanInfo: {"start":1284,"length":18} + >console.log(nameB) + >:=> (line 46, col 4) to (line 46, col 22) +-------------------------------- +47 >} + + ~~ => Pos: (1304 to 1305) SpanInfo: {"start":1284,"length":18} + >console.log(nameB) + >:=> (line 46, col 4) to (line 46, col 22) +-------------------------------- +48 >for (let [nameB] of getMultiRobots()) { + + ~~~~~~~~ => Pos: (1306 to 1313) SpanInfo: {"start":1306,"length":37} + >for (let [nameB] of getMultiRobots()) + >:=> (line 48, col 0) to (line 48, col 37) +48 >for (let [nameB] of getMultiRobots()) { + + ~~~~~~~~ => Pos: (1314 to 1321) SpanInfo: {"start":1316,"length":5} + >nameB + >:=> (line 48, col 10) to (line 48, col 15) +48 >for (let [nameB] of getMultiRobots()) { + + ~~~ => Pos: (1322 to 1324) SpanInfo: {"start":1306,"length":37} + >for (let [nameB] of getMultiRobots()) + >:=> (line 48, col 0) to (line 48, col 37) +48 >for (let [nameB] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~ => Pos: (1325 to 1341) SpanInfo: {"start":1326,"length":16} + >getMultiRobots() + >:=> (line 48, col 20) to (line 48, col 36) +48 >for (let [nameB] of getMultiRobots()) { + + ~~~~ => Pos: (1342 to 1345) SpanInfo: {"start":1306,"length":37} + >for (let [nameB] of getMultiRobots()) + >:=> (line 48, col 0) to (line 48, col 37) +-------------------------------- +49 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1346 to 1369) SpanInfo: {"start":1350,"length":18} + >console.log(nameB) + >:=> (line 49, col 4) to (line 49, col 22) +-------------------------------- +50 >} + + ~~ => Pos: (1370 to 1371) SpanInfo: {"start":1350,"length":18} + >console.log(nameB) + >:=> (line 49, col 4) to (line 49, col 22) +-------------------------------- +51 >for (let [nameB] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~ => Pos: (1372 to 1379) SpanInfo: {"start":1372,"length":47} + >for (let [nameB] of [multiRobotA, multiRobotB]) + >:=> (line 51, col 0) to (line 51, col 47) +51 >for (let [nameB] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~ => Pos: (1380 to 1387) SpanInfo: {"start":1382,"length":5} + >nameB + >:=> (line 51, col 10) to (line 51, col 15) +51 >for (let [nameB] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1388 to 1421) SpanInfo: {"start":1372,"length":47} + >for (let [nameB] of [multiRobotA, multiRobotB]) + >:=> (line 51, col 0) to (line 51, col 47) +-------------------------------- +52 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1422 to 1445) SpanInfo: {"start":1426,"length":18} + >console.log(nameB) + >:=> (line 52, col 4) to (line 52, col 22) +-------------------------------- +53 >} + + ~~ => Pos: (1446 to 1447) SpanInfo: {"start":1426,"length":18} + >console.log(nameB) + >:=> (line 52, col 4) to (line 52, col 22) +-------------------------------- +54 >for (let [numberA2, nameA2, skillA2] of robots) { + + ~~~~~~~~ => Pos: (1448 to 1455) SpanInfo: {"start":1448,"length":47} + >for (let [numberA2, nameA2, skillA2] of robots) + >:=> (line 54, col 0) to (line 54, col 47) +54 >for (let [numberA2, nameA2, skillA2] of robots) { + + ~~~~~~~~~~~ => Pos: (1456 to 1466) SpanInfo: {"start":1458,"length":8} + >numberA2 + >:=> (line 54, col 10) to (line 54, col 18) +54 >for (let [numberA2, nameA2, skillA2] of robots) { + + ~~~~~~~~ => Pos: (1467 to 1474) SpanInfo: {"start":1468,"length":6} + >nameA2 + >:=> (line 54, col 20) to (line 54, col 26) +54 >for (let [numberA2, nameA2, skillA2] of robots) { + + ~~~~~~~~~ => Pos: (1475 to 1483) SpanInfo: {"start":1476,"length":7} + >skillA2 + >:=> (line 54, col 28) to (line 54, col 35) +54 >for (let [numberA2, nameA2, skillA2] of robots) { + + ~~~~~~~~~~~~~~=> Pos: (1484 to 1497) SpanInfo: {"start":1448,"length":47} + >for (let [numberA2, nameA2, skillA2] of robots) + >:=> (line 54, col 0) to (line 54, col 47) +-------------------------------- +55 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1498 to 1522) SpanInfo: {"start":1502,"length":19} + >console.log(nameA2) + >:=> (line 55, col 4) to (line 55, col 23) +-------------------------------- +56 >} + + ~~ => Pos: (1523 to 1524) SpanInfo: {"start":1502,"length":19} + >console.log(nameA2) + >:=> (line 55, col 4) to (line 55, col 23) +-------------------------------- +57 >for (let [numberA2, nameA2, skillA2] of getRobots()) { + + ~~~~~~~~ => Pos: (1525 to 1532) SpanInfo: {"start":1525,"length":52} + >for (let [numberA2, nameA2, skillA2] of getRobots()) + >:=> (line 57, col 0) to (line 57, col 52) +57 >for (let [numberA2, nameA2, skillA2] of getRobots()) { + + ~~~~~~~~~~~ => Pos: (1533 to 1543) SpanInfo: {"start":1535,"length":8} + >numberA2 + >:=> (line 57, col 10) to (line 57, col 18) +57 >for (let [numberA2, nameA2, skillA2] of getRobots()) { + + ~~~~~~~~ => Pos: (1544 to 1551) SpanInfo: {"start":1545,"length":6} + >nameA2 + >:=> (line 57, col 20) to (line 57, col 26) +57 >for (let [numberA2, nameA2, skillA2] of getRobots()) { + + ~~~~~~~~~ => Pos: (1552 to 1560) SpanInfo: {"start":1553,"length":7} + >skillA2 + >:=> (line 57, col 28) to (line 57, col 35) +57 >for (let [numberA2, nameA2, skillA2] of getRobots()) { + + ~~~ => Pos: (1561 to 1563) SpanInfo: {"start":1525,"length":52} + >for (let [numberA2, nameA2, skillA2] of getRobots()) + >:=> (line 57, col 0) to (line 57, col 52) +57 >for (let [numberA2, nameA2, skillA2] of getRobots()) { + + ~~~~~~~~~~~~=> Pos: (1564 to 1575) SpanInfo: {"start":1565,"length":11} + >getRobots() + >:=> (line 57, col 40) to (line 57, col 51) +57 >for (let [numberA2, nameA2, skillA2] of getRobots()) { + + ~~~~=> Pos: (1576 to 1579) SpanInfo: {"start":1525,"length":52} + >for (let [numberA2, nameA2, skillA2] of getRobots()) + >:=> (line 57, col 0) to (line 57, col 52) +-------------------------------- +58 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1580 to 1604) SpanInfo: {"start":1584,"length":19} + >console.log(nameA2) + >:=> (line 58, col 4) to (line 58, col 23) +-------------------------------- +59 >} + + ~~ => Pos: (1605 to 1606) SpanInfo: {"start":1584,"length":19} + >console.log(nameA2) + >:=> (line 58, col 4) to (line 58, col 23) +-------------------------------- +60 >for (let [numberA2, nameA2, skillA2] of [robotA, robotB]) { + + ~~~~~~~~ => Pos: (1607 to 1614) SpanInfo: {"start":1607,"length":57} + >for (let [numberA2, nameA2, skillA2] of [robotA, robotB]) + >:=> (line 60, col 0) to (line 60, col 57) +60 >for (let [numberA2, nameA2, skillA2] of [robotA, robotB]) { + + ~~~~~~~~~~~ => Pos: (1615 to 1625) SpanInfo: {"start":1617,"length":8} + >numberA2 + >:=> (line 60, col 10) to (line 60, col 18) +60 >for (let [numberA2, nameA2, skillA2] of [robotA, robotB]) { + + ~~~~~~~~ => Pos: (1626 to 1633) SpanInfo: {"start":1627,"length":6} + >nameA2 + >:=> (line 60, col 20) to (line 60, col 26) +60 >for (let [numberA2, nameA2, skillA2] of [robotA, robotB]) { + + ~~~~~~~~~ => Pos: (1634 to 1642) SpanInfo: {"start":1635,"length":7} + >skillA2 + >:=> (line 60, col 28) to (line 60, col 35) +60 >for (let [numberA2, nameA2, skillA2] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1643 to 1666) SpanInfo: {"start":1607,"length":57} + >for (let [numberA2, nameA2, skillA2] of [robotA, robotB]) + >:=> (line 60, col 0) to (line 60, col 57) +-------------------------------- +61 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1667 to 1691) SpanInfo: {"start":1671,"length":19} + >console.log(nameA2) + >:=> (line 61, col 4) to (line 61, col 23) +-------------------------------- +62 >} + + ~~ => Pos: (1692 to 1693) SpanInfo: {"start":1671,"length":19} + >console.log(nameA2) + >:=> (line 61, col 4) to (line 61, col 23) +-------------------------------- +63 >for (let [nameMA, [primarySkillA, secondarySkillA]] of multiRobots) { + + ~~~~~~~~ => Pos: (1694 to 1701) SpanInfo: {"start":1694,"length":67} + >for (let [nameMA, [primarySkillA, secondarySkillA]] of multiRobots) + >:=> (line 63, col 0) to (line 63, col 67) +63 >for (let [nameMA, [primarySkillA, secondarySkillA]] of multiRobots) { + + ~~~~~~~~~ => Pos: (1702 to 1710) SpanInfo: {"start":1704,"length":6} + >nameMA + >:=> (line 63, col 10) to (line 63, col 16) +63 >for (let [nameMA, [primarySkillA, secondarySkillA]] of multiRobots) { + + ~~~~~~~~~~~~~~~~ => Pos: (1711 to 1726) SpanInfo: {"start":1713,"length":13} + >primarySkillA + >:=> (line 63, col 19) to (line 63, col 32) +63 >for (let [nameMA, [primarySkillA, secondarySkillA]] of multiRobots) { + + ~~~~~~~~~~~~~~~~~=> Pos: (1727 to 1743) SpanInfo: {"start":1728,"length":15} + >secondarySkillA + >:=> (line 63, col 34) to (line 63, col 49) +63 >for (let [nameMA, [primarySkillA, secondarySkillA]] of multiRobots) { + + ~=> Pos: (1744 to 1744) SpanInfo: {"start":1712,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 63, col 18) to (line 63, col 50) +63 >for (let [nameMA, [primarySkillA, secondarySkillA]] of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (1745 to 1763) SpanInfo: {"start":1694,"length":67} + >for (let [nameMA, [primarySkillA, secondarySkillA]] of multiRobots) + >:=> (line 63, col 0) to (line 63, col 67) +-------------------------------- +64 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1764 to 1788) SpanInfo: {"start":1768,"length":19} + >console.log(nameMA) + >:=> (line 64, col 4) to (line 64, col 23) +-------------------------------- +65 >} + + ~~ => Pos: (1789 to 1790) SpanInfo: {"start":1768,"length":19} + >console.log(nameMA) + >:=> (line 64, col 4) to (line 64, col 23) +-------------------------------- +66 >for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + + ~~~~~~~~ => Pos: (1791 to 1798) SpanInfo: {"start":1791,"length":72} + >for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) + >:=> (line 66, col 0) to (line 66, col 72) +66 >for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + + ~~~~~~~~~ => Pos: (1799 to 1807) SpanInfo: {"start":1801,"length":6} + >nameMA + >:=> (line 66, col 10) to (line 66, col 16) +66 >for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~ => Pos: (1808 to 1823) SpanInfo: {"start":1810,"length":13} + >primarySkillA + >:=> (line 66, col 19) to (line 66, col 32) +66 >for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~=> Pos: (1824 to 1840) SpanInfo: {"start":1825,"length":15} + >secondarySkillA + >:=> (line 66, col 34) to (line 66, col 49) +66 >for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + + ~=> Pos: (1841 to 1841) SpanInfo: {"start":1809,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 66, col 18) to (line 66, col 50) +66 >for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + + ~~~=> Pos: (1842 to 1844) SpanInfo: {"start":1791,"length":72} + >for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) + >:=> (line 66, col 0) to (line 66, col 72) +66 >for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~=> Pos: (1845 to 1861) SpanInfo: {"start":1846,"length":16} + >getMultiRobots() + >:=> (line 66, col 55) to (line 66, col 71) +66 >for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + + ~~~~=> Pos: (1862 to 1865) SpanInfo: {"start":1791,"length":72} + >for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) + >:=> (line 66, col 0) to (line 66, col 72) +-------------------------------- +67 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1866 to 1890) SpanInfo: {"start":1870,"length":19} + >console.log(nameMA) + >:=> (line 67, col 4) to (line 67, col 23) +-------------------------------- +68 >} + + ~~ => Pos: (1891 to 1892) SpanInfo: {"start":1870,"length":19} + >console.log(nameMA) + >:=> (line 67, col 4) to (line 67, col 23) +-------------------------------- +69 >for (let [nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~ => Pos: (1893 to 1900) SpanInfo: {"start":1893,"length":82} + >for (let [nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) + >:=> (line 69, col 0) to (line 69, col 82) +69 >for (let [nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~ => Pos: (1901 to 1909) SpanInfo: {"start":1903,"length":6} + >nameMA + >:=> (line 69, col 10) to (line 69, col 16) +69 >for (let [nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~ => Pos: (1910 to 1925) SpanInfo: {"start":1912,"length":13} + >primarySkillA + >:=> (line 69, col 19) to (line 69, col 32) +69 >for (let [nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~~=> Pos: (1926 to 1942) SpanInfo: {"start":1927,"length":15} + >secondarySkillA + >:=> (line 69, col 34) to (line 69, col 49) +69 >for (let [nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + + ~=> Pos: (1943 to 1943) SpanInfo: {"start":1911,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 69, col 18) to (line 69, col 50) +69 >for (let [nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1944 to 1977) SpanInfo: {"start":1893,"length":82} + >for (let [nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) + >:=> (line 69, col 0) to (line 69, col 82) +-------------------------------- +70 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1978 to 2002) SpanInfo: {"start":1982,"length":19} + >console.log(nameMA) + >:=> (line 70, col 4) to (line 70, col 23) +-------------------------------- +71 >} + + ~~ => Pos: (2003 to 2004) SpanInfo: {"start":1982,"length":19} + >console.log(nameMA) + >:=> (line 70, col 4) to (line 70, col 23) +-------------------------------- +72 >for (let [numberA3, ...robotAInfo] of robots) { + + ~~~~~~~~ => Pos: (2005 to 2012) SpanInfo: {"start":2005,"length":45} + >for (let [numberA3, ...robotAInfo] of robots) + >:=> (line 72, col 0) to (line 72, col 45) +72 >for (let [numberA3, ...robotAInfo] of robots) { + + ~~~~~~~~~~~ => Pos: (2013 to 2023) SpanInfo: {"start":2015,"length":8} + >numberA3 + >:=> (line 72, col 10) to (line 72, col 18) +72 >for (let [numberA3, ...robotAInfo] of robots) { + + ~~~~~~~~~~~~~~~ => Pos: (2024 to 2038) SpanInfo: {"start":2025,"length":13} + >...robotAInfo + >:=> (line 72, col 20) to (line 72, col 33) +72 >for (let [numberA3, ...robotAInfo] of robots) { + + ~~~~~~~~~~~~~~=> Pos: (2039 to 2052) SpanInfo: {"start":2005,"length":45} + >for (let [numberA3, ...robotAInfo] of robots) + >:=> (line 72, col 0) to (line 72, col 45) +-------------------------------- +73 > console.log(numberA3); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2053 to 2079) SpanInfo: {"start":2057,"length":21} + >console.log(numberA3) + >:=> (line 73, col 4) to (line 73, col 25) +-------------------------------- +74 >} + + ~~ => Pos: (2080 to 2081) SpanInfo: {"start":2057,"length":21} + >console.log(numberA3) + >:=> (line 73, col 4) to (line 73, col 25) +-------------------------------- +75 >for (let [numberA3, ...robotAInfo] of getRobots()) { + + ~~~~~~~~ => Pos: (2082 to 2089) SpanInfo: {"start":2082,"length":50} + >for (let [numberA3, ...robotAInfo] of getRobots()) + >:=> (line 75, col 0) to (line 75, col 50) +75 >for (let [numberA3, ...robotAInfo] of getRobots()) { + + ~~~~~~~~~~~ => Pos: (2090 to 2100) SpanInfo: {"start":2092,"length":8} + >numberA3 + >:=> (line 75, col 10) to (line 75, col 18) +75 >for (let [numberA3, ...robotAInfo] of getRobots()) { + + ~~~~~~~~~~~~~~~ => Pos: (2101 to 2115) SpanInfo: {"start":2102,"length":13} + >...robotAInfo + >:=> (line 75, col 20) to (line 75, col 33) +75 >for (let [numberA3, ...robotAInfo] of getRobots()) { + + ~~~ => Pos: (2116 to 2118) SpanInfo: {"start":2082,"length":50} + >for (let [numberA3, ...robotAInfo] of getRobots()) + >:=> (line 75, col 0) to (line 75, col 50) +75 >for (let [numberA3, ...robotAInfo] of getRobots()) { + + ~~~~~~~~~~~~=> Pos: (2119 to 2130) SpanInfo: {"start":2120,"length":11} + >getRobots() + >:=> (line 75, col 38) to (line 75, col 49) +75 >for (let [numberA3, ...robotAInfo] of getRobots()) { + + ~~~~=> Pos: (2131 to 2134) SpanInfo: {"start":2082,"length":50} + >for (let [numberA3, ...robotAInfo] of getRobots()) + >:=> (line 75, col 0) to (line 75, col 50) +-------------------------------- +76 > console.log(numberA3); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2135 to 2161) SpanInfo: {"start":2139,"length":21} + >console.log(numberA3) + >:=> (line 76, col 4) to (line 76, col 25) +-------------------------------- +77 >} + + ~~ => Pos: (2162 to 2163) SpanInfo: {"start":2139,"length":21} + >console.log(numberA3) + >:=> (line 76, col 4) to (line 76, col 25) +-------------------------------- +78 >for (let [numberA3, ...robotAInfo] of [robotA, robotB]) { + + ~~~~~~~~ => Pos: (2164 to 2171) SpanInfo: {"start":2164,"length":55} + >for (let [numberA3, ...robotAInfo] of [robotA, robotB]) + >:=> (line 78, col 0) to (line 78, col 55) +78 >for (let [numberA3, ...robotAInfo] of [robotA, robotB]) { + + ~~~~~~~~~~~ => Pos: (2172 to 2182) SpanInfo: {"start":2174,"length":8} + >numberA3 + >:=> (line 78, col 10) to (line 78, col 18) +78 >for (let [numberA3, ...robotAInfo] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~ => Pos: (2183 to 2197) SpanInfo: {"start":2184,"length":13} + >...robotAInfo + >:=> (line 78, col 20) to (line 78, col 33) +78 >for (let [numberA3, ...robotAInfo] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2198 to 2221) SpanInfo: {"start":2164,"length":55} + >for (let [numberA3, ...robotAInfo] of [robotA, robotB]) + >:=> (line 78, col 0) to (line 78, col 55) +-------------------------------- +79 > console.log(numberA3); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2222 to 2248) SpanInfo: {"start":2226,"length":21} + >console.log(numberA3) + >:=> (line 79, col 4) to (line 79, col 25) +-------------------------------- +80 >} + + ~~ => Pos: (2249 to 2250) SpanInfo: {"start":2226,"length":21} + >console.log(numberA3) + >:=> (line 79, col 4) to (line 79, col 25) +-------------------------------- +81 >for (let [...multiRobotAInfo] of multiRobots) { + + ~~~~~~~~ => Pos: (2251 to 2258) SpanInfo: {"start":2251,"length":45} + >for (let [...multiRobotAInfo] of multiRobots) + >:=> (line 81, col 0) to (line 81, col 45) +81 >for (let [...multiRobotAInfo] of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (2259 to 2279) SpanInfo: {"start":2261,"length":18} + >...multiRobotAInfo + >:=> (line 81, col 10) to (line 81, col 28) +81 >for (let [...multiRobotAInfo] of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (2280 to 2298) SpanInfo: {"start":2251,"length":45} + >for (let [...multiRobotAInfo] of multiRobots) + >:=> (line 81, col 0) to (line 81, col 45) +-------------------------------- +82 > console.log(multiRobotAInfo); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2299 to 2332) SpanInfo: {"start":2303,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 82, col 4) to (line 82, col 32) +-------------------------------- +83 >} + + ~~ => Pos: (2333 to 2334) SpanInfo: {"start":2303,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 82, col 4) to (line 82, col 32) +-------------------------------- +84 >for (let [...multiRobotAInfo] of getMultiRobots()) { + + ~~~~~~~~ => Pos: (2335 to 2342) SpanInfo: {"start":2335,"length":50} + >for (let [...multiRobotAInfo] of getMultiRobots()) + >:=> (line 84, col 0) to (line 84, col 50) +84 >for (let [...multiRobotAInfo] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (2343 to 2363) SpanInfo: {"start":2345,"length":18} + >...multiRobotAInfo + >:=> (line 84, col 10) to (line 84, col 28) +84 >for (let [...multiRobotAInfo] of getMultiRobots()) { + + ~~~ => Pos: (2364 to 2366) SpanInfo: {"start":2335,"length":50} + >for (let [...multiRobotAInfo] of getMultiRobots()) + >:=> (line 84, col 0) to (line 84, col 50) +84 >for (let [...multiRobotAInfo] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~=> Pos: (2367 to 2383) SpanInfo: {"start":2368,"length":16} + >getMultiRobots() + >:=> (line 84, col 33) to (line 84, col 49) +84 >for (let [...multiRobotAInfo] of getMultiRobots()) { + + ~~~~=> Pos: (2384 to 2387) SpanInfo: {"start":2335,"length":50} + >for (let [...multiRobotAInfo] of getMultiRobots()) + >:=> (line 84, col 0) to (line 84, col 50) +-------------------------------- +85 > console.log(multiRobotAInfo); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2388 to 2421) SpanInfo: {"start":2392,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 85, col 4) to (line 85, col 32) +-------------------------------- +86 >} + + ~~ => Pos: (2422 to 2423) SpanInfo: {"start":2392,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 85, col 4) to (line 85, col 32) +-------------------------------- +87 >for (let [...multiRobotAInfo] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~ => Pos: (2424 to 2431) SpanInfo: {"start":2424,"length":60} + >for (let [...multiRobotAInfo] of [multiRobotA, multiRobotB]) + >:=> (line 87, col 0) to (line 87, col 60) +87 >for (let [...multiRobotAInfo] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (2432 to 2452) SpanInfo: {"start":2434,"length":18} + >...multiRobotAInfo + >:=> (line 87, col 10) to (line 87, col 28) +87 >for (let [...multiRobotAInfo] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2453 to 2486) SpanInfo: {"start":2424,"length":60} + >for (let [...multiRobotAInfo] of [multiRobotA, multiRobotB]) + >:=> (line 87, col 0) to (line 87, col 60) +-------------------------------- +88 > console.log(multiRobotAInfo); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2487 to 2520) SpanInfo: {"start":2491,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 88, col 4) to (line 88, col 32) +-------------------------------- +89 >} + ~ => Pos: (2521 to 2521) SpanInfo: {"start":2491,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 88, col 4) to (line 88, col 32) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringForOfArrayBindingPatternDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringForOfArrayBindingPatternDefaultValues.baseline new file mode 100644 index 00000000000..a30ea914bf3 --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringForOfArrayBindingPatternDefaultValues.baseline @@ -0,0 +1,1061 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: any): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (48 to 49) SpanInfo: undefined +-------------------------------- +4 >type Robot = [number, string, string]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 88) SpanInfo: undefined +-------------------------------- +5 >type MultiSkilledRobot = [string, [string, string]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (89 to 141) SpanInfo: undefined +-------------------------------- +6 >let robotA: Robot = [1, "mower", "mowing"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (142 to 185) SpanInfo: {"start":142,"length":42} + >let robotA: Robot = [1, "mower", "mowing"] + >:=> (line 6, col 0) to (line 6, col 42) +-------------------------------- +7 >let robotB: Robot = [2, "trimmer", "trimming"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (186 to 233) SpanInfo: {"start":186,"length":46} + >let robotB: Robot = [2, "trimmer", "trimming"] + >:=> (line 7, col 0) to (line 7, col 46) +-------------------------------- +8 >let robots = [robotA, robotB]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (234 to 264) SpanInfo: {"start":234,"length":29} + >let robots = [robotA, robotB] + >:=> (line 8, col 0) to (line 8, col 29) +-------------------------------- +9 >function getRobots() { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (265 to 287) SpanInfo: {"start":292,"length":13} + >return robots + >:=> (line 10, col 4) to (line 10, col 17) +-------------------------------- +10 > return robots; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (288 to 306) SpanInfo: {"start":292,"length":13} + >return robots + >:=> (line 10, col 4) to (line 10, col 17) +-------------------------------- +11 >} + + ~~ => Pos: (307 to 308) SpanInfo: {"start":307,"length":1} + >} + >:=> (line 11, col 0) to (line 11, col 1) +-------------------------------- +12 >let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (309 to 372) SpanInfo: {"start":309,"length":62} + >let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]] + >:=> (line 12, col 0) to (line 12, col 62) +-------------------------------- +13 >let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (373 to 446) SpanInfo: {"start":373,"length":72} + >let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]] + >:=> (line 13, col 0) to (line 13, col 72) +-------------------------------- +14 >let multiRobots = [multiRobotA, multiRobotB]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (447 to 492) SpanInfo: {"start":447,"length":44} + >let multiRobots = [multiRobotA, multiRobotB] + >:=> (line 14, col 0) to (line 14, col 44) +-------------------------------- +15 >function getMultiRobots() { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (493 to 520) SpanInfo: {"start":525,"length":18} + >return multiRobots + >:=> (line 16, col 4) to (line 16, col 22) +-------------------------------- +16 > return multiRobots; + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (521 to 544) SpanInfo: {"start":525,"length":18} + >return multiRobots + >:=> (line 16, col 4) to (line 16, col 22) +-------------------------------- +17 >} + + ~~ => Pos: (545 to 546) SpanInfo: {"start":545,"length":1} + >} + >:=> (line 17, col 0) to (line 17, col 1) +-------------------------------- +18 >for (let [, nameA = "noName"] of robots) { + + ~~~~~~~~ => Pos: (547 to 554) SpanInfo: {"start":547,"length":40} + >for (let [, nameA = "noName"] of robots) + >:=> (line 18, col 0) to (line 18, col 40) +18 >for (let [, nameA = "noName"] of robots) { + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (555 to 575) SpanInfo: {"start":559,"length":16} + >nameA = "noName" + >:=> (line 18, col 12) to (line 18, col 28) +18 >for (let [, nameA = "noName"] of robots) { + + ~~~~~~~~~~~~~~ => Pos: (576 to 589) SpanInfo: {"start":547,"length":40} + >for (let [, nameA = "noName"] of robots) + >:=> (line 18, col 0) to (line 18, col 40) +-------------------------------- +19 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (590 to 613) SpanInfo: {"start":594,"length":18} + >console.log(nameA) + >:=> (line 19, col 4) to (line 19, col 22) +-------------------------------- +20 >} + + ~~ => Pos: (614 to 615) SpanInfo: {"start":594,"length":18} + >console.log(nameA) + >:=> (line 19, col 4) to (line 19, col 22) +-------------------------------- +21 >for (let [, nameA = "noName"] of getRobots()) { + + ~~~~~~~~ => Pos: (616 to 623) SpanInfo: {"start":616,"length":45} + >for (let [, nameA = "noName"] of getRobots()) + >:=> (line 21, col 0) to (line 21, col 45) +21 >for (let [, nameA = "noName"] of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (624 to 644) SpanInfo: {"start":628,"length":16} + >nameA = "noName" + >:=> (line 21, col 12) to (line 21, col 28) +21 >for (let [, nameA = "noName"] of getRobots()) { + + ~~~ => Pos: (645 to 647) SpanInfo: {"start":616,"length":45} + >for (let [, nameA = "noName"] of getRobots()) + >:=> (line 21, col 0) to (line 21, col 45) +21 >for (let [, nameA = "noName"] of getRobots()) { + + ~~~~~~~~~~~~ => Pos: (648 to 659) SpanInfo: {"start":649,"length":11} + >getRobots() + >:=> (line 21, col 33) to (line 21, col 44) +21 >for (let [, nameA = "noName"] of getRobots()) { + + ~~~~=> Pos: (660 to 663) SpanInfo: {"start":616,"length":45} + >for (let [, nameA = "noName"] of getRobots()) + >:=> (line 21, col 0) to (line 21, col 45) +-------------------------------- +22 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (664 to 687) SpanInfo: {"start":668,"length":18} + >console.log(nameA) + >:=> (line 22, col 4) to (line 22, col 22) +-------------------------------- +23 >} + + ~~ => Pos: (688 to 689) SpanInfo: {"start":668,"length":18} + >console.log(nameA) + >:=> (line 22, col 4) to (line 22, col 22) +-------------------------------- +24 >for (let [, nameA = "noName"] of [robotA, robotB]) { + + ~~~~~~~~ => Pos: (690 to 697) SpanInfo: {"start":690,"length":50} + >for (let [, nameA = "noName"] of [robotA, robotB]) + >:=> (line 24, col 0) to (line 24, col 50) +24 >for (let [, nameA = "noName"] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (698 to 718) SpanInfo: {"start":702,"length":16} + >nameA = "noName" + >:=> (line 24, col 12) to (line 24, col 28) +24 >for (let [, nameA = "noName"] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (719 to 742) SpanInfo: {"start":690,"length":50} + >for (let [, nameA = "noName"] of [robotA, robotB]) + >:=> (line 24, col 0) to (line 24, col 50) +-------------------------------- +25 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (743 to 766) SpanInfo: {"start":747,"length":18} + >console.log(nameA) + >:=> (line 25, col 4) to (line 25, col 22) +-------------------------------- +26 >} + + ~~ => Pos: (767 to 768) SpanInfo: {"start":747,"length":18} + >console.log(nameA) + >:=> (line 25, col 4) to (line 25, col 22) +-------------------------------- +27 >for (let [, [ + + ~~~~~~~~ => Pos: (769 to 776) SpanInfo: {"start":769,"length":120} + >for (let [, [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"]] of multiRobots) + >:=> (line 27, col 0) to (line 30, col 41) +27 >for (let [, [ + + ~~~ => Pos: (777 to 779) SpanInfo: {"start":781,"length":91} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"] + >:=> (line 27, col 12) to (line 30, col 24) +27 >for (let [, [ + + ~~~ => Pos: (780 to 782) SpanInfo: {"start":787,"length":25} + >primarySkillA = "primary" + >:=> (line 28, col 4) to (line 28, col 29) +-------------------------------- +28 > primarySkillA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (783 to 813) SpanInfo: {"start":787,"length":25} + >primarySkillA = "primary" + >:=> (line 28, col 4) to (line 28, col 29) +-------------------------------- +29 > secondarySkillA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (814 to 847) SpanInfo: {"start":818,"length":29} + >secondarySkillA = "secondary" + >:=> (line 29, col 4) to (line 29, col 33) +-------------------------------- +30 >] = ["skill1", "skill2"]] of multiRobots) { + + ~ => Pos: (848 to 848) SpanInfo: {"start":818,"length":29} + >secondarySkillA = "secondary" + >:=> (line 29, col 4) to (line 29, col 33) +30 >] = ["skill1", "skill2"]] of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (849 to 872) SpanInfo: {"start":781,"length":91} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"] + >:=> (line 27, col 12) to (line 30, col 24) +30 >] = ["skill1", "skill2"]] of multiRobots) { + + ~~~~~~~~~~~~~~~~ => Pos: (873 to 888) SpanInfo: {"start":769,"length":120} + >for (let [, [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"]] of multiRobots) + >:=> (line 27, col 0) to (line 30, col 41) +30 >] = ["skill1", "skill2"]] of multiRobots) { + + ~~~ => Pos: (889 to 891) SpanInfo: {"start":896,"length":26} + >console.log(primarySkillA) + >:=> (line 31, col 4) to (line 31, col 30) +-------------------------------- +31 > console.log(primarySkillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (892 to 923) SpanInfo: {"start":896,"length":26} + >console.log(primarySkillA) + >:=> (line 31, col 4) to (line 31, col 30) +-------------------------------- +32 >} + + ~~ => Pos: (924 to 925) SpanInfo: {"start":896,"length":26} + >console.log(primarySkillA) + >:=> (line 31, col 4) to (line 31, col 30) +-------------------------------- +33 >for (let [, [ + + ~~~~~~~~ => Pos: (926 to 933) SpanInfo: {"start":926,"length":125} + >for (let [, [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"]] of getMultiRobots()) + >:=> (line 33, col 0) to (line 36, col 46) +33 >for (let [, [ + + ~~~ => Pos: (934 to 936) SpanInfo: {"start":938,"length":91} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"] + >:=> (line 33, col 12) to (line 36, col 24) +33 >for (let [, [ + + ~~~ => Pos: (937 to 939) SpanInfo: {"start":944,"length":25} + >primarySkillA = "primary" + >:=> (line 34, col 4) to (line 34, col 29) +-------------------------------- +34 > primarySkillA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (940 to 970) SpanInfo: {"start":944,"length":25} + >primarySkillA = "primary" + >:=> (line 34, col 4) to (line 34, col 29) +-------------------------------- +35 > secondarySkillA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (971 to 1004) SpanInfo: {"start":975,"length":29} + >secondarySkillA = "secondary" + >:=> (line 35, col 4) to (line 35, col 33) +-------------------------------- +36 >] = ["skill1", "skill2"]] of getMultiRobots()) { + + ~ => Pos: (1005 to 1005) SpanInfo: {"start":975,"length":29} + >secondarySkillA = "secondary" + >:=> (line 35, col 4) to (line 35, col 33) +36 >] = ["skill1", "skill2"]] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1006 to 1029) SpanInfo: {"start":938,"length":91} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"] + >:=> (line 33, col 12) to (line 36, col 24) +36 >] = ["skill1", "skill2"]] of getMultiRobots()) { + + ~~~ => Pos: (1030 to 1032) SpanInfo: {"start":926,"length":125} + >for (let [, [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"]] of getMultiRobots()) + >:=> (line 33, col 0) to (line 36, col 46) +36 >] = ["skill1", "skill2"]] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~ => Pos: (1033 to 1049) SpanInfo: {"start":1034,"length":16} + >getMultiRobots() + >:=> (line 36, col 29) to (line 36, col 45) +36 >] = ["skill1", "skill2"]] of getMultiRobots()) { + + ~=> Pos: (1050 to 1050) SpanInfo: {"start":926,"length":125} + >for (let [, [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"]] of getMultiRobots()) + >:=> (line 33, col 0) to (line 36, col 46) +36 >] = ["skill1", "skill2"]] of getMultiRobots()) { + + ~~~=> Pos: (1051 to 1053) SpanInfo: {"start":1058,"length":26} + >console.log(primarySkillA) + >:=> (line 37, col 4) to (line 37, col 30) +-------------------------------- +37 > console.log(primarySkillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1054 to 1085) SpanInfo: {"start":1058,"length":26} + >console.log(primarySkillA) + >:=> (line 37, col 4) to (line 37, col 30) +-------------------------------- +38 >} + + ~~ => Pos: (1086 to 1087) SpanInfo: {"start":1058,"length":26} + >console.log(primarySkillA) + >:=> (line 37, col 4) to (line 37, col 30) +-------------------------------- +39 >for (let [, [ + + ~~~~~~~~ => Pos: (1088 to 1095) SpanInfo: {"start":1088,"length":135} + >for (let [, [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) + >:=> (line 39, col 0) to (line 42, col 56) +39 >for (let [, [ + + ~~~ => Pos: (1096 to 1098) SpanInfo: {"start":1100,"length":91} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"] + >:=> (line 39, col 12) to (line 42, col 24) +39 >for (let [, [ + + ~~~ => Pos: (1099 to 1101) SpanInfo: {"start":1106,"length":25} + >primarySkillA = "primary" + >:=> (line 40, col 4) to (line 40, col 29) +-------------------------------- +40 > primarySkillA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1102 to 1132) SpanInfo: {"start":1106,"length":25} + >primarySkillA = "primary" + >:=> (line 40, col 4) to (line 40, col 29) +-------------------------------- +41 > secondarySkillA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1133 to 1166) SpanInfo: {"start":1137,"length":29} + >secondarySkillA = "secondary" + >:=> (line 41, col 4) to (line 41, col 33) +-------------------------------- +42 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { + + ~ => Pos: (1167 to 1167) SpanInfo: {"start":1137,"length":29} + >secondarySkillA = "secondary" + >:=> (line 41, col 4) to (line 41, col 33) +42 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1168 to 1191) SpanInfo: {"start":1100,"length":91} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"] + >:=> (line 39, col 12) to (line 42, col 24) +42 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1192 to 1222) SpanInfo: {"start":1088,"length":135} + >for (let [, [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) + >:=> (line 39, col 0) to (line 42, col 56) +42 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { + + ~~~=> Pos: (1223 to 1225) SpanInfo: {"start":1230,"length":26} + >console.log(primarySkillA) + >:=> (line 43, col 4) to (line 43, col 30) +-------------------------------- +43 > console.log(primarySkillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1226 to 1257) SpanInfo: {"start":1230,"length":26} + >console.log(primarySkillA) + >:=> (line 43, col 4) to (line 43, col 30) +-------------------------------- +44 >} + + ~~ => Pos: (1258 to 1259) SpanInfo: {"start":1230,"length":26} + >console.log(primarySkillA) + >:=> (line 43, col 4) to (line 43, col 30) +-------------------------------- +45 >for (let [numberB = -1] of robots) { + + ~~~~~~~~ => Pos: (1260 to 1267) SpanInfo: {"start":1260,"length":34} + >for (let [numberB = -1] of robots) + >:=> (line 45, col 0) to (line 45, col 34) +45 >for (let [numberB = -1] of robots) { + + ~~~~~~~~~~~~~~~ => Pos: (1268 to 1282) SpanInfo: {"start":1270,"length":12} + >numberB = -1 + >:=> (line 45, col 10) to (line 45, col 22) +45 >for (let [numberB = -1] of robots) { + + ~~~~~~~~~~~~~~ => Pos: (1283 to 1296) SpanInfo: {"start":1260,"length":34} + >for (let [numberB = -1] of robots) + >:=> (line 45, col 0) to (line 45, col 34) +-------------------------------- +46 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1297 to 1322) SpanInfo: {"start":1301,"length":20} + >console.log(numberB) + >:=> (line 46, col 4) to (line 46, col 24) +-------------------------------- +47 >} + + ~~ => Pos: (1323 to 1324) SpanInfo: {"start":1301,"length":20} + >console.log(numberB) + >:=> (line 46, col 4) to (line 46, col 24) +-------------------------------- +48 >for (let [numberB = -1] of getRobots()) { + + ~~~~~~~~ => Pos: (1325 to 1332) SpanInfo: {"start":1325,"length":39} + >for (let [numberB = -1] of getRobots()) + >:=> (line 48, col 0) to (line 48, col 39) +48 >for (let [numberB = -1] of getRobots()) { + + ~~~~~~~~~~~~~~~ => Pos: (1333 to 1347) SpanInfo: {"start":1335,"length":12} + >numberB = -1 + >:=> (line 48, col 10) to (line 48, col 22) +48 >for (let [numberB = -1] of getRobots()) { + + ~~~ => Pos: (1348 to 1350) SpanInfo: {"start":1325,"length":39} + >for (let [numberB = -1] of getRobots()) + >:=> (line 48, col 0) to (line 48, col 39) +48 >for (let [numberB = -1] of getRobots()) { + + ~~~~~~~~~~~~ => Pos: (1351 to 1362) SpanInfo: {"start":1352,"length":11} + >getRobots() + >:=> (line 48, col 27) to (line 48, col 38) +48 >for (let [numberB = -1] of getRobots()) { + + ~~~~ => Pos: (1363 to 1366) SpanInfo: {"start":1325,"length":39} + >for (let [numberB = -1] of getRobots()) + >:=> (line 48, col 0) to (line 48, col 39) +-------------------------------- +49 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1367 to 1392) SpanInfo: {"start":1371,"length":20} + >console.log(numberB) + >:=> (line 49, col 4) to (line 49, col 24) +-------------------------------- +50 >} + + ~~ => Pos: (1393 to 1394) SpanInfo: {"start":1371,"length":20} + >console.log(numberB) + >:=> (line 49, col 4) to (line 49, col 24) +-------------------------------- +51 >for (let [numberB = -1] of [robotA, robotB]) { + + ~~~~~~~~ => Pos: (1395 to 1402) SpanInfo: {"start":1395,"length":44} + >for (let [numberB = -1] of [robotA, robotB]) + >:=> (line 51, col 0) to (line 51, col 44) +51 >for (let [numberB = -1] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~ => Pos: (1403 to 1417) SpanInfo: {"start":1405,"length":12} + >numberB = -1 + >:=> (line 51, col 10) to (line 51, col 22) +51 >for (let [numberB = -1] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1418 to 1441) SpanInfo: {"start":1395,"length":44} + >for (let [numberB = -1] of [robotA, robotB]) + >:=> (line 51, col 0) to (line 51, col 44) +-------------------------------- +52 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1442 to 1467) SpanInfo: {"start":1446,"length":20} + >console.log(numberB) + >:=> (line 52, col 4) to (line 52, col 24) +-------------------------------- +53 >} + + ~~ => Pos: (1468 to 1469) SpanInfo: {"start":1446,"length":20} + >console.log(numberB) + >:=> (line 52, col 4) to (line 52, col 24) +-------------------------------- +54 >for (let [nameB = "noName"] of multiRobots) { + + ~~~~~~~~ => Pos: (1470 to 1477) SpanInfo: {"start":1470,"length":43} + >for (let [nameB = "noName"] of multiRobots) + >:=> (line 54, col 0) to (line 54, col 43) +54 >for (let [nameB = "noName"] of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1478 to 1496) SpanInfo: {"start":1480,"length":16} + >nameB = "noName" + >:=> (line 54, col 10) to (line 54, col 26) +54 >for (let [nameB = "noName"] of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (1497 to 1515) SpanInfo: {"start":1470,"length":43} + >for (let [nameB = "noName"] of multiRobots) + >:=> (line 54, col 0) to (line 54, col 43) +-------------------------------- +55 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1516 to 1539) SpanInfo: {"start":1520,"length":18} + >console.log(nameB) + >:=> (line 55, col 4) to (line 55, col 22) +-------------------------------- +56 >} + + ~~ => Pos: (1540 to 1541) SpanInfo: {"start":1520,"length":18} + >console.log(nameB) + >:=> (line 55, col 4) to (line 55, col 22) +-------------------------------- +57 >for (let [nameB = "noName"] of getMultiRobots()) { + + ~~~~~~~~ => Pos: (1542 to 1549) SpanInfo: {"start":1542,"length":48} + >for (let [nameB = "noName"] of getMultiRobots()) + >:=> (line 57, col 0) to (line 57, col 48) +57 >for (let [nameB = "noName"] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1550 to 1568) SpanInfo: {"start":1552,"length":16} + >nameB = "noName" + >:=> (line 57, col 10) to (line 57, col 26) +57 >for (let [nameB = "noName"] of getMultiRobots()) { + + ~~~ => Pos: (1569 to 1571) SpanInfo: {"start":1542,"length":48} + >for (let [nameB = "noName"] of getMultiRobots()) + >:=> (line 57, col 0) to (line 57, col 48) +57 >for (let [nameB = "noName"] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~=> Pos: (1572 to 1588) SpanInfo: {"start":1573,"length":16} + >getMultiRobots() + >:=> (line 57, col 31) to (line 57, col 47) +57 >for (let [nameB = "noName"] of getMultiRobots()) { + + ~~~~=> Pos: (1589 to 1592) SpanInfo: {"start":1542,"length":48} + >for (let [nameB = "noName"] of getMultiRobots()) + >:=> (line 57, col 0) to (line 57, col 48) +-------------------------------- +58 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1593 to 1616) SpanInfo: {"start":1597,"length":18} + >console.log(nameB) + >:=> (line 58, col 4) to (line 58, col 22) +-------------------------------- +59 >} + + ~~ => Pos: (1617 to 1618) SpanInfo: {"start":1597,"length":18} + >console.log(nameB) + >:=> (line 58, col 4) to (line 58, col 22) +-------------------------------- +60 >for (let [nameB = "noName"] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~ => Pos: (1619 to 1626) SpanInfo: {"start":1619,"length":58} + >for (let [nameB = "noName"] of [multiRobotA, multiRobotB]) + >:=> (line 60, col 0) to (line 60, col 58) +60 >for (let [nameB = "noName"] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1627 to 1645) SpanInfo: {"start":1629,"length":16} + >nameB = "noName" + >:=> (line 60, col 10) to (line 60, col 26) +60 >for (let [nameB = "noName"] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1646 to 1679) SpanInfo: {"start":1619,"length":58} + >for (let [nameB = "noName"] of [multiRobotA, multiRobotB]) + >:=> (line 60, col 0) to (line 60, col 58) +-------------------------------- +61 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1680 to 1703) SpanInfo: {"start":1684,"length":18} + >console.log(nameB) + >:=> (line 61, col 4) to (line 61, col 22) +-------------------------------- +62 >} + + ~~ => Pos: (1704 to 1705) SpanInfo: {"start":1684,"length":18} + >console.log(nameB) + >:=> (line 61, col 4) to (line 61, col 22) +-------------------------------- +63 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { + + ~~~~~~~~ => Pos: (1706 to 1713) SpanInfo: {"start":1706,"length":73} + >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) + >:=> (line 63, col 0) to (line 63, col 73) +63 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { + + ~~~~~~~~~~~~~~~~ => Pos: (1714 to 1729) SpanInfo: {"start":1716,"length":13} + >numberA2 = -1 + >:=> (line 63, col 10) to (line 63, col 23) +63 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1730 to 1748) SpanInfo: {"start":1731,"length":17} + >nameA2 = "noName" + >:=> (line 63, col 25) to (line 63, col 42) +63 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (1749 to 1767) SpanInfo: {"start":1750,"length":17} + >skillA2 = "skill" + >:=> (line 63, col 44) to (line 63, col 61) +63 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { + + ~~~~~~~~~~~~~~=> Pos: (1768 to 1781) SpanInfo: {"start":1706,"length":73} + >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) + >:=> (line 63, col 0) to (line 63, col 73) +-------------------------------- +64 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1782 to 1806) SpanInfo: {"start":1786,"length":19} + >console.log(nameA2) + >:=> (line 64, col 4) to (line 64, col 23) +-------------------------------- +65 >} + + ~~ => Pos: (1807 to 1808) SpanInfo: {"start":1786,"length":19} + >console.log(nameA2) + >:=> (line 64, col 4) to (line 64, col 23) +-------------------------------- +66 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { + + ~~~~~~~~ => Pos: (1809 to 1816) SpanInfo: {"start":1809,"length":78} + >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) + >:=> (line 66, col 0) to (line 66, col 78) +66 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { + + ~~~~~~~~~~~~~~~~ => Pos: (1817 to 1832) SpanInfo: {"start":1819,"length":13} + >numberA2 = -1 + >:=> (line 66, col 10) to (line 66, col 23) +66 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1833 to 1851) SpanInfo: {"start":1834,"length":17} + >nameA2 = "noName" + >:=> (line 66, col 25) to (line 66, col 42) +66 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (1852 to 1870) SpanInfo: {"start":1853,"length":17} + >skillA2 = "skill" + >:=> (line 66, col 44) to (line 66, col 61) +66 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { + + ~~~=> Pos: (1871 to 1873) SpanInfo: {"start":1809,"length":78} + >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) + >:=> (line 66, col 0) to (line 66, col 78) +66 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { + + ~~~~~~~~~~~~=> Pos: (1874 to 1885) SpanInfo: {"start":1875,"length":11} + >getRobots() + >:=> (line 66, col 66) to (line 66, col 77) +66 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { + + ~~~~=> Pos: (1886 to 1889) SpanInfo: {"start":1809,"length":78} + >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) + >:=> (line 66, col 0) to (line 66, col 78) +-------------------------------- +67 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1890 to 1914) SpanInfo: {"start":1894,"length":19} + >console.log(nameA2) + >:=> (line 67, col 4) to (line 67, col 23) +-------------------------------- +68 >} + + ~~ => Pos: (1915 to 1916) SpanInfo: {"start":1894,"length":19} + >console.log(nameA2) + >:=> (line 67, col 4) to (line 67, col 23) +-------------------------------- +69 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) { + + ~~~~~~~~ => Pos: (1917 to 1924) SpanInfo: {"start":1917,"length":83} + >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) + >:=> (line 69, col 0) to (line 69, col 83) +69 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~~ => Pos: (1925 to 1940) SpanInfo: {"start":1927,"length":13} + >numberA2 = -1 + >:=> (line 69, col 10) to (line 69, col 23) +69 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1941 to 1959) SpanInfo: {"start":1942,"length":17} + >nameA2 = "noName" + >:=> (line 69, col 25) to (line 69, col 42) +69 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (1960 to 1978) SpanInfo: {"start":1961,"length":17} + >skillA2 = "skill" + >:=> (line 69, col 44) to (line 69, col 61) +69 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1979 to 2002) SpanInfo: {"start":1917,"length":83} + >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) + >:=> (line 69, col 0) to (line 69, col 83) +-------------------------------- +70 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2003 to 2027) SpanInfo: {"start":2007,"length":19} + >console.log(nameA2) + >:=> (line 70, col 4) to (line 70, col 23) +-------------------------------- +71 >} + + ~~ => Pos: (2028 to 2029) SpanInfo: {"start":2007,"length":19} + >console.log(nameA2) + >:=> (line 70, col 4) to (line 70, col 23) +-------------------------------- +72 >for (let [nameMA = "noName", [ + + ~~~~~~~~ => Pos: (2030 to 2037) SpanInfo: {"start":2030,"length":137} + >for (let [nameMA = "noName", [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"]] of multiRobots) + >:=> (line 72, col 0) to (line 75, col 41) +72 >for (let [nameMA = "noName", [ + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (2038 to 2057) SpanInfo: {"start":2040,"length":17} + >nameMA = "noName" + >:=> (line 72, col 10) to (line 72, col 27) +72 >for (let [nameMA = "noName", [ + + ~~~ => Pos: (2058 to 2060) SpanInfo: {"start":2065,"length":25} + >primarySkillA = "primary" + >:=> (line 73, col 4) to (line 73, col 29) +-------------------------------- +73 > primarySkillA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2061 to 2091) SpanInfo: {"start":2065,"length":25} + >primarySkillA = "primary" + >:=> (line 73, col 4) to (line 73, col 29) +-------------------------------- +74 > secondarySkillA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2092 to 2125) SpanInfo: {"start":2096,"length":29} + >secondarySkillA = "secondary" + >:=> (line 74, col 4) to (line 74, col 33) +-------------------------------- +75 >] = ["skill1", "skill2"]] of multiRobots) { + + ~ => Pos: (2126 to 2126) SpanInfo: {"start":2096,"length":29} + >secondarySkillA = "secondary" + >:=> (line 74, col 4) to (line 74, col 33) +75 >] = ["skill1", "skill2"]] of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2127 to 2150) SpanInfo: {"start":2059,"length":91} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"] + >:=> (line 72, col 29) to (line 75, col 24) +75 >] = ["skill1", "skill2"]] of multiRobots) { + + ~~~~~~~~~~~~~~~~ => Pos: (2151 to 2166) SpanInfo: {"start":2030,"length":137} + >for (let [nameMA = "noName", [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"]] of multiRobots) + >:=> (line 72, col 0) to (line 75, col 41) +75 >] = ["skill1", "skill2"]] of multiRobots) { + + ~~~ => Pos: (2167 to 2169) SpanInfo: {"start":2174,"length":19} + >console.log(nameMA) + >:=> (line 76, col 4) to (line 76, col 23) +-------------------------------- +76 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2170 to 2194) SpanInfo: {"start":2174,"length":19} + >console.log(nameMA) + >:=> (line 76, col 4) to (line 76, col 23) +-------------------------------- +77 >} + + ~~ => Pos: (2195 to 2196) SpanInfo: {"start":2174,"length":19} + >console.log(nameMA) + >:=> (line 76, col 4) to (line 76, col 23) +-------------------------------- +78 >for (let [nameMA = "noName", [ + + ~~~~~~~~ => Pos: (2197 to 2204) SpanInfo: {"start":2197,"length":142} + >for (let [nameMA = "noName", [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"]] of getMultiRobots()) + >:=> (line 78, col 0) to (line 81, col 46) +78 >for (let [nameMA = "noName", [ + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (2205 to 2224) SpanInfo: {"start":2207,"length":17} + >nameMA = "noName" + >:=> (line 78, col 10) to (line 78, col 27) +78 >for (let [nameMA = "noName", [ + + ~~~ => Pos: (2225 to 2227) SpanInfo: {"start":2232,"length":25} + >primarySkillA = "primary" + >:=> (line 79, col 4) to (line 79, col 29) +-------------------------------- +79 > primarySkillA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2228 to 2258) SpanInfo: {"start":2232,"length":25} + >primarySkillA = "primary" + >:=> (line 79, col 4) to (line 79, col 29) +-------------------------------- +80 > secondarySkillA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2259 to 2292) SpanInfo: {"start":2263,"length":29} + >secondarySkillA = "secondary" + >:=> (line 80, col 4) to (line 80, col 33) +-------------------------------- +81 >] = ["skill1", "skill2"]] of getMultiRobots()) { + + ~ => Pos: (2293 to 2293) SpanInfo: {"start":2263,"length":29} + >secondarySkillA = "secondary" + >:=> (line 80, col 4) to (line 80, col 33) +81 >] = ["skill1", "skill2"]] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2294 to 2317) SpanInfo: {"start":2226,"length":91} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"] + >:=> (line 78, col 29) to (line 81, col 24) +81 >] = ["skill1", "skill2"]] of getMultiRobots()) { + + ~~~ => Pos: (2318 to 2320) SpanInfo: {"start":2197,"length":142} + >for (let [nameMA = "noName", [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"]] of getMultiRobots()) + >:=> (line 78, col 0) to (line 81, col 46) +81 >] = ["skill1", "skill2"]] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~ => Pos: (2321 to 2337) SpanInfo: {"start":2322,"length":16} + >getMultiRobots() + >:=> (line 81, col 29) to (line 81, col 45) +81 >] = ["skill1", "skill2"]] of getMultiRobots()) { + + ~=> Pos: (2338 to 2338) SpanInfo: {"start":2197,"length":142} + >for (let [nameMA = "noName", [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"]] of getMultiRobots()) + >:=> (line 78, col 0) to (line 81, col 46) +81 >] = ["skill1", "skill2"]] of getMultiRobots()) { + + ~~~=> Pos: (2339 to 2341) SpanInfo: {"start":2346,"length":19} + >console.log(nameMA) + >:=> (line 82, col 4) to (line 82, col 23) +-------------------------------- +82 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2342 to 2366) SpanInfo: {"start":2346,"length":19} + >console.log(nameMA) + >:=> (line 82, col 4) to (line 82, col 23) +-------------------------------- +83 >} + + ~~ => Pos: (2367 to 2368) SpanInfo: {"start":2346,"length":19} + >console.log(nameMA) + >:=> (line 82, col 4) to (line 82, col 23) +-------------------------------- +84 >for (let [nameMA = "noName", [ + + ~~~~~~~~ => Pos: (2369 to 2376) SpanInfo: {"start":2369,"length":152} + >for (let [nameMA = "noName", [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) + >:=> (line 84, col 0) to (line 87, col 56) +84 >for (let [nameMA = "noName", [ + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (2377 to 2396) SpanInfo: {"start":2379,"length":17} + >nameMA = "noName" + >:=> (line 84, col 10) to (line 84, col 27) +84 >for (let [nameMA = "noName", [ + + ~~~ => Pos: (2397 to 2399) SpanInfo: {"start":2404,"length":25} + >primarySkillA = "primary" + >:=> (line 85, col 4) to (line 85, col 29) +-------------------------------- +85 > primarySkillA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2400 to 2430) SpanInfo: {"start":2404,"length":25} + >primarySkillA = "primary" + >:=> (line 85, col 4) to (line 85, col 29) +-------------------------------- +86 > secondarySkillA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2431 to 2464) SpanInfo: {"start":2435,"length":29} + >secondarySkillA = "secondary" + >:=> (line 86, col 4) to (line 86, col 33) +-------------------------------- +87 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { + + ~ => Pos: (2465 to 2465) SpanInfo: {"start":2435,"length":29} + >secondarySkillA = "secondary" + >:=> (line 86, col 4) to (line 86, col 33) +87 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2466 to 2489) SpanInfo: {"start":2398,"length":91} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"] + >:=> (line 84, col 29) to (line 87, col 24) +87 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2490 to 2520) SpanInfo: {"start":2369,"length":152} + >for (let [nameMA = "noName", [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) + >:=> (line 84, col 0) to (line 87, col 56) +87 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { + + ~~~=> Pos: (2521 to 2523) SpanInfo: {"start":2528,"length":19} + >console.log(nameMA) + >:=> (line 88, col 4) to (line 88, col 23) +-------------------------------- +88 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2524 to 2548) SpanInfo: {"start":2528,"length":19} + >console.log(nameMA) + >:=> (line 88, col 4) to (line 88, col 23) +-------------------------------- +89 >} + + ~~ => Pos: (2549 to 2550) SpanInfo: {"start":2528,"length":19} + >console.log(nameMA) + >:=> (line 88, col 4) to (line 88, col 23) +-------------------------------- +90 >for (let [numberA3 = -1, ...robotAInfo] of robots) { + + ~~~~~~~~ => Pos: (2551 to 2558) SpanInfo: {"start":2551,"length":50} + >for (let [numberA3 = -1, ...robotAInfo] of robots) + >:=> (line 90, col 0) to (line 90, col 50) +90 >for (let [numberA3 = -1, ...robotAInfo] of robots) { + + ~~~~~~~~~~~~~~~~ => Pos: (2559 to 2574) SpanInfo: {"start":2561,"length":13} + >numberA3 = -1 + >:=> (line 90, col 10) to (line 90, col 23) +90 >for (let [numberA3 = -1, ...robotAInfo] of robots) { + + ~~~~~~~~~~~~~~~ => Pos: (2575 to 2589) SpanInfo: {"start":2576,"length":13} + >...robotAInfo + >:=> (line 90, col 25) to (line 90, col 38) +90 >for (let [numberA3 = -1, ...robotAInfo] of robots) { + + ~~~~~~~~~~~~~~=> Pos: (2590 to 2603) SpanInfo: {"start":2551,"length":50} + >for (let [numberA3 = -1, ...robotAInfo] of robots) + >:=> (line 90, col 0) to (line 90, col 50) +-------------------------------- +91 > console.log(numberA3); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2604 to 2630) SpanInfo: {"start":2608,"length":21} + >console.log(numberA3) + >:=> (line 91, col 4) to (line 91, col 25) +-------------------------------- +92 >} + + ~~ => Pos: (2631 to 2632) SpanInfo: {"start":2608,"length":21} + >console.log(numberA3) + >:=> (line 91, col 4) to (line 91, col 25) +-------------------------------- +93 >for (let [numberA3 = -1, ...robotAInfo] of getRobots()) { + + ~~~~~~~~ => Pos: (2633 to 2640) SpanInfo: {"start":2633,"length":55} + >for (let [numberA3 = -1, ...robotAInfo] of getRobots()) + >:=> (line 93, col 0) to (line 93, col 55) +93 >for (let [numberA3 = -1, ...robotAInfo] of getRobots()) { + + ~~~~~~~~~~~~~~~~ => Pos: (2641 to 2656) SpanInfo: {"start":2643,"length":13} + >numberA3 = -1 + >:=> (line 93, col 10) to (line 93, col 23) +93 >for (let [numberA3 = -1, ...robotAInfo] of getRobots()) { + + ~~~~~~~~~~~~~~~ => Pos: (2657 to 2671) SpanInfo: {"start":2658,"length":13} + >...robotAInfo + >:=> (line 93, col 25) to (line 93, col 38) +93 >for (let [numberA3 = -1, ...robotAInfo] of getRobots()) { + + ~~~ => Pos: (2672 to 2674) SpanInfo: {"start":2633,"length":55} + >for (let [numberA3 = -1, ...robotAInfo] of getRobots()) + >:=> (line 93, col 0) to (line 93, col 55) +93 >for (let [numberA3 = -1, ...robotAInfo] of getRobots()) { + + ~~~~~~~~~~~~=> Pos: (2675 to 2686) SpanInfo: {"start":2676,"length":11} + >getRobots() + >:=> (line 93, col 43) to (line 93, col 54) +93 >for (let [numberA3 = -1, ...robotAInfo] of getRobots()) { + + ~~~~=> Pos: (2687 to 2690) SpanInfo: {"start":2633,"length":55} + >for (let [numberA3 = -1, ...robotAInfo] of getRobots()) + >:=> (line 93, col 0) to (line 93, col 55) +-------------------------------- +94 > console.log(numberA3); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2691 to 2717) SpanInfo: {"start":2695,"length":21} + >console.log(numberA3) + >:=> (line 94, col 4) to (line 94, col 25) +-------------------------------- +95 >} + + ~~ => Pos: (2718 to 2719) SpanInfo: {"start":2695,"length":21} + >console.log(numberA3) + >:=> (line 94, col 4) to (line 94, col 25) +-------------------------------- +96 >for (let [numberA3 = -1, ...robotAInfo] of [robotA, robotB]) { + + ~~~~~~~~ => Pos: (2720 to 2727) SpanInfo: {"start":2720,"length":60} + >for (let [numberA3 = -1, ...robotAInfo] of [robotA, robotB]) + >:=> (line 96, col 0) to (line 96, col 60) +96 >for (let [numberA3 = -1, ...robotAInfo] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~~ => Pos: (2728 to 2743) SpanInfo: {"start":2730,"length":13} + >numberA3 = -1 + >:=> (line 96, col 10) to (line 96, col 23) +96 >for (let [numberA3 = -1, ...robotAInfo] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~ => Pos: (2744 to 2758) SpanInfo: {"start":2745,"length":13} + >...robotAInfo + >:=> (line 96, col 25) to (line 96, col 38) +96 >for (let [numberA3 = -1, ...robotAInfo] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2759 to 2782) SpanInfo: {"start":2720,"length":60} + >for (let [numberA3 = -1, ...robotAInfo] of [robotA, robotB]) + >:=> (line 96, col 0) to (line 96, col 60) +-------------------------------- +97 > console.log(numberA3); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2783 to 2809) SpanInfo: {"start":2787,"length":21} + >console.log(numberA3) + >:=> (line 97, col 4) to (line 97, col 25) +-------------------------------- +98 >} + ~ => Pos: (2810 to 2810) SpanInfo: {"start":2787,"length":21} + >console.log(numberA3) + >:=> (line 97, col 4) to (line 97, col 25) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringForOfObjectBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringForOfObjectBindingPattern.baseline new file mode 100644 index 00000000000..27e089a811d --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringForOfObjectBindingPattern.baseline @@ -0,0 +1,635 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: any): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (48 to 49) SpanInfo: undefined +-------------------------------- +4 >interface Robot { + + ~~~~~~~~~~~~~~~~~~ => Pos: (50 to 67) SpanInfo: undefined +-------------------------------- +5 > name: string; + + ~~~~~~~~~~~~~~~~~~ => Pos: (68 to 85) SpanInfo: undefined +-------------------------------- +6 > skill: string; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (86 to 104) SpanInfo: undefined +-------------------------------- +7 >} + + ~~ => Pos: (105 to 106) SpanInfo: undefined +-------------------------------- +8 >interface MultiRobot { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (107 to 129) SpanInfo: undefined +-------------------------------- +9 > name: string; + + ~~~~~~~~~~~~~~~~~~ => Pos: (130 to 147) SpanInfo: undefined +-------------------------------- +10 > skills: { + + ~~~~~~~~~~~~~~ => Pos: (148 to 161) SpanInfo: undefined +-------------------------------- +11 > primary: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (162 to 186) SpanInfo: undefined +-------------------------------- +12 > secondary: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (187 to 213) SpanInfo: undefined +-------------------------------- +13 > }; + + ~~~~~~~ => Pos: (214 to 220) SpanInfo: undefined +-------------------------------- +14 >} + + ~~ => Pos: (221 to 222) SpanInfo: undefined +-------------------------------- +15 >let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (223 to 322) SpanInfo: {"start":223,"length":98} + >let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] + >:=> (line 15, col 0) to (line 15, col 98) +-------------------------------- +16 >let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (323 to 424) SpanInfo: {"start":323,"length":180} + >let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 16, col 0) to (line 17, col 78) +-------------------------------- +17 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (425 to 504) SpanInfo: {"start":323,"length":180} + >let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 16, col 0) to (line 17, col 78) +-------------------------------- +18 >function getRobots() { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (505 to 527) SpanInfo: {"start":532,"length":13} + >return robots + >:=> (line 19, col 4) to (line 19, col 17) +-------------------------------- +19 > return robots; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (528 to 546) SpanInfo: {"start":532,"length":13} + >return robots + >:=> (line 19, col 4) to (line 19, col 17) +-------------------------------- +20 >} + + ~~ => Pos: (547 to 548) SpanInfo: {"start":547,"length":1} + >} + >:=> (line 20, col 0) to (line 20, col 1) +-------------------------------- +21 >function getMultiRobots() { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (549 to 576) SpanInfo: {"start":581,"length":18} + >return multiRobots + >:=> (line 22, col 4) to (line 22, col 22) +-------------------------------- +22 > return multiRobots; + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (577 to 600) SpanInfo: {"start":581,"length":18} + >return multiRobots + >:=> (line 22, col 4) to (line 22, col 22) +-------------------------------- +23 >} + + ~~ => Pos: (601 to 602) SpanInfo: {"start":601,"length":1} + >} + >:=> (line 23, col 0) to (line 23, col 1) +-------------------------------- +24 >for (let {name: nameA } of robots) { + + ~~~~~~~~ => Pos: (603 to 610) SpanInfo: {"start":603,"length":34} + >for (let {name: nameA } of robots) + >:=> (line 24, col 0) to (line 24, col 34) +24 >for (let {name: nameA } of robots) { + + ~~~~~~~~~~~~~~~ => Pos: (611 to 625) SpanInfo: {"start":613,"length":11} + >name: nameA + >:=> (line 24, col 10) to (line 24, col 21) +24 >for (let {name: nameA } of robots) { + + ~~~~~~~~~~~~~~ => Pos: (626 to 639) SpanInfo: {"start":603,"length":34} + >for (let {name: nameA } of robots) + >:=> (line 24, col 0) to (line 24, col 34) +-------------------------------- +25 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (640 to 663) SpanInfo: {"start":644,"length":18} + >console.log(nameA) + >:=> (line 25, col 4) to (line 25, col 22) +-------------------------------- +26 >} + + ~~ => Pos: (664 to 665) SpanInfo: {"start":644,"length":18} + >console.log(nameA) + >:=> (line 25, col 4) to (line 25, col 22) +-------------------------------- +27 >for (let {name: nameA } of getRobots()) { + + ~~~~~~~~ => Pos: (666 to 673) SpanInfo: {"start":666,"length":39} + >for (let {name: nameA } of getRobots()) + >:=> (line 27, col 0) to (line 27, col 39) +27 >for (let {name: nameA } of getRobots()) { + + ~~~~~~~~~~~~~~~ => Pos: (674 to 688) SpanInfo: {"start":676,"length":11} + >name: nameA + >:=> (line 27, col 10) to (line 27, col 21) +27 >for (let {name: nameA } of getRobots()) { + + ~~~ => Pos: (689 to 691) SpanInfo: {"start":666,"length":39} + >for (let {name: nameA } of getRobots()) + >:=> (line 27, col 0) to (line 27, col 39) +27 >for (let {name: nameA } of getRobots()) { + + ~~~~~~~~~~~~ => Pos: (692 to 703) SpanInfo: {"start":693,"length":11} + >getRobots() + >:=> (line 27, col 27) to (line 27, col 38) +27 >for (let {name: nameA } of getRobots()) { + + ~~~~ => Pos: (704 to 707) SpanInfo: {"start":666,"length":39} + >for (let {name: nameA } of getRobots()) + >:=> (line 27, col 0) to (line 27, col 39) +-------------------------------- +28 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (708 to 731) SpanInfo: {"start":712,"length":18} + >console.log(nameA) + >:=> (line 28, col 4) to (line 28, col 22) +-------------------------------- +29 >} + + ~~ => Pos: (732 to 733) SpanInfo: {"start":712,"length":18} + >console.log(nameA) + >:=> (line 28, col 4) to (line 28, col 22) +-------------------------------- +30 >for (let {name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~ => Pos: (734 to 741) SpanInfo: {"start":734,"length":104} + >for (let {name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) + >:=> (line 30, col 0) to (line 30, col 104) +30 >for (let {name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~~~~ => Pos: (742 to 756) SpanInfo: {"start":744,"length":11} + >name: nameA + >:=> (line 30, col 10) to (line 30, col 21) +30 >for (let {name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (757 to 840) SpanInfo: {"start":734,"length":104} + >for (let {name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) + >:=> (line 30, col 0) to (line 30, col 104) +-------------------------------- +31 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (841 to 864) SpanInfo: {"start":845,"length":18} + >console.log(nameA) + >:=> (line 31, col 4) to (line 31, col 22) +-------------------------------- +32 >} + + ~~ => Pos: (865 to 866) SpanInfo: {"start":845,"length":18} + >console.log(nameA) + >:=> (line 31, col 4) to (line 31, col 22) +-------------------------------- +33 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + + ~~~~~~~~ => Pos: (867 to 874) SpanInfo: {"start":867,"length":81} + >for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) + >:=> (line 33, col 0) to (line 33, col 81) +33 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + + ~~~~~~~~~~ => Pos: (875 to 884) SpanInfo: {"start":878,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 33, col 11) to (line 33, col 63) +33 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (885 to 905) SpanInfo: {"start":888,"length":17} + >primary: primaryA + >:=> (line 33, col 21) to (line 33, col 38) +33 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (906 to 929) SpanInfo: {"start":907,"length":21} + >secondary: secondaryA + >:=> (line 33, col 40) to (line 33, col 61) +33 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + + ~~=> Pos: (930 to 931) SpanInfo: {"start":878,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 33, col 11) to (line 33, col 63) +33 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (932 to 950) SpanInfo: {"start":867,"length":81} + >for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) + >:=> (line 33, col 0) to (line 33, col 81) +-------------------------------- +34 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (951 to 977) SpanInfo: {"start":955,"length":21} + >console.log(primaryA) + >:=> (line 34, col 4) to (line 34, col 25) +-------------------------------- +35 >} + + ~~ => Pos: (978 to 979) SpanInfo: {"start":955,"length":21} + >console.log(primaryA) + >:=> (line 34, col 4) to (line 34, col 25) +-------------------------------- +36 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~~~~~~~ => Pos: (980 to 987) SpanInfo: {"start":980,"length":86} + >for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) + >:=> (line 36, col 0) to (line 36, col 86) +36 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~~~~~~~~~ => Pos: (988 to 997) SpanInfo: {"start":991,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 36, col 11) to (line 36, col 63) +36 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (998 to 1018) SpanInfo: {"start":1001,"length":17} + >primary: primaryA + >:=> (line 36, col 21) to (line 36, col 38) +36 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1019 to 1042) SpanInfo: {"start":1020,"length":21} + >secondary: secondaryA + >:=> (line 36, col 40) to (line 36, col 61) +36 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~=> Pos: (1043 to 1044) SpanInfo: {"start":991,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 36, col 11) to (line 36, col 63) +36 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~~=> Pos: (1045 to 1047) SpanInfo: {"start":980,"length":86} + >for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) + >:=> (line 36, col 0) to (line 36, col 86) +36 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~=> Pos: (1048 to 1064) SpanInfo: {"start":1049,"length":16} + >getMultiRobots() + >:=> (line 36, col 69) to (line 36, col 85) +36 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~~~=> Pos: (1065 to 1068) SpanInfo: {"start":980,"length":86} + >for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) + >:=> (line 36, col 0) to (line 36, col 86) +-------------------------------- +37 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1069 to 1095) SpanInfo: {"start":1073,"length":21} + >console.log(primaryA) + >:=> (line 37, col 4) to (line 37, col 25) +-------------------------------- +38 >} + + ~~ => Pos: (1096 to 1097) SpanInfo: {"start":1073,"length":21} + >console.log(primaryA) + >:=> (line 37, col 4) to (line 37, col 25) +-------------------------------- +39 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~ => Pos: (1098 to 1105) SpanInfo: {"start":1098,"length":218} + >for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) + >:=> (line 39, col 0) to (line 40, col 79) +39 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~ => Pos: (1106 to 1115) SpanInfo: {"start":1109,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 39, col 11) to (line 39, col 63) +39 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (1116 to 1136) SpanInfo: {"start":1119,"length":17} + >primary: primaryA + >:=> (line 39, col 21) to (line 39, col 38) +39 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1137 to 1160) SpanInfo: {"start":1138,"length":21} + >secondary: secondaryA + >:=> (line 39, col 40) to (line 39, col 61) +39 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~=> Pos: (1161 to 1162) SpanInfo: {"start":1109,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 39, col 11) to (line 39, col 63) +39 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1163 to 1236) SpanInfo: {"start":1098,"length":218} + >for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) + >:=> (line 39, col 0) to (line 40, col 79) +-------------------------------- +40 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1237 to 1315) SpanInfo: {"start":1098,"length":218} + >for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) + >:=> (line 39, col 0) to (line 40, col 79) +40 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + + ~~~=> Pos: (1316 to 1318) SpanInfo: {"start":1323,"length":21} + >console.log(primaryA) + >:=> (line 41, col 4) to (line 41, col 25) +-------------------------------- +41 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1319 to 1345) SpanInfo: {"start":1323,"length":21} + >console.log(primaryA) + >:=> (line 41, col 4) to (line 41, col 25) +-------------------------------- +42 >} + + ~~ => Pos: (1346 to 1347) SpanInfo: {"start":1323,"length":21} + >console.log(primaryA) + >:=> (line 41, col 4) to (line 41, col 25) +-------------------------------- +43 >for (let {name: nameA, skill: skillA } of robots) { + + ~~~~~~~~ => Pos: (1348 to 1355) SpanInfo: {"start":1348,"length":49} + >for (let {name: nameA, skill: skillA } of robots) + >:=> (line 43, col 0) to (line 43, col 49) +43 >for (let {name: nameA, skill: skillA } of robots) { + + ~~~~~~~~~~~~~~ => Pos: (1356 to 1369) SpanInfo: {"start":1358,"length":11} + >name: nameA + >:=> (line 43, col 10) to (line 43, col 21) +43 >for (let {name: nameA, skill: skillA } of robots) { + + ~~~~~~~~~~~~~~~~ => Pos: (1370 to 1385) SpanInfo: {"start":1371,"length":13} + >skill: skillA + >:=> (line 43, col 23) to (line 43, col 36) +43 >for (let {name: nameA, skill: skillA } of robots) { + + ~~~~~~~~~~~~~~=> Pos: (1386 to 1399) SpanInfo: {"start":1348,"length":49} + >for (let {name: nameA, skill: skillA } of robots) + >:=> (line 43, col 0) to (line 43, col 49) +-------------------------------- +44 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1400 to 1423) SpanInfo: {"start":1404,"length":18} + >console.log(nameA) + >:=> (line 44, col 4) to (line 44, col 22) +-------------------------------- +45 >} + + ~~ => Pos: (1424 to 1425) SpanInfo: {"start":1404,"length":18} + >console.log(nameA) + >:=> (line 44, col 4) to (line 44, col 22) +-------------------------------- +46 >for (let {name: nameA, skill: skillA } of getRobots()) { + + ~~~~~~~~ => Pos: (1426 to 1433) SpanInfo: {"start":1426,"length":54} + >for (let {name: nameA, skill: skillA } of getRobots()) + >:=> (line 46, col 0) to (line 46, col 54) +46 >for (let {name: nameA, skill: skillA } of getRobots()) { + + ~~~~~~~~~~~~~~ => Pos: (1434 to 1447) SpanInfo: {"start":1436,"length":11} + >name: nameA + >:=> (line 46, col 10) to (line 46, col 21) +46 >for (let {name: nameA, skill: skillA } of getRobots()) { + + ~~~~~~~~~~~~~~~~ => Pos: (1448 to 1463) SpanInfo: {"start":1449,"length":13} + >skill: skillA + >:=> (line 46, col 23) to (line 46, col 36) +46 >for (let {name: nameA, skill: skillA } of getRobots()) { + + ~~~ => Pos: (1464 to 1466) SpanInfo: {"start":1426,"length":54} + >for (let {name: nameA, skill: skillA } of getRobots()) + >:=> (line 46, col 0) to (line 46, col 54) +46 >for (let {name: nameA, skill: skillA } of getRobots()) { + + ~~~~~~~~~~~~=> Pos: (1467 to 1478) SpanInfo: {"start":1468,"length":11} + >getRobots() + >:=> (line 46, col 42) to (line 46, col 53) +46 >for (let {name: nameA, skill: skillA } of getRobots()) { + + ~~~~=> Pos: (1479 to 1482) SpanInfo: {"start":1426,"length":54} + >for (let {name: nameA, skill: skillA } of getRobots()) + >:=> (line 46, col 0) to (line 46, col 54) +-------------------------------- +47 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1483 to 1506) SpanInfo: {"start":1487,"length":18} + >console.log(nameA) + >:=> (line 47, col 4) to (line 47, col 22) +-------------------------------- +48 >} + + ~~ => Pos: (1507 to 1508) SpanInfo: {"start":1487,"length":18} + >console.log(nameA) + >:=> (line 47, col 4) to (line 47, col 22) +-------------------------------- +49 >for (let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~ => Pos: (1509 to 1516) SpanInfo: {"start":1509,"length":119} + >for (let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) + >:=> (line 49, col 0) to (line 49, col 119) +49 >for (let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~~~ => Pos: (1517 to 1530) SpanInfo: {"start":1519,"length":11} + >name: nameA + >:=> (line 49, col 10) to (line 49, col 21) +49 >for (let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~~~~~ => Pos: (1531 to 1546) SpanInfo: {"start":1532,"length":13} + >skill: skillA + >:=> (line 49, col 23) to (line 49, col 36) +49 >for (let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1547 to 1630) SpanInfo: {"start":1509,"length":119} + >for (let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) + >:=> (line 49, col 0) to (line 49, col 119) +-------------------------------- +50 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1631 to 1654) SpanInfo: {"start":1635,"length":18} + >console.log(nameA) + >:=> (line 50, col 4) to (line 50, col 22) +-------------------------------- +51 >} + + ~~ => Pos: (1655 to 1656) SpanInfo: {"start":1635,"length":18} + >console.log(nameA) + >:=> (line 50, col 4) to (line 50, col 22) +-------------------------------- +52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + + ~~~~~~~~ => Pos: (1657 to 1664) SpanInfo: {"start":1657,"length":93} + >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) + >:=> (line 52, col 0) to (line 52, col 93) +52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + + ~~~~~~~~~~~~~~ => Pos: (1665 to 1678) SpanInfo: {"start":1667,"length":11} + >name: nameA + >:=> (line 52, col 10) to (line 52, col 21) +52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + + ~~~~~~~~ => Pos: (1679 to 1686) SpanInfo: {"start":1680,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 52, col 23) to (line 52, col 75) +52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~~~=> Pos: (1687 to 1707) SpanInfo: {"start":1690,"length":17} + >primary: primaryA + >:=> (line 52, col 33) to (line 52, col 50) +52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1708 to 1731) SpanInfo: {"start":1709,"length":21} + >secondary: secondaryA + >:=> (line 52, col 52) to (line 52, col 73) +52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + + ~~=> Pos: (1732 to 1733) SpanInfo: {"start":1680,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 52, col 23) to (line 52, col 75) +52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (1734 to 1752) SpanInfo: {"start":1657,"length":93} + >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) + >:=> (line 52, col 0) to (line 52, col 93) +-------------------------------- +53 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1753 to 1776) SpanInfo: {"start":1757,"length":18} + >console.log(nameA) + >:=> (line 53, col 4) to (line 53, col 22) +-------------------------------- +54 >} + + ~~ => Pos: (1777 to 1778) SpanInfo: {"start":1757,"length":18} + >console.log(nameA) + >:=> (line 53, col 4) to (line 53, col 22) +-------------------------------- +55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~~~~~~~ => Pos: (1779 to 1786) SpanInfo: {"start":1779,"length":98} + >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) + >:=> (line 55, col 0) to (line 55, col 98) +55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~~~~~~~~~~~~~ => Pos: (1787 to 1800) SpanInfo: {"start":1789,"length":11} + >name: nameA + >:=> (line 55, col 10) to (line 55, col 21) +55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~~~~~~~ => Pos: (1801 to 1808) SpanInfo: {"start":1802,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 55, col 23) to (line 55, col 75) +55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~=> Pos: (1809 to 1829) SpanInfo: {"start":1812,"length":17} + >primary: primaryA + >:=> (line 55, col 33) to (line 55, col 50) +55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1830 to 1853) SpanInfo: {"start":1831,"length":21} + >secondary: secondaryA + >:=> (line 55, col 52) to (line 55, col 73) +55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~=> Pos: (1854 to 1855) SpanInfo: {"start":1802,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 55, col 23) to (line 55, col 75) +55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~~=> Pos: (1856 to 1858) SpanInfo: {"start":1779,"length":98} + >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) + >:=> (line 55, col 0) to (line 55, col 98) +55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~=> Pos: (1859 to 1875) SpanInfo: {"start":1860,"length":16} + >getMultiRobots() + >:=> (line 55, col 81) to (line 55, col 97) +55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~~~=> Pos: (1876 to 1879) SpanInfo: {"start":1779,"length":98} + >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) + >:=> (line 55, col 0) to (line 55, col 98) +-------------------------------- +56 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1880 to 1903) SpanInfo: {"start":1884,"length":18} + >console.log(nameA) + >:=> (line 56, col 4) to (line 56, col 22) +-------------------------------- +57 >} + + ~~ => Pos: (1904 to 1905) SpanInfo: {"start":1884,"length":18} + >console.log(nameA) + >:=> (line 56, col 4) to (line 56, col 22) +-------------------------------- +58 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~ => Pos: (1906 to 1913) SpanInfo: {"start":1906,"length":230} + >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) + >:=> (line 58, col 0) to (line 59, col 79) +58 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~ => Pos: (1914 to 1927) SpanInfo: {"start":1916,"length":11} + >name: nameA + >:=> (line 58, col 10) to (line 58, col 21) +58 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~ => Pos: (1928 to 1935) SpanInfo: {"start":1929,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 58, col 23) to (line 58, col 75) +58 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~~~~~~~~=> Pos: (1936 to 1956) SpanInfo: {"start":1939,"length":17} + >primary: primaryA + >:=> (line 58, col 33) to (line 58, col 50) +58 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1957 to 1980) SpanInfo: {"start":1958,"length":21} + >secondary: secondaryA + >:=> (line 58, col 52) to (line 58, col 73) +58 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~=> Pos: (1981 to 1982) SpanInfo: {"start":1929,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 58, col 23) to (line 58, col 75) +58 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1983 to 2056) SpanInfo: {"start":1906,"length":230} + >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) + >:=> (line 58, col 0) to (line 59, col 79) +-------------------------------- +59 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2057 to 2135) SpanInfo: {"start":1906,"length":230} + >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) + >:=> (line 58, col 0) to (line 59, col 79) +59 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + + ~~~=> Pos: (2136 to 2138) SpanInfo: {"start":2143,"length":18} + >console.log(nameA) + >:=> (line 60, col 4) to (line 60, col 22) +-------------------------------- +60 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2139 to 2162) SpanInfo: {"start":2143,"length":18} + >console.log(nameA) + >:=> (line 60, col 4) to (line 60, col 22) +-------------------------------- +61 >} + ~ => Pos: (2163 to 2163) SpanInfo: {"start":2143,"length":18} + >console.log(nameA) + >:=> (line 60, col 4) to (line 60, col 22) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringForOfObjectBindingPatternDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringForOfObjectBindingPatternDefaultValues.baseline new file mode 100644 index 00000000000..d5553960334 --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringForOfObjectBindingPatternDefaultValues.baseline @@ -0,0 +1,855 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: any): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (48 to 49) SpanInfo: undefined +-------------------------------- +4 >interface Robot { + + ~~~~~~~~~~~~~~~~~~ => Pos: (50 to 67) SpanInfo: undefined +-------------------------------- +5 > name: string; + + ~~~~~~~~~~~~~~~~~~ => Pos: (68 to 85) SpanInfo: undefined +-------------------------------- +6 > skill: string; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (86 to 104) SpanInfo: undefined +-------------------------------- +7 >} + + ~~ => Pos: (105 to 106) SpanInfo: undefined +-------------------------------- +8 >interface MultiRobot { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (107 to 129) SpanInfo: undefined +-------------------------------- +9 > name: string; + + ~~~~~~~~~~~~~~~~~~ => Pos: (130 to 147) SpanInfo: undefined +-------------------------------- +10 > skills: { + + ~~~~~~~~~~~~~~ => Pos: (148 to 161) SpanInfo: undefined +-------------------------------- +11 > primary?: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (162 to 187) SpanInfo: undefined +-------------------------------- +12 > secondary?: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (188 to 215) SpanInfo: undefined +-------------------------------- +13 > }; + + ~~~~~~~ => Pos: (216 to 222) SpanInfo: undefined +-------------------------------- +14 >} + + ~~ => Pos: (223 to 224) SpanInfo: undefined +-------------------------------- +15 >let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (225 to 324) SpanInfo: {"start":225,"length":98} + >let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] + >:=> (line 15, col 0) to (line 15, col 98) +-------------------------------- +16 >let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (325 to 426) SpanInfo: {"start":325,"length":180} + >let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 16, col 0) to (line 17, col 78) +-------------------------------- +17 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (427 to 506) SpanInfo: {"start":325,"length":180} + >let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 16, col 0) to (line 17, col 78) +-------------------------------- +18 >function getRobots() { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (507 to 529) SpanInfo: {"start":534,"length":13} + >return robots + >:=> (line 19, col 4) to (line 19, col 17) +-------------------------------- +19 > return robots; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (530 to 548) SpanInfo: {"start":534,"length":13} + >return robots + >:=> (line 19, col 4) to (line 19, col 17) +-------------------------------- +20 >} + + ~~ => Pos: (549 to 550) SpanInfo: {"start":549,"length":1} + >} + >:=> (line 20, col 0) to (line 20, col 1) +-------------------------------- +21 >function getMultiRobots() { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (551 to 578) SpanInfo: {"start":583,"length":18} + >return multiRobots + >:=> (line 22, col 4) to (line 22, col 22) +-------------------------------- +22 > return multiRobots; + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (579 to 602) SpanInfo: {"start":583,"length":18} + >return multiRobots + >:=> (line 22, col 4) to (line 22, col 22) +-------------------------------- +23 >} + + ~~ => Pos: (603 to 604) SpanInfo: {"start":603,"length":1} + >} + >:=> (line 23, col 0) to (line 23, col 1) +-------------------------------- +24 >for (let {name: nameA = "noName" } of robots) { + + ~~~~~~~~ => Pos: (605 to 612) SpanInfo: {"start":605,"length":45} + >for (let {name: nameA = "noName" } of robots) + >:=> (line 24, col 0) to (line 24, col 45) +24 >for (let {name: nameA = "noName" } of robots) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (613 to 638) SpanInfo: {"start":615,"length":22} + >name: nameA = "noName" + >:=> (line 24, col 10) to (line 24, col 32) +24 >for (let {name: nameA = "noName" } of robots) { + + ~~~~~~~~~~~~~~=> Pos: (639 to 652) SpanInfo: {"start":605,"length":45} + >for (let {name: nameA = "noName" } of robots) + >:=> (line 24, col 0) to (line 24, col 45) +-------------------------------- +25 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (653 to 676) SpanInfo: {"start":657,"length":18} + >console.log(nameA) + >:=> (line 25, col 4) to (line 25, col 22) +-------------------------------- +26 >} + + ~~ => Pos: (677 to 678) SpanInfo: {"start":657,"length":18} + >console.log(nameA) + >:=> (line 25, col 4) to (line 25, col 22) +-------------------------------- +27 >for (let {name: nameA = "noName" } of getRobots()) { + + ~~~~~~~~ => Pos: (679 to 686) SpanInfo: {"start":679,"length":50} + >for (let {name: nameA = "noName" } of getRobots()) + >:=> (line 27, col 0) to (line 27, col 50) +27 >for (let {name: nameA = "noName" } of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (687 to 712) SpanInfo: {"start":689,"length":22} + >name: nameA = "noName" + >:=> (line 27, col 10) to (line 27, col 32) +27 >for (let {name: nameA = "noName" } of getRobots()) { + + ~~~ => Pos: (713 to 715) SpanInfo: {"start":679,"length":50} + >for (let {name: nameA = "noName" } of getRobots()) + >:=> (line 27, col 0) to (line 27, col 50) +27 >for (let {name: nameA = "noName" } of getRobots()) { + + ~~~~~~~~~~~~=> Pos: (716 to 727) SpanInfo: {"start":717,"length":11} + >getRobots() + >:=> (line 27, col 38) to (line 27, col 49) +27 >for (let {name: nameA = "noName" } of getRobots()) { + + ~~~~=> Pos: (728 to 731) SpanInfo: {"start":679,"length":50} + >for (let {name: nameA = "noName" } of getRobots()) + >:=> (line 27, col 0) to (line 27, col 50) +-------------------------------- +28 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (732 to 755) SpanInfo: {"start":736,"length":18} + >console.log(nameA) + >:=> (line 28, col 4) to (line 28, col 22) +-------------------------------- +29 >} + + ~~ => Pos: (756 to 757) SpanInfo: {"start":736,"length":18} + >console.log(nameA) + >:=> (line 28, col 4) to (line 28, col 22) +-------------------------------- +30 >for (let {name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~ => Pos: (758 to 765) SpanInfo: {"start":758,"length":115} + >for (let {name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) + >:=> (line 30, col 0) to (line 30, col 115) +30 >for (let {name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (766 to 791) SpanInfo: {"start":768,"length":22} + >name: nameA = "noName" + >:=> (line 30, col 10) to (line 30, col 32) +30 >for (let {name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (792 to 875) SpanInfo: {"start":758,"length":115} + >for (let {name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) + >:=> (line 30, col 0) to (line 30, col 115) +-------------------------------- +31 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (876 to 899) SpanInfo: {"start":880,"length":18} + >console.log(nameA) + >:=> (line 31, col 4) to (line 31, col 22) +-------------------------------- +32 >} + + ~~ => Pos: (900 to 901) SpanInfo: {"start":880,"length":18} + >console.log(nameA) + >:=> (line 31, col 4) to (line 31, col 22) +-------------------------------- +33 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + + ~~~~~~~~ => Pos: (902 to 909) SpanInfo: {"start":902,"length":158} + >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } } of multiRobots) + >:=> (line 33, col 0) to (line 34, col 66) +33 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + + ~~~~~~~~~~ => Pos: (910 to 919) SpanInfo: {"start":913,"length":129} + >skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } + >:=> (line 33, col 11) to (line 34, col 48) +33 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (920 to 952) SpanInfo: {"start":923,"length":29} + >primary: primaryA = "primary" + >:=> (line 33, col 21) to (line 33, col 50) +33 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (953 to 990) SpanInfo: {"start":954,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 33, col 52) to (line 33, col 87) +33 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + + ~~~=> Pos: (991 to 993) SpanInfo: {"start":913,"length":129} + >skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } + >:=> (line 33, col 11) to (line 34, col 48) +-------------------------------- +34 > { primary: "nosKill", secondary: "noSkill" } } of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (994 to 1043) SpanInfo: {"start":913,"length":129} + >skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } + >:=> (line 33, col 11) to (line 34, col 48) +34 > { primary: "nosKill", secondary: "noSkill" } } of multiRobots) { + + ~~~~~~~~~~~~~~~~=> Pos: (1044 to 1059) SpanInfo: {"start":902,"length":158} + >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } } of multiRobots) + >:=> (line 33, col 0) to (line 34, col 66) +34 > { primary: "nosKill", secondary: "noSkill" } } of multiRobots) { + + ~~~=> Pos: (1060 to 1062) SpanInfo: {"start":1067,"length":21} + >console.log(primaryA) + >:=> (line 35, col 4) to (line 35, col 25) +-------------------------------- +35 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1063 to 1089) SpanInfo: {"start":1067,"length":21} + >console.log(primaryA) + >:=> (line 35, col 4) to (line 35, col 25) +-------------------------------- +36 >} + + ~~ => Pos: (1090 to 1091) SpanInfo: {"start":1067,"length":21} + >console.log(primaryA) + >:=> (line 35, col 4) to (line 35, col 25) +-------------------------------- +37 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + + ~~~~~~~~ => Pos: (1092 to 1099) SpanInfo: {"start":1092,"length":163} + >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) + >:=> (line 37, col 0) to (line 38, col 71) +37 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + + ~~~~~~~~~~ => Pos: (1100 to 1109) SpanInfo: {"start":1103,"length":129} + >skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } + >:=> (line 37, col 11) to (line 38, col 48) +37 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1110 to 1142) SpanInfo: {"start":1113,"length":29} + >primary: primaryA = "primary" + >:=> (line 37, col 21) to (line 37, col 50) +37 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1143 to 1180) SpanInfo: {"start":1144,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 37, col 52) to (line 37, col 87) +37 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + + ~~~=> Pos: (1181 to 1183) SpanInfo: {"start":1103,"length":129} + >skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } + >:=> (line 37, col 11) to (line 38, col 48) +-------------------------------- +38 > { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1184 to 1233) SpanInfo: {"start":1103,"length":129} + >skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } + >:=> (line 37, col 11) to (line 38, col 48) +38 > { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) { + + ~~~=> Pos: (1234 to 1236) SpanInfo: {"start":1092,"length":163} + >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) + >:=> (line 37, col 0) to (line 38, col 71) +38 > { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~=> Pos: (1237 to 1253) SpanInfo: {"start":1238,"length":16} + >getMultiRobots() + >:=> (line 38, col 54) to (line 38, col 70) +38 > { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) { + + ~=> Pos: (1254 to 1254) SpanInfo: {"start":1092,"length":163} + >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) + >:=> (line 37, col 0) to (line 38, col 71) +38 > { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) { + + ~~~=> Pos: (1255 to 1257) SpanInfo: {"start":1262,"length":21} + >console.log(primaryA) + >:=> (line 39, col 4) to (line 39, col 25) +-------------------------------- +39 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1258 to 1284) SpanInfo: {"start":1262,"length":21} + >console.log(primaryA) + >:=> (line 39, col 4) to (line 39, col 25) +-------------------------------- +40 >} + + ~~ => Pos: (1285 to 1286) SpanInfo: {"start":1262,"length":21} + >console.log(primaryA) + >:=> (line 39, col 4) to (line 39, col 25) +-------------------------------- +41 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + + ~~~~~~~~ => Pos: (1287 to 1294) SpanInfo: {"start":1287,"length":313} + >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } } of + > [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) + >:=> (line 41, col 0) to (line 44, col 79) +41 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + + ~~~~~~~~~~ => Pos: (1295 to 1304) SpanInfo: {"start":1298,"length":129} + >skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } + >:=> (line 41, col 11) to (line 42, col 48) +41 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1305 to 1337) SpanInfo: {"start":1308,"length":29} + >primary: primaryA = "primary" + >:=> (line 41, col 21) to (line 41, col 50) +41 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1338 to 1375) SpanInfo: {"start":1339,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 41, col 52) to (line 41, col 87) +41 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + + ~~~=> Pos: (1376 to 1378) SpanInfo: {"start":1298,"length":129} + >skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } + >:=> (line 41, col 11) to (line 42, col 48) +-------------------------------- +42 > { primary: "nosKill", secondary: "noSkill" } } of + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1379 to 1428) SpanInfo: {"start":1298,"length":129} + >skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } + >:=> (line 41, col 11) to (line 42, col 48) +42 > { primary: "nosKill", secondary: "noSkill" } } of + + ~~~~=> Pos: (1429 to 1432) SpanInfo: {"start":1287,"length":313} + >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } } of + > [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) + >:=> (line 41, col 0) to (line 44, col 79) +-------------------------------- +43 > [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1433 to 1520) SpanInfo: {"start":1287,"length":313} + >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } } of + > [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) + >:=> (line 41, col 0) to (line 44, col 79) +-------------------------------- +44 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1521 to 1599) SpanInfo: {"start":1287,"length":313} + >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } } of + > [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) + >:=> (line 41, col 0) to (line 44, col 79) +44 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + + ~~~=> Pos: (1600 to 1602) SpanInfo: {"start":1607,"length":21} + >console.log(primaryA) + >:=> (line 45, col 4) to (line 45, col 25) +-------------------------------- +45 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1603 to 1629) SpanInfo: {"start":1607,"length":21} + >console.log(primaryA) + >:=> (line 45, col 4) to (line 45, col 25) +-------------------------------- +46 >} + + ~~ => Pos: (1630 to 1631) SpanInfo: {"start":1607,"length":21} + >console.log(primaryA) + >:=> (line 45, col 4) to (line 45, col 25) +-------------------------------- +47 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of robots) { + + ~~~~~~~~ => Pos: (1632 to 1639) SpanInfo: {"start":1632,"length":72} + >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of robots) + >:=> (line 47, col 0) to (line 47, col 72) +47 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of robots) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1640 to 1664) SpanInfo: {"start":1642,"length":22} + >name: nameA = "noName" + >:=> (line 47, col 10) to (line 47, col 32) +47 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of robots) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1665 to 1692) SpanInfo: {"start":1666,"length":25} + >skill: skillA = "noSkill" + >:=> (line 47, col 34) to (line 47, col 59) +47 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of robots) { + + ~~~~~~~~~~~~~~=> Pos: (1693 to 1706) SpanInfo: {"start":1632,"length":72} + >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of robots) + >:=> (line 47, col 0) to (line 47, col 72) +-------------------------------- +48 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1707 to 1730) SpanInfo: {"start":1711,"length":18} + >console.log(nameA) + >:=> (line 48, col 4) to (line 48, col 22) +-------------------------------- +49 >} + + ~~ => Pos: (1731 to 1732) SpanInfo: {"start":1711,"length":18} + >console.log(nameA) + >:=> (line 48, col 4) to (line 48, col 22) +-------------------------------- +50 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { + + ~~~~~~~~ => Pos: (1733 to 1740) SpanInfo: {"start":1733,"length":78} + >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) + >:=> (line 50, col 0) to (line 50, col 78) +50 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1741 to 1765) SpanInfo: {"start":1743,"length":22} + >name: nameA = "noName" + >:=> (line 50, col 10) to (line 50, col 32) +50 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1766 to 1794) SpanInfo: {"start":1767,"length":25} + >skill: skillA = "noSkill" + >:=> (line 50, col 34) to (line 50, col 59) +50 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { + + ~~~=> Pos: (1795 to 1797) SpanInfo: {"start":1733,"length":78} + >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) + >:=> (line 50, col 0) to (line 50, col 78) +50 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { + + ~~~~~~~~~~~~=> Pos: (1798 to 1809) SpanInfo: {"start":1799,"length":11} + >getRobots() + >:=> (line 50, col 66) to (line 50, col 77) +50 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { + + ~~~~=> Pos: (1810 to 1813) SpanInfo: {"start":1733,"length":78} + >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) + >:=> (line 50, col 0) to (line 50, col 78) +-------------------------------- +51 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1814 to 1837) SpanInfo: {"start":1818,"length":18} + >console.log(nameA) + >:=> (line 51, col 4) to (line 51, col 22) +-------------------------------- +52 >} + + ~~ => Pos: (1838 to 1839) SpanInfo: {"start":1818,"length":18} + >console.log(nameA) + >:=> (line 51, col 4) to (line 51, col 22) +-------------------------------- +53 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~ => Pos: (1840 to 1847) SpanInfo: {"start":1840,"length":143} + >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) + >:=> (line 53, col 0) to (line 53, col 143) +53 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1848 to 1872) SpanInfo: {"start":1850,"length":22} + >name: nameA = "noName" + >:=> (line 53, col 10) to (line 53, col 32) +53 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1873 to 1901) SpanInfo: {"start":1874,"length":25} + >skill: skillA = "noSkill" + >:=> (line 53, col 34) to (line 53, col 59) +53 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1902 to 1985) SpanInfo: {"start":1840,"length":143} + >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) + >:=> (line 53, col 0) to (line 53, col 143) +-------------------------------- +54 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1986 to 2009) SpanInfo: {"start":1990,"length":18} + >console.log(nameA) + >:=> (line 54, col 4) to (line 54, col 22) +-------------------------------- +55 >} + + ~~ => Pos: (2010 to 2011) SpanInfo: {"start":1990,"length":18} + >console.log(nameA) + >:=> (line 54, col 4) to (line 54, col 22) +-------------------------------- +56 >for (let { + + ~~~~~~~~ => Pos: (2012 to 2019) SpanInfo: {"start":2012,"length":206} + >for (let { + > name: nameA = "noName", + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >} of multiRobots) + >:=> (line 56, col 0) to (line 62, col 17) +56 >for (let { + + ~~~ => Pos: (2020 to 2022) SpanInfo: {"start":2027,"length":22} + >name: nameA = "noName" + >:=> (line 57, col 4) to (line 57, col 26) +-------------------------------- +57 > name: nameA = "noName", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2023 to 2050) SpanInfo: {"start":2027,"length":22} + >name: nameA = "noName" + >:=> (line 57, col 4) to (line 57, col 26) +-------------------------------- +58 > skills: { + + ~~~~~~~~~~~ => Pos: (2051 to 2061) SpanInfo: {"start":2055,"length":145} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 58, col 4) to (line 61, col 52) +58 > skills: { + + ~~~ => Pos: (2062 to 2064) SpanInfo: {"start":2073,"length":29} + >primary: primaryA = "primary" + >:=> (line 59, col 8) to (line 59, col 37) +-------------------------------- +59 > primary: primaryA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2065 to 2103) SpanInfo: {"start":2073,"length":29} + >primary: primaryA = "primary" + >:=> (line 59, col 8) to (line 59, col 37) +-------------------------------- +60 > secondary: secondaryA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2104 to 2147) SpanInfo: {"start":2112,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 60, col 8) to (line 60, col 43) +-------------------------------- +61 > } = { primary: "noSkill", secondary: "noSkill" } + + ~~~~~ => Pos: (2148 to 2152) SpanInfo: {"start":2112,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 60, col 8) to (line 60, col 43) +61 > } = { primary: "noSkill", secondary: "noSkill" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2153 to 2200) SpanInfo: {"start":2055,"length":145} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 58, col 4) to (line 61, col 52) +-------------------------------- +62 >} of multiRobots) { + + ~ => Pos: (2201 to 2201) SpanInfo: {"start":2055,"length":145} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 58, col 4) to (line 61, col 52) +62 >} of multiRobots) { + + ~~~~~~~~~~~~~~~~ => Pos: (2202 to 2217) SpanInfo: {"start":2012,"length":206} + >for (let { + > name: nameA = "noName", + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >} of multiRobots) + >:=> (line 56, col 0) to (line 62, col 17) +62 >} of multiRobots) { + + ~~~ => Pos: (2218 to 2220) SpanInfo: {"start":2225,"length":18} + >console.log(nameA) + >:=> (line 63, col 4) to (line 63, col 22) +-------------------------------- +63 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2221 to 2244) SpanInfo: {"start":2225,"length":18} + >console.log(nameA) + >:=> (line 63, col 4) to (line 63, col 22) +-------------------------------- +64 >} + + ~~ => Pos: (2245 to 2246) SpanInfo: {"start":2225,"length":18} + >console.log(nameA) + >:=> (line 63, col 4) to (line 63, col 22) +-------------------------------- +65 >for (let { + + ~~~~~~~~ => Pos: (2247 to 2254) SpanInfo: {"start":2247,"length":211} + >for (let { + > name: nameA = "noName", + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >} of getMultiRobots()) + >:=> (line 65, col 0) to (line 71, col 22) +65 >for (let { + + ~~~ => Pos: (2255 to 2257) SpanInfo: {"start":2262,"length":22} + >name: nameA = "noName" + >:=> (line 66, col 4) to (line 66, col 26) +-------------------------------- +66 > name: nameA = "noName", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2258 to 2285) SpanInfo: {"start":2262,"length":22} + >name: nameA = "noName" + >:=> (line 66, col 4) to (line 66, col 26) +-------------------------------- +67 > skills: { + + ~~~~~~~~~~~ => Pos: (2286 to 2296) SpanInfo: {"start":2290,"length":145} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 67, col 4) to (line 70, col 52) +67 > skills: { + + ~~~ => Pos: (2297 to 2299) SpanInfo: {"start":2308,"length":29} + >primary: primaryA = "primary" + >:=> (line 68, col 8) to (line 68, col 37) +-------------------------------- +68 > primary: primaryA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2300 to 2338) SpanInfo: {"start":2308,"length":29} + >primary: primaryA = "primary" + >:=> (line 68, col 8) to (line 68, col 37) +-------------------------------- +69 > secondary: secondaryA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2339 to 2382) SpanInfo: {"start":2347,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 69, col 8) to (line 69, col 43) +-------------------------------- +70 > } = { primary: "noSkill", secondary: "noSkill" } + + ~~~~~ => Pos: (2383 to 2387) SpanInfo: {"start":2347,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 69, col 8) to (line 69, col 43) +70 > } = { primary: "noSkill", secondary: "noSkill" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2388 to 2435) SpanInfo: {"start":2290,"length":145} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 67, col 4) to (line 70, col 52) +-------------------------------- +71 >} of getMultiRobots()) { + + ~ => Pos: (2436 to 2436) SpanInfo: {"start":2290,"length":145} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 67, col 4) to (line 70, col 52) +71 >} of getMultiRobots()) { + + ~~~ => Pos: (2437 to 2439) SpanInfo: {"start":2247,"length":211} + >for (let { + > name: nameA = "noName", + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >} of getMultiRobots()) + >:=> (line 65, col 0) to (line 71, col 22) +71 >} of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~ => Pos: (2440 to 2456) SpanInfo: {"start":2441,"length":16} + >getMultiRobots() + >:=> (line 71, col 5) to (line 71, col 21) +71 >} of getMultiRobots()) { + + ~ => Pos: (2457 to 2457) SpanInfo: {"start":2247,"length":211} + >for (let { + > name: nameA = "noName", + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >} of getMultiRobots()) + >:=> (line 65, col 0) to (line 71, col 22) +71 >} of getMultiRobots()) { + + ~~~ => Pos: (2458 to 2460) SpanInfo: {"start":2465,"length":18} + >console.log(nameA) + >:=> (line 72, col 4) to (line 72, col 22) +-------------------------------- +72 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2461 to 2484) SpanInfo: {"start":2465,"length":18} + >console.log(nameA) + >:=> (line 72, col 4) to (line 72, col 22) +-------------------------------- +73 >} + + ~~ => Pos: (2485 to 2486) SpanInfo: {"start":2465,"length":18} + >console.log(nameA) + >:=> (line 72, col 4) to (line 72, col 22) +-------------------------------- +74 >for (let { + + ~~~~~~~~ => Pos: (2487 to 2494) SpanInfo: {"start":2487,"length":357} + >for (let { + > name: nameA = "noName", + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) + >:=> (line 74, col 0) to (line 81, col 79) +74 >for (let { + + ~~~ => Pos: (2495 to 2497) SpanInfo: {"start":2502,"length":22} + >name: nameA = "noName" + >:=> (line 75, col 4) to (line 75, col 26) +-------------------------------- +75 > name: nameA = "noName", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2498 to 2525) SpanInfo: {"start":2502,"length":22} + >name: nameA = "noName" + >:=> (line 75, col 4) to (line 75, col 26) +-------------------------------- +76 > skills: { + + ~~~~~~~~~~~ => Pos: (2526 to 2536) SpanInfo: {"start":2530,"length":145} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 76, col 4) to (line 79, col 52) +76 > skills: { + + ~~~ => Pos: (2537 to 2539) SpanInfo: {"start":2548,"length":29} + >primary: primaryA = "primary" + >:=> (line 77, col 8) to (line 77, col 37) +-------------------------------- +77 > primary: primaryA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2540 to 2578) SpanInfo: {"start":2548,"length":29} + >primary: primaryA = "primary" + >:=> (line 77, col 8) to (line 77, col 37) +-------------------------------- +78 > secondary: secondaryA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2579 to 2622) SpanInfo: {"start":2587,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 78, col 8) to (line 78, col 43) +-------------------------------- +79 > } = { primary: "noSkill", secondary: "noSkill" } + + ~~~~~ => Pos: (2623 to 2627) SpanInfo: {"start":2587,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 78, col 8) to (line 78, col 43) +79 > } = { primary: "noSkill", secondary: "noSkill" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2628 to 2675) SpanInfo: {"start":2530,"length":145} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 76, col 4) to (line 79, col 52) +-------------------------------- +80 >} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~ => Pos: (2676 to 2676) SpanInfo: {"start":2530,"length":145} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 76, col 4) to (line 79, col 52) +80 >} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2677 to 2764) SpanInfo: {"start":2487,"length":357} + >for (let { + > name: nameA = "noName", + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) + >:=> (line 74, col 0) to (line 81, col 79) +-------------------------------- +81 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2765 to 2843) SpanInfo: {"start":2487,"length":357} + >for (let { + > name: nameA = "noName", + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) + >:=> (line 74, col 0) to (line 81, col 79) +81 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + + ~~~=> Pos: (2844 to 2846) SpanInfo: {"start":2851,"length":18} + >console.log(nameA) + >:=> (line 82, col 4) to (line 82, col 22) +-------------------------------- +82 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2847 to 2870) SpanInfo: {"start":2851,"length":18} + >console.log(nameA) + >:=> (line 82, col 4) to (line 82, col 22) +-------------------------------- +83 >} + ~ => Pos: (2871 to 2871) SpanInfo: {"start":2851,"length":18} + >console.log(nameA) + >:=> (line 82, col 4) to (line 82, col 22) \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringForOfArrayBindingPattern.ts b/tests/cases/fourslash/breakpointValidationDestructuringForOfArrayBindingPattern.ts new file mode 100644 index 00000000000..90a726c9066 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringForOfArrayBindingPattern.ts @@ -0,0 +1,91 @@ +/// +////declare var console: { +//// log(msg: any): void; +////} +////type Robot = [number, string, string]; +////type MultiSkilledRobot = [string, [string, string]]; +////let robotA: Robot = [1, "mower", "mowing"]; +////let robotB: Robot = [2, "trimmer", "trimming"]; +////let robots = [robotA, robotB]; +////function getRobots() { +//// return robots; +////} +////let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +////let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +////let multiRobots = [multiRobotA, multiRobotB]; +////function getMultiRobots() { +//// return multiRobots; +////} +////for (let [, nameA] of robots) { +//// console.log(nameA); +////} +////for (let [, nameA] of getRobots()) { +//// console.log(nameA); +////} +////for (let [, nameA] of [robotA, robotB]) { +//// console.log(nameA); +////} +////for (let [, [primarySkillA, secondarySkillA]] of multiRobots) { +//// console.log(primarySkillA); +////} +////for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) { +//// console.log(primarySkillA); +////} +////for (let [, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { +//// console.log(primarySkillA); +////} +////for (let [numberB] of robots) { +//// console.log(numberB); +////} +////for (let [numberB] of getRobots()) { +//// console.log(numberB); +////} +////for (let [numberB] of [robotA, robotB]) { +//// console.log(numberB); +////} +////for (let [nameB] of multiRobots) { +//// console.log(nameB); +////} +////for (let [nameB] of getMultiRobots()) { +//// console.log(nameB); +////} +////for (let [nameB] of [multiRobotA, multiRobotB]) { +//// console.log(nameB); +////} +////for (let [numberA2, nameA2, skillA2] of robots) { +//// console.log(nameA2); +////} +////for (let [numberA2, nameA2, skillA2] of getRobots()) { +//// console.log(nameA2); +////} +////for (let [numberA2, nameA2, skillA2] of [robotA, robotB]) { +//// console.log(nameA2); +////} +////for (let [nameMA, [primarySkillA, secondarySkillA]] of multiRobots) { +//// console.log(nameMA); +////} +////for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { +//// console.log(nameMA); +////} +////for (let [nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { +//// console.log(nameMA); +////} +////for (let [numberA3, ...robotAInfo] of robots) { +//// console.log(numberA3); +////} +////for (let [numberA3, ...robotAInfo] of getRobots()) { +//// console.log(numberA3); +////} +////for (let [numberA3, ...robotAInfo] of [robotA, robotB]) { +//// console.log(numberA3); +////} +////for (let [...multiRobotAInfo] of multiRobots) { +//// console.log(multiRobotAInfo); +////} +////for (let [...multiRobotAInfo] of getMultiRobots()) { +//// console.log(multiRobotAInfo); +////} +////for (let [...multiRobotAInfo] of [multiRobotA, multiRobotB]) { +//// console.log(multiRobotAInfo); +////} +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringForOfArrayBindingPatternDefaultValues.ts b/tests/cases/fourslash/breakpointValidationDestructuringForOfArrayBindingPatternDefaultValues.ts new file mode 100644 index 00000000000..12689236080 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringForOfArrayBindingPatternDefaultValues.ts @@ -0,0 +1,100 @@ +/// +////declare var console: { +//// log(msg: any): void; +////} +////type Robot = [number, string, string]; +////type MultiSkilledRobot = [string, [string, string]]; +////let robotA: Robot = [1, "mower", "mowing"]; +////let robotB: Robot = [2, "trimmer", "trimming"]; +////let robots = [robotA, robotB]; +////function getRobots() { +//// return robots; +////} +////let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +////let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +////let multiRobots = [multiRobotA, multiRobotB]; +////function getMultiRobots() { +//// return multiRobots; +////} +////for (let [, nameA = "noName"] of robots) { +//// console.log(nameA); +////} +////for (let [, nameA = "noName"] of getRobots()) { +//// console.log(nameA); +////} +////for (let [, nameA = "noName"] of [robotA, robotB]) { +//// console.log(nameA); +////} +////for (let [, [ +//// primarySkillA = "primary", +//// secondarySkillA = "secondary" +////] = ["skill1", "skill2"]] of multiRobots) { +//// console.log(primarySkillA); +////} +////for (let [, [ +//// primarySkillA = "primary", +//// secondarySkillA = "secondary" +////] = ["skill1", "skill2"]] of getMultiRobots()) { +//// console.log(primarySkillA); +////} +////for (let [, [ +//// primarySkillA = "primary", +//// secondarySkillA = "secondary" +////] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { +//// console.log(primarySkillA); +////} +////for (let [numberB = -1] of robots) { +//// console.log(numberB); +////} +////for (let [numberB = -1] of getRobots()) { +//// console.log(numberB); +////} +////for (let [numberB = -1] of [robotA, robotB]) { +//// console.log(numberB); +////} +////for (let [nameB = "noName"] of multiRobots) { +//// console.log(nameB); +////} +////for (let [nameB = "noName"] of getMultiRobots()) { +//// console.log(nameB); +////} +////for (let [nameB = "noName"] of [multiRobotA, multiRobotB]) { +//// console.log(nameB); +////} +////for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { +//// console.log(nameA2); +////} +////for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { +//// console.log(nameA2); +////} +////for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) { +//// console.log(nameA2); +////} +////for (let [nameMA = "noName", [ +//// primarySkillA = "primary", +//// secondarySkillA = "secondary" +////] = ["skill1", "skill2"]] of multiRobots) { +//// console.log(nameMA); +////} +////for (let [nameMA = "noName", [ +//// primarySkillA = "primary", +//// secondarySkillA = "secondary" +////] = ["skill1", "skill2"]] of getMultiRobots()) { +//// console.log(nameMA); +////} +////for (let [nameMA = "noName", [ +//// primarySkillA = "primary", +//// secondarySkillA = "secondary" +////] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { +//// console.log(nameMA); +////} +////for (let [numberA3 = -1, ...robotAInfo] of robots) { +//// console.log(numberA3); +////} +////for (let [numberA3 = -1, ...robotAInfo] of getRobots()) { +//// console.log(numberA3); +////} +////for (let [numberA3 = -1, ...robotAInfo] of [robotA, robotB]) { +//// console.log(numberA3); +////} +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringForOfObjectBindingPattern.ts b/tests/cases/fourslash/breakpointValidationDestructuringForOfObjectBindingPattern.ts new file mode 100644 index 00000000000..8fc1b29bbc0 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringForOfObjectBindingPattern.ts @@ -0,0 +1,63 @@ +/// +////declare var console: { +//// log(msg: any): void; +////} +////interface Robot { +//// name: string; +//// skill: string; +////} +////interface MultiRobot { +//// name: string; +//// skills: { +//// primary: string; +//// secondary: string; +//// }; +////} +////let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +////let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +//// { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; +////function getRobots() { +//// return robots; +////} +////function getMultiRobots() { +//// return multiRobots; +////} +////for (let {name: nameA } of robots) { +//// console.log(nameA); +////} +////for (let {name: nameA } of getRobots()) { +//// console.log(nameA); +////} +////for (let {name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +//// console.log(nameA); +////} +////for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { +//// console.log(primaryA); +////} +////for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { +//// console.log(primaryA); +////} +////for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +//// { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +//// console.log(primaryA); +////} +////for (let {name: nameA, skill: skillA } of robots) { +//// console.log(nameA); +////} +////for (let {name: nameA, skill: skillA } of getRobots()) { +//// console.log(nameA); +////} +////for (let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +//// console.log(nameA); +////} +////for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { +//// console.log(nameA); +////} +////for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { +//// console.log(nameA); +////} +////for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +//// { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +//// console.log(nameA); +////} +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringForOfObjectBindingPatternDefaultValues.ts b/tests/cases/fourslash/breakpointValidationDestructuringForOfObjectBindingPatternDefaultValues.ts new file mode 100644 index 00000000000..ded0584ec43 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringForOfObjectBindingPatternDefaultValues.ts @@ -0,0 +1,85 @@ +/// +////declare var console: { +//// log(msg: any): void; +////} +////interface Robot { +//// name: string; +//// skill: string; +////} +////interface MultiRobot { +//// name: string; +//// skills: { +//// primary?: string; +//// secondary?: string; +//// }; +////} +////let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +////let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +//// { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; +////function getRobots() { +//// return robots; +////} +////function getMultiRobots() { +//// return multiRobots; +////} +////for (let {name: nameA = "noName" } of robots) { +//// console.log(nameA); +////} +////for (let {name: nameA = "noName" } of getRobots()) { +//// console.log(nameA); +////} +////for (let {name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +//// console.log(nameA); +////} +////for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = +//// { primary: "nosKill", secondary: "noSkill" } } of multiRobots) { +//// console.log(primaryA); +////} +////for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = +//// { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) { +//// console.log(primaryA); +////} +////for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = +//// { primary: "nosKill", secondary: "noSkill" } } of +//// [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +//// { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +//// console.log(primaryA); +////} +////for (let {name: nameA = "noName", skill: skillA = "noSkill" } of robots) { +//// console.log(nameA); +////} +////for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { +//// console.log(nameA); +////} +////for (let {name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +//// console.log(nameA); +////} +////for (let { +//// name: nameA = "noName", +//// skills: { +//// primary: primaryA = "primary", +//// secondary: secondaryA = "secondary" +//// } = { primary: "noSkill", secondary: "noSkill" } +////} of multiRobots) { +//// console.log(nameA); +////} +////for (let { +//// name: nameA = "noName", +//// skills: { +//// primary: primaryA = "primary", +//// secondary: secondaryA = "secondary" +//// } = { primary: "noSkill", secondary: "noSkill" } +////} of getMultiRobots()) { +//// console.log(nameA); +////} +////for (let { +//// name: nameA = "noName", +//// skills: { +//// primary: primaryA = "primary", +//// secondary: secondaryA = "secondary" +//// } = { primary: "noSkill", secondary: "noSkill" } +////} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +//// { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +//// console.log(nameA); +////} +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file From 843bdbb4bd48f024a7d952f7cd00c35a0987e5b4 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 21 Dec 2015 13:01:21 -0800 Subject: [PATCH 072/209] Fix the breakpoints in For Of destructuring --- src/services/breakpoints.ts | 111 +++-- ...ructuringForOfArrayBindingPattern.baseline | 360 ++++------------ ...fArrayBindingPatternDefaultValues.baseline | 387 ++++-------------- ...ucturingForOfObjectBindingPattern.baseline | 212 +++------- ...ObjectBindingPatternDefaultValues.baseline | 301 +++----------- 5 files changed, 326 insertions(+), 1045 deletions(-) diff --git a/src/services/breakpoints.ts b/src/services/breakpoints.ts index 5b6647e4338..679988dbcf2 100644 --- a/src/services/breakpoints.ts +++ b/src/services/breakpoints.ts @@ -45,6 +45,10 @@ namespace ts.BreakpointResolver { return createTextSpanFromBounds(start, (endNode || startNode).getEnd()); } + function textSpanEndingAtNextToken(startNode: Node, previousTokenToFindNextEndToken: Node): TextSpan { + return textSpan(startNode, findNextToken(previousTokenToFindNextEndToken, previousTokenToFindNextEndToken.parent)); + } + function spanInNodeIfStartsOnSameLine(node: Node, otherwiseOnNode?: Node): TextSpan { if (node && lineOfPosition === sourceFile.getLineAndCharacterOfPosition(node.getStart(sourceFile)).line) { return spanInNode(node); @@ -67,29 +71,33 @@ namespace ts.BreakpointResolver { function spanInNode(node: Node): TextSpan { if (node) { if (isExpression(node)) { - if (node.parent.kind === SyntaxKind.DoStatement) { - // Set span as if on while keyword - return spanInPreviousNode(node); - } + switch (node.parent.kind) { + case SyntaxKind.DoStatement: + // Set span as if on while keyword + return spanInPreviousNode(node); - if (node.parent.kind === SyntaxKind.Decorator) { - // Set breakpoint on the decorator emit - return spanInNode(node.parent); - } + case SyntaxKind.Decorator: + // Set breakpoint on the decorator emit + return spanInNode(node.parent); - if (node.parent.kind === SyntaxKind.ForStatement) { - // For now lets set the span on this expression, fix it later - return textSpan(node); - } + case SyntaxKind.ForStatement: + case SyntaxKind.ForOfStatement: + // For now lets set the span on this expression, fix it later + return textSpan(node); - if (node.parent.kind === SyntaxKind.BinaryExpression && (node.parent).operatorToken.kind === SyntaxKind.CommaToken) { - // if this is comma expression, the breakpoint is possible in this expression - return textSpan(node); - } + case SyntaxKind.BinaryExpression: + if ((node.parent).operatorToken.kind === SyntaxKind.CommaToken) { + // if this is comma expression, the breakpoint is possible in this expression + return textSpan(node); + } + break; - if (node.parent.kind === SyntaxKind.ArrowFunction && (node.parent).body === node) { - // If this is body of arrow function, it is allowed to have the breakpoint - return textSpan(node); + case SyntaxKind.ArrowFunction: + if ((node.parent).body === node) { + // If this is body of arrow function, it is allowed to have the breakpoint + return textSpan(node); + } + break; } } @@ -137,7 +145,7 @@ namespace ts.BreakpointResolver { case SyntaxKind.WhileStatement: // Span on while(...) - return textSpan(node, findNextToken((node).expression, node)); + return textSpanEndingAtNextToken(node, (node).expression); case SyntaxKind.DoStatement: // span in statement of the do statement @@ -149,7 +157,7 @@ namespace ts.BreakpointResolver { case SyntaxKind.IfStatement: // set on if(..) span - return textSpan(node, findNextToken((node).expression, node)); + return textSpanEndingAtNextToken(node, (node).expression); case SyntaxKind.LabeledStatement: // span in statement @@ -164,13 +172,16 @@ namespace ts.BreakpointResolver { return spanInForStatement(node); case SyntaxKind.ForInStatement: + // span of for (a in ...) + return textSpanEndingAtNextToken(node, (node).expression); + case SyntaxKind.ForOfStatement: - // span on for (a in ...) - return textSpan(node, findNextToken((node).expression, node)); + // span in initializer + return spanInInitializerOfForLike(node); case SyntaxKind.SwitchStatement: // span on switch(...) - return textSpan(node, findNextToken((node).expression, node)); + return textSpanEndingAtNextToken(node, (node).expression); case SyntaxKind.CaseClause: case SyntaxKind.DefaultClause: @@ -271,6 +282,9 @@ namespace ts.BreakpointResolver { case SyntaxKind.FinallyKeyword: return spanInNextNode(node); + case SyntaxKind.OfKeyword: + return spanInOfKeyword(node); + default: // If this is name of property assignment, set breakpoint in the initializer if (node.parent.kind === SyntaxKind.PropertyAssignment && (node.parent).name === node) { @@ -317,18 +331,20 @@ namespace ts.BreakpointResolver { function spanInVariableDeclaration(variableDeclaration: VariableDeclaration): TextSpan { // If declaration of for in statement, just set the span in parent - if (variableDeclaration.parent.parent.kind === SyntaxKind.ForInStatement || - variableDeclaration.parent.parent.kind === SyntaxKind.ForOfStatement) { + if (variableDeclaration.parent.parent.kind === SyntaxKind.ForInStatement) { return spanInNode(variableDeclaration.parent.parent); } - + // If this is a destructuring pattern set breakpoint in binding pattern if (isBindingPattern(variableDeclaration.name)) { return spanInBindingPattern(variableDeclaration.name); } // Breakpoint is possible in variableDeclaration only if there is initialization - if (variableDeclaration.initializer || (variableDeclaration.flags & NodeFlags.Export)) { + // or its declaration from 'for of' + if (variableDeclaration.initializer || + (variableDeclaration.flags & NodeFlags.Export) || + variableDeclaration.parent.parent.kind === SyntaxKind.ForOfStatement) { return textSpanFromVariableDeclaration(variableDeclaration); } @@ -410,11 +426,11 @@ namespace ts.BreakpointResolver { case SyntaxKind.WhileStatement: case SyntaxKind.IfStatement: case SyntaxKind.ForInStatement: - case SyntaxKind.ForOfStatement: return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]); // Set span on previous token if it starts on same line otherwise on the first statement of the block case SyntaxKind.ForStatement: + case SyntaxKind.ForOfStatement: return spanInNodeIfStartsOnSameLine(findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]); } @@ -422,17 +438,23 @@ namespace ts.BreakpointResolver { return spanInNode(block.statements[0]); } + function spanInInitializerOfForLike(forLikeStaement: ForStatement | ForOfStatement | ForInStatement): TextSpan { + if (forLikeStaement.initializer.kind === SyntaxKind.VariableDeclarationList) { + // declaration list, set breakpoint in first declaration + let variableDeclarationList = forLikeStaement.initializer; + if (variableDeclarationList.declarations.length > 0) { + return spanInNode(variableDeclarationList.declarations[0]); + } + } + else { + // Expression - set breakpoint in it + return spanInNode(forLikeStaement.initializer); + } + } + function spanInForStatement(forStatement: ForStatement): TextSpan { if (forStatement.initializer) { - if (forStatement.initializer.kind === SyntaxKind.VariableDeclarationList) { - let variableDeclarationList = forStatement.initializer; - if (variableDeclarationList.declarations.length > 0) { - return spanInNode(variableDeclarationList.declarations[0]); - } - } - else { - return spanInNode(forStatement.initializer); - } + return spanInInitializerOfForLike(forStatement); } if (forStatement.condition) { @@ -560,6 +582,7 @@ namespace ts.BreakpointResolver { case SyntaxKind.WhileStatement: case SyntaxKind.DoStatement: case SyntaxKind.ForStatement: + case SyntaxKind.ForOfStatement: return spanInPreviousNode(node); // Default to parent node @@ -590,7 +613,17 @@ namespace ts.BreakpointResolver { function spanInWhileKeyword(node: Node): TextSpan { if (node.parent.kind === SyntaxKind.DoStatement) { // Set span on while expression - return textSpan(node, findNextToken((node.parent).expression, node.parent)); + return textSpanEndingAtNextToken(node, (node.parent).expression); + } + + // Default to parent node + return spanInNode(node.parent); + } + + function spanInOfKeyword(node: Node): TextSpan { + if (node.parent.kind === SyntaxKind.ForOfStatement) { + // set using next token + return spanInNextNode(node); } // Default to parent node diff --git a/tests/baselines/reference/bpSpanDestructuringForOfArrayBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringForOfArrayBindingPattern.baseline index ea915b80e6a..2d0cbda5d8d 100644 --- a/tests/baselines/reference/bpSpanDestructuringForOfArrayBindingPattern.baseline +++ b/tests/baselines/reference/bpSpanDestructuringForOfArrayBindingPattern.baseline @@ -93,19 +93,14 @@ -------------------------------- 18 >for (let [, nameA] of robots) { - ~~~~~~~~ => Pos: (547 to 554) SpanInfo: {"start":547,"length":29} - >for (let [, nameA] of robots) - >:=> (line 18, col 0) to (line 18, col 29) -18 >for (let [, nameA] of robots) { - - ~~~~~~~~~~ => Pos: (555 to 564) SpanInfo: {"start":559,"length":5} + ~~~~~~~~~~~~~~~~~~ => Pos: (547 to 564) SpanInfo: {"start":559,"length":5} >nameA >:=> (line 18, col 12) to (line 18, col 17) 18 >for (let [, nameA] of robots) { - ~~~~~~~~~~~~~~ => Pos: (565 to 578) SpanInfo: {"start":547,"length":29} - >for (let [, nameA] of robots) - >:=> (line 18, col 0) to (line 18, col 29) + ~~~~~~~~~~~~~~ => Pos: (565 to 578) SpanInfo: {"start":569,"length":6} + >robots + >:=> (line 18, col 22) to (line 18, col 28) -------------------------------- 19 > console.log(nameA); @@ -121,29 +116,14 @@ -------------------------------- 21 >for (let [, nameA] of getRobots()) { - ~~~~~~~~ => Pos: (605 to 612) SpanInfo: {"start":605,"length":34} - >for (let [, nameA] of getRobots()) - >:=> (line 21, col 0) to (line 21, col 34) -21 >for (let [, nameA] of getRobots()) { - - ~~~~~~~~~~ => Pos: (613 to 622) SpanInfo: {"start":617,"length":5} + ~~~~~~~~~~~~~~~~~~ => Pos: (605 to 622) SpanInfo: {"start":617,"length":5} >nameA >:=> (line 21, col 12) to (line 21, col 17) 21 >for (let [, nameA] of getRobots()) { - ~~~ => Pos: (623 to 625) SpanInfo: {"start":605,"length":34} - >for (let [, nameA] of getRobots()) - >:=> (line 21, col 0) to (line 21, col 34) -21 >for (let [, nameA] of getRobots()) { - - ~~~~~~~~~~~~ => Pos: (626 to 637) SpanInfo: {"start":627,"length":11} + ~~~~~~~~~~~~~~~~~~~ => Pos: (623 to 641) SpanInfo: {"start":627,"length":11} >getRobots() >:=> (line 21, col 22) to (line 21, col 33) -21 >for (let [, nameA] of getRobots()) { - - ~~~~ => Pos: (638 to 641) SpanInfo: {"start":605,"length":34} - >for (let [, nameA] of getRobots()) - >:=> (line 21, col 0) to (line 21, col 34) -------------------------------- 22 > console.log(nameA); @@ -159,19 +139,14 @@ -------------------------------- 24 >for (let [, nameA] of [robotA, robotB]) { - ~~~~~~~~ => Pos: (668 to 675) SpanInfo: {"start":668,"length":39} - >for (let [, nameA] of [robotA, robotB]) - >:=> (line 24, col 0) to (line 24, col 39) -24 >for (let [, nameA] of [robotA, robotB]) { - - ~~~~~~~~~~ => Pos: (676 to 685) SpanInfo: {"start":680,"length":5} + ~~~~~~~~~~~~~~~~~~ => Pos: (668 to 685) SpanInfo: {"start":680,"length":5} >nameA >:=> (line 24, col 12) to (line 24, col 17) 24 >for (let [, nameA] of [robotA, robotB]) { - ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (686 to 709) SpanInfo: {"start":668,"length":39} - >for (let [, nameA] of [robotA, robotB]) - >:=> (line 24, col 0) to (line 24, col 39) + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (686 to 709) SpanInfo: {"start":690,"length":16} + >[robotA, robotB] + >:=> (line 24, col 22) to (line 24, col 38) -------------------------------- 25 > console.log(nameA); @@ -187,12 +162,7 @@ -------------------------------- 27 >for (let [, [primarySkillA, secondarySkillA]] of multiRobots) { - ~~~~~~~~ => Pos: (736 to 743) SpanInfo: {"start":736,"length":61} - >for (let [, [primarySkillA, secondarySkillA]] of multiRobots) - >:=> (line 27, col 0) to (line 27, col 61) -27 >for (let [, [primarySkillA, secondarySkillA]] of multiRobots) { - - ~~~ => Pos: (744 to 746) SpanInfo: {"start":748,"length":32} + ~~~~~~~~~~~ => Pos: (736 to 746) SpanInfo: {"start":748,"length":32} >[primarySkillA, secondarySkillA] >:=> (line 27, col 12) to (line 27, col 44) 27 >for (let [, [primarySkillA, secondarySkillA]] of multiRobots) { @@ -212,9 +182,9 @@ >:=> (line 27, col 12) to (line 27, col 44) 27 >for (let [, [primarySkillA, secondarySkillA]] of multiRobots) { - ~~~~~~~~~~~~~~~~~~~=> Pos: (781 to 799) SpanInfo: {"start":736,"length":61} - >for (let [, [primarySkillA, secondarySkillA]] of multiRobots) - >:=> (line 27, col 0) to (line 27, col 61) + ~~~~~~~~~~~~~~~~~~~=> Pos: (781 to 799) SpanInfo: {"start":785,"length":11} + >multiRobots + >:=> (line 27, col 49) to (line 27, col 60) -------------------------------- 28 > console.log(primarySkillA); @@ -230,12 +200,7 @@ -------------------------------- 30 >for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) { - ~~~~~~~~ => Pos: (834 to 841) SpanInfo: {"start":834,"length":66} - >for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) - >:=> (line 30, col 0) to (line 30, col 66) -30 >for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) { - - ~~~ => Pos: (842 to 844) SpanInfo: {"start":846,"length":32} + ~~~~~~~~~~~ => Pos: (834 to 844) SpanInfo: {"start":846,"length":32} >[primarySkillA, secondarySkillA] >:=> (line 30, col 12) to (line 30, col 44) 30 >for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) { @@ -255,19 +220,9 @@ >:=> (line 30, col 12) to (line 30, col 44) 30 >for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) { - ~~~=> Pos: (879 to 881) SpanInfo: {"start":834,"length":66} - >for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) - >:=> (line 30, col 0) to (line 30, col 66) -30 >for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) { - - ~~~~~~~~~~~~~~~~~=> Pos: (882 to 898) SpanInfo: {"start":883,"length":16} + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (879 to 902) SpanInfo: {"start":883,"length":16} >getMultiRobots() >:=> (line 30, col 49) to (line 30, col 65) -30 >for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) { - - ~~~~=> Pos: (899 to 902) SpanInfo: {"start":834,"length":66} - >for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) - >:=> (line 30, col 0) to (line 30, col 66) -------------------------------- 31 > console.log(primarySkillA); @@ -283,12 +238,7 @@ -------------------------------- 33 >for (let [, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { - ~~~~~~~~ => Pos: (937 to 944) SpanInfo: {"start":937,"length":76} - >for (let [, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) - >:=> (line 33, col 0) to (line 33, col 76) -33 >for (let [, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { - - ~~~ => Pos: (945 to 947) SpanInfo: {"start":949,"length":32} + ~~~~~~~~~~~ => Pos: (937 to 947) SpanInfo: {"start":949,"length":32} >[primarySkillA, secondarySkillA] >:=> (line 33, col 12) to (line 33, col 44) 33 >for (let [, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { @@ -308,9 +258,9 @@ >:=> (line 33, col 12) to (line 33, col 44) 33 >for (let [, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (982 to 1015) SpanInfo: {"start":937,"length":76} - >for (let [, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) - >:=> (line 33, col 0) to (line 33, col 76) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (982 to 1015) SpanInfo: {"start":986,"length":26} + >[multiRobotA, multiRobotB] + >:=> (line 33, col 49) to (line 33, col 75) -------------------------------- 34 > console.log(primarySkillA); @@ -326,19 +276,14 @@ -------------------------------- 36 >for (let [numberB] of robots) { - ~~~~~~~~ => Pos: (1050 to 1057) SpanInfo: {"start":1050,"length":29} - >for (let [numberB] of robots) - >:=> (line 36, col 0) to (line 36, col 29) -36 >for (let [numberB] of robots) { - - ~~~~~~~~~~ => Pos: (1058 to 1067) SpanInfo: {"start":1060,"length":7} + ~~~~~~~~~~~~~~~~~~ => Pos: (1050 to 1067) SpanInfo: {"start":1060,"length":7} >numberB >:=> (line 36, col 10) to (line 36, col 17) 36 >for (let [numberB] of robots) { - ~~~~~~~~~~~~~~ => Pos: (1068 to 1081) SpanInfo: {"start":1050,"length":29} - >for (let [numberB] of robots) - >:=> (line 36, col 0) to (line 36, col 29) + ~~~~~~~~~~~~~~ => Pos: (1068 to 1081) SpanInfo: {"start":1072,"length":6} + >robots + >:=> (line 36, col 22) to (line 36, col 28) -------------------------------- 37 > console.log(numberB); @@ -354,29 +299,14 @@ -------------------------------- 39 >for (let [numberB] of getRobots()) { - ~~~~~~~~ => Pos: (1110 to 1117) SpanInfo: {"start":1110,"length":34} - >for (let [numberB] of getRobots()) - >:=> (line 39, col 0) to (line 39, col 34) -39 >for (let [numberB] of getRobots()) { - - ~~~~~~~~~~ => Pos: (1118 to 1127) SpanInfo: {"start":1120,"length":7} + ~~~~~~~~~~~~~~~~~~ => Pos: (1110 to 1127) SpanInfo: {"start":1120,"length":7} >numberB >:=> (line 39, col 10) to (line 39, col 17) 39 >for (let [numberB] of getRobots()) { - ~~~ => Pos: (1128 to 1130) SpanInfo: {"start":1110,"length":34} - >for (let [numberB] of getRobots()) - >:=> (line 39, col 0) to (line 39, col 34) -39 >for (let [numberB] of getRobots()) { - - ~~~~~~~~~~~~ => Pos: (1131 to 1142) SpanInfo: {"start":1132,"length":11} + ~~~~~~~~~~~~~~~~~~~ => Pos: (1128 to 1146) SpanInfo: {"start":1132,"length":11} >getRobots() >:=> (line 39, col 22) to (line 39, col 33) -39 >for (let [numberB] of getRobots()) { - - ~~~~ => Pos: (1143 to 1146) SpanInfo: {"start":1110,"length":34} - >for (let [numberB] of getRobots()) - >:=> (line 39, col 0) to (line 39, col 34) -------------------------------- 40 > console.log(numberB); @@ -392,19 +322,14 @@ -------------------------------- 42 >for (let [numberB] of [robotA, robotB]) { - ~~~~~~~~ => Pos: (1175 to 1182) SpanInfo: {"start":1175,"length":39} - >for (let [numberB] of [robotA, robotB]) - >:=> (line 42, col 0) to (line 42, col 39) -42 >for (let [numberB] of [robotA, robotB]) { - - ~~~~~~~~~~ => Pos: (1183 to 1192) SpanInfo: {"start":1185,"length":7} + ~~~~~~~~~~~~~~~~~~ => Pos: (1175 to 1192) SpanInfo: {"start":1185,"length":7} >numberB >:=> (line 42, col 10) to (line 42, col 17) 42 >for (let [numberB] of [robotA, robotB]) { - ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1193 to 1216) SpanInfo: {"start":1175,"length":39} - >for (let [numberB] of [robotA, robotB]) - >:=> (line 42, col 0) to (line 42, col 39) + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1193 to 1216) SpanInfo: {"start":1197,"length":16} + >[robotA, robotB] + >:=> (line 42, col 22) to (line 42, col 38) -------------------------------- 43 > console.log(numberB); @@ -420,19 +345,14 @@ -------------------------------- 45 >for (let [nameB] of multiRobots) { - ~~~~~~~~ => Pos: (1245 to 1252) SpanInfo: {"start":1245,"length":32} - >for (let [nameB] of multiRobots) - >:=> (line 45, col 0) to (line 45, col 32) -45 >for (let [nameB] of multiRobots) { - - ~~~~~~~~ => Pos: (1253 to 1260) SpanInfo: {"start":1255,"length":5} + ~~~~~~~~~~~~~~~~ => Pos: (1245 to 1260) SpanInfo: {"start":1255,"length":5} >nameB >:=> (line 45, col 10) to (line 45, col 15) 45 >for (let [nameB] of multiRobots) { - ~~~~~~~~~~~~~~~~~~~ => Pos: (1261 to 1279) SpanInfo: {"start":1245,"length":32} - >for (let [nameB] of multiRobots) - >:=> (line 45, col 0) to (line 45, col 32) + ~~~~~~~~~~~~~~~~~~~ => Pos: (1261 to 1279) SpanInfo: {"start":1265,"length":11} + >multiRobots + >:=> (line 45, col 20) to (line 45, col 31) -------------------------------- 46 > console.log(nameB); @@ -448,29 +368,14 @@ -------------------------------- 48 >for (let [nameB] of getMultiRobots()) { - ~~~~~~~~ => Pos: (1306 to 1313) SpanInfo: {"start":1306,"length":37} - >for (let [nameB] of getMultiRobots()) - >:=> (line 48, col 0) to (line 48, col 37) -48 >for (let [nameB] of getMultiRobots()) { - - ~~~~~~~~ => Pos: (1314 to 1321) SpanInfo: {"start":1316,"length":5} + ~~~~~~~~~~~~~~~~ => Pos: (1306 to 1321) SpanInfo: {"start":1316,"length":5} >nameB >:=> (line 48, col 10) to (line 48, col 15) 48 >for (let [nameB] of getMultiRobots()) { - ~~~ => Pos: (1322 to 1324) SpanInfo: {"start":1306,"length":37} - >for (let [nameB] of getMultiRobots()) - >:=> (line 48, col 0) to (line 48, col 37) -48 >for (let [nameB] of getMultiRobots()) { - - ~~~~~~~~~~~~~~~~~ => Pos: (1325 to 1341) SpanInfo: {"start":1326,"length":16} + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1322 to 1345) SpanInfo: {"start":1326,"length":16} >getMultiRobots() >:=> (line 48, col 20) to (line 48, col 36) -48 >for (let [nameB] of getMultiRobots()) { - - ~~~~ => Pos: (1342 to 1345) SpanInfo: {"start":1306,"length":37} - >for (let [nameB] of getMultiRobots()) - >:=> (line 48, col 0) to (line 48, col 37) -------------------------------- 49 > console.log(nameB); @@ -486,19 +391,14 @@ -------------------------------- 51 >for (let [nameB] of [multiRobotA, multiRobotB]) { - ~~~~~~~~ => Pos: (1372 to 1379) SpanInfo: {"start":1372,"length":47} - >for (let [nameB] of [multiRobotA, multiRobotB]) - >:=> (line 51, col 0) to (line 51, col 47) -51 >for (let [nameB] of [multiRobotA, multiRobotB]) { - - ~~~~~~~~ => Pos: (1380 to 1387) SpanInfo: {"start":1382,"length":5} + ~~~~~~~~~~~~~~~~ => Pos: (1372 to 1387) SpanInfo: {"start":1382,"length":5} >nameB >:=> (line 51, col 10) to (line 51, col 15) 51 >for (let [nameB] of [multiRobotA, multiRobotB]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1388 to 1421) SpanInfo: {"start":1372,"length":47} - >for (let [nameB] of [multiRobotA, multiRobotB]) - >:=> (line 51, col 0) to (line 51, col 47) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1388 to 1421) SpanInfo: {"start":1392,"length":26} + >[multiRobotA, multiRobotB] + >:=> (line 51, col 20) to (line 51, col 46) -------------------------------- 52 > console.log(nameB); @@ -514,12 +414,7 @@ -------------------------------- 54 >for (let [numberA2, nameA2, skillA2] of robots) { - ~~~~~~~~ => Pos: (1448 to 1455) SpanInfo: {"start":1448,"length":47} - >for (let [numberA2, nameA2, skillA2] of robots) - >:=> (line 54, col 0) to (line 54, col 47) -54 >for (let [numberA2, nameA2, skillA2] of robots) { - - ~~~~~~~~~~~ => Pos: (1456 to 1466) SpanInfo: {"start":1458,"length":8} + ~~~~~~~~~~~~~~~~~~~ => Pos: (1448 to 1466) SpanInfo: {"start":1458,"length":8} >numberA2 >:=> (line 54, col 10) to (line 54, col 18) 54 >for (let [numberA2, nameA2, skillA2] of robots) { @@ -534,9 +429,9 @@ >:=> (line 54, col 28) to (line 54, col 35) 54 >for (let [numberA2, nameA2, skillA2] of robots) { - ~~~~~~~~~~~~~~=> Pos: (1484 to 1497) SpanInfo: {"start":1448,"length":47} - >for (let [numberA2, nameA2, skillA2] of robots) - >:=> (line 54, col 0) to (line 54, col 47) + ~~~~~~~~~~~~~~=> Pos: (1484 to 1497) SpanInfo: {"start":1488,"length":6} + >robots + >:=> (line 54, col 40) to (line 54, col 46) -------------------------------- 55 > console.log(nameA2); @@ -552,12 +447,7 @@ -------------------------------- 57 >for (let [numberA2, nameA2, skillA2] of getRobots()) { - ~~~~~~~~ => Pos: (1525 to 1532) SpanInfo: {"start":1525,"length":52} - >for (let [numberA2, nameA2, skillA2] of getRobots()) - >:=> (line 57, col 0) to (line 57, col 52) -57 >for (let [numberA2, nameA2, skillA2] of getRobots()) { - - ~~~~~~~~~~~ => Pos: (1533 to 1543) SpanInfo: {"start":1535,"length":8} + ~~~~~~~~~~~~~~~~~~~ => Pos: (1525 to 1543) SpanInfo: {"start":1535,"length":8} >numberA2 >:=> (line 57, col 10) to (line 57, col 18) 57 >for (let [numberA2, nameA2, skillA2] of getRobots()) { @@ -572,19 +462,9 @@ >:=> (line 57, col 28) to (line 57, col 35) 57 >for (let [numberA2, nameA2, skillA2] of getRobots()) { - ~~~ => Pos: (1561 to 1563) SpanInfo: {"start":1525,"length":52} - >for (let [numberA2, nameA2, skillA2] of getRobots()) - >:=> (line 57, col 0) to (line 57, col 52) -57 >for (let [numberA2, nameA2, skillA2] of getRobots()) { - - ~~~~~~~~~~~~=> Pos: (1564 to 1575) SpanInfo: {"start":1565,"length":11} + ~~~~~~~~~~~~~~~~~~~=> Pos: (1561 to 1579) SpanInfo: {"start":1565,"length":11} >getRobots() >:=> (line 57, col 40) to (line 57, col 51) -57 >for (let [numberA2, nameA2, skillA2] of getRobots()) { - - ~~~~=> Pos: (1576 to 1579) SpanInfo: {"start":1525,"length":52} - >for (let [numberA2, nameA2, skillA2] of getRobots()) - >:=> (line 57, col 0) to (line 57, col 52) -------------------------------- 58 > console.log(nameA2); @@ -600,12 +480,7 @@ -------------------------------- 60 >for (let [numberA2, nameA2, skillA2] of [robotA, robotB]) { - ~~~~~~~~ => Pos: (1607 to 1614) SpanInfo: {"start":1607,"length":57} - >for (let [numberA2, nameA2, skillA2] of [robotA, robotB]) - >:=> (line 60, col 0) to (line 60, col 57) -60 >for (let [numberA2, nameA2, skillA2] of [robotA, robotB]) { - - ~~~~~~~~~~~ => Pos: (1615 to 1625) SpanInfo: {"start":1617,"length":8} + ~~~~~~~~~~~~~~~~~~~ => Pos: (1607 to 1625) SpanInfo: {"start":1617,"length":8} >numberA2 >:=> (line 60, col 10) to (line 60, col 18) 60 >for (let [numberA2, nameA2, skillA2] of [robotA, robotB]) { @@ -620,9 +495,9 @@ >:=> (line 60, col 28) to (line 60, col 35) 60 >for (let [numberA2, nameA2, skillA2] of [robotA, robotB]) { - ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1643 to 1666) SpanInfo: {"start":1607,"length":57} - >for (let [numberA2, nameA2, skillA2] of [robotA, robotB]) - >:=> (line 60, col 0) to (line 60, col 57) + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1643 to 1666) SpanInfo: {"start":1647,"length":16} + >[robotA, robotB] + >:=> (line 60, col 40) to (line 60, col 56) -------------------------------- 61 > console.log(nameA2); @@ -638,12 +513,7 @@ -------------------------------- 63 >for (let [nameMA, [primarySkillA, secondarySkillA]] of multiRobots) { - ~~~~~~~~ => Pos: (1694 to 1701) SpanInfo: {"start":1694,"length":67} - >for (let [nameMA, [primarySkillA, secondarySkillA]] of multiRobots) - >:=> (line 63, col 0) to (line 63, col 67) -63 >for (let [nameMA, [primarySkillA, secondarySkillA]] of multiRobots) { - - ~~~~~~~~~ => Pos: (1702 to 1710) SpanInfo: {"start":1704,"length":6} + ~~~~~~~~~~~~~~~~~ => Pos: (1694 to 1710) SpanInfo: {"start":1704,"length":6} >nameMA >:=> (line 63, col 10) to (line 63, col 16) 63 >for (let [nameMA, [primarySkillA, secondarySkillA]] of multiRobots) { @@ -663,9 +533,9 @@ >:=> (line 63, col 18) to (line 63, col 50) 63 >for (let [nameMA, [primarySkillA, secondarySkillA]] of multiRobots) { - ~~~~~~~~~~~~~~~~~~~=> Pos: (1745 to 1763) SpanInfo: {"start":1694,"length":67} - >for (let [nameMA, [primarySkillA, secondarySkillA]] of multiRobots) - >:=> (line 63, col 0) to (line 63, col 67) + ~~~~~~~~~~~~~~~~~~~=> Pos: (1745 to 1763) SpanInfo: {"start":1749,"length":11} + >multiRobots + >:=> (line 63, col 55) to (line 63, col 66) -------------------------------- 64 > console.log(nameMA); @@ -681,12 +551,7 @@ -------------------------------- 66 >for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { - ~~~~~~~~ => Pos: (1791 to 1798) SpanInfo: {"start":1791,"length":72} - >for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) - >:=> (line 66, col 0) to (line 66, col 72) -66 >for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { - - ~~~~~~~~~ => Pos: (1799 to 1807) SpanInfo: {"start":1801,"length":6} + ~~~~~~~~~~~~~~~~~ => Pos: (1791 to 1807) SpanInfo: {"start":1801,"length":6} >nameMA >:=> (line 66, col 10) to (line 66, col 16) 66 >for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { @@ -706,19 +571,9 @@ >:=> (line 66, col 18) to (line 66, col 50) 66 >for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { - ~~~=> Pos: (1842 to 1844) SpanInfo: {"start":1791,"length":72} - >for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) - >:=> (line 66, col 0) to (line 66, col 72) -66 >for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { - - ~~~~~~~~~~~~~~~~~=> Pos: (1845 to 1861) SpanInfo: {"start":1846,"length":16} + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1842 to 1865) SpanInfo: {"start":1846,"length":16} >getMultiRobots() >:=> (line 66, col 55) to (line 66, col 71) -66 >for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { - - ~~~~=> Pos: (1862 to 1865) SpanInfo: {"start":1791,"length":72} - >for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) - >:=> (line 66, col 0) to (line 66, col 72) -------------------------------- 67 > console.log(nameMA); @@ -734,12 +589,7 @@ -------------------------------- 69 >for (let [nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { - ~~~~~~~~ => Pos: (1893 to 1900) SpanInfo: {"start":1893,"length":82} - >for (let [nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) - >:=> (line 69, col 0) to (line 69, col 82) -69 >for (let [nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { - - ~~~~~~~~~ => Pos: (1901 to 1909) SpanInfo: {"start":1903,"length":6} + ~~~~~~~~~~~~~~~~~ => Pos: (1893 to 1909) SpanInfo: {"start":1903,"length":6} >nameMA >:=> (line 69, col 10) to (line 69, col 16) 69 >for (let [nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { @@ -759,9 +609,9 @@ >:=> (line 69, col 18) to (line 69, col 50) 69 >for (let [nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1944 to 1977) SpanInfo: {"start":1893,"length":82} - >for (let [nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) - >:=> (line 69, col 0) to (line 69, col 82) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1944 to 1977) SpanInfo: {"start":1948,"length":26} + >[multiRobotA, multiRobotB] + >:=> (line 69, col 55) to (line 69, col 81) -------------------------------- 70 > console.log(nameMA); @@ -777,12 +627,7 @@ -------------------------------- 72 >for (let [numberA3, ...robotAInfo] of robots) { - ~~~~~~~~ => Pos: (2005 to 2012) SpanInfo: {"start":2005,"length":45} - >for (let [numberA3, ...robotAInfo] of robots) - >:=> (line 72, col 0) to (line 72, col 45) -72 >for (let [numberA3, ...robotAInfo] of robots) { - - ~~~~~~~~~~~ => Pos: (2013 to 2023) SpanInfo: {"start":2015,"length":8} + ~~~~~~~~~~~~~~~~~~~ => Pos: (2005 to 2023) SpanInfo: {"start":2015,"length":8} >numberA3 >:=> (line 72, col 10) to (line 72, col 18) 72 >for (let [numberA3, ...robotAInfo] of robots) { @@ -792,9 +637,9 @@ >:=> (line 72, col 20) to (line 72, col 33) 72 >for (let [numberA3, ...robotAInfo] of robots) { - ~~~~~~~~~~~~~~=> Pos: (2039 to 2052) SpanInfo: {"start":2005,"length":45} - >for (let [numberA3, ...robotAInfo] of robots) - >:=> (line 72, col 0) to (line 72, col 45) + ~~~~~~~~~~~~~~=> Pos: (2039 to 2052) SpanInfo: {"start":2043,"length":6} + >robots + >:=> (line 72, col 38) to (line 72, col 44) -------------------------------- 73 > console.log(numberA3); @@ -810,12 +655,7 @@ -------------------------------- 75 >for (let [numberA3, ...robotAInfo] of getRobots()) { - ~~~~~~~~ => Pos: (2082 to 2089) SpanInfo: {"start":2082,"length":50} - >for (let [numberA3, ...robotAInfo] of getRobots()) - >:=> (line 75, col 0) to (line 75, col 50) -75 >for (let [numberA3, ...robotAInfo] of getRobots()) { - - ~~~~~~~~~~~ => Pos: (2090 to 2100) SpanInfo: {"start":2092,"length":8} + ~~~~~~~~~~~~~~~~~~~ => Pos: (2082 to 2100) SpanInfo: {"start":2092,"length":8} >numberA3 >:=> (line 75, col 10) to (line 75, col 18) 75 >for (let [numberA3, ...robotAInfo] of getRobots()) { @@ -825,19 +665,9 @@ >:=> (line 75, col 20) to (line 75, col 33) 75 >for (let [numberA3, ...robotAInfo] of getRobots()) { - ~~~ => Pos: (2116 to 2118) SpanInfo: {"start":2082,"length":50} - >for (let [numberA3, ...robotAInfo] of getRobots()) - >:=> (line 75, col 0) to (line 75, col 50) -75 >for (let [numberA3, ...robotAInfo] of getRobots()) { - - ~~~~~~~~~~~~=> Pos: (2119 to 2130) SpanInfo: {"start":2120,"length":11} + ~~~~~~~~~~~~~~~~~~~=> Pos: (2116 to 2134) SpanInfo: {"start":2120,"length":11} >getRobots() >:=> (line 75, col 38) to (line 75, col 49) -75 >for (let [numberA3, ...robotAInfo] of getRobots()) { - - ~~~~=> Pos: (2131 to 2134) SpanInfo: {"start":2082,"length":50} - >for (let [numberA3, ...robotAInfo] of getRobots()) - >:=> (line 75, col 0) to (line 75, col 50) -------------------------------- 76 > console.log(numberA3); @@ -853,12 +683,7 @@ -------------------------------- 78 >for (let [numberA3, ...robotAInfo] of [robotA, robotB]) { - ~~~~~~~~ => Pos: (2164 to 2171) SpanInfo: {"start":2164,"length":55} - >for (let [numberA3, ...robotAInfo] of [robotA, robotB]) - >:=> (line 78, col 0) to (line 78, col 55) -78 >for (let [numberA3, ...robotAInfo] of [robotA, robotB]) { - - ~~~~~~~~~~~ => Pos: (2172 to 2182) SpanInfo: {"start":2174,"length":8} + ~~~~~~~~~~~~~~~~~~~ => Pos: (2164 to 2182) SpanInfo: {"start":2174,"length":8} >numberA3 >:=> (line 78, col 10) to (line 78, col 18) 78 >for (let [numberA3, ...robotAInfo] of [robotA, robotB]) { @@ -868,9 +693,9 @@ >:=> (line 78, col 20) to (line 78, col 33) 78 >for (let [numberA3, ...robotAInfo] of [robotA, robotB]) { - ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2198 to 2221) SpanInfo: {"start":2164,"length":55} - >for (let [numberA3, ...robotAInfo] of [robotA, robotB]) - >:=> (line 78, col 0) to (line 78, col 55) + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2198 to 2221) SpanInfo: {"start":2202,"length":16} + >[robotA, robotB] + >:=> (line 78, col 38) to (line 78, col 54) -------------------------------- 79 > console.log(numberA3); @@ -886,19 +711,14 @@ -------------------------------- 81 >for (let [...multiRobotAInfo] of multiRobots) { - ~~~~~~~~ => Pos: (2251 to 2258) SpanInfo: {"start":2251,"length":45} - >for (let [...multiRobotAInfo] of multiRobots) - >:=> (line 81, col 0) to (line 81, col 45) -81 >for (let [...multiRobotAInfo] of multiRobots) { - - ~~~~~~~~~~~~~~~~~~~~~ => Pos: (2259 to 2279) SpanInfo: {"start":2261,"length":18} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2251 to 2279) SpanInfo: {"start":2261,"length":18} >...multiRobotAInfo >:=> (line 81, col 10) to (line 81, col 28) 81 >for (let [...multiRobotAInfo] of multiRobots) { - ~~~~~~~~~~~~~~~~~~~=> Pos: (2280 to 2298) SpanInfo: {"start":2251,"length":45} - >for (let [...multiRobotAInfo] of multiRobots) - >:=> (line 81, col 0) to (line 81, col 45) + ~~~~~~~~~~~~~~~~~~~=> Pos: (2280 to 2298) SpanInfo: {"start":2284,"length":11} + >multiRobots + >:=> (line 81, col 33) to (line 81, col 44) -------------------------------- 82 > console.log(multiRobotAInfo); @@ -914,29 +734,14 @@ -------------------------------- 84 >for (let [...multiRobotAInfo] of getMultiRobots()) { - ~~~~~~~~ => Pos: (2335 to 2342) SpanInfo: {"start":2335,"length":50} - >for (let [...multiRobotAInfo] of getMultiRobots()) - >:=> (line 84, col 0) to (line 84, col 50) -84 >for (let [...multiRobotAInfo] of getMultiRobots()) { - - ~~~~~~~~~~~~~~~~~~~~~ => Pos: (2343 to 2363) SpanInfo: {"start":2345,"length":18} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2335 to 2363) SpanInfo: {"start":2345,"length":18} >...multiRobotAInfo >:=> (line 84, col 10) to (line 84, col 28) 84 >for (let [...multiRobotAInfo] of getMultiRobots()) { - ~~~ => Pos: (2364 to 2366) SpanInfo: {"start":2335,"length":50} - >for (let [...multiRobotAInfo] of getMultiRobots()) - >:=> (line 84, col 0) to (line 84, col 50) -84 >for (let [...multiRobotAInfo] of getMultiRobots()) { - - ~~~~~~~~~~~~~~~~~=> Pos: (2367 to 2383) SpanInfo: {"start":2368,"length":16} + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2364 to 2387) SpanInfo: {"start":2368,"length":16} >getMultiRobots() >:=> (line 84, col 33) to (line 84, col 49) -84 >for (let [...multiRobotAInfo] of getMultiRobots()) { - - ~~~~=> Pos: (2384 to 2387) SpanInfo: {"start":2335,"length":50} - >for (let [...multiRobotAInfo] of getMultiRobots()) - >:=> (line 84, col 0) to (line 84, col 50) -------------------------------- 85 > console.log(multiRobotAInfo); @@ -952,19 +757,14 @@ -------------------------------- 87 >for (let [...multiRobotAInfo] of [multiRobotA, multiRobotB]) { - ~~~~~~~~ => Pos: (2424 to 2431) SpanInfo: {"start":2424,"length":60} - >for (let [...multiRobotAInfo] of [multiRobotA, multiRobotB]) - >:=> (line 87, col 0) to (line 87, col 60) -87 >for (let [...multiRobotAInfo] of [multiRobotA, multiRobotB]) { - - ~~~~~~~~~~~~~~~~~~~~~ => Pos: (2432 to 2452) SpanInfo: {"start":2434,"length":18} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2424 to 2452) SpanInfo: {"start":2434,"length":18} >...multiRobotAInfo >:=> (line 87, col 10) to (line 87, col 28) 87 >for (let [...multiRobotAInfo] of [multiRobotA, multiRobotB]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2453 to 2486) SpanInfo: {"start":2424,"length":60} - >for (let [...multiRobotAInfo] of [multiRobotA, multiRobotB]) - >:=> (line 87, col 0) to (line 87, col 60) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2453 to 2486) SpanInfo: {"start":2457,"length":26} + >[multiRobotA, multiRobotB] + >:=> (line 87, col 33) to (line 87, col 59) -------------------------------- 88 > console.log(multiRobotAInfo); diff --git a/tests/baselines/reference/bpSpanDestructuringForOfArrayBindingPatternDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringForOfArrayBindingPatternDefaultValues.baseline index a30ea914bf3..5dfc730003f 100644 --- a/tests/baselines/reference/bpSpanDestructuringForOfArrayBindingPatternDefaultValues.baseline +++ b/tests/baselines/reference/bpSpanDestructuringForOfArrayBindingPatternDefaultValues.baseline @@ -93,19 +93,14 @@ -------------------------------- 18 >for (let [, nameA = "noName"] of robots) { - ~~~~~~~~ => Pos: (547 to 554) SpanInfo: {"start":547,"length":40} - >for (let [, nameA = "noName"] of robots) - >:=> (line 18, col 0) to (line 18, col 40) -18 >for (let [, nameA = "noName"] of robots) { - - ~~~~~~~~~~~~~~~~~~~~~ => Pos: (555 to 575) SpanInfo: {"start":559,"length":16} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (547 to 575) SpanInfo: {"start":559,"length":16} >nameA = "noName" >:=> (line 18, col 12) to (line 18, col 28) 18 >for (let [, nameA = "noName"] of robots) { - ~~~~~~~~~~~~~~ => Pos: (576 to 589) SpanInfo: {"start":547,"length":40} - >for (let [, nameA = "noName"] of robots) - >:=> (line 18, col 0) to (line 18, col 40) + ~~~~~~~~~~~~~~ => Pos: (576 to 589) SpanInfo: {"start":580,"length":6} + >robots + >:=> (line 18, col 33) to (line 18, col 39) -------------------------------- 19 > console.log(nameA); @@ -121,29 +116,14 @@ -------------------------------- 21 >for (let [, nameA = "noName"] of getRobots()) { - ~~~~~~~~ => Pos: (616 to 623) SpanInfo: {"start":616,"length":45} - >for (let [, nameA = "noName"] of getRobots()) - >:=> (line 21, col 0) to (line 21, col 45) -21 >for (let [, nameA = "noName"] of getRobots()) { - - ~~~~~~~~~~~~~~~~~~~~~ => Pos: (624 to 644) SpanInfo: {"start":628,"length":16} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (616 to 644) SpanInfo: {"start":628,"length":16} >nameA = "noName" >:=> (line 21, col 12) to (line 21, col 28) 21 >for (let [, nameA = "noName"] of getRobots()) { - ~~~ => Pos: (645 to 647) SpanInfo: {"start":616,"length":45} - >for (let [, nameA = "noName"] of getRobots()) - >:=> (line 21, col 0) to (line 21, col 45) -21 >for (let [, nameA = "noName"] of getRobots()) { - - ~~~~~~~~~~~~ => Pos: (648 to 659) SpanInfo: {"start":649,"length":11} + ~~~~~~~~~~~~~~~~~~~=> Pos: (645 to 663) SpanInfo: {"start":649,"length":11} >getRobots() >:=> (line 21, col 33) to (line 21, col 44) -21 >for (let [, nameA = "noName"] of getRobots()) { - - ~~~~=> Pos: (660 to 663) SpanInfo: {"start":616,"length":45} - >for (let [, nameA = "noName"] of getRobots()) - >:=> (line 21, col 0) to (line 21, col 45) -------------------------------- 22 > console.log(nameA); @@ -159,19 +139,14 @@ -------------------------------- 24 >for (let [, nameA = "noName"] of [robotA, robotB]) { - ~~~~~~~~ => Pos: (690 to 697) SpanInfo: {"start":690,"length":50} - >for (let [, nameA = "noName"] of [robotA, robotB]) - >:=> (line 24, col 0) to (line 24, col 50) -24 >for (let [, nameA = "noName"] of [robotA, robotB]) { - - ~~~~~~~~~~~~~~~~~~~~~ => Pos: (698 to 718) SpanInfo: {"start":702,"length":16} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (690 to 718) SpanInfo: {"start":702,"length":16} >nameA = "noName" >:=> (line 24, col 12) to (line 24, col 28) 24 >for (let [, nameA = "noName"] of [robotA, robotB]) { - ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (719 to 742) SpanInfo: {"start":690,"length":50} - >for (let [, nameA = "noName"] of [robotA, robotB]) - >:=> (line 24, col 0) to (line 24, col 50) + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (719 to 742) SpanInfo: {"start":723,"length":16} + >[robotA, robotB] + >:=> (line 24, col 33) to (line 24, col 49) -------------------------------- 25 > console.log(nameA); @@ -187,15 +162,7 @@ -------------------------------- 27 >for (let [, [ - ~~~~~~~~ => Pos: (769 to 776) SpanInfo: {"start":769,"length":120} - >for (let [, [ - > primarySkillA = "primary", - > secondarySkillA = "secondary" - >] = ["skill1", "skill2"]] of multiRobots) - >:=> (line 27, col 0) to (line 30, col 41) -27 >for (let [, [ - - ~~~ => Pos: (777 to 779) SpanInfo: {"start":781,"length":91} + ~~~~~~~~~~~ => Pos: (769 to 779) SpanInfo: {"start":781,"length":91} >[ > primarySkillA = "primary", > secondarySkillA = "secondary" @@ -234,17 +201,9 @@ >:=> (line 27, col 12) to (line 30, col 24) 30 >] = ["skill1", "skill2"]] of multiRobots) { - ~~~~~~~~~~~~~~~~ => Pos: (873 to 888) SpanInfo: {"start":769,"length":120} - >for (let [, [ - > primarySkillA = "primary", - > secondarySkillA = "secondary" - >] = ["skill1", "skill2"]] of multiRobots) - >:=> (line 27, col 0) to (line 30, col 41) -30 >] = ["skill1", "skill2"]] of multiRobots) { - - ~~~ => Pos: (889 to 891) SpanInfo: {"start":896,"length":26} - >console.log(primarySkillA) - >:=> (line 31, col 4) to (line 31, col 30) + ~~~~~~~~~~~~~~~~~~~ => Pos: (873 to 891) SpanInfo: {"start":877,"length":11} + >multiRobots + >:=> (line 30, col 29) to (line 30, col 40) -------------------------------- 31 > console.log(primarySkillA); @@ -260,15 +219,7 @@ -------------------------------- 33 >for (let [, [ - ~~~~~~~~ => Pos: (926 to 933) SpanInfo: {"start":926,"length":125} - >for (let [, [ - > primarySkillA = "primary", - > secondarySkillA = "secondary" - >] = ["skill1", "skill2"]] of getMultiRobots()) - >:=> (line 33, col 0) to (line 36, col 46) -33 >for (let [, [ - - ~~~ => Pos: (934 to 936) SpanInfo: {"start":938,"length":91} + ~~~~~~~~~~~ => Pos: (926 to 936) SpanInfo: {"start":938,"length":91} >[ > primarySkillA = "primary", > secondarySkillA = "secondary" @@ -307,30 +258,9 @@ >:=> (line 33, col 12) to (line 36, col 24) 36 >] = ["skill1", "skill2"]] of getMultiRobots()) { - ~~~ => Pos: (1030 to 1032) SpanInfo: {"start":926,"length":125} - >for (let [, [ - > primarySkillA = "primary", - > secondarySkillA = "secondary" - >] = ["skill1", "skill2"]] of getMultiRobots()) - >:=> (line 33, col 0) to (line 36, col 46) -36 >] = ["skill1", "skill2"]] of getMultiRobots()) { - - ~~~~~~~~~~~~~~~~~ => Pos: (1033 to 1049) SpanInfo: {"start":1034,"length":16} + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1030 to 1053) SpanInfo: {"start":1034,"length":16} >getMultiRobots() >:=> (line 36, col 29) to (line 36, col 45) -36 >] = ["skill1", "skill2"]] of getMultiRobots()) { - - ~=> Pos: (1050 to 1050) SpanInfo: {"start":926,"length":125} - >for (let [, [ - > primarySkillA = "primary", - > secondarySkillA = "secondary" - >] = ["skill1", "skill2"]] of getMultiRobots()) - >:=> (line 33, col 0) to (line 36, col 46) -36 >] = ["skill1", "skill2"]] of getMultiRobots()) { - - ~~~=> Pos: (1051 to 1053) SpanInfo: {"start":1058,"length":26} - >console.log(primarySkillA) - >:=> (line 37, col 4) to (line 37, col 30) -------------------------------- 37 > console.log(primarySkillA); @@ -346,15 +276,7 @@ -------------------------------- 39 >for (let [, [ - ~~~~~~~~ => Pos: (1088 to 1095) SpanInfo: {"start":1088,"length":135} - >for (let [, [ - > primarySkillA = "primary", - > secondarySkillA = "secondary" - >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) - >:=> (line 39, col 0) to (line 42, col 56) -39 >for (let [, [ - - ~~~ => Pos: (1096 to 1098) SpanInfo: {"start":1100,"length":91} + ~~~~~~~~~~~ => Pos: (1088 to 1098) SpanInfo: {"start":1100,"length":91} >[ > primarySkillA = "primary", > secondarySkillA = "secondary" @@ -393,17 +315,9 @@ >:=> (line 39, col 12) to (line 42, col 24) 42 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1192 to 1222) SpanInfo: {"start":1088,"length":135} - >for (let [, [ - > primarySkillA = "primary", - > secondarySkillA = "secondary" - >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) - >:=> (line 39, col 0) to (line 42, col 56) -42 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { - - ~~~=> Pos: (1223 to 1225) SpanInfo: {"start":1230,"length":26} - >console.log(primarySkillA) - >:=> (line 43, col 4) to (line 43, col 30) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1192 to 1225) SpanInfo: {"start":1196,"length":26} + >[multiRobotA, multiRobotB] + >:=> (line 42, col 29) to (line 42, col 55) -------------------------------- 43 > console.log(primarySkillA); @@ -419,19 +333,14 @@ -------------------------------- 45 >for (let [numberB = -1] of robots) { - ~~~~~~~~ => Pos: (1260 to 1267) SpanInfo: {"start":1260,"length":34} - >for (let [numberB = -1] of robots) - >:=> (line 45, col 0) to (line 45, col 34) -45 >for (let [numberB = -1] of robots) { - - ~~~~~~~~~~~~~~~ => Pos: (1268 to 1282) SpanInfo: {"start":1270,"length":12} + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1260 to 1282) SpanInfo: {"start":1270,"length":12} >numberB = -1 >:=> (line 45, col 10) to (line 45, col 22) 45 >for (let [numberB = -1] of robots) { - ~~~~~~~~~~~~~~ => Pos: (1283 to 1296) SpanInfo: {"start":1260,"length":34} - >for (let [numberB = -1] of robots) - >:=> (line 45, col 0) to (line 45, col 34) + ~~~~~~~~~~~~~~ => Pos: (1283 to 1296) SpanInfo: {"start":1287,"length":6} + >robots + >:=> (line 45, col 27) to (line 45, col 33) -------------------------------- 46 > console.log(numberB); @@ -447,29 +356,14 @@ -------------------------------- 48 >for (let [numberB = -1] of getRobots()) { - ~~~~~~~~ => Pos: (1325 to 1332) SpanInfo: {"start":1325,"length":39} - >for (let [numberB = -1] of getRobots()) - >:=> (line 48, col 0) to (line 48, col 39) -48 >for (let [numberB = -1] of getRobots()) { - - ~~~~~~~~~~~~~~~ => Pos: (1333 to 1347) SpanInfo: {"start":1335,"length":12} + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1325 to 1347) SpanInfo: {"start":1335,"length":12} >numberB = -1 >:=> (line 48, col 10) to (line 48, col 22) 48 >for (let [numberB = -1] of getRobots()) { - ~~~ => Pos: (1348 to 1350) SpanInfo: {"start":1325,"length":39} - >for (let [numberB = -1] of getRobots()) - >:=> (line 48, col 0) to (line 48, col 39) -48 >for (let [numberB = -1] of getRobots()) { - - ~~~~~~~~~~~~ => Pos: (1351 to 1362) SpanInfo: {"start":1352,"length":11} + ~~~~~~~~~~~~~~~~~~~ => Pos: (1348 to 1366) SpanInfo: {"start":1352,"length":11} >getRobots() >:=> (line 48, col 27) to (line 48, col 38) -48 >for (let [numberB = -1] of getRobots()) { - - ~~~~ => Pos: (1363 to 1366) SpanInfo: {"start":1325,"length":39} - >for (let [numberB = -1] of getRobots()) - >:=> (line 48, col 0) to (line 48, col 39) -------------------------------- 49 > console.log(numberB); @@ -485,19 +379,14 @@ -------------------------------- 51 >for (let [numberB = -1] of [robotA, robotB]) { - ~~~~~~~~ => Pos: (1395 to 1402) SpanInfo: {"start":1395,"length":44} - >for (let [numberB = -1] of [robotA, robotB]) - >:=> (line 51, col 0) to (line 51, col 44) -51 >for (let [numberB = -1] of [robotA, robotB]) { - - ~~~~~~~~~~~~~~~ => Pos: (1403 to 1417) SpanInfo: {"start":1405,"length":12} + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1395 to 1417) SpanInfo: {"start":1405,"length":12} >numberB = -1 >:=> (line 51, col 10) to (line 51, col 22) 51 >for (let [numberB = -1] of [robotA, robotB]) { - ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1418 to 1441) SpanInfo: {"start":1395,"length":44} - >for (let [numberB = -1] of [robotA, robotB]) - >:=> (line 51, col 0) to (line 51, col 44) + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1418 to 1441) SpanInfo: {"start":1422,"length":16} + >[robotA, robotB] + >:=> (line 51, col 27) to (line 51, col 43) -------------------------------- 52 > console.log(numberB); @@ -513,19 +402,14 @@ -------------------------------- 54 >for (let [nameB = "noName"] of multiRobots) { - ~~~~~~~~ => Pos: (1470 to 1477) SpanInfo: {"start":1470,"length":43} - >for (let [nameB = "noName"] of multiRobots) - >:=> (line 54, col 0) to (line 54, col 43) -54 >for (let [nameB = "noName"] of multiRobots) { - - ~~~~~~~~~~~~~~~~~~~ => Pos: (1478 to 1496) SpanInfo: {"start":1480,"length":16} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1470 to 1496) SpanInfo: {"start":1480,"length":16} >nameB = "noName" >:=> (line 54, col 10) to (line 54, col 26) 54 >for (let [nameB = "noName"] of multiRobots) { - ~~~~~~~~~~~~~~~~~~~=> Pos: (1497 to 1515) SpanInfo: {"start":1470,"length":43} - >for (let [nameB = "noName"] of multiRobots) - >:=> (line 54, col 0) to (line 54, col 43) + ~~~~~~~~~~~~~~~~~~~=> Pos: (1497 to 1515) SpanInfo: {"start":1501,"length":11} + >multiRobots + >:=> (line 54, col 31) to (line 54, col 42) -------------------------------- 55 > console.log(nameB); @@ -541,29 +425,14 @@ -------------------------------- 57 >for (let [nameB = "noName"] of getMultiRobots()) { - ~~~~~~~~ => Pos: (1542 to 1549) SpanInfo: {"start":1542,"length":48} - >for (let [nameB = "noName"] of getMultiRobots()) - >:=> (line 57, col 0) to (line 57, col 48) -57 >for (let [nameB = "noName"] of getMultiRobots()) { - - ~~~~~~~~~~~~~~~~~~~ => Pos: (1550 to 1568) SpanInfo: {"start":1552,"length":16} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1542 to 1568) SpanInfo: {"start":1552,"length":16} >nameB = "noName" >:=> (line 57, col 10) to (line 57, col 26) 57 >for (let [nameB = "noName"] of getMultiRobots()) { - ~~~ => Pos: (1569 to 1571) SpanInfo: {"start":1542,"length":48} - >for (let [nameB = "noName"] of getMultiRobots()) - >:=> (line 57, col 0) to (line 57, col 48) -57 >for (let [nameB = "noName"] of getMultiRobots()) { - - ~~~~~~~~~~~~~~~~~=> Pos: (1572 to 1588) SpanInfo: {"start":1573,"length":16} + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1569 to 1592) SpanInfo: {"start":1573,"length":16} >getMultiRobots() >:=> (line 57, col 31) to (line 57, col 47) -57 >for (let [nameB = "noName"] of getMultiRobots()) { - - ~~~~=> Pos: (1589 to 1592) SpanInfo: {"start":1542,"length":48} - >for (let [nameB = "noName"] of getMultiRobots()) - >:=> (line 57, col 0) to (line 57, col 48) -------------------------------- 58 > console.log(nameB); @@ -579,19 +448,14 @@ -------------------------------- 60 >for (let [nameB = "noName"] of [multiRobotA, multiRobotB]) { - ~~~~~~~~ => Pos: (1619 to 1626) SpanInfo: {"start":1619,"length":58} - >for (let [nameB = "noName"] of [multiRobotA, multiRobotB]) - >:=> (line 60, col 0) to (line 60, col 58) -60 >for (let [nameB = "noName"] of [multiRobotA, multiRobotB]) { - - ~~~~~~~~~~~~~~~~~~~ => Pos: (1627 to 1645) SpanInfo: {"start":1629,"length":16} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1619 to 1645) SpanInfo: {"start":1629,"length":16} >nameB = "noName" >:=> (line 60, col 10) to (line 60, col 26) 60 >for (let [nameB = "noName"] of [multiRobotA, multiRobotB]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1646 to 1679) SpanInfo: {"start":1619,"length":58} - >for (let [nameB = "noName"] of [multiRobotA, multiRobotB]) - >:=> (line 60, col 0) to (line 60, col 58) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1646 to 1679) SpanInfo: {"start":1650,"length":26} + >[multiRobotA, multiRobotB] + >:=> (line 60, col 31) to (line 60, col 57) -------------------------------- 61 > console.log(nameB); @@ -607,12 +471,7 @@ -------------------------------- 63 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { - ~~~~~~~~ => Pos: (1706 to 1713) SpanInfo: {"start":1706,"length":73} - >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) - >:=> (line 63, col 0) to (line 63, col 73) -63 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { - - ~~~~~~~~~~~~~~~~ => Pos: (1714 to 1729) SpanInfo: {"start":1716,"length":13} + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1706 to 1729) SpanInfo: {"start":1716,"length":13} >numberA2 = -1 >:=> (line 63, col 10) to (line 63, col 23) 63 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { @@ -627,9 +486,9 @@ >:=> (line 63, col 44) to (line 63, col 61) 63 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { - ~~~~~~~~~~~~~~=> Pos: (1768 to 1781) SpanInfo: {"start":1706,"length":73} - >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) - >:=> (line 63, col 0) to (line 63, col 73) + ~~~~~~~~~~~~~~=> Pos: (1768 to 1781) SpanInfo: {"start":1772,"length":6} + >robots + >:=> (line 63, col 66) to (line 63, col 72) -------------------------------- 64 > console.log(nameA2); @@ -645,12 +504,7 @@ -------------------------------- 66 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { - ~~~~~~~~ => Pos: (1809 to 1816) SpanInfo: {"start":1809,"length":78} - >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) - >:=> (line 66, col 0) to (line 66, col 78) -66 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { - - ~~~~~~~~~~~~~~~~ => Pos: (1817 to 1832) SpanInfo: {"start":1819,"length":13} + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1809 to 1832) SpanInfo: {"start":1819,"length":13} >numberA2 = -1 >:=> (line 66, col 10) to (line 66, col 23) 66 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { @@ -665,19 +519,9 @@ >:=> (line 66, col 44) to (line 66, col 61) 66 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { - ~~~=> Pos: (1871 to 1873) SpanInfo: {"start":1809,"length":78} - >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) - >:=> (line 66, col 0) to (line 66, col 78) -66 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { - - ~~~~~~~~~~~~=> Pos: (1874 to 1885) SpanInfo: {"start":1875,"length":11} + ~~~~~~~~~~~~~~~~~~~=> Pos: (1871 to 1889) SpanInfo: {"start":1875,"length":11} >getRobots() >:=> (line 66, col 66) to (line 66, col 77) -66 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { - - ~~~~=> Pos: (1886 to 1889) SpanInfo: {"start":1809,"length":78} - >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) - >:=> (line 66, col 0) to (line 66, col 78) -------------------------------- 67 > console.log(nameA2); @@ -693,12 +537,7 @@ -------------------------------- 69 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) { - ~~~~~~~~ => Pos: (1917 to 1924) SpanInfo: {"start":1917,"length":83} - >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) - >:=> (line 69, col 0) to (line 69, col 83) -69 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) { - - ~~~~~~~~~~~~~~~~ => Pos: (1925 to 1940) SpanInfo: {"start":1927,"length":13} + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1917 to 1940) SpanInfo: {"start":1927,"length":13} >numberA2 = -1 >:=> (line 69, col 10) to (line 69, col 23) 69 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) { @@ -713,9 +552,9 @@ >:=> (line 69, col 44) to (line 69, col 61) 69 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) { - ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1979 to 2002) SpanInfo: {"start":1917,"length":83} - >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) - >:=> (line 69, col 0) to (line 69, col 83) + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1979 to 2002) SpanInfo: {"start":1983,"length":16} + >[robotA, robotB] + >:=> (line 69, col 66) to (line 69, col 82) -------------------------------- 70 > console.log(nameA2); @@ -731,15 +570,7 @@ -------------------------------- 72 >for (let [nameMA = "noName", [ - ~~~~~~~~ => Pos: (2030 to 2037) SpanInfo: {"start":2030,"length":137} - >for (let [nameMA = "noName", [ - > primarySkillA = "primary", - > secondarySkillA = "secondary" - >] = ["skill1", "skill2"]] of multiRobots) - >:=> (line 72, col 0) to (line 75, col 41) -72 >for (let [nameMA = "noName", [ - - ~~~~~~~~~~~~~~~~~~~~ => Pos: (2038 to 2057) SpanInfo: {"start":2040,"length":17} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2030 to 2057) SpanInfo: {"start":2040,"length":17} >nameMA = "noName" >:=> (line 72, col 10) to (line 72, col 27) 72 >for (let [nameMA = "noName", [ @@ -775,17 +606,9 @@ >:=> (line 72, col 29) to (line 75, col 24) 75 >] = ["skill1", "skill2"]] of multiRobots) { - ~~~~~~~~~~~~~~~~ => Pos: (2151 to 2166) SpanInfo: {"start":2030,"length":137} - >for (let [nameMA = "noName", [ - > primarySkillA = "primary", - > secondarySkillA = "secondary" - >] = ["skill1", "skill2"]] of multiRobots) - >:=> (line 72, col 0) to (line 75, col 41) -75 >] = ["skill1", "skill2"]] of multiRobots) { - - ~~~ => Pos: (2167 to 2169) SpanInfo: {"start":2174,"length":19} - >console.log(nameMA) - >:=> (line 76, col 4) to (line 76, col 23) + ~~~~~~~~~~~~~~~~~~~ => Pos: (2151 to 2169) SpanInfo: {"start":2155,"length":11} + >multiRobots + >:=> (line 75, col 29) to (line 75, col 40) -------------------------------- 76 > console.log(nameMA); @@ -801,15 +624,7 @@ -------------------------------- 78 >for (let [nameMA = "noName", [ - ~~~~~~~~ => Pos: (2197 to 2204) SpanInfo: {"start":2197,"length":142} - >for (let [nameMA = "noName", [ - > primarySkillA = "primary", - > secondarySkillA = "secondary" - >] = ["skill1", "skill2"]] of getMultiRobots()) - >:=> (line 78, col 0) to (line 81, col 46) -78 >for (let [nameMA = "noName", [ - - ~~~~~~~~~~~~~~~~~~~~ => Pos: (2205 to 2224) SpanInfo: {"start":2207,"length":17} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2197 to 2224) SpanInfo: {"start":2207,"length":17} >nameMA = "noName" >:=> (line 78, col 10) to (line 78, col 27) 78 >for (let [nameMA = "noName", [ @@ -845,30 +660,9 @@ >:=> (line 78, col 29) to (line 81, col 24) 81 >] = ["skill1", "skill2"]] of getMultiRobots()) { - ~~~ => Pos: (2318 to 2320) SpanInfo: {"start":2197,"length":142} - >for (let [nameMA = "noName", [ - > primarySkillA = "primary", - > secondarySkillA = "secondary" - >] = ["skill1", "skill2"]] of getMultiRobots()) - >:=> (line 78, col 0) to (line 81, col 46) -81 >] = ["skill1", "skill2"]] of getMultiRobots()) { - - ~~~~~~~~~~~~~~~~~ => Pos: (2321 to 2337) SpanInfo: {"start":2322,"length":16} + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2318 to 2341) SpanInfo: {"start":2322,"length":16} >getMultiRobots() >:=> (line 81, col 29) to (line 81, col 45) -81 >] = ["skill1", "skill2"]] of getMultiRobots()) { - - ~=> Pos: (2338 to 2338) SpanInfo: {"start":2197,"length":142} - >for (let [nameMA = "noName", [ - > primarySkillA = "primary", - > secondarySkillA = "secondary" - >] = ["skill1", "skill2"]] of getMultiRobots()) - >:=> (line 78, col 0) to (line 81, col 46) -81 >] = ["skill1", "skill2"]] of getMultiRobots()) { - - ~~~=> Pos: (2339 to 2341) SpanInfo: {"start":2346,"length":19} - >console.log(nameMA) - >:=> (line 82, col 4) to (line 82, col 23) -------------------------------- 82 > console.log(nameMA); @@ -884,15 +678,7 @@ -------------------------------- 84 >for (let [nameMA = "noName", [ - ~~~~~~~~ => Pos: (2369 to 2376) SpanInfo: {"start":2369,"length":152} - >for (let [nameMA = "noName", [ - > primarySkillA = "primary", - > secondarySkillA = "secondary" - >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) - >:=> (line 84, col 0) to (line 87, col 56) -84 >for (let [nameMA = "noName", [ - - ~~~~~~~~~~~~~~~~~~~~ => Pos: (2377 to 2396) SpanInfo: {"start":2379,"length":17} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2369 to 2396) SpanInfo: {"start":2379,"length":17} >nameMA = "noName" >:=> (line 84, col 10) to (line 84, col 27) 84 >for (let [nameMA = "noName", [ @@ -928,17 +714,9 @@ >:=> (line 84, col 29) to (line 87, col 24) 87 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2490 to 2520) SpanInfo: {"start":2369,"length":152} - >for (let [nameMA = "noName", [ - > primarySkillA = "primary", - > secondarySkillA = "secondary" - >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) - >:=> (line 84, col 0) to (line 87, col 56) -87 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { - - ~~~=> Pos: (2521 to 2523) SpanInfo: {"start":2528,"length":19} - >console.log(nameMA) - >:=> (line 88, col 4) to (line 88, col 23) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2490 to 2523) SpanInfo: {"start":2494,"length":26} + >[multiRobotA, multiRobotB] + >:=> (line 87, col 29) to (line 87, col 55) -------------------------------- 88 > console.log(nameMA); @@ -954,12 +732,7 @@ -------------------------------- 90 >for (let [numberA3 = -1, ...robotAInfo] of robots) { - ~~~~~~~~ => Pos: (2551 to 2558) SpanInfo: {"start":2551,"length":50} - >for (let [numberA3 = -1, ...robotAInfo] of robots) - >:=> (line 90, col 0) to (line 90, col 50) -90 >for (let [numberA3 = -1, ...robotAInfo] of robots) { - - ~~~~~~~~~~~~~~~~ => Pos: (2559 to 2574) SpanInfo: {"start":2561,"length":13} + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2551 to 2574) SpanInfo: {"start":2561,"length":13} >numberA3 = -1 >:=> (line 90, col 10) to (line 90, col 23) 90 >for (let [numberA3 = -1, ...robotAInfo] of robots) { @@ -969,9 +742,9 @@ >:=> (line 90, col 25) to (line 90, col 38) 90 >for (let [numberA3 = -1, ...robotAInfo] of robots) { - ~~~~~~~~~~~~~~=> Pos: (2590 to 2603) SpanInfo: {"start":2551,"length":50} - >for (let [numberA3 = -1, ...robotAInfo] of robots) - >:=> (line 90, col 0) to (line 90, col 50) + ~~~~~~~~~~~~~~=> Pos: (2590 to 2603) SpanInfo: {"start":2594,"length":6} + >robots + >:=> (line 90, col 43) to (line 90, col 49) -------------------------------- 91 > console.log(numberA3); @@ -987,12 +760,7 @@ -------------------------------- 93 >for (let [numberA3 = -1, ...robotAInfo] of getRobots()) { - ~~~~~~~~ => Pos: (2633 to 2640) SpanInfo: {"start":2633,"length":55} - >for (let [numberA3 = -1, ...robotAInfo] of getRobots()) - >:=> (line 93, col 0) to (line 93, col 55) -93 >for (let [numberA3 = -1, ...robotAInfo] of getRobots()) { - - ~~~~~~~~~~~~~~~~ => Pos: (2641 to 2656) SpanInfo: {"start":2643,"length":13} + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2633 to 2656) SpanInfo: {"start":2643,"length":13} >numberA3 = -1 >:=> (line 93, col 10) to (line 93, col 23) 93 >for (let [numberA3 = -1, ...robotAInfo] of getRobots()) { @@ -1002,19 +770,9 @@ >:=> (line 93, col 25) to (line 93, col 38) 93 >for (let [numberA3 = -1, ...robotAInfo] of getRobots()) { - ~~~ => Pos: (2672 to 2674) SpanInfo: {"start":2633,"length":55} - >for (let [numberA3 = -1, ...robotAInfo] of getRobots()) - >:=> (line 93, col 0) to (line 93, col 55) -93 >for (let [numberA3 = -1, ...robotAInfo] of getRobots()) { - - ~~~~~~~~~~~~=> Pos: (2675 to 2686) SpanInfo: {"start":2676,"length":11} + ~~~~~~~~~~~~~~~~~~~=> Pos: (2672 to 2690) SpanInfo: {"start":2676,"length":11} >getRobots() >:=> (line 93, col 43) to (line 93, col 54) -93 >for (let [numberA3 = -1, ...robotAInfo] of getRobots()) { - - ~~~~=> Pos: (2687 to 2690) SpanInfo: {"start":2633,"length":55} - >for (let [numberA3 = -1, ...robotAInfo] of getRobots()) - >:=> (line 93, col 0) to (line 93, col 55) -------------------------------- 94 > console.log(numberA3); @@ -1030,12 +788,7 @@ -------------------------------- 96 >for (let [numberA3 = -1, ...robotAInfo] of [robotA, robotB]) { - ~~~~~~~~ => Pos: (2720 to 2727) SpanInfo: {"start":2720,"length":60} - >for (let [numberA3 = -1, ...robotAInfo] of [robotA, robotB]) - >:=> (line 96, col 0) to (line 96, col 60) -96 >for (let [numberA3 = -1, ...robotAInfo] of [robotA, robotB]) { - - ~~~~~~~~~~~~~~~~ => Pos: (2728 to 2743) SpanInfo: {"start":2730,"length":13} + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2720 to 2743) SpanInfo: {"start":2730,"length":13} >numberA3 = -1 >:=> (line 96, col 10) to (line 96, col 23) 96 >for (let [numberA3 = -1, ...robotAInfo] of [robotA, robotB]) { @@ -1045,9 +798,9 @@ >:=> (line 96, col 25) to (line 96, col 38) 96 >for (let [numberA3 = -1, ...robotAInfo] of [robotA, robotB]) { - ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2759 to 2782) SpanInfo: {"start":2720,"length":60} - >for (let [numberA3 = -1, ...robotAInfo] of [robotA, robotB]) - >:=> (line 96, col 0) to (line 96, col 60) + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2759 to 2782) SpanInfo: {"start":2763,"length":16} + >[robotA, robotB] + >:=> (line 96, col 43) to (line 96, col 59) -------------------------------- 97 > console.log(numberA3); diff --git a/tests/baselines/reference/bpSpanDestructuringForOfObjectBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringForOfObjectBindingPattern.baseline index 27e089a811d..14e0d2a2d27 100644 --- a/tests/baselines/reference/bpSpanDestructuringForOfObjectBindingPattern.baseline +++ b/tests/baselines/reference/bpSpanDestructuringForOfObjectBindingPattern.baseline @@ -113,19 +113,14 @@ -------------------------------- 24 >for (let {name: nameA } of robots) { - ~~~~~~~~ => Pos: (603 to 610) SpanInfo: {"start":603,"length":34} - >for (let {name: nameA } of robots) - >:=> (line 24, col 0) to (line 24, col 34) -24 >for (let {name: nameA } of robots) { - - ~~~~~~~~~~~~~~~ => Pos: (611 to 625) SpanInfo: {"start":613,"length":11} + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (603 to 625) SpanInfo: {"start":613,"length":11} >name: nameA >:=> (line 24, col 10) to (line 24, col 21) 24 >for (let {name: nameA } of robots) { - ~~~~~~~~~~~~~~ => Pos: (626 to 639) SpanInfo: {"start":603,"length":34} - >for (let {name: nameA } of robots) - >:=> (line 24, col 0) to (line 24, col 34) + ~~~~~~~~~~~~~~ => Pos: (626 to 639) SpanInfo: {"start":630,"length":6} + >robots + >:=> (line 24, col 27) to (line 24, col 33) -------------------------------- 25 > console.log(nameA); @@ -141,29 +136,14 @@ -------------------------------- 27 >for (let {name: nameA } of getRobots()) { - ~~~~~~~~ => Pos: (666 to 673) SpanInfo: {"start":666,"length":39} - >for (let {name: nameA } of getRobots()) - >:=> (line 27, col 0) to (line 27, col 39) -27 >for (let {name: nameA } of getRobots()) { - - ~~~~~~~~~~~~~~~ => Pos: (674 to 688) SpanInfo: {"start":676,"length":11} + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (666 to 688) SpanInfo: {"start":676,"length":11} >name: nameA >:=> (line 27, col 10) to (line 27, col 21) 27 >for (let {name: nameA } of getRobots()) { - ~~~ => Pos: (689 to 691) SpanInfo: {"start":666,"length":39} - >for (let {name: nameA } of getRobots()) - >:=> (line 27, col 0) to (line 27, col 39) -27 >for (let {name: nameA } of getRobots()) { - - ~~~~~~~~~~~~ => Pos: (692 to 703) SpanInfo: {"start":693,"length":11} + ~~~~~~~~~~~~~~~~~~~ => Pos: (689 to 707) SpanInfo: {"start":693,"length":11} >getRobots() >:=> (line 27, col 27) to (line 27, col 38) -27 >for (let {name: nameA } of getRobots()) { - - ~~~~ => Pos: (704 to 707) SpanInfo: {"start":666,"length":39} - >for (let {name: nameA } of getRobots()) - >:=> (line 27, col 0) to (line 27, col 39) -------------------------------- 28 > console.log(nameA); @@ -179,19 +159,14 @@ -------------------------------- 30 >for (let {name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { - ~~~~~~~~ => Pos: (734 to 741) SpanInfo: {"start":734,"length":104} - >for (let {name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) - >:=> (line 30, col 0) to (line 30, col 104) -30 >for (let {name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { - - ~~~~~~~~~~~~~~~ => Pos: (742 to 756) SpanInfo: {"start":744,"length":11} + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (734 to 756) SpanInfo: {"start":744,"length":11} >name: nameA >:=> (line 30, col 10) to (line 30, col 21) 30 >for (let {name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (757 to 840) SpanInfo: {"start":734,"length":104} - >for (let {name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) - >:=> (line 30, col 0) to (line 30, col 104) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (757 to 840) SpanInfo: {"start":761,"length":76} + >[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] + >:=> (line 30, col 27) to (line 30, col 103) -------------------------------- 31 > console.log(nameA); @@ -207,12 +182,7 @@ -------------------------------- 33 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { - ~~~~~~~~ => Pos: (867 to 874) SpanInfo: {"start":867,"length":81} - >for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) - >:=> (line 33, col 0) to (line 33, col 81) -33 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { - - ~~~~~~~~~~ => Pos: (875 to 884) SpanInfo: {"start":878,"length":52} + ~~~~~~~~~~~~~~~~~~ => Pos: (867 to 884) SpanInfo: {"start":878,"length":52} >skills: { primary: primaryA, secondary: secondaryA } >:=> (line 33, col 11) to (line 33, col 63) 33 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { @@ -232,9 +202,9 @@ >:=> (line 33, col 11) to (line 33, col 63) 33 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { - ~~~~~~~~~~~~~~~~~~~=> Pos: (932 to 950) SpanInfo: {"start":867,"length":81} - >for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) - >:=> (line 33, col 0) to (line 33, col 81) + ~~~~~~~~~~~~~~~~~~~=> Pos: (932 to 950) SpanInfo: {"start":936,"length":11} + >multiRobots + >:=> (line 33, col 69) to (line 33, col 80) -------------------------------- 34 > console.log(primaryA); @@ -250,12 +220,7 @@ -------------------------------- 36 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { - ~~~~~~~~ => Pos: (980 to 987) SpanInfo: {"start":980,"length":86} - >for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) - >:=> (line 36, col 0) to (line 36, col 86) -36 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { - - ~~~~~~~~~~ => Pos: (988 to 997) SpanInfo: {"start":991,"length":52} + ~~~~~~~~~~~~~~~~~~ => Pos: (980 to 997) SpanInfo: {"start":991,"length":52} >skills: { primary: primaryA, secondary: secondaryA } >:=> (line 36, col 11) to (line 36, col 63) 36 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { @@ -275,19 +240,9 @@ >:=> (line 36, col 11) to (line 36, col 63) 36 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { - ~~~=> Pos: (1045 to 1047) SpanInfo: {"start":980,"length":86} - >for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) - >:=> (line 36, col 0) to (line 36, col 86) -36 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { - - ~~~~~~~~~~~~~~~~~=> Pos: (1048 to 1064) SpanInfo: {"start":1049,"length":16} + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1045 to 1068) SpanInfo: {"start":1049,"length":16} >getMultiRobots() >:=> (line 36, col 69) to (line 36, col 85) -36 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { - - ~~~~=> Pos: (1065 to 1068) SpanInfo: {"start":980,"length":86} - >for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) - >:=> (line 36, col 0) to (line 36, col 86) -------------------------------- 37 > console.log(primaryA); @@ -303,13 +258,7 @@ -------------------------------- 39 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, - ~~~~~~~~ => Pos: (1098 to 1105) SpanInfo: {"start":1098,"length":218} - >for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, - > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) - >:=> (line 39, col 0) to (line 40, col 79) -39 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, - - ~~~~~~~~~~ => Pos: (1106 to 1115) SpanInfo: {"start":1109,"length":52} + ~~~~~~~~~~~~~~~~~~ => Pos: (1098 to 1115) SpanInfo: {"start":1109,"length":52} >skills: { primary: primaryA, secondary: secondaryA } >:=> (line 39, col 11) to (line 39, col 63) 39 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, @@ -329,22 +278,17 @@ >:=> (line 39, col 11) to (line 39, col 63) 39 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1163 to 1236) SpanInfo: {"start":1098,"length":218} - >for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, - > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) - >:=> (line 39, col 0) to (line 40, col 79) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1163 to 1236) SpanInfo: {"start":1167,"length":148} + >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 39, col 69) to (line 40, col 78) -------------------------------- 40 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1237 to 1315) SpanInfo: {"start":1098,"length":218} - >for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, - > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) - >:=> (line 39, col 0) to (line 40, col 79) -40 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { - - ~~~=> Pos: (1316 to 1318) SpanInfo: {"start":1323,"length":21} - >console.log(primaryA) - >:=> (line 41, col 4) to (line 41, col 25) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1237 to 1318) SpanInfo: {"start":1167,"length":148} + >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 39, col 69) to (line 40, col 78) -------------------------------- 41 > console.log(primaryA); @@ -360,12 +304,7 @@ -------------------------------- 43 >for (let {name: nameA, skill: skillA } of robots) { - ~~~~~~~~ => Pos: (1348 to 1355) SpanInfo: {"start":1348,"length":49} - >for (let {name: nameA, skill: skillA } of robots) - >:=> (line 43, col 0) to (line 43, col 49) -43 >for (let {name: nameA, skill: skillA } of robots) { - - ~~~~~~~~~~~~~~ => Pos: (1356 to 1369) SpanInfo: {"start":1358,"length":11} + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1348 to 1369) SpanInfo: {"start":1358,"length":11} >name: nameA >:=> (line 43, col 10) to (line 43, col 21) 43 >for (let {name: nameA, skill: skillA } of robots) { @@ -375,9 +314,9 @@ >:=> (line 43, col 23) to (line 43, col 36) 43 >for (let {name: nameA, skill: skillA } of robots) { - ~~~~~~~~~~~~~~=> Pos: (1386 to 1399) SpanInfo: {"start":1348,"length":49} - >for (let {name: nameA, skill: skillA } of robots) - >:=> (line 43, col 0) to (line 43, col 49) + ~~~~~~~~~~~~~~=> Pos: (1386 to 1399) SpanInfo: {"start":1390,"length":6} + >robots + >:=> (line 43, col 42) to (line 43, col 48) -------------------------------- 44 > console.log(nameA); @@ -393,12 +332,7 @@ -------------------------------- 46 >for (let {name: nameA, skill: skillA } of getRobots()) { - ~~~~~~~~ => Pos: (1426 to 1433) SpanInfo: {"start":1426,"length":54} - >for (let {name: nameA, skill: skillA } of getRobots()) - >:=> (line 46, col 0) to (line 46, col 54) -46 >for (let {name: nameA, skill: skillA } of getRobots()) { - - ~~~~~~~~~~~~~~ => Pos: (1434 to 1447) SpanInfo: {"start":1436,"length":11} + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1426 to 1447) SpanInfo: {"start":1436,"length":11} >name: nameA >:=> (line 46, col 10) to (line 46, col 21) 46 >for (let {name: nameA, skill: skillA } of getRobots()) { @@ -408,19 +342,9 @@ >:=> (line 46, col 23) to (line 46, col 36) 46 >for (let {name: nameA, skill: skillA } of getRobots()) { - ~~~ => Pos: (1464 to 1466) SpanInfo: {"start":1426,"length":54} - >for (let {name: nameA, skill: skillA } of getRobots()) - >:=> (line 46, col 0) to (line 46, col 54) -46 >for (let {name: nameA, skill: skillA } of getRobots()) { - - ~~~~~~~~~~~~=> Pos: (1467 to 1478) SpanInfo: {"start":1468,"length":11} + ~~~~~~~~~~~~~~~~~~~=> Pos: (1464 to 1482) SpanInfo: {"start":1468,"length":11} >getRobots() >:=> (line 46, col 42) to (line 46, col 53) -46 >for (let {name: nameA, skill: skillA } of getRobots()) { - - ~~~~=> Pos: (1479 to 1482) SpanInfo: {"start":1426,"length":54} - >for (let {name: nameA, skill: skillA } of getRobots()) - >:=> (line 46, col 0) to (line 46, col 54) -------------------------------- 47 > console.log(nameA); @@ -436,12 +360,7 @@ -------------------------------- 49 >for (let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { - ~~~~~~~~ => Pos: (1509 to 1516) SpanInfo: {"start":1509,"length":119} - >for (let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) - >:=> (line 49, col 0) to (line 49, col 119) -49 >for (let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { - - ~~~~~~~~~~~~~~ => Pos: (1517 to 1530) SpanInfo: {"start":1519,"length":11} + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1509 to 1530) SpanInfo: {"start":1519,"length":11} >name: nameA >:=> (line 49, col 10) to (line 49, col 21) 49 >for (let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { @@ -451,9 +370,9 @@ >:=> (line 49, col 23) to (line 49, col 36) 49 >for (let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1547 to 1630) SpanInfo: {"start":1509,"length":119} - >for (let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) - >:=> (line 49, col 0) to (line 49, col 119) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1547 to 1630) SpanInfo: {"start":1551,"length":76} + >[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] + >:=> (line 49, col 42) to (line 49, col 118) -------------------------------- 50 > console.log(nameA); @@ -469,12 +388,7 @@ -------------------------------- 52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { - ~~~~~~~~ => Pos: (1657 to 1664) SpanInfo: {"start":1657,"length":93} - >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) - >:=> (line 52, col 0) to (line 52, col 93) -52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { - - ~~~~~~~~~~~~~~ => Pos: (1665 to 1678) SpanInfo: {"start":1667,"length":11} + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1657 to 1678) SpanInfo: {"start":1667,"length":11} >name: nameA >:=> (line 52, col 10) to (line 52, col 21) 52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { @@ -499,9 +413,9 @@ >:=> (line 52, col 23) to (line 52, col 75) 52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { - ~~~~~~~~~~~~~~~~~~~=> Pos: (1734 to 1752) SpanInfo: {"start":1657,"length":93} - >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) - >:=> (line 52, col 0) to (line 52, col 93) + ~~~~~~~~~~~~~~~~~~~=> Pos: (1734 to 1752) SpanInfo: {"start":1738,"length":11} + >multiRobots + >:=> (line 52, col 81) to (line 52, col 92) -------------------------------- 53 > console.log(nameA); @@ -517,12 +431,7 @@ -------------------------------- 55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { - ~~~~~~~~ => Pos: (1779 to 1786) SpanInfo: {"start":1779,"length":98} - >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) - >:=> (line 55, col 0) to (line 55, col 98) -55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { - - ~~~~~~~~~~~~~~ => Pos: (1787 to 1800) SpanInfo: {"start":1789,"length":11} + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1779 to 1800) SpanInfo: {"start":1789,"length":11} >name: nameA >:=> (line 55, col 10) to (line 55, col 21) 55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { @@ -547,19 +456,9 @@ >:=> (line 55, col 23) to (line 55, col 75) 55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { - ~~~=> Pos: (1856 to 1858) SpanInfo: {"start":1779,"length":98} - >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) - >:=> (line 55, col 0) to (line 55, col 98) -55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { - - ~~~~~~~~~~~~~~~~~=> Pos: (1859 to 1875) SpanInfo: {"start":1860,"length":16} + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1856 to 1879) SpanInfo: {"start":1860,"length":16} >getMultiRobots() >:=> (line 55, col 81) to (line 55, col 97) -55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { - - ~~~~=> Pos: (1876 to 1879) SpanInfo: {"start":1779,"length":98} - >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) - >:=> (line 55, col 0) to (line 55, col 98) -------------------------------- 56 > console.log(nameA); @@ -575,13 +474,7 @@ -------------------------------- 58 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, - ~~~~~~~~ => Pos: (1906 to 1913) SpanInfo: {"start":1906,"length":230} - >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, - > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) - >:=> (line 58, col 0) to (line 59, col 79) -58 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, - - ~~~~~~~~~~~~~~ => Pos: (1914 to 1927) SpanInfo: {"start":1916,"length":11} + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1906 to 1927) SpanInfo: {"start":1916,"length":11} >name: nameA >:=> (line 58, col 10) to (line 58, col 21) 58 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, @@ -606,22 +499,17 @@ >:=> (line 58, col 23) to (line 58, col 75) 58 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1983 to 2056) SpanInfo: {"start":1906,"length":230} - >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, - > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) - >:=> (line 58, col 0) to (line 59, col 79) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1983 to 2056) SpanInfo: {"start":1987,"length":148} + >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 58, col 81) to (line 59, col 78) -------------------------------- 59 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2057 to 2135) SpanInfo: {"start":1906,"length":230} - >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, - > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) - >:=> (line 58, col 0) to (line 59, col 79) -59 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { - - ~~~=> Pos: (2136 to 2138) SpanInfo: {"start":2143,"length":18} - >console.log(nameA) - >:=> (line 60, col 4) to (line 60, col 22) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2057 to 2138) SpanInfo: {"start":1987,"length":148} + >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 58, col 81) to (line 59, col 78) -------------------------------- 60 > console.log(nameA); diff --git a/tests/baselines/reference/bpSpanDestructuringForOfObjectBindingPatternDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringForOfObjectBindingPatternDefaultValues.baseline index d5553960334..d2169558daf 100644 --- a/tests/baselines/reference/bpSpanDestructuringForOfObjectBindingPatternDefaultValues.baseline +++ b/tests/baselines/reference/bpSpanDestructuringForOfObjectBindingPatternDefaultValues.baseline @@ -113,19 +113,14 @@ -------------------------------- 24 >for (let {name: nameA = "noName" } of robots) { - ~~~~~~~~ => Pos: (605 to 612) SpanInfo: {"start":605,"length":45} - >for (let {name: nameA = "noName" } of robots) - >:=> (line 24, col 0) to (line 24, col 45) -24 >for (let {name: nameA = "noName" } of robots) { - - ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (613 to 638) SpanInfo: {"start":615,"length":22} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (605 to 638) SpanInfo: {"start":615,"length":22} >name: nameA = "noName" >:=> (line 24, col 10) to (line 24, col 32) 24 >for (let {name: nameA = "noName" } of robots) { - ~~~~~~~~~~~~~~=> Pos: (639 to 652) SpanInfo: {"start":605,"length":45} - >for (let {name: nameA = "noName" } of robots) - >:=> (line 24, col 0) to (line 24, col 45) + ~~~~~~~~~~~~~~=> Pos: (639 to 652) SpanInfo: {"start":643,"length":6} + >robots + >:=> (line 24, col 38) to (line 24, col 44) -------------------------------- 25 > console.log(nameA); @@ -141,29 +136,14 @@ -------------------------------- 27 >for (let {name: nameA = "noName" } of getRobots()) { - ~~~~~~~~ => Pos: (679 to 686) SpanInfo: {"start":679,"length":50} - >for (let {name: nameA = "noName" } of getRobots()) - >:=> (line 27, col 0) to (line 27, col 50) -27 >for (let {name: nameA = "noName" } of getRobots()) { - - ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (687 to 712) SpanInfo: {"start":689,"length":22} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (679 to 712) SpanInfo: {"start":689,"length":22} >name: nameA = "noName" >:=> (line 27, col 10) to (line 27, col 32) 27 >for (let {name: nameA = "noName" } of getRobots()) { - ~~~ => Pos: (713 to 715) SpanInfo: {"start":679,"length":50} - >for (let {name: nameA = "noName" } of getRobots()) - >:=> (line 27, col 0) to (line 27, col 50) -27 >for (let {name: nameA = "noName" } of getRobots()) { - - ~~~~~~~~~~~~=> Pos: (716 to 727) SpanInfo: {"start":717,"length":11} + ~~~~~~~~~~~~~~~~~~~=> Pos: (713 to 731) SpanInfo: {"start":717,"length":11} >getRobots() >:=> (line 27, col 38) to (line 27, col 49) -27 >for (let {name: nameA = "noName" } of getRobots()) { - - ~~~~=> Pos: (728 to 731) SpanInfo: {"start":679,"length":50} - >for (let {name: nameA = "noName" } of getRobots()) - >:=> (line 27, col 0) to (line 27, col 50) -------------------------------- 28 > console.log(nameA); @@ -179,19 +159,14 @@ -------------------------------- 30 >for (let {name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { - ~~~~~~~~ => Pos: (758 to 765) SpanInfo: {"start":758,"length":115} - >for (let {name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) - >:=> (line 30, col 0) to (line 30, col 115) -30 >for (let {name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { - - ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (766 to 791) SpanInfo: {"start":768,"length":22} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (758 to 791) SpanInfo: {"start":768,"length":22} >name: nameA = "noName" >:=> (line 30, col 10) to (line 30, col 32) 30 >for (let {name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (792 to 875) SpanInfo: {"start":758,"length":115} - >for (let {name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) - >:=> (line 30, col 0) to (line 30, col 115) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (792 to 875) SpanInfo: {"start":796,"length":76} + >[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] + >:=> (line 30, col 38) to (line 30, col 114) -------------------------------- 31 > console.log(nameA); @@ -207,13 +182,7 @@ -------------------------------- 33 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = - ~~~~~~~~ => Pos: (902 to 909) SpanInfo: {"start":902,"length":158} - >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = - > { primary: "nosKill", secondary: "noSkill" } } of multiRobots) - >:=> (line 33, col 0) to (line 34, col 66) -33 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = - - ~~~~~~~~~~ => Pos: (910 to 919) SpanInfo: {"start":913,"length":129} + ~~~~~~~~~~~~~~~~~~ => Pos: (902 to 919) SpanInfo: {"start":913,"length":129} >skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = > { primary: "nosKill", secondary: "noSkill" } >:=> (line 33, col 11) to (line 34, col 48) @@ -242,15 +211,9 @@ >:=> (line 33, col 11) to (line 34, col 48) 34 > { primary: "nosKill", secondary: "noSkill" } } of multiRobots) { - ~~~~~~~~~~~~~~~~=> Pos: (1044 to 1059) SpanInfo: {"start":902,"length":158} - >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = - > { primary: "nosKill", secondary: "noSkill" } } of multiRobots) - >:=> (line 33, col 0) to (line 34, col 66) -34 > { primary: "nosKill", secondary: "noSkill" } } of multiRobots) { - - ~~~=> Pos: (1060 to 1062) SpanInfo: {"start":1067,"length":21} - >console.log(primaryA) - >:=> (line 35, col 4) to (line 35, col 25) + ~~~~~~~~~~~~~~~~~~~=> Pos: (1044 to 1062) SpanInfo: {"start":1048,"length":11} + >multiRobots + >:=> (line 34, col 54) to (line 34, col 65) -------------------------------- 35 > console.log(primaryA); @@ -266,13 +229,7 @@ -------------------------------- 37 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = - ~~~~~~~~ => Pos: (1092 to 1099) SpanInfo: {"start":1092,"length":163} - >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = - > { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) - >:=> (line 37, col 0) to (line 38, col 71) -37 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = - - ~~~~~~~~~~ => Pos: (1100 to 1109) SpanInfo: {"start":1103,"length":129} + ~~~~~~~~~~~~~~~~~~ => Pos: (1092 to 1109) SpanInfo: {"start":1103,"length":129} >skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = > { primary: "nosKill", secondary: "noSkill" } >:=> (line 37, col 11) to (line 38, col 48) @@ -301,26 +258,9 @@ >:=> (line 37, col 11) to (line 38, col 48) 38 > { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) { - ~~~=> Pos: (1234 to 1236) SpanInfo: {"start":1092,"length":163} - >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = - > { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) - >:=> (line 37, col 0) to (line 38, col 71) -38 > { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) { - - ~~~~~~~~~~~~~~~~~=> Pos: (1237 to 1253) SpanInfo: {"start":1238,"length":16} + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1234 to 1257) SpanInfo: {"start":1238,"length":16} >getMultiRobots() >:=> (line 38, col 54) to (line 38, col 70) -38 > { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) { - - ~=> Pos: (1254 to 1254) SpanInfo: {"start":1092,"length":163} - >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = - > { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) - >:=> (line 37, col 0) to (line 38, col 71) -38 > { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) { - - ~~~=> Pos: (1255 to 1257) SpanInfo: {"start":1262,"length":21} - >console.log(primaryA) - >:=> (line 39, col 4) to (line 39, col 25) -------------------------------- 39 > console.log(primaryA); @@ -336,15 +276,7 @@ -------------------------------- 41 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = - ~~~~~~~~ => Pos: (1287 to 1294) SpanInfo: {"start":1287,"length":313} - >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = - > { primary: "nosKill", secondary: "noSkill" } } of - > [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, - > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) - >:=> (line 41, col 0) to (line 44, col 79) -41 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = - - ~~~~~~~~~~ => Pos: (1295 to 1304) SpanInfo: {"start":1298,"length":129} + ~~~~~~~~~~~~~~~~~~ => Pos: (1287 to 1304) SpanInfo: {"start":1298,"length":129} >skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = > { primary: "nosKill", secondary: "noSkill" } >:=> (line 41, col 11) to (line 42, col 48) @@ -373,35 +305,24 @@ >:=> (line 41, col 11) to (line 42, col 48) 42 > { primary: "nosKill", secondary: "noSkill" } } of - ~~~~=> Pos: (1429 to 1432) SpanInfo: {"start":1287,"length":313} - >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = - > { primary: "nosKill", secondary: "noSkill" } } of - > [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, - > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) - >:=> (line 41, col 0) to (line 44, col 79) + ~~~~=> Pos: (1429 to 1432) SpanInfo: {"start":1437,"length":162} + >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 43, col 4) to (line 44, col 78) -------------------------------- 43 > [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1433 to 1520) SpanInfo: {"start":1287,"length":313} - >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = - > { primary: "nosKill", secondary: "noSkill" } } of - > [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, - > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) - >:=> (line 41, col 0) to (line 44, col 79) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1433 to 1520) SpanInfo: {"start":1437,"length":162} + >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 43, col 4) to (line 44, col 78) -------------------------------- 44 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1521 to 1599) SpanInfo: {"start":1287,"length":313} - >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = - > { primary: "nosKill", secondary: "noSkill" } } of - > [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, - > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) - >:=> (line 41, col 0) to (line 44, col 79) -44 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { - - ~~~=> Pos: (1600 to 1602) SpanInfo: {"start":1607,"length":21} - >console.log(primaryA) - >:=> (line 45, col 4) to (line 45, col 25) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1521 to 1602) SpanInfo: {"start":1437,"length":162} + >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 43, col 4) to (line 44, col 78) -------------------------------- 45 > console.log(primaryA); @@ -417,12 +338,7 @@ -------------------------------- 47 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of robots) { - ~~~~~~~~ => Pos: (1632 to 1639) SpanInfo: {"start":1632,"length":72} - >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of robots) - >:=> (line 47, col 0) to (line 47, col 72) -47 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of robots) { - - ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1640 to 1664) SpanInfo: {"start":1642,"length":22} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1632 to 1664) SpanInfo: {"start":1642,"length":22} >name: nameA = "noName" >:=> (line 47, col 10) to (line 47, col 32) 47 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of robots) { @@ -432,9 +348,9 @@ >:=> (line 47, col 34) to (line 47, col 59) 47 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of robots) { - ~~~~~~~~~~~~~~=> Pos: (1693 to 1706) SpanInfo: {"start":1632,"length":72} - >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of robots) - >:=> (line 47, col 0) to (line 47, col 72) + ~~~~~~~~~~~~~~=> Pos: (1693 to 1706) SpanInfo: {"start":1697,"length":6} + >robots + >:=> (line 47, col 65) to (line 47, col 71) -------------------------------- 48 > console.log(nameA); @@ -450,12 +366,7 @@ -------------------------------- 50 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { - ~~~~~~~~ => Pos: (1733 to 1740) SpanInfo: {"start":1733,"length":78} - >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) - >:=> (line 50, col 0) to (line 50, col 78) -50 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { - - ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1741 to 1765) SpanInfo: {"start":1743,"length":22} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1733 to 1765) SpanInfo: {"start":1743,"length":22} >name: nameA = "noName" >:=> (line 50, col 10) to (line 50, col 32) 50 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { @@ -465,19 +376,9 @@ >:=> (line 50, col 34) to (line 50, col 59) 50 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { - ~~~=> Pos: (1795 to 1797) SpanInfo: {"start":1733,"length":78} - >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) - >:=> (line 50, col 0) to (line 50, col 78) -50 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { - - ~~~~~~~~~~~~=> Pos: (1798 to 1809) SpanInfo: {"start":1799,"length":11} + ~~~~~~~~~~~~~~~~~~~=> Pos: (1795 to 1813) SpanInfo: {"start":1799,"length":11} >getRobots() >:=> (line 50, col 66) to (line 50, col 77) -50 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { - - ~~~~=> Pos: (1810 to 1813) SpanInfo: {"start":1733,"length":78} - >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) - >:=> (line 50, col 0) to (line 50, col 78) -------------------------------- 51 > console.log(nameA); @@ -493,12 +394,7 @@ -------------------------------- 53 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { - ~~~~~~~~ => Pos: (1840 to 1847) SpanInfo: {"start":1840,"length":143} - >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) - >:=> (line 53, col 0) to (line 53, col 143) -53 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { - - ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1848 to 1872) SpanInfo: {"start":1850,"length":22} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1840 to 1872) SpanInfo: {"start":1850,"length":22} >name: nameA = "noName" >:=> (line 53, col 10) to (line 53, col 32) 53 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { @@ -508,9 +404,9 @@ >:=> (line 53, col 34) to (line 53, col 59) 53 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1902 to 1985) SpanInfo: {"start":1840,"length":143} - >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) - >:=> (line 53, col 0) to (line 53, col 143) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1902 to 1985) SpanInfo: {"start":1906,"length":76} + >[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] + >:=> (line 53, col 66) to (line 53, col 142) -------------------------------- 54 > console.log(nameA); @@ -526,18 +422,7 @@ -------------------------------- 56 >for (let { - ~~~~~~~~ => Pos: (2012 to 2019) SpanInfo: {"start":2012,"length":206} - >for (let { - > name: nameA = "noName", - > skills: { - > primary: primaryA = "primary", - > secondary: secondaryA = "secondary" - > } = { primary: "noSkill", secondary: "noSkill" } - >} of multiRobots) - >:=> (line 56, col 0) to (line 62, col 17) -56 >for (let { - - ~~~ => Pos: (2020 to 2022) SpanInfo: {"start":2027,"length":22} + ~~~~~~~~~~~ => Pos: (2012 to 2022) SpanInfo: {"start":2027,"length":22} >name: nameA = "noName" >:=> (line 57, col 4) to (line 57, col 26) -------------------------------- @@ -597,20 +482,9 @@ >:=> (line 58, col 4) to (line 61, col 52) 62 >} of multiRobots) { - ~~~~~~~~~~~~~~~~ => Pos: (2202 to 2217) SpanInfo: {"start":2012,"length":206} - >for (let { - > name: nameA = "noName", - > skills: { - > primary: primaryA = "primary", - > secondary: secondaryA = "secondary" - > } = { primary: "noSkill", secondary: "noSkill" } - >} of multiRobots) - >:=> (line 56, col 0) to (line 62, col 17) -62 >} of multiRobots) { - - ~~~ => Pos: (2218 to 2220) SpanInfo: {"start":2225,"length":18} - >console.log(nameA) - >:=> (line 63, col 4) to (line 63, col 22) + ~~~~~~~~~~~~~~~~~~~ => Pos: (2202 to 2220) SpanInfo: {"start":2206,"length":11} + >multiRobots + >:=> (line 62, col 5) to (line 62, col 16) -------------------------------- 63 > console.log(nameA); @@ -626,18 +500,7 @@ -------------------------------- 65 >for (let { - ~~~~~~~~ => Pos: (2247 to 2254) SpanInfo: {"start":2247,"length":211} - >for (let { - > name: nameA = "noName", - > skills: { - > primary: primaryA = "primary", - > secondary: secondaryA = "secondary" - > } = { primary: "noSkill", secondary: "noSkill" } - >} of getMultiRobots()) - >:=> (line 65, col 0) to (line 71, col 22) -65 >for (let { - - ~~~ => Pos: (2255 to 2257) SpanInfo: {"start":2262,"length":22} + ~~~~~~~~~~~ => Pos: (2247 to 2257) SpanInfo: {"start":2262,"length":22} >name: nameA = "noName" >:=> (line 66, col 4) to (line 66, col 26) -------------------------------- @@ -697,36 +560,9 @@ >:=> (line 67, col 4) to (line 70, col 52) 71 >} of getMultiRobots()) { - ~~~ => Pos: (2437 to 2439) SpanInfo: {"start":2247,"length":211} - >for (let { - > name: nameA = "noName", - > skills: { - > primary: primaryA = "primary", - > secondary: secondaryA = "secondary" - > } = { primary: "noSkill", secondary: "noSkill" } - >} of getMultiRobots()) - >:=> (line 65, col 0) to (line 71, col 22) -71 >} of getMultiRobots()) { - - ~~~~~~~~~~~~~~~~~ => Pos: (2440 to 2456) SpanInfo: {"start":2441,"length":16} + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2437 to 2460) SpanInfo: {"start":2441,"length":16} >getMultiRobots() >:=> (line 71, col 5) to (line 71, col 21) -71 >} of getMultiRobots()) { - - ~ => Pos: (2457 to 2457) SpanInfo: {"start":2247,"length":211} - >for (let { - > name: nameA = "noName", - > skills: { - > primary: primaryA = "primary", - > secondary: secondaryA = "secondary" - > } = { primary: "noSkill", secondary: "noSkill" } - >} of getMultiRobots()) - >:=> (line 65, col 0) to (line 71, col 22) -71 >} of getMultiRobots()) { - - ~~~ => Pos: (2458 to 2460) SpanInfo: {"start":2465,"length":18} - >console.log(nameA) - >:=> (line 72, col 4) to (line 72, col 22) -------------------------------- 72 > console.log(nameA); @@ -742,19 +578,7 @@ -------------------------------- 74 >for (let { - ~~~~~~~~ => Pos: (2487 to 2494) SpanInfo: {"start":2487,"length":357} - >for (let { - > name: nameA = "noName", - > skills: { - > primary: primaryA = "primary", - > secondary: secondaryA = "secondary" - > } = { primary: "noSkill", secondary: "noSkill" } - >} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, - > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) - >:=> (line 74, col 0) to (line 81, col 79) -74 >for (let { - - ~~~ => Pos: (2495 to 2497) SpanInfo: {"start":2502,"length":22} + ~~~~~~~~~~~ => Pos: (2487 to 2497) SpanInfo: {"start":2502,"length":22} >name: nameA = "noName" >:=> (line 75, col 4) to (line 75, col 26) -------------------------------- @@ -814,34 +638,17 @@ >:=> (line 76, col 4) to (line 79, col 52) 80 >} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2677 to 2764) SpanInfo: {"start":2487,"length":357} - >for (let { - > name: nameA = "noName", - > skills: { - > primary: primaryA = "primary", - > secondary: secondaryA = "secondary" - > } = { primary: "noSkill", secondary: "noSkill" } - >} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, - > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) - >:=> (line 74, col 0) to (line 81, col 79) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2677 to 2764) SpanInfo: {"start":2681,"length":162} + >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 80, col 5) to (line 81, col 78) -------------------------------- 81 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2765 to 2843) SpanInfo: {"start":2487,"length":357} - >for (let { - > name: nameA = "noName", - > skills: { - > primary: primaryA = "primary", - > secondary: secondaryA = "secondary" - > } = { primary: "noSkill", secondary: "noSkill" } - >} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, - > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) - >:=> (line 74, col 0) to (line 81, col 79) -81 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { - - ~~~=> Pos: (2844 to 2846) SpanInfo: {"start":2851,"length":18} - >console.log(nameA) - >:=> (line 82, col 4) to (line 82, col 22) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2765 to 2846) SpanInfo: {"start":2681,"length":162} + >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 80, col 5) to (line 81, col 78) -------------------------------- 82 > console.log(nameA); From 681e3543d66b3ead2c80ba9f5adf9f7c81d45847 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 21 Dec 2015 15:45:28 -0800 Subject: [PATCH 073/209] Fix the breakpoint spans of call / new expressions --- src/services/breakpoints.ts | 80 ++++---- ...structuringForArrayBindingPattern.baseline | 56 +---- ...rArrayBindingPatternDefaultValues.baseline | 49 +---- ...tructuringForObjectBindingPattern.baseline | 28 +-- ...ObjectBindingPatternDefaultValues.baseline | 28 +-- .../bpSpan_arrayLiteralExpressions.baseline | 72 +------ .../bpSpan_binaryExpressions.baseline | 35 +--- .../reference/bpSpan_classes.baseline | 47 +---- .../bpSpan_conditionalExpressions.baseline | 44 +--- tests/baselines/reference/bpSpan_do.baseline | 17 +- .../baselines/reference/bpSpan_forIn.baseline | 7 +- .../bpSpan_functionExpressions.baseline | 19 +- .../reference/bpSpan_ifElse.baseline | 9 +- .../reference/bpSpan_import.baseline | 15 +- .../bpSpan_parenCallOrNewExpressions.baseline | 192 ++---------------- .../baselines/reference/bpSpan_stmts.baseline | 7 +- .../reference/bpSpan_switch.baseline | 36 +--- .../reference/bpSpan_tryCatchFinally.baseline | 37 +--- .../bpSpan_typeAssertionExpressions.baseline | 45 +--- .../reference/bpSpan_typealias.baseline | 14 +- .../bpSpan_unaryExpressions.baseline | 18 +- .../baselines/reference/bpSpan_while.baseline | 18 +- 22 files changed, 138 insertions(+), 735 deletions(-) diff --git a/src/services/breakpoints.ts b/src/services/breakpoints.ts index 679988dbcf2..908fefb2d7d 100644 --- a/src/services/breakpoints.ts +++ b/src/services/breakpoints.ts @@ -70,37 +70,6 @@ namespace ts.BreakpointResolver { function spanInNode(node: Node): TextSpan { if (node) { - if (isExpression(node)) { - switch (node.parent.kind) { - case SyntaxKind.DoStatement: - // Set span as if on while keyword - return spanInPreviousNode(node); - - case SyntaxKind.Decorator: - // Set breakpoint on the decorator emit - return spanInNode(node.parent); - - case SyntaxKind.ForStatement: - case SyntaxKind.ForOfStatement: - // For now lets set the span on this expression, fix it later - return textSpan(node); - - case SyntaxKind.BinaryExpression: - if ((node.parent).operatorToken.kind === SyntaxKind.CommaToken) { - // if this is comma expression, the breakpoint is possible in this expression - return textSpan(node); - } - break; - - case SyntaxKind.ArrowFunction: - if ((node.parent).body === node) { - // If this is body of arrow function, it is allowed to have the breakpoint - return textSpan(node); - } - break; - } - } - switch (node.kind) { case SyntaxKind.VariableStatement: // Span on first variable declaration @@ -221,8 +190,6 @@ namespace ts.BreakpointResolver { case SyntaxKind.ClassDeclaration: case SyntaxKind.EnumDeclaration: case SyntaxKind.EnumMember: - case SyntaxKind.CallExpression: - case SyntaxKind.NewExpression: case SyntaxKind.BindingElement: // span on complete node return textSpan(node); @@ -286,6 +253,37 @@ namespace ts.BreakpointResolver { return spanInOfKeyword(node); default: + if (isExpression(node)) { + switch (node.parent.kind) { + case SyntaxKind.DoStatement: + // Set span as if on while keyword + return spanInPreviousNode(node); + + case SyntaxKind.Decorator: + // Set breakpoint on the decorator emit + return spanInNode(node.parent); + + case SyntaxKind.ForStatement: + case SyntaxKind.ForOfStatement: + // For now lets set the span on this expression, fix it later + return textSpan(node); + + case SyntaxKind.BinaryExpression: + if ((node.parent).operatorToken.kind === SyntaxKind.CommaToken) { + // if this is comma expression, the breakpoint is possible in this expression + return textSpan(node); + } + break; + + case SyntaxKind.ArrowFunction: + if ((node.parent).body === node) { + // If this is body of arrow function, it is allowed to have the breakpoint + return textSpan(node); + } + break; + } + } + // If this is name of property assignment, set breakpoint in the initializer if (node.parent.kind === SyntaxKind.PropertyAssignment && (node.parent).name === node) { return spanInNode((node.parent).initializer); @@ -293,7 +291,7 @@ namespace ts.BreakpointResolver { // Breakpoint in type assertion goes to its operand if (node.parent.kind === SyntaxKind.TypeAssertionExpression && (node.parent).type === node) { - return spanInNode((node.parent).expression); + return spanInNextNode((node.parent).type); } // return type of function go to previous token @@ -559,11 +557,16 @@ namespace ts.BreakpointResolver { } function spanInOpenParenToken(node: Node): TextSpan { - if (node.parent.kind === SyntaxKind.DoStatement) { - // Go to while keyword and do action instead + if (node.parent.kind === SyntaxKind.DoStatement || // Go to while keyword and do action instead + node.parent.kind === SyntaxKind.CallExpression || + node.parent.kind === SyntaxKind.NewExpression) { return spanInPreviousNode(node); } + if (node.parent.kind === SyntaxKind.ParenthesizedExpression) { + return spanInNextNode(node); + } + // Default to parent node return spanInNode(node.parent); } @@ -583,6 +586,9 @@ namespace ts.BreakpointResolver { case SyntaxKind.DoStatement: case SyntaxKind.ForStatement: case SyntaxKind.ForOfStatement: + case SyntaxKind.CallExpression: + case SyntaxKind.NewExpression: + case SyntaxKind.ParenthesizedExpression: return spanInPreviousNode(node); // Default to parent node @@ -604,7 +610,7 @@ namespace ts.BreakpointResolver { function spanInGreaterThanOrLessThanToken(node: Node): TextSpan { if (node.parent.kind === SyntaxKind.TypeAssertionExpression) { - return spanInNode((node.parent).expression); + return spanInNextNode(node); } return spanInNode(node.parent); diff --git a/tests/baselines/reference/bpSpanDestructuringForArrayBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringForArrayBindingPattern.baseline index a9de03bb74b..9a65a6f2e95 100644 --- a/tests/baselines/reference/bpSpanDestructuringForArrayBindingPattern.baseline +++ b/tests/baselines/reference/bpSpanDestructuringForArrayBindingPattern.baseline @@ -120,16 +120,11 @@ -------------------------------- 21 >for (let [, nameA] = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~~~~~~~~~ => Pos: (499 to 518) SpanInfo: {"start":511,"length":5} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (499 to 530) SpanInfo: {"start":511,"length":5} >nameA >:=> (line 21, col 12) to (line 21, col 17) 21 >for (let [, nameA] = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~ => Pos: (519 to 530) SpanInfo: {"start":520,"length":10} - >getRobot() - >:=> (line 21, col 21) to (line 21, col 31) -21 >for (let [, nameA] = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~ => Pos: (531 to 537) SpanInfo: {"start":532,"length":5} >i = 0 >:=> (line 21, col 33) to (line 21, col 38) @@ -254,16 +249,11 @@ >:=> (line 30, col 28) to (line 30, col 43) 30 >for (let [, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { - ~~~=> Pos: (835 to 837) SpanInfo: {"start":803,"length":32} + ~~~~~~~~~~~~~~~~~~~~=> Pos: (835 to 854) SpanInfo: {"start":803,"length":32} >[primarySkillA, secondarySkillA] >:=> (line 30, col 12) to (line 30, col 44) 30 >for (let [, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~~~~~~=> Pos: (838 to 854) SpanInfo: {"start":839,"length":15} - >getMultiRobot() - >:=> (line 30, col 48) to (line 30, col 63) -30 >for (let [, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~~~=> Pos: (855 to 861) SpanInfo: {"start":856,"length":5} >i = 0 >:=> (line 30, col 65) to (line 30, col 70) @@ -377,16 +367,11 @@ -------------------------------- 40 >for (let [numberB] = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~~~~~~~~~ => Pos: (1130 to 1149) SpanInfo: {"start":1140,"length":7} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1130 to 1161) SpanInfo: {"start":1140,"length":7} >numberB >:=> (line 40, col 10) to (line 40, col 17) 40 >for (let [numberB] = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~ => Pos: (1150 to 1161) SpanInfo: {"start":1151,"length":10} - >getRobot() - >:=> (line 40, col 21) to (line 40, col 31) -40 >for (let [numberB] = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~ => Pos: (1162 to 1168) SpanInfo: {"start":1163,"length":5} >i = 0 >:=> (line 40, col 33) to (line 40, col 38) @@ -481,16 +466,11 @@ -------------------------------- 49 >for (let [nameB] = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~~~~~~~ => Pos: (1389 to 1406) SpanInfo: {"start":1399,"length":5} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1389 to 1423) SpanInfo: {"start":1399,"length":5} >nameB >:=> (line 49, col 10) to (line 49, col 15) 49 >for (let [nameB] = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~~~~~~ => Pos: (1407 to 1423) SpanInfo: {"start":1408,"length":15} - >getMultiRobot() - >:=> (line 49, col 19) to (line 49, col 34) -49 >for (let [nameB] = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~~~ => Pos: (1424 to 1430) SpanInfo: {"start":1425,"length":5} >i = 0 >:=> (line 49, col 36) to (line 49, col 41) @@ -609,16 +589,11 @@ >:=> (line 59, col 20) to (line 59, col 26) 59 >for (let [numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~ => Pos: (1698 to 1708) SpanInfo: {"start":1699,"length":7} + ~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1698 to 1720) SpanInfo: {"start":1699,"length":7} >skillA2 >:=> (line 59, col 28) to (line 59, col 35) 59 >for (let [numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~=> Pos: (1709 to 1720) SpanInfo: {"start":1710,"length":10} - >getRobot() - >:=> (line 59, col 39) to (line 59, col 49) -59 >for (let [numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~=> Pos: (1721 to 1727) SpanInfo: {"start":1722,"length":5} >i = 0 >:=> (line 59, col 51) to (line 59, col 56) @@ -753,16 +728,11 @@ >:=> (line 68, col 34) to (line 68, col 49) 68 >for (let [nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { - ~~~=> Pos: (2050 to 2052) SpanInfo: {"start":2018,"length":32} + ~~~~~~~~~~~~~~~~~~~~=> Pos: (2050 to 2069) SpanInfo: {"start":2018,"length":32} >[primarySkillA, secondarySkillA] >:=> (line 68, col 18) to (line 68, col 50) 68 >for (let [nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~~~~~~=> Pos: (2053 to 2069) SpanInfo: {"start":2054,"length":15} - >getMultiRobot() - >:=> (line 68, col 54) to (line 68, col 69) -68 >for (let [nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~~~=> Pos: (2070 to 2076) SpanInfo: {"start":2071,"length":5} >i = 0 >:=> (line 68, col 71) to (line 68, col 76) @@ -886,16 +856,11 @@ >:=> (line 78, col 10) to (line 78, col 18) 78 >for (let [numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~~~~~~ => Pos: (2373 to 2389) SpanInfo: {"start":2374,"length":13} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2373 to 2401) SpanInfo: {"start":2374,"length":13} >...robotAInfo >:=> (line 78, col 20) to (line 78, col 33) 78 >for (let [numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~=> Pos: (2390 to 2401) SpanInfo: {"start":2391,"length":10} - >getRobot() - >:=> (line 78, col 37) to (line 78, col 47) -78 >for (let [numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~=> Pos: (2402 to 2408) SpanInfo: {"start":2403,"length":5} >i = 0 >:=> (line 78, col 49) to (line 78, col 54) @@ -995,16 +960,11 @@ -------------------------------- 87 >for (let [...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2670 to 2700) SpanInfo: {"start":2680,"length":18} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2670 to 2717) SpanInfo: {"start":2680,"length":18} >...multiRobotAInfo >:=> (line 87, col 10) to (line 87, col 28) 87 >for (let [...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~~~~~~=> Pos: (2701 to 2717) SpanInfo: {"start":2702,"length":15} - >getMultiRobot() - >:=> (line 87, col 32) to (line 87, col 47) -87 >for (let [...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~~~=> Pos: (2718 to 2724) SpanInfo: {"start":2719,"length":5} >i = 0 >:=> (line 87, col 49) to (line 87, col 54) diff --git a/tests/baselines/reference/bpSpanDestructuringForArrayBindingPatternDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringForArrayBindingPatternDefaultValues.baseline index 17fc43d9d9e..78fc1b42b2f 100644 --- a/tests/baselines/reference/bpSpanDestructuringForArrayBindingPatternDefaultValues.baseline +++ b/tests/baselines/reference/bpSpanDestructuringForArrayBindingPatternDefaultValues.baseline @@ -108,16 +108,11 @@ -------------------------------- 18 >for (let [, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (496 to 524) SpanInfo: {"start":508,"length":14} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (496 to 536) SpanInfo: {"start":508,"length":14} >nameA = "name" >:=> (line 18, col 12) to (line 18, col 26) 18 >for (let [, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~ => Pos: (525 to 536) SpanInfo: {"start":526,"length":10} - >getRobot() - >:=> (line 18, col 30) to (line 18, col 40) -18 >for (let [, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~=> Pos: (537 to 543) SpanInfo: {"start":538,"length":5} >i = 0 >:=> (line 18, col 42) to (line 18, col 47) @@ -277,7 +272,7 @@ >:=> (line 32, col 4) to (line 32, col 33) 33 >] = ["none", "none"]] = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (941 to 962) SpanInfo: {"start":873,"length":87} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (941 to 979) SpanInfo: {"start":873,"length":87} >[ > primarySkillA = "primary", > secondarySkillA = "secondary" @@ -285,11 +280,6 @@ >:=> (line 30, col 12) to (line 33, col 20) 33 >] = ["none", "none"]] = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~~~~~~ => Pos: (963 to 979) SpanInfo: {"start":964,"length":15} - >getMultiRobot() - >:=> (line 33, col 24) to (line 33, col 39) -33 >] = ["none", "none"]] = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~~~=> Pos: (980 to 986) SpanInfo: {"start":981,"length":5} >i = 0 >:=> (line 33, col 41) to (line 33, col 46) @@ -418,16 +408,11 @@ -------------------------------- 45 >for (let [numberB = -1] = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1314 to 1338) SpanInfo: {"start":1324,"length":12} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1314 to 1350) SpanInfo: {"start":1324,"length":12} >numberB = -1 >:=> (line 45, col 10) to (line 45, col 22) 45 >for (let [numberB = -1] = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~ => Pos: (1339 to 1350) SpanInfo: {"start":1340,"length":10} - >getRobot() - >:=> (line 45, col 26) to (line 45, col 36) -45 >for (let [numberB = -1] = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~ => Pos: (1351 to 1357) SpanInfo: {"start":1352,"length":5} >i = 0 >:=> (line 45, col 38) to (line 45, col 43) @@ -522,16 +507,11 @@ -------------------------------- 54 >for (let [nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1592 to 1618) SpanInfo: {"start":1602,"length":14} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1592 to 1635) SpanInfo: {"start":1602,"length":14} >nameB = "name" >:=> (line 54, col 10) to (line 54, col 24) 54 >for (let [nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~~~~~~ => Pos: (1619 to 1635) SpanInfo: {"start":1620,"length":15} - >getMultiRobot() - >:=> (line 54, col 28) to (line 54, col 43) -54 >for (let [nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~~~=> Pos: (1636 to 1642) SpanInfo: {"start":1637,"length":5} >i = 0 >:=> (line 54, col 45) to (line 54, col 50) @@ -646,16 +626,11 @@ >:=> (line 63, col 25) to (line 63, col 40) 63 >for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~~~~~~~~~~=> Pos: (1956 to 1976) SpanInfo: {"start":1957,"length":17} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1956 to 1988) SpanInfo: {"start":1957,"length":17} >skillA2 = "skill" >:=> (line 63, col 42) to (line 63, col 59) 63 >for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~=> Pos: (1977 to 1988) SpanInfo: {"start":1978,"length":10} - >getRobot() - >:=> (line 63, col 63) to (line 63, col 73) -63 >for (let [numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~=> Pos: (1989 to 1995) SpanInfo: {"start":1990,"length":5} >i = 0 >:=> (line 63, col 75) to (line 63, col 80) @@ -845,7 +820,7 @@ -------------------------------- 83 >] = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~ => Pos: (2532 to 2535) SpanInfo: {"start":2432,"length":99} + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (2532 to 2552) SpanInfo: {"start":2432,"length":99} >[ > primarySkillA = "primary", > secondarySkillA = "secondary" @@ -853,11 +828,6 @@ >:=> (line 79, col 4) to (line 82, col 24) 83 >] = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~~~~~~ => Pos: (2536 to 2552) SpanInfo: {"start":2537,"length":15} - >getMultiRobot() - >:=> (line 83, col 5) to (line 83, col 20) -83 >] = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~~~ => Pos: (2553 to 2559) SpanInfo: {"start":2554,"length":5} >i = 0 >:=> (line 83, col 22) to (line 83, col 27) @@ -1003,16 +973,11 @@ >:=> (line 97, col 10) to (line 97, col 23) 97 >for (let [numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~~~~~~ => Pos: (2949 to 2965) SpanInfo: {"start":2950,"length":13} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2949 to 2977) SpanInfo: {"start":2950,"length":13} >...robotAInfo >:=> (line 97, col 25) to (line 97, col 38) 97 >for (let [numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~=> Pos: (2966 to 2977) SpanInfo: {"start":2967,"length":10} - >getRobot() - >:=> (line 97, col 42) to (line 97, col 52) -97 >for (let [numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~=> Pos: (2978 to 2984) SpanInfo: {"start":2979,"length":5} >i = 0 >:=> (line 97, col 54) to (line 97, col 59) diff --git a/tests/baselines/reference/bpSpanDestructuringForObjectBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringForObjectBindingPattern.baseline index 5f4ff059dca..718799a8334 100644 --- a/tests/baselines/reference/bpSpanDestructuringForObjectBindingPattern.baseline +++ b/tests/baselines/reference/bpSpanDestructuringForObjectBindingPattern.baseline @@ -138,16 +138,11 @@ -------------------------------- 26 >for (let {name: nameA } = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (550 to 574) SpanInfo: {"start":560,"length":11} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (550 to 586) SpanInfo: {"start":560,"length":11} >name: nameA >:=> (line 26, col 10) to (line 26, col 21) 26 >for (let {name: nameA } = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~ => Pos: (575 to 586) SpanInfo: {"start":576,"length":10} - >getRobot() - >:=> (line 26, col 26) to (line 26, col 36) -26 >for (let {name: nameA } = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~ => Pos: (587 to 593) SpanInfo: {"start":588,"length":5} >i = 0 >:=> (line 26, col 38) to (line 26, col 43) @@ -272,16 +267,11 @@ >:=> (line 35, col 40) to (line 35, col 61) 35 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~=> Pos: (948 to 951) SpanInfo: {"start":896,"length":52} + ~~~~~~~~~~~~~~~~~~~~~=> Pos: (948 to 968) SpanInfo: {"start":896,"length":52} >skills: { primary: primaryA, secondary: secondaryA } >:=> (line 35, col 11) to (line 35, col 63) 35 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~~~~~~=> Pos: (952 to 968) SpanInfo: {"start":953,"length":15} - >getMultiRobot() - >:=> (line 35, col 68) to (line 35, col 83) -35 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~~~=> Pos: (969 to 975) SpanInfo: {"start":970,"length":5} >i = 0 >:=> (line 35, col 85) to (line 35, col 90) @@ -408,16 +398,11 @@ >:=> (line 46, col 10) to (line 46, col 21) 46 >for (let {name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~~~~~~~ => Pos: (1350 to 1367) SpanInfo: {"start":1351,"length":13} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1350 to 1379) SpanInfo: {"start":1351,"length":13} >skill: skillA >:=> (line 46, col 23) to (line 46, col 36) 46 >for (let {name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~=> Pos: (1368 to 1379) SpanInfo: {"start":1369,"length":10} - >getRobot() - >:=> (line 46, col 41) to (line 46, col 51) -46 >for (let {name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~=> Pos: (1380 to 1386) SpanInfo: {"start":1381,"length":5} >i = 0 >:=> (line 46, col 53) to (line 46, col 58) @@ -557,16 +542,11 @@ >:=> (line 55, col 52) to (line 55, col 73) 55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~=> Pos: (1780 to 1783) SpanInfo: {"start":1728,"length":52} + ~~~~~~~~~~~~~~~~~~~~~=> Pos: (1780 to 1800) SpanInfo: {"start":1728,"length":52} >skills: { primary: primaryA, secondary: secondaryA } >:=> (line 55, col 23) to (line 55, col 75) 55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~~~~~~=> Pos: (1784 to 1800) SpanInfo: {"start":1785,"length":15} - >getMultiRobot() - >:=> (line 55, col 80) to (line 55, col 95) -55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~~~=> Pos: (1801 to 1807) SpanInfo: {"start":1802,"length":5} >i = 0 >:=> (line 55, col 97) to (line 55, col 102) diff --git a/tests/baselines/reference/bpSpanDestructuringForObjectBindingPatternDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringForObjectBindingPatternDefaultValues.baseline index 6c7735f2b83..54d9cbc0471 100644 --- a/tests/baselines/reference/bpSpanDestructuringForObjectBindingPatternDefaultValues.baseline +++ b/tests/baselines/reference/bpSpanDestructuringForObjectBindingPatternDefaultValues.baseline @@ -138,16 +138,11 @@ -------------------------------- 26 >for (let {name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (562 to 597) SpanInfo: {"start":572,"length":22} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (562 to 609) SpanInfo: {"start":572,"length":22} >name: nameA = "noName" >:=> (line 26, col 10) to (line 26, col 32) 26 >for (let {name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~=> Pos: (598 to 609) SpanInfo: {"start":599,"length":10} - >getRobot() - >:=> (line 26, col 37) to (line 26, col 47) -26 >for (let {name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~=> Pos: (610 to 616) SpanInfo: {"start":611,"length":5} >i = 0 >:=> (line 26, col 49) to (line 26, col 54) @@ -343,7 +338,7 @@ -------------------------------- 45 >} = getMultiRobot(), i = 0; i < 1; i++) { - ~~~ => Pos: (1165 to 1167) SpanInfo: {"start":1025,"length":139} + ~~~~~~~~~~~~~~~~~~~~ => Pos: (1165 to 1184) SpanInfo: {"start":1025,"length":139} >skills: { > primary: primaryA = "primary", > secondary: secondaryA = "secondary" @@ -351,11 +346,6 @@ >:=> (line 41, col 4) to (line 44, col 46) 45 >} = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~~~~~~ => Pos: (1168 to 1184) SpanInfo: {"start":1169,"length":15} - >getMultiRobot() - >:=> (line 45, col 4) to (line 45, col 19) -45 >} = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~~~ => Pos: (1185 to 1191) SpanInfo: {"start":1186,"length":5} >i = 0 >:=> (line 45, col 21) to (line 45, col 26) @@ -513,16 +503,11 @@ >:=> (line 60, col 10) to (line 60, col 32) 60 >for (let {name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1685 to 1712) SpanInfo: {"start":1686,"length":23} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1685 to 1724) SpanInfo: {"start":1686,"length":23} >skill: skillA = "skill" >:=> (line 60, col 34) to (line 60, col 57) 60 >for (let {name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~=> Pos: (1713 to 1724) SpanInfo: {"start":1714,"length":10} - >getRobot() - >:=> (line 60, col 62) to (line 60, col 72) -60 >for (let {name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) { - ~~~~~~~=> Pos: (1725 to 1731) SpanInfo: {"start":1726,"length":5} >i = 0 >:=> (line 60, col 74) to (line 60, col 79) @@ -729,7 +714,7 @@ -------------------------------- 81 >} = getMultiRobot(), i = 0; i < 1; i++) { - ~~~ => Pos: (2361 to 2363) SpanInfo: {"start":2221,"length":139} + ~~~~~~~~~~~~~~~~~~~~ => Pos: (2361 to 2380) SpanInfo: {"start":2221,"length":139} >skills: { > primary: primaryA = "primary", > secondary: secondaryA = "secondary" @@ -737,11 +722,6 @@ >:=> (line 77, col 4) to (line 80, col 46) 81 >} = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~~~~~~~~~~~~~ => Pos: (2364 to 2380) SpanInfo: {"start":2365,"length":15} - >getMultiRobot() - >:=> (line 81, col 4) to (line 81, col 19) -81 >} = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~~~ => Pos: (2381 to 2387) SpanInfo: {"start":2382,"length":5} >i = 0 >:=> (line 81, col 21) to (line 81, col 26) diff --git a/tests/baselines/reference/bpSpan_arrayLiteralExpressions.baseline b/tests/baselines/reference/bpSpan_arrayLiteralExpressions.baseline index d8bfbc84aa0..aa39897be0f 100644 --- a/tests/baselines/reference/bpSpan_arrayLiteralExpressions.baseline +++ b/tests/baselines/reference/bpSpan_arrayLiteralExpressions.baseline @@ -25,26 +25,14 @@ -------------------------------- 5 >a = [foo(30), (function () { - ~~~~~ => Pos: (64 to 68) SpanInfo: {"start":64,"length":49} + ~~~~~~~~~~~~~ => Pos: (64 to 76) SpanInfo: {"start":64,"length":49} >a = [foo(30), (function () { > return 30; >})()] >:=> (line 5, col 0) to (line 7, col 5) 5 >a = [foo(30), (function () { - ~~~~~~~~ => Pos: (69 to 76) SpanInfo: {"start":69,"length":7} - >foo(30) - >:=> (line 5, col 5) to (line 5, col 12) -5 >a = [foo(30), (function () { - - ~~ => Pos: (77 to 78) SpanInfo: {"start":78,"length":34} - >(function () { - > return 30; - >})() - >:=> (line 5, col 14) to (line 7, col 4) -5 >a = [foo(30), (function () { - - ~~~~~~~~~~~~~~ => Pos: (79 to 92) SpanInfo: {"start":97,"length":9} + ~~~~~~~~~~~~~~~~ => Pos: (77 to 92) SpanInfo: {"start":97,"length":9} >return 30 >:=> (line 6, col 4) to (line 6, col 13) -------------------------------- @@ -56,18 +44,11 @@ -------------------------------- 7 >})()]; - ~ => Pos: (108 to 108) SpanInfo: {"start":108,"length":1} + ~~~~ => Pos: (108 to 111) SpanInfo: {"start":108,"length":1} >} >:=> (line 7, col 0) to (line 7, col 1) 7 >})()]; - ~~~ => Pos: (109 to 111) SpanInfo: {"start":78,"length":34} - >(function () { - > return 30; - >})() - >:=> (line 5, col 14) to (line 7, col 4) -7 >})()]; - ~~~ => Pos: (112 to 114) SpanInfo: {"start":64,"length":49} >a = [foo(30), (function () { > return 30; @@ -94,17 +75,7 @@ -------------------------------- 11 >var x = bar()[0]; - ~~~~~~~ => Pos: (148 to 154) SpanInfo: {"start":148,"length":16} - >var x = bar()[0] - >:=> (line 11, col 0) to (line 11, col 16) -11 >var x = bar()[0]; - - ~~~~~~ => Pos: (155 to 160) SpanInfo: {"start":156,"length":5} - >bar() - >:=> (line 11, col 8) to (line 11, col 13) -11 >var x = bar()[0]; - - ~~~~~ => Pos: (161 to 165) SpanInfo: {"start":148,"length":16} + ~~~~~~~~~~~~~~~~~~ => Pos: (148 to 165) SpanInfo: {"start":148,"length":16} >var x = bar()[0] >:=> (line 11, col 0) to (line 11, col 16) -------------------------------- @@ -117,14 +88,7 @@ >:=> (line 12, col 0) to (line 14, col 7) 12 >x = (function () { - ~~ => Pos: (169 to 170) SpanInfo: {"start":170,"length":33} - >(function () { - > return a; - >})() - >:=> (line 12, col 4) to (line 14, col 4) -12 >x = (function () { - - ~~~~~~~~~~~~~~ => Pos: (171 to 184) SpanInfo: {"start":189,"length":8} + ~~~~~~~~~~~~~~~~ => Pos: (169 to 184) SpanInfo: {"start":189,"length":8} >return a >:=> (line 13, col 4) to (line 13, col 12) -------------------------------- @@ -136,18 +100,11 @@ -------------------------------- 14 >})()[x]; - ~ => Pos: (199 to 199) SpanInfo: {"start":199,"length":1} + ~~~~ => Pos: (199 to 202) SpanInfo: {"start":199,"length":1} >} >:=> (line 14, col 0) to (line 14, col 1) 14 >})()[x]; - ~~~ => Pos: (200 to 202) SpanInfo: {"start":170,"length":33} - >(function () { - > return a; - >})() - >:=> (line 12, col 4) to (line 14, col 4) -14 >})()[x]; - ~~~~~ => Pos: (203 to 207) SpanInfo: {"start":166,"length":40} >x = (function () { > return a; @@ -163,14 +120,7 @@ >:=> (line 15, col 0) to (line 17, col 5) 15 >a[(function () { - ~ => Pos: (210 to 210) SpanInfo: {"start":210,"length":33} - >(function () { - > return x; - >})() - >:=> (line 15, col 2) to (line 17, col 4) -15 >a[(function () { - - ~~~~~~~~~~~~~~ => Pos: (211 to 224) SpanInfo: {"start":229,"length":8} + ~~~~~~~~~~~~~~~ => Pos: (210 to 224) SpanInfo: {"start":229,"length":8} >return x >:=> (line 16, col 4) to (line 16, col 12) -------------------------------- @@ -181,15 +131,9 @@ >:=> (line 16, col 4) to (line 16, col 12) -------------------------------- 17 >})()]; - ~ => Pos: (239 to 239) SpanInfo: {"start":239,"length":1} + ~~~~ => Pos: (239 to 242) SpanInfo: {"start":239,"length":1} >} >:=> (line 17, col 0) to (line 17, col 1) -17 >})()]; - ~~~ => Pos: (240 to 242) SpanInfo: {"start":210,"length":33} - >(function () { - > return x; - >})() - >:=> (line 15, col 2) to (line 17, col 4) 17 >})()]; ~~ => Pos: (243 to 244) SpanInfo: {"start":208,"length":36} >a[(function () { diff --git a/tests/baselines/reference/bpSpan_binaryExpressions.baseline b/tests/baselines/reference/bpSpan_binaryExpressions.baseline index 370fec39a25..93f6b97005b 100644 --- a/tests/baselines/reference/bpSpan_binaryExpressions.baseline +++ b/tests/baselines/reference/bpSpan_binaryExpressions.baseline @@ -38,14 +38,7 @@ >:=> (line 6, col 0) to (line 8, col 8) 6 >x = (function foo() { - ~~ => Pos: (55 to 56) SpanInfo: {"start":56,"length":36} - >(function foo() { - > return y; - >})() - >:=> (line 6, col 4) to (line 8, col 4) -6 >x = (function foo() { - - ~~~~~~~~~~~~~~~~~ => Pos: (57 to 73) SpanInfo: {"start":78,"length":8} + ~~~~~~~~~~~~~~~~~~~ => Pos: (55 to 73) SpanInfo: {"start":78,"length":8} >return y >:=> (line 7, col 4) to (line 7, col 12) -------------------------------- @@ -57,18 +50,11 @@ -------------------------------- 8 >})() + y; - ~ => Pos: (88 to 88) SpanInfo: {"start":88,"length":1} + ~~~~ => Pos: (88 to 91) SpanInfo: {"start":88,"length":1} >} >:=> (line 8, col 0) to (line 8, col 1) 8 >})() + y; - ~~~ => Pos: (89 to 91) SpanInfo: {"start":56,"length":36} - >(function foo() { - > return y; - >})() - >:=> (line 6, col 4) to (line 8, col 4) -8 >})() + y; - ~~~~~~ => Pos: (92 to 97) SpanInfo: {"start":52,"length":44} >x = (function foo() { > return y; @@ -84,14 +70,7 @@ >:=> (line 9, col 0) to (line 11, col 9) 9 >x = y + 30 + (function foo() { - ~~ => Pos: (110 to 111) SpanInfo: {"start":111,"length":36} - >(function foo() { - > return y; - >})() - >:=> (line 9, col 13) to (line 11, col 4) -9 >x = y + 30 + (function foo() { - - ~~~~~~~~~~~~~~~~~ => Pos: (112 to 128) SpanInfo: {"start":133,"length":8} + ~~~~~~~~~~~~~~~~~~~ => Pos: (110 to 128) SpanInfo: {"start":133,"length":8} >return y >:=> (line 10, col 4) to (line 10, col 12) -------------------------------- @@ -102,15 +81,9 @@ >:=> (line 10, col 4) to (line 10, col 12) -------------------------------- 11 >})() * 40; - ~ => Pos: (143 to 143) SpanInfo: {"start":143,"length":1} + ~~~~ => Pos: (143 to 146) SpanInfo: {"start":143,"length":1} >} >:=> (line 11, col 0) to (line 11, col 1) -11 >})() * 40; - ~~~ => Pos: (144 to 146) SpanInfo: {"start":111,"length":36} - >(function foo() { - > return y; - >})() - >:=> (line 9, col 13) to (line 11, col 4) 11 >})() * 40; ~~~~~~ => Pos: (147 to 152) SpanInfo: {"start":98,"length":54} >x = y + 30 + (function foo() { diff --git a/tests/baselines/reference/bpSpan_classes.baseline b/tests/baselines/reference/bpSpan_classes.baseline index 811109af835..ecba5c8706a 100644 --- a/tests/baselines/reference/bpSpan_classes.baseline +++ b/tests/baselines/reference/bpSpan_classes.baseline @@ -171,14 +171,9 @@ -------------------------------- 15 > return new Greeter(greeting); - ~~~~~~~~~~~~~~ => Pos: (249 to 262) SpanInfo: {"start":257,"length":28} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (249 to 286) SpanInfo: {"start":257,"length":28} >return new Greeter(greeting) >:=> (line 15, col 8) to (line 15, col 36) -15 > return new Greeter(greeting); - - ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (263 to 286) SpanInfo: {"start":264,"length":21} - >new Greeter(greeting) - >:=> (line 15, col 15) to (line 15, col 36) -------------------------------- 16 > } @@ -192,25 +187,15 @@ -------------------------------- 18 > var greeter = new Greeter("Hello, world!"); - ~~~~~~~~~~~~~~~~~ => Pos: (294 to 310) SpanInfo: {"start":298,"length":42} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (294 to 341) SpanInfo: {"start":298,"length":42} >var greeter = new Greeter("Hello, world!") >:=> (line 18, col 4) to (line 18, col 46) -18 > var greeter = new Greeter("Hello, world!"); - - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (311 to 341) SpanInfo: {"start":312,"length":28} - >new Greeter("Hello, world!") - >:=> (line 18, col 18) to (line 18, col 46) -------------------------------- 19 > var str = greeter.greet(); - ~~~~~~~~~~~~~ => Pos: (342 to 354) SpanInfo: {"start":346,"length":25} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (342 to 372) SpanInfo: {"start":346,"length":25} >var str = greeter.greet() >:=> (line 19, col 4) to (line 19, col 29) -19 > var str = greeter.greet(); - - ~~~~~~~~~~~~~~~~~~ => Pos: (355 to 372) SpanInfo: {"start":356,"length":15} - >greeter.greet() - >:=> (line 19, col 14) to (line 19, col 29) -------------------------------- 20 > @@ -240,14 +225,9 @@ -------------------------------- 23 > greeters[0] = new Greeter(greeting); - ~~~~~~~~~~~~~~~~~~~~~ => Pos: (525 to 545) SpanInfo: {"start":533,"length":35} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (525 to 569) SpanInfo: {"start":533,"length":35} >greeters[0] = new Greeter(greeting) >:=> (line 23, col 8) to (line 23, col 43) -23 > greeters[0] = new Greeter(greeting); - - ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (546 to 569) SpanInfo: {"start":547,"length":21} - >new Greeter(greeting) - >:=> (line 23, col 22) to (line 23, col 43) -------------------------------- 24 > for (var i = 0; i < restGreetings.length; i++) { @@ -267,17 +247,7 @@ -------------------------------- 25 > greeters.push(new Greeter(restGreetings[i])); - ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (627 to 652) SpanInfo: {"start":639,"length":44} - >greeters.push(new Greeter(restGreetings[i])) - >:=> (line 25, col 12) to (line 25, col 56) -25 > greeters.push(new Greeter(restGreetings[i])); - - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (653 to 681) SpanInfo: {"start":653,"length":29} - >new Greeter(restGreetings[i]) - >:=> (line 25, col 26) to (line 25, col 55) -25 > greeters.push(new Greeter(restGreetings[i])); - - ~~~=> Pos: (682 to 684) SpanInfo: {"start":639,"length":44} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (627 to 684) SpanInfo: {"start":639,"length":44} >greeters.push(new Greeter(restGreetings[i])) >:=> (line 25, col 12) to (line 25, col 56) -------------------------------- @@ -309,14 +279,9 @@ -------------------------------- 31 > var b = foo2("Hello", "World", "!"); - ~~~~~~~~~~~ => Pos: (728 to 738) SpanInfo: {"start":732,"length":35} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (728 to 768) SpanInfo: {"start":732,"length":35} >var b = foo2("Hello", "World", "!") >:=> (line 31, col 4) to (line 31, col 39) -31 > var b = foo2("Hello", "World", "!"); - - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (739 to 768) SpanInfo: {"start":740,"length":27} - >foo2("Hello", "World", "!") - >:=> (line 31, col 12) to (line 31, col 39) -------------------------------- 32 > // This is simple signle line comment diff --git a/tests/baselines/reference/bpSpan_conditionalExpressions.baseline b/tests/baselines/reference/bpSpan_conditionalExpressions.baseline index 5abd49d50cf..17432ee5439 100644 --- a/tests/baselines/reference/bpSpan_conditionalExpressions.baseline +++ b/tests/baselines/reference/bpSpan_conditionalExpressions.baseline @@ -22,14 +22,7 @@ >:=> (line 3, col 0) to (line 7, col 4) 3 >var z = (function foo() { - ~~ => Pos: (44 to 45) SpanInfo: {"start":45,"length":36} - >(function foo() { - > return x; - >})() - >:=> (line 3, col 8) to (line 5, col 4) -3 >var z = (function foo() { - - ~~~~~~~~~~~~~~~~~ => Pos: (46 to 62) SpanInfo: {"start":67,"length":8} + ~~~~~~~~~~~~~~~~~~~ => Pos: (44 to 62) SpanInfo: {"start":67,"length":8} >return x >:=> (line 4, col 4) to (line 4, col 12) -------------------------------- @@ -41,18 +34,11 @@ -------------------------------- 5 >})() ? y : function bar() { - ~ => Pos: (77 to 77) SpanInfo: {"start":77,"length":1} + ~~~~ => Pos: (77 to 80) SpanInfo: {"start":77,"length":1} >} >:=> (line 5, col 0) to (line 5, col 1) 5 >})() ? y : function bar() { - ~~~ => Pos: (78 to 80) SpanInfo: {"start":45,"length":36} - >(function foo() { - > return x; - >})() - >:=> (line 3, col 8) to (line 5, col 4) -5 >})() ? y : function bar() { - ~~~~~~ => Pos: (81 to 86) SpanInfo: {"start":37,"length":90} >var z = (function foo() { > return x; @@ -74,16 +60,9 @@ -------------------------------- 7 >} (); - ~ => Pos: (123 to 123) SpanInfo: {"start":123,"length":1} + ~~~~~~ => Pos: (123 to 128) SpanInfo: {"start":123,"length":1} >} >:=> (line 7, col 0) to (line 7, col 1) -7 >} (); - - ~~~~~ => Pos: (124 to 128) SpanInfo: {"start":88,"length":39} - >function bar() { - > return x; - >} () - >:=> (line 5, col 11) to (line 7, col 4) -------------------------------- 8 >x = y ? (function () { @@ -94,14 +73,7 @@ >:=> (line 8, col 0) to (line 10, col 10) 8 >x = y ? (function () { - ~~ => Pos: (136 to 137) SpanInfo: {"start":137,"length":33} - >(function () { - > return z; - >})() - >:=> (line 8, col 8) to (line 10, col 4) -8 >x = y ? (function () { - - ~~~~~~~~~~~~~~ => Pos: (138 to 151) SpanInfo: {"start":156,"length":8} + ~~~~~~~~~~~~~~~~ => Pos: (136 to 151) SpanInfo: {"start":156,"length":8} >return z >:=> (line 9, col 4) to (line 9, col 12) -------------------------------- @@ -112,15 +84,9 @@ >:=> (line 9, col 4) to (line 9, col 12) -------------------------------- 10 >})() : 10; - ~ => Pos: (166 to 166) SpanInfo: {"start":166,"length":1} + ~~~~ => Pos: (166 to 169) SpanInfo: {"start":166,"length":1} >} >:=> (line 10, col 0) to (line 10, col 1) -10 >})() : 10; - ~~~ => Pos: (167 to 169) SpanInfo: {"start":137,"length":33} - >(function () { - > return z; - >})() - >:=> (line 8, col 8) to (line 10, col 4) 10 >})() : 10; ~~~~~~~ => Pos: (170 to 176) SpanInfo: {"start":129,"length":47} >x = y ? (function () { diff --git a/tests/baselines/reference/bpSpan_do.baseline b/tests/baselines/reference/bpSpan_do.baseline index 3ff287c2046..602ec5b16c7 100644 --- a/tests/baselines/reference/bpSpan_do.baseline +++ b/tests/baselines/reference/bpSpan_do.baseline @@ -107,14 +107,7 @@ >:=> (line 15, col 2) to (line 17, col 15) 15 >} while ((function () { - ~ => Pos: (131 to 131) SpanInfo: {"start":131,"length":46} - >(function () { - > return 30 * i; - > })() - >:=> (line 15, col 9) to (line 17, col 8) -15 >} while ((function () { - - ~~~~~~~~~~~~~~ => Pos: (132 to 145) SpanInfo: {"start":154,"length":13} + ~~~~~~~~~~~~~~~ => Pos: (131 to 145) SpanInfo: {"start":154,"length":13} >return 30 * i >:=> (line 16, col 8) to (line 16, col 21) -------------------------------- @@ -125,15 +118,9 @@ >:=> (line 16, col 8) to (line 16, col 21) -------------------------------- 17 > })() !== i); - ~~~~~ => Pos: (169 to 173) SpanInfo: {"start":173,"length":1} + ~~~~~~~~ => Pos: (169 to 176) SpanInfo: {"start":173,"length":1} >} >:=> (line 17, col 4) to (line 17, col 5) -17 > })() !== i); - ~~~ => Pos: (174 to 176) SpanInfo: {"start":131,"length":46} - >(function () { - > return 30 * i; - > })() - >:=> (line 15, col 9) to (line 17, col 8) 17 > })() !== i); ~~~~~~~~~ => Pos: (177 to 185) SpanInfo: {"start":124,"length":60} >while ((function () { diff --git a/tests/baselines/reference/bpSpan_forIn.baseline b/tests/baselines/reference/bpSpan_forIn.baseline index c2b72df5b12..1c46a83e3b4 100644 --- a/tests/baselines/reference/bpSpan_forIn.baseline +++ b/tests/baselines/reference/bpSpan_forIn.baseline @@ -104,14 +104,9 @@ -------------------------------- 17 > return new String(); - ~~~~~~~~~~ => Pos: (221 to 230) SpanInfo: {"start":225,"length":19} + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (221 to 245) SpanInfo: {"start":225,"length":19} >return new String() >:=> (line 17, col 4) to (line 17, col 23) -17 > return new String(); - - ~~~~~~~~~~~~~~~ => Pos: (231 to 245) SpanInfo: {"start":232,"length":12} - >new String() - >:=> (line 17, col 11) to (line 17, col 23) -------------------------------- 18 >}) { diff --git a/tests/baselines/reference/bpSpan_functionExpressions.baseline b/tests/baselines/reference/bpSpan_functionExpressions.baseline index 135edff9418..f75bde15f07 100644 --- a/tests/baselines/reference/bpSpan_functionExpressions.baseline +++ b/tests/baselines/reference/bpSpan_functionExpressions.baseline @@ -80,14 +80,9 @@ -------------------------------- 10 > return greet(msg); - ~~~~~~~~~~ => Pos: (235 to 244) SpanInfo: {"start":239,"length":17} + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (235 to 257) SpanInfo: {"start":239,"length":17} >return greet(msg) >:=> (line 10, col 4) to (line 10, col 21) -10 > return greet(msg); - - ~~~~~~~~~~~~~ => Pos: (245 to 257) SpanInfo: {"start":246,"length":10} - >greet(msg) - >:=> (line 10, col 11) to (line 10, col 21) -------------------------------- 11 >}; @@ -132,17 +127,7 @@ -------------------------------- 15 > if (!a()) { - ~~~~~~~~~ => Pos: (322 to 330) SpanInfo: {"start":326,"length":9} - >if (!a()) - >:=> (line 15, col 4) to (line 15, col 13) -15 > if (!a()) { - - ~~~ => Pos: (331 to 333) SpanInfo: {"start":331,"length":3} - >a() - >:=> (line 15, col 9) to (line 15, col 12) -15 > if (!a()) { - - ~~~~ => Pos: (334 to 337) SpanInfo: {"start":326,"length":9} + ~~~~~~~~~~~~~~~~ => Pos: (322 to 337) SpanInfo: {"start":326,"length":9} >if (!a()) >:=> (line 15, col 4) to (line 15, col 13) -------------------------------- diff --git a/tests/baselines/reference/bpSpan_ifElse.baseline b/tests/baselines/reference/bpSpan_ifElse.baseline index b66316d3392..fc9e5f6758a 100644 --- a/tests/baselines/reference/bpSpan_ifElse.baseline +++ b/tests/baselines/reference/bpSpan_ifElse.baseline @@ -131,18 +131,11 @@ -------------------------------- 20 >} ()) { - ~ => Pos: (193 to 193) SpanInfo: {"start":193,"length":1} + ~~~~ => Pos: (193 to 196) SpanInfo: {"start":193,"length":1} >} >:=> (line 20, col 0) to (line 20, col 1) 20 >} ()) { - ~~~ => Pos: (194 to 196) SpanInfo: {"start":161,"length":36} - >function foo() { - > return 30; - >} () - >:=> (line 18, col 4) to (line 20, col 4) -20 >} ()) { - ~ => Pos: (197 to 197) SpanInfo: {"start":157,"length":41} >if (function foo() { > return 30; diff --git a/tests/baselines/reference/bpSpan_import.baseline b/tests/baselines/reference/bpSpan_import.baseline index 26279b48f26..af0f959c57c 100644 --- a/tests/baselines/reference/bpSpan_import.baseline +++ b/tests/baselines/reference/bpSpan_import.baseline @@ -41,20 +41,11 @@ -------------------------------- 7 >var x = new a(); - ~~~~~~~ => Pos: (72 to 78) SpanInfo: {"start":72,"length":15} + ~~~~~~~~~~~~~~~~~ => Pos: (72 to 88) SpanInfo: {"start":72,"length":15} >var x = new a() >:=> (line 7, col 0) to (line 7, col 15) -7 >var x = new a(); - - ~~~~~~~~~~ => Pos: (79 to 88) SpanInfo: {"start":80,"length":7} - >new a() - >:=> (line 7, col 8) to (line 7, col 15) -------------------------------- 8 >var y = new b(); - ~~~~~~~ => Pos: (89 to 95) SpanInfo: {"start":89,"length":15} + ~~~~~~~~~~~~~~~~ => Pos: (89 to 104) SpanInfo: {"start":89,"length":15} >var y = new b() - >:=> (line 8, col 0) to (line 8, col 15) -8 >var y = new b(); - ~~~~~~~~~ => Pos: (96 to 104) SpanInfo: {"start":97,"length":7} - >new b() - >:=> (line 8, col 8) to (line 8, col 15) \ No newline at end of file + >:=> (line 8, col 0) to (line 8, col 15) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpan_parenCallOrNewExpressions.baseline b/tests/baselines/reference/bpSpan_parenCallOrNewExpressions.baseline index 47c932640f9..bcc2326c1f3 100644 --- a/tests/baselines/reference/bpSpan_parenCallOrNewExpressions.baseline +++ b/tests/baselines/reference/bpSpan_parenCallOrNewExpressions.baseline @@ -26,105 +26,46 @@ >:=> (line 4, col 0) to (line 6, col 5) 4 >foo((function bar() { - ~ => Pos: (46 to 46) SpanInfo: {"start":46,"length":42} - >(function bar() { - > return foo(40); - >})() - >:=> (line 4, col 4) to (line 6, col 4) -4 >foo((function bar() { - - ~~~~~~~~~~~~~~~~~ => Pos: (47 to 63) SpanInfo: {"start":68,"length":14} + ~~~~~~~~~~~~~~~~~~ => Pos: (46 to 63) SpanInfo: {"start":68,"length":14} >return foo(40) >:=> (line 5, col 4) to (line 5, col 18) -------------------------------- 5 > return foo(40); - ~~~~~~~~~~ => Pos: (64 to 73) SpanInfo: {"start":68,"length":14} + ~~~~~~~~~~~~~~~~~~~~ => Pos: (64 to 83) SpanInfo: {"start":68,"length":14} >return foo(40) >:=> (line 5, col 4) to (line 5, col 18) -5 > return foo(40); - - ~~~~~~~~~~ => Pos: (74 to 83) SpanInfo: {"start":75,"length":7} - >foo(40) - >:=> (line 5, col 11) to (line 5, col 18) -------------------------------- 6 >})()); - ~ => Pos: (84 to 84) SpanInfo: {"start":84,"length":1} + ~~~~~~~ => Pos: (84 to 90) SpanInfo: {"start":84,"length":1} >} >:=> (line 6, col 0) to (line 6, col 1) -6 >})()); - - ~~~ => Pos: (85 to 87) SpanInfo: {"start":46,"length":42} - >(function bar() { - > return foo(40); - >})() - >:=> (line 4, col 4) to (line 6, col 4) -6 >})()); - - ~~~ => Pos: (88 to 90) SpanInfo: {"start":42,"length":47} - >foo((function bar() { - > return foo(40); - >})()) - >:=> (line 4, col 0) to (line 6, col 5) -------------------------------- 7 >var y = foo((function () { - ~~~~~~~ => Pos: (91 to 97) SpanInfo: {"start":91,"length":52} + ~~~~~~~~~~~~ => Pos: (91 to 102) SpanInfo: {"start":91,"length":52} >var y = foo((function () { > return foo(40); >})()) >:=> (line 7, col 0) to (line 9, col 5) 7 >var y = foo((function () { - ~~~~~ => Pos: (98 to 102) SpanInfo: {"start":99,"length":44} - >foo((function () { - > return foo(40); - >})()) - >:=> (line 7, col 8) to (line 9, col 5) -7 >var y = foo((function () { - - ~ => Pos: (103 to 103) SpanInfo: {"start":103,"length":39} - >(function () { - > return foo(40); - >})() - >:=> (line 7, col 12) to (line 9, col 4) -7 >var y = foo((function () { - - ~~~~~~~~~~~~~~ => Pos: (104 to 117) SpanInfo: {"start":122,"length":14} + ~~~~~~~~~~~~~~~ => Pos: (103 to 117) SpanInfo: {"start":122,"length":14} >return foo(40) >:=> (line 8, col 4) to (line 8, col 18) -------------------------------- 8 > return foo(40); - ~~~~~~~~~~ => Pos: (118 to 127) SpanInfo: {"start":122,"length":14} + ~~~~~~~~~~~~~~~~~~~~ => Pos: (118 to 137) SpanInfo: {"start":122,"length":14} >return foo(40) >:=> (line 8, col 4) to (line 8, col 18) -8 > return foo(40); - - ~~~~~~~~~~ => Pos: (128 to 137) SpanInfo: {"start":129,"length":7} - >foo(40) - >:=> (line 8, col 11) to (line 8, col 18) -------------------------------- 9 >})());; - ~ => Pos: (138 to 138) SpanInfo: {"start":138,"length":1} + ~~~~~~~~ => Pos: (138 to 145) SpanInfo: {"start":138,"length":1} >} >:=> (line 9, col 0) to (line 9, col 1) -9 >})());; - - ~~~ => Pos: (139 to 141) SpanInfo: {"start":103,"length":39} - >(function () { - > return foo(40); - >})() - >:=> (line 7, col 12) to (line 9, col 4) -9 >})());; - - ~~~~ => Pos: (142 to 145) SpanInfo: {"start":99,"length":44} - >foo((function () { - > return foo(40); - >})()) - >:=> (line 7, col 8) to (line 9, col 5) -------------------------------- 10 >class greeter { @@ -167,25 +108,15 @@ -------------------------------- 16 >y = foo(30); - ~~~ => Pos: (221 to 223) SpanInfo: {"start":221,"length":11} + ~~~~~~~~~~~~~ => Pos: (221 to 233) SpanInfo: {"start":221,"length":11} >y = foo(30) >:=> (line 16, col 0) to (line 16, col 11) -16 >y = foo(30); - - ~~~~~~~~~~ => Pos: (224 to 233) SpanInfo: {"start":225,"length":7} - >foo(30) - >:=> (line 16, col 4) to (line 16, col 11) -------------------------------- 17 >y = foo(500 + y); - ~~~ => Pos: (234 to 236) SpanInfo: {"start":234,"length":16} + ~~~~~~~~~~~~~~~~~~ => Pos: (234 to 251) SpanInfo: {"start":234,"length":16} >y = foo(500 + y) >:=> (line 17, col 0) to (line 17, col 16) -17 >y = foo(500 + y); - - ~~~~~~~~~~~~~~~ => Pos: (237 to 251) SpanInfo: {"start":238,"length":12} - >foo(500 + y) - >:=> (line 17, col 4) to (line 17, col 16) -------------------------------- 18 >new greeter((function bar() { @@ -196,127 +127,58 @@ >:=> (line 18, col 0) to (line 20, col 5) 18 >new greeter((function bar() { - ~ => Pos: (264 to 264) SpanInfo: {"start":264,"length":42} - >(function bar() { - > return foo(40); - >})() - >:=> (line 18, col 12) to (line 20, col 4) -18 >new greeter((function bar() { - - ~~~~~~~~~~~~~~~~~ => Pos: (265 to 281) SpanInfo: {"start":286,"length":14} + ~~~~~~~~~~~~~~~~~~ => Pos: (264 to 281) SpanInfo: {"start":286,"length":14} >return foo(40) >:=> (line 19, col 4) to (line 19, col 18) -------------------------------- 19 > return foo(40); - ~~~~~~~~~~ => Pos: (282 to 291) SpanInfo: {"start":286,"length":14} + ~~~~~~~~~~~~~~~~~~~~ => Pos: (282 to 301) SpanInfo: {"start":286,"length":14} >return foo(40) >:=> (line 19, col 4) to (line 19, col 18) -19 > return foo(40); - - ~~~~~~~~~~ => Pos: (292 to 301) SpanInfo: {"start":293,"length":7} - >foo(40) - >:=> (line 19, col 11) to (line 19, col 18) -------------------------------- 20 >})()); - ~ => Pos: (302 to 302) SpanInfo: {"start":302,"length":1} + ~~~~~~~ => Pos: (302 to 308) SpanInfo: {"start":302,"length":1} >} >:=> (line 20, col 0) to (line 20, col 1) -20 >})()); - - ~~~ => Pos: (303 to 305) SpanInfo: {"start":264,"length":42} - >(function bar() { - > return foo(40); - >})() - >:=> (line 18, col 12) to (line 20, col 4) -20 >})()); - - ~~~ => Pos: (306 to 308) SpanInfo: {"start":252,"length":55} - >new greeter((function bar() { - > return foo(40); - >})()) - >:=> (line 18, col 0) to (line 20, col 5) -------------------------------- 21 >var anotherGreeter = new greeter((function bar() { - ~~~~~~~~~~~~~~~~~~~~ => Pos: (309 to 328) SpanInfo: {"start":309,"length":76} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (309 to 341) SpanInfo: {"start":309,"length":76} >var anotherGreeter = new greeter((function bar() { > return foo(40); >})()) >:=> (line 21, col 0) to (line 23, col 5) 21 >var anotherGreeter = new greeter((function bar() { - ~~~~~~~~~~~~~ => Pos: (329 to 341) SpanInfo: {"start":330,"length":55} - >new greeter((function bar() { - > return foo(40); - >})()) - >:=> (line 21, col 21) to (line 23, col 5) -21 >var anotherGreeter = new greeter((function bar() { - - ~ => Pos: (342 to 342) SpanInfo: {"start":342,"length":42} - >(function bar() { - > return foo(40); - >})() - >:=> (line 21, col 33) to (line 23, col 4) -21 >var anotherGreeter = new greeter((function bar() { - - ~~~~~~~~~~~~~~~~~=> Pos: (343 to 359) SpanInfo: {"start":364,"length":14} + ~~~~~~~~~~~~~~~~~~=> Pos: (342 to 359) SpanInfo: {"start":364,"length":14} >return foo(40) >:=> (line 22, col 4) to (line 22, col 18) -------------------------------- 22 > return foo(40); - ~~~~~~~~~~ => Pos: (360 to 369) SpanInfo: {"start":364,"length":14} + ~~~~~~~~~~~~~~~~~~~~ => Pos: (360 to 379) SpanInfo: {"start":364,"length":14} >return foo(40) >:=> (line 22, col 4) to (line 22, col 18) -22 > return foo(40); - - ~~~~~~~~~~ => Pos: (370 to 379) SpanInfo: {"start":371,"length":7} - >foo(40) - >:=> (line 22, col 11) to (line 22, col 18) -------------------------------- 23 >})()); - ~ => Pos: (380 to 380) SpanInfo: {"start":380,"length":1} + ~~~~~~~ => Pos: (380 to 386) SpanInfo: {"start":380,"length":1} >} >:=> (line 23, col 0) to (line 23, col 1) -23 >})()); - - ~~~ => Pos: (381 to 383) SpanInfo: {"start":342,"length":42} - >(function bar() { - > return foo(40); - >})() - >:=> (line 21, col 33) to (line 23, col 4) -23 >})()); - - ~~~ => Pos: (384 to 386) SpanInfo: {"start":330,"length":55} - >new greeter((function bar() { - > return foo(40); - >})()) - >:=> (line 21, col 21) to (line 23, col 5) -------------------------------- 24 >anotherGreeter = new greeter(30); - ~~~~~~~~~~~~~~~~ => Pos: (387 to 402) SpanInfo: {"start":387,"length":32} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (387 to 420) SpanInfo: {"start":387,"length":32} >anotherGreeter = new greeter(30) >:=> (line 24, col 0) to (line 24, col 32) -24 >anotherGreeter = new greeter(30); - - ~~~~~~~~~~~~~~~~~~ => Pos: (403 to 420) SpanInfo: {"start":404,"length":15} - >new greeter(30) - >:=> (line 24, col 17) to (line 24, col 32) -------------------------------- 25 >anotherGreeter = new greeter(40 + y); - ~~~~~~~~~~~~~~~~ => Pos: (421 to 436) SpanInfo: {"start":421,"length":36} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (421 to 458) SpanInfo: {"start":421,"length":36} >anotherGreeter = new greeter(40 + y) >:=> (line 25, col 0) to (line 25, col 36) -25 >anotherGreeter = new greeter(40 + y); - - ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (437 to 458) SpanInfo: {"start":438,"length":19} - >new greeter(40 + y) - >:=> (line 25, col 17) to (line 25, col 36) -------------------------------- 26 >new greeter(30); @@ -343,22 +205,6 @@ >:=> (line 29, col 0) to (line 29, col 1) -------------------------------- 30 >foo2(foo(30), foo(40).toString()); - ~~~~~ => Pos: (537 to 541) SpanInfo: {"start":537,"length":33} - >foo2(foo(30), foo(40).toString()) - >:=> (line 30, col 0) to (line 30, col 33) -30 >foo2(foo(30), foo(40).toString()); - ~~~~~~~~ => Pos: (542 to 549) SpanInfo: {"start":542,"length":7} - >foo(30) - >:=> (line 30, col 5) to (line 30, col 12) -30 >foo2(foo(30), foo(40).toString()); - ~~~~~~~~ => Pos: (550 to 557) SpanInfo: {"start":551,"length":7} - >foo(40) - >:=> (line 30, col 14) to (line 30, col 21) -30 >foo2(foo(30), foo(40).toString()); - ~~~~~~~~~~~ => Pos: (558 to 568) SpanInfo: {"start":551,"length":18} - >foo(40).toString() - >:=> (line 30, col 14) to (line 30, col 32) -30 >foo2(foo(30), foo(40).toString()); - ~~ => Pos: (569 to 570) SpanInfo: {"start":537,"length":33} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (537 to 570) SpanInfo: {"start":537,"length":33} >foo2(foo(30), foo(40).toString()) >:=> (line 30, col 0) to (line 30, col 33) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpan_stmts.baseline b/tests/baselines/reference/bpSpan_stmts.baseline index 7f6bf21b40b..b818c9c9e30 100644 --- a/tests/baselines/reference/bpSpan_stmts.baseline +++ b/tests/baselines/reference/bpSpan_stmts.baseline @@ -278,14 +278,9 @@ -------------------------------- 37 > throw new Error(); - ~~~~~~~~~~~~~ => Pos: (549 to 561) SpanInfo: {"start":557,"length":17} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (549 to 575) SpanInfo: {"start":557,"length":17} >throw new Error() >:=> (line 37, col 8) to (line 37, col 25) -37 > throw new Error(); - - ~~~~~~~~~~~~~~ => Pos: (562 to 575) SpanInfo: {"start":563,"length":11} - >new Error() - >:=> (line 37, col 14) to (line 37, col 25) -------------------------------- 38 > } catch (e1) { diff --git a/tests/baselines/reference/bpSpan_switch.baseline b/tests/baselines/reference/bpSpan_switch.baseline index c0e2259784d..7fde6067ed0 100644 --- a/tests/baselines/reference/bpSpan_switch.baseline +++ b/tests/baselines/reference/bpSpan_switch.baseline @@ -176,14 +176,7 @@ >:=> (line 29, col 0) to (line 31, col 5) 29 >switch ((function foo() { - ~ => Pos: (357 to 357) SpanInfo: {"start":357,"length":41} - >(function foo() { - > return x * 30; - >})() - >:=> (line 29, col 8) to (line 31, col 4) -29 >switch ((function foo() { - - ~~~~~~~~~~~~~~~~~ => Pos: (358 to 374) SpanInfo: {"start":379,"length":13} + ~~~~~~~~~~~~~~~~~~ => Pos: (357 to 374) SpanInfo: {"start":379,"length":13} >return x * 30 >:=> (line 30, col 4) to (line 30, col 17) -------------------------------- @@ -195,18 +188,11 @@ -------------------------------- 31 >})()) { - ~ => Pos: (394 to 394) SpanInfo: {"start":394,"length":1} + ~~~~ => Pos: (394 to 397) SpanInfo: {"start":394,"length":1} >} >:=> (line 31, col 0) to (line 31, col 1) 31 >})()) { - ~~~ => Pos: (395 to 397) SpanInfo: {"start":357,"length":41} - >(function foo() { - > return x * 30; - >})() - >:=> (line 29, col 8) to (line 31, col 4) -31 >})()) { - ~ => Pos: (398 to 398) SpanInfo: {"start":349,"length":50} >switch ((function foo() { > return x * 30; @@ -225,14 +211,7 @@ >:=> (line 35, col 8) to (line 35, col 11) 32 > case (function bar() { - ~~ => Pos: (410 to 411) SpanInfo: {"start":411,"length":45} - >(function bar() { - > return 30; - > })() - >:=> (line 32, col 9) to (line 34, col 8) -32 > case (function bar() { - - ~~~~~~~~~~~~~~~~~ => Pos: (412 to 428) SpanInfo: {"start":437,"length":9} + ~~~~~~~~~~~~~~~~~~~ => Pos: (410 to 428) SpanInfo: {"start":437,"length":9} >return 30 >:=> (line 33, col 8) to (line 33, col 17) -------------------------------- @@ -244,18 +223,11 @@ -------------------------------- 34 > })(): - ~~~~~ => Pos: (448 to 452) SpanInfo: {"start":452,"length":1} + ~~~~~~~~ => Pos: (448 to 455) SpanInfo: {"start":452,"length":1} >} >:=> (line 34, col 4) to (line 34, col 5) 34 > })(): - ~~~ => Pos: (453 to 455) SpanInfo: {"start":411,"length":45} - >(function bar() { - > return 30; - > })() - >:=> (line 32, col 9) to (line 34, col 8) -34 > })(): - ~~ => Pos: (456 to 457) SpanInfo: {"start":466,"length":3} >x++ >:=> (line 35, col 8) to (line 35, col 11) diff --git a/tests/baselines/reference/bpSpan_tryCatchFinally.baseline b/tests/baselines/reference/bpSpan_tryCatchFinally.baseline index e5465b8812c..c35683b6e53 100644 --- a/tests/baselines/reference/bpSpan_tryCatchFinally.baseline +++ b/tests/baselines/reference/bpSpan_tryCatchFinally.baseline @@ -85,14 +85,9 @@ -------------------------------- 12 > throw new Error(); - ~~~~~~~~~ => Pos: (113 to 121) SpanInfo: {"start":117,"length":17} + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (113 to 135) SpanInfo: {"start":117,"length":17} >throw new Error() >:=> (line 12, col 4) to (line 12, col 21) -12 > throw new Error(); - - ~~~~~~~~~~~~~~ => Pos: (122 to 135) SpanInfo: {"start":123,"length":11} - >new Error() - >:=> (line 12, col 10) to (line 12, col 21) -------------------------------- 13 >} @@ -173,45 +168,21 @@ >:=> (line 23, col 4) to (line 25, col 8) 23 > throw (function foo() { - ~~ => Pos: (210 to 211) SpanInfo: {"start":211,"length":59} - >(function foo() { - > new Error(x.toString()); - > })() - >:=> (line 23, col 10) to (line 25, col 8) -23 > throw (function foo() { - - ~~~~~~~~~~~~~~~~~ => Pos: (212 to 228) SpanInfo: {"start":237,"length":23} + ~~~~~~~~~~~~~~~~~~~ => Pos: (210 to 228) SpanInfo: {"start":237,"length":23} >new Error(x.toString()) >:=> (line 24, col 8) to (line 24, col 31) -------------------------------- 24 > new Error(x.toString()); - ~~~~~~~~~~~~~~~~~~ => Pos: (229 to 246) SpanInfo: {"start":237,"length":23} - >new Error(x.toString()) - >:=> (line 24, col 8) to (line 24, col 31) -24 > new Error(x.toString()); - - ~~~~~~~~~~~~ => Pos: (247 to 258) SpanInfo: {"start":247,"length":12} - >x.toString() - >:=> (line 24, col 18) to (line 24, col 30) -24 > new Error(x.toString()); - - ~~~ => Pos: (259 to 261) SpanInfo: {"start":237,"length":23} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (229 to 261) SpanInfo: {"start":237,"length":23} >new Error(x.toString()) >:=> (line 24, col 8) to (line 24, col 31) -------------------------------- 25 > })(); - ~~~~~ => Pos: (262 to 266) SpanInfo: {"start":266,"length":1} + ~~~~~~~~~~ => Pos: (262 to 271) SpanInfo: {"start":266,"length":1} >} >:=> (line 25, col 4) to (line 25, col 5) -25 > })(); - - ~~~~~ => Pos: (267 to 271) SpanInfo: {"start":211,"length":59} - >(function foo() { - > new Error(x.toString()); - > })() - >:=> (line 23, col 10) to (line 25, col 8) -------------------------------- 26 >} diff --git a/tests/baselines/reference/bpSpan_typeAssertionExpressions.baseline b/tests/baselines/reference/bpSpan_typeAssertionExpressions.baseline index c04ddb8503b..9a15f782081 100644 --- a/tests/baselines/reference/bpSpan_typeAssertionExpressions.baseline +++ b/tests/baselines/reference/bpSpan_typeAssertionExpressions.baseline @@ -14,28 +14,13 @@ -------------------------------- 3 >var a = new Greeter(); - ~~~~~~~ => Pos: (18 to 24) SpanInfo: {"start":18,"length":30} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (18 to 49) SpanInfo: {"start":18,"length":30} >var a = new Greeter() >:=> (line 3, col 0) to (line 3, col 30) -3 >var a = new Greeter(); - - ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (25 to 49) SpanInfo: {"start":35,"length":13} - >new Greeter() - >:=> (line 3, col 17) to (line 3, col 30) -------------------------------- 4 >a = ( new Greeter()); - ~~~~~ => Pos: (50 to 54) SpanInfo: {"start":50,"length":29} - >a = ( new Greeter()) - >:=> (line 4, col 0) to (line 4, col 29) -4 >a = ( new Greeter()); - - ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (55 to 77) SpanInfo: {"start":65,"length":13} - >new Greeter() - >:=> (line 4, col 15) to (line 4, col 28) -4 >a = ( new Greeter()); - - ~~~ => Pos: (78 to 80) SpanInfo: {"start":50,"length":29} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 80) SpanInfo: {"start":50,"length":29} >a = ( new Greeter()) >:=> (line 4, col 0) to (line 4, col 29) -------------------------------- @@ -48,35 +33,17 @@ >:=> (line 5, col 0) to (line 7, col 4) 5 >a = (function foo() { - ~~~~~~~~~~~ => Pos: (84 to 94) SpanInfo: {"start":94,"length":48} - >(function foo() { - > return new Greeter(); - >})() - >:=> (line 5, col 13) to (line 7, col 4) -5 >a = (function foo() { - - ~~~~~~~~~~~~~~~~~ => Pos: (95 to 111) SpanInfo: {"start":116,"length":20} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (84 to 111) SpanInfo: {"start":116,"length":20} >return new Greeter() >:=> (line 6, col 4) to (line 6, col 24) -------------------------------- 6 > return new Greeter(); - ~~~~~~~~~~ => Pos: (112 to 121) SpanInfo: {"start":116,"length":20} + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (112 to 137) SpanInfo: {"start":116,"length":20} >return new Greeter() >:=> (line 6, col 4) to (line 6, col 24) -6 > return new Greeter(); - - ~~~~~~~~~~~~~~~~ => Pos: (122 to 137) SpanInfo: {"start":123,"length":13} - >new Greeter() - >:=> (line 6, col 11) to (line 6, col 24) -------------------------------- 7 >})(); - ~ => Pos: (138 to 138) SpanInfo: {"start":138,"length":1} + ~~~~~ => Pos: (138 to 142) SpanInfo: {"start":138,"length":1} >} - >:=> (line 7, col 0) to (line 7, col 1) -7 >})(); - ~~~~ => Pos: (139 to 142) SpanInfo: {"start":94,"length":48} - >(function foo() { - > return new Greeter(); - >})() - >:=> (line 5, col 13) to (line 7, col 4) \ No newline at end of file + >:=> (line 7, col 0) to (line 7, col 1) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpan_typealias.baseline b/tests/baselines/reference/bpSpan_typealias.baseline index 88e60b55e47..80e654ad2f3 100644 --- a/tests/baselines/reference/bpSpan_typealias.baseline +++ b/tests/baselines/reference/bpSpan_typealias.baseline @@ -52,25 +52,15 @@ -------------------------------- 8 > var x: a = new m.c(); - ~~~~~~~~~~~~~~ => Pos: (111 to 124) SpanInfo: {"start":115,"length":20} + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (111 to 136) SpanInfo: {"start":115,"length":20} >var x: a = new m.c() >:=> (line 8, col 4) to (line 8, col 24) -8 > var x: a = new m.c(); - - ~~~~~~~~~~~~ => Pos: (125 to 136) SpanInfo: {"start":126,"length":9} - >new m.c() - >:=> (line 8, col 15) to (line 8, col 24) -------------------------------- 9 > var y: b = new m.c(); - ~~~~~~~~~~~~~~ => Pos: (137 to 150) SpanInfo: {"start":141,"length":20} + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (137 to 162) SpanInfo: {"start":141,"length":20} >var y: b = new m.c() >:=> (line 9, col 4) to (line 9, col 24) -9 > var y: b = new m.c(); - - ~~~~~~~~~~~~ => Pos: (151 to 162) SpanInfo: {"start":152,"length":9} - >new m.c() - >:=> (line 9, col 15) to (line 9, col 24) -------------------------------- 10 >} ~ => Pos: (163 to 163) SpanInfo: {"start":163,"length":1} diff --git a/tests/baselines/reference/bpSpan_unaryExpressions.baseline b/tests/baselines/reference/bpSpan_unaryExpressions.baseline index 2ad1191cf95..e0433bf5fad 100644 --- a/tests/baselines/reference/bpSpan_unaryExpressions.baseline +++ b/tests/baselines/reference/bpSpan_unaryExpressions.baseline @@ -32,14 +32,7 @@ >:=> (line 5, col 0) to (line 7, col 4) 5 >typeof (function foo() { - ~~ => Pos: (40 to 41) SpanInfo: {"start":41,"length":36} - >(function foo() { - > return y; - >})() - >:=> (line 5, col 7) to (line 7, col 4) -5 >typeof (function foo() { - - ~~~~~~~~~~~~~~~~~ => Pos: (42 to 58) SpanInfo: {"start":63,"length":8} + ~~~~~~~~~~~~~~~~~~~ => Pos: (40 to 58) SpanInfo: {"start":63,"length":8} >return y >:=> (line 6, col 4) to (line 6, col 12) -------------------------------- @@ -51,16 +44,9 @@ -------------------------------- 7 >})(); - ~ => Pos: (73 to 73) SpanInfo: {"start":73,"length":1} + ~~~~~~ => Pos: (73 to 78) SpanInfo: {"start":73,"length":1} >} >:=> (line 7, col 0) to (line 7, col 1) -7 >})(); - - ~~~~~ => Pos: (74 to 78) SpanInfo: {"start":41,"length":36} - >(function foo() { - > return y; - >})() - >:=> (line 5, col 7) to (line 7, col 4) -------------------------------- 8 >++x; diff --git a/tests/baselines/reference/bpSpan_while.baseline b/tests/baselines/reference/bpSpan_while.baseline index 91632b78009..464a736447a 100644 --- a/tests/baselines/reference/bpSpan_while.baseline +++ b/tests/baselines/reference/bpSpan_while.baseline @@ -79,14 +79,7 @@ >:=> (line 12, col 0) to (line 14, col 11) 12 >while ((function () { - ~ => Pos: (126 to 126) SpanInfo: {"start":126,"length":38} - >(function () { - > return 30 * a; - >})() - >:=> (line 12, col 7) to (line 14, col 4) -12 >while ((function () { - - ~~~~~~~~~~~~~~ => Pos: (127 to 140) SpanInfo: {"start":145,"length":13} + ~~~~~~~~~~~~~~~ => Pos: (126 to 140) SpanInfo: {"start":145,"length":13} >return 30 * a >:=> (line 13, col 4) to (line 13, col 17) -------------------------------- @@ -98,18 +91,11 @@ -------------------------------- 14 >})() !== a) { - ~ => Pos: (160 to 160) SpanInfo: {"start":160,"length":1} + ~~~~ => Pos: (160 to 163) SpanInfo: {"start":160,"length":1} >} >:=> (line 14, col 0) to (line 14, col 1) 14 >})() !== a) { - ~~~ => Pos: (161 to 163) SpanInfo: {"start":126,"length":38} - >(function () { - > return 30 * a; - >})() - >:=> (line 12, col 7) to (line 14, col 4) -14 >})() !== a) { - ~~~~~~~ => Pos: (164 to 170) SpanInfo: {"start":119,"length":52} >while ((function () { > return 30 * a; From 7146b4870f9300f31dc0c8d4fbf8fe59d43b0772 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 21 Dec 2015 15:48:26 -0800 Subject: [PATCH 074/209] Test cases for breakpoints in assingment statement with destructuring --- ...nmentStatementArrayBindingPattern.baseline | 275 ++++++++++++++++++ ...tArrayBindingPatternDefaultValues.baseline | 265 +++++++++++++++++ ...gAssignmentStatementArrayBindingPattern.ts | 55 ++++ ...atementArrayBindingPatternDefaultValues.ts | 53 ++++ 4 files changed, 648 insertions(+) create mode 100644 tests/baselines/reference/bpSpanDestructuringAssignmentStatementArrayBindingPattern.baseline create mode 100644 tests/baselines/reference/bpSpanDestructuringAssignmentStatementArrayBindingPatternDefaultValues.baseline create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringAssignmentStatementArrayBindingPattern.ts create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringAssignmentStatementArrayBindingPatternDefaultValues.ts diff --git a/tests/baselines/reference/bpSpanDestructuringAssignmentStatementArrayBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringAssignmentStatementArrayBindingPattern.baseline new file mode 100644 index 00000000000..b49dabe0f82 --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringAssignmentStatementArrayBindingPattern.baseline @@ -0,0 +1,275 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: any): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (48 to 49) SpanInfo: undefined +-------------------------------- +4 >type Robot = [number, string, string]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 88) SpanInfo: undefined +-------------------------------- +5 >type MultiSkilledRobot = [string, [string, string]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (89 to 141) SpanInfo: undefined +-------------------------------- +6 > + + ~ => Pos: (142 to 142) SpanInfo: undefined +-------------------------------- +7 >var robotA: Robot = [1, "mower", "mowing"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (143 to 186) SpanInfo: {"start":143,"length":42} + >var robotA: Robot = [1, "mower", "mowing"] + >:=> (line 7, col 0) to (line 7, col 42) +-------------------------------- +8 >var robotB: Robot = [2, "trimmer", "trimming"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (187 to 234) SpanInfo: {"start":187,"length":46} + >var robotB: Robot = [2, "trimmer", "trimming"] + >:=> (line 8, col 0) to (line 8, col 46) +-------------------------------- +9 >var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (235 to 298) SpanInfo: {"start":235,"length":62} + >var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]] + >:=> (line 9, col 0) to (line 9, col 62) +-------------------------------- +10 >var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (299 to 372) SpanInfo: {"start":299,"length":72} + >var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]] + >:=> (line 10, col 0) to (line 10, col 72) +-------------------------------- +11 > + + ~ => Pos: (373 to 373) SpanInfo: undefined +-------------------------------- +12 >let nameA: string, numberB: number, nameB: string, skillB: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (374 to 440) SpanInfo: undefined +-------------------------------- +13 >let robotAInfo: (number | string)[]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (441 to 477) SpanInfo: undefined +-------------------------------- +14 > + + ~ => Pos: (478 to 478) SpanInfo: undefined +-------------------------------- +15 >let multiSkillB: [string, string], nameMB: string, primarySkillB: string, secondarySkillB: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (479 to 577) SpanInfo: undefined +-------------------------------- +16 >let multiRobotAInfo: (string | [string, string])[]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (578 to 629) SpanInfo: undefined +-------------------------------- +17 > + + ~ => Pos: (630 to 630) SpanInfo: undefined +-------------------------------- +18 >[, nameA] = robotA; + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (631 to 650) SpanInfo: {"start":631,"length":18} + >[, nameA] = robotA + >:=> (line 18, col 0) to (line 18, col 18) +-------------------------------- +19 >[, nameB] = getRobotB(); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (651 to 675) SpanInfo: {"start":651,"length":23} + >[, nameB] = getRobotB() + >:=> (line 19, col 0) to (line 19, col 23) +-------------------------------- +20 >[, nameB] = [2, "trimmer", "trimming"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (676 to 715) SpanInfo: {"start":676,"length":38} + >[, nameB] = [2, "trimmer", "trimming"] + >:=> (line 20, col 0) to (line 20, col 38) +-------------------------------- +21 >[, multiSkillB] = multiRobotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (716 to 746) SpanInfo: {"start":716,"length":29} + >[, multiSkillB] = multiRobotB + >:=> (line 21, col 0) to (line 21, col 29) +-------------------------------- +22 >[, multiSkillB] = getMultiRobotB(); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (747 to 782) SpanInfo: {"start":747,"length":34} + >[, multiSkillB] = getMultiRobotB() + >:=> (line 22, col 0) to (line 22, col 34) +-------------------------------- +23 >[, multiSkillB] = ["roomba", ["vaccum", "mopping"]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (783 to 835) SpanInfo: {"start":783,"length":51} + >[, multiSkillB] = ["roomba", ["vaccum", "mopping"]] + >:=> (line 23, col 0) to (line 23, col 51) +-------------------------------- +24 > + + ~ => Pos: (836 to 836) SpanInfo: undefined +-------------------------------- +25 >[numberB] = robotB; + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (837 to 856) SpanInfo: {"start":837,"length":18} + >[numberB] = robotB + >:=> (line 25, col 0) to (line 25, col 18) +-------------------------------- +26 >[numberB] = getRobotB(); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (857 to 881) SpanInfo: {"start":857,"length":23} + >[numberB] = getRobotB() + >:=> (line 26, col 0) to (line 26, col 23) +-------------------------------- +27 >[numberB] = [2, "trimmer", "trimming"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (882 to 921) SpanInfo: {"start":882,"length":38} + >[numberB] = [2, "trimmer", "trimming"] + >:=> (line 27, col 0) to (line 27, col 38) +-------------------------------- +28 >[nameMB] = multiRobotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (922 to 945) SpanInfo: {"start":922,"length":22} + >[nameMB] = multiRobotB + >:=> (line 28, col 0) to (line 28, col 22) +-------------------------------- +29 >[nameMB] = getMultiRobotB(); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (946 to 974) SpanInfo: {"start":946,"length":27} + >[nameMB] = getMultiRobotB() + >:=> (line 29, col 0) to (line 29, col 27) +-------------------------------- +30 >[nameMB] = ["trimmer", ["trimming", "edging"]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (975 to 1022) SpanInfo: {"start":975,"length":46} + >[nameMB] = ["trimmer", ["trimming", "edging"]] + >:=> (line 30, col 0) to (line 30, col 46) +-------------------------------- +31 > + + ~ => Pos: (1023 to 1023) SpanInfo: undefined +-------------------------------- +32 >[numberB, nameB, skillB] = robotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1024 to 1058) SpanInfo: {"start":1024,"length":33} + >[numberB, nameB, skillB] = robotB + >:=> (line 32, col 0) to (line 32, col 33) +-------------------------------- +33 >[numberB, nameB, skillB] = getRobotB(); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1059 to 1098) SpanInfo: {"start":1059,"length":38} + >[numberB, nameB, skillB] = getRobotB() + >:=> (line 33, col 0) to (line 33, col 38) +-------------------------------- +34 >[numberB, nameB, skillB] = [2, "trimmer", "trimming"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1099 to 1153) SpanInfo: {"start":1099,"length":53} + >[numberB, nameB, skillB] = [2, "trimmer", "trimming"] + >:=> (line 34, col 0) to (line 34, col 53) +-------------------------------- +35 >[nameMB, [primarySkillB, secondarySkillB]] = multiRobotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1154 to 1211) SpanInfo: {"start":1154,"length":56} + >[nameMB, [primarySkillB, secondarySkillB]] = multiRobotB + >:=> (line 35, col 0) to (line 35, col 56) +-------------------------------- +36 >[nameMB, [primarySkillB, secondarySkillB]] = getMultiRobotB(); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1212 to 1274) SpanInfo: {"start":1212,"length":61} + >[nameMB, [primarySkillB, secondarySkillB]] = getMultiRobotB() + >:=> (line 36, col 0) to (line 36, col 61) +-------------------------------- +37 >[nameMB, [primarySkillB, secondarySkillB]] = ["trimmer", ["trimming", "edging"]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1275 to 1356) SpanInfo: {"start":1275,"length":80} + >[nameMB, [primarySkillB, secondarySkillB]] = ["trimmer", ["trimming", "edging"]] + >:=> (line 37, col 0) to (line 37, col 80) +-------------------------------- +38 > + + ~ => Pos: (1357 to 1357) SpanInfo: undefined +-------------------------------- +39 >[numberB, ...robotAInfo] = robotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1358 to 1392) SpanInfo: {"start":1358,"length":33} + >[numberB, ...robotAInfo] = robotB + >:=> (line 39, col 0) to (line 39, col 33) +-------------------------------- +40 >[numberB, ...robotAInfo] = getRobotB(); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1393 to 1432) SpanInfo: {"start":1393,"length":38} + >[numberB, ...robotAInfo] = getRobotB() + >:=> (line 40, col 0) to (line 40, col 38) +-------------------------------- +41 >[numberB, ...robotAInfo] = [2, "trimmer", "trimming"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1433 to 1494) SpanInfo: {"start":1433,"length":60} + >[numberB, ...robotAInfo] = [2, "trimmer", "trimming"] + >:=> (line 41, col 0) to (line 41, col 60) +-------------------------------- +42 >[...multiRobotAInfo] = multiRobotA; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1495 to 1530) SpanInfo: {"start":1495,"length":34} + >[...multiRobotAInfo] = multiRobotA + >:=> (line 42, col 0) to (line 42, col 34) +-------------------------------- +43 >[...multiRobotAInfo] = getMultiRobotB(); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1531 to 1571) SpanInfo: {"start":1531,"length":39} + >[...multiRobotAInfo] = getMultiRobotB() + >:=> (line 43, col 0) to (line 43, col 39) +-------------------------------- +44 >[...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1572 to 1631) SpanInfo: {"start":1572,"length":58} + >[...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]] + >:=> (line 44, col 0) to (line 44, col 58) +-------------------------------- +45 > + + ~ => Pos: (1632 to 1632) SpanInfo: undefined +-------------------------------- +46 >function getRobotB() { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1633 to 1655) SpanInfo: {"start":1660,"length":13} + >return robotB + >:=> (line 47, col 4) to (line 47, col 17) +-------------------------------- +47 > return robotB; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1656 to 1674) SpanInfo: {"start":1660,"length":13} + >return robotB + >:=> (line 47, col 4) to (line 47, col 17) +-------------------------------- +48 >} + + ~~ => Pos: (1675 to 1676) SpanInfo: {"start":1675,"length":1} + >} + >:=> (line 48, col 0) to (line 48, col 1) +-------------------------------- +49 > + + ~ => Pos: (1677 to 1677) SpanInfo: undefined +-------------------------------- +50 >function getMultiRobotB() { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1678 to 1705) SpanInfo: {"start":1710,"length":18} + >return multiRobotB + >:=> (line 51, col 4) to (line 51, col 22) +-------------------------------- +51 > return multiRobotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1706 to 1729) SpanInfo: {"start":1710,"length":18} + >return multiRobotB + >:=> (line 51, col 4) to (line 51, col 22) +-------------------------------- +52 >} + ~ => Pos: (1730 to 1730) SpanInfo: {"start":1730,"length":1} + >} + >:=> (line 52, col 0) to (line 52, col 1) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringAssignmentStatementArrayBindingPatternDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringAssignmentStatementArrayBindingPatternDefaultValues.baseline new file mode 100644 index 00000000000..e5d777f1a1c --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringAssignmentStatementArrayBindingPatternDefaultValues.baseline @@ -0,0 +1,265 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: any): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (48 to 49) SpanInfo: undefined +-------------------------------- +4 >type Robot = [number, string, string]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 88) SpanInfo: undefined +-------------------------------- +5 >type MultiSkilledRobot = [string, string[]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (89 to 133) SpanInfo: undefined +-------------------------------- +6 > + + ~ => Pos: (134 to 134) SpanInfo: undefined +-------------------------------- +7 >var robotA: Robot = [1, "mower", "mowing"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (135 to 178) SpanInfo: {"start":135,"length":42} + >var robotA: Robot = [1, "mower", "mowing"] + >:=> (line 7, col 0) to (line 7, col 42) +-------------------------------- +8 >var robotB: Robot = [2, "trimmer", "trimming"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (179 to 226) SpanInfo: {"start":179,"length":46} + >var robotB: Robot = [2, "trimmer", "trimming"] + >:=> (line 8, col 0) to (line 8, col 46) +-------------------------------- +9 >var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (227 to 290) SpanInfo: {"start":227,"length":62} + >var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]] + >:=> (line 9, col 0) to (line 9, col 62) +-------------------------------- +10 >var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (291 to 364) SpanInfo: {"start":291,"length":72} + >var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]] + >:=> (line 10, col 0) to (line 10, col 72) +-------------------------------- +11 > + + ~ => Pos: (365 to 365) SpanInfo: undefined +-------------------------------- +12 >let nameA: string, numberB: number, nameB: string, skillB: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (366 to 432) SpanInfo: undefined +-------------------------------- +13 >let robotAInfo: (number | string)[]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (433 to 469) SpanInfo: undefined +-------------------------------- +14 > + + ~ => Pos: (470 to 470) SpanInfo: undefined +-------------------------------- +15 >let multiSkillB: string[], nameMB: string, primarySkillB: string, secondarySkillB: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (471 to 561) SpanInfo: undefined +-------------------------------- +16 >let multiRobotAInfo: (string | string[])[]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (562 to 605) SpanInfo: undefined +-------------------------------- +17 > + + ~ => Pos: (606 to 606) SpanInfo: undefined +-------------------------------- +18 >[, nameA = "helloNoName"] = robotA; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (607 to 642) SpanInfo: {"start":607,"length":34} + >[, nameA = "helloNoName"] = robotA + >:=> (line 18, col 0) to (line 18, col 34) +-------------------------------- +19 >[, nameB = "helloNoName"] = getRobotB(); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (643 to 683) SpanInfo: {"start":643,"length":39} + >[, nameB = "helloNoName"] = getRobotB() + >:=> (line 19, col 0) to (line 19, col 39) +-------------------------------- +20 >[, nameB = "helloNoName"] = [2, "trimmer", "trimming"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (684 to 739) SpanInfo: {"start":684,"length":54} + >[, nameB = "helloNoName"] = [2, "trimmer", "trimming"] + >:=> (line 20, col 0) to (line 20, col 54) +-------------------------------- +21 >[, multiSkillB = []] = multiRobotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (740 to 775) SpanInfo: {"start":740,"length":34} + >[, multiSkillB = []] = multiRobotB + >:=> (line 21, col 0) to (line 21, col 34) +-------------------------------- +22 >[, multiSkillB = []] = getMultiRobotB(); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (776 to 816) SpanInfo: {"start":776,"length":39} + >[, multiSkillB = []] = getMultiRobotB() + >:=> (line 22, col 0) to (line 22, col 39) +-------------------------------- +23 >[, multiSkillB = []] = ["roomba", ["vaccum", "mopping"]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (817 to 874) SpanInfo: {"start":817,"length":56} + >[, multiSkillB = []] = ["roomba", ["vaccum", "mopping"]] + >:=> (line 23, col 0) to (line 23, col 56) +-------------------------------- +24 > + + ~ => Pos: (875 to 875) SpanInfo: undefined +-------------------------------- +25 >[numberB = -1] = robotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (876 to 900) SpanInfo: {"start":876,"length":23} + >[numberB = -1] = robotB + >:=> (line 25, col 0) to (line 25, col 23) +-------------------------------- +26 >[numberB = -1] = getRobotB(); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (901 to 930) SpanInfo: {"start":901,"length":28} + >[numberB = -1] = getRobotB() + >:=> (line 26, col 0) to (line 26, col 28) +-------------------------------- +27 >[numberB = -1] = [2, "trimmer", "trimming"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (931 to 975) SpanInfo: {"start":931,"length":43} + >[numberB = -1] = [2, "trimmer", "trimming"] + >:=> (line 27, col 0) to (line 27, col 43) +-------------------------------- +28 >[nameMB = "helloNoName"] = multiRobotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (976 to 1015) SpanInfo: {"start":976,"length":38} + >[nameMB = "helloNoName"] = multiRobotB + >:=> (line 28, col 0) to (line 28, col 38) +-------------------------------- +29 >[nameMB = "helloNoName"] = getMultiRobotB(); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1016 to 1060) SpanInfo: {"start":1016,"length":43} + >[nameMB = "helloNoName"] = getMultiRobotB() + >:=> (line 29, col 0) to (line 29, col 43) +-------------------------------- +30 >[nameMB = "helloNoName"] = ["trimmer", ["trimming", "edging"]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1061 to 1124) SpanInfo: {"start":1061,"length":62} + >[nameMB = "helloNoName"] = ["trimmer", ["trimming", "edging"]] + >:=> (line 30, col 0) to (line 30, col 62) +-------------------------------- +31 > + + ~ => Pos: (1125 to 1125) SpanInfo: undefined +-------------------------------- +32 >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = robotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1126 to 1193) SpanInfo: {"start":1126,"length":66} + >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = robotB + >:=> (line 32, col 0) to (line 32, col 66) +-------------------------------- +33 >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = getRobotB(); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1194 to 1266) SpanInfo: {"start":1194,"length":71} + >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = getRobotB() + >:=> (line 33, col 0) to (line 33, col 71) +-------------------------------- +34 >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = [2, "trimmer", "trimming"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1267 to 1354) SpanInfo: {"start":1267,"length":86} + >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = [2, "trimmer", "trimming"] + >:=> (line 34, col 0) to (line 34, col 86) +-------------------------------- +35 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1355 to 1457) SpanInfo: {"start":1355,"length":101} + >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB + >:=> (line 35, col 0) to (line 35, col 101) +-------------------------------- +36 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB(); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1458 to 1565) SpanInfo: {"start":1458,"length":106} + >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB() + >:=> (line 36, col 0) to (line 36, col 106) +-------------------------------- +37 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1566 to 1655) SpanInfo: {"start":1566,"length":129} + >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = + > ["trimmer", ["trimming", "edging"]] + >:=> (line 37, col 0) to (line 38, col 39) +-------------------------------- +38 > ["trimmer", ["trimming", "edging"]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1656 to 1696) SpanInfo: {"start":1566,"length":129} + >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = + > ["trimmer", ["trimming", "edging"]] + >:=> (line 37, col 0) to (line 38, col 39) +-------------------------------- +39 > + + ~ => Pos: (1697 to 1697) SpanInfo: undefined +-------------------------------- +40 >[numberB = -1, ...robotAInfo] = robotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1698 to 1737) SpanInfo: {"start":1698,"length":38} + >[numberB = -1, ...robotAInfo] = robotB + >:=> (line 40, col 0) to (line 40, col 38) +-------------------------------- +41 >[numberB = -1, ...robotAInfo] = getRobotB(); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1738 to 1782) SpanInfo: {"start":1738,"length":43} + >[numberB = -1, ...robotAInfo] = getRobotB() + >:=> (line 41, col 0) to (line 41, col 43) +-------------------------------- +42 >[numberB = -1, ...robotAInfo] = [2, "trimmer", "trimming"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1783 to 1849) SpanInfo: {"start":1783,"length":65} + >[numberB = -1, ...robotAInfo] = [2, "trimmer", "trimming"] + >:=> (line 42, col 0) to (line 42, col 65) +-------------------------------- +43 > + + ~ => Pos: (1850 to 1850) SpanInfo: undefined +-------------------------------- +44 >function getRobotB() { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1851 to 1873) SpanInfo: {"start":1878,"length":13} + >return robotB + >:=> (line 45, col 4) to (line 45, col 17) +-------------------------------- +45 > return robotB; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1874 to 1892) SpanInfo: {"start":1878,"length":13} + >return robotB + >:=> (line 45, col 4) to (line 45, col 17) +-------------------------------- +46 >} + + ~~ => Pos: (1893 to 1894) SpanInfo: {"start":1893,"length":1} + >} + >:=> (line 46, col 0) to (line 46, col 1) +-------------------------------- +47 > + + ~ => Pos: (1895 to 1895) SpanInfo: undefined +-------------------------------- +48 >function getMultiRobotB() { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1896 to 1923) SpanInfo: {"start":1928,"length":18} + >return multiRobotB + >:=> (line 49, col 4) to (line 49, col 22) +-------------------------------- +49 > return multiRobotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1924 to 1947) SpanInfo: {"start":1928,"length":18} + >return multiRobotB + >:=> (line 49, col 4) to (line 49, col 22) +-------------------------------- +50 >} + ~ => Pos: (1948 to 1948) SpanInfo: {"start":1948,"length":1} + >} + >:=> (line 50, col 0) to (line 50, col 1) \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringAssignmentStatementArrayBindingPattern.ts b/tests/cases/fourslash/breakpointValidationDestructuringAssignmentStatementArrayBindingPattern.ts new file mode 100644 index 00000000000..5fe69b42f1a --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringAssignmentStatementArrayBindingPattern.ts @@ -0,0 +1,55 @@ +/// +////declare var console: { +//// log(msg: any): void; +////} +////type Robot = [number, string, string]; +////type MultiSkilledRobot = [string, [string, string]]; +//// +////var robotA: Robot = [1, "mower", "mowing"]; +////var robotB: Robot = [2, "trimmer", "trimming"]; +////var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +////var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +//// +////let nameA: string, numberB: number, nameB: string, skillB: string; +////let robotAInfo: (number | string)[]; +//// +////let multiSkillB: [string, string], nameMB: string, primarySkillB: string, secondarySkillB: string; +////let multiRobotAInfo: (string | [string, string])[]; +//// +////[, nameA] = robotA; +////[, nameB] = getRobotB(); +////[, nameB] = [2, "trimmer", "trimming"]; +////[, multiSkillB] = multiRobotB; +////[, multiSkillB] = getMultiRobotB(); +////[, multiSkillB] = ["roomba", ["vaccum", "mopping"]]; +//// +////[numberB] = robotB; +////[numberB] = getRobotB(); +////[numberB] = [2, "trimmer", "trimming"]; +////[nameMB] = multiRobotB; +////[nameMB] = getMultiRobotB(); +////[nameMB] = ["trimmer", ["trimming", "edging"]]; +//// +////[numberB, nameB, skillB] = robotB; +////[numberB, nameB, skillB] = getRobotB(); +////[numberB, nameB, skillB] = [2, "trimmer", "trimming"]; +////[nameMB, [primarySkillB, secondarySkillB]] = multiRobotB; +////[nameMB, [primarySkillB, secondarySkillB]] = getMultiRobotB(); +////[nameMB, [primarySkillB, secondarySkillB]] = ["trimmer", ["trimming", "edging"]]; +//// +////[numberB, ...robotAInfo] = robotB; +////[numberB, ...robotAInfo] = getRobotB(); +////[numberB, ...robotAInfo] = [2, "trimmer", "trimming"]; +////[...multiRobotAInfo] = multiRobotA; +////[...multiRobotAInfo] = getMultiRobotB(); +////[...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]]; +//// +////function getRobotB() { +//// return robotB; +////} +//// +////function getMultiRobotB() { +//// return multiRobotB; +////} + +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringAssignmentStatementArrayBindingPatternDefaultValues.ts b/tests/cases/fourslash/breakpointValidationDestructuringAssignmentStatementArrayBindingPatternDefaultValues.ts new file mode 100644 index 00000000000..354ec145aa4 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringAssignmentStatementArrayBindingPatternDefaultValues.ts @@ -0,0 +1,53 @@ +/// +////declare var console: { +//// log(msg: any): void; +////} +////type Robot = [number, string, string]; +////type MultiSkilledRobot = [string, string[]]; +//// +////var robotA: Robot = [1, "mower", "mowing"]; +////var robotB: Robot = [2, "trimmer", "trimming"]; +////var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +////var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +//// +////let nameA: string, numberB: number, nameB: string, skillB: string; +////let robotAInfo: (number | string)[]; +//// +////let multiSkillB: string[], nameMB: string, primarySkillB: string, secondarySkillB: string; +////let multiRobotAInfo: (string | string[])[]; +//// +////[, nameA = "helloNoName"] = robotA; +////[, nameB = "helloNoName"] = getRobotB(); +////[, nameB = "helloNoName"] = [2, "trimmer", "trimming"]; +////[, multiSkillB = []] = multiRobotB; +////[, multiSkillB = []] = getMultiRobotB(); +////[, multiSkillB = []] = ["roomba", ["vaccum", "mopping"]]; +//// +////[numberB = -1] = robotB; +////[numberB = -1] = getRobotB(); +////[numberB = -1] = [2, "trimmer", "trimming"]; +////[nameMB = "helloNoName"] = multiRobotB; +////[nameMB = "helloNoName"] = getMultiRobotB(); +////[nameMB = "helloNoName"] = ["trimmer", ["trimming", "edging"]]; +//// +////[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = robotB; +////[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = getRobotB(); +////[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = [2, "trimmer", "trimming"]; +////[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB; +////[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB(); +////[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = +//// ["trimmer", ["trimming", "edging"]]; +//// +////[numberB = -1, ...robotAInfo] = robotB; +////[numberB = -1, ...robotAInfo] = getRobotB(); +////[numberB = -1, ...robotAInfo] = [2, "trimmer", "trimming"]; +//// +////function getRobotB() { +//// return robotB; +////} +//// +////function getMultiRobotB() { +//// return multiRobotB; +////} + +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file From 178b2dabfe7f16824d126fdc6406391faec39f86 Mon Sep 17 00:00:00 2001 From: Zhengbo Li Date: Mon, 21 Dec 2015 16:29:04 -0800 Subject: [PATCH 075/209] Add type alias for filewatching callbacks --- src/compiler/core.ts | 4 +++- src/compiler/sys.ts | 28 +++++++++++++++++----------- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index cae7bd82103..4e74029fb5d 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -612,7 +612,9 @@ namespace ts { return path.substr(0, rootLength) + normalized.join(directorySeparator); } - export function getDirectoryPath(path: string) { + export function getDirectoryPath(path: Path): Path; + export function getDirectoryPath(path: string): string; + export function getDirectoryPath(path: string): any { return path.substr(0, Math.max(getRootLength(path), path.lastIndexOf(directorySeparator))); } diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 5794c861670..5d723425496 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -1,6 +1,9 @@ /// namespace ts { + export type CallbackForWatchedFile = (path: string, removed?: boolean) => void; + export type CallbackForWatchedDirectory = (path: string) => void; + export interface System { args: string[]; newLine: string; @@ -8,8 +11,8 @@ namespace ts { write(s: string): void; readFile(path: string, encoding?: string): string; writeFile(path: string, data: string, writeByteOrderMark?: boolean): void; - watchFile?(path: string, callback: (path: string, removed?: boolean) => void): FileWatcher; - watchDirectory?(path: string, callback: (path: string) => void, recursive?: boolean): FileWatcher; + watchFile?(path: string, callback: CallbackForWatchedFile): FileWatcher; + watchDirectory?(path: string, callback: CallbackForWatchedDirectory, recursive?: boolean): FileWatcher; resolvePath(path: string): string; fileExists(path: string): boolean; directoryExists(path: string): boolean; @@ -23,7 +26,7 @@ namespace ts { interface WatchedFile { fileName: string; - callback: (fileName: string, removed?: boolean) => void; + callback: CallbackForWatchedFile; mtime?: Date; } @@ -62,8 +65,8 @@ namespace ts { readFile(path: string): string; writeFile(path: string, contents: string): void; readDirectory(path: string, extension?: string, exclude?: string[]): string[]; - watchFile?(path: string, callback: (path: string, removed?: boolean) => void): FileWatcher; - watchDirectory?(path: string, callback: (path: string) => void, recursive?: boolean): FileWatcher; + watchFile?(path: string, callback: CallbackForWatchedFile): FileWatcher; + watchDirectory?(path: string, callback: CallbackForWatchedDirectory, recursive?: boolean): FileWatcher; }; export var sys: System = (function () { @@ -271,7 +274,7 @@ namespace ts { }, interval); } - function addFile(fileName: string, callback: (fileName: string, removed?: boolean) => void): WatchedFile { + function addFile(fileName: string, callback: CallbackForWatchedFile): WatchedFile { const file: WatchedFile = { fileName, callback, @@ -298,16 +301,18 @@ namespace ts { }; } + + function createWatchedFileSet() { const watchedDirectories = createFileMap(); - const watchedFiles = createFileMap<(fileName: string, removed?: boolean) => void>(); + const watchedFiles = createFileMap(); const currentDirectory = process.cwd(); return { addFile, removeFile }; - function addFile(fileName: string, callback: (fileName: string, removed?: boolean) => void): WatchedFile { + function addFile(fileName: string, callback: CallbackForWatchedFile): WatchedFile { const path = toPath(fileName, currentDirectory, getCanonicalPath); - const parentDirPath = toPath(ts.getDirectoryPath(fileName), currentDirectory, getCanonicalPath); + const parentDirPath = getDirectoryPath(path); if (!watchedDirectories.contains(parentDirPath)) { watchedDirectories.set(parentDirPath, _fs.watch( @@ -323,7 +328,7 @@ namespace ts { const path = toPath(file.fileName, currentDirectory, getCanonicalPath); watchedFiles.remove(path); - const parentDirPath = toPath(ts.getDirectoryPath(path), currentDirectory, getCanonicalPath); + const parentDirPath = getDirectoryPath(path); if (watchedDirectories.contains(parentDirPath)) { let hasWatchedChildren = false; watchedFiles.forEachValue((key, _) => { @@ -474,9 +479,10 @@ namespace ts { watchDirectory: (path, callback, recursive) => { // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows // (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643) + const options = isNode4OrLater() ? { persistent: true } : { persistent: true, recursive: !!recursive }; return _fs.watch( path, - { persistent: true, recursive: !!recursive }, + options, (eventName: string, relativeFileName: string) => { // In watchDirectory we only care about adding and removing files (when event name is // "rename"); changes made within files are handled by corresponding fileWatchers (when From 9ab9940fd03d4eb11422a0ab49bf96df19ad2a13 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Tue, 22 Dec 2015 11:48:01 -0800 Subject: [PATCH 076/209] Remove unused error for this-type predicates. Also: 1. Remove notes I wrote myself for merging. 2. Switch to pattern matching on properties in a few places. --- src/compiler/checker.ts | 51 ++++++++-------------------- src/compiler/diagnosticMessages.json | 4 --- 2 files changed, 14 insertions(+), 41 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 63e44bad83c..ce40f8b7348 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -11138,29 +11138,19 @@ namespace ts { if (!parent) { return; } - // NEW we now get and check the return type -- is this needed? - // Because of Wesley's change, sigs no longer have a special typePred member, - // they have a type that extends PredicateType (with flags including PredicateType) const returnType = getReturnTypeOfSignature(getSignatureFromDeclaration(parent)); if (!returnType || !(returnType.flags & TypeFlags.PredicateType)) { return; } const { parameterName } = node; if (parameterName.kind === SyntaxKind.ThisType) { - if (!isInLegalThisTypePredicatePosition(node)) { - error(node, Diagnostics.A_this_based_type_predicate_is_only_allowed_within_a_class_or_interface_s_members_get_accessors_or_return_type_positions_for_functions_and_methods); - } - else { - getTypeFromThisTypeNode(parameterName as ThisTypeNode); - // TODO: Should probably skip past the other error checking now - // ... because I bet the above function is the equivalent of this one. - } + getTypeFromThisTypeNode(parameterName as ThisTypeNode); } else { const typePredicate = (returnType).predicate; if (typePredicate.parameterIndex >= 0) { if (parent.parameters[typePredicate.parameterIndex].dotDotDotToken) { - error(node.parameterName, + error(parameterName, Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); } else { @@ -11169,14 +11159,14 @@ namespace ts { node.type); } } - else if (node.parameterName) { + else if (parameterName) { let hasReportedError = false; - for (const param of parent.parameters) { - if ((param.name.kind === SyntaxKind.ObjectBindingPattern || - param.name.kind === SyntaxKind.ArrayBindingPattern) && + for (const { name } of parent.parameters) { + if ((name.kind === SyntaxKind.ObjectBindingPattern || + name.kind === SyntaxKind.ArrayBindingPattern) && checkBindingPatternForTypePredicateVariable( - param.name, - node.parameterName, + name, + parameterName, typePredicate.parameterName)) { hasReportedError = true; break; @@ -11209,18 +11199,18 @@ namespace ts { pattern: BindingPattern, predicateVariableNode: Node, predicateVariableName: string) { - for (const element of pattern.elements) { - if (element.name.kind === SyntaxKind.Identifier && - (element.name).text === predicateVariableName) { + for (const { name } of pattern.elements) { + if (name.kind === SyntaxKind.Identifier && + (name).text === predicateVariableName) { error(predicateVariableNode, Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, predicateVariableName); return true; } - else if (element.name.kind === SyntaxKind.ArrayBindingPattern || - element.name.kind === SyntaxKind.ObjectBindingPattern) { + else if (name.kind === SyntaxKind.ArrayBindingPattern || + name.kind === SyntaxKind.ObjectBindingPattern) { if (checkBindingPatternForTypePredicateVariable( - element.name, + name, predicateVariableNode, predicateVariableName)) { return true; @@ -11229,19 +11219,6 @@ namespace ts { } } - function isInLegalThisTypePredicatePosition(node: Node): boolean { - if (getTypePredicateParent(node)) { - return true; - } - switch (node.parent.kind) { - case SyntaxKind.PropertyDeclaration: - case SyntaxKind.PropertySignature: - case SyntaxKind.GetAccessor: - return node === (node.parent as (PropertyDeclaration | GetAccessorDeclaration | PropertySignature)).type; - } - return false; - } - function checkSignatureDeclaration(node: SignatureDeclaration) { // Grammar checking if (node.kind === SyntaxKind.IndexSignature) { diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 1a5b2f3751d..47d85edfbe9 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1651,10 +1651,6 @@ "category": "Error", "code": 2518 }, - "A 'this'-based type predicate is only allowed within a class or interface's members, get accessors, or return type positions for functions and methods.": { - "category": "Error", - "code": 2519 - }, "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions.": { "category": "Error", "code": 2520 From 4a963a26c37b6c23b1d8238da768cf2448f8ec25 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Tue, 22 Dec 2015 13:21:51 -0800 Subject: [PATCH 077/209] initial revision of external module augmentations --- src/compiler/binder.ts | 14 +- src/compiler/checker.ts | 206 +++++++++++++++--- src/compiler/declarationEmitter.ts | 28 ++- src/compiler/diagnosticMessages.json | 20 ++ src/compiler/program.ts | 147 +++++++++---- src/compiler/types.ts | 3 +- src/compiler/utilities.ts | 24 ++ src/services/services.ts | 1 + ...alModuleInAnotherExternalModule.errors.txt | 4 +- ...tExternalModuleInsideNonAmbient.errors.txt | 5 +- ...eInsideNonAmbientExternalModule.errors.txt | 9 +- ...eingExternalModuleWithNoResolve.errors.txt | 4 +- ...sFileCompilationTypeAliasSyntax.errors.txt | 4 +- ...onCollidingNamesInAugmentation1.errors.txt | 40 ++++ ...gmentationCollidingNamesInAugmentation1.js | 75 +++++++ .../moduleAugmentationDeclarationEmit1.js | 68 ++++++ ...moduleAugmentationDeclarationEmit1.symbols | 73 +++++++ .../moduleAugmentationDeclarationEmit1.types | 83 +++++++ .../moduleAugmentationDeclarationEmit2.js | 73 +++++++ ...moduleAugmentationDeclarationEmit2.symbols | 89 ++++++++ .../moduleAugmentationDeclarationEmit2.types | 101 +++++++++ ...ugmentationDisallowedExtensions.errors.txt | 95 ++++++++ .../moduleAugmentationDisallowedExtensions.js | 57 +++++ .../moduleAugmentationExtendAmbientModule1.js | 45 ++++ ...leAugmentationExtendAmbientModule1.symbols | 75 +++++++ ...duleAugmentationExtendAmbientModule1.types | 85 ++++++++ .../moduleAugmentationExtendAmbientModule2.js | 65 ++++++ ...leAugmentationExtendAmbientModule2.symbols | 91 ++++++++ ...duleAugmentationExtendAmbientModule2.types | 103 +++++++++ .../moduleAugmentationExtendFileModule1.js | 49 +++++ ...oduleAugmentationExtendFileModule1.symbols | 73 +++++++ .../moduleAugmentationExtendFileModule1.types | 83 +++++++ .../moduleAugmentationExtendFileModule2.js | 53 +++++ ...oduleAugmentationExtendFileModule2.symbols | 89 ++++++++ .../moduleAugmentationExtendFileModule2.types | 101 +++++++++ .../reference/moduleAugmentationGlobal1.js | 45 ++++ .../moduleAugmentationGlobal1.symbols | 33 +++ .../reference/moduleAugmentationGlobal1.types | 36 +++ .../reference/moduleAugmentationGlobal2.js | 45 ++++ .../moduleAugmentationGlobal2.symbols | 32 +++ .../reference/moduleAugmentationGlobal2.types | 36 +++ .../reference/moduleAugmentationGlobal3.js | 52 +++++ .../moduleAugmentationGlobal3.symbols | 35 +++ .../reference/moduleAugmentationGlobal3.types | 39 ++++ .../moduleAugmentationGlobal4.errors.txt | 25 +++ .../reference/moduleAugmentationGlobal4.js | 47 ++++ .../moduleAugmentationImportsAndExports1.js | 71 ++++++ ...duleAugmentationImportsAndExports1.symbols | 53 +++++ ...moduleAugmentationImportsAndExports1.types | 60 +++++ ...eAugmentationImportsAndExports2.errors.txt | 70 ++++++ .../moduleAugmentationImportsAndExports2.js | 76 +++++++ ...eAugmentationImportsAndExports3.errors.txt | 56 +++++ .../moduleAugmentationImportsAndExports3.js | 74 +++++++ .../moduleAugmentationImportsAndExports4.js | 68 ++++++ ...duleAugmentationImportsAndExports4.symbols | 98 +++++++++ ...moduleAugmentationImportsAndExports4.types | 107 +++++++++ ...eAugmentationImportsAndExports5.errors.txt | 46 ++++ .../moduleAugmentationImportsAndExports5.js | 78 +++++++ .../moduleAugmentationImportsAndExports6.js | 97 +++++++++ ...duleAugmentationImportsAndExports6.symbols | 98 +++++++++ ...moduleAugmentationImportsAndExports6.types | 107 +++++++++ .../moduleAugmentationInAmbientModule1.js | 39 ++++ ...moduleAugmentationInAmbientModule1.symbols | 46 ++++ .../moduleAugmentationInAmbientModule1.types | 47 ++++ .../moduleAugmentationInAmbientModule2.js | 36 +++ ...moduleAugmentationInAmbientModule2.symbols | 46 ++++ .../moduleAugmentationInAmbientModule2.types | 47 ++++ .../moduleAugmentationInAmbientModule3.js | 47 ++++ ...moduleAugmentationInAmbientModule3.symbols | 69 ++++++ .../moduleAugmentationInAmbientModule3.types | 71 ++++++ .../moduleAugmentationInAmbientModule4.js | 50 +++++ ...moduleAugmentationInAmbientModule4.symbols | 71 ++++++ .../moduleAugmentationInAmbientModule4.types | 73 +++++++ .../moduleAugmentationNoNewNames.errors.txt | 47 ++++ .../reference/moduleAugmentationNoNewNames.js | 41 ++++ .../moduleAugmentationsBundledOutput1.js | 142 ++++++++++++ .../moduleAugmentationsBundledOutput1.symbols | 129 +++++++++++ .../moduleAugmentationsBundledOutput1.types | 163 ++++++++++++++ .../reference/moduleAugmentationsImports1.js | 104 +++++++++ .../moduleAugmentationsImports1.symbols | 89 ++++++++ .../moduleAugmentationsImports1.types | 105 +++++++++ .../reference/moduleAugmentationsImports2.js | 114 ++++++++++ .../moduleAugmentationsImports2.symbols | 94 ++++++++ .../moduleAugmentationsImports2.types | 110 ++++++++++ .../reference/moduleAugmentationsImports3.js | 101 +++++++++ .../moduleAugmentationsImports3.symbols | 91 ++++++++ .../moduleAugmentationsImports3.types | 101 +++++++++ .../reference/moduleAugmentationsImports4.js | 90 ++++++++ .../moduleAugmentationsImports4.symbols | 89 ++++++++ .../moduleAugmentationsImports4.types | 93 ++++++++ .../privacyGloImportParseErrors.errors.txt | 9 +- .../privacyImportParseErrors.errors.txt | 44 ++-- .../undefinedTypeAssignment1.errors.txt | 4 +- ...gmentationCollidingNamesInAugmentation1.ts | 33 +++ .../moduleAugmentationDeclarationEmit1.ts | 33 +++ .../moduleAugmentationDeclarationEmit2.ts | 35 +++ .../moduleAugmentationDisallowedExtensions.ts | 39 ++++ .../moduleAugmentationExtendAmbientModule1.ts | 34 +++ .../moduleAugmentationExtendAmbientModule2.ts | 37 ++++ .../moduleAugmentationExtendFileModule1.ts | 32 +++ .../moduleAugmentationExtendFileModule2.ts | 34 +++ .../compiler/moduleAugmentationGlobal1.ts | 18 ++ .../compiler/moduleAugmentationGlobal2.ts | 18 ++ .../compiler/moduleAugmentationGlobal3.ts | 21 ++ .../compiler/moduleAugmentationGlobal4.ts | 18 ++ .../moduleAugmentationImportsAndExports1.ts | 28 +++ .../moduleAugmentationImportsAndExports2.ts | 40 ++++ .../moduleAugmentationImportsAndExports3.ts | 38 ++++ .../moduleAugmentationImportsAndExports4.ts | 39 ++++ .../moduleAugmentationImportsAndExports5.ts | 40 ++++ .../moduleAugmentationImportsAndExports6.ts | 40 ++++ .../moduleAugmentationInAmbientModule1.ts | 28 +++ .../moduleAugmentationInAmbientModule2.ts | 28 +++ .../moduleAugmentationInAmbientModule3.ts | 38 ++++ .../moduleAugmentationInAmbientModule4.ts | 40 ++++ .../compiler/moduleAugmentationNoNewNames.ts | 28 +++ .../moduleAugmentationsBundledOutput1.ts | 57 +++++ .../compiler/moduleAugmentationsImports1.ts | 44 ++++ .../compiler/moduleAugmentationsImports2.ts | 49 +++++ .../compiler/moduleAugmentationsImports3.ts | 48 ++++ .../compiler/moduleAugmentationsImports4.ts | 49 +++++ .../getJavaScriptSemanticDiagnostics8.ts | 4 +- 122 files changed, 7000 insertions(+), 111 deletions(-) create mode 100644 tests/baselines/reference/moduleAugmentationCollidingNamesInAugmentation1.errors.txt create mode 100644 tests/baselines/reference/moduleAugmentationCollidingNamesInAugmentation1.js create mode 100644 tests/baselines/reference/moduleAugmentationDeclarationEmit1.js create mode 100644 tests/baselines/reference/moduleAugmentationDeclarationEmit1.symbols create mode 100644 tests/baselines/reference/moduleAugmentationDeclarationEmit1.types create mode 100644 tests/baselines/reference/moduleAugmentationDeclarationEmit2.js create mode 100644 tests/baselines/reference/moduleAugmentationDeclarationEmit2.symbols create mode 100644 tests/baselines/reference/moduleAugmentationDeclarationEmit2.types create mode 100644 tests/baselines/reference/moduleAugmentationDisallowedExtensions.errors.txt create mode 100644 tests/baselines/reference/moduleAugmentationDisallowedExtensions.js create mode 100644 tests/baselines/reference/moduleAugmentationExtendAmbientModule1.js create mode 100644 tests/baselines/reference/moduleAugmentationExtendAmbientModule1.symbols create mode 100644 tests/baselines/reference/moduleAugmentationExtendAmbientModule1.types create mode 100644 tests/baselines/reference/moduleAugmentationExtendAmbientModule2.js create mode 100644 tests/baselines/reference/moduleAugmentationExtendAmbientModule2.symbols create mode 100644 tests/baselines/reference/moduleAugmentationExtendAmbientModule2.types create mode 100644 tests/baselines/reference/moduleAugmentationExtendFileModule1.js create mode 100644 tests/baselines/reference/moduleAugmentationExtendFileModule1.symbols create mode 100644 tests/baselines/reference/moduleAugmentationExtendFileModule1.types create mode 100644 tests/baselines/reference/moduleAugmentationExtendFileModule2.js create mode 100644 tests/baselines/reference/moduleAugmentationExtendFileModule2.symbols create mode 100644 tests/baselines/reference/moduleAugmentationExtendFileModule2.types create mode 100644 tests/baselines/reference/moduleAugmentationGlobal1.js create mode 100644 tests/baselines/reference/moduleAugmentationGlobal1.symbols create mode 100644 tests/baselines/reference/moduleAugmentationGlobal1.types create mode 100644 tests/baselines/reference/moduleAugmentationGlobal2.js create mode 100644 tests/baselines/reference/moduleAugmentationGlobal2.symbols create mode 100644 tests/baselines/reference/moduleAugmentationGlobal2.types create mode 100644 tests/baselines/reference/moduleAugmentationGlobal3.js create mode 100644 tests/baselines/reference/moduleAugmentationGlobal3.symbols create mode 100644 tests/baselines/reference/moduleAugmentationGlobal3.types create mode 100644 tests/baselines/reference/moduleAugmentationGlobal4.errors.txt create mode 100644 tests/baselines/reference/moduleAugmentationGlobal4.js create mode 100644 tests/baselines/reference/moduleAugmentationImportsAndExports1.js create mode 100644 tests/baselines/reference/moduleAugmentationImportsAndExports1.symbols create mode 100644 tests/baselines/reference/moduleAugmentationImportsAndExports1.types create mode 100644 tests/baselines/reference/moduleAugmentationImportsAndExports2.errors.txt create mode 100644 tests/baselines/reference/moduleAugmentationImportsAndExports2.js create mode 100644 tests/baselines/reference/moduleAugmentationImportsAndExports3.errors.txt create mode 100644 tests/baselines/reference/moduleAugmentationImportsAndExports3.js create mode 100644 tests/baselines/reference/moduleAugmentationImportsAndExports4.js create mode 100644 tests/baselines/reference/moduleAugmentationImportsAndExports4.symbols create mode 100644 tests/baselines/reference/moduleAugmentationImportsAndExports4.types create mode 100644 tests/baselines/reference/moduleAugmentationImportsAndExports5.errors.txt create mode 100644 tests/baselines/reference/moduleAugmentationImportsAndExports5.js create mode 100644 tests/baselines/reference/moduleAugmentationImportsAndExports6.js create mode 100644 tests/baselines/reference/moduleAugmentationImportsAndExports6.symbols create mode 100644 tests/baselines/reference/moduleAugmentationImportsAndExports6.types create mode 100644 tests/baselines/reference/moduleAugmentationInAmbientModule1.js create mode 100644 tests/baselines/reference/moduleAugmentationInAmbientModule1.symbols create mode 100644 tests/baselines/reference/moduleAugmentationInAmbientModule1.types create mode 100644 tests/baselines/reference/moduleAugmentationInAmbientModule2.js create mode 100644 tests/baselines/reference/moduleAugmentationInAmbientModule2.symbols create mode 100644 tests/baselines/reference/moduleAugmentationInAmbientModule2.types create mode 100644 tests/baselines/reference/moduleAugmentationInAmbientModule3.js create mode 100644 tests/baselines/reference/moduleAugmentationInAmbientModule3.symbols create mode 100644 tests/baselines/reference/moduleAugmentationInAmbientModule3.types create mode 100644 tests/baselines/reference/moduleAugmentationInAmbientModule4.js create mode 100644 tests/baselines/reference/moduleAugmentationInAmbientModule4.symbols create mode 100644 tests/baselines/reference/moduleAugmentationInAmbientModule4.types create mode 100644 tests/baselines/reference/moduleAugmentationNoNewNames.errors.txt create mode 100644 tests/baselines/reference/moduleAugmentationNoNewNames.js create mode 100644 tests/baselines/reference/moduleAugmentationsBundledOutput1.js create mode 100644 tests/baselines/reference/moduleAugmentationsBundledOutput1.symbols create mode 100644 tests/baselines/reference/moduleAugmentationsBundledOutput1.types create mode 100644 tests/baselines/reference/moduleAugmentationsImports1.js create mode 100644 tests/baselines/reference/moduleAugmentationsImports1.symbols create mode 100644 tests/baselines/reference/moduleAugmentationsImports1.types create mode 100644 tests/baselines/reference/moduleAugmentationsImports2.js create mode 100644 tests/baselines/reference/moduleAugmentationsImports2.symbols create mode 100644 tests/baselines/reference/moduleAugmentationsImports2.types create mode 100644 tests/baselines/reference/moduleAugmentationsImports3.js create mode 100644 tests/baselines/reference/moduleAugmentationsImports3.symbols create mode 100644 tests/baselines/reference/moduleAugmentationsImports3.types create mode 100644 tests/baselines/reference/moduleAugmentationsImports4.js create mode 100644 tests/baselines/reference/moduleAugmentationsImports4.symbols create mode 100644 tests/baselines/reference/moduleAugmentationsImports4.types create mode 100644 tests/cases/compiler/moduleAugmentationCollidingNamesInAugmentation1.ts create mode 100644 tests/cases/compiler/moduleAugmentationDeclarationEmit1.ts create mode 100644 tests/cases/compiler/moduleAugmentationDeclarationEmit2.ts create mode 100644 tests/cases/compiler/moduleAugmentationDisallowedExtensions.ts create mode 100644 tests/cases/compiler/moduleAugmentationExtendAmbientModule1.ts create mode 100644 tests/cases/compiler/moduleAugmentationExtendAmbientModule2.ts create mode 100644 tests/cases/compiler/moduleAugmentationExtendFileModule1.ts create mode 100644 tests/cases/compiler/moduleAugmentationExtendFileModule2.ts create mode 100644 tests/cases/compiler/moduleAugmentationGlobal1.ts create mode 100644 tests/cases/compiler/moduleAugmentationGlobal2.ts create mode 100644 tests/cases/compiler/moduleAugmentationGlobal3.ts create mode 100644 tests/cases/compiler/moduleAugmentationGlobal4.ts create mode 100644 tests/cases/compiler/moduleAugmentationImportsAndExports1.ts create mode 100644 tests/cases/compiler/moduleAugmentationImportsAndExports2.ts create mode 100644 tests/cases/compiler/moduleAugmentationImportsAndExports3.ts create mode 100644 tests/cases/compiler/moduleAugmentationImportsAndExports4.ts create mode 100644 tests/cases/compiler/moduleAugmentationImportsAndExports5.ts create mode 100644 tests/cases/compiler/moduleAugmentationImportsAndExports6.ts create mode 100644 tests/cases/compiler/moduleAugmentationInAmbientModule1.ts create mode 100644 tests/cases/compiler/moduleAugmentationInAmbientModule2.ts create mode 100644 tests/cases/compiler/moduleAugmentationInAmbientModule3.ts create mode 100644 tests/cases/compiler/moduleAugmentationInAmbientModule4.ts create mode 100644 tests/cases/compiler/moduleAugmentationNoNewNames.ts create mode 100644 tests/cases/compiler/moduleAugmentationsBundledOutput1.ts create mode 100644 tests/cases/compiler/moduleAugmentationsImports1.ts create mode 100644 tests/cases/compiler/moduleAugmentationsImports2.ts create mode 100644 tests/cases/compiler/moduleAugmentationsImports3.ts create mode 100644 tests/cases/compiler/moduleAugmentationsImports4.ts diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index f7108c5d2d7..d514026351d 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -109,6 +109,7 @@ namespace ts { let blockScopeContainer: Node; let lastContainer: Node; let seenThisKeyword: boolean; + let isSourceFileExternalModule: boolean; // state used by reachability checks let hasExplicitReturn: boolean; @@ -129,8 +130,9 @@ namespace ts { function bindSourceFile(f: SourceFile, opts: CompilerOptions) { file = f; options = opts; - inStrictMode = !!file.externalModuleIndicator; + isSourceFileExternalModule = inStrictMode = !!file.externalModuleIndicator; classifiableNames = {}; + Symbol = objectAllocator.getSymbolConstructor(); if (!file.locals) { @@ -348,7 +350,12 @@ namespace ts { // 2. When we checkIdentifier in the checker, we set its resolved symbol to the local symbol, // but return the export symbol (by calling getExportSymbolOfValueSymbolIfExported). That way // when the emitter comes back to it, it knows not to qualify the name if it was found in a containing scope. - if (hasExportModifier || container.flags & NodeFlags.ExportContext) { + + // NOTE: Nested ambient modules always should go to to 'locals' table to prevent their automatic merge + // during global merging in the checker. Why? The only case when ambient module is permitted inside another module is module augmentation + // and this case is specially handled. Module augmentations should only be merged with original module definition + // and should never be merged directly with other augmentation and the latter case would be possible is automatic merge is allowed. + if (!isAmbientModule(node) && (hasExportModifier || container.flags & NodeFlags.ExportContext)) { const exportKind = (symbolFlags & SymbolFlags.Value ? SymbolFlags.ExportValue : 0) | (symbolFlags & SymbolFlags.Type ? SymbolFlags.ExportType : 0) | @@ -844,6 +851,9 @@ namespace ts { function bindModuleDeclaration(node: ModuleDeclaration) { setExportContextFlag(node); if (node.name.kind === SyntaxKind.StringLiteral) { + if (node.flags & NodeFlags.Export) { + errorOnFirstToken(node, Diagnostics.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible); + } declareSymbolAndAddToSymbolTable(node, SymbolFlags.ValueModule, SymbolFlags.ValueModuleExcludes); } else { diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 5d57e9d2028..2a79181ea45 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -368,6 +368,32 @@ namespace ts { } } + function mergeModuleAugmentation(moduleName: LiteralExpression): void { + const moduleAugmentation = moduleName.parent; + if (moduleAugmentation.symbol.valueDeclaration !== moduleAugmentation) { + // this is a combined symbol for multiple augmentations within the same file. + // its symbol already has accumulated information for all declarations + // so we need to add it just once - do the work only for first declaration + Debug.assert(moduleAugmentation.symbol.declarations.length > 1); + return; + } + + if (isNameOfGlobalAugmentation(moduleName)) { + mergeSymbolTable(globals, moduleAugmentation.symbol.exports); + } + else { + // find a module that about to be augmented + let mainModule = resolveExternalModuleNameWorker(moduleName, moduleName, Diagnostics.Invalid_module_name_in_augmentation_module_0_cannot_be_found); + if (!mainModule) { + return; + } + // is module symbol is already merged - it is safe to use it. + // otherwise clone it + mainModule = mainModule.flags & SymbolFlags.Merged ? mainModule : cloneSymbol(mainModule); + mergeSymbol(mainModule, moduleAugmentation.symbol); + } + } + function addToSymbolTable(target: SymbolTable, source: SymbolTable, message: DiagnosticMessage) { for (const id in source) { if (hasProperty(source, id)) { @@ -397,10 +423,6 @@ namespace ts { return nodeLinks[nodeId] || (nodeLinks[nodeId] = {}); } - function getSourceFile(node: Node): SourceFile { - return getAncestor(node, SyntaxKind.SourceFile); - } - function isGlobalSourceFile(node: Node) { return node.kind === SyntaxKind.SourceFile && !isExternalOrCommonJsModule(node); } @@ -1070,6 +1092,10 @@ namespace ts { } function resolveExternalModuleName(location: Node, moduleReferenceExpression: Expression): Symbol { + return resolveExternalModuleNameWorker(location, moduleReferenceExpression, Diagnostics.Cannot_find_module_0); + } + + function resolveExternalModuleNameWorker(location: Node, moduleReferenceExpression: Expression, moduleNotFoundError: DiagnosticMessage): Symbol { if (moduleReferenceExpression.kind !== SyntaxKind.StringLiteral) { return; } @@ -1088,20 +1114,29 @@ namespace ts { if (!isRelative) { const symbol = getSymbol(globals, "\"" + moduleName + "\"", SymbolFlags.ValueModule); if (symbol) { - return symbol; + // merged symbol is module declaration symbol combined with all augmentations + return getMergedSymbol(symbol); } } - const resolvedModule = getResolvedModule(getSourceFile(location), moduleReferenceLiteral.text); + const resolvedModule = getResolvedModule(getSourceFileOfNode(location), moduleReferenceLiteral.text); const sourceFile = resolvedModule && host.getSourceFile(resolvedModule.resolvedFileName); if (sourceFile) { if (sourceFile.symbol) { - return sourceFile.symbol; + // merged symbol is module declaration symbol combined with all augmentations + return getMergedSymbol(sourceFile.symbol); } - error(moduleReferenceLiteral, Diagnostics.File_0_is_not_a_module, sourceFile.fileName); - return; + if (moduleNotFoundError) { + // report errors only if it was requested + error(moduleReferenceLiteral, Diagnostics.File_0_is_not_a_module, sourceFile.fileName); + } + return undefined; } - error(moduleReferenceLiteral, Diagnostics.Cannot_find_module_0, moduleName); + if (moduleNotFoundError) { + // report errors only if it was requested + error(moduleReferenceLiteral, moduleNotFoundError, moduleName); + } + return undefined; } // An external module with an 'export =' declaration resolves to the target of the 'export =' declaration, @@ -1642,6 +1677,12 @@ namespace ts { return undefined; } + function isTopLevelInExternalModuleAugmentation(node: Node): boolean { + return node && node.parent && + node.parent.kind === SyntaxKind.ModuleBlock && + isExternalModuleAugmentation(node.parent.parent); + } + function getSymbolDisplayBuilder(): SymbolDisplayBuilder { function getNameOfSymbol(symbol: Symbol): string { @@ -2222,6 +2263,10 @@ namespace ts { case SyntaxKind.FunctionDeclaration: case SyntaxKind.EnumDeclaration: case SyntaxKind.ImportEqualsDeclaration: + // external module augmentation is always visible + if (isExternalModuleAugmentation(node)) { + return true; + } const parent = getDeclarationContainer(node); // If the node is not exported or it is not ambient module element (except import declaration) if (!(getCombinedNodeFlags(node) & NodeFlags.Export) && @@ -8571,7 +8616,7 @@ namespace ts { function checkIndexedAccess(node: ElementAccessExpression): Type { // Grammar checking if (!node.argumentExpression) { - const sourceFile = getSourceFile(node); + const sourceFile = getSourceFileOfNode(node); if (node.parent.kind === SyntaxKind.NewExpression && (node.parent).expression === node) { const start = skipTrivia(sourceFile.text, node.expression.end); const end = node.end; @@ -12406,7 +12451,7 @@ namespace ts { // checkFunctionOrConstructorSymbol wouldn't be called if we didnt ignore javascript function. const firstDeclaration = forEach(localSymbol.declarations, // Get first non javascript function declaration - declaration => declaration.kind === node.kind && !isSourceFileJavaScript(getSourceFile(declaration)) ? + declaration => declaration.kind === node.kind && !isSourceFileJavaScript(getSourceFileOfNode(declaration)) ? declaration : undefined); // Only type check the symbol once @@ -14133,19 +14178,100 @@ namespace ts { } } - // Checks for ambient external modules. if (isAmbientExternalModule) { - if (!isGlobalSourceFile(node.parent)) { - error(node.name, Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces); + if (isExternalModuleAugmentation(node)) { + // if symbol of augmentation is not merged this means that either + // - this is an augmentation of the global scope + // or + // - this augmentation was not merged with main definition of the module + // error should already be reported so all errors in the body of augmentation can be ignored. + const checkBody = isNameOfGlobalAugmentation(node.name) || (getSymbolOfNode(node).flags & SymbolFlags.Merged); + if (checkBody) { + const globalAugmentation = isNameOfGlobalAugmentation(node.name); + // body of ambient external module is always a module block + for (const statement of (node.body).statements) { + checkBodyOfModuleAugmentation(statement, globalAugmentation); + } + } } - if (isExternalModuleNameRelative(node.name.text)) { - error(node.name, Diagnostics.Ambient_module_declaration_cannot_specify_relative_module_name); + else if (isGlobalSourceFile(node.parent)) { + if (isExternalModuleNameRelative(node.name.text)) { + error(node.name, Diagnostics.Ambient_module_declaration_cannot_specify_relative_module_name); + } + } + else { + // Node is not an augmentation and is not located on the script level. + // This means that this is declaration of ambient module that is located in other module or namespace which is prohibited. + error(node.name, Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces); } } } checkSourceElement(node.body); } + function isNameOfGlobalAugmentation(node: LiteralExpression): boolean { + // global augmentation + // TODO: fix to use 'declare global' syntax. + return node.text === "/"; + } + + function checkBodyOfModuleAugmentation(node: Node, isGlobalAugmentation: boolean): void { + switch (node.kind) { + case SyntaxKind.VariableStatement: + // error each individual name in variable statement instead of marking the entire variable statement + for (const decl of (node).declarationList.declarations) { + if (isBindingPattern(decl.name)) { + for (const el of (decl.name).elements) { + // mark individual names in binding pattern + checkBodyOfModuleAugmentation(el, isGlobalAugmentation); + } + } + else { + checkBodyOfModuleAugmentation(decl, isGlobalAugmentation); + } + } + break; + case SyntaxKind.ExportDeclaration: + grammarErrorOnFirstToken(node, Diagnostics.Exports_are_not_permitted_in_module_augmentations); + break; + case SyntaxKind.ImportEqualsDeclaration: + if ((node).moduleReference.kind !== SyntaxKind.StringLiteral) { + error((node).name, Diagnostics.Module_augmentation_cannot_introduce_new_names_in_the_top_level_scope); + break; + } + // fallthrough + case SyntaxKind.ImportDeclaration: + grammarErrorOnFirstToken(node, Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); + break; + default: + const symbol = getSymbolOfNode(node); + if (symbol) { + // module augmentations cannot introduce new names on the top level scope of the module + // this is done it two steps + // 1. quick check - if symbol for node is not merged - this is local symbol to this augmentation - report error + // 2. main check - report error if value declaration of the parent symbol is module augmentation) + let reportError = !(symbol.flags & SymbolFlags.Merged); + if (!reportError) { + if (isGlobalAugmentation) { + // global symbol should not have parent since it is not explicitly exported + reportError = symbol.parent !== undefined; + } + else { + // this symbol contains only merged content from external modules and augmentations so it should always be exported (parent !== undefined) + // and parent should have value side (valueDeclaration !== undefined) + Debug.assert(symbol.parent !== undefined && symbol.parent.valueDeclaration !== undefined); + // symbol should not originate in augmentation + reportError = isExternalModuleAugmentation(symbol.parent.valueDeclaration); + } + } + if (reportError) { + error(node, Diagnostics.Module_augmentation_cannot_introduce_new_names_in_the_top_level_scope); + } + } + break; + } + } + function getFirstIdentifier(node: EntityName | Expression): Identifier { while (true) { if (node.kind === SyntaxKind.QualifiedName) { @@ -14176,12 +14302,16 @@ namespace ts { return false; } if (inAmbientExternalModule && isExternalModuleNameRelative((moduleName).text)) { - // TypeScript 1.0 spec (April 2013): 12.1.6 - // An ExternalImportDeclaration in an AmbientExternalModuleDeclaration may reference - // other external modules only through top - level external module names. - // Relative external module names are not permitted. - error(node, Diagnostics.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name); - return false; + // we have already reported errors on top level imports\exports in external module augmentations in checkModuleDeclaration + // no need to do this again. + if (!isTopLevelInExternalModuleAugmentation(node)) { + // TypeScript 1.0 spec (April 2013): 12.1.6 + // An ExternalImportDeclaration in an AmbientExternalModuleDeclaration may reference + // other external modules only through top - level external module names. + // Relative external module names are not permitted. + error(node, Diagnostics.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name); + return false; + } } return true; } @@ -15458,13 +15588,13 @@ namespace ts { }; } - function getExternalModuleFileFromDeclaration(declaration: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration): SourceFile { - const specifier = getExternalModuleName(declaration); - const moduleSymbol = getSymbolAtLocation(specifier); - if (!moduleSymbol) { - return undefined; - } - return getDeclarationOfKind(moduleSymbol, SyntaxKind.SourceFile) as SourceFile; + function getExternalModuleFileFromDeclaration(declaration: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration | ModuleDeclaration): SourceFile { + const specifier = getExternalModuleName(declaration); + const moduleSymbol = resolveExternalModuleNameWorker(specifier, specifier, /*moduleNotFoundError*/ undefined); + if (!moduleSymbol) { + return undefined; + } + return getDeclarationOfKind(moduleSymbol, SyntaxKind.SourceFile) as SourceFile; } function initializeTypeChecker() { @@ -15473,13 +15603,27 @@ namespace ts { bindSourceFile(file, compilerOptions); }); + let mergeAugmentations = false; // Initialize global symbol table forEach(host.getSourceFiles(), file => { if (!isExternalOrCommonJsModule(file)) { mergeSymbolTable(globals, file.locals); } + mergeAugmentations = mergeAugmentations || file.moduleAugmentations.length > 0; }); + if (mergeAugmentations) { + // merge module augmentations. + // this needs to be done after global symbol table is initialized to make sure that all ambient modules are indexed + for (const file of host.getSourceFiles()) { + if (file.moduleAugmentations.length) { + for (const augmentation of file.moduleAugmentations) { + mergeModuleAugmentation(augmentation); + } + } + } + } + // Setup global builtins addToSymbolTable(globals, builtinGlobals, Diagnostics.Declaration_name_conflicts_with_built_in_global_identifier_0); @@ -16295,7 +16439,7 @@ namespace ts { return true; } else if (node.body === undefined) { - return grammarErrorAtPos(getSourceFile(node), node.end - 1, ";".length, Diagnostics._0_expected, "{"); + return grammarErrorAtPos(getSourceFileOfNode(node), node.end - 1, ";".length, Diagnostics._0_expected, "{"); } } diff --git a/src/compiler/declarationEmitter.ts b/src/compiler/declarationEmitter.ts index d0c5cbff48b..f0b4e05652c 100644 --- a/src/compiler/declarationEmitter.ts +++ b/src/compiler/declarationEmitter.ts @@ -54,6 +54,7 @@ namespace ts { let writer = createAndSetNewTextWriterWithSymbolWriter(); let enclosingDeclaration: Node; + let resultHasExternalModuleIndicator: boolean; let currentText: string; let currentLineMap: number[]; let currentIdentifiers: Map; @@ -101,6 +102,7 @@ namespace ts { }); } + resultHasExternalModuleIndicator = false; if (!isBundledEmit || !isExternalModule(sourceFile)) { noDeclare = false; emitSourceFile(sourceFile); @@ -139,6 +141,14 @@ namespace ts { allSourcesModuleElementDeclarationEmitInfo = allSourcesModuleElementDeclarationEmitInfo.concat(moduleElementDeclarationEmitInfo); moduleElementDeclarationEmitInfo = []; } + + if (!isBundledEmit && isExternalModule(sourceFile) && sourceFile.moduleAugmentations.length && !resultHasExternalModuleIndicator) { + // if file was external module with augmentations - this fact should be preserved in .d.ts as well. + // in case if we didn't write any external module specifiers in .d.ts we need to emit something + // that will force compiler to think that this file is an external module - 'export {}' is a reasonable choice here. + write("export {};"); + writeLine(); + } }); return { @@ -720,16 +730,25 @@ namespace ts { writer.writeLine(); } - function emitExternalModuleSpecifier(parent: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration) { + function emitExternalModuleSpecifier(parent: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration | ModuleDeclaration) { + // emitExternalModuleSpecifier is usualyl called when we emit something in the.d.ts file that will make it an external module (i.e. import/export declarations). + // the only case when it is not true is when we call it to emit correct name for module augmentation - d.ts files with just module augmentations are not considered + // external modules since they are indistingushable from script files with ambient modules. To fix this in such d.ts files we'll emit top level 'export {}' + // so compiler will treat them as external modules. + resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== SyntaxKind.ModuleDeclaration; let moduleSpecifier: Node; if (parent.kind === SyntaxKind.ImportEqualsDeclaration) { const node = parent as ImportEqualsDeclaration; moduleSpecifier = getExternalModuleImportEqualsDeclarationExpression(node); } + else if (parent.kind === SyntaxKind.ModuleDeclaration) { + moduleSpecifier = (parent).name; + } else { const node = parent as (ImportDeclaration | ExportDeclaration); moduleSpecifier = node.moduleSpecifier; } + if (moduleSpecifier.kind === SyntaxKind.StringLiteral && isBundledEmit && (compilerOptions.out || compilerOptions.outFile)) { const moduleName = getExternalModuleNameFromDeclaration(host, resolver, parent); if (moduleName) { @@ -789,7 +808,12 @@ namespace ts { else { write("module "); } - writeTextOfNode(currentText, node.name); + if (isExternalModuleAugmentation(node)) { + emitExternalModuleSpecifier(node); + } + else { + writeTextOfNode(currentText, node.name); + } while (node.body.kind !== SyntaxKind.ModuleBlock) { node = node.body; write("."); diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index a43f3534df6..4007d70e592 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1771,6 +1771,26 @@ "category": "Error", "code": 2660 }, + "Invalid module name in augmentation, module '{0}' cannot be found.": { + "category": "Error", + "code": 2661 + }, + "Module augmentation cannot introduce new names in the top level scope.": { + "category": "Error", + "code": 2662 + }, + "Exports are not permitted in module augmentations.": { + "category": "Error", + "code": 2663 + }, + "Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.": { + "category": "Error", + "code": 2664 + }, + "'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible.": { + "category": "Error", + "code": 2665 + }, "Import declaration '{0}' is using private name '{1}'.": { "category": "Error", "code": 4000 diff --git a/src/compiler/program.ts b/src/compiler/program.ts index d5c8b9f913f..fa0b4d61fb0 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -347,7 +347,24 @@ namespace ts { const currentDirectory = host.getCurrentDirectory(); const resolveModuleNamesWorker = host.resolveModuleNames ? ((moduleNames: string[], containingFile: string) => host.resolveModuleNames(moduleNames, containingFile)) - : ((moduleNames: string[], containingFile: string) => map(moduleNames, moduleName => resolveModuleName(moduleName, containingFile, options, host).resolvedModule)); + : ((moduleNames: string[], containingFile: string) => { + const resolvedModuleNames: ResolvedModule[] = []; + // resolveModuleName does not store any results between calls. + // lookup is a local cache to avoid resolving the same module name several times + const lookup: Map = {}; + for (const moduleName of moduleNames) { + let resolvedName: ResolvedModule; + if (hasProperty(lookup, moduleName)) { + resolvedName = lookup[moduleName]; + } + else { + resolvedName = resolveModuleName(moduleName, containingFile, options, host).resolvedModule; + lookup[moduleName] = resolvedName; + } + resolvedModuleNames.push(resolvedName); + } + return resolvedModuleNames; + }); const filesByName = createFileMap(); // stores 'filename -> file association' ignoring case @@ -484,15 +501,25 @@ namespace ts { return false; } - // check imports + // check imports and module augmentations collectExternalModuleReferences(newSourceFile); if (!arrayIsEqualTo(oldSourceFile.imports, newSourceFile.imports, moduleNameIsEqualTo)) { // imports has changed return false; } + if (!arrayIsEqualTo(oldSourceFile.moduleAugmentations, newSourceFile.moduleAugmentations, moduleNameIsEqualTo)) { + // moduleAugmentations has changed + return false; + } if (resolveModuleNamesWorker) { - const moduleNames = map(newSourceFile.imports, name => name.text); + const moduleNames: string[] = []; + for (const moduleName of newSourceFile.imports) { + moduleNames.push(moduleName.text); + } + for (const moduleName of newSourceFile.moduleAugmentations) { + moduleNames.push(moduleName.text); + } const resolutions = resolveModuleNamesWorker(moduleNames, getNormalizedAbsolutePath(newSourceFile.fileName, currentDirectory)); // ensure that module resolution results are still correct for (let i = 0; i < moduleNames.length; ++i) { @@ -887,59 +914,75 @@ namespace ts { } const isJavaScriptFile = isSourceFileJavaScript(file); + const isExternalModuleFile = isExternalModule(file); let imports: LiteralExpression[]; + let moduleAugmentations: LiteralExpression[]; + for (const node of file.statements) { - collect(node, /*allowRelativeModuleNames*/ true, /*collectOnlyRequireCalls*/ false); + collectModuleReferences(node, /*inAmbientModule*/ false); + if (isJavaScriptFile) { + collectRequireCalls(node); + } } file.imports = imports || emptyArray; + file.moduleAugmentations = moduleAugmentations || emptyArray; return; - function collect(node: Node, allowRelativeModuleNames: boolean, collectOnlyRequireCalls: boolean): void { - if (!collectOnlyRequireCalls) { - switch (node.kind) { - case SyntaxKind.ImportDeclaration: - case SyntaxKind.ImportEqualsDeclaration: - case SyntaxKind.ExportDeclaration: - let moduleNameExpr = getExternalModuleName(node); - if (!moduleNameExpr || moduleNameExpr.kind !== SyntaxKind.StringLiteral) { - break; - } - if (!(moduleNameExpr).text) { - break; - } - - if (allowRelativeModuleNames || !isExternalModuleNameRelative((moduleNameExpr).text)) { - (imports || (imports = [])).push(moduleNameExpr); - } + function collectModuleReferences(node: Node, inAmbientModule: boolean): void { + switch (node.kind) { + case SyntaxKind.ImportDeclaration: + case SyntaxKind.ImportEqualsDeclaration: + case SyntaxKind.ExportDeclaration: + let moduleNameExpr = getExternalModuleName(node); + if (!moduleNameExpr || moduleNameExpr.kind !== SyntaxKind.StringLiteral) { break; - case SyntaxKind.ModuleDeclaration: - if ((node).name.kind === SyntaxKind.StringLiteral && (node.flags & NodeFlags.Ambient || isDeclarationFile(file))) { - // TypeScript 1.0 spec (April 2014): 12.1.6 + } + if (!(moduleNameExpr).text) { + break; + } + + // TypeScript 1.0 spec (April 2014): 12.1.6 + // An ExternalImportDeclaration in an AmbientExternalModuleDeclaration may reference other external modules + // only through top - level external module names. Relative external module names are not permitted. + if (!inAmbientModule || !isExternalModuleNameRelative((moduleNameExpr).text)) { + (imports || (imports = [])).push(moduleNameExpr); + } + break; + case SyntaxKind.ModuleDeclaration: + if ((node).name.kind === SyntaxKind.StringLiteral && (inAmbientModule || node.flags & NodeFlags.Ambient || isDeclarationFile(file))) { + const moduleName = (node).name; + // Ambient module declarations can be interpreted as augmentations for some existing external modules. + // This will happen in two cases: + // - if current file is external module then module augmentation is a ambient module declaration defined in the top level scope + // - if current file is not external module then module augmentation is an ambient module declaration with non-relative module name + // immediately nested in top level ambient module declaration . + if (isExternalModuleFile || (inAmbientModule && !isExternalModuleNameRelative(moduleName.text))) { + (moduleAugmentations || (moduleAugmentations = [])).push(moduleName); + } + else if (!inAmbientModule) { // An AmbientExternalModuleDeclaration declares an external module. // This type of declaration is permitted only in the global module. // The StringLiteral must specify a top - level external module name. // Relative external module names are not permitted - forEachChild((node).body, node => { - // TypeScript 1.0 spec (April 2014): 12.1.6 - // An ExternalImportDeclaration in anAmbientExternalModuleDeclaration may reference other external modules - // only through top - level external module names. Relative external module names are not permitted. - collect(node, /*allowRelativeModuleNames*/ false, collectOnlyRequireCalls); - }); - } - break; - } - } - if (isJavaScriptFile) { - if (isRequireCall(node)) { - (imports || (imports = [])).push((node).arguments[0]); - } - else { - forEachChild(node, node => collect(node, allowRelativeModuleNames, /*collectOnlyRequireCalls*/ true)); - } + // NOTE: body of ambient module is always a module block + for (const statement of ((node).body).statements) { + collectModuleReferences(statement, /*inAmbientModule*/ true); + } + } + } + } + } + + function collectRequireCalls(node: Node): void { + if (isRequireCall(node)) { + (imports || (imports = [])).push((node).arguments[0]); + } + else { + forEachChild(node, collectRequireCalls); } } } @@ -1069,14 +1112,28 @@ namespace ts { function processImportedModules(file: SourceFile, basePath: string) { collectExternalModuleReferences(file); - if (file.imports.length) { + if (file.imports.length || file.moduleAugmentations.length) { file.resolvedModules = {}; - const moduleNames = map(file.imports, name => name.text); + const moduleNames: string[] = []; + for (const name of file.imports) { + moduleNames.push(name.text); + } + for (const name of file.moduleAugmentations) { + moduleNames.push(name.text); + } const resolutions = resolveModuleNamesWorker(moduleNames, getNormalizedAbsolutePath(file.fileName, currentDirectory)); - for (let i = 0; i < file.imports.length; ++i) { + for (let i = 0; i < moduleNames.length; ++i) { const resolution = resolutions[i]; setResolvedModule(file, moduleNames[i], resolution); - if (resolution && !options.noResolve) { + // add file to program only if: + // - resolution was successfull + // - noResolve is falsy + // - module name come from the list fo imports + const shouldAddFile = resolution && + !options.noResolve && + i < file.imports.length; + + if (shouldAddFile) { const importedFile = findSourceFile(resolution.resolvedFileName, toPath(resolution.resolvedFileName, currentDirectory, getCanonicalFileName), /*isDefaultLib*/ false, file, skipTrivia(file.text, file.imports[i].pos), file.imports[i].end); if (importedFile && resolution.isExternalLibraryImport) { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 24f70373a8a..88417ff7370 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1577,6 +1577,7 @@ namespace ts { // Content of this fiels should never be used directly - use getResolvedModuleFileName/setResolvedModuleFileName functions instead /* @internal */ resolvedModules: Map; /* @internal */ imports: LiteralExpression[]; + /* @internal */ moduleAugmentations: LiteralExpression[]; } export interface ScriptReferenceHost { @@ -1909,7 +1910,7 @@ namespace ts { isOptionalParameter(node: ParameterDeclaration): boolean; moduleExportsSomeValue(moduleReferenceExpression: Expression): boolean; isArgumentsLocalBinding(node: Identifier): boolean; - getExternalModuleFileFromDeclaration(declaration: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration): SourceFile; + getExternalModuleFileFromDeclaration(declaration: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration | ModuleDeclaration): SourceFile; } export const enum SymbolFlags { diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index c5a31992a80..bb0a6866a59 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -251,6 +251,26 @@ namespace ts { isCatchClauseVariableDeclaration(declaration); } + export function isAmbientModule(node: Node): boolean { + return node && node.kind === SyntaxKind.ModuleDeclaration && (node).name.kind === SyntaxKind.StringLiteral; + } + + export function isExternalModuleAugmentation(node: Node): boolean { + // external module augmentation is a ambient module declaration that is either: + // - defined in the top level scope and source file is an external module + // - defined inside ambient module declaration located in the top level scope and source file not an external module + if (!node || !isAmbientModule(node)) { + return false; + } + switch (node.parent.kind) { + case SyntaxKind.SourceFile: + return isExternalModule(node.parent); + case SyntaxKind.ModuleBlock: + return isAmbientModule(node.parent.parent) && !isExternalModule(node.parent.parent.parent); + } + return false; + } + // Gets the nearest enclosing block scope container that has the provided node // as a descendant, that is not the provided node. export function getEnclosingBlockScopeContainer(node: Node): Node { @@ -343,6 +363,7 @@ namespace ts { case SyntaxKind.FunctionDeclaration: case SyntaxKind.FunctionExpression: case SyntaxKind.MethodDeclaration: + case SyntaxKind.TypeAliasDeclaration: errorNode = (node).name; break; } @@ -1115,6 +1136,9 @@ namespace ts { if (node.kind === SyntaxKind.ExportDeclaration) { return (node).moduleSpecifier; } + if (node.kind === SyntaxKind.ModuleDeclaration && (node).name.kind === SyntaxKind.StringLiteral) { + return (node).name; + } } export function hasQuestionToken(node: Node) { diff --git a/src/services/services.ts b/src/services/services.ts index 0ffd1138cba..e5fcbc8fda4 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -810,6 +810,7 @@ namespace ts { public nameTable: Map; public resolvedModules: Map; public imports: LiteralExpression[]; + public moduleAugmentations: LiteralExpression[]; private namedDeclarations: Map; constructor(kind: SyntaxKind, pos: number, end: number) { diff --git a/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt b/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt index 0e508470b13..31e5e867fc9 100644 --- a/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(5,16): error TS2435: Ambient modules cannot be nested in other modules or namespaces. +tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(5,16): error TS2661: Invalid module name in augmentation, module 'ext' cannot be found. tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(10,22): error TS2307: Cannot find module 'ext'. @@ -9,7 +9,7 @@ tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(10,22): err declare module "ext" { ~~~~~ -!!! error TS2435: Ambient modules cannot be nested in other modules or namespaces. +!!! error TS2661: Invalid module name in augmentation, module 'ext' cannot be found. export class C { } } diff --git a/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.errors.txt b/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.errors.txt index 7e4ac795d0d..7a35b628fba 100644 --- a/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.errors.txt @@ -1,9 +1,12 @@ +tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts(2,5): error TS2665: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible. tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts(2,27): error TS2435: Ambient modules cannot be nested in other modules or namespaces. -==== tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts (1 errors) ==== +==== tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts (2 errors) ==== module M { export declare module "M" { } + ~~~~~~ +!!! error TS2665: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible. ~~~ !!! error TS2435: Ambient modules cannot be nested in other modules or namespaces. } \ No newline at end of file diff --git a/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.errors.txt b/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.errors.txt index e5905aaaf8f..3a4e28e41e9 100644 --- a/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.errors.txt @@ -1,7 +1,10 @@ -tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts(1,23): error TS2435: Ambient modules cannot be nested in other modules or namespaces. +tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts(1,1): error TS2665: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible. +tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts(1,23): error TS2661: Invalid module name in augmentation, module 'M' cannot be found. -==== tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts (1 errors) ==== +==== tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts (2 errors) ==== export declare module "M" { } + ~~~~~~ +!!! error TS2665: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible. ~~~ -!!! error TS2435: Ambient modules cannot be nested in other modules or namespaces. \ No newline at end of file +!!! error TS2661: Invalid module name in augmentation, module 'M' cannot be found. \ No newline at end of file diff --git a/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.errors.txt b/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.errors.txt index 34cfe02305f..9f60f5b648f 100644 --- a/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.errors.txt +++ b/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file. tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(1,20): error TS2307: Cannot find module 'externalModule'. -tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(2,16): error TS2435: Ambient modules cannot be nested in other modules or namespaces. +tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(2,16): error TS2661: Invalid module name in augmentation, module 'm1' cannot be found. tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(3,26): error TS2307: Cannot find module 'externalModule'. @@ -12,7 +12,7 @@ tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(3,26): er !!! error TS2307: Cannot find module 'externalModule'. declare module "m1" { ~~~~ -!!! error TS2435: Ambient modules cannot be nested in other modules or namespaces. +!!! error TS2661: Invalid module name in augmentation, module 'm1' cannot be found. import im2 = require("externalModule"); ~~~~~~~~~~~~~~~~ !!! error TS2307: Cannot find module 'externalModule'. diff --git a/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt index bc4d8e903ad..2b5112e1ce2 100644 --- a/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt @@ -1,9 +1,9 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. -tests/cases/compiler/a.js(1,1): error TS8008: 'type aliases' can only be used in a .ts file. +tests/cases/compiler/a.js(1,6): error TS8008: 'type aliases' can only be used in a .ts file. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== type a = b; - ~~~~~~~~~~~ + ~ !!! error TS8008: 'type aliases' can only be used in a .ts file. \ No newline at end of file diff --git a/tests/baselines/reference/moduleAugmentationCollidingNamesInAugmentation1.errors.txt b/tests/baselines/reference/moduleAugmentationCollidingNamesInAugmentation1.errors.txt new file mode 100644 index 00000000000..1caeb8d5b5d --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationCollidingNamesInAugmentation1.errors.txt @@ -0,0 +1,40 @@ +tests/cases/compiler/map1.ts(7,15): error TS2662: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/map2.ts(6,15): error TS2662: Module augmentation cannot introduce new names in the top level scope. + + +==== tests/cases/compiler/map1.ts (1 errors) ==== + + import { Observable } from "./observable" + + (Observable.prototype).map = function() { } + + declare module "./observable" { + interface I {x0} + ~ +!!! error TS2662: Module augmentation cannot introduce new names in the top level scope. + } + +==== tests/cases/compiler/map2.ts (1 errors) ==== + import { Observable } from "./observable" + + (Observable.prototype).map = function() { } + + declare module "./observable" { + interface I {x1} + ~ +!!! error TS2662: Module augmentation cannot introduce new names in the top level scope. + } + + +==== tests/cases/compiler/observable.ts (0 errors) ==== + export declare class Observable { + filter(pred: (e:T) => boolean): Observable; + } + +==== tests/cases/compiler/main.ts (0 errors) ==== + import { Observable } from "./observable" + import "./map1"; + import "./map2"; + + let x: Observable; + \ No newline at end of file diff --git a/tests/baselines/reference/moduleAugmentationCollidingNamesInAugmentation1.js b/tests/baselines/reference/moduleAugmentationCollidingNamesInAugmentation1.js new file mode 100644 index 00000000000..60ba2217349 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationCollidingNamesInAugmentation1.js @@ -0,0 +1,75 @@ +//// [tests/cases/compiler/moduleAugmentationCollidingNamesInAugmentation1.ts] //// + +//// [map1.ts] + +import { Observable } from "./observable" + +(Observable.prototype).map = function() { } + +declare module "./observable" { + interface I {x0} +} + +//// [map2.ts] +import { Observable } from "./observable" + +(Observable.prototype).map = function() { } + +declare module "./observable" { + interface I {x1} +} + + +//// [observable.ts] +export declare class Observable { + filter(pred: (e:T) => boolean): Observable; +} + +//// [main.ts] +import { Observable } from "./observable" +import "./map1"; +import "./map2"; + +let x: Observable; + + +//// [observable.js] +define(["require", "exports"], function (require, exports) { + "use strict"; +}); +//// [map1.js] +define(["require", "exports", "./observable"], function (require, exports, observable_1) { + "use strict"; + observable_1.Observable.prototype.map = function () { }; +}); +//// [map2.js] +define(["require", "exports", "./observable"], function (require, exports, observable_1) { + "use strict"; + observable_1.Observable.prototype.map = function () { }; +}); +//// [main.js] +define(["require", "exports", "./map1", "./map2"], function (require, exports) { + "use strict"; + var x; +}); + + +//// [observable.d.ts] +export declare class Observable { + filter(pred: (e: T) => boolean): Observable; +} +//// [map1.d.ts] +declare module "./observable" { + interface I { + x0: any; + } +} +export {}; +//// [map2.d.ts] +declare module "./observable" { + interface I { + x1: any; + } +} +export {}; +//// [main.d.ts] diff --git a/tests/baselines/reference/moduleAugmentationDeclarationEmit1.js b/tests/baselines/reference/moduleAugmentationDeclarationEmit1.js new file mode 100644 index 00000000000..589d0f506e9 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationDeclarationEmit1.js @@ -0,0 +1,68 @@ +//// [tests/cases/compiler/moduleAugmentationDeclarationEmit1.ts] //// + +//// [map.ts] + +import { Observable } from "./observable" + +(Observable.prototype).map = function() { } + +declare module "./observable" { + interface Observable { + map(proj: (e:T) => U): Observable + } + namespace Observable { + let someAnotherValue: number; + } +} + +//// [observable.ts] +export declare class Observable { + filter(pred: (e:T) => boolean): Observable; +} + +export namespace Observable { + let someValue: number; +} + + +//// [main.ts] +import { Observable } from "./observable" +import "./map"; + +let x: Observable; +let y = x.map(x => x + 1); + +//// [observable.js] +"use strict"; +var Observable; +(function (Observable) { + var someValue; +})(Observable = exports.Observable || (exports.Observable = {})); +//// [map.js] +"use strict"; +var observable_1 = require("./observable"); +observable_1.Observable.prototype.map = function () { }; +//// [main.js] +"use strict"; +require("./map"); +var x; +var y = x.map(function (x) { return x + 1; }); + + +//// [observable.d.ts] +export declare class Observable { + filter(pred: (e: T) => boolean): Observable; +} +export declare namespace Observable { +} +//// [map.d.ts] +declare module "./observable" { + interface Observable { + map(proj: (e: T) => U): Observable; + } + namespace Observable { + let someAnotherValue: number; + } +} +export {}; +//// [main.d.ts] diff --git a/tests/baselines/reference/moduleAugmentationDeclarationEmit1.symbols b/tests/baselines/reference/moduleAugmentationDeclarationEmit1.symbols new file mode 100644 index 00000000000..eca44ec774d --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationDeclarationEmit1.symbols @@ -0,0 +1,73 @@ +=== tests/cases/compiler/map.ts === + +import { Observable } from "./observable" +>Observable : Symbol(Observable, Decl(map.ts, 1, 8)) + +(Observable.prototype).map = function() { } +>Observable.prototype : Symbol(Observable.prototype) +>Observable : Symbol(Observable, Decl(map.ts, 1, 8)) +>prototype : Symbol(Observable.prototype) + +declare module "./observable" { + interface Observable { +>Observable : Symbol(Observable, Decl(observable.ts, 0, 0), Decl(observable.ts, 2, 1), Decl(map.ts, 5, 31), Decl(map.ts, 8, 5)) +>T : Symbol(T, Decl(observable.ts, 0, 32), Decl(map.ts, 6, 25)) + + map(proj: (e:T) => U): Observable +>map : Symbol(map, Decl(map.ts, 6, 29)) +>U : Symbol(U, Decl(map.ts, 7, 12)) +>proj : Symbol(proj, Decl(map.ts, 7, 15)) +>e : Symbol(e, Decl(map.ts, 7, 22)) +>T : Symbol(T, Decl(observable.ts, 0, 32), Decl(map.ts, 6, 25)) +>U : Symbol(U, Decl(map.ts, 7, 12)) +>Observable : Symbol(Observable, Decl(observable.ts, 0, 0), Decl(observable.ts, 2, 1), Decl(map.ts, 5, 31), Decl(map.ts, 8, 5)) +>U : Symbol(U, Decl(map.ts, 7, 12)) + } + namespace Observable { +>Observable : Symbol(Observable, Decl(observable.ts, 0, 0), Decl(observable.ts, 2, 1), Decl(map.ts, 5, 31), Decl(map.ts, 8, 5)) + + let someAnotherValue: number; +>someAnotherValue : Symbol(someAnotherValue, Decl(map.ts, 10, 11)) + } +} + +=== tests/cases/compiler/observable.ts === +export declare class Observable { +>Observable : Symbol(Observable, Decl(observable.ts, 0, 0), Decl(observable.ts, 2, 1), Decl(map.ts, 5, 31), Decl(map.ts, 8, 5)) +>T : Symbol(T, Decl(observable.ts, 0, 32), Decl(map.ts, 6, 25)) + + filter(pred: (e:T) => boolean): Observable; +>filter : Symbol(filter, Decl(observable.ts, 0, 36)) +>pred : Symbol(pred, Decl(observable.ts, 1, 11)) +>e : Symbol(e, Decl(observable.ts, 1, 18)) +>T : Symbol(T, Decl(observable.ts, 0, 32), Decl(map.ts, 6, 25)) +>Observable : Symbol(Observable, Decl(observable.ts, 0, 0), Decl(observable.ts, 2, 1), Decl(map.ts, 5, 31), Decl(map.ts, 8, 5)) +>T : Symbol(T, Decl(observable.ts, 0, 32), Decl(map.ts, 6, 25)) +} + +export namespace Observable { +>Observable : Symbol(Observable, Decl(observable.ts, 0, 0), Decl(observable.ts, 2, 1), Decl(map.ts, 5, 31), Decl(map.ts, 8, 5)) + + let someValue: number; +>someValue : Symbol(someValue, Decl(observable.ts, 5, 7)) +} + + +=== tests/cases/compiler/main.ts === +import { Observable } from "./observable" +>Observable : Symbol(Observable, Decl(main.ts, 0, 8)) + +import "./map"; + +let x: Observable; +>x : Symbol(x, Decl(main.ts, 3, 3)) +>Observable : Symbol(Observable, Decl(main.ts, 0, 8)) + +let y = x.map(x => x + 1); +>y : Symbol(y, Decl(main.ts, 4, 3)) +>x.map : Symbol(Observable.map, Decl(map.ts, 6, 29)) +>x : Symbol(x, Decl(main.ts, 3, 3)) +>map : Symbol(Observable.map, Decl(map.ts, 6, 29)) +>x : Symbol(x, Decl(main.ts, 4, 14)) +>x : Symbol(x, Decl(main.ts, 4, 14)) + diff --git a/tests/baselines/reference/moduleAugmentationDeclarationEmit1.types b/tests/baselines/reference/moduleAugmentationDeclarationEmit1.types new file mode 100644 index 00000000000..fad835029c2 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationDeclarationEmit1.types @@ -0,0 +1,83 @@ +=== tests/cases/compiler/map.ts === + +import { Observable } from "./observable" +>Observable : typeof Observable + +(Observable.prototype).map = function() { } +>(Observable.prototype).map = function() { } : () => void +>(Observable.prototype).map : any +>(Observable.prototype) : any +>Observable.prototype : any +>Observable.prototype : Observable +>Observable : typeof Observable +>prototype : Observable +>map : any +>function() { } : () => void + +declare module "./observable" { + interface Observable { +>Observable : Observable +>T : T + + map(proj: (e:T) => U): Observable +>map : (proj: (e: T) => U) => Observable +>U : U +>proj : (e: T) => U +>e : T +>T : T +>U : U +>Observable : Observable +>U : U + } + namespace Observable { +>Observable : typeof Observable + + let someAnotherValue: number; +>someAnotherValue : number + } +} + +=== tests/cases/compiler/observable.ts === +export declare class Observable { +>Observable : Observable +>T : T + + filter(pred: (e:T) => boolean): Observable; +>filter : (pred: (e: T) => boolean) => Observable +>pred : (e: T) => boolean +>e : T +>T : T +>Observable : Observable +>T : T +} + +export namespace Observable { +>Observable : typeof Observable + + let someValue: number; +>someValue : number +} + + +=== tests/cases/compiler/main.ts === +import { Observable } from "./observable" +>Observable : typeof Observable + +import "./map"; + +let x: Observable; +>x : Observable +>Observable : Observable + +let y = x.map(x => x + 1); +>y : Observable +>x.map(x => x + 1) : Observable +>x.map : (proj: (e: number) => U) => Observable +>x : Observable +>map : (proj: (e: number) => U) => Observable +>x => x + 1 : (x: number) => number +>x : number +>x + 1 : number +>x : number +>1 : number + diff --git a/tests/baselines/reference/moduleAugmentationDeclarationEmit2.js b/tests/baselines/reference/moduleAugmentationDeclarationEmit2.js new file mode 100644 index 00000000000..d8fd65a1464 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationDeclarationEmit2.js @@ -0,0 +1,73 @@ +//// [tests/cases/compiler/moduleAugmentationDeclarationEmit2.ts] //// + +//// [map.ts] + +import { Observable } from "./observable" + +(Observable.prototype).map = function() { } + +declare module "./observable" { + interface Observable { + map(proj: (e:T) => U): Observable + } + namespace Observable { + let someAnotherValue: string; + } +} + +//// [observable.ts] +export declare class Observable { + filter(pred: (e:T) => boolean): Observable; +} + +export namespace Observable { + export let someValue: number; +} + + +//// [main.ts] +import { Observable } from "./observable" +import "./map"; + +let x: Observable; +let y = x.map(x => x + 1); +let z1 = Observable.someValue.toFixed(); +let z2 = Observable.someAnotherValue.toLowerCase(); + +//// [observable.js] +"use strict"; +var Observable; +(function (Observable) { +})(Observable = exports.Observable || (exports.Observable = {})); +//// [map.js] +"use strict"; +var observable_1 = require("./observable"); +observable_1.Observable.prototype.map = function () { }; +//// [main.js] +"use strict"; +var observable_1 = require("./observable"); +require("./map"); +var x; +var y = x.map(function (x) { return x + 1; }); +var z1 = observable_1.Observable.someValue.toFixed(); +var z2 = observable_1.Observable.someAnotherValue.toLowerCase(); + + +//// [observable.d.ts] +export declare class Observable { + filter(pred: (e: T) => boolean): Observable; +} +export declare namespace Observable { + let someValue: number; +} +//// [map.d.ts] +declare module "./observable" { + interface Observable { + map(proj: (e: T) => U): Observable; + } + namespace Observable { + let someAnotherValue: string; + } +} +export {}; +//// [main.d.ts] diff --git a/tests/baselines/reference/moduleAugmentationDeclarationEmit2.symbols b/tests/baselines/reference/moduleAugmentationDeclarationEmit2.symbols new file mode 100644 index 00000000000..d0f25f693fe --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationDeclarationEmit2.symbols @@ -0,0 +1,89 @@ +=== tests/cases/compiler/map.ts === + +import { Observable } from "./observable" +>Observable : Symbol(Observable, Decl(map.ts, 1, 8)) + +(Observable.prototype).map = function() { } +>Observable.prototype : Symbol(Observable.prototype) +>Observable : Symbol(Observable, Decl(map.ts, 1, 8)) +>prototype : Symbol(Observable.prototype) + +declare module "./observable" { + interface Observable { +>Observable : Symbol(Observable, Decl(observable.ts, 0, 0), Decl(observable.ts, 2, 1), Decl(map.ts, 5, 31), Decl(map.ts, 8, 5)) +>T : Symbol(T, Decl(observable.ts, 0, 32), Decl(map.ts, 6, 25)) + + map(proj: (e:T) => U): Observable +>map : Symbol(map, Decl(map.ts, 6, 29)) +>U : Symbol(U, Decl(map.ts, 7, 12)) +>proj : Symbol(proj, Decl(map.ts, 7, 15)) +>e : Symbol(e, Decl(map.ts, 7, 22)) +>T : Symbol(T, Decl(observable.ts, 0, 32), Decl(map.ts, 6, 25)) +>U : Symbol(U, Decl(map.ts, 7, 12)) +>Observable : Symbol(Observable, Decl(observable.ts, 0, 0), Decl(observable.ts, 2, 1), Decl(map.ts, 5, 31), Decl(map.ts, 8, 5)) +>U : Symbol(U, Decl(map.ts, 7, 12)) + } + namespace Observable { +>Observable : Symbol(Observable, Decl(observable.ts, 0, 0), Decl(observable.ts, 2, 1), Decl(map.ts, 5, 31), Decl(map.ts, 8, 5)) + + let someAnotherValue: string; +>someAnotherValue : Symbol(someAnotherValue, Decl(map.ts, 10, 11)) + } +} + +=== tests/cases/compiler/observable.ts === +export declare class Observable { +>Observable : Symbol(Observable, Decl(observable.ts, 0, 0), Decl(observable.ts, 2, 1), Decl(map.ts, 5, 31), Decl(map.ts, 8, 5)) +>T : Symbol(T, Decl(observable.ts, 0, 32), Decl(map.ts, 6, 25)) + + filter(pred: (e:T) => boolean): Observable; +>filter : Symbol(filter, Decl(observable.ts, 0, 36)) +>pred : Symbol(pred, Decl(observable.ts, 1, 11)) +>e : Symbol(e, Decl(observable.ts, 1, 18)) +>T : Symbol(T, Decl(observable.ts, 0, 32), Decl(map.ts, 6, 25)) +>Observable : Symbol(Observable, Decl(observable.ts, 0, 0), Decl(observable.ts, 2, 1), Decl(map.ts, 5, 31), Decl(map.ts, 8, 5)) +>T : Symbol(T, Decl(observable.ts, 0, 32), Decl(map.ts, 6, 25)) +} + +export namespace Observable { +>Observable : Symbol(Observable, Decl(observable.ts, 0, 0), Decl(observable.ts, 2, 1), Decl(map.ts, 5, 31), Decl(map.ts, 8, 5)) + + export let someValue: number; +>someValue : Symbol(someValue, Decl(observable.ts, 5, 14)) +} + + +=== tests/cases/compiler/main.ts === +import { Observable } from "./observable" +>Observable : Symbol(Observable, Decl(main.ts, 0, 8)) + +import "./map"; + +let x: Observable; +>x : Symbol(x, Decl(main.ts, 3, 3)) +>Observable : Symbol(Observable, Decl(main.ts, 0, 8)) + +let y = x.map(x => x + 1); +>y : Symbol(y, Decl(main.ts, 4, 3)) +>x.map : Symbol(Observable.map, Decl(map.ts, 6, 29)) +>x : Symbol(x, Decl(main.ts, 3, 3)) +>map : Symbol(Observable.map, Decl(map.ts, 6, 29)) +>x : Symbol(x, Decl(main.ts, 4, 14)) +>x : Symbol(x, Decl(main.ts, 4, 14)) + +let z1 = Observable.someValue.toFixed(); +>z1 : Symbol(z1, Decl(main.ts, 5, 3)) +>Observable.someValue.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) +>Observable.someValue : Symbol(Observable.someValue, Decl(observable.ts, 5, 14)) +>Observable : Symbol(Observable, Decl(main.ts, 0, 8)) +>someValue : Symbol(Observable.someValue, Decl(observable.ts, 5, 14)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) + +let z2 = Observable.someAnotherValue.toLowerCase(); +>z2 : Symbol(z2, Decl(main.ts, 6, 3)) +>Observable.someAnotherValue.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) +>Observable.someAnotherValue : Symbol(Observable.someAnotherValue, Decl(map.ts, 10, 11)) +>Observable : Symbol(Observable, Decl(main.ts, 0, 8)) +>someAnotherValue : Symbol(Observable.someAnotherValue, Decl(map.ts, 10, 11)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) + diff --git a/tests/baselines/reference/moduleAugmentationDeclarationEmit2.types b/tests/baselines/reference/moduleAugmentationDeclarationEmit2.types new file mode 100644 index 00000000000..85e4ead2ac0 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationDeclarationEmit2.types @@ -0,0 +1,101 @@ +=== tests/cases/compiler/map.ts === + +import { Observable } from "./observable" +>Observable : typeof Observable + +(Observable.prototype).map = function() { } +>(Observable.prototype).map = function() { } : () => void +>(Observable.prototype).map : any +>(Observable.prototype) : any +>Observable.prototype : any +>Observable.prototype : Observable +>Observable : typeof Observable +>prototype : Observable +>map : any +>function() { } : () => void + +declare module "./observable" { + interface Observable { +>Observable : Observable +>T : T + + map(proj: (e:T) => U): Observable +>map : (proj: (e: T) => U) => Observable +>U : U +>proj : (e: T) => U +>e : T +>T : T +>U : U +>Observable : Observable +>U : U + } + namespace Observable { +>Observable : typeof Observable + + let someAnotherValue: string; +>someAnotherValue : string + } +} + +=== tests/cases/compiler/observable.ts === +export declare class Observable { +>Observable : Observable +>T : T + + filter(pred: (e:T) => boolean): Observable; +>filter : (pred: (e: T) => boolean) => Observable +>pred : (e: T) => boolean +>e : T +>T : T +>Observable : Observable +>T : T +} + +export namespace Observable { +>Observable : typeof Observable + + export let someValue: number; +>someValue : number +} + + +=== tests/cases/compiler/main.ts === +import { Observable } from "./observable" +>Observable : typeof Observable + +import "./map"; + +let x: Observable; +>x : Observable +>Observable : Observable + +let y = x.map(x => x + 1); +>y : Observable +>x.map(x => x + 1) : Observable +>x.map : (proj: (e: number) => U) => Observable +>x : Observable +>map : (proj: (e: number) => U) => Observable +>x => x + 1 : (x: number) => number +>x : number +>x + 1 : number +>x : number +>1 : number + +let z1 = Observable.someValue.toFixed(); +>z1 : string +>Observable.someValue.toFixed() : string +>Observable.someValue.toFixed : (fractionDigits?: number) => string +>Observable.someValue : number +>Observable : typeof Observable +>someValue : number +>toFixed : (fractionDigits?: number) => string + +let z2 = Observable.someAnotherValue.toLowerCase(); +>z2 : string +>Observable.someAnotherValue.toLowerCase() : string +>Observable.someAnotherValue.toLowerCase : () => string +>Observable.someAnotherValue : string +>Observable : typeof Observable +>someAnotherValue : string +>toLowerCase : () => string + diff --git a/tests/baselines/reference/moduleAugmentationDisallowedExtensions.errors.txt b/tests/baselines/reference/moduleAugmentationDisallowedExtensions.errors.txt new file mode 100644 index 00000000000..a0140f43cd2 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationDisallowedExtensions.errors.txt @@ -0,0 +1,95 @@ +tests/cases/compiler/x.ts(7,9): error TS2662: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/x.ts(8,9): error TS2662: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/x.ts(9,11): error TS2662: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/x.ts(10,10): error TS2662: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/x.ts(10,14): error TS2662: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/x.ts(11,15): error TS2662: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/x.ts(12,15): error TS2662: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/x.ts(15,11): error TS2662: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/x.ts(16,14): error TS2662: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/x.ts(17,10): error TS2662: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/x.ts(18,5): error TS2664: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. +tests/cases/compiler/x.ts(18,26): error TS2307: Cannot find module './x0'. +tests/cases/compiler/x.ts(19,5): error TS2664: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. +tests/cases/compiler/x.ts(19,21): error TS2307: Cannot find module './x0'. +tests/cases/compiler/x.ts(20,5): error TS2663: Exports are not permitted in module augmentations. +tests/cases/compiler/x.ts(20,19): error TS2307: Cannot find module './x0'. +tests/cases/compiler/x.ts(21,5): error TS2663: Exports are not permitted in module augmentations. +tests/cases/compiler/x.ts(21,21): error TS2307: Cannot find module './x0'. + + +==== tests/cases/compiler/x0.ts (0 errors) ==== + + export let a = 1; + +==== tests/cases/compiler/x.ts (18 errors) ==== + + namespace N1 { + export let x = 1; + } + + declare module "./observable" { + var x: number; + ~ +!!! error TS2662: Module augmentation cannot introduce new names in the top level scope. + let y: number; + ~ +!!! error TS2662: Module augmentation cannot introduce new names in the top level scope. + const z: number; + ~ +!!! error TS2662: Module augmentation cannot introduce new names in the top level scope. + let {x1, y1}: {x1: number, y1: string} + ~~ +!!! error TS2662: Module augmentation cannot introduce new names in the top level scope. + ~~ +!!! error TS2662: Module augmentation cannot introduce new names in the top level scope. + interface A { x } + ~ +!!! error TS2662: Module augmentation cannot introduce new names in the top level scope. + namespace N { + ~ +!!! error TS2662: Module augmentation cannot introduce new names in the top level scope. + export class C {} + } + class Cls {} + ~~~ +!!! error TS2662: Module augmentation cannot introduce new names in the top level scope. + function foo(): number; + ~~~ +!!! error TS2662: Module augmentation cannot introduce new names in the top level scope. + type T = number; + ~ +!!! error TS2662: Module augmentation cannot introduce new names in the top level scope. + import * as all from "./x0"; + ~~~~~~ +!!! error TS2664: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. + ~~~~~~ +!!! error TS2307: Cannot find module './x0'. + import {a} from "./x0"; + ~~~~~~ +!!! error TS2664: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. + ~~~~~~ +!!! error TS2307: Cannot find module './x0'. + export * from "./x0"; + ~~~~~~ +!!! error TS2663: Exports are not permitted in module augmentations. + ~~~~~~ +!!! error TS2307: Cannot find module './x0'. + export {a} from "./x0"; + ~~~~~~ +!!! error TS2663: Exports are not permitted in module augmentations. + ~~~~~~ +!!! error TS2307: Cannot find module './x0'. + } + export {} + +==== tests/cases/compiler/observable.ts (0 errors) ==== + export declare class Observable { + filter(pred: (e:T) => boolean): Observable; + } + export var x = 1; + +==== tests/cases/compiler/main.ts (0 errors) ==== + import { Observable } from "./observable" + import "./x"; + \ No newline at end of file diff --git a/tests/baselines/reference/moduleAugmentationDisallowedExtensions.js b/tests/baselines/reference/moduleAugmentationDisallowedExtensions.js new file mode 100644 index 00000000000..f5378b7c5bd --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationDisallowedExtensions.js @@ -0,0 +1,57 @@ +//// [tests/cases/compiler/moduleAugmentationDisallowedExtensions.ts] //// + +//// [x0.ts] + +export let a = 1; + +//// [x.ts] + +namespace N1 { + export let x = 1; +} + +declare module "./observable" { + var x: number; + let y: number; + const z: number; + let {x1, y1}: {x1: number, y1: string} + interface A { x } + namespace N { + export class C {} + } + class Cls {} + function foo(): number; + type T = number; + import * as all from "./x0"; + import {a} from "./x0"; + export * from "./x0"; + export {a} from "./x0"; +} +export {} + +//// [observable.ts] +export declare class Observable { + filter(pred: (e:T) => boolean): Observable; +} +export var x = 1; + +//// [main.ts] +import { Observable } from "./observable" +import "./x"; + + +//// [x0.js] +"use strict"; +exports.a = 1; +//// [x.js] +"use strict"; +var N1; +(function (N1) { + N1.x = 1; +})(N1 || (N1 = {})); +//// [observable.js] +"use strict"; +exports.x = 1; +//// [main.js] +"use strict"; +require("./x"); diff --git a/tests/baselines/reference/moduleAugmentationExtendAmbientModule1.js b/tests/baselines/reference/moduleAugmentationExtendAmbientModule1.js new file mode 100644 index 00000000000..0a8b1b0b4b5 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationExtendAmbientModule1.js @@ -0,0 +1,45 @@ +//// [tests/cases/compiler/moduleAugmentationExtendAmbientModule1.ts] //// + +//// [map.ts] + +import { Observable } from "observable" + +(Observable.prototype).map = function() { } + +declare module "observable" { + interface Observable { + map(proj: (e:T) => U): Observable + } + namespace Observable { + let someAnotherValue: number; + } +} + +//// [observable.d.ts] +declare module "observable" { + class Observable { + filter(pred: (e:T) => boolean): Observable; + } + namespace Observable { + let someValue: number; + } +} + +//// [main.ts] + +/// +import { Observable } from "observable" +import "./map"; + +let x: Observable; +let y = x.map(x => x + 1); + +//// [map.js] +"use strict"; +var observable_1 = require("observable"); +observable_1.Observable.prototype.map = function () { }; +//// [main.js] +"use strict"; +require("./map"); +var x; +var y = x.map(function (x) { return x + 1; }); diff --git a/tests/baselines/reference/moduleAugmentationExtendAmbientModule1.symbols b/tests/baselines/reference/moduleAugmentationExtendAmbientModule1.symbols new file mode 100644 index 00000000000..a471651da0b --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationExtendAmbientModule1.symbols @@ -0,0 +1,75 @@ +=== tests/cases/compiler/main.ts === + +/// +import { Observable } from "observable" +>Observable : Symbol(Observable, Decl(main.ts, 2, 8)) + +import "./map"; + +let x: Observable; +>x : Symbol(x, Decl(main.ts, 5, 3)) +>Observable : Symbol(Observable, Decl(main.ts, 2, 8)) + +let y = x.map(x => x + 1); +>y : Symbol(y, Decl(main.ts, 6, 3)) +>x.map : Symbol(Observable.map, Decl(map.ts, 6, 29)) +>x : Symbol(x, Decl(main.ts, 5, 3)) +>map : Symbol(Observable.map, Decl(map.ts, 6, 29)) +>x : Symbol(x, Decl(main.ts, 6, 14)) +>x : Symbol(x, Decl(main.ts, 6, 14)) + +=== tests/cases/compiler/map.ts === + +import { Observable } from "observable" +>Observable : Symbol(Observable, Decl(map.ts, 1, 8)) + +(Observable.prototype).map = function() { } +>Observable.prototype : Symbol(Observable.prototype) +>Observable : Symbol(Observable, Decl(map.ts, 1, 8)) +>prototype : Symbol(Observable.prototype) + +declare module "observable" { + interface Observable { +>Observable : Symbol(Observable, Decl(observable.d.ts, 0, 29), Decl(observable.d.ts, 3, 5), Decl(map.ts, 5, 29), Decl(map.ts, 8, 5)) +>T : Symbol(T, Decl(observable.d.ts, 1, 21), Decl(map.ts, 6, 25)) + + map(proj: (e:T) => U): Observable +>map : Symbol(map, Decl(map.ts, 6, 29)) +>U : Symbol(U, Decl(map.ts, 7, 12)) +>proj : Symbol(proj, Decl(map.ts, 7, 15)) +>e : Symbol(e, Decl(map.ts, 7, 22)) +>T : Symbol(T, Decl(observable.d.ts, 1, 21), Decl(map.ts, 6, 25)) +>U : Symbol(U, Decl(map.ts, 7, 12)) +>Observable : Symbol(Observable, Decl(observable.d.ts, 0, 29), Decl(observable.d.ts, 3, 5), Decl(map.ts, 5, 29), Decl(map.ts, 8, 5)) +>U : Symbol(U, Decl(map.ts, 7, 12)) + } + namespace Observable { +>Observable : Symbol(Observable, Decl(observable.d.ts, 0, 29), Decl(observable.d.ts, 3, 5), Decl(map.ts, 5, 29), Decl(map.ts, 8, 5)) + + let someAnotherValue: number; +>someAnotherValue : Symbol(someAnotherValue, Decl(map.ts, 10, 11)) + } +} + +=== tests/cases/compiler/observable.d.ts === +declare module "observable" { + class Observable { +>Observable : Symbol(Observable, Decl(observable.d.ts, 0, 29), Decl(observable.d.ts, 3, 5), Decl(map.ts, 5, 29), Decl(map.ts, 8, 5)) +>T : Symbol(T, Decl(observable.d.ts, 1, 21), Decl(map.ts, 6, 25)) + + filter(pred: (e:T) => boolean): Observable; +>filter : Symbol(filter, Decl(observable.d.ts, 1, 25)) +>pred : Symbol(pred, Decl(observable.d.ts, 2, 15)) +>e : Symbol(e, Decl(observable.d.ts, 2, 22)) +>T : Symbol(T, Decl(observable.d.ts, 1, 21), Decl(map.ts, 6, 25)) +>Observable : Symbol(Observable, Decl(observable.d.ts, 0, 29), Decl(observable.d.ts, 3, 5), Decl(map.ts, 5, 29), Decl(map.ts, 8, 5)) +>T : Symbol(T, Decl(observable.d.ts, 1, 21), Decl(map.ts, 6, 25)) + } + namespace Observable { +>Observable : Symbol(Observable, Decl(observable.d.ts, 0, 29), Decl(observable.d.ts, 3, 5), Decl(map.ts, 5, 29), Decl(map.ts, 8, 5)) + + let someValue: number; +>someValue : Symbol(someValue, Decl(observable.d.ts, 5, 11)) + } +} + diff --git a/tests/baselines/reference/moduleAugmentationExtendAmbientModule1.types b/tests/baselines/reference/moduleAugmentationExtendAmbientModule1.types new file mode 100644 index 00000000000..e6ee79e3585 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationExtendAmbientModule1.types @@ -0,0 +1,85 @@ +=== tests/cases/compiler/main.ts === + +/// +import { Observable } from "observable" +>Observable : typeof Observable + +import "./map"; + +let x: Observable; +>x : Observable +>Observable : Observable + +let y = x.map(x => x + 1); +>y : Observable +>x.map(x => x + 1) : Observable +>x.map : (proj: (e: number) => U) => Observable +>x : Observable +>map : (proj: (e: number) => U) => Observable +>x => x + 1 : (x: number) => number +>x : number +>x + 1 : number +>x : number +>1 : number + +=== tests/cases/compiler/map.ts === + +import { Observable } from "observable" +>Observable : typeof Observable + +(Observable.prototype).map = function() { } +>(Observable.prototype).map = function() { } : () => void +>(Observable.prototype).map : any +>(Observable.prototype) : any +>Observable.prototype : any +>Observable.prototype : Observable +>Observable : typeof Observable +>prototype : Observable +>map : any +>function() { } : () => void + +declare module "observable" { + interface Observable { +>Observable : Observable +>T : T + + map(proj: (e:T) => U): Observable +>map : (proj: (e: T) => U) => Observable +>U : U +>proj : (e: T) => U +>e : T +>T : T +>U : U +>Observable : Observable +>U : U + } + namespace Observable { +>Observable : typeof Observable + + let someAnotherValue: number; +>someAnotherValue : number + } +} + +=== tests/cases/compiler/observable.d.ts === +declare module "observable" { + class Observable { +>Observable : Observable +>T : T + + filter(pred: (e:T) => boolean): Observable; +>filter : (pred: (e: T) => boolean) => Observable +>pred : (e: T) => boolean +>e : T +>T : T +>Observable : Observable +>T : T + } + namespace Observable { +>Observable : typeof Observable + + let someValue: number; +>someValue : number + } +} + diff --git a/tests/baselines/reference/moduleAugmentationExtendAmbientModule2.js b/tests/baselines/reference/moduleAugmentationExtendAmbientModule2.js new file mode 100644 index 00000000000..733f88e6129 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationExtendAmbientModule2.js @@ -0,0 +1,65 @@ +//// [tests/cases/compiler/moduleAugmentationExtendAmbientModule2.ts] //// + +//// [map.ts] + +import { Observable } from "observable" + +(Observable.prototype).map = function() { } + +declare module "observable" { + interface Observable { + map(proj: (e:T) => U): Observable + } + namespace Observable { + let someAnotherValue: string; + } +} + +//// [observable.d.ts] +declare module "observable" { + class Observable { + filter(pred: (e:T) => boolean): Observable; + } + namespace Observable { + export let someValue: number; + } +} + +//// [main.ts] + +/// +import { Observable } from "observable" +import "./map"; + +let x: Observable; +let y = x.map(x => x + 1); +let z1 = Observable.someValue.toFixed(); +let z2 = Observable.someAnotherValue.toLowerCase(); + +//// [map.js] +"use strict"; +var observable_1 = require("observable"); +observable_1.Observable.prototype.map = function () { }; +//// [main.js] +"use strict"; +/// +var observable_1 = require("observable"); +require("./map"); +var x; +var y = x.map(function (x) { return x + 1; }); +var z1 = observable_1.Observable.someValue.toFixed(); +var z2 = observable_1.Observable.someAnotherValue.toLowerCase(); + + +//// [map.d.ts] +declare module "observable" { + interface Observable { + map(proj: (e: T) => U): Observable; + } + namespace Observable { + let someAnotherValue: string; + } +} +export {}; +//// [main.d.ts] +/// diff --git a/tests/baselines/reference/moduleAugmentationExtendAmbientModule2.symbols b/tests/baselines/reference/moduleAugmentationExtendAmbientModule2.symbols new file mode 100644 index 00000000000..f907f4d6979 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationExtendAmbientModule2.symbols @@ -0,0 +1,91 @@ +=== tests/cases/compiler/main.ts === + +/// +import { Observable } from "observable" +>Observable : Symbol(Observable, Decl(main.ts, 2, 8)) + +import "./map"; + +let x: Observable; +>x : Symbol(x, Decl(main.ts, 5, 3)) +>Observable : Symbol(Observable, Decl(main.ts, 2, 8)) + +let y = x.map(x => x + 1); +>y : Symbol(y, Decl(main.ts, 6, 3)) +>x.map : Symbol(Observable.map, Decl(map.ts, 6, 29)) +>x : Symbol(x, Decl(main.ts, 5, 3)) +>map : Symbol(Observable.map, Decl(map.ts, 6, 29)) +>x : Symbol(x, Decl(main.ts, 6, 14)) +>x : Symbol(x, Decl(main.ts, 6, 14)) + +let z1 = Observable.someValue.toFixed(); +>z1 : Symbol(z1, Decl(main.ts, 7, 3)) +>Observable.someValue.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) +>Observable.someValue : Symbol(Observable.someValue, Decl(observable.d.ts, 5, 18)) +>Observable : Symbol(Observable, Decl(main.ts, 2, 8)) +>someValue : Symbol(Observable.someValue, Decl(observable.d.ts, 5, 18)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) + +let z2 = Observable.someAnotherValue.toLowerCase(); +>z2 : Symbol(z2, Decl(main.ts, 8, 3)) +>Observable.someAnotherValue.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) +>Observable.someAnotherValue : Symbol(Observable.someAnotherValue, Decl(map.ts, 10, 11)) +>Observable : Symbol(Observable, Decl(main.ts, 2, 8)) +>someAnotherValue : Symbol(Observable.someAnotherValue, Decl(map.ts, 10, 11)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) + +=== tests/cases/compiler/map.ts === + +import { Observable } from "observable" +>Observable : Symbol(Observable, Decl(map.ts, 1, 8)) + +(Observable.prototype).map = function() { } +>Observable.prototype : Symbol(Observable.prototype) +>Observable : Symbol(Observable, Decl(map.ts, 1, 8)) +>prototype : Symbol(Observable.prototype) + +declare module "observable" { + interface Observable { +>Observable : Symbol(Observable, Decl(observable.d.ts, 0, 29), Decl(observable.d.ts, 3, 5), Decl(map.ts, 5, 29), Decl(map.ts, 8, 5)) +>T : Symbol(T, Decl(observable.d.ts, 1, 21), Decl(map.ts, 6, 25)) + + map(proj: (e:T) => U): Observable +>map : Symbol(map, Decl(map.ts, 6, 29)) +>U : Symbol(U, Decl(map.ts, 7, 12)) +>proj : Symbol(proj, Decl(map.ts, 7, 15)) +>e : Symbol(e, Decl(map.ts, 7, 22)) +>T : Symbol(T, Decl(observable.d.ts, 1, 21), Decl(map.ts, 6, 25)) +>U : Symbol(U, Decl(map.ts, 7, 12)) +>Observable : Symbol(Observable, Decl(observable.d.ts, 0, 29), Decl(observable.d.ts, 3, 5), Decl(map.ts, 5, 29), Decl(map.ts, 8, 5)) +>U : Symbol(U, Decl(map.ts, 7, 12)) + } + namespace Observable { +>Observable : Symbol(Observable, Decl(observable.d.ts, 0, 29), Decl(observable.d.ts, 3, 5), Decl(map.ts, 5, 29), Decl(map.ts, 8, 5)) + + let someAnotherValue: string; +>someAnotherValue : Symbol(someAnotherValue, Decl(map.ts, 10, 11)) + } +} + +=== tests/cases/compiler/observable.d.ts === +declare module "observable" { + class Observable { +>Observable : Symbol(Observable, Decl(observable.d.ts, 0, 29), Decl(observable.d.ts, 3, 5), Decl(map.ts, 5, 29), Decl(map.ts, 8, 5)) +>T : Symbol(T, Decl(observable.d.ts, 1, 21), Decl(map.ts, 6, 25)) + + filter(pred: (e:T) => boolean): Observable; +>filter : Symbol(filter, Decl(observable.d.ts, 1, 25)) +>pred : Symbol(pred, Decl(observable.d.ts, 2, 15)) +>e : Symbol(e, Decl(observable.d.ts, 2, 22)) +>T : Symbol(T, Decl(observable.d.ts, 1, 21), Decl(map.ts, 6, 25)) +>Observable : Symbol(Observable, Decl(observable.d.ts, 0, 29), Decl(observable.d.ts, 3, 5), Decl(map.ts, 5, 29), Decl(map.ts, 8, 5)) +>T : Symbol(T, Decl(observable.d.ts, 1, 21), Decl(map.ts, 6, 25)) + } + namespace Observable { +>Observable : Symbol(Observable, Decl(observable.d.ts, 0, 29), Decl(observable.d.ts, 3, 5), Decl(map.ts, 5, 29), Decl(map.ts, 8, 5)) + + export let someValue: number; +>someValue : Symbol(someValue, Decl(observable.d.ts, 5, 18)) + } +} + diff --git a/tests/baselines/reference/moduleAugmentationExtendAmbientModule2.types b/tests/baselines/reference/moduleAugmentationExtendAmbientModule2.types new file mode 100644 index 00000000000..70288e48f02 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationExtendAmbientModule2.types @@ -0,0 +1,103 @@ +=== tests/cases/compiler/main.ts === + +/// +import { Observable } from "observable" +>Observable : typeof Observable + +import "./map"; + +let x: Observable; +>x : Observable +>Observable : Observable + +let y = x.map(x => x + 1); +>y : Observable +>x.map(x => x + 1) : Observable +>x.map : (proj: (e: number) => U) => Observable +>x : Observable +>map : (proj: (e: number) => U) => Observable +>x => x + 1 : (x: number) => number +>x : number +>x + 1 : number +>x : number +>1 : number + +let z1 = Observable.someValue.toFixed(); +>z1 : string +>Observable.someValue.toFixed() : string +>Observable.someValue.toFixed : (fractionDigits?: number) => string +>Observable.someValue : number +>Observable : typeof Observable +>someValue : number +>toFixed : (fractionDigits?: number) => string + +let z2 = Observable.someAnotherValue.toLowerCase(); +>z2 : string +>Observable.someAnotherValue.toLowerCase() : string +>Observable.someAnotherValue.toLowerCase : () => string +>Observable.someAnotherValue : string +>Observable : typeof Observable +>someAnotherValue : string +>toLowerCase : () => string + +=== tests/cases/compiler/map.ts === + +import { Observable } from "observable" +>Observable : typeof Observable + +(Observable.prototype).map = function() { } +>(Observable.prototype).map = function() { } : () => void +>(Observable.prototype).map : any +>(Observable.prototype) : any +>Observable.prototype : any +>Observable.prototype : Observable +>Observable : typeof Observable +>prototype : Observable +>map : any +>function() { } : () => void + +declare module "observable" { + interface Observable { +>Observable : Observable +>T : T + + map(proj: (e:T) => U): Observable +>map : (proj: (e: T) => U) => Observable +>U : U +>proj : (e: T) => U +>e : T +>T : T +>U : U +>Observable : Observable +>U : U + } + namespace Observable { +>Observable : typeof Observable + + let someAnotherValue: string; +>someAnotherValue : string + } +} + +=== tests/cases/compiler/observable.d.ts === +declare module "observable" { + class Observable { +>Observable : Observable +>T : T + + filter(pred: (e:T) => boolean): Observable; +>filter : (pred: (e: T) => boolean) => Observable +>pred : (e: T) => boolean +>e : T +>T : T +>Observable : Observable +>T : T + } + namespace Observable { +>Observable : typeof Observable + + export let someValue: number; +>someValue : number + } +} + diff --git a/tests/baselines/reference/moduleAugmentationExtendFileModule1.js b/tests/baselines/reference/moduleAugmentationExtendFileModule1.js new file mode 100644 index 00000000000..a539100c2ed --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationExtendFileModule1.js @@ -0,0 +1,49 @@ +//// [tests/cases/compiler/moduleAugmentationExtendFileModule1.ts] //// + +//// [map.ts] + +import { Observable } from "./observable" + +(Observable.prototype).map = function() { } + +declare module "./observable" { + interface Observable { + map(proj: (e:T) => U): Observable + } + namespace Observable { + let someAnotherValue: number; + } +} + +//// [observable.ts] +export declare class Observable { + filter(pred: (e:T) => boolean): Observable; +} + +export namespace Observable { + let someValue: number; +} + + +//// [main.ts] +import { Observable } from "./observable" +import "./map"; + +let x: Observable; +let y = x.map(x => x + 1); + +//// [observable.js] +"use strict"; +var Observable; +(function (Observable) { + var someValue; +})(Observable = exports.Observable || (exports.Observable = {})); +//// [map.js] +"use strict"; +var observable_1 = require("./observable"); +observable_1.Observable.prototype.map = function () { }; +//// [main.js] +"use strict"; +require("./map"); +var x; +var y = x.map(function (x) { return x + 1; }); diff --git a/tests/baselines/reference/moduleAugmentationExtendFileModule1.symbols b/tests/baselines/reference/moduleAugmentationExtendFileModule1.symbols new file mode 100644 index 00000000000..eca44ec774d --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationExtendFileModule1.symbols @@ -0,0 +1,73 @@ +=== tests/cases/compiler/map.ts === + +import { Observable } from "./observable" +>Observable : Symbol(Observable, Decl(map.ts, 1, 8)) + +(Observable.prototype).map = function() { } +>Observable.prototype : Symbol(Observable.prototype) +>Observable : Symbol(Observable, Decl(map.ts, 1, 8)) +>prototype : Symbol(Observable.prototype) + +declare module "./observable" { + interface Observable { +>Observable : Symbol(Observable, Decl(observable.ts, 0, 0), Decl(observable.ts, 2, 1), Decl(map.ts, 5, 31), Decl(map.ts, 8, 5)) +>T : Symbol(T, Decl(observable.ts, 0, 32), Decl(map.ts, 6, 25)) + + map(proj: (e:T) => U): Observable +>map : Symbol(map, Decl(map.ts, 6, 29)) +>U : Symbol(U, Decl(map.ts, 7, 12)) +>proj : Symbol(proj, Decl(map.ts, 7, 15)) +>e : Symbol(e, Decl(map.ts, 7, 22)) +>T : Symbol(T, Decl(observable.ts, 0, 32), Decl(map.ts, 6, 25)) +>U : Symbol(U, Decl(map.ts, 7, 12)) +>Observable : Symbol(Observable, Decl(observable.ts, 0, 0), Decl(observable.ts, 2, 1), Decl(map.ts, 5, 31), Decl(map.ts, 8, 5)) +>U : Symbol(U, Decl(map.ts, 7, 12)) + } + namespace Observable { +>Observable : Symbol(Observable, Decl(observable.ts, 0, 0), Decl(observable.ts, 2, 1), Decl(map.ts, 5, 31), Decl(map.ts, 8, 5)) + + let someAnotherValue: number; +>someAnotherValue : Symbol(someAnotherValue, Decl(map.ts, 10, 11)) + } +} + +=== tests/cases/compiler/observable.ts === +export declare class Observable { +>Observable : Symbol(Observable, Decl(observable.ts, 0, 0), Decl(observable.ts, 2, 1), Decl(map.ts, 5, 31), Decl(map.ts, 8, 5)) +>T : Symbol(T, Decl(observable.ts, 0, 32), Decl(map.ts, 6, 25)) + + filter(pred: (e:T) => boolean): Observable; +>filter : Symbol(filter, Decl(observable.ts, 0, 36)) +>pred : Symbol(pred, Decl(observable.ts, 1, 11)) +>e : Symbol(e, Decl(observable.ts, 1, 18)) +>T : Symbol(T, Decl(observable.ts, 0, 32), Decl(map.ts, 6, 25)) +>Observable : Symbol(Observable, Decl(observable.ts, 0, 0), Decl(observable.ts, 2, 1), Decl(map.ts, 5, 31), Decl(map.ts, 8, 5)) +>T : Symbol(T, Decl(observable.ts, 0, 32), Decl(map.ts, 6, 25)) +} + +export namespace Observable { +>Observable : Symbol(Observable, Decl(observable.ts, 0, 0), Decl(observable.ts, 2, 1), Decl(map.ts, 5, 31), Decl(map.ts, 8, 5)) + + let someValue: number; +>someValue : Symbol(someValue, Decl(observable.ts, 5, 7)) +} + + +=== tests/cases/compiler/main.ts === +import { Observable } from "./observable" +>Observable : Symbol(Observable, Decl(main.ts, 0, 8)) + +import "./map"; + +let x: Observable; +>x : Symbol(x, Decl(main.ts, 3, 3)) +>Observable : Symbol(Observable, Decl(main.ts, 0, 8)) + +let y = x.map(x => x + 1); +>y : Symbol(y, Decl(main.ts, 4, 3)) +>x.map : Symbol(Observable.map, Decl(map.ts, 6, 29)) +>x : Symbol(x, Decl(main.ts, 3, 3)) +>map : Symbol(Observable.map, Decl(map.ts, 6, 29)) +>x : Symbol(x, Decl(main.ts, 4, 14)) +>x : Symbol(x, Decl(main.ts, 4, 14)) + diff --git a/tests/baselines/reference/moduleAugmentationExtendFileModule1.types b/tests/baselines/reference/moduleAugmentationExtendFileModule1.types new file mode 100644 index 00000000000..fad835029c2 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationExtendFileModule1.types @@ -0,0 +1,83 @@ +=== tests/cases/compiler/map.ts === + +import { Observable } from "./observable" +>Observable : typeof Observable + +(Observable.prototype).map = function() { } +>(Observable.prototype).map = function() { } : () => void +>(Observable.prototype).map : any +>(Observable.prototype) : any +>Observable.prototype : any +>Observable.prototype : Observable +>Observable : typeof Observable +>prototype : Observable +>map : any +>function() { } : () => void + +declare module "./observable" { + interface Observable { +>Observable : Observable +>T : T + + map(proj: (e:T) => U): Observable +>map : (proj: (e: T) => U) => Observable +>U : U +>proj : (e: T) => U +>e : T +>T : T +>U : U +>Observable : Observable +>U : U + } + namespace Observable { +>Observable : typeof Observable + + let someAnotherValue: number; +>someAnotherValue : number + } +} + +=== tests/cases/compiler/observable.ts === +export declare class Observable { +>Observable : Observable +>T : T + + filter(pred: (e:T) => boolean): Observable; +>filter : (pred: (e: T) => boolean) => Observable +>pred : (e: T) => boolean +>e : T +>T : T +>Observable : Observable +>T : T +} + +export namespace Observable { +>Observable : typeof Observable + + let someValue: number; +>someValue : number +} + + +=== tests/cases/compiler/main.ts === +import { Observable } from "./observable" +>Observable : typeof Observable + +import "./map"; + +let x: Observable; +>x : Observable +>Observable : Observable + +let y = x.map(x => x + 1); +>y : Observable +>x.map(x => x + 1) : Observable +>x.map : (proj: (e: number) => U) => Observable +>x : Observable +>map : (proj: (e: number) => U) => Observable +>x => x + 1 : (x: number) => number +>x : number +>x + 1 : number +>x : number +>1 : number + diff --git a/tests/baselines/reference/moduleAugmentationExtendFileModule2.js b/tests/baselines/reference/moduleAugmentationExtendFileModule2.js new file mode 100644 index 00000000000..389f2119aba --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationExtendFileModule2.js @@ -0,0 +1,53 @@ +//// [tests/cases/compiler/moduleAugmentationExtendFileModule2.ts] //// + +//// [map.ts] + +import { Observable } from "./observable" + +(Observable.prototype).map = function() { } + +declare module "./observable" { + interface Observable { + map(proj: (e:T) => U): Observable + } + namespace Observable { + let someAnotherValue: string; + } +} + +//// [observable.ts] +export declare class Observable { + filter(pred: (e:T) => boolean): Observable; +} + +export namespace Observable { + export let someValue: number; +} + + +//// [main.ts] +import { Observable } from "./observable" +import "./map"; + +let x: Observable; +let y = x.map(x => x + 1); +let z1 = Observable.someValue.toFixed(); +let z2 = Observable.someAnotherValue.toLowerCase(); + +//// [observable.js] +"use strict"; +var Observable; +(function (Observable) { +})(Observable = exports.Observable || (exports.Observable = {})); +//// [map.js] +"use strict"; +var observable_1 = require("./observable"); +observable_1.Observable.prototype.map = function () { }; +//// [main.js] +"use strict"; +var observable_1 = require("./observable"); +require("./map"); +var x; +var y = x.map(function (x) { return x + 1; }); +var z1 = observable_1.Observable.someValue.toFixed(); +var z2 = observable_1.Observable.someAnotherValue.toLowerCase(); diff --git a/tests/baselines/reference/moduleAugmentationExtendFileModule2.symbols b/tests/baselines/reference/moduleAugmentationExtendFileModule2.symbols new file mode 100644 index 00000000000..d0f25f693fe --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationExtendFileModule2.symbols @@ -0,0 +1,89 @@ +=== tests/cases/compiler/map.ts === + +import { Observable } from "./observable" +>Observable : Symbol(Observable, Decl(map.ts, 1, 8)) + +(Observable.prototype).map = function() { } +>Observable.prototype : Symbol(Observable.prototype) +>Observable : Symbol(Observable, Decl(map.ts, 1, 8)) +>prototype : Symbol(Observable.prototype) + +declare module "./observable" { + interface Observable { +>Observable : Symbol(Observable, Decl(observable.ts, 0, 0), Decl(observable.ts, 2, 1), Decl(map.ts, 5, 31), Decl(map.ts, 8, 5)) +>T : Symbol(T, Decl(observable.ts, 0, 32), Decl(map.ts, 6, 25)) + + map(proj: (e:T) => U): Observable +>map : Symbol(map, Decl(map.ts, 6, 29)) +>U : Symbol(U, Decl(map.ts, 7, 12)) +>proj : Symbol(proj, Decl(map.ts, 7, 15)) +>e : Symbol(e, Decl(map.ts, 7, 22)) +>T : Symbol(T, Decl(observable.ts, 0, 32), Decl(map.ts, 6, 25)) +>U : Symbol(U, Decl(map.ts, 7, 12)) +>Observable : Symbol(Observable, Decl(observable.ts, 0, 0), Decl(observable.ts, 2, 1), Decl(map.ts, 5, 31), Decl(map.ts, 8, 5)) +>U : Symbol(U, Decl(map.ts, 7, 12)) + } + namespace Observable { +>Observable : Symbol(Observable, Decl(observable.ts, 0, 0), Decl(observable.ts, 2, 1), Decl(map.ts, 5, 31), Decl(map.ts, 8, 5)) + + let someAnotherValue: string; +>someAnotherValue : Symbol(someAnotherValue, Decl(map.ts, 10, 11)) + } +} + +=== tests/cases/compiler/observable.ts === +export declare class Observable { +>Observable : Symbol(Observable, Decl(observable.ts, 0, 0), Decl(observable.ts, 2, 1), Decl(map.ts, 5, 31), Decl(map.ts, 8, 5)) +>T : Symbol(T, Decl(observable.ts, 0, 32), Decl(map.ts, 6, 25)) + + filter(pred: (e:T) => boolean): Observable; +>filter : Symbol(filter, Decl(observable.ts, 0, 36)) +>pred : Symbol(pred, Decl(observable.ts, 1, 11)) +>e : Symbol(e, Decl(observable.ts, 1, 18)) +>T : Symbol(T, Decl(observable.ts, 0, 32), Decl(map.ts, 6, 25)) +>Observable : Symbol(Observable, Decl(observable.ts, 0, 0), Decl(observable.ts, 2, 1), Decl(map.ts, 5, 31), Decl(map.ts, 8, 5)) +>T : Symbol(T, Decl(observable.ts, 0, 32), Decl(map.ts, 6, 25)) +} + +export namespace Observable { +>Observable : Symbol(Observable, Decl(observable.ts, 0, 0), Decl(observable.ts, 2, 1), Decl(map.ts, 5, 31), Decl(map.ts, 8, 5)) + + export let someValue: number; +>someValue : Symbol(someValue, Decl(observable.ts, 5, 14)) +} + + +=== tests/cases/compiler/main.ts === +import { Observable } from "./observable" +>Observable : Symbol(Observable, Decl(main.ts, 0, 8)) + +import "./map"; + +let x: Observable; +>x : Symbol(x, Decl(main.ts, 3, 3)) +>Observable : Symbol(Observable, Decl(main.ts, 0, 8)) + +let y = x.map(x => x + 1); +>y : Symbol(y, Decl(main.ts, 4, 3)) +>x.map : Symbol(Observable.map, Decl(map.ts, 6, 29)) +>x : Symbol(x, Decl(main.ts, 3, 3)) +>map : Symbol(Observable.map, Decl(map.ts, 6, 29)) +>x : Symbol(x, Decl(main.ts, 4, 14)) +>x : Symbol(x, Decl(main.ts, 4, 14)) + +let z1 = Observable.someValue.toFixed(); +>z1 : Symbol(z1, Decl(main.ts, 5, 3)) +>Observable.someValue.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) +>Observable.someValue : Symbol(Observable.someValue, Decl(observable.ts, 5, 14)) +>Observable : Symbol(Observable, Decl(main.ts, 0, 8)) +>someValue : Symbol(Observable.someValue, Decl(observable.ts, 5, 14)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) + +let z2 = Observable.someAnotherValue.toLowerCase(); +>z2 : Symbol(z2, Decl(main.ts, 6, 3)) +>Observable.someAnotherValue.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) +>Observable.someAnotherValue : Symbol(Observable.someAnotherValue, Decl(map.ts, 10, 11)) +>Observable : Symbol(Observable, Decl(main.ts, 0, 8)) +>someAnotherValue : Symbol(Observable.someAnotherValue, Decl(map.ts, 10, 11)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) + diff --git a/tests/baselines/reference/moduleAugmentationExtendFileModule2.types b/tests/baselines/reference/moduleAugmentationExtendFileModule2.types new file mode 100644 index 00000000000..85e4ead2ac0 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationExtendFileModule2.types @@ -0,0 +1,101 @@ +=== tests/cases/compiler/map.ts === + +import { Observable } from "./observable" +>Observable : typeof Observable + +(Observable.prototype).map = function() { } +>(Observable.prototype).map = function() { } : () => void +>(Observable.prototype).map : any +>(Observable.prototype) : any +>Observable.prototype : any +>Observable.prototype : Observable +>Observable : typeof Observable +>prototype : Observable +>map : any +>function() { } : () => void + +declare module "./observable" { + interface Observable { +>Observable : Observable +>T : T + + map(proj: (e:T) => U): Observable +>map : (proj: (e: T) => U) => Observable +>U : U +>proj : (e: T) => U +>e : T +>T : T +>U : U +>Observable : Observable +>U : U + } + namespace Observable { +>Observable : typeof Observable + + let someAnotherValue: string; +>someAnotherValue : string + } +} + +=== tests/cases/compiler/observable.ts === +export declare class Observable { +>Observable : Observable +>T : T + + filter(pred: (e:T) => boolean): Observable; +>filter : (pred: (e: T) => boolean) => Observable +>pred : (e: T) => boolean +>e : T +>T : T +>Observable : Observable +>T : T +} + +export namespace Observable { +>Observable : typeof Observable + + export let someValue: number; +>someValue : number +} + + +=== tests/cases/compiler/main.ts === +import { Observable } from "./observable" +>Observable : typeof Observable + +import "./map"; + +let x: Observable; +>x : Observable +>Observable : Observable + +let y = x.map(x => x + 1); +>y : Observable +>x.map(x => x + 1) : Observable +>x.map : (proj: (e: number) => U) => Observable +>x : Observable +>map : (proj: (e: number) => U) => Observable +>x => x + 1 : (x: number) => number +>x : number +>x + 1 : number +>x : number +>1 : number + +let z1 = Observable.someValue.toFixed(); +>z1 : string +>Observable.someValue.toFixed() : string +>Observable.someValue.toFixed : (fractionDigits?: number) => string +>Observable.someValue : number +>Observable : typeof Observable +>someValue : number +>toFixed : (fractionDigits?: number) => string + +let z2 = Observable.someAnotherValue.toLowerCase(); +>z2 : string +>Observable.someAnotherValue.toLowerCase() : string +>Observable.someAnotherValue.toLowerCase : () => string +>Observable.someAnotherValue : string +>Observable : typeof Observable +>someAnotherValue : string +>toLowerCase : () => string + diff --git a/tests/baselines/reference/moduleAugmentationGlobal1.js b/tests/baselines/reference/moduleAugmentationGlobal1.js new file mode 100644 index 00000000000..6debfecfe76 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationGlobal1.js @@ -0,0 +1,45 @@ +//// [tests/cases/compiler/moduleAugmentationGlobal1.ts] //// + +//// [f1.ts] + +export class A {x: number;} + +//// [f2.ts] +import {A} from "./f1"; + +// change the shape of Array +declare module "/" { + interface Array { + getA(): A; + } +} + +let x = [1]; +let y = x.getA().x; + + +//// [f1.js] +"use strict"; +var A = (function () { + function A() { + } + return A; +}()); +exports.A = A; +//// [f2.js] +"use strict"; +var x = [1]; +var y = x.getA().x; + + +//// [f1.d.ts] +export declare class A { + x: number; +} +//// [f2.d.ts] +import { A } from "./f1"; +declare module "/" { + interface Array { + getA(): A; + } +} diff --git a/tests/baselines/reference/moduleAugmentationGlobal1.symbols b/tests/baselines/reference/moduleAugmentationGlobal1.symbols new file mode 100644 index 00000000000..cc033b578f8 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationGlobal1.symbols @@ -0,0 +1,33 @@ +=== tests/cases/compiler/f1.ts === + +export class A {x: number;} +>A : Symbol(A, Decl(f1.ts, 0, 0)) +>x : Symbol(x, Decl(f1.ts, 1, 16)) + +=== tests/cases/compiler/f2.ts === +import {A} from "./f1"; +>A : Symbol(A, Decl(f2.ts, 0, 8)) + +// change the shape of Array +declare module "/" { + interface Array { +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(f2.ts, 3, 20)) +>T : Symbol(T, Decl(lib.d.ts, --, --), Decl(f2.ts, 4, 20)) + + getA(): A; +>getA : Symbol(getA, Decl(f2.ts, 4, 24)) +>A : Symbol(A, Decl(f2.ts, 0, 8)) + } +} + +let x = [1]; +>x : Symbol(x, Decl(f2.ts, 9, 3)) + +let y = x.getA().x; +>y : Symbol(y, Decl(f2.ts, 10, 3)) +>x.getA().x : Symbol(A.x, Decl(f1.ts, 1, 16)) +>x.getA : Symbol(Array.getA, Decl(f2.ts, 4, 24)) +>x : Symbol(x, Decl(f2.ts, 9, 3)) +>getA : Symbol(Array.getA, Decl(f2.ts, 4, 24)) +>x : Symbol(A.x, Decl(f1.ts, 1, 16)) + diff --git a/tests/baselines/reference/moduleAugmentationGlobal1.types b/tests/baselines/reference/moduleAugmentationGlobal1.types new file mode 100644 index 00000000000..e87a06f8ce3 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationGlobal1.types @@ -0,0 +1,36 @@ +=== tests/cases/compiler/f1.ts === + +export class A {x: number;} +>A : A +>x : number + +=== tests/cases/compiler/f2.ts === +import {A} from "./f1"; +>A : typeof A + +// change the shape of Array +declare module "/" { + interface Array { +>Array : T[] +>T : T + + getA(): A; +>getA : () => A +>A : A + } +} + +let x = [1]; +>x : number[] +>[1] : number[] +>1 : number + +let y = x.getA().x; +>y : number +>x.getA().x : number +>x.getA() : A +>x.getA : () => A +>x : number[] +>getA : () => A +>x : number + diff --git a/tests/baselines/reference/moduleAugmentationGlobal2.js b/tests/baselines/reference/moduleAugmentationGlobal2.js new file mode 100644 index 00000000000..1cc07fe601d --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationGlobal2.js @@ -0,0 +1,45 @@ +//// [tests/cases/compiler/moduleAugmentationGlobal2.ts] //// + +//// [f1.ts] + +export class A {}; +//// [f2.ts] + +// change the shape of Array +import {A} from "./f1"; + +declare module "/" { + interface Array { + getCountAsString(): string; + } +} + +let x = [1]; +let y = x.getCountAsString().toLowerCase(); + + +//// [f1.js] +"use strict"; +var A = (function () { + function A() { + } + return A; +}()); +exports.A = A; +; +//// [f2.js] +"use strict"; +var x = [1]; +var y = x.getCountAsString().toLowerCase(); + + +//// [f1.d.ts] +export declare class A { +} +//// [f2.d.ts] +declare module "/" { + interface Array { + getCountAsString(): string; + } +} +export {}; diff --git a/tests/baselines/reference/moduleAugmentationGlobal2.symbols b/tests/baselines/reference/moduleAugmentationGlobal2.symbols new file mode 100644 index 00000000000..70547a5af40 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationGlobal2.symbols @@ -0,0 +1,32 @@ +=== tests/cases/compiler/f1.ts === + +export class A {}; +>A : Symbol(A, Decl(f1.ts, 0, 0)) + +=== tests/cases/compiler/f2.ts === + +// change the shape of Array +import {A} from "./f1"; +>A : Symbol(A, Decl(f2.ts, 2, 8)) + +declare module "/" { + interface Array { +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(f2.ts, 4, 20)) +>T : Symbol(T, Decl(lib.d.ts, --, --), Decl(f2.ts, 5, 20)) + + getCountAsString(): string; +>getCountAsString : Symbol(getCountAsString, Decl(f2.ts, 5, 24)) + } +} + +let x = [1]; +>x : Symbol(x, Decl(f2.ts, 10, 3)) + +let y = x.getCountAsString().toLowerCase(); +>y : Symbol(y, Decl(f2.ts, 11, 3)) +>x.getCountAsString().toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) +>x.getCountAsString : Symbol(Array.getCountAsString, Decl(f2.ts, 5, 24)) +>x : Symbol(x, Decl(f2.ts, 10, 3)) +>getCountAsString : Symbol(Array.getCountAsString, Decl(f2.ts, 5, 24)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) + diff --git a/tests/baselines/reference/moduleAugmentationGlobal2.types b/tests/baselines/reference/moduleAugmentationGlobal2.types new file mode 100644 index 00000000000..e305b19a708 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationGlobal2.types @@ -0,0 +1,36 @@ +=== tests/cases/compiler/f1.ts === + +export class A {}; +>A : A + +=== tests/cases/compiler/f2.ts === + +// change the shape of Array +import {A} from "./f1"; +>A : typeof A + +declare module "/" { + interface Array { +>Array : T[] +>T : T + + getCountAsString(): string; +>getCountAsString : () => string + } +} + +let x = [1]; +>x : number[] +>[1] : number[] +>1 : number + +let y = x.getCountAsString().toLowerCase(); +>y : string +>x.getCountAsString().toLowerCase() : string +>x.getCountAsString().toLowerCase : () => string +>x.getCountAsString() : string +>x.getCountAsString : () => string +>x : number[] +>getCountAsString : () => string +>toLowerCase : () => string + diff --git a/tests/baselines/reference/moduleAugmentationGlobal3.js b/tests/baselines/reference/moduleAugmentationGlobal3.js new file mode 100644 index 00000000000..5c1e892bcce --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationGlobal3.js @@ -0,0 +1,52 @@ +//// [tests/cases/compiler/moduleAugmentationGlobal3.ts] //// + +//// [f1.ts] + +export class A {}; +//// [f2.ts] + +// change the shape of Array +import {A} from "./f1"; + +declare module "/" { + interface Array { + getCountAsString(): string; + } +} + +//// [f3.ts] +import "./f2"; + +let x = [1]; +let y = x.getCountAsString().toLowerCase(); + + +//// [f1.js] +"use strict"; +var A = (function () { + function A() { + } + return A; +}()); +exports.A = A; +; +//// [f2.js] +"use strict"; +//// [f3.js] +"use strict"; +require("./f2"); +var x = [1]; +var y = x.getCountAsString().toLowerCase(); + + +//// [f1.d.ts] +export declare class A { +} +//// [f2.d.ts] +declare module "/" { + interface Array { + getCountAsString(): string; + } +} +export {}; +//// [f3.d.ts] diff --git a/tests/baselines/reference/moduleAugmentationGlobal3.symbols b/tests/baselines/reference/moduleAugmentationGlobal3.symbols new file mode 100644 index 00000000000..561093677ad --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationGlobal3.symbols @@ -0,0 +1,35 @@ +=== tests/cases/compiler/f1.ts === + +export class A {}; +>A : Symbol(A, Decl(f1.ts, 0, 0)) + +=== tests/cases/compiler/f2.ts === + +// change the shape of Array +import {A} from "./f1"; +>A : Symbol(A, Decl(f2.ts, 2, 8)) + +declare module "/" { + interface Array { +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(f2.ts, 4, 20)) +>T : Symbol(T, Decl(lib.d.ts, --, --), Decl(f2.ts, 5, 20)) + + getCountAsString(): string; +>getCountAsString : Symbol(getCountAsString, Decl(f2.ts, 5, 24)) + } +} + +=== tests/cases/compiler/f3.ts === +import "./f2"; + +let x = [1]; +>x : Symbol(x, Decl(f3.ts, 2, 3)) + +let y = x.getCountAsString().toLowerCase(); +>y : Symbol(y, Decl(f3.ts, 3, 3)) +>x.getCountAsString().toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) +>x.getCountAsString : Symbol(Array.getCountAsString, Decl(f2.ts, 5, 24)) +>x : Symbol(x, Decl(f3.ts, 2, 3)) +>getCountAsString : Symbol(Array.getCountAsString, Decl(f2.ts, 5, 24)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) + diff --git a/tests/baselines/reference/moduleAugmentationGlobal3.types b/tests/baselines/reference/moduleAugmentationGlobal3.types new file mode 100644 index 00000000000..4896a1e0374 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationGlobal3.types @@ -0,0 +1,39 @@ +=== tests/cases/compiler/f1.ts === + +export class A {}; +>A : A + +=== tests/cases/compiler/f2.ts === + +// change the shape of Array +import {A} from "./f1"; +>A : typeof A + +declare module "/" { + interface Array { +>Array : T[] +>T : T + + getCountAsString(): string; +>getCountAsString : () => string + } +} + +=== tests/cases/compiler/f3.ts === +import "./f2"; + +let x = [1]; +>x : number[] +>[1] : number[] +>1 : number + +let y = x.getCountAsString().toLowerCase(); +>y : string +>x.getCountAsString().toLowerCase() : string +>x.getCountAsString().toLowerCase : () => string +>x.getCountAsString() : string +>x.getCountAsString : () => string +>x : number[] +>getCountAsString : () => string +>toLowerCase : () => string + diff --git a/tests/baselines/reference/moduleAugmentationGlobal4.errors.txt b/tests/baselines/reference/moduleAugmentationGlobal4.errors.txt new file mode 100644 index 00000000000..3ef9ffeda0b --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationGlobal4.errors.txt @@ -0,0 +1,25 @@ +tests/cases/compiler/f1.ts(3,15): error TS2662: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/f2.ts(3,15): error TS2662: Module augmentation cannot introduce new names in the top level scope. + + +==== tests/cases/compiler/f1.ts (1 errors) ==== + + declare module "/" { + interface Something {x} + ~~~~~~~~~ +!!! error TS2662: Module augmentation cannot introduce new names in the top level scope. + } + export {}; +==== tests/cases/compiler/f2.ts (1 errors) ==== + + declare module "/" { + interface Something {y} + ~~~~~~~~~ +!!! error TS2662: Module augmentation cannot introduce new names in the top level scope. + } + export {}; +==== tests/cases/compiler/f3.ts (0 errors) ==== + import "./f1"; + import "./f2"; + + \ No newline at end of file diff --git a/tests/baselines/reference/moduleAugmentationGlobal4.js b/tests/baselines/reference/moduleAugmentationGlobal4.js new file mode 100644 index 00000000000..11a0b92be3e --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationGlobal4.js @@ -0,0 +1,47 @@ +//// [tests/cases/compiler/moduleAugmentationGlobal4.ts] //// + +//// [f1.ts] + +declare module "/" { + interface Something {x} +} +export {}; +//// [f2.ts] + +declare module "/" { + interface Something {y} +} +export {}; +//// [f3.ts] +import "./f1"; +import "./f2"; + + + +//// [f1.js] +"use strict"; +//// [f2.js] +"use strict"; +//// [f3.js] +"use strict"; +require("./f1"); +require("./f2"); + + +//// [f1.d.ts] +declare module "/" { + interface Something { + x: any; + } +} +export { }; +export {}; +//// [f2.d.ts] +declare module "/" { + interface Something { + y: any; + } +} +export { }; +export {}; +//// [f3.d.ts] diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports1.js b/tests/baselines/reference/moduleAugmentationImportsAndExports1.js new file mode 100644 index 00000000000..6c6dc72337e --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports1.js @@ -0,0 +1,71 @@ +//// [tests/cases/compiler/moduleAugmentationImportsAndExports1.ts] //// + +//// [f1.ts] + +export class A {} + +//// [f2.ts] +export class B { + n: number; +} + +//// [f3.ts] +import {A} from "./f1"; +import {B} from "./f2"; + +(A.prototype).foo = function () {} +declare module "./f1" { + interface A { + foo(): B; + } +} + +//// [f4.ts] +import {A} from "./f1"; +import "./f3"; + +let a: A; +let b = a.foo().n; + +//// [f1.js] +"use strict"; +var A = (function () { + function A() { + } + return A; +}()); +exports.A = A; +//// [f2.js] +"use strict"; +var B = (function () { + function B() { + } + return B; +}()); +exports.B = B; +//// [f3.js] +"use strict"; +var f1_1 = require("./f1"); +f1_1.A.prototype.foo = function () { }; +//// [f4.js] +"use strict"; +require("./f3"); +var a; +var b = a.foo().n; + + +//// [f1.d.ts] +export declare class A { +} +//// [f2.d.ts] +export declare class B { + n: number; +} +//// [f3.d.ts] +import { B } from "./f2"; +declare module "./f1" { + interface A { + foo(): B; + } +} +//// [f4.d.ts] diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports1.symbols b/tests/baselines/reference/moduleAugmentationImportsAndExports1.symbols new file mode 100644 index 00000000000..4d9f8217e4c --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports1.symbols @@ -0,0 +1,53 @@ +=== tests/cases/compiler/f1.ts === + +export class A {} +>A : Symbol(A, Decl(f1.ts, 0, 0), Decl(f3.ts, 4, 23)) + +=== tests/cases/compiler/f2.ts === +export class B { +>B : Symbol(B, Decl(f2.ts, 0, 0)) + + n: number; +>n : Symbol(n, Decl(f2.ts, 0, 16)) +} + +=== tests/cases/compiler/f3.ts === +import {A} from "./f1"; +>A : Symbol(A, Decl(f3.ts, 0, 8)) + +import {B} from "./f2"; +>B : Symbol(B, Decl(f3.ts, 1, 8)) + +(A.prototype).foo = function () {} +>A.prototype : Symbol(A.prototype) +>A : Symbol(A, Decl(f3.ts, 0, 8)) +>prototype : Symbol(A.prototype) + +declare module "./f1" { + interface A { +>A : Symbol(A, Decl(f1.ts, 0, 0), Decl(f3.ts, 4, 23)) + + foo(): B; +>foo : Symbol(foo, Decl(f3.ts, 5, 17)) +>B : Symbol(B, Decl(f3.ts, 1, 8)) + } +} + +=== tests/cases/compiler/f4.ts === +import {A} from "./f1"; +>A : Symbol(A, Decl(f4.ts, 0, 8)) + +import "./f3"; + +let a: A; +>a : Symbol(a, Decl(f4.ts, 3, 3)) +>A : Symbol(A, Decl(f4.ts, 0, 8)) + +let b = a.foo().n; +>b : Symbol(b, Decl(f4.ts, 4, 3)) +>a.foo().n : Symbol(B.n, Decl(f2.ts, 0, 16)) +>a.foo : Symbol(A.foo, Decl(f3.ts, 5, 17)) +>a : Symbol(a, Decl(f4.ts, 3, 3)) +>foo : Symbol(A.foo, Decl(f3.ts, 5, 17)) +>n : Symbol(B.n, Decl(f2.ts, 0, 16)) + diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports1.types b/tests/baselines/reference/moduleAugmentationImportsAndExports1.types new file mode 100644 index 00000000000..53ea84f96eb --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports1.types @@ -0,0 +1,60 @@ +=== tests/cases/compiler/f1.ts === + +export class A {} +>A : A + +=== tests/cases/compiler/f2.ts === +export class B { +>B : B + + n: number; +>n : number +} + +=== tests/cases/compiler/f3.ts === +import {A} from "./f1"; +>A : typeof A + +import {B} from "./f2"; +>B : typeof B + +(A.prototype).foo = function () {} +>(A.prototype).foo = function () {} : () => void +>(A.prototype).foo : any +>(A.prototype) : any +>A.prototype : any +>A.prototype : A +>A : typeof A +>prototype : A +>foo : any +>function () {} : () => void + +declare module "./f1" { + interface A { +>A : A + + foo(): B; +>foo : () => B +>B : B + } +} + +=== tests/cases/compiler/f4.ts === +import {A} from "./f1"; +>A : typeof A + +import "./f3"; + +let a: A; +>a : A +>A : A + +let b = a.foo().n; +>b : number +>a.foo().n : number +>a.foo() : B +>a.foo : () => B +>a : A +>foo : () => B +>n : number + diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports2.errors.txt b/tests/baselines/reference/moduleAugmentationImportsAndExports2.errors.txt new file mode 100644 index 00000000000..36ce6768b09 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports2.errors.txt @@ -0,0 +1,70 @@ +tests/cases/compiler/f3.ts(11,5): error TS2664: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. +tests/cases/compiler/f3.ts(11,21): error TS2307: Cannot find module './f2'. +tests/cases/compiler/f3.ts(12,5): error TS2663: Exports are not permitted in module augmentations. +tests/cases/compiler/f3.ts(12,21): error TS2307: Cannot find module './f2'. +tests/cases/compiler/f3.ts(13,12): error TS2662: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/f3.ts(13,16): error TS4000: Import declaration 'I' is using private name 'N'. +tests/cases/compiler/f3.ts(14,12): error TS2662: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/f3.ts(14,16): error TS4000: Import declaration 'C' is using private name 'N'. +tests/cases/compiler/f3.ts(16,15): error TS2662: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/f4.ts(5,11): error TS2339: Property 'foo' does not exist on type 'A'. + + +==== tests/cases/compiler/f1.ts (0 errors) ==== + + export class A {} + +==== tests/cases/compiler/f2.ts (0 errors) ==== + export class B { + n: number; + } + +==== tests/cases/compiler/f3.ts (9 errors) ==== + import {A} from "./f1"; + + (A.prototype).foo = function () {} + + namespace N { + export interface Ifc { a } + export interface Cls { a } + } + + declare module "./f1" { + import {B} from "./f2"; + ~~~~~~ +!!! error TS2664: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. + ~~~~~~ +!!! error TS2307: Cannot find module './f2'. + export {B} from "./f2"; + ~~~~~~ +!!! error TS2663: Exports are not permitted in module augmentations. + ~~~~~~ +!!! error TS2307: Cannot find module './f2'. + import I = N.Ifc; + ~ +!!! error TS2662: Module augmentation cannot introduce new names in the top level scope. + ~ +!!! error TS4000: Import declaration 'I' is using private name 'N'. + import C = N.Cls; + ~ +!!! error TS2662: Module augmentation cannot introduce new names in the top level scope. + ~ +!!! error TS4000: Import declaration 'C' is using private name 'N'. + // should have explicit export + interface A { + ~ +!!! error TS2662: Module augmentation cannot introduce new names in the top level scope. + foo(): B; + bar(): I; + baz(): C; + } + } + +==== tests/cases/compiler/f4.ts (1 errors) ==== + import {A} from "./f1"; + import "./f3"; + + let a: A; + let b = a.foo().n; + ~~~ +!!! error TS2339: Property 'foo' does not exist on type 'A'. \ No newline at end of file diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports2.js b/tests/baselines/reference/moduleAugmentationImportsAndExports2.js new file mode 100644 index 00000000000..b0351c1c332 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports2.js @@ -0,0 +1,76 @@ +//// [tests/cases/compiler/moduleAugmentationImportsAndExports2.ts] //// + +//// [f1.ts] + +export class A {} + +//// [f2.ts] +export class B { + n: number; +} + +//// [f3.ts] +import {A} from "./f1"; + +(A.prototype).foo = function () {} + +namespace N { + export interface Ifc { a } + export interface Cls { a } +} + +declare module "./f1" { + import {B} from "./f2"; + export {B} from "./f2"; + import I = N.Ifc; + import C = N.Cls; + // should have explicit export + interface A { + foo(): B; + bar(): I; + baz(): C; + } +} + +//// [f4.ts] +import {A} from "./f1"; +import "./f3"; + +let a: A; +let b = a.foo().n; + +//// [f1.js] +"use strict"; +var A = (function () { + function A() { + } + return A; +}()); +exports.A = A; +//// [f2.js] +"use strict"; +var B = (function () { + function B() { + } + return B; +}()); +exports.B = B; +//// [f3.js] +"use strict"; +var f1_1 = require("./f1"); +f1_1.A.prototype.foo = function () { }; +//// [f4.js] +"use strict"; +require("./f3"); +var a; +var b = a.foo().n; + + +//// [f1.d.ts] +export declare class A { +} +//// [f2.d.ts] +export declare class B { + n: number; +} +//// [f4.d.ts] diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports3.errors.txt b/tests/baselines/reference/moduleAugmentationImportsAndExports3.errors.txt new file mode 100644 index 00000000000..7a127c3a680 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports3.errors.txt @@ -0,0 +1,56 @@ +tests/cases/compiler/f3.ts(11,5): error TS2664: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. +tests/cases/compiler/f3.ts(11,21): error TS2307: Cannot find module './f2'. +tests/cases/compiler/f3.ts(12,12): error TS2662: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/f3.ts(12,16): error TS4000: Import declaration 'I' is using private name 'N'. +tests/cases/compiler/f3.ts(13,12): error TS2662: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/f3.ts(13,16): error TS4000: Import declaration 'C' is using private name 'N'. + + +==== tests/cases/compiler/f1.ts (0 errors) ==== + + export class A {} + +==== tests/cases/compiler/f2.ts (0 errors) ==== + export class B { + n: number; + } + +==== tests/cases/compiler/f3.ts (6 errors) ==== + import {A} from "./f1"; + + (A.prototype).foo = function () {} + + namespace N { + export interface Ifc { a } + export interface Cls { a } + } + + declare module "./f1" { + import {B} from "./f2"; + ~~~~~~ +!!! error TS2664: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. + ~~~~~~ +!!! error TS2307: Cannot find module './f2'. + import I = N.Ifc; + ~ +!!! error TS2662: Module augmentation cannot introduce new names in the top level scope. + ~ +!!! error TS4000: Import declaration 'I' is using private name 'N'. + import C = N.Cls; + ~ +!!! error TS2662: Module augmentation cannot introduce new names in the top level scope. + ~ +!!! error TS4000: Import declaration 'C' is using private name 'N'. + interface A { + foo(): B; + bar(): I; + baz(): C; + } + } + +==== tests/cases/compiler/f4.ts (0 errors) ==== + import {A} from "./f1"; + import "./f3"; + + let a: A; + let b = a.foo().n; \ No newline at end of file diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports3.js b/tests/baselines/reference/moduleAugmentationImportsAndExports3.js new file mode 100644 index 00000000000..381ae5e1d10 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports3.js @@ -0,0 +1,74 @@ +//// [tests/cases/compiler/moduleAugmentationImportsAndExports3.ts] //// + +//// [f1.ts] + +export class A {} + +//// [f2.ts] +export class B { + n: number; +} + +//// [f3.ts] +import {A} from "./f1"; + +(A.prototype).foo = function () {} + +namespace N { + export interface Ifc { a } + export interface Cls { a } +} + +declare module "./f1" { + import {B} from "./f2"; + import I = N.Ifc; + import C = N.Cls; + interface A { + foo(): B; + bar(): I; + baz(): C; + } +} + +//// [f4.ts] +import {A} from "./f1"; +import "./f3"; + +let a: A; +let b = a.foo().n; + +//// [f1.js] +"use strict"; +var A = (function () { + function A() { + } + return A; +}()); +exports.A = A; +//// [f2.js] +"use strict"; +var B = (function () { + function B() { + } + return B; +}()); +exports.B = B; +//// [f3.js] +"use strict"; +var f1_1 = require("./f1"); +f1_1.A.prototype.foo = function () { }; +//// [f4.js] +"use strict"; +require("./f3"); +var a; +var b = a.foo().n; + + +//// [f1.d.ts] +export declare class A { +} +//// [f2.d.ts] +export declare class B { + n: number; +} +//// [f4.d.ts] diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports4.js b/tests/baselines/reference/moduleAugmentationImportsAndExports4.js new file mode 100644 index 00000000000..cbb844fa20e --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports4.js @@ -0,0 +1,68 @@ +//// [tests/cases/compiler/moduleAugmentationImportsAndExports4.ts] //// + +//// [f1.ts] + +export class A {} + +//// [f2.ts] +export class B { + n: number; +} + +//// [f3.ts] +import {A} from "./f1"; +import {B} from "./f2"; + +(A.prototype).foo = function () {} + +namespace N { + export interface Ifc { a: number; } + export interface Cls { b: number; } +} +import I = N.Ifc; +import C = N.Cls; + +declare module "./f1" { + interface A { + foo(): B; + bar(): I; + baz(): C; + } +} + +//// [f4.ts] +import {A} from "./f1"; +import "./f3"; + +let a: A; +let b = a.foo().n; +let c = a.bar().a; +let d = a.baz().b; + +//// [f1.js] +"use strict"; +var A = (function () { + function A() { + } + return A; +}()); +exports.A = A; +//// [f2.js] +"use strict"; +var B = (function () { + function B() { + } + return B; +}()); +exports.B = B; +//// [f3.js] +"use strict"; +var f1_1 = require("./f1"); +f1_1.A.prototype.foo = function () { }; +//// [f4.js] +"use strict"; +require("./f3"); +var a; +var b = a.foo().n; +var c = a.bar().a; +var d = a.baz().b; diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports4.symbols b/tests/baselines/reference/moduleAugmentationImportsAndExports4.symbols new file mode 100644 index 00000000000..d526ce96866 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports4.symbols @@ -0,0 +1,98 @@ +=== tests/cases/compiler/f1.ts === + +export class A {} +>A : Symbol(A, Decl(f1.ts, 0, 0), Decl(f3.ts, 12, 23)) + +=== tests/cases/compiler/f2.ts === +export class B { +>B : Symbol(B, Decl(f2.ts, 0, 0)) + + n: number; +>n : Symbol(n, Decl(f2.ts, 0, 16)) +} + +=== tests/cases/compiler/f3.ts === +import {A} from "./f1"; +>A : Symbol(A, Decl(f3.ts, 0, 8)) + +import {B} from "./f2"; +>B : Symbol(B, Decl(f3.ts, 1, 8)) + +(A.prototype).foo = function () {} +>A.prototype : Symbol(A.prototype) +>A : Symbol(A, Decl(f3.ts, 0, 8)) +>prototype : Symbol(A.prototype) + +namespace N { +>N : Symbol(N, Decl(f3.ts, 3, 39)) + + export interface Ifc { a: number; } +>Ifc : Symbol(Ifc, Decl(f3.ts, 5, 13)) +>a : Symbol(a, Decl(f3.ts, 6, 26)) + + export interface Cls { b: number; } +>Cls : Symbol(Cls, Decl(f3.ts, 6, 39)) +>b : Symbol(b, Decl(f3.ts, 7, 26)) +} +import I = N.Ifc; +>I : Symbol(I, Decl(f3.ts, 8, 1)) +>N : Symbol(N, Decl(f3.ts, 3, 39)) +>Ifc : Symbol(I, Decl(f3.ts, 5, 13)) + +import C = N.Cls; +>C : Symbol(C, Decl(f3.ts, 9, 17)) +>N : Symbol(N, Decl(f3.ts, 3, 39)) +>Cls : Symbol(C, Decl(f3.ts, 6, 39)) + +declare module "./f1" { + interface A { +>A : Symbol(A, Decl(f1.ts, 0, 0), Decl(f3.ts, 12, 23)) + + foo(): B; +>foo : Symbol(foo, Decl(f3.ts, 13, 17)) +>B : Symbol(B, Decl(f3.ts, 1, 8)) + + bar(): I; +>bar : Symbol(bar, Decl(f3.ts, 14, 17)) +>I : Symbol(I, Decl(f3.ts, 8, 1)) + + baz(): C; +>baz : Symbol(baz, Decl(f3.ts, 15, 17)) +>C : Symbol(C, Decl(f3.ts, 9, 17)) + } +} + +=== tests/cases/compiler/f4.ts === +import {A} from "./f1"; +>A : Symbol(A, Decl(f4.ts, 0, 8)) + +import "./f3"; + +let a: A; +>a : Symbol(a, Decl(f4.ts, 3, 3)) +>A : Symbol(A, Decl(f4.ts, 0, 8)) + +let b = a.foo().n; +>b : Symbol(b, Decl(f4.ts, 4, 3)) +>a.foo().n : Symbol(B.n, Decl(f2.ts, 0, 16)) +>a.foo : Symbol(A.foo, Decl(f3.ts, 13, 17)) +>a : Symbol(a, Decl(f4.ts, 3, 3)) +>foo : Symbol(A.foo, Decl(f3.ts, 13, 17)) +>n : Symbol(B.n, Decl(f2.ts, 0, 16)) + +let c = a.bar().a; +>c : Symbol(c, Decl(f4.ts, 5, 3)) +>a.bar().a : Symbol(N.Ifc.a, Decl(f3.ts, 6, 26)) +>a.bar : Symbol(A.bar, Decl(f3.ts, 14, 17)) +>a : Symbol(a, Decl(f4.ts, 3, 3)) +>bar : Symbol(A.bar, Decl(f3.ts, 14, 17)) +>a : Symbol(N.Ifc.a, Decl(f3.ts, 6, 26)) + +let d = a.baz().b; +>d : Symbol(d, Decl(f4.ts, 6, 3)) +>a.baz().b : Symbol(N.Cls.b, Decl(f3.ts, 7, 26)) +>a.baz : Symbol(A.baz, Decl(f3.ts, 15, 17)) +>a : Symbol(a, Decl(f4.ts, 3, 3)) +>baz : Symbol(A.baz, Decl(f3.ts, 15, 17)) +>b : Symbol(N.Cls.b, Decl(f3.ts, 7, 26)) + diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports4.types b/tests/baselines/reference/moduleAugmentationImportsAndExports4.types new file mode 100644 index 00000000000..5931989ab42 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports4.types @@ -0,0 +1,107 @@ +=== tests/cases/compiler/f1.ts === + +export class A {} +>A : A + +=== tests/cases/compiler/f2.ts === +export class B { +>B : B + + n: number; +>n : number +} + +=== tests/cases/compiler/f3.ts === +import {A} from "./f1"; +>A : typeof A + +import {B} from "./f2"; +>B : typeof B + +(A.prototype).foo = function () {} +>(A.prototype).foo = function () {} : () => void +>(A.prototype).foo : any +>(A.prototype) : any +>A.prototype : any +>A.prototype : A +>A : typeof A +>prototype : A +>foo : any +>function () {} : () => void + +namespace N { +>N : any + + export interface Ifc { a: number; } +>Ifc : Ifc +>a : number + + export interface Cls { b: number; } +>Cls : Cls +>b : number +} +import I = N.Ifc; +>I : any +>N : any +>Ifc : I + +import C = N.Cls; +>C : any +>N : any +>Cls : C + +declare module "./f1" { + interface A { +>A : A + + foo(): B; +>foo : () => B +>B : B + + bar(): I; +>bar : () => I +>I : I + + baz(): C; +>baz : () => C +>C : C + } +} + +=== tests/cases/compiler/f4.ts === +import {A} from "./f1"; +>A : typeof A + +import "./f3"; + +let a: A; +>a : A +>A : A + +let b = a.foo().n; +>b : number +>a.foo().n : number +>a.foo() : B +>a.foo : () => B +>a : A +>foo : () => B +>n : number + +let c = a.bar().a; +>c : number +>a.bar().a : number +>a.bar() : N.Ifc +>a.bar : () => N.Ifc +>a : A +>bar : () => N.Ifc +>a : number + +let d = a.baz().b; +>d : number +>a.baz().b : number +>a.baz() : N.Cls +>a.baz : () => N.Cls +>a : A +>baz : () => N.Cls +>b : number + diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports5.errors.txt b/tests/baselines/reference/moduleAugmentationImportsAndExports5.errors.txt new file mode 100644 index 00000000000..177038d8aaf --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports5.errors.txt @@ -0,0 +1,46 @@ +tests/cases/compiler/f3.ts(10,12): error TS4000: Import declaration 'I' is using private name 'N'. +tests/cases/compiler/f3.ts(11,12): error TS4000: Import declaration 'C' is using private name 'N'. + + +==== tests/cases/compiler/f1.ts (0 errors) ==== + + export class A {} + +==== tests/cases/compiler/f2.ts (0 errors) ==== + export class B { + n: number; + } + +==== tests/cases/compiler/f3.ts (2 errors) ==== + import {A} from "./f1"; + import {B} from "./f2"; + + (A.prototype).foo = function () {} + + namespace N { + export interface Ifc { a: number; } + export interface Cls { b: number; } + } + import I = N.Ifc; + ~ +!!! error TS4000: Import declaration 'I' is using private name 'N'. + import C = N.Cls; + ~ +!!! error TS4000: Import declaration 'C' is using private name 'N'. + + declare module "./f1" { + interface A { + foo(): B; + bar(): I; + baz(): C; + } + } + +==== tests/cases/compiler/f4.ts (0 errors) ==== + import {A} from "./f1"; + import "./f3"; + + let a: A; + let b = a.foo().n; + let c = a.bar().a; + let d = a.baz().b; \ No newline at end of file diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports5.js b/tests/baselines/reference/moduleAugmentationImportsAndExports5.js new file mode 100644 index 00000000000..a69ccbf3855 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports5.js @@ -0,0 +1,78 @@ +//// [tests/cases/compiler/moduleAugmentationImportsAndExports5.ts] //// + +//// [f1.ts] + +export class A {} + +//// [f2.ts] +export class B { + n: number; +} + +//// [f3.ts] +import {A} from "./f1"; +import {B} from "./f2"; + +(A.prototype).foo = function () {} + +namespace N { + export interface Ifc { a: number; } + export interface Cls { b: number; } +} +import I = N.Ifc; +import C = N.Cls; + +declare module "./f1" { + interface A { + foo(): B; + bar(): I; + baz(): C; + } +} + +//// [f4.ts] +import {A} from "./f1"; +import "./f3"; + +let a: A; +let b = a.foo().n; +let c = a.bar().a; +let d = a.baz().b; + +//// [f1.js] +"use strict"; +var A = (function () { + function A() { + } + return A; +}()); +exports.A = A; +//// [f2.js] +"use strict"; +var B = (function () { + function B() { + } + return B; +}()); +exports.B = B; +//// [f3.js] +"use strict"; +var f1_1 = require("./f1"); +f1_1.A.prototype.foo = function () { }; +//// [f4.js] +"use strict"; +require("./f3"); +var a; +var b = a.foo().n; +var c = a.bar().a; +var d = a.baz().b; + + +//// [f1.d.ts] +export declare class A { +} +//// [f2.d.ts] +export declare class B { + n: number; +} +//// [f4.d.ts] diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports6.js b/tests/baselines/reference/moduleAugmentationImportsAndExports6.js new file mode 100644 index 00000000000..c0cc8778ab1 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports6.js @@ -0,0 +1,97 @@ +//// [tests/cases/compiler/moduleAugmentationImportsAndExports6.ts] //// + +//// [f1.ts] + +export class A {} + +//// [f2.ts] +export class B { + n: number; +} + +//// [f3.ts] +import {A} from "./f1"; +import {B} from "./f2"; + +(A.prototype).foo = function () {} + +export namespace N { + export interface Ifc { a: number; } + export interface Cls { b: number; } +} +import I = N.Ifc; +import C = N.Cls; + +declare module "./f1" { + interface A { + foo(): B; + bar(): I; + baz(): C; + } +} + +//// [f4.ts] +import {A} from "./f1"; +import "./f3"; + +let a: A; +let b = a.foo().n; +let c = a.bar().a; +let d = a.baz().b; + +//// [f1.js] +"use strict"; +var A = (function () { + function A() { + } + return A; +}()); +exports.A = A; +//// [f2.js] +"use strict"; +var B = (function () { + function B() { + } + return B; +}()); +exports.B = B; +//// [f3.js] +"use strict"; +var f1_1 = require("./f1"); +f1_1.A.prototype.foo = function () { }; +//// [f4.js] +"use strict"; +require("./f3"); +var a; +var b = a.foo().n; +var c = a.bar().a; +var d = a.baz().b; + + +//// [f1.d.ts] +export declare class A { +} +//// [f2.d.ts] +export declare class B { + n: number; +} +//// [f3.d.ts] +import { B } from "./f2"; +export declare namespace N { + interface Ifc { + a: number; + } + interface Cls { + b: number; + } +} +import I = N.Ifc; +import C = N.Cls; +declare module "./f1" { + interface A { + foo(): B; + bar(): I; + baz(): C; + } +} +//// [f4.d.ts] diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports6.symbols b/tests/baselines/reference/moduleAugmentationImportsAndExports6.symbols new file mode 100644 index 00000000000..3add4b08e8d --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports6.symbols @@ -0,0 +1,98 @@ +=== tests/cases/compiler/f1.ts === + +export class A {} +>A : Symbol(A, Decl(f1.ts, 0, 0), Decl(f3.ts, 12, 23)) + +=== tests/cases/compiler/f2.ts === +export class B { +>B : Symbol(B, Decl(f2.ts, 0, 0)) + + n: number; +>n : Symbol(n, Decl(f2.ts, 0, 16)) +} + +=== tests/cases/compiler/f3.ts === +import {A} from "./f1"; +>A : Symbol(A, Decl(f3.ts, 0, 8)) + +import {B} from "./f2"; +>B : Symbol(B, Decl(f3.ts, 1, 8)) + +(A.prototype).foo = function () {} +>A.prototype : Symbol(A.prototype) +>A : Symbol(A, Decl(f3.ts, 0, 8)) +>prototype : Symbol(A.prototype) + +export namespace N { +>N : Symbol(N, Decl(f3.ts, 3, 39)) + + export interface Ifc { a: number; } +>Ifc : Symbol(Ifc, Decl(f3.ts, 5, 20)) +>a : Symbol(a, Decl(f3.ts, 6, 26)) + + export interface Cls { b: number; } +>Cls : Symbol(Cls, Decl(f3.ts, 6, 39)) +>b : Symbol(b, Decl(f3.ts, 7, 26)) +} +import I = N.Ifc; +>I : Symbol(I, Decl(f3.ts, 8, 1)) +>N : Symbol(N, Decl(f3.ts, 3, 39)) +>Ifc : Symbol(I, Decl(f3.ts, 5, 20)) + +import C = N.Cls; +>C : Symbol(C, Decl(f3.ts, 9, 17)) +>N : Symbol(N, Decl(f3.ts, 3, 39)) +>Cls : Symbol(C, Decl(f3.ts, 6, 39)) + +declare module "./f1" { + interface A { +>A : Symbol(A, Decl(f1.ts, 0, 0), Decl(f3.ts, 12, 23)) + + foo(): B; +>foo : Symbol(foo, Decl(f3.ts, 13, 17)) +>B : Symbol(B, Decl(f3.ts, 1, 8)) + + bar(): I; +>bar : Symbol(bar, Decl(f3.ts, 14, 17)) +>I : Symbol(I, Decl(f3.ts, 8, 1)) + + baz(): C; +>baz : Symbol(baz, Decl(f3.ts, 15, 17)) +>C : Symbol(C, Decl(f3.ts, 9, 17)) + } +} + +=== tests/cases/compiler/f4.ts === +import {A} from "./f1"; +>A : Symbol(A, Decl(f4.ts, 0, 8)) + +import "./f3"; + +let a: A; +>a : Symbol(a, Decl(f4.ts, 3, 3)) +>A : Symbol(A, Decl(f4.ts, 0, 8)) + +let b = a.foo().n; +>b : Symbol(b, Decl(f4.ts, 4, 3)) +>a.foo().n : Symbol(B.n, Decl(f2.ts, 0, 16)) +>a.foo : Symbol(A.foo, Decl(f3.ts, 13, 17)) +>a : Symbol(a, Decl(f4.ts, 3, 3)) +>foo : Symbol(A.foo, Decl(f3.ts, 13, 17)) +>n : Symbol(B.n, Decl(f2.ts, 0, 16)) + +let c = a.bar().a; +>c : Symbol(c, Decl(f4.ts, 5, 3)) +>a.bar().a : Symbol(N.Ifc.a, Decl(f3.ts, 6, 26)) +>a.bar : Symbol(A.bar, Decl(f3.ts, 14, 17)) +>a : Symbol(a, Decl(f4.ts, 3, 3)) +>bar : Symbol(A.bar, Decl(f3.ts, 14, 17)) +>a : Symbol(N.Ifc.a, Decl(f3.ts, 6, 26)) + +let d = a.baz().b; +>d : Symbol(d, Decl(f4.ts, 6, 3)) +>a.baz().b : Symbol(N.Cls.b, Decl(f3.ts, 7, 26)) +>a.baz : Symbol(A.baz, Decl(f3.ts, 15, 17)) +>a : Symbol(a, Decl(f4.ts, 3, 3)) +>baz : Symbol(A.baz, Decl(f3.ts, 15, 17)) +>b : Symbol(N.Cls.b, Decl(f3.ts, 7, 26)) + diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports6.types b/tests/baselines/reference/moduleAugmentationImportsAndExports6.types new file mode 100644 index 00000000000..f7935e16c16 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports6.types @@ -0,0 +1,107 @@ +=== tests/cases/compiler/f1.ts === + +export class A {} +>A : A + +=== tests/cases/compiler/f2.ts === +export class B { +>B : B + + n: number; +>n : number +} + +=== tests/cases/compiler/f3.ts === +import {A} from "./f1"; +>A : typeof A + +import {B} from "./f2"; +>B : typeof B + +(A.prototype).foo = function () {} +>(A.prototype).foo = function () {} : () => void +>(A.prototype).foo : any +>(A.prototype) : any +>A.prototype : any +>A.prototype : A +>A : typeof A +>prototype : A +>foo : any +>function () {} : () => void + +export namespace N { +>N : any + + export interface Ifc { a: number; } +>Ifc : Ifc +>a : number + + export interface Cls { b: number; } +>Cls : Cls +>b : number +} +import I = N.Ifc; +>I : any +>N : any +>Ifc : I + +import C = N.Cls; +>C : any +>N : any +>Cls : C + +declare module "./f1" { + interface A { +>A : A + + foo(): B; +>foo : () => B +>B : B + + bar(): I; +>bar : () => I +>I : I + + baz(): C; +>baz : () => C +>C : C + } +} + +=== tests/cases/compiler/f4.ts === +import {A} from "./f1"; +>A : typeof A + +import "./f3"; + +let a: A; +>a : A +>A : A + +let b = a.foo().n; +>b : number +>a.foo().n : number +>a.foo() : B +>a.foo : () => B +>a : A +>foo : () => B +>n : number + +let c = a.bar().a; +>c : number +>a.bar().a : number +>a.bar() : N.Ifc +>a.bar : () => N.Ifc +>a : A +>bar : () => N.Ifc +>a : number + +let d = a.baz().b; +>d : number +>a.baz().b : number +>a.baz() : N.Cls +>a.baz : () => N.Cls +>a : A +>baz : () => N.Cls +>b : number + diff --git a/tests/baselines/reference/moduleAugmentationInAmbientModule1.js b/tests/baselines/reference/moduleAugmentationInAmbientModule1.js new file mode 100644 index 00000000000..aecb8954d53 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationInAmbientModule1.js @@ -0,0 +1,39 @@ +//// [tests/cases/compiler/moduleAugmentationInAmbientModule1.ts] //// + +//// [O.d.ts] + + +declare module "Observable" { + class Observable {} +} + +declare module "M" { + class Cls { x: number } +} + +declare module "Map" { + import { Cls } from "M"; + module "Observable" { + interface Observable { + foo(): Cls; + } + } +} + +//// [main.ts] +/// + +import {Observable} from "Observable"; +let x: Observable; +x.foo().x; + + +//// [main.js] +/// +"use strict"; +var x; +x.foo().x; + + +//// [main.d.ts] +/// diff --git a/tests/baselines/reference/moduleAugmentationInAmbientModule1.symbols b/tests/baselines/reference/moduleAugmentationInAmbientModule1.symbols new file mode 100644 index 00000000000..b59f0766eea --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationInAmbientModule1.symbols @@ -0,0 +1,46 @@ +=== tests/cases/compiler/main.ts === +/// + +import {Observable} from "Observable"; +>Observable : Symbol(Observable, Decl(main.ts, 2, 8)) + +let x: Observable; +>x : Symbol(x, Decl(main.ts, 3, 3)) +>Observable : Symbol(Observable, Decl(main.ts, 2, 8)) + +x.foo().x; +>x.foo().x : Symbol(Cls.x, Decl(O.d.ts, 7, 15)) +>x.foo : Symbol(Observable.foo, Decl(O.d.ts, 13, 30)) +>x : Symbol(x, Decl(main.ts, 3, 3)) +>foo : Symbol(Observable.foo, Decl(O.d.ts, 13, 30)) +>x : Symbol(Cls.x, Decl(O.d.ts, 7, 15)) + +=== tests/cases/compiler/O.d.ts === + + +declare module "Observable" { + class Observable {} +>Observable : Symbol(Observable, Decl(O.d.ts, 2, 29), Decl(O.d.ts, 12, 25)) +} + +declare module "M" { + class Cls { x: number } +>Cls : Symbol(Cls, Decl(O.d.ts, 6, 20)) +>x : Symbol(x, Decl(O.d.ts, 7, 15)) +} + +declare module "Map" { + import { Cls } from "M"; +>Cls : Symbol(Cls, Decl(O.d.ts, 11, 12)) + + module "Observable" { + interface Observable { +>Observable : Symbol(Observable, Decl(O.d.ts, 2, 29), Decl(O.d.ts, 12, 25)) + + foo(): Cls; +>foo : Symbol(foo, Decl(O.d.ts, 13, 30)) +>Cls : Symbol(Cls, Decl(O.d.ts, 11, 12)) + } + } +} + diff --git a/tests/baselines/reference/moduleAugmentationInAmbientModule1.types b/tests/baselines/reference/moduleAugmentationInAmbientModule1.types new file mode 100644 index 00000000000..0be2a787cb6 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationInAmbientModule1.types @@ -0,0 +1,47 @@ +=== tests/cases/compiler/main.ts === +/// + +import {Observable} from "Observable"; +>Observable : typeof Observable + +let x: Observable; +>x : Observable +>Observable : Observable + +x.foo().x; +>x.foo().x : number +>x.foo() : Cls +>x.foo : () => Cls +>x : Observable +>foo : () => Cls +>x : number + +=== tests/cases/compiler/O.d.ts === + + +declare module "Observable" { + class Observable {} +>Observable : Observable +} + +declare module "M" { + class Cls { x: number } +>Cls : Cls +>x : number +} + +declare module "Map" { + import { Cls } from "M"; +>Cls : typeof Cls + + module "Observable" { + interface Observable { +>Observable : Observable + + foo(): Cls; +>foo : () => Cls +>Cls : Cls + } + } +} + diff --git a/tests/baselines/reference/moduleAugmentationInAmbientModule2.js b/tests/baselines/reference/moduleAugmentationInAmbientModule2.js new file mode 100644 index 00000000000..5529afc674f --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationInAmbientModule2.js @@ -0,0 +1,36 @@ +//// [tests/cases/compiler/moduleAugmentationInAmbientModule2.ts] //// + +//// [O.d.ts] + +declare module "Observable" { + class Observable {} +} + +declare module "M" { + class Cls { x: number } +} + +declare module "Map" { + import { Cls } from "M"; + module "Observable" { + interface Observable { + foo(): Cls; + } + } +} + +//// [main.ts] +/// + +import {Observable} from "Observable"; +import "Map"; +let x: Observable; +x.foo().x; + + +//// [main.js] +/// +"use strict"; +require("Map"); +var x; +x.foo().x; diff --git a/tests/baselines/reference/moduleAugmentationInAmbientModule2.symbols b/tests/baselines/reference/moduleAugmentationInAmbientModule2.symbols new file mode 100644 index 00000000000..6308e67b3b9 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationInAmbientModule2.symbols @@ -0,0 +1,46 @@ +=== tests/cases/compiler/main.ts === +/// + +import {Observable} from "Observable"; +>Observable : Symbol(Observable, Decl(main.ts, 2, 8)) + +import "Map"; +let x: Observable; +>x : Symbol(x, Decl(main.ts, 4, 3)) +>Observable : Symbol(Observable, Decl(main.ts, 2, 8)) + +x.foo().x; +>x.foo().x : Symbol(Cls.x, Decl(O.d.ts, 6, 15)) +>x.foo : Symbol(Observable.foo, Decl(O.d.ts, 12, 30)) +>x : Symbol(x, Decl(main.ts, 4, 3)) +>foo : Symbol(Observable.foo, Decl(O.d.ts, 12, 30)) +>x : Symbol(Cls.x, Decl(O.d.ts, 6, 15)) + +=== tests/cases/compiler/O.d.ts === + +declare module "Observable" { + class Observable {} +>Observable : Symbol(Observable, Decl(O.d.ts, 1, 29), Decl(O.d.ts, 11, 25)) +} + +declare module "M" { + class Cls { x: number } +>Cls : Symbol(Cls, Decl(O.d.ts, 5, 20)) +>x : Symbol(x, Decl(O.d.ts, 6, 15)) +} + +declare module "Map" { + import { Cls } from "M"; +>Cls : Symbol(Cls, Decl(O.d.ts, 10, 12)) + + module "Observable" { + interface Observable { +>Observable : Symbol(Observable, Decl(O.d.ts, 1, 29), Decl(O.d.ts, 11, 25)) + + foo(): Cls; +>foo : Symbol(foo, Decl(O.d.ts, 12, 30)) +>Cls : Symbol(Cls, Decl(O.d.ts, 10, 12)) + } + } +} + diff --git a/tests/baselines/reference/moduleAugmentationInAmbientModule2.types b/tests/baselines/reference/moduleAugmentationInAmbientModule2.types new file mode 100644 index 00000000000..31ea8904c2a --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationInAmbientModule2.types @@ -0,0 +1,47 @@ +=== tests/cases/compiler/main.ts === +/// + +import {Observable} from "Observable"; +>Observable : typeof Observable + +import "Map"; +let x: Observable; +>x : Observable +>Observable : Observable + +x.foo().x; +>x.foo().x : number +>x.foo() : Cls +>x.foo : () => Cls +>x : Observable +>foo : () => Cls +>x : number + +=== tests/cases/compiler/O.d.ts === + +declare module "Observable" { + class Observable {} +>Observable : Observable +} + +declare module "M" { + class Cls { x: number } +>Cls : Cls +>x : number +} + +declare module "Map" { + import { Cls } from "M"; +>Cls : typeof Cls + + module "Observable" { + interface Observable { +>Observable : Observable + + foo(): Cls; +>foo : () => Cls +>Cls : Cls + } + } +} + diff --git a/tests/baselines/reference/moduleAugmentationInAmbientModule3.js b/tests/baselines/reference/moduleAugmentationInAmbientModule3.js new file mode 100644 index 00000000000..3a94c50ef1f --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationInAmbientModule3.js @@ -0,0 +1,47 @@ +//// [tests/cases/compiler/moduleAugmentationInAmbientModule3.ts] //// + +//// [O.d.ts] + +declare module "Observable" { + class Observable {} +} + +declare module "M" { + class Cls { x: number } +} + +declare module "Map" { + import { Cls } from "M"; + module "Observable" { + interface Observable { + foo(): Cls; + } + } +} + +declare module "Map" { + class Cls2 { x2: number } + module "Observable" { + interface Observable { + foo2(): Cls2; + } + } +} + +//// [main.ts] +/// + +import {Observable} from "Observable"; +import "Map"; +let x: Observable; +x.foo().x; +x.foo2().x2; + + +//// [main.js] +/// +"use strict"; +require("Map"); +var x; +x.foo().x; +x.foo2().x2; diff --git a/tests/baselines/reference/moduleAugmentationInAmbientModule3.symbols b/tests/baselines/reference/moduleAugmentationInAmbientModule3.symbols new file mode 100644 index 00000000000..34eea56753f --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationInAmbientModule3.symbols @@ -0,0 +1,69 @@ +=== tests/cases/compiler/main.ts === +/// + +import {Observable} from "Observable"; +>Observable : Symbol(Observable, Decl(main.ts, 2, 8)) + +import "Map"; +let x: Observable; +>x : Symbol(x, Decl(main.ts, 4, 3)) +>Observable : Symbol(Observable, Decl(main.ts, 2, 8)) + +x.foo().x; +>x.foo().x : Symbol(Cls.x, Decl(O.d.ts, 6, 15)) +>x.foo : Symbol(Observable.foo, Decl(O.d.ts, 12, 30)) +>x : Symbol(x, Decl(main.ts, 4, 3)) +>foo : Symbol(Observable.foo, Decl(O.d.ts, 12, 30)) +>x : Symbol(Cls.x, Decl(O.d.ts, 6, 15)) + +x.foo2().x2; +>x.foo2().x2 : Symbol(Cls2.x2, Decl(O.d.ts, 19, 16)) +>x.foo2 : Symbol(Observable.foo2, Decl(O.d.ts, 21, 30)) +>x : Symbol(x, Decl(main.ts, 4, 3)) +>foo2 : Symbol(Observable.foo2, Decl(O.d.ts, 21, 30)) +>x2 : Symbol(Cls2.x2, Decl(O.d.ts, 19, 16)) + +=== tests/cases/compiler/O.d.ts === + +declare module "Observable" { + class Observable {} +>Observable : Symbol(Observable, Decl(O.d.ts, 1, 29), Decl(O.d.ts, 11, 25), Decl(O.d.ts, 20, 25)) +} + +declare module "M" { + class Cls { x: number } +>Cls : Symbol(Cls, Decl(O.d.ts, 5, 20)) +>x : Symbol(x, Decl(O.d.ts, 6, 15)) +} + +declare module "Map" { + import { Cls } from "M"; +>Cls : Symbol(Cls, Decl(O.d.ts, 10, 12)) + + module "Observable" { + interface Observable { +>Observable : Symbol(Observable, Decl(O.d.ts, 1, 29), Decl(O.d.ts, 11, 25), Decl(O.d.ts, 20, 25)) + + foo(): Cls; +>foo : Symbol(foo, Decl(O.d.ts, 12, 30)) +>Cls : Symbol(Cls, Decl(O.d.ts, 10, 12)) + } + } +} + +declare module "Map" { + class Cls2 { x2: number } +>Cls2 : Symbol(Cls2, Decl(O.d.ts, 18, 22)) +>x2 : Symbol(x2, Decl(O.d.ts, 19, 16)) + + module "Observable" { + interface Observable { +>Observable : Symbol(Observable, Decl(O.d.ts, 1, 29), Decl(O.d.ts, 11, 25), Decl(O.d.ts, 20, 25)) + + foo2(): Cls2; +>foo2 : Symbol(foo2, Decl(O.d.ts, 21, 30)) +>Cls2 : Symbol(Cls2, Decl(O.d.ts, 18, 22)) + } + } +} + diff --git a/tests/baselines/reference/moduleAugmentationInAmbientModule3.types b/tests/baselines/reference/moduleAugmentationInAmbientModule3.types new file mode 100644 index 00000000000..2cec5edc6bf --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationInAmbientModule3.types @@ -0,0 +1,71 @@ +=== tests/cases/compiler/main.ts === +/// + +import {Observable} from "Observable"; +>Observable : typeof Observable + +import "Map"; +let x: Observable; +>x : Observable +>Observable : Observable + +x.foo().x; +>x.foo().x : number +>x.foo() : Cls +>x.foo : () => Cls +>x : Observable +>foo : () => Cls +>x : number + +x.foo2().x2; +>x.foo2().x2 : number +>x.foo2() : Cls2 +>x.foo2 : () => Cls2 +>x : Observable +>foo2 : () => Cls2 +>x2 : number + +=== tests/cases/compiler/O.d.ts === + +declare module "Observable" { + class Observable {} +>Observable : Observable +} + +declare module "M" { + class Cls { x: number } +>Cls : Cls +>x : number +} + +declare module "Map" { + import { Cls } from "M"; +>Cls : typeof Cls + + module "Observable" { + interface Observable { +>Observable : Observable + + foo(): Cls; +>foo : () => Cls +>Cls : Cls + } + } +} + +declare module "Map" { + class Cls2 { x2: number } +>Cls2 : Cls2 +>x2 : number + + module "Observable" { + interface Observable { +>Observable : Observable + + foo2(): Cls2; +>foo2 : () => Cls2 +>Cls2 : Cls2 + } + } +} + diff --git a/tests/baselines/reference/moduleAugmentationInAmbientModule4.js b/tests/baselines/reference/moduleAugmentationInAmbientModule4.js new file mode 100644 index 00000000000..bf0339d3107 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationInAmbientModule4.js @@ -0,0 +1,50 @@ +//// [tests/cases/compiler/moduleAugmentationInAmbientModule4.ts] //// + +//// [O.d.ts] + +declare module "Observable" { + class Observable {} +} + +declare module "M" { + class Cls { x: number } +} + +declare module "Map" { + import { Cls } from "M"; + module "Observable" { + interface Observable { + foo(): Cls; + } + } +} + +//// [O2.d.ts] +declare module "Map" { + class Cls2 { x2: number } + module "Observable" { + interface Observable { + foo2(): Cls2; + } + } +} + +//// [main.ts] +/// +/// + +import {Observable} from "Observable"; +import "Map"; +let x: Observable; +x.foo().x; +x.foo2().x2; + + +//// [main.js] +/// +/// +"use strict"; +require("Map"); +var x; +x.foo().x; +x.foo2().x2; diff --git a/tests/baselines/reference/moduleAugmentationInAmbientModule4.symbols b/tests/baselines/reference/moduleAugmentationInAmbientModule4.symbols new file mode 100644 index 00000000000..55658c2a52e --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationInAmbientModule4.symbols @@ -0,0 +1,71 @@ +=== tests/cases/compiler/main.ts === +/// +/// + +import {Observable} from "Observable"; +>Observable : Symbol(Observable, Decl(main.ts, 3, 8)) + +import "Map"; +let x: Observable; +>x : Symbol(x, Decl(main.ts, 5, 3)) +>Observable : Symbol(Observable, Decl(main.ts, 3, 8)) + +x.foo().x; +>x.foo().x : Symbol(Cls.x, Decl(O.d.ts, 6, 15)) +>x.foo : Symbol(Observable.foo, Decl(O.d.ts, 12, 30)) +>x : Symbol(x, Decl(main.ts, 5, 3)) +>foo : Symbol(Observable.foo, Decl(O.d.ts, 12, 30)) +>x : Symbol(Cls.x, Decl(O.d.ts, 6, 15)) + +x.foo2().x2; +>x.foo2().x2 : Symbol(Cls2.x2, Decl(O2.d.ts, 1, 16)) +>x.foo2 : Symbol(Observable.foo2, Decl(O2.d.ts, 3, 30)) +>x : Symbol(x, Decl(main.ts, 5, 3)) +>foo2 : Symbol(Observable.foo2, Decl(O2.d.ts, 3, 30)) +>x2 : Symbol(Cls2.x2, Decl(O2.d.ts, 1, 16)) + +=== tests/cases/compiler/O.d.ts === + +declare module "Observable" { + class Observable {} +>Observable : Symbol(Observable, Decl(O.d.ts, 1, 29), Decl(O.d.ts, 11, 25), Decl(O2.d.ts, 2, 25)) +} + +declare module "M" { + class Cls { x: number } +>Cls : Symbol(Cls, Decl(O.d.ts, 5, 20)) +>x : Symbol(x, Decl(O.d.ts, 6, 15)) +} + +declare module "Map" { + import { Cls } from "M"; +>Cls : Symbol(Cls, Decl(O.d.ts, 10, 12)) + + module "Observable" { + interface Observable { +>Observable : Symbol(Observable, Decl(O.d.ts, 1, 29), Decl(O.d.ts, 11, 25), Decl(O2.d.ts, 2, 25)) + + foo(): Cls; +>foo : Symbol(foo, Decl(O.d.ts, 12, 30)) +>Cls : Symbol(Cls, Decl(O.d.ts, 10, 12)) + } + } +} + +=== tests/cases/compiler/O2.d.ts === +declare module "Map" { + class Cls2 { x2: number } +>Cls2 : Symbol(Cls2, Decl(O2.d.ts, 0, 22)) +>x2 : Symbol(x2, Decl(O2.d.ts, 1, 16)) + + module "Observable" { + interface Observable { +>Observable : Symbol(Observable, Decl(O.d.ts, 1, 29), Decl(O.d.ts, 11, 25), Decl(O2.d.ts, 2, 25)) + + foo2(): Cls2; +>foo2 : Symbol(foo2, Decl(O2.d.ts, 3, 30)) +>Cls2 : Symbol(Cls2, Decl(O2.d.ts, 0, 22)) + } + } +} + diff --git a/tests/baselines/reference/moduleAugmentationInAmbientModule4.types b/tests/baselines/reference/moduleAugmentationInAmbientModule4.types new file mode 100644 index 00000000000..04791aef860 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationInAmbientModule4.types @@ -0,0 +1,73 @@ +=== tests/cases/compiler/main.ts === +/// +/// + +import {Observable} from "Observable"; +>Observable : typeof Observable + +import "Map"; +let x: Observable; +>x : Observable +>Observable : Observable + +x.foo().x; +>x.foo().x : number +>x.foo() : Cls +>x.foo : () => Cls +>x : Observable +>foo : () => Cls +>x : number + +x.foo2().x2; +>x.foo2().x2 : number +>x.foo2() : Cls2 +>x.foo2 : () => Cls2 +>x : Observable +>foo2 : () => Cls2 +>x2 : number + +=== tests/cases/compiler/O.d.ts === + +declare module "Observable" { + class Observable {} +>Observable : Observable +} + +declare module "M" { + class Cls { x: number } +>Cls : Cls +>x : number +} + +declare module "Map" { + import { Cls } from "M"; +>Cls : typeof Cls + + module "Observable" { + interface Observable { +>Observable : Observable + + foo(): Cls; +>foo : () => Cls +>Cls : Cls + } + } +} + +=== tests/cases/compiler/O2.d.ts === +declare module "Map" { + class Cls2 { x2: number } +>Cls2 : Cls2 +>x2 : number + + module "Observable" { + interface Observable { +>Observable : Observable + + foo2(): Cls2; +>foo2 : () => Cls2 +>Cls2 : Cls2 + } + } +} + diff --git a/tests/baselines/reference/moduleAugmentationNoNewNames.errors.txt b/tests/baselines/reference/moduleAugmentationNoNewNames.errors.txt new file mode 100644 index 00000000000..a39ae452679 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationNoNewNames.errors.txt @@ -0,0 +1,47 @@ +tests/cases/compiler/map.ts(10,11): error TS2662: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/map.ts(11,9): error TS2662: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/map.ts(11,20): error TS2662: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/map.ts(12,13): error TS2662: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/map.ts(12,19): error TS2662: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/map.ts(13,12): error TS2662: Module augmentation cannot introduce new names in the top level scope. + + +==== tests/cases/compiler/map.ts (6 errors) ==== + + import { Observable } from "./observable" + + (Observable.prototype).map = function() { } + + declare module "./observable" { + interface Observable { + map(proj: (e:T) => U): Observable + } + class Bar {} + ~~~ +!!! error TS2662: Module augmentation cannot introduce new names in the top level scope. + let y: number, z: string; + ~ +!!! error TS2662: Module augmentation cannot introduce new names in the top level scope. + ~ +!!! error TS2662: Module augmentation cannot introduce new names in the top level scope. + let {a: x, b: x1}: {a: number, b: number}; + ~ +!!! error TS2662: Module augmentation cannot introduce new names in the top level scope. + ~~ +!!! error TS2662: Module augmentation cannot introduce new names in the top level scope. + module Z {} + ~ +!!! error TS2662: Module augmentation cannot introduce new names in the top level scope. + } + +==== tests/cases/compiler/observable.ts (0 errors) ==== + export declare class Observable { + filter(pred: (e:T) => boolean): Observable; + } + +==== tests/cases/compiler/main.ts (0 errors) ==== + import { Observable } from "./observable" + import "./map"; + + let x: Observable; + let y = x.map(x => x + 1); \ No newline at end of file diff --git a/tests/baselines/reference/moduleAugmentationNoNewNames.js b/tests/baselines/reference/moduleAugmentationNoNewNames.js new file mode 100644 index 00000000000..ccd4a668497 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationNoNewNames.js @@ -0,0 +1,41 @@ +//// [tests/cases/compiler/moduleAugmentationNoNewNames.ts] //// + +//// [map.ts] + +import { Observable } from "./observable" + +(Observable.prototype).map = function() { } + +declare module "./observable" { + interface Observable { + map(proj: (e:T) => U): Observable + } + class Bar {} + let y: number, z: string; + let {a: x, b: x1}: {a: number, b: number}; + module Z {} +} + +//// [observable.ts] +export declare class Observable { + filter(pred: (e:T) => boolean): Observable; +} + +//// [main.ts] +import { Observable } from "./observable" +import "./map"; + +let x: Observable; +let y = x.map(x => x + 1); + +//// [observable.js] +"use strict"; +//// [map.js] +"use strict"; +var observable_1 = require("./observable"); +observable_1.Observable.prototype.map = function () { }; +//// [main.js] +"use strict"; +require("./map"); +var x; +var y = x.map(function (x) { return x + 1; }); diff --git a/tests/baselines/reference/moduleAugmentationsBundledOutput1.js b/tests/baselines/reference/moduleAugmentationsBundledOutput1.js new file mode 100644 index 00000000000..92916206e76 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationsBundledOutput1.js @@ -0,0 +1,142 @@ +//// [tests/cases/compiler/moduleAugmentationsBundledOutput1.ts] //// + +//// [m1.ts] + +export class Cls { +} + +//// [m2.ts] +import {Cls} from "./m1"; +(Cls.prototype).foo = function() { return 1; }; +(Cls.prototype).bar = function() { return "1"; }; + +declare module "./m1" { + interface Cls { + foo(): number; + } +} + +declare module "./m1" { + interface Cls { + bar(): string; + } +} + +//// [m3.ts] +export class C1 { x: number } +export class C2 { x: string } + +//// [m4.ts] +import {Cls} from "./m1"; +import {C1, C2} from "./m3"; +(Cls.prototype).baz1 = function() { return undefined }; +(Cls.prototype).baz2 = function() { return undefined }; + +declare module "./m1" { + interface Cls { + baz1(): C1; + } +} + +declare module "./m1" { + interface Cls { + baz2(): C2; + } +} + +//// [test.ts] +import { Cls } from "./m1"; +import "m2"; +import "m4"; +let c: Cls; +c.foo().toExponential(); +c.bar().toLowerCase(); +c.baz1().x.toExponential(); +c.baz2().x.toLowerCase(); + + +//// [out.js] +define("m1", ["require", "exports"], function (require, exports) { + "use strict"; + var Cls = (function () { + function Cls() { + } + return Cls; + }()); + exports.Cls = Cls; +}); +define("m2", ["require", "exports", "m1"], function (require, exports, m1_1) { + "use strict"; + m1_1.Cls.prototype.foo = function () { return 1; }; + m1_1.Cls.prototype.bar = function () { return "1"; }; +}); +define("m3", ["require", "exports"], function (require, exports) { + "use strict"; + var C1 = (function () { + function C1() { + } + return C1; + }()); + exports.C1 = C1; + var C2 = (function () { + function C2() { + } + return C2; + }()); + exports.C2 = C2; +}); +define("m4", ["require", "exports", "m1"], function (require, exports, m1_2) { + "use strict"; + m1_2.Cls.prototype.baz1 = function () { return undefined; }; + m1_2.Cls.prototype.baz2 = function () { return undefined; }; +}); +define("test", ["require", "exports", "m2", "m4"], function (require, exports) { + "use strict"; + var c; + c.foo().toExponential(); + c.bar().toLowerCase(); + c.baz1().x.toExponential(); + c.baz2().x.toLowerCase(); +}); + + +//// [out.d.ts] +declare module "m1" { + export class Cls { + } +} +declare module "m2" { + module "m1" { + interface Cls { + foo(): number; + } + } + module "m1" { + interface Cls { + bar(): string; + } + } +} +declare module "m3" { + export class C1 { + x: number; + } + export class C2 { + x: string; + } +} +declare module "m4" { + import { C1, C2 } from "m3"; + module "m1" { + interface Cls { + baz1(): C1; + } + } + module "m1" { + interface Cls { + baz2(): C2; + } + } +} +declare module "test" { +} diff --git a/tests/baselines/reference/moduleAugmentationsBundledOutput1.symbols b/tests/baselines/reference/moduleAugmentationsBundledOutput1.symbols new file mode 100644 index 00000000000..47160cbc17f --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationsBundledOutput1.symbols @@ -0,0 +1,129 @@ +=== tests/cases/compiler/m1.ts === + +export class Cls { +>Cls : Symbol(Cls, Decl(m1.ts, 0, 0), Decl(m2.ts, 4, 23), Decl(m2.ts, 10, 23), Decl(m4.ts, 5, 23), Decl(m4.ts, 11, 23)) +} + +=== tests/cases/compiler/m2.ts === +import {Cls} from "./m1"; +>Cls : Symbol(Cls, Decl(m2.ts, 0, 8)) + +(Cls.prototype).foo = function() { return 1; }; +>Cls.prototype : Symbol(Cls.prototype) +>Cls : Symbol(Cls, Decl(m2.ts, 0, 8)) +>prototype : Symbol(Cls.prototype) + +(Cls.prototype).bar = function() { return "1"; }; +>Cls.prototype : Symbol(Cls.prototype) +>Cls : Symbol(Cls, Decl(m2.ts, 0, 8)) +>prototype : Symbol(Cls.prototype) + +declare module "./m1" { + interface Cls { +>Cls : Symbol(Cls, Decl(m1.ts, 0, 0), Decl(m2.ts, 4, 23), Decl(m2.ts, 10, 23), Decl(m4.ts, 5, 23), Decl(m4.ts, 11, 23)) + + foo(): number; +>foo : Symbol(foo, Decl(m2.ts, 5, 19)) + } +} + +declare module "./m1" { + interface Cls { +>Cls : Symbol(Cls, Decl(m1.ts, 0, 0), Decl(m2.ts, 4, 23), Decl(m2.ts, 10, 23), Decl(m4.ts, 5, 23), Decl(m4.ts, 11, 23)) + + bar(): string; +>bar : Symbol(bar, Decl(m2.ts, 11, 19)) + } +} + +=== tests/cases/compiler/m3.ts === +export class C1 { x: number } +>C1 : Symbol(C1, Decl(m3.ts, 0, 0)) +>x : Symbol(x, Decl(m3.ts, 0, 17)) + +export class C2 { x: string } +>C2 : Symbol(C2, Decl(m3.ts, 0, 29)) +>x : Symbol(x, Decl(m3.ts, 1, 17)) + +=== tests/cases/compiler/m4.ts === +import {Cls} from "./m1"; +>Cls : Symbol(Cls, Decl(m4.ts, 0, 8)) + +import {C1, C2} from "./m3"; +>C1 : Symbol(C1, Decl(m4.ts, 1, 8)) +>C2 : Symbol(C2, Decl(m4.ts, 1, 11)) + +(Cls.prototype).baz1 = function() { return undefined }; +>Cls.prototype : Symbol(Cls.prototype) +>Cls : Symbol(Cls, Decl(m4.ts, 0, 8)) +>prototype : Symbol(Cls.prototype) +>undefined : Symbol(undefined) + +(Cls.prototype).baz2 = function() { return undefined }; +>Cls.prototype : Symbol(Cls.prototype) +>Cls : Symbol(Cls, Decl(m4.ts, 0, 8)) +>prototype : Symbol(Cls.prototype) +>undefined : Symbol(undefined) + +declare module "./m1" { + interface Cls { +>Cls : Symbol(Cls, Decl(m1.ts, 0, 0), Decl(m2.ts, 4, 23), Decl(m2.ts, 10, 23), Decl(m4.ts, 5, 23), Decl(m4.ts, 11, 23)) + + baz1(): C1; +>baz1 : Symbol(baz1, Decl(m4.ts, 6, 19)) +>C1 : Symbol(C1, Decl(m4.ts, 1, 8)) + } +} + +declare module "./m1" { + interface Cls { +>Cls : Symbol(Cls, Decl(m1.ts, 0, 0), Decl(m2.ts, 4, 23), Decl(m2.ts, 10, 23), Decl(m4.ts, 5, 23), Decl(m4.ts, 11, 23)) + + baz2(): C2; +>baz2 : Symbol(baz2, Decl(m4.ts, 12, 19)) +>C2 : Symbol(C2, Decl(m4.ts, 1, 11)) + } +} + +=== tests/cases/compiler/test.ts === +import { Cls } from "./m1"; +>Cls : Symbol(Cls, Decl(test.ts, 0, 8)) + +import "m2"; +import "m4"; +let c: Cls; +>c : Symbol(c, Decl(test.ts, 3, 3)) +>Cls : Symbol(Cls, Decl(test.ts, 0, 8)) + +c.foo().toExponential(); +>c.foo().toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>c.foo : Symbol(Cls.foo, Decl(m2.ts, 5, 19)) +>c : Symbol(c, Decl(test.ts, 3, 3)) +>foo : Symbol(Cls.foo, Decl(m2.ts, 5, 19)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +c.bar().toLowerCase(); +>c.bar().toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) +>c.bar : Symbol(Cls.bar, Decl(m2.ts, 11, 19)) +>c : Symbol(c, Decl(test.ts, 3, 3)) +>bar : Symbol(Cls.bar, Decl(m2.ts, 11, 19)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) + +c.baz1().x.toExponential(); +>c.baz1().x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>c.baz1().x : Symbol(C1.x, Decl(m3.ts, 0, 17)) +>c.baz1 : Symbol(Cls.baz1, Decl(m4.ts, 6, 19)) +>c : Symbol(c, Decl(test.ts, 3, 3)) +>baz1 : Symbol(Cls.baz1, Decl(m4.ts, 6, 19)) +>x : Symbol(C1.x, Decl(m3.ts, 0, 17)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +c.baz2().x.toLowerCase(); +>c.baz2().x.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) +>c.baz2().x : Symbol(C2.x, Decl(m3.ts, 1, 17)) +>c.baz2 : Symbol(Cls.baz2, Decl(m4.ts, 12, 19)) +>c : Symbol(c, Decl(test.ts, 3, 3)) +>baz2 : Symbol(Cls.baz2, Decl(m4.ts, 12, 19)) +>x : Symbol(C2.x, Decl(m3.ts, 1, 17)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) + diff --git a/tests/baselines/reference/moduleAugmentationsBundledOutput1.types b/tests/baselines/reference/moduleAugmentationsBundledOutput1.types new file mode 100644 index 00000000000..80e9127905d --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationsBundledOutput1.types @@ -0,0 +1,163 @@ +=== tests/cases/compiler/m1.ts === + +export class Cls { +>Cls : Cls +} + +=== tests/cases/compiler/m2.ts === +import {Cls} from "./m1"; +>Cls : typeof Cls + +(Cls.prototype).foo = function() { return 1; }; +>(Cls.prototype).foo = function() { return 1; } : () => number +>(Cls.prototype).foo : any +>(Cls.prototype) : any +>Cls.prototype : any +>Cls.prototype : Cls +>Cls : typeof Cls +>prototype : Cls +>foo : any +>function() { return 1; } : () => number +>1 : number + +(Cls.prototype).bar = function() { return "1"; }; +>(Cls.prototype).bar = function() { return "1"; } : () => string +>(Cls.prototype).bar : any +>(Cls.prototype) : any +>Cls.prototype : any +>Cls.prototype : Cls +>Cls : typeof Cls +>prototype : Cls +>bar : any +>function() { return "1"; } : () => string +>"1" : string + +declare module "./m1" { + interface Cls { +>Cls : Cls + + foo(): number; +>foo : () => number + } +} + +declare module "./m1" { + interface Cls { +>Cls : Cls + + bar(): string; +>bar : () => string + } +} + +=== tests/cases/compiler/m3.ts === +export class C1 { x: number } +>C1 : C1 +>x : number + +export class C2 { x: string } +>C2 : C2 +>x : string + +=== tests/cases/compiler/m4.ts === +import {Cls} from "./m1"; +>Cls : typeof Cls + +import {C1, C2} from "./m3"; +>C1 : typeof C1 +>C2 : typeof C2 + +(Cls.prototype).baz1 = function() { return undefined }; +>(Cls.prototype).baz1 = function() { return undefined } : () => any +>(Cls.prototype).baz1 : any +>(Cls.prototype) : any +>Cls.prototype : any +>Cls.prototype : Cls +>Cls : typeof Cls +>prototype : Cls +>baz1 : any +>function() { return undefined } : () => any +>undefined : undefined + +(Cls.prototype).baz2 = function() { return undefined }; +>(Cls.prototype).baz2 = function() { return undefined } : () => any +>(Cls.prototype).baz2 : any +>(Cls.prototype) : any +>Cls.prototype : any +>Cls.prototype : Cls +>Cls : typeof Cls +>prototype : Cls +>baz2 : any +>function() { return undefined } : () => any +>undefined : undefined + +declare module "./m1" { + interface Cls { +>Cls : Cls + + baz1(): C1; +>baz1 : () => C1 +>C1 : C1 + } +} + +declare module "./m1" { + interface Cls { +>Cls : Cls + + baz2(): C2; +>baz2 : () => C2 +>C2 : C2 + } +} + +=== tests/cases/compiler/test.ts === +import { Cls } from "./m1"; +>Cls : typeof Cls + +import "m2"; +import "m4"; +let c: Cls; +>c : Cls +>Cls : Cls + +c.foo().toExponential(); +>c.foo().toExponential() : string +>c.foo().toExponential : (fractionDigits?: number) => string +>c.foo() : number +>c.foo : () => number +>c : Cls +>foo : () => number +>toExponential : (fractionDigits?: number) => string + +c.bar().toLowerCase(); +>c.bar().toLowerCase() : string +>c.bar().toLowerCase : () => string +>c.bar() : string +>c.bar : () => string +>c : Cls +>bar : () => string +>toLowerCase : () => string + +c.baz1().x.toExponential(); +>c.baz1().x.toExponential() : string +>c.baz1().x.toExponential : (fractionDigits?: number) => string +>c.baz1().x : number +>c.baz1() : C1 +>c.baz1 : () => C1 +>c : Cls +>baz1 : () => C1 +>x : number +>toExponential : (fractionDigits?: number) => string + +c.baz2().x.toLowerCase(); +>c.baz2().x.toLowerCase() : string +>c.baz2().x.toLowerCase : () => string +>c.baz2().x : string +>c.baz2() : C2 +>c.baz2 : () => C2 +>c : Cls +>baz2 : () => C2 +>x : string +>toLowerCase : () => string + diff --git a/tests/baselines/reference/moduleAugmentationsImports1.js b/tests/baselines/reference/moduleAugmentationsImports1.js new file mode 100644 index 00000000000..4730afa4a5f --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationsImports1.js @@ -0,0 +1,104 @@ +//// [tests/cases/compiler/moduleAugmentationsImports1.ts] //// + +//// [a.ts] + +export class A {} + +//// [b.ts] +export class B {x: number;} + +//// [c.d.ts] +declare module "C" { + class Cls {y: string; } +} + +//// [d.ts] +/// + +import {A} from "./a"; +import {B} from "./b"; +import {Cls} from "C"; + +(A.prototype).getB = function () {}; +(A.prototype).getCls = function () {} + +declare module "./a" { + interface A { + getB(): B; + } +} + +declare module "./a" { + interface A { + getCls(): Cls; + } +} + +//// [main.ts] +import {A} from "./a"; +import "d"; + +let a: A; +let b = a.getB().x.toFixed(); +let c = a.getCls().y.toLowerCase(); + +//// [f.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + var A = (function () { + function A() { + } + return A; + }()); + exports.A = A; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + var B = (function () { + function B() { + } + return B; + }()); + exports.B = B; +}); +/// +define("d", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + a_1.A.prototype.getB = function () { }; + a_1.A.prototype.getCls = function () { }; +}); +define("main", ["require", "exports", "d"], function (require, exports) { + "use strict"; + var a; + var b = a.getB().x.toFixed(); + var c = a.getCls().y.toLowerCase(); +}); + + +//// [f.d.ts] +/// +declare module "a" { + export class A { + } +} +declare module "b" { + export class B { + x: number; + } +} +declare module "d" { + import { B } from "b"; + import { Cls } from "C"; + module "a" { + interface A { + getB(): B; + } + } + module "a" { + interface A { + getCls(): Cls; + } + } +} +declare module "main" { +} diff --git a/tests/baselines/reference/moduleAugmentationsImports1.symbols b/tests/baselines/reference/moduleAugmentationsImports1.symbols new file mode 100644 index 00000000000..8f4cfd09868 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationsImports1.symbols @@ -0,0 +1,89 @@ +=== tests/cases/compiler/a.ts === + +export class A {} +>A : Symbol(A, Decl(a.ts, 0, 0), Decl(d.ts, 9, 22), Decl(d.ts, 15, 22)) + +=== tests/cases/compiler/b.ts === +export class B {x: number;} +>B : Symbol(B, Decl(b.ts, 0, 0)) +>x : Symbol(x, Decl(b.ts, 0, 16)) + +=== tests/cases/compiler/c.d.ts === +declare module "C" { + class Cls {y: string; } +>Cls : Symbol(Cls, Decl(c.d.ts, 0, 20)) +>y : Symbol(y, Decl(c.d.ts, 1, 15)) +} + +=== tests/cases/compiler/d.ts === +/// + +import {A} from "./a"; +>A : Symbol(A, Decl(d.ts, 2, 8)) + +import {B} from "./b"; +>B : Symbol(B, Decl(d.ts, 3, 8)) + +import {Cls} from "C"; +>Cls : Symbol(Cls, Decl(d.ts, 4, 8)) + +(A.prototype).getB = function () {}; +>A.prototype : Symbol(A.prototype) +>A : Symbol(A, Decl(d.ts, 2, 8)) +>prototype : Symbol(A.prototype) + +(A.prototype).getCls = function () {} +>A.prototype : Symbol(A.prototype) +>A : Symbol(A, Decl(d.ts, 2, 8)) +>prototype : Symbol(A.prototype) + +declare module "./a" { + interface A { +>A : Symbol(A, Decl(a.ts, 0, 0), Decl(d.ts, 9, 22), Decl(d.ts, 15, 22)) + + getB(): B; +>getB : Symbol(getB, Decl(d.ts, 10, 17)) +>B : Symbol(B, Decl(d.ts, 3, 8)) + } +} + +declare module "./a" { + interface A { +>A : Symbol(A, Decl(a.ts, 0, 0), Decl(d.ts, 9, 22), Decl(d.ts, 15, 22)) + + getCls(): Cls; +>getCls : Symbol(getCls, Decl(d.ts, 16, 17)) +>Cls : Symbol(Cls, Decl(d.ts, 4, 8)) + } +} + +=== tests/cases/compiler/main.ts === +import {A} from "./a"; +>A : Symbol(A, Decl(main.ts, 0, 8)) + +import "d"; + +let a: A; +>a : Symbol(a, Decl(main.ts, 3, 3)) +>A : Symbol(A, Decl(main.ts, 0, 8)) + +let b = a.getB().x.toFixed(); +>b : Symbol(b, Decl(main.ts, 4, 3)) +>a.getB().x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) +>a.getB().x : Symbol(B.x, Decl(b.ts, 0, 16)) +>a.getB : Symbol(A.getB, Decl(d.ts, 10, 17)) +>a : Symbol(a, Decl(main.ts, 3, 3)) +>getB : Symbol(A.getB, Decl(d.ts, 10, 17)) +>x : Symbol(B.x, Decl(b.ts, 0, 16)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) + +let c = a.getCls().y.toLowerCase(); +>c : Symbol(c, Decl(main.ts, 5, 3)) +>a.getCls().y.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) +>a.getCls().y : Symbol(Cls.y, Decl(c.d.ts, 1, 15)) +>a.getCls : Symbol(A.getCls, Decl(d.ts, 16, 17)) +>a : Symbol(a, Decl(main.ts, 3, 3)) +>getCls : Symbol(A.getCls, Decl(d.ts, 16, 17)) +>y : Symbol(Cls.y, Decl(c.d.ts, 1, 15)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) + diff --git a/tests/baselines/reference/moduleAugmentationsImports1.types b/tests/baselines/reference/moduleAugmentationsImports1.types new file mode 100644 index 00000000000..14e0d32da59 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationsImports1.types @@ -0,0 +1,105 @@ +=== tests/cases/compiler/a.ts === + +export class A {} +>A : A + +=== tests/cases/compiler/b.ts === +export class B {x: number;} +>B : B +>x : number + +=== tests/cases/compiler/c.d.ts === +declare module "C" { + class Cls {y: string; } +>Cls : Cls +>y : string +} + +=== tests/cases/compiler/d.ts === +/// + +import {A} from "./a"; +>A : typeof A + +import {B} from "./b"; +>B : typeof B + +import {Cls} from "C"; +>Cls : typeof Cls + +(A.prototype).getB = function () {}; +>(A.prototype).getB = function () {} : () => void +>(A.prototype).getB : any +>(A.prototype) : any +>A.prototype : any +>A.prototype : A +>A : typeof A +>prototype : A +>getB : any +>function () {} : () => void + +(A.prototype).getCls = function () {} +>(A.prototype).getCls = function () {} : () => void +>(A.prototype).getCls : any +>(A.prototype) : any +>A.prototype : any +>A.prototype : A +>A : typeof A +>prototype : A +>getCls : any +>function () {} : () => void + +declare module "./a" { + interface A { +>A : A + + getB(): B; +>getB : () => B +>B : B + } +} + +declare module "./a" { + interface A { +>A : A + + getCls(): Cls; +>getCls : () => Cls +>Cls : Cls + } +} + +=== tests/cases/compiler/main.ts === +import {A} from "./a"; +>A : typeof A + +import "d"; + +let a: A; +>a : A +>A : A + +let b = a.getB().x.toFixed(); +>b : string +>a.getB().x.toFixed() : string +>a.getB().x.toFixed : (fractionDigits?: number) => string +>a.getB().x : number +>a.getB() : B +>a.getB : () => B +>a : A +>getB : () => B +>x : number +>toFixed : (fractionDigits?: number) => string + +let c = a.getCls().y.toLowerCase(); +>c : string +>a.getCls().y.toLowerCase() : string +>a.getCls().y.toLowerCase : () => string +>a.getCls().y : string +>a.getCls() : Cls +>a.getCls : () => Cls +>a : A +>getCls : () => Cls +>y : string +>toLowerCase : () => string + diff --git a/tests/baselines/reference/moduleAugmentationsImports2.js b/tests/baselines/reference/moduleAugmentationsImports2.js new file mode 100644 index 00000000000..b0aee584a55 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationsImports2.js @@ -0,0 +1,114 @@ +//// [tests/cases/compiler/moduleAugmentationsImports2.ts] //// + +//// [a.ts] + +export class A {} + +//// [b.ts] +export class B {x: number;} + +//// [c.d.ts] +declare module "C" { + class Cls {y: string; } +} + +//// [d.ts] +/// + +import {A} from "./a"; +import {B} from "./b"; + +(A.prototype).getB = function () {}; + +declare module "./a" { + interface A { + getB(): B; + } +} + +//// [e.ts] +import {A} from "./a"; +import {Cls} from "C"; + +(A.prototype).getCls = function () {} + +declare module "./a" { + interface A { + getCls(): Cls; + } +} + +//// [main.ts] +import {A} from "./a"; +import "d"; +import "e"; + +let a: A; +let b = a.getB().x.toFixed(); +let c = a.getCls().y.toLowerCase(); + +//// [f.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + var A = (function () { + function A() { + } + return A; + }()); + exports.A = A; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + var B = (function () { + function B() { + } + return B; + }()); + exports.B = B; +}); +/// +define("d", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + a_1.A.prototype.getB = function () { }; +}); +define("e", ["require", "exports", "a"], function (require, exports, a_2) { + "use strict"; + a_2.A.prototype.getCls = function () { }; +}); +define("main", ["require", "exports", "d", "e"], function (require, exports) { + "use strict"; + var a; + var b = a.getB().x.toFixed(); + var c = a.getCls().y.toLowerCase(); +}); + + +//// [f.d.ts] +/// +declare module "a" { + export class A { + } +} +declare module "b" { + export class B { + x: number; + } +} +declare module "d" { + import { B } from "b"; + module "a" { + interface A { + getB(): B; + } + } +} +declare module "e" { + import { Cls } from "C"; + module "a" { + interface A { + getCls(): Cls; + } + } +} +declare module "main" { +} diff --git a/tests/baselines/reference/moduleAugmentationsImports2.symbols b/tests/baselines/reference/moduleAugmentationsImports2.symbols new file mode 100644 index 00000000000..20a5f779b8d --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationsImports2.symbols @@ -0,0 +1,94 @@ +=== tests/cases/compiler/a.ts === + +export class A {} +>A : Symbol(A, Decl(a.ts, 0, 0), Decl(d.ts, 7, 22), Decl(e.ts, 5, 22)) + +=== tests/cases/compiler/b.ts === +export class B {x: number;} +>B : Symbol(B, Decl(b.ts, 0, 0)) +>x : Symbol(x, Decl(b.ts, 0, 16)) + +=== tests/cases/compiler/c.d.ts === +declare module "C" { + class Cls {y: string; } +>Cls : Symbol(Cls, Decl(c.d.ts, 0, 20)) +>y : Symbol(y, Decl(c.d.ts, 1, 15)) +} + +=== tests/cases/compiler/d.ts === +/// + +import {A} from "./a"; +>A : Symbol(A, Decl(d.ts, 2, 8)) + +import {B} from "./b"; +>B : Symbol(B, Decl(d.ts, 3, 8)) + +(A.prototype).getB = function () {}; +>A.prototype : Symbol(A.prototype) +>A : Symbol(A, Decl(d.ts, 2, 8)) +>prototype : Symbol(A.prototype) + +declare module "./a" { + interface A { +>A : Symbol(A, Decl(a.ts, 0, 0), Decl(d.ts, 7, 22), Decl(e.ts, 5, 22)) + + getB(): B; +>getB : Symbol(getB, Decl(d.ts, 8, 17)) +>B : Symbol(B, Decl(d.ts, 3, 8)) + } +} + +=== tests/cases/compiler/e.ts === +import {A} from "./a"; +>A : Symbol(A, Decl(e.ts, 0, 8)) + +import {Cls} from "C"; +>Cls : Symbol(Cls, Decl(e.ts, 1, 8)) + +(A.prototype).getCls = function () {} +>A.prototype : Symbol(A.prototype) +>A : Symbol(A, Decl(e.ts, 0, 8)) +>prototype : Symbol(A.prototype) + +declare module "./a" { + interface A { +>A : Symbol(A, Decl(a.ts, 0, 0), Decl(d.ts, 7, 22), Decl(e.ts, 5, 22)) + + getCls(): Cls; +>getCls : Symbol(getCls, Decl(e.ts, 6, 17)) +>Cls : Symbol(Cls, Decl(e.ts, 1, 8)) + } +} + +=== tests/cases/compiler/main.ts === +import {A} from "./a"; +>A : Symbol(A, Decl(main.ts, 0, 8)) + +import "d"; +import "e"; + +let a: A; +>a : Symbol(a, Decl(main.ts, 4, 3)) +>A : Symbol(A, Decl(main.ts, 0, 8)) + +let b = a.getB().x.toFixed(); +>b : Symbol(b, Decl(main.ts, 5, 3)) +>a.getB().x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) +>a.getB().x : Symbol(B.x, Decl(b.ts, 0, 16)) +>a.getB : Symbol(A.getB, Decl(d.ts, 8, 17)) +>a : Symbol(a, Decl(main.ts, 4, 3)) +>getB : Symbol(A.getB, Decl(d.ts, 8, 17)) +>x : Symbol(B.x, Decl(b.ts, 0, 16)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) + +let c = a.getCls().y.toLowerCase(); +>c : Symbol(c, Decl(main.ts, 6, 3)) +>a.getCls().y.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) +>a.getCls().y : Symbol(Cls.y, Decl(c.d.ts, 1, 15)) +>a.getCls : Symbol(A.getCls, Decl(e.ts, 6, 17)) +>a : Symbol(a, Decl(main.ts, 4, 3)) +>getCls : Symbol(A.getCls, Decl(e.ts, 6, 17)) +>y : Symbol(Cls.y, Decl(c.d.ts, 1, 15)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) + diff --git a/tests/baselines/reference/moduleAugmentationsImports2.types b/tests/baselines/reference/moduleAugmentationsImports2.types new file mode 100644 index 00000000000..b2c20f17886 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationsImports2.types @@ -0,0 +1,110 @@ +=== tests/cases/compiler/a.ts === + +export class A {} +>A : A + +=== tests/cases/compiler/b.ts === +export class B {x: number;} +>B : B +>x : number + +=== tests/cases/compiler/c.d.ts === +declare module "C" { + class Cls {y: string; } +>Cls : Cls +>y : string +} + +=== tests/cases/compiler/d.ts === +/// + +import {A} from "./a"; +>A : typeof A + +import {B} from "./b"; +>B : typeof B + +(A.prototype).getB = function () {}; +>(A.prototype).getB = function () {} : () => void +>(A.prototype).getB : any +>(A.prototype) : any +>A.prototype : any +>A.prototype : A +>A : typeof A +>prototype : A +>getB : any +>function () {} : () => void + +declare module "./a" { + interface A { +>A : A + + getB(): B; +>getB : () => B +>B : B + } +} + +=== tests/cases/compiler/e.ts === +import {A} from "./a"; +>A : typeof A + +import {Cls} from "C"; +>Cls : typeof Cls + +(A.prototype).getCls = function () {} +>(A.prototype).getCls = function () {} : () => void +>(A.prototype).getCls : any +>(A.prototype) : any +>A.prototype : any +>A.prototype : A +>A : typeof A +>prototype : A +>getCls : any +>function () {} : () => void + +declare module "./a" { + interface A { +>A : A + + getCls(): Cls; +>getCls : () => Cls +>Cls : Cls + } +} + +=== tests/cases/compiler/main.ts === +import {A} from "./a"; +>A : typeof A + +import "d"; +import "e"; + +let a: A; +>a : A +>A : A + +let b = a.getB().x.toFixed(); +>b : string +>a.getB().x.toFixed() : string +>a.getB().x.toFixed : (fractionDigits?: number) => string +>a.getB().x : number +>a.getB() : B +>a.getB : () => B +>a : A +>getB : () => B +>x : number +>toFixed : (fractionDigits?: number) => string + +let c = a.getCls().y.toLowerCase(); +>c : string +>a.getCls().y.toLowerCase() : string +>a.getCls().y.toLowerCase : () => string +>a.getCls().y : string +>a.getCls() : Cls +>a.getCls : () => Cls +>a : A +>getCls : () => Cls +>y : string +>toLowerCase : () => string + diff --git a/tests/baselines/reference/moduleAugmentationsImports3.js b/tests/baselines/reference/moduleAugmentationsImports3.js new file mode 100644 index 00000000000..2254d3e3ff9 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationsImports3.js @@ -0,0 +1,101 @@ +//// [tests/cases/compiler/moduleAugmentationsImports3.ts] //// + +//// [a.ts] + +export class A {} + +//// [b.ts] +export class B {x: number;} + +//// [c.d.ts] +declare module "C" { + class Cls {y: string; } +} + +//// [d.d.ts] +declare module "D" { + import {A} from "a"; + import {B} from "b"; + module "a" { + interface A { + getB(): B; + } + } +} + +//// [e.ts] +/// +import {A} from "./a"; +import {Cls} from "C"; + +(A.prototype).getCls = function () {} + +declare module "./a" { + interface A { + getCls(): Cls; + } +} + +//// [main.ts] +/// +import {A} from "./a"; +import "D"; +import "e"; + +let a: A; +let b = a.getB().x.toFixed(); +let c = a.getCls().y.toLowerCase(); + +//// [f.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + var A = (function () { + function A() { + } + return A; + }()); + exports.A = A; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + var B = (function () { + function B() { + } + return B; + }()); + exports.B = B; +}); +define("e", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + a_1.A.prototype.getCls = function () { }; +}); +define("main", ["require", "exports", "D", "e"], function (require, exports) { + "use strict"; + var a; + var b = a.getB().x.toFixed(); + var c = a.getCls().y.toLowerCase(); +}); + + +//// [f.d.ts] +/// +/// +declare module "a" { + export class A { + } +} +declare module "b" { + export class B { + x: number; + } +} +declare module "e" { + import { Cls } from "C"; + module "a" { + interface A { + getCls(): Cls; + } + } +} +declare module "main" { +} diff --git a/tests/baselines/reference/moduleAugmentationsImports3.symbols b/tests/baselines/reference/moduleAugmentationsImports3.symbols new file mode 100644 index 00000000000..514e412c5cf --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationsImports3.symbols @@ -0,0 +1,91 @@ +=== tests/cases/compiler/main.ts === +/// +import {A} from "./a"; +>A : Symbol(A, Decl(main.ts, 1, 8)) + +import "D"; +import "e"; + +let a: A; +>a : Symbol(a, Decl(main.ts, 5, 3)) +>A : Symbol(A, Decl(main.ts, 1, 8)) + +let b = a.getB().x.toFixed(); +>b : Symbol(b, Decl(main.ts, 6, 3)) +>a.getB().x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) +>a.getB().x : Symbol(B.x, Decl(b.ts, 0, 16)) +>a.getB : Symbol(A.getB, Decl(d.d.ts, 4, 21)) +>a : Symbol(a, Decl(main.ts, 5, 3)) +>getB : Symbol(A.getB, Decl(d.d.ts, 4, 21)) +>x : Symbol(B.x, Decl(b.ts, 0, 16)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) + +let c = a.getCls().y.toLowerCase(); +>c : Symbol(c, Decl(main.ts, 7, 3)) +>a.getCls().y.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) +>a.getCls().y : Symbol(Cls.y, Decl(c.d.ts, 1, 15)) +>a.getCls : Symbol(A.getCls, Decl(e.ts, 7, 17)) +>a : Symbol(a, Decl(main.ts, 5, 3)) +>getCls : Symbol(A.getCls, Decl(e.ts, 7, 17)) +>y : Symbol(Cls.y, Decl(c.d.ts, 1, 15)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) + +=== tests/cases/compiler/a.ts === + +export class A {} +>A : Symbol(A, Decl(a.ts, 0, 0), Decl(d.d.ts, 3, 16), Decl(e.ts, 6, 22)) + +=== tests/cases/compiler/b.ts === +export class B {x: number;} +>B : Symbol(B, Decl(b.ts, 0, 0)) +>x : Symbol(x, Decl(b.ts, 0, 16)) + +=== tests/cases/compiler/c.d.ts === +declare module "C" { + class Cls {y: string; } +>Cls : Symbol(Cls, Decl(c.d.ts, 0, 20)) +>y : Symbol(y, Decl(c.d.ts, 1, 15)) +} + +=== tests/cases/compiler/d.d.ts === +declare module "D" { + import {A} from "a"; +>A : Symbol(A, Decl(d.d.ts, 1, 12)) + + import {B} from "b"; +>B : Symbol(B, Decl(d.d.ts, 2, 12)) + + module "a" { + interface A { +>A : Symbol(A, Decl(a.ts, 0, 0), Decl(d.d.ts, 3, 16), Decl(e.ts, 6, 22)) + + getB(): B; +>getB : Symbol(getB, Decl(d.d.ts, 4, 21)) +>B : Symbol(B, Decl(d.d.ts, 2, 12)) + } + } +} + +=== tests/cases/compiler/e.ts === +/// +import {A} from "./a"; +>A : Symbol(A, Decl(e.ts, 1, 8)) + +import {Cls} from "C"; +>Cls : Symbol(Cls, Decl(e.ts, 2, 8)) + +(A.prototype).getCls = function () {} +>A.prototype : Symbol(A.prototype) +>A : Symbol(A, Decl(e.ts, 1, 8)) +>prototype : Symbol(A.prototype) + +declare module "./a" { + interface A { +>A : Symbol(A, Decl(a.ts, 0, 0), Decl(d.d.ts, 3, 16), Decl(e.ts, 6, 22)) + + getCls(): Cls; +>getCls : Symbol(getCls, Decl(e.ts, 7, 17)) +>Cls : Symbol(Cls, Decl(e.ts, 2, 8)) + } +} + diff --git a/tests/baselines/reference/moduleAugmentationsImports3.types b/tests/baselines/reference/moduleAugmentationsImports3.types new file mode 100644 index 00000000000..ba930c4f857 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationsImports3.types @@ -0,0 +1,101 @@ +=== tests/cases/compiler/main.ts === +/// +import {A} from "./a"; +>A : typeof A + +import "D"; +import "e"; + +let a: A; +>a : A +>A : A + +let b = a.getB().x.toFixed(); +>b : string +>a.getB().x.toFixed() : string +>a.getB().x.toFixed : (fractionDigits?: number) => string +>a.getB().x : number +>a.getB() : B +>a.getB : () => B +>a : A +>getB : () => B +>x : number +>toFixed : (fractionDigits?: number) => string + +let c = a.getCls().y.toLowerCase(); +>c : string +>a.getCls().y.toLowerCase() : string +>a.getCls().y.toLowerCase : () => string +>a.getCls().y : string +>a.getCls() : Cls +>a.getCls : () => Cls +>a : A +>getCls : () => Cls +>y : string +>toLowerCase : () => string + +=== tests/cases/compiler/a.ts === + +export class A {} +>A : A + +=== tests/cases/compiler/b.ts === +export class B {x: number;} +>B : B +>x : number + +=== tests/cases/compiler/c.d.ts === +declare module "C" { + class Cls {y: string; } +>Cls : Cls +>y : string +} + +=== tests/cases/compiler/d.d.ts === +declare module "D" { + import {A} from "a"; +>A : typeof A + + import {B} from "b"; +>B : typeof B + + module "a" { + interface A { +>A : A + + getB(): B; +>getB : () => B +>B : B + } + } +} + +=== tests/cases/compiler/e.ts === +/// +import {A} from "./a"; +>A : typeof A + +import {Cls} from "C"; +>Cls : typeof Cls + +(A.prototype).getCls = function () {} +>(A.prototype).getCls = function () {} : () => void +>(A.prototype).getCls : any +>(A.prototype) : any +>A.prototype : any +>A.prototype : A +>A : typeof A +>prototype : A +>getCls : any +>function () {} : () => void + +declare module "./a" { + interface A { +>A : A + + getCls(): Cls; +>getCls : () => Cls +>Cls : Cls + } +} + diff --git a/tests/baselines/reference/moduleAugmentationsImports4.js b/tests/baselines/reference/moduleAugmentationsImports4.js new file mode 100644 index 00000000000..9b64016113f --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationsImports4.js @@ -0,0 +1,90 @@ +//// [tests/cases/compiler/moduleAugmentationsImports4.ts] //// + +//// [a.ts] + +export class A {} + +//// [b.ts] +export class B {x: number;} + +//// [c.d.ts] +declare module "C" { + class Cls {y: string; } +} + +//// [d.d.ts] +declare module "D" { + import {A} from "a"; + import {B} from "b"; + module "a" { + interface A { + getB(): B; + } + } +} + +//// [e.d.ts] +/// +declare module "E" { + import {A} from "a"; + import {Cls} from "C"; + + module "a" { + interface A { + getCls(): Cls; + } + } +} + +//// [main.ts] +/// +/// +import {A} from "./a"; +import "D"; +import "E"; + +let a: A; +let b = a.getB().x.toFixed(); +let c = a.getCls().y.toLowerCase(); + +//// [f.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + var A = (function () { + function A() { + } + return A; + }()); + exports.A = A; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + var B = (function () { + function B() { + } + return B; + }()); + exports.B = B; +}); +define("main", ["require", "exports", "D", "E"], function (require, exports) { + "use strict"; + var a; + var b = a.getB().x.toFixed(); + var c = a.getCls().y.toLowerCase(); +}); + + +//// [f.d.ts] +/// +/// +declare module "a" { + export class A { + } +} +declare module "b" { + export class B { + x: number; + } +} +declare module "main" { +} diff --git a/tests/baselines/reference/moduleAugmentationsImports4.symbols b/tests/baselines/reference/moduleAugmentationsImports4.symbols new file mode 100644 index 00000000000..8d203de8519 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationsImports4.symbols @@ -0,0 +1,89 @@ +=== tests/cases/compiler/main.ts === +/// +/// +import {A} from "./a"; +>A : Symbol(A, Decl(main.ts, 2, 8)) + +import "D"; +import "E"; + +let a: A; +>a : Symbol(a, Decl(main.ts, 6, 3)) +>A : Symbol(A, Decl(main.ts, 2, 8)) + +let b = a.getB().x.toFixed(); +>b : Symbol(b, Decl(main.ts, 7, 3)) +>a.getB().x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) +>a.getB().x : Symbol(B.x, Decl(b.ts, 0, 16)) +>a.getB : Symbol(A.getB, Decl(d.d.ts, 4, 21)) +>a : Symbol(a, Decl(main.ts, 6, 3)) +>getB : Symbol(A.getB, Decl(d.d.ts, 4, 21)) +>x : Symbol(B.x, Decl(b.ts, 0, 16)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) + +let c = a.getCls().y.toLowerCase(); +>c : Symbol(c, Decl(main.ts, 8, 3)) +>a.getCls().y.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) +>a.getCls().y : Symbol(Cls.y, Decl(c.d.ts, 1, 15)) +>a.getCls : Symbol(A.getCls, Decl(e.d.ts, 6, 21)) +>a : Symbol(a, Decl(main.ts, 6, 3)) +>getCls : Symbol(A.getCls, Decl(e.d.ts, 6, 21)) +>y : Symbol(Cls.y, Decl(c.d.ts, 1, 15)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) + +=== tests/cases/compiler/a.ts === + +export class A {} +>A : Symbol(A, Decl(a.ts, 0, 0), Decl(d.d.ts, 3, 16), Decl(e.d.ts, 5, 16)) + +=== tests/cases/compiler/b.ts === +export class B {x: number;} +>B : Symbol(B, Decl(b.ts, 0, 0)) +>x : Symbol(x, Decl(b.ts, 0, 16)) + +=== tests/cases/compiler/c.d.ts === +declare module "C" { + class Cls {y: string; } +>Cls : Symbol(Cls, Decl(c.d.ts, 0, 20)) +>y : Symbol(y, Decl(c.d.ts, 1, 15)) +} + +=== tests/cases/compiler/d.d.ts === +declare module "D" { + import {A} from "a"; +>A : Symbol(A, Decl(d.d.ts, 1, 12)) + + import {B} from "b"; +>B : Symbol(B, Decl(d.d.ts, 2, 12)) + + module "a" { + interface A { +>A : Symbol(A, Decl(a.ts, 0, 0), Decl(d.d.ts, 3, 16), Decl(e.d.ts, 5, 16)) + + getB(): B; +>getB : Symbol(getB, Decl(d.d.ts, 4, 21)) +>B : Symbol(B, Decl(d.d.ts, 2, 12)) + } + } +} + +=== tests/cases/compiler/e.d.ts === +/// +declare module "E" { + import {A} from "a"; +>A : Symbol(A, Decl(e.d.ts, 2, 12)) + + import {Cls} from "C"; +>Cls : Symbol(Cls, Decl(e.d.ts, 3, 12)) + + module "a" { + interface A { +>A : Symbol(A, Decl(a.ts, 0, 0), Decl(d.d.ts, 3, 16), Decl(e.d.ts, 5, 16)) + + getCls(): Cls; +>getCls : Symbol(getCls, Decl(e.d.ts, 6, 21)) +>Cls : Symbol(Cls, Decl(e.d.ts, 3, 12)) + } + } +} + diff --git a/tests/baselines/reference/moduleAugmentationsImports4.types b/tests/baselines/reference/moduleAugmentationsImports4.types new file mode 100644 index 00000000000..53d570e14e6 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationsImports4.types @@ -0,0 +1,93 @@ +=== tests/cases/compiler/main.ts === +/// +/// +import {A} from "./a"; +>A : typeof A + +import "D"; +import "E"; + +let a: A; +>a : A +>A : A + +let b = a.getB().x.toFixed(); +>b : string +>a.getB().x.toFixed() : string +>a.getB().x.toFixed : (fractionDigits?: number) => string +>a.getB().x : number +>a.getB() : B +>a.getB : () => B +>a : A +>getB : () => B +>x : number +>toFixed : (fractionDigits?: number) => string + +let c = a.getCls().y.toLowerCase(); +>c : string +>a.getCls().y.toLowerCase() : string +>a.getCls().y.toLowerCase : () => string +>a.getCls().y : string +>a.getCls() : Cls +>a.getCls : () => Cls +>a : A +>getCls : () => Cls +>y : string +>toLowerCase : () => string + +=== tests/cases/compiler/a.ts === + +export class A {} +>A : A + +=== tests/cases/compiler/b.ts === +export class B {x: number;} +>B : B +>x : number + +=== tests/cases/compiler/c.d.ts === +declare module "C" { + class Cls {y: string; } +>Cls : Cls +>y : string +} + +=== tests/cases/compiler/d.d.ts === +declare module "D" { + import {A} from "a"; +>A : typeof A + + import {B} from "b"; +>B : typeof B + + module "a" { + interface A { +>A : A + + getB(): B; +>getB : () => B +>B : B + } + } +} + +=== tests/cases/compiler/e.d.ts === +/// +declare module "E" { + import {A} from "a"; +>A : typeof A + + import {Cls} from "C"; +>Cls : typeof Cls + + module "a" { + interface A { +>A : A + + getCls(): Cls; +>getCls : () => Cls +>Cls : Cls + } + } +} + diff --git a/tests/baselines/reference/privacyGloImportParseErrors.errors.txt b/tests/baselines/reference/privacyGloImportParseErrors.errors.txt index 236418a10ae..5fdf3b6f110 100644 --- a/tests/baselines/reference/privacyGloImportParseErrors.errors.txt +++ b/tests/baselines/reference/privacyGloImportParseErrors.errors.txt @@ -1,3 +1,4 @@ +tests/cases/compiler/privacyGloImportParseErrors.ts(22,5): error TS2665: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible. tests/cases/compiler/privacyGloImportParseErrors.ts(22,27): error TS2435: Ambient modules cannot be nested in other modules or namespaces. tests/cases/compiler/privacyGloImportParseErrors.ts(30,20): error TS2435: Ambient modules cannot be nested in other modules or namespaces. tests/cases/compiler/privacyGloImportParseErrors.ts(49,29): error TS4000: Import declaration 'm1_im2_private' is using private name 'm1_M2_private'. @@ -13,12 +14,12 @@ tests/cases/compiler/privacyGloImportParseErrors.ts(125,45): error TS1147: Impor tests/cases/compiler/privacyGloImportParseErrors.ts(133,9): error TS1038: A 'declare' modifier cannot be used in an already ambient context. tests/cases/compiler/privacyGloImportParseErrors.ts(133,24): error TS2435: Ambient modules cannot be nested in other modules or namespaces. tests/cases/compiler/privacyGloImportParseErrors.ts(138,16): error TS2435: Ambient modules cannot be nested in other modules or namespaces. -tests/cases/compiler/privacyGloImportParseErrors.ts(141,12): error TS2435: Ambient modules cannot be nested in other modules or namespaces. +tests/cases/compiler/privacyGloImportParseErrors.ts(141,12): error TS2661: Invalid module name in augmentation, module 'abc3' cannot be found. tests/cases/compiler/privacyGloImportParseErrors.ts(146,25): error TS1147: Import declarations in a namespace cannot reference a module. tests/cases/compiler/privacyGloImportParseErrors.ts(149,29): error TS1147: Import declarations in a namespace cannot reference a module. -==== tests/cases/compiler/privacyGloImportParseErrors.ts (18 errors) ==== +==== tests/cases/compiler/privacyGloImportParseErrors.ts (19 errors) ==== module m1 { export module m1_M1_public { export class c1 { @@ -41,6 +42,8 @@ tests/cases/compiler/privacyGloImportParseErrors.ts(149,29): error TS1147: Impor } export declare module "m1_M3_public" { + ~~~~~~ +!!! error TS2665: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible. ~~~~~~~~~~~~~~ !!! error TS2435: Ambient modules cannot be nested in other modules or namespaces. export function f1(); @@ -191,7 +194,7 @@ tests/cases/compiler/privacyGloImportParseErrors.ts(149,29): error TS1147: Impor } module "abc3" { ~~~~~~ -!!! error TS2435: Ambient modules cannot be nested in other modules or namespaces. +!!! error TS2661: Invalid module name in augmentation, module 'abc3' cannot be found. } } diff --git a/tests/baselines/reference/privacyImportParseErrors.errors.txt b/tests/baselines/reference/privacyImportParseErrors.errors.txt index 5bae45f405c..f0a48427708 100644 --- a/tests/baselines/reference/privacyImportParseErrors.errors.txt +++ b/tests/baselines/reference/privacyImportParseErrors.errors.txt @@ -1,3 +1,4 @@ +tests/cases/compiler/privacyImportParseErrors.ts(22,5): error TS2665: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible. tests/cases/compiler/privacyImportParseErrors.ts(22,27): error TS2435: Ambient modules cannot be nested in other modules or namespaces. tests/cases/compiler/privacyImportParseErrors.ts(30,20): error TS2435: Ambient modules cannot be nested in other modules or namespaces. tests/cases/compiler/privacyImportParseErrors.ts(59,37): error TS1147: Import declarations in a namespace cannot reference a module. @@ -6,6 +7,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(69,37): error TS1147: Import de tests/cases/compiler/privacyImportParseErrors.ts(69,37): error TS2307: Cannot find module 'm1_M4_private'. tests/cases/compiler/privacyImportParseErrors.ts(81,43): error TS1147: Import declarations in a namespace cannot reference a module. tests/cases/compiler/privacyImportParseErrors.ts(82,43): error TS1147: Import declarations in a namespace cannot reference a module. +tests/cases/compiler/privacyImportParseErrors.ts(106,5): error TS2665: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible. tests/cases/compiler/privacyImportParseErrors.ts(106,27): error TS2435: Ambient modules cannot be nested in other modules or namespaces. tests/cases/compiler/privacyImportParseErrors.ts(114,20): error TS2435: Ambient modules cannot be nested in other modules or namespaces. tests/cases/compiler/privacyImportParseErrors.ts(143,37): error TS1147: Import declarations in a namespace cannot reference a module. @@ -14,31 +16,35 @@ tests/cases/compiler/privacyImportParseErrors.ts(153,37): error TS1147: Import d tests/cases/compiler/privacyImportParseErrors.ts(153,37): error TS2307: Cannot find module 'm2_M4_private'. tests/cases/compiler/privacyImportParseErrors.ts(166,43): error TS1147: Import declarations in a namespace cannot reference a module. tests/cases/compiler/privacyImportParseErrors.ts(167,43): error TS1147: Import declarations in a namespace cannot reference a module. -tests/cases/compiler/privacyImportParseErrors.ts(180,23): error TS2435: Ambient modules cannot be nested in other modules or namespaces. -tests/cases/compiler/privacyImportParseErrors.ts(198,23): error TS2435: Ambient modules cannot be nested in other modules or namespaces. +tests/cases/compiler/privacyImportParseErrors.ts(180,1): error TS2665: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible. +tests/cases/compiler/privacyImportParseErrors.ts(180,23): error TS2661: Invalid module name in augmentation, module 'glo_M2_public' cannot be found. +tests/cases/compiler/privacyImportParseErrors.ts(198,1): error TS2665: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible. +tests/cases/compiler/privacyImportParseErrors.ts(198,23): error TS2661: Invalid module name in augmentation, module 'glo_M4_private' cannot be found. tests/cases/compiler/privacyImportParseErrors.ts(218,34): error TS2307: Cannot find module 'glo_M2_public'. tests/cases/compiler/privacyImportParseErrors.ts(238,34): error TS2307: Cannot find module 'glo_M4_private'. tests/cases/compiler/privacyImportParseErrors.ts(251,40): error TS2307: Cannot find module 'glo_M2_public'. tests/cases/compiler/privacyImportParseErrors.ts(252,40): error TS2307: Cannot find module 'glo_M4_private'. -tests/cases/compiler/privacyImportParseErrors.ts(255,23): error TS2435: Ambient modules cannot be nested in other modules or namespaces. +tests/cases/compiler/privacyImportParseErrors.ts(255,1): error TS2665: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible. +tests/cases/compiler/privacyImportParseErrors.ts(255,23): error TS2661: Invalid module name in augmentation, module 'use_glo_M1_public' cannot be found. tests/cases/compiler/privacyImportParseErrors.ts(258,45): error TS2304: Cannot find name 'use_glo_M1_public'. tests/cases/compiler/privacyImportParseErrors.ts(261,39): error TS2304: Cannot find name 'use_glo_M1_public'. tests/cases/compiler/privacyImportParseErrors.ts(264,40): error TS2307: Cannot find module 'glo_M2_public'. tests/cases/compiler/privacyImportParseErrors.ts(273,38): error TS1147: Import declarations in a namespace cannot reference a module. tests/cases/compiler/privacyImportParseErrors.ts(277,45): error TS1147: Import declarations in a namespace cannot reference a module. -tests/cases/compiler/privacyImportParseErrors.ts(284,16): error TS2435: Ambient modules cannot be nested in other modules or namespaces. +tests/cases/compiler/privacyImportParseErrors.ts(284,16): error TS2661: Invalid module name in augmentation, module 'use_glo_M3_private' cannot be found. tests/cases/compiler/privacyImportParseErrors.ts(287,46): error TS2304: Cannot find name 'use_glo_M3_private'. tests/cases/compiler/privacyImportParseErrors.ts(290,40): error TS2304: Cannot find name 'use_glo_M3_private'. tests/cases/compiler/privacyImportParseErrors.ts(293,41): error TS2307: Cannot find module 'glo_M4_private'. tests/cases/compiler/privacyImportParseErrors.ts(302,38): error TS1147: Import declarations in a namespace cannot reference a module. tests/cases/compiler/privacyImportParseErrors.ts(306,45): error TS1147: Import declarations in a namespace cannot reference a module. -tests/cases/compiler/privacyImportParseErrors.ts(312,16): error TS2435: Ambient modules cannot be nested in other modules or namespaces. +tests/cases/compiler/privacyImportParseErrors.ts(312,16): error TS2661: Invalid module name in augmentation, module 'anotherParseError' cannot be found. tests/cases/compiler/privacyImportParseErrors.ts(314,9): error TS1038: A 'declare' modifier cannot be used in an already ambient context. tests/cases/compiler/privacyImportParseErrors.ts(314,24): error TS2435: Ambient modules cannot be nested in other modules or namespaces. tests/cases/compiler/privacyImportParseErrors.ts(319,16): error TS2435: Ambient modules cannot be nested in other modules or namespaces. tests/cases/compiler/privacyImportParseErrors.ts(322,12): error TS2435: Ambient modules cannot be nested in other modules or namespaces. +tests/cases/compiler/privacyImportParseErrors.ts(326,1): error TS2665: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible. tests/cases/compiler/privacyImportParseErrors.ts(326,9): error TS1029: 'export' modifier must precede 'declare' modifier. -tests/cases/compiler/privacyImportParseErrors.ts(326,23): error TS2435: Ambient modules cannot be nested in other modules or namespaces. +tests/cases/compiler/privacyImportParseErrors.ts(326,23): error TS2661: Invalid module name in augmentation, module 'anotherParseError2' cannot be found. tests/cases/compiler/privacyImportParseErrors.ts(328,9): error TS1038: A 'declare' modifier cannot be used in an already ambient context. tests/cases/compiler/privacyImportParseErrors.ts(328,24): error TS2435: Ambient modules cannot be nested in other modules or namespaces. tests/cases/compiler/privacyImportParseErrors.ts(333,16): error TS2435: Ambient modules cannot be nested in other modules or namespaces. @@ -49,7 +55,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(350,25): error TS1147: Import d tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import declarations in a namespace cannot reference a module. -==== tests/cases/compiler/privacyImportParseErrors.ts (49 errors) ==== +==== tests/cases/compiler/privacyImportParseErrors.ts (55 errors) ==== export module m1 { export module m1_M1_public { export class c1 { @@ -72,6 +78,8 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d } export declare module "m1_M3_public" { + ~~~~~~ +!!! error TS2665: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible. ~~~~~~~~~~~~~~ !!! error TS2435: Ambient modules cannot be nested in other modules or namespaces. export function f1(); @@ -172,6 +180,8 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d } export declare module "m2_M3_public" { + ~~~~~~ +!!! error TS2665: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible. ~~~~~~~~~~~~~~ !!! error TS2435: Ambient modules cannot be nested in other modules or namespaces. export function f1(); @@ -262,8 +272,10 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d } export declare module "glo_M2_public" { + ~~~~~~ +!!! error TS2665: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible. ~~~~~~~~~~~~~~~ -!!! error TS2435: Ambient modules cannot be nested in other modules or namespaces. +!!! error TS2661: Invalid module name in augmentation, module 'glo_M2_public' cannot be found. export function f1(); export class c1 { } @@ -282,8 +294,10 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d } export declare module "glo_M4_private" { + ~~~~~~ +!!! error TS2665: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible. ~~~~~~~~~~~~~~~~ -!!! error TS2435: Ambient modules cannot be nested in other modules or namespaces. +!!! error TS2661: Invalid module name in augmentation, module 'glo_M4_private' cannot be found. export function f1(); export class c1 { } @@ -349,8 +363,10 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d export declare module "use_glo_M1_public" { + ~~~~~~ +!!! error TS2665: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible. ~~~~~~~~~~~~~~~~~~~ -!!! error TS2435: Ambient modules cannot be nested in other modules or namespaces. +!!! error TS2661: Invalid module name in augmentation, module 'use_glo_M1_public' cannot be found. import use_glo_M1_public = glo_M1_public; export var use_glo_M1_public_v1_public: { new (): use_glo_M1_public.c1; }; export var use_glo_M1_public_v2_public: use_glo_M1_public; @@ -391,7 +407,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d declare module "use_glo_M3_private" { ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2435: Ambient modules cannot be nested in other modules or namespaces. +!!! error TS2661: Invalid module name in augmentation, module 'use_glo_M3_private' cannot be found. import use_glo_M3_private = glo_M3_private; export var use_glo_M3_private_v1_public: { new (): use_glo_M3_private.c1; }; export var use_glo_M3_private_v2_public: use_glo_M3_private; @@ -431,7 +447,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d declare module "anotherParseError" { ~~~~~~~~~~~~~~~~~~~ -!!! error TS2435: Ambient modules cannot be nested in other modules or namespaces. +!!! error TS2661: Invalid module name in augmentation, module 'anotherParseError' cannot be found. module m2 { declare module "abc" { ~~~~~~~ @@ -454,10 +470,12 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d } declare export module "anotherParseError2" { + ~~~~~~~ +!!! error TS2665: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible. ~~~~~~ !!! error TS1029: 'export' modifier must precede 'declare' modifier. ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2435: Ambient modules cannot be nested in other modules or namespaces. +!!! error TS2661: Invalid module name in augmentation, module 'anotherParseError2' cannot be found. module m2 { declare module "abc" { ~~~~~~~ diff --git a/tests/baselines/reference/undefinedTypeAssignment1.errors.txt b/tests/baselines/reference/undefinedTypeAssignment1.errors.txt index b8dd74a58a8..61021a463ab 100644 --- a/tests/baselines/reference/undefinedTypeAssignment1.errors.txt +++ b/tests/baselines/reference/undefinedTypeAssignment1.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/undefinedTypeAssignment1.ts(1,1): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'. +tests/cases/compiler/undefinedTypeAssignment1.ts(1,6): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'. ==== tests/cases/compiler/undefinedTypeAssignment1.ts (1 errors) ==== type undefined = string; - ~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~ !!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'. function p(undefined = "wat") { return undefined; diff --git a/tests/cases/compiler/moduleAugmentationCollidingNamesInAugmentation1.ts b/tests/cases/compiler/moduleAugmentationCollidingNamesInAugmentation1.ts new file mode 100644 index 00000000000..7cbb78a333b --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationCollidingNamesInAugmentation1.ts @@ -0,0 +1,33 @@ +// @module: amd +// @declaration: true + +// @filename: map1.ts +import { Observable } from "./observable" + +(Observable.prototype).map = function() { } + +declare module "./observable" { + interface I {x0} +} + +// @filename: map2.ts +import { Observable } from "./observable" + +(Observable.prototype).map = function() { } + +declare module "./observable" { + interface I {x1} +} + + +// @filename: observable.ts +export declare class Observable { + filter(pred: (e:T) => boolean): Observable; +} + +// @filename: main.ts +import { Observable } from "./observable" +import "./map1"; +import "./map2"; + +let x: Observable; diff --git a/tests/cases/compiler/moduleAugmentationDeclarationEmit1.ts b/tests/cases/compiler/moduleAugmentationDeclarationEmit1.ts new file mode 100644 index 00000000000..460cdfc53b6 --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationDeclarationEmit1.ts @@ -0,0 +1,33 @@ +// @module: commonjs +// @declaration: true + +// @filename: map.ts +import { Observable } from "./observable" + +(Observable.prototype).map = function() { } + +declare module "./observable" { + interface Observable { + map(proj: (e:T) => U): Observable + } + namespace Observable { + let someAnotherValue: number; + } +} + +// @filename: observable.ts +export declare class Observable { + filter(pred: (e:T) => boolean): Observable; +} + +export namespace Observable { + let someValue: number; +} + + +// @filename: main.ts +import { Observable } from "./observable" +import "./map"; + +let x: Observable; +let y = x.map(x => x + 1); \ No newline at end of file diff --git a/tests/cases/compiler/moduleAugmentationDeclarationEmit2.ts b/tests/cases/compiler/moduleAugmentationDeclarationEmit2.ts new file mode 100644 index 00000000000..22cb4392675 --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationDeclarationEmit2.ts @@ -0,0 +1,35 @@ +// @module: commonjs +// @declaration: true + +// @filename: map.ts +import { Observable } from "./observable" + +(Observable.prototype).map = function() { } + +declare module "./observable" { + interface Observable { + map(proj: (e:T) => U): Observable + } + namespace Observable { + let someAnotherValue: string; + } +} + +// @filename: observable.ts +export declare class Observable { + filter(pred: (e:T) => boolean): Observable; +} + +export namespace Observable { + export let someValue: number; +} + + +// @filename: main.ts +import { Observable } from "./observable" +import "./map"; + +let x: Observable; +let y = x.map(x => x + 1); +let z1 = Observable.someValue.toFixed(); +let z2 = Observable.someAnotherValue.toLowerCase(); \ No newline at end of file diff --git a/tests/cases/compiler/moduleAugmentationDisallowedExtensions.ts b/tests/cases/compiler/moduleAugmentationDisallowedExtensions.ts new file mode 100644 index 00000000000..28e46c71b33 --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationDisallowedExtensions.ts @@ -0,0 +1,39 @@ +// @module: commonjs + +// @filename: x0.ts +export let a = 1; + +// @filename: x.ts + +namespace N1 { + export let x = 1; +} + +declare module "./observable" { + var x: number; + let y: number; + const z: number; + let {x1, y1}: {x1: number, y1: string} + interface A { x } + namespace N { + export class C {} + } + class Cls {} + function foo(): number; + type T = number; + import * as all from "./x0"; + import {a} from "./x0"; + export * from "./x0"; + export {a} from "./x0"; +} +export {} + +// @filename: observable.ts +export declare class Observable { + filter(pred: (e:T) => boolean): Observable; +} +export var x = 1; + +// @filename: main.ts +import { Observable } from "./observable" +import "./x"; diff --git a/tests/cases/compiler/moduleAugmentationExtendAmbientModule1.ts b/tests/cases/compiler/moduleAugmentationExtendAmbientModule1.ts new file mode 100644 index 00000000000..b8b144fcc14 --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationExtendAmbientModule1.ts @@ -0,0 +1,34 @@ +// @module: commonjs + +// @filename: map.ts +import { Observable } from "observable" + +(Observable.prototype).map = function() { } + +declare module "observable" { + interface Observable { + map(proj: (e:T) => U): Observable + } + namespace Observable { + let someAnotherValue: number; + } +} + +// @filename: observable.d.ts +declare module "observable" { + class Observable { + filter(pred: (e:T) => boolean): Observable; + } + namespace Observable { + let someValue: number; + } +} + +// @filename: main.ts + +/// +import { Observable } from "observable" +import "./map"; + +let x: Observable; +let y = x.map(x => x + 1); \ No newline at end of file diff --git a/tests/cases/compiler/moduleAugmentationExtendAmbientModule2.ts b/tests/cases/compiler/moduleAugmentationExtendAmbientModule2.ts new file mode 100644 index 00000000000..6e6614ce9f7 --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationExtendAmbientModule2.ts @@ -0,0 +1,37 @@ +// @module: commonjs +// @declaration: true + +// @filename: map.ts +import { Observable } from "observable" + +(Observable.prototype).map = function() { } + +declare module "observable" { + interface Observable { + map(proj: (e:T) => U): Observable + } + namespace Observable { + let someAnotherValue: string; + } +} + +// @filename: observable.d.ts +declare module "observable" { + class Observable { + filter(pred: (e:T) => boolean): Observable; + } + namespace Observable { + export let someValue: number; + } +} + +// @filename: main.ts + +/// +import { Observable } from "observable" +import "./map"; + +let x: Observable; +let y = x.map(x => x + 1); +let z1 = Observable.someValue.toFixed(); +let z2 = Observable.someAnotherValue.toLowerCase(); \ No newline at end of file diff --git a/tests/cases/compiler/moduleAugmentationExtendFileModule1.ts b/tests/cases/compiler/moduleAugmentationExtendFileModule1.ts new file mode 100644 index 00000000000..f87757b4871 --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationExtendFileModule1.ts @@ -0,0 +1,32 @@ +// @module: commonjs + +// @filename: map.ts +import { Observable } from "./observable" + +(Observable.prototype).map = function() { } + +declare module "./observable" { + interface Observable { + map(proj: (e:T) => U): Observable + } + namespace Observable { + let someAnotherValue: number; + } +} + +// @filename: observable.ts +export declare class Observable { + filter(pred: (e:T) => boolean): Observable; +} + +export namespace Observable { + let someValue: number; +} + + +// @filename: main.ts +import { Observable } from "./observable" +import "./map"; + +let x: Observable; +let y = x.map(x => x + 1); \ No newline at end of file diff --git a/tests/cases/compiler/moduleAugmentationExtendFileModule2.ts b/tests/cases/compiler/moduleAugmentationExtendFileModule2.ts new file mode 100644 index 00000000000..454e5148790 --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationExtendFileModule2.ts @@ -0,0 +1,34 @@ +// @module: commonjs + +// @filename: map.ts +import { Observable } from "./observable" + +(Observable.prototype).map = function() { } + +declare module "./observable" { + interface Observable { + map(proj: (e:T) => U): Observable + } + namespace Observable { + let someAnotherValue: string; + } +} + +// @filename: observable.ts +export declare class Observable { + filter(pred: (e:T) => boolean): Observable; +} + +export namespace Observable { + export let someValue: number; +} + + +// @filename: main.ts +import { Observable } from "./observable" +import "./map"; + +let x: Observable; +let y = x.map(x => x + 1); +let z1 = Observable.someValue.toFixed(); +let z2 = Observable.someAnotherValue.toLowerCase(); \ No newline at end of file diff --git a/tests/cases/compiler/moduleAugmentationGlobal1.ts b/tests/cases/compiler/moduleAugmentationGlobal1.ts new file mode 100644 index 00000000000..0e434abdd42 --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationGlobal1.ts @@ -0,0 +1,18 @@ +// @module: commonjs +// @declaration: true + +// @filename: f1.ts +export class A {x: number;} + +// @filename: f2.ts +import {A} from "./f1"; + +// change the shape of Array +declare module "/" { + interface Array { + getA(): A; + } +} + +let x = [1]; +let y = x.getA().x; diff --git a/tests/cases/compiler/moduleAugmentationGlobal2.ts b/tests/cases/compiler/moduleAugmentationGlobal2.ts new file mode 100644 index 00000000000..2bf81de7d49 --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationGlobal2.ts @@ -0,0 +1,18 @@ +// @module: commonjs +// @declaration: true + +// @filename: f1.ts +export class A {}; +// @filename: f2.ts + +// change the shape of Array +import {A} from "./f1"; + +declare module "/" { + interface Array { + getCountAsString(): string; + } +} + +let x = [1]; +let y = x.getCountAsString().toLowerCase(); diff --git a/tests/cases/compiler/moduleAugmentationGlobal3.ts b/tests/cases/compiler/moduleAugmentationGlobal3.ts new file mode 100644 index 00000000000..269fc9af464 --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationGlobal3.ts @@ -0,0 +1,21 @@ +// @module: commonjs +// @declaration: true + +// @filename: f1.ts +export class A {}; +// @filename: f2.ts + +// change the shape of Array +import {A} from "./f1"; + +declare module "/" { + interface Array { + getCountAsString(): string; + } +} + +// @filename: f3.ts +import "./f2"; + +let x = [1]; +let y = x.getCountAsString().toLowerCase(); diff --git a/tests/cases/compiler/moduleAugmentationGlobal4.ts b/tests/cases/compiler/moduleAugmentationGlobal4.ts new file mode 100644 index 00000000000..5db88c9015f --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationGlobal4.ts @@ -0,0 +1,18 @@ +// @module: commonjs +// @declaration: true + +// @filename: f1.ts +declare module "/" { + interface Something {x} +} +export {}; +// @filename: f2.ts + +declare module "/" { + interface Something {y} +} +export {}; +// @filename: f3.ts +import "./f1"; +import "./f2"; + diff --git a/tests/cases/compiler/moduleAugmentationImportsAndExports1.ts b/tests/cases/compiler/moduleAugmentationImportsAndExports1.ts new file mode 100644 index 00000000000..b5e8a07a70e --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationImportsAndExports1.ts @@ -0,0 +1,28 @@ +// @module: commonjs +// @declaration: true + +// @filename: f1.ts +export class A {} + +// @filename: f2.ts +export class B { + n: number; +} + +// @filename: f3.ts +import {A} from "./f1"; +import {B} from "./f2"; + +(A.prototype).foo = function () {} +declare module "./f1" { + interface A { + foo(): B; + } +} + +// @filename: f4.ts +import {A} from "./f1"; +import "./f3"; + +let a: A; +let b = a.foo().n; \ No newline at end of file diff --git a/tests/cases/compiler/moduleAugmentationImportsAndExports2.ts b/tests/cases/compiler/moduleAugmentationImportsAndExports2.ts new file mode 100644 index 00000000000..8cd9f8ffdba --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationImportsAndExports2.ts @@ -0,0 +1,40 @@ +// @module: commonjs +// @declaration: true + +// @filename: f1.ts +export class A {} + +// @filename: f2.ts +export class B { + n: number; +} + +// @filename: f3.ts +import {A} from "./f1"; + +(A.prototype).foo = function () {} + +namespace N { + export interface Ifc { a } + export interface Cls { a } +} + +declare module "./f1" { + import {B} from "./f2"; + export {B} from "./f2"; + import I = N.Ifc; + import C = N.Cls; + // should have explicit export + interface A { + foo(): B; + bar(): I; + baz(): C; + } +} + +// @filename: f4.ts +import {A} from "./f1"; +import "./f3"; + +let a: A; +let b = a.foo().n; \ No newline at end of file diff --git a/tests/cases/compiler/moduleAugmentationImportsAndExports3.ts b/tests/cases/compiler/moduleAugmentationImportsAndExports3.ts new file mode 100644 index 00000000000..170bb6c3d11 --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationImportsAndExports3.ts @@ -0,0 +1,38 @@ +// @module: commonjs +// @declaration: true + +// @filename: f1.ts +export class A {} + +// @filename: f2.ts +export class B { + n: number; +} + +// @filename: f3.ts +import {A} from "./f1"; + +(A.prototype).foo = function () {} + +namespace N { + export interface Ifc { a } + export interface Cls { a } +} + +declare module "./f1" { + import {B} from "./f2"; + import I = N.Ifc; + import C = N.Cls; + interface A { + foo(): B; + bar(): I; + baz(): C; + } +} + +// @filename: f4.ts +import {A} from "./f1"; +import "./f3"; + +let a: A; +let b = a.foo().n; \ No newline at end of file diff --git a/tests/cases/compiler/moduleAugmentationImportsAndExports4.ts b/tests/cases/compiler/moduleAugmentationImportsAndExports4.ts new file mode 100644 index 00000000000..d9eb823d8e0 --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationImportsAndExports4.ts @@ -0,0 +1,39 @@ +// @module: commonjs + +// @filename: f1.ts +export class A {} + +// @filename: f2.ts +export class B { + n: number; +} + +// @filename: f3.ts +import {A} from "./f1"; +import {B} from "./f2"; + +(A.prototype).foo = function () {} + +namespace N { + export interface Ifc { a: number; } + export interface Cls { b: number; } +} +import I = N.Ifc; +import C = N.Cls; + +declare module "./f1" { + interface A { + foo(): B; + bar(): I; + baz(): C; + } +} + +// @filename: f4.ts +import {A} from "./f1"; +import "./f3"; + +let a: A; +let b = a.foo().n; +let c = a.bar().a; +let d = a.baz().b; \ No newline at end of file diff --git a/tests/cases/compiler/moduleAugmentationImportsAndExports5.ts b/tests/cases/compiler/moduleAugmentationImportsAndExports5.ts new file mode 100644 index 00000000000..2e799a215b5 --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationImportsAndExports5.ts @@ -0,0 +1,40 @@ +// @module: commonjs +// @declaration: true + +// @filename: f1.ts +export class A {} + +// @filename: f2.ts +export class B { + n: number; +} + +// @filename: f3.ts +import {A} from "./f1"; +import {B} from "./f2"; + +(A.prototype).foo = function () {} + +namespace N { + export interface Ifc { a: number; } + export interface Cls { b: number; } +} +import I = N.Ifc; +import C = N.Cls; + +declare module "./f1" { + interface A { + foo(): B; + bar(): I; + baz(): C; + } +} + +// @filename: f4.ts +import {A} from "./f1"; +import "./f3"; + +let a: A; +let b = a.foo().n; +let c = a.bar().a; +let d = a.baz().b; \ No newline at end of file diff --git a/tests/cases/compiler/moduleAugmentationImportsAndExports6.ts b/tests/cases/compiler/moduleAugmentationImportsAndExports6.ts new file mode 100644 index 00000000000..aafab20943f --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationImportsAndExports6.ts @@ -0,0 +1,40 @@ +// @module: commonjs +// @declaration: true + +// @filename: f1.ts +export class A {} + +// @filename: f2.ts +export class B { + n: number; +} + +// @filename: f3.ts +import {A} from "./f1"; +import {B} from "./f2"; + +(A.prototype).foo = function () {} + +export namespace N { + export interface Ifc { a: number; } + export interface Cls { b: number; } +} +import I = N.Ifc; +import C = N.Cls; + +declare module "./f1" { + interface A { + foo(): B; + bar(): I; + baz(): C; + } +} + +// @filename: f4.ts +import {A} from "./f1"; +import "./f3"; + +let a: A; +let b = a.foo().n; +let c = a.bar().a; +let d = a.baz().b; \ No newline at end of file diff --git a/tests/cases/compiler/moduleAugmentationInAmbientModule1.ts b/tests/cases/compiler/moduleAugmentationInAmbientModule1.ts new file mode 100644 index 00000000000..07b7ccb99ca --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationInAmbientModule1.ts @@ -0,0 +1,28 @@ +// @module: commonjs +// @declaration: true + +// @filename: O.d.ts + +declare module "Observable" { + class Observable {} +} + +declare module "M" { + class Cls { x: number } +} + +declare module "Map" { + import { Cls } from "M"; + module "Observable" { + interface Observable { + foo(): Cls; + } + } +} + +// @filename: main.ts +/// + +import {Observable} from "Observable"; +let x: Observable; +x.foo().x; diff --git a/tests/cases/compiler/moduleAugmentationInAmbientModule2.ts b/tests/cases/compiler/moduleAugmentationInAmbientModule2.ts new file mode 100644 index 00000000000..e2979478574 --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationInAmbientModule2.ts @@ -0,0 +1,28 @@ +// @module: commonjs +// @declaration: true; +// @filename: O.d.ts + +declare module "Observable" { + class Observable {} +} + +declare module "M" { + class Cls { x: number } +} + +declare module "Map" { + import { Cls } from "M"; + module "Observable" { + interface Observable { + foo(): Cls; + } + } +} + +// @filename: main.ts +/// + +import {Observable} from "Observable"; +import "Map"; +let x: Observable; +x.foo().x; diff --git a/tests/cases/compiler/moduleAugmentationInAmbientModule3.ts b/tests/cases/compiler/moduleAugmentationInAmbientModule3.ts new file mode 100644 index 00000000000..bc233294ed4 --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationInAmbientModule3.ts @@ -0,0 +1,38 @@ +// @module: commonjs +// @declaration: true; +// @filename: O.d.ts + +declare module "Observable" { + class Observable {} +} + +declare module "M" { + class Cls { x: number } +} + +declare module "Map" { + import { Cls } from "M"; + module "Observable" { + interface Observable { + foo(): Cls; + } + } +} + +declare module "Map" { + class Cls2 { x2: number } + module "Observable" { + interface Observable { + foo2(): Cls2; + } + } +} + +// @filename: main.ts +/// + +import {Observable} from "Observable"; +import "Map"; +let x: Observable; +x.foo().x; +x.foo2().x2; diff --git a/tests/cases/compiler/moduleAugmentationInAmbientModule4.ts b/tests/cases/compiler/moduleAugmentationInAmbientModule4.ts new file mode 100644 index 00000000000..59386ad3d08 --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationInAmbientModule4.ts @@ -0,0 +1,40 @@ +// @module: commonjs +// @declaration: true; +// @filename: O.d.ts + +declare module "Observable" { + class Observable {} +} + +declare module "M" { + class Cls { x: number } +} + +declare module "Map" { + import { Cls } from "M"; + module "Observable" { + interface Observable { + foo(): Cls; + } + } +} + +// @filename: O2.d.ts +declare module "Map" { + class Cls2 { x2: number } + module "Observable" { + interface Observable { + foo2(): Cls2; + } + } +} + +// @filename: main.ts +/// +/// + +import {Observable} from "Observable"; +import "Map"; +let x: Observable; +x.foo().x; +x.foo2().x2; diff --git a/tests/cases/compiler/moduleAugmentationNoNewNames.ts b/tests/cases/compiler/moduleAugmentationNoNewNames.ts new file mode 100644 index 00000000000..2ab82ba5f0b --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationNoNewNames.ts @@ -0,0 +1,28 @@ +// @module: commonjs + +// @filename: map.ts +import { Observable } from "./observable" + +(Observable.prototype).map = function() { } + +declare module "./observable" { + interface Observable { + map(proj: (e:T) => U): Observable + } + class Bar {} + let y: number, z: string; + let {a: x, b: x1}: {a: number, b: number}; + module Z {} +} + +// @filename: observable.ts +export declare class Observable { + filter(pred: (e:T) => boolean): Observable; +} + +// @filename: main.ts +import { Observable } from "./observable" +import "./map"; + +let x: Observable; +let y = x.map(x => x + 1); \ No newline at end of file diff --git a/tests/cases/compiler/moduleAugmentationsBundledOutput1.ts b/tests/cases/compiler/moduleAugmentationsBundledOutput1.ts new file mode 100644 index 00000000000..e633e355d80 --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationsBundledOutput1.ts @@ -0,0 +1,57 @@ +// @target: es5 +// @module: amd +// @declaration: true +// @out: out.js + +// @filename: m1.ts +export class Cls { +} + +// @filename: m2.ts +import {Cls} from "./m1"; +(Cls.prototype).foo = function() { return 1; }; +(Cls.prototype).bar = function() { return "1"; }; + +declare module "./m1" { + interface Cls { + foo(): number; + } +} + +declare module "./m1" { + interface Cls { + bar(): string; + } +} + +// @filename: m3.ts +export class C1 { x: number } +export class C2 { x: string } + +// @filename: m4.ts +import {Cls} from "./m1"; +import {C1, C2} from "./m3"; +(Cls.prototype).baz1 = function() { return undefined }; +(Cls.prototype).baz2 = function() { return undefined }; + +declare module "./m1" { + interface Cls { + baz1(): C1; + } +} + +declare module "./m1" { + interface Cls { + baz2(): C2; + } +} + +// @filename: test.ts +import { Cls } from "./m1"; +import "m2"; +import "m4"; +let c: Cls; +c.foo().toExponential(); +c.bar().toLowerCase(); +c.baz1().x.toExponential(); +c.baz2().x.toLowerCase(); diff --git a/tests/cases/compiler/moduleAugmentationsImports1.ts b/tests/cases/compiler/moduleAugmentationsImports1.ts new file mode 100644 index 00000000000..cec14867802 --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationsImports1.ts @@ -0,0 +1,44 @@ +// @module: amd +// @declaration: true +// @out: f.js + +// @filename: a.ts +export class A {} + +// @filename: b.ts +export class B {x: number;} + +// @filename: c.d.ts +declare module "C" { + class Cls {y: string; } +} + +// @filename: d.ts +/// + +import {A} from "./a"; +import {B} from "./b"; +import {Cls} from "C"; + +(A.prototype).getB = function () {}; +(A.prototype).getCls = function () {} + +declare module "./a" { + interface A { + getB(): B; + } +} + +declare module "./a" { + interface A { + getCls(): Cls; + } +} + +// @filename: main.ts +import {A} from "./a"; +import "d"; + +let a: A; +let b = a.getB().x.toFixed(); +let c = a.getCls().y.toLowerCase(); \ No newline at end of file diff --git a/tests/cases/compiler/moduleAugmentationsImports2.ts b/tests/cases/compiler/moduleAugmentationsImports2.ts new file mode 100644 index 00000000000..1b0365ec420 --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationsImports2.ts @@ -0,0 +1,49 @@ +// @module: amd +// @declaration: true +// @out: f.js + +// @filename: a.ts +export class A {} + +// @filename: b.ts +export class B {x: number;} + +// @filename: c.d.ts +declare module "C" { + class Cls {y: string; } +} + +// @filename: d.ts +/// + +import {A} from "./a"; +import {B} from "./b"; + +(A.prototype).getB = function () {}; + +declare module "./a" { + interface A { + getB(): B; + } +} + +// @filename: e.ts +import {A} from "./a"; +import {Cls} from "C"; + +(A.prototype).getCls = function () {} + +declare module "./a" { + interface A { + getCls(): Cls; + } +} + +// @filename: main.ts +import {A} from "./a"; +import "d"; +import "e"; + +let a: A; +let b = a.getB().x.toFixed(); +let c = a.getCls().y.toLowerCase(); \ No newline at end of file diff --git a/tests/cases/compiler/moduleAugmentationsImports3.ts b/tests/cases/compiler/moduleAugmentationsImports3.ts new file mode 100644 index 00000000000..2075d66e1d3 --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationsImports3.ts @@ -0,0 +1,48 @@ +// @module: amd +// @declaration: true +// @out: f.js + +// @filename: a.ts +export class A {} + +// @filename: b.ts +export class B {x: number;} + +// @filename: c.d.ts +declare module "C" { + class Cls {y: string; } +} + +// @filename: d.d.ts +declare module "D" { + import {A} from "a"; + import {B} from "b"; + module "a" { + interface A { + getB(): B; + } + } +} + +// @filename: e.ts +/// +import {A} from "./a"; +import {Cls} from "C"; + +(A.prototype).getCls = function () {} + +declare module "./a" { + interface A { + getCls(): Cls; + } +} + +// @filename: main.ts +/// +import {A} from "./a"; +import "D"; +import "e"; + +let a: A; +let b = a.getB().x.toFixed(); +let c = a.getCls().y.toLowerCase(); \ No newline at end of file diff --git a/tests/cases/compiler/moduleAugmentationsImports4.ts b/tests/cases/compiler/moduleAugmentationsImports4.ts new file mode 100644 index 00000000000..5e48954c092 --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationsImports4.ts @@ -0,0 +1,49 @@ +// @module: amd +// @declaration: true +// @out: f.js + +// @filename: a.ts +export class A {} + +// @filename: b.ts +export class B {x: number;} + +// @filename: c.d.ts +declare module "C" { + class Cls {y: string; } +} + +// @filename: d.d.ts +declare module "D" { + import {A} from "a"; + import {B} from "b"; + module "a" { + interface A { + getB(): B; + } + } +} + +// @filename: e.d.ts +/// +declare module "E" { + import {A} from "a"; + import {Cls} from "C"; + + module "a" { + interface A { + getCls(): Cls; + } + } +} + +// @filename: main.ts +/// +/// +import {A} from "./a"; +import "D"; +import "E"; + +let a: A; +let b = a.getB().x.toFixed(); +let c = a.getCls().y.toLowerCase(); \ No newline at end of file diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics8.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics8.ts index ba2d9faae8c..562f42124ae 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics8.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics8.ts @@ -7,8 +7,8 @@ verify.getSemanticDiagnostics(`[ { "message": "'type aliases' can only be used in a .ts file.", - "start": 0, - "length": 11, + "start": 5, + "length": 1, "category": "error", "code": 8008 } From 35537b5f32cca42e10eac2bd385bde2ea6fbf062 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 22 Dec 2015 14:54:21 -0800 Subject: [PATCH 078/209] Implement breakpoint spans of array destructuring pattern of destructuring assignment --- src/services/breakpoints.ts | 87 ++++++- src/services/utilities.ts | 28 +++ ...nmentStatementArrayBindingPattern.baseline | 234 ++++++++++++------ ...tArrayBindingPatternDefaultValues.baseline | 224 ++++++++++++----- 4 files changed, 426 insertions(+), 147 deletions(-) diff --git a/src/services/breakpoints.ts b/src/services/breakpoints.ts index 908fefb2d7d..5042b72cc23 100644 --- a/src/services/breakpoints.ts +++ b/src/services/breakpoints.ts @@ -97,7 +97,7 @@ namespace ts.BreakpointResolver { if (isFunctionBlock(node)) { return spanInFunctionBlock(node); } - // Fall through + // Fall through case SyntaxKind.ModuleBlock: return spanInBlock(node); @@ -217,17 +217,17 @@ namespace ts.BreakpointResolver { case SyntaxKind.CommaToken: return spanInPreviousNode(node) - + case SyntaxKind.OpenBraceToken: return spanInOpenBraceToken(node); case SyntaxKind.CloseBraceToken: return spanInCloseBraceToken(node); - + case SyntaxKind.CloseBracketToken: return spanInCloseBracketToken(node); - case SyntaxKind.OpenParenToken: + case SyntaxKind.OpenParenToken: return spanInOpenParenToken(node); case SyntaxKind.CloseParenToken: @@ -253,6 +253,42 @@ namespace ts.BreakpointResolver { return spanInOfKeyword(node); default: + // Destructuring pattern in destructuring assignment + // [a, b, c] of + // [a, b, c] = expression + if (isArrayLiteralOrObjectLiteralDestructuringPattern(node)) { + return spanInArrayLiteralOrObjectLiteralDestructuringPattern(node); + } + + // Set breakpoint on identifier element of destructuring pattern + // a or ...c from + // [a, b, ...c] or { a, b } from destructuring pattern + if ((node.kind === SyntaxKind.Identifier || node.kind == SyntaxKind.SpreadElementExpression) && + isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) { + return textSpan(node); + } + + if (node.kind === SyntaxKind.BinaryExpression) { + const binaryExpression = node; + // Set breakpoint in destructuring pattern if its destructuring assignment + // [a, b, c] or {a, b, c} of + // [a, b, c] = expression or + // {a, b, c} = expression + if (isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left)) { + return spanInArrayLiteralOrObjectLiteralDestructuringPattern( + binaryExpression.left); + } + + if (binaryExpression.operatorToken.kind === SyntaxKind.EqualsToken && + isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.parent)) { + // Set breakpoint on assignment expression element of destructuring pattern + // a = expression of + // [a = expression, b, c] = someExpression or + // { a = expression, b, c } = someExpression + return textSpan(node); + } + } + if (isExpression(node)) { switch (node.parent.kind) { case SyntaxKind.DoStatement: @@ -310,6 +346,16 @@ namespace ts.BreakpointResolver { } } + if (node.parent.kind === SyntaxKind.BinaryExpression) { + const binaryExpression = node.parent; + if (isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left) && + (binaryExpression.right === node || + binaryExpression.operatorToken === node)) { + // If initializer of destructuring assignment move to previous token + return spanInPreviousNode(node); + } + } + // Default go to parent to set the breakpoint return spanInNode(node.parent); } @@ -474,13 +520,34 @@ namespace ts.BreakpointResolver { // Empty binding pattern of binding element, set breakpoint on binding element if (bindingPattern.parent.kind === SyntaxKind.BindingElement) { - return spanInNode(bindingPattern.parent); + return textSpan(bindingPattern.parent); } // Variable declaration is used as the span return textSpanFromVariableDeclaration(bindingPattern.parent); } + function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node: DestructuringPattern): TextSpan { + Debug.assert(node.kind !== SyntaxKind.ArrayBindingPattern && node.kind !== SyntaxKind.ObjectBindingPattern); + const elements: NodeArray = + node.kind === SyntaxKind.ArrayLiteralExpression ? + (node).elements : + (node).properties; + + const firstBindingElement = forEach(elements, + element => element.kind !== SyntaxKind.OmittedExpression ? element : undefined); + + if (firstBindingElement) { + return spanInNode(firstBindingElement); + } + + // Could be ArrayLiteral from destructuring assignment or + // just nested element in another destructuring assignment + // set breakpoint on assignment when parent is destructuring assignment + // Otherwise set breakpoint for this element + return textSpan(node.parent.kind === SyntaxKind.BinaryExpression ? node.parent : node); + } + // Tokens: function spanInOpenBraceToken(node: Node): TextSpan { switch (node.parent.kind) { @@ -548,10 +615,16 @@ namespace ts.BreakpointResolver { case SyntaxKind.ArrayBindingPattern: // Breakpoint in last binding element or binding pattern if it contains no elements let bindingPattern = node.parent; - return spanInNode(lastOrUndefined(bindingPattern.elements) || bindingPattern); + return textSpan(lastOrUndefined(bindingPattern.elements) || bindingPattern); - // Default to parent node default: + if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) { + // Breakpoint in last binding element or binding pattern if it contains no elements + let arrayLiteral = node.parent; + return textSpan(lastOrUndefined(arrayLiteral.elements) || arrayLiteral); + } + + // Default to parent node return spanInNode(node.parent); } } diff --git a/src/services/utilities.ts b/src/services/utilities.ts index b3b4ec31a02..63b1757efd7 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -608,6 +608,34 @@ namespace ts { } return true; } + + export function isArrayLiteralOrObjectLiteralDestructuringPattern(node: Node) { + if (node.kind === SyntaxKind.ArrayLiteralExpression || + node.kind === SyntaxKind.ObjectLiteralExpression) { + // [a,b,c] from: + // [a, b, c] = someExpression; + if (node.parent.kind === SyntaxKind.BinaryExpression && + (node.parent).left === node && + (node.parent).operatorToken.kind === SyntaxKind.EqualsToken) { + return true; + } + + // [a, b, c] from: + // for([a, b, c] of expression) + if (node.parent.kind === SyntaxKind.ForOfStatement && + (node.parent).initializer === node) { + return true; + } + + // [a, b, c] of + // [x, [a, b, c] ] = someExpression + if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) { + return true; + } + } + + return false; + } } // Display-part writer helpers diff --git a/tests/baselines/reference/bpSpanDestructuringAssignmentStatementArrayBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringAssignmentStatementArrayBindingPattern.baseline index b49dabe0f82..87bf1b5a179 100644 --- a/tests/baselines/reference/bpSpanDestructuringAssignmentStatementArrayBindingPattern.baseline +++ b/tests/baselines/reference/bpSpanDestructuringAssignmentStatementArrayBindingPattern.baseline @@ -77,39 +77,39 @@ -------------------------------- 18 >[, nameA] = robotA; - ~~~~~~~~~~~~~~~~~~~~ => Pos: (631 to 650) SpanInfo: {"start":631,"length":18} - >[, nameA] = robotA - >:=> (line 18, col 0) to (line 18, col 18) + ~~~~~~~~~~~~~~~~~~~~ => Pos: (631 to 650) SpanInfo: {"start":634,"length":5} + >nameA + >:=> (line 18, col 3) to (line 18, col 8) -------------------------------- 19 >[, nameB] = getRobotB(); - ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (651 to 675) SpanInfo: {"start":651,"length":23} - >[, nameB] = getRobotB() - >:=> (line 19, col 0) to (line 19, col 23) + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (651 to 675) SpanInfo: {"start":654,"length":5} + >nameB + >:=> (line 19, col 3) to (line 19, col 8) -------------------------------- 20 >[, nameB] = [2, "trimmer", "trimming"]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (676 to 715) SpanInfo: {"start":676,"length":38} - >[, nameB] = [2, "trimmer", "trimming"] - >:=> (line 20, col 0) to (line 20, col 38) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (676 to 715) SpanInfo: {"start":679,"length":5} + >nameB + >:=> (line 20, col 3) to (line 20, col 8) -------------------------------- 21 >[, multiSkillB] = multiRobotB; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (716 to 746) SpanInfo: {"start":716,"length":29} - >[, multiSkillB] = multiRobotB - >:=> (line 21, col 0) to (line 21, col 29) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (716 to 746) SpanInfo: {"start":719,"length":11} + >multiSkillB + >:=> (line 21, col 3) to (line 21, col 14) -------------------------------- 22 >[, multiSkillB] = getMultiRobotB(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (747 to 782) SpanInfo: {"start":747,"length":34} - >[, multiSkillB] = getMultiRobotB() - >:=> (line 22, col 0) to (line 22, col 34) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (747 to 782) SpanInfo: {"start":750,"length":11} + >multiSkillB + >:=> (line 22, col 3) to (line 22, col 14) -------------------------------- 23 >[, multiSkillB] = ["roomba", ["vaccum", "mopping"]]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (783 to 835) SpanInfo: {"start":783,"length":51} - >[, multiSkillB] = ["roomba", ["vaccum", "mopping"]] - >:=> (line 23, col 0) to (line 23, col 51) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (783 to 835) SpanInfo: {"start":786,"length":11} + >multiSkillB + >:=> (line 23, col 3) to (line 23, col 14) -------------------------------- 24 > @@ -117,39 +117,39 @@ -------------------------------- 25 >[numberB] = robotB; - ~~~~~~~~~~~~~~~~~~~~ => Pos: (837 to 856) SpanInfo: {"start":837,"length":18} - >[numberB] = robotB - >:=> (line 25, col 0) to (line 25, col 18) + ~~~~~~~~~~~~~~~~~~~~ => Pos: (837 to 856) SpanInfo: {"start":838,"length":7} + >numberB + >:=> (line 25, col 1) to (line 25, col 8) -------------------------------- 26 >[numberB] = getRobotB(); - ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (857 to 881) SpanInfo: {"start":857,"length":23} - >[numberB] = getRobotB() - >:=> (line 26, col 0) to (line 26, col 23) + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (857 to 881) SpanInfo: {"start":858,"length":7} + >numberB + >:=> (line 26, col 1) to (line 26, col 8) -------------------------------- 27 >[numberB] = [2, "trimmer", "trimming"]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (882 to 921) SpanInfo: {"start":882,"length":38} - >[numberB] = [2, "trimmer", "trimming"] - >:=> (line 27, col 0) to (line 27, col 38) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (882 to 921) SpanInfo: {"start":883,"length":7} + >numberB + >:=> (line 27, col 1) to (line 27, col 8) -------------------------------- 28 >[nameMB] = multiRobotB; - ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (922 to 945) SpanInfo: {"start":922,"length":22} - >[nameMB] = multiRobotB - >:=> (line 28, col 0) to (line 28, col 22) + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (922 to 945) SpanInfo: {"start":923,"length":6} + >nameMB + >:=> (line 28, col 1) to (line 28, col 7) -------------------------------- 29 >[nameMB] = getMultiRobotB(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (946 to 974) SpanInfo: {"start":946,"length":27} - >[nameMB] = getMultiRobotB() - >:=> (line 29, col 0) to (line 29, col 27) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (946 to 974) SpanInfo: {"start":947,"length":6} + >nameMB + >:=> (line 29, col 1) to (line 29, col 7) -------------------------------- 30 >[nameMB] = ["trimmer", ["trimming", "edging"]]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (975 to 1022) SpanInfo: {"start":975,"length":46} - >[nameMB] = ["trimmer", ["trimming", "edging"]] - >:=> (line 30, col 0) to (line 30, col 46) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (975 to 1022) SpanInfo: {"start":976,"length":6} + >nameMB + >:=> (line 30, col 1) to (line 30, col 7) -------------------------------- 31 > @@ -157,39 +157,114 @@ -------------------------------- 32 >[numberB, nameB, skillB] = robotB; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1024 to 1058) SpanInfo: {"start":1024,"length":33} - >[numberB, nameB, skillB] = robotB - >:=> (line 32, col 0) to (line 32, col 33) + ~~~~~~~~~ => Pos: (1024 to 1032) SpanInfo: {"start":1025,"length":7} + >numberB + >:=> (line 32, col 1) to (line 32, col 8) +32 >[numberB, nameB, skillB] = robotB; + + ~~~~~~~ => Pos: (1033 to 1039) SpanInfo: {"start":1034,"length":5} + >nameB + >:=> (line 32, col 10) to (line 32, col 15) +32 >[numberB, nameB, skillB] = robotB; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1040 to 1058) SpanInfo: {"start":1041,"length":6} + >skillB + >:=> (line 32, col 17) to (line 32, col 23) -------------------------------- 33 >[numberB, nameB, skillB] = getRobotB(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1059 to 1098) SpanInfo: {"start":1059,"length":38} - >[numberB, nameB, skillB] = getRobotB() - >:=> (line 33, col 0) to (line 33, col 38) + ~~~~~~~~~ => Pos: (1059 to 1067) SpanInfo: {"start":1060,"length":7} + >numberB + >:=> (line 33, col 1) to (line 33, col 8) +33 >[numberB, nameB, skillB] = getRobotB(); + + ~~~~~~~ => Pos: (1068 to 1074) SpanInfo: {"start":1069,"length":5} + >nameB + >:=> (line 33, col 10) to (line 33, col 15) +33 >[numberB, nameB, skillB] = getRobotB(); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1075 to 1098) SpanInfo: {"start":1076,"length":6} + >skillB + >:=> (line 33, col 17) to (line 33, col 23) -------------------------------- 34 >[numberB, nameB, skillB] = [2, "trimmer", "trimming"]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1099 to 1153) SpanInfo: {"start":1099,"length":53} - >[numberB, nameB, skillB] = [2, "trimmer", "trimming"] - >:=> (line 34, col 0) to (line 34, col 53) + ~~~~~~~~~ => Pos: (1099 to 1107) SpanInfo: {"start":1100,"length":7} + >numberB + >:=> (line 34, col 1) to (line 34, col 8) +34 >[numberB, nameB, skillB] = [2, "trimmer", "trimming"]; + + ~~~~~~~ => Pos: (1108 to 1114) SpanInfo: {"start":1109,"length":5} + >nameB + >:=> (line 34, col 10) to (line 34, col 15) +34 >[numberB, nameB, skillB] = [2, "trimmer", "trimming"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1115 to 1153) SpanInfo: {"start":1116,"length":6} + >skillB + >:=> (line 34, col 17) to (line 34, col 23) -------------------------------- 35 >[nameMB, [primarySkillB, secondarySkillB]] = multiRobotB; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1154 to 1211) SpanInfo: {"start":1154,"length":56} - >[nameMB, [primarySkillB, secondarySkillB]] = multiRobotB - >:=> (line 35, col 0) to (line 35, col 56) + ~~~~~~~~ => Pos: (1154 to 1161) SpanInfo: {"start":1155,"length":6} + >nameMB + >:=> (line 35, col 1) to (line 35, col 7) +35 >[nameMB, [primarySkillB, secondarySkillB]] = multiRobotB; + + ~~~~~~~~~~~~~~~~ => Pos: (1162 to 1177) SpanInfo: {"start":1164,"length":13} + >primarySkillB + >:=> (line 35, col 10) to (line 35, col 23) +35 >[nameMB, [primarySkillB, secondarySkillB]] = multiRobotB; + + ~~~~~~~~~~~~~~~~~ => Pos: (1178 to 1194) SpanInfo: {"start":1179,"length":15} + >secondarySkillB + >:=> (line 35, col 25) to (line 35, col 40) +35 >[nameMB, [primarySkillB, secondarySkillB]] = multiRobotB; + + ~~~~~~~~~~~~~~~~~=> Pos: (1195 to 1211) SpanInfo: {"start":1163,"length":32} + >[primarySkillB, secondarySkillB] + >:=> (line 35, col 9) to (line 35, col 41) -------------------------------- 36 >[nameMB, [primarySkillB, secondarySkillB]] = getMultiRobotB(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1212 to 1274) SpanInfo: {"start":1212,"length":61} - >[nameMB, [primarySkillB, secondarySkillB]] = getMultiRobotB() - >:=> (line 36, col 0) to (line 36, col 61) + ~~~~~~~~ => Pos: (1212 to 1219) SpanInfo: {"start":1213,"length":6} + >nameMB + >:=> (line 36, col 1) to (line 36, col 7) +36 >[nameMB, [primarySkillB, secondarySkillB]] = getMultiRobotB(); + + ~~~~~~~~~~~~~~~~ => Pos: (1220 to 1235) SpanInfo: {"start":1222,"length":13} + >primarySkillB + >:=> (line 36, col 10) to (line 36, col 23) +36 >[nameMB, [primarySkillB, secondarySkillB]] = getMultiRobotB(); + + ~~~~~~~~~~~~~~~~~ => Pos: (1236 to 1252) SpanInfo: {"start":1237,"length":15} + >secondarySkillB + >:=> (line 36, col 25) to (line 36, col 40) +36 >[nameMB, [primarySkillB, secondarySkillB]] = getMultiRobotB(); + + ~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1253 to 1274) SpanInfo: {"start":1221,"length":32} + >[primarySkillB, secondarySkillB] + >:=> (line 36, col 9) to (line 36, col 41) -------------------------------- 37 >[nameMB, [primarySkillB, secondarySkillB]] = ["trimmer", ["trimming", "edging"]]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1275 to 1356) SpanInfo: {"start":1275,"length":80} - >[nameMB, [primarySkillB, secondarySkillB]] = ["trimmer", ["trimming", "edging"]] - >:=> (line 37, col 0) to (line 37, col 80) + ~~~~~~~~ => Pos: (1275 to 1282) SpanInfo: {"start":1276,"length":6} + >nameMB + >:=> (line 37, col 1) to (line 37, col 7) +37 >[nameMB, [primarySkillB, secondarySkillB]] = ["trimmer", ["trimming", "edging"]]; + + ~~~~~~~~~~~~~~~~ => Pos: (1283 to 1298) SpanInfo: {"start":1285,"length":13} + >primarySkillB + >:=> (line 37, col 10) to (line 37, col 23) +37 >[nameMB, [primarySkillB, secondarySkillB]] = ["trimmer", ["trimming", "edging"]]; + + ~~~~~~~~~~~~~~~~~ => Pos: (1299 to 1315) SpanInfo: {"start":1300,"length":15} + >secondarySkillB + >:=> (line 37, col 25) to (line 37, col 40) +37 >[nameMB, [primarySkillB, secondarySkillB]] = ["trimmer", ["trimming", "edging"]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1316 to 1356) SpanInfo: {"start":1284,"length":32} + >[primarySkillB, secondarySkillB] + >:=> (line 37, col 9) to (line 37, col 41) -------------------------------- 38 > @@ -197,39 +272,54 @@ -------------------------------- 39 >[numberB, ...robotAInfo] = robotB; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1358 to 1392) SpanInfo: {"start":1358,"length":33} - >[numberB, ...robotAInfo] = robotB - >:=> (line 39, col 0) to (line 39, col 33) + ~~~~~~~~~ => Pos: (1358 to 1366) SpanInfo: {"start":1359,"length":7} + >numberB + >:=> (line 39, col 1) to (line 39, col 8) +39 >[numberB, ...robotAInfo] = robotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1367 to 1392) SpanInfo: {"start":1368,"length":13} + >...robotAInfo + >:=> (line 39, col 10) to (line 39, col 23) -------------------------------- 40 >[numberB, ...robotAInfo] = getRobotB(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1393 to 1432) SpanInfo: {"start":1393,"length":38} - >[numberB, ...robotAInfo] = getRobotB() - >:=> (line 40, col 0) to (line 40, col 38) + ~~~~~~~~~ => Pos: (1393 to 1401) SpanInfo: {"start":1394,"length":7} + >numberB + >:=> (line 40, col 1) to (line 40, col 8) +40 >[numberB, ...robotAInfo] = getRobotB(); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1402 to 1432) SpanInfo: {"start":1403,"length":13} + >...robotAInfo + >:=> (line 40, col 10) to (line 40, col 23) -------------------------------- 41 >[numberB, ...robotAInfo] = [2, "trimmer", "trimming"]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1433 to 1494) SpanInfo: {"start":1433,"length":60} - >[numberB, ...robotAInfo] = [2, "trimmer", "trimming"] - >:=> (line 41, col 0) to (line 41, col 60) + ~~~~~~~~~ => Pos: (1433 to 1441) SpanInfo: {"start":1434,"length":7} + >numberB + >:=> (line 41, col 1) to (line 41, col 8) +41 >[numberB, ...robotAInfo] = [2, "trimmer", "trimming"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1442 to 1494) SpanInfo: {"start":1443,"length":13} + >...robotAInfo + >:=> (line 41, col 10) to (line 41, col 23) -------------------------------- 42 >[...multiRobotAInfo] = multiRobotA; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1495 to 1530) SpanInfo: {"start":1495,"length":34} - >[...multiRobotAInfo] = multiRobotA - >:=> (line 42, col 0) to (line 42, col 34) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1495 to 1530) SpanInfo: {"start":1496,"length":18} + >...multiRobotAInfo + >:=> (line 42, col 1) to (line 42, col 19) -------------------------------- 43 >[...multiRobotAInfo] = getMultiRobotB(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1531 to 1571) SpanInfo: {"start":1531,"length":39} - >[...multiRobotAInfo] = getMultiRobotB() - >:=> (line 43, col 0) to (line 43, col 39) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1531 to 1571) SpanInfo: {"start":1532,"length":18} + >...multiRobotAInfo + >:=> (line 43, col 1) to (line 43, col 19) -------------------------------- 44 >[...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1572 to 1631) SpanInfo: {"start":1572,"length":58} - >[...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]] - >:=> (line 44, col 0) to (line 44, col 58) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1572 to 1631) SpanInfo: {"start":1573,"length":18} + >...multiRobotAInfo + >:=> (line 44, col 1) to (line 44, col 19) -------------------------------- 45 > diff --git a/tests/baselines/reference/bpSpanDestructuringAssignmentStatementArrayBindingPatternDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringAssignmentStatementArrayBindingPatternDefaultValues.baseline index e5d777f1a1c..7169d67bfef 100644 --- a/tests/baselines/reference/bpSpanDestructuringAssignmentStatementArrayBindingPatternDefaultValues.baseline +++ b/tests/baselines/reference/bpSpanDestructuringAssignmentStatementArrayBindingPatternDefaultValues.baseline @@ -77,39 +77,39 @@ -------------------------------- 18 >[, nameA = "helloNoName"] = robotA; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (607 to 642) SpanInfo: {"start":607,"length":34} - >[, nameA = "helloNoName"] = robotA - >:=> (line 18, col 0) to (line 18, col 34) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (607 to 642) SpanInfo: {"start":610,"length":21} + >nameA = "helloNoName" + >:=> (line 18, col 3) to (line 18, col 24) -------------------------------- 19 >[, nameB = "helloNoName"] = getRobotB(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (643 to 683) SpanInfo: {"start":643,"length":39} - >[, nameB = "helloNoName"] = getRobotB() - >:=> (line 19, col 0) to (line 19, col 39) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (643 to 683) SpanInfo: {"start":646,"length":21} + >nameB = "helloNoName" + >:=> (line 19, col 3) to (line 19, col 24) -------------------------------- 20 >[, nameB = "helloNoName"] = [2, "trimmer", "trimming"]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (684 to 739) SpanInfo: {"start":684,"length":54} - >[, nameB = "helloNoName"] = [2, "trimmer", "trimming"] - >:=> (line 20, col 0) to (line 20, col 54) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (684 to 739) SpanInfo: {"start":687,"length":21} + >nameB = "helloNoName" + >:=> (line 20, col 3) to (line 20, col 24) -------------------------------- 21 >[, multiSkillB = []] = multiRobotB; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (740 to 775) SpanInfo: {"start":740,"length":34} - >[, multiSkillB = []] = multiRobotB - >:=> (line 21, col 0) to (line 21, col 34) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (740 to 775) SpanInfo: {"start":743,"length":16} + >multiSkillB = [] + >:=> (line 21, col 3) to (line 21, col 19) -------------------------------- 22 >[, multiSkillB = []] = getMultiRobotB(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (776 to 816) SpanInfo: {"start":776,"length":39} - >[, multiSkillB = []] = getMultiRobotB() - >:=> (line 22, col 0) to (line 22, col 39) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (776 to 816) SpanInfo: {"start":779,"length":16} + >multiSkillB = [] + >:=> (line 22, col 3) to (line 22, col 19) -------------------------------- 23 >[, multiSkillB = []] = ["roomba", ["vaccum", "mopping"]]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (817 to 874) SpanInfo: {"start":817,"length":56} - >[, multiSkillB = []] = ["roomba", ["vaccum", "mopping"]] - >:=> (line 23, col 0) to (line 23, col 56) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (817 to 874) SpanInfo: {"start":820,"length":16} + >multiSkillB = [] + >:=> (line 23, col 3) to (line 23, col 19) -------------------------------- 24 > @@ -117,39 +117,39 @@ -------------------------------- 25 >[numberB = -1] = robotB; - ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (876 to 900) SpanInfo: {"start":876,"length":23} - >[numberB = -1] = robotB - >:=> (line 25, col 0) to (line 25, col 23) + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (876 to 900) SpanInfo: {"start":877,"length":12} + >numberB = -1 + >:=> (line 25, col 1) to (line 25, col 13) -------------------------------- 26 >[numberB = -1] = getRobotB(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (901 to 930) SpanInfo: {"start":901,"length":28} - >[numberB = -1] = getRobotB() - >:=> (line 26, col 0) to (line 26, col 28) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (901 to 930) SpanInfo: {"start":902,"length":12} + >numberB = -1 + >:=> (line 26, col 1) to (line 26, col 13) -------------------------------- 27 >[numberB = -1] = [2, "trimmer", "trimming"]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (931 to 975) SpanInfo: {"start":931,"length":43} - >[numberB = -1] = [2, "trimmer", "trimming"] - >:=> (line 27, col 0) to (line 27, col 43) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (931 to 975) SpanInfo: {"start":932,"length":12} + >numberB = -1 + >:=> (line 27, col 1) to (line 27, col 13) -------------------------------- 28 >[nameMB = "helloNoName"] = multiRobotB; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (976 to 1015) SpanInfo: {"start":976,"length":38} - >[nameMB = "helloNoName"] = multiRobotB - >:=> (line 28, col 0) to (line 28, col 38) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (976 to 1015) SpanInfo: {"start":977,"length":22} + >nameMB = "helloNoName" + >:=> (line 28, col 1) to (line 28, col 23) -------------------------------- 29 >[nameMB = "helloNoName"] = getMultiRobotB(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1016 to 1060) SpanInfo: {"start":1016,"length":43} - >[nameMB = "helloNoName"] = getMultiRobotB() - >:=> (line 29, col 0) to (line 29, col 43) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1016 to 1060) SpanInfo: {"start":1017,"length":22} + >nameMB = "helloNoName" + >:=> (line 29, col 1) to (line 29, col 23) -------------------------------- 30 >[nameMB = "helloNoName"] = ["trimmer", ["trimming", "edging"]]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1061 to 1124) SpanInfo: {"start":1061,"length":62} - >[nameMB = "helloNoName"] = ["trimmer", ["trimming", "edging"]] - >:=> (line 30, col 0) to (line 30, col 62) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1061 to 1124) SpanInfo: {"start":1062,"length":22} + >nameMB = "helloNoName" + >:=> (line 30, col 1) to (line 30, col 23) -------------------------------- 31 > @@ -157,47 +157,120 @@ -------------------------------- 32 >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = robotB; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1126 to 1193) SpanInfo: {"start":1126,"length":66} - >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = robotB - >:=> (line 32, col 0) to (line 32, col 66) + ~~~~~~~~~~~~~~ => Pos: (1126 to 1139) SpanInfo: {"start":1127,"length":12} + >numberB = -1 + >:=> (line 32, col 1) to (line 32, col 13) +32 >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = robotB; + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1140 to 1162) SpanInfo: {"start":1141,"length":21} + >nameB = "helloNoName" + >:=> (line 32, col 15) to (line 32, col 36) +32 >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = robotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1163 to 1193) SpanInfo: {"start":1164,"length":18} + >skillB = "noSkill" + >:=> (line 32, col 38) to (line 32, col 56) -------------------------------- 33 >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = getRobotB(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1194 to 1266) SpanInfo: {"start":1194,"length":71} - >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = getRobotB() - >:=> (line 33, col 0) to (line 33, col 71) + ~~~~~~~~~~~~~~ => Pos: (1194 to 1207) SpanInfo: {"start":1195,"length":12} + >numberB = -1 + >:=> (line 33, col 1) to (line 33, col 13) +33 >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = getRobotB(); + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1208 to 1230) SpanInfo: {"start":1209,"length":21} + >nameB = "helloNoName" + >:=> (line 33, col 15) to (line 33, col 36) +33 >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = getRobotB(); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1231 to 1266) SpanInfo: {"start":1232,"length":18} + >skillB = "noSkill" + >:=> (line 33, col 38) to (line 33, col 56) -------------------------------- 34 >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = [2, "trimmer", "trimming"]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1267 to 1354) SpanInfo: {"start":1267,"length":86} - >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = [2, "trimmer", "trimming"] - >:=> (line 34, col 0) to (line 34, col 86) + ~~~~~~~~~~~~~~ => Pos: (1267 to 1280) SpanInfo: {"start":1268,"length":12} + >numberB = -1 + >:=> (line 34, col 1) to (line 34, col 13) +34 >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = [2, "trimmer", "trimming"]; + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1281 to 1303) SpanInfo: {"start":1282,"length":21} + >nameB = "helloNoName" + >:=> (line 34, col 15) to (line 34, col 36) +34 >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = [2, "trimmer", "trimming"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1304 to 1354) SpanInfo: {"start":1305,"length":18} + >skillB = "noSkill" + >:=> (line 34, col 38) to (line 34, col 56) -------------------------------- 35 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1355 to 1457) SpanInfo: {"start":1355,"length":101} - >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB - >:=> (line 35, col 0) to (line 35, col 101) + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1355 to 1378) SpanInfo: {"start":1356,"length":22} + >nameMB = "helloNoName" + >:=> (line 35, col 1) to (line 35, col 23) +35 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1379 to 1406) SpanInfo: {"start":1381,"length":25} + >primarySkillB = "noSkill" + >:=> (line 35, col 26) to (line 35, col 51) +35 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1407 to 1440) SpanInfo: {"start":1408,"length":27} + >secondarySkillB = "noSkill" + >:=> (line 35, col 53) to (line 35, col 80) +35 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB; + + ~~~~~~~~~~~~~~~~~=> Pos: (1441 to 1457) SpanInfo: {"start":1380,"length":61} + >[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] + >:=> (line 35, col 25) to (line 35, col 86) -------------------------------- 36 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1458 to 1565) SpanInfo: {"start":1458,"length":106} - >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB() - >:=> (line 36, col 0) to (line 36, col 106) + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1458 to 1481) SpanInfo: {"start":1459,"length":22} + >nameMB = "helloNoName" + >:=> (line 36, col 1) to (line 36, col 23) +36 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB(); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1482 to 1509) SpanInfo: {"start":1484,"length":25} + >primarySkillB = "noSkill" + >:=> (line 36, col 26) to (line 36, col 51) +36 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB(); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1510 to 1543) SpanInfo: {"start":1511,"length":27} + >secondarySkillB = "noSkill" + >:=> (line 36, col 53) to (line 36, col 80) +36 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB(); + + ~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1544 to 1565) SpanInfo: {"start":1483,"length":61} + >[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] + >:=> (line 36, col 25) to (line 36, col 86) -------------------------------- 37 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1566 to 1655) SpanInfo: {"start":1566,"length":129} - >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = - > ["trimmer", ["trimming", "edging"]] - >:=> (line 37, col 0) to (line 38, col 39) + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1566 to 1589) SpanInfo: {"start":1567,"length":22} + >nameMB = "helloNoName" + >:=> (line 37, col 1) to (line 37, col 23) +37 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1590 to 1617) SpanInfo: {"start":1592,"length":25} + >primarySkillB = "noSkill" + >:=> (line 37, col 26) to (line 37, col 51) +37 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1618 to 1651) SpanInfo: {"start":1619,"length":27} + >secondarySkillB = "noSkill" + >:=> (line 37, col 53) to (line 37, col 80) +37 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = + + ~~~~=> Pos: (1652 to 1655) SpanInfo: {"start":1591,"length":61} + >[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] + >:=> (line 37, col 25) to (line 37, col 86) -------------------------------- 38 > ["trimmer", ["trimming", "edging"]]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1656 to 1696) SpanInfo: {"start":1566,"length":129} - >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = - > ["trimmer", ["trimming", "edging"]] - >:=> (line 37, col 0) to (line 38, col 39) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1656 to 1696) SpanInfo: {"start":1591,"length":61} + >[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] + >:=> (line 37, col 25) to (line 37, col 86) -------------------------------- 39 > @@ -205,21 +278,36 @@ -------------------------------- 40 >[numberB = -1, ...robotAInfo] = robotB; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1698 to 1737) SpanInfo: {"start":1698,"length":38} - >[numberB = -1, ...robotAInfo] = robotB - >:=> (line 40, col 0) to (line 40, col 38) + ~~~~~~~~~~~~~~ => Pos: (1698 to 1711) SpanInfo: {"start":1699,"length":12} + >numberB = -1 + >:=> (line 40, col 1) to (line 40, col 13) +40 >[numberB = -1, ...robotAInfo] = robotB; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1712 to 1737) SpanInfo: {"start":1713,"length":13} + >...robotAInfo + >:=> (line 40, col 15) to (line 40, col 28) -------------------------------- 41 >[numberB = -1, ...robotAInfo] = getRobotB(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1738 to 1782) SpanInfo: {"start":1738,"length":43} - >[numberB = -1, ...robotAInfo] = getRobotB() - >:=> (line 41, col 0) to (line 41, col 43) + ~~~~~~~~~~~~~~ => Pos: (1738 to 1751) SpanInfo: {"start":1739,"length":12} + >numberB = -1 + >:=> (line 41, col 1) to (line 41, col 13) +41 >[numberB = -1, ...robotAInfo] = getRobotB(); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1752 to 1782) SpanInfo: {"start":1753,"length":13} + >...robotAInfo + >:=> (line 41, col 15) to (line 41, col 28) -------------------------------- 42 >[numberB = -1, ...robotAInfo] = [2, "trimmer", "trimming"]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1783 to 1849) SpanInfo: {"start":1783,"length":65} - >[numberB = -1, ...robotAInfo] = [2, "trimmer", "trimming"] - >:=> (line 42, col 0) to (line 42, col 65) + ~~~~~~~~~~~~~~ => Pos: (1783 to 1796) SpanInfo: {"start":1784,"length":12} + >numberB = -1 + >:=> (line 42, col 1) to (line 42, col 13) +42 >[numberB = -1, ...robotAInfo] = [2, "trimmer", "trimming"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1797 to 1849) SpanInfo: {"start":1798,"length":13} + >...robotAInfo + >:=> (line 42, col 15) to (line 42, col 28) -------------------------------- 43 > From 481ed321fb7f3cc42c3c74386ecfe082bb20211e Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 22 Dec 2015 15:04:12 -0800 Subject: [PATCH 079/209] Test cases for array pattern destructuring assignment in for initializer --- ...gAssignmentForArrayBindingPattern.baseline | 1125 ++++++++++++++++ ...rArrayBindingPatternDefaultValues.baseline | 1137 +++++++++++++++++ ...cturingAssignmentForArrayBindingPattern.ts | 94 ++ ...mentForArrayBindingPatternDefaultValues.ts | 109 ++ 4 files changed, 2465 insertions(+) create mode 100644 tests/baselines/reference/bpSpanDestructuringAssignmentForArrayBindingPattern.baseline create mode 100644 tests/baselines/reference/bpSpanDestructuringAssignmentForArrayBindingPatternDefaultValues.baseline create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringAssignmentForArrayBindingPattern.ts create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringAssignmentForArrayBindingPatternDefaultValues.ts diff --git a/tests/baselines/reference/bpSpanDestructuringAssignmentForArrayBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringAssignmentForArrayBindingPattern.baseline new file mode 100644 index 00000000000..e08738cffc4 --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringAssignmentForArrayBindingPattern.baseline @@ -0,0 +1,1125 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: any): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (48 to 49) SpanInfo: undefined +-------------------------------- +4 >type Robot = [number, string, string]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 88) SpanInfo: undefined +-------------------------------- +5 >type MultiSkilledRobot = [string, [string, string]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (89 to 141) SpanInfo: undefined +-------------------------------- +6 >let robotA: Robot = [1, "mower", "mowing"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (142 to 185) SpanInfo: {"start":142,"length":42} + >let robotA: Robot = [1, "mower", "mowing"] + >:=> (line 6, col 0) to (line 6, col 42) +-------------------------------- +7 >function getRobot() { + + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (186 to 207) SpanInfo: {"start":212,"length":13} + >return robotA + >:=> (line 8, col 4) to (line 8, col 17) +-------------------------------- +8 > return robotA; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (208 to 226) SpanInfo: {"start":212,"length":13} + >return robotA + >:=> (line 8, col 4) to (line 8, col 17) +-------------------------------- +9 >} + + ~~ => Pos: (227 to 228) SpanInfo: {"start":227,"length":1} + >} + >:=> (line 9, col 0) to (line 9, col 1) +-------------------------------- +10 >let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (229 to 292) SpanInfo: {"start":229,"length":62} + >let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]] + >:=> (line 10, col 0) to (line 10, col 62) +-------------------------------- +11 >let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (293 to 366) SpanInfo: {"start":293,"length":72} + >let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]] + >:=> (line 11, col 0) to (line 11, col 72) +-------------------------------- +12 >function getMultiRobot() { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (367 to 393) SpanInfo: {"start":398,"length":18} + >return multiRobotA + >:=> (line 13, col 4) to (line 13, col 22) +-------------------------------- +13 > return multiRobotA; + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (394 to 417) SpanInfo: {"start":398,"length":18} + >return multiRobotA + >:=> (line 13, col 4) to (line 13, col 22) +-------------------------------- +14 >} + + ~~ => Pos: (418 to 419) SpanInfo: {"start":418,"length":1} + >} + >:=> (line 14, col 0) to (line 14, col 1) +-------------------------------- +15 >let nameA: string, primarySkillA: string, secondarySkillA: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (420 to 486) SpanInfo: undefined +-------------------------------- +16 >let numberB: number, nameB: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (487 to 522) SpanInfo: undefined +-------------------------------- +17 >let numberA2: number, nameA2: string, skillA2: string, nameMA: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (523 to 593) SpanInfo: undefined +-------------------------------- +18 >let numberA3: number, robotAInfo: (number | string)[], multiRobotAInfo: (string | [string, string])[]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (594 to 696) SpanInfo: undefined +-------------------------------- +19 >let i: number; + + ~~~~~~~~~~~~~~~ => Pos: (697 to 711) SpanInfo: undefined +-------------------------------- +20 >for ([, nameA] = robotA, i = 0; i < 1; i++) { + + ~~~~~ => Pos: (712 to 716) SpanInfo: {"start":717,"length":25} + >[, nameA] = robotA, i = 0 + >:=> (line 20, col 5) to (line 20, col 30) +20 >for ([, nameA] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (717 to 735) SpanInfo: {"start":720,"length":5} + >nameA + >:=> (line 20, col 8) to (line 20, col 13) +20 >for ([, nameA] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (736 to 742) SpanInfo: {"start":737,"length":5} + >i = 0 + >:=> (line 20, col 25) to (line 20, col 30) +20 >for ([, nameA] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (743 to 749) SpanInfo: {"start":744,"length":5} + >i < 1 + >:=> (line 20, col 32) to (line 20, col 37) +20 >for ([, nameA] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (750 to 757) SpanInfo: {"start":751,"length":3} + >i++ + >:=> (line 20, col 39) to (line 20, col 42) +-------------------------------- +21 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (758 to 781) SpanInfo: {"start":762,"length":18} + >console.log(nameA) + >:=> (line 21, col 4) to (line 21, col 22) +-------------------------------- +22 >} + + ~~ => Pos: (782 to 783) SpanInfo: {"start":762,"length":18} + >console.log(nameA) + >:=> (line 21, col 4) to (line 21, col 22) +-------------------------------- +23 >for ([, nameA] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~ => Pos: (784 to 788) SpanInfo: {"start":789,"length":29} + >[, nameA] = getRobot(), i = 0 + >:=> (line 23, col 5) to (line 23, col 34) +23 >for ([, nameA] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (789 to 811) SpanInfo: {"start":792,"length":5} + >nameA + >:=> (line 23, col 8) to (line 23, col 13) +23 >for ([, nameA] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (812 to 818) SpanInfo: {"start":813,"length":5} + >i = 0 + >:=> (line 23, col 29) to (line 23, col 34) +23 >for ([, nameA] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (819 to 825) SpanInfo: {"start":820,"length":5} + >i < 1 + >:=> (line 23, col 36) to (line 23, col 41) +23 >for ([, nameA] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (826 to 833) SpanInfo: {"start":827,"length":3} + >i++ + >:=> (line 23, col 43) to (line 23, col 46) +-------------------------------- +24 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (834 to 857) SpanInfo: {"start":838,"length":18} + >console.log(nameA) + >:=> (line 24, col 4) to (line 24, col 22) +-------------------------------- +25 >} + + ~~ => Pos: (858 to 859) SpanInfo: {"start":838,"length":18} + >console.log(nameA) + >:=> (line 24, col 4) to (line 24, col 22) +-------------------------------- +26 >for ([, nameA] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~ => Pos: (860 to 864) SpanInfo: {"start":865,"length":45} + >[, nameA] = [2, "trimmer", "trimming"], i = 0 + >:=> (line 26, col 5) to (line 26, col 50) +26 >for ([, nameA] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (865 to 903) SpanInfo: {"start":868,"length":5} + >nameA + >:=> (line 26, col 8) to (line 26, col 13) +26 >for ([, nameA] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (904 to 910) SpanInfo: {"start":905,"length":5} + >i = 0 + >:=> (line 26, col 45) to (line 26, col 50) +26 >for ([, nameA] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (911 to 917) SpanInfo: {"start":912,"length":5} + >i < 1 + >:=> (line 26, col 52) to (line 26, col 57) +26 >for ([, nameA] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (918 to 925) SpanInfo: {"start":919,"length":3} + >i++ + >:=> (line 26, col 59) to (line 26, col 62) +-------------------------------- +27 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (926 to 949) SpanInfo: {"start":930,"length":18} + >console.log(nameA) + >:=> (line 27, col 4) to (line 27, col 22) +-------------------------------- +28 >} + + ~~ => Pos: (950 to 951) SpanInfo: {"start":930,"length":18} + >console.log(nameA) + >:=> (line 27, col 4) to (line 27, col 22) +-------------------------------- +29 >for ([, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~ => Pos: (952 to 956) SpanInfo: {"start":957,"length":57} + >[, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0 + >:=> (line 29, col 5) to (line 29, col 62) +29 >for ([, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~ => Pos: (957 to 974) SpanInfo: {"start":961,"length":13} + >primarySkillA + >:=> (line 29, col 9) to (line 29, col 22) +29 >for ([, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~ => Pos: (975 to 991) SpanInfo: {"start":976,"length":15} + >secondarySkillA + >:=> (line 29, col 24) to (line 29, col 39) +29 >for ([, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~=> Pos: (992 to 1007) SpanInfo: {"start":960,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 29, col 8) to (line 29, col 40) +29 >for ([, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1008 to 1014) SpanInfo: {"start":1009,"length":5} + >i = 0 + >:=> (line 29, col 57) to (line 29, col 62) +29 >for ([, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1015 to 1021) SpanInfo: {"start":1016,"length":5} + >i < 1 + >:=> (line 29, col 64) to (line 29, col 69) +29 >for ([, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1022 to 1029) SpanInfo: {"start":1023,"length":3} + >i++ + >:=> (line 29, col 71) to (line 29, col 74) +-------------------------------- +30 > console.log(primarySkillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1030 to 1061) SpanInfo: {"start":1034,"length":26} + >console.log(primarySkillA) + >:=> (line 30, col 4) to (line 30, col 30) +-------------------------------- +31 >} + + ~~ => Pos: (1062 to 1063) SpanInfo: {"start":1034,"length":26} + >console.log(primarySkillA) + >:=> (line 30, col 4) to (line 30, col 30) +-------------------------------- +32 >for ([, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~ => Pos: (1064 to 1068) SpanInfo: {"start":1069,"length":61} + >[, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0 + >:=> (line 32, col 5) to (line 32, col 66) +32 >for ([, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~ => Pos: (1069 to 1086) SpanInfo: {"start":1073,"length":13} + >primarySkillA + >:=> (line 32, col 9) to (line 32, col 22) +32 >for ([, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~ => Pos: (1087 to 1103) SpanInfo: {"start":1088,"length":15} + >secondarySkillA + >:=> (line 32, col 24) to (line 32, col 39) +32 >for ([, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~=> Pos: (1104 to 1123) SpanInfo: {"start":1072,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 32, col 8) to (line 32, col 40) +32 >for ([, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1124 to 1130) SpanInfo: {"start":1125,"length":5} + >i = 0 + >:=> (line 32, col 61) to (line 32, col 66) +32 >for ([, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1131 to 1137) SpanInfo: {"start":1132,"length":5} + >i < 1 + >:=> (line 32, col 68) to (line 32, col 73) +32 >for ([, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1138 to 1145) SpanInfo: {"start":1139,"length":3} + >i++ + >:=> (line 32, col 75) to (line 32, col 78) +-------------------------------- +33 > console.log(primarySkillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1146 to 1177) SpanInfo: {"start":1150,"length":26} + >console.log(primarySkillA) + >:=> (line 33, col 4) to (line 33, col 30) +-------------------------------- +34 >} + + ~~ => Pos: (1178 to 1179) SpanInfo: {"start":1150,"length":26} + >console.log(primarySkillA) + >:=> (line 33, col 4) to (line 33, col 30) +-------------------------------- +35 >for ([, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~ => Pos: (1180 to 1184) SpanInfo: {"start":1185,"length":81} + >[, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0 + >:=> (line 35, col 5) to (line 35, col 86) +35 >for ([, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~ => Pos: (1185 to 1202) SpanInfo: {"start":1189,"length":13} + >primarySkillA + >:=> (line 35, col 9) to (line 35, col 22) +35 >for ([, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~ => Pos: (1203 to 1219) SpanInfo: {"start":1204,"length":15} + >secondarySkillA + >:=> (line 35, col 24) to (line 35, col 39) +35 >for ([, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1220 to 1259) SpanInfo: {"start":1188,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 35, col 8) to (line 35, col 40) +35 >for ([, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1260 to 1266) SpanInfo: {"start":1261,"length":5} + >i = 0 + >:=> (line 35, col 81) to (line 35, col 86) +35 >for ([, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1267 to 1273) SpanInfo: {"start":1268,"length":5} + >i < 1 + >:=> (line 35, col 88) to (line 35, col 93) +35 >for ([, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1274 to 1281) SpanInfo: {"start":1275,"length":3} + >i++ + >:=> (line 35, col 95) to (line 35, col 98) +-------------------------------- +36 > console.log(primarySkillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1282 to 1313) SpanInfo: {"start":1286,"length":26} + >console.log(primarySkillA) + >:=> (line 36, col 4) to (line 36, col 30) +-------------------------------- +37 >} + + ~~ => Pos: (1314 to 1315) SpanInfo: {"start":1286,"length":26} + >console.log(primarySkillA) + >:=> (line 36, col 4) to (line 36, col 30) +-------------------------------- +38 >for ([numberB] = robotA, i = 0; i < 1; i++) { + + ~~~~~ => Pos: (1316 to 1320) SpanInfo: {"start":1321,"length":25} + >[numberB] = robotA, i = 0 + >:=> (line 38, col 5) to (line 38, col 30) +38 >for ([numberB] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1321 to 1339) SpanInfo: {"start":1322,"length":7} + >numberB + >:=> (line 38, col 6) to (line 38, col 13) +38 >for ([numberB] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1340 to 1346) SpanInfo: {"start":1341,"length":5} + >i = 0 + >:=> (line 38, col 25) to (line 38, col 30) +38 >for ([numberB] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1347 to 1353) SpanInfo: {"start":1348,"length":5} + >i < 1 + >:=> (line 38, col 32) to (line 38, col 37) +38 >for ([numberB] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1354 to 1361) SpanInfo: {"start":1355,"length":3} + >i++ + >:=> (line 38, col 39) to (line 38, col 42) +-------------------------------- +39 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1362 to 1387) SpanInfo: {"start":1366,"length":20} + >console.log(numberB) + >:=> (line 39, col 4) to (line 39, col 24) +-------------------------------- +40 >} + + ~~ => Pos: (1388 to 1389) SpanInfo: {"start":1366,"length":20} + >console.log(numberB) + >:=> (line 39, col 4) to (line 39, col 24) +-------------------------------- +41 >for ([numberB] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~ => Pos: (1390 to 1394) SpanInfo: {"start":1395,"length":29} + >[numberB] = getRobot(), i = 0 + >:=> (line 41, col 5) to (line 41, col 34) +41 >for ([numberB] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1395 to 1417) SpanInfo: {"start":1396,"length":7} + >numberB + >:=> (line 41, col 6) to (line 41, col 13) +41 >for ([numberB] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1418 to 1424) SpanInfo: {"start":1419,"length":5} + >i = 0 + >:=> (line 41, col 29) to (line 41, col 34) +41 >for ([numberB] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1425 to 1431) SpanInfo: {"start":1426,"length":5} + >i < 1 + >:=> (line 41, col 36) to (line 41, col 41) +41 >for ([numberB] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1432 to 1439) SpanInfo: {"start":1433,"length":3} + >i++ + >:=> (line 41, col 43) to (line 41, col 46) +-------------------------------- +42 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1440 to 1465) SpanInfo: {"start":1444,"length":20} + >console.log(numberB) + >:=> (line 42, col 4) to (line 42, col 24) +-------------------------------- +43 >} + + ~~ => Pos: (1466 to 1467) SpanInfo: {"start":1444,"length":20} + >console.log(numberB) + >:=> (line 42, col 4) to (line 42, col 24) +-------------------------------- +44 >for ([numberB] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~ => Pos: (1468 to 1472) SpanInfo: {"start":1473,"length":45} + >[numberB] = [2, "trimmer", "trimming"], i = 0 + >:=> (line 44, col 5) to (line 44, col 50) +44 >for ([numberB] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1473 to 1511) SpanInfo: {"start":1474,"length":7} + >numberB + >:=> (line 44, col 6) to (line 44, col 13) +44 >for ([numberB] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1512 to 1518) SpanInfo: {"start":1513,"length":5} + >i = 0 + >:=> (line 44, col 45) to (line 44, col 50) +44 >for ([numberB] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1519 to 1525) SpanInfo: {"start":1520,"length":5} + >i < 1 + >:=> (line 44, col 52) to (line 44, col 57) +44 >for ([numberB] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1526 to 1533) SpanInfo: {"start":1527,"length":3} + >i++ + >:=> (line 44, col 59) to (line 44, col 62) +-------------------------------- +45 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1534 to 1559) SpanInfo: {"start":1538,"length":20} + >console.log(numberB) + >:=> (line 45, col 4) to (line 45, col 24) +-------------------------------- +46 >} + + ~~ => Pos: (1560 to 1561) SpanInfo: {"start":1538,"length":20} + >console.log(numberB) + >:=> (line 45, col 4) to (line 45, col 24) +-------------------------------- +47 >for ([nameB] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~ => Pos: (1562 to 1566) SpanInfo: {"start":1567,"length":28} + >[nameB] = multiRobotA, i = 0 + >:=> (line 47, col 5) to (line 47, col 33) +47 >for ([nameB] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1567 to 1588) SpanInfo: {"start":1568,"length":5} + >nameB + >:=> (line 47, col 6) to (line 47, col 11) +47 >for ([nameB] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1589 to 1595) SpanInfo: {"start":1590,"length":5} + >i = 0 + >:=> (line 47, col 28) to (line 47, col 33) +47 >for ([nameB] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1596 to 1602) SpanInfo: {"start":1597,"length":5} + >i < 1 + >:=> (line 47, col 35) to (line 47, col 40) +47 >for ([nameB] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1603 to 1610) SpanInfo: {"start":1604,"length":3} + >i++ + >:=> (line 47, col 42) to (line 47, col 45) +-------------------------------- +48 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1611 to 1634) SpanInfo: {"start":1615,"length":18} + >console.log(nameB) + >:=> (line 48, col 4) to (line 48, col 22) +-------------------------------- +49 >} + + ~~ => Pos: (1635 to 1636) SpanInfo: {"start":1615,"length":18} + >console.log(nameB) + >:=> (line 48, col 4) to (line 48, col 22) +-------------------------------- +50 >for ([nameB] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~ => Pos: (1637 to 1641) SpanInfo: {"start":1642,"length":32} + >[nameB] = getMultiRobot(), i = 0 + >:=> (line 50, col 5) to (line 50, col 37) +50 >for ([nameB] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1642 to 1667) SpanInfo: {"start":1643,"length":5} + >nameB + >:=> (line 50, col 6) to (line 50, col 11) +50 >for ([nameB] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1668 to 1674) SpanInfo: {"start":1669,"length":5} + >i = 0 + >:=> (line 50, col 32) to (line 50, col 37) +50 >for ([nameB] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1675 to 1681) SpanInfo: {"start":1676,"length":5} + >i < 1 + >:=> (line 50, col 39) to (line 50, col 44) +50 >for ([nameB] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1682 to 1689) SpanInfo: {"start":1683,"length":3} + >i++ + >:=> (line 50, col 46) to (line 50, col 49) +-------------------------------- +51 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1690 to 1713) SpanInfo: {"start":1694,"length":18} + >console.log(nameB) + >:=> (line 51, col 4) to (line 51, col 22) +-------------------------------- +52 >} + + ~~ => Pos: (1714 to 1715) SpanInfo: {"start":1694,"length":18} + >console.log(nameB) + >:=> (line 51, col 4) to (line 51, col 22) +-------------------------------- +53 >for ([nameB] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~ => Pos: (1716 to 1720) SpanInfo: {"start":1721,"length":52} + >[nameB] = ["trimmer", ["trimming", "edging"]], i = 0 + >:=> (line 53, col 5) to (line 53, col 57) +53 >for ([nameB] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1721 to 1766) SpanInfo: {"start":1722,"length":5} + >nameB + >:=> (line 53, col 6) to (line 53, col 11) +53 >for ([nameB] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1767 to 1773) SpanInfo: {"start":1768,"length":5} + >i = 0 + >:=> (line 53, col 52) to (line 53, col 57) +53 >for ([nameB] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1774 to 1780) SpanInfo: {"start":1775,"length":5} + >i < 1 + >:=> (line 53, col 59) to (line 53, col 64) +53 >for ([nameB] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1781 to 1788) SpanInfo: {"start":1782,"length":3} + >i++ + >:=> (line 53, col 66) to (line 53, col 69) +-------------------------------- +54 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1789 to 1812) SpanInfo: {"start":1793,"length":18} + >console.log(nameB) + >:=> (line 54, col 4) to (line 54, col 22) +-------------------------------- +55 >} + + ~~ => Pos: (1813 to 1814) SpanInfo: {"start":1793,"length":18} + >console.log(nameB) + >:=> (line 54, col 4) to (line 54, col 22) +-------------------------------- +56 >for ([numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { + + ~~~~~ => Pos: (1815 to 1819) SpanInfo: {"start":1820,"length":43} + >[numberA2, nameA2, skillA2] = robotA, i = 0 + >:=> (line 56, col 5) to (line 56, col 48) +56 >for ([numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~ => Pos: (1820 to 1829) SpanInfo: {"start":1821,"length":8} + >numberA2 + >:=> (line 56, col 6) to (line 56, col 14) +56 >for ([numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (1830 to 1837) SpanInfo: {"start":1831,"length":6} + >nameA2 + >:=> (line 56, col 16) to (line 56, col 22) +56 >for ([numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1838 to 1856) SpanInfo: {"start":1839,"length":7} + >skillA2 + >:=> (line 56, col 24) to (line 56, col 31) +56 >for ([numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1857 to 1863) SpanInfo: {"start":1858,"length":5} + >i = 0 + >:=> (line 56, col 43) to (line 56, col 48) +56 >for ([numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1864 to 1870) SpanInfo: {"start":1865,"length":5} + >i < 1 + >:=> (line 56, col 50) to (line 56, col 55) +56 >for ([numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1871 to 1878) SpanInfo: {"start":1872,"length":3} + >i++ + >:=> (line 56, col 57) to (line 56, col 60) +-------------------------------- +57 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1879 to 1903) SpanInfo: {"start":1883,"length":19} + >console.log(nameA2) + >:=> (line 57, col 4) to (line 57, col 23) +-------------------------------- +58 >} + + ~~ => Pos: (1904 to 1905) SpanInfo: {"start":1883,"length":19} + >console.log(nameA2) + >:=> (line 57, col 4) to (line 57, col 23) +-------------------------------- +59 >for ([numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~ => Pos: (1906 to 1910) SpanInfo: {"start":1911,"length":47} + >[numberA2, nameA2, skillA2] = getRobot(), i = 0 + >:=> (line 59, col 5) to (line 59, col 52) +59 >for ([numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~ => Pos: (1911 to 1920) SpanInfo: {"start":1912,"length":8} + >numberA2 + >:=> (line 59, col 6) to (line 59, col 14) +59 >for ([numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (1921 to 1928) SpanInfo: {"start":1922,"length":6} + >nameA2 + >:=> (line 59, col 16) to (line 59, col 22) +59 >for ([numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1929 to 1951) SpanInfo: {"start":1930,"length":7} + >skillA2 + >:=> (line 59, col 24) to (line 59, col 31) +59 >for ([numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1952 to 1958) SpanInfo: {"start":1953,"length":5} + >i = 0 + >:=> (line 59, col 47) to (line 59, col 52) +59 >for ([numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1959 to 1965) SpanInfo: {"start":1960,"length":5} + >i < 1 + >:=> (line 59, col 54) to (line 59, col 59) +59 >for ([numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1966 to 1973) SpanInfo: {"start":1967,"length":3} + >i++ + >:=> (line 59, col 61) to (line 59, col 64) +-------------------------------- +60 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1974 to 1998) SpanInfo: {"start":1978,"length":19} + >console.log(nameA2) + >:=> (line 60, col 4) to (line 60, col 23) +-------------------------------- +61 >} + + ~~ => Pos: (1999 to 2000) SpanInfo: {"start":1978,"length":19} + >console.log(nameA2) + >:=> (line 60, col 4) to (line 60, col 23) +-------------------------------- +62 >for ([numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~ => Pos: (2001 to 2005) SpanInfo: {"start":2006,"length":63} + >[numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0 + >:=> (line 62, col 5) to (line 62, col 68) +62 >for ([numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~~~ => Pos: (2006 to 2015) SpanInfo: {"start":2007,"length":8} + >numberA2 + >:=> (line 62, col 6) to (line 62, col 14) +62 >for ([numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (2016 to 2023) SpanInfo: {"start":2017,"length":6} + >nameA2 + >:=> (line 62, col 16) to (line 62, col 22) +62 >for ([numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2024 to 2062) SpanInfo: {"start":2025,"length":7} + >skillA2 + >:=> (line 62, col 24) to (line 62, col 31) +62 >for ([numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2063 to 2069) SpanInfo: {"start":2064,"length":5} + >i = 0 + >:=> (line 62, col 63) to (line 62, col 68) +62 >for ([numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2070 to 2076) SpanInfo: {"start":2071,"length":5} + >i < 1 + >:=> (line 62, col 70) to (line 62, col 75) +62 >for ([numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2077 to 2084) SpanInfo: {"start":2078,"length":3} + >i++ + >:=> (line 62, col 77) to (line 62, col 80) +-------------------------------- +63 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2085 to 2109) SpanInfo: {"start":2089,"length":19} + >console.log(nameA2) + >:=> (line 63, col 4) to (line 63, col 23) +-------------------------------- +64 >} + + ~~ => Pos: (2110 to 2111) SpanInfo: {"start":2089,"length":19} + >console.log(nameA2) + >:=> (line 63, col 4) to (line 63, col 23) +-------------------------------- +65 >for ([nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~ => Pos: (2112 to 2116) SpanInfo: {"start":2117,"length":63} + >[nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0 + >:=> (line 65, col 5) to (line 65, col 68) +65 >for ([nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (2117 to 2124) SpanInfo: {"start":2118,"length":6} + >nameMA + >:=> (line 65, col 6) to (line 65, col 12) +65 >for ([nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~ => Pos: (2125 to 2140) SpanInfo: {"start":2127,"length":13} + >primarySkillA + >:=> (line 65, col 15) to (line 65, col 28) +65 >for ([nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~=> Pos: (2141 to 2157) SpanInfo: {"start":2142,"length":15} + >secondarySkillA + >:=> (line 65, col 30) to (line 65, col 45) +65 >for ([nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~=> Pos: (2158 to 2173) SpanInfo: {"start":2126,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 65, col 14) to (line 65, col 46) +65 >for ([nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2174 to 2180) SpanInfo: {"start":2175,"length":5} + >i = 0 + >:=> (line 65, col 63) to (line 65, col 68) +65 >for ([nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2181 to 2187) SpanInfo: {"start":2182,"length":5} + >i < 1 + >:=> (line 65, col 70) to (line 65, col 75) +65 >for ([nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2188 to 2195) SpanInfo: {"start":2189,"length":3} + >i++ + >:=> (line 65, col 77) to (line 65, col 80) +-------------------------------- +66 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2196 to 2220) SpanInfo: {"start":2200,"length":19} + >console.log(nameMA) + >:=> (line 66, col 4) to (line 66, col 23) +-------------------------------- +67 >} + + ~~ => Pos: (2221 to 2222) SpanInfo: {"start":2200,"length":19} + >console.log(nameMA) + >:=> (line 66, col 4) to (line 66, col 23) +-------------------------------- +68 >for ([nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~ => Pos: (2223 to 2227) SpanInfo: {"start":2228,"length":67} + >[nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0 + >:=> (line 68, col 5) to (line 68, col 72) +68 >for ([nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (2228 to 2235) SpanInfo: {"start":2229,"length":6} + >nameMA + >:=> (line 68, col 6) to (line 68, col 12) +68 >for ([nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~ => Pos: (2236 to 2251) SpanInfo: {"start":2238,"length":13} + >primarySkillA + >:=> (line 68, col 15) to (line 68, col 28) +68 >for ([nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~=> Pos: (2252 to 2268) SpanInfo: {"start":2253,"length":15} + >secondarySkillA + >:=> (line 68, col 30) to (line 68, col 45) +68 >for ([nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~=> Pos: (2269 to 2288) SpanInfo: {"start":2237,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 68, col 14) to (line 68, col 46) +68 >for ([nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2289 to 2295) SpanInfo: {"start":2290,"length":5} + >i = 0 + >:=> (line 68, col 67) to (line 68, col 72) +68 >for ([nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2296 to 2302) SpanInfo: {"start":2297,"length":5} + >i < 1 + >:=> (line 68, col 74) to (line 68, col 79) +68 >for ([nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2303 to 2310) SpanInfo: {"start":2304,"length":3} + >i++ + >:=> (line 68, col 81) to (line 68, col 84) +-------------------------------- +69 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2311 to 2335) SpanInfo: {"start":2315,"length":19} + >console.log(nameMA) + >:=> (line 69, col 4) to (line 69, col 23) +-------------------------------- +70 >} + + ~~ => Pos: (2336 to 2337) SpanInfo: {"start":2315,"length":19} + >console.log(nameMA) + >:=> (line 69, col 4) to (line 69, col 23) +-------------------------------- +71 >for ([nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~ => Pos: (2338 to 2342) SpanInfo: {"start":2343,"length":87} + >[nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0 + >:=> (line 71, col 5) to (line 71, col 92) +71 >for ([nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (2343 to 2350) SpanInfo: {"start":2344,"length":6} + >nameMA + >:=> (line 71, col 6) to (line 71, col 12) +71 >for ([nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~ => Pos: (2351 to 2366) SpanInfo: {"start":2353,"length":13} + >primarySkillA + >:=> (line 71, col 15) to (line 71, col 28) +71 >for ([nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~=> Pos: (2367 to 2383) SpanInfo: {"start":2368,"length":15} + >secondarySkillA + >:=> (line 71, col 30) to (line 71, col 45) +71 >for ([nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2384 to 2423) SpanInfo: {"start":2352,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 71, col 14) to (line 71, col 46) +71 >for ([nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2424 to 2430) SpanInfo: {"start":2425,"length":5} + >i = 0 + >:=> (line 71, col 87) to (line 71, col 92) +71 >for ([nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2431 to 2437) SpanInfo: {"start":2432,"length":5} + >i < 1 + >:=> (line 71, col 94) to (line 71, col 99) +71 >for ([nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2438 to 2445) SpanInfo: {"start":2439,"length":3} + >i++ + >:=> (line 71, col 101) to (line 71, col 104) +-------------------------------- +72 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2446 to 2470) SpanInfo: {"start":2450,"length":19} + >console.log(nameMA) + >:=> (line 72, col 4) to (line 72, col 23) +-------------------------------- +73 >} + + ~~ => Pos: (2471 to 2472) SpanInfo: {"start":2450,"length":19} + >console.log(nameMA) + >:=> (line 72, col 4) to (line 72, col 23) +-------------------------------- +74 >for ([numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + + ~~~~~ => Pos: (2473 to 2477) SpanInfo: {"start":2478,"length":41} + >[numberA3, ...robotAInfo] = robotA, i = 0 + >:=> (line 74, col 5) to (line 74, col 46) +74 >for ([numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~ => Pos: (2478 to 2487) SpanInfo: {"start":2479,"length":8} + >numberA3 + >:=> (line 74, col 6) to (line 74, col 14) +74 >for ([numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2488 to 2512) SpanInfo: {"start":2489,"length":13} + >...robotAInfo + >:=> (line 74, col 16) to (line 74, col 29) +74 >for ([numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2513 to 2519) SpanInfo: {"start":2514,"length":5} + >i = 0 + >:=> (line 74, col 41) to (line 74, col 46) +74 >for ([numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2520 to 2526) SpanInfo: {"start":2521,"length":5} + >i < 1 + >:=> (line 74, col 48) to (line 74, col 53) +74 >for ([numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2527 to 2534) SpanInfo: {"start":2528,"length":3} + >i++ + >:=> (line 74, col 55) to (line 74, col 58) +-------------------------------- +75 > console.log(numberA3); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2535 to 2561) SpanInfo: {"start":2539,"length":21} + >console.log(numberA3) + >:=> (line 75, col 4) to (line 75, col 25) +-------------------------------- +76 >} + + ~~ => Pos: (2562 to 2563) SpanInfo: {"start":2539,"length":21} + >console.log(numberA3) + >:=> (line 75, col 4) to (line 75, col 25) +-------------------------------- +77 >for ([numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~ => Pos: (2564 to 2568) SpanInfo: {"start":2569,"length":45} + >[numberA3, ...robotAInfo] = getRobot(), i = 0 + >:=> (line 77, col 5) to (line 77, col 50) +77 >for ([numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~ => Pos: (2569 to 2578) SpanInfo: {"start":2570,"length":8} + >numberA3 + >:=> (line 77, col 6) to (line 77, col 14) +77 >for ([numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2579 to 2607) SpanInfo: {"start":2580,"length":13} + >...robotAInfo + >:=> (line 77, col 16) to (line 77, col 29) +77 >for ([numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2608 to 2614) SpanInfo: {"start":2609,"length":5} + >i = 0 + >:=> (line 77, col 45) to (line 77, col 50) +77 >for ([numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2615 to 2621) SpanInfo: {"start":2616,"length":5} + >i < 1 + >:=> (line 77, col 52) to (line 77, col 57) +77 >for ([numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2622 to 2629) SpanInfo: {"start":2623,"length":3} + >i++ + >:=> (line 77, col 59) to (line 77, col 62) +-------------------------------- +78 > console.log(numberA3); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2630 to 2656) SpanInfo: {"start":2634,"length":21} + >console.log(numberA3) + >:=> (line 78, col 4) to (line 78, col 25) +-------------------------------- +79 >} + + ~~ => Pos: (2657 to 2658) SpanInfo: {"start":2634,"length":21} + >console.log(numberA3) + >:=> (line 78, col 4) to (line 78, col 25) +-------------------------------- +80 >for ([numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~ => Pos: (2659 to 2663) SpanInfo: {"start":2664,"length":68} + >[numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0 + >:=> (line 80, col 5) to (line 80, col 73) +80 >for ([numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~~~ => Pos: (2664 to 2673) SpanInfo: {"start":2665,"length":8} + >numberA3 + >:=> (line 80, col 6) to (line 80, col 14) +80 >for ([numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2674 to 2725) SpanInfo: {"start":2675,"length":13} + >...robotAInfo + >:=> (line 80, col 16) to (line 80, col 29) +80 >for ([numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2726 to 2732) SpanInfo: {"start":2727,"length":5} + >i = 0 + >:=> (line 80, col 68) to (line 80, col 73) +80 >for ([numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2733 to 2739) SpanInfo: {"start":2734,"length":5} + >i < 1 + >:=> (line 80, col 75) to (line 80, col 80) +80 >for ([numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2740 to 2747) SpanInfo: {"start":2741,"length":3} + >i++ + >:=> (line 80, col 82) to (line 80, col 85) +-------------------------------- +81 > console.log(numberA3); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2748 to 2774) SpanInfo: {"start":2752,"length":21} + >console.log(numberA3) + >:=> (line 81, col 4) to (line 81, col 25) +-------------------------------- +82 >} + + ~~ => Pos: (2775 to 2776) SpanInfo: {"start":2752,"length":21} + >console.log(numberA3) + >:=> (line 81, col 4) to (line 81, col 25) +-------------------------------- +83 >for ([...multiRobotAInfo] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~ => Pos: (2777 to 2781) SpanInfo: {"start":2782,"length":41} + >[...multiRobotAInfo] = multiRobotA, i = 0 + >:=> (line 83, col 5) to (line 83, col 46) +83 >for ([...multiRobotAInfo] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2782 to 2816) SpanInfo: {"start":2783,"length":18} + >...multiRobotAInfo + >:=> (line 83, col 6) to (line 83, col 24) +83 >for ([...multiRobotAInfo] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2817 to 2823) SpanInfo: {"start":2818,"length":5} + >i = 0 + >:=> (line 83, col 41) to (line 83, col 46) +83 >for ([...multiRobotAInfo] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2824 to 2830) SpanInfo: {"start":2825,"length":5} + >i < 1 + >:=> (line 83, col 48) to (line 83, col 53) +83 >for ([...multiRobotAInfo] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2831 to 2838) SpanInfo: {"start":2832,"length":3} + >i++ + >:=> (line 83, col 55) to (line 83, col 58) +-------------------------------- +84 > console.log(multiRobotAInfo); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2839 to 2872) SpanInfo: {"start":2843,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 84, col 4) to (line 84, col 32) +-------------------------------- +85 >} + + ~~ => Pos: (2873 to 2874) SpanInfo: {"start":2843,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 84, col 4) to (line 84, col 32) +-------------------------------- +86 >for ([...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~ => Pos: (2875 to 2879) SpanInfo: {"start":2880,"length":45} + >[...multiRobotAInfo] = getMultiRobot(), i = 0 + >:=> (line 86, col 5) to (line 86, col 50) +86 >for ([...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2880 to 2918) SpanInfo: {"start":2881,"length":18} + >...multiRobotAInfo + >:=> (line 86, col 6) to (line 86, col 24) +86 >for ([...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2919 to 2925) SpanInfo: {"start":2920,"length":5} + >i = 0 + >:=> (line 86, col 45) to (line 86, col 50) +86 >for ([...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2926 to 2932) SpanInfo: {"start":2927,"length":5} + >i < 1 + >:=> (line 86, col 52) to (line 86, col 57) +86 >for ([...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2933 to 2940) SpanInfo: {"start":2934,"length":3} + >i++ + >:=> (line 86, col 59) to (line 86, col 62) +-------------------------------- +87 > console.log(multiRobotAInfo); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2941 to 2974) SpanInfo: {"start":2945,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 87, col 4) to (line 87, col 32) +-------------------------------- +88 >} + + ~~ => Pos: (2975 to 2976) SpanInfo: {"start":2945,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 87, col 4) to (line 87, col 32) +-------------------------------- +89 >for ([...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~ => Pos: (2977 to 2981) SpanInfo: {"start":2982,"length":84} + >[...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0 + >:=> (line 89, col 5) to (line 89, col 89) +89 >for ([...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2982 to 3059) SpanInfo: {"start":2983,"length":18} + >...multiRobotAInfo + >:=> (line 89, col 6) to (line 89, col 24) +89 >for ([...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (3060 to 3066) SpanInfo: {"start":3061,"length":5} + >i = 0 + >:=> (line 89, col 84) to (line 89, col 89) +89 >for ([...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (3067 to 3073) SpanInfo: {"start":3068,"length":5} + >i < 1 + >:=> (line 89, col 91) to (line 89, col 96) +89 >for ([...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (3074 to 3081) SpanInfo: {"start":3075,"length":3} + >i++ + >:=> (line 89, col 98) to (line 89, col 101) +-------------------------------- +90 > console.log(multiRobotAInfo); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3082 to 3115) SpanInfo: {"start":3086,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 90, col 4) to (line 90, col 32) +-------------------------------- +91 >} + ~ => Pos: (3116 to 3116) SpanInfo: {"start":3086,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 90, col 4) to (line 90, col 32) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringAssignmentForArrayBindingPatternDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringAssignmentForArrayBindingPatternDefaultValues.baseline new file mode 100644 index 00000000000..28b4bdb96e9 --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringAssignmentForArrayBindingPatternDefaultValues.baseline @@ -0,0 +1,1137 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: any): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (48 to 49) SpanInfo: undefined +-------------------------------- +4 >type Robot = [number, string, string]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 88) SpanInfo: undefined +-------------------------------- +5 >type MultiSkilledRobot = [string, [string, string]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (89 to 141) SpanInfo: undefined +-------------------------------- +6 >let robotA: Robot = [1, "mower", "mowing"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (142 to 185) SpanInfo: {"start":142,"length":42} + >let robotA: Robot = [1, "mower", "mowing"] + >:=> (line 6, col 0) to (line 6, col 42) +-------------------------------- +7 >function getRobot() { + + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (186 to 207) SpanInfo: {"start":212,"length":13} + >return robotA + >:=> (line 8, col 4) to (line 8, col 17) +-------------------------------- +8 > return robotA; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (208 to 226) SpanInfo: {"start":212,"length":13} + >return robotA + >:=> (line 8, col 4) to (line 8, col 17) +-------------------------------- +9 >} + + ~~ => Pos: (227 to 228) SpanInfo: {"start":227,"length":1} + >} + >:=> (line 9, col 0) to (line 9, col 1) +-------------------------------- +10 >let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (229 to 292) SpanInfo: {"start":229,"length":62} + >let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]] + >:=> (line 10, col 0) to (line 10, col 62) +-------------------------------- +11 >let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (293 to 366) SpanInfo: {"start":293,"length":72} + >let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]] + >:=> (line 11, col 0) to (line 11, col 72) +-------------------------------- +12 >function getMultiRobot() { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (367 to 393) SpanInfo: {"start":398,"length":18} + >return multiRobotA + >:=> (line 13, col 4) to (line 13, col 22) +-------------------------------- +13 > return multiRobotA; + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (394 to 417) SpanInfo: {"start":398,"length":18} + >return multiRobotA + >:=> (line 13, col 4) to (line 13, col 22) +-------------------------------- +14 >} + + ~~ => Pos: (418 to 419) SpanInfo: {"start":418,"length":1} + >} + >:=> (line 14, col 0) to (line 14, col 1) +-------------------------------- +15 >let nameA: string, primarySkillA: string, secondarySkillA: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (420 to 486) SpanInfo: undefined +-------------------------------- +16 >let numberB: number, nameB: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (487 to 522) SpanInfo: undefined +-------------------------------- +17 >let numberA2: number, nameA2: string, skillA2: string, nameMA: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (523 to 593) SpanInfo: undefined +-------------------------------- +18 >let numberA3: number, robotAInfo: (number | string)[], multiRobotAInfo: (string | [string, string])[]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (594 to 696) SpanInfo: undefined +-------------------------------- +19 >let i: number; + + ~~~~~~~~~~~~~~~ => Pos: (697 to 711) SpanInfo: undefined +-------------------------------- +20 >for ([, nameA = "name"] = robotA, i = 0; i < 1; i++) { + + ~~~~~ => Pos: (712 to 716) SpanInfo: {"start":717,"length":34} + >[, nameA = "name"] = robotA, i = 0 + >:=> (line 20, col 5) to (line 20, col 39) +20 >for ([, nameA = "name"] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (717 to 744) SpanInfo: {"start":720,"length":14} + >nameA = "name" + >:=> (line 20, col 8) to (line 20, col 22) +20 >for ([, nameA = "name"] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (745 to 751) SpanInfo: {"start":746,"length":5} + >i = 0 + >:=> (line 20, col 34) to (line 20, col 39) +20 >for ([, nameA = "name"] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (752 to 758) SpanInfo: {"start":753,"length":5} + >i < 1 + >:=> (line 20, col 41) to (line 20, col 46) +20 >for ([, nameA = "name"] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (759 to 766) SpanInfo: {"start":760,"length":3} + >i++ + >:=> (line 20, col 48) to (line 20, col 51) +-------------------------------- +21 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (767 to 790) SpanInfo: {"start":771,"length":18} + >console.log(nameA) + >:=> (line 21, col 4) to (line 21, col 22) +-------------------------------- +22 >} + + ~~ => Pos: (791 to 792) SpanInfo: {"start":771,"length":18} + >console.log(nameA) + >:=> (line 21, col 4) to (line 21, col 22) +-------------------------------- +23 >for ([, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~ => Pos: (793 to 797) SpanInfo: {"start":798,"length":38} + >[, nameA = "name"] = getRobot(), i = 0 + >:=> (line 23, col 5) to (line 23, col 43) +23 >for ([, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (798 to 829) SpanInfo: {"start":801,"length":14} + >nameA = "name" + >:=> (line 23, col 8) to (line 23, col 22) +23 >for ([, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (830 to 836) SpanInfo: {"start":831,"length":5} + >i = 0 + >:=> (line 23, col 38) to (line 23, col 43) +23 >for ([, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (837 to 843) SpanInfo: {"start":838,"length":5} + >i < 1 + >:=> (line 23, col 45) to (line 23, col 50) +23 >for ([, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (844 to 851) SpanInfo: {"start":845,"length":3} + >i++ + >:=> (line 23, col 52) to (line 23, col 55) +-------------------------------- +24 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (852 to 875) SpanInfo: {"start":856,"length":18} + >console.log(nameA) + >:=> (line 24, col 4) to (line 24, col 22) +-------------------------------- +25 >} + + ~~ => Pos: (876 to 877) SpanInfo: {"start":856,"length":18} + >console.log(nameA) + >:=> (line 24, col 4) to (line 24, col 22) +-------------------------------- +26 >for ([, nameA = "name"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~ => Pos: (878 to 882) SpanInfo: {"start":883,"length":54} + >[, nameA = "name"] = [2, "trimmer", "trimming"], i = 0 + >:=> (line 26, col 5) to (line 26, col 59) +26 >for ([, nameA = "name"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (883 to 930) SpanInfo: {"start":886,"length":14} + >nameA = "name" + >:=> (line 26, col 8) to (line 26, col 22) +26 >for ([, nameA = "name"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (931 to 937) SpanInfo: {"start":932,"length":5} + >i = 0 + >:=> (line 26, col 54) to (line 26, col 59) +26 >for ([, nameA = "name"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (938 to 944) SpanInfo: {"start":939,"length":5} + >i < 1 + >:=> (line 26, col 61) to (line 26, col 66) +26 >for ([, nameA = "name"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (945 to 952) SpanInfo: {"start":946,"length":3} + >i++ + >:=> (line 26, col 68) to (line 26, col 71) +-------------------------------- +27 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (953 to 976) SpanInfo: {"start":957,"length":18} + >console.log(nameA) + >:=> (line 27, col 4) to (line 27, col 22) +-------------------------------- +28 >} + + ~~ => Pos: (977 to 978) SpanInfo: {"start":957,"length":18} + >console.log(nameA) + >:=> (line 27, col 4) to (line 27, col 22) +-------------------------------- +29 >for ([, [ + + ~~~~~ => Pos: (979 to 983) SpanInfo: {"start":984,"length":112} + >[, [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["none", "none"]] = multiRobotA, i = 0 + >:=> (line 29, col 5) to (line 32, col 42) +29 >for ([, [ + + ~~~~~ => Pos: (984 to 988) SpanInfo: {"start":993,"length":25} + >primarySkillA = "primary" + >:=> (line 30, col 4) to (line 30, col 29) +-------------------------------- +30 > primarySkillA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (989 to 1019) SpanInfo: {"start":993,"length":25} + >primarySkillA = "primary" + >:=> (line 30, col 4) to (line 30, col 29) +-------------------------------- +31 > secondarySkillA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1020 to 1053) SpanInfo: {"start":1024,"length":29} + >secondarySkillA = "secondary" + >:=> (line 31, col 4) to (line 31, col 33) +-------------------------------- +32 >] = ["none", "none"]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (1054 to 1073) SpanInfo: {"start":1024,"length":29} + >secondarySkillA = "secondary" + >:=> (line 31, col 4) to (line 31, col 33) +32 >] = ["none", "none"]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~ => Pos: (1074 to 1089) SpanInfo: {"start":987,"length":87} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["none", "none"] + >:=> (line 29, col 8) to (line 32, col 20) +32 >] = ["none", "none"]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1090 to 1096) SpanInfo: {"start":1091,"length":5} + >i = 0 + >:=> (line 32, col 37) to (line 32, col 42) +32 >] = ["none", "none"]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1097 to 1103) SpanInfo: {"start":1098,"length":5} + >i < 1 + >:=> (line 32, col 44) to (line 32, col 49) +32 >] = ["none", "none"]] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1104 to 1111) SpanInfo: {"start":1105,"length":3} + >i++ + >:=> (line 32, col 51) to (line 32, col 54) +-------------------------------- +33 > console.log(primarySkillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1112 to 1143) SpanInfo: {"start":1116,"length":26} + >console.log(primarySkillA) + >:=> (line 33, col 4) to (line 33, col 30) +-------------------------------- +34 >} + + ~~ => Pos: (1144 to 1145) SpanInfo: {"start":1116,"length":26} + >console.log(primarySkillA) + >:=> (line 33, col 4) to (line 33, col 30) +-------------------------------- +35 >for ([, [ + + ~~~~~ => Pos: (1146 to 1150) SpanInfo: {"start":1151,"length":116} + >[, [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["none", "none"]] = getMultiRobot(), i = 0 + >:=> (line 35, col 5) to (line 38, col 46) +35 >for ([, [ + + ~~~~~ => Pos: (1151 to 1155) SpanInfo: {"start":1160,"length":25} + >primarySkillA = "primary" + >:=> (line 36, col 4) to (line 36, col 29) +-------------------------------- +36 > primarySkillA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1156 to 1186) SpanInfo: {"start":1160,"length":25} + >primarySkillA = "primary" + >:=> (line 36, col 4) to (line 36, col 29) +-------------------------------- +37 > secondarySkillA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1187 to 1220) SpanInfo: {"start":1191,"length":29} + >secondarySkillA = "secondary" + >:=> (line 37, col 4) to (line 37, col 33) +-------------------------------- +38 >] = ["none", "none"]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (1221 to 1240) SpanInfo: {"start":1191,"length":29} + >secondarySkillA = "secondary" + >:=> (line 37, col 4) to (line 37, col 33) +38 >] = ["none", "none"]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (1241 to 1260) SpanInfo: {"start":1154,"length":87} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["none", "none"] + >:=> (line 35, col 8) to (line 38, col 20) +38 >] = ["none", "none"]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1261 to 1267) SpanInfo: {"start":1262,"length":5} + >i = 0 + >:=> (line 38, col 41) to (line 38, col 46) +38 >] = ["none", "none"]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1268 to 1274) SpanInfo: {"start":1269,"length":5} + >i < 1 + >:=> (line 38, col 48) to (line 38, col 53) +38 >] = ["none", "none"]] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1275 to 1282) SpanInfo: {"start":1276,"length":3} + >i++ + >:=> (line 38, col 55) to (line 38, col 58) +-------------------------------- +39 > console.log(primarySkillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1283 to 1314) SpanInfo: {"start":1287,"length":26} + >console.log(primarySkillA) + >:=> (line 39, col 4) to (line 39, col 30) +-------------------------------- +40 >} + + ~~ => Pos: (1315 to 1316) SpanInfo: {"start":1287,"length":26} + >console.log(primarySkillA) + >:=> (line 39, col 4) to (line 39, col 30) +-------------------------------- +41 >for ([, [ + + ~~~~~ => Pos: (1317 to 1321) SpanInfo: {"start":1322,"length":136} + >[, [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0 + >:=> (line 41, col 5) to (line 44, col 66) +41 >for ([, [ + + ~~~~~ => Pos: (1322 to 1326) SpanInfo: {"start":1331,"length":25} + >primarySkillA = "primary" + >:=> (line 42, col 4) to (line 42, col 29) +-------------------------------- +42 > primarySkillA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1327 to 1357) SpanInfo: {"start":1331,"length":25} + >primarySkillA = "primary" + >:=> (line 42, col 4) to (line 42, col 29) +-------------------------------- +43 > secondarySkillA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1358 to 1391) SpanInfo: {"start":1362,"length":29} + >secondarySkillA = "secondary" + >:=> (line 43, col 4) to (line 43, col 33) +-------------------------------- +44 >] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (1392 to 1411) SpanInfo: {"start":1362,"length":29} + >secondarySkillA = "secondary" + >:=> (line 43, col 4) to (line 43, col 33) +44 >] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1412 to 1451) SpanInfo: {"start":1325,"length":87} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["none", "none"] + >:=> (line 41, col 8) to (line 44, col 20) +44 >] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1452 to 1458) SpanInfo: {"start":1453,"length":5} + >i = 0 + >:=> (line 44, col 61) to (line 44, col 66) +44 >] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1459 to 1465) SpanInfo: {"start":1460,"length":5} + >i < 1 + >:=> (line 44, col 68) to (line 44, col 73) +44 >] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1466 to 1473) SpanInfo: {"start":1467,"length":3} + >i++ + >:=> (line 44, col 75) to (line 44, col 78) +-------------------------------- +45 > console.log(primarySkillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1474 to 1505) SpanInfo: {"start":1478,"length":26} + >console.log(primarySkillA) + >:=> (line 45, col 4) to (line 45, col 30) +-------------------------------- +46 >} + + ~~ => Pos: (1506 to 1507) SpanInfo: {"start":1478,"length":26} + >console.log(primarySkillA) + >:=> (line 45, col 4) to (line 45, col 30) +-------------------------------- +47 >for ([numberB = -1] = robotA, i = 0; i < 1; i++) { + + ~~~~~ => Pos: (1508 to 1512) SpanInfo: {"start":1513,"length":30} + >[numberB = -1] = robotA, i = 0 + >:=> (line 47, col 5) to (line 47, col 35) +47 >for ([numberB = -1] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1513 to 1536) SpanInfo: {"start":1514,"length":12} + >numberB = -1 + >:=> (line 47, col 6) to (line 47, col 18) +47 >for ([numberB = -1] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1537 to 1543) SpanInfo: {"start":1538,"length":5} + >i = 0 + >:=> (line 47, col 30) to (line 47, col 35) +47 >for ([numberB = -1] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1544 to 1550) SpanInfo: {"start":1545,"length":5} + >i < 1 + >:=> (line 47, col 37) to (line 47, col 42) +47 >for ([numberB = -1] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1551 to 1558) SpanInfo: {"start":1552,"length":3} + >i++ + >:=> (line 47, col 44) to (line 47, col 47) +-------------------------------- +48 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1559 to 1584) SpanInfo: {"start":1563,"length":20} + >console.log(numberB) + >:=> (line 48, col 4) to (line 48, col 24) +-------------------------------- +49 >} + + ~~ => Pos: (1585 to 1586) SpanInfo: {"start":1563,"length":20} + >console.log(numberB) + >:=> (line 48, col 4) to (line 48, col 24) +-------------------------------- +50 >for ([numberB = -1] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~ => Pos: (1587 to 1591) SpanInfo: {"start":1592,"length":34} + >[numberB = -1] = getRobot(), i = 0 + >:=> (line 50, col 5) to (line 50, col 39) +50 >for ([numberB = -1] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1592 to 1619) SpanInfo: {"start":1593,"length":12} + >numberB = -1 + >:=> (line 50, col 6) to (line 50, col 18) +50 >for ([numberB = -1] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1620 to 1626) SpanInfo: {"start":1621,"length":5} + >i = 0 + >:=> (line 50, col 34) to (line 50, col 39) +50 >for ([numberB = -1] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1627 to 1633) SpanInfo: {"start":1628,"length":5} + >i < 1 + >:=> (line 50, col 41) to (line 50, col 46) +50 >for ([numberB = -1] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1634 to 1641) SpanInfo: {"start":1635,"length":3} + >i++ + >:=> (line 50, col 48) to (line 50, col 51) +-------------------------------- +51 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1642 to 1667) SpanInfo: {"start":1646,"length":20} + >console.log(numberB) + >:=> (line 51, col 4) to (line 51, col 24) +-------------------------------- +52 >} + + ~~ => Pos: (1668 to 1669) SpanInfo: {"start":1646,"length":20} + >console.log(numberB) + >:=> (line 51, col 4) to (line 51, col 24) +-------------------------------- +53 >for ([numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~ => Pos: (1670 to 1674) SpanInfo: {"start":1675,"length":50} + >[numberB = -1] = [2, "trimmer", "trimming"], i = 0 + >:=> (line 53, col 5) to (line 53, col 55) +53 >for ([numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1675 to 1718) SpanInfo: {"start":1676,"length":12} + >numberB = -1 + >:=> (line 53, col 6) to (line 53, col 18) +53 >for ([numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1719 to 1725) SpanInfo: {"start":1720,"length":5} + >i = 0 + >:=> (line 53, col 50) to (line 53, col 55) +53 >for ([numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1726 to 1732) SpanInfo: {"start":1727,"length":5} + >i < 1 + >:=> (line 53, col 57) to (line 53, col 62) +53 >for ([numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1733 to 1740) SpanInfo: {"start":1734,"length":3} + >i++ + >:=> (line 53, col 64) to (line 53, col 67) +-------------------------------- +54 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1741 to 1766) SpanInfo: {"start":1745,"length":20} + >console.log(numberB) + >:=> (line 54, col 4) to (line 54, col 24) +-------------------------------- +55 >} + + ~~ => Pos: (1767 to 1768) SpanInfo: {"start":1745,"length":20} + >console.log(numberB) + >:=> (line 54, col 4) to (line 54, col 24) +-------------------------------- +56 >for ([nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~ => Pos: (1769 to 1773) SpanInfo: {"start":1774,"length":37} + >[nameB = "name"] = multiRobotA, i = 0 + >:=> (line 56, col 5) to (line 56, col 42) +56 >for ([nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1774 to 1804) SpanInfo: {"start":1775,"length":14} + >nameB = "name" + >:=> (line 56, col 6) to (line 56, col 20) +56 >for ([nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1805 to 1811) SpanInfo: {"start":1806,"length":5} + >i = 0 + >:=> (line 56, col 37) to (line 56, col 42) +56 >for ([nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1812 to 1818) SpanInfo: {"start":1813,"length":5} + >i < 1 + >:=> (line 56, col 44) to (line 56, col 49) +56 >for ([nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1819 to 1826) SpanInfo: {"start":1820,"length":3} + >i++ + >:=> (line 56, col 51) to (line 56, col 54) +-------------------------------- +57 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1827 to 1850) SpanInfo: {"start":1831,"length":18} + >console.log(nameB) + >:=> (line 57, col 4) to (line 57, col 22) +-------------------------------- +58 >} + + ~~ => Pos: (1851 to 1852) SpanInfo: {"start":1831,"length":18} + >console.log(nameB) + >:=> (line 57, col 4) to (line 57, col 22) +-------------------------------- +59 >for ([nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~ => Pos: (1853 to 1857) SpanInfo: {"start":1858,"length":41} + >[nameB = "name"] = getMultiRobot(), i = 0 + >:=> (line 59, col 5) to (line 59, col 46) +59 >for ([nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1858 to 1892) SpanInfo: {"start":1859,"length":14} + >nameB = "name" + >:=> (line 59, col 6) to (line 59, col 20) +59 >for ([nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1893 to 1899) SpanInfo: {"start":1894,"length":5} + >i = 0 + >:=> (line 59, col 41) to (line 59, col 46) +59 >for ([nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1900 to 1906) SpanInfo: {"start":1901,"length":5} + >i < 1 + >:=> (line 59, col 48) to (line 59, col 53) +59 >for ([nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1907 to 1914) SpanInfo: {"start":1908,"length":3} + >i++ + >:=> (line 59, col 55) to (line 59, col 58) +-------------------------------- +60 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1915 to 1938) SpanInfo: {"start":1919,"length":18} + >console.log(nameB) + >:=> (line 60, col 4) to (line 60, col 22) +-------------------------------- +61 >} + + ~~ => Pos: (1939 to 1940) SpanInfo: {"start":1919,"length":18} + >console.log(nameB) + >:=> (line 60, col 4) to (line 60, col 22) +-------------------------------- +62 >for ([nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~ => Pos: (1941 to 1945) SpanInfo: {"start":1946,"length":61} + >[nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0 + >:=> (line 62, col 5) to (line 62, col 66) +62 >for ([nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1946 to 2000) SpanInfo: {"start":1947,"length":14} + >nameB = "name" + >:=> (line 62, col 6) to (line 62, col 20) +62 >for ([nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2001 to 2007) SpanInfo: {"start":2002,"length":5} + >i = 0 + >:=> (line 62, col 61) to (line 62, col 66) +62 >for ([nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2008 to 2014) SpanInfo: {"start":2009,"length":5} + >i < 1 + >:=> (line 62, col 68) to (line 62, col 73) +62 >for ([nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2015 to 2022) SpanInfo: {"start":2016,"length":3} + >i++ + >:=> (line 62, col 75) to (line 62, col 78) +-------------------------------- +63 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2023 to 2046) SpanInfo: {"start":2027,"length":18} + >console.log(nameB) + >:=> (line 63, col 4) to (line 63, col 22) +-------------------------------- +64 >} + + ~~ => Pos: (2047 to 2048) SpanInfo: {"start":2027,"length":18} + >console.log(nameB) + >:=> (line 63, col 4) to (line 63, col 22) +-------------------------------- +65 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { + + ~~~~~ => Pos: (2049 to 2053) SpanInfo: {"start":2054,"length":67} + >[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0 + >:=> (line 65, col 5) to (line 65, col 72) +65 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~ => Pos: (2054 to 2068) SpanInfo: {"start":2055,"length":13} + >numberA2 = -1 + >:=> (line 65, col 6) to (line 65, col 19) +65 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~ => Pos: (2069 to 2085) SpanInfo: {"start":2070,"length":15} + >nameA2 = "name" + >:=> (line 65, col 21) to (line 65, col 36) +65 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2086 to 2114) SpanInfo: {"start":2087,"length":17} + >skillA2 = "skill" + >:=> (line 65, col 38) to (line 65, col 55) +65 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2115 to 2121) SpanInfo: {"start":2116,"length":5} + >i = 0 + >:=> (line 65, col 67) to (line 65, col 72) +65 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2122 to 2128) SpanInfo: {"start":2123,"length":5} + >i < 1 + >:=> (line 65, col 74) to (line 65, col 79) +65 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2129 to 2136) SpanInfo: {"start":2130,"length":3} + >i++ + >:=> (line 65, col 81) to (line 65, col 84) +-------------------------------- +66 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2137 to 2161) SpanInfo: {"start":2141,"length":19} + >console.log(nameA2) + >:=> (line 66, col 4) to (line 66, col 23) +-------------------------------- +67 >} + + ~~ => Pos: (2162 to 2163) SpanInfo: {"start":2141,"length":19} + >console.log(nameA2) + >:=> (line 66, col 4) to (line 66, col 23) +-------------------------------- +68 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~ => Pos: (2164 to 2168) SpanInfo: {"start":2169,"length":71} + >[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0 + >:=> (line 68, col 5) to (line 68, col 76) +68 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~ => Pos: (2169 to 2183) SpanInfo: {"start":2170,"length":13} + >numberA2 = -1 + >:=> (line 68, col 6) to (line 68, col 19) +68 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~ => Pos: (2184 to 2200) SpanInfo: {"start":2185,"length":15} + >nameA2 = "name" + >:=> (line 68, col 21) to (line 68, col 36) +68 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2201 to 2233) SpanInfo: {"start":2202,"length":17} + >skillA2 = "skill" + >:=> (line 68, col 38) to (line 68, col 55) +68 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2234 to 2240) SpanInfo: {"start":2235,"length":5} + >i = 0 + >:=> (line 68, col 71) to (line 68, col 76) +68 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2241 to 2247) SpanInfo: {"start":2242,"length":5} + >i < 1 + >:=> (line 68, col 78) to (line 68, col 83) +68 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2248 to 2255) SpanInfo: {"start":2249,"length":3} + >i++ + >:=> (line 68, col 85) to (line 68, col 88) +-------------------------------- +69 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2256 to 2280) SpanInfo: {"start":2260,"length":19} + >console.log(nameA2) + >:=> (line 69, col 4) to (line 69, col 23) +-------------------------------- +70 >} + + ~~ => Pos: (2281 to 2282) SpanInfo: {"start":2260,"length":19} + >console.log(nameA2) + >:=> (line 69, col 4) to (line 69, col 23) +-------------------------------- +71 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~ => Pos: (2283 to 2287) SpanInfo: {"start":2288,"length":87} + >[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0 + >:=> (line 71, col 5) to (line 71, col 92) +71 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~ => Pos: (2288 to 2302) SpanInfo: {"start":2289,"length":13} + >numberA2 = -1 + >:=> (line 71, col 6) to (line 71, col 19) +71 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~ => Pos: (2303 to 2319) SpanInfo: {"start":2304,"length":15} + >nameA2 = "name" + >:=> (line 71, col 21) to (line 71, col 36) +71 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2320 to 2368) SpanInfo: {"start":2321,"length":17} + >skillA2 = "skill" + >:=> (line 71, col 38) to (line 71, col 55) +71 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2369 to 2375) SpanInfo: {"start":2370,"length":5} + >i = 0 + >:=> (line 71, col 87) to (line 71, col 92) +71 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2376 to 2382) SpanInfo: {"start":2377,"length":5} + >i < 1 + >:=> (line 71, col 94) to (line 71, col 99) +71 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2383 to 2390) SpanInfo: {"start":2384,"length":3} + >i++ + >:=> (line 71, col 101) to (line 71, col 104) +-------------------------------- +72 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2391 to 2415) SpanInfo: {"start":2395,"length":19} + >console.log(nameA2) + >:=> (line 72, col 4) to (line 72, col 23) +-------------------------------- +73 >} + + ~~ => Pos: (2416 to 2417) SpanInfo: {"start":2395,"length":19} + >console.log(nameA2) + >:=> (line 72, col 4) to (line 72, col 23) +-------------------------------- +74 >for ([nameMA = "noName", + + ~~~~~ => Pos: (2418 to 2422) SpanInfo: {"start":2423,"length":166} + >[nameMA = "noName", + > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] + > ] = multiRobotA, i = 0 + >:=> (line 74, col 5) to (line 79, col 26) +74 >for ([nameMA = "noName", + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (2423 to 2442) SpanInfo: {"start":2424,"length":17} + >nameMA = "noName" + >:=> (line 74, col 6) to (line 74, col 23) +-------------------------------- +75 > [ + + ~~~~~~~~~~ => Pos: (2443 to 2452) SpanInfo: {"start":2465,"length":25} + >primarySkillA = "primary" + >:=> (line 76, col 12) to (line 76, col 37) +-------------------------------- +76 > primarySkillA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2453 to 2491) SpanInfo: {"start":2465,"length":25} + >primarySkillA = "primary" + >:=> (line 76, col 12) to (line 76, col 37) +-------------------------------- +77 > secondarySkillA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2492 to 2533) SpanInfo: {"start":2504,"length":29} + >secondarySkillA = "secondary" + >:=> (line 77, col 12) to (line 77, col 41) +-------------------------------- +78 > ] = ["none", "none"] + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2534 to 2562) SpanInfo: {"start":2504,"length":29} + >secondarySkillA = "secondary" + >:=> (line 77, col 12) to (line 77, col 41) +-------------------------------- +79 > ] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (2563 to 2582) SpanInfo: {"start":2451,"length":111} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] + >:=> (line 75, col 8) to (line 78, col 28) +79 > ] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (2583 to 2589) SpanInfo: {"start":2584,"length":5} + >i = 0 + >:=> (line 79, col 21) to (line 79, col 26) +79 > ] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (2590 to 2596) SpanInfo: {"start":2591,"length":5} + >i < 1 + >:=> (line 79, col 28) to (line 79, col 33) +79 > ] = multiRobotA, i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (2597 to 2604) SpanInfo: {"start":2598,"length":3} + >i++ + >:=> (line 79, col 35) to (line 79, col 38) +-------------------------------- +80 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2605 to 2629) SpanInfo: {"start":2609,"length":19} + >console.log(nameMA) + >:=> (line 80, col 4) to (line 80, col 23) +-------------------------------- +81 >} + + ~~ => Pos: (2630 to 2631) SpanInfo: {"start":2609,"length":19} + >console.log(nameMA) + >:=> (line 80, col 4) to (line 80, col 23) +-------------------------------- +82 >for ([nameMA = "noName", + + ~~~~~ => Pos: (2632 to 2636) SpanInfo: {"start":2637,"length":150} + >[nameMA = "noName", + > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] + >] = getMultiRobot(), i = 0 + >:=> (line 82, col 5) to (line 87, col 26) +82 >for ([nameMA = "noName", + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (2637 to 2656) SpanInfo: {"start":2638,"length":17} + >nameMA = "noName" + >:=> (line 82, col 6) to (line 82, col 23) +-------------------------------- +83 > [ + + ~~~~~~ => Pos: (2657 to 2662) SpanInfo: {"start":2671,"length":25} + >primarySkillA = "primary" + >:=> (line 84, col 8) to (line 84, col 33) +-------------------------------- +84 > primarySkillA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2663 to 2697) SpanInfo: {"start":2671,"length":25} + >primarySkillA = "primary" + >:=> (line 84, col 8) to (line 84, col 33) +-------------------------------- +85 > secondarySkillA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2698 to 2735) SpanInfo: {"start":2706,"length":29} + >secondarySkillA = "secondary" + >:=> (line 85, col 8) to (line 85, col 37) +-------------------------------- +86 > ] = ["none", "none"] + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2736 to 2760) SpanInfo: {"start":2706,"length":29} + >secondarySkillA = "secondary" + >:=> (line 85, col 8) to (line 85, col 37) +-------------------------------- +87 >] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (2761 to 2780) SpanInfo: {"start":2661,"length":99} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] + >:=> (line 83, col 4) to (line 86, col 24) +87 >] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (2781 to 2787) SpanInfo: {"start":2782,"length":5} + >i = 0 + >:=> (line 87, col 21) to (line 87, col 26) +87 >] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (2788 to 2794) SpanInfo: {"start":2789,"length":5} + >i < 1 + >:=> (line 87, col 28) to (line 87, col 33) +87 >] = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (2795 to 2802) SpanInfo: {"start":2796,"length":3} + >i++ + >:=> (line 87, col 35) to (line 87, col 38) +-------------------------------- +88 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2803 to 2827) SpanInfo: {"start":2807,"length":19} + >console.log(nameMA) + >:=> (line 88, col 4) to (line 88, col 23) +-------------------------------- +89 >} + + ~~ => Pos: (2828 to 2829) SpanInfo: {"start":2807,"length":19} + >console.log(nameMA) + >:=> (line 88, col 4) to (line 88, col 23) +-------------------------------- +90 >for ([nameMA = "noName", + + ~~~~~ => Pos: (2830 to 2834) SpanInfo: {"start":2835,"length":170} + >[nameMA = "noName", + > [ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] + >] = ["trimmer", ["trimming", "edging"]], i = 0 + >:=> (line 90, col 5) to (line 95, col 46) +90 >for ([nameMA = "noName", + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (2835 to 2854) SpanInfo: {"start":2836,"length":17} + >nameMA = "noName" + >:=> (line 90, col 6) to (line 90, col 23) +-------------------------------- +91 > [ + + ~~~~~~ => Pos: (2855 to 2860) SpanInfo: {"start":2869,"length":25} + >primarySkillA = "primary" + >:=> (line 92, col 8) to (line 92, col 33) +-------------------------------- +92 > primarySkillA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2861 to 2895) SpanInfo: {"start":2869,"length":25} + >primarySkillA = "primary" + >:=> (line 92, col 8) to (line 92, col 33) +-------------------------------- +93 > secondarySkillA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2896 to 2933) SpanInfo: {"start":2904,"length":29} + >secondarySkillA = "secondary" + >:=> (line 93, col 8) to (line 93, col 37) +-------------------------------- +94 > ] = ["none", "none"] + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2934 to 2958) SpanInfo: {"start":2904,"length":29} + >secondarySkillA = "secondary" + >:=> (line 93, col 8) to (line 93, col 37) +-------------------------------- +95 >] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2959 to 2998) SpanInfo: {"start":2859,"length":99} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + > ] = ["none", "none"] + >:=> (line 91, col 4) to (line 94, col 24) +95 >] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2999 to 3005) SpanInfo: {"start":3000,"length":5} + >i = 0 + >:=> (line 95, col 41) to (line 95, col 46) +95 >] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (3006 to 3012) SpanInfo: {"start":3007,"length":5} + >i < 1 + >:=> (line 95, col 48) to (line 95, col 53) +95 >] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (3013 to 3020) SpanInfo: {"start":3014,"length":3} + >i++ + >:=> (line 95, col 55) to (line 95, col 58) +-------------------------------- +96 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3021 to 3045) SpanInfo: {"start":3025,"length":19} + >console.log(nameMA) + >:=> (line 96, col 4) to (line 96, col 23) +-------------------------------- +97 >} + + ~~ => Pos: (3046 to 3047) SpanInfo: {"start":3025,"length":19} + >console.log(nameMA) + >:=> (line 96, col 4) to (line 96, col 23) +-------------------------------- +98 >for ([numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + + ~~~~~ => Pos: (3048 to 3052) SpanInfo: {"start":3053,"length":46} + >[numberA3 = -1, ...robotAInfo] = robotA, i = 0 + >:=> (line 98, col 5) to (line 98, col 51) +98 >for ([numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~ => Pos: (3053 to 3067) SpanInfo: {"start":3054,"length":13} + >numberA3 = -1 + >:=> (line 98, col 6) to (line 98, col 19) +98 >for ([numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3068 to 3092) SpanInfo: {"start":3069,"length":13} + >...robotAInfo + >:=> (line 98, col 21) to (line 98, col 34) +98 >for ([numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (3093 to 3099) SpanInfo: {"start":3094,"length":5} + >i = 0 + >:=> (line 98, col 46) to (line 98, col 51) +98 >for ([numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (3100 to 3106) SpanInfo: {"start":3101,"length":5} + >i < 1 + >:=> (line 98, col 53) to (line 98, col 58) +98 >for ([numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (3107 to 3114) SpanInfo: {"start":3108,"length":3} + >i++ + >:=> (line 98, col 60) to (line 98, col 63) +-------------------------------- +99 > console.log(numberA3); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3115 to 3141) SpanInfo: {"start":3119,"length":21} + >console.log(numberA3) + >:=> (line 99, col 4) to (line 99, col 25) +-------------------------------- +100>} + + ~~ => Pos: (3142 to 3143) SpanInfo: {"start":3119,"length":21} + >console.log(numberA3) + >:=> (line 99, col 4) to (line 99, col 25) +-------------------------------- +101>for ([numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~ => Pos: (3144 to 3148) SpanInfo: {"start":3149,"length":50} + >[numberA3 = -1, ...robotAInfo] = getRobot(), i = 0 + >:=> (line 101, col 5) to (line 101, col 55) +101>for ([numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~ => Pos: (3149 to 3163) SpanInfo: {"start":3150,"length":13} + >numberA3 = -1 + >:=> (line 101, col 6) to (line 101, col 19) +101>for ([numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (3164 to 3192) SpanInfo: {"start":3165,"length":13} + >...robotAInfo + >:=> (line 101, col 21) to (line 101, col 34) +101>for ([numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (3193 to 3199) SpanInfo: {"start":3194,"length":5} + >i = 0 + >:=> (line 101, col 50) to (line 101, col 55) +101>for ([numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (3200 to 3206) SpanInfo: {"start":3201,"length":5} + >i < 1 + >:=> (line 101, col 57) to (line 101, col 62) +101>for ([numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (3207 to 3214) SpanInfo: {"start":3208,"length":3} + >i++ + >:=> (line 101, col 64) to (line 101, col 67) +-------------------------------- +102> console.log(numberA3); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3215 to 3241) SpanInfo: {"start":3219,"length":21} + >console.log(numberA3) + >:=> (line 102, col 4) to (line 102, col 25) +-------------------------------- +103>} + + ~~ => Pos: (3242 to 3243) SpanInfo: {"start":3219,"length":21} + >console.log(numberA3) + >:=> (line 102, col 4) to (line 102, col 25) +-------------------------------- +104>for ([numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~ => Pos: (3244 to 3248) SpanInfo: {"start":3249,"length":73} + >[numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0 + >:=> (line 104, col 5) to (line 104, col 78) +104>for ([numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~ => Pos: (3249 to 3263) SpanInfo: {"start":3250,"length":13} + >numberA3 = -1 + >:=> (line 104, col 6) to (line 104, col 19) +104>for ([numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (3264 to 3315) SpanInfo: {"start":3265,"length":13} + >...robotAInfo + >:=> (line 104, col 21) to (line 104, col 34) +104>for ([numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (3316 to 3322) SpanInfo: {"start":3317,"length":5} + >i = 0 + >:=> (line 104, col 73) to (line 104, col 78) +104>for ([numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (3323 to 3329) SpanInfo: {"start":3324,"length":5} + >i < 1 + >:=> (line 104, col 80) to (line 104, col 85) +104>for ([numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (3330 to 3337) SpanInfo: {"start":3331,"length":3} + >i++ + >:=> (line 104, col 87) to (line 104, col 90) +-------------------------------- +105> console.log(numberA3); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3338 to 3364) SpanInfo: {"start":3342,"length":21} + >console.log(numberA3) + >:=> (line 105, col 4) to (line 105, col 25) +-------------------------------- +106>} + ~ => Pos: (3365 to 3365) SpanInfo: {"start":3342,"length":21} + >console.log(numberA3) + >:=> (line 105, col 4) to (line 105, col 25) \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringAssignmentForArrayBindingPattern.ts b/tests/cases/fourslash/breakpointValidationDestructuringAssignmentForArrayBindingPattern.ts new file mode 100644 index 00000000000..c87268684b5 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringAssignmentForArrayBindingPattern.ts @@ -0,0 +1,94 @@ +/// +////declare var console: { +//// log(msg: any): void; +////} +////type Robot = [number, string, string]; +////type MultiSkilledRobot = [string, [string, string]]; +////let robotA: Robot = [1, "mower", "mowing"]; +////function getRobot() { +//// return robotA; +////} +////let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +////let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +////function getMultiRobot() { +//// return multiRobotA; +////} +////let nameA: string, primarySkillA: string, secondarySkillA: string; +////let numberB: number, nameB: string; +////let numberA2: number, nameA2: string, skillA2: string, nameMA: string; +////let numberA3: number, robotAInfo: (number | string)[], multiRobotAInfo: (string | [string, string])[]; +////let i: number; +////for ([, nameA] = robotA, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ([, nameA] = getRobot(), i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ([, nameA] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ([, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { +//// console.log(primarySkillA); +////} +////for ([, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { +//// console.log(primarySkillA); +////} +////for ([, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +//// console.log(primarySkillA); +////} +////for ([numberB] = robotA, i = 0; i < 1; i++) { +//// console.log(numberB); +////} +////for ([numberB] = getRobot(), i = 0; i < 1; i++) { +//// console.log(numberB); +////} +////for ([numberB] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +//// console.log(numberB); +////} +////for ([nameB] = multiRobotA, i = 0; i < 1; i++) { +//// console.log(nameB); +////} +////for ([nameB] = getMultiRobot(), i = 0; i < 1; i++) { +//// console.log(nameB); +////} +////for ([nameB] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +//// console.log(nameB); +////} +////for ([numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { +//// console.log(nameA2); +////} +////for ([numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { +//// console.log(nameA2); +////} +////for ([numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +//// console.log(nameA2); +////} +////for ([nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { +//// console.log(nameMA); +////} +////for ([nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { +//// console.log(nameMA); +////} +////for ([nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +//// console.log(nameMA); +////} +////for ([numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { +//// console.log(numberA3); +////} +////for ([numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { +//// console.log(numberA3); +////} +////for ([numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +//// console.log(numberA3); +////} +////for ([...multiRobotAInfo] = multiRobotA, i = 0; i < 1; i++) { +//// console.log(multiRobotAInfo); +////} +////for ([...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { +//// console.log(multiRobotAInfo); +////} +////for ([...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +//// console.log(multiRobotAInfo); +////} + +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringAssignmentForArrayBindingPatternDefaultValues.ts b/tests/cases/fourslash/breakpointValidationDestructuringAssignmentForArrayBindingPatternDefaultValues.ts new file mode 100644 index 00000000000..80e4a811fed --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringAssignmentForArrayBindingPatternDefaultValues.ts @@ -0,0 +1,109 @@ +/// +////declare var console: { +//// log(msg: any): void; +////} +////type Robot = [number, string, string]; +////type MultiSkilledRobot = [string, [string, string]]; +////let robotA: Robot = [1, "mower", "mowing"]; +////function getRobot() { +//// return robotA; +////} +////let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +////let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +////function getMultiRobot() { +//// return multiRobotA; +////} +////let nameA: string, primarySkillA: string, secondarySkillA: string; +////let numberB: number, nameB: string; +////let numberA2: number, nameA2: string, skillA2: string, nameMA: string; +////let numberA3: number, robotAInfo: (number | string)[], multiRobotAInfo: (string | [string, string])[]; +////let i: number; +////for ([, nameA = "name"] = robotA, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ([, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ([, nameA = "name"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ([, [ +//// primarySkillA = "primary", +//// secondarySkillA = "secondary" +////] = ["none", "none"]] = multiRobotA, i = 0; i < 1; i++) { +//// console.log(primarySkillA); +////} +////for ([, [ +//// primarySkillA = "primary", +//// secondarySkillA = "secondary" +////] = ["none", "none"]] = getMultiRobot(), i = 0; i < 1; i++) { +//// console.log(primarySkillA); +////} +////for ([, [ +//// primarySkillA = "primary", +//// secondarySkillA = "secondary" +////] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +//// console.log(primarySkillA); +////} +////for ([numberB = -1] = robotA, i = 0; i < 1; i++) { +//// console.log(numberB); +////} +////for ([numberB = -1] = getRobot(), i = 0; i < 1; i++) { +//// console.log(numberB); +////} +////for ([numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +//// console.log(numberB); +////} +////for ([nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { +//// console.log(nameB); +////} +////for ([nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { +//// console.log(nameB); +////} +////for ([nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +//// console.log(nameB); +////} +////for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { +//// console.log(nameA2); +////} +////for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { +//// console.log(nameA2); +////} +////for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +//// console.log(nameA2); +////} +////for ([nameMA = "noName", +//// [ +//// primarySkillA = "primary", +//// secondarySkillA = "secondary" +//// ] = ["none", "none"] +//// ] = multiRobotA, i = 0; i < 1; i++) { +//// console.log(nameMA); +////} +////for ([nameMA = "noName", +//// [ +//// primarySkillA = "primary", +//// secondarySkillA = "secondary" +//// ] = ["none", "none"] +////] = getMultiRobot(), i = 0; i < 1; i++) { +//// console.log(nameMA); +////} +////for ([nameMA = "noName", +//// [ +//// primarySkillA = "primary", +//// secondarySkillA = "secondary" +//// ] = ["none", "none"] +////] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { +//// console.log(nameMA); +////} +////for ([numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { +//// console.log(numberA3); +////} +////for ([numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { +//// console.log(numberA3); +////} +////for ([numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { +//// console.log(numberA3); +////} + +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file From bda112546fc997a4d676a0bf73ae04e8154d6346 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 22 Dec 2015 15:23:45 -0800 Subject: [PATCH 080/209] Fix the breakpoint for comma expression --- src/services/breakpoints.ts | 5 +- ...gAssignmentForArrayBindingPattern.baseline | 168 +++-------------- ...rArrayBindingPatternDefaultValues.baseline | 171 +++--------------- tests/baselines/reference/bpSpan_for.baseline | 7 +- 4 files changed, 50 insertions(+), 301 deletions(-) diff --git a/src/services/breakpoints.ts b/src/services/breakpoints.ts index 5042b72cc23..bc3d7a75674 100644 --- a/src/services/breakpoints.ts +++ b/src/services/breakpoints.ts @@ -287,6 +287,10 @@ namespace ts.BreakpointResolver { // { a = expression, b, c } = someExpression return textSpan(node); } + + if (binaryExpression.operatorToken.kind === SyntaxKind.CommaToken) { + return spanInNode(binaryExpression.left); + } } if (isExpression(node)) { @@ -301,7 +305,6 @@ namespace ts.BreakpointResolver { case SyntaxKind.ForStatement: case SyntaxKind.ForOfStatement: - // For now lets set the span on this expression, fix it later return textSpan(node); case SyntaxKind.BinaryExpression: diff --git a/tests/baselines/reference/bpSpanDestructuringAssignmentForArrayBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringAssignmentForArrayBindingPattern.baseline index e08738cffc4..923e0cced09 100644 --- a/tests/baselines/reference/bpSpanDestructuringAssignmentForArrayBindingPattern.baseline +++ b/tests/baselines/reference/bpSpanDestructuringAssignmentForArrayBindingPattern.baseline @@ -95,12 +95,7 @@ -------------------------------- 20 >for ([, nameA] = robotA, i = 0; i < 1; i++) { - ~~~~~ => Pos: (712 to 716) SpanInfo: {"start":717,"length":25} - >[, nameA] = robotA, i = 0 - >:=> (line 20, col 5) to (line 20, col 30) -20 >for ([, nameA] = robotA, i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~~~~~ => Pos: (717 to 735) SpanInfo: {"start":720,"length":5} + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (712 to 735) SpanInfo: {"start":720,"length":5} >nameA >:=> (line 20, col 8) to (line 20, col 13) 20 >for ([, nameA] = robotA, i = 0; i < 1; i++) { @@ -133,12 +128,7 @@ -------------------------------- 23 >for ([, nameA] = getRobot(), i = 0; i < 1; i++) { - ~~~~~ => Pos: (784 to 788) SpanInfo: {"start":789,"length":29} - >[, nameA] = getRobot(), i = 0 - >:=> (line 23, col 5) to (line 23, col 34) -23 >for ([, nameA] = getRobot(), i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (789 to 811) SpanInfo: {"start":792,"length":5} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (784 to 811) SpanInfo: {"start":792,"length":5} >nameA >:=> (line 23, col 8) to (line 23, col 13) 23 >for ([, nameA] = getRobot(), i = 0; i < 1; i++) { @@ -171,12 +161,7 @@ -------------------------------- 26 >for ([, nameA] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { - ~~~~~ => Pos: (860 to 864) SpanInfo: {"start":865,"length":45} - >[, nameA] = [2, "trimmer", "trimming"], i = 0 - >:=> (line 26, col 5) to (line 26, col 50) -26 >for ([, nameA] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (865 to 903) SpanInfo: {"start":868,"length":5} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (860 to 903) SpanInfo: {"start":868,"length":5} >nameA >:=> (line 26, col 8) to (line 26, col 13) 26 >for ([, nameA] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { @@ -209,12 +194,7 @@ -------------------------------- 29 >for ([, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { - ~~~~~ => Pos: (952 to 956) SpanInfo: {"start":957,"length":57} - >[, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0 - >:=> (line 29, col 5) to (line 29, col 62) -29 >for ([, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~~~~ => Pos: (957 to 974) SpanInfo: {"start":961,"length":13} + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (952 to 974) SpanInfo: {"start":961,"length":13} >primarySkillA >:=> (line 29, col 9) to (line 29, col 22) 29 >for ([, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { @@ -257,12 +237,7 @@ -------------------------------- 32 >for ([, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~ => Pos: (1064 to 1068) SpanInfo: {"start":1069,"length":61} - >[, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0 - >:=> (line 32, col 5) to (line 32, col 66) -32 >for ([, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~~~~ => Pos: (1069 to 1086) SpanInfo: {"start":1073,"length":13} + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1064 to 1086) SpanInfo: {"start":1073,"length":13} >primarySkillA >:=> (line 32, col 9) to (line 32, col 22) 32 >for ([, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { @@ -305,12 +280,7 @@ -------------------------------- 35 >for ([, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { - ~~~~~ => Pos: (1180 to 1184) SpanInfo: {"start":1185,"length":81} - >[, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0 - >:=> (line 35, col 5) to (line 35, col 86) -35 >for ([, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~~~~ => Pos: (1185 to 1202) SpanInfo: {"start":1189,"length":13} + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1180 to 1202) SpanInfo: {"start":1189,"length":13} >primarySkillA >:=> (line 35, col 9) to (line 35, col 22) 35 >for ([, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { @@ -353,12 +323,7 @@ -------------------------------- 38 >for ([numberB] = robotA, i = 0; i < 1; i++) { - ~~~~~ => Pos: (1316 to 1320) SpanInfo: {"start":1321,"length":25} - >[numberB] = robotA, i = 0 - >:=> (line 38, col 5) to (line 38, col 30) -38 >for ([numberB] = robotA, i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~~~~~ => Pos: (1321 to 1339) SpanInfo: {"start":1322,"length":7} + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1316 to 1339) SpanInfo: {"start":1322,"length":7} >numberB >:=> (line 38, col 6) to (line 38, col 13) 38 >for ([numberB] = robotA, i = 0; i < 1; i++) { @@ -391,12 +356,7 @@ -------------------------------- 41 >for ([numberB] = getRobot(), i = 0; i < 1; i++) { - ~~~~~ => Pos: (1390 to 1394) SpanInfo: {"start":1395,"length":29} - >[numberB] = getRobot(), i = 0 - >:=> (line 41, col 5) to (line 41, col 34) -41 >for ([numberB] = getRobot(), i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1395 to 1417) SpanInfo: {"start":1396,"length":7} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1390 to 1417) SpanInfo: {"start":1396,"length":7} >numberB >:=> (line 41, col 6) to (line 41, col 13) 41 >for ([numberB] = getRobot(), i = 0; i < 1; i++) { @@ -429,12 +389,7 @@ -------------------------------- 44 >for ([numberB] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { - ~~~~~ => Pos: (1468 to 1472) SpanInfo: {"start":1473,"length":45} - >[numberB] = [2, "trimmer", "trimming"], i = 0 - >:=> (line 44, col 5) to (line 44, col 50) -44 >for ([numberB] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1473 to 1511) SpanInfo: {"start":1474,"length":7} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1468 to 1511) SpanInfo: {"start":1474,"length":7} >numberB >:=> (line 44, col 6) to (line 44, col 13) 44 >for ([numberB] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { @@ -467,12 +422,7 @@ -------------------------------- 47 >for ([nameB] = multiRobotA, i = 0; i < 1; i++) { - ~~~~~ => Pos: (1562 to 1566) SpanInfo: {"start":1567,"length":28} - >[nameB] = multiRobotA, i = 0 - >:=> (line 47, col 5) to (line 47, col 33) -47 >for ([nameB] = multiRobotA, i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1567 to 1588) SpanInfo: {"start":1568,"length":5} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1562 to 1588) SpanInfo: {"start":1568,"length":5} >nameB >:=> (line 47, col 6) to (line 47, col 11) 47 >for ([nameB] = multiRobotA, i = 0; i < 1; i++) { @@ -505,12 +455,7 @@ -------------------------------- 50 >for ([nameB] = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~ => Pos: (1637 to 1641) SpanInfo: {"start":1642,"length":32} - >[nameB] = getMultiRobot(), i = 0 - >:=> (line 50, col 5) to (line 50, col 37) -50 >for ([nameB] = getMultiRobot(), i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1642 to 1667) SpanInfo: {"start":1643,"length":5} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1637 to 1667) SpanInfo: {"start":1643,"length":5} >nameB >:=> (line 50, col 6) to (line 50, col 11) 50 >for ([nameB] = getMultiRobot(), i = 0; i < 1; i++) { @@ -543,12 +488,7 @@ -------------------------------- 53 >for ([nameB] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { - ~~~~~ => Pos: (1716 to 1720) SpanInfo: {"start":1721,"length":52} - >[nameB] = ["trimmer", ["trimming", "edging"]], i = 0 - >:=> (line 53, col 5) to (line 53, col 57) -53 >for ([nameB] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1721 to 1766) SpanInfo: {"start":1722,"length":5} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1716 to 1766) SpanInfo: {"start":1722,"length":5} >nameB >:=> (line 53, col 6) to (line 53, col 11) 53 >for ([nameB] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { @@ -581,12 +521,7 @@ -------------------------------- 56 >for ([numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { - ~~~~~ => Pos: (1815 to 1819) SpanInfo: {"start":1820,"length":43} - >[numberA2, nameA2, skillA2] = robotA, i = 0 - >:=> (line 56, col 5) to (line 56, col 48) -56 >for ([numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { - - ~~~~~~~~~~ => Pos: (1820 to 1829) SpanInfo: {"start":1821,"length":8} + ~~~~~~~~~~~~~~~ => Pos: (1815 to 1829) SpanInfo: {"start":1821,"length":8} >numberA2 >:=> (line 56, col 6) to (line 56, col 14) 56 >for ([numberA2, nameA2, skillA2] = robotA, i = 0; i < 1; i++) { @@ -629,12 +564,7 @@ -------------------------------- 59 >for ([numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { - ~~~~~ => Pos: (1906 to 1910) SpanInfo: {"start":1911,"length":47} - >[numberA2, nameA2, skillA2] = getRobot(), i = 0 - >:=> (line 59, col 5) to (line 59, col 52) -59 >for ([numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { - - ~~~~~~~~~~ => Pos: (1911 to 1920) SpanInfo: {"start":1912,"length":8} + ~~~~~~~~~~~~~~~ => Pos: (1906 to 1920) SpanInfo: {"start":1912,"length":8} >numberA2 >:=> (line 59, col 6) to (line 59, col 14) 59 >for ([numberA2, nameA2, skillA2] = getRobot(), i = 0; i < 1; i++) { @@ -677,12 +607,7 @@ -------------------------------- 62 >for ([numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { - ~~~~~ => Pos: (2001 to 2005) SpanInfo: {"start":2006,"length":63} - >[numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0 - >:=> (line 62, col 5) to (line 62, col 68) -62 >for ([numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { - - ~~~~~~~~~~ => Pos: (2006 to 2015) SpanInfo: {"start":2007,"length":8} + ~~~~~~~~~~~~~~~ => Pos: (2001 to 2015) SpanInfo: {"start":2007,"length":8} >numberA2 >:=> (line 62, col 6) to (line 62, col 14) 62 >for ([numberA2, nameA2, skillA2] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { @@ -725,12 +650,7 @@ -------------------------------- 65 >for ([nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { - ~~~~~ => Pos: (2112 to 2116) SpanInfo: {"start":2117,"length":63} - >[nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0 - >:=> (line 65, col 5) to (line 65, col 68) -65 >for ([nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { - - ~~~~~~~~ => Pos: (2117 to 2124) SpanInfo: {"start":2118,"length":6} + ~~~~~~~~~~~~~ => Pos: (2112 to 2124) SpanInfo: {"start":2118,"length":6} >nameMA >:=> (line 65, col 6) to (line 65, col 12) 65 >for ([nameMA, [primarySkillA, secondarySkillA]] = multiRobotA, i = 0; i < 1; i++) { @@ -778,12 +698,7 @@ -------------------------------- 68 >for ([nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~ => Pos: (2223 to 2227) SpanInfo: {"start":2228,"length":67} - >[nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0 - >:=> (line 68, col 5) to (line 68, col 72) -68 >for ([nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { - - ~~~~~~~~ => Pos: (2228 to 2235) SpanInfo: {"start":2229,"length":6} + ~~~~~~~~~~~~~ => Pos: (2223 to 2235) SpanInfo: {"start":2229,"length":6} >nameMA >:=> (line 68, col 6) to (line 68, col 12) 68 >for ([nameMA, [primarySkillA, secondarySkillA]] = getMultiRobot(), i = 0; i < 1; i++) { @@ -831,12 +746,7 @@ -------------------------------- 71 >for ([nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { - ~~~~~ => Pos: (2338 to 2342) SpanInfo: {"start":2343,"length":87} - >[nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0 - >:=> (line 71, col 5) to (line 71, col 92) -71 >for ([nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { - - ~~~~~~~~ => Pos: (2343 to 2350) SpanInfo: {"start":2344,"length":6} + ~~~~~~~~~~~~~ => Pos: (2338 to 2350) SpanInfo: {"start":2344,"length":6} >nameMA >:=> (line 71, col 6) to (line 71, col 12) 71 >for ([nameMA, [primarySkillA, secondarySkillA]] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { @@ -884,12 +794,7 @@ -------------------------------- 74 >for ([numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { - ~~~~~ => Pos: (2473 to 2477) SpanInfo: {"start":2478,"length":41} - >[numberA3, ...robotAInfo] = robotA, i = 0 - >:=> (line 74, col 5) to (line 74, col 46) -74 >for ([numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { - - ~~~~~~~~~~ => Pos: (2478 to 2487) SpanInfo: {"start":2479,"length":8} + ~~~~~~~~~~~~~~~ => Pos: (2473 to 2487) SpanInfo: {"start":2479,"length":8} >numberA3 >:=> (line 74, col 6) to (line 74, col 14) 74 >for ([numberA3, ...robotAInfo] = robotA, i = 0; i < 1; i++) { @@ -927,12 +832,7 @@ -------------------------------- 77 >for ([numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { - ~~~~~ => Pos: (2564 to 2568) SpanInfo: {"start":2569,"length":45} - >[numberA3, ...robotAInfo] = getRobot(), i = 0 - >:=> (line 77, col 5) to (line 77, col 50) -77 >for ([numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { - - ~~~~~~~~~~ => Pos: (2569 to 2578) SpanInfo: {"start":2570,"length":8} + ~~~~~~~~~~~~~~~ => Pos: (2564 to 2578) SpanInfo: {"start":2570,"length":8} >numberA3 >:=> (line 77, col 6) to (line 77, col 14) 77 >for ([numberA3, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { @@ -970,12 +870,7 @@ -------------------------------- 80 >for ([numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { - ~~~~~ => Pos: (2659 to 2663) SpanInfo: {"start":2664,"length":68} - >[numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0 - >:=> (line 80, col 5) to (line 80, col 73) -80 >for ([numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { - - ~~~~~~~~~~ => Pos: (2664 to 2673) SpanInfo: {"start":2665,"length":8} + ~~~~~~~~~~~~~~~ => Pos: (2659 to 2673) SpanInfo: {"start":2665,"length":8} >numberA3 >:=> (line 80, col 6) to (line 80, col 14) 80 >for ([numberA3, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { @@ -1013,12 +908,7 @@ -------------------------------- 83 >for ([...multiRobotAInfo] = multiRobotA, i = 0; i < 1; i++) { - ~~~~~ => Pos: (2777 to 2781) SpanInfo: {"start":2782,"length":41} - >[...multiRobotAInfo] = multiRobotA, i = 0 - >:=> (line 83, col 5) to (line 83, col 46) -83 >for ([...multiRobotAInfo] = multiRobotA, i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2782 to 2816) SpanInfo: {"start":2783,"length":18} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2777 to 2816) SpanInfo: {"start":2783,"length":18} >...multiRobotAInfo >:=> (line 83, col 6) to (line 83, col 24) 83 >for ([...multiRobotAInfo] = multiRobotA, i = 0; i < 1; i++) { @@ -1051,12 +941,7 @@ -------------------------------- 86 >for ([...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~ => Pos: (2875 to 2879) SpanInfo: {"start":2880,"length":45} - >[...multiRobotAInfo] = getMultiRobot(), i = 0 - >:=> (line 86, col 5) to (line 86, col 50) -86 >for ([...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2880 to 2918) SpanInfo: {"start":2881,"length":18} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2875 to 2918) SpanInfo: {"start":2881,"length":18} >...multiRobotAInfo >:=> (line 86, col 6) to (line 86, col 24) 86 >for ([...multiRobotAInfo] = getMultiRobot(), i = 0; i < 1; i++) { @@ -1089,12 +974,7 @@ -------------------------------- 89 >for ([...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { - ~~~~~ => Pos: (2977 to 2981) SpanInfo: {"start":2982,"length":84} - >[...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0 - >:=> (line 89, col 5) to (line 89, col 89) -89 >for ([...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2982 to 3059) SpanInfo: {"start":2983,"length":18} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2977 to 3059) SpanInfo: {"start":2983,"length":18} >...multiRobotAInfo >:=> (line 89, col 6) to (line 89, col 24) 89 >for ([...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { diff --git a/tests/baselines/reference/bpSpanDestructuringAssignmentForArrayBindingPatternDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringAssignmentForArrayBindingPatternDefaultValues.baseline index 28b4bdb96e9..56894ce9a9a 100644 --- a/tests/baselines/reference/bpSpanDestructuringAssignmentForArrayBindingPatternDefaultValues.baseline +++ b/tests/baselines/reference/bpSpanDestructuringAssignmentForArrayBindingPatternDefaultValues.baseline @@ -95,12 +95,7 @@ -------------------------------- 20 >for ([, nameA = "name"] = robotA, i = 0; i < 1; i++) { - ~~~~~ => Pos: (712 to 716) SpanInfo: {"start":717,"length":34} - >[, nameA = "name"] = robotA, i = 0 - >:=> (line 20, col 5) to (line 20, col 39) -20 >for ([, nameA = "name"] = robotA, i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (717 to 744) SpanInfo: {"start":720,"length":14} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (712 to 744) SpanInfo: {"start":720,"length":14} >nameA = "name" >:=> (line 20, col 8) to (line 20, col 22) 20 >for ([, nameA = "name"] = robotA, i = 0; i < 1; i++) { @@ -133,12 +128,7 @@ -------------------------------- 23 >for ([, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { - ~~~~~ => Pos: (793 to 797) SpanInfo: {"start":798,"length":38} - >[, nameA = "name"] = getRobot(), i = 0 - >:=> (line 23, col 5) to (line 23, col 43) -23 >for ([, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (798 to 829) SpanInfo: {"start":801,"length":14} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (793 to 829) SpanInfo: {"start":801,"length":14} >nameA = "name" >:=> (line 23, col 8) to (line 23, col 22) 23 >for ([, nameA = "name"] = getRobot(), i = 0; i < 1; i++) { @@ -171,12 +161,7 @@ -------------------------------- 26 >for ([, nameA = "name"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { - ~~~~~ => Pos: (878 to 882) SpanInfo: {"start":883,"length":54} - >[, nameA = "name"] = [2, "trimmer", "trimming"], i = 0 - >:=> (line 26, col 5) to (line 26, col 59) -26 >for ([, nameA = "name"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (883 to 930) SpanInfo: {"start":886,"length":14} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (878 to 930) SpanInfo: {"start":886,"length":14} >nameA = "name" >:=> (line 26, col 8) to (line 26, col 22) 26 >for ([, nameA = "name"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { @@ -209,15 +194,7 @@ -------------------------------- 29 >for ([, [ - ~~~~~ => Pos: (979 to 983) SpanInfo: {"start":984,"length":112} - >[, [ - > primarySkillA = "primary", - > secondarySkillA = "secondary" - >] = ["none", "none"]] = multiRobotA, i = 0 - >:=> (line 29, col 5) to (line 32, col 42) -29 >for ([, [ - - ~~~~~ => Pos: (984 to 988) SpanInfo: {"start":993,"length":25} + ~~~~~~~~~~ => Pos: (979 to 988) SpanInfo: {"start":993,"length":25} >primarySkillA = "primary" >:=> (line 30, col 4) to (line 30, col 29) -------------------------------- @@ -276,15 +253,7 @@ -------------------------------- 35 >for ([, [ - ~~~~~ => Pos: (1146 to 1150) SpanInfo: {"start":1151,"length":116} - >[, [ - > primarySkillA = "primary", - > secondarySkillA = "secondary" - >] = ["none", "none"]] = getMultiRobot(), i = 0 - >:=> (line 35, col 5) to (line 38, col 46) -35 >for ([, [ - - ~~~~~ => Pos: (1151 to 1155) SpanInfo: {"start":1160,"length":25} + ~~~~~~~~~~ => Pos: (1146 to 1155) SpanInfo: {"start":1160,"length":25} >primarySkillA = "primary" >:=> (line 36, col 4) to (line 36, col 29) -------------------------------- @@ -343,15 +312,7 @@ -------------------------------- 41 >for ([, [ - ~~~~~ => Pos: (1317 to 1321) SpanInfo: {"start":1322,"length":136} - >[, [ - > primarySkillA = "primary", - > secondarySkillA = "secondary" - >] = ["none", "none"]] = ["trimmer", ["trimming", "edging"]], i = 0 - >:=> (line 41, col 5) to (line 44, col 66) -41 >for ([, [ - - ~~~~~ => Pos: (1322 to 1326) SpanInfo: {"start":1331,"length":25} + ~~~~~~~~~~ => Pos: (1317 to 1326) SpanInfo: {"start":1331,"length":25} >primarySkillA = "primary" >:=> (line 42, col 4) to (line 42, col 29) -------------------------------- @@ -410,12 +371,7 @@ -------------------------------- 47 >for ([numberB = -1] = robotA, i = 0; i < 1; i++) { - ~~~~~ => Pos: (1508 to 1512) SpanInfo: {"start":1513,"length":30} - >[numberB = -1] = robotA, i = 0 - >:=> (line 47, col 5) to (line 47, col 35) -47 >for ([numberB = -1] = robotA, i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1513 to 1536) SpanInfo: {"start":1514,"length":12} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1508 to 1536) SpanInfo: {"start":1514,"length":12} >numberB = -1 >:=> (line 47, col 6) to (line 47, col 18) 47 >for ([numberB = -1] = robotA, i = 0; i < 1; i++) { @@ -448,12 +404,7 @@ -------------------------------- 50 >for ([numberB = -1] = getRobot(), i = 0; i < 1; i++) { - ~~~~~ => Pos: (1587 to 1591) SpanInfo: {"start":1592,"length":34} - >[numberB = -1] = getRobot(), i = 0 - >:=> (line 50, col 5) to (line 50, col 39) -50 >for ([numberB = -1] = getRobot(), i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1592 to 1619) SpanInfo: {"start":1593,"length":12} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1587 to 1619) SpanInfo: {"start":1593,"length":12} >numberB = -1 >:=> (line 50, col 6) to (line 50, col 18) 50 >for ([numberB = -1] = getRobot(), i = 0; i < 1; i++) { @@ -486,12 +437,7 @@ -------------------------------- 53 >for ([numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { - ~~~~~ => Pos: (1670 to 1674) SpanInfo: {"start":1675,"length":50} - >[numberB = -1] = [2, "trimmer", "trimming"], i = 0 - >:=> (line 53, col 5) to (line 53, col 55) -53 >for ([numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1675 to 1718) SpanInfo: {"start":1676,"length":12} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1670 to 1718) SpanInfo: {"start":1676,"length":12} >numberB = -1 >:=> (line 53, col 6) to (line 53, col 18) 53 >for ([numberB = -1] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { @@ -524,12 +470,7 @@ -------------------------------- 56 >for ([nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { - ~~~~~ => Pos: (1769 to 1773) SpanInfo: {"start":1774,"length":37} - >[nameB = "name"] = multiRobotA, i = 0 - >:=> (line 56, col 5) to (line 56, col 42) -56 >for ([nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1774 to 1804) SpanInfo: {"start":1775,"length":14} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1769 to 1804) SpanInfo: {"start":1775,"length":14} >nameB = "name" >:=> (line 56, col 6) to (line 56, col 20) 56 >for ([nameB = "name"] = multiRobotA, i = 0; i < 1; i++) { @@ -562,12 +503,7 @@ -------------------------------- 59 >for ([nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { - ~~~~~ => Pos: (1853 to 1857) SpanInfo: {"start":1858,"length":41} - >[nameB = "name"] = getMultiRobot(), i = 0 - >:=> (line 59, col 5) to (line 59, col 46) -59 >for ([nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1858 to 1892) SpanInfo: {"start":1859,"length":14} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1853 to 1892) SpanInfo: {"start":1859,"length":14} >nameB = "name" >:=> (line 59, col 6) to (line 59, col 20) 59 >for ([nameB = "name"] = getMultiRobot(), i = 0; i < 1; i++) { @@ -600,12 +536,7 @@ -------------------------------- 62 >for ([nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { - ~~~~~ => Pos: (1941 to 1945) SpanInfo: {"start":1946,"length":61} - >[nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0 - >:=> (line 62, col 5) to (line 62, col 66) -62 >for ([nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1946 to 2000) SpanInfo: {"start":1947,"length":14} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1941 to 2000) SpanInfo: {"start":1947,"length":14} >nameB = "name" >:=> (line 62, col 6) to (line 62, col 20) 62 >for ([nameB = "name"] = ["trimmer", ["trimming", "edging"]], i = 0; i < 1; i++) { @@ -638,12 +569,7 @@ -------------------------------- 65 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { - ~~~~~ => Pos: (2049 to 2053) SpanInfo: {"start":2054,"length":67} - >[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0 - >:=> (line 65, col 5) to (line 65, col 72) -65 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~ => Pos: (2054 to 2068) SpanInfo: {"start":2055,"length":13} + ~~~~~~~~~~~~~~~~~~~~ => Pos: (2049 to 2068) SpanInfo: {"start":2055,"length":13} >numberA2 = -1 >:=> (line 65, col 6) to (line 65, col 19) 65 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = robotA, i = 0; i < 1; i++) { @@ -686,12 +612,7 @@ -------------------------------- 68 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { - ~~~~~ => Pos: (2164 to 2168) SpanInfo: {"start":2169,"length":71} - >[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0 - >:=> (line 68, col 5) to (line 68, col 76) -68 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~ => Pos: (2169 to 2183) SpanInfo: {"start":2170,"length":13} + ~~~~~~~~~~~~~~~~~~~~ => Pos: (2164 to 2183) SpanInfo: {"start":2170,"length":13} >numberA2 = -1 >:=> (line 68, col 6) to (line 68, col 19) 68 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = getRobot(), i = 0; i < 1; i++) { @@ -734,12 +655,7 @@ -------------------------------- 71 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { - ~~~~~ => Pos: (2283 to 2287) SpanInfo: {"start":2288,"length":87} - >[numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0 - >:=> (line 71, col 5) to (line 71, col 92) -71 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~ => Pos: (2288 to 2302) SpanInfo: {"start":2289,"length":13} + ~~~~~~~~~~~~~~~~~~~~ => Pos: (2283 to 2302) SpanInfo: {"start":2289,"length":13} >numberA2 = -1 >:=> (line 71, col 6) to (line 71, col 19) 71 >for ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { @@ -782,17 +698,7 @@ -------------------------------- 74 >for ([nameMA = "noName", - ~~~~~ => Pos: (2418 to 2422) SpanInfo: {"start":2423,"length":166} - >[nameMA = "noName", - > [ - > primarySkillA = "primary", - > secondarySkillA = "secondary" - > ] = ["none", "none"] - > ] = multiRobotA, i = 0 - >:=> (line 74, col 5) to (line 79, col 26) -74 >for ([nameMA = "noName", - - ~~~~~~~~~~~~~~~~~~~~ => Pos: (2423 to 2442) SpanInfo: {"start":2424,"length":17} + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2418 to 2442) SpanInfo: {"start":2424,"length":17} >nameMA = "noName" >:=> (line 74, col 6) to (line 74, col 23) -------------------------------- @@ -858,17 +764,7 @@ -------------------------------- 82 >for ([nameMA = "noName", - ~~~~~ => Pos: (2632 to 2636) SpanInfo: {"start":2637,"length":150} - >[nameMA = "noName", - > [ - > primarySkillA = "primary", - > secondarySkillA = "secondary" - > ] = ["none", "none"] - >] = getMultiRobot(), i = 0 - >:=> (line 82, col 5) to (line 87, col 26) -82 >for ([nameMA = "noName", - - ~~~~~~~~~~~~~~~~~~~~ => Pos: (2637 to 2656) SpanInfo: {"start":2638,"length":17} + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2632 to 2656) SpanInfo: {"start":2638,"length":17} >nameMA = "noName" >:=> (line 82, col 6) to (line 82, col 23) -------------------------------- @@ -934,17 +830,7 @@ -------------------------------- 90 >for ([nameMA = "noName", - ~~~~~ => Pos: (2830 to 2834) SpanInfo: {"start":2835,"length":170} - >[nameMA = "noName", - > [ - > primarySkillA = "primary", - > secondarySkillA = "secondary" - > ] = ["none", "none"] - >] = ["trimmer", ["trimming", "edging"]], i = 0 - >:=> (line 90, col 5) to (line 95, col 46) -90 >for ([nameMA = "noName", - - ~~~~~~~~~~~~~~~~~~~~ => Pos: (2835 to 2854) SpanInfo: {"start":2836,"length":17} + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2830 to 2854) SpanInfo: {"start":2836,"length":17} >nameMA = "noName" >:=> (line 90, col 6) to (line 90, col 23) -------------------------------- @@ -1010,12 +896,7 @@ -------------------------------- 98 >for ([numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { - ~~~~~ => Pos: (3048 to 3052) SpanInfo: {"start":3053,"length":46} - >[numberA3 = -1, ...robotAInfo] = robotA, i = 0 - >:=> (line 98, col 5) to (line 98, col 51) -98 >for ([numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~ => Pos: (3053 to 3067) SpanInfo: {"start":3054,"length":13} + ~~~~~~~~~~~~~~~~~~~~ => Pos: (3048 to 3067) SpanInfo: {"start":3054,"length":13} >numberA3 = -1 >:=> (line 98, col 6) to (line 98, col 19) 98 >for ([numberA3 = -1, ...robotAInfo] = robotA, i = 0; i < 1; i++) { @@ -1053,12 +934,7 @@ -------------------------------- 101>for ([numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { - ~~~~~ => Pos: (3144 to 3148) SpanInfo: {"start":3149,"length":50} - >[numberA3 = -1, ...robotAInfo] = getRobot(), i = 0 - >:=> (line 101, col 5) to (line 101, col 55) -101>for ([numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~ => Pos: (3149 to 3163) SpanInfo: {"start":3150,"length":13} + ~~~~~~~~~~~~~~~~~~~~ => Pos: (3144 to 3163) SpanInfo: {"start":3150,"length":13} >numberA3 = -1 >:=> (line 101, col 6) to (line 101, col 19) 101>for ([numberA3 = -1, ...robotAInfo] = getRobot(), i = 0; i < 1; i++) { @@ -1096,12 +972,7 @@ -------------------------------- 104>for ([numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { - ~~~~~ => Pos: (3244 to 3248) SpanInfo: {"start":3249,"length":73} - >[numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0 - >:=> (line 104, col 5) to (line 104, col 78) -104>for ([numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { - - ~~~~~~~~~~~~~~~ => Pos: (3249 to 3263) SpanInfo: {"start":3250,"length":13} + ~~~~~~~~~~~~~~~~~~~~ => Pos: (3244 to 3263) SpanInfo: {"start":3250,"length":13} >numberA3 = -1 >:=> (line 104, col 6) to (line 104, col 19) 104>for ([numberA3 = -1, ...robotAInfo] = [2, "trimmer", "trimming"], i = 0; i < 1; i++) { diff --git a/tests/baselines/reference/bpSpan_for.baseline b/tests/baselines/reference/bpSpan_for.baseline index 7fd6ba4c858..46214f6e3b1 100644 --- a/tests/baselines/reference/bpSpan_for.baseline +++ b/tests/baselines/reference/bpSpan_for.baseline @@ -220,12 +220,7 @@ -------------------------------- 32 >for (i = 0, j = 20; j < 20, i < 20; j++) { - ~~~~~ => Pos: (351 to 355) SpanInfo: {"start":356,"length":13} - >i = 0, j = 20 - >:=> (line 32, col 5) to (line 32, col 18) -32 >for (i = 0, j = 20; j < 20, i < 20; j++) { - - ~~~~~~ => Pos: (356 to 361) SpanInfo: {"start":356,"length":5} + ~~~~~~~~~~~ => Pos: (351 to 361) SpanInfo: {"start":356,"length":5} >i = 0 >:=> (line 32, col 5) to (line 32, col 10) 32 >for (i = 0, j = 20; j < 20, i < 20; j++) { From caa6eb4204a8aa550e493be405ef5b22ef5eebce Mon Sep 17 00:00:00 2001 From: Zhengbo Li Date: Tue, 22 Dec 2015 15:26:21 -0800 Subject: [PATCH 081/209] Reuse watchers between 'watchDirectory' and 'watchFile' --- src/compiler/sys.ts | 184 +++++++++++++++++++++++++++++--------------- 1 file changed, 122 insertions(+), 62 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 5d723425496..4056ffd9da9 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -1,8 +1,8 @@ /// namespace ts { - export type CallbackForWatchedFile = (path: string, removed?: boolean) => void; - export type CallbackForWatchedDirectory = (path: string) => void; + export type FileWatcherCallback = (path: string, removed?: boolean) => void; + export type DirWatcherCallback = (path: string) => void; export interface System { args: string[]; @@ -11,8 +11,8 @@ namespace ts { write(s: string): void; readFile(path: string, encoding?: string): string; writeFile(path: string, data: string, writeByteOrderMark?: boolean): void; - watchFile?(path: string, callback: CallbackForWatchedFile): FileWatcher; - watchDirectory?(path: string, callback: CallbackForWatchedDirectory, recursive?: boolean): FileWatcher; + watchFile?(path: string, callback: FileWatcherCallback): FileWatcher; + watchDirectory?(path: string, callback: DirWatcherCallback, recursive?: boolean): FileWatcher; resolvePath(path: string): string; fileExists(path: string): boolean; directoryExists(path: string): boolean; @@ -26,13 +26,17 @@ namespace ts { interface WatchedFile { fileName: string; - callback: CallbackForWatchedFile; + callback: FileWatcherCallback; mtime?: Date; } export interface FileWatcher { close(): void; } + + export interface DirWatcher extends FileWatcher { + referenceCount: number; + } declare var require: any; declare var module: any; @@ -65,8 +69,8 @@ namespace ts { readFile(path: string): string; writeFile(path: string, contents: string): void; readDirectory(path: string, extension?: string, exclude?: string[]): string[]; - watchFile?(path: string, callback: CallbackForWatchedFile): FileWatcher; - watchDirectory?(path: string, callback: CallbackForWatchedDirectory, recursive?: boolean): FileWatcher; + watchFile?(path: string, callback: FileWatcherCallback): FileWatcher; + watchDirectory?(path: string, callback: DirWatcherCallback, recursive?: boolean): FileWatcher; }; export var sys: System = (function () { @@ -274,7 +278,7 @@ namespace ts { }, interval); } - function addFile(fileName: string, callback: CallbackForWatchedFile): WatchedFile { + function addFile(fileName: string, callback: FileWatcherCallback): WatchedFile { const file: WatchedFile = { fileName, callback, @@ -301,53 +305,124 @@ namespace ts { }; } - - function createWatchedFileSet() { - const watchedDirectories = createFileMap(); - const watchedFiles = createFileMap(); + const dirWatchers = createFileMap(); + const recursiveDirWatchers = createFileMap(); + const fileWatcherCallbacks = createFileMap(); + const dirWatcherCallbacks = createFileMap(); + const currentDirectory = process.cwd(); + return { addFile, removeFile, addDir }; - return { addFile, removeFile }; - - function addFile(fileName: string, callback: CallbackForWatchedFile): WatchedFile { - const path = toPath(fileName, currentDirectory, getCanonicalPath); - const parentDirPath = getDirectoryPath(path); - - if (!watchedDirectories.contains(parentDirPath)) { - watchedDirectories.set(parentDirPath, _fs.watch( - parentDirPath, - (eventName: string, relativeFileName: string) => fileEventHandler(eventName, relativeFileName, parentDirPath) - )); + function addDir(dirName: string, callback: DirWatcherCallback, recursive?: boolean) { + const dirPath = toPath(dirName, currentDirectory, getCanonicalPath); + dirWatcherCallbacks.set(dirPath, callback); + const { watcher, isRecursive } = addDirWatcher(dirPath, recursive); + return { + close: () => reduceDirWatcherRefCount(watcher, dirPath, isRecursive) } - watchedFiles.set(path, callback); - return { fileName, callback }; } - - function removeFile(file: WatchedFile) { - const path = toPath(file.fileName, currentDirectory, getCanonicalPath); - watchedFiles.remove(path); - - const parentDirPath = getDirectoryPath(path); - if (watchedDirectories.contains(parentDirPath)) { - let hasWatchedChildren = false; - watchedFiles.forEachValue((key, _) => { - if (ts.getDirectoryPath(key) === parentDirPath) { - hasWatchedChildren = true; - } - }); - if (!hasWatchedChildren) { - watchedDirectories.get(parentDirPath).close(); - watchedDirectories.remove(parentDirPath); + + function reduceDirWatcherRefCount(watcher: DirWatcher, dirPath: Path, isRecursive: boolean) { + watcher.referenceCount -= 1; + if (watcher.referenceCount <= 0) { + watcher.close(); + if (isRecursive) { + recursiveDirWatchers.remove(dirPath); + } else { + dirWatchers.remove(dirPath); } } } - function fileEventHandler(eventName: string, fileName: string, basePath: string) { - const path = ts.toPath(fileName, basePath, getCanonicalPath); - if (watchedFiles.contains(path)) { - const callback = watchedFiles.get(path); - callback(fileName); + function addDirWatcher(dirPath: Path, recursive?: boolean): { watcher: DirWatcher, isRecursive: boolean } { + let watchers: FileMap; + let options: { persistent: boolean, recursive?: boolean } = { persistent: true }; + + // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows + // (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643) + if (isNode4OrLater() && recursive === true) { + if (recursiveDirWatchers.contains(dirPath)) { + const watcher = recursiveDirWatchers.get(dirPath); + watcher.referenceCount += 1; + return { watcher, isRecursive: true }; + } + watchers = recursiveDirWatchers; + options.recursive = true; + } else { + if (dirWatchers.contains(dirPath)) { + const watcher = dirWatchers.get(dirPath); + watcher.referenceCount += 1; + return { watcher, isRecursive: false }; + } + watchers = dirWatchers; + } + + const watcher: DirWatcher = _fs.watch(dirPath, options, (eventName: string, relativeFileName: string) => fileEventHandler(eventName, relativeFileName, dirPath)); + watcher.referenceCount = 1; + watchers.set(dirPath, watcher); + return { watcher, isRecursive: false }; + } + + function findDirWatcherForFile(filePath: Path): { watcher: DirWatcher, watcherPath: Path, isRecursive: boolean } { + let watcher: DirWatcher; + let watcherPath: Path; + let isRecursive = false; + recursiveDirWatchers.forEachValue(dirPath => { + if (filePath.indexOf(dirPath) === 0) { + watcherPath = dirPath; + watcher = recursiveDirWatchers.get(dirPath); + isRecursive = true; + return; + } + }); + if (!watcher) { + const parentDirPath = getDirectoryPath(filePath); + if (dirWatchers.contains(parentDirPath)) { + watcherPath = parentDirPath; + watcher = dirWatchers.get(parentDirPath); + } + } + return { watcher, watcherPath, isRecursive }; + } + + function addFile(fileName: string, callback: FileWatcherCallback): WatchedFile { + const filePath = toPath(fileName, currentDirectory, getCanonicalPath); + const { watcher } = findDirWatcherForFile(filePath); + if (!watcher) { + addDirWatcher(getDirectoryPath(filePath)); + } else { + watcher.referenceCount += 1; + } + fileWatcherCallbacks.set(filePath, callback); + return { fileName, callback }; + } + + function removeFile(file: WatchedFile) { + const filePath = toPath(file.fileName, currentDirectory, getCanonicalPath); + fileWatcherCallbacks.remove(filePath); + + const { watcher, watcherPath, isRecursive } = findDirWatcherForFile(filePath); + if (watcher) { + reduceDirWatcherRefCount(watcher, watcherPath, isRecursive); + } + } + + /** + * @param watcherPath is the path from which the watcher is triggered. + */ + function fileEventHandler(eventName: string, relativefileName: string, baseDirPath: Path) { + // When files are deleted from disk, the triggered "rename" event would have a relativefileName of "undefined" + const filePath = relativefileName === undefined ? undefined : toPath(relativefileName, baseDirPath, getCanonicalPath); + // Directory callbacks are not set for file content changes, they are more often used for + // adding/removing/renaming files, which corresponds to the "rename" event + if (eventName === "rename" && dirWatcherCallbacks.contains(baseDirPath)) { + const dirCallback = dirWatcherCallbacks.get(baseDirPath); + dirCallback(filePath); + } + if (fileWatcherCallbacks.contains(filePath)) { + const fileCallback = fileWatcherCallbacks.get(filePath); + fileCallback(filePath); } } } @@ -477,22 +552,7 @@ namespace ts { }; }, watchDirectory: (path, callback, recursive) => { - // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows - // (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643) - const options = isNode4OrLater() ? { persistent: true } : { persistent: true, recursive: !!recursive }; - return _fs.watch( - path, - options, - (eventName: string, relativeFileName: string) => { - // In watchDirectory we only care about adding and removing files (when event name is - // "rename"); changes made within files are handled by corresponding fileWatchers (when - // event name is "change") - if (eventName === "rename") { - // When deleting a file, the passed baseFileName is null - callback(!relativeFileName ? relativeFileName : normalizePath(ts.combinePaths(path, relativeFileName))); - }; - } - ); + return watchedFileSet.addDir(path, callback, recursive); }, resolvePath: function (path: string): string { return _path.resolve(path); From 82570b7fcabf5d912cf228549a04d67febc4cf46 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 22 Dec 2015 15:27:14 -0800 Subject: [PATCH 082/209] Add test cases for array pattern destructurting assignment in 'for of' --- ...ssignmentForOfArrayBindingPattern.baseline | 779 +++++++++++++++++ ...fArrayBindingPatternDefaultValues.baseline | 806 ++++++++++++++++++ ...uringAssignmentForOfArrayBindingPattern.ts | 95 +++ ...ntForOfArrayBindingPatternDefaultValues.ts | 104 +++ 4 files changed, 1784 insertions(+) create mode 100644 tests/baselines/reference/bpSpanDestructuringAssignmentForOfArrayBindingPattern.baseline create mode 100644 tests/baselines/reference/bpSpanDestructuringAssignmentForOfArrayBindingPatternDefaultValues.baseline create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringAssignmentForOfArrayBindingPattern.ts create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringAssignmentForOfArrayBindingPatternDefaultValues.ts diff --git a/tests/baselines/reference/bpSpanDestructuringAssignmentForOfArrayBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringAssignmentForOfArrayBindingPattern.baseline new file mode 100644 index 00000000000..16f6039031e --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringAssignmentForOfArrayBindingPattern.baseline @@ -0,0 +1,779 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: any): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (48 to 49) SpanInfo: undefined +-------------------------------- +4 >type Robot = [number, string, string]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 88) SpanInfo: undefined +-------------------------------- +5 >type MultiSkilledRobot = [string, [string, string]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (89 to 141) SpanInfo: undefined +-------------------------------- +6 >let robotA: Robot = [1, "mower", "mowing"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (142 to 185) SpanInfo: {"start":142,"length":42} + >let robotA: Robot = [1, "mower", "mowing"] + >:=> (line 6, col 0) to (line 6, col 42) +-------------------------------- +7 >let robotB: Robot = [2, "trimmer", "trimming"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (186 to 233) SpanInfo: {"start":186,"length":46} + >let robotB: Robot = [2, "trimmer", "trimming"] + >:=> (line 7, col 0) to (line 7, col 46) +-------------------------------- +8 >let robots = [robotA, robotB]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (234 to 264) SpanInfo: {"start":234,"length":29} + >let robots = [robotA, robotB] + >:=> (line 8, col 0) to (line 8, col 29) +-------------------------------- +9 >function getRobots() { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (265 to 287) SpanInfo: {"start":292,"length":13} + >return robots + >:=> (line 10, col 4) to (line 10, col 17) +-------------------------------- +10 > return robots; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (288 to 306) SpanInfo: {"start":292,"length":13} + >return robots + >:=> (line 10, col 4) to (line 10, col 17) +-------------------------------- +11 >} + + ~~ => Pos: (307 to 308) SpanInfo: {"start":307,"length":1} + >} + >:=> (line 11, col 0) to (line 11, col 1) +-------------------------------- +12 >let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (309 to 372) SpanInfo: {"start":309,"length":62} + >let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]] + >:=> (line 12, col 0) to (line 12, col 62) +-------------------------------- +13 >let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (373 to 446) SpanInfo: {"start":373,"length":72} + >let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]] + >:=> (line 13, col 0) to (line 13, col 72) +-------------------------------- +14 >let multiRobots = [multiRobotA, multiRobotB]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (447 to 492) SpanInfo: {"start":447,"length":44} + >let multiRobots = [multiRobotA, multiRobotB] + >:=> (line 14, col 0) to (line 14, col 44) +-------------------------------- +15 >function getMultiRobots() { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (493 to 520) SpanInfo: {"start":525,"length":18} + >return multiRobots + >:=> (line 16, col 4) to (line 16, col 22) +-------------------------------- +16 > return multiRobots; + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (521 to 544) SpanInfo: {"start":525,"length":18} + >return multiRobots + >:=> (line 16, col 4) to (line 16, col 22) +-------------------------------- +17 >} + + ~~ => Pos: (545 to 546) SpanInfo: {"start":545,"length":1} + >} + >:=> (line 17, col 0) to (line 17, col 1) +-------------------------------- +18 >let nameA: string, primarySkillA: string, secondarySkillA: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (547 to 613) SpanInfo: undefined +-------------------------------- +19 >let numberB: number, nameB: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (614 to 649) SpanInfo: undefined +-------------------------------- +20 >let numberA2: number, nameA2: string, skillA2: string, nameMA: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (650 to 720) SpanInfo: undefined +-------------------------------- +21 >let numberA3: number, robotAInfo: (number | string)[], multiRobotAInfo: (string | [string, string])[]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (721 to 823) SpanInfo: undefined +-------------------------------- +22 >for ([, nameA] of robots) { + + ~~~~~~~~~~~~~~ => Pos: (824 to 837) SpanInfo: {"start":832,"length":5} + >nameA + >:=> (line 22, col 8) to (line 22, col 13) +22 >for ([, nameA] of robots) { + + ~~~~~~~~~~~~~~ => Pos: (838 to 851) SpanInfo: {"start":842,"length":6} + >robots + >:=> (line 22, col 18) to (line 22, col 24) +-------------------------------- +23 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (852 to 875) SpanInfo: {"start":856,"length":18} + >console.log(nameA) + >:=> (line 23, col 4) to (line 23, col 22) +-------------------------------- +24 >} + + ~~ => Pos: (876 to 877) SpanInfo: {"start":856,"length":18} + >console.log(nameA) + >:=> (line 23, col 4) to (line 23, col 22) +-------------------------------- +25 >for ([, nameA] of getRobots()) { + + ~~~~~~~~~~~~~~ => Pos: (878 to 891) SpanInfo: {"start":886,"length":5} + >nameA + >:=> (line 25, col 8) to (line 25, col 13) +25 >for ([, nameA] of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (892 to 910) SpanInfo: {"start":896,"length":11} + >getRobots() + >:=> (line 25, col 18) to (line 25, col 29) +-------------------------------- +26 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (911 to 934) SpanInfo: {"start":915,"length":18} + >console.log(nameA) + >:=> (line 26, col 4) to (line 26, col 22) +-------------------------------- +27 >} + + ~~ => Pos: (935 to 936) SpanInfo: {"start":915,"length":18} + >console.log(nameA) + >:=> (line 26, col 4) to (line 26, col 22) +-------------------------------- +28 >for ([, nameA] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~ => Pos: (937 to 950) SpanInfo: {"start":945,"length":5} + >nameA + >:=> (line 28, col 8) to (line 28, col 13) +28 >for ([, nameA] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (951 to 974) SpanInfo: {"start":955,"length":16} + >[robotA, robotB] + >:=> (line 28, col 18) to (line 28, col 34) +-------------------------------- +29 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (975 to 998) SpanInfo: {"start":979,"length":18} + >console.log(nameA) + >:=> (line 29, col 4) to (line 29, col 22) +-------------------------------- +30 >} + + ~~ => Pos: (999 to 1000) SpanInfo: {"start":979,"length":18} + >console.log(nameA) + >:=> (line 29, col 4) to (line 29, col 22) +-------------------------------- +31 >for ([, [primarySkillA, secondarySkillA]] of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1001 to 1023) SpanInfo: {"start":1010,"length":13} + >primarySkillA + >:=> (line 31, col 9) to (line 31, col 22) +31 >for ([, [primarySkillA, secondarySkillA]] of multiRobots) { + + ~~~~~~~~~~~~~~~~~ => Pos: (1024 to 1040) SpanInfo: {"start":1025,"length":15} + >secondarySkillA + >:=> (line 31, col 24) to (line 31, col 39) +31 >for ([, [primarySkillA, secondarySkillA]] of multiRobots) { + + ~ => Pos: (1041 to 1041) SpanInfo: {"start":1009,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 31, col 8) to (line 31, col 40) +31 >for ([, [primarySkillA, secondarySkillA]] of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (1042 to 1060) SpanInfo: {"start":1046,"length":11} + >multiRobots + >:=> (line 31, col 45) to (line 31, col 56) +-------------------------------- +32 > console.log(primarySkillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1061 to 1092) SpanInfo: {"start":1065,"length":26} + >console.log(primarySkillA) + >:=> (line 32, col 4) to (line 32, col 30) +-------------------------------- +33 >} + + ~~ => Pos: (1093 to 1094) SpanInfo: {"start":1065,"length":26} + >console.log(primarySkillA) + >:=> (line 32, col 4) to (line 32, col 30) +-------------------------------- +34 >for ([, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1095 to 1117) SpanInfo: {"start":1104,"length":13} + >primarySkillA + >:=> (line 34, col 9) to (line 34, col 22) +34 >for ([, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~ => Pos: (1118 to 1134) SpanInfo: {"start":1119,"length":15} + >secondarySkillA + >:=> (line 34, col 24) to (line 34, col 39) +34 >for ([, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + + ~ => Pos: (1135 to 1135) SpanInfo: {"start":1103,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 34, col 8) to (line 34, col 40) +34 >for ([, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1136 to 1159) SpanInfo: {"start":1140,"length":16} + >getMultiRobots() + >:=> (line 34, col 45) to (line 34, col 61) +-------------------------------- +35 > console.log(primarySkillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1160 to 1191) SpanInfo: {"start":1164,"length":26} + >console.log(primarySkillA) + >:=> (line 35, col 4) to (line 35, col 30) +-------------------------------- +36 >} + + ~~ => Pos: (1192 to 1193) SpanInfo: {"start":1164,"length":26} + >console.log(primarySkillA) + >:=> (line 35, col 4) to (line 35, col 30) +-------------------------------- +37 >for ([, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1194 to 1216) SpanInfo: {"start":1203,"length":13} + >primarySkillA + >:=> (line 37, col 9) to (line 37, col 22) +37 >for ([, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~~ => Pos: (1217 to 1233) SpanInfo: {"start":1218,"length":15} + >secondarySkillA + >:=> (line 37, col 24) to (line 37, col 39) +37 >for ([, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + + ~ => Pos: (1234 to 1234) SpanInfo: {"start":1202,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 37, col 8) to (line 37, col 40) +37 >for ([, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1235 to 1268) SpanInfo: {"start":1239,"length":26} + >[multiRobotA, multiRobotB] + >:=> (line 37, col 45) to (line 37, col 71) +-------------------------------- +38 > console.log(primarySkillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1269 to 1300) SpanInfo: {"start":1273,"length":26} + >console.log(primarySkillA) + >:=> (line 38, col 4) to (line 38, col 30) +-------------------------------- +39 >} + + ~~ => Pos: (1301 to 1302) SpanInfo: {"start":1273,"length":26} + >console.log(primarySkillA) + >:=> (line 38, col 4) to (line 38, col 30) +-------------------------------- +40 >for ([numberB] of robots) { + + ~~~~~~~~~~~~~~ => Pos: (1303 to 1316) SpanInfo: {"start":1309,"length":7} + >numberB + >:=> (line 40, col 6) to (line 40, col 13) +40 >for ([numberB] of robots) { + + ~~~~~~~~~~~~~~ => Pos: (1317 to 1330) SpanInfo: {"start":1321,"length":6} + >robots + >:=> (line 40, col 18) to (line 40, col 24) +-------------------------------- +41 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1331 to 1356) SpanInfo: {"start":1335,"length":20} + >console.log(numberB) + >:=> (line 41, col 4) to (line 41, col 24) +-------------------------------- +42 >} + + ~~ => Pos: (1357 to 1358) SpanInfo: {"start":1335,"length":20} + >console.log(numberB) + >:=> (line 41, col 4) to (line 41, col 24) +-------------------------------- +43 >for ([numberB] of getRobots()) { + + ~~~~~~~~~~~~~~ => Pos: (1359 to 1372) SpanInfo: {"start":1365,"length":7} + >numberB + >:=> (line 43, col 6) to (line 43, col 13) +43 >for ([numberB] of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1373 to 1391) SpanInfo: {"start":1377,"length":11} + >getRobots() + >:=> (line 43, col 18) to (line 43, col 29) +-------------------------------- +44 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1392 to 1417) SpanInfo: {"start":1396,"length":20} + >console.log(numberB) + >:=> (line 44, col 4) to (line 44, col 24) +-------------------------------- +45 >} + + ~~ => Pos: (1418 to 1419) SpanInfo: {"start":1396,"length":20} + >console.log(numberB) + >:=> (line 44, col 4) to (line 44, col 24) +-------------------------------- +46 >for ([numberB] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~ => Pos: (1420 to 1433) SpanInfo: {"start":1426,"length":7} + >numberB + >:=> (line 46, col 6) to (line 46, col 13) +46 >for ([numberB] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1434 to 1457) SpanInfo: {"start":1438,"length":16} + >[robotA, robotB] + >:=> (line 46, col 18) to (line 46, col 34) +-------------------------------- +47 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1458 to 1483) SpanInfo: {"start":1462,"length":20} + >console.log(numberB) + >:=> (line 47, col 4) to (line 47, col 24) +-------------------------------- +48 >} + + ~~ => Pos: (1484 to 1485) SpanInfo: {"start":1462,"length":20} + >console.log(numberB) + >:=> (line 47, col 4) to (line 47, col 24) +-------------------------------- +49 >for ([nameB] of multiRobots) { + + ~~~~~~~~~~~~ => Pos: (1486 to 1497) SpanInfo: {"start":1492,"length":5} + >nameB + >:=> (line 49, col 6) to (line 49, col 11) +49 >for ([nameB] of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1498 to 1516) SpanInfo: {"start":1502,"length":11} + >multiRobots + >:=> (line 49, col 16) to (line 49, col 27) +-------------------------------- +50 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1517 to 1540) SpanInfo: {"start":1521,"length":18} + >console.log(nameB) + >:=> (line 50, col 4) to (line 50, col 22) +-------------------------------- +51 >} + + ~~ => Pos: (1541 to 1542) SpanInfo: {"start":1521,"length":18} + >console.log(nameB) + >:=> (line 50, col 4) to (line 50, col 22) +-------------------------------- +52 >for ([nameB] of getMultiRobots()) { + + ~~~~~~~~~~~~ => Pos: (1543 to 1554) SpanInfo: {"start":1549,"length":5} + >nameB + >:=> (line 52, col 6) to (line 52, col 11) +52 >for ([nameB] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1555 to 1578) SpanInfo: {"start":1559,"length":16} + >getMultiRobots() + >:=> (line 52, col 16) to (line 52, col 32) +-------------------------------- +53 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1579 to 1602) SpanInfo: {"start":1583,"length":18} + >console.log(nameB) + >:=> (line 53, col 4) to (line 53, col 22) +-------------------------------- +54 >} + + ~~ => Pos: (1603 to 1604) SpanInfo: {"start":1583,"length":18} + >console.log(nameB) + >:=> (line 53, col 4) to (line 53, col 22) +-------------------------------- +55 >for ([nameB] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~ => Pos: (1605 to 1616) SpanInfo: {"start":1611,"length":5} + >nameB + >:=> (line 55, col 6) to (line 55, col 11) +55 >for ([nameB] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1617 to 1650) SpanInfo: {"start":1621,"length":26} + >[multiRobotA, multiRobotB] + >:=> (line 55, col 16) to (line 55, col 42) +-------------------------------- +56 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1651 to 1674) SpanInfo: {"start":1655,"length":18} + >console.log(nameB) + >:=> (line 56, col 4) to (line 56, col 22) +-------------------------------- +57 >} + + ~~ => Pos: (1675 to 1676) SpanInfo: {"start":1655,"length":18} + >console.log(nameB) + >:=> (line 56, col 4) to (line 56, col 22) +-------------------------------- +58 >for ([numberA2, nameA2, skillA2] of robots) { + + ~~~~~~~~~~~~~~~ => Pos: (1677 to 1691) SpanInfo: {"start":1683,"length":8} + >numberA2 + >:=> (line 58, col 6) to (line 58, col 14) +58 >for ([numberA2, nameA2, skillA2] of robots) { + + ~~~~~~~~ => Pos: (1692 to 1699) SpanInfo: {"start":1693,"length":6} + >nameA2 + >:=> (line 58, col 16) to (line 58, col 22) +58 >for ([numberA2, nameA2, skillA2] of robots) { + + ~~~~~~~~~ => Pos: (1700 to 1708) SpanInfo: {"start":1701,"length":7} + >skillA2 + >:=> (line 58, col 24) to (line 58, col 31) +58 >for ([numberA2, nameA2, skillA2] of robots) { + + ~~~~~~~~~~~~~~=> Pos: (1709 to 1722) SpanInfo: {"start":1713,"length":6} + >robots + >:=> (line 58, col 36) to (line 58, col 42) +-------------------------------- +59 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1723 to 1747) SpanInfo: {"start":1727,"length":19} + >console.log(nameA2) + >:=> (line 59, col 4) to (line 59, col 23) +-------------------------------- +60 >} + + ~~ => Pos: (1748 to 1749) SpanInfo: {"start":1727,"length":19} + >console.log(nameA2) + >:=> (line 59, col 4) to (line 59, col 23) +-------------------------------- +61 >for ([numberA2, nameA2, skillA2] of getRobots()) { + + ~~~~~~~~~~~~~~~ => Pos: (1750 to 1764) SpanInfo: {"start":1756,"length":8} + >numberA2 + >:=> (line 61, col 6) to (line 61, col 14) +61 >for ([numberA2, nameA2, skillA2] of getRobots()) { + + ~~~~~~~~ => Pos: (1765 to 1772) SpanInfo: {"start":1766,"length":6} + >nameA2 + >:=> (line 61, col 16) to (line 61, col 22) +61 >for ([numberA2, nameA2, skillA2] of getRobots()) { + + ~~~~~~~~~ => Pos: (1773 to 1781) SpanInfo: {"start":1774,"length":7} + >skillA2 + >:=> (line 61, col 24) to (line 61, col 31) +61 >for ([numberA2, nameA2, skillA2] of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (1782 to 1800) SpanInfo: {"start":1786,"length":11} + >getRobots() + >:=> (line 61, col 36) to (line 61, col 47) +-------------------------------- +62 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1801 to 1825) SpanInfo: {"start":1805,"length":19} + >console.log(nameA2) + >:=> (line 62, col 4) to (line 62, col 23) +-------------------------------- +63 >} + + ~~ => Pos: (1826 to 1827) SpanInfo: {"start":1805,"length":19} + >console.log(nameA2) + >:=> (line 62, col 4) to (line 62, col 23) +-------------------------------- +64 >for ([numberA2, nameA2, skillA2] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~ => Pos: (1828 to 1842) SpanInfo: {"start":1834,"length":8} + >numberA2 + >:=> (line 64, col 6) to (line 64, col 14) +64 >for ([numberA2, nameA2, skillA2] of [robotA, robotB]) { + + ~~~~~~~~ => Pos: (1843 to 1850) SpanInfo: {"start":1844,"length":6} + >nameA2 + >:=> (line 64, col 16) to (line 64, col 22) +64 >for ([numberA2, nameA2, skillA2] of [robotA, robotB]) { + + ~~~~~~~~~ => Pos: (1851 to 1859) SpanInfo: {"start":1852,"length":7} + >skillA2 + >:=> (line 64, col 24) to (line 64, col 31) +64 >for ([numberA2, nameA2, skillA2] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1860 to 1883) SpanInfo: {"start":1864,"length":16} + >[robotA, robotB] + >:=> (line 64, col 36) to (line 64, col 52) +-------------------------------- +65 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1884 to 1908) SpanInfo: {"start":1888,"length":19} + >console.log(nameA2) + >:=> (line 65, col 4) to (line 65, col 23) +-------------------------------- +66 >} + + ~~ => Pos: (1909 to 1910) SpanInfo: {"start":1888,"length":19} + >console.log(nameA2) + >:=> (line 65, col 4) to (line 65, col 23) +-------------------------------- +67 >for ([nameMA, [primarySkillA, secondarySkillA]] of multiRobots) { + + ~~~~~~~~~~~~~ => Pos: (1911 to 1923) SpanInfo: {"start":1917,"length":6} + >nameMA + >:=> (line 67, col 6) to (line 67, col 12) +67 >for ([nameMA, [primarySkillA, secondarySkillA]] of multiRobots) { + + ~~~~~~~~~~~~~~~~ => Pos: (1924 to 1939) SpanInfo: {"start":1926,"length":13} + >primarySkillA + >:=> (line 67, col 15) to (line 67, col 28) +67 >for ([nameMA, [primarySkillA, secondarySkillA]] of multiRobots) { + + ~~~~~~~~~~~~~~~~~=> Pos: (1940 to 1956) SpanInfo: {"start":1941,"length":15} + >secondarySkillA + >:=> (line 67, col 30) to (line 67, col 45) +67 >for ([nameMA, [primarySkillA, secondarySkillA]] of multiRobots) { + + ~=> Pos: (1957 to 1957) SpanInfo: {"start":1925,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 67, col 14) to (line 67, col 46) +67 >for ([nameMA, [primarySkillA, secondarySkillA]] of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (1958 to 1976) SpanInfo: {"start":1962,"length":11} + >multiRobots + >:=> (line 67, col 51) to (line 67, col 62) +-------------------------------- +68 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1977 to 2001) SpanInfo: {"start":1981,"length":19} + >console.log(nameMA) + >:=> (line 68, col 4) to (line 68, col 23) +-------------------------------- +69 >} + + ~~ => Pos: (2002 to 2003) SpanInfo: {"start":1981,"length":19} + >console.log(nameMA) + >:=> (line 68, col 4) to (line 68, col 23) +-------------------------------- +70 >for ([nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + + ~~~~~~~~~~~~~ => Pos: (2004 to 2016) SpanInfo: {"start":2010,"length":6} + >nameMA + >:=> (line 70, col 6) to (line 70, col 12) +70 >for ([nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~ => Pos: (2017 to 2032) SpanInfo: {"start":2019,"length":13} + >primarySkillA + >:=> (line 70, col 15) to (line 70, col 28) +70 >for ([nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~=> Pos: (2033 to 2049) SpanInfo: {"start":2034,"length":15} + >secondarySkillA + >:=> (line 70, col 30) to (line 70, col 45) +70 >for ([nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + + ~=> Pos: (2050 to 2050) SpanInfo: {"start":2018,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 70, col 14) to (line 70, col 46) +70 >for ([nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2051 to 2074) SpanInfo: {"start":2055,"length":16} + >getMultiRobots() + >:=> (line 70, col 51) to (line 70, col 67) +-------------------------------- +71 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2075 to 2099) SpanInfo: {"start":2079,"length":19} + >console.log(nameMA) + >:=> (line 71, col 4) to (line 71, col 23) +-------------------------------- +72 >} + + ~~ => Pos: (2100 to 2101) SpanInfo: {"start":2079,"length":19} + >console.log(nameMA) + >:=> (line 71, col 4) to (line 71, col 23) +-------------------------------- +73 >for ([nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~ => Pos: (2102 to 2114) SpanInfo: {"start":2108,"length":6} + >nameMA + >:=> (line 73, col 6) to (line 73, col 12) +73 >for ([nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~ => Pos: (2115 to 2130) SpanInfo: {"start":2117,"length":13} + >primarySkillA + >:=> (line 73, col 15) to (line 73, col 28) +73 >for ([nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~~=> Pos: (2131 to 2147) SpanInfo: {"start":2132,"length":15} + >secondarySkillA + >:=> (line 73, col 30) to (line 73, col 45) +73 >for ([nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + + ~=> Pos: (2148 to 2148) SpanInfo: {"start":2116,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 73, col 14) to (line 73, col 46) +73 >for ([nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2149 to 2182) SpanInfo: {"start":2153,"length":26} + >[multiRobotA, multiRobotB] + >:=> (line 73, col 51) to (line 73, col 77) +-------------------------------- +74 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2183 to 2207) SpanInfo: {"start":2187,"length":19} + >console.log(nameMA) + >:=> (line 74, col 4) to (line 74, col 23) +-------------------------------- +75 >} + + ~~ => Pos: (2208 to 2209) SpanInfo: {"start":2187,"length":19} + >console.log(nameMA) + >:=> (line 74, col 4) to (line 74, col 23) +-------------------------------- +76 >for ([numberA3, ...robotAInfo] of robots) { + + ~~~~~~~~~~~~~~~ => Pos: (2210 to 2224) SpanInfo: {"start":2216,"length":8} + >numberA3 + >:=> (line 76, col 6) to (line 76, col 14) +76 >for ([numberA3, ...robotAInfo] of robots) { + + ~~~~~~~~~~~~~~~ => Pos: (2225 to 2239) SpanInfo: {"start":2226,"length":13} + >...robotAInfo + >:=> (line 76, col 16) to (line 76, col 29) +76 >for ([numberA3, ...robotAInfo] of robots) { + + ~~~~~~~~~~~~~~ => Pos: (2240 to 2253) SpanInfo: {"start":2244,"length":6} + >robots + >:=> (line 76, col 34) to (line 76, col 40) +-------------------------------- +77 > console.log(numberA3); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2254 to 2280) SpanInfo: {"start":2258,"length":21} + >console.log(numberA3) + >:=> (line 77, col 4) to (line 77, col 25) +-------------------------------- +78 >} + + ~~ => Pos: (2281 to 2282) SpanInfo: {"start":2258,"length":21} + >console.log(numberA3) + >:=> (line 77, col 4) to (line 77, col 25) +-------------------------------- +79 >for ([numberA3, ...robotAInfo] of getRobots()) { + + ~~~~~~~~~~~~~~~ => Pos: (2283 to 2297) SpanInfo: {"start":2289,"length":8} + >numberA3 + >:=> (line 79, col 6) to (line 79, col 14) +79 >for ([numberA3, ...robotAInfo] of getRobots()) { + + ~~~~~~~~~~~~~~~ => Pos: (2298 to 2312) SpanInfo: {"start":2299,"length":13} + >...robotAInfo + >:=> (line 79, col 16) to (line 79, col 29) +79 >for ([numberA3, ...robotAInfo] of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (2313 to 2331) SpanInfo: {"start":2317,"length":11} + >getRobots() + >:=> (line 79, col 34) to (line 79, col 45) +-------------------------------- +80 > console.log(numberA3); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2332 to 2358) SpanInfo: {"start":2336,"length":21} + >console.log(numberA3) + >:=> (line 80, col 4) to (line 80, col 25) +-------------------------------- +81 >} + + ~~ => Pos: (2359 to 2360) SpanInfo: {"start":2336,"length":21} + >console.log(numberA3) + >:=> (line 80, col 4) to (line 80, col 25) +-------------------------------- +82 >for ([numberA3, ...robotAInfo] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~ => Pos: (2361 to 2375) SpanInfo: {"start":2367,"length":8} + >numberA3 + >:=> (line 82, col 6) to (line 82, col 14) +82 >for ([numberA3, ...robotAInfo] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~ => Pos: (2376 to 2390) SpanInfo: {"start":2377,"length":13} + >...robotAInfo + >:=> (line 82, col 16) to (line 82, col 29) +82 >for ([numberA3, ...robotAInfo] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2391 to 2414) SpanInfo: {"start":2395,"length":16} + >[robotA, robotB] + >:=> (line 82, col 34) to (line 82, col 50) +-------------------------------- +83 > console.log(numberA3); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2415 to 2441) SpanInfo: {"start":2419,"length":21} + >console.log(numberA3) + >:=> (line 83, col 4) to (line 83, col 25) +-------------------------------- +84 >} + + ~~ => Pos: (2442 to 2443) SpanInfo: {"start":2419,"length":21} + >console.log(numberA3) + >:=> (line 83, col 4) to (line 83, col 25) +-------------------------------- +85 >for ([...multiRobotAInfo] of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2444 to 2468) SpanInfo: {"start":2450,"length":18} + >...multiRobotAInfo + >:=> (line 85, col 6) to (line 85, col 24) +85 >for ([...multiRobotAInfo] of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (2469 to 2487) SpanInfo: {"start":2473,"length":11} + >multiRobots + >:=> (line 85, col 29) to (line 85, col 40) +-------------------------------- +86 > console.log(multiRobotAInfo); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2488 to 2521) SpanInfo: {"start":2492,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 86, col 4) to (line 86, col 32) +-------------------------------- +87 >} + + ~~ => Pos: (2522 to 2523) SpanInfo: {"start":2492,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 86, col 4) to (line 86, col 32) +-------------------------------- +88 >for ([...multiRobotAInfo] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2524 to 2548) SpanInfo: {"start":2530,"length":18} + >...multiRobotAInfo + >:=> (line 88, col 6) to (line 88, col 24) +88 >for ([...multiRobotAInfo] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2549 to 2572) SpanInfo: {"start":2553,"length":16} + >getMultiRobots() + >:=> (line 88, col 29) to (line 88, col 45) +-------------------------------- +89 > console.log(multiRobotAInfo); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2573 to 2606) SpanInfo: {"start":2577,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 89, col 4) to (line 89, col 32) +-------------------------------- +90 >} + + ~~ => Pos: (2607 to 2608) SpanInfo: {"start":2577,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 89, col 4) to (line 89, col 32) +-------------------------------- +91 >for ([...multiRobotAInfo] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2609 to 2633) SpanInfo: {"start":2615,"length":18} + >...multiRobotAInfo + >:=> (line 91, col 6) to (line 91, col 24) +91 >for ([...multiRobotAInfo] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2634 to 2667) SpanInfo: {"start":2638,"length":26} + >[multiRobotA, multiRobotB] + >:=> (line 91, col 29) to (line 91, col 55) +-------------------------------- +92 > console.log(multiRobotAInfo); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2668 to 2701) SpanInfo: {"start":2672,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 92, col 4) to (line 92, col 32) +-------------------------------- +93 >} + ~ => Pos: (2702 to 2702) SpanInfo: {"start":2672,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 92, col 4) to (line 92, col 32) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringAssignmentForOfArrayBindingPatternDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringAssignmentForOfArrayBindingPatternDefaultValues.baseline new file mode 100644 index 00000000000..c7e2f005833 --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringAssignmentForOfArrayBindingPatternDefaultValues.baseline @@ -0,0 +1,806 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: any): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (48 to 49) SpanInfo: undefined +-------------------------------- +4 >type Robot = [number, string, string]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 88) SpanInfo: undefined +-------------------------------- +5 >type MultiSkilledRobot = [string, [string, string]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (89 to 141) SpanInfo: undefined +-------------------------------- +6 >let robotA: Robot = [1, "mower", "mowing"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (142 to 185) SpanInfo: {"start":142,"length":42} + >let robotA: Robot = [1, "mower", "mowing"] + >:=> (line 6, col 0) to (line 6, col 42) +-------------------------------- +7 >let robotB: Robot = [2, "trimmer", "trimming"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (186 to 233) SpanInfo: {"start":186,"length":46} + >let robotB: Robot = [2, "trimmer", "trimming"] + >:=> (line 7, col 0) to (line 7, col 46) +-------------------------------- +8 >let robots = [robotA, robotB]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (234 to 264) SpanInfo: {"start":234,"length":29} + >let robots = [robotA, robotB] + >:=> (line 8, col 0) to (line 8, col 29) +-------------------------------- +9 >function getRobots() { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (265 to 287) SpanInfo: {"start":292,"length":13} + >return robots + >:=> (line 10, col 4) to (line 10, col 17) +-------------------------------- +10 > return robots; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (288 to 306) SpanInfo: {"start":292,"length":13} + >return robots + >:=> (line 10, col 4) to (line 10, col 17) +-------------------------------- +11 >} + + ~~ => Pos: (307 to 308) SpanInfo: {"start":307,"length":1} + >} + >:=> (line 11, col 0) to (line 11, col 1) +-------------------------------- +12 >let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (309 to 372) SpanInfo: {"start":309,"length":62} + >let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]] + >:=> (line 12, col 0) to (line 12, col 62) +-------------------------------- +13 >let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (373 to 446) SpanInfo: {"start":373,"length":72} + >let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]] + >:=> (line 13, col 0) to (line 13, col 72) +-------------------------------- +14 >let multiRobots = [multiRobotA, multiRobotB]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (447 to 492) SpanInfo: {"start":447,"length":44} + >let multiRobots = [multiRobotA, multiRobotB] + >:=> (line 14, col 0) to (line 14, col 44) +-------------------------------- +15 >function getMultiRobots() { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (493 to 520) SpanInfo: {"start":525,"length":18} + >return multiRobots + >:=> (line 16, col 4) to (line 16, col 22) +-------------------------------- +16 > return multiRobots; + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (521 to 544) SpanInfo: {"start":525,"length":18} + >return multiRobots + >:=> (line 16, col 4) to (line 16, col 22) +-------------------------------- +17 >} + + ~~ => Pos: (545 to 546) SpanInfo: {"start":545,"length":1} + >} + >:=> (line 17, col 0) to (line 17, col 1) +-------------------------------- +18 >let nameA: string, primarySkillA: string, secondarySkillA: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (547 to 613) SpanInfo: undefined +-------------------------------- +19 >let numberB: number, nameB: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (614 to 649) SpanInfo: undefined +-------------------------------- +20 >let numberA2: number, nameA2: string, skillA2: string, nameMA: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (650 to 720) SpanInfo: undefined +-------------------------------- +21 >let numberA3: number, robotAInfo: (number | string)[], multiRobotAInfo: (string | [string, string])[]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (721 to 823) SpanInfo: undefined +-------------------------------- +22 >for ([, nameA = "noName"] of robots) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (824 to 848) SpanInfo: {"start":832,"length":16} + >nameA = "noName" + >:=> (line 22, col 8) to (line 22, col 24) +22 >for ([, nameA = "noName"] of robots) { + + ~~~~~~~~~~~~~~ => Pos: (849 to 862) SpanInfo: {"start":853,"length":6} + >robots + >:=> (line 22, col 29) to (line 22, col 35) +-------------------------------- +23 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (863 to 886) SpanInfo: {"start":867,"length":18} + >console.log(nameA) + >:=> (line 23, col 4) to (line 23, col 22) +-------------------------------- +24 >} + + ~~ => Pos: (887 to 888) SpanInfo: {"start":867,"length":18} + >console.log(nameA) + >:=> (line 23, col 4) to (line 23, col 22) +-------------------------------- +25 >for ([, nameA = "noName"] of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (889 to 913) SpanInfo: {"start":897,"length":16} + >nameA = "noName" + >:=> (line 25, col 8) to (line 25, col 24) +25 >for ([, nameA = "noName"] of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (914 to 932) SpanInfo: {"start":918,"length":11} + >getRobots() + >:=> (line 25, col 29) to (line 25, col 40) +-------------------------------- +26 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (933 to 956) SpanInfo: {"start":937,"length":18} + >console.log(nameA) + >:=> (line 26, col 4) to (line 26, col 22) +-------------------------------- +27 >} + + ~~ => Pos: (957 to 958) SpanInfo: {"start":937,"length":18} + >console.log(nameA) + >:=> (line 26, col 4) to (line 26, col 22) +-------------------------------- +28 >for ([, nameA = "noName"] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (959 to 983) SpanInfo: {"start":967,"length":16} + >nameA = "noName" + >:=> (line 28, col 8) to (line 28, col 24) +28 >for ([, nameA = "noName"] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (984 to 1007) SpanInfo: {"start":988,"length":16} + >[robotA, robotB] + >:=> (line 28, col 29) to (line 28, col 45) +-------------------------------- +29 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1008 to 1031) SpanInfo: {"start":1012,"length":18} + >console.log(nameA) + >:=> (line 29, col 4) to (line 29, col 22) +-------------------------------- +30 >} + + ~~ => Pos: (1032 to 1033) SpanInfo: {"start":1012,"length":18} + >console.log(nameA) + >:=> (line 29, col 4) to (line 29, col 22) +-------------------------------- +31 >for ([, [ + + ~~~~~~~~~~ => Pos: (1034 to 1043) SpanInfo: {"start":1048,"length":25} + >primarySkillA = "primary" + >:=> (line 32, col 4) to (line 32, col 29) +-------------------------------- +32 > primarySkillA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1044 to 1074) SpanInfo: {"start":1048,"length":25} + >primarySkillA = "primary" + >:=> (line 32, col 4) to (line 32, col 29) +-------------------------------- +33 > secondarySkillA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1075 to 1108) SpanInfo: {"start":1079,"length":29} + >secondarySkillA = "secondary" + >:=> (line 33, col 4) to (line 33, col 33) +-------------------------------- +34 >] = ["skill1", "skill2"]] of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1109 to 1132) SpanInfo: {"start":1079,"length":29} + >secondarySkillA = "secondary" + >:=> (line 33, col 4) to (line 33, col 33) +34 >] = ["skill1", "skill2"]] of multiRobots) { + + ~ => Pos: (1133 to 1133) SpanInfo: {"start":1042,"length":91} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"] + >:=> (line 31, col 8) to (line 34, col 24) +34 >] = ["skill1", "skill2"]] of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1134 to 1152) SpanInfo: {"start":1138,"length":11} + >multiRobots + >:=> (line 34, col 29) to (line 34, col 40) +-------------------------------- +35 > console.log(primarySkillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1153 to 1184) SpanInfo: {"start":1157,"length":26} + >console.log(primarySkillA) + >:=> (line 35, col 4) to (line 35, col 30) +-------------------------------- +36 >} + + ~~ => Pos: (1185 to 1186) SpanInfo: {"start":1157,"length":26} + >console.log(primarySkillA) + >:=> (line 35, col 4) to (line 35, col 30) +-------------------------------- +37 >for ([, [ + + ~~~~~~~~~~ => Pos: (1187 to 1196) SpanInfo: {"start":1201,"length":25} + >primarySkillA = "primary" + >:=> (line 38, col 4) to (line 38, col 29) +-------------------------------- +38 > primarySkillA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1197 to 1227) SpanInfo: {"start":1201,"length":25} + >primarySkillA = "primary" + >:=> (line 38, col 4) to (line 38, col 29) +-------------------------------- +39 > secondarySkillA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1228 to 1261) SpanInfo: {"start":1232,"length":29} + >secondarySkillA = "secondary" + >:=> (line 39, col 4) to (line 39, col 33) +-------------------------------- +40 >] = ["skill1", "skill2"]] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1262 to 1285) SpanInfo: {"start":1232,"length":29} + >secondarySkillA = "secondary" + >:=> (line 39, col 4) to (line 39, col 33) +40 >] = ["skill1", "skill2"]] of getMultiRobots()) { + + ~ => Pos: (1286 to 1286) SpanInfo: {"start":1195,"length":91} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"] + >:=> (line 37, col 8) to (line 40, col 24) +40 >] = ["skill1", "skill2"]] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1287 to 1310) SpanInfo: {"start":1291,"length":16} + >getMultiRobots() + >:=> (line 40, col 29) to (line 40, col 45) +-------------------------------- +41 > console.log(primarySkillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1311 to 1342) SpanInfo: {"start":1315,"length":26} + >console.log(primarySkillA) + >:=> (line 41, col 4) to (line 41, col 30) +-------------------------------- +42 >} + + ~~ => Pos: (1343 to 1344) SpanInfo: {"start":1315,"length":26} + >console.log(primarySkillA) + >:=> (line 41, col 4) to (line 41, col 30) +-------------------------------- +43 >for ([, [ + + ~~~~~~~~~~ => Pos: (1345 to 1354) SpanInfo: {"start":1359,"length":25} + >primarySkillA = "primary" + >:=> (line 44, col 4) to (line 44, col 29) +-------------------------------- +44 > primarySkillA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1355 to 1385) SpanInfo: {"start":1359,"length":25} + >primarySkillA = "primary" + >:=> (line 44, col 4) to (line 44, col 29) +-------------------------------- +45 > secondarySkillA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1386 to 1419) SpanInfo: {"start":1390,"length":29} + >secondarySkillA = "secondary" + >:=> (line 45, col 4) to (line 45, col 33) +-------------------------------- +46 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1420 to 1443) SpanInfo: {"start":1390,"length":29} + >secondarySkillA = "secondary" + >:=> (line 45, col 4) to (line 45, col 33) +46 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { + + ~ => Pos: (1444 to 1444) SpanInfo: {"start":1353,"length":91} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"] + >:=> (line 43, col 8) to (line 46, col 24) +46 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1445 to 1478) SpanInfo: {"start":1449,"length":26} + >[multiRobotA, multiRobotB] + >:=> (line 46, col 29) to (line 46, col 55) +-------------------------------- +47 > console.log(primarySkillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1479 to 1510) SpanInfo: {"start":1483,"length":26} + >console.log(primarySkillA) + >:=> (line 47, col 4) to (line 47, col 30) +-------------------------------- +48 >} + + ~~ => Pos: (1511 to 1512) SpanInfo: {"start":1483,"length":26} + >console.log(primarySkillA) + >:=> (line 47, col 4) to (line 47, col 30) +-------------------------------- +49 >for ([numberB = -1] of robots) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1513 to 1531) SpanInfo: {"start":1519,"length":12} + >numberB = -1 + >:=> (line 49, col 6) to (line 49, col 18) +49 >for ([numberB = -1] of robots) { + + ~~~~~~~~~~~~~~ => Pos: (1532 to 1545) SpanInfo: {"start":1536,"length":6} + >robots + >:=> (line 49, col 23) to (line 49, col 29) +-------------------------------- +50 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1546 to 1571) SpanInfo: {"start":1550,"length":20} + >console.log(numberB) + >:=> (line 50, col 4) to (line 50, col 24) +-------------------------------- +51 >} + + ~~ => Pos: (1572 to 1573) SpanInfo: {"start":1550,"length":20} + >console.log(numberB) + >:=> (line 50, col 4) to (line 50, col 24) +-------------------------------- +52 >for ([numberB = -1] of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1574 to 1592) SpanInfo: {"start":1580,"length":12} + >numberB = -1 + >:=> (line 52, col 6) to (line 52, col 18) +52 >for ([numberB = -1] of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1593 to 1611) SpanInfo: {"start":1597,"length":11} + >getRobots() + >:=> (line 52, col 23) to (line 52, col 34) +-------------------------------- +53 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1612 to 1637) SpanInfo: {"start":1616,"length":20} + >console.log(numberB) + >:=> (line 53, col 4) to (line 53, col 24) +-------------------------------- +54 >} + + ~~ => Pos: (1638 to 1639) SpanInfo: {"start":1616,"length":20} + >console.log(numberB) + >:=> (line 53, col 4) to (line 53, col 24) +-------------------------------- +55 >for ([numberB = -1] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1640 to 1658) SpanInfo: {"start":1646,"length":12} + >numberB = -1 + >:=> (line 55, col 6) to (line 55, col 18) +55 >for ([numberB = -1] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1659 to 1682) SpanInfo: {"start":1663,"length":16} + >[robotA, robotB] + >:=> (line 55, col 23) to (line 55, col 39) +-------------------------------- +56 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1683 to 1708) SpanInfo: {"start":1687,"length":20} + >console.log(numberB) + >:=> (line 56, col 4) to (line 56, col 24) +-------------------------------- +57 >} + + ~~ => Pos: (1709 to 1710) SpanInfo: {"start":1687,"length":20} + >console.log(numberB) + >:=> (line 56, col 4) to (line 56, col 24) +-------------------------------- +58 >for ([nameB = "noName"] of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1711 to 1733) SpanInfo: {"start":1717,"length":16} + >nameB = "noName" + >:=> (line 58, col 6) to (line 58, col 22) +58 >for ([nameB = "noName"] of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1734 to 1752) SpanInfo: {"start":1738,"length":11} + >multiRobots + >:=> (line 58, col 27) to (line 58, col 38) +-------------------------------- +59 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1753 to 1776) SpanInfo: {"start":1757,"length":18} + >console.log(nameB) + >:=> (line 59, col 4) to (line 59, col 22) +-------------------------------- +60 >} + + ~~ => Pos: (1777 to 1778) SpanInfo: {"start":1757,"length":18} + >console.log(nameB) + >:=> (line 59, col 4) to (line 59, col 22) +-------------------------------- +61 >for ([nameB = "noName"] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1779 to 1801) SpanInfo: {"start":1785,"length":16} + >nameB = "noName" + >:=> (line 61, col 6) to (line 61, col 22) +61 >for ([nameB = "noName"] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1802 to 1825) SpanInfo: {"start":1806,"length":16} + >getMultiRobots() + >:=> (line 61, col 27) to (line 61, col 43) +-------------------------------- +62 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1826 to 1849) SpanInfo: {"start":1830,"length":18} + >console.log(nameB) + >:=> (line 62, col 4) to (line 62, col 22) +-------------------------------- +63 >} + + ~~ => Pos: (1850 to 1851) SpanInfo: {"start":1830,"length":18} + >console.log(nameB) + >:=> (line 62, col 4) to (line 62, col 22) +-------------------------------- +64 >for ([nameB = "noName"] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1852 to 1874) SpanInfo: {"start":1858,"length":16} + >nameB = "noName" + >:=> (line 64, col 6) to (line 64, col 22) +64 >for ([nameB = "noName"] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1875 to 1908) SpanInfo: {"start":1879,"length":26} + >[multiRobotA, multiRobotB] + >:=> (line 64, col 27) to (line 64, col 53) +-------------------------------- +65 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1909 to 1932) SpanInfo: {"start":1913,"length":18} + >console.log(nameB) + >:=> (line 65, col 4) to (line 65, col 22) +-------------------------------- +66 >} + + ~~ => Pos: (1933 to 1934) SpanInfo: {"start":1913,"length":18} + >console.log(nameB) + >:=> (line 65, col 4) to (line 65, col 22) +-------------------------------- +67 >for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (1935 to 1954) SpanInfo: {"start":1941,"length":13} + >numberA2 = -1 + >:=> (line 67, col 6) to (line 67, col 19) +67 >for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1955 to 1973) SpanInfo: {"start":1956,"length":17} + >nameA2 = "noName" + >:=> (line 67, col 21) to (line 67, col 38) +67 >for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (1974 to 1992) SpanInfo: {"start":1975,"length":17} + >skillA2 = "skill" + >:=> (line 67, col 40) to (line 67, col 57) +67 >for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { + + ~~~~~~~~~~~~~~=> Pos: (1993 to 2006) SpanInfo: {"start":1997,"length":6} + >robots + >:=> (line 67, col 62) to (line 67, col 68) +-------------------------------- +68 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2007 to 2031) SpanInfo: {"start":2011,"length":19} + >console.log(nameA2) + >:=> (line 68, col 4) to (line 68, col 23) +-------------------------------- +69 >} + + ~~ => Pos: (2032 to 2033) SpanInfo: {"start":2011,"length":19} + >console.log(nameA2) + >:=> (line 68, col 4) to (line 68, col 23) +-------------------------------- +70 >for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (2034 to 2053) SpanInfo: {"start":2040,"length":13} + >numberA2 = -1 + >:=> (line 70, col 6) to (line 70, col 19) +70 >for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (2054 to 2072) SpanInfo: {"start":2055,"length":17} + >nameA2 = "noName" + >:=> (line 70, col 21) to (line 70, col 38) +70 >for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (2073 to 2091) SpanInfo: {"start":2074,"length":17} + >skillA2 = "skill" + >:=> (line 70, col 40) to (line 70, col 57) +70 >for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (2092 to 2110) SpanInfo: {"start":2096,"length":11} + >getRobots() + >:=> (line 70, col 62) to (line 70, col 73) +-------------------------------- +71 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2111 to 2135) SpanInfo: {"start":2115,"length":19} + >console.log(nameA2) + >:=> (line 71, col 4) to (line 71, col 23) +-------------------------------- +72 >} + + ~~ => Pos: (2136 to 2137) SpanInfo: {"start":2115,"length":19} + >console.log(nameA2) + >:=> (line 71, col 4) to (line 71, col 23) +-------------------------------- +73 >for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (2138 to 2157) SpanInfo: {"start":2144,"length":13} + >numberA2 = -1 + >:=> (line 73, col 6) to (line 73, col 19) +73 >for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (2158 to 2176) SpanInfo: {"start":2159,"length":17} + >nameA2 = "noName" + >:=> (line 73, col 21) to (line 73, col 38) +73 >for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (2177 to 2195) SpanInfo: {"start":2178,"length":17} + >skillA2 = "skill" + >:=> (line 73, col 40) to (line 73, col 57) +73 >for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2196 to 2219) SpanInfo: {"start":2200,"length":16} + >[robotA, robotB] + >:=> (line 73, col 62) to (line 73, col 78) +-------------------------------- +74 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2220 to 2244) SpanInfo: {"start":2224,"length":19} + >console.log(nameA2) + >:=> (line 74, col 4) to (line 74, col 23) +-------------------------------- +75 >} + + ~~ => Pos: (2245 to 2246) SpanInfo: {"start":2224,"length":19} + >console.log(nameA2) + >:=> (line 74, col 4) to (line 74, col 23) +-------------------------------- +76 >for ([nameMA = "noName", [ + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2247 to 2270) SpanInfo: {"start":2253,"length":17} + >nameMA = "noName" + >:=> (line 76, col 6) to (line 76, col 23) +76 >for ([nameMA = "noName", [ + + ~~~ => Pos: (2271 to 2273) SpanInfo: {"start":2278,"length":25} + >primarySkillA = "primary" + >:=> (line 77, col 4) to (line 77, col 29) +-------------------------------- +77 > primarySkillA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2274 to 2304) SpanInfo: {"start":2278,"length":25} + >primarySkillA = "primary" + >:=> (line 77, col 4) to (line 77, col 29) +-------------------------------- +78 > secondarySkillA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2305 to 2338) SpanInfo: {"start":2309,"length":29} + >secondarySkillA = "secondary" + >:=> (line 78, col 4) to (line 78, col 33) +-------------------------------- +79 >] = ["skill1", "skill2"]] of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2339 to 2362) SpanInfo: {"start":2309,"length":29} + >secondarySkillA = "secondary" + >:=> (line 78, col 4) to (line 78, col 33) +79 >] = ["skill1", "skill2"]] of multiRobots) { + + ~ => Pos: (2363 to 2363) SpanInfo: {"start":2272,"length":91} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"] + >:=> (line 76, col 25) to (line 79, col 24) +79 >] = ["skill1", "skill2"]] of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (2364 to 2382) SpanInfo: {"start":2368,"length":11} + >multiRobots + >:=> (line 79, col 29) to (line 79, col 40) +-------------------------------- +80 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2383 to 2407) SpanInfo: {"start":2387,"length":19} + >console.log(nameMA) + >:=> (line 80, col 4) to (line 80, col 23) +-------------------------------- +81 >} + + ~~ => Pos: (2408 to 2409) SpanInfo: {"start":2387,"length":19} + >console.log(nameMA) + >:=> (line 80, col 4) to (line 80, col 23) +-------------------------------- +82 >for ([nameMA = "noName", [ + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2410 to 2433) SpanInfo: {"start":2416,"length":17} + >nameMA = "noName" + >:=> (line 82, col 6) to (line 82, col 23) +82 >for ([nameMA = "noName", [ + + ~~~ => Pos: (2434 to 2436) SpanInfo: {"start":2441,"length":25} + >primarySkillA = "primary" + >:=> (line 83, col 4) to (line 83, col 29) +-------------------------------- +83 > primarySkillA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2437 to 2467) SpanInfo: {"start":2441,"length":25} + >primarySkillA = "primary" + >:=> (line 83, col 4) to (line 83, col 29) +-------------------------------- +84 > secondarySkillA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2468 to 2501) SpanInfo: {"start":2472,"length":29} + >secondarySkillA = "secondary" + >:=> (line 84, col 4) to (line 84, col 33) +-------------------------------- +85 >] = ["skill1", "skill2"]] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2502 to 2525) SpanInfo: {"start":2472,"length":29} + >secondarySkillA = "secondary" + >:=> (line 84, col 4) to (line 84, col 33) +85 >] = ["skill1", "skill2"]] of getMultiRobots()) { + + ~ => Pos: (2526 to 2526) SpanInfo: {"start":2435,"length":91} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"] + >:=> (line 82, col 25) to (line 85, col 24) +85 >] = ["skill1", "skill2"]] of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2527 to 2550) SpanInfo: {"start":2531,"length":16} + >getMultiRobots() + >:=> (line 85, col 29) to (line 85, col 45) +-------------------------------- +86 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2551 to 2575) SpanInfo: {"start":2555,"length":19} + >console.log(nameMA) + >:=> (line 86, col 4) to (line 86, col 23) +-------------------------------- +87 >} + + ~~ => Pos: (2576 to 2577) SpanInfo: {"start":2555,"length":19} + >console.log(nameMA) + >:=> (line 86, col 4) to (line 86, col 23) +-------------------------------- +88 >for ([nameMA = "noName", [ + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2578 to 2601) SpanInfo: {"start":2584,"length":17} + >nameMA = "noName" + >:=> (line 88, col 6) to (line 88, col 23) +88 >for ([nameMA = "noName", [ + + ~~~ => Pos: (2602 to 2604) SpanInfo: {"start":2609,"length":25} + >primarySkillA = "primary" + >:=> (line 89, col 4) to (line 89, col 29) +-------------------------------- +89 > primarySkillA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2605 to 2635) SpanInfo: {"start":2609,"length":25} + >primarySkillA = "primary" + >:=> (line 89, col 4) to (line 89, col 29) +-------------------------------- +90 > secondarySkillA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2636 to 2669) SpanInfo: {"start":2640,"length":29} + >secondarySkillA = "secondary" + >:=> (line 90, col 4) to (line 90, col 33) +-------------------------------- +91 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2670 to 2693) SpanInfo: {"start":2640,"length":29} + >secondarySkillA = "secondary" + >:=> (line 90, col 4) to (line 90, col 33) +91 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { + + ~ => Pos: (2694 to 2694) SpanInfo: {"start":2603,"length":91} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["skill1", "skill2"] + >:=> (line 88, col 25) to (line 91, col 24) +91 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2695 to 2728) SpanInfo: {"start":2699,"length":26} + >[multiRobotA, multiRobotB] + >:=> (line 91, col 29) to (line 91, col 55) +-------------------------------- +92 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2729 to 2753) SpanInfo: {"start":2733,"length":19} + >console.log(nameMA) + >:=> (line 92, col 4) to (line 92, col 23) +-------------------------------- +93 >} + + ~~ => Pos: (2754 to 2755) SpanInfo: {"start":2733,"length":19} + >console.log(nameMA) + >:=> (line 92, col 4) to (line 92, col 23) +-------------------------------- +94 >for ([numberA3 = -1, ...robotAInfo] of robots) { + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (2756 to 2775) SpanInfo: {"start":2762,"length":13} + >numberA3 = -1 + >:=> (line 94, col 6) to (line 94, col 19) +94 >for ([numberA3 = -1, ...robotAInfo] of robots) { + + ~~~~~~~~~~~~~~~ => Pos: (2776 to 2790) SpanInfo: {"start":2777,"length":13} + >...robotAInfo + >:=> (line 94, col 21) to (line 94, col 34) +94 >for ([numberA3 = -1, ...robotAInfo] of robots) { + + ~~~~~~~~~~~~~~=> Pos: (2791 to 2804) SpanInfo: {"start":2795,"length":6} + >robots + >:=> (line 94, col 39) to (line 94, col 45) +-------------------------------- +95 > console.log(numberA3); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2805 to 2831) SpanInfo: {"start":2809,"length":21} + >console.log(numberA3) + >:=> (line 95, col 4) to (line 95, col 25) +-------------------------------- +96 >} + + ~~ => Pos: (2832 to 2833) SpanInfo: {"start":2809,"length":21} + >console.log(numberA3) + >:=> (line 95, col 4) to (line 95, col 25) +-------------------------------- +97 >for ([numberA3 = -1, ...robotAInfo] of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (2834 to 2853) SpanInfo: {"start":2840,"length":13} + >numberA3 = -1 + >:=> (line 97, col 6) to (line 97, col 19) +97 >for ([numberA3 = -1, ...robotAInfo] of getRobots()) { + + ~~~~~~~~~~~~~~~ => Pos: (2854 to 2868) SpanInfo: {"start":2855,"length":13} + >...robotAInfo + >:=> (line 97, col 21) to (line 97, col 34) +97 >for ([numberA3 = -1, ...robotAInfo] of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (2869 to 2887) SpanInfo: {"start":2873,"length":11} + >getRobots() + >:=> (line 97, col 39) to (line 97, col 50) +-------------------------------- +98 > console.log(numberA3); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2888 to 2914) SpanInfo: {"start":2892,"length":21} + >console.log(numberA3) + >:=> (line 98, col 4) to (line 98, col 25) +-------------------------------- +99 >} + + ~~ => Pos: (2915 to 2916) SpanInfo: {"start":2892,"length":21} + >console.log(numberA3) + >:=> (line 98, col 4) to (line 98, col 25) +-------------------------------- +100>for ([numberA3 = -1, ...robotAInfo] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (2917 to 2936) SpanInfo: {"start":2923,"length":13} + >numberA3 = -1 + >:=> (line 100, col 6) to (line 100, col 19) +100>for ([numberA3 = -1, ...robotAInfo] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~ => Pos: (2937 to 2951) SpanInfo: {"start":2938,"length":13} + >...robotAInfo + >:=> (line 100, col 21) to (line 100, col 34) +100>for ([numberA3 = -1, ...robotAInfo] of [robotA, robotB]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2952 to 2975) SpanInfo: {"start":2956,"length":16} + >[robotA, robotB] + >:=> (line 100, col 39) to (line 100, col 55) +-------------------------------- +101> console.log(numberA3); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2976 to 3002) SpanInfo: {"start":2980,"length":21} + >console.log(numberA3) + >:=> (line 101, col 4) to (line 101, col 25) +-------------------------------- +102>} + ~ => Pos: (3003 to 3003) SpanInfo: {"start":2980,"length":21} + >console.log(numberA3) + >:=> (line 101, col 4) to (line 101, col 25) \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringAssignmentForOfArrayBindingPattern.ts b/tests/cases/fourslash/breakpointValidationDestructuringAssignmentForOfArrayBindingPattern.ts new file mode 100644 index 00000000000..5c30799813b --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringAssignmentForOfArrayBindingPattern.ts @@ -0,0 +1,95 @@ +/// +////declare var console: { +//// log(msg: any): void; +////} +////type Robot = [number, string, string]; +////type MultiSkilledRobot = [string, [string, string]]; +////let robotA: Robot = [1, "mower", "mowing"]; +////let robotB: Robot = [2, "trimmer", "trimming"]; +////let robots = [robotA, robotB]; +////function getRobots() { +//// return robots; +////} +////let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +////let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +////let multiRobots = [multiRobotA, multiRobotB]; +////function getMultiRobots() { +//// return multiRobots; +////} +////let nameA: string, primarySkillA: string, secondarySkillA: string; +////let numberB: number, nameB: string; +////let numberA2: number, nameA2: string, skillA2: string, nameMA: string; +////let numberA3: number, robotAInfo: (number | string)[], multiRobotAInfo: (string | [string, string])[]; +////for ([, nameA] of robots) { +//// console.log(nameA); +////} +////for ([, nameA] of getRobots()) { +//// console.log(nameA); +////} +////for ([, nameA] of [robotA, robotB]) { +//// console.log(nameA); +////} +////for ([, [primarySkillA, secondarySkillA]] of multiRobots) { +//// console.log(primarySkillA); +////} +////for ([, [primarySkillA, secondarySkillA]] of getMultiRobots()) { +//// console.log(primarySkillA); +////} +////for ([, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { +//// console.log(primarySkillA); +////} +////for ([numberB] of robots) { +//// console.log(numberB); +////} +////for ([numberB] of getRobots()) { +//// console.log(numberB); +////} +////for ([numberB] of [robotA, robotB]) { +//// console.log(numberB); +////} +////for ([nameB] of multiRobots) { +//// console.log(nameB); +////} +////for ([nameB] of getMultiRobots()) { +//// console.log(nameB); +////} +////for ([nameB] of [multiRobotA, multiRobotB]) { +//// console.log(nameB); +////} +////for ([numberA2, nameA2, skillA2] of robots) { +//// console.log(nameA2); +////} +////for ([numberA2, nameA2, skillA2] of getRobots()) { +//// console.log(nameA2); +////} +////for ([numberA2, nameA2, skillA2] of [robotA, robotB]) { +//// console.log(nameA2); +////} +////for ([nameMA, [primarySkillA, secondarySkillA]] of multiRobots) { +//// console.log(nameMA); +////} +////for ([nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) { +//// console.log(nameMA); +////} +////for ([nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) { +//// console.log(nameMA); +////} +////for ([numberA3, ...robotAInfo] of robots) { +//// console.log(numberA3); +////} +////for ([numberA3, ...robotAInfo] of getRobots()) { +//// console.log(numberA3); +////} +////for ([numberA3, ...robotAInfo] of [robotA, robotB]) { +//// console.log(numberA3); +////} +////for ([...multiRobotAInfo] of multiRobots) { +//// console.log(multiRobotAInfo); +////} +////for ([...multiRobotAInfo] of getMultiRobots()) { +//// console.log(multiRobotAInfo); +////} +////for ([...multiRobotAInfo] of [multiRobotA, multiRobotB]) { +//// console.log(multiRobotAInfo); +////} +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringAssignmentForOfArrayBindingPatternDefaultValues.ts b/tests/cases/fourslash/breakpointValidationDestructuringAssignmentForOfArrayBindingPatternDefaultValues.ts new file mode 100644 index 00000000000..8942987c468 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringAssignmentForOfArrayBindingPatternDefaultValues.ts @@ -0,0 +1,104 @@ +/// +////declare var console: { +//// log(msg: any): void; +////} +////type Robot = [number, string, string]; +////type MultiSkilledRobot = [string, [string, string]]; +////let robotA: Robot = [1, "mower", "mowing"]; +////let robotB: Robot = [2, "trimmer", "trimming"]; +////let robots = [robotA, robotB]; +////function getRobots() { +//// return robots; +////} +////let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +////let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +////let multiRobots = [multiRobotA, multiRobotB]; +////function getMultiRobots() { +//// return multiRobots; +////} +////let nameA: string, primarySkillA: string, secondarySkillA: string; +////let numberB: number, nameB: string; +////let numberA2: number, nameA2: string, skillA2: string, nameMA: string; +////let numberA3: number, robotAInfo: (number | string)[], multiRobotAInfo: (string | [string, string])[]; +////for ([, nameA = "noName"] of robots) { +//// console.log(nameA); +////} +////for ([, nameA = "noName"] of getRobots()) { +//// console.log(nameA); +////} +////for ([, nameA = "noName"] of [robotA, robotB]) { +//// console.log(nameA); +////} +////for ([, [ +//// primarySkillA = "primary", +//// secondarySkillA = "secondary" +////] = ["skill1", "skill2"]] of multiRobots) { +//// console.log(primarySkillA); +////} +////for ([, [ +//// primarySkillA = "primary", +//// secondarySkillA = "secondary" +////] = ["skill1", "skill2"]] of getMultiRobots()) { +//// console.log(primarySkillA); +////} +////for ([, [ +//// primarySkillA = "primary", +//// secondarySkillA = "secondary" +////] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { +//// console.log(primarySkillA); +////} +////for ([numberB = -1] of robots) { +//// console.log(numberB); +////} +////for ([numberB = -1] of getRobots()) { +//// console.log(numberB); +////} +////for ([numberB = -1] of [robotA, robotB]) { +//// console.log(numberB); +////} +////for ([nameB = "noName"] of multiRobots) { +//// console.log(nameB); +////} +////for ([nameB = "noName"] of getMultiRobots()) { +//// console.log(nameB); +////} +////for ([nameB = "noName"] of [multiRobotA, multiRobotB]) { +//// console.log(nameB); +////} +////for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) { +//// console.log(nameA2); +////} +////for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) { +//// console.log(nameA2); +////} +////for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) { +//// console.log(nameA2); +////} +////for ([nameMA = "noName", [ +//// primarySkillA = "primary", +//// secondarySkillA = "secondary" +////] = ["skill1", "skill2"]] of multiRobots) { +//// console.log(nameMA); +////} +////for ([nameMA = "noName", [ +//// primarySkillA = "primary", +//// secondarySkillA = "secondary" +////] = ["skill1", "skill2"]] of getMultiRobots()) { +//// console.log(nameMA); +////} +////for ([nameMA = "noName", [ +//// primarySkillA = "primary", +//// secondarySkillA = "secondary" +////] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) { +//// console.log(nameMA); +////} +////for ([numberA3 = -1, ...robotAInfo] of robots) { +//// console.log(numberA3); +////} +////for ([numberA3 = -1, ...robotAInfo] of getRobots()) { +//// console.log(numberA3); +////} +////for ([numberA3 = -1, ...robotAInfo] of [robotA, robotB]) { +//// console.log(numberA3); +////} +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file From db0ab402802ea84846281d5c17fc5248f3da7138 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 22 Dec 2015 15:31:02 -0800 Subject: [PATCH 083/209] Test cases for object binding pattern destructuring assignment --- ...turingAssignmentForObjectBindingPattern.ts | 107 +++++++++++ ...entForObjectBindingPatternDefaultValues.ts | 168 ++++++++++++++++++ 2 files changed, 275 insertions(+) create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringAssignmentForObjectBindingPattern.ts create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringAssignmentForObjectBindingPatternDefaultValues.ts diff --git a/tests/cases/fourslash/breakpointValidationDestructuringAssignmentForObjectBindingPattern.ts b/tests/cases/fourslash/breakpointValidationDestructuringAssignmentForObjectBindingPattern.ts new file mode 100644 index 00000000000..298fb2f9580 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringAssignmentForObjectBindingPattern.ts @@ -0,0 +1,107 @@ +/// + +////declare var console: { +//// log(msg: any): void; +////} +////interface Robot { +//// name: string; +//// skill: string; +////} +////interface MultiRobot { +//// name: string; +//// skills: { +//// primary: string; +//// secondary: string; +//// }; +////} +////let robot: Robot = { name: "mower", skill: "mowing" }; +////let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +////function getRobot() { +//// return robot; +////} +////function getMultiRobot() { +//// return multiRobot; +////} +////let nameA: string, primaryA: string, secondaryA: string, i: number, skillA: string; +////let name: string, primary: string, secondary: string, skill: string; +////for ({ name: nameA } = robot, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ({ name: nameA } = getRobot(), i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ({ name: nameA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ({ skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for ({ skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for ({ skills: { primary: primaryA, secondary: secondaryA } } = +//// { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +//// i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for ({ name } = robot, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ({ name } = getRobot(), i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ({ name } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ({ skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for ({ skills: { primary, secondary } } = getMultiRobot(), i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for ({ skills: { primary, secondary } } = +//// { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +//// i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for ({ name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ({ name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ({ name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = +//// { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +//// i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for ({ name, skill } = robot, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ({ name, skill } = getRobot(), i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ({ name, skill } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ({ name, skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for ({ name, skills: { primary, secondary } } = getMultiRobot(), i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for ({ name, skills: { primary, secondary } } = +//// { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +//// i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringAssignmentForObjectBindingPatternDefaultValues.ts b/tests/cases/fourslash/breakpointValidationDestructuringAssignmentForObjectBindingPatternDefaultValues.ts new file mode 100644 index 00000000000..161b58c91c2 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringAssignmentForObjectBindingPatternDefaultValues.ts @@ -0,0 +1,168 @@ +/// +////declare var console: { +//// log(msg: any): void; +////} +////interface Robot { +//// name: string; +//// skill: string; +////} +////interface MultiRobot { +//// name: string; +//// skills: { +//// primary?: string; +//// secondary?: string; +//// }; +////} +////let robot: Robot = { name: "mower", skill: "mowing" }; +////let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +////function getRobot() { +//// return robot; +////} +////function getMultiRobot() { +//// return multiRobot; +////} +////let nameA: string, primaryA: string, secondaryA: string, i: number, skillA: string; +////let name: string, primary: string, secondary: string, skill: string; +////for ({name: nameA = "noName" } = robot, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ({name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ({name: nameA = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ({ +//// skills: { +//// primary: primaryA = "primary", +//// secondary: secondaryA = "secondary" +//// } = { primary: "none", secondary: "none" } +////} = multiRobot, i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for ({ +//// skills: { +//// primary: primaryA = "primary", +//// secondary: secondaryA = "secondary" +//// } = { primary: "none", secondary: "none" } +////} = getMultiRobot(), i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for ({ +//// skills: { +//// primary: primaryA = "primary", +//// secondary: secondaryA = "secondary" +//// } = { primary: "none", secondary: "none" } +////} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +//// i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for ({ name = "noName" } = robot, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ({ name = "noName" } = getRobot(), i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ({ name = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ({ +//// skills: { +//// primary = "primary", +//// secondary = "secondary" +//// } = { primary: "none", secondary: "none" } +////} = multiRobot, i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for ({ +//// skills: { +//// primary = "primary", +//// secondary = "secondary" +//// } = { primary: "none", secondary: "none" } +////} = getMultiRobot(), i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for ({ +//// skills: { +//// primary = "primary", +//// secondary = "secondary" +//// } = { primary: "none", secondary: "none" } +////} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +//// i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for ({name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ({name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ({name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ({ +//// name: nameA = "noName", +//// skills: { +//// primary: primaryA = "primary", +//// secondary: secondaryA = "secondary" +//// } = { primary: "none", secondary: "none" } +////} = multiRobot, i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for ({ +//// name: nameA = "noName", +//// skills: { +//// primary: primaryA = "primary", +//// secondary: secondaryA = "secondary" +//// } = { primary: "none", secondary: "none" } +////} = getMultiRobot(), i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for ({ +//// name: nameA = "noName", +//// skills: { +//// primary: primaryA = "primary", +//// secondary: secondaryA = "secondary" +//// } = { primary: "none", secondary: "none" } +////} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +//// i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for ({ name = "noName", skill = "skill" } = robot, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ({ name = "noName", skill = "skill" } = getRobot(), i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ({ name = "noName", skill = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +//// console.log(nameA); +////} +////for ({ +//// name = "noName", +//// skills: { +//// primary = "primary", +//// secondary = "secondary" +//// } = { primary: "none", secondary: "none" } +////} = multiRobot, i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for ({ +//// name = "noName", +//// skills: { +//// primary = "primary", +//// secondary = "secondary" +//// } = { primary: "none", secondary: "none" } +////} = getMultiRobot(), i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +////for ({ +//// name = "noName", +//// skills: { +//// primary = "primary", +//// secondary = "secondary" +//// } = { primary: "none", secondary: "none" } +////} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +//// i = 0; i < 1; i++) { +//// console.log(primaryA); +////} +verify.baselineCurrentFileBreakpointLocations(); From 631363fee19414f4d4cb136f8bf85e8aa061561e Mon Sep 17 00:00:00 2001 From: Zhengbo Li Date: Tue, 22 Dec 2015 15:38:52 -0800 Subject: [PATCH 084/209] Fix lint issues --- src/compiler/sys.ts | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 4056ffd9da9..afac095a56e 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -33,7 +33,7 @@ namespace ts { export interface FileWatcher { close(): void; } - + export interface DirWatcher extends FileWatcher { referenceCount: number; } @@ -320,16 +320,17 @@ namespace ts { const { watcher, isRecursive } = addDirWatcher(dirPath, recursive); return { close: () => reduceDirWatcherRefCount(watcher, dirPath, isRecursive) - } + }; } - + function reduceDirWatcherRefCount(watcher: DirWatcher, dirPath: Path, isRecursive: boolean) { watcher.referenceCount -= 1; if (watcher.referenceCount <= 0) { watcher.close(); if (isRecursive) { recursiveDirWatchers.remove(dirPath); - } else { + } + else { dirWatchers.remove(dirPath); } } @@ -337,19 +338,20 @@ namespace ts { function addDirWatcher(dirPath: Path, recursive?: boolean): { watcher: DirWatcher, isRecursive: boolean } { let watchers: FileMap; - let options: { persistent: boolean, recursive?: boolean } = { persistent: true }; + const options: { persistent: boolean, recursive?: boolean } = { persistent: true }; // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows // (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643) if (isNode4OrLater() && recursive === true) { if (recursiveDirWatchers.contains(dirPath)) { - const watcher = recursiveDirWatchers.get(dirPath); + const watcher = recursiveDirWatchers.get(dirPath); watcher.referenceCount += 1; return { watcher, isRecursive: true }; } watchers = recursiveDirWatchers; options.recursive = true; - } else { + } + else { if (dirWatchers.contains(dirPath)) { const watcher = dirWatchers.get(dirPath); watcher.referenceCount += 1; @@ -391,7 +393,8 @@ namespace ts { const { watcher } = findDirWatcherForFile(filePath); if (!watcher) { addDirWatcher(getDirectoryPath(filePath)); - } else { + } + else { watcher.referenceCount += 1; } fileWatcherCallbacks.set(filePath, callback); From ff00a0c779cf57b44d418196f50189e2acb07f62 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 22 Dec 2015 16:14:24 -0800 Subject: [PATCH 085/209] Fix breakpoints in object literal pattern destructuring assignment --- src/services/breakpoints.ts | 22 +- src/services/utilities.ts | 4 +- ...AssignmentForObjectBindingPattern.baseline | 1171 +++++++++++++ ...ObjectBindingPatternDefaultValues.baseline | 1483 +++++++++++++++++ 4 files changed, 2673 insertions(+), 7 deletions(-) create mode 100644 tests/baselines/reference/bpSpanDestructuringAssignmentForObjectBindingPattern.baseline create mode 100644 tests/baselines/reference/bpSpanDestructuringAssignmentForObjectBindingPatternDefaultValues.baseline diff --git a/src/services/breakpoints.ts b/src/services/breakpoints.ts index bc3d7a75674..b7e909f69d8 100644 --- a/src/services/breakpoints.ts +++ b/src/services/breakpoints.ts @@ -261,9 +261,12 @@ namespace ts.BreakpointResolver { } // Set breakpoint on identifier element of destructuring pattern - // a or ...c from - // [a, b, ...c] or { a, b } from destructuring pattern - if ((node.kind === SyntaxKind.Identifier || node.kind == SyntaxKind.SpreadElementExpression) && + // a or ...c or d: x from + // [a, b, ...c] or { a, b } or { d: x } from destructuring pattern + if ((node.kind === SyntaxKind.Identifier || + node.kind == SyntaxKind.SpreadElementExpression || + node.kind === SyntaxKind.PropertyAssignment || + node.kind === SyntaxKind.ShorthandPropertyAssignment) && isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) { return textSpan(node); } @@ -322,12 +325,14 @@ namespace ts.BreakpointResolver { break; } } - + // If this is name of property assignment, set breakpoint in the initializer - if (node.parent.kind === SyntaxKind.PropertyAssignment && (node.parent).name === node) { + if (node.parent.kind === SyntaxKind.PropertyAssignment && + (node.parent).name === node && + !isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.parent)) { return spanInNode((node.parent).initializer); } - + // Breakpoint in type assertion goes to its operand if (node.parent.kind === SyntaxKind.TypeAssertionExpression && (node.parent).type === node) { return spanInNextNode((node.parent).type); @@ -609,6 +614,11 @@ namespace ts.BreakpointResolver { // Default to parent node default: + if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) { + // Breakpoint in last binding element or binding pattern if it contains no elements + let objectLiteral = node.parent; + return textSpan(lastOrUndefined(objectLiteral.properties) || objectLiteral); + } return spanInNode(node.parent); } } diff --git a/src/services/utilities.ts b/src/services/utilities.ts index 63b1757efd7..afdc85fffd8 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -629,7 +629,9 @@ namespace ts { // [a, b, c] of // [x, [a, b, c] ] = someExpression - if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) { + // or + // {x, a: {a, b, c} } = someExpression + if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === SyntaxKind.PropertyAssignment ? node.parent.parent : node.parent)) { return true; } } diff --git a/tests/baselines/reference/bpSpanDestructuringAssignmentForObjectBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringAssignmentForObjectBindingPattern.baseline new file mode 100644 index 00000000000..c318d875ddf --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringAssignmentForObjectBindingPattern.baseline @@ -0,0 +1,1171 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: any): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (48 to 49) SpanInfo: undefined +-------------------------------- +4 >interface Robot { + + ~~~~~~~~~~~~~~~~~~ => Pos: (50 to 67) SpanInfo: undefined +-------------------------------- +5 > name: string; + + ~~~~~~~~~~~~~~~~~~ => Pos: (68 to 85) SpanInfo: undefined +-------------------------------- +6 > skill: string; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (86 to 104) SpanInfo: undefined +-------------------------------- +7 >} + + ~~ => Pos: (105 to 106) SpanInfo: undefined +-------------------------------- +8 >interface MultiRobot { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (107 to 129) SpanInfo: undefined +-------------------------------- +9 > name: string; + + ~~~~~~~~~~~~~~~~~~ => Pos: (130 to 147) SpanInfo: undefined +-------------------------------- +10 > skills: { + + ~~~~~~~~~~~~~~ => Pos: (148 to 161) SpanInfo: undefined +-------------------------------- +11 > primary: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (162 to 186) SpanInfo: undefined +-------------------------------- +12 > secondary: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (187 to 213) SpanInfo: undefined +-------------------------------- +13 > }; + + ~~~~~~~ => Pos: (214 to 220) SpanInfo: undefined +-------------------------------- +14 >} + + ~~ => Pos: (221 to 222) SpanInfo: undefined +-------------------------------- +15 >let robot: Robot = { name: "mower", skill: "mowing" }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (223 to 277) SpanInfo: {"start":223,"length":53} + >let robot: Robot = { name: "mower", skill: "mowing" } + >:=> (line 15, col 0) to (line 15, col 53) +-------------------------------- +16 >let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (278 to 375) SpanInfo: {"start":278,"length":96} + >let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } } + >:=> (line 16, col 0) to (line 16, col 96) +-------------------------------- +17 >function getRobot() { + + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (376 to 397) SpanInfo: {"start":402,"length":12} + >return robot + >:=> (line 18, col 4) to (line 18, col 16) +-------------------------------- +18 > return robot; + + ~~~~~~~~~~~~~~~~~~ => Pos: (398 to 415) SpanInfo: {"start":402,"length":12} + >return robot + >:=> (line 18, col 4) to (line 18, col 16) +-------------------------------- +19 >} + + ~~ => Pos: (416 to 417) SpanInfo: {"start":416,"length":1} + >} + >:=> (line 19, col 0) to (line 19, col 1) +-------------------------------- +20 >function getMultiRobot() { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (418 to 444) SpanInfo: {"start":449,"length":17} + >return multiRobot + >:=> (line 21, col 4) to (line 21, col 21) +-------------------------------- +21 > return multiRobot; + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (445 to 467) SpanInfo: {"start":449,"length":17} + >return multiRobot + >:=> (line 21, col 4) to (line 21, col 21) +-------------------------------- +22 >} + + ~~ => Pos: (468 to 469) SpanInfo: {"start":468,"length":1} + >} + >:=> (line 22, col 0) to (line 22, col 1) +-------------------------------- +23 >let nameA: string, primaryA: string, secondaryA: string, i: number, skillA: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (470 to 553) SpanInfo: undefined +-------------------------------- +24 >let name: string, primary: string, secondary: string, skill: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (554 to 622) SpanInfo: undefined +-------------------------------- +25 >for ({ name: nameA } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (623 to 651) SpanInfo: {"start":630,"length":11} + >name: nameA + >:=> (line 25, col 7) to (line 25, col 18) +25 >for ({ name: nameA } = robot, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (652 to 658) SpanInfo: {"start":653,"length":5} + >i = 0 + >:=> (line 25, col 30) to (line 25, col 35) +25 >for ({ name: nameA } = robot, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (659 to 665) SpanInfo: {"start":660,"length":5} + >i < 1 + >:=> (line 25, col 37) to (line 25, col 42) +25 >for ({ name: nameA } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (666 to 673) SpanInfo: {"start":667,"length":3} + >i++ + >:=> (line 25, col 44) to (line 25, col 47) +-------------------------------- +26 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (674 to 697) SpanInfo: {"start":678,"length":18} + >console.log(nameA) + >:=> (line 26, col 4) to (line 26, col 22) +-------------------------------- +27 >} + + ~~ => Pos: (698 to 699) SpanInfo: {"start":678,"length":18} + >console.log(nameA) + >:=> (line 26, col 4) to (line 26, col 22) +-------------------------------- +28 >for ({ name: nameA } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (700 to 733) SpanInfo: {"start":707,"length":11} + >name: nameA + >:=> (line 28, col 7) to (line 28, col 18) +28 >for ({ name: nameA } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (734 to 740) SpanInfo: {"start":735,"length":5} + >i = 0 + >:=> (line 28, col 35) to (line 28, col 40) +28 >for ({ name: nameA } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (741 to 747) SpanInfo: {"start":742,"length":5} + >i < 1 + >:=> (line 28, col 42) to (line 28, col 47) +28 >for ({ name: nameA } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (748 to 755) SpanInfo: {"start":749,"length":3} + >i++ + >:=> (line 28, col 49) to (line 28, col 52) +-------------------------------- +29 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (756 to 779) SpanInfo: {"start":760,"length":18} + >console.log(nameA) + >:=> (line 29, col 4) to (line 29, col 22) +-------------------------------- +30 >} + + ~~ => Pos: (780 to 781) SpanInfo: {"start":760,"length":18} + >console.log(nameA) + >:=> (line 29, col 4) to (line 29, col 22) +-------------------------------- +31 >for ({ name: nameA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (782 to 850) SpanInfo: {"start":789,"length":11} + >name: nameA + >:=> (line 31, col 7) to (line 31, col 18) +31 >for ({ name: nameA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (851 to 857) SpanInfo: {"start":852,"length":5} + >i = 0 + >:=> (line 31, col 70) to (line 31, col 75) +31 >for ({ name: nameA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (858 to 864) SpanInfo: {"start":859,"length":5} + >i < 1 + >:=> (line 31, col 77) to (line 31, col 82) +31 >for ({ name: nameA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (865 to 872) SpanInfo: {"start":866,"length":3} + >i++ + >:=> (line 31, col 84) to (line 31, col 87) +-------------------------------- +32 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (873 to 896) SpanInfo: {"start":877,"length":18} + >console.log(nameA) + >:=> (line 32, col 4) to (line 32, col 22) +-------------------------------- +33 >} + + ~~ => Pos: (897 to 898) SpanInfo: {"start":877,"length":18} + >console.log(nameA) + >:=> (line 32, col 4) to (line 32, col 22) +-------------------------------- +34 >for ({ skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~ => Pos: (899 to 912) SpanInfo: {"start":906,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 34, col 7) to (line 34, col 59) +34 >for ({ skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (913 to 933) SpanInfo: {"start":916,"length":17} + >primary: primaryA + >:=> (line 34, col 17) to (line 34, col 34) +34 >for ({ skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (934 to 957) SpanInfo: {"start":935,"length":21} + >secondary: secondaryA + >:=> (line 34, col 36) to (line 34, col 57) +34 >for ({ skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~=> Pos: (958 to 973) SpanInfo: {"start":906,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 34, col 7) to (line 34, col 59) +34 >for ({ skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (974 to 980) SpanInfo: {"start":975,"length":5} + >i = 0 + >:=> (line 34, col 76) to (line 34, col 81) +34 >for ({ skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (981 to 987) SpanInfo: {"start":982,"length":5} + >i < 1 + >:=> (line 34, col 83) to (line 34, col 88) +34 >for ({ skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (988 to 995) SpanInfo: {"start":989,"length":3} + >i++ + >:=> (line 34, col 90) to (line 34, col 93) +-------------------------------- +35 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (996 to 1022) SpanInfo: {"start":1000,"length":21} + >console.log(primaryA) + >:=> (line 35, col 4) to (line 35, col 25) +-------------------------------- +36 >} + + ~~ => Pos: (1023 to 1024) SpanInfo: {"start":1000,"length":21} + >console.log(primaryA) + >:=> (line 35, col 4) to (line 35, col 25) +-------------------------------- +37 >for ({ skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~ => Pos: (1025 to 1038) SpanInfo: {"start":1032,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 37, col 7) to (line 37, col 59) +37 >for ({ skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (1039 to 1059) SpanInfo: {"start":1042,"length":17} + >primary: primaryA + >:=> (line 37, col 17) to (line 37, col 34) +37 >for ({ skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1060 to 1083) SpanInfo: {"start":1061,"length":21} + >secondary: secondaryA + >:=> (line 37, col 36) to (line 37, col 57) +37 >for ({ skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~=> Pos: (1084 to 1104) SpanInfo: {"start":1032,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 37, col 7) to (line 37, col 59) +37 >for ({ skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1105 to 1111) SpanInfo: {"start":1106,"length":5} + >i = 0 + >:=> (line 37, col 81) to (line 37, col 86) +37 >for ({ skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1112 to 1118) SpanInfo: {"start":1113,"length":5} + >i < 1 + >:=> (line 37, col 88) to (line 37, col 93) +37 >for ({ skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1119 to 1126) SpanInfo: {"start":1120,"length":3} + >i++ + >:=> (line 37, col 95) to (line 37, col 98) +-------------------------------- +38 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1127 to 1153) SpanInfo: {"start":1131,"length":21} + >console.log(primaryA) + >:=> (line 38, col 4) to (line 38, col 25) +-------------------------------- +39 >} + + ~~ => Pos: (1154 to 1155) SpanInfo: {"start":1131,"length":21} + >console.log(primaryA) + >:=> (line 38, col 4) to (line 38, col 25) +-------------------------------- +40 >for ({ skills: { primary: primaryA, secondary: secondaryA } } = + + ~~~~~~~~~~~~~~ => Pos: (1156 to 1169) SpanInfo: {"start":1163,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 40, col 7) to (line 40, col 59) +40 >for ({ skills: { primary: primaryA, secondary: secondaryA } } = + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (1170 to 1190) SpanInfo: {"start":1173,"length":17} + >primary: primaryA + >:=> (line 40, col 17) to (line 40, col 34) +40 >for ({ skills: { primary: primaryA, secondary: secondaryA } } = + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1191 to 1214) SpanInfo: {"start":1192,"length":21} + >secondary: secondaryA + >:=> (line 40, col 36) to (line 40, col 57) +40 >for ({ skills: { primary: primaryA, secondary: secondaryA } } = + + ~~~~~=> Pos: (1215 to 1219) SpanInfo: {"start":1163,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 40, col 7) to (line 40, col 59) +-------------------------------- +41 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1220 to 1310) SpanInfo: {"start":1163,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 40, col 7) to (line 40, col 59) +-------------------------------- +42 > i = 0; i < 1; i++) { + + ~~~~~~~~~~ => Pos: (1311 to 1320) SpanInfo: {"start":1315,"length":5} + >i = 0 + >:=> (line 42, col 4) to (line 42, col 9) +42 > i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1321 to 1327) SpanInfo: {"start":1322,"length":5} + >i < 1 + >:=> (line 42, col 11) to (line 42, col 16) +42 > i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (1328 to 1335) SpanInfo: {"start":1329,"length":3} + >i++ + >:=> (line 42, col 18) to (line 42, col 21) +-------------------------------- +43 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1336 to 1362) SpanInfo: {"start":1340,"length":21} + >console.log(primaryA) + >:=> (line 43, col 4) to (line 43, col 25) +-------------------------------- +44 >} + + ~~ => Pos: (1363 to 1364) SpanInfo: {"start":1340,"length":21} + >console.log(primaryA) + >:=> (line 43, col 4) to (line 43, col 25) +-------------------------------- +45 >for ({ name } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1365 to 1386) SpanInfo: {"start":1372,"length":4} + >name + >:=> (line 45, col 7) to (line 45, col 11) +45 >for ({ name } = robot, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1387 to 1393) SpanInfo: {"start":1388,"length":5} + >i = 0 + >:=> (line 45, col 23) to (line 45, col 28) +45 >for ({ name } = robot, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1394 to 1400) SpanInfo: {"start":1395,"length":5} + >i < 1 + >:=> (line 45, col 30) to (line 45, col 35) +45 >for ({ name } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (1401 to 1408) SpanInfo: {"start":1402,"length":3} + >i++ + >:=> (line 45, col 37) to (line 45, col 40) +-------------------------------- +46 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1409 to 1432) SpanInfo: {"start":1413,"length":18} + >console.log(nameA) + >:=> (line 46, col 4) to (line 46, col 22) +-------------------------------- +47 >} + + ~~ => Pos: (1433 to 1434) SpanInfo: {"start":1413,"length":18} + >console.log(nameA) + >:=> (line 46, col 4) to (line 46, col 22) +-------------------------------- +48 >for ({ name } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1435 to 1461) SpanInfo: {"start":1442,"length":4} + >name + >:=> (line 48, col 7) to (line 48, col 11) +48 >for ({ name } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1462 to 1468) SpanInfo: {"start":1463,"length":5} + >i = 0 + >:=> (line 48, col 28) to (line 48, col 33) +48 >for ({ name } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1469 to 1475) SpanInfo: {"start":1470,"length":5} + >i < 1 + >:=> (line 48, col 35) to (line 48, col 40) +48 >for ({ name } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1476 to 1483) SpanInfo: {"start":1477,"length":3} + >i++ + >:=> (line 48, col 42) to (line 48, col 45) +-------------------------------- +49 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1484 to 1507) SpanInfo: {"start":1488,"length":18} + >console.log(nameA) + >:=> (line 49, col 4) to (line 49, col 22) +-------------------------------- +50 >} + + ~~ => Pos: (1508 to 1509) SpanInfo: {"start":1488,"length":18} + >console.log(nameA) + >:=> (line 49, col 4) to (line 49, col 22) +-------------------------------- +51 >for ({ name } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1510 to 1571) SpanInfo: {"start":1517,"length":4} + >name + >:=> (line 51, col 7) to (line 51, col 11) +51 >for ({ name } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1572 to 1578) SpanInfo: {"start":1573,"length":5} + >i = 0 + >:=> (line 51, col 63) to (line 51, col 68) +51 >for ({ name } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1579 to 1585) SpanInfo: {"start":1580,"length":5} + >i < 1 + >:=> (line 51, col 70) to (line 51, col 75) +51 >for ({ name } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1586 to 1593) SpanInfo: {"start":1587,"length":3} + >i++ + >:=> (line 51, col 77) to (line 51, col 80) +-------------------------------- +52 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1594 to 1617) SpanInfo: {"start":1598,"length":18} + >console.log(nameA) + >:=> (line 52, col 4) to (line 52, col 22) +-------------------------------- +53 >} + + ~~ => Pos: (1618 to 1619) SpanInfo: {"start":1598,"length":18} + >console.log(nameA) + >:=> (line 52, col 4) to (line 52, col 22) +-------------------------------- +54 >for ({ skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~ => Pos: (1620 to 1633) SpanInfo: {"start":1627,"length":30} + >skills: { primary, secondary } + >:=> (line 54, col 7) to (line 54, col 37) +54 >for ({ skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~ => Pos: (1634 to 1644) SpanInfo: {"start":1637,"length":7} + >primary + >:=> (line 54, col 17) to (line 54, col 24) +54 >for ({ skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~ => Pos: (1645 to 1656) SpanInfo: {"start":1646,"length":9} + >secondary + >:=> (line 54, col 26) to (line 54, col 35) +54 >for ({ skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~=> Pos: (1657 to 1672) SpanInfo: {"start":1627,"length":30} + >skills: { primary, secondary } + >:=> (line 54, col 7) to (line 54, col 37) +54 >for ({ skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1673 to 1679) SpanInfo: {"start":1674,"length":5} + >i = 0 + >:=> (line 54, col 54) to (line 54, col 59) +54 >for ({ skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1680 to 1686) SpanInfo: {"start":1681,"length":5} + >i < 1 + >:=> (line 54, col 61) to (line 54, col 66) +54 >for ({ skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1687 to 1694) SpanInfo: {"start":1688,"length":3} + >i++ + >:=> (line 54, col 68) to (line 54, col 71) +-------------------------------- +55 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1695 to 1721) SpanInfo: {"start":1699,"length":21} + >console.log(primaryA) + >:=> (line 55, col 4) to (line 55, col 25) +-------------------------------- +56 >} + + ~~ => Pos: (1722 to 1723) SpanInfo: {"start":1699,"length":21} + >console.log(primaryA) + >:=> (line 55, col 4) to (line 55, col 25) +-------------------------------- +57 >for ({ skills: { primary, secondary } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~ => Pos: (1724 to 1737) SpanInfo: {"start":1731,"length":30} + >skills: { primary, secondary } + >:=> (line 57, col 7) to (line 57, col 37) +57 >for ({ skills: { primary, secondary } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~ => Pos: (1738 to 1748) SpanInfo: {"start":1741,"length":7} + >primary + >:=> (line 57, col 17) to (line 57, col 24) +57 >for ({ skills: { primary, secondary } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~ => Pos: (1749 to 1760) SpanInfo: {"start":1750,"length":9} + >secondary + >:=> (line 57, col 26) to (line 57, col 35) +57 >for ({ skills: { primary, secondary } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~=> Pos: (1761 to 1781) SpanInfo: {"start":1731,"length":30} + >skills: { primary, secondary } + >:=> (line 57, col 7) to (line 57, col 37) +57 >for ({ skills: { primary, secondary } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1782 to 1788) SpanInfo: {"start":1783,"length":5} + >i = 0 + >:=> (line 57, col 59) to (line 57, col 64) +57 >for ({ skills: { primary, secondary } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1789 to 1795) SpanInfo: {"start":1790,"length":5} + >i < 1 + >:=> (line 57, col 66) to (line 57, col 71) +57 >for ({ skills: { primary, secondary } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1796 to 1803) SpanInfo: {"start":1797,"length":3} + >i++ + >:=> (line 57, col 73) to (line 57, col 76) +-------------------------------- +58 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1804 to 1830) SpanInfo: {"start":1808,"length":21} + >console.log(primaryA) + >:=> (line 58, col 4) to (line 58, col 25) +-------------------------------- +59 >} + + ~~ => Pos: (1831 to 1832) SpanInfo: {"start":1808,"length":21} + >console.log(primaryA) + >:=> (line 58, col 4) to (line 58, col 25) +-------------------------------- +60 >for ({ skills: { primary, secondary } } = + + ~~~~~~~~~~~~~~ => Pos: (1833 to 1846) SpanInfo: {"start":1840,"length":30} + >skills: { primary, secondary } + >:=> (line 60, col 7) to (line 60, col 37) +60 >for ({ skills: { primary, secondary } } = + + ~~~~~~~~~~~ => Pos: (1847 to 1857) SpanInfo: {"start":1850,"length":7} + >primary + >:=> (line 60, col 17) to (line 60, col 24) +60 >for ({ skills: { primary, secondary } } = + + ~~~~~~~~~~~~ => Pos: (1858 to 1869) SpanInfo: {"start":1859,"length":9} + >secondary + >:=> (line 60, col 26) to (line 60, col 35) +60 >for ({ skills: { primary, secondary } } = + + ~~~~~ => Pos: (1870 to 1874) SpanInfo: {"start":1840,"length":30} + >skills: { primary, secondary } + >:=> (line 60, col 7) to (line 60, col 37) +-------------------------------- +61 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1875 to 1965) SpanInfo: {"start":1840,"length":30} + >skills: { primary, secondary } + >:=> (line 60, col 7) to (line 60, col 37) +-------------------------------- +62 > i = 0; i < 1; i++) { + + ~~~~~~~~~~ => Pos: (1966 to 1975) SpanInfo: {"start":1970,"length":5} + >i = 0 + >:=> (line 62, col 4) to (line 62, col 9) +62 > i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1976 to 1982) SpanInfo: {"start":1977,"length":5} + >i < 1 + >:=> (line 62, col 11) to (line 62, col 16) +62 > i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (1983 to 1990) SpanInfo: {"start":1984,"length":3} + >i++ + >:=> (line 62, col 18) to (line 62, col 21) +-------------------------------- +63 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1991 to 2017) SpanInfo: {"start":1995,"length":21} + >console.log(primaryA) + >:=> (line 63, col 4) to (line 63, col 25) +-------------------------------- +64 >} + + ~~ => Pos: (2018 to 2019) SpanInfo: {"start":1995,"length":21} + >console.log(primaryA) + >:=> (line 63, col 4) to (line 63, col 25) +-------------------------------- +65 >for ({ name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (2020 to 2038) SpanInfo: {"start":2027,"length":11} + >name: nameA + >:=> (line 65, col 7) to (line 65, col 18) +65 >for ({ name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2039 to 2063) SpanInfo: {"start":2040,"length":13} + >skill: skillA + >:=> (line 65, col 20) to (line 65, col 33) +65 >for ({ name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2064 to 2070) SpanInfo: {"start":2065,"length":5} + >i = 0 + >:=> (line 65, col 45) to (line 65, col 50) +65 >for ({ name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2071 to 2077) SpanInfo: {"start":2072,"length":5} + >i < 1 + >:=> (line 65, col 52) to (line 65, col 57) +65 >for ({ name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2078 to 2085) SpanInfo: {"start":2079,"length":3} + >i++ + >:=> (line 65, col 59) to (line 65, col 62) +-------------------------------- +66 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2086 to 2109) SpanInfo: {"start":2090,"length":18} + >console.log(nameA) + >:=> (line 66, col 4) to (line 66, col 22) +-------------------------------- +67 >} + + ~~ => Pos: (2110 to 2111) SpanInfo: {"start":2090,"length":18} + >console.log(nameA) + >:=> (line 66, col 4) to (line 66, col 22) +-------------------------------- +68 >for ({ name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (2112 to 2130) SpanInfo: {"start":2119,"length":11} + >name: nameA + >:=> (line 68, col 7) to (line 68, col 18) +68 >for ({ name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2131 to 2160) SpanInfo: {"start":2132,"length":13} + >skill: skillA + >:=> (line 68, col 20) to (line 68, col 33) +68 >for ({ name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2161 to 2167) SpanInfo: {"start":2162,"length":5} + >i = 0 + >:=> (line 68, col 50) to (line 68, col 55) +68 >for ({ name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2168 to 2174) SpanInfo: {"start":2169,"length":5} + >i < 1 + >:=> (line 68, col 57) to (line 68, col 62) +68 >for ({ name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2175 to 2182) SpanInfo: {"start":2176,"length":3} + >i++ + >:=> (line 68, col 64) to (line 68, col 67) +-------------------------------- +69 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2183 to 2206) SpanInfo: {"start":2187,"length":18} + >console.log(nameA) + >:=> (line 69, col 4) to (line 69, col 22) +-------------------------------- +70 >} + + ~~ => Pos: (2207 to 2208) SpanInfo: {"start":2187,"length":18} + >console.log(nameA) + >:=> (line 69, col 4) to (line 69, col 22) +-------------------------------- +71 >for ({ name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (2209 to 2227) SpanInfo: {"start":2216,"length":11} + >name: nameA + >:=> (line 71, col 7) to (line 71, col 18) +71 >for ({ name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2228 to 2292) SpanInfo: {"start":2229,"length":13} + >skill: skillA + >:=> (line 71, col 20) to (line 71, col 33) +71 >for ({ name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2293 to 2299) SpanInfo: {"start":2294,"length":5} + >i = 0 + >:=> (line 71, col 85) to (line 71, col 90) +71 >for ({ name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2300 to 2306) SpanInfo: {"start":2301,"length":5} + >i < 1 + >:=> (line 71, col 92) to (line 71, col 97) +71 >for ({ name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2307 to 2314) SpanInfo: {"start":2308,"length":3} + >i++ + >:=> (line 71, col 99) to (line 71, col 102) +-------------------------------- +72 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2315 to 2338) SpanInfo: {"start":2319,"length":18} + >console.log(nameA) + >:=> (line 72, col 4) to (line 72, col 22) +-------------------------------- +73 >} + + ~~ => Pos: (2339 to 2340) SpanInfo: {"start":2319,"length":18} + >console.log(nameA) + >:=> (line 72, col 4) to (line 72, col 22) +-------------------------------- +74 >for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (2341 to 2359) SpanInfo: {"start":2348,"length":11} + >name: nameA + >:=> (line 74, col 7) to (line 74, col 18) +74 >for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (2360 to 2367) SpanInfo: {"start":2361,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 74, col 20) to (line 74, col 72) +74 >for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~=> Pos: (2368 to 2388) SpanInfo: {"start":2371,"length":17} + >primary: primaryA + >:=> (line 74, col 30) to (line 74, col 47) +74 >for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2389 to 2412) SpanInfo: {"start":2390,"length":21} + >secondary: secondaryA + >:=> (line 74, col 49) to (line 74, col 70) +74 >for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~=> Pos: (2413 to 2428) SpanInfo: {"start":2361,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 74, col 20) to (line 74, col 72) +74 >for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2429 to 2435) SpanInfo: {"start":2430,"length":5} + >i = 0 + >:=> (line 74, col 89) to (line 74, col 94) +74 >for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2436 to 2442) SpanInfo: {"start":2437,"length":5} + >i < 1 + >:=> (line 74, col 96) to (line 74, col 101) +74 >for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2443 to 2450) SpanInfo: {"start":2444,"length":3} + >i++ + >:=> (line 74, col 103) to (line 74, col 106) +-------------------------------- +75 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2451 to 2477) SpanInfo: {"start":2455,"length":21} + >console.log(primaryA) + >:=> (line 75, col 4) to (line 75, col 25) +-------------------------------- +76 >} + + ~~ => Pos: (2478 to 2479) SpanInfo: {"start":2455,"length":21} + >console.log(primaryA) + >:=> (line 75, col 4) to (line 75, col 25) +-------------------------------- +77 >for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (2480 to 2498) SpanInfo: {"start":2487,"length":11} + >name: nameA + >:=> (line 77, col 7) to (line 77, col 18) +77 >for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (2499 to 2506) SpanInfo: {"start":2500,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 77, col 20) to (line 77, col 72) +77 >for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~=> Pos: (2507 to 2527) SpanInfo: {"start":2510,"length":17} + >primary: primaryA + >:=> (line 77, col 30) to (line 77, col 47) +77 >for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2528 to 2551) SpanInfo: {"start":2529,"length":21} + >secondary: secondaryA + >:=> (line 77, col 49) to (line 77, col 70) +77 >for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~=> Pos: (2552 to 2572) SpanInfo: {"start":2500,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 77, col 20) to (line 77, col 72) +77 >for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2573 to 2579) SpanInfo: {"start":2574,"length":5} + >i = 0 + >:=> (line 77, col 94) to (line 77, col 99) +77 >for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2580 to 2586) SpanInfo: {"start":2581,"length":5} + >i < 1 + >:=> (line 77, col 101) to (line 77, col 106) +77 >for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2587 to 2594) SpanInfo: {"start":2588,"length":3} + >i++ + >:=> (line 77, col 108) to (line 77, col 111) +-------------------------------- +78 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2595 to 2621) SpanInfo: {"start":2599,"length":21} + >console.log(primaryA) + >:=> (line 78, col 4) to (line 78, col 25) +-------------------------------- +79 >} + + ~~ => Pos: (2622 to 2623) SpanInfo: {"start":2599,"length":21} + >console.log(primaryA) + >:=> (line 78, col 4) to (line 78, col 25) +-------------------------------- +80 >for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = + + ~~~~~~~~~~~~~~~~~~~ => Pos: (2624 to 2642) SpanInfo: {"start":2631,"length":11} + >name: nameA + >:=> (line 80, col 7) to (line 80, col 18) +80 >for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = + + ~~~~~~~~ => Pos: (2643 to 2650) SpanInfo: {"start":2644,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 80, col 20) to (line 80, col 72) +80 >for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = + + ~~~~~~~~~~~~~~~~~~~~~=> Pos: (2651 to 2671) SpanInfo: {"start":2654,"length":17} + >primary: primaryA + >:=> (line 80, col 30) to (line 80, col 47) +80 >for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2672 to 2695) SpanInfo: {"start":2673,"length":21} + >secondary: secondaryA + >:=> (line 80, col 49) to (line 80, col 70) +80 >for ({ name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = + + ~~~~~=> Pos: (2696 to 2700) SpanInfo: {"start":2644,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 80, col 20) to (line 80, col 72) +-------------------------------- +81 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2701 to 2791) SpanInfo: {"start":2644,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 80, col 20) to (line 80, col 72) +-------------------------------- +82 > i = 0; i < 1; i++) { + + ~~~~~~~~~~ => Pos: (2792 to 2801) SpanInfo: {"start":2796,"length":5} + >i = 0 + >:=> (line 82, col 4) to (line 82, col 9) +82 > i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (2802 to 2808) SpanInfo: {"start":2803,"length":5} + >i < 1 + >:=> (line 82, col 11) to (line 82, col 16) +82 > i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (2809 to 2816) SpanInfo: {"start":2810,"length":3} + >i++ + >:=> (line 82, col 18) to (line 82, col 21) +-------------------------------- +83 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2817 to 2843) SpanInfo: {"start":2821,"length":21} + >console.log(primaryA) + >:=> (line 83, col 4) to (line 83, col 25) +-------------------------------- +84 >} + + ~~ => Pos: (2844 to 2845) SpanInfo: {"start":2821,"length":21} + >console.log(primaryA) + >:=> (line 83, col 4) to (line 83, col 25) +-------------------------------- +85 >for ({ name, skill } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~ => Pos: (2846 to 2857) SpanInfo: {"start":2853,"length":4} + >name + >:=> (line 85, col 7) to (line 85, col 11) +85 >for ({ name, skill } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~ => Pos: (2858 to 2874) SpanInfo: {"start":2859,"length":5} + >skill + >:=> (line 85, col 13) to (line 85, col 18) +85 >for ({ name, skill } = robot, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (2875 to 2881) SpanInfo: {"start":2876,"length":5} + >i = 0 + >:=> (line 85, col 30) to (line 85, col 35) +85 >for ({ name, skill } = robot, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (2882 to 2888) SpanInfo: {"start":2883,"length":5} + >i < 1 + >:=> (line 85, col 37) to (line 85, col 42) +85 >for ({ name, skill } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2889 to 2896) SpanInfo: {"start":2890,"length":3} + >i++ + >:=> (line 85, col 44) to (line 85, col 47) +-------------------------------- +86 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2897 to 2920) SpanInfo: {"start":2901,"length":18} + >console.log(nameA) + >:=> (line 86, col 4) to (line 86, col 22) +-------------------------------- +87 >} + + ~~ => Pos: (2921 to 2922) SpanInfo: {"start":2901,"length":18} + >console.log(nameA) + >:=> (line 86, col 4) to (line 86, col 22) +-------------------------------- +88 >for ({ name, skill } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~ => Pos: (2923 to 2934) SpanInfo: {"start":2930,"length":4} + >name + >:=> (line 88, col 7) to (line 88, col 11) +88 >for ({ name, skill } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2935 to 2956) SpanInfo: {"start":2936,"length":5} + >skill + >:=> (line 88, col 13) to (line 88, col 18) +88 >for ({ name, skill } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (2957 to 2963) SpanInfo: {"start":2958,"length":5} + >i = 0 + >:=> (line 88, col 35) to (line 88, col 40) +88 >for ({ name, skill } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2964 to 2970) SpanInfo: {"start":2965,"length":5} + >i < 1 + >:=> (line 88, col 42) to (line 88, col 47) +88 >for ({ name, skill } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2971 to 2978) SpanInfo: {"start":2972,"length":3} + >i++ + >:=> (line 88, col 49) to (line 88, col 52) +-------------------------------- +89 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2979 to 3002) SpanInfo: {"start":2983,"length":18} + >console.log(nameA) + >:=> (line 89, col 4) to (line 89, col 22) +-------------------------------- +90 >} + + ~~ => Pos: (3003 to 3004) SpanInfo: {"start":2983,"length":18} + >console.log(nameA) + >:=> (line 89, col 4) to (line 89, col 22) +-------------------------------- +91 >for ({ name, skill } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~ => Pos: (3005 to 3016) SpanInfo: {"start":3012,"length":4} + >name + >:=> (line 91, col 7) to (line 91, col 11) +91 >for ({ name, skill } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (3017 to 3073) SpanInfo: {"start":3018,"length":5} + >skill + >:=> (line 91, col 13) to (line 91, col 18) +91 >for ({ name, skill } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (3074 to 3080) SpanInfo: {"start":3075,"length":5} + >i = 0 + >:=> (line 91, col 70) to (line 91, col 75) +91 >for ({ name, skill } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (3081 to 3087) SpanInfo: {"start":3082,"length":5} + >i < 1 + >:=> (line 91, col 77) to (line 91, col 82) +91 >for ({ name, skill } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (3088 to 3095) SpanInfo: {"start":3089,"length":3} + >i++ + >:=> (line 91, col 84) to (line 91, col 87) +-------------------------------- +92 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3096 to 3119) SpanInfo: {"start":3100,"length":18} + >console.log(nameA) + >:=> (line 92, col 4) to (line 92, col 22) +-------------------------------- +93 >} + + ~~ => Pos: (3120 to 3121) SpanInfo: {"start":3100,"length":18} + >console.log(nameA) + >:=> (line 92, col 4) to (line 92, col 22) +-------------------------------- +94 >for ({ name, skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~ => Pos: (3122 to 3133) SpanInfo: {"start":3129,"length":4} + >name + >:=> (line 94, col 7) to (line 94, col 11) +94 >for ({ name, skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (3134 to 3141) SpanInfo: {"start":3135,"length":30} + >skills: { primary, secondary } + >:=> (line 94, col 13) to (line 94, col 43) +94 >for ({ name, skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~ => Pos: (3142 to 3152) SpanInfo: {"start":3145,"length":7} + >primary + >:=> (line 94, col 23) to (line 94, col 30) +94 >for ({ name, skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~ => Pos: (3153 to 3164) SpanInfo: {"start":3154,"length":9} + >secondary + >:=> (line 94, col 32) to (line 94, col 41) +94 >for ({ name, skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~=> Pos: (3165 to 3180) SpanInfo: {"start":3135,"length":30} + >skills: { primary, secondary } + >:=> (line 94, col 13) to (line 94, col 43) +94 >for ({ name, skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (3181 to 3187) SpanInfo: {"start":3182,"length":5} + >i = 0 + >:=> (line 94, col 60) to (line 94, col 65) +94 >for ({ name, skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (3188 to 3194) SpanInfo: {"start":3189,"length":5} + >i < 1 + >:=> (line 94, col 67) to (line 94, col 72) +94 >for ({ name, skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (3195 to 3202) SpanInfo: {"start":3196,"length":3} + >i++ + >:=> (line 94, col 74) to (line 94, col 77) +-------------------------------- +95 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3203 to 3229) SpanInfo: {"start":3207,"length":21} + >console.log(primaryA) + >:=> (line 95, col 4) to (line 95, col 25) +-------------------------------- +96 >} + + ~~ => Pos: (3230 to 3231) SpanInfo: {"start":3207,"length":21} + >console.log(primaryA) + >:=> (line 95, col 4) to (line 95, col 25) +-------------------------------- +97 >for ({ name, skills: { primary, secondary } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~ => Pos: (3232 to 3243) SpanInfo: {"start":3239,"length":4} + >name + >:=> (line 97, col 7) to (line 97, col 11) +97 >for ({ name, skills: { primary, secondary } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (3244 to 3251) SpanInfo: {"start":3245,"length":30} + >skills: { primary, secondary } + >:=> (line 97, col 13) to (line 97, col 43) +97 >for ({ name, skills: { primary, secondary } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~ => Pos: (3252 to 3262) SpanInfo: {"start":3255,"length":7} + >primary + >:=> (line 97, col 23) to (line 97, col 30) +97 >for ({ name, skills: { primary, secondary } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~ => Pos: (3263 to 3274) SpanInfo: {"start":3264,"length":9} + >secondary + >:=> (line 97, col 32) to (line 97, col 41) +97 >for ({ name, skills: { primary, secondary } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~=> Pos: (3275 to 3295) SpanInfo: {"start":3245,"length":30} + >skills: { primary, secondary } + >:=> (line 97, col 13) to (line 97, col 43) +97 >for ({ name, skills: { primary, secondary } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (3296 to 3302) SpanInfo: {"start":3297,"length":5} + >i = 0 + >:=> (line 97, col 65) to (line 97, col 70) +97 >for ({ name, skills: { primary, secondary } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (3303 to 3309) SpanInfo: {"start":3304,"length":5} + >i < 1 + >:=> (line 97, col 72) to (line 97, col 77) +97 >for ({ name, skills: { primary, secondary } } = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (3310 to 3317) SpanInfo: {"start":3311,"length":3} + >i++ + >:=> (line 97, col 79) to (line 97, col 82) +-------------------------------- +98 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3318 to 3344) SpanInfo: {"start":3322,"length":21} + >console.log(primaryA) + >:=> (line 98, col 4) to (line 98, col 25) +-------------------------------- +99 >} + + ~~ => Pos: (3345 to 3346) SpanInfo: {"start":3322,"length":21} + >console.log(primaryA) + >:=> (line 98, col 4) to (line 98, col 25) +-------------------------------- +100>for ({ name, skills: { primary, secondary } } = + + ~~~~~~~~~~~~ => Pos: (3347 to 3358) SpanInfo: {"start":3354,"length":4} + >name + >:=> (line 100, col 7) to (line 100, col 11) +100>for ({ name, skills: { primary, secondary } } = + + ~~~~~~~~ => Pos: (3359 to 3366) SpanInfo: {"start":3360,"length":30} + >skills: { primary, secondary } + >:=> (line 100, col 13) to (line 100, col 43) +100>for ({ name, skills: { primary, secondary } } = + + ~~~~~~~~~~~ => Pos: (3367 to 3377) SpanInfo: {"start":3370,"length":7} + >primary + >:=> (line 100, col 23) to (line 100, col 30) +100>for ({ name, skills: { primary, secondary } } = + + ~~~~~~~~~~~~ => Pos: (3378 to 3389) SpanInfo: {"start":3379,"length":9} + >secondary + >:=> (line 100, col 32) to (line 100, col 41) +100>for ({ name, skills: { primary, secondary } } = + + ~~~~~=> Pos: (3390 to 3394) SpanInfo: {"start":3360,"length":30} + >skills: { primary, secondary } + >:=> (line 100, col 13) to (line 100, col 43) +-------------------------------- +101> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (3395 to 3485) SpanInfo: {"start":3360,"length":30} + >skills: { primary, secondary } + >:=> (line 100, col 13) to (line 100, col 43) +-------------------------------- +102> i = 0; i < 1; i++) { + + ~~~~~~~~~~ => Pos: (3486 to 3495) SpanInfo: {"start":3490,"length":5} + >i = 0 + >:=> (line 102, col 4) to (line 102, col 9) +102> i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (3496 to 3502) SpanInfo: {"start":3497,"length":5} + >i < 1 + >:=> (line 102, col 11) to (line 102, col 16) +102> i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (3503 to 3510) SpanInfo: {"start":3504,"length":3} + >i++ + >:=> (line 102, col 18) to (line 102, col 21) +-------------------------------- +103> console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3511 to 3537) SpanInfo: {"start":3515,"length":21} + >console.log(primaryA) + >:=> (line 103, col 4) to (line 103, col 25) +-------------------------------- +104>} + ~ => Pos: (3538 to 3538) SpanInfo: {"start":3515,"length":21} + >console.log(primaryA) + >:=> (line 103, col 4) to (line 103, col 25) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringAssignmentForObjectBindingPatternDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringAssignmentForObjectBindingPatternDefaultValues.baseline new file mode 100644 index 00000000000..daf4f8a0d84 --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringAssignmentForObjectBindingPatternDefaultValues.baseline @@ -0,0 +1,1483 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: any): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (48 to 49) SpanInfo: undefined +-------------------------------- +4 >interface Robot { + + ~~~~~~~~~~~~~~~~~~ => Pos: (50 to 67) SpanInfo: undefined +-------------------------------- +5 > name: string; + + ~~~~~~~~~~~~~~~~~~ => Pos: (68 to 85) SpanInfo: undefined +-------------------------------- +6 > skill: string; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (86 to 104) SpanInfo: undefined +-------------------------------- +7 >} + + ~~ => Pos: (105 to 106) SpanInfo: undefined +-------------------------------- +8 >interface MultiRobot { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (107 to 129) SpanInfo: undefined +-------------------------------- +9 > name: string; + + ~~~~~~~~~~~~~~~~~~ => Pos: (130 to 147) SpanInfo: undefined +-------------------------------- +10 > skills: { + + ~~~~~~~~~~~~~~ => Pos: (148 to 161) SpanInfo: undefined +-------------------------------- +11 > primary?: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (162 to 187) SpanInfo: undefined +-------------------------------- +12 > secondary?: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (188 to 215) SpanInfo: undefined +-------------------------------- +13 > }; + + ~~~~~~~ => Pos: (216 to 222) SpanInfo: undefined +-------------------------------- +14 >} + + ~~ => Pos: (223 to 224) SpanInfo: undefined +-------------------------------- +15 >let robot: Robot = { name: "mower", skill: "mowing" }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (225 to 279) SpanInfo: {"start":225,"length":53} + >let robot: Robot = { name: "mower", skill: "mowing" } + >:=> (line 15, col 0) to (line 15, col 53) +-------------------------------- +16 >let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (280 to 377) SpanInfo: {"start":280,"length":96} + >let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } } + >:=> (line 16, col 0) to (line 16, col 96) +-------------------------------- +17 >function getRobot() { + + ~~~~~~~~~~~~~~~~~~~~~~ => Pos: (378 to 399) SpanInfo: {"start":404,"length":12} + >return robot + >:=> (line 18, col 4) to (line 18, col 16) +-------------------------------- +18 > return robot; + + ~~~~~~~~~~~~~~~~~~ => Pos: (400 to 417) SpanInfo: {"start":404,"length":12} + >return robot + >:=> (line 18, col 4) to (line 18, col 16) +-------------------------------- +19 >} + + ~~ => Pos: (418 to 419) SpanInfo: {"start":418,"length":1} + >} + >:=> (line 19, col 0) to (line 19, col 1) +-------------------------------- +20 >function getMultiRobot() { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (420 to 446) SpanInfo: {"start":451,"length":17} + >return multiRobot + >:=> (line 21, col 4) to (line 21, col 21) +-------------------------------- +21 > return multiRobot; + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (447 to 469) SpanInfo: {"start":451,"length":17} + >return multiRobot + >:=> (line 21, col 4) to (line 21, col 21) +-------------------------------- +22 >} + + ~~ => Pos: (470 to 471) SpanInfo: {"start":470,"length":1} + >} + >:=> (line 22, col 0) to (line 22, col 1) +-------------------------------- +23 >let nameA: string, primaryA: string, secondaryA: string, i: number, skillA: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (472 to 555) SpanInfo: undefined +-------------------------------- +24 >let name: string, primary: string, secondary: string, skill: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (556 to 624) SpanInfo: undefined +-------------------------------- +25 >for ({name: nameA = "noName" } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (625 to 663) SpanInfo: {"start":631,"length":22} + >name: nameA = "noName" + >:=> (line 25, col 6) to (line 25, col 28) +25 >for ({name: nameA = "noName" } = robot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (664 to 670) SpanInfo: {"start":665,"length":5} + >i = 0 + >:=> (line 25, col 40) to (line 25, col 45) +25 >for ({name: nameA = "noName" } = robot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (671 to 677) SpanInfo: {"start":672,"length":5} + >i < 1 + >:=> (line 25, col 47) to (line 25, col 52) +25 >for ({name: nameA = "noName" } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (678 to 685) SpanInfo: {"start":679,"length":3} + >i++ + >:=> (line 25, col 54) to (line 25, col 57) +-------------------------------- +26 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (686 to 709) SpanInfo: {"start":690,"length":18} + >console.log(nameA) + >:=> (line 26, col 4) to (line 26, col 22) +-------------------------------- +27 >} + + ~~ => Pos: (710 to 711) SpanInfo: {"start":690,"length":18} + >console.log(nameA) + >:=> (line 26, col 4) to (line 26, col 22) +-------------------------------- +28 >for ({name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (712 to 755) SpanInfo: {"start":718,"length":22} + >name: nameA = "noName" + >:=> (line 28, col 6) to (line 28, col 28) +28 >for ({name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (756 to 762) SpanInfo: {"start":757,"length":5} + >i = 0 + >:=> (line 28, col 45) to (line 28, col 50) +28 >for ({name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (763 to 769) SpanInfo: {"start":764,"length":5} + >i < 1 + >:=> (line 28, col 52) to (line 28, col 57) +28 >for ({name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (770 to 777) SpanInfo: {"start":771,"length":3} + >i++ + >:=> (line 28, col 59) to (line 28, col 62) +-------------------------------- +29 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (778 to 801) SpanInfo: {"start":782,"length":18} + >console.log(nameA) + >:=> (line 29, col 4) to (line 29, col 22) +-------------------------------- +30 >} + + ~~ => Pos: (802 to 803) SpanInfo: {"start":782,"length":18} + >console.log(nameA) + >:=> (line 29, col 4) to (line 29, col 22) +-------------------------------- +31 >for ({name: nameA = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (804 to 882) SpanInfo: {"start":810,"length":22} + >name: nameA = "noName" + >:=> (line 31, col 6) to (line 31, col 28) +31 >for ({name: nameA = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (883 to 889) SpanInfo: {"start":884,"length":5} + >i = 0 + >:=> (line 31, col 80) to (line 31, col 85) +31 >for ({name: nameA = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (890 to 896) SpanInfo: {"start":891,"length":5} + >i < 1 + >:=> (line 31, col 87) to (line 31, col 92) +31 >for ({name: nameA = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (897 to 904) SpanInfo: {"start":898,"length":3} + >i++ + >:=> (line 31, col 94) to (line 31, col 97) +-------------------------------- +32 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (905 to 928) SpanInfo: {"start":909,"length":18} + >console.log(nameA) + >:=> (line 32, col 4) to (line 32, col 22) +-------------------------------- +33 >} + + ~~ => Pos: (929 to 930) SpanInfo: {"start":909,"length":18} + >console.log(nameA) + >:=> (line 32, col 4) to (line 32, col 22) +-------------------------------- +34 >for ({ + + ~~~~~~~ => Pos: (931 to 937) SpanInfo: {"start":942,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 35, col 4) to (line 38, col 46) +-------------------------------- +35 > skills: { + + ~~~~~~~~~~~ => Pos: (938 to 948) SpanInfo: {"start":942,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 35, col 4) to (line 38, col 46) +35 > skills: { + + ~~~ => Pos: (949 to 951) SpanInfo: {"start":960,"length":29} + >primary: primaryA = "primary" + >:=> (line 36, col 8) to (line 36, col 37) +-------------------------------- +36 > primary: primaryA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (952 to 990) SpanInfo: {"start":960,"length":29} + >primary: primaryA = "primary" + >:=> (line 36, col 8) to (line 36, col 37) +-------------------------------- +37 > secondary: secondaryA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (991 to 1034) SpanInfo: {"start":999,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 37, col 8) to (line 37, col 43) +-------------------------------- +38 > } = { primary: "none", secondary: "none" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1035 to 1081) SpanInfo: {"start":999,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 37, col 8) to (line 37, col 43) +-------------------------------- +39 >} = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~ => Pos: (1082 to 1096) SpanInfo: {"start":942,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 35, col 4) to (line 38, col 46) +39 >} = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1097 to 1103) SpanInfo: {"start":1098,"length":5} + >i = 0 + >:=> (line 39, col 16) to (line 39, col 21) +39 >} = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1104 to 1110) SpanInfo: {"start":1105,"length":5} + >i < 1 + >:=> (line 39, col 23) to (line 39, col 28) +39 >} = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (1111 to 1118) SpanInfo: {"start":1112,"length":3} + >i++ + >:=> (line 39, col 30) to (line 39, col 33) +-------------------------------- +40 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1119 to 1145) SpanInfo: {"start":1123,"length":21} + >console.log(primaryA) + >:=> (line 40, col 4) to (line 40, col 25) +-------------------------------- +41 >} + + ~~ => Pos: (1146 to 1147) SpanInfo: {"start":1123,"length":21} + >console.log(primaryA) + >:=> (line 40, col 4) to (line 40, col 25) +-------------------------------- +42 >for ({ + + ~~~~~~~ => Pos: (1148 to 1154) SpanInfo: {"start":1159,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 43, col 4) to (line 46, col 46) +-------------------------------- +43 > skills: { + + ~~~~~~~~~~~ => Pos: (1155 to 1165) SpanInfo: {"start":1159,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 43, col 4) to (line 46, col 46) +43 > skills: { + + ~~~ => Pos: (1166 to 1168) SpanInfo: {"start":1177,"length":29} + >primary: primaryA = "primary" + >:=> (line 44, col 8) to (line 44, col 37) +-------------------------------- +44 > primary: primaryA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1169 to 1207) SpanInfo: {"start":1177,"length":29} + >primary: primaryA = "primary" + >:=> (line 44, col 8) to (line 44, col 37) +-------------------------------- +45 > secondary: secondaryA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1208 to 1251) SpanInfo: {"start":1216,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 45, col 8) to (line 45, col 43) +-------------------------------- +46 > } = { primary: "none", secondary: "none" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1252 to 1298) SpanInfo: {"start":1216,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 45, col 8) to (line 45, col 43) +-------------------------------- +47 >} = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (1299 to 1318) SpanInfo: {"start":1159,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 43, col 4) to (line 46, col 46) +47 >} = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1319 to 1325) SpanInfo: {"start":1320,"length":5} + >i = 0 + >:=> (line 47, col 21) to (line 47, col 26) +47 >} = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1326 to 1332) SpanInfo: {"start":1327,"length":5} + >i < 1 + >:=> (line 47, col 28) to (line 47, col 33) +47 >} = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (1333 to 1340) SpanInfo: {"start":1334,"length":3} + >i++ + >:=> (line 47, col 35) to (line 47, col 38) +-------------------------------- +48 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1341 to 1367) SpanInfo: {"start":1345,"length":21} + >console.log(primaryA) + >:=> (line 48, col 4) to (line 48, col 25) +-------------------------------- +49 >} + + ~~ => Pos: (1368 to 1369) SpanInfo: {"start":1345,"length":21} + >console.log(primaryA) + >:=> (line 48, col 4) to (line 48, col 25) +-------------------------------- +50 >for ({ + + ~~~~~~~ => Pos: (1370 to 1376) SpanInfo: {"start":1381,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 51, col 4) to (line 54, col 46) +-------------------------------- +51 > skills: { + + ~~~~~~~~~~~ => Pos: (1377 to 1387) SpanInfo: {"start":1381,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 51, col 4) to (line 54, col 46) +51 > skills: { + + ~~~ => Pos: (1388 to 1390) SpanInfo: {"start":1399,"length":29} + >primary: primaryA = "primary" + >:=> (line 52, col 8) to (line 52, col 37) +-------------------------------- +52 > primary: primaryA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1391 to 1429) SpanInfo: {"start":1399,"length":29} + >primary: primaryA = "primary" + >:=> (line 52, col 8) to (line 52, col 37) +-------------------------------- +53 > secondary: secondaryA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1430 to 1473) SpanInfo: {"start":1438,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 53, col 8) to (line 53, col 43) +-------------------------------- +54 > } = { primary: "none", secondary: "none" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1474 to 1520) SpanInfo: {"start":1438,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 53, col 8) to (line 53, col 43) +-------------------------------- +55 >} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1521 to 1611) SpanInfo: {"start":1381,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 51, col 4) to (line 54, col 46) +-------------------------------- +56 > i = 0; i < 1; i++) { + + ~~~~~~~~~~ => Pos: (1612 to 1621) SpanInfo: {"start":1616,"length":5} + >i = 0 + >:=> (line 56, col 4) to (line 56, col 9) +56 > i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1622 to 1628) SpanInfo: {"start":1623,"length":5} + >i < 1 + >:=> (line 56, col 11) to (line 56, col 16) +56 > i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (1629 to 1636) SpanInfo: {"start":1630,"length":3} + >i++ + >:=> (line 56, col 18) to (line 56, col 21) +-------------------------------- +57 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1637 to 1663) SpanInfo: {"start":1641,"length":21} + >console.log(primaryA) + >:=> (line 57, col 4) to (line 57, col 25) +-------------------------------- +58 >} + + ~~ => Pos: (1664 to 1665) SpanInfo: {"start":1641,"length":21} + >console.log(primaryA) + >:=> (line 57, col 4) to (line 57, col 25) +-------------------------------- +59 >for ({ name = "noName" } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1666 to 1698) SpanInfo: {"start":1673,"length":15} + >name = "noName" + >:=> (line 59, col 7) to (line 59, col 22) +59 >for ({ name = "noName" } = robot, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1699 to 1705) SpanInfo: {"start":1700,"length":5} + >i = 0 + >:=> (line 59, col 34) to (line 59, col 39) +59 >for ({ name = "noName" } = robot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1706 to 1712) SpanInfo: {"start":1707,"length":5} + >i < 1 + >:=> (line 59, col 41) to (line 59, col 46) +59 >for ({ name = "noName" } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1713 to 1720) SpanInfo: {"start":1714,"length":3} + >i++ + >:=> (line 59, col 48) to (line 59, col 51) +-------------------------------- +60 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1721 to 1744) SpanInfo: {"start":1725,"length":18} + >console.log(nameA) + >:=> (line 60, col 4) to (line 60, col 22) +-------------------------------- +61 >} + + ~~ => Pos: (1745 to 1746) SpanInfo: {"start":1725,"length":18} + >console.log(nameA) + >:=> (line 60, col 4) to (line 60, col 22) +-------------------------------- +62 >for ({ name = "noName" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1747 to 1784) SpanInfo: {"start":1754,"length":15} + >name = "noName" + >:=> (line 62, col 7) to (line 62, col 22) +62 >for ({ name = "noName" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (1785 to 1791) SpanInfo: {"start":1786,"length":5} + >i = 0 + >:=> (line 62, col 39) to (line 62, col 44) +62 >for ({ name = "noName" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1792 to 1798) SpanInfo: {"start":1793,"length":5} + >i < 1 + >:=> (line 62, col 46) to (line 62, col 51) +62 >for ({ name = "noName" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1799 to 1806) SpanInfo: {"start":1800,"length":3} + >i++ + >:=> (line 62, col 53) to (line 62, col 56) +-------------------------------- +63 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1807 to 1830) SpanInfo: {"start":1811,"length":18} + >console.log(nameA) + >:=> (line 63, col 4) to (line 63, col 22) +-------------------------------- +64 >} + + ~~ => Pos: (1831 to 1832) SpanInfo: {"start":1811,"length":18} + >console.log(nameA) + >:=> (line 63, col 4) to (line 63, col 22) +-------------------------------- +65 >for ({ name = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1833 to 1905) SpanInfo: {"start":1840,"length":15} + >name = "noName" + >:=> (line 65, col 7) to (line 65, col 22) +65 >for ({ name = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1906 to 1912) SpanInfo: {"start":1907,"length":5} + >i = 0 + >:=> (line 65, col 74) to (line 65, col 79) +65 >for ({ name = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (1913 to 1919) SpanInfo: {"start":1914,"length":5} + >i < 1 + >:=> (line 65, col 81) to (line 65, col 86) +65 >for ({ name = "noName" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (1920 to 1927) SpanInfo: {"start":1921,"length":3} + >i++ + >:=> (line 65, col 88) to (line 65, col 91) +-------------------------------- +66 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1928 to 1951) SpanInfo: {"start":1932,"length":18} + >console.log(nameA) + >:=> (line 66, col 4) to (line 66, col 22) +-------------------------------- +67 >} + + ~~ => Pos: (1952 to 1953) SpanInfo: {"start":1932,"length":18} + >console.log(nameA) + >:=> (line 66, col 4) to (line 66, col 22) +-------------------------------- +68 >for ({ + + ~~~~~~~ => Pos: (1954 to 1960) SpanInfo: {"start":1965,"length":117} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 69, col 4) to (line 72, col 46) +-------------------------------- +69 > skills: { + + ~~~~~~~~~~~ => Pos: (1961 to 1971) SpanInfo: {"start":1965,"length":117} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 69, col 4) to (line 72, col 46) +69 > skills: { + + ~~~ => Pos: (1972 to 1974) SpanInfo: {"start":1983,"length":19} + >primary = "primary" + >:=> (line 70, col 8) to (line 70, col 27) +-------------------------------- +70 > primary = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1975 to 2003) SpanInfo: {"start":1983,"length":19} + >primary = "primary" + >:=> (line 70, col 8) to (line 70, col 27) +-------------------------------- +71 > secondary = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2004 to 2035) SpanInfo: {"start":2012,"length":23} + >secondary = "secondary" + >:=> (line 71, col 8) to (line 71, col 31) +-------------------------------- +72 > } = { primary: "none", secondary: "none" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2036 to 2082) SpanInfo: {"start":2012,"length":23} + >secondary = "secondary" + >:=> (line 71, col 8) to (line 71, col 31) +-------------------------------- +73 >} = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~ => Pos: (2083 to 2097) SpanInfo: {"start":1965,"length":117} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 69, col 4) to (line 72, col 46) +73 >} = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (2098 to 2104) SpanInfo: {"start":2099,"length":5} + >i = 0 + >:=> (line 73, col 16) to (line 73, col 21) +73 >} = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (2105 to 2111) SpanInfo: {"start":2106,"length":5} + >i < 1 + >:=> (line 73, col 23) to (line 73, col 28) +73 >} = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (2112 to 2119) SpanInfo: {"start":2113,"length":3} + >i++ + >:=> (line 73, col 30) to (line 73, col 33) +-------------------------------- +74 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2120 to 2146) SpanInfo: {"start":2124,"length":21} + >console.log(primaryA) + >:=> (line 74, col 4) to (line 74, col 25) +-------------------------------- +75 >} + + ~~ => Pos: (2147 to 2148) SpanInfo: {"start":2124,"length":21} + >console.log(primaryA) + >:=> (line 74, col 4) to (line 74, col 25) +-------------------------------- +76 >for ({ + + ~~~~~~~ => Pos: (2149 to 2155) SpanInfo: {"start":2160,"length":117} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 77, col 4) to (line 80, col 46) +-------------------------------- +77 > skills: { + + ~~~~~~~~~~~ => Pos: (2156 to 2166) SpanInfo: {"start":2160,"length":117} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 77, col 4) to (line 80, col 46) +77 > skills: { + + ~~~ => Pos: (2167 to 2169) SpanInfo: {"start":2178,"length":19} + >primary = "primary" + >:=> (line 78, col 8) to (line 78, col 27) +-------------------------------- +78 > primary = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2170 to 2198) SpanInfo: {"start":2178,"length":19} + >primary = "primary" + >:=> (line 78, col 8) to (line 78, col 27) +-------------------------------- +79 > secondary = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2199 to 2230) SpanInfo: {"start":2207,"length":23} + >secondary = "secondary" + >:=> (line 79, col 8) to (line 79, col 31) +-------------------------------- +80 > } = { primary: "none", secondary: "none" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2231 to 2277) SpanInfo: {"start":2207,"length":23} + >secondary = "secondary" + >:=> (line 79, col 8) to (line 79, col 31) +-------------------------------- +81 >} = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (2278 to 2297) SpanInfo: {"start":2160,"length":117} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 77, col 4) to (line 80, col 46) +81 >} = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (2298 to 2304) SpanInfo: {"start":2299,"length":5} + >i = 0 + >:=> (line 81, col 21) to (line 81, col 26) +81 >} = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (2305 to 2311) SpanInfo: {"start":2306,"length":5} + >i < 1 + >:=> (line 81, col 28) to (line 81, col 33) +81 >} = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (2312 to 2319) SpanInfo: {"start":2313,"length":3} + >i++ + >:=> (line 81, col 35) to (line 81, col 38) +-------------------------------- +82 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2320 to 2346) SpanInfo: {"start":2324,"length":21} + >console.log(primaryA) + >:=> (line 82, col 4) to (line 82, col 25) +-------------------------------- +83 >} + + ~~ => Pos: (2347 to 2348) SpanInfo: {"start":2324,"length":21} + >console.log(primaryA) + >:=> (line 82, col 4) to (line 82, col 25) +-------------------------------- +84 >for ({ + + ~~~~~~~ => Pos: (2349 to 2355) SpanInfo: {"start":2360,"length":117} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 85, col 4) to (line 88, col 46) +-------------------------------- +85 > skills: { + + ~~~~~~~~~~~ => Pos: (2356 to 2366) SpanInfo: {"start":2360,"length":117} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 85, col 4) to (line 88, col 46) +85 > skills: { + + ~~~ => Pos: (2367 to 2369) SpanInfo: {"start":2378,"length":19} + >primary = "primary" + >:=> (line 86, col 8) to (line 86, col 27) +-------------------------------- +86 > primary = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2370 to 2398) SpanInfo: {"start":2378,"length":19} + >primary = "primary" + >:=> (line 86, col 8) to (line 86, col 27) +-------------------------------- +87 > secondary = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2399 to 2430) SpanInfo: {"start":2407,"length":23} + >secondary = "secondary" + >:=> (line 87, col 8) to (line 87, col 31) +-------------------------------- +88 > } = { primary: "none", secondary: "none" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2431 to 2477) SpanInfo: {"start":2407,"length":23} + >secondary = "secondary" + >:=> (line 87, col 8) to (line 87, col 31) +-------------------------------- +89 >} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2478 to 2568) SpanInfo: {"start":2360,"length":117} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 85, col 4) to (line 88, col 46) +-------------------------------- +90 > i = 0; i < 1; i++) { + + ~~~~~~~~~~ => Pos: (2569 to 2578) SpanInfo: {"start":2573,"length":5} + >i = 0 + >:=> (line 90, col 4) to (line 90, col 9) +90 > i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (2579 to 2585) SpanInfo: {"start":2580,"length":5} + >i < 1 + >:=> (line 90, col 11) to (line 90, col 16) +90 > i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (2586 to 2593) SpanInfo: {"start":2587,"length":3} + >i++ + >:=> (line 90, col 18) to (line 90, col 21) +-------------------------------- +91 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2594 to 2620) SpanInfo: {"start":2598,"length":21} + >console.log(primaryA) + >:=> (line 91, col 4) to (line 91, col 25) +-------------------------------- +92 >} + + ~~ => Pos: (2621 to 2622) SpanInfo: {"start":2598,"length":21} + >console.log(primaryA) + >:=> (line 91, col 4) to (line 91, col 25) +-------------------------------- +93 >for ({name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2623 to 2651) SpanInfo: {"start":2629,"length":22} + >name: nameA = "noName" + >:=> (line 93, col 6) to (line 93, col 28) +93 >for ({name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2652 to 2686) SpanInfo: {"start":2653,"length":23} + >skill: skillA = "skill" + >:=> (line 93, col 30) to (line 93, col 53) +93 >for ({name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2687 to 2693) SpanInfo: {"start":2688,"length":5} + >i = 0 + >:=> (line 93, col 65) to (line 93, col 70) +93 >for ({name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2694 to 2700) SpanInfo: {"start":2695,"length":5} + >i < 1 + >:=> (line 93, col 72) to (line 93, col 77) +93 >for ({name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2701 to 2708) SpanInfo: {"start":2702,"length":3} + >i++ + >:=> (line 93, col 79) to (line 93, col 82) +-------------------------------- +94 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2709 to 2732) SpanInfo: {"start":2713,"length":18} + >console.log(nameA) + >:=> (line 94, col 4) to (line 94, col 22) +-------------------------------- +95 >} + + ~~ => Pos: (2733 to 2734) SpanInfo: {"start":2713,"length":18} + >console.log(nameA) + >:=> (line 94, col 4) to (line 94, col 22) +-------------------------------- +96 >for ({name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2735 to 2763) SpanInfo: {"start":2741,"length":22} + >name: nameA = "noName" + >:=> (line 96, col 6) to (line 96, col 28) +96 >for ({name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2764 to 2803) SpanInfo: {"start":2765,"length":23} + >skill: skillA = "skill" + >:=> (line 96, col 30) to (line 96, col 53) +96 >for ({name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2804 to 2810) SpanInfo: {"start":2805,"length":5} + >i = 0 + >:=> (line 96, col 70) to (line 96, col 75) +96 >for ({name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2811 to 2817) SpanInfo: {"start":2812,"length":5} + >i < 1 + >:=> (line 96, col 77) to (line 96, col 82) +96 >for ({name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2818 to 2825) SpanInfo: {"start":2819,"length":3} + >i++ + >:=> (line 96, col 84) to (line 96, col 87) +-------------------------------- +97 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2826 to 2849) SpanInfo: {"start":2830,"length":18} + >console.log(nameA) + >:=> (line 97, col 4) to (line 97, col 22) +-------------------------------- +98 >} + + ~~ => Pos: (2850 to 2851) SpanInfo: {"start":2830,"length":18} + >console.log(nameA) + >:=> (line 97, col 4) to (line 97, col 22) +-------------------------------- +99 >for ({name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2852 to 2880) SpanInfo: {"start":2858,"length":22} + >name: nameA = "noName" + >:=> (line 99, col 6) to (line 99, col 28) +99 >for ({name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2881 to 2955) SpanInfo: {"start":2882,"length":23} + >skill: skillA = "skill" + >:=> (line 99, col 30) to (line 99, col 53) +99 >for ({name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2956 to 2962) SpanInfo: {"start":2957,"length":5} + >i = 0 + >:=> (line 99, col 105) to (line 99, col 110) +99 >for ({name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (2963 to 2969) SpanInfo: {"start":2964,"length":5} + >i < 1 + >:=> (line 99, col 112) to (line 99, col 117) +99 >for ({name: nameA = "noName", skill: skillA = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (2970 to 2977) SpanInfo: {"start":2971,"length":3} + >i++ + >:=> (line 99, col 119) to (line 99, col 122) +-------------------------------- +100> console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2978 to 3001) SpanInfo: {"start":2982,"length":18} + >console.log(nameA) + >:=> (line 100, col 4) to (line 100, col 22) +-------------------------------- +101>} + + ~~ => Pos: (3002 to 3003) SpanInfo: {"start":2982,"length":18} + >console.log(nameA) + >:=> (line 100, col 4) to (line 100, col 22) +-------------------------------- +102>for ({ + + ~~~~~~~ => Pos: (3004 to 3010) SpanInfo: {"start":3015,"length":22} + >name: nameA = "noName" + >:=> (line 103, col 4) to (line 103, col 26) +-------------------------------- +103> name: nameA = "noName", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3011 to 3038) SpanInfo: {"start":3015,"length":22} + >name: nameA = "noName" + >:=> (line 103, col 4) to (line 103, col 26) +-------------------------------- +104> skills: { + + ~~~~~~~~~~~ => Pos: (3039 to 3049) SpanInfo: {"start":3043,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 104, col 4) to (line 107, col 46) +104> skills: { + + ~~~ => Pos: (3050 to 3052) SpanInfo: {"start":3061,"length":29} + >primary: primaryA = "primary" + >:=> (line 105, col 8) to (line 105, col 37) +-------------------------------- +105> primary: primaryA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3053 to 3091) SpanInfo: {"start":3061,"length":29} + >primary: primaryA = "primary" + >:=> (line 105, col 8) to (line 105, col 37) +-------------------------------- +106> secondary: secondaryA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3092 to 3135) SpanInfo: {"start":3100,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 106, col 8) to (line 106, col 43) +-------------------------------- +107> } = { primary: "none", secondary: "none" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (3136 to 3182) SpanInfo: {"start":3100,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 106, col 8) to (line 106, col 43) +-------------------------------- +108>} = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~ => Pos: (3183 to 3197) SpanInfo: {"start":3043,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 104, col 4) to (line 107, col 46) +108>} = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (3198 to 3204) SpanInfo: {"start":3199,"length":5} + >i = 0 + >:=> (line 108, col 16) to (line 108, col 21) +108>} = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (3205 to 3211) SpanInfo: {"start":3206,"length":5} + >i < 1 + >:=> (line 108, col 23) to (line 108, col 28) +108>} = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (3212 to 3219) SpanInfo: {"start":3213,"length":3} + >i++ + >:=> (line 108, col 30) to (line 108, col 33) +-------------------------------- +109> console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3220 to 3246) SpanInfo: {"start":3224,"length":21} + >console.log(primaryA) + >:=> (line 109, col 4) to (line 109, col 25) +-------------------------------- +110>} + + ~~ => Pos: (3247 to 3248) SpanInfo: {"start":3224,"length":21} + >console.log(primaryA) + >:=> (line 109, col 4) to (line 109, col 25) +-------------------------------- +111>for ({ + + ~~~~~~~ => Pos: (3249 to 3255) SpanInfo: {"start":3260,"length":22} + >name: nameA = "noName" + >:=> (line 112, col 4) to (line 112, col 26) +-------------------------------- +112> name: nameA = "noName", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3256 to 3283) SpanInfo: {"start":3260,"length":22} + >name: nameA = "noName" + >:=> (line 112, col 4) to (line 112, col 26) +-------------------------------- +113> skills: { + + ~~~~~~~~~~~ => Pos: (3284 to 3294) SpanInfo: {"start":3288,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 113, col 4) to (line 116, col 46) +113> skills: { + + ~~~ => Pos: (3295 to 3297) SpanInfo: {"start":3306,"length":29} + >primary: primaryA = "primary" + >:=> (line 114, col 8) to (line 114, col 37) +-------------------------------- +114> primary: primaryA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3298 to 3336) SpanInfo: {"start":3306,"length":29} + >primary: primaryA = "primary" + >:=> (line 114, col 8) to (line 114, col 37) +-------------------------------- +115> secondary: secondaryA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3337 to 3380) SpanInfo: {"start":3345,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 115, col 8) to (line 115, col 43) +-------------------------------- +116> } = { primary: "none", secondary: "none" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (3381 to 3427) SpanInfo: {"start":3345,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 115, col 8) to (line 115, col 43) +-------------------------------- +117>} = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (3428 to 3447) SpanInfo: {"start":3288,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 113, col 4) to (line 116, col 46) +117>} = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (3448 to 3454) SpanInfo: {"start":3449,"length":5} + >i = 0 + >:=> (line 117, col 21) to (line 117, col 26) +117>} = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (3455 to 3461) SpanInfo: {"start":3456,"length":5} + >i < 1 + >:=> (line 117, col 28) to (line 117, col 33) +117>} = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (3462 to 3469) SpanInfo: {"start":3463,"length":3} + >i++ + >:=> (line 117, col 35) to (line 117, col 38) +-------------------------------- +118> console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3470 to 3496) SpanInfo: {"start":3474,"length":21} + >console.log(primaryA) + >:=> (line 118, col 4) to (line 118, col 25) +-------------------------------- +119>} + + ~~ => Pos: (3497 to 3498) SpanInfo: {"start":3474,"length":21} + >console.log(primaryA) + >:=> (line 118, col 4) to (line 118, col 25) +-------------------------------- +120>for ({ + + ~~~~~~~ => Pos: (3499 to 3505) SpanInfo: {"start":3510,"length":22} + >name: nameA = "noName" + >:=> (line 121, col 4) to (line 121, col 26) +-------------------------------- +121> name: nameA = "noName", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3506 to 3533) SpanInfo: {"start":3510,"length":22} + >name: nameA = "noName" + >:=> (line 121, col 4) to (line 121, col 26) +-------------------------------- +122> skills: { + + ~~~~~~~~~~~ => Pos: (3534 to 3544) SpanInfo: {"start":3538,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 122, col 4) to (line 125, col 46) +122> skills: { + + ~~~ => Pos: (3545 to 3547) SpanInfo: {"start":3556,"length":29} + >primary: primaryA = "primary" + >:=> (line 123, col 8) to (line 123, col 37) +-------------------------------- +123> primary: primaryA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3548 to 3586) SpanInfo: {"start":3556,"length":29} + >primary: primaryA = "primary" + >:=> (line 123, col 8) to (line 123, col 37) +-------------------------------- +124> secondary: secondaryA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3587 to 3630) SpanInfo: {"start":3595,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 124, col 8) to (line 124, col 43) +-------------------------------- +125> } = { primary: "none", secondary: "none" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (3631 to 3677) SpanInfo: {"start":3595,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 124, col 8) to (line 124, col 43) +-------------------------------- +126>} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (3678 to 3768) SpanInfo: {"start":3538,"length":139} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 122, col 4) to (line 125, col 46) +-------------------------------- +127> i = 0; i < 1; i++) { + + ~~~~~~~~~~ => Pos: (3769 to 3778) SpanInfo: {"start":3773,"length":5} + >i = 0 + >:=> (line 127, col 4) to (line 127, col 9) +127> i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (3779 to 3785) SpanInfo: {"start":3780,"length":5} + >i < 1 + >:=> (line 127, col 11) to (line 127, col 16) +127> i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (3786 to 3793) SpanInfo: {"start":3787,"length":3} + >i++ + >:=> (line 127, col 18) to (line 127, col 21) +-------------------------------- +128> console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3794 to 3820) SpanInfo: {"start":3798,"length":21} + >console.log(primaryA) + >:=> (line 128, col 4) to (line 128, col 25) +-------------------------------- +129>} + + ~~ => Pos: (3821 to 3822) SpanInfo: {"start":3798,"length":21} + >console.log(primaryA) + >:=> (line 128, col 4) to (line 128, col 25) +-------------------------------- +130>for ({ name = "noName", skill = "skill" } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3823 to 3845) SpanInfo: {"start":3830,"length":15} + >name = "noName" + >:=> (line 130, col 7) to (line 130, col 22) +130>for ({ name = "noName", skill = "skill" } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (3846 to 3872) SpanInfo: {"start":3847,"length":15} + >skill = "skill" + >:=> (line 130, col 24) to (line 130, col 39) +130>for ({ name = "noName", skill = "skill" } = robot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (3873 to 3879) SpanInfo: {"start":3874,"length":5} + >i = 0 + >:=> (line 130, col 51) to (line 130, col 56) +130>for ({ name = "noName", skill = "skill" } = robot, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (3880 to 3886) SpanInfo: {"start":3881,"length":5} + >i < 1 + >:=> (line 130, col 58) to (line 130, col 63) +130>for ({ name = "noName", skill = "skill" } = robot, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (3887 to 3894) SpanInfo: {"start":3888,"length":3} + >i++ + >:=> (line 130, col 65) to (line 130, col 68) +-------------------------------- +131> console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3895 to 3918) SpanInfo: {"start":3899,"length":18} + >console.log(nameA) + >:=> (line 131, col 4) to (line 131, col 22) +-------------------------------- +132>} + + ~~ => Pos: (3919 to 3920) SpanInfo: {"start":3899,"length":18} + >console.log(nameA) + >:=> (line 131, col 4) to (line 131, col 22) +-------------------------------- +133>for ({ name = "noName", skill = "skill" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3921 to 3943) SpanInfo: {"start":3928,"length":15} + >name = "noName" + >:=> (line 133, col 7) to (line 133, col 22) +133>for ({ name = "noName", skill = "skill" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (3944 to 3975) SpanInfo: {"start":3945,"length":15} + >skill = "skill" + >:=> (line 133, col 24) to (line 133, col 39) +133>for ({ name = "noName", skill = "skill" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (3976 to 3982) SpanInfo: {"start":3977,"length":5} + >i = 0 + >:=> (line 133, col 56) to (line 133, col 61) +133>for ({ name = "noName", skill = "skill" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (3983 to 3989) SpanInfo: {"start":3984,"length":5} + >i < 1 + >:=> (line 133, col 63) to (line 133, col 68) +133>for ({ name = "noName", skill = "skill" } = getRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (3990 to 3997) SpanInfo: {"start":3991,"length":3} + >i++ + >:=> (line 133, col 70) to (line 133, col 73) +-------------------------------- +134> console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3998 to 4021) SpanInfo: {"start":4002,"length":18} + >console.log(nameA) + >:=> (line 134, col 4) to (line 134, col 22) +-------------------------------- +135>} + + ~~ => Pos: (4022 to 4023) SpanInfo: {"start":4002,"length":18} + >console.log(nameA) + >:=> (line 134, col 4) to (line 134, col 22) +-------------------------------- +136>for ({ name = "noName", skill = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (4024 to 4046) SpanInfo: {"start":4031,"length":15} + >name = "noName" + >:=> (line 136, col 7) to (line 136, col 22) +136>for ({ name = "noName", skill = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (4047 to 4113) SpanInfo: {"start":4048,"length":15} + >skill = "skill" + >:=> (line 136, col 24) to (line 136, col 39) +136>for ({ name = "noName", skill = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (4114 to 4120) SpanInfo: {"start":4115,"length":5} + >i = 0 + >:=> (line 136, col 91) to (line 136, col 96) +136>for ({ name = "noName", skill = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~=> Pos: (4121 to 4127) SpanInfo: {"start":4122,"length":5} + >i < 1 + >:=> (line 136, col 98) to (line 136, col 103) +136>for ({ name = "noName", skill = "skill" } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + + ~~~~~~~~=> Pos: (4128 to 4135) SpanInfo: {"start":4129,"length":3} + >i++ + >:=> (line 136, col 105) to (line 136, col 108) +-------------------------------- +137> console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (4136 to 4159) SpanInfo: {"start":4140,"length":18} + >console.log(nameA) + >:=> (line 137, col 4) to (line 137, col 22) +-------------------------------- +138>} + + ~~ => Pos: (4160 to 4161) SpanInfo: {"start":4140,"length":18} + >console.log(nameA) + >:=> (line 137, col 4) to (line 137, col 22) +-------------------------------- +139>for ({ + + ~~~~~~~ => Pos: (4162 to 4168) SpanInfo: {"start":4173,"length":15} + >name = "noName" + >:=> (line 140, col 4) to (line 140, col 19) +-------------------------------- +140> name = "noName", + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (4169 to 4189) SpanInfo: {"start":4173,"length":15} + >name = "noName" + >:=> (line 140, col 4) to (line 140, col 19) +-------------------------------- +141> skills: { + + ~~~~~~~~~~~ => Pos: (4190 to 4200) SpanInfo: {"start":4194,"length":117} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 141, col 4) to (line 144, col 46) +141> skills: { + + ~~~ => Pos: (4201 to 4203) SpanInfo: {"start":4212,"length":19} + >primary = "primary" + >:=> (line 142, col 8) to (line 142, col 27) +-------------------------------- +142> primary = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (4204 to 4232) SpanInfo: {"start":4212,"length":19} + >primary = "primary" + >:=> (line 142, col 8) to (line 142, col 27) +-------------------------------- +143> secondary = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (4233 to 4264) SpanInfo: {"start":4241,"length":23} + >secondary = "secondary" + >:=> (line 143, col 8) to (line 143, col 31) +-------------------------------- +144> } = { primary: "none", secondary: "none" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (4265 to 4311) SpanInfo: {"start":4241,"length":23} + >secondary = "secondary" + >:=> (line 143, col 8) to (line 143, col 31) +-------------------------------- +145>} = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~ => Pos: (4312 to 4326) SpanInfo: {"start":4194,"length":117} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 141, col 4) to (line 144, col 46) +145>} = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (4327 to 4333) SpanInfo: {"start":4328,"length":5} + >i = 0 + >:=> (line 145, col 16) to (line 145, col 21) +145>} = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (4334 to 4340) SpanInfo: {"start":4335,"length":5} + >i < 1 + >:=> (line 145, col 23) to (line 145, col 28) +145>} = multiRobot, i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (4341 to 4348) SpanInfo: {"start":4342,"length":3} + >i++ + >:=> (line 145, col 30) to (line 145, col 33) +-------------------------------- +146> console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (4349 to 4375) SpanInfo: {"start":4353,"length":21} + >console.log(primaryA) + >:=> (line 146, col 4) to (line 146, col 25) +-------------------------------- +147>} + + ~~ => Pos: (4376 to 4377) SpanInfo: {"start":4353,"length":21} + >console.log(primaryA) + >:=> (line 146, col 4) to (line 146, col 25) +-------------------------------- +148>for ({ + + ~~~~~~~ => Pos: (4378 to 4384) SpanInfo: {"start":4389,"length":15} + >name = "noName" + >:=> (line 149, col 4) to (line 149, col 19) +-------------------------------- +149> name = "noName", + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (4385 to 4405) SpanInfo: {"start":4389,"length":15} + >name = "noName" + >:=> (line 149, col 4) to (line 149, col 19) +-------------------------------- +150> skills: { + + ~~~~~~~~~~~ => Pos: (4406 to 4416) SpanInfo: {"start":4410,"length":117} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 150, col 4) to (line 153, col 46) +150> skills: { + + ~~~ => Pos: (4417 to 4419) SpanInfo: {"start":4428,"length":19} + >primary = "primary" + >:=> (line 151, col 8) to (line 151, col 27) +-------------------------------- +151> primary = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (4420 to 4448) SpanInfo: {"start":4428,"length":19} + >primary = "primary" + >:=> (line 151, col 8) to (line 151, col 27) +-------------------------------- +152> secondary = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (4449 to 4480) SpanInfo: {"start":4457,"length":23} + >secondary = "secondary" + >:=> (line 152, col 8) to (line 152, col 31) +-------------------------------- +153> } = { primary: "none", secondary: "none" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (4481 to 4527) SpanInfo: {"start":4457,"length":23} + >secondary = "secondary" + >:=> (line 152, col 8) to (line 152, col 31) +-------------------------------- +154>} = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (4528 to 4547) SpanInfo: {"start":4410,"length":117} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 150, col 4) to (line 153, col 46) +154>} = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (4548 to 4554) SpanInfo: {"start":4549,"length":5} + >i = 0 + >:=> (line 154, col 21) to (line 154, col 26) +154>} = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (4555 to 4561) SpanInfo: {"start":4556,"length":5} + >i < 1 + >:=> (line 154, col 28) to (line 154, col 33) +154>} = getMultiRobot(), i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (4562 to 4569) SpanInfo: {"start":4563,"length":3} + >i++ + >:=> (line 154, col 35) to (line 154, col 38) +-------------------------------- +155> console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (4570 to 4596) SpanInfo: {"start":4574,"length":21} + >console.log(primaryA) + >:=> (line 155, col 4) to (line 155, col 25) +-------------------------------- +156>} + + ~~ => Pos: (4597 to 4598) SpanInfo: {"start":4574,"length":21} + >console.log(primaryA) + >:=> (line 155, col 4) to (line 155, col 25) +-------------------------------- +157>for ({ + + ~~~~~~~ => Pos: (4599 to 4605) SpanInfo: {"start":4610,"length":15} + >name = "noName" + >:=> (line 158, col 4) to (line 158, col 19) +-------------------------------- +158> name = "noName", + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (4606 to 4626) SpanInfo: {"start":4610,"length":15} + >name = "noName" + >:=> (line 158, col 4) to (line 158, col 19) +-------------------------------- +159> skills: { + + ~~~~~~~~~~~ => Pos: (4627 to 4637) SpanInfo: {"start":4631,"length":117} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 159, col 4) to (line 162, col 46) +159> skills: { + + ~~~ => Pos: (4638 to 4640) SpanInfo: {"start":4649,"length":19} + >primary = "primary" + >:=> (line 160, col 8) to (line 160, col 27) +-------------------------------- +160> primary = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (4641 to 4669) SpanInfo: {"start":4649,"length":19} + >primary = "primary" + >:=> (line 160, col 8) to (line 160, col 27) +-------------------------------- +161> secondary = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (4670 to 4701) SpanInfo: {"start":4678,"length":23} + >secondary = "secondary" + >:=> (line 161, col 8) to (line 161, col 31) +-------------------------------- +162> } = { primary: "none", secondary: "none" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (4702 to 4748) SpanInfo: {"start":4678,"length":23} + >secondary = "secondary" + >:=> (line 161, col 8) to (line 161, col 31) +-------------------------------- +163>} = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (4749 to 4839) SpanInfo: {"start":4631,"length":117} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "none", secondary: "none" } + >:=> (line 159, col 4) to (line 162, col 46) +-------------------------------- +164> i = 0; i < 1; i++) { + + ~~~~~~~~~~ => Pos: (4840 to 4849) SpanInfo: {"start":4844,"length":5} + >i = 0 + >:=> (line 164, col 4) to (line 164, col 9) +164> i = 0; i < 1; i++) { + + ~~~~~~~ => Pos: (4850 to 4856) SpanInfo: {"start":4851,"length":5} + >i < 1 + >:=> (line 164, col 11) to (line 164, col 16) +164> i = 0; i < 1; i++) { + + ~~~~~~~~ => Pos: (4857 to 4864) SpanInfo: {"start":4858,"length":3} + >i++ + >:=> (line 164, col 18) to (line 164, col 21) +-------------------------------- +165> console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (4865 to 4891) SpanInfo: {"start":4869,"length":21} + >console.log(primaryA) + >:=> (line 165, col 4) to (line 165, col 25) +-------------------------------- +166>} + ~ => Pos: (4892 to 4892) SpanInfo: {"start":4869,"length":21} + >console.log(primaryA) + >:=> (line 165, col 4) to (line 165, col 25) \ No newline at end of file From 05ef3d52629a02ab66f495951b64f8eaffba6343 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 22 Dec 2015 16:18:05 -0800 Subject: [PATCH 086/209] Add test cases for breakpoint validation in for of statement with object literal destructuring assignment --- ...signmentForOfObjectBindingPattern.baseline | 943 +++++++++++++ ...ObjectBindingPatternDefaultValues.baseline | 1223 +++++++++++++++++ ...ringAssignmentForOfObjectBindingPattern.ts | 104 ++ ...tForOfObjectBindingPatternDefaultValues.ts | 159 +++ 4 files changed, 2429 insertions(+) create mode 100644 tests/baselines/reference/bpSpanDestructuringAssignmentForOfObjectBindingPattern.baseline create mode 100644 tests/baselines/reference/bpSpanDestructuringAssignmentForOfObjectBindingPatternDefaultValues.baseline create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringAssignmentForOfObjectBindingPattern.ts create mode 100644 tests/cases/fourslash/breakpointValidationDestructuringAssignmentForOfObjectBindingPatternDefaultValues.ts diff --git a/tests/baselines/reference/bpSpanDestructuringAssignmentForOfObjectBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringAssignmentForOfObjectBindingPattern.baseline new file mode 100644 index 00000000000..b303f33026a --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringAssignmentForOfObjectBindingPattern.baseline @@ -0,0 +1,943 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: any): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (48 to 49) SpanInfo: undefined +-------------------------------- +4 >interface Robot { + + ~~~~~~~~~~~~~~~~~~ => Pos: (50 to 67) SpanInfo: undefined +-------------------------------- +5 > name: string; + + ~~~~~~~~~~~~~~~~~~ => Pos: (68 to 85) SpanInfo: undefined +-------------------------------- +6 > skill: string; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (86 to 104) SpanInfo: undefined +-------------------------------- +7 >} + + ~~ => Pos: (105 to 106) SpanInfo: undefined +-------------------------------- +8 >interface MultiRobot { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (107 to 129) SpanInfo: undefined +-------------------------------- +9 > name: string; + + ~~~~~~~~~~~~~~~~~~ => Pos: (130 to 147) SpanInfo: undefined +-------------------------------- +10 > skills: { + + ~~~~~~~~~~~~~~ => Pos: (148 to 161) SpanInfo: undefined +-------------------------------- +11 > primary: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (162 to 186) SpanInfo: undefined +-------------------------------- +12 > secondary: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (187 to 213) SpanInfo: undefined +-------------------------------- +13 > }; + + ~~~~~~~ => Pos: (214 to 220) SpanInfo: undefined +-------------------------------- +14 >} + + ~~ => Pos: (221 to 222) SpanInfo: undefined +-------------------------------- +15 >let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (223 to 322) SpanInfo: {"start":223,"length":98} + >let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] + >:=> (line 15, col 0) to (line 15, col 98) +-------------------------------- +16 >let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (323 to 424) SpanInfo: {"start":323,"length":180} + >let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 16, col 0) to (line 17, col 78) +-------------------------------- +17 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (425 to 504) SpanInfo: {"start":323,"length":180} + >let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 16, col 0) to (line 17, col 78) +-------------------------------- +18 >function getRobots() { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (505 to 527) SpanInfo: {"start":532,"length":13} + >return robots + >:=> (line 19, col 4) to (line 19, col 17) +-------------------------------- +19 > return robots; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (528 to 546) SpanInfo: {"start":532,"length":13} + >return robots + >:=> (line 19, col 4) to (line 19, col 17) +-------------------------------- +20 >} + + ~~ => Pos: (547 to 548) SpanInfo: {"start":547,"length":1} + >} + >:=> (line 20, col 0) to (line 20, col 1) +-------------------------------- +21 >function getMultiRobots() { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (549 to 576) SpanInfo: {"start":581,"length":18} + >return multiRobots + >:=> (line 22, col 4) to (line 22, col 22) +-------------------------------- +22 > return multiRobots; + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (577 to 600) SpanInfo: {"start":581,"length":18} + >return multiRobots + >:=> (line 22, col 4) to (line 22, col 22) +-------------------------------- +23 >} + + ~~ => Pos: (601 to 602) SpanInfo: {"start":601,"length":1} + >} + >:=> (line 23, col 0) to (line 23, col 1) +-------------------------------- +24 >let nameA: string, primaryA: string, secondaryA: string, i: number, skillA: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (603 to 686) SpanInfo: undefined +-------------------------------- +25 >let name: string, primary: string, secondary: string, skill: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (687 to 755) SpanInfo: undefined +-------------------------------- +26 >for ({name: nameA } of robots) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (756 to 774) SpanInfo: {"start":762,"length":11} + >name: nameA + >:=> (line 26, col 6) to (line 26, col 17) +26 >for ({name: nameA } of robots) { + + ~~~~~~~~~~~~~~ => Pos: (775 to 788) SpanInfo: {"start":779,"length":6} + >robots + >:=> (line 26, col 23) to (line 26, col 29) +-------------------------------- +27 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (789 to 812) SpanInfo: {"start":793,"length":18} + >console.log(nameA) + >:=> (line 27, col 4) to (line 27, col 22) +-------------------------------- +28 >} + + ~~ => Pos: (813 to 814) SpanInfo: {"start":793,"length":18} + >console.log(nameA) + >:=> (line 27, col 4) to (line 27, col 22) +-------------------------------- +29 >for ({name: nameA } of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (815 to 833) SpanInfo: {"start":821,"length":11} + >name: nameA + >:=> (line 29, col 6) to (line 29, col 17) +29 >for ({name: nameA } of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (834 to 852) SpanInfo: {"start":838,"length":11} + >getRobots() + >:=> (line 29, col 23) to (line 29, col 34) +-------------------------------- +30 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (853 to 876) SpanInfo: {"start":857,"length":18} + >console.log(nameA) + >:=> (line 30, col 4) to (line 30, col 22) +-------------------------------- +31 >} + + ~~ => Pos: (877 to 878) SpanInfo: {"start":857,"length":18} + >console.log(nameA) + >:=> (line 30, col 4) to (line 30, col 22) +-------------------------------- +32 >for ({name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (879 to 897) SpanInfo: {"start":885,"length":11} + >name: nameA + >:=> (line 32, col 6) to (line 32, col 17) +32 >for ({name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (898 to 981) SpanInfo: {"start":902,"length":76} + >[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] + >:=> (line 32, col 23) to (line 32, col 99) +-------------------------------- +33 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (982 to 1005) SpanInfo: {"start":986,"length":18} + >console.log(nameA) + >:=> (line 33, col 4) to (line 33, col 22) +-------------------------------- +34 >} + + ~~ => Pos: (1006 to 1007) SpanInfo: {"start":986,"length":18} + >console.log(nameA) + >:=> (line 33, col 4) to (line 33, col 22) +-------------------------------- +35 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + + ~~~~~~~~~~~~~~ => Pos: (1008 to 1021) SpanInfo: {"start":1015,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 35, col 7) to (line 35, col 59) +35 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (1022 to 1042) SpanInfo: {"start":1025,"length":17} + >primary: primaryA + >:=> (line 35, col 17) to (line 35, col 34) +35 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1043 to 1066) SpanInfo: {"start":1044,"length":21} + >secondary: secondaryA + >:=> (line 35, col 36) to (line 35, col 57) +35 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + + ~~=> Pos: (1067 to 1068) SpanInfo: {"start":1015,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 35, col 7) to (line 35, col 59) +35 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (1069 to 1087) SpanInfo: {"start":1073,"length":11} + >multiRobots + >:=> (line 35, col 65) to (line 35, col 76) +-------------------------------- +36 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1088 to 1114) SpanInfo: {"start":1092,"length":21} + >console.log(primaryA) + >:=> (line 36, col 4) to (line 36, col 25) +-------------------------------- +37 >} + + ~~ => Pos: (1115 to 1116) SpanInfo: {"start":1092,"length":21} + >console.log(primaryA) + >:=> (line 36, col 4) to (line 36, col 25) +-------------------------------- +38 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~~~~~~~~~~~~~ => Pos: (1117 to 1130) SpanInfo: {"start":1124,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 38, col 7) to (line 38, col 59) +38 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (1131 to 1151) SpanInfo: {"start":1134,"length":17} + >primary: primaryA + >:=> (line 38, col 17) to (line 38, col 34) +38 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1152 to 1175) SpanInfo: {"start":1153,"length":21} + >secondary: secondaryA + >:=> (line 38, col 36) to (line 38, col 57) +38 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~=> Pos: (1176 to 1177) SpanInfo: {"start":1124,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 38, col 7) to (line 38, col 59) +38 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1178 to 1201) SpanInfo: {"start":1182,"length":16} + >getMultiRobots() + >:=> (line 38, col 65) to (line 38, col 81) +-------------------------------- +39 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1202 to 1228) SpanInfo: {"start":1206,"length":21} + >console.log(primaryA) + >:=> (line 39, col 4) to (line 39, col 25) +-------------------------------- +40 >} + + ~~ => Pos: (1229 to 1230) SpanInfo: {"start":1206,"length":21} + >console.log(primaryA) + >:=> (line 39, col 4) to (line 39, col 25) +-------------------------------- +41 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~ => Pos: (1231 to 1244) SpanInfo: {"start":1238,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 41, col 7) to (line 41, col 59) +41 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (1245 to 1265) SpanInfo: {"start":1248,"length":17} + >primary: primaryA + >:=> (line 41, col 17) to (line 41, col 34) +41 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1266 to 1289) SpanInfo: {"start":1267,"length":21} + >secondary: secondaryA + >:=> (line 41, col 36) to (line 41, col 57) +41 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~=> Pos: (1290 to 1291) SpanInfo: {"start":1238,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 41, col 7) to (line 41, col 59) +41 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1292 to 1365) SpanInfo: {"start":1296,"length":148} + >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 41, col 65) to (line 42, col 78) +-------------------------------- +42 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1366 to 1447) SpanInfo: {"start":1296,"length":148} + >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 41, col 65) to (line 42, col 78) +-------------------------------- +43 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1448 to 1474) SpanInfo: {"start":1452,"length":21} + >console.log(primaryA) + >:=> (line 43, col 4) to (line 43, col 25) +-------------------------------- +44 >} + + ~~ => Pos: (1475 to 1476) SpanInfo: {"start":1452,"length":21} + >console.log(primaryA) + >:=> (line 43, col 4) to (line 43, col 25) +-------------------------------- +45 >for ({name } of robots) { + + ~~~~~~~~~~~~ => Pos: (1477 to 1488) SpanInfo: {"start":1483,"length":4} + >name + >:=> (line 45, col 6) to (line 45, col 10) +45 >for ({name } of robots) { + + ~~~~~~~~~~~~~~ => Pos: (1489 to 1502) SpanInfo: {"start":1493,"length":6} + >robots + >:=> (line 45, col 16) to (line 45, col 22) +-------------------------------- +46 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1503 to 1526) SpanInfo: {"start":1507,"length":18} + >console.log(nameA) + >:=> (line 46, col 4) to (line 46, col 22) +-------------------------------- +47 >} + + ~~ => Pos: (1527 to 1528) SpanInfo: {"start":1507,"length":18} + >console.log(nameA) + >:=> (line 46, col 4) to (line 46, col 22) +-------------------------------- +48 >for ({name } of getRobots()) { + + ~~~~~~~~~~~~ => Pos: (1529 to 1540) SpanInfo: {"start":1535,"length":4} + >name + >:=> (line 48, col 6) to (line 48, col 10) +48 >for ({name } of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1541 to 1559) SpanInfo: {"start":1545,"length":11} + >getRobots() + >:=> (line 48, col 16) to (line 48, col 27) +-------------------------------- +49 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1560 to 1583) SpanInfo: {"start":1564,"length":18} + >console.log(nameA) + >:=> (line 49, col 4) to (line 49, col 22) +-------------------------------- +50 >} + + ~~ => Pos: (1584 to 1585) SpanInfo: {"start":1564,"length":18} + >console.log(nameA) + >:=> (line 49, col 4) to (line 49, col 22) +-------------------------------- +51 >for ({name } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~ => Pos: (1586 to 1597) SpanInfo: {"start":1592,"length":4} + >name + >:=> (line 51, col 6) to (line 51, col 10) +51 >for ({name } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1598 to 1681) SpanInfo: {"start":1602,"length":76} + >[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] + >:=> (line 51, col 16) to (line 51, col 92) +-------------------------------- +52 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1682 to 1705) SpanInfo: {"start":1686,"length":18} + >console.log(nameA) + >:=> (line 52, col 4) to (line 52, col 22) +-------------------------------- +53 >} + + ~~ => Pos: (1706 to 1707) SpanInfo: {"start":1686,"length":18} + >console.log(nameA) + >:=> (line 52, col 4) to (line 52, col 22) +-------------------------------- +54 >for ({ skills: { primary, secondary } } of multiRobots) { + + ~~~~~~~~~~~~~~ => Pos: (1708 to 1721) SpanInfo: {"start":1715,"length":30} + >skills: { primary, secondary } + >:=> (line 54, col 7) to (line 54, col 37) +54 >for ({ skills: { primary, secondary } } of multiRobots) { + + ~~~~~~~~~~~ => Pos: (1722 to 1732) SpanInfo: {"start":1725,"length":7} + >primary + >:=> (line 54, col 17) to (line 54, col 24) +54 >for ({ skills: { primary, secondary } } of multiRobots) { + + ~~~~~~~~~~~~ => Pos: (1733 to 1744) SpanInfo: {"start":1734,"length":9} + >secondary + >:=> (line 54, col 26) to (line 54, col 35) +54 >for ({ skills: { primary, secondary } } of multiRobots) { + + ~~ => Pos: (1745 to 1746) SpanInfo: {"start":1715,"length":30} + >skills: { primary, secondary } + >:=> (line 54, col 7) to (line 54, col 37) +54 >for ({ skills: { primary, secondary } } of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (1747 to 1765) SpanInfo: {"start":1751,"length":11} + >multiRobots + >:=> (line 54, col 43) to (line 54, col 54) +-------------------------------- +55 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1766 to 1792) SpanInfo: {"start":1770,"length":21} + >console.log(primaryA) + >:=> (line 55, col 4) to (line 55, col 25) +-------------------------------- +56 >} + + ~~ => Pos: (1793 to 1794) SpanInfo: {"start":1770,"length":21} + >console.log(primaryA) + >:=> (line 55, col 4) to (line 55, col 25) +-------------------------------- +57 >for ({ skills: { primary, secondary } } of getMultiRobots()) { + + ~~~~~~~~~~~~~~ => Pos: (1795 to 1808) SpanInfo: {"start":1802,"length":30} + >skills: { primary, secondary } + >:=> (line 57, col 7) to (line 57, col 37) +57 >for ({ skills: { primary, secondary } } of getMultiRobots()) { + + ~~~~~~~~~~~ => Pos: (1809 to 1819) SpanInfo: {"start":1812,"length":7} + >primary + >:=> (line 57, col 17) to (line 57, col 24) +57 >for ({ skills: { primary, secondary } } of getMultiRobots()) { + + ~~~~~~~~~~~~ => Pos: (1820 to 1831) SpanInfo: {"start":1821,"length":9} + >secondary + >:=> (line 57, col 26) to (line 57, col 35) +57 >for ({ skills: { primary, secondary } } of getMultiRobots()) { + + ~~ => Pos: (1832 to 1833) SpanInfo: {"start":1802,"length":30} + >skills: { primary, secondary } + >:=> (line 57, col 7) to (line 57, col 37) +57 >for ({ skills: { primary, secondary } } of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1834 to 1857) SpanInfo: {"start":1838,"length":16} + >getMultiRobots() + >:=> (line 57, col 43) to (line 57, col 59) +-------------------------------- +58 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1858 to 1884) SpanInfo: {"start":1862,"length":21} + >console.log(primaryA) + >:=> (line 58, col 4) to (line 58, col 25) +-------------------------------- +59 >} + + ~~ => Pos: (1885 to 1886) SpanInfo: {"start":1862,"length":21} + >console.log(primaryA) + >:=> (line 58, col 4) to (line 58, col 25) +-------------------------------- +60 >for ({ skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~ => Pos: (1887 to 1900) SpanInfo: {"start":1894,"length":30} + >skills: { primary, secondary } + >:=> (line 60, col 7) to (line 60, col 37) +60 >for ({ skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~ => Pos: (1901 to 1911) SpanInfo: {"start":1904,"length":7} + >primary + >:=> (line 60, col 17) to (line 60, col 24) +60 >for ({ skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~ => Pos: (1912 to 1923) SpanInfo: {"start":1913,"length":9} + >secondary + >:=> (line 60, col 26) to (line 60, col 35) +60 >for ({ skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~ => Pos: (1924 to 1925) SpanInfo: {"start":1894,"length":30} + >skills: { primary, secondary } + >:=> (line 60, col 7) to (line 60, col 37) +60 >for ({ skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1926 to 1999) SpanInfo: {"start":1930,"length":148} + >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 60, col 43) to (line 61, col 78) +-------------------------------- +61 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2000 to 2081) SpanInfo: {"start":1930,"length":148} + >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 60, col 43) to (line 61, col 78) +-------------------------------- +62 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2082 to 2108) SpanInfo: {"start":2086,"length":21} + >console.log(primaryA) + >:=> (line 62, col 4) to (line 62, col 25) +-------------------------------- +63 >} + + ~~ => Pos: (2109 to 2110) SpanInfo: {"start":2086,"length":21} + >console.log(primaryA) + >:=> (line 62, col 4) to (line 62, col 25) +-------------------------------- +64 >for ({name: nameA, skill: skillA } of robots) { + + ~~~~~~~~~~~~~~~~~~ => Pos: (2111 to 2128) SpanInfo: {"start":2117,"length":11} + >name: nameA + >:=> (line 64, col 6) to (line 64, col 17) +64 >for ({name: nameA, skill: skillA } of robots) { + + ~~~~~~~~~~~~~~~~ => Pos: (2129 to 2144) SpanInfo: {"start":2130,"length":13} + >skill: skillA + >:=> (line 64, col 19) to (line 64, col 32) +64 >for ({name: nameA, skill: skillA } of robots) { + + ~~~~~~~~~~~~~~=> Pos: (2145 to 2158) SpanInfo: {"start":2149,"length":6} + >robots + >:=> (line 64, col 38) to (line 64, col 44) +-------------------------------- +65 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2159 to 2182) SpanInfo: {"start":2163,"length":18} + >console.log(nameA) + >:=> (line 65, col 4) to (line 65, col 22) +-------------------------------- +66 >} + + ~~ => Pos: (2183 to 2184) SpanInfo: {"start":2163,"length":18} + >console.log(nameA) + >:=> (line 65, col 4) to (line 65, col 22) +-------------------------------- +67 >for ({name: nameA, skill: skillA } of getRobots()) { + + ~~~~~~~~~~~~~~~~~~ => Pos: (2185 to 2202) SpanInfo: {"start":2191,"length":11} + >name: nameA + >:=> (line 67, col 6) to (line 67, col 17) +67 >for ({name: nameA, skill: skillA } of getRobots()) { + + ~~~~~~~~~~~~~~~~ => Pos: (2203 to 2218) SpanInfo: {"start":2204,"length":13} + >skill: skillA + >:=> (line 67, col 19) to (line 67, col 32) +67 >for ({name: nameA, skill: skillA } of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (2219 to 2237) SpanInfo: {"start":2223,"length":11} + >getRobots() + >:=> (line 67, col 38) to (line 67, col 49) +-------------------------------- +68 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2238 to 2261) SpanInfo: {"start":2242,"length":18} + >console.log(nameA) + >:=> (line 68, col 4) to (line 68, col 22) +-------------------------------- +69 >} + + ~~ => Pos: (2262 to 2263) SpanInfo: {"start":2242,"length":18} + >console.log(nameA) + >:=> (line 68, col 4) to (line 68, col 22) +-------------------------------- +70 >for ({name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~~~~~~~ => Pos: (2264 to 2281) SpanInfo: {"start":2270,"length":11} + >name: nameA + >:=> (line 70, col 6) to (line 70, col 17) +70 >for ({name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~~~~~ => Pos: (2282 to 2297) SpanInfo: {"start":2283,"length":13} + >skill: skillA + >:=> (line 70, col 19) to (line 70, col 32) +70 >for ({name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2298 to 2381) SpanInfo: {"start":2302,"length":76} + >[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] + >:=> (line 70, col 38) to (line 70, col 114) +-------------------------------- +71 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2382 to 2405) SpanInfo: {"start":2386,"length":18} + >console.log(nameA) + >:=> (line 71, col 4) to (line 71, col 22) +-------------------------------- +72 >} + + ~~ => Pos: (2406 to 2407) SpanInfo: {"start":2386,"length":18} + >console.log(nameA) + >:=> (line 71, col 4) to (line 71, col 22) +-------------------------------- +73 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + + ~~~~~~~~~~~~~~~~~~ => Pos: (2408 to 2425) SpanInfo: {"start":2414,"length":11} + >name: nameA + >:=> (line 73, col 6) to (line 73, col 17) +73 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + + ~~~~~~~~ => Pos: (2426 to 2433) SpanInfo: {"start":2427,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 73, col 19) to (line 73, col 71) +73 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~~~=> Pos: (2434 to 2454) SpanInfo: {"start":2437,"length":17} + >primary: primaryA + >:=> (line 73, col 29) to (line 73, col 46) +73 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2455 to 2478) SpanInfo: {"start":2456,"length":21} + >secondary: secondaryA + >:=> (line 73, col 48) to (line 73, col 69) +73 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + + ~~=> Pos: (2479 to 2480) SpanInfo: {"start":2427,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 73, col 19) to (line 73, col 71) +73 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (2481 to 2499) SpanInfo: {"start":2485,"length":11} + >multiRobots + >:=> (line 73, col 77) to (line 73, col 88) +-------------------------------- +74 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2500 to 2523) SpanInfo: {"start":2504,"length":18} + >console.log(nameA) + >:=> (line 74, col 4) to (line 74, col 22) +-------------------------------- +75 >} + + ~~ => Pos: (2524 to 2525) SpanInfo: {"start":2504,"length":18} + >console.log(nameA) + >:=> (line 74, col 4) to (line 74, col 22) +-------------------------------- +76 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~ => Pos: (2526 to 2543) SpanInfo: {"start":2532,"length":11} + >name: nameA + >:=> (line 76, col 6) to (line 76, col 17) +76 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~~~~~~~ => Pos: (2544 to 2551) SpanInfo: {"start":2545,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 76, col 19) to (line 76, col 71) +76 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~=> Pos: (2552 to 2572) SpanInfo: {"start":2555,"length":17} + >primary: primaryA + >:=> (line 76, col 29) to (line 76, col 46) +76 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2573 to 2596) SpanInfo: {"start":2574,"length":21} + >secondary: secondaryA + >:=> (line 76, col 48) to (line 76, col 69) +76 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~=> Pos: (2597 to 2598) SpanInfo: {"start":2545,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 76, col 19) to (line 76, col 71) +76 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2599 to 2622) SpanInfo: {"start":2603,"length":16} + >getMultiRobots() + >:=> (line 76, col 77) to (line 76, col 93) +-------------------------------- +77 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2623 to 2646) SpanInfo: {"start":2627,"length":18} + >console.log(nameA) + >:=> (line 77, col 4) to (line 77, col 22) +-------------------------------- +78 >} + + ~~ => Pos: (2647 to 2648) SpanInfo: {"start":2627,"length":18} + >console.log(nameA) + >:=> (line 77, col 4) to (line 77, col 22) +-------------------------------- +79 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~~~~~ => Pos: (2649 to 2666) SpanInfo: {"start":2655,"length":11} + >name: nameA + >:=> (line 79, col 6) to (line 79, col 17) +79 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~ => Pos: (2667 to 2674) SpanInfo: {"start":2668,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 79, col 19) to (line 79, col 71) +79 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~~~~~~~~=> Pos: (2675 to 2695) SpanInfo: {"start":2678,"length":17} + >primary: primaryA + >:=> (line 79, col 29) to (line 79, col 46) +79 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2696 to 2719) SpanInfo: {"start":2697,"length":21} + >secondary: secondaryA + >:=> (line 79, col 48) to (line 79, col 69) +79 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~=> Pos: (2720 to 2721) SpanInfo: {"start":2668,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 79, col 19) to (line 79, col 71) +79 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2722 to 2795) SpanInfo: {"start":2726,"length":148} + >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 79, col 77) to (line 80, col 78) +-------------------------------- +80 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2796 to 2877) SpanInfo: {"start":2726,"length":148} + >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 79, col 77) to (line 80, col 78) +-------------------------------- +81 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2878 to 2901) SpanInfo: {"start":2882,"length":18} + >console.log(nameA) + >:=> (line 81, col 4) to (line 81, col 22) +-------------------------------- +82 >} + + ~~ => Pos: (2902 to 2903) SpanInfo: {"start":2882,"length":18} + >console.log(nameA) + >:=> (line 81, col 4) to (line 81, col 22) +-------------------------------- +83 >for ({name, skill } of robots) { + + ~~~~~~~~~~~ => Pos: (2904 to 2914) SpanInfo: {"start":2910,"length":4} + >name + >:=> (line 83, col 6) to (line 83, col 10) +83 >for ({name, skill } of robots) { + + ~~~~~~~~ => Pos: (2915 to 2922) SpanInfo: {"start":2916,"length":5} + >skill + >:=> (line 83, col 12) to (line 83, col 17) +83 >for ({name, skill } of robots) { + + ~~~~~~~~~~~~~~ => Pos: (2923 to 2936) SpanInfo: {"start":2927,"length":6} + >robots + >:=> (line 83, col 23) to (line 83, col 29) +-------------------------------- +84 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2937 to 2960) SpanInfo: {"start":2941,"length":18} + >console.log(nameA) + >:=> (line 84, col 4) to (line 84, col 22) +-------------------------------- +85 >} + + ~~ => Pos: (2961 to 2962) SpanInfo: {"start":2941,"length":18} + >console.log(nameA) + >:=> (line 84, col 4) to (line 84, col 22) +-------------------------------- +86 >for ({name, skill } of getRobots()) { + + ~~~~~~~~~~~ => Pos: (2963 to 2973) SpanInfo: {"start":2969,"length":4} + >name + >:=> (line 86, col 6) to (line 86, col 10) +86 >for ({name, skill } of getRobots()) { + + ~~~~~~~~ => Pos: (2974 to 2981) SpanInfo: {"start":2975,"length":5} + >skill + >:=> (line 86, col 12) to (line 86, col 17) +86 >for ({name, skill } of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (2982 to 3000) SpanInfo: {"start":2986,"length":11} + >getRobots() + >:=> (line 86, col 23) to (line 86, col 34) +-------------------------------- +87 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3001 to 3024) SpanInfo: {"start":3005,"length":18} + >console.log(nameA) + >:=> (line 87, col 4) to (line 87, col 22) +-------------------------------- +88 >} + + ~~ => Pos: (3025 to 3026) SpanInfo: {"start":3005,"length":18} + >console.log(nameA) + >:=> (line 87, col 4) to (line 87, col 22) +-------------------------------- +89 >for ({name, skill } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~ => Pos: (3027 to 3037) SpanInfo: {"start":3033,"length":4} + >name + >:=> (line 89, col 6) to (line 89, col 10) +89 >for ({name, skill } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~ => Pos: (3038 to 3045) SpanInfo: {"start":3039,"length":5} + >skill + >:=> (line 89, col 12) to (line 89, col 17) +89 >for ({name, skill } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (3046 to 3129) SpanInfo: {"start":3050,"length":76} + >[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] + >:=> (line 89, col 23) to (line 89, col 99) +-------------------------------- +90 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3130 to 3153) SpanInfo: {"start":3134,"length":18} + >console.log(nameA) + >:=> (line 90, col 4) to (line 90, col 22) +-------------------------------- +91 >} + + ~~ => Pos: (3154 to 3155) SpanInfo: {"start":3134,"length":18} + >console.log(nameA) + >:=> (line 90, col 4) to (line 90, col 22) +-------------------------------- +92 >for ({name, skills: { primary, secondary } } of multiRobots) { + + ~~~~~~~~~~~ => Pos: (3156 to 3166) SpanInfo: {"start":3162,"length":4} + >name + >:=> (line 92, col 6) to (line 92, col 10) +92 >for ({name, skills: { primary, secondary } } of multiRobots) { + + ~~~~~~~~ => Pos: (3167 to 3174) SpanInfo: {"start":3168,"length":30} + >skills: { primary, secondary } + >:=> (line 92, col 12) to (line 92, col 42) +92 >for ({name, skills: { primary, secondary } } of multiRobots) { + + ~~~~~~~~~~~ => Pos: (3175 to 3185) SpanInfo: {"start":3178,"length":7} + >primary + >:=> (line 92, col 22) to (line 92, col 29) +92 >for ({name, skills: { primary, secondary } } of multiRobots) { + + ~~~~~~~~~~~~ => Pos: (3186 to 3197) SpanInfo: {"start":3187,"length":9} + >secondary + >:=> (line 92, col 31) to (line 92, col 40) +92 >for ({name, skills: { primary, secondary } } of multiRobots) { + + ~~ => Pos: (3198 to 3199) SpanInfo: {"start":3168,"length":30} + >skills: { primary, secondary } + >:=> (line 92, col 12) to (line 92, col 42) +92 >for ({name, skills: { primary, secondary } } of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (3200 to 3218) SpanInfo: {"start":3204,"length":11} + >multiRobots + >:=> (line 92, col 48) to (line 92, col 59) +-------------------------------- +93 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3219 to 3242) SpanInfo: {"start":3223,"length":18} + >console.log(nameA) + >:=> (line 93, col 4) to (line 93, col 22) +-------------------------------- +94 >} + + ~~ => Pos: (3243 to 3244) SpanInfo: {"start":3223,"length":18} + >console.log(nameA) + >:=> (line 93, col 4) to (line 93, col 22) +-------------------------------- +95 >for ({name, skills: { primary, secondary } } of getMultiRobots()) { + + ~~~~~~~~~~~ => Pos: (3245 to 3255) SpanInfo: {"start":3251,"length":4} + >name + >:=> (line 95, col 6) to (line 95, col 10) +95 >for ({name, skills: { primary, secondary } } of getMultiRobots()) { + + ~~~~~~~~ => Pos: (3256 to 3263) SpanInfo: {"start":3257,"length":30} + >skills: { primary, secondary } + >:=> (line 95, col 12) to (line 95, col 42) +95 >for ({name, skills: { primary, secondary } } of getMultiRobots()) { + + ~~~~~~~~~~~ => Pos: (3264 to 3274) SpanInfo: {"start":3267,"length":7} + >primary + >:=> (line 95, col 22) to (line 95, col 29) +95 >for ({name, skills: { primary, secondary } } of getMultiRobots()) { + + ~~~~~~~~~~~~ => Pos: (3275 to 3286) SpanInfo: {"start":3276,"length":9} + >secondary + >:=> (line 95, col 31) to (line 95, col 40) +95 >for ({name, skills: { primary, secondary } } of getMultiRobots()) { + + ~~ => Pos: (3287 to 3288) SpanInfo: {"start":3257,"length":30} + >skills: { primary, secondary } + >:=> (line 95, col 12) to (line 95, col 42) +95 >for ({name, skills: { primary, secondary } } of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (3289 to 3312) SpanInfo: {"start":3293,"length":16} + >getMultiRobots() + >:=> (line 95, col 48) to (line 95, col 64) +-------------------------------- +96 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3313 to 3336) SpanInfo: {"start":3317,"length":18} + >console.log(nameA) + >:=> (line 96, col 4) to (line 96, col 22) +-------------------------------- +97 >} + + ~~ => Pos: (3337 to 3338) SpanInfo: {"start":3317,"length":18} + >console.log(nameA) + >:=> (line 96, col 4) to (line 96, col 22) +-------------------------------- +98 >for ({name, skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~ => Pos: (3339 to 3349) SpanInfo: {"start":3345,"length":4} + >name + >:=> (line 98, col 6) to (line 98, col 10) +98 >for ({name, skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~ => Pos: (3350 to 3357) SpanInfo: {"start":3351,"length":30} + >skills: { primary, secondary } + >:=> (line 98, col 12) to (line 98, col 42) +98 >for ({name, skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~ => Pos: (3358 to 3368) SpanInfo: {"start":3361,"length":7} + >primary + >:=> (line 98, col 22) to (line 98, col 29) +98 >for ({name, skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~ => Pos: (3369 to 3380) SpanInfo: {"start":3370,"length":9} + >secondary + >:=> (line 98, col 31) to (line 98, col 40) +98 >for ({name, skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~ => Pos: (3381 to 3382) SpanInfo: {"start":3351,"length":30} + >skills: { primary, secondary } + >:=> (line 98, col 12) to (line 98, col 42) +98 >for ({name, skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (3383 to 3456) SpanInfo: {"start":3387,"length":148} + >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 98, col 48) to (line 99, col 78) +-------------------------------- +99 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (3457 to 3538) SpanInfo: {"start":3387,"length":148} + >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 98, col 48) to (line 99, col 78) +-------------------------------- +100> console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3539 to 3562) SpanInfo: {"start":3543,"length":18} + >console.log(nameA) + >:=> (line 100, col 4) to (line 100, col 22) +-------------------------------- +101>} + ~ => Pos: (3563 to 3563) SpanInfo: {"start":3543,"length":18} + >console.log(nameA) + >:=> (line 100, col 4) to (line 100, col 22) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringAssignmentForOfObjectBindingPatternDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringAssignmentForOfObjectBindingPatternDefaultValues.baseline new file mode 100644 index 00000000000..18a0ebdca34 --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringAssignmentForOfObjectBindingPatternDefaultValues.baseline @@ -0,0 +1,1223 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: any): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (48 to 49) SpanInfo: undefined +-------------------------------- +4 >interface Robot { + + ~~~~~~~~~~~~~~~~~~ => Pos: (50 to 67) SpanInfo: undefined +-------------------------------- +5 > name: string; + + ~~~~~~~~~~~~~~~~~~ => Pos: (68 to 85) SpanInfo: undefined +-------------------------------- +6 > skill: string; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (86 to 104) SpanInfo: undefined +-------------------------------- +7 >} + + ~~ => Pos: (105 to 106) SpanInfo: undefined +-------------------------------- +8 >interface MultiRobot { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (107 to 129) SpanInfo: undefined +-------------------------------- +9 > name: string; + + ~~~~~~~~~~~~~~~~~~ => Pos: (130 to 147) SpanInfo: undefined +-------------------------------- +10 > skills: { + + ~~~~~~~~~~~~~~ => Pos: (148 to 161) SpanInfo: undefined +-------------------------------- +11 > primary: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (162 to 186) SpanInfo: undefined +-------------------------------- +12 > secondary: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (187 to 213) SpanInfo: undefined +-------------------------------- +13 > }; + + ~~~~~~~ => Pos: (214 to 220) SpanInfo: undefined +-------------------------------- +14 >} + + ~~ => Pos: (221 to 222) SpanInfo: undefined +-------------------------------- +15 >let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (223 to 322) SpanInfo: {"start":223,"length":98} + >let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] + >:=> (line 15, col 0) to (line 15, col 98) +-------------------------------- +16 >let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (323 to 424) SpanInfo: {"start":323,"length":180} + >let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 16, col 0) to (line 17, col 78) +-------------------------------- +17 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (425 to 504) SpanInfo: {"start":323,"length":180} + >let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 16, col 0) to (line 17, col 78) +-------------------------------- +18 >function getRobots() { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (505 to 527) SpanInfo: {"start":532,"length":13} + >return robots + >:=> (line 19, col 4) to (line 19, col 17) +-------------------------------- +19 > return robots; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (528 to 546) SpanInfo: {"start":532,"length":13} + >return robots + >:=> (line 19, col 4) to (line 19, col 17) +-------------------------------- +20 >} + + ~~ => Pos: (547 to 548) SpanInfo: {"start":547,"length":1} + >} + >:=> (line 20, col 0) to (line 20, col 1) +-------------------------------- +21 >function getMultiRobots() { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (549 to 576) SpanInfo: {"start":581,"length":18} + >return multiRobots + >:=> (line 22, col 4) to (line 22, col 22) +-------------------------------- +22 > return multiRobots; + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (577 to 600) SpanInfo: {"start":581,"length":18} + >return multiRobots + >:=> (line 22, col 4) to (line 22, col 22) +-------------------------------- +23 >} + + ~~ => Pos: (601 to 602) SpanInfo: {"start":601,"length":1} + >} + >:=> (line 23, col 0) to (line 23, col 1) +-------------------------------- +24 >let nameA: string, primaryA: string, secondaryA: string, i: number, skillA: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (603 to 686) SpanInfo: undefined +-------------------------------- +25 >let name: string, primary: string, secondary: string, skill: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (687 to 755) SpanInfo: undefined +-------------------------------- +26 >for ({name: nameA = "noName" } of robots) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (756 to 785) SpanInfo: {"start":762,"length":22} + >name: nameA = "noName" + >:=> (line 26, col 6) to (line 26, col 28) +26 >for ({name: nameA = "noName" } of robots) { + + ~~~~~~~~~~~~~~ => Pos: (786 to 799) SpanInfo: {"start":790,"length":6} + >robots + >:=> (line 26, col 34) to (line 26, col 40) +-------------------------------- +27 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (800 to 823) SpanInfo: {"start":804,"length":18} + >console.log(nameA) + >:=> (line 27, col 4) to (line 27, col 22) +-------------------------------- +28 >} + + ~~ => Pos: (824 to 825) SpanInfo: {"start":804,"length":18} + >console.log(nameA) + >:=> (line 27, col 4) to (line 27, col 22) +-------------------------------- +29 >for ({name: nameA = "noName" } of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (826 to 855) SpanInfo: {"start":832,"length":22} + >name: nameA = "noName" + >:=> (line 29, col 6) to (line 29, col 28) +29 >for ({name: nameA = "noName" } of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (856 to 874) SpanInfo: {"start":860,"length":11} + >getRobots() + >:=> (line 29, col 34) to (line 29, col 45) +-------------------------------- +30 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (875 to 898) SpanInfo: {"start":879,"length":18} + >console.log(nameA) + >:=> (line 30, col 4) to (line 30, col 22) +-------------------------------- +31 >} + + ~~ => Pos: (899 to 900) SpanInfo: {"start":879,"length":18} + >console.log(nameA) + >:=> (line 30, col 4) to (line 30, col 22) +-------------------------------- +32 >for ({name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (901 to 930) SpanInfo: {"start":907,"length":22} + >name: nameA = "noName" + >:=> (line 32, col 6) to (line 32, col 28) +32 >for ({name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (931 to 1014) SpanInfo: {"start":935,"length":76} + >[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] + >:=> (line 32, col 34) to (line 32, col 110) +-------------------------------- +33 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1015 to 1038) SpanInfo: {"start":1019,"length":18} + >console.log(nameA) + >:=> (line 33, col 4) to (line 33, col 22) +-------------------------------- +34 >} + + ~~ => Pos: (1039 to 1040) SpanInfo: {"start":1019,"length":18} + >console.log(nameA) + >:=> (line 33, col 4) to (line 33, col 22) +-------------------------------- +35 >for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + + ~~~~~~~~~~~~~~ => Pos: (1041 to 1054) SpanInfo: {"start":1048,"length":129} + >skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } + >:=> (line 35, col 7) to (line 36, col 48) +35 >for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1055 to 1087) SpanInfo: {"start":1058,"length":29} + >primary: primaryA = "primary" + >:=> (line 35, col 17) to (line 35, col 46) +35 >for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1088 to 1128) SpanInfo: {"start":1089,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 35, col 48) to (line 35, col 83) +-------------------------------- +36 > { primary: "nosKill", secondary: "noSkill" } } of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1129 to 1176) SpanInfo: {"start":1089,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 35, col 48) to (line 35, col 83) +36 > { primary: "nosKill", secondary: "noSkill" } } of multiRobots) { + + ~~=> Pos: (1177 to 1178) SpanInfo: {"start":1048,"length":129} + >skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } + >:=> (line 35, col 7) to (line 36, col 48) +36 > { primary: "nosKill", secondary: "noSkill" } } of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (1179 to 1197) SpanInfo: {"start":1183,"length":11} + >multiRobots + >:=> (line 36, col 54) to (line 36, col 65) +-------------------------------- +37 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1198 to 1224) SpanInfo: {"start":1202,"length":21} + >console.log(primaryA) + >:=> (line 37, col 4) to (line 37, col 25) +-------------------------------- +38 >} + + ~~ => Pos: (1225 to 1226) SpanInfo: {"start":1202,"length":21} + >console.log(primaryA) + >:=> (line 37, col 4) to (line 37, col 25) +-------------------------------- +39 >for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + + ~~~~~~~~~~~~~~ => Pos: (1227 to 1240) SpanInfo: {"start":1234,"length":129} + >skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } + >:=> (line 39, col 7) to (line 40, col 48) +39 >for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1241 to 1273) SpanInfo: {"start":1244,"length":29} + >primary: primaryA = "primary" + >:=> (line 39, col 17) to (line 39, col 46) +39 >for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1274 to 1314) SpanInfo: {"start":1275,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 39, col 48) to (line 39, col 83) +-------------------------------- +40 > { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1315 to 1362) SpanInfo: {"start":1275,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 39, col 48) to (line 39, col 83) +40 > { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) { + + ~~=> Pos: (1363 to 1364) SpanInfo: {"start":1234,"length":129} + >skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } + >:=> (line 39, col 7) to (line 40, col 48) +40 > { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1365 to 1388) SpanInfo: {"start":1369,"length":16} + >getMultiRobots() + >:=> (line 40, col 54) to (line 40, col 70) +-------------------------------- +41 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1389 to 1415) SpanInfo: {"start":1393,"length":21} + >console.log(primaryA) + >:=> (line 41, col 4) to (line 41, col 25) +-------------------------------- +42 >} + + ~~ => Pos: (1416 to 1417) SpanInfo: {"start":1393,"length":21} + >console.log(primaryA) + >:=> (line 41, col 4) to (line 41, col 25) +-------------------------------- +43 >for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + + ~~~~~~~~~~~~~~ => Pos: (1418 to 1431) SpanInfo: {"start":1425,"length":129} + >skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } + >:=> (line 43, col 7) to (line 44, col 48) +43 >for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1432 to 1464) SpanInfo: {"start":1435,"length":29} + >primary: primaryA = "primary" + >:=> (line 43, col 17) to (line 43, col 46) +43 >for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1465 to 1505) SpanInfo: {"start":1466,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 43, col 48) to (line 43, col 83) +-------------------------------- +44 > { primary: "nosKill", secondary: "noSkill" } } of + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1506 to 1553) SpanInfo: {"start":1466,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 43, col 48) to (line 43, col 83) +44 > { primary: "nosKill", secondary: "noSkill" } } of + + ~~=> Pos: (1554 to 1555) SpanInfo: {"start":1425,"length":129} + >skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = + > { primary: "nosKill", secondary: "noSkill" } + >:=> (line 43, col 7) to (line 44, col 48) +44 > { primary: "nosKill", secondary: "noSkill" } } of + + ~~~~=> Pos: (1556 to 1559) SpanInfo: {"start":1564,"length":166} + >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 45, col 4) to (line 46, col 82) +-------------------------------- +45 > [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1560 to 1647) SpanInfo: {"start":1564,"length":166} + >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 45, col 4) to (line 46, col 82) +-------------------------------- +46 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1648 to 1733) SpanInfo: {"start":1564,"length":166} + >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 45, col 4) to (line 46, col 82) +-------------------------------- +47 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1734 to 1760) SpanInfo: {"start":1738,"length":21} + >console.log(primaryA) + >:=> (line 47, col 4) to (line 47, col 25) +-------------------------------- +48 >} + + ~~ => Pos: (1761 to 1762) SpanInfo: {"start":1738,"length":21} + >console.log(primaryA) + >:=> (line 47, col 4) to (line 47, col 25) +-------------------------------- +49 >for ({ name = "noName" } of robots) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1763 to 1786) SpanInfo: {"start":1770,"length":15} + >name = "noName" + >:=> (line 49, col 7) to (line 49, col 22) +49 >for ({ name = "noName" } of robots) { + + ~~~~~~~~~~~~~~ => Pos: (1787 to 1800) SpanInfo: {"start":1791,"length":6} + >robots + >:=> (line 49, col 28) to (line 49, col 34) +-------------------------------- +50 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1801 to 1824) SpanInfo: {"start":1805,"length":18} + >console.log(nameA) + >:=> (line 50, col 4) to (line 50, col 22) +-------------------------------- +51 >} + + ~~ => Pos: (1825 to 1826) SpanInfo: {"start":1805,"length":18} + >console.log(nameA) + >:=> (line 50, col 4) to (line 50, col 22) +-------------------------------- +52 >for ({ name = "noName" } of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1827 to 1850) SpanInfo: {"start":1834,"length":15} + >name = "noName" + >:=> (line 52, col 7) to (line 52, col 22) +52 >for ({ name = "noName" } of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (1851 to 1869) SpanInfo: {"start":1855,"length":11} + >getRobots() + >:=> (line 52, col 28) to (line 52, col 39) +-------------------------------- +53 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1870 to 1893) SpanInfo: {"start":1874,"length":18} + >console.log(nameA) + >:=> (line 53, col 4) to (line 53, col 22) +-------------------------------- +54 >} + + ~~ => Pos: (1894 to 1895) SpanInfo: {"start":1874,"length":18} + >console.log(nameA) + >:=> (line 53, col 4) to (line 53, col 22) +-------------------------------- +55 >for ({ name = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1896 to 1919) SpanInfo: {"start":1903,"length":15} + >name = "noName" + >:=> (line 55, col 7) to (line 55, col 22) +55 >for ({ name = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1920 to 2003) SpanInfo: {"start":1924,"length":76} + >[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] + >:=> (line 55, col 28) to (line 55, col 104) +-------------------------------- +56 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2004 to 2027) SpanInfo: {"start":2008,"length":18} + >console.log(nameA) + >:=> (line 56, col 4) to (line 56, col 22) +-------------------------------- +57 >} + + ~~ => Pos: (2028 to 2029) SpanInfo: {"start":2008,"length":18} + >console.log(nameA) + >:=> (line 56, col 4) to (line 56, col 22) +-------------------------------- +58 >for ({ + + ~~~~~~~ => Pos: (2030 to 2036) SpanInfo: {"start":2041,"length":123} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 59, col 4) to (line 62, col 52) +-------------------------------- +59 > skills: { + + ~~~~~~~~~~~ => Pos: (2037 to 2047) SpanInfo: {"start":2041,"length":123} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 59, col 4) to (line 62, col 52) +59 > skills: { + + ~~~ => Pos: (2048 to 2050) SpanInfo: {"start":2059,"length":19} + >primary = "primary" + >:=> (line 60, col 8) to (line 60, col 27) +-------------------------------- +60 > primary = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2051 to 2079) SpanInfo: {"start":2059,"length":19} + >primary = "primary" + >:=> (line 60, col 8) to (line 60, col 27) +-------------------------------- +61 > secondary = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2080 to 2111) SpanInfo: {"start":2088,"length":23} + >secondary = "secondary" + >:=> (line 61, col 8) to (line 61, col 31) +-------------------------------- +62 > } = { primary: "noSkill", secondary: "noSkill" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2112 to 2164) SpanInfo: {"start":2088,"length":23} + >secondary = "secondary" + >:=> (line 61, col 8) to (line 61, col 31) +-------------------------------- +63 >} of multiRobots) { + + ~ => Pos: (2165 to 2165) SpanInfo: {"start":2041,"length":123} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 59, col 4) to (line 62, col 52) +63 >} of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (2166 to 2184) SpanInfo: {"start":2170,"length":11} + >multiRobots + >:=> (line 63, col 5) to (line 63, col 16) +-------------------------------- +64 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2185 to 2211) SpanInfo: {"start":2189,"length":21} + >console.log(primaryA) + >:=> (line 64, col 4) to (line 64, col 25) +-------------------------------- +65 >} + + ~~ => Pos: (2212 to 2213) SpanInfo: {"start":2189,"length":21} + >console.log(primaryA) + >:=> (line 64, col 4) to (line 64, col 25) +-------------------------------- +66 >for ({ + + ~~~~~~~ => Pos: (2214 to 2220) SpanInfo: {"start":2225,"length":123} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 67, col 4) to (line 70, col 52) +-------------------------------- +67 > skills: { + + ~~~~~~~~~~~ => Pos: (2221 to 2231) SpanInfo: {"start":2225,"length":123} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 67, col 4) to (line 70, col 52) +67 > skills: { + + ~~~ => Pos: (2232 to 2234) SpanInfo: {"start":2243,"length":19} + >primary = "primary" + >:=> (line 68, col 8) to (line 68, col 27) +-------------------------------- +68 > primary = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2235 to 2263) SpanInfo: {"start":2243,"length":19} + >primary = "primary" + >:=> (line 68, col 8) to (line 68, col 27) +-------------------------------- +69 > secondary = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2264 to 2295) SpanInfo: {"start":2272,"length":23} + >secondary = "secondary" + >:=> (line 69, col 8) to (line 69, col 31) +-------------------------------- +70 > } = { primary: "noSkill", secondary: "noSkill" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2296 to 2348) SpanInfo: {"start":2272,"length":23} + >secondary = "secondary" + >:=> (line 69, col 8) to (line 69, col 31) +-------------------------------- +71 >} of getMultiRobots()) { + + ~ => Pos: (2349 to 2349) SpanInfo: {"start":2225,"length":123} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 67, col 4) to (line 70, col 52) +71 >} of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2350 to 2373) SpanInfo: {"start":2354,"length":16} + >getMultiRobots() + >:=> (line 71, col 5) to (line 71, col 21) +-------------------------------- +72 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2374 to 2400) SpanInfo: {"start":2378,"length":21} + >console.log(primaryA) + >:=> (line 72, col 4) to (line 72, col 25) +-------------------------------- +73 >} + + ~~ => Pos: (2401 to 2402) SpanInfo: {"start":2378,"length":21} + >console.log(primaryA) + >:=> (line 72, col 4) to (line 72, col 25) +-------------------------------- +74 >for ({ + + ~~~~~~~ => Pos: (2403 to 2409) SpanInfo: {"start":2414,"length":123} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 75, col 4) to (line 78, col 52) +-------------------------------- +75 > skills: { + + ~~~~~~~~~~~ => Pos: (2410 to 2420) SpanInfo: {"start":2414,"length":123} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 75, col 4) to (line 78, col 52) +75 > skills: { + + ~~~ => Pos: (2421 to 2423) SpanInfo: {"start":2432,"length":19} + >primary = "primary" + >:=> (line 76, col 8) to (line 76, col 27) +-------------------------------- +76 > primary = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2424 to 2452) SpanInfo: {"start":2432,"length":19} + >primary = "primary" + >:=> (line 76, col 8) to (line 76, col 27) +-------------------------------- +77 > secondary = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2453 to 2484) SpanInfo: {"start":2461,"length":23} + >secondary = "secondary" + >:=> (line 77, col 8) to (line 77, col 31) +-------------------------------- +78 > } = { primary: "noSkill", secondary: "noSkill" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2485 to 2537) SpanInfo: {"start":2461,"length":23} + >secondary = "secondary" + >:=> (line 77, col 8) to (line 77, col 31) +-------------------------------- +79 >} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~ => Pos: (2538 to 2538) SpanInfo: {"start":2414,"length":123} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 75, col 4) to (line 78, col 52) +79 >} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2539 to 2612) SpanInfo: {"start":2543,"length":148} + >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 79, col 5) to (line 80, col 78) +-------------------------------- +80 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2613 to 2694) SpanInfo: {"start":2543,"length":148} + >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 79, col 5) to (line 80, col 78) +-------------------------------- +81 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2695 to 2721) SpanInfo: {"start":2699,"length":21} + >console.log(primaryA) + >:=> (line 81, col 4) to (line 81, col 25) +-------------------------------- +82 >} + + ~~ => Pos: (2722 to 2723) SpanInfo: {"start":2699,"length":21} + >console.log(primaryA) + >:=> (line 81, col 4) to (line 81, col 25) +-------------------------------- +83 >for ({name: nameA = "noName", skill: skillA = "noSkill" } of robots) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2724 to 2752) SpanInfo: {"start":2730,"length":22} + >name: nameA = "noName" + >:=> (line 83, col 6) to (line 83, col 28) +83 >for ({name: nameA = "noName", skill: skillA = "noSkill" } of robots) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2753 to 2780) SpanInfo: {"start":2754,"length":25} + >skill: skillA = "noSkill" + >:=> (line 83, col 30) to (line 83, col 55) +83 >for ({name: nameA = "noName", skill: skillA = "noSkill" } of robots) { + + ~~~~~~~~~~~~~~=> Pos: (2781 to 2794) SpanInfo: {"start":2785,"length":6} + >robots + >:=> (line 83, col 61) to (line 83, col 67) +-------------------------------- +84 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2795 to 2818) SpanInfo: {"start":2799,"length":18} + >console.log(nameA) + >:=> (line 84, col 4) to (line 84, col 22) +-------------------------------- +85 >} + + ~~ => Pos: (2819 to 2820) SpanInfo: {"start":2799,"length":18} + >console.log(nameA) + >:=> (line 84, col 4) to (line 84, col 22) +-------------------------------- +86 >for ({name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2821 to 2849) SpanInfo: {"start":2827,"length":22} + >name: nameA = "noName" + >:=> (line 86, col 6) to (line 86, col 28) +86 >for ({name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2850 to 2878) SpanInfo: {"start":2851,"length":25} + >skill: skillA = "noSkill" + >:=> (line 86, col 30) to (line 86, col 55) +86 >for ({name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (2879 to 2897) SpanInfo: {"start":2883,"length":11} + >getRobots() + >:=> (line 86, col 62) to (line 86, col 73) +-------------------------------- +87 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2898 to 2921) SpanInfo: {"start":2902,"length":18} + >console.log(nameA) + >:=> (line 87, col 4) to (line 87, col 22) +-------------------------------- +88 >} + + ~~ => Pos: (2922 to 2923) SpanInfo: {"start":2902,"length":18} + >console.log(nameA) + >:=> (line 87, col 4) to (line 87, col 22) +-------------------------------- +89 >for ({name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2924 to 2952) SpanInfo: {"start":2930,"length":22} + >name: nameA = "noName" + >:=> (line 89, col 6) to (line 89, col 28) +89 >for ({name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2953 to 2981) SpanInfo: {"start":2954,"length":25} + >skill: skillA = "noSkill" + >:=> (line 89, col 30) to (line 89, col 55) +89 >for ({name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2982 to 3065) SpanInfo: {"start":2986,"length":76} + >[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] + >:=> (line 89, col 62) to (line 89, col 138) +-------------------------------- +90 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3066 to 3089) SpanInfo: {"start":3070,"length":18} + >console.log(nameA) + >:=> (line 90, col 4) to (line 90, col 22) +-------------------------------- +91 >} + + ~~ => Pos: (3090 to 3091) SpanInfo: {"start":3070,"length":18} + >console.log(nameA) + >:=> (line 90, col 4) to (line 90, col 22) +-------------------------------- +92 >for ({ + + ~~~~~~~ => Pos: (3092 to 3098) SpanInfo: {"start":3103,"length":22} + >name: nameA = "noName" + >:=> (line 93, col 4) to (line 93, col 26) +-------------------------------- +93 > name: nameA = "noName", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3099 to 3126) SpanInfo: {"start":3103,"length":22} + >name: nameA = "noName" + >:=> (line 93, col 4) to (line 93, col 26) +-------------------------------- +94 > skills: { + + ~~~~~~~~~~~ => Pos: (3127 to 3137) SpanInfo: {"start":3131,"length":145} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 94, col 4) to (line 97, col 52) +94 > skills: { + + ~~~ => Pos: (3138 to 3140) SpanInfo: {"start":3149,"length":29} + >primary: primaryA = "primary" + >:=> (line 95, col 8) to (line 95, col 37) +-------------------------------- +95 > primary: primaryA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3141 to 3179) SpanInfo: {"start":3149,"length":29} + >primary: primaryA = "primary" + >:=> (line 95, col 8) to (line 95, col 37) +-------------------------------- +96 > secondary: secondaryA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3180 to 3223) SpanInfo: {"start":3188,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 96, col 8) to (line 96, col 43) +-------------------------------- +97 > } = { primary: "noSkill", secondary: "noSkill" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (3224 to 3276) SpanInfo: {"start":3188,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 96, col 8) to (line 96, col 43) +-------------------------------- +98 >} of multiRobots) { + + ~ => Pos: (3277 to 3277) SpanInfo: {"start":3131,"length":145} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 94, col 4) to (line 97, col 52) +98 >} of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (3278 to 3296) SpanInfo: {"start":3282,"length":11} + >multiRobots + >:=> (line 98, col 5) to (line 98, col 16) +-------------------------------- +99 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3297 to 3320) SpanInfo: {"start":3301,"length":18} + >console.log(nameA) + >:=> (line 99, col 4) to (line 99, col 22) +-------------------------------- +100>} + + ~~ => Pos: (3321 to 3322) SpanInfo: {"start":3301,"length":18} + >console.log(nameA) + >:=> (line 99, col 4) to (line 99, col 22) +-------------------------------- +101>for ({ + + ~~~~~~~ => Pos: (3323 to 3329) SpanInfo: {"start":3334,"length":22} + >name: nameA = "noName" + >:=> (line 102, col 4) to (line 102, col 26) +-------------------------------- +102> name: nameA = "noName", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3330 to 3357) SpanInfo: {"start":3334,"length":22} + >name: nameA = "noName" + >:=> (line 102, col 4) to (line 102, col 26) +-------------------------------- +103> skills: { + + ~~~~~~~~~~~ => Pos: (3358 to 3368) SpanInfo: {"start":3362,"length":145} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 103, col 4) to (line 106, col 52) +103> skills: { + + ~~~ => Pos: (3369 to 3371) SpanInfo: {"start":3380,"length":29} + >primary: primaryA = "primary" + >:=> (line 104, col 8) to (line 104, col 37) +-------------------------------- +104> primary: primaryA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3372 to 3410) SpanInfo: {"start":3380,"length":29} + >primary: primaryA = "primary" + >:=> (line 104, col 8) to (line 104, col 37) +-------------------------------- +105> secondary: secondaryA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3411 to 3454) SpanInfo: {"start":3419,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 105, col 8) to (line 105, col 43) +-------------------------------- +106> } = { primary: "noSkill", secondary: "noSkill" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (3455 to 3507) SpanInfo: {"start":3419,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 105, col 8) to (line 105, col 43) +-------------------------------- +107>} of getMultiRobots()) { + + ~ => Pos: (3508 to 3508) SpanInfo: {"start":3362,"length":145} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 103, col 4) to (line 106, col 52) +107>} of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3509 to 3532) SpanInfo: {"start":3513,"length":16} + >getMultiRobots() + >:=> (line 107, col 5) to (line 107, col 21) +-------------------------------- +108> console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3533 to 3556) SpanInfo: {"start":3537,"length":18} + >console.log(nameA) + >:=> (line 108, col 4) to (line 108, col 22) +-------------------------------- +109>} + + ~~ => Pos: (3557 to 3558) SpanInfo: {"start":3537,"length":18} + >console.log(nameA) + >:=> (line 108, col 4) to (line 108, col 22) +-------------------------------- +110>for ({ + + ~~~~~~~ => Pos: (3559 to 3565) SpanInfo: {"start":3570,"length":22} + >name: nameA = "noName" + >:=> (line 111, col 4) to (line 111, col 26) +-------------------------------- +111> name: nameA = "noName", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3566 to 3593) SpanInfo: {"start":3570,"length":22} + >name: nameA = "noName" + >:=> (line 111, col 4) to (line 111, col 26) +-------------------------------- +112> skills: { + + ~~~~~~~~~~~ => Pos: (3594 to 3604) SpanInfo: {"start":3598,"length":145} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 112, col 4) to (line 115, col 52) +112> skills: { + + ~~~ => Pos: (3605 to 3607) SpanInfo: {"start":3616,"length":29} + >primary: primaryA = "primary" + >:=> (line 113, col 8) to (line 113, col 37) +-------------------------------- +113> primary: primaryA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3608 to 3646) SpanInfo: {"start":3616,"length":29} + >primary: primaryA = "primary" + >:=> (line 113, col 8) to (line 113, col 37) +-------------------------------- +114> secondary: secondaryA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3647 to 3690) SpanInfo: {"start":3655,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 114, col 8) to (line 114, col 43) +-------------------------------- +115> } = { primary: "noSkill", secondary: "noSkill" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (3691 to 3743) SpanInfo: {"start":3655,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 114, col 8) to (line 114, col 43) +-------------------------------- +116>} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~ => Pos: (3744 to 3744) SpanInfo: {"start":3598,"length":145} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 112, col 4) to (line 115, col 52) +116>} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (3745 to 3832) SpanInfo: {"start":3749,"length":162} + >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 116, col 5) to (line 117, col 78) +-------------------------------- +117> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (3833 to 3914) SpanInfo: {"start":3749,"length":162} + >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 116, col 5) to (line 117, col 78) +-------------------------------- +118> console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3915 to 3938) SpanInfo: {"start":3919,"length":18} + >console.log(nameA) + >:=> (line 118, col 4) to (line 118, col 22) +-------------------------------- +119>} + + ~~ => Pos: (3939 to 3940) SpanInfo: {"start":3919,"length":18} + >console.log(nameA) + >:=> (line 118, col 4) to (line 118, col 22) +-------------------------------- +120>for ({ name = "noName", skill = "noSkill" } of robots) { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3941 to 3963) SpanInfo: {"start":3948,"length":15} + >name = "noName" + >:=> (line 120, col 7) to (line 120, col 22) +120>for ({ name = "noName", skill = "noSkill" } of robots) { + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (3964 to 3984) SpanInfo: {"start":3965,"length":18} + >skill = "noSkill" + >:=> (line 120, col 24) to (line 120, col 42) +120>for ({ name = "noName", skill = "noSkill" } of robots) { + + ~~~~~~~~~~~~~~=> Pos: (3985 to 3998) SpanInfo: {"start":3989,"length":6} + >robots + >:=> (line 120, col 48) to (line 120, col 54) +-------------------------------- +121> console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3999 to 4022) SpanInfo: {"start":4003,"length":18} + >console.log(nameA) + >:=> (line 121, col 4) to (line 121, col 22) +-------------------------------- +122>} + + ~~ => Pos: (4023 to 4024) SpanInfo: {"start":4003,"length":18} + >console.log(nameA) + >:=> (line 121, col 4) to (line 121, col 22) +-------------------------------- +123>for ({ name = "noName", skill = "noSkill" } of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (4025 to 4047) SpanInfo: {"start":4032,"length":15} + >name = "noName" + >:=> (line 123, col 7) to (line 123, col 22) +123>for ({ name = "noName", skill = "noSkill" } of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (4048 to 4068) SpanInfo: {"start":4049,"length":17} + >skill = "noSkill" + >:=> (line 123, col 24) to (line 123, col 41) +123>for ({ name = "noName", skill = "noSkill" } of getRobots()) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (4069 to 4087) SpanInfo: {"start":4073,"length":11} + >getRobots() + >:=> (line 123, col 48) to (line 123, col 59) +-------------------------------- +124> console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (4088 to 4111) SpanInfo: {"start":4092,"length":18} + >console.log(nameA) + >:=> (line 124, col 4) to (line 124, col 22) +-------------------------------- +125>} + + ~~ => Pos: (4112 to 4113) SpanInfo: {"start":4092,"length":18} + >console.log(nameA) + >:=> (line 124, col 4) to (line 124, col 22) +-------------------------------- +126>for ({ name = "noName", skill = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (4114 to 4136) SpanInfo: {"start":4121,"length":15} + >name = "noName" + >:=> (line 126, col 7) to (line 126, col 22) +126>for ({ name = "noName", skill = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (4137 to 4157) SpanInfo: {"start":4138,"length":18} + >skill = "noSkill" + >:=> (line 126, col 24) to (line 126, col 42) +126>for ({ name = "noName", skill = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (4158 to 4241) SpanInfo: {"start":4162,"length":76} + >[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] + >:=> (line 126, col 48) to (line 126, col 124) +-------------------------------- +127> console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (4242 to 4265) SpanInfo: {"start":4246,"length":18} + >console.log(nameA) + >:=> (line 127, col 4) to (line 127, col 22) +-------------------------------- +128>} + + ~~ => Pos: (4266 to 4267) SpanInfo: {"start":4246,"length":18} + >console.log(nameA) + >:=> (line 127, col 4) to (line 127, col 22) +-------------------------------- +129>for ({ + + ~~~~~~~ => Pos: (4268 to 4274) SpanInfo: {"start":4279,"length":15} + >name = "noName" + >:=> (line 130, col 4) to (line 130, col 19) +-------------------------------- +130> name = "noName", + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (4275 to 4295) SpanInfo: {"start":4279,"length":15} + >name = "noName" + >:=> (line 130, col 4) to (line 130, col 19) +-------------------------------- +131> skills: { + + ~~~~~~~~~~~ => Pos: (4296 to 4306) SpanInfo: {"start":4300,"length":123} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 131, col 4) to (line 134, col 52) +131> skills: { + + ~~~ => Pos: (4307 to 4309) SpanInfo: {"start":4318,"length":19} + >primary = "primary" + >:=> (line 132, col 8) to (line 132, col 27) +-------------------------------- +132> primary = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (4310 to 4338) SpanInfo: {"start":4318,"length":19} + >primary = "primary" + >:=> (line 132, col 8) to (line 132, col 27) +-------------------------------- +133> secondary = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (4339 to 4370) SpanInfo: {"start":4347,"length":23} + >secondary = "secondary" + >:=> (line 133, col 8) to (line 133, col 31) +-------------------------------- +134> } = { primary: "noSkill", secondary: "noSkill" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (4371 to 4423) SpanInfo: {"start":4347,"length":23} + >secondary = "secondary" + >:=> (line 133, col 8) to (line 133, col 31) +-------------------------------- +135>} of multiRobots) { + + ~ => Pos: (4424 to 4424) SpanInfo: {"start":4300,"length":123} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 131, col 4) to (line 134, col 52) +135>} of multiRobots) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (4425 to 4443) SpanInfo: {"start":4429,"length":11} + >multiRobots + >:=> (line 135, col 5) to (line 135, col 16) +-------------------------------- +136> console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (4444 to 4467) SpanInfo: {"start":4448,"length":18} + >console.log(nameA) + >:=> (line 136, col 4) to (line 136, col 22) +-------------------------------- +137>} + + ~~ => Pos: (4468 to 4469) SpanInfo: {"start":4448,"length":18} + >console.log(nameA) + >:=> (line 136, col 4) to (line 136, col 22) +-------------------------------- +138>for ({ + + ~~~~~~~ => Pos: (4470 to 4476) SpanInfo: {"start":4481,"length":15} + >name = "noName" + >:=> (line 139, col 4) to (line 139, col 19) +-------------------------------- +139> name = "noName", + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (4477 to 4497) SpanInfo: {"start":4481,"length":15} + >name = "noName" + >:=> (line 139, col 4) to (line 139, col 19) +-------------------------------- +140> skills: { + + ~~~~~~~~~~~ => Pos: (4498 to 4508) SpanInfo: {"start":4502,"length":123} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 140, col 4) to (line 143, col 52) +140> skills: { + + ~~~ => Pos: (4509 to 4511) SpanInfo: {"start":4520,"length":19} + >primary = "primary" + >:=> (line 141, col 8) to (line 141, col 27) +-------------------------------- +141> primary = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (4512 to 4540) SpanInfo: {"start":4520,"length":19} + >primary = "primary" + >:=> (line 141, col 8) to (line 141, col 27) +-------------------------------- +142> secondary = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (4541 to 4572) SpanInfo: {"start":4549,"length":23} + >secondary = "secondary" + >:=> (line 142, col 8) to (line 142, col 31) +-------------------------------- +143> } = { primary: "noSkill", secondary: "noSkill" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (4573 to 4625) SpanInfo: {"start":4549,"length":23} + >secondary = "secondary" + >:=> (line 142, col 8) to (line 142, col 31) +-------------------------------- +144>} of getMultiRobots()) { + + ~ => Pos: (4626 to 4626) SpanInfo: {"start":4502,"length":123} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 140, col 4) to (line 143, col 52) +144>} of getMultiRobots()) { + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (4627 to 4650) SpanInfo: {"start":4631,"length":16} + >getMultiRobots() + >:=> (line 144, col 5) to (line 144, col 21) +-------------------------------- +145> console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (4651 to 4674) SpanInfo: {"start":4655,"length":18} + >console.log(nameA) + >:=> (line 145, col 4) to (line 145, col 22) +-------------------------------- +146>} + + ~~ => Pos: (4675 to 4676) SpanInfo: {"start":4655,"length":18} + >console.log(nameA) + >:=> (line 145, col 4) to (line 145, col 22) +-------------------------------- +147>for ({ + + ~~~~~~~ => Pos: (4677 to 4683) SpanInfo: {"start":4688,"length":15} + >name = "noName" + >:=> (line 148, col 4) to (line 148, col 19) +-------------------------------- +148> name = "noName", + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (4684 to 4704) SpanInfo: {"start":4688,"length":15} + >name = "noName" + >:=> (line 148, col 4) to (line 148, col 19) +-------------------------------- +149> skills: { + + ~~~~~~~~~~~ => Pos: (4705 to 4715) SpanInfo: {"start":4709,"length":123} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 149, col 4) to (line 152, col 52) +149> skills: { + + ~~~ => Pos: (4716 to 4718) SpanInfo: {"start":4727,"length":19} + >primary = "primary" + >:=> (line 150, col 8) to (line 150, col 27) +-------------------------------- +150> primary = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (4719 to 4747) SpanInfo: {"start":4727,"length":19} + >primary = "primary" + >:=> (line 150, col 8) to (line 150, col 27) +-------------------------------- +151> secondary = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (4748 to 4779) SpanInfo: {"start":4756,"length":23} + >secondary = "secondary" + >:=> (line 151, col 8) to (line 151, col 31) +-------------------------------- +152> } = { primary: "noSkill", secondary: "noSkill" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (4780 to 4832) SpanInfo: {"start":4756,"length":23} + >secondary = "secondary" + >:=> (line 151, col 8) to (line 151, col 31) +-------------------------------- +153>} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~ => Pos: (4833 to 4833) SpanInfo: {"start":4709,"length":123} + >skills: { + > primary = "primary", + > secondary = "secondary" + > } = { primary: "noSkill", secondary: "noSkill" } + >:=> (line 149, col 4) to (line 152, col 52) +153>} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (4834 to 4907) SpanInfo: {"start":4838,"length":148} + >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 153, col 5) to (line 154, col 78) +-------------------------------- +154> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (4908 to 4989) SpanInfo: {"start":4838,"length":148} + >[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] + >:=> (line 153, col 5) to (line 154, col 78) +-------------------------------- +155> console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (4990 to 5013) SpanInfo: {"start":4994,"length":18} + >console.log(nameA) + >:=> (line 155, col 4) to (line 155, col 22) +-------------------------------- +156>} + ~ => Pos: (5014 to 5014) SpanInfo: {"start":4994,"length":18} + >console.log(nameA) + >:=> (line 155, col 4) to (line 155, col 22) \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringAssignmentForOfObjectBindingPattern.ts b/tests/cases/fourslash/breakpointValidationDestructuringAssignmentForOfObjectBindingPattern.ts new file mode 100644 index 00000000000..38a4832f14d --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringAssignmentForOfObjectBindingPattern.ts @@ -0,0 +1,104 @@ +/// + +////declare var console: { +//// log(msg: any): void; +////} +////interface Robot { +//// name: string; +//// skill: string; +////} +////interface MultiRobot { +//// name: string; +//// skills: { +//// primary: string; +//// secondary: string; +//// }; +////} +////let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +////let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +//// { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; +////function getRobots() { +//// return robots; +////} +////function getMultiRobots() { +//// return multiRobots; +////} +////let nameA: string, primaryA: string, secondaryA: string, i: number, skillA: string; +////let name: string, primary: string, secondary: string, skill: string; +////for ({name: nameA } of robots) { +//// console.log(nameA); +////} +////for ({name: nameA } of getRobots()) { +//// console.log(nameA); +////} +////for ({name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +//// console.log(nameA); +////} +////for ({ skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { +//// console.log(primaryA); +////} +////for ({ skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { +//// console.log(primaryA); +////} +////for ({ skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +//// { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +//// console.log(primaryA); +////} +////for ({name } of robots) { +//// console.log(nameA); +////} +////for ({name } of getRobots()) { +//// console.log(nameA); +////} +////for ({name } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +//// console.log(nameA); +////} +////for ({ skills: { primary, secondary } } of multiRobots) { +//// console.log(primaryA); +////} +////for ({ skills: { primary, secondary } } of getMultiRobots()) { +//// console.log(primaryA); +////} +////for ({ skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +//// { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +//// console.log(primaryA); +////} +////for ({name: nameA, skill: skillA } of robots) { +//// console.log(nameA); +////} +////for ({name: nameA, skill: skillA } of getRobots()) { +//// console.log(nameA); +////} +////for ({name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +//// console.log(nameA); +////} +////for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { +//// console.log(nameA); +////} +////for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { +//// console.log(nameA); +////} +////for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +//// { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +//// console.log(nameA); +////} +////for ({name, skill } of robots) { +//// console.log(nameA); +////} +////for ({name, skill } of getRobots()) { +//// console.log(nameA); +////} +////for ({name, skill } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +//// console.log(nameA); +////} +////for ({name, skills: { primary, secondary } } of multiRobots) { +//// console.log(nameA); +////} +////for ({name, skills: { primary, secondary } } of getMultiRobots()) { +//// console.log(nameA); +////} +////for ({name, skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +//// { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +//// console.log(nameA); +////} +verify.baselineCurrentFileBreakpointLocations(); diff --git a/tests/cases/fourslash/breakpointValidationDestructuringAssignmentForOfObjectBindingPatternDefaultValues.ts b/tests/cases/fourslash/breakpointValidationDestructuringAssignmentForOfObjectBindingPatternDefaultValues.ts new file mode 100644 index 00000000000..2ec090d716d --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringAssignmentForOfObjectBindingPatternDefaultValues.ts @@ -0,0 +1,159 @@ +/// + +////declare var console: { +//// log(msg: any): void; +////} +////interface Robot { +//// name: string; +//// skill: string; +////} +////interface MultiRobot { +//// name: string; +//// skills: { +//// primary: string; +//// secondary: string; +//// }; +////} +////let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +////let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +//// { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; +////function getRobots() { +//// return robots; +////} +////function getMultiRobots() { +//// return multiRobots; +////} +////let nameA: string, primaryA: string, secondaryA: string, i: number, skillA: string; +////let name: string, primary: string, secondary: string, skill: string; +////for ({name: nameA = "noName" } of robots) { +//// console.log(nameA); +////} +////for ({name: nameA = "noName" } of getRobots()) { +//// console.log(nameA); +////} +////for ({name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +//// console.log(nameA); +////} +////for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = +//// { primary: "nosKill", secondary: "noSkill" } } of multiRobots) { +//// console.log(primaryA); +////} +////for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = +//// { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) { +//// console.log(primaryA); +////} +////for ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = +//// { primary: "nosKill", secondary: "noSkill" } } of +//// [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +//// { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +//// console.log(primaryA); +////} +////for ({ name = "noName" } of robots) { +//// console.log(nameA); +////} +////for ({ name = "noName" } of getRobots()) { +//// console.log(nameA); +////} +////for ({ name = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +//// console.log(nameA); +////} +////for ({ +//// skills: { +//// primary = "primary", +//// secondary = "secondary" +//// } = { primary: "noSkill", secondary: "noSkill" } +////} of multiRobots) { +//// console.log(primaryA); +////} +////for ({ +//// skills: { +//// primary = "primary", +//// secondary = "secondary" +//// } = { primary: "noSkill", secondary: "noSkill" } +////} of getMultiRobots()) { +//// console.log(primaryA); +////} +////for ({ +//// skills: { +//// primary = "primary", +//// secondary = "secondary" +//// } = { primary: "noSkill", secondary: "noSkill" } +////} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +//// { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +//// console.log(primaryA); +////} +////for ({name: nameA = "noName", skill: skillA = "noSkill" } of robots) { +//// console.log(nameA); +////} +////for ({name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) { +//// console.log(nameA); +////} +////for ({name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +//// console.log(nameA); +////} +////for ({ +//// name: nameA = "noName", +//// skills: { +//// primary: primaryA = "primary", +//// secondary: secondaryA = "secondary" +//// } = { primary: "noSkill", secondary: "noSkill" } +////} of multiRobots) { +//// console.log(nameA); +////} +////for ({ +//// name: nameA = "noName", +//// skills: { +//// primary: primaryA = "primary", +//// secondary: secondaryA = "secondary" +//// } = { primary: "noSkill", secondary: "noSkill" } +////} of getMultiRobots()) { +//// console.log(nameA); +////} +////for ({ +//// name: nameA = "noName", +//// skills: { +//// primary: primaryA = "primary", +//// secondary: secondaryA = "secondary" +//// } = { primary: "noSkill", secondary: "noSkill" } +////} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +//// { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +//// console.log(nameA); +////} +////for ({ name = "noName", skill = "noSkill" } of robots) { +//// console.log(nameA); +////} +////for ({ name = "noName", skill = "noSkill" } of getRobots()) { +//// console.log(nameA); +////} +////for ({ name = "noName", skill = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +//// console.log(nameA); +////} +////for ({ +//// name = "noName", +//// skills: { +//// primary = "primary", +//// secondary = "secondary" +//// } = { primary: "noSkill", secondary: "noSkill" } +////} of multiRobots) { +//// console.log(nameA); +////} +////for ({ +//// name = "noName", +//// skills: { +//// primary = "primary", +//// secondary = "secondary" +//// } = { primary: "noSkill", secondary: "noSkill" } +////} of getMultiRobots()) { +//// console.log(nameA); +////} +////for ({ +//// name = "noName", +//// skills: { +//// primary = "primary", +//// secondary = "secondary" +//// } = { primary: "noSkill", secondary: "noSkill" } +////} of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +//// { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +//// console.log(nameA); +////} +verify.baselineCurrentFileBreakpointLocations(); From 8cebdcc758ff7b96869423598249461b65bf2b37 Mon Sep 17 00:00:00 2001 From: Kanchalai Tanglertsampan Date: Tue, 22 Dec 2015 19:29:49 -0800 Subject: [PATCH 087/209] Add tests for find-all-references --- .../referencesForInheritedProperties3.ts | 15 +++++++ .../referencesForInheritedProperties4.ts | 15 +++++++ .../referencesForInheritedProperties5.ts | 19 +++++++++ .../referencesForInheritedProperties6.ts | 32 ++++++++++++++ .../referencesForInheritedProperties7.ts | 42 +++++++++++++++++++ 5 files changed, 123 insertions(+) create mode 100644 tests/cases/fourslash/referencesForInheritedProperties3.ts create mode 100644 tests/cases/fourslash/referencesForInheritedProperties4.ts create mode 100644 tests/cases/fourslash/referencesForInheritedProperties5.ts create mode 100644 tests/cases/fourslash/referencesForInheritedProperties6.ts create mode 100644 tests/cases/fourslash/referencesForInheritedProperties7.ts diff --git a/tests/cases/fourslash/referencesForInheritedProperties3.ts b/tests/cases/fourslash/referencesForInheritedProperties3.ts new file mode 100644 index 00000000000..134f75da84b --- /dev/null +++ b/tests/cases/fourslash/referencesForInheritedProperties3.ts @@ -0,0 +1,15 @@ +/// + +//// interface interface1 extends interface1 { +//// /*1*/doStuff(): void; +//// /*2*/propName: string; +//// } +//// +//// var v: interface1; +//// v./*3*/propName; +//// v./*4*/doStuff(); + +test.markers().forEach(m => { + goTo.position(m.position, m.fileName); + verify.referencesCountIs(2); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/referencesForInheritedProperties4.ts b/tests/cases/fourslash/referencesForInheritedProperties4.ts new file mode 100644 index 00000000000..10dcc9c77a2 --- /dev/null +++ b/tests/cases/fourslash/referencesForInheritedProperties4.ts @@ -0,0 +1,15 @@ +/// + +//// class class1 extends class1 { +//// /*1*/doStuff() { } +//// /*2*/propName: string; +//// } +//// +//// var c: class1; +//// c./*3*/doStuff(); +//// c./*4*/propName; + +test.markers().forEach(m => { + goTo.position(m.position, m.fileName); + verify.referencesCountIs(2); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/referencesForInheritedProperties5.ts b/tests/cases/fourslash/referencesForInheritedProperties5.ts new file mode 100644 index 00000000000..722c5c96f0a --- /dev/null +++ b/tests/cases/fourslash/referencesForInheritedProperties5.ts @@ -0,0 +1,19 @@ +/// + +//// interface interface1 extends interface1 { +//// /*1*/doStuff(): void; +//// /*2*/propName: string; +//// } +//// interface interface2 extends interface1 { +//// /*3*/doStuff(): void; +//// /*4*/propName: string; +//// } +//// +//// var v: interface1; +//// v./*5*/propName; +//// v./*6*/doStuff(); + +test.markers().forEach(m => { + goTo.position(m.position, m.fileName); + verify.referencesCountIs(3); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/referencesForInheritedProperties6.ts b/tests/cases/fourslash/referencesForInheritedProperties6.ts new file mode 100644 index 00000000000..de6a2f2eba1 --- /dev/null +++ b/tests/cases/fourslash/referencesForInheritedProperties6.ts @@ -0,0 +1,32 @@ +/// + +//// class class1 extends class1 { +//// /*1*/doStuff() { } +//// /*2*/propName: string; +//// } +//// class class2 extends class1 { +//// /*3*/doStuff() { } +//// /*4*/propName: string; +//// } +//// +//// var v: class2; +//// v./*5*/propName; +//// v./*6*/doStuff(); + +goTo.marker("1"); +verify.referencesCountIs(1); + +goTo.marker("2"); +verify.referencesCountIs(3); + +goTo.marker("3"); +verify.referencesCountIs(2); + +goTo.marker("4"); +verify.referencesCountIs(3); + +goTo.marker("5"); +verify.referencesCountIs(3); + +goTo.marker("6"); +verify.referencesCountIs(2); \ No newline at end of file diff --git a/tests/cases/fourslash/referencesForInheritedProperties7.ts b/tests/cases/fourslash/referencesForInheritedProperties7.ts new file mode 100644 index 00000000000..000d4922222 --- /dev/null +++ b/tests/cases/fourslash/referencesForInheritedProperties7.ts @@ -0,0 +1,42 @@ +/// + +//// class class1 extends class1 { +//// /*1*/doStuff() { } +//// /*2*/propName: string; +//// } +//// interface interface1 extends interface1 { +//// /*3*/doStuff(): void; +//// /*4*/propName: string; +//// } +//// class class2 extends class1 implements interface1 { +//// /*5*/doStuff() { } +//// /*6*/propName: string; +//// } +//// +//// var v: class2; +//// v./*7*/propName; +//// v./*8*/doStuff(); + +goTo.marker("1"); +verify.referencesCountIs(1); + +goTo.marker("2"); +verify.referencesCountIs(3); + +goTo.marker("3"); +verify.referencesCountIs(3); + +goTo.marker("4"); +verify.referencesCountIs(3); + +goTo.marker("5"); +verify.referencesCountIs(3); + +goTo.marker("6"); +verify.referencesCountIs(4); + +goTo.marker("7"); +verify.referencesCountIs(4); + +goTo.marker("8"); +verify.referencesCountIs(3); \ No newline at end of file From 05e5516fc0cd34bbe39f7e2607cffc8e9d63ef26 Mon Sep 17 00:00:00 2001 From: Kanchalai Tanglertsampan Date: Tue, 22 Dec 2015 20:02:42 -0800 Subject: [PATCH 088/209] Add rename tests --- .../cases/fourslash/renameInheritedProperties1.ts | 15 +++++++++++++++ .../cases/fourslash/renameInheritedProperties2.ts | 15 +++++++++++++++ .../cases/fourslash/renameInheritedProperties3.ts | 15 +++++++++++++++ .../cases/fourslash/renameInheritedProperties4.ts | 15 +++++++++++++++ 4 files changed, 60 insertions(+) create mode 100644 tests/cases/fourslash/renameInheritedProperties1.ts create mode 100644 tests/cases/fourslash/renameInheritedProperties2.ts create mode 100644 tests/cases/fourslash/renameInheritedProperties3.ts create mode 100644 tests/cases/fourslash/renameInheritedProperties4.ts diff --git a/tests/cases/fourslash/renameInheritedProperties1.ts b/tests/cases/fourslash/renameInheritedProperties1.ts new file mode 100644 index 00000000000..f0b2acf3b14 --- /dev/null +++ b/tests/cases/fourslash/renameInheritedProperties1.ts @@ -0,0 +1,15 @@ +/// + +//// class class1 extends class1 { +//// [|propName|]: string; +//// } +//// +//// var v: class1; +//// v.[|propName|]; + +let ranges = test.ranges(); +verify.assertHasRanges(ranges); +for (let range of ranges) { + goTo.position(range.start); + verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false); +} \ No newline at end of file diff --git a/tests/cases/fourslash/renameInheritedProperties2.ts b/tests/cases/fourslash/renameInheritedProperties2.ts new file mode 100644 index 00000000000..ed99ec3e013 --- /dev/null +++ b/tests/cases/fourslash/renameInheritedProperties2.ts @@ -0,0 +1,15 @@ +/// + +//// class class1 extends class1 { +//// [|doStuff|]() { } +//// } +//// +//// var v: class1; +//// v.[|doStuff|](); + +let ranges = test.ranges(); +verify.assertHasRanges(ranges); +for (let range of ranges) { + goTo.position(range.start); + verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false); +} \ No newline at end of file diff --git a/tests/cases/fourslash/renameInheritedProperties3.ts b/tests/cases/fourslash/renameInheritedProperties3.ts new file mode 100644 index 00000000000..17e7785fbc7 --- /dev/null +++ b/tests/cases/fourslash/renameInheritedProperties3.ts @@ -0,0 +1,15 @@ +/// + +//// interface interface1 extends interface1 { +//// [|propName|]: string; +//// } +//// +//// var v: interface1; +//// v.[|propName|]; + +let ranges = test.ranges(); +verify.assertHasRanges(ranges); +for (let range of ranges) { + goTo.position(range.start); + verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false); +} \ No newline at end of file diff --git a/tests/cases/fourslash/renameInheritedProperties4.ts b/tests/cases/fourslash/renameInheritedProperties4.ts new file mode 100644 index 00000000000..ea2f7c40fbf --- /dev/null +++ b/tests/cases/fourslash/renameInheritedProperties4.ts @@ -0,0 +1,15 @@ +/// + +//// interface interface1 extends interface1 { +//// [|doStuff|](): string; +//// } +//// +//// var v: interface1; +//// v.[|doStuff|](); + +let ranges = test.ranges(); +verify.assertHasRanges(ranges); +for (let range of ranges) { + goTo.position(range.start); + verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false); +} \ No newline at end of file From 0682a63979b3a8dc66c1c546f16f2ef34a38050d Mon Sep 17 00:00:00 2001 From: Kanchalai Tanglertsampan Date: Tue, 22 Dec 2015 20:26:54 -0800 Subject: [PATCH 089/209] Add find-all-references tests --- .../findAllRefsInheritedProperties1.ts | 25 +++++++++++++ .../findAllRefsInheritedProperties2.ts | 25 +++++++++++++ .../findAllRefsInheritedProperties3.ts | 37 +++++++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 tests/cases/fourslash/findAllRefsInheritedProperties1.ts create mode 100644 tests/cases/fourslash/findAllRefsInheritedProperties2.ts create mode 100644 tests/cases/fourslash/findAllRefsInheritedProperties3.ts diff --git a/tests/cases/fourslash/findAllRefsInheritedProperties1.ts b/tests/cases/fourslash/findAllRefsInheritedProperties1.ts new file mode 100644 index 00000000000..b2755923d37 --- /dev/null +++ b/tests/cases/fourslash/findAllRefsInheritedProperties1.ts @@ -0,0 +1,25 @@ +/// + +//// class class1 extends class1 { +//// [|doStuff|]() { } +//// [|propName|]: string; +//// } +//// +//// var v: class1; +//// v.[|doStuff|](); +//// v.[|propName|]; + +function verifyReferences(query: FourSlashInterface.Range, references: FourSlashInterface.Range[]) { + goTo.position(query.start); + for (const ref of references) { + verify.referencesAtPositionContains(ref); + } +} + +const ranges = test.ranges(); +verify.assertHasRanges(ranges); +const [r0, r1, r2, r3] = ranges; +verifyReferences(r0, [r0, r2]); +verifyReferences(r1, [r1, r3]); +verifyReferences(r2, [r0, r2]); +verifyReferences(r3, [r1, r3]); \ No newline at end of file diff --git a/tests/cases/fourslash/findAllRefsInheritedProperties2.ts b/tests/cases/fourslash/findAllRefsInheritedProperties2.ts new file mode 100644 index 00000000000..1ab92c251da --- /dev/null +++ b/tests/cases/fourslash/findAllRefsInheritedProperties2.ts @@ -0,0 +1,25 @@ +/// + +//// interface interface1 extends interface1 { +//// [|doStuff|](): void; // r0 +//// [|propName|]: string; // r1 +//// } +//// +//// var v: interface1; +//// v.[|doStuff|](); // r2 +//// v.[|propName|]; // r3 + +function verifyReferences(query: FourSlashInterface.Range, references: FourSlashInterface.Range[]) { + goTo.position(query.start); + for (const ref of references) { + verify.referencesAtPositionContains(ref); + } +} + +const ranges = test.ranges(); +verify.assertHasRanges(ranges); +const [r0, r1, r2, r3] = ranges; +verifyReferences(r0, [r0, r2]); +verifyReferences(r1, [r1, r3]); +verifyReferences(r2, [r0, r2]); +verifyReferences(r3, [r1, r3]); \ No newline at end of file diff --git a/tests/cases/fourslash/findAllRefsInheritedProperties3.ts b/tests/cases/fourslash/findAllRefsInheritedProperties3.ts new file mode 100644 index 00000000000..9a46b08f357 --- /dev/null +++ b/tests/cases/fourslash/findAllRefsInheritedProperties3.ts @@ -0,0 +1,37 @@ +/// + +//// class class1 extends class1 { +//// [|doStuff|]() { } // r0 +//// [|propName|]: string; // r1 +//// } +//// interface interface1 extends interface1 { +//// [|doStuff|](): void; // r2 +//// [|propName|]: string; // r3 +//// } +//// class class2 extends class1 implements interface1 { +//// [|doStuff|]() { } // r4 +//// [|propName|]: string; // r5 +//// } +//// +//// var v: class2; +//// v.[|propName|]; // r6 +//// v.[|doStuff|](); // r7 + +function verifyReferences(query: FourSlashInterface.Range, references: FourSlashInterface.Range[]) { + goTo.position(query.start); + for (const ref of references) { + verify.referencesAtPositionContains(ref); + } +} + +const ranges = test.ranges(); +verify.assertHasRanges(ranges); +const [r0, r1, r2, r3, r4, r5, r6, r7] = ranges; +verifyReferences(r0, [r0]); +verifyReferences(r1, [r1, r5, r6]); +verifyReferences(r2, [r2, r4, r7]); +verifyReferences(r3, [r3, r5, r6]); +verifyReferences(r4, [r2, r4, r7]); +verifyReferences(r5, [r1, r3, r5, r6]); +verifyReferences(r6, [r1, r3, r5, r6]); +verifyReferences(r7, [r2, r4, r7]); \ No newline at end of file From 9534541829c0609188885f81d24cadc9a09396bf Mon Sep 17 00:00:00 2001 From: Kanchalai Tanglertsampan Date: Tue, 22 Dec 2015 20:35:28 -0800 Subject: [PATCH 090/209] Add documenthightlight tests --- .../documentHighlightAtInheritedProperties1.ts | 13 +++++++++++++ .../documentHighlightAtInheritedProperties2.ts | 13 +++++++++++++ .../documentHighlightAtInheritedProperties3.ts | 17 +++++++++++++++++ .../documentHighlightAtInheritedProperties4.ts | 17 +++++++++++++++++ 4 files changed, 60 insertions(+) create mode 100644 tests/cases/fourslash/documentHighlightAtInheritedProperties1.ts create mode 100644 tests/cases/fourslash/documentHighlightAtInheritedProperties2.ts create mode 100644 tests/cases/fourslash/documentHighlightAtInheritedProperties3.ts create mode 100644 tests/cases/fourslash/documentHighlightAtInheritedProperties4.ts diff --git a/tests/cases/fourslash/documentHighlightAtInheritedProperties1.ts b/tests/cases/fourslash/documentHighlightAtInheritedProperties1.ts new file mode 100644 index 00000000000..23f6445a004 --- /dev/null +++ b/tests/cases/fourslash/documentHighlightAtInheritedProperties1.ts @@ -0,0 +1,13 @@ +/// + +// @Filename: file1.ts +//// interface interface1 extends interface1 { +//// /*1*/doStuff(): void; +//// /*2*/propName: string; +//// } + +let markers = test.markers() +for (let marker of markers) { + goTo.position(marker.position); + verify.documentHighlightsAtPositionCount(1, ["file1.ts"]); +} diff --git a/tests/cases/fourslash/documentHighlightAtInheritedProperties2.ts b/tests/cases/fourslash/documentHighlightAtInheritedProperties2.ts new file mode 100644 index 00000000000..d4aadf96ed6 --- /dev/null +++ b/tests/cases/fourslash/documentHighlightAtInheritedProperties2.ts @@ -0,0 +1,13 @@ +/// + +// @Filename: file1.ts +//// class class1 extends class1 { +//// /*1*/doStuff() { } +//// /*2*/propName: string; +//// } + +let markers = test.markers() +for (let marker of markers) { + goTo.position(marker.position); + verify.documentHighlightsAtPositionCount(1, ["file1.ts"]); +} \ No newline at end of file diff --git a/tests/cases/fourslash/documentHighlightAtInheritedProperties3.ts b/tests/cases/fourslash/documentHighlightAtInheritedProperties3.ts new file mode 100644 index 00000000000..5e94bb387cd --- /dev/null +++ b/tests/cases/fourslash/documentHighlightAtInheritedProperties3.ts @@ -0,0 +1,17 @@ +/// + +// @Filename: file1.ts +//// interface interface1 extends interface1 { +//// /*1*/doStuff(): void; +//// /*2*/propName: string; +//// } +//// +//// var v: interface1; +//// v./*3*/propName; +//// v./*4*/doStuff(); + +let markers = test.markers() +for (let marker of markers) { + goTo.position(marker.position); + verify.documentHighlightsAtPositionCount(2, ["file1.ts"]); +} diff --git a/tests/cases/fourslash/documentHighlightAtInheritedProperties4.ts b/tests/cases/fourslash/documentHighlightAtInheritedProperties4.ts new file mode 100644 index 00000000000..50f459ebfdb --- /dev/null +++ b/tests/cases/fourslash/documentHighlightAtInheritedProperties4.ts @@ -0,0 +1,17 @@ +/// + +// @Filename: file1.ts +//// class class1 extends class1 { +//// /*1*/doStuff() { } +//// /*2*/propName: string; +//// } +//// +//// var c: class1; +//// c./*3*/doStuff(); +//// c./*4*/propName; + +let markers = test.markers() +for (let marker of markers) { + goTo.position(marker.position); + verify.documentHighlightsAtPositionCount(2, ["file1.ts"]); +} From 5544fc0d85b314c949877d74f08c3133a9695883 Mon Sep 17 00:00:00 2001 From: Kanchalai Tanglertsampan Date: Tue, 22 Dec 2015 20:39:09 -0800 Subject: [PATCH 091/209] fix crashing when get documentHighlighting --- src/services/services.ts | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/src/services/services.ts b/src/services/services.ts index 0ffd1138cba..2bda7bf0e72 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -5983,14 +5983,37 @@ namespace ts { // Add symbol of properties/methods of the same name in base classes and implemented interfaces definitions if (rootSymbol.parent && rootSymbol.parent.flags & (SymbolFlags.Class | SymbolFlags.Interface)) { - getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result); + getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result, undefined); } }); return result; } - function getPropertySymbolsFromBaseTypes(symbol: Symbol, propertyName: string, result: Symbol[]): void { + /** + * Find symbol of the given property-name and add the symbol to the given result array + * @param symbol a symbol to start searching for the given propertyName + * @param propertyName a name of property to serach for + * @param result an array of symbol of found property symbols + * @param previousIterationSymbol a symbol from previous iteration of calling this function to prevent infinite revisitng of the same symbol. + * The value of previousIterationSymbol is undefined when the function is first called. + */ + function getPropertySymbolsFromBaseTypes(symbol: Symbol, propertyName: string, result: Symbol[], previousIterationSymbol: Symbol): void { + // If the current symbol is the smae as the previous-iteration symbol, we can just return as the symbol has already been visited + // This is particularly important for the following cases, so that we do not inifinitely visit the same symbol. + // For example: + // interface C extends C { + // /*findRef*/propName: string; + // } + // The first time getPropertySymbolsFromBaseTypes is called when finding-all-references at propName, + // the symbol argument will be the symbol of an interface "C" and previousIterationSymbol is undefined, + // the function will add any found symbol of the property-name, then its sub-routine will call + // getPropertySymbolsFromBaseTypes again to walk up any base types to prevent revisiting already + // visited symbol, interface "C", the sub- routine will pass the current symbol as previousIterationSymbol. + if (symbol === previousIterationSymbol) { + return; + } + if (symbol && symbol.flags & (SymbolFlags.Class | SymbolFlags.Interface)) { forEach(symbol.getDeclarations(), declaration => { if (declaration.kind === SyntaxKind.ClassDeclaration) { @@ -6014,7 +6037,7 @@ namespace ts { } // Visit the typeReference as well to see if it directly or indirectly use that property - getPropertySymbolsFromBaseTypes(type.symbol, propertyName, result); + getPropertySymbolsFromBaseTypes(type.symbol, propertyName, result, symbol); } } } @@ -6055,7 +6078,7 @@ namespace ts { // see if any is in the list if (rootSymbol.parent && rootSymbol.parent.flags & (SymbolFlags.Class | SymbolFlags.Interface)) { const result: Symbol[] = []; - getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result); + getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result, undefined); return forEach(result, s => searchSymbols.indexOf(s) >= 0 ? s : undefined); } From 3e1bc01a86ff520b8f871f8ca011c92aecba3538 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 23 Dec 2015 10:01:36 -0800 Subject: [PATCH 092/209] address PR feedback --- src/compiler/binder.ts | 5 ++--- src/compiler/checker.ts | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index d514026351d..dfe90831776 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -109,7 +109,6 @@ namespace ts { let blockScopeContainer: Node; let lastContainer: Node; let seenThisKeyword: boolean; - let isSourceFileExternalModule: boolean; // state used by reachability checks let hasExplicitReturn: boolean; @@ -130,7 +129,7 @@ namespace ts { function bindSourceFile(f: SourceFile, opts: CompilerOptions) { file = f; options = opts; - isSourceFileExternalModule = inStrictMode = !!file.externalModuleIndicator; + inStrictMode = !!file.externalModuleIndicator; classifiableNames = {}; Symbol = objectAllocator.getSymbolConstructor(); @@ -354,7 +353,7 @@ namespace ts { // NOTE: Nested ambient modules always should go to to 'locals' table to prevent their automatic merge // during global merging in the checker. Why? The only case when ambient module is permitted inside another module is module augmentation // and this case is specially handled. Module augmentations should only be merged with original module definition - // and should never be merged directly with other augmentation and the latter case would be possible is automatic merge is allowed. + // and should never be merged directly with other augmentation, and the latter case would be possible if automatic merge is allowed. if (!isAmbientModule(node) && (hasExportModifier || container.flags & NodeFlags.ExportContext)) { const exportKind = (symbolFlags & SymbolFlags.Value ? SymbolFlags.ExportValue : 0) | diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 2a79181ea45..b3efd7740c7 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -387,7 +387,7 @@ namespace ts { if (!mainModule) { return; } - // is module symbol is already merged - it is safe to use it. + // if module symbol has already been merged - it is safe to use it. // otherwise clone it mainModule = mainModule.flags & SymbolFlags.Merged ? mainModule : cloneSymbol(mainModule); mergeSymbol(mainModule, moduleAugmentation.symbol); From 7f2ebf928ab065c8acbac7a8fe980e50ed7c206d Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Mon, 28 Dec 2015 12:03:54 -0800 Subject: [PATCH 093/209] use 'declare global' to define augmentations for the global scope --- src/compiler/binder.ts | 6 +- src/compiler/checker.ts | 71 ++++++++++--------- src/compiler/declarationEmitter.ts | 25 ++++--- src/compiler/diagnosticMessages.json | 8 +++ src/compiler/parser.ts | 21 +++++- src/compiler/program.ts | 2 +- src/compiler/scanner.ts | 1 + src/compiler/types.ts | 2 + src/compiler/utilities.ts | 7 +- src/services/navigationBar.ts | 2 +- src/services/services.ts | 2 +- .../reference/moduleAugmentationGlobal1.js | 4 +- .../moduleAugmentationGlobal1.symbols | 6 +- .../reference/moduleAugmentationGlobal1.types | 4 +- .../reference/moduleAugmentationGlobal2.js | 4 +- .../moduleAugmentationGlobal2.symbols | 6 +- .../reference/moduleAugmentationGlobal2.types | 4 +- .../reference/moduleAugmentationGlobal3.js | 4 +- .../moduleAugmentationGlobal3.symbols | 6 +- .../reference/moduleAugmentationGlobal3.types | 4 +- .../moduleAugmentationGlobal4.errors.txt | 4 +- .../reference/moduleAugmentationGlobal4.js | 8 +-- .../moduleAugmentationGlobal5.errors.txt | 28 ++++++++ .../reference/moduleAugmentationGlobal5.js | 34 +++++++++ .../moduleAugmentationGlobal6.errors.txt | 9 +++ .../reference/moduleAugmentationGlobal6.js | 6 ++ .../moduleAugmentationGlobal6_1.errors.txt | 12 ++++ .../reference/moduleAugmentationGlobal6_1.js | 6 ++ .../moduleAugmentationGlobal7.errors.txt | 11 +++ .../reference/moduleAugmentationGlobal7.js | 8 +++ .../moduleAugmentationGlobal7_1.errors.txt | 14 ++++ .../reference/moduleAugmentationGlobal7_1.js | 8 +++ .../moduleAugmentationGlobal8.errors.txt | 13 ++++ .../reference/moduleAugmentationGlobal8.js | 13 ++++ .../moduleAugmentationGlobal8_1.errors.txt | 16 +++++ .../reference/moduleAugmentationGlobal8_1.js | 13 ++++ .../moduleAugmentationInAmbientModule5.js | 35 +++++++++ ...moduleAugmentationInAmbientModule5.symbols | 41 +++++++++++ .../moduleAugmentationInAmbientModule5.types | 44 ++++++++++++ .../compiler/moduleAugmentationGlobal1.ts | 2 +- .../compiler/moduleAugmentationGlobal2.ts | 2 +- .../compiler/moduleAugmentationGlobal3.ts | 2 +- .../compiler/moduleAugmentationGlobal4.ts | 4 +- .../compiler/moduleAugmentationGlobal5.ts | 21 ++++++ .../compiler/moduleAugmentationGlobal6.ts | 3 + .../compiler/moduleAugmentationGlobal6_1.ts | 3 + .../compiler/moduleAugmentationGlobal7.ts | 5 ++ .../compiler/moduleAugmentationGlobal7_1.ts | 5 ++ .../compiler/moduleAugmentationGlobal8.ts | 8 +++ .../compiler/moduleAugmentationGlobal8_1.ts | 8 +++ .../moduleAugmentationInAmbientModule5.ts | 23 ++++++ .../formattingGlobalAugmentation1.ts | 8 +++ .../formattingGlobalAugmentation2.ts | 10 +++ .../fourslash/indentationInAugmentations1.ts | 9 +++ .../fourslash/indentationInAugmentations2.ts | 8 +++ 55 files changed, 554 insertions(+), 79 deletions(-) create mode 100644 tests/baselines/reference/moduleAugmentationGlobal5.errors.txt create mode 100644 tests/baselines/reference/moduleAugmentationGlobal5.js create mode 100644 tests/baselines/reference/moduleAugmentationGlobal6.errors.txt create mode 100644 tests/baselines/reference/moduleAugmentationGlobal6.js create mode 100644 tests/baselines/reference/moduleAugmentationGlobal6_1.errors.txt create mode 100644 tests/baselines/reference/moduleAugmentationGlobal6_1.js create mode 100644 tests/baselines/reference/moduleAugmentationGlobal7.errors.txt create mode 100644 tests/baselines/reference/moduleAugmentationGlobal7.js create mode 100644 tests/baselines/reference/moduleAugmentationGlobal7_1.errors.txt create mode 100644 tests/baselines/reference/moduleAugmentationGlobal7_1.js create mode 100644 tests/baselines/reference/moduleAugmentationGlobal8.errors.txt create mode 100644 tests/baselines/reference/moduleAugmentationGlobal8.js create mode 100644 tests/baselines/reference/moduleAugmentationGlobal8_1.errors.txt create mode 100644 tests/baselines/reference/moduleAugmentationGlobal8_1.js create mode 100644 tests/baselines/reference/moduleAugmentationInAmbientModule5.js create mode 100644 tests/baselines/reference/moduleAugmentationInAmbientModule5.symbols create mode 100644 tests/baselines/reference/moduleAugmentationInAmbientModule5.types create mode 100644 tests/cases/compiler/moduleAugmentationGlobal5.ts create mode 100644 tests/cases/compiler/moduleAugmentationGlobal6.ts create mode 100644 tests/cases/compiler/moduleAugmentationGlobal6_1.ts create mode 100644 tests/cases/compiler/moduleAugmentationGlobal7.ts create mode 100644 tests/cases/compiler/moduleAugmentationGlobal7_1.ts create mode 100644 tests/cases/compiler/moduleAugmentationGlobal8.ts create mode 100644 tests/cases/compiler/moduleAugmentationGlobal8_1.ts create mode 100644 tests/cases/compiler/moduleAugmentationInAmbientModule5.ts create mode 100644 tests/cases/fourslash/formattingGlobalAugmentation1.ts create mode 100644 tests/cases/fourslash/formattingGlobalAugmentation2.ts create mode 100644 tests/cases/fourslash/indentationInAugmentations1.ts create mode 100644 tests/cases/fourslash/indentationInAugmentations2.ts diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index dfe90831776..5014c424162 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -192,8 +192,8 @@ namespace ts { // unless it is a well known Symbol. function getDeclarationName(node: Declaration): string { if (node.name) { - if (node.kind === SyntaxKind.ModuleDeclaration && node.name.kind === SyntaxKind.StringLiteral) { - return `"${(node.name).text}"`; + if (isAmbientModule(node)) { + return isGlobalScopeAugmentation(node) ? "__global" : `"${(node.name).text}"`; } if (node.name.kind === SyntaxKind.ComputedPropertyName) { const nameExpression = (node.name).expression; @@ -849,7 +849,7 @@ namespace ts { function bindModuleDeclaration(node: ModuleDeclaration) { setExportContextFlag(node); - if (node.name.kind === SyntaxKind.StringLiteral) { + if (isAmbientModule(node)) { if (node.flags & NodeFlags.Export) { errorOnFirstToken(node, Diagnostics.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible); } diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index b3efd7740c7..5b378d8af3f 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -378,7 +378,7 @@ namespace ts { return; } - if (isNameOfGlobalAugmentation(moduleName)) { + if (isGlobalScopeAugmentation(moduleAugmentation)) { mergeSymbolTable(globals, moduleAugmentation.symbol.exports); } else { @@ -597,8 +597,7 @@ namespace ts { if (!isExternalOrCommonJsModule(location)) break; case SyntaxKind.ModuleDeclaration: const moduleExports = getSymbolOfNode(location).exports; - if (location.kind === SyntaxKind.SourceFile || - (location.kind === SyntaxKind.ModuleDeclaration && (location).name.kind === SyntaxKind.StringLiteral)) { + if (location.kind === SyntaxKind.SourceFile || isAmbientModule(location)) { // It's an external module. First see if the module has an export default and if the local // name of that export default matches. @@ -1552,8 +1551,7 @@ namespace ts { } function hasExternalModuleSymbol(declaration: Node) { - return (declaration.kind === SyntaxKind.ModuleDeclaration && (declaration).name.kind === SyntaxKind.StringLiteral) || - (declaration.kind === SyntaxKind.SourceFile && isExternalOrCommonJsModule(declaration)); + return isAmbientModule(declaration) || (declaration.kind === SyntaxKind.SourceFile && isExternalOrCommonJsModule(declaration)); } function hasVisibleDeclarations(symbol: Symbol): SymbolVisibilityResult { @@ -11995,7 +11993,7 @@ namespace ts { case SyntaxKind.InterfaceDeclaration: return SymbolFlags.ExportType; case SyntaxKind.ModuleDeclaration: - return (d).name.kind === SyntaxKind.StringLiteral || getModuleInstanceState(d) !== ModuleInstanceState.NonInstantiated + return isAmbientModule(d) || getModuleInstanceState(d) !== ModuleInstanceState.NonInstantiated ? SymbolFlags.ExportNamespace | SymbolFlags.ExportValue : SymbolFlags.ExportNamespace; case SyntaxKind.ClassDeclaration: @@ -14134,7 +14132,13 @@ namespace ts { function checkModuleDeclaration(node: ModuleDeclaration) { if (produceDiagnostics) { // Grammar checking - const isAmbientExternalModule = node.name.kind === SyntaxKind.StringLiteral; + const isGlobalAugmentation = isGlobalScopeAugmentation(node); + const inAmbientContext = isInAmbientContext(node); + if (isGlobalAugmentation && !inAmbientContext) { + error(node.name, Diagnostics.Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context); + } + + const isAmbientExternalModule = isAmbientModule(node); const contextErrorMessage = isAmbientExternalModule ? Diagnostics.An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file : Diagnostics.A_namespace_declaration_is_only_allowed_in_a_namespace_or_module; @@ -14144,7 +14148,7 @@ namespace ts { } if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node)) { - if (!isInAmbientContext(node) && node.name.kind === SyntaxKind.StringLiteral) { + if (!inAmbientContext && node.name.kind === SyntaxKind.StringLiteral) { grammarErrorOnNode(node.name, Diagnostics.Only_ambient_modules_can_use_quoted_names); } } @@ -14157,7 +14161,7 @@ namespace ts { // The following checks only apply on a non-ambient instantiated module declaration. if (symbol.flags & SymbolFlags.ValueModule && symbol.declarations.length > 1 - && !isInAmbientContext(node) + && !inAmbientContext && isInstantiatedModule(node, compilerOptions.preserveConstEnums || compilerOptions.isolatedModules)) { const firstNonAmbientClassOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol); if (firstNonAmbientClassOrFunc) { @@ -14180,41 +14184,42 @@ namespace ts { if (isAmbientExternalModule) { if (isExternalModuleAugmentation(node)) { - // if symbol of augmentation is not merged this means that either - // - this is an augmentation of the global scope - // or - // - this augmentation was not merged with main definition of the module - // error should already be reported so all errors in the body of augmentation can be ignored. - const checkBody = isNameOfGlobalAugmentation(node.name) || (getSymbolOfNode(node).flags & SymbolFlags.Merged); + // body of the augmentation should be checked for consistency only if augmentation was applied to its target (either global scope or module) + // otherwise we'll be swamped in cascading errors. + // We can detect if augmentation was applied using following rules: + // - augmentation for a global scope is always applied + // - augmentation for some external module is applied if symbol for augmentation is merged (it was combined with target module). + const checkBody = isGlobalAugmentation || (getSymbolOfNode(node).flags & SymbolFlags.Merged); if (checkBody) { - const globalAugmentation = isNameOfGlobalAugmentation(node.name); // body of ambient external module is always a module block for (const statement of (node.body).statements) { - checkBodyOfModuleAugmentation(statement, globalAugmentation); + checkBodyOfModuleAugmentation(statement, isGlobalAugmentation); } } } else if (isGlobalSourceFile(node.parent)) { - if (isExternalModuleNameRelative(node.name.text)) { + if (isGlobalAugmentation) { + error(node.name, Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations); + } + else if (isExternalModuleNameRelative(node.name.text)) { error(node.name, Diagnostics.Ambient_module_declaration_cannot_specify_relative_module_name); } } else { - // Node is not an augmentation and is not located on the script level. - // This means that this is declaration of ambient module that is located in other module or namespace which is prohibited. - error(node.name, Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces); + if (isGlobalAugmentation) { + error(node.name, Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations); + } + else { + // Node is not an augmentation and is not located on the script level. + // This means that this is declaration of ambient module that is located in other module or namespace which is prohibited. + error(node.name, Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces); + } } } } checkSourceElement(node.body); } - function isNameOfGlobalAugmentation(node: LiteralExpression): boolean { - // global augmentation - // TODO: fix to use 'declare global' syntax. - return node.text === "/"; - } - function checkBodyOfModuleAugmentation(node: Node, isGlobalAugmentation: boolean): void { switch (node.kind) { case SyntaxKind.VariableStatement: @@ -14294,7 +14299,7 @@ namespace ts { error(moduleName, Diagnostics.String_literal_expected); return false; } - const inAmbientExternalModule = node.parent.kind === SyntaxKind.ModuleBlock && (node.parent.parent).name.kind === SyntaxKind.StringLiteral; + const inAmbientExternalModule = node.parent.kind === SyntaxKind.ModuleBlock && isAmbientModule(node.parent.parent); if (node.parent.kind !== SyntaxKind.SourceFile && !inAmbientExternalModule) { error(moduleName, node.kind === SyntaxKind.ExportDeclaration ? Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : @@ -14417,7 +14422,7 @@ namespace ts { // export { x, y } from "foo" forEach(node.exportClause.elements, checkExportSpecifier); - const inAmbientExternalModule = node.parent.kind === SyntaxKind.ModuleBlock && (node.parent.parent).name.kind === SyntaxKind.StringLiteral; + const inAmbientExternalModule = node.parent.kind === SyntaxKind.ModuleBlock && isAmbientModule(node.parent.parent); if (node.parent.kind !== SyntaxKind.SourceFile && !inAmbientExternalModule) { error(node, Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); } @@ -14452,7 +14457,7 @@ namespace ts { } const container = node.parent.kind === SyntaxKind.SourceFile ? node.parent : node.parent.parent; - if (container.kind === SyntaxKind.ModuleDeclaration && (container).name.kind === SyntaxKind.Identifier) { + if (container.kind === SyntaxKind.ModuleDeclaration && !isAmbientModule(container)) { error(node, Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); return; } @@ -15616,10 +15621,8 @@ namespace ts { // merge module augmentations. // this needs to be done after global symbol table is initialized to make sure that all ambient modules are indexed for (const file of host.getSourceFiles()) { - if (file.moduleAugmentations.length) { - for (const augmentation of file.moduleAugmentations) { - mergeModuleAugmentation(augmentation); - } + for (const augmentation of file.moduleAugmentations) { + mergeModuleAugmentation(augmentation); } } } diff --git a/src/compiler/declarationEmitter.ts b/src/compiler/declarationEmitter.ts index f0b4e05652c..578552df800 100644 --- a/src/compiler/declarationEmitter.ts +++ b/src/compiler/declarationEmitter.ts @@ -731,7 +731,7 @@ namespace ts { } function emitExternalModuleSpecifier(parent: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration | ModuleDeclaration) { - // emitExternalModuleSpecifier is usualyl called when we emit something in the.d.ts file that will make it an external module (i.e. import/export declarations). + // emitExternalModuleSpecifier is usually called when we emit something in the.d.ts file that will make it an external module (i.e. import/export declarations). // the only case when it is not true is when we call it to emit correct name for module augmentation - d.ts files with just module augmentations are not considered // external modules since they are indistingushable from script files with ambient modules. To fix this in such d.ts files we'll emit top level 'export {}' // so compiler will treat them as external modules. @@ -802,17 +802,22 @@ namespace ts { function writeModuleDeclaration(node: ModuleDeclaration) { emitJsDocComments(node); emitModuleElementDeclarationFlags(node); - if (node.flags & NodeFlags.Namespace) { - write("namespace "); + if (isGlobalScopeAugmentation(node)) { + write("global "); } else { - write("module "); - } - if (isExternalModuleAugmentation(node)) { - emitExternalModuleSpecifier(node); - } - else { - writeTextOfNode(currentText, node.name); + if (node.flags & NodeFlags.Namespace) { + write("namespace "); + } + else { + write("module "); + } + if (isExternalModuleAugmentation(node)) { + emitExternalModuleSpecifier(node); + } + else { + writeTextOfNode(currentText, node.name); + } } while (node.body.kind !== SyntaxKind.ModuleBlock) { node = node.body; diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 4007d70e592..72b14468797 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1791,6 +1791,14 @@ "category": "Error", "code": 2665 }, + "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations.": { + "category": "Error", + "code": 2666 + }, + "Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context.": { + "category": "Error", + "code": 2667 + }, "Import declaration '{0}' is using private name '{1}'.": { "category": "Error", "code": 4000 diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 7f5d052a7e7..f2ad8b88cf2 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -4387,6 +4387,9 @@ namespace ts { } continue; + case SyntaxKind.GlobalKeyword: + return nextToken() === SyntaxKind.OpenBraceToken; + case SyntaxKind.ImportKeyword: nextToken(); return token === SyntaxKind.StringLiteral || token === SyntaxKind.AsteriskToken || @@ -4451,6 +4454,7 @@ namespace ts { case SyntaxKind.ModuleKeyword: case SyntaxKind.NamespaceKeyword: case SyntaxKind.TypeKeyword: + case SyntaxKind.GlobalKeyword: // When these don't start a declaration, they're an identifier in an expression statement return true; @@ -4539,6 +4543,7 @@ namespace ts { case SyntaxKind.PublicKeyword: case SyntaxKind.AbstractKeyword: case SyntaxKind.StaticKeyword: + case SyntaxKind.GlobalKeyword: if (isStartOfDeclaration()) { return parseDeclaration(); } @@ -4566,6 +4571,7 @@ namespace ts { return parseTypeAliasDeclaration(fullStart, decorators, modifiers); case SyntaxKind.EnumKeyword: return parseEnumDeclaration(fullStart, decorators, modifiers); + case SyntaxKind.GlobalKeyword: case SyntaxKind.ModuleKeyword: case SyntaxKind.NamespaceKeyword: return parseModuleDeclaration(fullStart, decorators, modifiers); @@ -5200,14 +5206,25 @@ namespace ts { const node = createNode(SyntaxKind.ModuleDeclaration, fullStart); node.decorators = decorators; setModifiers(node, modifiers); - node.name = parseLiteralNode(/*internName*/ true); + if (token === SyntaxKind.GlobalKeyword) { + // parse 'global' as name of global scope augmentation + node.name = parseIdentifier(); + node.flags |= NodeFlags.GlobalAugmentation; + } + else { + node.name = parseLiteralNode(/*internName*/ true); + } node.body = parseModuleBlock(); return finishNode(node); } function parseModuleDeclaration(fullStart: number, decorators: NodeArray, modifiers: ModifiersArray): ModuleDeclaration { let flags = modifiers ? modifiers.flags : 0; - if (parseOptional(SyntaxKind.NamespaceKeyword)) { + if (token === SyntaxKind.GlobalKeyword) { + // global augmentation + return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers); + } + else if (parseOptional(SyntaxKind.NamespaceKeyword)) { flags |= NodeFlags.Namespace; } else { diff --git a/src/compiler/program.ts b/src/compiler/program.ts index fa0b4d61fb0..a97f5ee3d0c 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -952,7 +952,7 @@ namespace ts { } break; case SyntaxKind.ModuleDeclaration: - if ((node).name.kind === SyntaxKind.StringLiteral && (inAmbientModule || node.flags & NodeFlags.Ambient || isDeclarationFile(file))) { + if (isAmbientModule(node) && (inAmbientModule || node.flags & NodeFlags.Ambient || isDeclarationFile(file))) { const moduleName = (node).name; // Ambient module declarations can be interpreted as augmentations for some existing external modules. // This will happen in two cases: diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index 022d63fbe9d..3e9698eb740 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -94,6 +94,7 @@ namespace ts { "protected": SyntaxKind.ProtectedKeyword, "public": SyntaxKind.PublicKeyword, "require": SyntaxKind.RequireKeyword, + "global": SyntaxKind.GlobalKeyword, "return": SyntaxKind.ReturnKeyword, "set": SyntaxKind.SetKeyword, "static": SyntaxKind.StaticKeyword, diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 88417ff7370..7b5af130a69 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -170,6 +170,7 @@ namespace ts { SymbolKeyword, TypeKeyword, FromKeyword, + GlobalKeyword, OfKeyword, // LastKeyword and LastToken // Parse tree nodes @@ -389,6 +390,7 @@ namespace ts { ContainsThis = 1 << 18, // Interface contains references to "this" HasImplicitReturn = 1 << 19, // If function implicitly returns on one of codepaths (initialized by binding) HasExplicitReturn = 1 << 20, // If function has explicit reachable return on one of codepaths (initialized by binding) + GlobalAugmentation = 1 << 21, // Set if module declaration is an augmentation for the global scope Modifier = Export | Ambient | Public | Private | Protected | Static | Abstract | Default | Async, AccessibilityModifier = Public | Private | Protected, BlockScoped = Let | Const, diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index bb0a6866a59..b49d011c616 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -252,7 +252,12 @@ namespace ts { } export function isAmbientModule(node: Node): boolean { - return node && node.kind === SyntaxKind.ModuleDeclaration && (node).name.kind === SyntaxKind.StringLiteral; + return node && node.kind === SyntaxKind.ModuleDeclaration && + ((node).name.kind === SyntaxKind.StringLiteral || isGlobalScopeAugmentation(node)); + } + + export function isGlobalScopeAugmentation(module: ModuleDeclaration): boolean { + return !!(module.flags & NodeFlags.GlobalAugmentation); } export function isExternalModuleAugmentation(node: Node): boolean { diff --git a/src/services/navigationBar.ts b/src/services/navigationBar.ts index 46ec807a881..f62c6cb1700 100644 --- a/src/services/navigationBar.ts +++ b/src/services/navigationBar.ts @@ -387,7 +387,7 @@ namespace ts.NavigationBar { function getModuleName(moduleDeclaration: ModuleDeclaration): string { // We want to maintain quotation marks. - if (moduleDeclaration.name.kind === SyntaxKind.StringLiteral) { + if (isAmbientModule(moduleDeclaration)) { return getTextOfNode(moduleDeclaration.name); } diff --git a/src/services/services.ts b/src/services/services.ts index e5fcbc8fda4..044fd4d6b7a 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -6229,7 +6229,7 @@ namespace ts { return SemanticMeaning.Value | SemanticMeaning.Type; case SyntaxKind.ModuleDeclaration: - if ((node).name.kind === SyntaxKind.StringLiteral) { + if (isAmbientModule(node)) { return SemanticMeaning.Namespace | SemanticMeaning.Value; } else if (getModuleInstanceState(node) === ModuleInstanceState.Instantiated) { diff --git a/tests/baselines/reference/moduleAugmentationGlobal1.js b/tests/baselines/reference/moduleAugmentationGlobal1.js index 6debfecfe76..99351642a18 100644 --- a/tests/baselines/reference/moduleAugmentationGlobal1.js +++ b/tests/baselines/reference/moduleAugmentationGlobal1.js @@ -8,7 +8,7 @@ export class A {x: number;} import {A} from "./f1"; // change the shape of Array -declare module "/" { +declare global { interface Array { getA(): A; } @@ -38,7 +38,7 @@ export declare class A { } //// [f2.d.ts] import { A } from "./f1"; -declare module "/" { +declare global { interface Array { getA(): A; } diff --git a/tests/baselines/reference/moduleAugmentationGlobal1.symbols b/tests/baselines/reference/moduleAugmentationGlobal1.symbols index cc033b578f8..36139555c96 100644 --- a/tests/baselines/reference/moduleAugmentationGlobal1.symbols +++ b/tests/baselines/reference/moduleAugmentationGlobal1.symbols @@ -9,9 +9,11 @@ import {A} from "./f1"; >A : Symbol(A, Decl(f2.ts, 0, 8)) // change the shape of Array -declare module "/" { +declare global { +>global : Symbol(, Decl(f2.ts, 0, 23)) + interface Array { ->Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(f2.ts, 3, 20)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(f2.ts, 3, 16)) >T : Symbol(T, Decl(lib.d.ts, --, --), Decl(f2.ts, 4, 20)) getA(): A; diff --git a/tests/baselines/reference/moduleAugmentationGlobal1.types b/tests/baselines/reference/moduleAugmentationGlobal1.types index e87a06f8ce3..c1742edd7c0 100644 --- a/tests/baselines/reference/moduleAugmentationGlobal1.types +++ b/tests/baselines/reference/moduleAugmentationGlobal1.types @@ -9,7 +9,9 @@ import {A} from "./f1"; >A : typeof A // change the shape of Array -declare module "/" { +declare global { +>global : typeof + interface Array { >Array : T[] >T : T diff --git a/tests/baselines/reference/moduleAugmentationGlobal2.js b/tests/baselines/reference/moduleAugmentationGlobal2.js index 1cc07fe601d..90e8373302e 100644 --- a/tests/baselines/reference/moduleAugmentationGlobal2.js +++ b/tests/baselines/reference/moduleAugmentationGlobal2.js @@ -8,7 +8,7 @@ export class A {}; // change the shape of Array import {A} from "./f1"; -declare module "/" { +declare global { interface Array { getCountAsString(): string; } @@ -37,7 +37,7 @@ var y = x.getCountAsString().toLowerCase(); export declare class A { } //// [f2.d.ts] -declare module "/" { +declare global { interface Array { getCountAsString(): string; } diff --git a/tests/baselines/reference/moduleAugmentationGlobal2.symbols b/tests/baselines/reference/moduleAugmentationGlobal2.symbols index 70547a5af40..4ee2b9bace8 100644 --- a/tests/baselines/reference/moduleAugmentationGlobal2.symbols +++ b/tests/baselines/reference/moduleAugmentationGlobal2.symbols @@ -9,9 +9,11 @@ export class A {}; import {A} from "./f1"; >A : Symbol(A, Decl(f2.ts, 2, 8)) -declare module "/" { +declare global { +>global : Symbol(, Decl(f2.ts, 2, 23)) + interface Array { ->Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(f2.ts, 4, 20)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(f2.ts, 4, 16)) >T : Symbol(T, Decl(lib.d.ts, --, --), Decl(f2.ts, 5, 20)) getCountAsString(): string; diff --git a/tests/baselines/reference/moduleAugmentationGlobal2.types b/tests/baselines/reference/moduleAugmentationGlobal2.types index e305b19a708..36ef480d8b2 100644 --- a/tests/baselines/reference/moduleAugmentationGlobal2.types +++ b/tests/baselines/reference/moduleAugmentationGlobal2.types @@ -9,7 +9,9 @@ export class A {}; import {A} from "./f1"; >A : typeof A -declare module "/" { +declare global { +>global : typeof + interface Array { >Array : T[] >T : T diff --git a/tests/baselines/reference/moduleAugmentationGlobal3.js b/tests/baselines/reference/moduleAugmentationGlobal3.js index 5c1e892bcce..4cff75f5df0 100644 --- a/tests/baselines/reference/moduleAugmentationGlobal3.js +++ b/tests/baselines/reference/moduleAugmentationGlobal3.js @@ -8,7 +8,7 @@ export class A {}; // change the shape of Array import {A} from "./f1"; -declare module "/" { +declare global { interface Array { getCountAsString(): string; } @@ -43,7 +43,7 @@ var y = x.getCountAsString().toLowerCase(); export declare class A { } //// [f2.d.ts] -declare module "/" { +declare global { interface Array { getCountAsString(): string; } diff --git a/tests/baselines/reference/moduleAugmentationGlobal3.symbols b/tests/baselines/reference/moduleAugmentationGlobal3.symbols index 561093677ad..acb9a7b9e58 100644 --- a/tests/baselines/reference/moduleAugmentationGlobal3.symbols +++ b/tests/baselines/reference/moduleAugmentationGlobal3.symbols @@ -9,9 +9,11 @@ export class A {}; import {A} from "./f1"; >A : Symbol(A, Decl(f2.ts, 2, 8)) -declare module "/" { +declare global { +>global : Symbol(, Decl(f2.ts, 2, 23)) + interface Array { ->Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(f2.ts, 4, 20)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(f2.ts, 4, 16)) >T : Symbol(T, Decl(lib.d.ts, --, --), Decl(f2.ts, 5, 20)) getCountAsString(): string; diff --git a/tests/baselines/reference/moduleAugmentationGlobal3.types b/tests/baselines/reference/moduleAugmentationGlobal3.types index 4896a1e0374..58d7f30faab 100644 --- a/tests/baselines/reference/moduleAugmentationGlobal3.types +++ b/tests/baselines/reference/moduleAugmentationGlobal3.types @@ -9,7 +9,9 @@ export class A {}; import {A} from "./f1"; >A : typeof A -declare module "/" { +declare global { +>global : typeof + interface Array { >Array : T[] >T : T diff --git a/tests/baselines/reference/moduleAugmentationGlobal4.errors.txt b/tests/baselines/reference/moduleAugmentationGlobal4.errors.txt index 3ef9ffeda0b..ae4fdc64972 100644 --- a/tests/baselines/reference/moduleAugmentationGlobal4.errors.txt +++ b/tests/baselines/reference/moduleAugmentationGlobal4.errors.txt @@ -4,7 +4,7 @@ tests/cases/compiler/f2.ts(3,15): error TS2662: Module augmentation cannot intro ==== tests/cases/compiler/f1.ts (1 errors) ==== - declare module "/" { + declare global { interface Something {x} ~~~~~~~~~ !!! error TS2662: Module augmentation cannot introduce new names in the top level scope. @@ -12,7 +12,7 @@ tests/cases/compiler/f2.ts(3,15): error TS2662: Module augmentation cannot intro export {}; ==== tests/cases/compiler/f2.ts (1 errors) ==== - declare module "/" { + declare global { interface Something {y} ~~~~~~~~~ !!! error TS2662: Module augmentation cannot introduce new names in the top level scope. diff --git a/tests/baselines/reference/moduleAugmentationGlobal4.js b/tests/baselines/reference/moduleAugmentationGlobal4.js index 11a0b92be3e..11c5d968df2 100644 --- a/tests/baselines/reference/moduleAugmentationGlobal4.js +++ b/tests/baselines/reference/moduleAugmentationGlobal4.js @@ -2,13 +2,13 @@ //// [f1.ts] -declare module "/" { +declare global { interface Something {x} } export {}; //// [f2.ts] -declare module "/" { +declare global { interface Something {y} } export {}; @@ -29,7 +29,7 @@ require("./f2"); //// [f1.d.ts] -declare module "/" { +declare global { interface Something { x: any; } @@ -37,7 +37,7 @@ declare module "/" { export { }; export {}; //// [f2.d.ts] -declare module "/" { +declare global { interface Something { y: any; } diff --git a/tests/baselines/reference/moduleAugmentationGlobal5.errors.txt b/tests/baselines/reference/moduleAugmentationGlobal5.errors.txt new file mode 100644 index 00000000000..4b46ccf5853 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationGlobal5.errors.txt @@ -0,0 +1,28 @@ +tests/cases/compiler/f1.d.ts(4,19): error TS2662: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/f2.d.ts(3,19): error TS2662: Module augmentation cannot introduce new names in the top level scope. + + +==== tests/cases/compiler/f3.ts (0 errors) ==== + /// + /// + import "A"; + import "B"; + + +==== tests/cases/compiler/f1.d.ts (1 errors) ==== + + declare module "A" { + global { + interface Something {x} + ~~~~~~~~~ +!!! error TS2662: Module augmentation cannot introduce new names in the top level scope. + } + } +==== tests/cases/compiler/f2.d.ts (1 errors) ==== + declare module "B" { + global { + interface Something {y} + ~~~~~~~~~ +!!! error TS2662: Module augmentation cannot introduce new names in the top level scope. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/moduleAugmentationGlobal5.js b/tests/baselines/reference/moduleAugmentationGlobal5.js new file mode 100644 index 00000000000..3efdd2dbb98 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationGlobal5.js @@ -0,0 +1,34 @@ +//// [tests/cases/compiler/moduleAugmentationGlobal5.ts] //// + +//// [f1.d.ts] + +declare module "A" { + global { + interface Something {x} + } +} +//// [f2.d.ts] +declare module "B" { + global { + interface Something {y} + } +} +//// [f3.ts] +/// +/// +import "A"; +import "B"; + + + +//// [f3.js] +"use strict"; +/// +/// +require("A"); +require("B"); + + +//// [f3.d.ts] +/// +/// diff --git a/tests/baselines/reference/moduleAugmentationGlobal6.errors.txt b/tests/baselines/reference/moduleAugmentationGlobal6.errors.txt new file mode 100644 index 00000000000..b73a62abd22 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationGlobal6.errors.txt @@ -0,0 +1,9 @@ +tests/cases/compiler/moduleAugmentationGlobal6.ts(1,9): error TS2666: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations. + + +==== tests/cases/compiler/moduleAugmentationGlobal6.ts (1 errors) ==== + declare global { + ~~~~~~ +!!! error TS2666: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations. + interface Array { x } + } \ No newline at end of file diff --git a/tests/baselines/reference/moduleAugmentationGlobal6.js b/tests/baselines/reference/moduleAugmentationGlobal6.js new file mode 100644 index 00000000000..ac988f670d2 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationGlobal6.js @@ -0,0 +1,6 @@ +//// [moduleAugmentationGlobal6.ts] +declare global { + interface Array { x } +} + +//// [moduleAugmentationGlobal6.js] diff --git a/tests/baselines/reference/moduleAugmentationGlobal6_1.errors.txt b/tests/baselines/reference/moduleAugmentationGlobal6_1.errors.txt new file mode 100644 index 00000000000..3b386fc2216 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationGlobal6_1.errors.txt @@ -0,0 +1,12 @@ +tests/cases/compiler/moduleAugmentationGlobal6_1.ts(1,1): error TS2666: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations. +tests/cases/compiler/moduleAugmentationGlobal6_1.ts(1,1): error TS2667: Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context. + + +==== tests/cases/compiler/moduleAugmentationGlobal6_1.ts (2 errors) ==== + global { + ~~~~~~ +!!! error TS2666: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations. + ~~~~~~ +!!! error TS2667: Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context. + interface Array { x } + } \ No newline at end of file diff --git a/tests/baselines/reference/moduleAugmentationGlobal6_1.js b/tests/baselines/reference/moduleAugmentationGlobal6_1.js new file mode 100644 index 00000000000..5ae85debbe2 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationGlobal6_1.js @@ -0,0 +1,6 @@ +//// [moduleAugmentationGlobal6_1.ts] +global { + interface Array { x } +} + +//// [moduleAugmentationGlobal6_1.js] diff --git a/tests/baselines/reference/moduleAugmentationGlobal7.errors.txt b/tests/baselines/reference/moduleAugmentationGlobal7.errors.txt new file mode 100644 index 00000000000..1409c427b29 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationGlobal7.errors.txt @@ -0,0 +1,11 @@ +tests/cases/compiler/moduleAugmentationGlobal7.ts(2,13): error TS2666: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations. + + +==== tests/cases/compiler/moduleAugmentationGlobal7.ts (1 errors) ==== + namespace A { + declare global { + ~~~~~~ +!!! error TS2666: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations. + interface Array { x } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/moduleAugmentationGlobal7.js b/tests/baselines/reference/moduleAugmentationGlobal7.js new file mode 100644 index 00000000000..54c6ddc0de7 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationGlobal7.js @@ -0,0 +1,8 @@ +//// [moduleAugmentationGlobal7.ts] +namespace A { + declare global { + interface Array { x } + } +} + +//// [moduleAugmentationGlobal7.js] diff --git a/tests/baselines/reference/moduleAugmentationGlobal7_1.errors.txt b/tests/baselines/reference/moduleAugmentationGlobal7_1.errors.txt new file mode 100644 index 00000000000..f25b66d3895 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationGlobal7_1.errors.txt @@ -0,0 +1,14 @@ +tests/cases/compiler/moduleAugmentationGlobal7_1.ts(2,5): error TS2666: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations. +tests/cases/compiler/moduleAugmentationGlobal7_1.ts(2,5): error TS2667: Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context. + + +==== tests/cases/compiler/moduleAugmentationGlobal7_1.ts (2 errors) ==== + namespace A { + global { + ~~~~~~ +!!! error TS2666: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations. + ~~~~~~ +!!! error TS2667: Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context. + interface Array { x } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/moduleAugmentationGlobal7_1.js b/tests/baselines/reference/moduleAugmentationGlobal7_1.js new file mode 100644 index 00000000000..745be0d76a0 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationGlobal7_1.js @@ -0,0 +1,8 @@ +//// [moduleAugmentationGlobal7_1.ts] +namespace A { + global { + interface Array { x } + } +} + +//// [moduleAugmentationGlobal7_1.js] diff --git a/tests/baselines/reference/moduleAugmentationGlobal8.errors.txt b/tests/baselines/reference/moduleAugmentationGlobal8.errors.txt new file mode 100644 index 00000000000..553d2b63f62 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationGlobal8.errors.txt @@ -0,0 +1,13 @@ +tests/cases/compiler/moduleAugmentationGlobal8.ts(2,13): error TS2666: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations. + + +==== tests/cases/compiler/moduleAugmentationGlobal8.ts (1 errors) ==== + namespace A { + declare global { + ~~~~~~ +!!! error TS2666: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations. + interface Array { x } + } + } + export {} + \ No newline at end of file diff --git a/tests/baselines/reference/moduleAugmentationGlobal8.js b/tests/baselines/reference/moduleAugmentationGlobal8.js new file mode 100644 index 00000000000..261dfd21b58 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationGlobal8.js @@ -0,0 +1,13 @@ +//// [moduleAugmentationGlobal8.ts] +namespace A { + declare global { + interface Array { x } + } +} +export {} + + +//// [moduleAugmentationGlobal8.js] +define(["require", "exports"], function (require, exports) { + "use strict"; +}); diff --git a/tests/baselines/reference/moduleAugmentationGlobal8_1.errors.txt b/tests/baselines/reference/moduleAugmentationGlobal8_1.errors.txt new file mode 100644 index 00000000000..255d7b90612 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationGlobal8_1.errors.txt @@ -0,0 +1,16 @@ +tests/cases/compiler/moduleAugmentationGlobal8_1.ts(2,5): error TS2666: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations. +tests/cases/compiler/moduleAugmentationGlobal8_1.ts(2,5): error TS2667: Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context. + + +==== tests/cases/compiler/moduleAugmentationGlobal8_1.ts (2 errors) ==== + namespace A { + global { + ~~~~~~ +!!! error TS2666: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations. + ~~~~~~ +!!! error TS2667: Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context. + interface Array { x } + } + } + export {} + \ No newline at end of file diff --git a/tests/baselines/reference/moduleAugmentationGlobal8_1.js b/tests/baselines/reference/moduleAugmentationGlobal8_1.js new file mode 100644 index 00000000000..2ac585a711b --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationGlobal8_1.js @@ -0,0 +1,13 @@ +//// [moduleAugmentationGlobal8_1.ts] +namespace A { + global { + interface Array { x } + } +} +export {} + + +//// [moduleAugmentationGlobal8_1.js] +define(["require", "exports"], function (require, exports) { + "use strict"; +}); diff --git a/tests/baselines/reference/moduleAugmentationInAmbientModule5.js b/tests/baselines/reference/moduleAugmentationInAmbientModule5.js new file mode 100644 index 00000000000..fab9cebb179 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationInAmbientModule5.js @@ -0,0 +1,35 @@ +//// [tests/cases/compiler/moduleAugmentationInAmbientModule5.ts] //// + +//// [array.d.ts] + +declare module "A" { + class A { x: number; } +} + +declare module "array" { + import {A} from "A"; + global { + interface Array { + getA(): A; + } + } +} + +//// [f.ts] +/// +import "array"; + +let x = [1]; +let y = x.getA().x; + + +//// [f.js] +"use strict"; +/// +require("array"); +var x = [1]; +var y = x.getA().x; + + +//// [f.d.ts] +/// diff --git a/tests/baselines/reference/moduleAugmentationInAmbientModule5.symbols b/tests/baselines/reference/moduleAugmentationInAmbientModule5.symbols new file mode 100644 index 00000000000..a663efca64d --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationInAmbientModule5.symbols @@ -0,0 +1,41 @@ +=== tests/cases/compiler/f.ts === +/// +import "array"; + +let x = [1]; +>x : Symbol(x, Decl(f.ts, 3, 3)) + +let y = x.getA().x; +>y : Symbol(y, Decl(f.ts, 4, 3)) +>x.getA().x : Symbol(A.x, Decl(array.d.ts, 2, 13)) +>x.getA : Symbol(Array.getA, Decl(array.d.ts, 8, 28)) +>x : Symbol(x, Decl(f.ts, 3, 3)) +>getA : Symbol(Array.getA, Decl(array.d.ts, 8, 28)) +>x : Symbol(A.x, Decl(array.d.ts, 2, 13)) + +=== tests/cases/compiler/array.d.ts === + +declare module "A" { + class A { x: number; } +>A : Symbol(A, Decl(array.d.ts, 1, 20)) +>x : Symbol(x, Decl(array.d.ts, 2, 13)) +} + +declare module "array" { + import {A} from "A"; +>A : Symbol(A, Decl(array.d.ts, 6, 12)) + + global { +>global : Symbol(, Decl(array.d.ts, 6, 24)) + + interface Array { +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(array.d.ts, 7, 12)) +>T : Symbol(T, Decl(lib.d.ts, --, --), Decl(array.d.ts, 8, 24)) + + getA(): A; +>getA : Symbol(getA, Decl(array.d.ts, 8, 28)) +>A : Symbol(A, Decl(array.d.ts, 6, 12)) + } + } +} + diff --git a/tests/baselines/reference/moduleAugmentationInAmbientModule5.types b/tests/baselines/reference/moduleAugmentationInAmbientModule5.types new file mode 100644 index 00000000000..d04cdca4893 --- /dev/null +++ b/tests/baselines/reference/moduleAugmentationInAmbientModule5.types @@ -0,0 +1,44 @@ +=== tests/cases/compiler/f.ts === +/// +import "array"; + +let x = [1]; +>x : number[] +>[1] : number[] +>1 : number + +let y = x.getA().x; +>y : number +>x.getA().x : number +>x.getA() : A +>x.getA : () => A +>x : number[] +>getA : () => A +>x : number + +=== tests/cases/compiler/array.d.ts === + +declare module "A" { + class A { x: number; } +>A : A +>x : number +} + +declare module "array" { + import {A} from "A"; +>A : typeof A + + global { +>global : typeof + + interface Array { +>Array : T[] +>T : T + + getA(): A; +>getA : () => A +>A : A + } + } +} + diff --git a/tests/cases/compiler/moduleAugmentationGlobal1.ts b/tests/cases/compiler/moduleAugmentationGlobal1.ts index 0e434abdd42..bef373ff139 100644 --- a/tests/cases/compiler/moduleAugmentationGlobal1.ts +++ b/tests/cases/compiler/moduleAugmentationGlobal1.ts @@ -8,7 +8,7 @@ export class A {x: number;} import {A} from "./f1"; // change the shape of Array -declare module "/" { +declare global { interface Array { getA(): A; } diff --git a/tests/cases/compiler/moduleAugmentationGlobal2.ts b/tests/cases/compiler/moduleAugmentationGlobal2.ts index 2bf81de7d49..5a5c44f1109 100644 --- a/tests/cases/compiler/moduleAugmentationGlobal2.ts +++ b/tests/cases/compiler/moduleAugmentationGlobal2.ts @@ -8,7 +8,7 @@ export class A {}; // change the shape of Array import {A} from "./f1"; -declare module "/" { +declare global { interface Array { getCountAsString(): string; } diff --git a/tests/cases/compiler/moduleAugmentationGlobal3.ts b/tests/cases/compiler/moduleAugmentationGlobal3.ts index 269fc9af464..5986b689c55 100644 --- a/tests/cases/compiler/moduleAugmentationGlobal3.ts +++ b/tests/cases/compiler/moduleAugmentationGlobal3.ts @@ -8,7 +8,7 @@ export class A {}; // change the shape of Array import {A} from "./f1"; -declare module "/" { +declare global { interface Array { getCountAsString(): string; } diff --git a/tests/cases/compiler/moduleAugmentationGlobal4.ts b/tests/cases/compiler/moduleAugmentationGlobal4.ts index 5db88c9015f..44ba2ba9c57 100644 --- a/tests/cases/compiler/moduleAugmentationGlobal4.ts +++ b/tests/cases/compiler/moduleAugmentationGlobal4.ts @@ -2,13 +2,13 @@ // @declaration: true // @filename: f1.ts -declare module "/" { +declare global { interface Something {x} } export {}; // @filename: f2.ts -declare module "/" { +declare global { interface Something {y} } export {}; diff --git a/tests/cases/compiler/moduleAugmentationGlobal5.ts b/tests/cases/compiler/moduleAugmentationGlobal5.ts new file mode 100644 index 00000000000..6d2920fd55f --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationGlobal5.ts @@ -0,0 +1,21 @@ +// @module: commonjs +// @declaration: true + +// @filename: f1.d.ts +declare module "A" { + global { + interface Something {x} + } +} +// @filename: f2.d.ts +declare module "B" { + global { + interface Something {y} + } +} +// @filename: f3.ts +/// +/// +import "A"; +import "B"; + diff --git a/tests/cases/compiler/moduleAugmentationGlobal6.ts b/tests/cases/compiler/moduleAugmentationGlobal6.ts new file mode 100644 index 00000000000..37e5e33725b --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationGlobal6.ts @@ -0,0 +1,3 @@ +declare global { + interface Array { x } +} \ No newline at end of file diff --git a/tests/cases/compiler/moduleAugmentationGlobal6_1.ts b/tests/cases/compiler/moduleAugmentationGlobal6_1.ts new file mode 100644 index 00000000000..d255b7f8319 --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationGlobal6_1.ts @@ -0,0 +1,3 @@ +global { + interface Array { x } +} \ No newline at end of file diff --git a/tests/cases/compiler/moduleAugmentationGlobal7.ts b/tests/cases/compiler/moduleAugmentationGlobal7.ts new file mode 100644 index 00000000000..66dd41c8bc9 --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationGlobal7.ts @@ -0,0 +1,5 @@ +namespace A { + declare global { + interface Array { x } + } +} \ No newline at end of file diff --git a/tests/cases/compiler/moduleAugmentationGlobal7_1.ts b/tests/cases/compiler/moduleAugmentationGlobal7_1.ts new file mode 100644 index 00000000000..b7d99dfd413 --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationGlobal7_1.ts @@ -0,0 +1,5 @@ +namespace A { + global { + interface Array { x } + } +} \ No newline at end of file diff --git a/tests/cases/compiler/moduleAugmentationGlobal8.ts b/tests/cases/compiler/moduleAugmentationGlobal8.ts new file mode 100644 index 00000000000..e28b07d6bfd --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationGlobal8.ts @@ -0,0 +1,8 @@ +// @target: es5 +// @module: amd +namespace A { + declare global { + interface Array { x } + } +} +export {} diff --git a/tests/cases/compiler/moduleAugmentationGlobal8_1.ts b/tests/cases/compiler/moduleAugmentationGlobal8_1.ts new file mode 100644 index 00000000000..9031e4742b0 --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationGlobal8_1.ts @@ -0,0 +1,8 @@ +// @target: es5 +// @module: amd +namespace A { + global { + interface Array { x } + } +} +export {} diff --git a/tests/cases/compiler/moduleAugmentationInAmbientModule5.ts b/tests/cases/compiler/moduleAugmentationInAmbientModule5.ts new file mode 100644 index 00000000000..5068ba396c3 --- /dev/null +++ b/tests/cases/compiler/moduleAugmentationInAmbientModule5.ts @@ -0,0 +1,23 @@ +// @module: commonjs +// @declaration: true + +// @filename: array.d.ts +declare module "A" { + class A { x: number; } +} + +declare module "array" { + import {A} from "A"; + global { + interface Array { + getA(): A; + } + } +} + +// @filename: f.ts +/// +import "array"; + +let x = [1]; +let y = x.getA().x; diff --git a/tests/cases/fourslash/formattingGlobalAugmentation1.ts b/tests/cases/fourslash/formattingGlobalAugmentation1.ts new file mode 100644 index 00000000000..04991006534 --- /dev/null +++ b/tests/cases/fourslash/formattingGlobalAugmentation1.ts @@ -0,0 +1,8 @@ +/// + +/////*1*/declare global { +////} + +format.document(); +goTo.marker("1"); +verify.currentLineContentIs("declare global {"); \ No newline at end of file diff --git a/tests/cases/fourslash/formattingGlobalAugmentation2.ts b/tests/cases/fourslash/formattingGlobalAugmentation2.ts new file mode 100644 index 00000000000..74f05e1a936 --- /dev/null +++ b/tests/cases/fourslash/formattingGlobalAugmentation2.ts @@ -0,0 +1,10 @@ +/// + +////declare module "A" { +/////*1*/ global { +//// } +////} + +format.document(); +goTo.marker("1"); +verify.currentLineContentIs(" global {"); \ No newline at end of file diff --git a/tests/cases/fourslash/indentationInAugmentations1.ts b/tests/cases/fourslash/indentationInAugmentations1.ts new file mode 100644 index 00000000000..8a9b81fdd67 --- /dev/null +++ b/tests/cases/fourslash/indentationInAugmentations1.ts @@ -0,0 +1,9 @@ +/// + +// @module: amd +//// export {} +//// declare global {/*1*/ + +goTo.marker("1"); +edit.insertLine(""); +verify.indentationIs(4); \ No newline at end of file diff --git a/tests/cases/fourslash/indentationInAugmentations2.ts b/tests/cases/fourslash/indentationInAugmentations2.ts new file mode 100644 index 00000000000..df2400207bb --- /dev/null +++ b/tests/cases/fourslash/indentationInAugmentations2.ts @@ -0,0 +1,8 @@ +/// + +//// declare module "A" { +//// global {/*1*/ + +goTo.marker("1"); +edit.insertLine(""); +verify.indentationIs(8); \ No newline at end of file From 8cf1a34f70c76161adc623f835ad7e04b3026e04 Mon Sep 17 00:00:00 2001 From: Zhengbo Li Date: Mon, 28 Dec 2015 14:05:32 -0800 Subject: [PATCH 094/209] enable more than one callbacks for a watched file --- src/compiler/sys.ts | 61 +++++++++++++++++++++++++++++++-------------- 1 file changed, 42 insertions(+), 19 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 62baf28f074..a9056756f01 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -307,15 +307,21 @@ namespace ts { function createWatchedFileSet() { const dirWatchers = createFileMap(); const recursiveDirWatchers = createFileMap(); - const fileWatcherCallbacks = createFileMap(); - const dirWatcherCallbacks = createFileMap(); + // One file can have multiple watchers + const fileWatcherCallbacks = createFileMap(); + const dirWatcherCallbacks = createFileMap(); const currentDirectory = process.cwd(); return { addFile, removeFile, addDir }; function addDir(dirName: string, callback: DirWatcherCallback, recursive?: boolean) { const dirPath = toPath(dirName, currentDirectory, getCanonicalPath); - dirWatcherCallbacks.set(dirPath, callback); + if (!dirWatcherCallbacks.contains(dirPath)) { + dirWatcherCallbacks.set(dirPath, [callback]); + } + else { + dirWatcherCallbacks.get(dirPath).push(callback); + } const { watcher, isRecursive } = addDirWatcher(dirPath, recursive); return { close: () => reduceDirWatcherRefCount(watcher, dirPath, isRecursive) @@ -341,7 +347,8 @@ namespace ts { // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows // (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643) - if (isNode4OrLater() && recursive === true) { + if (isNode4OrLater() && recursive === true && + (process.platform === "win32" || process.platform === "darwin")) { if (recursiveDirWatchers.contains(dirPath)) { const watcher = recursiveDirWatchers.get(dirPath); watcher.referenceCount += 1; @@ -357,12 +364,13 @@ namespace ts { return { watcher, isRecursive: false }; } watchers = dirWatchers; + options.recursive = false; } const watcher: DirWatcher = _fs.watch(dirPath, options, (eventName: string, relativeFileName: string) => fileEventHandler(eventName, relativeFileName, dirPath)); watcher.referenceCount = 1; watchers.set(dirPath, watcher); - return { watcher, isRecursive: false }; + return { watcher, isRecursive: options.recursive }; } function findDirWatcherForFile(filePath: Path): { watcher: DirWatcher, watcherPath: Path, isRecursive: boolean } { @@ -389,24 +397,37 @@ namespace ts { function addFile(fileName: string, callback: FileWatcherCallback): WatchedFile { const filePath = toPath(fileName, currentDirectory, getCanonicalPath); - const { watcher } = findDirWatcherForFile(filePath); - if (!watcher) { - addDirWatcher(getDirectoryPath(filePath)); + + if (fileWatcherCallbacks.contains(filePath)) { + fileWatcherCallbacks.get(filePath).push(callback); } else { - watcher.referenceCount += 1; + const { watcher } = findDirWatcherForFile(filePath); + if (!watcher) { + addDirWatcher(getDirectoryPath(filePath)); + } + else { + watcher.referenceCount += 1; + } + fileWatcherCallbacks.set(filePath, [callback]); } - fileWatcherCallbacks.set(filePath, callback); return { fileName, callback }; } function removeFile(file: WatchedFile) { const filePath = toPath(file.fileName, currentDirectory, getCanonicalPath); - fileWatcherCallbacks.remove(filePath); - - const { watcher, watcherPath, isRecursive } = findDirWatcherForFile(filePath); - if (watcher) { - reduceDirWatcherRefCount(watcher, watcherPath, isRecursive); + if (fileWatcherCallbacks.contains(filePath)) { + const newCallbacks = copyListRemovingItem(file.callback, fileWatcherCallbacks.get(filePath)); + if (newCallbacks.length === 0) { + fileWatcherCallbacks.remove(filePath); + const { watcher, watcherPath, isRecursive } = findDirWatcherForFile(filePath); + if (watcher) { + reduceDirWatcherRefCount(watcher, watcherPath, isRecursive); + } + } + else { + fileWatcherCallbacks.set(filePath, newCallbacks); + } } } @@ -419,12 +440,14 @@ namespace ts { // Directory callbacks are not set for file content changes, they are more often used for // adding/removing/renaming files, which corresponds to the "rename" event if (eventName === "rename" && dirWatcherCallbacks.contains(baseDirPath)) { - const dirCallback = dirWatcherCallbacks.get(baseDirPath); - dirCallback(filePath); + for (const dirCallback of dirWatcherCallbacks.get(baseDirPath)) { + dirCallback(filePath); + } } if (fileWatcherCallbacks.contains(filePath)) { - const fileCallback = fileWatcherCallbacks.get(filePath); - fileCallback(filePath); + for (const fileCallback of fileWatcherCallbacks.get(filePath)) { + fileCallback(filePath); + } } } } From 7bb2ee56d050c6dd2d1525cbbe0ebdfb6aad4423 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Sun, 3 Jan 2016 07:43:30 -0500 Subject: [PATCH 095/209] Fix #6277 - stop looking for `any` specifically, and use isTypeSubtypeOf like the old code --- src/compiler/checker.ts | 8 +-- .../typeGuardOfFormTypeOfPrimitiveSubtype.js | 45 ++++++++++++ ...eGuardOfFormTypeOfPrimitiveSubtype.symbols | 52 ++++++++++++++ ...ypeGuardOfFormTypeOfPrimitiveSubtype.types | 70 +++++++++++++++++++ .../typeGuardOfFormTypeOfPrimitiveSubtype.ts | 21 ++++++ 5 files changed, 192 insertions(+), 4 deletions(-) create mode 100644 tests/baselines/reference/typeGuardOfFormTypeOfPrimitiveSubtype.js create mode 100644 tests/baselines/reference/typeGuardOfFormTypeOfPrimitiveSubtype.symbols create mode 100644 tests/baselines/reference/typeGuardOfFormTypeOfPrimitiveSubtype.types create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfPrimitiveSubtype.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 5d57e9d2028..2dc62443d06 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -6674,10 +6674,6 @@ namespace ts { if (typeInfo && typeInfo.type === undefinedType) { return type; } - // If the type to be narrowed is any and we're checking a primitive with assumeTrue=true, return the primitive - if (!!(type.flags & TypeFlags.Any) && typeInfo && assumeTrue) { - return typeInfo.type; - } let flags: TypeFlags; if (typeInfo) { flags = typeInfo.flags; @@ -6688,6 +6684,10 @@ namespace ts { } // At this point we can bail if it's not a union if (!(type.flags & TypeFlags.Union)) { + // If we're on the true branch and the type is a subtype, we should return the primitive type + if (assumeTrue && typeInfo && isTypeSubtypeOf(typeInfo.type, type)) { + return typeInfo.type; + } // If the active non-union type would be removed from a union by this type guard, return an empty union return filterUnion(type) ? type : emptyUnionType; } diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfPrimitiveSubtype.js b/tests/baselines/reference/typeGuardOfFormTypeOfPrimitiveSubtype.js new file mode 100644 index 00000000000..0bd03890179 --- /dev/null +++ b/tests/baselines/reference/typeGuardOfFormTypeOfPrimitiveSubtype.js @@ -0,0 +1,45 @@ +//// [typeGuardOfFormTypeOfPrimitiveSubtype.ts] +let a: {}; +let b: {toString(): string}; +if (typeof a === "number") { + let c: number = a; +} +if (typeof a === "string") { + let c: string = a; +} +if (typeof a === "boolean") { + let c: boolean = a; +} + +if (typeof b === "number") { + let c: number = b; +} +if (typeof b === "string") { + let c: string = b; +} +if (typeof b === "boolean") { + let c: boolean = b; +} + + +//// [typeGuardOfFormTypeOfPrimitiveSubtype.js] +var a; +var b; +if (typeof a === "number") { + var c = a; +} +if (typeof a === "string") { + var c = a; +} +if (typeof a === "boolean") { + var c = a; +} +if (typeof b === "number") { + var c = b; +} +if (typeof b === "string") { + var c = b; +} +if (typeof b === "boolean") { + var c = b; +} diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfPrimitiveSubtype.symbols b/tests/baselines/reference/typeGuardOfFormTypeOfPrimitiveSubtype.symbols new file mode 100644 index 00000000000..da962b6060f --- /dev/null +++ b/tests/baselines/reference/typeGuardOfFormTypeOfPrimitiveSubtype.symbols @@ -0,0 +1,52 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfPrimitiveSubtype.ts === +let a: {}; +>a : Symbol(a, Decl(typeGuardOfFormTypeOfPrimitiveSubtype.ts, 0, 3)) + +let b: {toString(): string}; +>b : Symbol(b, Decl(typeGuardOfFormTypeOfPrimitiveSubtype.ts, 1, 3)) +>toString : Symbol(toString, Decl(typeGuardOfFormTypeOfPrimitiveSubtype.ts, 1, 8)) + +if (typeof a === "number") { +>a : Symbol(a, Decl(typeGuardOfFormTypeOfPrimitiveSubtype.ts, 0, 3)) + + let c: number = a; +>c : Symbol(c, Decl(typeGuardOfFormTypeOfPrimitiveSubtype.ts, 3, 7)) +>a : Symbol(a, Decl(typeGuardOfFormTypeOfPrimitiveSubtype.ts, 0, 3)) +} +if (typeof a === "string") { +>a : Symbol(a, Decl(typeGuardOfFormTypeOfPrimitiveSubtype.ts, 0, 3)) + + let c: string = a; +>c : Symbol(c, Decl(typeGuardOfFormTypeOfPrimitiveSubtype.ts, 6, 7)) +>a : Symbol(a, Decl(typeGuardOfFormTypeOfPrimitiveSubtype.ts, 0, 3)) +} +if (typeof a === "boolean") { +>a : Symbol(a, Decl(typeGuardOfFormTypeOfPrimitiveSubtype.ts, 0, 3)) + + let c: boolean = a; +>c : Symbol(c, Decl(typeGuardOfFormTypeOfPrimitiveSubtype.ts, 9, 7)) +>a : Symbol(a, Decl(typeGuardOfFormTypeOfPrimitiveSubtype.ts, 0, 3)) +} + +if (typeof b === "number") { +>b : Symbol(b, Decl(typeGuardOfFormTypeOfPrimitiveSubtype.ts, 1, 3)) + + let c: number = b; +>c : Symbol(c, Decl(typeGuardOfFormTypeOfPrimitiveSubtype.ts, 13, 7)) +>b : Symbol(b, Decl(typeGuardOfFormTypeOfPrimitiveSubtype.ts, 1, 3)) +} +if (typeof b === "string") { +>b : Symbol(b, Decl(typeGuardOfFormTypeOfPrimitiveSubtype.ts, 1, 3)) + + let c: string = b; +>c : Symbol(c, Decl(typeGuardOfFormTypeOfPrimitiveSubtype.ts, 16, 7)) +>b : Symbol(b, Decl(typeGuardOfFormTypeOfPrimitiveSubtype.ts, 1, 3)) +} +if (typeof b === "boolean") { +>b : Symbol(b, Decl(typeGuardOfFormTypeOfPrimitiveSubtype.ts, 1, 3)) + + let c: boolean = b; +>c : Symbol(c, Decl(typeGuardOfFormTypeOfPrimitiveSubtype.ts, 19, 7)) +>b : Symbol(b, Decl(typeGuardOfFormTypeOfPrimitiveSubtype.ts, 1, 3)) +} + diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfPrimitiveSubtype.types b/tests/baselines/reference/typeGuardOfFormTypeOfPrimitiveSubtype.types new file mode 100644 index 00000000000..7e88ca5cb94 --- /dev/null +++ b/tests/baselines/reference/typeGuardOfFormTypeOfPrimitiveSubtype.types @@ -0,0 +1,70 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfPrimitiveSubtype.ts === +let a: {}; +>a : {} + +let b: {toString(): string}; +>b : { toString(): string; } +>toString : () => string + +if (typeof a === "number") { +>typeof a === "number" : boolean +>typeof a : string +>a : {} +>"number" : string + + let c: number = a; +>c : number +>a : number +} +if (typeof a === "string") { +>typeof a === "string" : boolean +>typeof a : string +>a : {} +>"string" : string + + let c: string = a; +>c : string +>a : string +} +if (typeof a === "boolean") { +>typeof a === "boolean" : boolean +>typeof a : string +>a : {} +>"boolean" : string + + let c: boolean = a; +>c : boolean +>a : boolean +} + +if (typeof b === "number") { +>typeof b === "number" : boolean +>typeof b : string +>b : { toString(): string; } +>"number" : string + + let c: number = b; +>c : number +>b : number +} +if (typeof b === "string") { +>typeof b === "string" : boolean +>typeof b : string +>b : { toString(): string; } +>"string" : string + + let c: string = b; +>c : string +>b : string +} +if (typeof b === "boolean") { +>typeof b === "boolean" : boolean +>typeof b : string +>b : { toString(): string; } +>"boolean" : string + + let c: boolean = b; +>c : boolean +>b : boolean +} + diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfPrimitiveSubtype.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfPrimitiveSubtype.ts new file mode 100644 index 00000000000..b0493db428e --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfPrimitiveSubtype.ts @@ -0,0 +1,21 @@ +let a: {}; +let b: {toString(): string}; +if (typeof a === "number") { + let c: number = a; +} +if (typeof a === "string") { + let c: string = a; +} +if (typeof a === "boolean") { + let c: boolean = a; +} + +if (typeof b === "number") { + let c: number = b; +} +if (typeof b === "string") { + let c: string = b; +} +if (typeof b === "boolean") { + let c: boolean = b; +} From 53106cb5ed6b789475320109930df202f22843bb Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 4 Jan 2016 23:00:22 -0800 Subject: [PATCH 096/209] Change logic in identifying SFCs Our logic for detecting SFC vs Element Class had a few issues: * Object Type flag is not actually useful * Parameter arity isn't actually relevant * The check for Element Class should take priority Fixes #6349 and #6353 --- src/compiler/checker.ts | 30 ++++++---- .../reference/tsxElementResolution9.js | 2 +- .../reference/tsxElementResolution9.symbols | 5 +- .../reference/tsxElementResolution9.types | 3 +- .../tsxStatelessFunctionComponents3.js | 37 ++++++++++++ .../tsxStatelessFunctionComponents3.symbols | 48 +++++++++++++++ .../tsxStatelessFunctionComponents3.types | 59 +++++++++++++++++++ .../conformance/jsx/tsxElementResolution9.tsx | 2 +- .../jsx/tsxStatelessFunctionComponents3.tsx | 23 ++++++++ 9 files changed, 191 insertions(+), 18 deletions(-) create mode 100644 tests/baselines/reference/tsxStatelessFunctionComponents3.js create mode 100644 tests/baselines/reference/tsxStatelessFunctionComponents3.symbols create mode 100644 tests/baselines/reference/tsxStatelessFunctionComponents3.types create mode 100644 tests/cases/conformance/jsx/tsxStatelessFunctionComponents3.tsx diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index fb4af5d7298..a5b96c4a9a8 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -8248,27 +8248,31 @@ namespace ts { // Get the element instance type (the result of newing or invoking this tag) const elemInstanceType = getJsxElementInstanceType(node); - // Is this is a stateless function component? See if its single signature is - // assignable to the JSX Element Type - const callSignature = getSingleCallSignature(getTypeOfSymbol(sym)); - const callReturnType = callSignature && getReturnTypeOfSignature(callSignature); - let paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0])); - if (callReturnType && isTypeAssignableTo(callReturnType, jsxElementType) && (paramType.flags & TypeFlags.ObjectType)) { - // Intersect in JSX.IntrinsicAttributes if it exists - const intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes); - if (intrinsicAttributes !== unknownType) { - paramType = intersectTypes(intrinsicAttributes, paramType); + const elemClassType = getJsxGlobalElementClassType(); + + if (!elemClassType || !isTypeAssignableTo(elemInstanceType, elemClassType)) { + // Is this is a stateless function component? See if its single signature's return type is + // assignable to the JSX Element Type + const elemType = getTypeOfSymbol(sym); + const callSignatures = elemType && getSignaturesOfType(elemType, SignatureKind.Call); + const callSignature = callSignatures && callSignatures.length > 0 && callSignatures[0]; + const callReturnType = callSignature && getReturnTypeOfSignature(callSignature); + let paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0])); + if (callReturnType && isTypeAssignableTo(callReturnType, jsxElementType)) { + // Intersect in JSX.IntrinsicAttributes if it exists + const intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes); + if (intrinsicAttributes !== unknownType) { + paramType = intersectTypes(intrinsicAttributes, paramType); + } + return paramType; } - return paramType; } // Issue an error if this return type isn't assignable to JSX.ElementClass - const elemClassType = getJsxGlobalElementClassType(); if (elemClassType) { checkTypeRelatedTo(elemInstanceType, elemClassType, assignableRelation, node, Diagnostics.JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements); } - if (isTypeAny(elemInstanceType)) { return links.resolvedJsxType = elemInstanceType; } diff --git a/tests/baselines/reference/tsxElementResolution9.js b/tests/baselines/reference/tsxElementResolution9.js index bc65bb0bb02..5ad47730e4a 100644 --- a/tests/baselines/reference/tsxElementResolution9.js +++ b/tests/baselines/reference/tsxElementResolution9.js @@ -1,6 +1,6 @@ //// [file.tsx] declare module JSX { - interface Element { } + interface Element { something; } interface IntrinsicElements { } } diff --git a/tests/baselines/reference/tsxElementResolution9.symbols b/tests/baselines/reference/tsxElementResolution9.symbols index e38c64d0847..0aec19a8094 100644 --- a/tests/baselines/reference/tsxElementResolution9.symbols +++ b/tests/baselines/reference/tsxElementResolution9.symbols @@ -2,11 +2,12 @@ declare module JSX { >JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) - interface Element { } + interface Element { something; } >Element : Symbol(Element, Decl(file.tsx, 0, 20)) +>something : Symbol(something, Decl(file.tsx, 1, 20)) interface IntrinsicElements { } ->IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 33)) } interface Obj1 { diff --git a/tests/baselines/reference/tsxElementResolution9.types b/tests/baselines/reference/tsxElementResolution9.types index dd84e6f07b5..b138aa0509e 100644 --- a/tests/baselines/reference/tsxElementResolution9.types +++ b/tests/baselines/reference/tsxElementResolution9.types @@ -2,8 +2,9 @@ declare module JSX { >JSX : any - interface Element { } + interface Element { something; } >Element : Element +>something : any interface IntrinsicElements { } >IntrinsicElements : IntrinsicElements diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents3.js b/tests/baselines/reference/tsxStatelessFunctionComponents3.js new file mode 100644 index 00000000000..d58586dd1ee --- /dev/null +++ b/tests/baselines/reference/tsxStatelessFunctionComponents3.js @@ -0,0 +1,37 @@ +//// [file.tsx] + +import React = require('react'); + +const Foo = (props: any) =>
; +// Should be OK +const foo = ; + + +// Should be OK +var MainMenu: React.StatelessComponent<{}> = (props) => (
+

Main Menu

+
); + +var App: React.StatelessComponent<{ children }> = ({children}) => ( +
+ +
+); + +//// [file.jsx] +define(["require", "exports", 'react'], function (require, exports, React) { + "use strict"; + var Foo = function (props) { return
; }; + // Should be OK + var foo = ; + // Should be OK + var MainMenu = function (props) { return (
+

Main Menu

+
); }; + var App = function (_a) { + var children = _a.children; + return (
+ +
); + }; +}); diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents3.symbols b/tests/baselines/reference/tsxStatelessFunctionComponents3.symbols new file mode 100644 index 00000000000..4ce502c6a6a --- /dev/null +++ b/tests/baselines/reference/tsxStatelessFunctionComponents3.symbols @@ -0,0 +1,48 @@ +=== tests/cases/conformance/jsx/file.tsx === + +import React = require('react'); +>React : Symbol(React, Decl(file.tsx, 0, 0)) + +const Foo = (props: any) =>
; +>Foo : Symbol(Foo, Decl(file.tsx, 3, 5)) +>props : Symbol(props, Decl(file.tsx, 3, 13)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 927, 45)) + +// Should be OK +const foo = ; +>foo : Symbol(foo, Decl(file.tsx, 5, 5)) +>Foo : Symbol(Foo, Decl(file.tsx, 3, 5)) + + +// Should be OK +var MainMenu: React.StatelessComponent<{}> = (props) => (
+>MainMenu : Symbol(MainMenu, Decl(file.tsx, 9, 3)) +>React : Symbol(React, Decl(file.tsx, 0, 0)) +>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 139, 5)) +>props : Symbol(props, Decl(file.tsx, 9, 46)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 927, 45)) + +

Main Menu

+>h3 : Symbol(JSX.IntrinsicElements.h3, Decl(react.d.ts, 939, 48)) +>h3 : Symbol(JSX.IntrinsicElements.h3, Decl(react.d.ts, 939, 48)) + +
); +>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 927, 45)) + +var App: React.StatelessComponent<{ children }> = ({children}) => ( +>App : Symbol(App, Decl(file.tsx, 13, 3)) +>React : Symbol(React, Decl(file.tsx, 0, 0)) +>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 139, 5)) +>children : Symbol(children, Decl(file.tsx, 13, 35)) +>children : Symbol(children, Decl(file.tsx, 13, 52)) + +
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 927, 45)) + + +>MainMenu : Symbol(MainMenu, Decl(file.tsx, 9, 3)) + +
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 927, 45)) + +); diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents3.types b/tests/baselines/reference/tsxStatelessFunctionComponents3.types new file mode 100644 index 00000000000..6531ff737ba --- /dev/null +++ b/tests/baselines/reference/tsxStatelessFunctionComponents3.types @@ -0,0 +1,59 @@ +=== tests/cases/conformance/jsx/file.tsx === + +import React = require('react'); +>React : typeof React + +const Foo = (props: any) =>
; +>Foo : (props: any) => JSX.Element +>(props: any) =>
: (props: any) => JSX.Element +>props : any +>
: JSX.Element +>div : any + +// Should be OK +const foo = ; +>foo : JSX.Element +> : JSX.Element +>Foo : (props: any) => JSX.Element + + +// Should be OK +var MainMenu: React.StatelessComponent<{}> = (props) => (
+>MainMenu : React.StatelessComponent<{}> +>React : any +>StatelessComponent : React.StatelessComponent

+>(props) => (

Main Menu

) : (props: {}) => JSX.Element +>props : {} +>(

Main Menu

) : JSX.Element +>

Main Menu

: JSX.Element +>div : any + +

Main Menu

+>

Main Menu

: JSX.Element +>h3 : any +>h3 : any + +
); +>div : any + +var App: React.StatelessComponent<{ children }> = ({children}) => ( +>App : React.StatelessComponent<{ children: any; }> +>React : any +>StatelessComponent : React.StatelessComponent

+>children : any +>({children}) => (

) : ({children}: { children: any; }) => JSX.Element +>children : any +>(
) : JSX.Element + +
+>
: JSX.Element +>div : any + + +> : JSX.Element +>MainMenu : React.StatelessComponent<{}> + +
+>div : any + +); diff --git a/tests/cases/conformance/jsx/tsxElementResolution9.tsx b/tests/cases/conformance/jsx/tsxElementResolution9.tsx index 7165f8277b3..4854484a225 100644 --- a/tests/cases/conformance/jsx/tsxElementResolution9.tsx +++ b/tests/cases/conformance/jsx/tsxElementResolution9.tsx @@ -1,7 +1,7 @@ //@filename: file.tsx //@jsx: preserve declare module JSX { - interface Element { } + interface Element { something; } interface IntrinsicElements { } } diff --git a/tests/cases/conformance/jsx/tsxStatelessFunctionComponents3.tsx b/tests/cases/conformance/jsx/tsxStatelessFunctionComponents3.tsx new file mode 100644 index 00000000000..48ce5fb5efb --- /dev/null +++ b/tests/cases/conformance/jsx/tsxStatelessFunctionComponents3.tsx @@ -0,0 +1,23 @@ +// @filename: file.tsx +// @jsx: preserve +// @module: amd +// @noLib: true +// @libFiles: react.d.ts,lib.d.ts + +import React = require('react'); + +const Foo = (props: any) =>
; +// Should be OK +const foo = ; + + +// Should be OK +var MainMenu: React.StatelessComponent<{}> = (props) => (
+

Main Menu

+
); + +var App: React.StatelessComponent<{ children }> = ({children}) => ( +
+ +
+); \ No newline at end of file From 7d31b5c8a3e4f05e59ce86519306432ff420c268 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Wed, 6 Jan 2016 10:27:31 -0800 Subject: [PATCH 097/209] Fix find all refs in shorthand properties for imports and exports --- src/compiler/checker.ts | 10 +++++- src/compiler/types.ts | 1 + src/services/services.ts | 31 ++++++++++++++----- .../cases/fourslash/renameImportAndExport.ts | 10 ++++++ .../fourslash/renameImportAndShorthand.ts | 10 ++++++ .../renameImportNamespaceAndShorthand.ts | 10 ++++++ 6 files changed, 64 insertions(+), 8 deletions(-) create mode 100644 tests/cases/fourslash/renameImportAndExport.ts create mode 100644 tests/cases/fourslash/renameImportAndShorthand.ts create mode 100644 tests/cases/fourslash/renameImportNamespaceAndShorthand.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index e4ad3339887..201ad348bed 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -82,6 +82,7 @@ namespace ts { getSymbolsInScope, getSymbolAtLocation, getShorthandAssignmentValueSymbol, + getExportSpecifierLocalTargetSymbol, getTypeAtLocation: getTypeOfNode, typeToString, getSymbolDisplayBuilder, @@ -15007,11 +15008,18 @@ namespace ts { // This is necessary as an identifier in short-hand property assignment can contains two meaning: // property name and property value. if (location && location.kind === SyntaxKind.ShorthandPropertyAssignment) { - return resolveEntityName((location).name, SymbolFlags.Value); + return resolveEntityName((location).name, SymbolFlags.Value | SymbolFlags.Alias); } return undefined; } + /** Returns the target of an export specifier without following aliases */ + function getExportSpecifierLocalTargetSymbol(node: ExportSpecifier): Symbol { + return (node.parent.parent).moduleSpecifier ? + getExternalModuleMember(node.parent.parent, node) : + resolveEntityName(node.propertyName || node.name, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias); + } + function getTypeOfNode(node: Node): Type { if (isInsideWithStatementBody(node)) { // We cannot answer semantic questions within a with block, do not proceed any further diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 24f70373a8a..3d074f5048c 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1725,6 +1725,7 @@ namespace ts { getSymbolAtLocation(node: Node): Symbol; getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: string): Symbol[]; getShorthandAssignmentValueSymbol(location: Node): Symbol; + getExportSpecifierLocalTargetSymbol(location: ExportSpecifier): Symbol; getTypeAtLocation(node: Node): Type; typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; diff --git a/src/services/services.ts b/src/services/services.ts index 0fd4df19907..f89ba4e94fa 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -5490,10 +5490,8 @@ namespace ts { }; } - function isImportOrExportSpecifierImportSymbol(symbol: Symbol) { - return (symbol.flags & SymbolFlags.Alias) && forEach(symbol.declarations, declaration => { - return declaration.kind === SyntaxKind.ImportSpecifier || declaration.kind === SyntaxKind.ExportSpecifier; - }); + function isImportSpecifierSymbol(symbol: Symbol) { + return (symbol.flags & SymbolFlags.Alias) && forEach(symbol.declarations, declaration => declaration.kind === SyntaxKind.ImportSpecifier); } function getInternedName(symbol: Symbol, location: Node, declarations: Declaration[]): string { @@ -5937,8 +5935,16 @@ namespace ts { let result = [symbol]; // If the symbol is an alias, add what it alaises to the list - if (isImportOrExportSpecifierImportSymbol(symbol)) { - result.push(typeChecker.getAliasedSymbol(symbol)); + if (isImportSpecifierSymbol(symbol)) { + result.push(typeChecker.getAliasedSymbol(symbol)); + } + + // For export specifiers, it can be a local symbol, e.g. + // import {a} from "mod"; + // export {a as somethingElse} + // We want the local target of the export (i.e. the import symbol) and not the final target (i.e. "mod".a) + if (location.parent.kind === SyntaxKind.ExportSpecifier) { + result.push(typeChecker.getExportSpecifierLocalTargetSymbol(location.parent)); } // If the location is in a context sensitive location (i.e. in an object literal) try @@ -6028,13 +6034,24 @@ namespace ts { // If the reference symbol is an alias, check if what it is aliasing is one of the search // symbols. - if (isImportOrExportSpecifierImportSymbol(referenceSymbol)) { + if (isImportSpecifierSymbol(referenceSymbol)) { const aliasedSymbol = typeChecker.getAliasedSymbol(referenceSymbol); if (searchSymbols.indexOf(aliasedSymbol) >= 0) { return aliasedSymbol; } } + // For export specifiers, it can be a local symbol, e.g. + // import {a} from "mod"; + // export {a as somethingElse} + // We want the local target of the export (i.e. the import symbol) and not the final target (i.e. "mod".a) + if (referenceLocation.parent.kind === SyntaxKind.ExportSpecifier) { + const aliasedSymbol = typeChecker.getExportSpecifierLocalTargetSymbol(referenceLocation.parent); + if (searchSymbols.indexOf(aliasedSymbol) >= 0) { + return aliasedSymbol; + } + } + // If the reference location is in an object literal, try to get the contextual type for the // object literal, lookup the property symbol in the contextual type, and use this symbol to // compare to our searchSymbol diff --git a/tests/cases/fourslash/renameImportAndExport.ts b/tests/cases/fourslash/renameImportAndExport.ts new file mode 100644 index 00000000000..495e15c1e7e --- /dev/null +++ b/tests/cases/fourslash/renameImportAndExport.ts @@ -0,0 +1,10 @@ +/// + +////import [|a|] from "module"; +////export { [|a|] }; + +let ranges = test.ranges() +for (let range of ranges) { + goTo.position(range.start); + verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false); +} diff --git a/tests/cases/fourslash/renameImportAndShorthand.ts b/tests/cases/fourslash/renameImportAndShorthand.ts new file mode 100644 index 00000000000..bc4746aebdd --- /dev/null +++ b/tests/cases/fourslash/renameImportAndShorthand.ts @@ -0,0 +1,10 @@ +/// + +////import [|foo|] from 'bar'; +////const bar = { [|foo|] }; + +let ranges = test.ranges() +for (let range of ranges) { + goTo.position(range.start); + verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false); +} diff --git a/tests/cases/fourslash/renameImportNamespaceAndShorthand.ts b/tests/cases/fourslash/renameImportNamespaceAndShorthand.ts new file mode 100644 index 00000000000..a6b06c11408 --- /dev/null +++ b/tests/cases/fourslash/renameImportNamespaceAndShorthand.ts @@ -0,0 +1,10 @@ +/// + +////import * as [|foo|] from 'bar'; +////const bar = { [|foo|] }; + +let ranges = test.ranges() +for (let range of ranges) { + goTo.position(range.start); + verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false); +} From f09628900a37046d1c29af8338dffdea87d289db Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Wed, 6 Jan 2016 10:48:24 -0800 Subject: [PATCH 098/209] Add new test for import..require --- tests/cases/fourslash/renameImportRequire.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/cases/fourslash/renameImportRequire.ts diff --git a/tests/cases/fourslash/renameImportRequire.ts b/tests/cases/fourslash/renameImportRequire.ts new file mode 100644 index 00000000000..c26cc80b616 --- /dev/null +++ b/tests/cases/fourslash/renameImportRequire.ts @@ -0,0 +1,12 @@ +/// + +////import [|e|] = require("mod4"); +////[|e|]; +////a = { [|e|] }; +////export { [|e|] }; + +let ranges = test.ranges() +for (let range of ranges) { + goTo.position(range.start); + verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false); +} From 9b13a0c5b9796a10d9847068f2cdd89bd8523468 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Wed, 6 Jan 2016 10:58:57 -0800 Subject: [PATCH 099/209] Better name for checkTypePredicate helper function checkBindingPatternForTypeVariable -> checkIfTypeVariableIsDeclaredInBindingPattern --- src/compiler/checker.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ce40f8b7348..6b508c57dc6 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -11164,7 +11164,7 @@ namespace ts { for (const { name } of parent.parameters) { if ((name.kind === SyntaxKind.ObjectBindingPattern || name.kind === SyntaxKind.ArrayBindingPattern) && - checkBindingPatternForTypePredicateVariable( + checkIfTypePredicateVariableIsDeclaredInBindingPattern( name, parameterName, typePredicate.parameterName)) { @@ -11195,7 +11195,7 @@ namespace ts { } } - function checkBindingPatternForTypePredicateVariable( + function checkIfTypePredicateVariableIsDeclaredInBindingPattern( pattern: BindingPattern, predicateVariableNode: Node, predicateVariableName: string) { @@ -11209,7 +11209,7 @@ namespace ts { } else if (name.kind === SyntaxKind.ArrayBindingPattern || name.kind === SyntaxKind.ObjectBindingPattern) { - if (checkBindingPatternForTypePredicateVariable( + if (checkIfTypePredicateVariableIsDeclaredInBindingPattern( name, predicateVariableNode, predicateVariableName)) { From e223b2e53cf0c7afab71e15e556fe4b9c8ca4011 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Wed, 6 Jan 2016 12:47:26 -0800 Subject: [PATCH 100/209] Clean up unrelated changes --- src/compiler/binder.ts | 31 +- src/compiler/checker.ts | 382 +++++++++++++++--- src/compiler/parser.ts | 284 +++++++------ src/compiler/scanner.ts | 97 +++++ src/compiler/sys.ts | 2 - src/compiler/types.ts | 8 +- src/compiler/utilities.ts | 69 +++- src/harness/fourslash.ts | 25 ++ src/harness/harness.ts | 2 +- src/server/server.ts | 46 +++ src/server/session.ts | 4 +- src/services/services.ts | 2 +- .../jsFileCompilationSyntaxError.errors.txt | 5 +- tests/cases/fourslash/completionInJsDoc.ts | 8 +- .../fourslash/getJavaScriptCompletions1.ts | 10 + .../fourslash/getJavaScriptCompletions10.ts | 11 + .../fourslash/getJavaScriptCompletions11.ts | 11 + .../fourslash/getJavaScriptCompletions12.ts | 36 ++ .../fourslash/getJavaScriptCompletions13.ts | 26 ++ .../fourslash/getJavaScriptCompletions14.ts | 13 + .../fourslash/getJavaScriptCompletions15.ts | 29 ++ .../fourslash/getJavaScriptCompletions2.ts | 10 + .../fourslash/getJavaScriptCompletions3.ts | 10 + .../fourslash/getJavaScriptCompletions4.ts | 10 + .../fourslash/getJavaScriptCompletions5.ts | 15 + .../fourslash/getJavaScriptCompletions6.ts | 13 + .../fourslash/getJavaScriptCompletions7.ts | 13 + .../fourslash/getJavaScriptCompletions8.ts | 12 + .../fourslash/getJavaScriptCompletions9.ts | 12 + .../fourslash/getJavaScriptQuickInfo1.ts | 9 + .../fourslash/getJavaScriptQuickInfo2.ts | 9 + .../fourslash/getJavaScriptQuickInfo3.ts | 9 + .../fourslash/getJavaScriptQuickInfo4.ts | 9 + .../fourslash/getJavaScriptQuickInfo5.ts | 9 + .../fourslash/getJavaScriptQuickInfo6.ts | 9 + .../fourslash/getJavaScriptQuickInfo7.ts | 10 + .../fourslash/javaScriptModulesError1.ts | 12 + tests/cases/unittests/jsDocParsing.ts | 35 +- 38 files changed, 1053 insertions(+), 254 deletions(-) create mode 100644 tests/cases/fourslash/getJavaScriptCompletions1.ts create mode 100644 tests/cases/fourslash/getJavaScriptCompletions10.ts create mode 100644 tests/cases/fourslash/getJavaScriptCompletions11.ts create mode 100644 tests/cases/fourslash/getJavaScriptCompletions12.ts create mode 100644 tests/cases/fourslash/getJavaScriptCompletions13.ts create mode 100644 tests/cases/fourslash/getJavaScriptCompletions14.ts create mode 100644 tests/cases/fourslash/getJavaScriptCompletions15.ts create mode 100644 tests/cases/fourslash/getJavaScriptCompletions2.ts create mode 100644 tests/cases/fourslash/getJavaScriptCompletions3.ts create mode 100644 tests/cases/fourslash/getJavaScriptCompletions4.ts create mode 100644 tests/cases/fourslash/getJavaScriptCompletions5.ts create mode 100644 tests/cases/fourslash/getJavaScriptCompletions6.ts create mode 100644 tests/cases/fourslash/getJavaScriptCompletions7.ts create mode 100644 tests/cases/fourslash/getJavaScriptCompletions8.ts create mode 100644 tests/cases/fourslash/getJavaScriptCompletions9.ts create mode 100644 tests/cases/fourslash/getJavaScriptQuickInfo1.ts create mode 100644 tests/cases/fourslash/getJavaScriptQuickInfo2.ts create mode 100644 tests/cases/fourslash/getJavaScriptQuickInfo3.ts create mode 100644 tests/cases/fourslash/getJavaScriptQuickInfo4.ts create mode 100644 tests/cases/fourslash/getJavaScriptQuickInfo5.ts create mode 100644 tests/cases/fourslash/getJavaScriptQuickInfo6.ts create mode 100644 tests/cases/fourslash/getJavaScriptQuickInfo7.ts create mode 100644 tests/cases/fourslash/javaScriptModulesError1.ts diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index f7108c5d2d7..6b63cbdb5df 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -240,6 +240,15 @@ namespace ts { case SyntaxKind.FunctionDeclaration: case SyntaxKind.ClassDeclaration: return node.flags & NodeFlags.Default ? "default" : undefined; + case SyntaxKind.JSDocFunctionType: + return isJSDocConstructSignature(node) ? "__new" : "__call"; + case SyntaxKind.Parameter: + // Parameters with names are handled at the top of this function. Parameters + // without names can only come from JSDocFunctionTypes. + Debug.assert(node.parent.kind === SyntaxKind.JSDocFunctionType); + let functionType = node.parent; + let index = indexOf(functionType.parameters, node); + return "p" + index; } } @@ -405,7 +414,6 @@ namespace ts { addToContainerChain(container); } - else if (containerFlags & ContainerFlags.IsBlockScopedContainer) { blockScopeContainer = node; blockScopeContainer.locals = undefined; @@ -440,6 +448,10 @@ namespace ts { labelStack = labelIndexMap = implicitLabels = undefined; } + if (isInJavaScriptFile(node) && node.jsDocComment) { + bind(node.jsDocComment); + } + bindReachableStatement(node); if (currentReachabilityState === Reachability.Reachable && isFunctionLikeKind(kind) && nodeIsPresent((node).body)) { @@ -688,8 +700,9 @@ namespace ts { case SyntaxKind.ClassDeclaration: case SyntaxKind.InterfaceDeclaration: case SyntaxKind.EnumDeclaration: - case SyntaxKind.TypeLiteral: case SyntaxKind.ObjectLiteralExpression: + case SyntaxKind.TypeLiteral: + case SyntaxKind.JSDocRecordType: return ContainerFlags.IsContainer; case SyntaxKind.CallSignature: @@ -775,6 +788,7 @@ namespace ts { case SyntaxKind.TypeLiteral: case SyntaxKind.ObjectLiteralExpression: case SyntaxKind.InterfaceDeclaration: + case SyntaxKind.JSDocRecordType: // Interface/Object-types always have their children added to the 'members' of // their container. They are only accessible through an instance of their // container, and are never in scope otherwise (even inside the body of the @@ -795,6 +809,7 @@ namespace ts { case SyntaxKind.FunctionDeclaration: case SyntaxKind.FunctionExpression: case SyntaxKind.ArrowFunction: + case SyntaxKind.JSDocFunctionType: case SyntaxKind.TypeAliasDeclaration: // All the children of these container types are never visible through another // symbol (i.e. through another symbol's 'exports' or 'members'). Instead, @@ -873,7 +888,7 @@ namespace ts { } } - function bindFunctionOrConstructorType(node: SignatureDeclaration) { + function bindFunctionOrConstructorTypeOrJSDocFunctionType(node: SignatureDeclaration): void { // For a given function symbol "<...>(...) => T" we want to generate a symbol identical // to the one we would get for: { <...>(...): T } // @@ -948,7 +963,7 @@ namespace ts { declareModuleMember(node, symbolFlags, symbolExcludes); break; } - // fall through. + // fall through. default: if (!blockScopeContainer.locals) { blockScopeContainer.locals = {}; @@ -1227,12 +1242,14 @@ namespace ts { return bindVariableDeclarationOrBindingElement(node); case SyntaxKind.PropertyDeclaration: case SyntaxKind.PropertySignature: + case SyntaxKind.JSDocRecordMember: return bindPropertyOrMethodOrAccessor(node, SymbolFlags.Property | ((node).questionToken ? SymbolFlags.Optional : SymbolFlags.None), SymbolFlags.PropertyExcludes); case SyntaxKind.PropertyAssignment: case SyntaxKind.ShorthandPropertyAssignment: return bindPropertyOrMethodOrAccessor(node, SymbolFlags.Property, SymbolFlags.PropertyExcludes); case SyntaxKind.EnumMember: return bindPropertyOrMethodOrAccessor(node, SymbolFlags.EnumMember, SymbolFlags.EnumMemberExcludes); + case SyntaxKind.CallSignature: case SyntaxKind.ConstructSignature: case SyntaxKind.IndexSignature: @@ -1256,8 +1273,10 @@ namespace ts { return bindPropertyOrMethodOrAccessor(node, SymbolFlags.SetAccessor, SymbolFlags.SetAccessorExcludes); case SyntaxKind.FunctionType: case SyntaxKind.ConstructorType: - return bindFunctionOrConstructorType(node); + case SyntaxKind.JSDocFunctionType: + return bindFunctionOrConstructorTypeOrJSDocFunctionType(node); case SyntaxKind.TypeLiteral: + case SyntaxKind.JSDocRecordType: return bindAnonymousDeclaration(node, SymbolFlags.TypeLiteral, "__type"); case SyntaxKind.ObjectLiteralExpression: return bindObjectLiteralExpression(node); @@ -1269,6 +1288,8 @@ namespace ts { case SyntaxKind.CallExpression: if (isInJavaScriptFile(node)) { + // We're only inspecting call expressions to detect CommonJS modules, so we can skip + // this check if we've already seen the module indicator bindCallExpression(node); } break; diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index fb4af5d7298..a2e76ea488e 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -164,8 +164,6 @@ namespace ts { let getGlobalPromiseConstructorLikeType: () => ObjectType; let getGlobalThenableType: () => ObjectType; - let jsxElementClassType: Type; - let deferredNodes: Node[]; const tupleTypes: Map = {}; @@ -546,7 +544,9 @@ namespace ts { // - Type parameters of a function are in scope in the entire function declaration, including the parameter // list and return type. However, local types are only in scope in the function body. // - parameters are only in the scope of function body - if (meaning & result.flags & SymbolFlags.Type) { + // This restriction does not apply to JSDoc comment types because they are parented + // at a higher level than type parameters would normally be + if (meaning & result.flags & SymbolFlags.Type && lastLocation.kind !== SyntaxKind.JSDocComment) { useResult = result.flags & SymbolFlags.TypeParameter // type parameters are visible in parameter list, return type and type parameter list ? lastLocation === (location).type || @@ -2518,8 +2518,54 @@ namespace ts { return type; } + function getTypeForVariableLikeDeclarationFromJSDocComment(declaration: VariableLikeDeclaration) { + const jsDocType = getJSDocTypeForVariableLikeDeclarationFromJSDocComment(declaration); + if (jsDocType) { + return getTypeFromTypeNode(jsDocType); + } + } + + function getJSDocTypeForVariableLikeDeclarationFromJSDocComment(declaration: VariableLikeDeclaration): JSDocType { + // First, see if this node has an @type annotation on it directly. + const typeTag = getJSDocTypeTag(declaration); + if (typeTag) { + return typeTag.typeExpression.type; + } + + if (declaration.kind === SyntaxKind.VariableDeclaration && + declaration.parent.kind === SyntaxKind.VariableDeclarationList && + declaration.parent.parent.kind === SyntaxKind.VariableStatement) { + + // @type annotation might have been on the variable statement, try that instead. + const annotation = getJSDocTypeTag(declaration.parent.parent); + if (annotation) { + return annotation.typeExpression.type; + } + } + else if (declaration.kind === SyntaxKind.Parameter) { + // If it's a parameter, see if the parent has a jsdoc comment with an @param + // annotation. + const paramTag = getCorrespondingJSDocParameterTag(declaration); + if (paramTag && paramTag.typeExpression) { + return paramTag.typeExpression.type; + } + } + + return undefined; + } + // Return the inferred type for a variable, parameter, or property declaration function getTypeForVariableLikeDeclaration(declaration: VariableLikeDeclaration): Type { + if (declaration.parserContextFlags & ParserContextFlags.JavaScriptFile) { + // If this is a variable in a JavaScript file, then use the JSDoc type (if it has + // one as its type), otherwise fallback to the below standard TS codepaths to + // try to figure it out. + const type = getTypeForVariableLikeDeclarationFromJSDocComment(declaration); + if (type && type !== unknownType) { + return type; + } + } + // A variable declared in a for..in statement is always of type any if (declaration.parent.parent.kind === SyntaxKind.ForInStatement) { return anyType; @@ -3837,6 +3883,21 @@ namespace ts { return getIndexTypeOfStructuredType(getApparentType(type), kind); } + function getTypeParametersFromSignatureDeclaration(declaration: SignatureDeclaration): TypeParameter[] { + if (declaration.parserContextFlags & ParserContextFlags.JavaScriptFile) { + const templateTag = getJSDocTemplateTag(declaration); + if (templateTag) { + return getTypeParametersFromDeclaration(templateTag.typeParameters); + } + } + + if (declaration.typeParameters) { + return getTypeParametersFromDeclaration(declaration.typeParameters); + } + + return undefined; + } + // Return list of type parameters with duplicates removed (duplicate identifier errors are generated in the actual // type checking functions). function getTypeParametersFromDeclaration(typeParameterDeclarations: TypeParameterDeclaration[]): TypeParameter[] { @@ -3860,12 +3921,33 @@ namespace ts { return result; } - function isOptionalParameter(node: ParameterDeclaration) { + function isOptionalParameter(node: ParameterDeclaration, skipSignatureCheck?: boolean) { + if (node.parserContextFlags & ParserContextFlags.JavaScriptFile) { + if (node.type && node.type.kind === SyntaxKind.JSDocOptionalType) { + return true; + } + + const paramTag = getCorrespondingJSDocParameterTag(node); + if (paramTag) { + if (paramTag.isBracketed) { + return true; + } + + if (paramTag.typeExpression) { + return paramTag.typeExpression.type.kind === SyntaxKind.JSDocOptionalType; + } + } + } + if (hasQuestionToken(node)) { return true; } if (node.initializer) { + if (skipSignatureCheck) { + return true; + } + const signatureDeclaration = node.parent; const signature = getSignatureFromDeclaration(signatureDeclaration); const parameterIndex = ts.indexOf(signatureDeclaration.parameters, node); @@ -3901,12 +3983,20 @@ namespace ts { getDeclaredTypeOfClassOrInterface(getMergedSymbol((declaration.parent).symbol)) : undefined; const typeParameters = classType ? classType.localTypeParameters : - declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) : undefined; + declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) : + getTypeParametersFromSignatureDeclaration(declaration); const parameters: Symbol[] = []; let hasStringLiterals = false; let minArgumentCount = -1; - for (let i = 0, n = declaration.parameters.length; i < n; i++) { + const isJSConstructSignature = isJSDocConstructSignature(declaration); + let returnType: Type = undefined; + + // If this is a JSDoc construct signature, then skip the first parameter in the + // parameter list. The first parameter represents the return type of the construct + // signature. + for (let i = isJSConstructSignature ? 1 : 0, n = declaration.parameters.length; i < n; i++) { const param = declaration.parameters[i]; + let paramSymbol = param.symbol; // Include parameter symbol instead of property symbol in the signature if (paramSymbol && !!(paramSymbol.flags & SymbolFlags.Property) && !isBindingPattern(param.name)) { @@ -3914,6 +4004,7 @@ namespace ts { paramSymbol = resolvedSymbol; } parameters.push(paramSymbol); + if (param.type && param.type.kind === SyntaxKind.StringLiteralType) { hasStringLiterals = true; } @@ -3933,14 +4024,24 @@ namespace ts { minArgumentCount = declaration.parameters.length; } - let returnType: Type; - if (classType) { + if (isJSConstructSignature) { + minArgumentCount--; + returnType = getTypeFromTypeNode(declaration.parameters[0].type); + } + else if (classType) { returnType = classType; } else if (declaration.type) { returnType = getTypeFromTypeNode(declaration.type); } else { + if (declaration.parserContextFlags & ParserContextFlags.JavaScriptFile) { + const type = getReturnTypeFromJSDocComment(declaration); + if (type && type !== unknownType) { + returnType = type; + } + } + // TypeScript 1.0 spec (April 2014): // If only one accessor includes a type annotation, the other behaves as if it had the same type annotation. if (declaration.kind === SyntaxKind.GetAccessor && !hasDynamicName(declaration)) { @@ -3977,6 +4078,7 @@ namespace ts { case SyntaxKind.SetAccessor: case SyntaxKind.FunctionExpression: case SyntaxKind.ArrowFunction: + case SyntaxKind.JSDocFunctionType: // Don't include signature if node is the implementation of an overloaded function. A node is considered // an implementation node if it has a body and the previous node is of the same kind and immediately // precedes the implementation node (i.e. has the same parent and ends where the implementation starts). @@ -4196,7 +4298,7 @@ namespace ts { } // Get type from reference to class or interface - function getTypeFromClassOrInterfaceReference(node: TypeReferenceNode | ExpressionWithTypeArguments, symbol: Symbol): Type { + function getTypeFromClassOrInterfaceReference(node: TypeReferenceNode | ExpressionWithTypeArguments | JSDocTypeReference, symbol: Symbol): Type { const type = getDeclaredTypeOfSymbol(symbol); const typeParameters = type.localTypeParameters; if (typeParameters) { @@ -4219,7 +4321,7 @@ namespace ts { // Get type from reference to type alias. When a type alias is generic, the declared type of the type alias may include // references to the type parameters of the alias. We replace those with the actual type arguments by instantiating the // declared type. Instantiations are cached using the type identities of the type arguments as the key. - function getTypeFromTypeAliasReference(node: TypeReferenceNode | ExpressionWithTypeArguments, symbol: Symbol): Type { + function getTypeFromTypeAliasReference(node: TypeReferenceNode | ExpressionWithTypeArguments | JSDocTypeReference, symbol: Symbol): Type { const type = getDeclaredTypeOfSymbol(symbol); const links = getSymbolLinks(symbol); const typeParameters = links.typeParameters; @@ -4240,7 +4342,7 @@ namespace ts { } // Get type from reference to named type that cannot be generic (enum or type parameter) - function getTypeFromNonGenericTypeReference(node: TypeReferenceNode | ExpressionWithTypeArguments, symbol: Symbol): Type { + function getTypeFromNonGenericTypeReference(node: TypeReferenceNode | ExpressionWithTypeArguments | JSDocTypeReference, symbol: Symbol): Type { if (node.typeArguments) { error(node, Diagnostics.Type_0_is_not_generic, symbolToString(symbol)); return unknownType; @@ -4248,18 +4350,90 @@ namespace ts { return getDeclaredTypeOfSymbol(symbol); } - function getTypeFromTypeReference(node: TypeReferenceNode | ExpressionWithTypeArguments): Type { + function getTypeReferenceName(node: TypeReferenceNode | ExpressionWithTypeArguments | JSDocTypeReference): LeftHandSideExpression | EntityName { + switch (node.kind) { + case SyntaxKind.TypeReference: + return (node).typeName; + case SyntaxKind.JSDocTypeReference: + return (node).name; + case SyntaxKind.ExpressionWithTypeArguments: + // We only support expressions that are simple qualified names. For other + // expressions this produces undefined. + if (isSupportedExpressionWithTypeArguments(node)) { + return (node).expression; + } + + // fall through; + } + + return undefined; + } + + function resolveTypeReferenceName( + node: TypeReferenceNode | ExpressionWithTypeArguments | JSDocTypeReference, + typeReferenceName: LeftHandSideExpression | EntityName) { + + if (!typeReferenceName) { + return unknownSymbol; + } + + let symbol = resolveEntityName(typeReferenceName, SymbolFlags.Type); + if (!symbol && node.kind === SyntaxKind.JSDocTypeReference) { + // If the reference didn't resolve to a type, try seeing if results to a + // value. If it does, get the type of that value. + symbol = resolveEntityName(typeReferenceName, SymbolFlags.Value); + } + + return symbol || unknownSymbol; + } + + function getTypeReferenceType(node: TypeReferenceNode | ExpressionWithTypeArguments | JSDocTypeReference, symbol: Symbol) { + if (symbol === unknownSymbol) { + return unknownType; + } + + if (symbol.flags & (SymbolFlags.Class | SymbolFlags.Interface)) { + return getTypeFromClassOrInterfaceReference(node, symbol); + } + + if (symbol.flags & SymbolFlags.TypeAlias) { + return getTypeFromTypeAliasReference(node, symbol); + } + + if (symbol.flags & SymbolFlags.Value && node.kind === SyntaxKind.JSDocTypeReference) { + // A JSDocTypeReference may have resolved to a value (as opposed to a type). In + // that case, the type of this reference is just the type of the value we resolved + // to. + return getTypeOfSymbol(symbol); + } + + return getTypeFromNonGenericTypeReference(node, symbol); + } + + function getTypeFromTypeReference(node: TypeReferenceNode | ExpressionWithTypeArguments | JSDocTypeReference): Type { const links = getNodeLinks(node); if (!links.resolvedType) { - // We only support expressions that are simple qualified names. For other expressions this produces undefined. - const typeNameOrExpression = node.kind === SyntaxKind.TypeReference ? (node).typeName : - isSupportedExpressionWithTypeArguments(node) ? (node).expression : - undefined; - const symbol = typeNameOrExpression && resolveEntityName(typeNameOrExpression, SymbolFlags.Type) || unknownSymbol; - const type = symbol === unknownSymbol ? unknownType : - symbol.flags & (SymbolFlags.Class | SymbolFlags.Interface) ? getTypeFromClassOrInterfaceReference(node, symbol) : - symbol.flags & SymbolFlags.TypeAlias ? getTypeFromTypeAliasReference(node, symbol) : - getTypeFromNonGenericTypeReference(node, symbol); + let symbol: Symbol; + let type: Type; + if (node.kind === SyntaxKind.JSDocTypeReference) { + const typeReferenceName = getTypeReferenceName(node); + symbol = resolveTypeReferenceName(node, typeReferenceName); + type = getTypeReferenceType(node, symbol); + + links.resolvedSymbol = symbol; + links.resolvedType = type; + } + else { + // We only support expressions that are simple qualified names. For other expressions this produces undefined. + const typeNameOrExpression = node.kind === SyntaxKind.TypeReference ? (node).typeName : + isSupportedExpressionWithTypeArguments(node) ? (node).expression : + undefined; + symbol = typeNameOrExpression && resolveEntityName(typeNameOrExpression, SymbolFlags.Type) || unknownSymbol; + type = symbol === unknownSymbol ? unknownType : + symbol.flags & (SymbolFlags.Class | SymbolFlags.Interface) ? getTypeFromClassOrInterfaceReference(node, symbol) : + symbol.flags & SymbolFlags.TypeAlias ? getTypeFromTypeAliasReference(node, symbol) : + getTypeFromNonGenericTypeReference(node, symbol); + } // Cache both the resolved symbol and the resolved type. The resolved symbol is needed in when we check the // type reference in checkTypeReferenceOrExpressionWithTypeArguments. links.resolvedSymbol = symbol; @@ -4554,6 +4728,62 @@ namespace ts { return links.resolvedType; } + function getTypeFromJSDocFunctionType(node: JSDocFunctionType): Type { + Debug.assert(!!node.symbol); + const links = getNodeLinks(node); + if (!links.resolvedType) { + links.resolvedType = createObjectType(TypeFlags.Anonymous, node.symbol); + } + return links.resolvedType; + } + + function getTypeFromJSDocRecordType(node: JSDocRecordType): Type { + const links = getNodeLinks(node); + if (!links.resolvedType) { + links.resolvedType = createObjectType(TypeFlags.Anonymous, node.symbol); + } + return links.resolvedType; + } + + function getTypeFromJSDocVariadicType(node: JSDocVariadicType): Type { + const links = getNodeLinks(node); + if (!links.resolvedType) { + const type = getTypeFromTypeNode(node.type); + links.resolvedType = type ? createArrayType(type) : unknownType; + } + return links.resolvedType; + } + + function getTypeFromJSDocTypeReference(node: JSDocTypeReference): Type { + return getTypeFromTypeReference(node); + } + + function getTypeFromJSDocArrayType(node: JSDocArrayType): Type { + const links = getNodeLinks(node); + if (!links.resolvedType) { + links.resolvedType = createArrayType(getTypeFromTypeNode(node.elementType)); + } + return links.resolvedType; + } + + function getTypeFromJSDocUnionType(node: JSDocUnionType): Type { + const links = getNodeLinks(node); + if (!links.resolvedType) { + const types = map(node.types, getTypeFromTypeNode); + links.resolvedType = getUnionType(types, /*noSubtypeReduction*/ true); + } + return links.resolvedType; + } + + function getTypeFromJSDocTupleType(node: JSDocTupleType): Type { + const links = getNodeLinks(node); + if (!links.resolvedType) { + const types = map(node.types, getTypeFromTypeNode); + links.resolvedType = createTupleType(types); + } + return links.resolvedType; + } + function getThisType(node: TypeNode): Type { const container = getThisContainer(node, /*includeArrowFunctions*/ false); const parent = container && container.parent; @@ -4640,6 +4870,34 @@ namespace ts { case SyntaxKind.QualifiedName: const symbol = getSymbolAtLocation(node); return symbol && getDeclaredTypeOfSymbol(symbol); + case SyntaxKind.JSDocAllType: + return anyType; + case SyntaxKind.JSDocUnknownType: + return unknownType; + case SyntaxKind.JSDocArrayType: + return getTypeFromJSDocArrayType(node); + case SyntaxKind.JSDocTupleType: + return getTypeFromJSDocTupleType(node); + case SyntaxKind.JSDocUnionType: + return getTypeFromJSDocUnionType(node); + case SyntaxKind.JSDocNullableType: + return getTypeFromTypeNode((node).type); + case SyntaxKind.JSDocNonNullableType: + return getTypeFromTypeNode((node).type); + case SyntaxKind.JSDocTypeReference: + return getTypeFromJSDocTypeReference(node); + case SyntaxKind.JSDocOptionalType: + return getTypeFromTypeNode((node).type); + case SyntaxKind.JSDocFunctionType: + return getTypeFromJSDocFunctionType(node); + case SyntaxKind.JSDocVariadicType: + return getTypeFromJSDocVariadicType(node); + case SyntaxKind.JSDocConstructorType: + return getTypeFromTypeNode((node).type); + case SyntaxKind.JSDocRecordType: + return getTypeFromJSDocRecordType(node); + case SyntaxKind.JSDocThisType: + return getTypeFromTypeNode((node).type); default: return unknownType; } @@ -7062,6 +7320,13 @@ namespace ts { return container.flags & NodeFlags.Static ? getTypeOfSymbol(symbol) : (getDeclaredTypeOfSymbol(symbol)).thisType; } + if (container.parserContextFlags & ParserContextFlags.JavaScriptFile) { + const type = getTypeForThisExpressionFromJSDoc(container); + if (type && type !== unknownType) { + return type; + } + } + // If this is a function in a JS file, it might be a class method. Check if it's the RHS // of a x.prototype.y = function [name]() { .... } if (isInJavaScriptFile(node) && container.kind === SyntaxKind.FunctionExpression) { @@ -7081,6 +7346,16 @@ namespace ts { return anyType; } + function getTypeForThisExpressionFromJSDoc(node: Node) { + const typeTag = getJSDocTypeTag(node); + if (typeTag && typeTag.typeExpression.type.kind === SyntaxKind.JSDocFunctionType) { + const jsDocFunctionType = typeTag.typeExpression.type; + if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].type.kind === SyntaxKind.JSDocThisType) { + return getTypeFromTypeNode(jsDocFunctionType.parameters[0].type); + } + } + } + function isInConstructorArgumentInitializer(node: Node, constructorDecl: Node): boolean { for (let n = node; n && n !== constructorDecl; n = n.parent) { if (n.kind === SyntaxKind.Parameter) { @@ -7227,7 +7502,6 @@ namespace ts { if (isContextSensitive(func)) { const contextualSignature = getContextualSignature(func); if (contextualSignature) { - const funcHasRestParameters = hasRestParameter(func); const len = func.parameters.length - (funcHasRestParameters ? 1 : 0); const indexOfParameter = indexOf(func.parameters, parameter); @@ -8350,10 +8624,7 @@ namespace ts { } function getJsxGlobalElementClassType(): Type { - if (!jsxElementClassType) { - jsxElementClassType = getExportedTypeFromNamespace(JsxNames.JSX, JsxNames.ElementClass); - } - return jsxElementClassType; + return getExportedTypeFromNamespace(JsxNames.JSX, JsxNames.ElementClass); } /// Returns all the properties of the Jsx.IntrinsicElements interface @@ -9155,32 +9426,33 @@ namespace ts { */ function getEffectiveDecoratorFirstArgumentType(node: Node): Type { // The first argument to a decorator is its `target`. - if (node.kind === SyntaxKind.ClassDeclaration) { - // For a class decorator, the `target` is the type of the class (e.g. the - // "static" or "constructor" side of the class) - const classSymbol = getSymbolOfNode(node); - return getTypeOfSymbol(classSymbol); - } - - if (node.kind === SyntaxKind.Parameter) { - // For a parameter decorator, the `target` is the parent type of the - // parameter's containing method. - node = node.parent; - if (node.kind === SyntaxKind.Constructor) { + switch (node.kind) { + case SyntaxKind.ClassDeclaration: + case SyntaxKind.ClassExpression: + // For a class decorator, the `target` is the type of the class (e.g. the + // "static" or "constructor" side of the class) const classSymbol = getSymbolOfNode(node); return getTypeOfSymbol(classSymbol); - } - } - if (node.kind === SyntaxKind.PropertyDeclaration || - node.kind === SyntaxKind.MethodDeclaration || - node.kind === SyntaxKind.GetAccessor || - node.kind === SyntaxKind.SetAccessor) { - // For a property or method decorator, the `target` is the - // "static"-side type of the parent of the member if the member is - // declared "static"; otherwise, it is the "instance"-side type of the - // parent of the member. - return getParentTypeOfClassElement(node); + case SyntaxKind.Parameter: + // For a parameter decorator, the `target` is the parent type of the + // parameter's containing method. + node = node.parent; + if (node.kind === SyntaxKind.Constructor) { + const classSymbol = getSymbolOfNode(node); + return getTypeOfSymbol(classSymbol); + } + + // fall-through + case SyntaxKind.PropertyDeclaration: + case SyntaxKind.MethodDeclaration: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + // For a property or method decorator, the `target` is the + // "static"-side type of the parent of the member if the member is + // declared "static"; otherwise, it is the "instance"-side type of the + // parent of the member. + return getParentTypeOfClassElement(node); } Debug.fail("Unsupported decorator target."); @@ -9849,7 +10121,8 @@ namespace ts { if (declaration && declaration.kind !== SyntaxKind.Constructor && declaration.kind !== SyntaxKind.ConstructSignature && - declaration.kind !== SyntaxKind.ConstructorType) { + declaration.kind !== SyntaxKind.ConstructorType && + !isJSDocConstructSignature(declaration)) { // When resolved signature is a call signature (and not a construct signature) the result type is any, unless // the declaring function had members created through 'x.prototype.y = expr' or 'this.y = expr' psuedodeclarations @@ -9969,6 +10242,13 @@ namespace ts { } } + function getReturnTypeFromJSDocComment(func: SignatureDeclaration | FunctionDeclaration): Type { + const returnTag = getJSDocReturnTag(func); + if (returnTag) { + return getTypeFromTypeNode(returnTag.typeExpression.type); + } + } + function createPromiseType(promisedType: Type): Type { // creates a `Promise` type where `T` is the promisedType argument const globalPromiseType = getGlobalPromiseType(); @@ -9982,11 +10262,11 @@ namespace ts { } function getReturnTypeFromBody(func: FunctionLikeDeclaration, contextualMapper?: TypeMapper): Type { - const contextualSignature = getContextualSignatureForFunctionLikeDeclaration(func); if (!func.body) { return unknownType; } + const contextualSignature = getContextualSignatureForFunctionLikeDeclaration(func); const isAsync = isAsyncFunctionLike(func); let type: Type; if (func.body.kind !== SyntaxKind.Block) { diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 7f5d052a7e7..3dfe0985575 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -611,44 +611,24 @@ namespace ts { fixupParentReferences(sourceFile); } - // If this is a javascript file, proactively see if we can get JSDoc comments for - // relevant nodes in the file. We'll use these to provide typing informaion if they're - // available. - if (isSourceFileJavaScript(sourceFile)) { - addJSDocComments(); - } - return sourceFile; } - function addJSDocComments() { - forEachChild(sourceFile, visit); - return; - function visit(node: Node) { - // Add additional cases as necessary depending on how we see JSDoc comments used - // in the wild. - switch (node.kind) { - case SyntaxKind.VariableStatement: - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.Parameter: - addJSDocComment(node); - } - - forEachChild(node, visit); - } - } - - function addJSDocComment(node: Node) { - const comments = getLeadingCommentRangesOfNode(node, sourceFile); - if (comments) { - for (const comment of comments) { - const jsDocComment = JSDocParser.parseJSDocComment(node, comment.pos, comment.end - comment.pos); - if (jsDocComment) { - node.jsDocComment = jsDocComment; + function addJSDocComment(node: T): T { + if (contextFlags & ParserContextFlags.JavaScriptFile) { + const comments = getLeadingCommentRangesOfNode(node, sourceFile); + if (comments) { + for (const comment of comments) { + const jsDocComment = JSDocParser.parseJSDocComment(node, comment.pos, comment.end - comment.pos); + if (jsDocComment) { + node.jsDocComment = jsDocComment; + } } } } + + return node; } export function fixupParentReferences(sourceFile: Node) { @@ -2068,7 +2048,8 @@ namespace ts { // contexts. In addition, parameter initializers are semantically disallowed in // overload signatures. So parameter initializers are transitively disallowed in // ambient contexts. - return finishNode(node); + + return addJSDocComment(finishNode(node)); } function parseBindingElementInitializer(inParameter: boolean) { @@ -4724,7 +4705,7 @@ namespace ts { setModifiers(node, modifiers); node.declarationList = parseVariableDeclarationList(/*inForStatementInitializer*/ false); parseSemicolon(); - return finishNode(node); + return addJSDocComment(finishNode(node)); } function parseFunctionDeclaration(fullStart: number, decorators: NodeArray, modifiers: ModifiersArray): FunctionDeclaration { @@ -4738,7 +4719,7 @@ namespace ts { const isAsync = !!(node.flags & NodeFlags.Async); fillSignature(SyntaxKind.ColonToken, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, node); node.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, Diagnostics.or_expected); - return finishNode(node); + return addJSDocComment(finishNode(node)); } function parseConstructorDeclaration(pos: number, decorators: NodeArray, modifiers: ModifiersArray): ConstructorDeclaration { @@ -5564,23 +5545,19 @@ namespace ts { export function parseJSDocTypeExpressionForTests(content: string, start: number, length: number) { initializeState("file.js", content, ScriptTarget.Latest, /*isJavaScriptFile*/ true, /*_syntaxCursor:*/ undefined); - const jsDocTypeExpression = parseJSDocTypeExpression(start, length); + scanner.setText(content, start, length); + token = scanner.scan(); + const jsDocTypeExpression = parseJSDocTypeExpression(); const diagnostics = parseDiagnostics; clearState(); return jsDocTypeExpression ? { jsDocTypeExpression, diagnostics } : undefined; } - // Parses out a JSDoc type expression. The starting position should be right at the open - // curly in the type expression. Returns 'undefined' if it encounters any errors while parsing. + // Parses out a JSDoc type expression. /* @internal */ - export function parseJSDocTypeExpression(start: number, length: number): JSDocTypeExpression { - scanner.setText(sourceText, start, length); - - // Prime the first token for us to start processing. - token = nextToken(); - - const result = createNode(SyntaxKind.JSDocTypeExpression); + export function parseJSDocTypeExpression(): JSDocTypeExpression { + const result = createNode(SyntaxKind.JSDocTypeExpression, scanner.getTokenPos()); parseExpected(SyntaxKind.OpenBraceToken); result.type = parseJSDocTopLevelType(); @@ -5878,7 +5855,8 @@ namespace ts { export function parseIsolatedJSDocComment(content: string, start: number, length: number) { initializeState("file.js", content, ScriptTarget.Latest, /*isJavaScriptFile*/ true, /*_syntaxCursor:*/ undefined); - const jsDocComment = parseJSDocComment(/*parent:*/ undefined, start, length); + sourceFile = { languageVariant: LanguageVariant.Standard, text: content }; + const jsDocComment = parseJSDocCommentWorker(start, length); const diagnostics = parseDiagnostics; clearState(); @@ -5886,12 +5864,19 @@ namespace ts { } export function parseJSDocComment(parent: Node, start: number, length: number): JSDocComment { + const saveToken = token; + const saveParseDiagnosticsLength = parseDiagnostics.length; + const saveParseErrorBeforeNextFinishedNode = parseErrorBeforeNextFinishedNode; + const comment = parseJSDocCommentWorker(start, length); if (comment) { - fixupParentReferences(comment); comment.parent = parent; } + token = saveToken; + parseDiagnostics.length = saveParseDiagnosticsLength; + parseErrorBeforeNextFinishedNode = saveParseErrorBeforeNextFinishedNode; + return comment; } @@ -5906,69 +5891,69 @@ namespace ts { Debug.assert(end <= content.length); let tags: NodeArray; - let pos: number; - // NOTE(cyrusn): This is essentially a handwritten scanner for JSDocComments. I - // considered using an actual Scanner, but this would complicate things. The - // scanner would need to know it was in a Doc Comment. Otherwise, it would then - // produce comments *inside* the doc comment. In the end it was just easier to - // write a simple scanner rather than go that route. - if (length >= "/** */".length) { - if (content.charCodeAt(start) === CharacterCodes.slash && - content.charCodeAt(start + 1) === CharacterCodes.asterisk && - content.charCodeAt(start + 2) === CharacterCodes.asterisk && - content.charCodeAt(start + 3) !== CharacterCodes.asterisk) { + let result: JSDocComment; + // Check for /** (JSDoc opening part) + if (content.charCodeAt(start) === CharacterCodes.slash && + content.charCodeAt(start + 1) === CharacterCodes.asterisk && + content.charCodeAt(start + 2) === CharacterCodes.asterisk && + content.charCodeAt(start + 3) !== CharacterCodes.asterisk) { + + + // + 3 for leading /**, - 5 in total for /** */ + scanner.scanRange(start + 3, length - 5, () => { // Initially we can parse out a tag. We also have seen a starting asterisk. // This is so that /** * @type */ doesn't parse. let canParseTag = true; let seenAsterisk = true; - for (pos = start + "/**".length; pos < end; ) { - const ch = content.charCodeAt(pos); - pos++; + nextJSDocToken(); + while (token !== SyntaxKind.EndOfFileToken) { + switch (token) { + case SyntaxKind.AtToken: + if (canParseTag) { + parseTag(); + } + // This will take us to the end of the line, so it's OK to parse a tag on the next pass through the loop + seenAsterisk = false; + break; - if (ch === CharacterCodes.at && canParseTag) { - parseTag(); + case SyntaxKind.NewLineTrivia: + // After a line break, we can parse a tag, and we haven't seen an asterisk on the next line yet + canParseTag = true; + seenAsterisk = false; + break; - // Once we parse out a tag, we cannot keep parsing out tags on this line. - canParseTag = false; - continue; - } + case SyntaxKind.AsteriskToken: + if (seenAsterisk) { + // If we've already seen an asterisk, then we can no longer parse a tag on this line + canParseTag = false; + } + // Ignore the first asterisk on a line + seenAsterisk = true; + break; - if (isLineBreak(ch)) { - // After a line break, we can parse a tag, and we haven't seen as asterisk - // on the next line yet. - canParseTag = true; - seenAsterisk = false; - continue; - } - - if (isWhiteSpace(ch)) { - // Whitespace doesn't affect any of our parsing. - continue; - } - - // Ignore the first asterisk on a line. - if (ch === CharacterCodes.asterisk) { - if (seenAsterisk) { - // If we've already seen an asterisk, then we can no longer parse a tag - // on this line. + case SyntaxKind.Identifier: + // Anything else is doc comment text. We can't do anything with it. Because it + // wasn't a tag, we can no longer parse a tag on this line until we hit the next + // line break. canParseTag = false; - } - seenAsterisk = true; - continue; + break; + + case SyntaxKind.EndOfFileToken: + break; } - // Anything else is doc comment text. We can't do anything with it. Because it - // wasn't a tag, we can no longer parse a tag on this line until we hit the next - // line break. - canParseTag = false; + nextJSDocToken(); } - } + + result = createJSDocComment(); + + }); } - return createJSDocComment(); + return result; function createJSDocComment(): JSDocComment { if (!tags) { @@ -5981,21 +5966,23 @@ namespace ts { } function skipWhitespace(): void { - while (pos < end && isWhiteSpace(content.charCodeAt(pos))) { - pos++; + while (token === SyntaxKind.WhitespaceTrivia || token === SyntaxKind.NewLineTrivia) { + nextJSDocToken(); } } function parseTag(): void { - Debug.assert(content.charCodeAt(pos - 1) === CharacterCodes.at); - const atToken = createNode(SyntaxKind.AtToken, pos - 1); - atToken.end = pos; + Debug.assert(token === SyntaxKind.AtToken); + const atToken = createNode(SyntaxKind.AtToken, scanner.getTokenPos()); + atToken.end = scanner.getTextPos(); + nextJSDocToken(); - const tagName = scanIdentifier(); + const tagName = scanJsDocIdentifier(); if (!tagName) { return; } + nextJSDocToken(); const tag = handleTag(atToken, tagName) || handleUnknownTag(atToken, tagName); addTag(tag); } @@ -6022,7 +6009,7 @@ namespace ts { const result = createNode(SyntaxKind.JSDocTag, atToken.pos); result.atToken = atToken; result.tagName = tagName; - return finishNode(result, pos); + return finishNode(result); } function addTag(tag: JSDocTag): void { @@ -6038,14 +6025,11 @@ namespace ts { } function tryParseTypeExpression(): JSDocTypeExpression { - skipWhitespace(); - - if (content.charCodeAt(pos) !== CharacterCodes.openBrace) { + if (token !== SyntaxKind.OpenBraceToken) { return undefined; } - const typeExpression = parseJSDocTypeExpression(pos, end - pos); - pos = typeExpression.end; + const typeExpression = parseJSDocTypeExpression(); return typeExpression; } @@ -6055,18 +6039,27 @@ namespace ts { skipWhitespace(); let name: Identifier; let isBracketed: boolean; - if (content.charCodeAt(pos) === CharacterCodes.openBracket) { - pos++; - skipWhitespace(); - name = scanIdentifier(); + // Looking for something like '[foo]' or 'foo' + if (parseOptionalToken(SyntaxKind.OpenBracketToken)) { + name = scanJsDocIdentifier(); + nextJSDocToken(); isBracketed = true; + + // May have an optional default, e.g. '[foo = 42]' + if (parseOptionalToken(SyntaxKind.EqualsToken)) { + parseExpression(); + } + + parseExpected(SyntaxKind.CloseBracketToken); } - else { - name = scanIdentifier(); + else if (token === SyntaxKind.Identifier) { + name = scanJsDocIdentifier(); + nextJSDocToken(); } if (!name) { - parseErrorAtPosition(pos, 0, Diagnostics.Identifier_expected); + parseErrorAtPosition(scanner.getStartPos(), 0, Diagnostics.Identifier_expected); + return undefined; } let preName: Identifier, postName: Identifier; @@ -6088,95 +6081,88 @@ namespace ts { result.typeExpression = typeExpression; result.postParameterName = postName; result.isBracketed = isBracketed; - return finishNode(result, pos); + return finishNode(result); } function handleReturnTag(atToken: Node, tagName: Identifier): JSDocReturnTag { if (forEach(tags, t => t.kind === SyntaxKind.JSDocReturnTag)) { - parseErrorAtPosition(tagName.pos, pos - tagName.pos, Diagnostics._0_tag_already_specified, tagName.text); + parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, Diagnostics._0_tag_already_specified, tagName.text); } const result = createNode(SyntaxKind.JSDocReturnTag, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeExpression = tryParseTypeExpression(); - return finishNode(result, pos); + return finishNode(result); } function handleTypeTag(atToken: Node, tagName: Identifier): JSDocTypeTag { if (forEach(tags, t => t.kind === SyntaxKind.JSDocTypeTag)) { - parseErrorAtPosition(tagName.pos, pos - tagName.pos, Diagnostics._0_tag_already_specified, tagName.text); + parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, Diagnostics._0_tag_already_specified, tagName.text); } const result = createNode(SyntaxKind.JSDocTypeTag, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeExpression = tryParseTypeExpression(); - return finishNode(result, pos); + return finishNode(result); } function handleTemplateTag(atToken: Node, tagName: Identifier): JSDocTemplateTag { if (forEach(tags, t => t.kind === SyntaxKind.JSDocTemplateTag)) { - parseErrorAtPosition(tagName.pos, pos - tagName.pos, Diagnostics._0_tag_already_specified, tagName.text); + parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, Diagnostics._0_tag_already_specified, tagName.text); } + // Type parameter list looks like '@template T,U,V' const typeParameters = >[]; - typeParameters.pos = pos; + typeParameters.pos = scanner.getStartPos(); while (true) { - skipWhitespace(); - - const startPos = pos; - const name = scanIdentifier(); + const name = scanJsDocIdentifier(); if (!name) { - parseErrorAtPosition(startPos, 0, Diagnostics.Identifier_expected); + parseErrorAtPosition(scanner.getStartPos(), 0, Diagnostics.Identifier_expected); return undefined; } const typeParameter = createNode(SyntaxKind.TypeParameter, name.pos); typeParameter.name = name; - finishNode(typeParameter, pos); + nextJSDocToken(); + finishNode(typeParameter); typeParameters.push(typeParameter); - skipWhitespace(); - if (content.charCodeAt(pos) !== CharacterCodes.comma) { + if (token === SyntaxKind.CommaToken) { + nextJSDocToken(); + } + else { break; } - - pos++; } - typeParameters.end = pos; - const result = createNode(SyntaxKind.JSDocTemplateTag, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeParameters = typeParameters; - return finishNode(result, pos); + finishNode(result); + typeParameters.end = result.end; + return result; } - function scanIdentifier(): Identifier { - const startPos = pos; - for (; pos < end; pos++) { - const ch = content.charCodeAt(pos); - if (pos === startPos && isIdentifierStart(ch, ScriptTarget.Latest)) { - continue; - } - else if (pos > startPos && isIdentifierPart(ch, ScriptTarget.Latest)) { - continue; - } + function nextJSDocToken(): SyntaxKind { + return token = scanner.scanJSDocToken(); + } - break; - } - - if (startPos === pos) { + function scanJsDocIdentifier(): Identifier { + if (token !== SyntaxKind.Identifier) { + parseErrorAtCurrentToken(Diagnostics.Identifier_expected); return undefined; } - const result = createNode(SyntaxKind.Identifier, startPos); - result.text = content.substring(startPos, pos); - return finishNode(result, pos); + const pos = scanner.getTokenPos(); + const end = scanner.getTextPos(); + const result = createNode(SyntaxKind.Identifier, pos); + result.text = content.substring(pos, end); + return finishNode(result, end); } } } diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index 6c0489ff1dc..147bfe049ea 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -29,6 +29,7 @@ namespace ts { scanJsxIdentifier(): SyntaxKind; reScanJsxToken(): SyntaxKind; scanJsxToken(): SyntaxKind; + scanJSDocToken(): SyntaxKind; scan(): SyntaxKind; // Sets the text for the scanner to scan. An optional subrange starting point and length // can be provided to have the scanner only scan a portion of the text. @@ -42,6 +43,10 @@ namespace ts { // is returned from this function. lookAhead(callback: () => T): T; + // Invokes the callback with the scanner set to scan the specified range. When the callback + // returns, the scanner is restored to the state it was in before scanRange was called. + scanRange(start: number, length: number, callback: () => T): T; + // Invokes the provided callback. If the callback returns something falsy, then it restores // the scanner to the state it was in immediately prior to invoking the callback. If the // callback returns something truthy, then the scanner state is not rolled back. The result @@ -734,6 +739,7 @@ namespace ts { scanJsxIdentifier, reScanJsxToken, scanJsxToken, + scanJSDocToken, scan, setText, setScriptTarget, @@ -742,6 +748,7 @@ namespace ts { setTextPos, tryScan, lookAhead, + scanRange, }; function error(message: DiagnosticMessage, length?: number): void { @@ -1649,6 +1656,69 @@ namespace ts { return token; } + function scanJSDocToken(): SyntaxKind { + startPos = pos; + + // Eat leading whitespace + while (pos < end) { + const ch = text.charCodeAt(pos); + if (isWhiteSpace(ch)) { + pos++; + } + else { + break; + } + } + tokenPos = pos; + + let identifierStarted = false; + while (pos < end) { + const ch = text.charCodeAt(pos); + if (identifierStarted) { + if (!isIdentifierPart(ch, ScriptTarget.Latest)) { + return token = SyntaxKind.Identifier; + } + } + else { + if (ch === CharacterCodes.at) { + return pos += 1, token = SyntaxKind.AtToken; + } + else if (isLineBreak(ch)) { + return pos += 1, token = SyntaxKind.NewLineTrivia; + } + else if (ch === CharacterCodes.asterisk) { + return pos += 1, token = SyntaxKind.AsteriskToken; + } + else if (ch === CharacterCodes.openBrace) { + return pos += 1, token = SyntaxKind.OpenBraceToken; + } + else if (ch === CharacterCodes.closeBrace) { + return pos += 1, token = SyntaxKind.CloseBraceToken; + } + else if (ch === CharacterCodes.openBracket) { + return pos += 1, token = SyntaxKind.OpenBracketToken; + } + else if (ch === CharacterCodes.closeBracket) { + return pos += 1, token = SyntaxKind.CloseBracketToken; + } + else if (ch === CharacterCodes.equals) { + return pos += 1, token = SyntaxKind.EqualsToken; + } + else if (ch === CharacterCodes.comma) { + return pos += 1, token = SyntaxKind.CommaToken; + } + else if (isWhiteSpace(ch)) { + // Keep going + } + else { + identifierStarted = true; + } + } + pos += 1; + } + return token = SyntaxKind.EndOfFileToken; + } + function speculationHelper(callback: () => T, isLookahead: boolean): T { const savePos = pos; const saveStartPos = startPos; @@ -1671,6 +1741,33 @@ namespace ts { return result; } + function scanRange(start: number, length: number, callback: () => T): T { + const saveEnd = end; + const savePos = pos; + const saveStartPos = startPos; + const saveTokenPos = tokenPos; + const saveToken = token; + const savePrecedingLineBreak = precedingLineBreak; + const saveTokenValue = tokenValue; + const saveHasExtendedUnicodeEscape = hasExtendedUnicodeEscape; + const saveTokenIsUnterminated = tokenIsUnterminated; + + setText(text, start, length); + const result = callback(); + + end = saveEnd; + pos = savePos; + startPos = saveStartPos; + tokenPos = saveTokenPos; + token = saveToken; + precedingLineBreak = savePrecedingLineBreak; + tokenValue = saveTokenValue; + hasExtendedUnicodeEscape = saveHasExtendedUnicodeEscape; + tokenIsUnterminated = saveTokenIsUnterminated; + + return result; + } + function lookAhead(callback: () => T): T { return speculationHelper(callback, /*isLookahead*/ true); } diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index c99c28bc0dd..83b6496bb39 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -499,8 +499,6 @@ namespace ts { return getWScriptSystem(); } else if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") { - // process and process.nextTick checks if current environment is node-like - // process.browser check excludes webpack and browserify return getNodeSystem(); } else if (typeof ChakraHost !== "undefined") { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 24f70373a8a..a5a30f1c092 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -311,11 +311,11 @@ namespace ts { // Top-level nodes SourceFile, - // JSDoc nodes. + // JSDoc nodes JSDocTypeExpression, - // The * type. + // The * type JSDocAllType, - // The ? type. + // The ? type JSDocUnknownType, JSDocArrayType, JSDocUnionType, @@ -996,7 +996,7 @@ namespace ts { } // @kind(SyntaxKind.CallExpression) - export interface CallExpression extends LeftHandSideExpression { + export interface CallExpression extends LeftHandSideExpression, Declaration { expression: LeftHandSideExpression; typeArguments?: NodeArray; arguments: NodeArray; diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 7bc708c7178..4e92c7e529d 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1054,7 +1054,7 @@ namespace ts { /** * Returns true if the node is a CallExpression to the identifier 'require' with - * exactly one string literal argument. + * exactly one argument. * This function does not test if the node is in a JavaScript file or not. */ export function isRequireCall(expression: Node): expression is CallExpression { @@ -1062,8 +1062,7 @@ namespace ts { return expression.kind === SyntaxKind.CallExpression && (expression).expression.kind === SyntaxKind.Identifier && ((expression).expression).text === "require" && - (expression).arguments.length === 1 && - (expression).arguments[0].kind === SyntaxKind.StringLiteral; + (expression).arguments.length === 1; } /// Given a BinaryExpression, returns SpecialPropertyAssignmentKind for the various kinds of property @@ -1140,26 +1139,56 @@ namespace ts { (node).parameters[0].type.kind === SyntaxKind.JSDocConstructorType; } - function getJSDocTag(node: Node, kind: SyntaxKind): JSDocTag { - if (node && node.jsDocComment) { - for (const tag of node.jsDocComment.tags) { - if (tag.kind === kind) { - return tag; - } + function getJSDocTag(node: Node, kind: SyntaxKind, checkParentVariableStatement: boolean): JSDocTag { + if (!node) { + return undefined; + } + + const jsDocComment = getJSDocComment(node, checkParentVariableStatement); + if (!jsDocComment) { + return undefined; + } + + for (const tag of jsDocComment.tags) { + if (tag.kind === kind) { + return tag; } } } + function getJSDocComment(node: Node, checkParentVariableStatement: boolean): JSDocComment { + if (node.jsDocComment) { + return node.jsDocComment; + } + // Try to recognize this pattern when node is initializer of variable declaration and JSDoc comments are on containing variable statement. + // /** + // * @param {number} name + // * @returns {number} + // */ + // var x = function(name) { return name.length; } + if (checkParentVariableStatement) { + const isInitializerOfVariableDeclarationInStatement = + node.parent.kind === SyntaxKind.VariableDeclaration && + (node.parent).initializer === node && + node.parent.parent.parent.kind === SyntaxKind.VariableStatement; + + const variableStatementNode = isInitializerOfVariableDeclarationInStatement ? node.parent.parent.parent : undefined; + return variableStatementNode && variableStatementNode.jsDocComment; + } + + return undefined; + } + export function getJSDocTypeTag(node: Node): JSDocTypeTag { - return getJSDocTag(node, SyntaxKind.JSDocTypeTag); + return getJSDocTag(node, SyntaxKind.JSDocTypeTag, /*checkParentVariableStatement*/ false); } export function getJSDocReturnTag(node: Node): JSDocReturnTag { - return getJSDocTag(node, SyntaxKind.JSDocReturnTag); + return getJSDocTag(node, SyntaxKind.JSDocReturnTag, /*checkParentVariableStatement*/ true); } export function getJSDocTemplateTag(node: Node): JSDocTemplateTag { - return getJSDocTag(node, SyntaxKind.JSDocTemplateTag); + return getJSDocTag(node, SyntaxKind.JSDocTemplateTag, /*checkParentVariableStatement*/ false); } export function getCorrespondingJSDocParameterTag(parameter: ParameterDeclaration): JSDocParameterTag { @@ -1168,19 +1197,21 @@ namespace ts { // annotation. const parameterName = (parameter.name).text; - const docComment = parameter.parent.jsDocComment; - if (docComment) { - return forEach(docComment.tags, t => { - if (t.kind === SyntaxKind.JSDocParameterTag) { - const parameterTag = t; + const jsDocComment = getJSDocComment(parameter.parent, /*checkParentVariableStatement*/ true); + if (jsDocComment) { + for (const tag of jsDocComment.tags) { + if (tag.kind === SyntaxKind.JSDocParameterTag) { + const parameterTag = tag; const name = parameterTag.preParameterName || parameterTag.postParameterName; if (name.text === parameterName) { - return t; + return parameterTag; } } - }); + } } } + + return undefined; } export function hasRestParameter(s: SignatureDeclaration): boolean { diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 8cd1bca876e..3018f08abe5 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -571,6 +571,31 @@ namespace FourSlash { } } + public verifyCompletionListStartsWithItemsInOrder(items: string[]): void { + if (items.length === 0) { + return; + } + + const entries = this.getCompletionListAtCaret().entries; + assert.isTrue(items.length <= entries.length, `Amount of expected items in completion list [ ${items.length} ] is greater than actual number of items in list [ ${entries.length} ]`); + for (let i = 0; i < items.length; i++) { + assert.equal(entries[i].name, items[i], `Unexpected item in completion list`); + } + } + + public noItemsWithSameNameButDifferentKind(): void { + const completions = this.getCompletionListAtCaret(); + const uniqueItems: ts.Map = {}; + for (const item of completions.entries) { + if (!ts.hasProperty(uniqueItems, item.name)) { + uniqueItems[item.name] = item.kind; + } + else { + assert.equal(item.kind, uniqueItems[item.name], `Items should have the same kind, got ${item.kind} and ${uniqueItems[item.name]}`); + } + } + } + public verifyMemberListIsEmpty(negative: boolean) { const members = this.getMemberListAtCaret(); if ((!members || members.entries.length === 0) && negative) { diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 7fd81973172..329834cb15d 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -1593,7 +1593,7 @@ namespace Harness { return { unitName: libFile, content: io.readFile(libFile) }; } - if (Error) (Error).stackTraceLimit = 1; + if (Error) (Error).stackTraceLimit = 25; } // TODO: not sure why Utils.evalFile isn't working with this, eventually will concat it like old compiler instead of eval diff --git a/src/server/server.ts b/src/server/server.ts index d9f078ac0eb..5c2fd7d1c43 100644 --- a/src/server/server.ts +++ b/src/server/server.ts @@ -7,12 +7,58 @@ namespace ts.server { const readline: NodeJS.ReadLine = require("readline"); const fs: typeof NodeJS.fs = require("fs"); + // TODO: "net" module not defined in local node.d.ts + const net: any = require("net"); + const rl = readline.createInterface({ input: process.stdin, output: process.stdout, terminal: false, }); + // Need to write directly to stdout, else rl.write also causes an input "line" event + // See https://github.com/joyent/node/issues/4243 + let writeHost = (data: string) => process.stdout.write(data); + + // Stubs for I/O + const onInput = (input: string) => { return; }; + const onClose = () => { return; }; + + // Use a socket for comms if defined + const tss_debug: string = process.env["TSS_DEBUG"]; + let tcp_port = 0; + if (tss_debug) { + tss_debug.split(" ").forEach( param => { + if (param.indexOf("port=") === 0) { + tcp_port = parseInt(param.substring(5)); + } + }); + if (tcp_port) { + net.createServer( (socket: any) => { + // Called once a connection is made + socket.setEncoding("utf8"); + // Wire up the I/O handers to the socket + writeHost = (data: string) => { + socket.write(data); + return true; + }; + socket.on("data", (data: string) => { + // May get multiple requests in one network read + if (data) { + data.trim().split(/(\r\n)|\n/).forEach(line => onInput(line)); + } + }); + socket.on("end", onClose); + + }).listen(tcp_port); + } + } + if (!tcp_port) { + // If not using tcp, wire up the I/O handler to stdin/stdout + rl.on("line", (input: string) => onInput(input)); + rl.on("close", () => onClose()); + } + class Logger implements ts.server.Logger { fd = -1; seq = 0; diff --git a/src/server/session.ts b/src/server/session.ts index 9b9bf35a4a5..c1bafdf5ba8 100644 --- a/src/server/session.ts +++ b/src/server/session.ts @@ -792,7 +792,9 @@ namespace ts.server { } private closeClientFile(fileName: string) { - if (!fileName) { return; } + if (!fileName) { + return; + } const file = ts.normalizePath(fileName); this.projectService.closeClientFile(file); } diff --git a/src/services/services.ts b/src/services/services.ts index 0fd4df19907..c199c39d808 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -2185,7 +2185,6 @@ namespace ts { } return true; } - return false; } @@ -2368,6 +2367,7 @@ namespace ts { // skip open bracket token = scanner.scan(); + let i = 0; // scan until ']' or EOF while (token !== SyntaxKind.CloseBracketToken && token !== SyntaxKind.EndOfFileToken) { diff --git a/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt b/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt index 6e55ff30f04..d98a1e7e7bb 100644 --- a/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt +++ b/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt @@ -1,14 +1,11 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. -tests/cases/compiler/a.js(3,6): error TS1223: 'type' tag already specified. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. -==== tests/cases/compiler/a.js (1 errors) ==== +==== tests/cases/compiler/a.js (0 errors) ==== /** * @type {number} * @type {string} - ~~~~ -!!! error TS1223: 'type' tag already specified. */ var v; \ No newline at end of file diff --git a/tests/cases/fourslash/completionInJsDoc.ts b/tests/cases/fourslash/completionInJsDoc.ts index 80516303856..e5cc7a3d2b6 100644 --- a/tests/cases/fourslash/completionInJsDoc.ts +++ b/tests/cases/fourslash/completionInJsDoc.ts @@ -23,11 +23,8 @@ ////// @pa/*7*/ ////var v7; //// -/////** @param { n/*8*/ } */ +/////** @return { n/*8*/ } */ ////var v8; -//// -/////** @return { n/*9*/ } */ -////var v9; goTo.marker('1'); verify.completionListContains("constructor"); @@ -57,6 +54,3 @@ verify.completionListIsEmpty(); goTo.marker('8'); verify.completionListContains('number'); -goTo.marker('9'); -verify.completionListContains('number'); - diff --git a/tests/cases/fourslash/getJavaScriptCompletions1.ts b/tests/cases/fourslash/getJavaScriptCompletions1.ts new file mode 100644 index 00000000000..6d8f36aac1b --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptCompletions1.ts @@ -0,0 +1,10 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: Foo.js +/////** @type {number} */ +////var v; +////v./**/ + +goTo.marker(); +verify.completionListContains("toExponential", /*displayText:*/ undefined, /*documentation*/ undefined, "method"); diff --git a/tests/cases/fourslash/getJavaScriptCompletions10.ts b/tests/cases/fourslash/getJavaScriptCompletions10.ts new file mode 100644 index 00000000000..5fbd91e8988 --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptCompletions10.ts @@ -0,0 +1,11 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: Foo.js +/////** +//// * @type {function(this:number)} +//// */ +////function f() { this./**/ } + +goTo.marker(); +verify.completionListContains("toExponential", /*displayText:*/ undefined, /*documentation*/ undefined, "method"); \ No newline at end of file diff --git a/tests/cases/fourslash/getJavaScriptCompletions11.ts b/tests/cases/fourslash/getJavaScriptCompletions11.ts new file mode 100644 index 00000000000..f12f53fa960 --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptCompletions11.ts @@ -0,0 +1,11 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: Foo.js +/////** @type {number|string} */ +////var v; +////v./**/ + +goTo.marker(); +verify.completionListContains("toExponential", /*displayText:*/ undefined, /*documentation*/ undefined, "method"); +verify.completionListContains("charCodeAt", /*displayText:*/ undefined, /*documentation*/ undefined, "method"); \ No newline at end of file diff --git a/tests/cases/fourslash/getJavaScriptCompletions12.ts b/tests/cases/fourslash/getJavaScriptCompletions12.ts new file mode 100644 index 00000000000..99b14828854 --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptCompletions12.ts @@ -0,0 +1,36 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: Foo.js +/////** +//// * @param {number} input +//// * @param {string} currency +//// * @returns {number} +//// */ +////var convert = function(input, currency) { +//// switch(currency./*1*/) { +//// case "USD": +//// input./*2*/; +//// case "EUR": +//// return "" + rateToUsd.EUR; +//// case "CNY": +//// return {} + rateToUsd.CNY; +//// } +////} +////convert(1, "")./*3*/ +/////** +//// * @param {number} x +//// */ +////var test1 = function(x) { return x./*4*/ }, test2 = function(a) { return a./*5*/ }; + + +goTo.marker("1"); +verify.completionListContains("charCodeAt", /*displayText:*/ undefined, /*documentation*/ undefined, "method"); +goTo.marker("2"); +verify.completionListContains("toExponential", /*displayText:*/ undefined, /*documentation*/ undefined, "method"); +goTo.marker("3"); +verify.completionListContains("toExponential", /*displayText:*/ undefined, /*documentation*/ undefined, "method"); +goTo.marker("4"); +verify.completionListContains("toExponential", /*displayText:*/ undefined, /*documentation*/ undefined, "method"); +goTo.marker("5"); +verify.completionListContains("test1", /*displayText:*/ undefined, /*documentation*/ undefined, "warning"); \ No newline at end of file diff --git a/tests/cases/fourslash/getJavaScriptCompletions13.ts b/tests/cases/fourslash/getJavaScriptCompletions13.ts new file mode 100644 index 00000000000..438c73e304c --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptCompletions13.ts @@ -0,0 +1,26 @@ +/// +// @allowNonTsExtensions: true + +// @Filename: file1.js + +////var file1Identifier = 1; +////interface Foo { FooProp: number }; + +// @Filename: file2.js + +////var file2Identifier1 = 2; +////var file2Identifier2 = 2; +/////*1*/ +////file2Identifier2./*2*/ + +goTo.marker("1"); +verify.completionListContains("file2Identifier1"); +verify.completionListContains("file2Identifier2"); +verify.completionListContains("file1Identifier"); +verify.not.completionListContains("FooProp"); + +goTo.marker("2"); +verify.completionListContains("file2Identifier1"); +verify.completionListContains("file2Identifier2"); +verify.not.completionListContains("file1Identifier") +verify.not.completionListContains("FooProp"); \ No newline at end of file diff --git a/tests/cases/fourslash/getJavaScriptCompletions14.ts b/tests/cases/fourslash/getJavaScriptCompletions14.ts new file mode 100644 index 00000000000..52a23065a5e --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptCompletions14.ts @@ -0,0 +1,13 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: file1.js +/////// +////interface Number { +//// toExponential(fractionDigits?: number): string; +////} +////var x = 1; +////x./*1*/ + +goTo.marker("1"); +verify.completionListContains("toExponential", /*displayText:*/ undefined, /*documentation*/ undefined, "method"); diff --git a/tests/cases/fourslash/getJavaScriptCompletions15.ts b/tests/cases/fourslash/getJavaScriptCompletions15.ts new file mode 100644 index 00000000000..fbcbc2d4692 --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptCompletions15.ts @@ -0,0 +1,29 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: refFile1.ts +//// export var V = 1; + +// @Filename: refFile2.ts +//// export var V = "123" + +// @Filename: refFile3.ts +//// export var V = "123" + +// @Filename: main.js +//// import ref1 = require("refFile1"); +//// var ref2 = require("refFile2"); +//// ref1.V./*1*/; +//// ref2.V./*2*/; +//// var v = { x: require("refFile3") }; +//// v.x./*3*/; +//// v.x.V./*4*/; + +goTo.marker("1"); +verify.completionListContains("toExponential"); +goTo.marker("2"); +verify.completionListContains("toLowerCase"); +goTo.marker("3"); +verify.completionListContains("V"); +goTo.marker("4"); +verify.completionListContains("toLowerCase"); diff --git a/tests/cases/fourslash/getJavaScriptCompletions2.ts b/tests/cases/fourslash/getJavaScriptCompletions2.ts new file mode 100644 index 00000000000..0cb2de046a6 --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptCompletions2.ts @@ -0,0 +1,10 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: Foo.js +/////** @type {(number|string)} */ +////var v; +////v./**/ + +goTo.marker(); +verify.completionListContains("valueOf", /*displayText:*/ undefined, /*documentation*/ undefined, "method"); \ No newline at end of file diff --git a/tests/cases/fourslash/getJavaScriptCompletions3.ts b/tests/cases/fourslash/getJavaScriptCompletions3.ts new file mode 100644 index 00000000000..13a6f1673e6 --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptCompletions3.ts @@ -0,0 +1,10 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: Foo.js +/////** @type {Array.} */ +////var v; +////v./**/ + +goTo.marker(); +verify.completionListContains("concat", /*displayText:*/ undefined, /*documentation*/ undefined, "method"); \ No newline at end of file diff --git a/tests/cases/fourslash/getJavaScriptCompletions4.ts b/tests/cases/fourslash/getJavaScriptCompletions4.ts new file mode 100644 index 00000000000..3719b8e1258 --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptCompletions4.ts @@ -0,0 +1,10 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: Foo.js +/////** @return {number} */ +////function foo(a,b) { } +////foo(1,2)./**/ + +goTo.marker(); +verify.completionListContains("toExponential", /*displayText:*/ undefined, /*documentation*/ undefined, "method"); \ No newline at end of file diff --git a/tests/cases/fourslash/getJavaScriptCompletions5.ts b/tests/cases/fourslash/getJavaScriptCompletions5.ts new file mode 100644 index 00000000000..348feef94c3 --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptCompletions5.ts @@ -0,0 +1,15 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: Foo.js +//// /** +//// * @template T +//// * @param {T} a +//// * @return {T} */ +//// function foo(a) { } +//// let x = /*1*/foo; +//// foo(1)./**/ + +goTo.marker('1'); +goTo.marker(); +verify.completionListContains("toExponential", /*displayText:*/ undefined, /*documentation*/ undefined, "method"); diff --git a/tests/cases/fourslash/getJavaScriptCompletions6.ts b/tests/cases/fourslash/getJavaScriptCompletions6.ts new file mode 100644 index 00000000000..9f9a42b5762 --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptCompletions6.ts @@ -0,0 +1,13 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: Foo.js +/////** +//// * @param {...number} a +//// */ +////function foo(a) { +//// a./**/ +////} + +goTo.marker(); +verify.completionListContains("concat", /*displayText:*/ undefined, /*documentation*/ undefined, "method"); \ No newline at end of file diff --git a/tests/cases/fourslash/getJavaScriptCompletions7.ts b/tests/cases/fourslash/getJavaScriptCompletions7.ts new file mode 100644 index 00000000000..d8b01cfb757 --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptCompletions7.ts @@ -0,0 +1,13 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: Foo.js +/////** +//// * @param {...number} a +//// */ +////function foo(a) { +//// a[0]./**/ +////} + +goTo.marker(); +verify.completionListContains("toExponential", /*displayText:*/ undefined, /*documentation*/ undefined, "method"); \ No newline at end of file diff --git a/tests/cases/fourslash/getJavaScriptCompletions8.ts b/tests/cases/fourslash/getJavaScriptCompletions8.ts new file mode 100644 index 00000000000..418aae676be --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptCompletions8.ts @@ -0,0 +1,12 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: Foo.js +/////** +//// * @type {function(): number} +//// */ +////var v; +////v()./**/ + +goTo.marker(); +verify.completionListContains("toExponential", /*displayText:*/ undefined, /*documentation*/ undefined, "method"); \ No newline at end of file diff --git a/tests/cases/fourslash/getJavaScriptCompletions9.ts b/tests/cases/fourslash/getJavaScriptCompletions9.ts new file mode 100644 index 00000000000..1619a2ca9fc --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptCompletions9.ts @@ -0,0 +1,12 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: Foo.js +/////** +//// * @type {function(new:number)} +//// */ +////var v; +////new v()./**/ + +goTo.marker(); +verify.completionListContains("toExponential", /*displayText:*/ undefined, /*documentation*/ undefined, "method"); \ No newline at end of file diff --git a/tests/cases/fourslash/getJavaScriptQuickInfo1.ts b/tests/cases/fourslash/getJavaScriptQuickInfo1.ts new file mode 100644 index 00000000000..71072f1699a --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptQuickInfo1.ts @@ -0,0 +1,9 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: Foo.js +/////** @type {function(new:string,number)} */ +////var /**/v; + +goTo.marker(); +verify.quickInfoIs('var v: new (p1: number) => string'); \ No newline at end of file diff --git a/tests/cases/fourslash/getJavaScriptQuickInfo2.ts b/tests/cases/fourslash/getJavaScriptQuickInfo2.ts new file mode 100644 index 00000000000..ce347a62b27 --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptQuickInfo2.ts @@ -0,0 +1,9 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: Foo.js +/////** @param {number} [a] */ +////function /**/f(a) { } + +goTo.marker(); +verify.quickInfoIs('function f(a?: number): void'); \ No newline at end of file diff --git a/tests/cases/fourslash/getJavaScriptQuickInfo3.ts b/tests/cases/fourslash/getJavaScriptQuickInfo3.ts new file mode 100644 index 00000000000..2e094bd21f6 --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptQuickInfo3.ts @@ -0,0 +1,9 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: Foo.js +/////** @param {number[]} [a] */ +////function /**/f(a) { } + +goTo.marker(); +verify.quickInfoIs('function f(a?: number[]): void'); \ No newline at end of file diff --git a/tests/cases/fourslash/getJavaScriptQuickInfo4.ts b/tests/cases/fourslash/getJavaScriptQuickInfo4.ts new file mode 100644 index 00000000000..34ee10d97b7 --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptQuickInfo4.ts @@ -0,0 +1,9 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: Foo.js +/////** @param {[number,string]} [a] */ +////function /**/f(a) { } + +goTo.marker(); +verify.quickInfoIs('function f(a?: [number, string]): void'); \ No newline at end of file diff --git a/tests/cases/fourslash/getJavaScriptQuickInfo5.ts b/tests/cases/fourslash/getJavaScriptQuickInfo5.ts new file mode 100644 index 00000000000..004af0811b7 --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptQuickInfo5.ts @@ -0,0 +1,9 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: Foo.js +/////** @param {{b:number}} [a] */ +////function /**/f(a) { } + +goTo.marker(); +verify.quickInfoIs('function f(a?: {\n b: number;\n}): void'); \ No newline at end of file diff --git a/tests/cases/fourslash/getJavaScriptQuickInfo6.ts b/tests/cases/fourslash/getJavaScriptQuickInfo6.ts new file mode 100644 index 00000000000..3aebd19deda --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptQuickInfo6.ts @@ -0,0 +1,9 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: Foo.js +/////** @type {function(this:number)} */ +////function f() { /**/this } + +goTo.marker(); +verify.quickInfoIs('number'); \ No newline at end of file diff --git a/tests/cases/fourslash/getJavaScriptQuickInfo7.ts b/tests/cases/fourslash/getJavaScriptQuickInfo7.ts new file mode 100644 index 00000000000..282f5aeabfd --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptQuickInfo7.ts @@ -0,0 +1,10 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: Foo.js +//// function f(a,b) { } +//// /** @type {f} */ +//// var v/**/ + +goTo.marker(); +verify.quickInfoIs('var v: (a: any, b: any) => void'); \ No newline at end of file diff --git a/tests/cases/fourslash/javaScriptModulesError1.ts b/tests/cases/fourslash/javaScriptModulesError1.ts new file mode 100644 index 00000000000..f13b25a182e --- /dev/null +++ b/tests/cases/fourslash/javaScriptModulesError1.ts @@ -0,0 +1,12 @@ +/// + +// Error: Having more function parameters than entries in the dependency array + +// @allowNonTsExtensions: true +// @Filename: Foo.js +//// define('mod1', ['a'], /**/function(a, b) { +//// +//// }); + +// TODO: what should happen? +goTo.marker(); \ No newline at end of file diff --git a/tests/cases/unittests/jsDocParsing.ts b/tests/cases/unittests/jsDocParsing.ts index ebba6e8a1a6..9988383b467 100644 --- a/tests/cases/unittests/jsDocParsing.ts +++ b/tests/cases/unittests/jsDocParsing.ts @@ -1,4 +1,5 @@ /// +/// /// /// @@ -985,15 +986,29 @@ module ts { describe("DocComments", () => { function parsesCorrectly(content: string, expected: string) { let comment = parseIsolatedJSDocComment(content); - Debug.assert(comment && comment.diagnostics.length === 0); + if (!comment) { + Debug.fail('Comment failed to parse entirely'); + } + if (comment.diagnostics.length > 0) { + Debug.fail('Comment has at least one diagnostic: ' + comment.diagnostics[0].messageText); + } let result = JSON.stringify(comment.jsDocComment, (k, v) => { return v && v.pos !== undefined ? JSON.parse(Utils.sourceFileToJSON(v)) : v; - }, " "); + }, 4); - assert.equal(result, expected); + if (result !== expected) { + // Turn on a human-readable diff + if (typeof require !== 'undefined') { + require('chai').config.showDiff = true; + chai.expect(JSON.parse(result)).equal(JSON.parse(expected)); + } + else { + assert.equal(result, expected); + } + } } function parsesIncorrectly(content: string) { @@ -1577,7 +1592,7 @@ module ts { "0": { "kind": "JSDocParameterTag", "pos": 8, - "end": 30, + "end": 31, "atToken": { "kind": "AtToken", "pos": 8, @@ -1609,7 +1624,7 @@ module ts { }, "length": 1, "pos": 8, - "end": 30 + "end": 31 } }`); }); @@ -1627,7 +1642,7 @@ module ts { "0": { "kind": "JSDocParameterTag", "pos": 8, - "end": 31, + "end": 36, "atToken": { "kind": "AtToken", "pos": 8, @@ -1659,7 +1674,7 @@ module ts { }, "length": 1, "pos": 8, - "end": 31 + "end": 36 } }`); }); @@ -2113,7 +2128,7 @@ module ts { "0": { "kind": "JSDocTemplateTag", "pos": 8, - "end": 24, + "end": 23, "atToken": { "kind": "AtToken", "pos": 8, @@ -2150,12 +2165,12 @@ module ts { }, "length": 2, "pos": 17, - "end": 24 + "end": 23 } }, "length": 1, "pos": 8, - "end": 24 + "end": 23 } }`); }); From cf8daffea1083c0fcf41ace28fb69e1a97e8f976 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Wed, 6 Jan 2016 13:21:03 -0800 Subject: [PATCH 101/209] Properly cache JSX element types for SFC expressions --- src/compiler/checker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index a5b96c4a9a8..9b56824ec15 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -8264,7 +8264,7 @@ namespace ts { if (intrinsicAttributes !== unknownType) { paramType = intersectTypes(intrinsicAttributes, paramType); } - return paramType; + return links.resolvedJsxType = paramType; } } From 68f11b44fa3e573d1d33456789b5e138103c8e38 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Wed, 6 Jan 2016 14:20:04 -0800 Subject: [PATCH 102/209] Remove unrelated changes --- src/compiler/checker.ts | 57 ++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 26 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index a8e2d2b4055..03a57bee468 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -164,6 +164,8 @@ namespace ts { let getGlobalPromiseConstructorLikeType: () => ObjectType; let getGlobalThenableType: () => ObjectType; + let jsxElementClassType: Type; + let deferredNodes: Node[]; const tupleTypes: Map = {}; @@ -7502,6 +7504,7 @@ namespace ts { if (isContextSensitive(func)) { const contextualSignature = getContextualSignature(func); if (contextualSignature) { + const funcHasRestParameters = hasRestParameter(func); const len = func.parameters.length - (funcHasRestParameters ? 1 : 0); const indexOfParameter = indexOf(func.parameters, parameter); @@ -8605,7 +8608,10 @@ namespace ts { } function getJsxGlobalElementClassType(): Type { - return getExportedTypeFromNamespace(JsxNames.JSX, JsxNames.ElementClass); + if (!jsxElementClassType) { + jsxElementClassType = getExportedTypeFromNamespace(JsxNames.JSX, JsxNames.ElementClass); + } + return jsxElementClassType; } /// Returns all the properties of the Jsx.IntrinsicElements interface @@ -9407,33 +9413,32 @@ namespace ts { */ function getEffectiveDecoratorFirstArgumentType(node: Node): Type { // The first argument to a decorator is its `target`. - switch (node.kind) { - case SyntaxKind.ClassDeclaration: - case SyntaxKind.ClassExpression: - // For a class decorator, the `target` is the type of the class (e.g. the - // "static" or "constructor" side of the class) + if (node.kind === SyntaxKind.ClassDeclaration) { + // For a class decorator, the `target` is the type of the class (e.g. the + // "static" or "constructor" side of the class) + const classSymbol = getSymbolOfNode(node); + return getTypeOfSymbol(classSymbol); + } + + if (node.kind === SyntaxKind.Parameter) { + // For a parameter decorator, the `target` is the parent type of the + // parameter's containing method. + node = node.parent; + if (node.kind === SyntaxKind.Constructor) { const classSymbol = getSymbolOfNode(node); return getTypeOfSymbol(classSymbol); + } + } - case SyntaxKind.Parameter: - // For a parameter decorator, the `target` is the parent type of the - // parameter's containing method. - node = node.parent; - if (node.kind === SyntaxKind.Constructor) { - const classSymbol = getSymbolOfNode(node); - return getTypeOfSymbol(classSymbol); - } - - // fall-through - case SyntaxKind.PropertyDeclaration: - case SyntaxKind.MethodDeclaration: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - // For a property or method decorator, the `target` is the - // "static"-side type of the parent of the member if the member is - // declared "static"; otherwise, it is the "instance"-side type of the - // parent of the member. - return getParentTypeOfClassElement(node); + if (node.kind === SyntaxKind.PropertyDeclaration || + node.kind === SyntaxKind.MethodDeclaration || + node.kind === SyntaxKind.GetAccessor || + node.kind === SyntaxKind.SetAccessor) { + // For a property or method decorator, the `target` is the + // "static"-side type of the parent of the member if the member is + // declared "static"; otherwise, it is the "instance"-side type of the + // parent of the member. + return getParentTypeOfClassElement(node); } Debug.fail("Unsupported decorator target."); @@ -10243,11 +10248,11 @@ namespace ts { } function getReturnTypeFromBody(func: FunctionLikeDeclaration, contextualMapper?: TypeMapper): Type { + const contextualSignature = getContextualSignatureForFunctionLikeDeclaration(func); if (!func.body) { return unknownType; } - const contextualSignature = getContextualSignatureForFunctionLikeDeclaration(func); const isAsync = isAsyncFunctionLike(func); let type: Type; if (func.body.kind !== SyntaxKind.Block) { From cdc33f51d2c79a655ed09769b357d1636637f29e Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Thu, 7 Jan 2016 13:30:54 -0800 Subject: [PATCH 103/209] Code review comments --- src/services/services.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/services/services.ts b/src/services/services.ts index f89ba4e94fa..0096838f314 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -5491,7 +5491,7 @@ namespace ts { } function isImportSpecifierSymbol(symbol: Symbol) { - return (symbol.flags & SymbolFlags.Alias) && forEach(symbol.declarations, declaration => declaration.kind === SyntaxKind.ImportSpecifier); + return (symbol.flags & SymbolFlags.Alias) && !!getDeclarationOfKind(symbol, SyntaxKind.ImportSpecifier); } function getInternedName(symbol: Symbol, location: Node, declarations: Declaration[]): string { @@ -5939,10 +5939,11 @@ namespace ts { result.push(typeChecker.getAliasedSymbol(symbol)); } - // For export specifiers, it can be a local symbol, e.g. + // For export specifiers, the exported name can be refering to a local symbol, e.g.: // import {a} from "mod"; // export {a as somethingElse} - // We want the local target of the export (i.e. the import symbol) and not the final target (i.e. "mod".a) + // We want the *local* declaration of 'a' as declared in the import, + // *not* as declared within "mod" (or farther) if (location.parent.kind === SyntaxKind.ExportSpecifier) { result.push(typeChecker.getExportSpecifierLocalTargetSymbol(location.parent)); } From 9b01783e2d6cf94ec0aa720b6e1ef6f03c59e1ba Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Thu, 7 Jan 2016 13:31:14 -0800 Subject: [PATCH 104/209] Add test for renaming accorss modules using export= --- .../fourslash/renameImportOfExportEquals.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/cases/fourslash/renameImportOfExportEquals.ts diff --git a/tests/cases/fourslash/renameImportOfExportEquals.ts b/tests/cases/fourslash/renameImportOfExportEquals.ts new file mode 100644 index 00000000000..9d71ee907c8 --- /dev/null +++ b/tests/cases/fourslash/renameImportOfExportEquals.ts @@ -0,0 +1,18 @@ +/// + +////declare namespace N { +//// export var x: number; +////} +////declare module "mod" { +//// export = N; +////} +////declare module "test" { +//// import * as [|N|] from "mod"; +//// export { [|N|] }; // Renaming N here would rename +////} + +let ranges = test.ranges() +for (let range of ranges) { + goTo.position(range.start); + verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false); +} From c006634cb74f674d5ad61aaf8ad6f7111224460b Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Thu, 7 Jan 2016 16:14:53 -0800 Subject: [PATCH 105/209] JSDoc identifiers must start with an identifier start --- src/compiler/scanner.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index d03ab77569c..96c59c8b1bd 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -1725,9 +1725,12 @@ namespace ts { else if (isWhiteSpace(ch)) { // Keep going } - else { + else if (isIdentifierStart(ch, ScriptTarget.Latest)) { identifierStarted = true; } + else { + return pos += 1, token = SyntaxKind.Unknown; + } } pos += 1; } From b1711e3633d9035e3737bec930e8a33ea6325466 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Thu, 7 Jan 2016 17:33:46 -0800 Subject: [PATCH 106/209] scanJsIdentifier -> parseJSDocIdentifier --- src/compiler/parser.ts | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 78a3b567ef3..e86e05068db 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -5999,12 +5999,11 @@ namespace ts { atToken.end = scanner.getTextPos(); nextJSDocToken(); - const tagName = scanJsDocIdentifier(); + const tagName = parseJSDocIdentifier(); if (!tagName) { return; } - nextJSDocToken(); const tag = handleTag(atToken, tagName) || handleUnknownTag(atToken, tagName); addTag(tag); } @@ -6063,8 +6062,7 @@ namespace ts { let isBracketed: boolean; // Looking for something like '[foo]' or 'foo' if (parseOptionalToken(SyntaxKind.OpenBracketToken)) { - name = scanJsDocIdentifier(); - nextJSDocToken(); + name = parseJSDocIdentifier(); isBracketed = true; // May have an optional default, e.g. '[foo = 42]' @@ -6075,8 +6073,7 @@ namespace ts { parseExpected(SyntaxKind.CloseBracketToken); } else if (token === SyntaxKind.Identifier) { - name = scanJsDocIdentifier(); - nextJSDocToken(); + name = parseJSDocIdentifier(); } if (!name) { @@ -6140,7 +6137,7 @@ namespace ts { typeParameters.pos = scanner.getStartPos(); while (true) { - const name = scanJsDocIdentifier(); + const name = parseJSDocIdentifier(); if (!name) { parseErrorAtPosition(scanner.getStartPos(), 0, Diagnostics.Identifier_expected); return undefined; @@ -6148,7 +6145,6 @@ namespace ts { const typeParameter = createNode(SyntaxKind.TypeParameter, name.pos); typeParameter.name = name; - nextJSDocToken(); finishNode(typeParameter); typeParameters.push(typeParameter); @@ -6174,7 +6170,7 @@ namespace ts { return token = scanner.scanJSDocToken(); } - function scanJsDocIdentifier(): Identifier { + function parseJSDocIdentifier(): Identifier { if (token !== SyntaxKind.Identifier) { parseErrorAtCurrentToken(Diagnostics.Identifier_expected); return undefined; @@ -6184,7 +6180,10 @@ namespace ts { const end = scanner.getTextPos(); const result = createNode(SyntaxKind.Identifier, pos); result.text = content.substring(pos, end); - return finishNode(result, end); + finishNode(result, end); + + nextJSDocToken(); + return result; } } } From 697644c583aec713927241f20d8fda17a2aefaa8 Mon Sep 17 00:00:00 2001 From: Zhengbo Li Date: Thu, 7 Jan 2016 22:48:17 -0800 Subject: [PATCH 107/209] spell our dir to directory --- src/compiler/sys.ts | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index a9056756f01..a99f491175c 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -2,7 +2,7 @@ namespace ts { export type FileWatcherCallback = (path: string, removed?: boolean) => void; - export type DirWatcherCallback = (path: string) => void; + export type DirectoryWatcherCallback = (path: string) => void; export interface System { args: string[]; @@ -12,7 +12,7 @@ namespace ts { readFile(path: string, encoding?: string): string; writeFile(path: string, data: string, writeByteOrderMark?: boolean): void; watchFile?(path: string, callback: FileWatcherCallback): FileWatcher; - watchDirectory?(path: string, callback: DirWatcherCallback, recursive?: boolean): FileWatcher; + watchDirectory?(path: string, callback: DirectoryWatcherCallback, recursive?: boolean): FileWatcher; resolvePath(path: string): string; fileExists(path: string): boolean; directoryExists(path: string): boolean; @@ -34,7 +34,7 @@ namespace ts { close(): void; } - export interface DirWatcher extends FileWatcher { + export interface DirectoryWatcher extends FileWatcher { referenceCount: number; } @@ -70,7 +70,7 @@ namespace ts { writeFile(path: string, contents: string): void; readDirectory(path: string, extension?: string, exclude?: string[]): string[]; watchFile?(path: string, callback: FileWatcherCallback): FileWatcher; - watchDirectory?(path: string, callback: DirWatcherCallback, recursive?: boolean): FileWatcher; + watchDirectory?(path: string, callback: DirectoryWatcherCallback, recursive?: boolean): FileWatcher; }; export var sys: System = (function () { @@ -305,16 +305,16 @@ namespace ts { } function createWatchedFileSet() { - const dirWatchers = createFileMap(); - const recursiveDirWatchers = createFileMap(); + const dirWatchers = createFileMap(); + const recursiveDirWatchers = createFileMap(); // One file can have multiple watchers const fileWatcherCallbacks = createFileMap(); - const dirWatcherCallbacks = createFileMap(); + const dirWatcherCallbacks = createFileMap(); const currentDirectory = process.cwd(); return { addFile, removeFile, addDir }; - function addDir(dirName: string, callback: DirWatcherCallback, recursive?: boolean) { + function addDir(dirName: string, callback: DirectoryWatcherCallback, recursive?: boolean) { const dirPath = toPath(dirName, currentDirectory, getCanonicalPath); if (!dirWatcherCallbacks.contains(dirPath)) { dirWatcherCallbacks.set(dirPath, [callback]); @@ -328,7 +328,7 @@ namespace ts { }; } - function reduceDirWatcherRefCount(watcher: DirWatcher, dirPath: Path, isRecursive: boolean) { + function reduceDirWatcherRefCount(watcher: DirectoryWatcher, dirPath: Path, isRecursive: boolean) { watcher.referenceCount -= 1; if (watcher.referenceCount <= 0) { watcher.close(); @@ -341,8 +341,8 @@ namespace ts { } } - function addDirWatcher(dirPath: Path, recursive?: boolean): { watcher: DirWatcher, isRecursive: boolean } { - let watchers: FileMap; + function addDirWatcher(dirPath: Path, recursive?: boolean): { watcher: DirectoryWatcher, isRecursive: boolean } { + let watchers: FileMap; const options: { persistent: boolean, recursive?: boolean } = { persistent: true }; // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows @@ -367,14 +367,14 @@ namespace ts { options.recursive = false; } - const watcher: DirWatcher = _fs.watch(dirPath, options, (eventName: string, relativeFileName: string) => fileEventHandler(eventName, relativeFileName, dirPath)); + const watcher: DirectoryWatcher = _fs.watch(dirPath, options, (eventName: string, relativeFileName: string) => fileEventHandler(eventName, relativeFileName, dirPath)); watcher.referenceCount = 1; watchers.set(dirPath, watcher); return { watcher, isRecursive: options.recursive }; } - function findDirWatcherForFile(filePath: Path): { watcher: DirWatcher, watcherPath: Path, isRecursive: boolean } { - let watcher: DirWatcher; + function findDirWatcherForFile(filePath: Path): { watcher: DirectoryWatcher, watcherPath: Path, isRecursive: boolean } { + let watcher: DirectoryWatcher; let watcherPath: Path; let isRecursive = false; recursiveDirWatchers.forEachValue(dirPath => { From 6dfe29ec31e6004dbdaf17fa24e6f4ef9536e4ac Mon Sep 17 00:00:00 2001 From: Kanchalai Tanglertsampan Date: Fri, 8 Jan 2016 03:34:43 -0800 Subject: [PATCH 108/209] Add tests --- ...documentHighlightAtInheritedProperties5.ts | 30 +++++++++++++++++++ ...documentHighlightAtInheritedProperties6.ts | 30 +++++++++++++++++++ .../findAllRefsInheritedProperties4.ts | 30 +++++++++++++++++++ .../findAllRefsInheritedProperties5.ts | 30 +++++++++++++++++++ .../referencesForInheritedProperties8.ts | 27 +++++++++++++++++ .../referencesForInheritedProperties9.ts | 21 +++++++++++++ .../fourslash/renameInheritedProperties1.ts | 4 +-- .../fourslash/renameInheritedProperties5.ts | 17 +++++++++++ .../fourslash/renameInheritedProperties6.ts | 17 +++++++++++ .../fourslash/renameInheritedProperties7.ts | 19 ++++++++++++ .../fourslash/renameInheritedProperties8.ts | 19 ++++++++++++ 11 files changed, 242 insertions(+), 2 deletions(-) create mode 100644 tests/cases/fourslash/documentHighlightAtInheritedProperties5.ts create mode 100644 tests/cases/fourslash/documentHighlightAtInheritedProperties6.ts create mode 100644 tests/cases/fourslash/findAllRefsInheritedProperties4.ts create mode 100644 tests/cases/fourslash/findAllRefsInheritedProperties5.ts create mode 100644 tests/cases/fourslash/referencesForInheritedProperties8.ts create mode 100644 tests/cases/fourslash/referencesForInheritedProperties9.ts create mode 100644 tests/cases/fourslash/renameInheritedProperties5.ts create mode 100644 tests/cases/fourslash/renameInheritedProperties6.ts create mode 100644 tests/cases/fourslash/renameInheritedProperties7.ts create mode 100644 tests/cases/fourslash/renameInheritedProperties8.ts diff --git a/tests/cases/fourslash/documentHighlightAtInheritedProperties5.ts b/tests/cases/fourslash/documentHighlightAtInheritedProperties5.ts new file mode 100644 index 00000000000..b5f4cbb00a7 --- /dev/null +++ b/tests/cases/fourslash/documentHighlightAtInheritedProperties5.ts @@ -0,0 +1,30 @@ +/// + +// @Filename: file1.ts +//// interface C extends D { +//// /*0*/prop0: string; +//// /*1*/prop1: number; +//// } +//// +//// interface D extends C { +//// /*2*/prop0: string; +//// /*3*/prop1: number; +//// } +//// +//// var d: D; +//// d./*4*/prop1; + +goTo.marker("0"); +verify.documentHighlightsAtPositionCount(2, ["file1.ts"]); + +goTo.marker("1"); +verify.documentHighlightsAtPositionCount(3, ["file1.ts"]); + +goTo.marker("2"); +verify.documentHighlightsAtPositionCount(2, ["file1.ts"]); + +goTo.marker("3"); +verify.documentHighlightsAtPositionCount(3, ["file1.ts"]); + +goTo.marker("4"); +verify.documentHighlightsAtPositionCount(3, ["file1.ts"]); \ No newline at end of file diff --git a/tests/cases/fourslash/documentHighlightAtInheritedProperties6.ts b/tests/cases/fourslash/documentHighlightAtInheritedProperties6.ts new file mode 100644 index 00000000000..8f1089e567d --- /dev/null +++ b/tests/cases/fourslash/documentHighlightAtInheritedProperties6.ts @@ -0,0 +1,30 @@ +/// + +// @Filename: file1.ts +//// class C extends D { +//// /*0*/prop0: string; +//// /*1*/prop1: string; +//// } +//// +//// class D extends C { +//// /*2*/prop0: string; +//// /*3*/prop1: string; +//// } +//// +//// var d: D; +//// d./*4*/prop1; + +goTo.marker("0"); +verify.documentHighlightsAtPositionCount(1, ["file1.ts"]); + +goTo.marker("1"); +verify.documentHighlightsAtPositionCount(1, ["file1.ts"]); + +goTo.marker("2"); +verify.documentHighlightsAtPositionCount(1, ["file1.ts"]); + +goTo.marker("3"); +verify.documentHighlightsAtPositionCount(2, ["file1.ts"]); + +goTo.marker("4"); +verify.documentHighlightsAtPositionCount(2, ["file1.ts"]); \ No newline at end of file diff --git a/tests/cases/fourslash/findAllRefsInheritedProperties4.ts b/tests/cases/fourslash/findAllRefsInheritedProperties4.ts new file mode 100644 index 00000000000..bcd41331f73 --- /dev/null +++ b/tests/cases/fourslash/findAllRefsInheritedProperties4.ts @@ -0,0 +1,30 @@ +/// + +//// interface C extends D { +//// [|prop0|]: string; // r0 +//// [|prop1|]: number; // r1 +//// } +//// +//// interface D extends C { +//// [|prop0|]: string; // r2 +//// } +//// +//// var d: D; +//// d.[|prop0|]; // r3 +//// d.[|prop1|]; // r4 + +function verifyReferences(query: FourSlashInterface.Range, references: FourSlashInterface.Range[]) { + goTo.position(query.start); + for (const ref of references) { + verify.referencesAtPositionContains(ref); + } +} + +const ranges = test.ranges(); +verify.assertHasRanges(ranges); +const [r0, r1, r2, r3, r4] = ranges; +verifyReferences(r0, [r0, r2, r3]); +verifyReferences(r1, [r1]); +verifyReferences(r2, [r0, r2, r3]); +verifyReferences(r3, [r0, r2, r3]); +verifyReferences(r4, []); \ No newline at end of file diff --git a/tests/cases/fourslash/findAllRefsInheritedProperties5.ts b/tests/cases/fourslash/findAllRefsInheritedProperties5.ts new file mode 100644 index 00000000000..d4e02a36b09 --- /dev/null +++ b/tests/cases/fourslash/findAllRefsInheritedProperties5.ts @@ -0,0 +1,30 @@ +/// + +//// class C extends D { +//// [|prop0|]: string; // r0 +//// [|prop1|]: number; // r1 +//// } +//// +//// class D extends C { +//// [|prop0|]: string; // r2 +//// } +//// +//// var d: D; +//// d.[|prop0|]; // r3 +//// d.[|prop1|]; // r4 + +function verifyReferences(query: FourSlashInterface.Range, references: FourSlashInterface.Range[]) { + goTo.position(query.start); + for (const ref of references) { + verify.referencesAtPositionContains(ref); + } +} + +const ranges = test.ranges(); +verify.assertHasRanges(ranges); +const [r0, r1, r2, r3, r4] = ranges; +verifyReferences(r0, [r0]); +verifyReferences(r1, [r1]); +verifyReferences(r2, [r2, r3]); +verifyReferences(r3, [r2, r3]); +verifyReferences(r4, []); diff --git a/tests/cases/fourslash/referencesForInheritedProperties8.ts b/tests/cases/fourslash/referencesForInheritedProperties8.ts new file mode 100644 index 00000000000..f34b327a472 --- /dev/null +++ b/tests/cases/fourslash/referencesForInheritedProperties8.ts @@ -0,0 +1,27 @@ +/// + +//// interface C extends D { +//// /*0*/propD: number; +//// } +//// interface D extends C { +//// /*1*/propD: string; +//// /*3*/propC: number; +//// } +//// var d: D; +//// d./*2*/propD; +//// d./*4*/propC; + +goTo.marker("0"); +verify.referencesCountIs(3); + +goTo.marker("1"); +verify.referencesCountIs(3); + +goTo.marker("2"); +verify.referencesCountIs(3); + +goTo.marker("3"); +verify.referencesCountIs(2); + +goTo.marker("4"); +verify.referencesCountIs(2); \ No newline at end of file diff --git a/tests/cases/fourslash/referencesForInheritedProperties9.ts b/tests/cases/fourslash/referencesForInheritedProperties9.ts new file mode 100644 index 00000000000..b348d6e8cf6 --- /dev/null +++ b/tests/cases/fourslash/referencesForInheritedProperties9.ts @@ -0,0 +1,21 @@ +/// + +//// class D extends C { +//// /*0*/prop1: string; +//// } +//// +//// class C extends D { +//// /*1*/prop1: string; +//// } +//// +//// var c: C; +//// c./*2*/prop1; + +goTo.marker("0"); +verify.referencesCountIs(1); + +goTo.marker("1"); +verify.referencesCountIs(2) + +goTo.marker("2"); +verify.referencesCountIs(2) \ No newline at end of file diff --git a/tests/cases/fourslash/renameInheritedProperties1.ts b/tests/cases/fourslash/renameInheritedProperties1.ts index f0b2acf3b14..4698fe3d97b 100644 --- a/tests/cases/fourslash/renameInheritedProperties1.ts +++ b/tests/cases/fourslash/renameInheritedProperties1.ts @@ -7,9 +7,9 @@ //// var v: class1; //// v.[|propName|]; -let ranges = test.ranges(); +const ranges = test.ranges(); verify.assertHasRanges(ranges); -for (let range of ranges) { +for (const range of ranges) { goTo.position(range.start); verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false); } \ No newline at end of file diff --git a/tests/cases/fourslash/renameInheritedProperties5.ts b/tests/cases/fourslash/renameInheritedProperties5.ts new file mode 100644 index 00000000000..45058827747 --- /dev/null +++ b/tests/cases/fourslash/renameInheritedProperties5.ts @@ -0,0 +1,17 @@ +/// + +//// interface C extends D { +//// propC: number; +//// } +//// interface D extends C { +//// [|propD|]: string; +//// } +//// var d: D; +//// d.[|propD|]; + +const ranges = test.ranges(); +verify.assertHasRanges(ranges); +for (const range of ranges) { + goTo.position(range.start); + verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false); +} diff --git a/tests/cases/fourslash/renameInheritedProperties6.ts b/tests/cases/fourslash/renameInheritedProperties6.ts new file mode 100644 index 00000000000..6bdd32ce3e0 --- /dev/null +++ b/tests/cases/fourslash/renameInheritedProperties6.ts @@ -0,0 +1,17 @@ +/// + +//// interface C extends D { +//// propD: number; +//// } +//// interface D extends C { +//// [|propC|]: number; +//// } +//// var d: D; +//// d.[|propC|]; + +const ranges = test.ranges(); +verify.assertHasRanges(ranges); +for (const range of ranges) { + goTo.position(range.start); + verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false); +} \ No newline at end of file diff --git a/tests/cases/fourslash/renameInheritedProperties7.ts b/tests/cases/fourslash/renameInheritedProperties7.ts new file mode 100644 index 00000000000..a2f8c5a2b51 --- /dev/null +++ b/tests/cases/fourslash/renameInheritedProperties7.ts @@ -0,0 +1,19 @@ +/// + +//// class C extends D { +//// [|prop1|]: string; +//// } +//// +//// class D extends C { +//// prop1: string; +//// } +//// +//// var c: C; +//// c.[|prop1|]; + +const ranges = test.ranges(); +verify.assertHasRanges(ranges); +for (const range of ranges) { + goTo.position(range.start); + verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false); +} \ No newline at end of file diff --git a/tests/cases/fourslash/renameInheritedProperties8.ts b/tests/cases/fourslash/renameInheritedProperties8.ts new file mode 100644 index 00000000000..119e1a477aa --- /dev/null +++ b/tests/cases/fourslash/renameInheritedProperties8.ts @@ -0,0 +1,19 @@ +/// + +//// class C implements D { +//// [|prop1|]: string; +//// } +//// +//// interface D extends C { +//// [|prop1|]: string; +//// } +//// +//// var c: C; +//// c.[|prop1|]; + +const ranges = test.ranges(); +verify.assertHasRanges(ranges); +for (const range of ranges) { + goTo.position(range.start); + verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false); +} \ No newline at end of file From 68f6d0c1ad840499cf64f2d087a968063551138d Mon Sep 17 00:00:00 2001 From: Kanchalai Tanglertsampan Date: Fri, 8 Jan 2016 03:34:57 -0800 Subject: [PATCH 109/209] Address PR feedback --- src/services/services.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/services/services.ts b/src/services/services.ts index 2bda7bf0e72..ce41db2205f 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -5983,7 +5983,7 @@ namespace ts { // Add symbol of properties/methods of the same name in base classes and implemented interfaces definitions if (rootSymbol.parent && rootSymbol.parent.flags & (SymbolFlags.Class | SymbolFlags.Interface)) { - getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result, undefined); + getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result, {}); } }); @@ -5995,10 +5995,11 @@ namespace ts { * @param symbol a symbol to start searching for the given propertyName * @param propertyName a name of property to serach for * @param result an array of symbol of found property symbols - * @param previousIterationSymbol a symbol from previous iteration of calling this function to prevent infinite revisitng of the same symbol. + * @param previousIterationSymbolsCache a cache of symbol from previous iterations of calling this function to prevent infinite revisitng of the same symbol. * The value of previousIterationSymbol is undefined when the function is first called. */ - function getPropertySymbolsFromBaseTypes(symbol: Symbol, propertyName: string, result: Symbol[], previousIterationSymbol: Symbol): void { + function getPropertySymbolsFromBaseTypes(symbol: Symbol, propertyName: string, result: Symbol[], + previousIterationSymbolsCache: SymbolTable): void { // If the current symbol is the smae as the previous-iteration symbol, we can just return as the symbol has already been visited // This is particularly important for the following cases, so that we do not inifinitely visit the same symbol. // For example: @@ -6010,7 +6011,7 @@ namespace ts { // the function will add any found symbol of the property-name, then its sub-routine will call // getPropertySymbolsFromBaseTypes again to walk up any base types to prevent revisiting already // visited symbol, interface "C", the sub- routine will pass the current symbol as previousIterationSymbol. - if (symbol === previousIterationSymbol) { + if (previousIterationSymbolsCache && previousIterationSymbolsCache[symbol.name] === symbol) { return; } @@ -6037,7 +6038,8 @@ namespace ts { } // Visit the typeReference as well to see if it directly or indirectly use that property - getPropertySymbolsFromBaseTypes(type.symbol, propertyName, result, symbol); + previousIterationSymbolsCache[symbol.name] = symbol; + getPropertySymbolsFromBaseTypes(type.symbol, propertyName, result, previousIterationSymbolsCache); } } } @@ -6078,7 +6080,7 @@ namespace ts { // see if any is in the list if (rootSymbol.parent && rootSymbol.parent.flags & (SymbolFlags.Class | SymbolFlags.Interface)) { const result: Symbol[] = []; - getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result, undefined); + getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result, {}); return forEach(result, s => searchSymbols.indexOf(s) >= 0 ? s : undefined); } From 946cf63a38743d23bab9e7616a9dbe160a6f5f37 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Fri, 8 Jan 2016 17:18:02 -0800 Subject: [PATCH 110/209] classify jsx text and jsx attribute values --- src/services/services.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/services/services.ts b/src/services/services.ts index 2c8982f10ea..cf59e127a5e 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1640,7 +1640,9 @@ namespace ts { jsxOpenTagName = 19, jsxCloseTagName = 20, jsxSelfClosingTagName = 21, - jsxAttribute = 22 + jsxAttribute = 22, + jsxText = 23, + jsxAttributeStringValue = 24, } /// Language Service @@ -6783,12 +6785,12 @@ namespace ts { } } - function classifyToken(token: Node): void { + function classifyTokenOrJsxText(token: Node): void { if (nodeIsMissing(token)) { return; } - const tokenStart = classifyLeadingTriviaAndGetTokenStart(token); + const tokenStart = token.kind === SyntaxKind.JsxText ? token.pos : classifyLeadingTriviaAndGetTokenStart(token); const tokenWidth = token.end - tokenStart; Debug.assert(tokenWidth >= 0); @@ -6843,7 +6845,7 @@ namespace ts { return ClassificationType.numericLiteral; } else if (tokenKind === SyntaxKind.StringLiteral || tokenKind === SyntaxKind.StringLiteralType) { - return ClassificationType.stringLiteral; + return token.parent.kind === SyntaxKind.JsxAttribute ? ClassificationType.jsxAttributeStringValue : ClassificationType.stringLiteral; } else if (tokenKind === SyntaxKind.RegularExpressionLiteral) { // TODO: we should get another classification type for these literals. @@ -6853,6 +6855,9 @@ namespace ts { // TODO (drosen): we should *also* get another classification type for these literals. return ClassificationType.stringLiteral; } + else if (tokenKind === SyntaxKind.JsxText) { + return ClassificationType.jsxText; + } else if (tokenKind === SyntaxKind.Identifier) { if (token) { switch (token.parent.kind) { @@ -6926,8 +6931,8 @@ namespace ts { const children = element.getChildren(sourceFile); for (let i = 0, n = children.length; i < n; i++) { const child = children[i]; - if (isToken(child)) { - classifyToken(child); + if (isToken(child) || child.kind === SyntaxKind.JsxText) { + classifyTokenOrJsxText(child); } else { // Recurse into our child nodes. From a3126fd6be67802c6413899095d0193abed6c97d Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Fri, 8 Jan 2016 17:49:22 -0800 Subject: [PATCH 111/209] Simplify JSDoc scanner loop --- src/compiler/scanner.ts | 84 ++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 48 deletions(-) diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index 96c59c8b1bd..b53b1b5c5c1 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -1672,11 +1672,16 @@ namespace ts { } function scanJSDocToken(): SyntaxKind { + if (pos >= end) { + return token = SyntaxKind.EndOfFileToken; + } + startPos = pos; // Eat leading whitespace + let ch = text.charCodeAt(pos); while (pos < end) { - const ch = text.charCodeAt(pos); + ch = text.charCodeAt(pos); if (isWhiteSpace(ch)) { pos++; } @@ -1686,55 +1691,38 @@ namespace ts { } tokenPos = pos; - let identifierStarted = false; - while (pos < end) { - const ch = text.charCodeAt(pos); - if (identifierStarted) { - if (!isIdentifierPart(ch, ScriptTarget.Latest)) { - return token = SyntaxKind.Identifier; - } + switch (ch) { + case CharacterCodes.at: + return pos += 1, token = SyntaxKind.AtToken; + case CharacterCodes.lineFeed: + case CharacterCodes.carriageReturn: + return pos += 1, token = SyntaxKind.NewLineTrivia; + case CharacterCodes.asterisk: + return pos += 1, token = SyntaxKind.AsteriskToken; + case CharacterCodes.openBrace: + return pos += 1, token = SyntaxKind.OpenBraceToken; + case CharacterCodes.closeBrace: + return pos += 1, token = SyntaxKind.CloseBraceToken; + case CharacterCodes.openBracket: + return pos += 1, token = SyntaxKind.OpenBracketToken; + case CharacterCodes.closeBracket: + return pos += 1, token = SyntaxKind.CloseBracketToken; + case CharacterCodes.equals: + return pos += 1, token = SyntaxKind.EqualsToken; + case CharacterCodes.comma: + return pos += 1, token = SyntaxKind.CommaToken; + } + + if (isIdentifierStart(ch, ScriptTarget.Latest)) { + pos++; + while (isIdentifierPart(text.charCodeAt(pos), ScriptTarget.Latest) && pos < end) { + pos++; } - else { - if (ch === CharacterCodes.at) { - return pos += 1, token = SyntaxKind.AtToken; - } - else if (isLineBreak(ch)) { - return pos += 1, token = SyntaxKind.NewLineTrivia; - } - else if (ch === CharacterCodes.asterisk) { - return pos += 1, token = SyntaxKind.AsteriskToken; - } - else if (ch === CharacterCodes.openBrace) { - return pos += 1, token = SyntaxKind.OpenBraceToken; - } - else if (ch === CharacterCodes.closeBrace) { - return pos += 1, token = SyntaxKind.CloseBraceToken; - } - else if (ch === CharacterCodes.openBracket) { - return pos += 1, token = SyntaxKind.OpenBracketToken; - } - else if (ch === CharacterCodes.closeBracket) { - return pos += 1, token = SyntaxKind.CloseBracketToken; - } - else if (ch === CharacterCodes.equals) { - return pos += 1, token = SyntaxKind.EqualsToken; - } - else if (ch === CharacterCodes.comma) { - return pos += 1, token = SyntaxKind.CommaToken; - } - else if (isWhiteSpace(ch)) { - // Keep going - } - else if (isIdentifierStart(ch, ScriptTarget.Latest)) { - identifierStarted = true; - } - else { - return pos += 1, token = SyntaxKind.Unknown; - } - } - pos += 1; + return token = SyntaxKind.Identifier; + } + else { + return pos += 1, token = SyntaxKind.Unknown; } - return token = SyntaxKind.EndOfFileToken; } function speculationHelper(callback: () => T, isLookahead: boolean): T { From 5c0d1a8afa7ab656535288b763d0b41e91598c7b Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Fri, 8 Jan 2016 22:30:26 -0800 Subject: [PATCH 112/209] added jsx classification support to fourslash and tests --- src/harness/fourslash.ts | 24 +++++++++++++++ src/services/services.ts | 13 ++++++-- tests/cases/fourslash/fourslash.ts | 30 +++++++++++++++++++ .../fourslash/syntacticClassificationsJsx1.ts | 27 +++++++++++++++++ 4 files changed, 91 insertions(+), 3 deletions(-) create mode 100644 tests/cases/fourslash/syntacticClassificationsJsx1.ts diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 30626a83d62..ca0a5ad278d 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -3284,6 +3284,30 @@ namespace FourSlashInterface { export function typeAliasName(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } { return getClassification("typeAliasName", text, position); } + + export function jsxOpenTagName(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } { + return getClassification("jsxOpenTagName", text, position); + } + + export function jsxCloseTagName(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } { + return getClassification("jsxCloseTagName", text, position); + } + + export function jsxSelfClosingTagName(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } { + return getClassification("jsxSelfClosingTagName", text, position); + } + + export function jsxAttribute(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } { + return getClassification("jsxAttribute", text, position); + } + + export function jsxText(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } { + return getClassification("jsxText", text, position); + } + + export function jsxAttributeStringLiteralValue(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } { + return getClassification("jsxAttributeStringLiteralValue", text, position); + } function getClassification(type: string, text: string, position?: number) { return { diff --git a/src/services/services.ts b/src/services/services.ts index cf59e127a5e..248965b2403 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1616,6 +1616,9 @@ namespace ts { public static jsxOpenTagName = "jsx open tag name"; public static jsxCloseTagName = "jsx close tag name"; public static jsxSelfClosingTagName = "jsx self closing tag name"; + public static jsxAttribute = "jsx attribute"; + public static jsxText = "jsx text"; + public static jsxAttributeStringLiteralValue = "jsx attribute string literal value"; } export const enum ClassificationType { @@ -1642,7 +1645,7 @@ namespace ts { jsxSelfClosingTagName = 21, jsxAttribute = 22, jsxText = 23, - jsxAttributeStringValue = 24, + jsxAttributeStringLiteralValue = 24, } /// Language Service @@ -6577,6 +6580,9 @@ namespace ts { case ClassificationType.jsxOpenTagName: return ClassificationTypeNames.jsxOpenTagName; case ClassificationType.jsxCloseTagName: return ClassificationTypeNames.jsxCloseTagName; case ClassificationType.jsxSelfClosingTagName: return ClassificationTypeNames.jsxSelfClosingTagName; + case ClassificationType.jsxAttribute: return ClassificationTypeNames.jsxAttribute; + case ClassificationType.jsxText: return ClassificationTypeNames.jsxText; + case ClassificationType.jsxAttributeStringLiteralValue: return ClassificationTypeNames.jsxAttributeStringLiteralValue; } } @@ -6826,7 +6832,8 @@ namespace ts { // the '=' in a variable declaration is special cased here. if (token.parent.kind === SyntaxKind.VariableDeclaration || token.parent.kind === SyntaxKind.PropertyDeclaration || - token.parent.kind === SyntaxKind.Parameter) { + token.parent.kind === SyntaxKind.Parameter || + token.parent.kind === SyntaxKind.JsxAttribute) { return ClassificationType.operator; } } @@ -6845,7 +6852,7 @@ namespace ts { return ClassificationType.numericLiteral; } else if (tokenKind === SyntaxKind.StringLiteral || tokenKind === SyntaxKind.StringLiteralType) { - return token.parent.kind === SyntaxKind.JsxAttribute ? ClassificationType.jsxAttributeStringValue : ClassificationType.stringLiteral; + return token.parent.kind === SyntaxKind.JsxAttribute ? ClassificationType.jsxAttributeStringLiteralValue : ClassificationType.stringLiteral; } else if (tokenKind === SyntaxKind.RegularExpressionLiteral) { // TODO: we should get another classification type for these literals. diff --git a/tests/cases/fourslash/fourslash.ts b/tests/cases/fourslash/fourslash.ts index 0e83189dd8e..b69a757f01e 100644 --- a/tests/cases/fourslash/fourslash.ts +++ b/tests/cases/fourslash/fourslash.ts @@ -338,6 +338,36 @@ declare namespace FourSlashInterface { text: string; textSpan?: TextSpan; }; + function jsxOpenTagName(text: string, position?: number): { + classificationType: string; + text: string; + textSpan?: TextSpan; + }; + function jsxCloseTagName(text: string, position?: number): { + classificationType: string; + text: string; + textSpan?: TextSpan; + }; + function jsxSelfClosingTagName(text: string, position?: number): { + classificationType: string; + text: string; + textSpan?: TextSpan; + }; + function jsxAttribute(text: string, position?: number): { + classificationType: string; + text: string; + textSpan?: TextSpan; + }; + function jsxText(text: string, position?: number): { + classificationType: string; + text: string; + textSpan?: TextSpan; + }; + function jsxAttributeStringLiteralValue(text: string, position?: number): { + classificationType: string; + text: string; + textSpan?: TextSpan; + }; } } declare function verifyOperationIsCancelled(f: any): void; diff --git a/tests/cases/fourslash/syntacticClassificationsJsx1.ts b/tests/cases/fourslash/syntacticClassificationsJsx1.ts new file mode 100644 index 00000000000..a26e7f9c8f4 --- /dev/null +++ b/tests/cases/fourslash/syntacticClassificationsJsx1.ts @@ -0,0 +1,27 @@ +/// + +// @Filename: file1.tsx +////let x =
+//// some jsx text +////
; +//// +////let y = + +const c = classification; +verify.syntacticClassificationsAre( + c.keyword("let"), c.identifier("x"), c.operator("="), + c.punctuation("<"), + c.jsxOpenTagName("div"), + c.jsxAttribute("a"), c.operator("="), c.jsxAttributeStringLiteralValue(`"some-value"`), + c.jsxAttribute("b"), c.operator("="), c.punctuation("{"), c.numericLiteral("1"), c.punctuation("}"), + c.punctuation(">"), + c.jsxText(` + some jsx text +`), + c.punctuation("<"), c.punctuation("/"), c.jsxCloseTagName("div"), c.punctuation(">"), c.punctuation(";"), + c.keyword("let"), c.identifier("y"), c.operator("="), + c.punctuation("<"), + c.jsxSelfClosingTagName("element"), + c.jsxAttribute("attr"), c.operator("="), c.jsxAttributeStringLiteralValue(`"123"`), + c.punctuation("/"), c.punctuation(">") +) \ No newline at end of file From c1b031aa739ae88dff4d19c2517e8547b4ba9208 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Fri, 8 Jan 2016 22:43:21 -0800 Subject: [PATCH 113/209] fix linter issues --- src/harness/fourslash.ts | 2 +- src/services/services.ts | 2 +- tests/cases/fourslash/syntacticClassificationsJsx1.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index ca0a5ad278d..435acf548b2 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -3284,7 +3284,7 @@ namespace FourSlashInterface { export function typeAliasName(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } { return getClassification("typeAliasName", text, position); } - + export function jsxOpenTagName(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } { return getClassification("jsxOpenTagName", text, position); } diff --git a/src/services/services.ts b/src/services/services.ts index 248965b2403..61b504a25c0 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -6864,7 +6864,7 @@ namespace ts { } else if (tokenKind === SyntaxKind.JsxText) { return ClassificationType.jsxText; - } + } else if (tokenKind === SyntaxKind.Identifier) { if (token) { switch (token.parent.kind) { diff --git a/tests/cases/fourslash/syntacticClassificationsJsx1.ts b/tests/cases/fourslash/syntacticClassificationsJsx1.ts index a26e7f9c8f4..e9de07c759b 100644 --- a/tests/cases/fourslash/syntacticClassificationsJsx1.ts +++ b/tests/cases/fourslash/syntacticClassificationsJsx1.ts @@ -7,7 +7,7 @@ //// ////let y = -const c = classification; +const c = classification; verify.syntacticClassificationsAre( c.keyword("let"), c.identifier("x"), c.operator("="), c.punctuation("<"), From 356def91fadd0d9f43f9bf93bcc1b6d7bdf67e05 Mon Sep 17 00:00:00 2001 From: Yui T Date: Sun, 10 Jan 2016 06:04:07 -0800 Subject: [PATCH 114/209] update baseline from merging --- .../reference/reactNamespaceImportPresevation.symbols | 1 + tests/baselines/reference/reactNamespaceJSXEmit.symbols | 3 +++ 2 files changed, 4 insertions(+) diff --git a/tests/baselines/reference/reactNamespaceImportPresevation.symbols b/tests/baselines/reference/reactNamespaceImportPresevation.symbols index 8a4407c8160..e2f530d31ba 100644 --- a/tests/baselines/reference/reactNamespaceImportPresevation.symbols +++ b/tests/baselines/reference/reactNamespaceImportPresevation.symbols @@ -16,5 +16,6 @@ declare var foo: any; >foo : Symbol(foo, Decl(test.tsx, 1, 11)) ; +>foo : Symbol(unknown) >data : Symbol(unknown) diff --git a/tests/baselines/reference/reactNamespaceJSXEmit.symbols b/tests/baselines/reference/reactNamespaceJSXEmit.symbols index d79c1cf531e..3ca5b91e538 100644 --- a/tests/baselines/reference/reactNamespaceJSXEmit.symbols +++ b/tests/baselines/reference/reactNamespaceJSXEmit.symbols @@ -13,6 +13,7 @@ declare var x: any; >x : Symbol(x, Decl(reactNamespaceJSXEmit.tsx, 4, 11)) ; +>foo : Symbol(unknown) >data : Symbol(unknown) ; @@ -21,6 +22,8 @@ declare var x: any; >x : Symbol(x, Decl(reactNamespaceJSXEmit.tsx, 4, 11)) ; +>x-component : Symbol(unknown) + ; >Bar : Symbol(Bar, Decl(reactNamespaceJSXEmit.tsx, 3, 11)) >x : Symbol(x, Decl(reactNamespaceJSXEmit.tsx, 4, 11)) From 1c553dfd791aa091715decb9a0cb20582386017d Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Mon, 11 Jan 2016 09:34:49 -0800 Subject: [PATCH 115/209] Reverse order of Promise.all overloads. The highest arity overloads should come first -- Typescript chooses the first overload that matches, which currently means that the *shortest* tuple type gets chosen, not the longest matching one. --- src/lib/es6.d.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lib/es6.d.ts b/src/lib/es6.d.ts index 84128a01cf2..44e5e49f984 100644 --- a/src/lib/es6.d.ts +++ b/src/lib/es6.d.ts @@ -1281,15 +1281,15 @@ interface PromiseConstructor { * @param values An array of Promises. * @returns A new Promise. */ - all(values: [T1 | PromiseLike, T2 | PromiseLike]): Promise<[T1, T2]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike]): Promise<[T1, T2, T3]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike ]): Promise<[T1, T2, T3, T4]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike]): Promise<[T1, T2, T3, T4, T5]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>; all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike, T10 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>; + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>; + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>; + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7]>; + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6]>; + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike]): Promise<[T1, T2, T3, T4, T5]>; + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike ]): Promise<[T1, T2, T3, T4]>; + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike]): Promise<[T1, T2, T3]>; + all(values: [T1 | PromiseLike, T2 | PromiseLike]): Promise<[T1, T2]>; all(values: Iterable>): Promise; /** From 114d2bd66d849db3aff2ec3401f6a68805fafa8d Mon Sep 17 00:00:00 2001 From: zhengbli Date: Mon, 11 Jan 2016 11:35:46 -0800 Subject: [PATCH 116/209] Separate directory watching and file watching again to reduce logic complexity, because reference counting is a lot easier in this case --- src/compiler/sys.ts | 164 +++++++++++++++++--------------------------- 1 file changed, 63 insertions(+), 101 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index a99f491175c..de56beb8697 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -35,6 +35,7 @@ namespace ts { } export interface DirectoryWatcher extends FileWatcher { + directoryPath: Path; referenceCount: number; } @@ -306,123 +307,71 @@ namespace ts { function createWatchedFileSet() { const dirWatchers = createFileMap(); - const recursiveDirWatchers = createFileMap(); // One file can have multiple watchers const fileWatcherCallbacks = createFileMap(); - const dirWatcherCallbacks = createFileMap(); - const currentDirectory = process.cwd(); - return { addFile, removeFile, addDir }; + return { addFile, removeFile }; - function addDir(dirName: string, callback: DirectoryWatcherCallback, recursive?: boolean) { - const dirPath = toPath(dirName, currentDirectory, getCanonicalPath); - if (!dirWatcherCallbacks.contains(dirPath)) { - dirWatcherCallbacks.set(dirPath, [callback]); - } - else { - dirWatcherCallbacks.get(dirPath).push(callback); - } - const { watcher, isRecursive } = addDirWatcher(dirPath, recursive); - return { - close: () => reduceDirWatcherRefCount(watcher, dirPath, isRecursive) - }; - } - - function reduceDirWatcherRefCount(watcher: DirectoryWatcher, dirPath: Path, isRecursive: boolean) { + function reduceDirWatcherRefCount(dirPath: Path) { + const watcher = dirWatchers.get(dirPath); watcher.referenceCount -= 1; if (watcher.referenceCount <= 0) { watcher.close(); - if (isRecursive) { - recursiveDirWatchers.remove(dirPath); - } - else { - dirWatchers.remove(dirPath); - } + dirWatchers.remove(dirPath); } } - function addDirWatcher(dirPath: Path, recursive?: boolean): { watcher: DirectoryWatcher, isRecursive: boolean } { - let watchers: FileMap; - const options: { persistent: boolean, recursive?: boolean } = { persistent: true }; - - // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows - // (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643) - if (isNode4OrLater() && recursive === true && - (process.platform === "win32" || process.platform === "darwin")) { - if (recursiveDirWatchers.contains(dirPath)) { - const watcher = recursiveDirWatchers.get(dirPath); - watcher.referenceCount += 1; - return { watcher, isRecursive: true }; - } - watchers = recursiveDirWatchers; - options.recursive = true; - } - else { - if (dirWatchers.contains(dirPath)) { - const watcher = dirWatchers.get(dirPath); - watcher.referenceCount += 1; - return { watcher, isRecursive: false }; - } - watchers = dirWatchers; - options.recursive = false; + function addDirWatcher(dirPath: Path): void { + if (dirWatchers.contains(dirPath)) { + const watcher = dirWatchers.get(dirPath); + watcher.referenceCount += 1; + return; } - const watcher: DirectoryWatcher = _fs.watch(dirPath, options, (eventName: string, relativeFileName: string) => fileEventHandler(eventName, relativeFileName, dirPath)); + const watcher: DirectoryWatcher = _fs.watch( + dirPath, + { persistent: true }, + (eventName: string, relativeFileName: string) => fileEventHandler(eventName, relativeFileName, dirPath) + ); watcher.referenceCount = 1; - watchers.set(dirPath, watcher); - return { watcher, isRecursive: options.recursive }; + dirWatchers.set(dirPath, watcher); + return; } - function findDirWatcherForFile(filePath: Path): { watcher: DirectoryWatcher, watcherPath: Path, isRecursive: boolean } { - let watcher: DirectoryWatcher; - let watcherPath: Path; - let isRecursive = false; - recursiveDirWatchers.forEachValue(dirPath => { - if (filePath.indexOf(dirPath) === 0) { - watcherPath = dirPath; - watcher = recursiveDirWatchers.get(dirPath); - isRecursive = true; - return; - } - }); - if (!watcher) { - const parentDirPath = getDirectoryPath(filePath); - if (dirWatchers.contains(parentDirPath)) { - watcherPath = parentDirPath; - watcher = dirWatchers.get(parentDirPath); - } - } - return { watcher, watcherPath, isRecursive }; - } - - function addFile(fileName: string, callback: FileWatcherCallback): WatchedFile { - const filePath = toPath(fileName, currentDirectory, getCanonicalPath); - + function addFileWatcherCallback(filePath: Path, callback: FileWatcherCallback): void { if (fileWatcherCallbacks.contains(filePath)) { fileWatcherCallbacks.get(filePath).push(callback); } else { - const { watcher } = findDirWatcherForFile(filePath); - if (!watcher) { - addDirWatcher(getDirectoryPath(filePath)); - } - else { - watcher.referenceCount += 1; - } fileWatcherCallbacks.set(filePath, [callback]); } + } + + function findWatchedDirForFile(filePath: Path): Path { + const dirPath = getDirectoryPath(filePath); + if (dirWatchers.contains(dirPath)) { + return dirPath; + } + return undefined; + } + + function addFile(fileName: string, callback: FileWatcherCallback): WatchedFile { + const filePath = toPath(fileName, currentDirectory, getCanonicalPath); + addFileWatcherCallback(filePath, callback); + addDirWatcher(getDirectoryPath(filePath)); + return { fileName, callback }; } - function removeFile(file: WatchedFile) { - const filePath = toPath(file.fileName, currentDirectory, getCanonicalPath); + function removeFile(watchedFile: WatchedFile) { + const filePath = toPath(watchedFile.fileName, currentDirectory, getCanonicalPath); if (fileWatcherCallbacks.contains(filePath)) { - const newCallbacks = copyListRemovingItem(file.callback, fileWatcherCallbacks.get(filePath)); + const newCallbacks = copyListRemovingItem(watchedFile.callback, fileWatcherCallbacks.get(filePath)); if (newCallbacks.length === 0) { fileWatcherCallbacks.remove(filePath); - const { watcher, watcherPath, isRecursive } = findDirWatcherForFile(filePath); - if (watcher) { - reduceDirWatcherRefCount(watcher, watcherPath, isRecursive); + const watchedDir = findWatchedDirForFile(filePath); + if (watchedDir) { + reduceDirWatcherRefCount(watchedDir); } } else { @@ -437,14 +386,7 @@ namespace ts { function fileEventHandler(eventName: string, relativefileName: string, baseDirPath: Path) { // When files are deleted from disk, the triggered "rename" event would have a relativefileName of "undefined" const filePath = relativefileName === undefined ? undefined : toPath(relativefileName, baseDirPath, getCanonicalPath); - // Directory callbacks are not set for file content changes, they are more often used for - // adding/removing/renaming files, which corresponds to the "rename" event - if (eventName === "rename" && dirWatcherCallbacks.contains(baseDirPath)) { - for (const dirCallback of dirWatcherCallbacks.get(baseDirPath)) { - dirCallback(filePath); - } - } - if (fileWatcherCallbacks.contains(filePath)) { + if (eventName === "change" && fileWatcherCallbacks.contains(filePath)) { for (const fileCallback of fileWatcherCallbacks.get(filePath)) { fileCallback(filePath); } @@ -577,7 +519,29 @@ namespace ts { }; }, watchDirectory: (path, callback, recursive) => { - return watchedFileSet.addDir(path, callback, recursive); + // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows + // (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643) + let options: any; + if (isNode4OrLater() && (process.platform === "win32" || process.platform === "darwin")) { + options = { persistent: true, recursive: !!recursive }; + } + else { + options = { persistent: true }; + } + + return _fs.watch( + path, + options, + (eventName: string, relativeFileName: string) => { + // In watchDirectory we only care about adding and removing files (when event name is + // "rename"); changes made within files are handled by corresponding fileWatchers (when + // event name is "change") + if (eventName === "rename") { + // When deleting a file, the passed baseFileName is null + callback(!relativeFileName ? relativeFileName : normalizePath(combinePaths(path, relativeFileName))); + }; + } + ); }, resolvePath: function (path: string): string { return _path.resolve(path); @@ -658,5 +622,3 @@ namespace ts { } })(); } - - From 1905eac824e6f07f91279aefc65e5f3c52e90836 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 11 Jan 2016 12:22:40 -0800 Subject: [PATCH 117/209] Don't rely on truthiness. --- src/compiler/checker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 31ef24e537a..6e1c35a84dd 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5636,7 +5636,7 @@ namespace ts { * See signatureAssignableTo, compareSignaturesIdentical */ function signatureRelatedTo(source: Signature, target: Signature, reportErrors: boolean): Ternary { - return compareSignaturesRelated(source, target, /*ignoreReturnTypes*/ false, reportErrors && reportError, isRelatedTo); + return compareSignaturesRelated(source, target, /*ignoreReturnTypes*/ false, reportErrors ? reportError : undefined, isRelatedTo); } function signaturesIdenticalTo(source: Type, target: Type, kind: SignatureKind): Ternary { From 4fe33732cf9639db3ae0fe039964f49590afd457 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 11 Jan 2016 13:35:33 -0800 Subject: [PATCH 118/209] Tidy up unused comments / code --- src/compiler/binder.ts | 6 ++---- src/compiler/checker.ts | 6 +----- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 6b63cbdb5df..a9aed6a5221 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -888,7 +888,7 @@ namespace ts { } } - function bindFunctionOrConstructorTypeOrJSDocFunctionType(node: SignatureDeclaration): void { + function bindFunctionOrConstructorType(node: SignatureDeclaration): void { // For a given function symbol "<...>(...) => T" we want to generate a symbol identical // to the one we would get for: { <...>(...): T } // @@ -1274,7 +1274,7 @@ namespace ts { case SyntaxKind.FunctionType: case SyntaxKind.ConstructorType: case SyntaxKind.JSDocFunctionType: - return bindFunctionOrConstructorTypeOrJSDocFunctionType(node); + return bindFunctionOrConstructorType(node); case SyntaxKind.TypeLiteral: case SyntaxKind.JSDocRecordType: return bindAnonymousDeclaration(node, SymbolFlags.TypeLiteral, "__type"); @@ -1288,8 +1288,6 @@ namespace ts { case SyntaxKind.CallExpression: if (isInJavaScriptFile(node)) { - // We're only inspecting call expressions to detect CommonJS modules, so we can skip - // this check if we've already seen the module indicator bindCallExpression(node); } break; diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 6d7a9c5ffa7..229d66ec4fd 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -3924,7 +3924,7 @@ namespace ts { return result; } - function isOptionalParameter(node: ParameterDeclaration, skipSignatureCheck?: boolean) { + function isOptionalParameter(node: ParameterDeclaration) { if (node.parserContextFlags & ParserContextFlags.JavaScriptFile) { if (node.type && node.type.kind === SyntaxKind.JSDocOptionalType) { return true; @@ -3947,10 +3947,6 @@ namespace ts { } if (node.initializer) { - if (skipSignatureCheck) { - return true; - } - const signatureDeclaration = node.parent; const signature = getSignatureFromDeclaration(signatureDeclaration); const parameterIndex = ts.indexOf(signatureDeclaration.parameters, node); From b811b9f94b23491f1549eb11c20e272bdb7acb3d Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Mon, 11 Jan 2016 14:48:57 -0800 Subject: [PATCH 119/209] report errors when re-exporting globals --- src/compiler/checker.ts | 11 +++- src/compiler/diagnosticMessages.json | 4 ++ .../exportSpecifierForAGlobal.errors.txt | 16 ++++++ .../exportSpecifierForAGlobal.symbols | 20 ------- .../reference/exportSpecifierForAGlobal.types | 20 ------- ...ierReferencingOuterDeclaration1.errors.txt | 11 ++++ ...cifierReferencingOuterDeclaration1.symbols | 14 ----- ...pecifierReferencingOuterDeclaration1.types | 14 ----- ...ierReferencingOuterDeclaration2.errors.txt | 11 ++++ ...cifierReferencingOuterDeclaration2.symbols | 14 ----- ...pecifierReferencingOuterDeclaration2.types | 14 ----- .../reExportGlobalDeclaration1.errors.txt | 57 +++++++++++++++++++ .../reference/reExportGlobalDeclaration1.js | 24 ++++++++ .../reExportGlobalDeclaration2.errors.txt | 35 ++++++++++++ .../reference/reExportGlobalDeclaration2.js | 20 +++++++ .../reExportGlobalDeclaration3.errors.txt | 35 ++++++++++++ .../reference/reExportGlobalDeclaration3.js | 20 +++++++ .../reExportGlobalDeclaration4.errors.txt | 35 ++++++++++++ .../reference/reExportGlobalDeclaration4.js | 20 +++++++ .../compiler/reExportGlobalDeclaration1.ts | 19 +++++++ .../compiler/reExportGlobalDeclaration2.ts | 16 ++++++ .../compiler/reExportGlobalDeclaration3.ts | 16 ++++++ .../compiler/reExportGlobalDeclaration4.ts | 16 ++++++ 23 files changed, 365 insertions(+), 97 deletions(-) create mode 100644 tests/baselines/reference/exportSpecifierForAGlobal.errors.txt delete mode 100644 tests/baselines/reference/exportSpecifierForAGlobal.symbols delete mode 100644 tests/baselines/reference/exportSpecifierForAGlobal.types create mode 100644 tests/baselines/reference/exportSpecifierReferencingOuterDeclaration1.errors.txt delete mode 100644 tests/baselines/reference/exportSpecifierReferencingOuterDeclaration1.symbols delete mode 100644 tests/baselines/reference/exportSpecifierReferencingOuterDeclaration1.types create mode 100644 tests/baselines/reference/exportSpecifierReferencingOuterDeclaration2.errors.txt delete mode 100644 tests/baselines/reference/exportSpecifierReferencingOuterDeclaration2.symbols delete mode 100644 tests/baselines/reference/exportSpecifierReferencingOuterDeclaration2.types create mode 100644 tests/baselines/reference/reExportGlobalDeclaration1.errors.txt create mode 100644 tests/baselines/reference/reExportGlobalDeclaration1.js create mode 100644 tests/baselines/reference/reExportGlobalDeclaration2.errors.txt create mode 100644 tests/baselines/reference/reExportGlobalDeclaration2.js create mode 100644 tests/baselines/reference/reExportGlobalDeclaration3.errors.txt create mode 100644 tests/baselines/reference/reExportGlobalDeclaration3.js create mode 100644 tests/baselines/reference/reExportGlobalDeclaration4.errors.txt create mode 100644 tests/baselines/reference/reExportGlobalDeclaration4.js create mode 100644 tests/cases/compiler/reExportGlobalDeclaration1.ts create mode 100644 tests/cases/compiler/reExportGlobalDeclaration2.ts create mode 100644 tests/cases/compiler/reExportGlobalDeclaration3.ts create mode 100644 tests/cases/compiler/reExportGlobalDeclaration4.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 7ed9dbcd377..5a6c8e121f7 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -14364,7 +14364,16 @@ namespace ts { function checkExportSpecifier(node: ExportSpecifier) { checkAliasSymbol(node); if (!(node.parent.parent).moduleSpecifier) { - markExportAsReferenced(node); + const exportedName = node.propertyName || node.name; + // find immediate value referenced by exported name (SymbolFlags.Alias is set so we don't chase down aliases) + const symbol = resolveName(exportedName, exportedName.text, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias, + /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); + if (symbol && isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0]))) { + error(exportedName, Diagnostics.Cannot_re_export_name_that_is_not_defined_in_the_module); + } + else { + markExportAsReferenced(node); + } } } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index a57c16e2cd6..28b10dd73b4 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1771,6 +1771,10 @@ "category": "Error", "code": 2660 }, + "Cannot re-export name that is not defined in the module.": { + "category": "Error", + "code": 2661 + }, "Import declaration '{0}' is using private name '{1}'.": { "category": "Error", "code": 4000 diff --git a/tests/baselines/reference/exportSpecifierForAGlobal.errors.txt b/tests/baselines/reference/exportSpecifierForAGlobal.errors.txt new file mode 100644 index 00000000000..6df9c6de1ef --- /dev/null +++ b/tests/baselines/reference/exportSpecifierForAGlobal.errors.txt @@ -0,0 +1,16 @@ +tests/cases/compiler/b.ts(1,9): error TS2661: Cannot re-export name that is not defined in the module. + + +==== tests/cases/compiler/a.d.ts (0 errors) ==== + + declare class X { } + +==== tests/cases/compiler/b.ts (1 errors) ==== + export {X}; + ~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + export function f() { + var x: X; + return x; + } + \ No newline at end of file diff --git a/tests/baselines/reference/exportSpecifierForAGlobal.symbols b/tests/baselines/reference/exportSpecifierForAGlobal.symbols deleted file mode 100644 index b38fc7be270..00000000000 --- a/tests/baselines/reference/exportSpecifierForAGlobal.symbols +++ /dev/null @@ -1,20 +0,0 @@ -=== tests/cases/compiler/a.d.ts === - -declare class X { } ->X : Symbol(X, Decl(a.d.ts, 0, 0)) - -=== tests/cases/compiler/b.ts === -export {X}; ->X : Symbol(X, Decl(b.ts, 0, 8)) - -export function f() { ->f : Symbol(f, Decl(b.ts, 0, 11)) - - var x: X; ->x : Symbol(x, Decl(b.ts, 2, 7)) ->X : Symbol(X, Decl(a.d.ts, 0, 0)) - - return x; ->x : Symbol(x, Decl(b.ts, 2, 7)) -} - diff --git a/tests/baselines/reference/exportSpecifierForAGlobal.types b/tests/baselines/reference/exportSpecifierForAGlobal.types deleted file mode 100644 index e3d728ad0d0..00000000000 --- a/tests/baselines/reference/exportSpecifierForAGlobal.types +++ /dev/null @@ -1,20 +0,0 @@ -=== tests/cases/compiler/a.d.ts === - -declare class X { } ->X : X - -=== tests/cases/compiler/b.ts === -export {X}; ->X : typeof X - -export function f() { ->f : () => X - - var x: X; ->x : X ->X : X - - return x; ->x : X -} - diff --git a/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration1.errors.txt b/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration1.errors.txt new file mode 100644 index 00000000000..7eb095b05f0 --- /dev/null +++ b/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration1.errors.txt @@ -0,0 +1,11 @@ +tests/cases/compiler/exportSpecifierReferencingOuterDeclaration1.ts(3,14): error TS2661: Cannot re-export name that is not defined in the module. + + +==== tests/cases/compiler/exportSpecifierReferencingOuterDeclaration1.ts (1 errors) ==== + declare module X { export interface bar { } } + declare module "m" { + export { X }; + ~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + export function foo(): X.bar; + } \ No newline at end of file diff --git a/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration1.symbols b/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration1.symbols deleted file mode 100644 index 16abde86d32..00000000000 --- a/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration1.symbols +++ /dev/null @@ -1,14 +0,0 @@ -=== tests/cases/compiler/exportSpecifierReferencingOuterDeclaration1.ts === -declare module X { export interface bar { } } ->X : Symbol(X, Decl(exportSpecifierReferencingOuterDeclaration1.ts, 0, 0)) ->bar : Symbol(bar, Decl(exportSpecifierReferencingOuterDeclaration1.ts, 0, 18)) - -declare module "m" { - export { X }; ->X : Symbol(X, Decl(exportSpecifierReferencingOuterDeclaration1.ts, 2, 12)) - - export function foo(): X.bar; ->foo : Symbol(foo, Decl(exportSpecifierReferencingOuterDeclaration1.ts, 2, 17)) ->X : Symbol(X, Decl(exportSpecifierReferencingOuterDeclaration1.ts, 0, 0)) ->bar : Symbol(X.bar, Decl(exportSpecifierReferencingOuterDeclaration1.ts, 0, 18)) -} diff --git a/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration1.types b/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration1.types deleted file mode 100644 index be03554a1b0..00000000000 --- a/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration1.types +++ /dev/null @@ -1,14 +0,0 @@ -=== tests/cases/compiler/exportSpecifierReferencingOuterDeclaration1.ts === -declare module X { export interface bar { } } ->X : any ->bar : bar - -declare module "m" { - export { X }; ->X : any - - export function foo(): X.bar; ->foo : () => X.bar ->X : any ->bar : X.bar -} diff --git a/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration2.errors.txt b/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration2.errors.txt new file mode 100644 index 00000000000..00118010785 --- /dev/null +++ b/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration2.errors.txt @@ -0,0 +1,11 @@ +tests/cases/compiler/exportSpecifierReferencingOuterDeclaration2_B.ts(1,10): error TS2661: Cannot re-export name that is not defined in the module. + + +==== tests/cases/compiler/exportSpecifierReferencingOuterDeclaration2_A.ts (0 errors) ==== + declare module X { export interface bar { } } + +==== tests/cases/compiler/exportSpecifierReferencingOuterDeclaration2_B.ts (1 errors) ==== + export { X }; + ~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + export declare function foo(): X.bar; \ No newline at end of file diff --git a/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration2.symbols b/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration2.symbols deleted file mode 100644 index 9a57645b1cb..00000000000 --- a/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration2.symbols +++ /dev/null @@ -1,14 +0,0 @@ -=== tests/cases/compiler/exportSpecifierReferencingOuterDeclaration2_A.ts === -declare module X { export interface bar { } } ->X : Symbol(X, Decl(exportSpecifierReferencingOuterDeclaration2_A.ts, 0, 0)) ->bar : Symbol(bar, Decl(exportSpecifierReferencingOuterDeclaration2_A.ts, 0, 18)) - -=== tests/cases/compiler/exportSpecifierReferencingOuterDeclaration2_B.ts === -export { X }; ->X : Symbol(X, Decl(exportSpecifierReferencingOuterDeclaration2_B.ts, 0, 8)) - -export declare function foo(): X.bar; ->foo : Symbol(foo, Decl(exportSpecifierReferencingOuterDeclaration2_B.ts, 0, 13)) ->X : Symbol(X, Decl(exportSpecifierReferencingOuterDeclaration2_A.ts, 0, 0)) ->bar : Symbol(X.bar, Decl(exportSpecifierReferencingOuterDeclaration2_A.ts, 0, 18)) - diff --git a/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration2.types b/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration2.types deleted file mode 100644 index fa59948c116..00000000000 --- a/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration2.types +++ /dev/null @@ -1,14 +0,0 @@ -=== tests/cases/compiler/exportSpecifierReferencingOuterDeclaration2_A.ts === -declare module X { export interface bar { } } ->X : any ->bar : bar - -=== tests/cases/compiler/exportSpecifierReferencingOuterDeclaration2_B.ts === -export { X }; ->X : any - -export declare function foo(): X.bar; ->foo : () => X.bar ->X : any ->bar : X.bar - diff --git a/tests/baselines/reference/reExportGlobalDeclaration1.errors.txt b/tests/baselines/reference/reExportGlobalDeclaration1.errors.txt new file mode 100644 index 00000000000..0ebeed05b28 --- /dev/null +++ b/tests/baselines/reference/reExportGlobalDeclaration1.errors.txt @@ -0,0 +1,57 @@ +tests/cases/compiler/file2.ts(1,9): error TS2661: Cannot re-export name that is not defined in the module. +tests/cases/compiler/file2.ts(1,12): error TS2661: Cannot re-export name that is not defined in the module. +tests/cases/compiler/file2.ts(2,9): error TS2661: Cannot re-export name that is not defined in the module. +tests/cases/compiler/file2.ts(2,13): error TS2661: Cannot re-export name that is not defined in the module. +tests/cases/compiler/file2.ts(4,9): error TS2661: Cannot re-export name that is not defined in the module. +tests/cases/compiler/file2.ts(4,12): error TS2661: Cannot re-export name that is not defined in the module. +tests/cases/compiler/file2.ts(5,9): error TS2661: Cannot re-export name that is not defined in the module. +tests/cases/compiler/file2.ts(5,12): error TS2661: Cannot re-export name that is not defined in the module. +tests/cases/compiler/file2.ts(8,9): error TS2661: Cannot re-export name that is not defined in the module. +tests/cases/compiler/file2.ts(9,9): error TS2661: Cannot re-export name that is not defined in the module. +tests/cases/compiler/file2.ts(10,9): error TS2661: Cannot re-export name that is not defined in the module. +tests/cases/compiler/file2.ts(11,9): error TS2661: Cannot re-export name that is not defined in the module. + + +==== tests/cases/compiler/file1.d.ts (0 errors) ==== + + declare var x: number; + declare var x1: number; + declare let {a, b}: {a: number, b: number}; + +==== tests/cases/compiler/file2.ts (12 errors) ==== + export {x, x as y}; + ~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + ~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + export {x1, x1 as y1}; + ~~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + ~~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + + export {a, a as a1}; + ~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + ~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + export {b, b as b1}; + ~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + ~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + + + export {x as z}; + ~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + export {x1 as z1}; + ~~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + export {a as a2}; + ~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + export {b as b2}; + ~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + \ No newline at end of file diff --git a/tests/baselines/reference/reExportGlobalDeclaration1.js b/tests/baselines/reference/reExportGlobalDeclaration1.js new file mode 100644 index 00000000000..c0db9a0eaf3 --- /dev/null +++ b/tests/baselines/reference/reExportGlobalDeclaration1.js @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/reExportGlobalDeclaration1.ts] //// + +//// [file1.d.ts] + +declare var x: number; +declare var x1: number; +declare let {a, b}: {a: number, b: number}; + +//// [file2.ts] +export {x, x as y}; +export {x1, x1 as y1}; + +export {a, a as a1}; +export {b, b as b1}; + + +export {x as z}; +export {x1 as z1}; +export {a as a2}; +export {b as b2}; + + +//// [file2.js] +"use strict"; diff --git a/tests/baselines/reference/reExportGlobalDeclaration2.errors.txt b/tests/baselines/reference/reExportGlobalDeclaration2.errors.txt new file mode 100644 index 00000000000..17a3e2ad565 --- /dev/null +++ b/tests/baselines/reference/reExportGlobalDeclaration2.errors.txt @@ -0,0 +1,35 @@ +tests/cases/compiler/file2.ts(1,9): error TS2661: Cannot re-export name that is not defined in the module. +tests/cases/compiler/file2.ts(1,13): error TS2661: Cannot re-export name that is not defined in the module. +tests/cases/compiler/file2.ts(2,9): error TS2661: Cannot re-export name that is not defined in the module. +tests/cases/compiler/file2.ts(2,13): error TS2661: Cannot re-export name that is not defined in the module. +tests/cases/compiler/file2.ts(3,9): error TS2661: Cannot re-export name that is not defined in the module. +tests/cases/compiler/file2.ts(4,9): error TS2661: Cannot re-export name that is not defined in the module. + + +==== tests/cases/compiler/file1.d.ts (0 errors) ==== + + declare interface I1 { + x: number + } + + declare interface I2 { + x: number + } + +==== tests/cases/compiler/file2.ts (6 errors) ==== + export {I1, I1 as II1}; + ~~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + ~~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + export {I2, I2 as II2}; + ~~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + ~~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + export {I1 as III1}; + ~~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + export {I2 as III2}; + ~~ +!!! error TS2661: Cannot re-export name that is not defined in the module. \ No newline at end of file diff --git a/tests/baselines/reference/reExportGlobalDeclaration2.js b/tests/baselines/reference/reExportGlobalDeclaration2.js new file mode 100644 index 00000000000..160a9b28f54 --- /dev/null +++ b/tests/baselines/reference/reExportGlobalDeclaration2.js @@ -0,0 +1,20 @@ +//// [tests/cases/compiler/reExportGlobalDeclaration2.ts] //// + +//// [file1.d.ts] + +declare interface I1 { + x: number +} + +declare interface I2 { + x: number +} + +//// [file2.ts] +export {I1, I1 as II1}; +export {I2, I2 as II2}; +export {I1 as III1}; +export {I2 as III2}; + +//// [file2.js] +"use strict"; diff --git a/tests/baselines/reference/reExportGlobalDeclaration3.errors.txt b/tests/baselines/reference/reExportGlobalDeclaration3.errors.txt new file mode 100644 index 00000000000..d99c184518c --- /dev/null +++ b/tests/baselines/reference/reExportGlobalDeclaration3.errors.txt @@ -0,0 +1,35 @@ +tests/cases/compiler/file2.ts(1,9): error TS2661: Cannot re-export name that is not defined in the module. +tests/cases/compiler/file2.ts(1,14): error TS2661: Cannot re-export name that is not defined in the module. +tests/cases/compiler/file2.ts(2,9): error TS2661: Cannot re-export name that is not defined in the module. +tests/cases/compiler/file2.ts(2,14): error TS2661: Cannot re-export name that is not defined in the module. +tests/cases/compiler/file2.ts(3,9): error TS2661: Cannot re-export name that is not defined in the module. +tests/cases/compiler/file2.ts(4,9): error TS2661: Cannot re-export name that is not defined in the module. + + +==== tests/cases/compiler/file1.d.ts (0 errors) ==== + + declare namespace NS1 { + export var foo: number; + } + + declare namespace NS2 { + export var foo: number; + } + +==== tests/cases/compiler/file2.ts (6 errors) ==== + export {NS1, NS1 as NNS1}; + ~~~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + ~~~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + export {NS2, NS2 as NNS2}; + ~~~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + ~~~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + export {NS1 as NNNS1}; + ~~~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + export {NS2 as NNNS2}; + ~~~ +!!! error TS2661: Cannot re-export name that is not defined in the module. \ No newline at end of file diff --git a/tests/baselines/reference/reExportGlobalDeclaration3.js b/tests/baselines/reference/reExportGlobalDeclaration3.js new file mode 100644 index 00000000000..e1b85b6b8d5 --- /dev/null +++ b/tests/baselines/reference/reExportGlobalDeclaration3.js @@ -0,0 +1,20 @@ +//// [tests/cases/compiler/reExportGlobalDeclaration3.ts] //// + +//// [file1.d.ts] + +declare namespace NS1 { + export var foo: number; +} + +declare namespace NS2 { + export var foo: number; +} + +//// [file2.ts] +export {NS1, NS1 as NNS1}; +export {NS2, NS2 as NNS2}; +export {NS1 as NNNS1}; +export {NS2 as NNNS2}; + +//// [file2.js] +"use strict"; diff --git a/tests/baselines/reference/reExportGlobalDeclaration4.errors.txt b/tests/baselines/reference/reExportGlobalDeclaration4.errors.txt new file mode 100644 index 00000000000..5e250a5fc57 --- /dev/null +++ b/tests/baselines/reference/reExportGlobalDeclaration4.errors.txt @@ -0,0 +1,35 @@ +tests/cases/compiler/file2.ts(1,9): error TS2661: Cannot re-export name that is not defined in the module. +tests/cases/compiler/file2.ts(1,15): error TS2661: Cannot re-export name that is not defined in the module. +tests/cases/compiler/file2.ts(2,9): error TS2661: Cannot re-export name that is not defined in the module. +tests/cases/compiler/file2.ts(2,15): error TS2661: Cannot re-export name that is not defined in the module. +tests/cases/compiler/file2.ts(3,9): error TS2661: Cannot re-export name that is not defined in the module. +tests/cases/compiler/file2.ts(4,9): error TS2661: Cannot re-export name that is not defined in the module. + + +==== tests/cases/compiler/file1.d.ts (0 errors) ==== + + declare class Cls1 { + x: number + } + declare class Cls2 { + x: number + } + + +==== tests/cases/compiler/file2.ts (6 errors) ==== + export {Cls1, Cls1 as CCls1}; + ~~~~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + ~~~~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + export {Cls2, Cls2 as CCls2}; + ~~~~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + ~~~~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + export {Cls1 as CCCls1}; + ~~~~ +!!! error TS2661: Cannot re-export name that is not defined in the module. + export {Cls2 as CCCls2}; + ~~~~ +!!! error TS2661: Cannot re-export name that is not defined in the module. \ No newline at end of file diff --git a/tests/baselines/reference/reExportGlobalDeclaration4.js b/tests/baselines/reference/reExportGlobalDeclaration4.js new file mode 100644 index 00000000000..09d6b760790 --- /dev/null +++ b/tests/baselines/reference/reExportGlobalDeclaration4.js @@ -0,0 +1,20 @@ +//// [tests/cases/compiler/reExportGlobalDeclaration4.ts] //// + +//// [file1.d.ts] + +declare class Cls1 { + x: number +} +declare class Cls2 { + x: number +} + + +//// [file2.ts] +export {Cls1, Cls1 as CCls1}; +export {Cls2, Cls2 as CCls2}; +export {Cls1 as CCCls1}; +export {Cls2 as CCCls2}; + +//// [file2.js] +"use strict"; diff --git a/tests/cases/compiler/reExportGlobalDeclaration1.ts b/tests/cases/compiler/reExportGlobalDeclaration1.ts new file mode 100644 index 00000000000..9b3f0c030de --- /dev/null +++ b/tests/cases/compiler/reExportGlobalDeclaration1.ts @@ -0,0 +1,19 @@ +// @module: commonjs + +// @filename: file1.d.ts +declare var x: number; +declare var x1: number; +declare let {a, b}: {a: number, b: number}; + +// @filename: file2.ts +export {x, x as y}; +export {x1, x1 as y1}; + +export {a, a as a1}; +export {b, b as b1}; + + +export {x as z}; +export {x1 as z1}; +export {a as a2}; +export {b as b2}; diff --git a/tests/cases/compiler/reExportGlobalDeclaration2.ts b/tests/cases/compiler/reExportGlobalDeclaration2.ts new file mode 100644 index 00000000000..4dba4fd20fa --- /dev/null +++ b/tests/cases/compiler/reExportGlobalDeclaration2.ts @@ -0,0 +1,16 @@ +// @module: commonjs + +// @filename: file1.d.ts +declare interface I1 { + x: number +} + +declare interface I2 { + x: number +} + +// @filename: file2.ts +export {I1, I1 as II1}; +export {I2, I2 as II2}; +export {I1 as III1}; +export {I2 as III2}; \ No newline at end of file diff --git a/tests/cases/compiler/reExportGlobalDeclaration3.ts b/tests/cases/compiler/reExportGlobalDeclaration3.ts new file mode 100644 index 00000000000..dc188ac6fb5 --- /dev/null +++ b/tests/cases/compiler/reExportGlobalDeclaration3.ts @@ -0,0 +1,16 @@ +// @module: commonjs + +// @filename: file1.d.ts +declare namespace NS1 { + export var foo: number; +} + +declare namespace NS2 { + export var foo: number; +} + +// @filename: file2.ts +export {NS1, NS1 as NNS1}; +export {NS2, NS2 as NNS2}; +export {NS1 as NNNS1}; +export {NS2 as NNNS2}; \ No newline at end of file diff --git a/tests/cases/compiler/reExportGlobalDeclaration4.ts b/tests/cases/compiler/reExportGlobalDeclaration4.ts new file mode 100644 index 00000000000..7298aa682fe --- /dev/null +++ b/tests/cases/compiler/reExportGlobalDeclaration4.ts @@ -0,0 +1,16 @@ +// @module: commonjs + +// @filename: file1.d.ts +declare class Cls1 { + x: number +} +declare class Cls2 { + x: number +} + + +// @filename: file2.ts +export {Cls1, Cls1 as CCls1}; +export {Cls2, Cls2 as CCls2}; +export {Cls1 as CCCls1}; +export {Cls2 as CCCls2}; \ No newline at end of file From dd58228861f45847c2b8036a3fb880464ae9209a Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Mon, 11 Jan 2016 21:34:52 -0800 Subject: [PATCH 120/209] add no-default-lib tag to core libraries --- Jakefile.js | 8 ++++---- src/lib/core.d.ts | 2 -- src/lib/header.d.ts | 1 + 3 files changed, 5 insertions(+), 6 deletions(-) create mode 100644 src/lib/header.d.ts diff --git a/Jakefile.js b/Jakefile.js index b62cbed3279..0749ba8cc26 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -163,13 +163,13 @@ var harnessSources = harnessCoreSources.concat([ })); var librarySourceMap = [ - { target: "lib.core.d.ts", sources: ["core.d.ts"] }, + { target: "lib.core.d.ts", sources: ["header.d.ts", "core.d.ts"] }, { target: "lib.dom.d.ts", sources: ["importcore.d.ts", "intl.d.ts", "dom.generated.d.ts"], }, { target: "lib.webworker.d.ts", sources: ["importcore.d.ts", "intl.d.ts", "webworker.generated.d.ts"], }, { target: "lib.scriptHost.d.ts", sources: ["importcore.d.ts", "scriptHost.d.ts"], }, - { target: "lib.d.ts", sources: ["core.d.ts", "intl.d.ts", "dom.generated.d.ts", "webworker.importscripts.d.ts", "scriptHost.d.ts"], }, - { target: "lib.core.es6.d.ts", sources: ["core.d.ts", "es6.d.ts"]}, - { target: "lib.es6.d.ts", sources: ["es6.d.ts", "core.d.ts", "intl.d.ts", "dom.generated.d.ts", "dom.es6.d.ts", "webworker.importscripts.d.ts", "scriptHost.d.ts"] } + { target: "lib.d.ts", sources: ["header.d.ts", "core.d.ts", "intl.d.ts", "dom.generated.d.ts", "webworker.importscripts.d.ts", "scriptHost.d.ts"], }, + { target: "lib.core.es6.d.ts", sources: ["header.d.ts", "core.d.ts", "es6.d.ts"]}, + { target: "lib.es6.d.ts", sources: ["header.d.ts", "es6.d.ts", "core.d.ts", "intl.d.ts", "dom.generated.d.ts", "dom.es6.d.ts", "webworker.importscripts.d.ts", "scriptHost.d.ts"] } ]; var libraryTargets = librarySourceMap.map(function (f) { diff --git a/src/lib/core.d.ts b/src/lib/core.d.ts index 12df449931e..dbd4d37ef96 100644 --- a/src/lib/core.d.ts +++ b/src/lib/core.d.ts @@ -1,5 +1,3 @@ -/// - ///////////////////////////// /// ECMAScript APIs ///////////////////////////// diff --git a/src/lib/header.d.ts b/src/lib/header.d.ts new file mode 100644 index 00000000000..129e4739a83 --- /dev/null +++ b/src/lib/header.d.ts @@ -0,0 +1 @@ +/// From 1a964394b2440d4ddc23b8fed89b16bd485da5f8 Mon Sep 17 00:00:00 2001 From: vladima Date: Mon, 11 Jan 2016 22:32:05 -0800 Subject: [PATCH 121/209] accept baselines --- .../reference/variableDeclarationInStrictMode1.errors.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/baselines/reference/variableDeclarationInStrictMode1.errors.txt b/tests/baselines/reference/variableDeclarationInStrictMode1.errors.txt index 328e080fbaa..9dd9a8d41a1 100644 --- a/tests/baselines/reference/variableDeclarationInStrictMode1.errors.txt +++ b/tests/baselines/reference/variableDeclarationInStrictMode1.errors.txt @@ -1,4 +1,4 @@ -lib.d.ts(29,18): error TS2300: Duplicate identifier 'eval'. +lib.d.ts(28,18): error TS2300: Duplicate identifier 'eval'. tests/cases/compiler/variableDeclarationInStrictMode1.ts(2,5): error TS1100: Invalid use of 'eval' in strict mode. tests/cases/compiler/variableDeclarationInStrictMode1.ts(2,5): error TS2300: Duplicate identifier 'eval'. From 0e1c6e3c9a35dad636b257d9250383bf7757c4de Mon Sep 17 00:00:00 2001 From: vladima Date: Mon, 11 Jan 2016 22:34:38 -0800 Subject: [PATCH 122/209] fix linter issues --- src/compiler/program.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index fd964323fbb..80a2a1f342d 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1136,7 +1136,7 @@ namespace ts { moduleNames.push(name.text); } const resolutions = resolveModuleNamesWorker(moduleNames, getNormalizedAbsolutePath(file.fileName, currentDirectory)); - for (let i = 0; i < moduleNames.length; ++i) { + for (let i = 0; i < moduleNames.length; i++) { const resolution = resolutions[i]; setResolvedModule(file, moduleNames[i], resolution); // add file to program only if: From d22626f32db719801256cac2f888b0cb9c0f150a Mon Sep 17 00:00:00 2001 From: Zhengbo Li Date: Tue, 12 Jan 2016 00:17:38 -0800 Subject: [PATCH 123/209] Fix lint issue --- src/compiler/sys.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index de56beb8697..f40de0bd65e 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -329,8 +329,8 @@ namespace ts { } const watcher: DirectoryWatcher = _fs.watch( - dirPath, - { persistent: true }, + dirPath, + { persistent: true }, (eventName: string, relativeFileName: string) => fileEventHandler(eventName, relativeFileName, dirPath) ); watcher.referenceCount = 1; From 120fa190d22fda462df989ce04268c67c0523305 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Tue, 12 Jan 2016 15:30:19 -0800 Subject: [PATCH 124/209] Remove duplicated functions --- src/compiler/checker.ts | 76 +++++++---------------------------------- src/compiler/types.ts | 2 ++ 2 files changed, 15 insertions(+), 63 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 229d66ec4fd..99173b816f0 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -4727,23 +4727,6 @@ namespace ts { return links.resolvedType; } - function getTypeFromJSDocFunctionType(node: JSDocFunctionType): Type { - Debug.assert(!!node.symbol); - const links = getNodeLinks(node); - if (!links.resolvedType) { - links.resolvedType = createObjectType(TypeFlags.Anonymous, node.symbol); - } - return links.resolvedType; - } - - function getTypeFromJSDocRecordType(node: JSDocRecordType): Type { - const links = getNodeLinks(node); - if (!links.resolvedType) { - links.resolvedType = createObjectType(TypeFlags.Anonymous, node.symbol); - } - return links.resolvedType; - } - function getTypeFromJSDocVariadicType(node: JSDocVariadicType): Type { const links = getNodeLinks(node); if (!links.resolvedType) { @@ -4753,27 +4736,6 @@ namespace ts { return links.resolvedType; } - function getTypeFromJSDocTypeReference(node: JSDocTypeReference): Type { - return getTypeFromTypeReference(node); - } - - function getTypeFromJSDocArrayType(node: JSDocArrayType): Type { - const links = getNodeLinks(node); - if (!links.resolvedType) { - links.resolvedType = createArrayType(getTypeFromTypeNode(node.elementType)); - } - return links.resolvedType; - } - - function getTypeFromJSDocUnionType(node: JSDocUnionType): Type { - const links = getNodeLinks(node); - if (!links.resolvedType) { - const types = map(node.types, getTypeFromTypeNode); - links.resolvedType = getUnionType(types, /*noSubtypeReduction*/ true); - } - return links.resolvedType; - } - function getTypeFromJSDocTupleType(node: JSDocTupleType): Type { const links = getNodeLinks(node); if (!links.resolvedType) { @@ -4826,6 +4788,8 @@ namespace ts { function getTypeFromTypeNode(node: TypeNode): Type { switch (node.kind) { case SyntaxKind.AnyKeyword: + case SyntaxKind.JSDocAllType: + case SyntaxKind.JSDocUnknownType: return anyType; case SyntaxKind.StringKeyword: return stringType; @@ -4842,6 +4806,7 @@ namespace ts { case SyntaxKind.StringLiteralType: return getTypeFromStringLiteralTypeNode(node); case SyntaxKind.TypeReference: + case SyntaxKind.JSDocTypeReference: return getTypeFromTypeReference(node); case SyntaxKind.TypePredicate: return getTypeFromPredicateTypeNode(node); @@ -4850,18 +4815,27 @@ namespace ts { case SyntaxKind.TypeQuery: return getTypeFromTypeQueryNode(node); case SyntaxKind.ArrayType: + case SyntaxKind.JSDocArrayType: return getTypeFromArrayTypeNode(node); case SyntaxKind.TupleType: return getTypeFromTupleTypeNode(node); case SyntaxKind.UnionType: + case SyntaxKind.JSDocUnionType: return getTypeFromUnionTypeNode(node); case SyntaxKind.IntersectionType: return getTypeFromIntersectionTypeNode(node); case SyntaxKind.ParenthesizedType: - return getTypeFromTypeNode((node).type); + case SyntaxKind.JSDocNullableType: + case SyntaxKind.JSDocNonNullableType: + case SyntaxKind.JSDocConstructorType: + case SyntaxKind.JSDocThisType: + case SyntaxKind.JSDocOptionalType: + return getTypeFromTypeNode((node).type); case SyntaxKind.FunctionType: case SyntaxKind.ConstructorType: case SyntaxKind.TypeLiteral: + case SyntaxKind.JSDocFunctionType: + case SyntaxKind.JSDocRecordType: return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); // This function assumes that an identifier or qualified name is a type expression // Callers should first ensure this by calling isTypeNode @@ -4869,34 +4843,10 @@ namespace ts { case SyntaxKind.QualifiedName: const symbol = getSymbolAtLocation(node); return symbol && getDeclaredTypeOfSymbol(symbol); - case SyntaxKind.JSDocAllType: - return anyType; - case SyntaxKind.JSDocUnknownType: - return unknownType; - case SyntaxKind.JSDocArrayType: - return getTypeFromJSDocArrayType(node); case SyntaxKind.JSDocTupleType: return getTypeFromJSDocTupleType(node); - case SyntaxKind.JSDocUnionType: - return getTypeFromJSDocUnionType(node); - case SyntaxKind.JSDocNullableType: - return getTypeFromTypeNode((node).type); - case SyntaxKind.JSDocNonNullableType: - return getTypeFromTypeNode((node).type); - case SyntaxKind.JSDocTypeReference: - return getTypeFromJSDocTypeReference(node); - case SyntaxKind.JSDocOptionalType: - return getTypeFromTypeNode((node).type); - case SyntaxKind.JSDocFunctionType: - return getTypeFromJSDocFunctionType(node); case SyntaxKind.JSDocVariadicType: return getTypeFromJSDocVariadicType(node); - case SyntaxKind.JSDocConstructorType: - return getTypeFromTypeNode((node).type); - case SyntaxKind.JSDocRecordType: - return getTypeFromJSDocRecordType(node); - case SyntaxKind.JSDocThisType: - return getTypeFromTypeNode((node).type); default: return unknownType; } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 6e0e8018baa..7d76562c0f9 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1475,6 +1475,8 @@ namespace ts { type: JSDocType; } + export type JSDocTypeReferencingNode = JSDocThisType | JSDocConstructorType | JSDocVariadicType | JSDocOptionalType | JSDocNullableType | JSDocNonNullableType; + // @kind(SyntaxKind.JSDocRecordMember) export interface JSDocRecordMember extends PropertySignature { name: Identifier | LiteralExpression; From a9f2cb6d6e791a0c1e7d588369da4bae6811653b Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Wed, 13 Jan 2016 09:31:06 -0800 Subject: [PATCH 125/209] Make `parseTypeOrTypePredicate` terser. --- src/compiler/parser.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index eaeb6452044..bfa5fb6ee1a 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -2541,11 +2541,7 @@ namespace ts { } function parseTypeOrTypePredicate(): TypeNode { - let typePredicateVariable: Identifier; - if (isIdentifier()) { - typePredicateVariable = tryParse(parseTypePredicatePrefix); - } - + const typePredicateVariable = isIdentifier() && tryParse(parseTypePredicatePrefix); const type = parseType(); if (typePredicateVariable) { const node = createNode(SyntaxKind.TypePredicate, typePredicateVariable.pos); From 5ba47eca864ca2493d1dd902095e8ce2fc9fec8a Mon Sep 17 00:00:00 2001 From: "shyyko.serhiy@gmail.com" Date: Wed, 13 Jan 2016 20:18:51 +0200 Subject: [PATCH 126/209] added two new more specific messages --- src/compiler/diagnosticMessages.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 28b10dd73b4..7f1c195ae20 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1775,6 +1775,14 @@ "category": "Error", "code": 2661 }, + "Cannot find name '{0}'. Did you mean to prefix the static member with the class name, '{1}.{0}'?": { + "category": "Error", + "code": 2662 + }, + "Cannot find name '{0}'. Did you mean to prefix the object member with 'this', 'this.{0}'?": { + "category": "Error", + "code": 2663 + }, "Import declaration '{0}' is using private name '{1}'.": { "category": "Error", "code": 4000 From 6b7b9aaa5608f1c40c6dbe1daf4365caa58c0aff Mon Sep 17 00:00:00 2001 From: "shyyko.serhiy@gmail.com" Date: Wed, 13 Jan 2016 20:20:34 +0200 Subject: [PATCH 127/209] added check for missing prefix --- src/compiler/checker.ts | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 4c1ef08ddd6..fdce825e292 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -740,7 +740,9 @@ namespace ts { if (!result) { if (nameNotFoundMessage) { - error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : declarationNameToString(nameArg)); + if (!checkForMissingPrefix(errorLocation, name, nameArg)) { + error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : declarationNameToString(nameArg)); + } } return undefined; } @@ -777,6 +779,39 @@ namespace ts { return result; } + function checkForMissingPrefix(errorLocation: Node, name: string, nameArg: string | Identifier): boolean { + if (!errorLocation || (errorLocation.kind === SyntaxKind.Identifier && (isTypeReferenceIdentifier(errorLocation)) || isInTypeQuery(errorLocation))) { + return false; + } + const container = getThisContainer(errorLocation, /* includeArrowFunctions */ true); + let location = container; + while (location) { + if (isClassLike(location.parent)) { + const symbol = getSymbolOfNode(location.parent); + let classType: Type; + if (location.flags & NodeFlags.Static) { + classType = getTypeOfSymbol(symbol); + if (getPropertyOfType(classType, name)) { + error(errorLocation, Diagnostics.Cannot_find_name_0_Did_you_mean_to_prefix_the_static_member_with_the_class_name_1_0, typeof nameArg === "string" ? nameArg : declarationNameToString(nameArg), symbolToString(symbol)); + return true; + } + } + else { + if (location === container) { + classType = (getDeclaredTypeOfSymbol(symbol)).thisType; + if (getPropertyOfType(classType, name)) { + error(errorLocation, Diagnostics.Cannot_find_name_0_Did_you_mean_to_prefix_the_object_member_with_this_this_0, typeof nameArg === "string" ? nameArg : declarationNameToString(nameArg)); + return true; + } + } + } + } + + location = location.parent; + } + return false; + } + function checkResolvedBlockScopedVariable(result: Symbol, errorLocation: Node): void { Debug.assert((result.flags & SymbolFlags.BlockScopedVariable) !== 0); // Block-scoped variables cannot be used before their definition From 7f8dd6bb7459ae9959ccdf94889ccab66cf893f5 Mon Sep 17 00:00:00 2001 From: "shyyko.serhiy@gmail.com" Date: Wed, 13 Jan 2016 20:20:58 +0200 Subject: [PATCH 128/209] fixed initializerReferencingConstructorParameters test --- ...initializerReferencingConstructorParameters.errors.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/baselines/reference/initializerReferencingConstructorParameters.errors.txt b/tests/baselines/reference/initializerReferencingConstructorParameters.errors.txt index 623bd535745..03e4e83e409 100644 --- a/tests/baselines/reference/initializerReferencingConstructorParameters.errors.txt +++ b/tests/baselines/reference/initializerReferencingConstructorParameters.errors.txt @@ -1,9 +1,9 @@ tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(4,9): error TS2304: Cannot find name 'x'. tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(5,15): error TS2304: Cannot find name 'x'. -tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(10,9): error TS2304: Cannot find name 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(10,9): error TS2663: Cannot find name 'x'. Did you mean to prefix the object member with 'this', 'this.x'? tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(11,15): error TS2304: Cannot find name 'x'. tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(17,15): error TS1003: Identifier expected. -tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(23,9): error TS2304: Cannot find name 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(23,9): error TS2663: Cannot find name 'x'. Did you mean to prefix the object member with 'this', 'this.x'? ==== tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts (6 errors) ==== @@ -22,7 +22,7 @@ tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencin class D { a = x; // error ~ -!!! error TS2304: Cannot find name 'x'. +!!! error TS2663: Cannot find name 'x'. Did you mean to prefix the object member with 'this', 'this.x'? b: typeof x; // error ~ !!! error TS2304: Cannot find name 'x'. @@ -41,6 +41,6 @@ tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencin a = this.x; // ok b = x; // error ~ -!!! error TS2304: Cannot find name 'x'. +!!! error TS2663: Cannot find name 'x'. Did you mean to prefix the object member with 'this', 'this.x'? constructor(public x: T) { } } \ No newline at end of file From 2ef9f69a7ec011ff4137d5efdcabd063dd63a521 Mon Sep 17 00:00:00 2001 From: "shyyko.serhiy@gmail.com" Date: Wed, 13 Jan 2016 20:21:15 +0200 Subject: [PATCH 129/209] fixed YieldExpression11_es6 test --- tests/baselines/reference/YieldExpression11_es6.errors.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/baselines/reference/YieldExpression11_es6.errors.txt b/tests/baselines/reference/YieldExpression11_es6.errors.txt index c19e8b6cfa5..4a2f93a9c6d 100644 --- a/tests/baselines/reference/YieldExpression11_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression11_es6.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts(2,3): error TS1220: Generators are only available when targeting ECMAScript 6 or higher. -tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts(3,11): error TS2304: Cannot find name 'foo'. +tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts(3,11): error TS2663: Cannot find name 'foo'. Did you mean to prefix the object member with 'this', 'this.foo'? ==== tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts (2 errors) ==== @@ -9,6 +9,6 @@ tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts(3,11): err !!! error TS1220: Generators are only available when targeting ECMAScript 6 or higher. yield(foo); ~~~ -!!! error TS2304: Cannot find name 'foo'. +!!! error TS2663: Cannot find name 'foo'. Did you mean to prefix the object member with 'this', 'this.foo'? } } \ No newline at end of file From fe39e0c838a2db0bcc2881be2084a0b8bbca5e51 Mon Sep 17 00:00:00 2001 From: "shyyko.serhiy@gmail.com" Date: Wed, 13 Jan 2016 20:22:31 +0200 Subject: [PATCH 130/209] fixed parserharness test --- .../reference/parserharness.errors.txt | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/baselines/reference/parserharness.errors.txt b/tests/baselines/reference/parserharness.errors.txt index 66afa3d010f..711d3fd9aac 100644 --- a/tests/baselines/reference/parserharness.errors.txt +++ b/tests/baselines/reference/parserharness.errors.txt @@ -7,11 +7,11 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(25,17): er tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(41,12): error TS2304: Cannot find name 'ActiveXObject'. tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(43,19): error TS2304: Cannot find name 'require'. tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(44,14): error TS2304: Cannot find name 'require'. -tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(341,13): error TS2304: Cannot find name 'errorHandlerStack'. -tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(347,13): error TS2304: Cannot find name 'errorHandlerStack'. -tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(351,17): error TS2304: Cannot find name 'errorHandlerStack'. -tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(354,17): error TS2304: Cannot find name 'errorHandlerStack'. -tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(354,35): error TS2304: Cannot find name 'errorHandlerStack'. +tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(341,13): error TS2662: Cannot find name 'errorHandlerStack'. Did you mean to prefix the static member with the class name, 'Runnable.errorHandlerStack'? +tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(347,13): error TS2662: Cannot find name 'errorHandlerStack'. Did you mean to prefix the static member with the class name, 'Runnable.errorHandlerStack'? +tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(351,17): error TS2662: Cannot find name 'errorHandlerStack'. Did you mean to prefix the static member with the class name, 'Runnable.errorHandlerStack'? +tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(354,17): error TS2662: Cannot find name 'errorHandlerStack'. Did you mean to prefix the static member with the class name, 'Runnable.errorHandlerStack'? +tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(354,35): error TS2662: Cannot find name 'errorHandlerStack'. Did you mean to prefix the static member with the class name, 'Runnable.errorHandlerStack'? tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(691,50): error TS2304: Cannot find name 'ITextWriter'. tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(716,47): error TS2503: Cannot find namespace 'TypeScript'. tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(721,62): error TS2304: Cannot find name 'ITextWriter'. @@ -471,7 +471,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): static pushGlobalErrorHandler(done: IDone) { errorHandlerStack.push(function (e) { ~~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'errorHandlerStack'. +!!! error TS2662: Cannot find name 'errorHandlerStack'. Did you mean to prefix the static member with the class name, 'Runnable.errorHandlerStack'? done(e); }); } @@ -479,20 +479,20 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): static popGlobalErrorHandler() { errorHandlerStack.pop(); ~~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'errorHandlerStack'. +!!! error TS2662: Cannot find name 'errorHandlerStack'. Did you mean to prefix the static member with the class name, 'Runnable.errorHandlerStack'? } static handleError(e: Error) { if (errorHandlerStack.length === 0) { ~~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'errorHandlerStack'. +!!! error TS2662: Cannot find name 'errorHandlerStack'. Did you mean to prefix the static member with the class name, 'Runnable.errorHandlerStack'? IO.printLine('Global error: ' + e); } else { errorHandlerStack[errorHandlerStack.length - 1](e); ~~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'errorHandlerStack'. +!!! error TS2662: Cannot find name 'errorHandlerStack'. Did you mean to prefix the static member with the class name, 'Runnable.errorHandlerStack'? ~~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'errorHandlerStack'. +!!! error TS2662: Cannot find name 'errorHandlerStack'. Did you mean to prefix the static member with the class name, 'Runnable.errorHandlerStack'? } } } From 217b0d48b24ef9a6cc2b15878ffcd7183bd159a4 Mon Sep 17 00:00:00 2001 From: "shyyko.serhiy@gmail.com" Date: Wed, 13 Jan 2016 20:24:10 +0200 Subject: [PATCH 131/209] fixed parserindenter test --- tests/baselines/reference/parserindenter.errors.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/baselines/reference/parserindenter.errors.txt b/tests/baselines/reference/parserindenter.errors.txt index a332abab7bb..d892f27579f 100644 --- a/tests/baselines/reference/parserindenter.errors.txt +++ b/tests/baselines/reference/parserindenter.errors.txt @@ -28,7 +28,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts(152,63): tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts(153,30): error TS2304: Cannot find name 'List_TextEditInfo'. tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts(155,32): error TS2304: Cannot find name 'AuthorTokenKind'. tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts(182,79): error TS2503: Cannot find namespace 'Services'. -tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts(183,20): error TS2304: Cannot find name 'GetIndentSizeFromText'. +tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts(183,20): error TS2662: Cannot find name 'GetIndentSizeFromText'. Did you mean to prefix the static member with the class name, 'Indenter.GetIndentSizeFromText'? tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts(186,67): error TS2503: Cannot find namespace 'Services'. tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts(207,50): error TS2304: Cannot find name 'TokenSpan'. tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts(207,67): error TS2304: Cannot find name 'ParseNode'. @@ -373,7 +373,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts(736,38): !!! error TS2503: Cannot find namespace 'Services'. return GetIndentSizeFromText(indentText, editorOptions, /*includeNonIndentChars:*/ false); ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'GetIndentSizeFromText'. +!!! error TS2662: Cannot find name 'GetIndentSizeFromText'. Did you mean to prefix the static member with the class name, 'Indenter.GetIndentSizeFromText'? } static GetIndentSizeFromText(text: string, editorOptions: Services.EditorOptions, includeNonIndentChars: boolean): number { From 00a46cc3928d756186fb6250176bf9bcb6d70a73 Mon Sep 17 00:00:00 2001 From: "shyyko.serhiy@gmail.com" Date: Wed, 13 Jan 2016 20:24:59 +0200 Subject: [PATCH 132/209] fixed scannertest1 test --- tests/baselines/reference/scannertest1.errors.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/baselines/reference/scannertest1.errors.txt b/tests/baselines/reference/scannertest1.errors.txt index 14a19b28851..234923b5a2f 100644 --- a/tests/baselines/reference/scannertest1.errors.txt +++ b/tests/baselines/reference/scannertest1.errors.txt @@ -1,14 +1,14 @@ tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(1,1): error TS6053: File 'tests/cases/conformance/scanner/ecmascript5/References.ts' not found. tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(5,21): error TS2304: Cannot find name 'CharacterCodes'. tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(5,47): error TS2304: Cannot find name 'CharacterCodes'. -tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(9,16): error TS2304: Cannot find name 'isDecimalDigit'. +tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(9,16): error TS2662: Cannot find name 'isDecimalDigit'. Did you mean to prefix the static member with the class name, 'CharacterInfo.isDecimalDigit'? tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(10,22): error TS2304: Cannot find name 'CharacterCodes'. tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(10,47): error TS2304: Cannot find name 'CharacterCodes'. tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(11,22): error TS2304: Cannot find name 'CharacterCodes'. tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(11,47): error TS2304: Cannot find name 'CharacterCodes'. tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(15,9): error TS2304: Cannot find name 'Debug'. -tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(15,22): error TS2304: Cannot find name 'isHexDigit'. -tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(16,16): error TS2304: Cannot find name 'isDecimalDigit'. +tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(15,22): error TS2662: Cannot find name 'isHexDigit'. Did you mean to prefix the static member with the class name, 'CharacterInfo.isHexDigit'? +tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(16,16): error TS2662: Cannot find name 'isDecimalDigit'. Did you mean to prefix the static member with the class name, 'CharacterInfo.isDecimalDigit'? tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(17,20): error TS2304: Cannot find name 'CharacterCodes'. tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(18,21): error TS2304: Cannot find name 'CharacterCodes'. tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(18,46): error TS2304: Cannot find name 'CharacterCodes'. @@ -33,7 +33,7 @@ tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(20,23): error TS2304 public static isHexDigit(c: number): boolean { return isDecimalDigit(c) || ~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'isDecimalDigit'. +!!! error TS2662: Cannot find name 'isDecimalDigit'. Did you mean to prefix the static member with the class name, 'CharacterInfo.isDecimalDigit'? (c >= CharacterCodes.A && c <= CharacterCodes.F) || ~~~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'CharacterCodes'. @@ -51,10 +51,10 @@ tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(20,23): error TS2304 ~~~~~ !!! error TS2304: Cannot find name 'Debug'. ~~~~~~~~~~ -!!! error TS2304: Cannot find name 'isHexDigit'. +!!! error TS2662: Cannot find name 'isHexDigit'. Did you mean to prefix the static member with the class name, 'CharacterInfo.isHexDigit'? return isDecimalDigit(c) ~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'isDecimalDigit'. +!!! error TS2662: Cannot find name 'isDecimalDigit'. Did you mean to prefix the static member with the class name, 'CharacterInfo.isDecimalDigit'? ? (c - CharacterCodes._0) ~~~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'CharacterCodes'. From 90ec38affc014e6245578c654788d016b5ec46b5 Mon Sep 17 00:00:00 2001 From: "shyyko.serhiy@gmail.com" Date: Wed, 13 Jan 2016 20:26:32 +0200 Subject: [PATCH 133/209] fixed recursiveClassReferenceTest test --- .../reference/recursiveClassReferenceTest.errors.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/baselines/reference/recursiveClassReferenceTest.errors.txt b/tests/baselines/reference/recursiveClassReferenceTest.errors.txt index 088d7222f48..76563a19b5a 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.errors.txt +++ b/tests/baselines/reference/recursiveClassReferenceTest.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/recursiveClassReferenceTest.ts(16,19): error TS2304: Cannot find name 'Element'. -tests/cases/compiler/recursiveClassReferenceTest.ts(56,11): error TS2304: Cannot find name 'domNode'. -tests/cases/compiler/recursiveClassReferenceTest.ts(88,36): error TS2304: Cannot find name 'mode'. +tests/cases/compiler/recursiveClassReferenceTest.ts(56,11): error TS2663: Cannot find name 'domNode'. Did you mean to prefix the object member with 'this', 'this.domNode'? +tests/cases/compiler/recursiveClassReferenceTest.ts(88,36): error TS2663: Cannot find name 'mode'. Did you mean to prefix the object member with 'this', 'this.mode'? tests/cases/compiler/recursiveClassReferenceTest.ts(95,21): error TS2345: Argument of type 'Window' is not assignable to parameter of type 'IMode'. Property 'getInitialState' is missing in type 'Window'. @@ -65,7 +65,7 @@ tests/cases/compiler/recursiveClassReferenceTest.ts(95,21): error TS2345: Argume public getDomNode() { return domNode; ~~~~~~~ -!!! error TS2304: Cannot find name 'domNode'. +!!! error TS2663: Cannot find name 'domNode'. Did you mean to prefix the object member with 'this', 'this.domNode'? } public destroy() { @@ -99,7 +99,7 @@ tests/cases/compiler/recursiveClassReferenceTest.ts(95,21): error TS2345: Argume public getMode(): IMode { return mode; } ~~~~ -!!! error TS2304: Cannot find name 'mode'. +!!! error TS2663: Cannot find name 'mode'. Did you mean to prefix the object member with 'this', 'this.mode'? } export class Mode extends AbstractMode { From 1d817d2337631e525fc5cda2f0c1c09e0453bda1 Mon Sep 17 00:00:00 2001 From: "shyyko.serhiy@gmail.com" Date: Wed, 13 Jan 2016 20:28:39 +0200 Subject: [PATCH 134/209] fixed scopeCheckExtendedClassInsidePublicMethod2 test --- .../scopeCheckExtendedClassInsidePublicMethod2.errors.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.errors.txt b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.errors.txt index c59171bdf0e..d8fbf512bcd 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.errors.txt +++ b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/scopeCheckExtendedClassInsidePublicMethod2.ts(4,7): error TS2304: Cannot find name 'v'. +tests/cases/compiler/scopeCheckExtendedClassInsidePublicMethod2.ts(4,7): error TS2663: Cannot find name 'v'. Did you mean to prefix the object member with 'this', 'this.v'? tests/cases/compiler/scopeCheckExtendedClassInsidePublicMethod2.ts(6,7): error TS2304: Cannot find name 's'. @@ -8,7 +8,7 @@ tests/cases/compiler/scopeCheckExtendedClassInsidePublicMethod2.ts(6,7): error T public c() { v = 1; ~ -!!! error TS2304: Cannot find name 'v'. +!!! error TS2663: Cannot find name 'v'. Did you mean to prefix the object member with 'this', 'this.v'? this.p = 1; s = 1; ~ From da5235fc513895c8933f7bc26bb3711674ada24c Mon Sep 17 00:00:00 2001 From: "shyyko.serhiy@gmail.com" Date: Wed, 13 Jan 2016 20:34:55 +0200 Subject: [PATCH 135/209] fixed scopeCheckExtendedClassInsideStaticMethod1 test --- .../scopeCheckExtendedClassInsideStaticMethod1.errors.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.errors.txt b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.errors.txt index a6ecd488278..ac9381272e8 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.errors.txt +++ b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/scopeCheckExtendedClassInsideStaticMethod1.ts(4,7): error TS2304: Cannot find name 'v'. tests/cases/compiler/scopeCheckExtendedClassInsideStaticMethod1.ts(5,12): error TS2339: Property 'p' does not exist on type 'typeof D'. -tests/cases/compiler/scopeCheckExtendedClassInsideStaticMethod1.ts(6,7): error TS2304: Cannot find name 's'. +tests/cases/compiler/scopeCheckExtendedClassInsideStaticMethod1.ts(6,7): error TS2662: Cannot find name 's'. Did you mean to prefix the static member with the class name, 'D.s'? ==== tests/cases/compiler/scopeCheckExtendedClassInsideStaticMethod1.ts (3 errors) ==== @@ -15,6 +15,6 @@ tests/cases/compiler/scopeCheckExtendedClassInsideStaticMethod1.ts(6,7): error T !!! error TS2339: Property 'p' does not exist on type 'typeof D'. s = 1; ~ -!!! error TS2304: Cannot find name 's'. +!!! error TS2662: Cannot find name 's'. Did you mean to prefix the static member with the class name, 'D.s'? } } \ No newline at end of file From dc426683aff2fd92ae9b9c1c0121c8a2789c97f6 Mon Sep 17 00:00:00 2001 From: "shyyko.serhiy@gmail.com" Date: Wed, 13 Jan 2016 20:35:49 +0200 Subject: [PATCH 136/209] fixed unqualifiedCallToClassStatic1 test --- .../reference/unqualifiedCallToClassStatic1.errors.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/baselines/reference/unqualifiedCallToClassStatic1.errors.txt b/tests/baselines/reference/unqualifiedCallToClassStatic1.errors.txt index af9edd115e9..190ea245459 100644 --- a/tests/baselines/reference/unqualifiedCallToClassStatic1.errors.txt +++ b/tests/baselines/reference/unqualifiedCallToClassStatic1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/unqualifiedCallToClassStatic1.ts(4,3): error TS2304: Cannot find name 'foo'. +tests/cases/compiler/unqualifiedCallToClassStatic1.ts(4,3): error TS2662: Cannot find name 'foo'. Did you mean to prefix the static member with the class name, 'Vector.foo'? ==== tests/cases/compiler/unqualifiedCallToClassStatic1.ts (1 errors) ==== @@ -7,6 +7,6 @@ tests/cases/compiler/unqualifiedCallToClassStatic1.ts(4,3): error TS2304: Cannot // 'foo' cannot be called in an unqualified manner. foo(); ~~~ -!!! error TS2304: Cannot find name 'foo'. +!!! error TS2662: Cannot find name 'foo'. Did you mean to prefix the static member with the class name, 'Vector.foo'? } } \ No newline at end of file From 02531af991ff3c7d420f5ff804d0806626ff11d7 Mon Sep 17 00:00:00 2001 From: Zhengbo Li Date: Wed, 13 Jan 2016 13:18:28 -0800 Subject: [PATCH 137/209] Update the watchedFileSet to use Path instead of string for file names --- src/compiler/sys.ts | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index f40de0bd65e..822ea5c1921 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -25,7 +25,7 @@ namespace ts { } interface WatchedFile { - fileName: string; + filePath: Path; callback: FileWatcherCallback; mtime?: Date; } @@ -244,13 +244,13 @@ namespace ts { return; } - _fs.stat(watchedFile.fileName, (err: any, stats: any) => { + _fs.stat(watchedFile.filePath, (err: any, stats: any) => { if (err) { - watchedFile.callback(watchedFile.fileName); + watchedFile.callback(watchedFile.filePath); } else if (watchedFile.mtime.getTime() !== stats.mtime.getTime()) { - watchedFile.mtime = getModifiedTime(watchedFile.fileName); - watchedFile.callback(watchedFile.fileName, watchedFile.mtime.getTime() === 0); + watchedFile.mtime = getModifiedTime(watchedFile.filePath); + watchedFile.callback(watchedFile.filePath, watchedFile.mtime.getTime() === 0); } }); } @@ -278,11 +278,11 @@ namespace ts { }, interval); } - function addFile(fileName: string, callback: FileWatcherCallback): WatchedFile { + function addFile(filePath: Path, callback: FileWatcherCallback): WatchedFile { const file: WatchedFile = { - fileName, + filePath, callback, - mtime: getModifiedTime(fileName) + mtime: getModifiedTime(filePath) }; watchedFiles.push(file); @@ -309,7 +309,6 @@ namespace ts { const dirWatchers = createFileMap(); // One file can have multiple watchers const fileWatcherCallbacks = createFileMap(); - const currentDirectory = process.cwd(); return { addFile, removeFile }; function reduceDirWatcherRefCount(dirPath: Path) { @@ -355,16 +354,15 @@ namespace ts { return undefined; } - function addFile(fileName: string, callback: FileWatcherCallback): WatchedFile { - const filePath = toPath(fileName, currentDirectory, getCanonicalPath); + function addFile(filePath: Path, callback: FileWatcherCallback): WatchedFile { addFileWatcherCallback(filePath, callback); addDirWatcher(getDirectoryPath(filePath)); - return { fileName, callback }; + return { filePath, callback }; } function removeFile(watchedFile: WatchedFile) { - const filePath = toPath(watchedFile.fileName, currentDirectory, getCanonicalPath); + const filePath = watchedFile.filePath; if (fileWatcherCallbacks.contains(filePath)) { const newCallbacks = copyListRemovingItem(watchedFile.callback, fileWatcherCallbacks.get(filePath)); if (newCallbacks.length === 0) { @@ -513,7 +511,7 @@ namespace ts { // and https://github.com/Microsoft/TypeScript/issues/4643), therefore // if the current node.js version is newer than 4, use `fs.watch` instead. const watchSet = isNode4OrLater() ? watchedFileSet : pollingWatchedFileSet; - const watchedFile = watchSet.addFile(fileName, callback); + const watchedFile = watchSet.addFile(fileName, callback); return { close: () => watchSet.removeFile(watchedFile) }; From 1e11a557816d40ac9dff208a20db2690aeab4902 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 13 Jan 2016 13:39:12 -0800 Subject: [PATCH 138/209] address PR feedback --- src/compiler/checker.ts | 7 ++-- src/compiler/diagnosticMessages.json | 2 +- .../reference/globalIsContextualKeyword.js | 34 +++++++++++++++++++ .../globalIsContextualKeyword.symbols | 29 ++++++++++++++++ .../reference/globalIsContextualKeyword.types | 32 +++++++++++++++++ ...ugmentationDisallowedExtensions.errors.txt | 20 ++++++++--- .../moduleAugmentationDisallowedExtensions.js | 10 ++++++ ...eAugmentationImportsAndExports2.errors.txt | 4 +-- .../compiler/globalIsContextualKeyword.ts | 16 +++++++++ .../moduleAugmentationDisallowedExtensions.ts | 7 ++++ 10 files changed, 151 insertions(+), 10 deletions(-) create mode 100644 tests/baselines/reference/globalIsContextualKeyword.js create mode 100644 tests/baselines/reference/globalIsContextualKeyword.symbols create mode 100644 tests/baselines/reference/globalIsContextualKeyword.types create mode 100644 tests/cases/compiler/globalIsContextualKeyword.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 173ffcb8fee..de3d8fde307 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -14289,8 +14289,9 @@ namespace ts { } } break; + case SyntaxKind.ExportAssignment: case SyntaxKind.ExportDeclaration: - grammarErrorOnFirstToken(node, Diagnostics.Exports_are_not_permitted_in_module_augmentations); + grammarErrorOnFirstToken(node, Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); break; case SyntaxKind.ImportEqualsDeclaration: if ((node).moduleReference.kind !== SyntaxKind.StringLiteral) { @@ -14564,7 +14565,9 @@ namespace ts { const exportEqualsSymbol = moduleSymbol.exports["export="]; if (exportEqualsSymbol && hasExportedMembers(moduleSymbol)) { const declaration = getDeclarationOfAliasSymbol(exportEqualsSymbol) || exportEqualsSymbol.valueDeclaration; - error(declaration, Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); + if (!isTopLevelInExternalModuleAugmentation(declaration)) { + error(declaration, Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); + } } // Checks for export * conflicts const exports = getExportsOfModule(moduleSymbol); diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index fff6f75d20d..2ffaccec7f0 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1783,7 +1783,7 @@ "category": "Error", "code": 2663 }, - "Exports are not permitted in module augmentations.": { + "Exports and export assignments are not permitted in module augmentations.": { "category": "Error", "code": 2664 }, diff --git a/tests/baselines/reference/globalIsContextualKeyword.js b/tests/baselines/reference/globalIsContextualKeyword.js new file mode 100644 index 00000000000..b6fa566c91a --- /dev/null +++ b/tests/baselines/reference/globalIsContextualKeyword.js @@ -0,0 +1,34 @@ +//// [globalIsContextualKeyword.ts] +function a() { + let global = 1; +} +function b() { + class global {} +} + +namespace global { +} + +function foo(global: number) { +} + +let obj = { + global: "123" +} + +//// [globalIsContextualKeyword.js] +function a() { + var global = 1; +} +function b() { + var global = (function () { + function global() { + } + return global; + }()); +} +function foo(global) { +} +var obj = { + global: "123" +}; diff --git a/tests/baselines/reference/globalIsContextualKeyword.symbols b/tests/baselines/reference/globalIsContextualKeyword.symbols new file mode 100644 index 00000000000..edc1cebbc95 --- /dev/null +++ b/tests/baselines/reference/globalIsContextualKeyword.symbols @@ -0,0 +1,29 @@ +=== tests/cases/compiler/globalIsContextualKeyword.ts === +function a() { +>a : Symbol(a, Decl(globalIsContextualKeyword.ts, 0, 0)) + + let global = 1; +>global : Symbol(global, Decl(globalIsContextualKeyword.ts, 1, 7)) +} +function b() { +>b : Symbol(b, Decl(globalIsContextualKeyword.ts, 2, 1)) + + class global {} +>global : Symbol(global, Decl(globalIsContextualKeyword.ts, 3, 14)) +} + +namespace global { +>global : Symbol(global, Decl(globalIsContextualKeyword.ts, 5, 1)) +} + +function foo(global: number) { +>foo : Symbol(foo, Decl(globalIsContextualKeyword.ts, 8, 1)) +>global : Symbol(global, Decl(globalIsContextualKeyword.ts, 10, 13)) +} + +let obj = { +>obj : Symbol(obj, Decl(globalIsContextualKeyword.ts, 13, 3)) + + global: "123" +>global : Symbol(global, Decl(globalIsContextualKeyword.ts, 13, 11)) +} diff --git a/tests/baselines/reference/globalIsContextualKeyword.types b/tests/baselines/reference/globalIsContextualKeyword.types new file mode 100644 index 00000000000..d0bf624af6d --- /dev/null +++ b/tests/baselines/reference/globalIsContextualKeyword.types @@ -0,0 +1,32 @@ +=== tests/cases/compiler/globalIsContextualKeyword.ts === +function a() { +>a : () => void + + let global = 1; +>global : number +>1 : number +} +function b() { +>b : () => void + + class global {} +>global : global +} + +namespace global { +>global : any +} + +function foo(global: number) { +>foo : (global: number) => void +>global : number +} + +let obj = { +>obj : { global: string; } +>{ global: "123"} : { global: string; } + + global: "123" +>global : string +>"123" : string +} diff --git a/tests/baselines/reference/moduleAugmentationDisallowedExtensions.errors.txt b/tests/baselines/reference/moduleAugmentationDisallowedExtensions.errors.txt index b4ca1bfa667..f90b07dd815 100644 --- a/tests/baselines/reference/moduleAugmentationDisallowedExtensions.errors.txt +++ b/tests/baselines/reference/moduleAugmentationDisallowedExtensions.errors.txt @@ -12,17 +12,18 @@ tests/cases/compiler/x.ts(18,5): error TS2665: Imports are not permitted in modu tests/cases/compiler/x.ts(18,26): error TS2307: Cannot find module './x0'. tests/cases/compiler/x.ts(19,5): error TS2665: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. tests/cases/compiler/x.ts(19,21): error TS2307: Cannot find module './x0'. -tests/cases/compiler/x.ts(20,5): error TS2664: Exports are not permitted in module augmentations. +tests/cases/compiler/x.ts(20,5): error TS2664: Exports and export assignments are not permitted in module augmentations. tests/cases/compiler/x.ts(20,19): error TS2307: Cannot find module './x0'. -tests/cases/compiler/x.ts(21,5): error TS2664: Exports are not permitted in module augmentations. +tests/cases/compiler/x.ts(21,5): error TS2664: Exports and export assignments are not permitted in module augmentations. tests/cases/compiler/x.ts(21,21): error TS2307: Cannot find module './x0'. +tests/cases/compiler/x.ts(25,5): error TS2664: Exports and export assignments are not permitted in module augmentations. ==== tests/cases/compiler/x0.ts (0 errors) ==== export let a = 1; -==== tests/cases/compiler/x.ts (18 errors) ==== +==== tests/cases/compiler/x.ts (19 errors) ==== namespace N1 { export let x = 1; @@ -72,15 +73,21 @@ tests/cases/compiler/x.ts(21,21): error TS2307: Cannot find module './x0'. !!! error TS2307: Cannot find module './x0'. export * from "./x0"; ~~~~~~ -!!! error TS2664: Exports are not permitted in module augmentations. +!!! error TS2664: Exports and export assignments are not permitted in module augmentations. ~~~~~~ !!! error TS2307: Cannot find module './x0'. export {a} from "./x0"; ~~~~~~ -!!! error TS2664: Exports are not permitted in module augmentations. +!!! error TS2664: Exports and export assignments are not permitted in module augmentations. ~~~~~~ !!! error TS2307: Cannot find module './x0'. } + + declare module "./test" { + export = N1; + ~~~~~~ +!!! error TS2664: Exports and export assignments are not permitted in module augmentations. + } export {} ==== tests/cases/compiler/observable.ts (0 errors) ==== @@ -89,6 +96,9 @@ tests/cases/compiler/x.ts(21,21): error TS2307: Cannot find module './x0'. } export var x = 1; +==== tests/cases/compiler/test.ts (0 errors) ==== + export let b = 1; + ==== tests/cases/compiler/main.ts (0 errors) ==== import { Observable } from "./observable" import "./x"; diff --git a/tests/baselines/reference/moduleAugmentationDisallowedExtensions.js b/tests/baselines/reference/moduleAugmentationDisallowedExtensions.js index f5378b7c5bd..62b14d71277 100644 --- a/tests/baselines/reference/moduleAugmentationDisallowedExtensions.js +++ b/tests/baselines/reference/moduleAugmentationDisallowedExtensions.js @@ -27,6 +27,10 @@ declare module "./observable" { export * from "./x0"; export {a} from "./x0"; } + +declare module "./test" { + export = N1; +} export {} //// [observable.ts] @@ -35,6 +39,9 @@ export declare class Observable { } export var x = 1; +//// [test.ts] +export let b = 1; + //// [main.ts] import { Observable } from "./observable" import "./x"; @@ -52,6 +59,9 @@ var N1; //// [observable.js] "use strict"; exports.x = 1; +//// [test.js] +"use strict"; +exports.b = 1; //// [main.js] "use strict"; require("./x"); diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports2.errors.txt b/tests/baselines/reference/moduleAugmentationImportsAndExports2.errors.txt index 360c89080a9..95bd0a714e0 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports2.errors.txt +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports2.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/f3.ts(11,5): error TS2665: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. tests/cases/compiler/f3.ts(11,21): error TS2307: Cannot find module './f2'. -tests/cases/compiler/f3.ts(12,5): error TS2664: Exports are not permitted in module augmentations. +tests/cases/compiler/f3.ts(12,5): error TS2664: Exports and export assignments are not permitted in module augmentations. tests/cases/compiler/f3.ts(12,21): error TS2307: Cannot find module './f2'. tests/cases/compiler/f3.ts(13,12): error TS2663: Module augmentation cannot introduce new names in the top level scope. tests/cases/compiler/f3.ts(13,16): error TS4000: Import declaration 'I' is using private name 'N'. @@ -37,7 +37,7 @@ tests/cases/compiler/f4.ts(5,11): error TS2339: Property 'foo' does not exist on !!! error TS2307: Cannot find module './f2'. export {B} from "./f2"; ~~~~~~ -!!! error TS2664: Exports are not permitted in module augmentations. +!!! error TS2664: Exports and export assignments are not permitted in module augmentations. ~~~~~~ !!! error TS2307: Cannot find module './f2'. import I = N.Ifc; diff --git a/tests/cases/compiler/globalIsContextualKeyword.ts b/tests/cases/compiler/globalIsContextualKeyword.ts new file mode 100644 index 00000000000..ceae834a267 --- /dev/null +++ b/tests/cases/compiler/globalIsContextualKeyword.ts @@ -0,0 +1,16 @@ +function a() { + let global = 1; +} +function b() { + class global {} +} + +namespace global { +} + +function foo(global: number) { +} + +let obj = { + global: "123" +} \ No newline at end of file diff --git a/tests/cases/compiler/moduleAugmentationDisallowedExtensions.ts b/tests/cases/compiler/moduleAugmentationDisallowedExtensions.ts index 28e46c71b33..116c5cb7820 100644 --- a/tests/cases/compiler/moduleAugmentationDisallowedExtensions.ts +++ b/tests/cases/compiler/moduleAugmentationDisallowedExtensions.ts @@ -26,6 +26,10 @@ declare module "./observable" { export * from "./x0"; export {a} from "./x0"; } + +declare module "./test" { + export = N1; +} export {} // @filename: observable.ts @@ -34,6 +38,9 @@ export declare class Observable { } export var x = 1; +// @filename: test.ts +export let b = 1; + // @filename: main.ts import { Observable } from "./observable" import "./x"; From 05b1dffc88ab6be902fafa82696d330a9686599d Mon Sep 17 00:00:00 2001 From: "shyyko.serhiy@gmail.com" Date: Thu, 14 Jan 2016 00:01:59 +0200 Subject: [PATCH 139/209] changed name of checkForMissingPrefix to checkAndReportErrorForMissingPrefix --- src/compiler/checker.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index fdce825e292..1df5a625c2b 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -740,7 +740,7 @@ namespace ts { if (!result) { if (nameNotFoundMessage) { - if (!checkForMissingPrefix(errorLocation, name, nameArg)) { + if (!checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg)) { error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : declarationNameToString(nameArg)); } } @@ -779,10 +779,11 @@ namespace ts { return result; } - function checkForMissingPrefix(errorLocation: Node, name: string, nameArg: string | Identifier): boolean { + function checkAndReportErrorForMissingPrefix(errorLocation: Node, name: string, nameArg: string | Identifier): boolean { if (!errorLocation || (errorLocation.kind === SyntaxKind.Identifier && (isTypeReferenceIdentifier(errorLocation)) || isInTypeQuery(errorLocation))) { return false; } + const container = getThisContainer(errorLocation, /* includeArrowFunctions */ true); let location = container; while (location) { From 067573b0c3e387835452f1d703b877f055f4cbc5 Mon Sep 17 00:00:00 2001 From: Zhengbo Li Date: Wed, 13 Jan 2016 14:02:34 -0800 Subject: [PATCH 140/209] cr feedback: simplify the removeFile function --- src/compiler/sys.ts | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 822ea5c1921..073a662ce1c 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -311,12 +311,15 @@ namespace ts { const fileWatcherCallbacks = createFileMap(); return { addFile, removeFile }; - function reduceDirWatcherRefCount(dirPath: Path) { - const watcher = dirWatchers.get(dirPath); - watcher.referenceCount -= 1; - if (watcher.referenceCount <= 0) { - watcher.close(); - dirWatchers.remove(dirPath); + function reduceDirWatcherRefCountForFile(filePath: Path) { + const dirPath = getDirectoryPath(filePath); + if (dirWatchers.contains(dirPath)) { + const watcher = dirWatchers.get(dirPath); + watcher.referenceCount -= 1; + if (watcher.referenceCount <= 0) { + watcher.close(); + dirWatchers.remove(dirPath); + } } } @@ -346,14 +349,6 @@ namespace ts { } } - function findWatchedDirForFile(filePath: Path): Path { - const dirPath = getDirectoryPath(filePath); - if (dirWatchers.contains(dirPath)) { - return dirPath; - } - return undefined; - } - function addFile(filePath: Path, callback: FileWatcherCallback): WatchedFile { addFileWatcherCallback(filePath, callback); addDirWatcher(getDirectoryPath(filePath)); @@ -362,15 +357,15 @@ namespace ts { } function removeFile(watchedFile: WatchedFile) { - const filePath = watchedFile.filePath; + removeFileWatcherCallback(watchedFile.filePath, watchedFile.callback); + reduceDirWatcherRefCountForFile(watchedFile.filePath); + } + + function removeFileWatcherCallback(filePath: Path, callback: FileWatcherCallback) { if (fileWatcherCallbacks.contains(filePath)) { - const newCallbacks = copyListRemovingItem(watchedFile.callback, fileWatcherCallbacks.get(filePath)); + const newCallbacks = copyListRemovingItem(callback, fileWatcherCallbacks.get(filePath)); if (newCallbacks.length === 0) { fileWatcherCallbacks.remove(filePath); - const watchedDir = findWatchedDirForFile(filePath); - if (watchedDir) { - reduceDirWatcherRefCount(watchedDir); - } } else { fileWatcherCallbacks.set(filePath, newCallbacks); From 2294ef88919ef9175ef76c63c005af2d3e286f80 Mon Sep 17 00:00:00 2001 From: pcbro <2bux89+dk3zspjmuh16o@sharklasers.com> Date: Wed, 13 Jan 2016 23:43:41 +0100 Subject: [PATCH 141/209] Update utilities.ts --- src/compiler/utilities.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 7bc708c7178..3553430bcde 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -779,7 +779,7 @@ namespace ts { * Given an super call\property node returns a closest node where either * - super call\property is legal in the node and not legal in the parent node the node. * i.e. super call is legal in constructor but not legal in the class body. - * - node is arrow function (so caller might need to call getSuperContainer in case if he needs to climb higher) + * - node is arrow function (so caller might need to call getSuperContainer in case it needs to climb higher) * - super call\property is definitely illegal in the node (but might be legal in some subnode) * i.e. super property access is illegal in function declaration but can be legal in the statement list */ From 4d065ffbf8a57d93bdaa7aac85e3fdeea004bbcf Mon Sep 17 00:00:00 2001 From: pcbro <2bux89+dk3zspjmuh16o@sharklasers.com> Date: Wed, 13 Jan 2016 17:01:53 -0600 Subject: [PATCH 142/209] Use gender-neutral language --- lib/typescript.js | 2 +- lib/typescriptServices.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/typescript.js b/lib/typescript.js index 1e2f51f5aae..6608f585b61 100644 --- a/lib/typescript.js +++ b/lib/typescript.js @@ -5037,7 +5037,7 @@ var ts; * Given an super call\property node returns a closest node where either * - super call\property is legal in the node and not legal in the parent node the node. * i.e. super call is legal in constructor but not legal in the class body. - * - node is arrow function (so caller might need to call getSuperContainer in case if he needs to climb higher) + * - node is arrow function (so caller might need to call getSuperContainer in case it needs to climb higher) * - super call\property is definitely illegal in the node (but might be legal in some subnode) * i.e. super property access is illegal in function declaration but can be legal in the statement list */ diff --git a/lib/typescriptServices.js b/lib/typescriptServices.js index 1e2f51f5aae..6608f585b61 100644 --- a/lib/typescriptServices.js +++ b/lib/typescriptServices.js @@ -5037,7 +5037,7 @@ var ts; * Given an super call\property node returns a closest node where either * - super call\property is legal in the node and not legal in the parent node the node. * i.e. super call is legal in constructor but not legal in the class body. - * - node is arrow function (so caller might need to call getSuperContainer in case if he needs to climb higher) + * - node is arrow function (so caller might need to call getSuperContainer in case it needs to climb higher) * - super call\property is definitely illegal in the node (but might be legal in some subnode) * i.e. super property access is illegal in function declaration but can be legal in the statement list */ From 3391abf51ac009ab6c4572a2ea31f781fbc9e623 Mon Sep 17 00:00:00 2001 From: Yui T Date: Wed, 13 Jan 2016 15:10:29 -0800 Subject: [PATCH 143/209] Address PR --- src/services/services.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/services/services.ts b/src/services/services.ts index ce41db2205f..9c131f8f044 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -5983,7 +5983,7 @@ namespace ts { // Add symbol of properties/methods of the same name in base classes and implemented interfaces definitions if (rootSymbol.parent && rootSymbol.parent.flags & (SymbolFlags.Class | SymbolFlags.Interface)) { - getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result, {}); + getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result, /*previousIterationSymbolsCache*/ {}); } }); @@ -6000,8 +6000,8 @@ namespace ts { */ function getPropertySymbolsFromBaseTypes(symbol: Symbol, propertyName: string, result: Symbol[], previousIterationSymbolsCache: SymbolTable): void { - // If the current symbol is the smae as the previous-iteration symbol, we can just return as the symbol has already been visited - // This is particularly important for the following cases, so that we do not inifinitely visit the same symbol. + // If the current symbol is the same as the previous-iteration symbol, we can just return the symbol that has already been visited + // This is particularly important for the following cases, so that we do not infinitely visit the same symbol. // For example: // interface C extends C { // /*findRef*/propName: string; @@ -6080,7 +6080,7 @@ namespace ts { // see if any is in the list if (rootSymbol.parent && rootSymbol.parent.flags & (SymbolFlags.Class | SymbolFlags.Interface)) { const result: Symbol[] = []; - getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result, {}); + getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result, /*previousIterationSymbolsCache*/ {}); return forEach(result, s => searchSymbols.indexOf(s) >= 0 ? s : undefined); } From 21baedfebab8224ac5ed0168b35b38fbd7ed6f4f Mon Sep 17 00:00:00 2001 From: "shyyko.serhiy@gmail.com" Date: Thu, 14 Jan 2016 01:14:33 +0200 Subject: [PATCH 144/209] changed messages text in checkAndReportErrorForMissingPrefix --- src/compiler/checker.ts | 4 ++-- src/compiler/diagnosticMessages.json | 4 ++-- .../YieldExpression11_es6.errors.txt | 4 ++-- ...eferencingConstructorParameters.errors.txt | 8 ++++---- .../reference/parserharness.errors.txt | 20 +++++++++---------- .../reference/parserindenter.errors.txt | 4 ++-- .../recursiveClassReferenceTest.errors.txt | 8 ++++---- .../reference/scannertest1.errors.txt | 12 +++++------ ...xtendedClassInsidePublicMethod2.errors.txt | 4 ++-- ...xtendedClassInsideStaticMethod1.errors.txt | 4 ++-- .../unqualifiedCallToClassStatic1.errors.txt | 4 ++-- 11 files changed, 38 insertions(+), 38 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 1df5a625c2b..d618397f885 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -793,7 +793,7 @@ namespace ts { if (location.flags & NodeFlags.Static) { classType = getTypeOfSymbol(symbol); if (getPropertyOfType(classType, name)) { - error(errorLocation, Diagnostics.Cannot_find_name_0_Did_you_mean_to_prefix_the_static_member_with_the_class_name_1_0, typeof nameArg === "string" ? nameArg : declarationNameToString(nameArg), symbolToString(symbol)); + error(errorLocation, Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0, typeof nameArg === "string" ? nameArg : declarationNameToString(nameArg), symbolToString(symbol)); return true; } } @@ -801,7 +801,7 @@ namespace ts { if (location === container) { classType = (getDeclaredTypeOfSymbol(symbol)).thisType; if (getPropertyOfType(classType, name)) { - error(errorLocation, Diagnostics.Cannot_find_name_0_Did_you_mean_to_prefix_the_object_member_with_this_this_0, typeof nameArg === "string" ? nameArg : declarationNameToString(nameArg)); + error(errorLocation, Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0, typeof nameArg === "string" ? nameArg : declarationNameToString(nameArg)); return true; } } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 7f1c195ae20..0453df0a9bf 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1775,11 +1775,11 @@ "category": "Error", "code": 2661 }, - "Cannot find name '{0}'. Did you mean to prefix the static member with the class name, '{1}.{0}'?": { + "Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?": { "category": "Error", "code": 2662 }, - "Cannot find name '{0}'. Did you mean to prefix the object member with 'this', 'this.{0}'?": { + "Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?": { "category": "Error", "code": 2663 }, diff --git a/tests/baselines/reference/YieldExpression11_es6.errors.txt b/tests/baselines/reference/YieldExpression11_es6.errors.txt index 4a2f93a9c6d..1b0c08bd79a 100644 --- a/tests/baselines/reference/YieldExpression11_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression11_es6.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts(2,3): error TS1220: Generators are only available when targeting ECMAScript 6 or higher. -tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts(3,11): error TS2663: Cannot find name 'foo'. Did you mean to prefix the object member with 'this', 'this.foo'? +tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts(3,11): error TS2663: Cannot find name 'foo'. Did you mean the instance member 'this.foo'? ==== tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts (2 errors) ==== @@ -9,6 +9,6 @@ tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts(3,11): err !!! error TS1220: Generators are only available when targeting ECMAScript 6 or higher. yield(foo); ~~~ -!!! error TS2663: Cannot find name 'foo'. Did you mean to prefix the object member with 'this', 'this.foo'? +!!! error TS2663: Cannot find name 'foo'. Did you mean the instance member 'this.foo'? } } \ No newline at end of file diff --git a/tests/baselines/reference/initializerReferencingConstructorParameters.errors.txt b/tests/baselines/reference/initializerReferencingConstructorParameters.errors.txt index 03e4e83e409..eb6744d656b 100644 --- a/tests/baselines/reference/initializerReferencingConstructorParameters.errors.txt +++ b/tests/baselines/reference/initializerReferencingConstructorParameters.errors.txt @@ -1,9 +1,9 @@ tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(4,9): error TS2304: Cannot find name 'x'. tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(5,15): error TS2304: Cannot find name 'x'. -tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(10,9): error TS2663: Cannot find name 'x'. Did you mean to prefix the object member with 'this', 'this.x'? +tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(10,9): error TS2663: Cannot find name 'x'. Did you mean the instance member 'this.x'? tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(11,15): error TS2304: Cannot find name 'x'. tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(17,15): error TS1003: Identifier expected. -tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(23,9): error TS2663: Cannot find name 'x'. Did you mean to prefix the object member with 'this', 'this.x'? +tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(23,9): error TS2663: Cannot find name 'x'. Did you mean the instance member 'this.x'? ==== tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts (6 errors) ==== @@ -22,7 +22,7 @@ tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencin class D { a = x; // error ~ -!!! error TS2663: Cannot find name 'x'. Did you mean to prefix the object member with 'this', 'this.x'? +!!! error TS2663: Cannot find name 'x'. Did you mean the instance member 'this.x'? b: typeof x; // error ~ !!! error TS2304: Cannot find name 'x'. @@ -41,6 +41,6 @@ tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencin a = this.x; // ok b = x; // error ~ -!!! error TS2663: Cannot find name 'x'. Did you mean to prefix the object member with 'this', 'this.x'? +!!! error TS2663: Cannot find name 'x'. Did you mean the instance member 'this.x'? constructor(public x: T) { } } \ No newline at end of file diff --git a/tests/baselines/reference/parserharness.errors.txt b/tests/baselines/reference/parserharness.errors.txt index 711d3fd9aac..963ce12ddf1 100644 --- a/tests/baselines/reference/parserharness.errors.txt +++ b/tests/baselines/reference/parserharness.errors.txt @@ -7,11 +7,11 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(25,17): er tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(41,12): error TS2304: Cannot find name 'ActiveXObject'. tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(43,19): error TS2304: Cannot find name 'require'. tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(44,14): error TS2304: Cannot find name 'require'. -tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(341,13): error TS2662: Cannot find name 'errorHandlerStack'. Did you mean to prefix the static member with the class name, 'Runnable.errorHandlerStack'? -tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(347,13): error TS2662: Cannot find name 'errorHandlerStack'. Did you mean to prefix the static member with the class name, 'Runnable.errorHandlerStack'? -tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(351,17): error TS2662: Cannot find name 'errorHandlerStack'. Did you mean to prefix the static member with the class name, 'Runnable.errorHandlerStack'? -tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(354,17): error TS2662: Cannot find name 'errorHandlerStack'. Did you mean to prefix the static member with the class name, 'Runnable.errorHandlerStack'? -tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(354,35): error TS2662: Cannot find name 'errorHandlerStack'. Did you mean to prefix the static member with the class name, 'Runnable.errorHandlerStack'? +tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(341,13): error TS2662: Cannot find name 'errorHandlerStack'. Did you mean the static member 'Runnable.errorHandlerStack'? +tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(347,13): error TS2662: Cannot find name 'errorHandlerStack'. Did you mean the static member 'Runnable.errorHandlerStack'? +tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(351,17): error TS2662: Cannot find name 'errorHandlerStack'. Did you mean the static member 'Runnable.errorHandlerStack'? +tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(354,17): error TS2662: Cannot find name 'errorHandlerStack'. Did you mean the static member 'Runnable.errorHandlerStack'? +tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(354,35): error TS2662: Cannot find name 'errorHandlerStack'. Did you mean the static member 'Runnable.errorHandlerStack'? tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(691,50): error TS2304: Cannot find name 'ITextWriter'. tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(716,47): error TS2503: Cannot find namespace 'TypeScript'. tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(721,62): error TS2304: Cannot find name 'ITextWriter'. @@ -471,7 +471,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): static pushGlobalErrorHandler(done: IDone) { errorHandlerStack.push(function (e) { ~~~~~~~~~~~~~~~~~ -!!! error TS2662: Cannot find name 'errorHandlerStack'. Did you mean to prefix the static member with the class name, 'Runnable.errorHandlerStack'? +!!! error TS2662: Cannot find name 'errorHandlerStack'. Did you mean the static member 'Runnable.errorHandlerStack'? done(e); }); } @@ -479,20 +479,20 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): static popGlobalErrorHandler() { errorHandlerStack.pop(); ~~~~~~~~~~~~~~~~~ -!!! error TS2662: Cannot find name 'errorHandlerStack'. Did you mean to prefix the static member with the class name, 'Runnable.errorHandlerStack'? +!!! error TS2662: Cannot find name 'errorHandlerStack'. Did you mean the static member 'Runnable.errorHandlerStack'? } static handleError(e: Error) { if (errorHandlerStack.length === 0) { ~~~~~~~~~~~~~~~~~ -!!! error TS2662: Cannot find name 'errorHandlerStack'. Did you mean to prefix the static member with the class name, 'Runnable.errorHandlerStack'? +!!! error TS2662: Cannot find name 'errorHandlerStack'. Did you mean the static member 'Runnable.errorHandlerStack'? IO.printLine('Global error: ' + e); } else { errorHandlerStack[errorHandlerStack.length - 1](e); ~~~~~~~~~~~~~~~~~ -!!! error TS2662: Cannot find name 'errorHandlerStack'. Did you mean to prefix the static member with the class name, 'Runnable.errorHandlerStack'? +!!! error TS2662: Cannot find name 'errorHandlerStack'. Did you mean the static member 'Runnable.errorHandlerStack'? ~~~~~~~~~~~~~~~~~ -!!! error TS2662: Cannot find name 'errorHandlerStack'. Did you mean to prefix the static member with the class name, 'Runnable.errorHandlerStack'? +!!! error TS2662: Cannot find name 'errorHandlerStack'. Did you mean the static member 'Runnable.errorHandlerStack'? } } } diff --git a/tests/baselines/reference/parserindenter.errors.txt b/tests/baselines/reference/parserindenter.errors.txt index d892f27579f..8ccc9220710 100644 --- a/tests/baselines/reference/parserindenter.errors.txt +++ b/tests/baselines/reference/parserindenter.errors.txt @@ -28,7 +28,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts(152,63): tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts(153,30): error TS2304: Cannot find name 'List_TextEditInfo'. tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts(155,32): error TS2304: Cannot find name 'AuthorTokenKind'. tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts(182,79): error TS2503: Cannot find namespace 'Services'. -tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts(183,20): error TS2662: Cannot find name 'GetIndentSizeFromText'. Did you mean to prefix the static member with the class name, 'Indenter.GetIndentSizeFromText'? +tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts(183,20): error TS2662: Cannot find name 'GetIndentSizeFromText'. Did you mean the static member 'Indenter.GetIndentSizeFromText'? tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts(186,67): error TS2503: Cannot find namespace 'Services'. tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts(207,50): error TS2304: Cannot find name 'TokenSpan'. tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts(207,67): error TS2304: Cannot find name 'ParseNode'. @@ -373,7 +373,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts(736,38): !!! error TS2503: Cannot find namespace 'Services'. return GetIndentSizeFromText(indentText, editorOptions, /*includeNonIndentChars:*/ false); ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2662: Cannot find name 'GetIndentSizeFromText'. Did you mean to prefix the static member with the class name, 'Indenter.GetIndentSizeFromText'? +!!! error TS2662: Cannot find name 'GetIndentSizeFromText'. Did you mean the static member 'Indenter.GetIndentSizeFromText'? } static GetIndentSizeFromText(text: string, editorOptions: Services.EditorOptions, includeNonIndentChars: boolean): number { diff --git a/tests/baselines/reference/recursiveClassReferenceTest.errors.txt b/tests/baselines/reference/recursiveClassReferenceTest.errors.txt index 76563a19b5a..4a1a6f1782c 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.errors.txt +++ b/tests/baselines/reference/recursiveClassReferenceTest.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/recursiveClassReferenceTest.ts(16,19): error TS2304: Cannot find name 'Element'. -tests/cases/compiler/recursiveClassReferenceTest.ts(56,11): error TS2663: Cannot find name 'domNode'. Did you mean to prefix the object member with 'this', 'this.domNode'? -tests/cases/compiler/recursiveClassReferenceTest.ts(88,36): error TS2663: Cannot find name 'mode'. Did you mean to prefix the object member with 'this', 'this.mode'? +tests/cases/compiler/recursiveClassReferenceTest.ts(56,11): error TS2663: Cannot find name 'domNode'. Did you mean the instance member 'this.domNode'? +tests/cases/compiler/recursiveClassReferenceTest.ts(88,36): error TS2663: Cannot find name 'mode'. Did you mean the instance member 'this.mode'? tests/cases/compiler/recursiveClassReferenceTest.ts(95,21): error TS2345: Argument of type 'Window' is not assignable to parameter of type 'IMode'. Property 'getInitialState' is missing in type 'Window'. @@ -65,7 +65,7 @@ tests/cases/compiler/recursiveClassReferenceTest.ts(95,21): error TS2345: Argume public getDomNode() { return domNode; ~~~~~~~ -!!! error TS2663: Cannot find name 'domNode'. Did you mean to prefix the object member with 'this', 'this.domNode'? +!!! error TS2663: Cannot find name 'domNode'. Did you mean the instance member 'this.domNode'? } public destroy() { @@ -99,7 +99,7 @@ tests/cases/compiler/recursiveClassReferenceTest.ts(95,21): error TS2345: Argume public getMode(): IMode { return mode; } ~~~~ -!!! error TS2663: Cannot find name 'mode'. Did you mean to prefix the object member with 'this', 'this.mode'? +!!! error TS2663: Cannot find name 'mode'. Did you mean the instance member 'this.mode'? } export class Mode extends AbstractMode { diff --git a/tests/baselines/reference/scannertest1.errors.txt b/tests/baselines/reference/scannertest1.errors.txt index 234923b5a2f..3831dbe398e 100644 --- a/tests/baselines/reference/scannertest1.errors.txt +++ b/tests/baselines/reference/scannertest1.errors.txt @@ -1,14 +1,14 @@ tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(1,1): error TS6053: File 'tests/cases/conformance/scanner/ecmascript5/References.ts' not found. tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(5,21): error TS2304: Cannot find name 'CharacterCodes'. tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(5,47): error TS2304: Cannot find name 'CharacterCodes'. -tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(9,16): error TS2662: Cannot find name 'isDecimalDigit'. Did you mean to prefix the static member with the class name, 'CharacterInfo.isDecimalDigit'? +tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(9,16): error TS2662: Cannot find name 'isDecimalDigit'. Did you mean the static member 'CharacterInfo.isDecimalDigit'? tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(10,22): error TS2304: Cannot find name 'CharacterCodes'. tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(10,47): error TS2304: Cannot find name 'CharacterCodes'. tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(11,22): error TS2304: Cannot find name 'CharacterCodes'. tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(11,47): error TS2304: Cannot find name 'CharacterCodes'. tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(15,9): error TS2304: Cannot find name 'Debug'. -tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(15,22): error TS2662: Cannot find name 'isHexDigit'. Did you mean to prefix the static member with the class name, 'CharacterInfo.isHexDigit'? -tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(16,16): error TS2662: Cannot find name 'isDecimalDigit'. Did you mean to prefix the static member with the class name, 'CharacterInfo.isDecimalDigit'? +tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(15,22): error TS2662: Cannot find name 'isHexDigit'. Did you mean the static member 'CharacterInfo.isHexDigit'? +tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(16,16): error TS2662: Cannot find name 'isDecimalDigit'. Did you mean the static member 'CharacterInfo.isDecimalDigit'? tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(17,20): error TS2304: Cannot find name 'CharacterCodes'. tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(18,21): error TS2304: Cannot find name 'CharacterCodes'. tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(18,46): error TS2304: Cannot find name 'CharacterCodes'. @@ -33,7 +33,7 @@ tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(20,23): error TS2304 public static isHexDigit(c: number): boolean { return isDecimalDigit(c) || ~~~~~~~~~~~~~~ -!!! error TS2662: Cannot find name 'isDecimalDigit'. Did you mean to prefix the static member with the class name, 'CharacterInfo.isDecimalDigit'? +!!! error TS2662: Cannot find name 'isDecimalDigit'. Did you mean the static member 'CharacterInfo.isDecimalDigit'? (c >= CharacterCodes.A && c <= CharacterCodes.F) || ~~~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'CharacterCodes'. @@ -51,10 +51,10 @@ tests/cases/conformance/scanner/ecmascript5/scannertest1.ts(20,23): error TS2304 ~~~~~ !!! error TS2304: Cannot find name 'Debug'. ~~~~~~~~~~ -!!! error TS2662: Cannot find name 'isHexDigit'. Did you mean to prefix the static member with the class name, 'CharacterInfo.isHexDigit'? +!!! error TS2662: Cannot find name 'isHexDigit'. Did you mean the static member 'CharacterInfo.isHexDigit'? return isDecimalDigit(c) ~~~~~~~~~~~~~~ -!!! error TS2662: Cannot find name 'isDecimalDigit'. Did you mean to prefix the static member with the class name, 'CharacterInfo.isDecimalDigit'? +!!! error TS2662: Cannot find name 'isDecimalDigit'. Did you mean the static member 'CharacterInfo.isDecimalDigit'? ? (c - CharacterCodes._0) ~~~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'CharacterCodes'. diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.errors.txt b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.errors.txt index d8fbf512bcd..91cb87dbeb8 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.errors.txt +++ b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/scopeCheckExtendedClassInsidePublicMethod2.ts(4,7): error TS2663: Cannot find name 'v'. Did you mean to prefix the object member with 'this', 'this.v'? +tests/cases/compiler/scopeCheckExtendedClassInsidePublicMethod2.ts(4,7): error TS2663: Cannot find name 'v'. Did you mean the instance member 'this.v'? tests/cases/compiler/scopeCheckExtendedClassInsidePublicMethod2.ts(6,7): error TS2304: Cannot find name 's'. @@ -8,7 +8,7 @@ tests/cases/compiler/scopeCheckExtendedClassInsidePublicMethod2.ts(6,7): error T public c() { v = 1; ~ -!!! error TS2663: Cannot find name 'v'. Did you mean to prefix the object member with 'this', 'this.v'? +!!! error TS2663: Cannot find name 'v'. Did you mean the instance member 'this.v'? this.p = 1; s = 1; ~ diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.errors.txt b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.errors.txt index ac9381272e8..dd3e5ef446b 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.errors.txt +++ b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/scopeCheckExtendedClassInsideStaticMethod1.ts(4,7): error TS2304: Cannot find name 'v'. tests/cases/compiler/scopeCheckExtendedClassInsideStaticMethod1.ts(5,12): error TS2339: Property 'p' does not exist on type 'typeof D'. -tests/cases/compiler/scopeCheckExtendedClassInsideStaticMethod1.ts(6,7): error TS2662: Cannot find name 's'. Did you mean to prefix the static member with the class name, 'D.s'? +tests/cases/compiler/scopeCheckExtendedClassInsideStaticMethod1.ts(6,7): error TS2662: Cannot find name 's'. Did you mean the static member 'D.s'? ==== tests/cases/compiler/scopeCheckExtendedClassInsideStaticMethod1.ts (3 errors) ==== @@ -15,6 +15,6 @@ tests/cases/compiler/scopeCheckExtendedClassInsideStaticMethod1.ts(6,7): error T !!! error TS2339: Property 'p' does not exist on type 'typeof D'. s = 1; ~ -!!! error TS2662: Cannot find name 's'. Did you mean to prefix the static member with the class name, 'D.s'? +!!! error TS2662: Cannot find name 's'. Did you mean the static member 'D.s'? } } \ No newline at end of file diff --git a/tests/baselines/reference/unqualifiedCallToClassStatic1.errors.txt b/tests/baselines/reference/unqualifiedCallToClassStatic1.errors.txt index 190ea245459..4152c182d45 100644 --- a/tests/baselines/reference/unqualifiedCallToClassStatic1.errors.txt +++ b/tests/baselines/reference/unqualifiedCallToClassStatic1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/unqualifiedCallToClassStatic1.ts(4,3): error TS2662: Cannot find name 'foo'. Did you mean to prefix the static member with the class name, 'Vector.foo'? +tests/cases/compiler/unqualifiedCallToClassStatic1.ts(4,3): error TS2662: Cannot find name 'foo'. Did you mean the static member 'Vector.foo'? ==== tests/cases/compiler/unqualifiedCallToClassStatic1.ts (1 errors) ==== @@ -7,6 +7,6 @@ tests/cases/compiler/unqualifiedCallToClassStatic1.ts(4,3): error TS2662: Cannot // 'foo' cannot be called in an unqualified manner. foo(); ~~~ -!!! error TS2662: Cannot find name 'foo'. Did you mean to prefix the static member with the class name, 'Vector.foo'? +!!! error TS2662: Cannot find name 'foo'. Did you mean the static member 'Vector.foo'? } } \ No newline at end of file From d4a04a11d2931341baac7a76d61de63b08f606a4 Mon Sep 17 00:00:00 2001 From: Yui T Date: Wed, 13 Jan 2016 16:48:48 -0800 Subject: [PATCH 145/209] Address PR --- src/services/services.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/services.ts b/src/services/services.ts index 9c131f8f044..dcc01300e96 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -6010,8 +6010,8 @@ namespace ts { // the symbol argument will be the symbol of an interface "C" and previousIterationSymbol is undefined, // the function will add any found symbol of the property-name, then its sub-routine will call // getPropertySymbolsFromBaseTypes again to walk up any base types to prevent revisiting already - // visited symbol, interface "C", the sub- routine will pass the current symbol as previousIterationSymbol. - if (previousIterationSymbolsCache && previousIterationSymbolsCache[symbol.name] === symbol) { + // visited symbol, interface "C", the sub-routine will pass the current symbol as previousIterationSymbol. + if (hasProperty(previousIterationSymbolsCache, symbol.name)) { return; } From c87bb376b5d0ffa6562712a74e55b828ee9895a1 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 13 Jan 2016 23:11:49 -0800 Subject: [PATCH 146/209] Propagate forced re-elaboration through relation functions. --- src/compiler/checker.ts | 89 ++++++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 41 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 226b3084293..bfee2d68a5c 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2,6 +2,12 @@ /* @internal */ namespace ts { + const enum ReportErrors { + None = 0, + Basic, + Elaborate, + } + let nextSymbolId = 1; let nextNodeId = 1; let nextMergeId = 1; @@ -4927,7 +4933,7 @@ namespace ts { function isSignatureAssignableTo(source: Signature, target: Signature, ignoreReturnTypes: boolean): boolean { - return compareSignaturesRelated(source, target, ignoreReturnTypes, /*errorReporter*/ undefined, compareTypesAssignable) !== Ternary.False; + return compareSignaturesRelated(source, target, ignoreReturnTypes, ReportErrors.None, /*errorReporter*/ undefined, compareTypesAssignable) !== Ternary.False; } /** @@ -4936,8 +4942,9 @@ namespace ts { function compareSignaturesRelated(source: Signature, target: Signature, ignoreReturnTypes: boolean, + reportErrors: ReportErrors, errorReporter: (d: DiagnosticMessage, arg0?: string, arg1?: string) => void, - compareTypes: (s: Type, t: Type, reportErrors?: boolean) => Ternary): Ternary { + compareTypes: (s: Type, t: Type, reportErrors?: ReportErrors) => Ternary): Ternary { // TODO (drosen): De-duplicate code between related functions. if (source === target) { return Ternary.True; @@ -4961,9 +4968,9 @@ namespace ts { for (let i = 0; i < checkCount; i++) { const s = i < sourceMax ? getTypeOfSymbol(sourceParams[i]) : getRestTypeOfSignature(source); const t = i < targetMax ? getTypeOfSymbol(targetParams[i]) : getRestTypeOfSignature(target); - const related = compareTypes(t, s, /*reportErrors*/ false) || compareTypes(s, t, !!errorReporter); + const related = compareTypes(t, s, /*reportErrors*/ ReportErrors.None) || compareTypes(s, t, reportErrors); if (!related) { - if (errorReporter) { + if (reportErrors) { errorReporter(Diagnostics.Types_of_parameters_0_and_1_are_incompatible, sourceParams[i < sourceMax ? i : sourceMax].name, targetParams[i < targetMax ? i : targetMax].name); @@ -4983,14 +4990,14 @@ namespace ts { // The following block preserves behavior forbidding boolean returning functions from being assignable to type guard returning functions if (targetReturnType.flags & TypeFlags.PredicateType && (targetReturnType as PredicateType).predicate.kind === TypePredicateKind.Identifier) { if (!(sourceReturnType.flags & TypeFlags.PredicateType)) { - if (errorReporter) { + if (reportErrors) { errorReporter(Diagnostics.Signature_0_must_have_a_type_predicate, signatureToString(source)); } return Ternary.False; } } - result &= compareTypes(sourceReturnType, targetReturnType, !!errorReporter); + result &= compareTypes(sourceReturnType, targetReturnType, reportErrors); } return result; @@ -5064,11 +5071,10 @@ namespace ts { let expandingFlags: number; let depth = 0; let overflow = false; - let elaborateErrors = false; Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking"); - const result = isRelatedTo(source, target, errorNode !== undefined, headMessage); + const result = isRelatedTo(source, target, !!errorNode ? ReportErrors.Basic : ReportErrors.None, headMessage); if (overflow) { error(errorNode, Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target)); } @@ -5079,8 +5085,7 @@ namespace ts { // where errors were being reported. if (errorInfo.next === undefined) { errorInfo = undefined; - elaborateErrors = true; - isRelatedTo(source, target, errorNode !== undefined, headMessage); + isRelatedTo(source, target, !!errorNode ? ReportErrors.Elaborate : ReportErrors.None, headMessage); } if (containingMessageChain) { errorInfo = concatenateDiagnosticMessageChains(containingMessageChain, errorInfo); @@ -5091,6 +5096,7 @@ namespace ts { return result !== Ternary.False; function reportError(message: DiagnosticMessage, arg0?: string, arg1?: string, arg2?: string): void { + Debug.assert(!!errorNode) errorInfo = chainDiagnosticMessages(errorInfo, message, arg0, arg1, arg2); } @@ -5108,7 +5114,7 @@ namespace ts { // Ternary.True if they are related with no assumptions, // Ternary.Maybe if they are related with assumptions of other relationships, or // Ternary.False if they are not related. - function isRelatedTo(source: Type, target: Type, reportErrors?: boolean, headMessage?: DiagnosticMessage): Ternary { + function isRelatedTo(source: Type, target: Type, reportErrors?: ReportErrors, headMessage?: DiagnosticMessage): Ternary { let result: Ternary; // both types are the same - covers 'they are the same primitive type or both are Any' or the same type parameter cases if (source === target) return Ternary.True; @@ -5196,7 +5202,7 @@ namespace ts { // A & B = (A & B) | (C & D). if (source.flags & TypeFlags.Intersection) { // If target is a union type the following check will report errors so we suppress them here - if (result = someTypeRelatedToType(source, target, reportErrors && !(target.flags & TypeFlags.Union))) { + if (result = someTypeRelatedToType(source, target, !(target.flags & TypeFlags.Union) ? reportErrors : ReportErrors.None)) { return result; } } @@ -5213,7 +5219,7 @@ namespace ts { constraint = emptyObjectType; } // Report constraint errors only if the constraint is not the empty object type - const reportConstraintErrors = reportErrors && constraint !== emptyObjectType; + const reportConstraintErrors = constraint !== emptyObjectType ? reportErrors : ReportErrors.None; if (result = isRelatedTo(constraint, target, reportConstraintErrors)) { errorInfo = saveErrorInfo; return result; @@ -5234,7 +5240,7 @@ namespace ts { // relates to X. Thus, we include intersection types on the source side here. if (apparentType.flags & (TypeFlags.ObjectType | TypeFlags.Intersection) && target.flags & TypeFlags.ObjectType) { // Report structural errors only if we haven't reported any errors yet - const reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo; + const reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo ? ReportErrors.Elaborate : ReportErrors.None; if (result = objectTypeRelatedTo(apparentType, source, target, reportStructuralErrors)) { errorInfo = saveErrorInfo; return result; @@ -5253,11 +5259,11 @@ namespace ts { if (source.flags & TypeFlags.ObjectType && target.flags & TypeFlags.ObjectType) { if (source.flags & TypeFlags.Reference && target.flags & TypeFlags.Reference && (source).target === (target).target) { // We have type references to same target type, see if all type arguments are identical - if (result = typeArgumentsRelatedTo(source, target, /*reportErrors*/ false)) { + if (result = typeArgumentsRelatedTo(source, target, ReportErrors.None)) { return result; } } - return objectTypeRelatedTo(source, source, target, /*reportErrors*/ false); + return objectTypeRelatedTo(source, source, target, ReportErrors.None); } if (source.flags & TypeFlags.Union && target.flags & TypeFlags.Union || source.flags & TypeFlags.Intersection && target.flags & TypeFlags.Intersection) { @@ -5292,7 +5298,7 @@ namespace ts { return false; } - function hasExcessProperties(source: FreshObjectLiteralType, target: Type, reportErrors: boolean): boolean { + function hasExcessProperties(source: FreshObjectLiteralType, target: Type, reportErrors: ReportErrors): boolean { if (!(target.flags & TypeFlags.ObjectLiteralPatternWithComputedProperties) && someConstituentTypeHasKind(target, TypeFlags.ObjectType)) { for (const prop of getPropertiesOfObjectType(source)) { if (!isKnownProperty(target, prop.name)) { @@ -5300,6 +5306,7 @@ namespace ts { // We know *exactly* where things went wrong when comparing the types. // Use this property as the error node as this will be more helpful in // reasoning about what went wrong. + Debug.assert(!!errorNode); errorNode = prop.valueDeclaration; reportError(Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(prop), typeToString(target)); @@ -5315,7 +5322,7 @@ namespace ts { let result = Ternary.True; const sourceTypes = source.types; for (const sourceType of sourceTypes) { - const related = typeRelatedToSomeType(sourceType, target, /*reportErrors*/ false); + const related = typeRelatedToSomeType(sourceType, target, ReportErrors.None); if (!related) { return Ternary.False; } @@ -5324,10 +5331,10 @@ namespace ts { return result; } - function typeRelatedToSomeType(source: Type, target: UnionOrIntersectionType, reportErrors: boolean): Ternary { + function typeRelatedToSomeType(source: Type, target: UnionOrIntersectionType, reportErrors: ReportErrors): Ternary { const targetTypes = target.types; for (let i = 0, len = targetTypes.length; i < len; i++) { - const related = isRelatedTo(source, targetTypes[i], reportErrors && i === len - 1); + const related = isRelatedTo(source, targetTypes[i], i === len - 1 ? reportErrors : ReportErrors.None); if (related) { return related; } @@ -5335,7 +5342,7 @@ namespace ts { return Ternary.False; } - function typeRelatedToEachType(source: Type, target: UnionOrIntersectionType, reportErrors: boolean): Ternary { + function typeRelatedToEachType(source: Type, target: UnionOrIntersectionType, reportErrors: ReportErrors): Ternary { let result = Ternary.True; const targetTypes = target.types; for (const targetType of targetTypes) { @@ -5348,10 +5355,10 @@ namespace ts { return result; } - function someTypeRelatedToType(source: UnionOrIntersectionType, target: Type, reportErrors: boolean): Ternary { + function someTypeRelatedToType(source: UnionOrIntersectionType, target: Type, reportErrors: ReportErrors): Ternary { const sourceTypes = source.types; for (let i = 0, len = sourceTypes.length; i < len; i++) { - const related = isRelatedTo(sourceTypes[i], target, reportErrors && i === len - 1); + const related = isRelatedTo(sourceTypes[i], target, i === len - 1 ? reportErrors : ReportErrors.None); if (related) { return related; } @@ -5359,7 +5366,7 @@ namespace ts { return Ternary.False; } - function eachTypeRelatedToType(source: UnionOrIntersectionType, target: Type, reportErrors: boolean): Ternary { + function eachTypeRelatedToType(source: UnionOrIntersectionType, target: Type, reportErrors: ReportErrors): Ternary { let result = Ternary.True; const sourceTypes = source.types; for (const sourceType of sourceTypes) { @@ -5372,7 +5379,7 @@ namespace ts { return result; } - function typeArgumentsRelatedTo(source: TypeReference, target: TypeReference, reportErrors: boolean): Ternary { + function typeArgumentsRelatedTo(source: TypeReference, target: TypeReference, reportErrors: ReportErrors): Ternary { const sources = source.typeArguments || emptyArray; const targets = target.typeArguments || emptyArray; if (sources.length !== targets.length && relation === identityRelation) { @@ -5395,14 +5402,14 @@ namespace ts { // Third, check if both types are part of deeply nested chains of generic type instantiations and if so assume the types are // equal and infinitely expanding. Fourth, if we have reached a depth of 100 nested comparisons, assume we have runaway recursion // and issue an error. Otherwise, actually compare the structure of the two types. - function objectTypeRelatedTo(source: Type, originalSource: Type, target: Type, reportErrors: boolean): Ternary { + function objectTypeRelatedTo(source: Type, originalSource: Type, target: Type, reportErrors: ReportErrors): Ternary { if (overflow) { return Ternary.False; } const id = relation !== identityRelation || source.id < target.id ? source.id + "," + target.id : target.id + "," + source.id; const related = relation[id]; if (related !== undefined) { - if (elaborateErrors && related === RelationComparisonResult.Failed) { + if (reportErrors === ReportErrors.Elaborate && related === RelationComparisonResult.Failed) { // We are elaborating errors and the cached result is an unreported failure. Record the result as a reported // failure and continue computing the relation such that errors get reported. relation[id] = RelationComparisonResult.FailedAndReported; @@ -5472,7 +5479,7 @@ namespace ts { return result; } - function propertiesRelatedTo(source: Type, target: Type, reportErrors: boolean): Ternary { + function propertiesRelatedTo(source: Type, target: Type, reportErrors: ReportErrors): Ternary { if (relation === identityRelation) { return propertiesIdenticalTo(source, target); } @@ -5580,7 +5587,7 @@ namespace ts { return result; } - function signaturesRelatedTo(source: Type, target: Type, kind: SignatureKind, reportErrors: boolean): Ternary { + function signaturesRelatedTo(source: Type, target: Type, kind: SignatureKind, reportErrors: ReportErrors): Ternary { if (relation === identityRelation) { return signaturesIdenticalTo(source, target, kind); } @@ -5617,7 +5624,7 @@ namespace ts { errorInfo = saveErrorInfo; continue outer; } - shouldElaborateErrors = false; + shouldElaborateErrors = ReportErrors.None; } } // don't elaborate the primitive apparent types (like Number) @@ -5636,8 +5643,8 @@ namespace ts { /** * See signatureAssignableTo, compareSignaturesIdentical */ - function signatureRelatedTo(source: Signature, target: Signature, reportErrors: boolean): Ternary { - return compareSignaturesRelated(source, target, /*ignoreReturnTypes*/ false, reportErrors ? reportError : undefined, isRelatedTo); + function signatureRelatedTo(source: Signature, target: Signature, reportErrors: ReportErrors): Ternary { + return compareSignaturesRelated(source, target, /*ignoreReturnTypes*/ false, reportErrors, reportError, isRelatedTo); } function signaturesIdenticalTo(source: Type, target: Type, kind: SignatureKind): Ternary { @@ -5657,7 +5664,7 @@ namespace ts { return result; } - function stringIndexTypesRelatedTo(source: Type, originalSource: Type, target: Type, reportErrors: boolean): Ternary { + function stringIndexTypesRelatedTo(source: Type, originalSource: Type, target: Type, reportErrors: ReportErrors): Ternary { if (relation === identityRelation) { return indexTypesIdenticalTo(IndexKind.String, source, target); } @@ -5687,7 +5694,7 @@ namespace ts { return Ternary.True; } - function numberIndexTypesRelatedTo(source: Type, originalSource: Type, target: Type, reportErrors: boolean): Ternary { + function numberIndexTypesRelatedTo(source: Type, originalSource: Type, target: Type, reportErrors: ReportErrors): Ternary { if (relation === identityRelation) { return indexTypesIdenticalTo(IndexKind.Number, source, target); } @@ -5709,7 +5716,7 @@ namespace ts { let related: Ternary; if (sourceStringType && sourceNumberType) { // If we know for sure we're testing both string and numeric index types then only report errors from the second one - related = isRelatedTo(sourceStringType, targetType, /*reportErrors*/ false) || isRelatedTo(sourceNumberType, targetType, reportErrors); + related = isRelatedTo(sourceStringType, targetType, ReportErrors.None) || isRelatedTo(sourceNumberType, targetType, reportErrors); } else { related = isRelatedTo(sourceStringType || sourceNumberType, targetType, reportErrors); @@ -8990,7 +8997,7 @@ namespace ts { getInferredTypes(context); } - function checkTypeArguments(signature: Signature, typeArgumentNodes: TypeNode[], typeArgumentTypes: Type[], reportErrors: boolean, headMessage?: DiagnosticMessage): boolean { + function checkTypeArguments(signature: Signature, typeArgumentNodes: TypeNode[], typeArgumentTypes: Type[], reportErrors: ReportErrors, headMessage?: DiagnosticMessage): boolean { const typeParameters = signature.typeParameters; let typeArgumentsAreAssignable = true; let mapper: TypeMapper; @@ -9020,7 +9027,7 @@ namespace ts { return typeArgumentsAreAssignable; } - function checkApplicableSignature(node: CallLikeExpression, args: Expression[], signature: Signature, relation: Map, excludeArgument: boolean[], reportErrors: boolean) { + function checkApplicableSignature(node: CallLikeExpression, args: Expression[], signature: Signature, relation: Map, excludeArgument: boolean[], reportErrors: ReportErrors) { const argCount = getEffectiveArgumentCount(node, args, signature); for (let i = 0; i < argCount; i++) { const arg = getEffectiveArgument(node, args, i); @@ -9468,12 +9475,12 @@ namespace ts { // in arguments too early. If possible, we'd like to only type them once we know the correct // overload. However, this matters for the case where the call is correct. When the call is // an error, we don't need to exclude any arguments, although it would cause no harm to do so. - checkApplicableSignature(node, args, candidateForArgumentError, assignableRelation, /*excludeArgument*/ undefined, /*reportErrors*/ true); + checkApplicableSignature(node, args, candidateForArgumentError, assignableRelation, /*excludeArgument*/ undefined, ReportErrors.Basic); } else if (candidateForTypeArgumentError) { if (!isTaggedTemplate && !isDecorator && typeArguments) { const typeArguments = (node).typeArguments; - checkTypeArguments(candidateForTypeArgumentError, typeArguments, map(typeArguments, getTypeFromTypeNode), /*reportErrors*/ true, headMessage); + checkTypeArguments(candidateForTypeArgumentError, typeArguments, map(typeArguments, getTypeFromTypeNode), ReportErrors.Basic, headMessage); } else { Debug.assert(resultOfFailedInference.failedTypeParameterIndex >= 0); @@ -9541,7 +9548,7 @@ namespace ts { let typeArgumentTypes: Type[]; if (typeArguments) { typeArgumentTypes = map(typeArguments, getTypeFromTypeNode); - typeArgumentsAreValid = checkTypeArguments(candidate, typeArguments, typeArgumentTypes, /*reportErrors*/ false); + typeArgumentsAreValid = checkTypeArguments(candidate, typeArguments, typeArgumentTypes, ReportErrors.None); } else { inferTypeArguments(node, candidate, args, excludeArgument, inferenceContext); @@ -9553,7 +9560,7 @@ namespace ts { } candidate = getSignatureInstantiation(candidate, typeArgumentTypes); } - if (!checkApplicableSignature(node, args, candidate, relation, excludeArgument, /*reportErrors*/ false)) { + if (!checkApplicableSignature(node, args, candidate, relation, excludeArgument, ReportErrors.None)) { break; } const index = excludeArgument ? indexOf(excludeArgument, true) : -1; From 51787e3daa0481537c1fb7733b65b335751da3a5 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 13 Jan 2016 23:12:41 -0800 Subject: [PATCH 147/209] Don't report structural errors on primitive apparent types. --- src/compiler/checker.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index bfee2d68a5c..28748805ffa 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5240,7 +5240,9 @@ namespace ts { // relates to X. Thus, we include intersection types on the source side here. if (apparentType.flags & (TypeFlags.ObjectType | TypeFlags.Intersection) && target.flags & TypeFlags.ObjectType) { // Report structural errors only if we haven't reported any errors yet - const reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo ? ReportErrors.Elaborate : ReportErrors.None; + const reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo && !isPrimitiveApparentType(apparentType) + ? ReportErrors.Elaborate + : ReportErrors.None; if (result = objectTypeRelatedTo(apparentType, source, target, reportStructuralErrors)) { errorInfo = saveErrorInfo; return result; @@ -5629,7 +5631,7 @@ namespace ts { } // don't elaborate the primitive apparent types (like Number) // because the actual primitives will have already been reported. - if (shouldElaborateErrors && !isPrimitiveApparentType(source)) { + if (shouldElaborateErrors) { reportError(Diagnostics.Type_0_provides_no_match_for_the_signature_1, typeToString(source), signatureToString(t, /*enclosingDeclaration*/ undefined, /*flags*/ undefined, kind)); From 45022139934a957e5f97146b390bf9092f5e6fa7 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 13 Jan 2016 23:16:55 -0800 Subject: [PATCH 148/209] Accepted baselines. --- .../reference/aliasAssignments.errors.txt | 2 -- ...indsToFunctionScopeArgumentList.errors.txt | 2 -- .../reference/arrayAssignmentTest1.errors.txt | 6 +++++ .../reference/arrayLiterals3.errors.txt | 2 -- .../reference/arraySigChecking.errors.txt | 2 -- .../reference/arrayTypeOfTypeOf.errors.txt | 2 -- .../reference/assignmentCompat1.errors.txt | 4 ---- ...gnmentCompatWithCallSignatures4.errors.txt | 12 ++++++++++ ...tCompatWithConstructSignatures4.errors.txt | 16 +++++++++++++ .../assignmentCompatability16.errors.txt | 4 +--- .../assignmentCompatability17.errors.txt | 4 +--- .../assignmentCompatability18.errors.txt | 4 +--- .../assignmentCompatability19.errors.txt | 4 +--- .../assignmentCompatability20.errors.txt | 4 +--- .../assignmentCompatability21.errors.txt | 4 +--- .../assignmentCompatability22.errors.txt | 4 +--- .../assignmentCompatability23.errors.txt | 4 +--- .../assignmentCompatability29.errors.txt | 4 +--- .../assignmentCompatability30.errors.txt | 4 +--- .../assignmentCompatability31.errors.txt | 4 +--- .../assignmentCompatability32.errors.txt | 4 +--- ...ember-off-of-function-interface.errors.txt | 4 ---- ...ember-off-of-function-interface.errors.txt | 4 ---- .../reference/booleanAssignment.errors.txt | 12 ---------- ...tureAssignabilityInInheritance3.errors.txt | 4 ++++ ...onAssignmentLHSCannotBeAssigned.errors.txt | 2 -- ...tureAssignabilityInInheritance3.errors.txt | 4 ++++ .../constructorReturnsInvalidType.errors.txt | 2 -- ...rWithAssignableReturnExpression.errors.txt | 2 -- .../reference/contextualTyping21.errors.txt | 4 +--- .../reference/contextualTyping33.errors.txt | 4 +++- ...ontextualTypingOfArrayLiterals1.errors.txt | 2 -- ...lTypingOfConditionalExpression2.errors.txt | 2 -- ...fGenericFunctionTypedArguments1.errors.txt | 2 -- ...rayBindingPatternAndAssignment2.errors.txt | 2 -- ...tructuringParameterDeclaration2.errors.txt | 4 ---- ...tructuringParameterDeclaration4.errors.txt | 2 -- ...tructuringParameterDeclaration5.errors.txt | 2 ++ ...ontShowCompilerGeneratedMembers.errors.txt | 2 -- .../reference/enumAssignability.errors.txt | 14 ----------- .../reference/enumAssignmentCompat.errors.txt | 4 ---- .../enumAssignmentCompat2.errors.txt | 4 ---- ...AnnotationAndInvalidInitializer.errors.txt | 2 -- ...ssignmentConstrainedGenericType.errors.txt | 2 -- .../reference/functionCall7.errors.txt | 2 -- ...functionConstraintSatisfaction2.errors.txt | 6 +++-- ...nstraintsTypeArgumentInference2.errors.txt | 2 -- .../reference/genericCombinators2.errors.txt | 2 -- ...DerivedTypeWithSpecializedBase2.errors.txt | 2 -- .../reference/genericRestArgs.errors.txt | 4 +--- .../instanceSubtypeCheck2.errors.txt | 2 -- .../reference/intTypeCheck.errors.txt | 8 ------- .../interfaceImplementation7.errors.txt | 2 -- .../intersectionAndUnionTypes.errors.txt | 22 +++++++++++++++++ .../invalidBooleanAssignments.errors.txt | 4 ---- .../invalidNumberAssignments.errors.txt | 8 ------- .../invalidStringAssignments.errors.txt | 8 ------- .../invalidVoidAssignments.errors.txt | 4 ---- .../lastPropertyInLiteralWins.errors.txt | 4 ++++ .../reference/maxConstraints.errors.txt | 4 +--- .../numericIndexerConstraint1.errors.txt | 2 -- .../objectLiteralIndexerErrors.errors.txt | 2 ++ ...ationInStrictModeByDefaultInES6.errors.txt | 2 -- .../reference/promiseChaining1.errors.txt | 2 -- .../reference/promiseChaining2.errors.txt | 2 -- .../reference/promisePermutations.errors.txt | 2 -- .../reference/promisePermutations2.errors.txt | 2 -- .../reference/promisePermutations3.errors.txt | 2 -- tests/baselines/reference/qualify.errors.txt | 4 ---- .../restArgAssignmentCompat.errors.txt | 2 -- .../reference/returnInConstructor1.errors.txt | 4 ---- .../subtypingWithNumericIndexer4.errors.txt | 4 ---- .../subtypingWithObjectMembers.errors.txt | 2 -- .../subtypingWithObjectMembers2.errors.txt | 2 -- .../subtypingWithStringIndexer4.errors.txt | 4 ---- ...peArgumentConstraintResolution1.errors.txt | 2 -- .../typeGuardFunctionErrors.errors.txt | 2 -- .../baselines/reference/typeName1.errors.txt | 24 ------------------- .../reference/typeOfOnTypeArg.errors.txt | 2 -- ...meterAsTypeParameterConstraint2.errors.txt | 4 +--- .../wrappedRecursiveGenericType.errors.txt | 2 -- 81 files changed, 95 insertions(+), 245 deletions(-) diff --git a/tests/baselines/reference/aliasAssignments.errors.txt b/tests/baselines/reference/aliasAssignments.errors.txt index fe13faba581..18ea36c5d00 100644 --- a/tests/baselines/reference/aliasAssignments.errors.txt +++ b/tests/baselines/reference/aliasAssignments.errors.txt @@ -1,5 +1,4 @@ tests/cases/compiler/aliasAssignments_1.ts(3,1): error TS2322: Type 'number' is not assignable to type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"'. - Property 'someClass' is missing in type 'Number'. tests/cases/compiler/aliasAssignments_1.ts(5,1): error TS2322: Type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"' is not assignable to type 'number'. @@ -9,7 +8,6 @@ tests/cases/compiler/aliasAssignments_1.ts(5,1): error TS2322: Type 'typeof "tes x = 1; // Should be error ~ !!! error TS2322: Type 'number' is not assignable to type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"'. -!!! error TS2322: Property 'someClass' is missing in type 'Number'. var y = 1; y = moduleA; // should be error ~ diff --git a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt index 812bbe15da4..89ef8ded91c 100644 --- a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt +++ b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt @@ -1,5 +1,4 @@ tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts(3,5): error TS2322: Type 'number' is not assignable to type 'IArguments'. - Property 'length' is missing in type 'Number'. ==== tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts (1 errors) ==== @@ -8,5 +7,4 @@ tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts(3,5): error TS arguments = 10; /// This shouldnt be of type number and result in error. ~~~~~~~~~ !!! error TS2322: Type 'number' is not assignable to type 'IArguments'. -!!! error TS2322: Property 'length' is missing in type 'Number'. } \ No newline at end of file diff --git a/tests/baselines/reference/arrayAssignmentTest1.errors.txt b/tests/baselines/reference/arrayAssignmentTest1.errors.txt index d3a7fafed05..3cce5658c13 100644 --- a/tests/baselines/reference/arrayAssignmentTest1.errors.txt +++ b/tests/baselines/reference/arrayAssignmentTest1.errors.txt @@ -26,10 +26,13 @@ tests/cases/compiler/arrayAssignmentTest1.ts(70,1): error TS2322: Type 'C3[]' is Property 'C2M1' is missing in type 'C3'. tests/cases/compiler/arrayAssignmentTest1.ts(75,1): error TS2322: Type 'C2[]' is not assignable to type 'C3[]'. Type 'C2' is not assignable to type 'C3'. + Property 'CM3M1' is missing in type 'C2'. tests/cases/compiler/arrayAssignmentTest1.ts(76,1): error TS2322: Type 'C1[]' is not assignable to type 'C3[]'. Type 'C1' is not assignable to type 'C3'. + Property 'CM3M1' is missing in type 'C1'. tests/cases/compiler/arrayAssignmentTest1.ts(77,1): error TS2322: Type 'I1[]' is not assignable to type 'C3[]'. Type 'I1' is not assignable to type 'C3'. + Property 'CM3M1' is missing in type 'I1'. tests/cases/compiler/arrayAssignmentTest1.ts(79,1): error TS2322: Type '() => C1' is not assignable to type 'any[]'. Property 'push' is missing in type '() => C1'. tests/cases/compiler/arrayAssignmentTest1.ts(80,1): error TS2322: Type '{ one: number; }' is not assignable to type 'any[]'. @@ -159,14 +162,17 @@ tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2322: Type 'I1' is n ~~~~~~ !!! error TS2322: Type 'C2[]' is not assignable to type 'C3[]'. !!! error TS2322: Type 'C2' is not assignable to type 'C3'. +!!! error TS2322: Property 'CM3M1' is missing in type 'C2'. arr_c3 = arr_c1_2; // should be an error - is ~~~~~~ !!! error TS2322: Type 'C1[]' is not assignable to type 'C3[]'. !!! error TS2322: Type 'C1' is not assignable to type 'C3'. +!!! error TS2322: Property 'CM3M1' is missing in type 'C1'. arr_c3 = arr_i1_2; // should be an error - is ~~~~~~ !!! error TS2322: Type 'I1[]' is not assignable to type 'C3[]'. !!! error TS2322: Type 'I1' is not assignable to type 'C3'. +!!! error TS2322: Property 'CM3M1' is missing in type 'I1'. arr_any = f1; // should be an error - is ~~~~~~~ diff --git a/tests/baselines/reference/arrayLiterals3.errors.txt b/tests/baselines/reference/arrayLiterals3.errors.txt index 637fb3e3bc4..5409075a55c 100644 --- a/tests/baselines/reference/arrayLiterals3.errors.txt +++ b/tests/baselines/reference/arrayLiterals3.errors.txt @@ -18,7 +18,6 @@ tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(34,5): error Types of parameters 'items' and 'items' are incompatible. Type 'number | string' is not assignable to type 'Number'. Type 'string' is not assignable to type 'Number'. - Property 'toFixed' is missing in type 'String'. ==== tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts (6 errors) ==== @@ -82,5 +81,4 @@ tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(34,5): error !!! error TS2322: Types of parameters 'items' and 'items' are incompatible. !!! error TS2322: Type 'number | string' is not assignable to type 'Number'. !!! error TS2322: Type 'string' is not assignable to type 'Number'. -!!! error TS2322: Property 'toFixed' is missing in type 'String'. \ No newline at end of file diff --git a/tests/baselines/reference/arraySigChecking.errors.txt b/tests/baselines/reference/arraySigChecking.errors.txt index b70b659773c..1968957363c 100644 --- a/tests/baselines/reference/arraySigChecking.errors.txt +++ b/tests/baselines/reference/arraySigChecking.errors.txt @@ -4,7 +4,6 @@ tests/cases/compiler/arraySigChecking.ts(18,5): error TS2322: Type 'void[]' is n tests/cases/compiler/arraySigChecking.ts(22,1): error TS2322: Type 'number[][]' is not assignable to type 'number[][][]'. Type 'number[]' is not assignable to type 'number[][]'. Type 'number' is not assignable to type 'number[]'. - Property 'length' is missing in type 'Number'. ==== tests/cases/compiler/arraySigChecking.ts (3 errors) ==== @@ -39,7 +38,6 @@ tests/cases/compiler/arraySigChecking.ts(22,1): error TS2322: Type 'number[][]' !!! error TS2322: Type 'number[][]' is not assignable to type 'number[][][]'. !!! error TS2322: Type 'number[]' is not assignable to type 'number[][]'. !!! error TS2322: Type 'number' is not assignable to type 'number[]'. -!!! error TS2322: Property 'length' is missing in type 'Number'. function isEmpty(l: { length: number }) { return l.length === 0; diff --git a/tests/baselines/reference/arrayTypeOfTypeOf.errors.txt b/tests/baselines/reference/arrayTypeOfTypeOf.errors.txt index 41446dfceab..1c37f04be72 100644 --- a/tests/baselines/reference/arrayTypeOfTypeOf.errors.txt +++ b/tests/baselines/reference/arrayTypeOfTypeOf.errors.txt @@ -1,5 +1,4 @@ tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(6,5): error TS2322: Type 'number' is not assignable to type 'ArrayConstructor'. - Property 'isArray' is missing in type 'Number'. tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(6,22): error TS1005: '=' expected. tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(6,30): error TS1109: Expression expected. tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(7,5): error TS2322: Type 'number' is not assignable to type 'ArrayConstructor'. @@ -16,7 +15,6 @@ tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts( var xs3: typeof Array; ~~~ !!! error TS2322: Type 'number' is not assignable to type 'ArrayConstructor'. -!!! error TS2322: Property 'isArray' is missing in type 'Number'. ~ !!! error TS1005: '=' expected. ~ diff --git a/tests/baselines/reference/assignmentCompat1.errors.txt b/tests/baselines/reference/assignmentCompat1.errors.txt index 7539af92887..0936c532ab3 100644 --- a/tests/baselines/reference/assignmentCompat1.errors.txt +++ b/tests/baselines/reference/assignmentCompat1.errors.txt @@ -3,9 +3,7 @@ tests/cases/compiler/assignmentCompat1.ts(4,1): error TS2322: Type '{ [index: st tests/cases/compiler/assignmentCompat1.ts(6,1): error TS2322: Type '{ [index: number]: any; }' is not assignable to type '{ one: number; }'. Property 'one' is missing in type '{ [index: number]: any; }'. tests/cases/compiler/assignmentCompat1.ts(8,1): error TS2322: Type 'string' is not assignable to type '{ [index: string]: any; }'. - Index signature is missing in type 'String'. tests/cases/compiler/assignmentCompat1.ts(10,1): error TS2322: Type 'boolean' is not assignable to type '{ [index: number]: any; }'. - Index signature is missing in type 'Boolean'. ==== tests/cases/compiler/assignmentCompat1.ts (4 errors) ==== @@ -25,11 +23,9 @@ tests/cases/compiler/assignmentCompat1.ts(10,1): error TS2322: Type 'boolean' is y = "foo"; // Error ~ !!! error TS2322: Type 'string' is not assignable to type '{ [index: string]: any; }'. -!!! error TS2322: Index signature is missing in type 'String'. z = "foo"; // OK, string has numeric indexer z = false; // Error ~ !!! error TS2322: Type 'boolean' is not assignable to type '{ [index: number]: any; }'. -!!! error TS2322: Index signature is missing in type 'Boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt index bc9a0509fbb..a75b5fafac1 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt @@ -3,9 +3,15 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'. Types of parameters 'arg2' and 'arg2' are incompatible. Type '{ foo: number; }' is not assignable to type 'Base'. + Types of property 'foo' are incompatible. + Type 'number' is not assignable to type 'string'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(53,9): error TS2322: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'. Types of parameters 'y' and 'y' are incompatible. Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'. + Types of parameters 'arg2' and 'arg2' are incompatible. + Type 'Base' is not assignable to type '{ foo: number; }'. + Types of property 'foo' are incompatible. + Type 'string' is not assignable to type 'number'. ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts (2 errors) ==== @@ -67,11 +73,17 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'. !!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible. !!! error TS2322: Type '{ foo: number; }' is not assignable to type 'Base'. +!!! error TS2322: Types of property 'foo' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. b8 = a8; // error, { foo: number } and Base are incompatible ~~ !!! error TS2322: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'. !!! error TS2322: Types of parameters 'y' and 'y' are incompatible. !!! error TS2322: Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'. +!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible. +!!! error TS2322: Type 'Base' is not assignable to type '{ foo: number; }'. +!!! error TS2322: Types of property 'foo' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. var b10: (...x: T[]) => T; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt index 137d481d8e1..da9ffba1ee1 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt @@ -3,9 +3,15 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'. Types of parameters 'arg2' and 'arg2' are incompatible. Type '{ foo: number; }' is not assignable to type 'Base'. + Types of property 'foo' are incompatible. + Type 'number' is not assignable to type 'string'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(53,9): error TS2322: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'. Types of parameters 'y' and 'y' are incompatible. Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'. + Types of parameters 'arg2' and 'arg2' are incompatible. + Type 'Base' is not assignable to type '{ foo: number; }'. + Types of property 'foo' are incompatible. + Type 'string' is not assignable to type 'number'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(77,9): error TS2322: Type 'new (x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }'. Types of parameters 'x' and 'x' are incompatible. Type '(a: any) => any' is not assignable to type '{ new (a: number): number; new (a?: number): number; }'. @@ -13,6 +19,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(78,9): error TS2322: Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new (x: (a: T) => T) => T[]'. Types of parameters 'x' and 'x' are incompatible. Type '{ new (a: number): number; new (a?: number): number; }' is not assignable to type '(a: any) => any'. + Type '{ new (a: number): number; new (a?: number): number; }' provides no match for the signature '(a: any): any' tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(81,9): error TS2322: Type 'new (x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }'. Types of parameters 'x' and 'x' are incompatible. Type '(a: any) => any' is not assignable to type '{ new (a: T): T; new (a: T): T; }'. @@ -20,6 +27,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(82,9): error TS2322: Type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }' is not assignable to type 'new (x: (a: T) => T) => any[]'. Types of parameters 'x' and 'x' are incompatible. Type '{ new (a: T): T; new (a: T): T; }' is not assignable to type '(a: any) => any'. + Type '{ new (a: T): T; new (a: T): T; }' provides no match for the signature '(a: any): any' ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts (6 errors) ==== @@ -81,11 +89,17 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'. !!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible. !!! error TS2322: Type '{ foo: number; }' is not assignable to type 'Base'. +!!! error TS2322: Types of property 'foo' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. b8 = a8; // error ~~ !!! error TS2322: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'. !!! error TS2322: Types of parameters 'y' and 'y' are incompatible. !!! error TS2322: Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'. +!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible. +!!! error TS2322: Type 'Base' is not assignable to type '{ foo: number; }'. +!!! error TS2322: Types of property 'foo' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. var b10: new (...x: T[]) => T; @@ -120,6 +134,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new (x: (a: T) => T) => T[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type '{ new (a: number): number; new (a?: number): number; }' is not assignable to type '(a: any) => any'. +!!! error TS2322: Type '{ new (a: number): number; new (a?: number): number; }' provides no match for the signature '(a: any): any' var b17: new (x: (a: T) => T) => any[]; a17 = b17; // error @@ -133,6 +148,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }' is not assignable to type 'new (x: (a: T) => T) => any[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type '{ new (a: T): T; new (a: T): T; }' is not assignable to type '(a: any) => any'. +!!! error TS2322: Type '{ new (a: T): T; new (a: T): T; }' provides no match for the signature '(a: any): any' } module WithGenericSignaturesInBaseType { diff --git a/tests/baselines/reference/assignmentCompatability16.errors.txt b/tests/baselines/reference/assignmentCompatability16.errors.txt index 266d72b3232..71a93f11b35 100644 --- a/tests/baselines/reference/assignmentCompatability16.errors.txt +++ b/tests/baselines/reference/assignmentCompatability16.errors.txt @@ -1,7 +1,6 @@ tests/cases/compiler/assignmentCompatability16.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: any[]; }'. Types of property 'one' are incompatible. Type 'number' is not assignable to type 'any[]'. - Property 'length' is missing in type 'Number'. ==== tests/cases/compiler/assignmentCompatability16.ts (1 errors) ==== @@ -17,5 +16,4 @@ tests/cases/compiler/assignmentCompatability16.ts(9,1): error TS2322: Type 'inte ~~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: any[]; }'. !!! error TS2322: Types of property 'one' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'any[]'. -!!! error TS2322: Property 'length' is missing in type 'Number'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type 'any[]'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability17.errors.txt b/tests/baselines/reference/assignmentCompatability17.errors.txt index b37f39d082f..a87bcff2e92 100644 --- a/tests/baselines/reference/assignmentCompatability17.errors.txt +++ b/tests/baselines/reference/assignmentCompatability17.errors.txt @@ -1,7 +1,6 @@ tests/cases/compiler/assignmentCompatability17.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: any[]; }'. Types of property 'two' are incompatible. Type 'string' is not assignable to type 'any[]'. - Property 'push' is missing in type 'String'. ==== tests/cases/compiler/assignmentCompatability17.ts (1 errors) ==== @@ -17,5 +16,4 @@ tests/cases/compiler/assignmentCompatability17.ts(9,1): error TS2322: Type 'inte ~~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: any[]; }'. !!! error TS2322: Types of property 'two' are incompatible. -!!! error TS2322: Type 'string' is not assignable to type 'any[]'. -!!! error TS2322: Property 'push' is missing in type 'String'. \ No newline at end of file +!!! error TS2322: Type 'string' is not assignable to type 'any[]'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability18.errors.txt b/tests/baselines/reference/assignmentCompatability18.errors.txt index 2be4a037575..8ab5e5dcd07 100644 --- a/tests/baselines/reference/assignmentCompatability18.errors.txt +++ b/tests/baselines/reference/assignmentCompatability18.errors.txt @@ -1,7 +1,6 @@ tests/cases/compiler/assignmentCompatability18.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: number[]; }'. Types of property 'one' are incompatible. Type 'number' is not assignable to type 'number[]'. - Property 'length' is missing in type 'Number'. ==== tests/cases/compiler/assignmentCompatability18.ts (1 errors) ==== @@ -17,5 +16,4 @@ tests/cases/compiler/assignmentCompatability18.ts(9,1): error TS2322: Type 'inte ~~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: number[]; }'. !!! error TS2322: Types of property 'one' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'number[]'. -!!! error TS2322: Property 'length' is missing in type 'Number'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type 'number[]'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability19.errors.txt b/tests/baselines/reference/assignmentCompatability19.errors.txt index ae97af6aa7e..e84e665cefa 100644 --- a/tests/baselines/reference/assignmentCompatability19.errors.txt +++ b/tests/baselines/reference/assignmentCompatability19.errors.txt @@ -1,7 +1,6 @@ tests/cases/compiler/assignmentCompatability19.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number[]; }'. Types of property 'two' are incompatible. Type 'string' is not assignable to type 'number[]'. - Property 'push' is missing in type 'String'. ==== tests/cases/compiler/assignmentCompatability19.ts (1 errors) ==== @@ -17,5 +16,4 @@ tests/cases/compiler/assignmentCompatability19.ts(9,1): error TS2322: Type 'inte ~~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number[]; }'. !!! error TS2322: Types of property 'two' are incompatible. -!!! error TS2322: Type 'string' is not assignable to type 'number[]'. -!!! error TS2322: Property 'push' is missing in type 'String'. \ No newline at end of file +!!! error TS2322: Type 'string' is not assignable to type 'number[]'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability20.errors.txt b/tests/baselines/reference/assignmentCompatability20.errors.txt index 750310ac5cc..2e67a2a2033 100644 --- a/tests/baselines/reference/assignmentCompatability20.errors.txt +++ b/tests/baselines/reference/assignmentCompatability20.errors.txt @@ -1,7 +1,6 @@ tests/cases/compiler/assignmentCompatability20.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string[]; }'. Types of property 'one' are incompatible. Type 'number' is not assignable to type 'string[]'. - Property 'length' is missing in type 'Number'. ==== tests/cases/compiler/assignmentCompatability20.ts (1 errors) ==== @@ -17,5 +16,4 @@ tests/cases/compiler/assignmentCompatability20.ts(9,1): error TS2322: Type 'inte ~~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string[]; }'. !!! error TS2322: Types of property 'one' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'string[]'. -!!! error TS2322: Property 'length' is missing in type 'Number'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type 'string[]'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability21.errors.txt b/tests/baselines/reference/assignmentCompatability21.errors.txt index 8da52fe42c6..44e24e7d0b5 100644 --- a/tests/baselines/reference/assignmentCompatability21.errors.txt +++ b/tests/baselines/reference/assignmentCompatability21.errors.txt @@ -1,7 +1,6 @@ tests/cases/compiler/assignmentCompatability21.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string[]; }'. Types of property 'two' are incompatible. Type 'string' is not assignable to type 'string[]'. - Property 'push' is missing in type 'String'. ==== tests/cases/compiler/assignmentCompatability21.ts (1 errors) ==== @@ -17,5 +16,4 @@ tests/cases/compiler/assignmentCompatability21.ts(9,1): error TS2322: Type 'inte ~~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string[]; }'. !!! error TS2322: Types of property 'two' are incompatible. -!!! error TS2322: Type 'string' is not assignable to type 'string[]'. -!!! error TS2322: Property 'push' is missing in type 'String'. \ No newline at end of file +!!! error TS2322: Type 'string' is not assignable to type 'string[]'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability22.errors.txt b/tests/baselines/reference/assignmentCompatability22.errors.txt index f0799a92f5c..cb42a7abaef 100644 --- a/tests/baselines/reference/assignmentCompatability22.errors.txt +++ b/tests/baselines/reference/assignmentCompatability22.errors.txt @@ -1,7 +1,6 @@ tests/cases/compiler/assignmentCompatability22.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean[]; }'. Types of property 'one' are incompatible. Type 'number' is not assignable to type 'boolean[]'. - Property 'length' is missing in type 'Number'. ==== tests/cases/compiler/assignmentCompatability22.ts (1 errors) ==== @@ -17,5 +16,4 @@ tests/cases/compiler/assignmentCompatability22.ts(9,1): error TS2322: Type 'inte ~~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean[]; }'. !!! error TS2322: Types of property 'one' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'boolean[]'. -!!! error TS2322: Property 'length' is missing in type 'Number'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type 'boolean[]'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability23.errors.txt b/tests/baselines/reference/assignmentCompatability23.errors.txt index a005eaa02d1..7b54e8559eb 100644 --- a/tests/baselines/reference/assignmentCompatability23.errors.txt +++ b/tests/baselines/reference/assignmentCompatability23.errors.txt @@ -1,7 +1,6 @@ tests/cases/compiler/assignmentCompatability23.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: boolean[]; }'. Types of property 'two' are incompatible. Type 'string' is not assignable to type 'boolean[]'. - Property 'push' is missing in type 'String'. ==== tests/cases/compiler/assignmentCompatability23.ts (1 errors) ==== @@ -17,5 +16,4 @@ tests/cases/compiler/assignmentCompatability23.ts(9,1): error TS2322: Type 'inte ~~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: boolean[]; }'. !!! error TS2322: Types of property 'two' are incompatible. -!!! error TS2322: Type 'string' is not assignable to type 'boolean[]'. -!!! error TS2322: Property 'push' is missing in type 'String'. \ No newline at end of file +!!! error TS2322: Type 'string' is not assignable to type 'boolean[]'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability29.errors.txt b/tests/baselines/reference/assignmentCompatability29.errors.txt index 194ae4ab675..9ba5c35d528 100644 --- a/tests/baselines/reference/assignmentCompatability29.errors.txt +++ b/tests/baselines/reference/assignmentCompatability29.errors.txt @@ -1,7 +1,6 @@ tests/cases/compiler/assignmentCompatability29.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: any[]; }'. Types of property 'one' are incompatible. Type 'number' is not assignable to type 'any[]'. - Property 'length' is missing in type 'Number'. ==== tests/cases/compiler/assignmentCompatability29.ts (1 errors) ==== @@ -17,5 +16,4 @@ tests/cases/compiler/assignmentCompatability29.ts(9,1): error TS2322: Type 'inte ~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: any[]; }'. !!! error TS2322: Types of property 'one' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'any[]'. -!!! error TS2322: Property 'length' is missing in type 'Number'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type 'any[]'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability30.errors.txt b/tests/baselines/reference/assignmentCompatability30.errors.txt index b025705517c..43f7f3f9c0a 100644 --- a/tests/baselines/reference/assignmentCompatability30.errors.txt +++ b/tests/baselines/reference/assignmentCompatability30.errors.txt @@ -1,7 +1,6 @@ tests/cases/compiler/assignmentCompatability30.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: number[]; }'. Types of property 'one' are incompatible. Type 'number' is not assignable to type 'number[]'. - Property 'length' is missing in type 'Number'. ==== tests/cases/compiler/assignmentCompatability30.ts (1 errors) ==== @@ -17,5 +16,4 @@ tests/cases/compiler/assignmentCompatability30.ts(9,1): error TS2322: Type 'inte ~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: number[]; }'. !!! error TS2322: Types of property 'one' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'number[]'. -!!! error TS2322: Property 'length' is missing in type 'Number'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type 'number[]'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability31.errors.txt b/tests/baselines/reference/assignmentCompatability31.errors.txt index 8e19905eba7..8874ebf06a6 100644 --- a/tests/baselines/reference/assignmentCompatability31.errors.txt +++ b/tests/baselines/reference/assignmentCompatability31.errors.txt @@ -1,7 +1,6 @@ tests/cases/compiler/assignmentCompatability31.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string[]; }'. Types of property 'one' are incompatible. Type 'number' is not assignable to type 'string[]'. - Property 'length' is missing in type 'Number'. ==== tests/cases/compiler/assignmentCompatability31.ts (1 errors) ==== @@ -17,5 +16,4 @@ tests/cases/compiler/assignmentCompatability31.ts(9,1): error TS2322: Type 'inte ~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string[]; }'. !!! error TS2322: Types of property 'one' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'string[]'. -!!! error TS2322: Property 'length' is missing in type 'Number'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type 'string[]'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability32.errors.txt b/tests/baselines/reference/assignmentCompatability32.errors.txt index 6d6321f5e50..00164a48fd6 100644 --- a/tests/baselines/reference/assignmentCompatability32.errors.txt +++ b/tests/baselines/reference/assignmentCompatability32.errors.txt @@ -1,7 +1,6 @@ tests/cases/compiler/assignmentCompatability32.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean[]; }'. Types of property 'one' are incompatible. Type 'number' is not assignable to type 'boolean[]'. - Property 'length' is missing in type 'Number'. ==== tests/cases/compiler/assignmentCompatability32.ts (1 errors) ==== @@ -17,5 +16,4 @@ tests/cases/compiler/assignmentCompatability32.ts(9,1): error TS2322: Type 'inte ~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean[]; }'. !!! error TS2322: Types of property 'one' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'boolean[]'. -!!! error TS2322: Property 'length' is missing in type 'Number'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type 'boolean[]'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt index e5db4f9ab96..33a2269f747 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt +++ b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt @@ -1,9 +1,7 @@ tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(10,1): error TS2322: Type 'string' is not assignable to type 'Applicable'. - Property 'apply' is missing in type 'String'. tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(11,1): error TS2322: Type 'string[]' is not assignable to type 'Applicable'. Property 'apply' is missing in type 'string[]'. tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(12,1): error TS2322: Type 'number' is not assignable to type 'Applicable'. - Property 'apply' is missing in type 'Number'. tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(13,1): error TS2322: Type '{}' is not assignable to type 'Applicable'. Property 'apply' is missing in type '{}'. tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(22,4): error TS2345: Argument of type 'string' is not assignable to parameter of type 'Applicable'. @@ -26,7 +24,6 @@ tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-functi x = ''; ~ !!! error TS2322: Type 'string' is not assignable to type 'Applicable'. -!!! error TS2322: Property 'apply' is missing in type 'String'. x = ['']; ~ !!! error TS2322: Type 'string[]' is not assignable to type 'Applicable'. @@ -34,7 +31,6 @@ tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-functi x = 4; ~ !!! error TS2322: Type 'number' is not assignable to type 'Applicable'. -!!! error TS2322: Property 'apply' is missing in type 'Number'. x = {}; ~ !!! error TS2322: Type '{}' is not assignable to type 'Applicable'. diff --git a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt index f3ff6f1b792..1651e5082ee 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt +++ b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt @@ -1,9 +1,7 @@ tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(10,1): error TS2322: Type 'string' is not assignable to type 'Callable'. - Property 'call' is missing in type 'String'. tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(11,1): error TS2322: Type 'string[]' is not assignable to type 'Callable'. Property 'call' is missing in type 'string[]'. tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(12,1): error TS2322: Type 'number' is not assignable to type 'Callable'. - Property 'call' is missing in type 'Number'. tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(13,1): error TS2322: Type '{}' is not assignable to type 'Callable'. Property 'call' is missing in type '{}'. tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(22,4): error TS2345: Argument of type 'string' is not assignable to parameter of type 'Callable'. @@ -26,7 +24,6 @@ tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-functio x = ''; ~ !!! error TS2322: Type 'string' is not assignable to type 'Callable'. -!!! error TS2322: Property 'call' is missing in type 'String'. x = ['']; ~ !!! error TS2322: Type 'string[]' is not assignable to type 'Callable'. @@ -34,7 +31,6 @@ tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-functio x = 4; ~ !!! error TS2322: Type 'number' is not assignable to type 'Callable'. -!!! error TS2322: Property 'call' is missing in type 'Number'. x = {}; ~ !!! error TS2322: Type '{}' is not assignable to type 'Callable'. diff --git a/tests/baselines/reference/booleanAssignment.errors.txt b/tests/baselines/reference/booleanAssignment.errors.txt index 454bd7ef707..15b506d3df4 100644 --- a/tests/baselines/reference/booleanAssignment.errors.txt +++ b/tests/baselines/reference/booleanAssignment.errors.txt @@ -1,11 +1,5 @@ tests/cases/compiler/booleanAssignment.ts(2,1): error TS2322: Type 'number' is not assignable to type 'Boolean'. - Types of property 'valueOf' are incompatible. - Type '() => number' is not assignable to type '() => boolean'. - Type 'number' is not assignable to type 'boolean'. tests/cases/compiler/booleanAssignment.ts(3,1): error TS2322: Type 'string' is not assignable to type 'Boolean'. - Types of property 'valueOf' are incompatible. - Type '() => string' is not assignable to type '() => boolean'. - Type 'string' is not assignable to type 'boolean'. tests/cases/compiler/booleanAssignment.ts(4,1): error TS2322: Type '{}' is not assignable to type 'Boolean'. Types of property 'valueOf' are incompatible. Type '() => Object' is not assignable to type '() => boolean'. @@ -17,15 +11,9 @@ tests/cases/compiler/booleanAssignment.ts(4,1): error TS2322: Type '{}' is not a b = 1; // Error ~ !!! error TS2322: Type 'number' is not assignable to type 'Boolean'. -!!! error TS2322: Types of property 'valueOf' are incompatible. -!!! error TS2322: Type '() => number' is not assignable to type '() => boolean'. -!!! error TS2322: Type 'number' is not assignable to type 'boolean'. b = "a"; // Error ~ !!! error TS2322: Type 'string' is not assignable to type 'Boolean'. -!!! error TS2322: Types of property 'valueOf' are incompatible. -!!! error TS2322: Type '() => string' is not assignable to type '() => boolean'. -!!! error TS2322: Type 'string' is not assignable to type 'boolean'. b = {}; // Error ~ !!! error TS2322: Type '{}' is not assignable to type 'Boolean'. diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt index 6120443285b..7e9d75b1b41 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt @@ -10,6 +10,8 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'. Types of parameters 'arg2' and 'arg2' are incompatible. Type '{ foo: number; }' is not assignable to type 'Base'. + Types of property 'foo' are incompatible. + Type 'number' is not assignable to type 'string'. ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts (2 errors) ==== @@ -87,6 +89,8 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign !!! error TS2430: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'. !!! error TS2430: Types of parameters 'arg2' and 'arg2' are incompatible. !!! error TS2430: Type '{ foo: number; }' is not assignable to type 'Base'. +!!! error TS2430: Types of property 'foo' are incompatible. +!!! error TS2430: Type 'number' is not assignable to type 'string'. a8: (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; // error, type mismatch } diff --git a/tests/baselines/reference/compoundAdditionAssignmentLHSCannotBeAssigned.errors.txt b/tests/baselines/reference/compoundAdditionAssignmentLHSCannotBeAssigned.errors.txt index 535e4eb1a30..6bbebeb6ec7 100644 --- a/tests/baselines/reference/compoundAdditionAssignmentLHSCannotBeAssigned.errors.txt +++ b/tests/baselines/reference/compoundAdditionAssignmentLHSCannotBeAssigned.errors.txt @@ -2,7 +2,6 @@ tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmen tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(8,1): error TS2322: Type 'string' is not assignable to type 'number'. tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(11,1): error TS2322: Type 'string' is not assignable to type 'E'. tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(14,1): error TS2322: Type 'string' is not assignable to type '{ a: string; }'. - Property 'a' is missing in type 'String'. tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(17,1): error TS2322: Type 'string' is not assignable to type 'void'. @@ -29,7 +28,6 @@ tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmen x4 += ''; ~~ !!! error TS2322: Type 'string' is not assignable to type '{ a: string; }'. -!!! error TS2322: Property 'a' is missing in type 'String'. var x5: void; x5 += ''; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.errors.txt b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.errors.txt index 06fff422fff..8d6273804f7 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.errors.txt +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.errors.txt @@ -10,6 +10,8 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/construc Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'. Types of parameters 'arg2' and 'arg2' are incompatible. Type '{ foo: number; }' is not assignable to type 'Base'. + Types of property 'foo' are incompatible. + Type 'number' is not assignable to type 'string'. ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts (2 errors) ==== @@ -77,6 +79,8 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/construc !!! error TS2430: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'. !!! error TS2430: Types of parameters 'arg2' and 'arg2' are incompatible. !!! error TS2430: Type '{ foo: number; }' is not assignable to type 'Base'. +!!! error TS2430: Types of property 'foo' are incompatible. +!!! error TS2430: Type 'number' is not assignable to type 'string'. a8: new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; // error, type mismatch } diff --git a/tests/baselines/reference/constructorReturnsInvalidType.errors.txt b/tests/baselines/reference/constructorReturnsInvalidType.errors.txt index a8fe1de4700..3b9a84fea98 100644 --- a/tests/baselines/reference/constructorReturnsInvalidType.errors.txt +++ b/tests/baselines/reference/constructorReturnsInvalidType.errors.txt @@ -1,5 +1,4 @@ tests/cases/compiler/constructorReturnsInvalidType.ts(3,16): error TS2322: Type 'number' is not assignable to type 'X'. - Property 'foo' is missing in type 'Number'. tests/cases/compiler/constructorReturnsInvalidType.ts(3,16): error TS2409: Return type of constructor signature must be assignable to the instance type of the class @@ -9,7 +8,6 @@ tests/cases/compiler/constructorReturnsInvalidType.ts(3,16): error TS2409: Retur return 1; ~ !!! error TS2322: Type 'number' is not assignable to type 'X'. -!!! error TS2322: Property 'foo' is missing in type 'Number'. ~ !!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class } diff --git a/tests/baselines/reference/constructorWithAssignableReturnExpression.errors.txt b/tests/baselines/reference/constructorWithAssignableReturnExpression.errors.txt index 1f7d7133bd7..421e629c113 100644 --- a/tests/baselines/reference/constructorWithAssignableReturnExpression.errors.txt +++ b/tests/baselines/reference/constructorWithAssignableReturnExpression.errors.txt @@ -1,5 +1,4 @@ tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts(12,16): error TS2322: Type 'number' is not assignable to type 'D'. - Property 'x' is missing in type 'Number'. tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts(12,16): error TS2409: Return type of constructor signature must be assignable to the instance type of the class tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts(26,16): error TS2322: Type '{ x: number; }' is not assignable to type 'F'. Types of property 'x' are incompatible. @@ -22,7 +21,6 @@ tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignabl return 1; // error ~ !!! error TS2322: Type 'number' is not assignable to type 'D'. -!!! error TS2322: Property 'x' is missing in type 'Number'. ~ !!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class } diff --git a/tests/baselines/reference/contextualTyping21.errors.txt b/tests/baselines/reference/contextualTyping21.errors.txt index 362ead49ad3..db6ecd32b97 100644 --- a/tests/baselines/reference/contextualTyping21.errors.txt +++ b/tests/baselines/reference/contextualTyping21.errors.txt @@ -1,7 +1,6 @@ tests/cases/compiler/contextualTyping21.ts(1,36): error TS2322: Type '({ id: number; } | number)[]' is not assignable to type '{ id: number; }[]'. Type '{ id: number; } | number' is not assignable to type '{ id: number; }'. Type 'number' is not assignable to type '{ id: number; }'. - Property 'id' is missing in type 'Number'. ==== tests/cases/compiler/contextualTyping21.ts (1 errors) ==== @@ -9,5 +8,4 @@ tests/cases/compiler/contextualTyping21.ts(1,36): error TS2322: Type '({ id: num ~~~ !!! error TS2322: Type '({ id: number; } | number)[]' is not assignable to type '{ id: number; }[]'. !!! error TS2322: Type '{ id: number; } | number' is not assignable to type '{ id: number; }'. -!!! error TS2322: Type 'number' is not assignable to type '{ id: number; }'. -!!! error TS2322: Property 'id' is missing in type 'Number'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type '{ id: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping33.errors.txt b/tests/baselines/reference/contextualTyping33.errors.txt index 4ed0787bde3..16c975391a3 100644 --- a/tests/baselines/reference/contextualTyping33.errors.txt +++ b/tests/baselines/reference/contextualTyping33.errors.txt @@ -1,6 +1,7 @@ tests/cases/compiler/contextualTyping33.ts(1,66): error TS2345: Argument of type '((() => number) | (() => string))[]' is not assignable to parameter of type '{ (): number; (i: number): number; }[]'. Type '(() => number) | (() => string)' is not assignable to type '{ (): number; (i: number): number; }'. Type '() => string' is not assignable to type '{ (): number; (i: number): number; }'. + Type 'string' is not assignable to type 'number'. ==== tests/cases/compiler/contextualTyping33.ts (1 errors) ==== @@ -8,4 +9,5 @@ tests/cases/compiler/contextualTyping33.ts(1,66): error TS2345: Argument of type ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '((() => number) | (() => string))[]' is not assignable to parameter of type '{ (): number; (i: number): number; }[]'. !!! error TS2345: Type '(() => number) | (() => string)' is not assignable to type '{ (): number; (i: number): number; }'. -!!! error TS2345: Type '() => string' is not assignable to type '{ (): number; (i: number): number; }'. \ No newline at end of file +!!! error TS2345: Type '() => string' is not assignable to type '{ (): number; (i: number): number; }'. +!!! error TS2345: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingOfArrayLiterals1.errors.txt b/tests/baselines/reference/contextualTypingOfArrayLiterals1.errors.txt index a1bfaf56336..698a8e789f0 100644 --- a/tests/baselines/reference/contextualTypingOfArrayLiterals1.errors.txt +++ b/tests/baselines/reference/contextualTypingOfArrayLiterals1.errors.txt @@ -2,7 +2,6 @@ tests/cases/compiler/contextualTypingOfArrayLiterals1.ts(5,5): error TS2322: Typ Index signatures are incompatible. Type 'Date | number' is not assignable to type 'Date'. Type 'number' is not assignable to type 'Date'. - Property 'toDateString' is missing in type 'Number'. ==== tests/cases/compiler/contextualTypingOfArrayLiterals1.ts (1 errors) ==== @@ -16,7 +15,6 @@ tests/cases/compiler/contextualTypingOfArrayLiterals1.ts(5,5): error TS2322: Typ !!! error TS2322: Index signatures are incompatible. !!! error TS2322: Type 'Date | number' is not assignable to type 'Date'. !!! error TS2322: Type 'number' is not assignable to type 'Date'. -!!! error TS2322: Property 'toDateString' is missing in type 'Number'. var r2 = x3[1]; r2.getDate(); \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression2.errors.txt b/tests/baselines/reference/contextualTypingOfConditionalExpression2.errors.txt index 08fe22c08e0..be49b7b5249 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression2.errors.txt +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression2.errors.txt @@ -2,7 +2,6 @@ tests/cases/compiler/contextualTypingOfConditionalExpression2.ts(11,5): error TS Type '(b: number) => void' is not assignable to type '(a: A) => void'. Types of parameters 'b' and 'a' are incompatible. Type 'number' is not assignable to type 'A'. - Property 'foo' is missing in type 'Number'. ==== tests/cases/compiler/contextualTypingOfConditionalExpression2.ts (1 errors) ==== @@ -22,5 +21,4 @@ tests/cases/compiler/contextualTypingOfConditionalExpression2.ts(11,5): error TS !!! error TS2322: Type '(b: number) => void' is not assignable to type '(a: A) => void'. !!! error TS2322: Types of parameters 'b' and 'a' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'A'. -!!! error TS2322: Property 'foo' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.errors.txt b/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.errors.txt index a11f0009016..c7b15e8efef 100644 --- a/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.errors.txt +++ b/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.errors.txt @@ -1,6 +1,5 @@ tests/cases/compiler/contextualTypingOfGenericFunctionTypedArguments1.ts(16,32): error TS2345: Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => Date'. Type 'string' is not assignable to type 'Date'. - Property 'toDateString' is missing in type 'String'. tests/cases/compiler/contextualTypingOfGenericFunctionTypedArguments1.ts(17,32): error TS2345: Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => Date'. Type 'string' is not assignable to type 'Date'. @@ -25,7 +24,6 @@ tests/cases/compiler/contextualTypingOfGenericFunctionTypedArguments1.ts(17,32): ~ !!! error TS2345: Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => Date'. !!! error TS2345: Type 'string' is not assignable to type 'Date'. -!!! error TS2345: Property 'toDateString' is missing in type 'String'. var r6 = _.forEach(c2, (x) => { return x.toFixed() }); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => Date'. diff --git a/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment2.errors.txt b/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment2.errors.txt index 91405285973..3348effe822 100644 --- a/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment2.errors.txt +++ b/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment2.errors.txt @@ -5,7 +5,6 @@ tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAss Types of property '1' are incompatible. Type 'number' is not assignable to type 'boolean'. tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(17,6): error TS2322: Type 'string' is not assignable to type 'Number'. - Property 'toFixed' is missing in type 'String'. tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(22,5): error TS2322: Type 'number[]' is not assignable to type '[number, number]'. Property '0' is missing in type 'number[]'. tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(23,5): error TS2322: Type 'number[]' is not assignable to type '[string, string]'. @@ -43,7 +42,6 @@ tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAss var [b3 = "string", b4, b5] = bar(); // Error ~~ !!! error TS2322: Type 'string' is not assignable to type 'Number'. -!!! error TS2322: Property 'toFixed' is missing in type 'String'. // V is an array assignment pattern, S is the type Any or an array-like type (section 3.3.2), and, for each assignment element E in V, // S is not a tuple- like type and the numeric index signature type of S is assignable to the target given in E. diff --git a/tests/baselines/reference/destructuringParameterDeclaration2.errors.txt b/tests/baselines/reference/destructuringParameterDeclaration2.errors.txt index c8037255a32..8c0781571e4 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration2.errors.txt +++ b/tests/baselines/reference/destructuringParameterDeclaration2.errors.txt @@ -8,7 +8,6 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts( Type 'number | string[][] | string' is not assignable to type 'number | string[][]'. Type 'string' is not assignable to type 'number | string[][]'. Type 'string' is not assignable to type 'string[][]'. - Property 'push' is missing in type 'String'. tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(16,8): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(16,16): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(23,14): error TS2345: Argument of type '{ x: string; y: boolean; }' is not assignable to parameter of type '{ x: number; y: any; }'. @@ -34,7 +33,6 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts( tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(39,4): error TS2345: Argument of type '[number, number, boolean, boolean]' is not assignable to parameter of type '[any, any, [[any]]]'. Types of property '2' are incompatible. Type 'boolean' is not assignable to type '[[any]]'. - Property '0' is missing in type 'Boolean'. tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(40,4): error TS2345: Argument of type '[number, number, [[string]]]' is not assignable to parameter of type '[any, any, [[number]]]'. Types of property '2' are incompatible. Type '[[string]]' is not assignable to type '[[number]]'. @@ -78,7 +76,6 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts( !!! error TS2345: Type 'number | string[][] | string' is not assignable to type 'number | string[][]'. !!! error TS2345: Type 'string' is not assignable to type 'number | string[][]'. !!! error TS2345: Type 'string' is not assignable to type 'string[][]'. -!!! error TS2345: Property 'push' is missing in type 'String'. // If the declaration includes an initializer expression (which is permitted only @@ -146,7 +143,6 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts( !!! error TS2345: Argument of type '[number, number, boolean, boolean]' is not assignable to parameter of type '[any, any, [[any]]]'. !!! error TS2345: Types of property '2' are incompatible. !!! error TS2345: Type 'boolean' is not assignable to type '[[any]]'. -!!! error TS2345: Property '0' is missing in type 'Boolean'. c6([1, 2, [["string"]]]); // Error, implied type is [any, any, [[number]]] // Use initializer ~~~~~~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '[number, number, [[string]]]' is not assignable to parameter of type '[any, any, [[number]]]'. diff --git a/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt b/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt index 7e71a2cd753..b08c5b942d8 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt +++ b/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt @@ -6,7 +6,6 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts( tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts(22,4): error TS2345: Argument of type '[number, number, string, boolean, boolean]' is not assignable to parameter of type '[any, any, [[any]]]'. Types of property '2' are incompatible. Type 'string' is not assignable to type '[[any]]'. - Property '0' is missing in type 'String'. tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts(23,4): error TS2345: Argument of type '[number, number]' is not assignable to parameter of type '[any, any, [[any]]]'. Property '2' is missing in type '[number, number]'. tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts(24,4): error TS2345: Argument of type '(number | string)[]' is not assignable to parameter of type 'number[]'. @@ -53,7 +52,6 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts( !!! error TS2345: Argument of type '[number, number, string, boolean, boolean]' is not assignable to parameter of type '[any, any, [[any]]]'. !!! error TS2345: Types of property '2' are incompatible. !!! error TS2345: Type 'string' is not assignable to type '[[any]]'. -!!! error TS2345: Property '0' is missing in type 'String'. a5([1, 2]); // Error, parameter type is [any, any, [[any]]] ~~~~~~ !!! error TS2345: Argument of type '[number, number]' is not assignable to parameter of type '[any, any, [[any]]]'. diff --git a/tests/baselines/reference/destructuringParameterDeclaration5.errors.txt b/tests/baselines/reference/destructuringParameterDeclaration5.errors.txt index c60e2b75c37..2afb25502c7 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration5.errors.txt +++ b/tests/baselines/reference/destructuringParameterDeclaration5.errors.txt @@ -1,6 +1,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts(47,4): error TS2345: Argument of type '{ y: Class; }' is not assignable to parameter of type '{ y: D; }'. Types of property 'y' are incompatible. Type 'Class' is not assignable to type 'D'. + Property 'foo' is missing in type 'Class'. tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts(48,4): error TS2345: Argument of type '{}' is not assignable to parameter of type '{ y: D; }'. Property 'y' is missing in type '{}'. tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts(49,4): error TS2345: Argument of type '{ y: number; }' is not assignable to parameter of type '{ y: D; }'. @@ -63,6 +64,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts( !!! error TS2345: Argument of type '{ y: Class; }' is not assignable to parameter of type '{ y: D; }'. !!! error TS2345: Types of property 'y' are incompatible. !!! error TS2345: Type 'Class' is not assignable to type 'D'. +!!! error TS2345: Property 'foo' is missing in type 'Class'. d3({}); ~~ !!! error TS2345: Argument of type '{}' is not assignable to parameter of type '{ y: D; }'. diff --git a/tests/baselines/reference/dontShowCompilerGeneratedMembers.errors.txt b/tests/baselines/reference/dontShowCompilerGeneratedMembers.errors.txt index c13a6b5fe2a..d53571cc4a8 100644 --- a/tests/baselines/reference/dontShowCompilerGeneratedMembers.errors.txt +++ b/tests/baselines/reference/dontShowCompilerGeneratedMembers.errors.txt @@ -1,5 +1,4 @@ tests/cases/compiler/dontShowCompilerGeneratedMembers.ts(1,5): error TS2322: Type 'number' is not assignable to type '{ (): any; x: number; }'. - Property 'x' is missing in type 'Number'. tests/cases/compiler/dontShowCompilerGeneratedMembers.ts(3,6): error TS1139: Type parameter declaration expected. tests/cases/compiler/dontShowCompilerGeneratedMembers.ts(4,1): error TS1109: Expression expected. @@ -8,7 +7,6 @@ tests/cases/compiler/dontShowCompilerGeneratedMembers.ts(4,1): error TS1109: Exp var f: { ~ !!! error TS2322: Type 'number' is not assignable to type '{ (): any; x: number; }'. -!!! error TS2322: Property 'x' is missing in type 'Number'. x: number; <- ~ diff --git a/tests/baselines/reference/enumAssignability.errors.txt b/tests/baselines/reference/enumAssignability.errors.txt index 1316727076f..bfabb5eae88 100644 --- a/tests/baselines/reference/enumAssignability.errors.txt +++ b/tests/baselines/reference/enumAssignability.errors.txt @@ -3,23 +3,16 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssi tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(29,9): error TS2322: Type 'E' is not assignable to type 'string'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(30,9): error TS2322: Type 'E' is not assignable to type 'boolean'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(31,9): error TS2322: Type 'E' is not assignable to type 'Date'. - Property 'toDateString' is missing in type 'Number'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(33,9): error TS2322: Type 'E' is not assignable to type 'void'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(36,9): error TS2322: Type 'E' is not assignable to type '() => {}'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(37,9): error TS2322: Type 'E' is not assignable to type 'Function'. - Property 'apply' is missing in type 'Number'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(38,9): error TS2322: Type 'E' is not assignable to type '(x: number) => string'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(39,5): error TS2322: Type 'E' is not assignable to type 'C'. - Property 'foo' is missing in type 'Number'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(40,5): error TS2322: Type 'E' is not assignable to type 'I'. - Property 'foo' is missing in type 'Number'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(41,9): error TS2322: Type 'E' is not assignable to type 'number[]'. - Property 'length' is missing in type 'Number'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(42,9): error TS2322: Type 'E' is not assignable to type '{ foo: string; }'. - Property 'foo' is missing in type 'Number'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(43,9): error TS2322: Type 'E' is not assignable to type '(x: T) => T'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(45,9): error TS2322: Type 'E' is not assignable to type 'String'. - Property 'charAt' is missing in type 'Number'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(48,9): error TS2322: Type 'E' is not assignable to type 'T'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(49,9): error TS2322: Type 'E' is not assignable to type 'U'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(50,9): error TS2322: Type 'E' is not assignable to type 'V'. @@ -69,7 +62,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssi var ee: Date = e; ~~ !!! error TS2322: Type 'E' is not assignable to type 'Date'. -!!! error TS2322: Property 'toDateString' is missing in type 'Number'. var f: any = e; // ok var g: void = e; ~ @@ -82,26 +74,21 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssi var k: Function = e; ~ !!! error TS2322: Type 'E' is not assignable to type 'Function'. -!!! error TS2322: Property 'apply' is missing in type 'Number'. var l: (x: number) => string = e; ~ !!! error TS2322: Type 'E' is not assignable to type '(x: number) => string'. ac = e; ~~ !!! error TS2322: Type 'E' is not assignable to type 'C'. -!!! error TS2322: Property 'foo' is missing in type 'Number'. ai = e; ~~ !!! error TS2322: Type 'E' is not assignable to type 'I'. -!!! error TS2322: Property 'foo' is missing in type 'Number'. var m: number[] = e; ~ !!! error TS2322: Type 'E' is not assignable to type 'number[]'. -!!! error TS2322: Property 'length' is missing in type 'Number'. var n: { foo: string } = e; ~ !!! error TS2322: Type 'E' is not assignable to type '{ foo: string; }'. -!!! error TS2322: Property 'foo' is missing in type 'Number'. var o: (x: T) => T = e; ~ !!! error TS2322: Type 'E' is not assignable to type '(x: T) => T'. @@ -109,7 +96,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssi var q: String = e; ~ !!! error TS2322: Type 'E' is not assignable to type 'String'. -!!! error TS2322: Property 'charAt' is missing in type 'Number'. function foo(x: T, y: U, z: V) { x = e; diff --git a/tests/baselines/reference/enumAssignmentCompat.errors.txt b/tests/baselines/reference/enumAssignmentCompat.errors.txt index 3cddaf45966..f1a01247146 100644 --- a/tests/baselines/reference/enumAssignmentCompat.errors.txt +++ b/tests/baselines/reference/enumAssignmentCompat.errors.txt @@ -1,9 +1,7 @@ tests/cases/compiler/enumAssignmentCompat.ts(26,5): error TS2322: Type 'typeof W' is not assignable to type 'number'. tests/cases/compiler/enumAssignmentCompat.ts(28,5): error TS2322: Type 'W' is not assignable to type 'typeof W'. - Property 'D' is missing in type 'Number'. tests/cases/compiler/enumAssignmentCompat.ts(30,5): error TS2322: Type 'number' is not assignable to type 'typeof W'. tests/cases/compiler/enumAssignmentCompat.ts(32,5): error TS2322: Type 'W' is not assignable to type 'WStatic'. - Property 'a' is missing in type 'Number'. tests/cases/compiler/enumAssignmentCompat.ts(33,5): error TS2322: Type 'number' is not assignable to type 'WStatic'. @@ -40,7 +38,6 @@ tests/cases/compiler/enumAssignmentCompat.ts(33,5): error TS2322: Type 'number' var b: typeof W = W.a; // error ~ !!! error TS2322: Type 'W' is not assignable to type 'typeof W'. -!!! error TS2322: Property 'D' is missing in type 'Number'. var c: typeof W.a = W.a; var d: typeof W = 3; // error ~ @@ -49,7 +46,6 @@ tests/cases/compiler/enumAssignmentCompat.ts(33,5): error TS2322: Type 'number' var f: WStatic = W.a; // error ~ !!! error TS2322: Type 'W' is not assignable to type 'WStatic'. -!!! error TS2322: Property 'a' is missing in type 'Number'. var g: WStatic = 5; // error ~ !!! error TS2322: Type 'number' is not assignable to type 'WStatic'. diff --git a/tests/baselines/reference/enumAssignmentCompat2.errors.txt b/tests/baselines/reference/enumAssignmentCompat2.errors.txt index d87d6acf6a0..4e0660eaae3 100644 --- a/tests/baselines/reference/enumAssignmentCompat2.errors.txt +++ b/tests/baselines/reference/enumAssignmentCompat2.errors.txt @@ -1,9 +1,7 @@ tests/cases/compiler/enumAssignmentCompat2.ts(25,5): error TS2322: Type 'typeof W' is not assignable to type 'number'. tests/cases/compiler/enumAssignmentCompat2.ts(27,5): error TS2322: Type 'W' is not assignable to type 'typeof W'. - Property 'a' is missing in type 'Number'. tests/cases/compiler/enumAssignmentCompat2.ts(29,5): error TS2322: Type 'number' is not assignable to type 'typeof W'. tests/cases/compiler/enumAssignmentCompat2.ts(31,5): error TS2322: Type 'W' is not assignable to type 'WStatic'. - Property 'a' is missing in type 'Number'. tests/cases/compiler/enumAssignmentCompat2.ts(32,5): error TS2322: Type 'number' is not assignable to type 'WStatic'. @@ -39,7 +37,6 @@ tests/cases/compiler/enumAssignmentCompat2.ts(32,5): error TS2322: Type 'number' var b: typeof W = W.a; // error ~ !!! error TS2322: Type 'W' is not assignable to type 'typeof W'. -!!! error TS2322: Property 'a' is missing in type 'Number'. var c: typeof W.a = W.a; var d: typeof W = 3; // error ~ @@ -48,7 +45,6 @@ tests/cases/compiler/enumAssignmentCompat2.ts(32,5): error TS2322: Type 'number' var f: WStatic = W.a; // error ~ !!! error TS2322: Type 'W' is not assignable to type 'WStatic'. -!!! error TS2322: Property 'a' is missing in type 'Number'. var g: WStatic = 5; // error ~ !!! error TS2322: Type 'number' is not assignable to type 'WStatic'. diff --git a/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.errors.txt b/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.errors.txt index 12478442472..fc1bcaa545a 100644 --- a/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.errors.txt +++ b/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.errors.txt @@ -1,7 +1,6 @@ tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(34,5): error TS2322: Type 'string' is not assignable to type 'number'. tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(35,5): error TS2322: Type 'number' is not assignable to type 'string'. tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(36,5): error TS2322: Type 'number' is not assignable to type 'Date'. - Property 'toDateString' is missing in type 'Number'. tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(38,5): error TS2322: Type 'number' is not assignable to type 'void'. tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(40,5): error TS2322: Type 'D<{}>' is not assignable to type 'I'. Property 'id' is missing in type 'D<{}>'. @@ -76,7 +75,6 @@ tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAnd var aDate: Date = 9.9; ~~~~~ !!! error TS2322: Type 'number' is not assignable to type 'Date'. -!!! error TS2322: Property 'toDateString' is missing in type 'Number'. var aVoid: void = 9.9; ~~~~~ diff --git a/tests/baselines/reference/exportAssignmentConstrainedGenericType.errors.txt b/tests/baselines/reference/exportAssignmentConstrainedGenericType.errors.txt index 946bc8ee8b1..cf63c48925f 100644 --- a/tests/baselines/reference/exportAssignmentConstrainedGenericType.errors.txt +++ b/tests/baselines/reference/exportAssignmentConstrainedGenericType.errors.txt @@ -1,5 +1,4 @@ tests/cases/conformance/externalModules/foo_1.ts(2,17): error TS2345: Argument of type 'boolean' is not assignable to parameter of type '{ a: string; b: number; }'. - Property 'a' is missing in type 'Boolean'. ==== tests/cases/conformance/externalModules/foo_1.ts (1 errors) ==== @@ -7,7 +6,6 @@ tests/cases/conformance/externalModules/foo_1.ts(2,17): error TS2345: Argument o var x = new foo(true); // Should error ~~~~ !!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type '{ a: string; b: number; }'. -!!! error TS2345: Property 'a' is missing in type 'Boolean'. var y = new foo({a: "test", b: 42}); // Should be OK var z: number = y.test.b; ==== tests/cases/conformance/externalModules/foo_0.ts (0 errors) ==== diff --git a/tests/baselines/reference/functionCall7.errors.txt b/tests/baselines/reference/functionCall7.errors.txt index 19e572fa58d..576ea9c266e 100644 --- a/tests/baselines/reference/functionCall7.errors.txt +++ b/tests/baselines/reference/functionCall7.errors.txt @@ -1,6 +1,5 @@ tests/cases/compiler/functionCall7.ts(5,1): error TS2346: Supplied parameters do not match any signature of call target. tests/cases/compiler/functionCall7.ts(6,5): error TS2345: Argument of type 'number' is not assignable to parameter of type 'c1'. - Property 'a' is missing in type 'Number'. tests/cases/compiler/functionCall7.ts(7,1): error TS2346: Supplied parameters do not match any signature of call target. @@ -15,7 +14,6 @@ tests/cases/compiler/functionCall7.ts(7,1): error TS2346: Supplied parameters do foo(4); ~ !!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'c1'. -!!! error TS2345: Property 'a' is missing in type 'Number'. foo(); ~~~~~ !!! error TS2346: Supplied parameters do not match any signature of call target. diff --git a/tests/baselines/reference/functionConstraintSatisfaction2.errors.txt b/tests/baselines/reference/functionConstraintSatisfaction2.errors.txt index 7b3aa92828d..d2299894c59 100644 --- a/tests/baselines/reference/functionConstraintSatisfaction2.errors.txt +++ b/tests/baselines/reference/functionConstraintSatisfaction2.errors.txt @@ -1,5 +1,4 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(5,5): error TS2345: Argument of type 'number' is not assignable to parameter of type 'Function'. - Property 'apply' is missing in type 'Number'. tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(6,1): error TS2346: Supplied parameters do not match any signature of call target. tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(7,1): error TS2346: Supplied parameters do not match any signature of call target. tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(23,14): error TS2345: Argument of type 'Function' is not assignable to parameter of type '(x: string) => string'. @@ -20,9 +19,11 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstrain Type 'F2' provides no match for the signature '(x: string): string' tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(37,10): error TS2345: Argument of type 'T' is not assignable to parameter of type '(x: string) => string'. Type '() => void' is not assignable to type '(x: string) => string'. + Type 'void' is not assignable to type 'string'. tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(38,10): error TS2345: Argument of type 'U' is not assignable to parameter of type '(x: string) => string'. Type 'T' is not assignable to type '(x: string) => string'. Type '() => void' is not assignable to type '(x: string) => string'. + Type 'void' is not assignable to type 'string'. ==== tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts (13 errors) ==== @@ -33,7 +34,6 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstrain foo(1); ~ !!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'Function'. -!!! error TS2345: Property 'apply' is missing in type 'Number'. foo(() => { }, 1); ~~~~~~~~~~~~~~~~~ !!! error TS2346: Supplied parameters do not match any signature of call target. @@ -97,10 +97,12 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstrain ~ !!! error TS2345: Argument of type 'T' is not assignable to parameter of type '(x: string) => string'. !!! error TS2345: Type '() => void' is not assignable to type '(x: string) => string'. +!!! error TS2345: Type 'void' is not assignable to type 'string'. foo2(y); ~ !!! error TS2345: Argument of type 'U' is not assignable to parameter of type '(x: string) => string'. !!! error TS2345: Type 'T' is not assignable to type '(x: string) => string'. !!! error TS2345: Type '() => void' is not assignable to type '(x: string) => string'. +!!! error TS2345: Type 'void' is not assignable to type 'string'. } \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.errors.txt b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.errors.txt index 6ac3c9e6703..805bde82b64 100644 --- a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.errors.txt +++ b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.errors.txt @@ -1,5 +1,4 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstraintsTypeArgumentInference2.ts(11,26): error TS2345: Argument of type 'number' is not assignable to parameter of type 'Date'. - Property 'toDateString' is missing in type 'Number'. ==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstraintsTypeArgumentInference2.ts (1 errors) ==== @@ -16,5 +15,4 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithCon var r4 = foo(1); // error ~ !!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'Date'. -!!! error TS2345: Property 'toDateString' is missing in type 'Number'. var r5 = foo(new Date()); // no error \ No newline at end of file diff --git a/tests/baselines/reference/genericCombinators2.errors.txt b/tests/baselines/reference/genericCombinators2.errors.txt index d590f1030c3..5be717109c8 100644 --- a/tests/baselines/reference/genericCombinators2.errors.txt +++ b/tests/baselines/reference/genericCombinators2.errors.txt @@ -1,6 +1,5 @@ tests/cases/compiler/genericCombinators2.ts(15,43): error TS2345: Argument of type '(x: number, y: string) => string' is not assignable to parameter of type '(x: number, y: string) => Date'. Type 'string' is not assignable to type 'Date'. - Property 'toDateString' is missing in type 'String'. tests/cases/compiler/genericCombinators2.ts(16,43): error TS2345: Argument of type '(x: number, y: string) => string' is not assignable to parameter of type '(x: number, y: string) => Date'. Type 'string' is not assignable to type 'Date'. @@ -24,7 +23,6 @@ tests/cases/compiler/genericCombinators2.ts(16,43): error TS2345: Argument of ty ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '(x: number, y: string) => string' is not assignable to parameter of type '(x: number, y: string) => Date'. !!! error TS2345: Type 'string' is not assignable to type 'Date'. -!!! error TS2345: Property 'toDateString' is missing in type 'String'. var r5b = _.map(c2, rf1); ~~~ !!! error TS2345: Argument of type '(x: number, y: string) => string' is not assignable to parameter of type '(x: number, y: string) => Date'. diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.errors.txt b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.errors.txt index 38818b59863..1e5e3b6ee96 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.errors.txt +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.errors.txt @@ -1,7 +1,6 @@ tests/cases/compiler/genericDerivedTypeWithSpecializedBase2.ts(11,1): error TS2322: Type 'B' is not assignable to type 'A<{ length: number; foo: number; }>'. Types of property 'x' are incompatible. Type 'string' is not assignable to type '{ length: number; foo: number; }'. - Property 'foo' is missing in type 'String'. ==== tests/cases/compiler/genericDerivedTypeWithSpecializedBase2.ts (1 errors) ==== @@ -20,5 +19,4 @@ tests/cases/compiler/genericDerivedTypeWithSpecializedBase2.ts(11,1): error TS23 !!! error TS2322: Type 'B' is not assignable to type 'A<{ length: number; foo: number; }>'. !!! error TS2322: Types of property 'x' are incompatible. !!! error TS2322: Type 'string' is not assignable to type '{ length: number; foo: number; }'. -!!! error TS2322: Property 'foo' is missing in type 'String'. \ No newline at end of file diff --git a/tests/baselines/reference/genericRestArgs.errors.txt b/tests/baselines/reference/genericRestArgs.errors.txt index 99106ebd795..8a977452958 100644 --- a/tests/baselines/reference/genericRestArgs.errors.txt +++ b/tests/baselines/reference/genericRestArgs.errors.txt @@ -4,7 +4,6 @@ tests/cases/compiler/genericRestArgs.ts(5,34): error TS2345: Argument of type 's tests/cases/compiler/genericRestArgs.ts(10,12): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. tests/cases/compiler/genericRestArgs.ts(12,30): error TS2345: Argument of type 'number' is not assignable to parameter of type 'any[]'. - Property 'length' is missing in type 'Number'. ==== tests/cases/compiler/genericRestArgs.ts (4 errors) ==== @@ -29,5 +28,4 @@ tests/cases/compiler/genericRestArgs.ts(12,30): error TS2345: Argument of type ' var a2Gb = makeArrayG(1, ""); var a2Gc = makeArrayG(1, ""); // error ~ -!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'any[]'. -!!! error TS2345: Property 'length' is missing in type 'Number'. \ No newline at end of file +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'any[]'. \ No newline at end of file diff --git a/tests/baselines/reference/instanceSubtypeCheck2.errors.txt b/tests/baselines/reference/instanceSubtypeCheck2.errors.txt index ba93c2ef127..81982ac3ec7 100644 --- a/tests/baselines/reference/instanceSubtypeCheck2.errors.txt +++ b/tests/baselines/reference/instanceSubtypeCheck2.errors.txt @@ -1,7 +1,6 @@ tests/cases/compiler/instanceSubtypeCheck2.ts(5,7): error TS2415: Class 'C2' incorrectly extends base class 'C1'. Types of property 'x' are incompatible. Type 'string' is not assignable to type 'C2'. - Property 'x' is missing in type 'String'. ==== tests/cases/compiler/instanceSubtypeCheck2.ts (1 errors) ==== @@ -14,6 +13,5 @@ tests/cases/compiler/instanceSubtypeCheck2.ts(5,7): error TS2415: Class 'C2' !!! error TS2415: Class 'C2' incorrectly extends base class 'C1'. !!! error TS2415: Types of property 'x' are incompatible. !!! error TS2415: Type 'string' is not assignable to type 'C2'. -!!! error TS2415: Property 'x' is missing in type 'String'. x: string } \ No newline at end of file diff --git a/tests/baselines/reference/intTypeCheck.errors.txt b/tests/baselines/reference/intTypeCheck.errors.txt index 3d805a65822..a860f5e3604 100644 --- a/tests/baselines/reference/intTypeCheck.errors.txt +++ b/tests/baselines/reference/intTypeCheck.errors.txt @@ -9,7 +9,6 @@ tests/cases/compiler/intTypeCheck.ts(101,5): error TS2322: Type 'Base' is not as tests/cases/compiler/intTypeCheck.ts(103,5): error TS2322: Type '() => void' is not assignable to type 'i1'. Property 'p' is missing in type '() => void'. tests/cases/compiler/intTypeCheck.ts(106,5): error TS2322: Type 'boolean' is not assignable to type 'i1'. - Property 'p' is missing in type 'Boolean'. tests/cases/compiler/intTypeCheck.ts(106,20): error TS1109: Expression expected. tests/cases/compiler/intTypeCheck.ts(106,21): error TS2304: Cannot find name 'i1'. tests/cases/compiler/intTypeCheck.ts(107,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. @@ -38,7 +37,6 @@ tests/cases/compiler/intTypeCheck.ts(134,22): error TS2304: Cannot find name 'i3 tests/cases/compiler/intTypeCheck.ts(135,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(142,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(148,5): error TS2322: Type 'boolean' is not assignable to type 'i4'. - Index signature is missing in type 'Boolean'. tests/cases/compiler/intTypeCheck.ts(148,21): error TS1109: Expression expected. tests/cases/compiler/intTypeCheck.ts(148,22): error TS2304: Cannot find name 'i4'. tests/cases/compiler/intTypeCheck.ts(149,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. @@ -52,7 +50,6 @@ tests/cases/compiler/intTypeCheck.ts(157,5): error TS2322: Type 'Base' is not as tests/cases/compiler/intTypeCheck.ts(159,5): error TS2322: Type '() => void' is not assignable to type 'i5'. Property 'p' is missing in type '() => void'. tests/cases/compiler/intTypeCheck.ts(162,5): error TS2322: Type 'boolean' is not assignable to type 'i5'. - Property 'p' is missing in type 'Boolean'. tests/cases/compiler/intTypeCheck.ts(162,21): error TS1109: Expression expected. tests/cases/compiler/intTypeCheck.ts(162,22): error TS2304: Cannot find name 'i5'. tests/cases/compiler/intTypeCheck.ts(163,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. @@ -83,7 +80,6 @@ tests/cases/compiler/intTypeCheck.ts(190,22): error TS2304: Cannot find name 'i7 tests/cases/compiler/intTypeCheck.ts(191,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(198,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(204,5): error TS2322: Type 'boolean' is not assignable to type 'i8'. - Index signature is missing in type 'Boolean'. tests/cases/compiler/intTypeCheck.ts(204,21): error TS1109: Expression expected. tests/cases/compiler/intTypeCheck.ts(204,22): error TS2304: Cannot find name 'i8'. tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. @@ -215,7 +211,6 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit var obj9: i1 = new anyVar; ~~~~ !!! error TS2322: Type 'boolean' is not assignable to type 'i1'. -!!! error TS2322: Property 'p' is missing in type 'Boolean'. ~ !!! error TS1109: Expression expected. ~~ @@ -307,7 +302,6 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit var obj42: i4 = new anyVar; ~~~~~ !!! error TS2322: Type 'boolean' is not assignable to type 'i4'. -!!! error TS2322: Index signature is missing in type 'Boolean'. ~ !!! error TS1109: Expression expected. ~~ @@ -344,7 +338,6 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit var obj53: i5 = new anyVar; ~~~~~ !!! error TS2322: Type 'boolean' is not assignable to type 'i5'. -!!! error TS2322: Property 'p' is missing in type 'Boolean'. ~ !!! error TS1109: Expression expected. ~~ @@ -439,7 +432,6 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit var obj86: i8 = new anyVar; ~~~~~ !!! error TS2322: Type 'boolean' is not assignable to type 'i8'. -!!! error TS2322: Index signature is missing in type 'Boolean'. ~ !!! error TS1109: Expression expected. ~~ diff --git a/tests/baselines/reference/interfaceImplementation7.errors.txt b/tests/baselines/reference/interfaceImplementation7.errors.txt index b297015dfbe..1025a1f5296 100644 --- a/tests/baselines/reference/interfaceImplementation7.errors.txt +++ b/tests/baselines/reference/interfaceImplementation7.errors.txt @@ -4,7 +4,6 @@ tests/cases/compiler/interfaceImplementation7.ts(7,7): error TS2420: Class 'C1' Types of property 'name' are incompatible. Type '() => string' is not assignable to type '() => { s: string; n: number; }'. Type 'string' is not assignable to type '{ s: string; n: number; }'. - Property 's' is missing in type 'String'. ==== tests/cases/compiler/interfaceImplementation7.ts (2 errors) ==== @@ -23,7 +22,6 @@ tests/cases/compiler/interfaceImplementation7.ts(7,7): error TS2420: Class 'C1' !!! error TS2420: Types of property 'name' are incompatible. !!! error TS2420: Type '() => string' is not assignable to type '() => { s: string; n: number; }'. !!! error TS2420: Type 'string' is not assignable to type '{ s: string; n: number; }'. -!!! error TS2420: Property 's' is missing in type 'String'. public name(): string { return ""; } } \ No newline at end of file diff --git a/tests/baselines/reference/intersectionAndUnionTypes.errors.txt b/tests/baselines/reference/intersectionAndUnionTypes.errors.txt index 4f26cc63ba3..d4526c815c4 100644 --- a/tests/baselines/reference/intersectionAndUnionTypes.errors.txt +++ b/tests/baselines/reference/intersectionAndUnionTypes.errors.txt @@ -1,5 +1,6 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(19,1): error TS2322: Type 'A' is not assignable to type 'A & B'. Type 'A' is not assignable to type 'B'. + Property 'b' is missing in type 'A'. tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(20,1): error TS2322: Type 'B' is not assignable to type 'A & B'. Type 'B' is not assignable to type 'A'. Property 'a' is missing in type 'B'. @@ -7,26 +8,32 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(23,1): e Type 'A' is not assignable to type '(A & B) | (C & D)'. Type 'A' is not assignable to type 'C & D'. Type 'A' is not assignable to type 'C'. + Property 'c' is missing in type 'A'. tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(25,1): error TS2322: Type 'C | D' is not assignable to type '(A & B) | (C & D)'. Type 'C' is not assignable to type '(A & B) | (C & D)'. Type 'C' is not assignable to type 'C & D'. Type 'C' is not assignable to type 'D'. + Property 'd' is missing in type 'C'. tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(26,1): error TS2322: Type '(A & B) | (C & D)' is not assignable to type 'A & B'. Type 'C & D' is not assignable to type 'A & B'. Type 'C & D' is not assignable to type 'A'. Type 'D' is not assignable to type 'A'. + Property 'a' is missing in type 'D'. tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(27,1): error TS2322: Type '(A & B) | (C & D)' is not assignable to type 'A | B'. Type 'C & D' is not assignable to type 'A | B'. Type 'C & D' is not assignable to type 'B'. Type 'D' is not assignable to type 'B'. + Property 'b' is missing in type 'D'. tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(28,1): error TS2322: Type '(A & B) | (C & D)' is not assignable to type 'C & D'. Type 'A & B' is not assignable to type 'C & D'. Type 'A & B' is not assignable to type 'C'. Type 'B' is not assignable to type 'C'. + Property 'c' is missing in type 'B'. tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(29,1): error TS2322: Type '(A & B) | (C & D)' is not assignable to type 'C | D'. Type 'A & B' is not assignable to type 'C | D'. Type 'A & B' is not assignable to type 'D'. Type 'B' is not assignable to type 'D'. + Property 'd' is missing in type 'B'. tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(31,1): error TS2322: Type 'A & B' is not assignable to type '(A | B) & (C | D)'. Type 'A & B' is not assignable to type 'C | D'. Type 'A & B' is not assignable to type 'D'. @@ -35,6 +42,7 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(32,1): e Type 'A' is not assignable to type '(A | B) & (C | D)'. Type 'A' is not assignable to type 'C | D'. Type 'A' is not assignable to type 'D'. + Property 'd' is missing in type 'A'. tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(33,1): error TS2322: Type 'C & D' is not assignable to type '(A | B) & (C | D)'. Type 'C & D' is not assignable to type 'A | B'. Type 'C & D' is not assignable to type 'B'. @@ -43,14 +51,17 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(34,1): e Type 'C' is not assignable to type '(A | B) & (C | D)'. Type 'C' is not assignable to type 'A | B'. Type 'C' is not assignable to type 'B'. + Property 'b' is missing in type 'C'. tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(35,1): error TS2322: Type '(A | B) & (C | D)' is not assignable to type 'A & B'. Type '(A | B) & (C | D)' is not assignable to type 'A'. Type 'C | D' is not assignable to type 'A'. Type 'C' is not assignable to type 'A'. + Property 'a' is missing in type 'C'. tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(37,1): error TS2322: Type '(A | B) & (C | D)' is not assignable to type 'C & D'. Type '(A | B) & (C | D)' is not assignable to type 'C'. Type 'C | D' is not assignable to type 'C'. Type 'D' is not assignable to type 'C'. + Property 'c' is missing in type 'D'. ==== tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts (14 errors) ==== @@ -76,6 +87,7 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(37,1): e ~~~ !!! error TS2322: Type 'A' is not assignable to type 'A & B'. !!! error TS2322: Type 'A' is not assignable to type 'B'. +!!! error TS2322: Property 'b' is missing in type 'A'. anb = b; ~~~ !!! error TS2322: Type 'B' is not assignable to type 'A & B'. @@ -89,6 +101,7 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(37,1): e !!! error TS2322: Type 'A' is not assignable to type '(A & B) | (C & D)'. !!! error TS2322: Type 'A' is not assignable to type 'C & D'. !!! error TS2322: Type 'A' is not assignable to type 'C'. +!!! error TS2322: Property 'c' is missing in type 'A'. x = cnd; // Ok x = cod; ~ @@ -96,30 +109,35 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(37,1): e !!! error TS2322: Type 'C' is not assignable to type '(A & B) | (C & D)'. !!! error TS2322: Type 'C' is not assignable to type 'C & D'. !!! error TS2322: Type 'C' is not assignable to type 'D'. +!!! error TS2322: Property 'd' is missing in type 'C'. anb = x; ~~~ !!! error TS2322: Type '(A & B) | (C & D)' is not assignable to type 'A & B'. !!! error TS2322: Type 'C & D' is not assignable to type 'A & B'. !!! error TS2322: Type 'C & D' is not assignable to type 'A'. !!! error TS2322: Type 'D' is not assignable to type 'A'. +!!! error TS2322: Property 'a' is missing in type 'D'. aob = x; ~~~ !!! error TS2322: Type '(A & B) | (C & D)' is not assignable to type 'A | B'. !!! error TS2322: Type 'C & D' is not assignable to type 'A | B'. !!! error TS2322: Type 'C & D' is not assignable to type 'B'. !!! error TS2322: Type 'D' is not assignable to type 'B'. +!!! error TS2322: Property 'b' is missing in type 'D'. cnd = x; ~~~ !!! error TS2322: Type '(A & B) | (C & D)' is not assignable to type 'C & D'. !!! error TS2322: Type 'A & B' is not assignable to type 'C & D'. !!! error TS2322: Type 'A & B' is not assignable to type 'C'. !!! error TS2322: Type 'B' is not assignable to type 'C'. +!!! error TS2322: Property 'c' is missing in type 'B'. cod = x; ~~~ !!! error TS2322: Type '(A & B) | (C & D)' is not assignable to type 'C | D'. !!! error TS2322: Type 'A & B' is not assignable to type 'C | D'. !!! error TS2322: Type 'A & B' is not assignable to type 'D'. !!! error TS2322: Type 'B' is not assignable to type 'D'. +!!! error TS2322: Property 'd' is missing in type 'B'. y = anb; ~ @@ -133,6 +151,7 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(37,1): e !!! error TS2322: Type 'A' is not assignable to type '(A | B) & (C | D)'. !!! error TS2322: Type 'A' is not assignable to type 'C | D'. !!! error TS2322: Type 'A' is not assignable to type 'D'. +!!! error TS2322: Property 'd' is missing in type 'A'. y = cnd; ~ !!! error TS2322: Type 'C & D' is not assignable to type '(A | B) & (C | D)'. @@ -145,12 +164,14 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(37,1): e !!! error TS2322: Type 'C' is not assignable to type '(A | B) & (C | D)'. !!! error TS2322: Type 'C' is not assignable to type 'A | B'. !!! error TS2322: Type 'C' is not assignable to type 'B'. +!!! error TS2322: Property 'b' is missing in type 'C'. anb = y; ~~~ !!! error TS2322: Type '(A | B) & (C | D)' is not assignable to type 'A & B'. !!! error TS2322: Type '(A | B) & (C | D)' is not assignable to type 'A'. !!! error TS2322: Type 'C | D' is not assignable to type 'A'. !!! error TS2322: Type 'C' is not assignable to type 'A'. +!!! error TS2322: Property 'a' is missing in type 'C'. aob = y; // Ok cnd = y; ~~~ @@ -158,5 +179,6 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(37,1): e !!! error TS2322: Type '(A | B) & (C | D)' is not assignable to type 'C'. !!! error TS2322: Type 'C | D' is not assignable to type 'C'. !!! error TS2322: Type 'D' is not assignable to type 'C'. +!!! error TS2322: Property 'c' is missing in type 'D'. cod = y; // Ok \ No newline at end of file diff --git a/tests/baselines/reference/invalidBooleanAssignments.errors.txt b/tests/baselines/reference/invalidBooleanAssignments.errors.txt index 84ced226113..99d32aff9bc 100644 --- a/tests/baselines/reference/invalidBooleanAssignments.errors.txt +++ b/tests/baselines/reference/invalidBooleanAssignments.errors.txt @@ -3,9 +3,7 @@ tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(4, tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(5,5): error TS2322: Type 'boolean' is not assignable to type 'void'. tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(9,5): error TS2322: Type 'boolean' is not assignable to type 'E'. tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(12,5): error TS2322: Type 'boolean' is not assignable to type 'C'. - Property 'foo' is missing in type 'Boolean'. tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(15,5): error TS2322: Type 'boolean' is not assignable to type 'I'. - Property 'bar' is missing in type 'Boolean'. tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(17,5): error TS2322: Type 'boolean' is not assignable to type '() => string'. tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(21,1): error TS2364: Invalid left-hand side of assignment expression. tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(24,5): error TS2322: Type 'boolean' is not assignable to type 'T'. @@ -35,13 +33,11 @@ tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(26 var f: C = x; ~ !!! error TS2322: Type 'boolean' is not assignable to type 'C'. -!!! error TS2322: Property 'foo' is missing in type 'Boolean'. interface I { bar: string } var g: I = x; ~ !!! error TS2322: Type 'boolean' is not assignable to type 'I'. -!!! error TS2322: Property 'bar' is missing in type 'Boolean'. var h: { (): string } = x; ~ diff --git a/tests/baselines/reference/invalidNumberAssignments.errors.txt b/tests/baselines/reference/invalidNumberAssignments.errors.txt index 7eb5e6cb897..fd8acaba032 100644 --- a/tests/baselines/reference/invalidNumberAssignments.errors.txt +++ b/tests/baselines/reference/invalidNumberAssignments.errors.txt @@ -2,13 +2,9 @@ tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(3,5) tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(4,5): error TS2322: Type 'number' is not assignable to type 'string'. tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(5,5): error TS2322: Type 'number' is not assignable to type 'void'. tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(9,5): error TS2322: Type 'number' is not assignable to type 'C'. - Property 'foo' is missing in type 'Number'. tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(12,5): error TS2322: Type 'number' is not assignable to type 'I'. - Property 'bar' is missing in type 'Number'. tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(14,5): error TS2322: Type 'number' is not assignable to type '{ baz: string; }'. - Property 'baz' is missing in type 'Number'. tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(15,5): error TS2322: Type 'number' is not assignable to type '{ 0: number; }'. - Property '0' is missing in type 'Number'. tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(18,1): error TS2364: Invalid left-hand side of assignment expression. tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(21,5): error TS2322: Type 'number' is not assignable to type 'T'. tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(23,1): error TS2364: Invalid left-hand side of assignment expression. @@ -32,22 +28,18 @@ tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(23,1 var e: C = x; ~ !!! error TS2322: Type 'number' is not assignable to type 'C'. -!!! error TS2322: Property 'foo' is missing in type 'Number'. interface I { bar: string; } var f: I = x; ~ !!! error TS2322: Type 'number' is not assignable to type 'I'. -!!! error TS2322: Property 'bar' is missing in type 'Number'. var g: { baz: string } = 1; ~ !!! error TS2322: Type 'number' is not assignable to type '{ baz: string; }'. -!!! error TS2322: Property 'baz' is missing in type 'Number'. var g2: { 0: number } = 1; ~~ !!! error TS2322: Type 'number' is not assignable to type '{ 0: number; }'. -!!! error TS2322: Property '0' is missing in type 'Number'. module M { export var x = 1; } M = x; diff --git a/tests/baselines/reference/invalidStringAssignments.errors.txt b/tests/baselines/reference/invalidStringAssignments.errors.txt index e67106bef92..d7ac2134dc1 100644 --- a/tests/baselines/reference/invalidStringAssignments.errors.txt +++ b/tests/baselines/reference/invalidStringAssignments.errors.txt @@ -2,13 +2,9 @@ tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(3,5) tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(4,5): error TS2322: Type 'string' is not assignable to type 'number'. tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(5,5): error TS2322: Type 'string' is not assignable to type 'void'. tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(9,5): error TS2322: Type 'string' is not assignable to type 'C'. - Property 'foo' is missing in type 'String'. tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(12,5): error TS2322: Type 'string' is not assignable to type 'I'. - Property 'bar' is missing in type 'String'. tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(14,5): error TS2322: Type 'number' is not assignable to type '{ baz: string; }'. - Property 'baz' is missing in type 'Number'. tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(15,5): error TS2322: Type 'number' is not assignable to type '{ 0: number; }'. - Property '0' is missing in type 'Number'. tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(18,1): error TS2364: Invalid left-hand side of assignment expression. tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(21,5): error TS2322: Type 'string' is not assignable to type 'T'. tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(23,1): error TS2364: Invalid left-hand side of assignment expression. @@ -33,22 +29,18 @@ tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(26,5 var e: C = x; ~ !!! error TS2322: Type 'string' is not assignable to type 'C'. -!!! error TS2322: Property 'foo' is missing in type 'String'. interface I { bar: string; } var f: I = x; ~ !!! error TS2322: Type 'string' is not assignable to type 'I'. -!!! error TS2322: Property 'bar' is missing in type 'String'. var g: { baz: string } = 1; ~ !!! error TS2322: Type 'number' is not assignable to type '{ baz: string; }'. -!!! error TS2322: Property 'baz' is missing in type 'Number'. var g2: { 0: number } = 1; ~~ !!! error TS2322: Type 'number' is not assignable to type '{ 0: number; }'. -!!! error TS2322: Property '0' is missing in type 'Number'. module M { export var x = 1; } M = x; diff --git a/tests/baselines/reference/invalidVoidAssignments.errors.txt b/tests/baselines/reference/invalidVoidAssignments.errors.txt index 9c6be972d3b..af8cec62672 100644 --- a/tests/baselines/reference/invalidVoidAssignments.errors.txt +++ b/tests/baselines/reference/invalidVoidAssignments.errors.txt @@ -4,9 +4,7 @@ tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(5,5): er tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(9,5): error TS2322: Type 'void' is not assignable to type 'C'. tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(12,5): error TS2322: Type 'void' is not assignable to type 'I'. tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(14,5): error TS2322: Type 'number' is not assignable to type '{ baz: string; }'. - Property 'baz' is missing in type 'Number'. tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(15,5): error TS2322: Type 'number' is not assignable to type '{ 0: number; }'. - Property '0' is missing in type 'Number'. tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(18,1): error TS2364: Invalid left-hand side of assignment expression. tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(21,5): error TS2322: Type 'void' is not assignable to type 'T'. tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(23,1): error TS2364: Invalid left-hand side of assignment expression. @@ -42,11 +40,9 @@ tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(29,1): e var g: { baz: string } = 1; ~ !!! error TS2322: Type 'number' is not assignable to type '{ baz: string; }'. -!!! error TS2322: Property 'baz' is missing in type 'Number'. var g2: { 0: number } = 1; ~~ !!! error TS2322: Type 'number' is not assignable to type '{ 0: number; }'. -!!! error TS2322: Property '0' is missing in type 'Number'. module M { export var x = 1; } M = x; diff --git a/tests/baselines/reference/lastPropertyInLiteralWins.errors.txt b/tests/baselines/reference/lastPropertyInLiteralWins.errors.txt index d503f59c602..ab784eae397 100644 --- a/tests/baselines/reference/lastPropertyInLiteralWins.errors.txt +++ b/tests/baselines/reference/lastPropertyInLiteralWins.errors.txt @@ -1,6 +1,8 @@ tests/cases/compiler/lastPropertyInLiteralWins.ts(7,6): error TS2345: Argument of type '{ thunk: (num: number) => void; }' is not assignable to parameter of type 'Thing'. Types of property 'thunk' are incompatible. Type '(num: number) => void' is not assignable to type '(str: string) => void'. + Types of parameters 'num' and 'str' are incompatible. + Type 'number' is not assignable to type 'string'. tests/cases/compiler/lastPropertyInLiteralWins.ts(8,5): error TS2300: Duplicate identifier 'thunk'. tests/cases/compiler/lastPropertyInLiteralWins.ts(9,5): error TS2300: Duplicate identifier 'thunk'. tests/cases/compiler/lastPropertyInLiteralWins.ts(13,5): error TS2300: Duplicate identifier 'thunk'. @@ -29,6 +31,8 @@ tests/cases/compiler/lastPropertyInLiteralWins.ts(14,5): error TS2300: Duplicate !!! error TS2345: Argument of type '{ thunk: (num: number) => void; }' is not assignable to parameter of type 'Thing'. !!! error TS2345: Types of property 'thunk' are incompatible. !!! error TS2345: Type '(num: number) => void' is not assignable to type '(str: string) => void'. +!!! error TS2345: Types of parameters 'num' and 'str' are incompatible. +!!! error TS2345: Type 'number' is not assignable to type 'string'. test({ // Should be OK. Last 'thunk' is of correct type thunk: (num: number) => {}, diff --git a/tests/baselines/reference/maxConstraints.errors.txt b/tests/baselines/reference/maxConstraints.errors.txt index 03e7158f725..a7d07a5b5f2 100644 --- a/tests/baselines/reference/maxConstraints.errors.txt +++ b/tests/baselines/reference/maxConstraints.errors.txt @@ -1,5 +1,4 @@ tests/cases/compiler/maxConstraints.ts(8,22): error TS2345: Argument of type 'number' is not assignable to parameter of type 'Comparable'. - Property 'compareTo' is missing in type 'Number'. ==== tests/cases/compiler/maxConstraints.ts (1 errors) ==== @@ -12,5 +11,4 @@ tests/cases/compiler/maxConstraints.ts(8,22): error TS2345: Argument of type 'nu var max2: Comparer = (x, y) => { return (x.compareTo(y) > 0) ? x : y }; var maxResult = max2(1, 2); ~ -!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'Comparable'. -!!! error TS2345: Property 'compareTo' is missing in type 'Number'. \ No newline at end of file +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'Comparable'. \ No newline at end of file diff --git a/tests/baselines/reference/numericIndexerConstraint1.errors.txt b/tests/baselines/reference/numericIndexerConstraint1.errors.txt index 42cf293fe60..0d4bb17002b 100644 --- a/tests/baselines/reference/numericIndexerConstraint1.errors.txt +++ b/tests/baselines/reference/numericIndexerConstraint1.errors.txt @@ -1,5 +1,4 @@ tests/cases/compiler/numericIndexerConstraint1.ts(3,5): error TS2322: Type 'number' is not assignable to type 'Foo'. - Property 'foo' is missing in type 'Number'. ==== tests/cases/compiler/numericIndexerConstraint1.ts (1 errors) ==== @@ -8,5 +7,4 @@ tests/cases/compiler/numericIndexerConstraint1.ts(3,5): error TS2322: Type 'numb var result: Foo = x["one"]; // error ~~~~~~ !!! error TS2322: Type 'number' is not assignable to type 'Foo'. -!!! error TS2322: Property 'foo' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralIndexerErrors.errors.txt b/tests/baselines/reference/objectLiteralIndexerErrors.errors.txt index c35e49f02a3..f825c416311 100644 --- a/tests/baselines/reference/objectLiteralIndexerErrors.errors.txt +++ b/tests/baselines/reference/objectLiteralIndexerErrors.errors.txt @@ -1,6 +1,7 @@ tests/cases/compiler/objectLiteralIndexerErrors.ts(13,5): error TS2322: Type '{ [x: string]: A; [x: number]: A; 0: A; x: B; }' is not assignable to type '{ [s: string]: A; [n: number]: B; }'. Index signatures are incompatible. Type 'A' is not assignable to type 'B'. + Property 'y' is missing in type 'A'. ==== tests/cases/compiler/objectLiteralIndexerErrors.ts (1 errors) ==== @@ -21,4 +22,5 @@ tests/cases/compiler/objectLiteralIndexerErrors.ts(13,5): error TS2322: Type '{ !!! error TS2322: Type '{ [x: string]: A; [x: number]: A; 0: A; x: B; }' is not assignable to type '{ [s: string]: A; [n: number]: B; }'. !!! error TS2322: Index signatures are incompatible. !!! error TS2322: Type 'A' is not assignable to type 'B'. +!!! error TS2322: Property 'y' is missing in type 'A'. o1 = { x: c, 0: a }; // string indexer is any, number indexer is A \ No newline at end of file diff --git a/tests/baselines/reference/parseClassDeclarationInStrictModeByDefaultInES6.errors.txt b/tests/baselines/reference/parseClassDeclarationInStrictModeByDefaultInES6.errors.txt index e1b0bb34529..6f45030a650 100644 --- a/tests/baselines/reference/parseClassDeclarationInStrictModeByDefaultInES6.errors.txt +++ b/tests/baselines/reference/parseClassDeclarationInStrictModeByDefaultInES6.errors.txt @@ -2,7 +2,6 @@ tests/cases/conformance/es6/classDeclaration/parseClassDeclarationInStrictModeBy tests/cases/conformance/es6/classDeclaration/parseClassDeclarationInStrictModeByDefaultInES6.ts(5,17): error TS1210: Invalid use of 'eval'. Class definitions are automatically in strict mode. tests/cases/conformance/es6/classDeclaration/parseClassDeclarationInStrictModeByDefaultInES6.ts(6,9): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode. tests/cases/conformance/es6/classDeclaration/parseClassDeclarationInStrictModeByDefaultInES6.ts(6,9): error TS2322: Type 'string' is not assignable to type 'IArguments'. - Property 'callee' is missing in type 'String'. ==== tests/cases/conformance/es6/classDeclaration/parseClassDeclarationInStrictModeByDefaultInES6.ts (4 errors) ==== @@ -20,6 +19,5 @@ tests/cases/conformance/es6/classDeclaration/parseClassDeclarationInStrictModeBy !!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode. ~~~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'IArguments'. -!!! error TS2322: Property 'callee' is missing in type 'String'. } } \ No newline at end of file diff --git a/tests/baselines/reference/promiseChaining1.errors.txt b/tests/baselines/reference/promiseChaining1.errors.txt index bd3e52fcc1c..7396d03059a 100644 --- a/tests/baselines/reference/promiseChaining1.errors.txt +++ b/tests/baselines/reference/promiseChaining1.errors.txt @@ -1,6 +1,5 @@ tests/cases/compiler/promiseChaining1.ts(7,50): error TS2345: Argument of type '(x: S) => string' is not assignable to parameter of type '(x: S) => Function'. Type 'string' is not assignable to type 'Function'. - Property 'apply' is missing in type 'String'. ==== tests/cases/compiler/promiseChaining1.ts (1 errors) ==== @@ -14,7 +13,6 @@ tests/cases/compiler/promiseChaining1.ts(7,50): error TS2345: Argument of type ' ~~~~~~~~~~ !!! error TS2345: Argument of type '(x: S) => string' is not assignable to parameter of type '(x: S) => Function'. !!! error TS2345: Type 'string' is not assignable to type 'Function'. -!!! error TS2345: Property 'apply' is missing in type 'String'. return new Chain2(result); } } \ No newline at end of file diff --git a/tests/baselines/reference/promiseChaining2.errors.txt b/tests/baselines/reference/promiseChaining2.errors.txt index f12baebd4dc..a31c4335da7 100644 --- a/tests/baselines/reference/promiseChaining2.errors.txt +++ b/tests/baselines/reference/promiseChaining2.errors.txt @@ -1,6 +1,5 @@ tests/cases/compiler/promiseChaining2.ts(7,45): error TS2345: Argument of type '(x: S) => string' is not assignable to parameter of type '(x: S) => Function'. Type 'string' is not assignable to type 'Function'. - Property 'apply' is missing in type 'String'. ==== tests/cases/compiler/promiseChaining2.ts (1 errors) ==== @@ -14,7 +13,6 @@ tests/cases/compiler/promiseChaining2.ts(7,45): error TS2345: Argument of type ' ~~~~~~~~~~ !!! error TS2345: Argument of type '(x: S) => string' is not assignable to parameter of type '(x: S) => Function'. !!! error TS2345: Type 'string' is not assignable to type 'Function'. -!!! error TS2345: Property 'apply' is missing in type 'String'. return new Chain2(result); } } \ No newline at end of file diff --git a/tests/baselines/reference/promisePermutations.errors.txt b/tests/baselines/reference/promisePermutations.errors.txt index a74938f5dd9..4edfff05a5a 100644 --- a/tests/baselines/reference/promisePermutations.errors.txt +++ b/tests/baselines/reference/promisePermutations.errors.txt @@ -1,7 +1,6 @@ tests/cases/compiler/promisePermutations.ts(74,70): error TS2345: Argument of type '(x: number) => IPromise' is not assignable to parameter of type '(value: IPromise) => IPromise'. Types of parameters 'x' and 'value' are incompatible. Type 'number' is not assignable to type 'IPromise'. - Property 'then' is missing in type 'Number'. tests/cases/compiler/promisePermutations.ts(79,19): error TS2345: Argument of type '(x: number, y?: string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. Types of parameters 'x' and 'value' are incompatible. Type 'number' is not assignable to type 'string'. @@ -157,7 +156,6 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t !!! error TS2345: Argument of type '(x: number) => IPromise' is not assignable to parameter of type '(value: IPromise) => IPromise'. !!! error TS2345: Types of parameters 'x' and 'value' are incompatible. !!! error TS2345: Type 'number' is not assignable to type 'IPromise'. -!!! error TS2345: Property 'then' is missing in type 'Number'. var r4: IPromise; var sIPromise: (x: any) => IPromise; diff --git a/tests/baselines/reference/promisePermutations2.errors.txt b/tests/baselines/reference/promisePermutations2.errors.txt index 8afceeae0fd..dda9a08b38d 100644 --- a/tests/baselines/reference/promisePermutations2.errors.txt +++ b/tests/baselines/reference/promisePermutations2.errors.txt @@ -1,7 +1,6 @@ tests/cases/compiler/promisePermutations2.ts(73,70): error TS2345: Argument of type '(x: number) => IPromise' is not assignable to parameter of type '(value: IPromise) => IPromise'. Types of parameters 'x' and 'value' are incompatible. Type 'number' is not assignable to type 'IPromise'. - Property 'then' is missing in type 'Number'. tests/cases/compiler/promisePermutations2.ts(78,19): error TS2345: Argument of type '(x: number, y?: string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. Types of parameters 'x' and 'value' are incompatible. Type 'number' is not assignable to type 'string'. @@ -156,7 +155,6 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of !!! error TS2345: Argument of type '(x: number) => IPromise' is not assignable to parameter of type '(value: IPromise) => IPromise'. !!! error TS2345: Types of parameters 'x' and 'value' are incompatible. !!! error TS2345: Type 'number' is not assignable to type 'IPromise'. -!!! error TS2345: Property 'then' is missing in type 'Number'. var r4: IPromise; var sIPromise: (x: any) => IPromise; diff --git a/tests/baselines/reference/promisePermutations3.errors.txt b/tests/baselines/reference/promisePermutations3.errors.txt index b17021a02b9..c6c2bca62a4 100644 --- a/tests/baselines/reference/promisePermutations3.errors.txt +++ b/tests/baselines/reference/promisePermutations3.errors.txt @@ -1,7 +1,6 @@ tests/cases/compiler/promisePermutations3.ts(68,69): error TS2345: Argument of type '(x: number) => IPromise' is not assignable to parameter of type '(value: IPromise) => IPromise'. Types of parameters 'x' and 'value' are incompatible. Type 'number' is not assignable to type 'IPromise'. - Property 'then' is missing in type 'Number'. tests/cases/compiler/promisePermutations3.ts(73,70): error TS2345: Argument of type '(x: number) => IPromise' is not assignable to parameter of type '(value: IPromise) => IPromise'. Types of parameters 'x' and 'value' are incompatible. Type 'number' is not assignable to type 'IPromise'. @@ -159,7 +158,6 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of !!! error TS2345: Argument of type '(x: number) => IPromise' is not assignable to parameter of type '(value: IPromise) => IPromise'. !!! error TS2345: Types of parameters 'x' and 'value' are incompatible. !!! error TS2345: Type 'number' is not assignable to type 'IPromise'. -!!! error TS2345: Property 'then' is missing in type 'Number'. var s3: Promise; var s3a = s3.then(testFunction3, testFunction3, testFunction3); var s3b = s3.then(testFunction3P, testFunction3P, testFunction3P); diff --git a/tests/baselines/reference/qualify.errors.txt b/tests/baselines/reference/qualify.errors.txt index f38fc93ccde..c3447664c96 100644 --- a/tests/baselines/reference/qualify.errors.txt +++ b/tests/baselines/reference/qualify.errors.txt @@ -1,7 +1,5 @@ tests/cases/compiler/qualify.ts(21,13): error TS2322: Type 'number' is not assignable to type 'I'. - Property 'p' is missing in type 'Number'. tests/cases/compiler/qualify.ts(30,13): error TS2322: Type 'number' is not assignable to type 'I2'. - Property 'q' is missing in type 'Number'. tests/cases/compiler/qualify.ts(45,13): error TS2322: Type 'I4' is not assignable to type 'I3'. Property 'zeep' is missing in type 'I4'. tests/cases/compiler/qualify.ts(46,13): error TS2322: Type 'I4' is not assignable to type 'I3[]'. @@ -40,7 +38,6 @@ tests/cases/compiler/qualify.ts(58,5): error TS2322: Type 'I' is not assignable var z:I=3; ~ !!! error TS2322: Type 'number' is not assignable to type 'I'. -!!! error TS2322: Property 'p' is missing in type 'Number'. export interface I2 { q; } @@ -52,7 +49,6 @@ tests/cases/compiler/qualify.ts(58,5): error TS2322: Type 'I' is not assignable var z:T.U.I2=3; ~ !!! error TS2322: Type 'number' is not assignable to type 'I2'. -!!! error TS2322: Property 'q' is missing in type 'Number'. } } diff --git a/tests/baselines/reference/restArgAssignmentCompat.errors.txt b/tests/baselines/reference/restArgAssignmentCompat.errors.txt index 2ea07395099..c17d28cb28b 100644 --- a/tests/baselines/reference/restArgAssignmentCompat.errors.txt +++ b/tests/baselines/reference/restArgAssignmentCompat.errors.txt @@ -1,7 +1,6 @@ tests/cases/compiler/restArgAssignmentCompat.ts(7,1): error TS2322: Type '(...x: number[]) => void' is not assignable to type '(x: number[], y: string) => void'. Types of parameters 'x' and 'x' are incompatible. Type 'number' is not assignable to type 'number[]'. - Property 'length' is missing in type 'Number'. ==== tests/cases/compiler/restArgAssignmentCompat.ts (1 errors) ==== @@ -16,6 +15,5 @@ tests/cases/compiler/restArgAssignmentCompat.ts(7,1): error TS2322: Type '(...x: !!! error TS2322: Type '(...x: number[]) => void' is not assignable to type '(x: number[], y: string) => void'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'number[]'. -!!! error TS2322: Property 'length' is missing in type 'Number'. n([4], 'foo'); \ No newline at end of file diff --git a/tests/baselines/reference/returnInConstructor1.errors.txt b/tests/baselines/reference/returnInConstructor1.errors.txt index dbe3b9e5ee8..30f629f9f8a 100644 --- a/tests/baselines/reference/returnInConstructor1.errors.txt +++ b/tests/baselines/reference/returnInConstructor1.errors.txt @@ -1,8 +1,6 @@ tests/cases/compiler/returnInConstructor1.ts(11,16): error TS2322: Type 'number' is not assignable to type 'B'. - Property 'foo' is missing in type 'Number'. tests/cases/compiler/returnInConstructor1.ts(11,16): error TS2409: Return type of constructor signature must be assignable to the instance type of the class tests/cases/compiler/returnInConstructor1.ts(25,16): error TS2322: Type 'string' is not assignable to type 'D'. - Property 'foo' is missing in type 'String'. tests/cases/compiler/returnInConstructor1.ts(25,16): error TS2409: Return type of constructor signature must be assignable to the instance type of the class tests/cases/compiler/returnInConstructor1.ts(39,16): error TS2322: Type '{ foo: number; }' is not assignable to type 'F'. Types of property 'foo' are incompatible. @@ -28,7 +26,6 @@ tests/cases/compiler/returnInConstructor1.ts(55,16): error TS2409: Return type o return 1; // error ~ !!! error TS2322: Type 'number' is not assignable to type 'B'. -!!! error TS2322: Property 'foo' is missing in type 'Number'. ~ !!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class } @@ -47,7 +44,6 @@ tests/cases/compiler/returnInConstructor1.ts(55,16): error TS2409: Return type o return "test"; // error ~~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'D'. -!!! error TS2322: Property 'foo' is missing in type 'String'. ~~~~~~ !!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class } diff --git a/tests/baselines/reference/subtypingWithNumericIndexer4.errors.txt b/tests/baselines/reference/subtypingWithNumericIndexer4.errors.txt index 5dd39e0ad63..3f6de942d25 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer4.errors.txt +++ b/tests/baselines/reference/subtypingWithNumericIndexer4.errors.txt @@ -1,11 +1,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts(11,7): error TS2415: Class 'B' incorrectly extends base class 'A'. Index signatures are incompatible. Type 'string' is not assignable to type 'Derived'. - Property 'bar' is missing in type 'String'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts(20,11): error TS2415: Class 'B' incorrectly extends base class 'A'. Index signatures are incompatible. Type 'string' is not assignable to type 'Base'. - Property 'foo' is missing in type 'String'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts(20,23): error TS2344: Type 'Base' does not satisfy the constraint 'Derived'. Property 'bar' is missing in type 'Base'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts(24,11): error TS2415: Class 'B3' incorrectly extends base class 'A'. @@ -29,7 +27,6 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW !!! error TS2415: Class 'B' incorrectly extends base class 'A'. !!! error TS2415: Index signatures are incompatible. !!! error TS2415: Type 'string' is not assignable to type 'Derived'. -!!! error TS2415: Property 'bar' is missing in type 'String'. [x: number]: string; // error } @@ -43,7 +40,6 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW !!! error TS2415: Class 'B' incorrectly extends base class 'A'. !!! error TS2415: Index signatures are incompatible. !!! error TS2415: Type 'string' is not assignable to type 'Base'. -!!! error TS2415: Property 'foo' is missing in type 'String'. ~~~~ !!! error TS2344: Type 'Base' does not satisfy the constraint 'Derived'. !!! error TS2344: Property 'bar' is missing in type 'Base'. diff --git a/tests/baselines/reference/subtypingWithObjectMembers.errors.txt b/tests/baselines/reference/subtypingWithObjectMembers.errors.txt index e292c0867a7..a5d4152b451 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers.errors.txt +++ b/tests/baselines/reference/subtypingWithObjectMembers.errors.txt @@ -1,7 +1,6 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers.ts(12,7): error TS2415: Class 'B' incorrectly extends base class 'A'. Types of property 'bar' are incompatible. Type 'string' is not assignable to type 'Base'. - Property 'foo' is missing in type 'String'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers.ts(22,7): error TS2415: Class 'B2' incorrectly extends base class 'A2'. Types of property '2.0' are incompatible. Type 'string' is not assignable to type 'Base'. @@ -36,7 +35,6 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW !!! error TS2415: Class 'B' incorrectly extends base class 'A'. !!! error TS2415: Types of property 'bar' are incompatible. !!! error TS2415: Type 'string' is not assignable to type 'Base'. -!!! error TS2415: Property 'foo' is missing in type 'String'. foo: Derived; // ok bar: string; // error } diff --git a/tests/baselines/reference/subtypingWithObjectMembers2.errors.txt b/tests/baselines/reference/subtypingWithObjectMembers2.errors.txt index 3d46a6e5dc2..cdcc54c5ee9 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers2.errors.txt +++ b/tests/baselines/reference/subtypingWithObjectMembers2.errors.txt @@ -1,7 +1,6 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts(17,15): error TS2430: Interface 'B' incorrectly extends interface 'A'. Types of property 'bar' are incompatible. Type 'string' is not assignable to type 'Base'. - Property 'foo' is missing in type 'String'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts(27,15): error TS2430: Interface 'B2' incorrectly extends interface 'A2'. Types of property '2.0' are incompatible. Type 'string' is not assignable to type 'Base'. @@ -41,7 +40,6 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW !!! error TS2430: Interface 'B' incorrectly extends interface 'A'. !!! error TS2430: Types of property 'bar' are incompatible. !!! error TS2430: Type 'string' is not assignable to type 'Base'. -!!! error TS2430: Property 'foo' is missing in type 'String'. foo: Derived; // ok bar: string; // error } diff --git a/tests/baselines/reference/subtypingWithStringIndexer4.errors.txt b/tests/baselines/reference/subtypingWithStringIndexer4.errors.txt index 4aa889444e5..8d4328cdd2d 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer4.errors.txt +++ b/tests/baselines/reference/subtypingWithStringIndexer4.errors.txt @@ -1,11 +1,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts(11,7): error TS2415: Class 'B' incorrectly extends base class 'A'. Index signatures are incompatible. Type 'string' is not assignable to type 'Derived'. - Property 'bar' is missing in type 'String'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts(20,11): error TS2415: Class 'B' incorrectly extends base class 'A'. Index signatures are incompatible. Type 'string' is not assignable to type 'Base'. - Property 'foo' is missing in type 'String'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts(20,23): error TS2344: Type 'Base' does not satisfy the constraint 'Derived'. Property 'bar' is missing in type 'Base'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts(24,11): error TS2415: Class 'B3' incorrectly extends base class 'A'. @@ -29,7 +27,6 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW !!! error TS2415: Class 'B' incorrectly extends base class 'A'. !!! error TS2415: Index signatures are incompatible. !!! error TS2415: Type 'string' is not assignable to type 'Derived'. -!!! error TS2415: Property 'bar' is missing in type 'String'. [x: string]: string; // error } @@ -43,7 +40,6 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW !!! error TS2415: Class 'B' incorrectly extends base class 'A'. !!! error TS2415: Index signatures are incompatible. !!! error TS2415: Type 'string' is not assignable to type 'Base'. -!!! error TS2415: Property 'foo' is missing in type 'String'. ~~~~ !!! error TS2344: Type 'Base' does not satisfy the constraint 'Derived'. !!! error TS2344: Property 'bar' is missing in type 'Base'. diff --git a/tests/baselines/reference/typeArgumentConstraintResolution1.errors.txt b/tests/baselines/reference/typeArgumentConstraintResolution1.errors.txt index d7cf5e83b8f..1131b6e1a68 100644 --- a/tests/baselines/reference/typeArgumentConstraintResolution1.errors.txt +++ b/tests/baselines/reference/typeArgumentConstraintResolution1.errors.txt @@ -1,5 +1,4 @@ tests/cases/compiler/typeArgumentConstraintResolution1.ts(4,12): error TS2345: Argument of type 'string' is not assignable to parameter of type 'Date'. - Property 'toDateString' is missing in type 'String'. tests/cases/compiler/typeArgumentConstraintResolution1.ts(11,12): error TS2345: Argument of type 'string' is not assignable to parameter of type 'Date'. @@ -10,7 +9,6 @@ tests/cases/compiler/typeArgumentConstraintResolution1.ts(11,12): error TS2345: foo1(""); // should error ~~ !!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'Date'. -!!! error TS2345: Property 'toDateString' is missing in type 'String'. diff --git a/tests/baselines/reference/typeGuardFunctionErrors.errors.txt b/tests/baselines/reference/typeGuardFunctionErrors.errors.txt index e1fdf303870..ca02a07396a 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.errors.txt +++ b/tests/baselines/reference/typeGuardFunctionErrors.errors.txt @@ -27,7 +27,6 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(96,9): tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(97,16): error TS1228: A type predicate is only allowed in return type position for functions and methods. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(98,20): error TS1228: A type predicate is only allowed in return type position for functions and methods. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(105,16): error TS2322: Type 'boolean' is not assignable to type 'D'. - Property 'm1' is missing in type 'Boolean'. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(105,16): error TS2409: Return type of constructor signature must be assignable to the instance type of the class tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(107,20): error TS1228: A type predicate is only allowed in return type position for functions and methods. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(110,20): error TS1228: A type predicate is only allowed in return type position for functions and methods. @@ -198,7 +197,6 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(137,39 return true; ~~~~ !!! error TS2322: Type 'boolean' is not assignable to type 'D'. -!!! error TS2322: Property 'm1' is missing in type 'Boolean'. ~~~~ !!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class } diff --git a/tests/baselines/reference/typeName1.errors.txt b/tests/baselines/reference/typeName1.errors.txt index 84c8be360bd..152a5b951e7 100644 --- a/tests/baselines/reference/typeName1.errors.txt +++ b/tests/baselines/reference/typeName1.errors.txt @@ -1,31 +1,19 @@ tests/cases/compiler/typeName1.ts(9,5): error TS2322: Type 'number' is not assignable to type '{ f(s: string): number; f(n: number): string; }'. - Property 'f' is missing in type 'Number'. tests/cases/compiler/typeName1.ts(10,5): error TS2322: Type 'number' is not assignable to type '{ f(s: string): number; }'. - Property 'f' is missing in type 'Number'. tests/cases/compiler/typeName1.ts(11,5): error TS2322: Type 'number' is not assignable to type '{ (s: string): number; (n: number): string; }'. tests/cases/compiler/typeName1.ts(12,5): error TS2322: Type 'number' is not assignable to type '{ x: any; y: any; z: number; f(n: number): string; f(s: string): number; }'. - Property 'x' is missing in type 'Number'. tests/cases/compiler/typeName1.ts(13,5): error TS2322: Type 'number' is not assignable to type '{ (s: string): number; (n: number): string; x: any; y: any; z: number; f(n: number): string; f(s: string): number; }'. - Property 'x' is missing in type 'Number'. tests/cases/compiler/typeName1.ts(14,5): error TS2322: Type 'number' is not assignable to type '{ z: number; f: { (n: number): string; (s: string): number; }; }'. - Property 'z' is missing in type 'Number'. tests/cases/compiler/typeName1.ts(15,5): error TS2322: Type 'number' is not assignable to type '(s: string) => boolean'. tests/cases/compiler/typeName1.ts(16,5): error TS2322: Type 'number' is not assignable to type '{ (): boolean; [s: string]: { x: any; y: any; }; [n: number]: { x: any; y: any; }; z: I; }'. - Property 'z' is missing in type 'Number'. tests/cases/compiler/typeName1.ts(16,10): error TS2411: Property 'z' of type 'I' is not assignable to string index type '{ x: any; y: any; }'. tests/cases/compiler/typeName1.ts(17,5): error TS2322: Type 'number' is not assignable to type 'I'. - Property 'k' is missing in type 'Number'. tests/cases/compiler/typeName1.ts(18,5): error TS2322: Type 'number' is not assignable to type 'I[][][][]'. - Property 'length' is missing in type 'Number'. tests/cases/compiler/typeName1.ts(19,5): error TS2322: Type 'number' is not assignable to type '{ z: I; x: boolean; }[][]'. - Property 'length' is missing in type 'Number'. tests/cases/compiler/typeName1.ts(20,5): error TS2322: Type 'number' is not assignable to type '{ z: I; x: boolean; y: (s: string) => boolean; w: { (): boolean; [s: string]: { x: any; y: any; }; [n: number]: { x: any; y: any; }; z: I; }; }[][]'. - Property 'length' is missing in type 'Number'. tests/cases/compiler/typeName1.ts(20,50): error TS2411: Property 'z' of type 'I' is not assignable to string index type '{ x: any; y: any; }'. tests/cases/compiler/typeName1.ts(21,5): error TS2322: Type 'number' is not assignable to type '{ (): {}; new (): number; new (n: number): number; x: string; w: { y: number; }; }'. - Property 'x' is missing in type 'Number'. tests/cases/compiler/typeName1.ts(22,5): error TS2322: Type 'number' is not assignable to type '{ (): string; f(x: number): boolean; p: any; q: any; }'. - Property 'f' is missing in type 'Number'. tests/cases/compiler/typeName1.ts(23,5): error TS2322: Type 'typeof C' is not assignable to type 'number'. @@ -41,61 +29,49 @@ tests/cases/compiler/typeName1.ts(23,5): error TS2322: Type 'typeof C' is not as var x1:{ f(s:string):number;f(n:number):string; }=3; ~~ !!! error TS2322: Type 'number' is not assignable to type '{ f(s: string): number; f(n: number): string; }'. -!!! error TS2322: Property 'f' is missing in type 'Number'. var x2:{ f(s:string):number; } =3; ~~ !!! error TS2322: Type 'number' is not assignable to type '{ f(s: string): number; }'. -!!! error TS2322: Property 'f' is missing in type 'Number'. var x3:{ (s:string):number;(n:number):string; }=3; ~~ !!! error TS2322: Type 'number' is not assignable to type '{ (s: string): number; (n: number): string; }'. var x4:{ x;y;z:number;f(n:number):string;f(s:string):number; }=3; ~~ !!! error TS2322: Type 'number' is not assignable to type '{ x: any; y: any; z: number; f(n: number): string; f(s: string): number; }'. -!!! error TS2322: Property 'x' is missing in type 'Number'. var x5:{ (s:string):number;(n:number):string;x;y;z:number;f(n:number):string;f(s:string):number; }=3; ~~ !!! error TS2322: Type 'number' is not assignable to type '{ (s: string): number; (n: number): string; x: any; y: any; z: number; f(n: number): string; f(s: string): number; }'. -!!! error TS2322: Property 'x' is missing in type 'Number'. var x6:{ z:number;f:{(n:number):string;(s:string):number;}; }=3; ~~ !!! error TS2322: Type 'number' is not assignable to type '{ z: number; f: { (n: number): string; (s: string): number; }; }'. -!!! error TS2322: Property 'z' is missing in type 'Number'. var x7:(s:string)=>boolean=3; ~~ !!! error TS2322: Type 'number' is not assignable to type '(s: string) => boolean'. var x8:{ z:I;[s:string]:{ x; y; };[n:number]:{x; y;};():boolean; }=3; ~~ !!! error TS2322: Type 'number' is not assignable to type '{ (): boolean; [s: string]: { x: any; y: any; }; [n: number]: { x: any; y: any; }; z: I; }'. -!!! error TS2322: Property 'z' is missing in type 'Number'. ~~~~ !!! error TS2411: Property 'z' of type 'I' is not assignable to string index type '{ x: any; y: any; }'. var x9:I=3; ~~ !!! error TS2322: Type 'number' is not assignable to type 'I'. -!!! error TS2322: Property 'k' is missing in type 'Number'. var x10:I[][][][]=3; ~~~ !!! error TS2322: Type 'number' is not assignable to type 'I[][][][]'. -!!! error TS2322: Property 'length' is missing in type 'Number'. var x11:{z:I;x:boolean;}[][]=3; ~~~ !!! error TS2322: Type 'number' is not assignable to type '{ z: I; x: boolean; }[][]'. -!!! error TS2322: Property 'length' is missing in type 'Number'. var x12:{z:I;x:boolean;y:(s:string)=>boolean;w:{ z:I;[s:string]:{ x; y; };[n:number]:{x; y;};():boolean; };}[][]=3; ~~~ !!! error TS2322: Type 'number' is not assignable to type '{ z: I; x: boolean; y: (s: string) => boolean; w: { (): boolean; [s: string]: { x: any; y: any; }; [n: number]: { x: any; y: any; }; z: I; }; }[][]'. -!!! error TS2322: Property 'length' is missing in type 'Number'. ~~~~ !!! error TS2411: Property 'z' of type 'I' is not assignable to string index type '{ x: any; y: any; }'. var x13:{ new(): number; new(n:number):number; x: string; w: {y: number;}; (): {}; } = 3; ~~~ !!! error TS2322: Type 'number' is not assignable to type '{ (): {}; new (): number; new (n: number): number; x: string; w: { y: number; }; }'. -!!! error TS2322: Property 'x' is missing in type 'Number'. var x14:{ f(x:number):boolean; p; q; ():string; }=3; ~~~ !!! error TS2322: Type 'number' is not assignable to type '{ (): string; f(x: number): boolean; p: any; q: any; }'. -!!! error TS2322: Property 'f' is missing in type 'Number'. var x15:number=C; ~~~ !!! error TS2322: Type 'typeof C' is not assignable to type 'number'. diff --git a/tests/baselines/reference/typeOfOnTypeArg.errors.txt b/tests/baselines/reference/typeOfOnTypeArg.errors.txt index 8562b7f134a..46b48983f21 100644 --- a/tests/baselines/reference/typeOfOnTypeArg.errors.txt +++ b/tests/baselines/reference/typeOfOnTypeArg.errors.txt @@ -1,5 +1,4 @@ tests/cases/compiler/typeOfOnTypeArg.ts(7,6): error TS2345: Argument of type 'number' is not assignable to parameter of type '{ '': number; }'. - Property '''' is missing in type 'Number'. ==== tests/cases/compiler/typeOfOnTypeArg.ts (1 errors) ==== @@ -12,5 +11,4 @@ tests/cases/compiler/typeOfOnTypeArg.ts(7,6): error TS2345: Argument of type 'nu fill(32); ~~ !!! error TS2345: Argument of type 'number' is not assignable to parameter of type '{ '': number; }'. -!!! error TS2345: Property '''' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterAsTypeParameterConstraint2.errors.txt b/tests/baselines/reference/typeParameterAsTypeParameterConstraint2.errors.txt index 282e942e0f7..0e148cb5689 100644 --- a/tests/baselines/reference/typeParameterAsTypeParameterConstraint2.errors.txt +++ b/tests/baselines/reference/typeParameterAsTypeParameterConstraint2.errors.txt @@ -10,7 +10,6 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/typeParameterAsTy tests/cases/conformance/types/typeParameters/typeArgumentLists/typeParameterAsTypeParameterConstraint2.ts(18,10): error TS2345: Argument of type 'string[]' is not assignable to parameter of type '{ length: any[]; }'. Types of property 'length' are incompatible. Type 'number' is not assignable to type 'any[]'. - Property 'length' is missing in type 'Number'. ==== tests/cases/conformance/types/typeParameters/typeArgumentLists/typeParameterAsTypeParameterConstraint2.ts (6 errors) ==== @@ -49,5 +48,4 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/typeParameterAsTy ~~~~ !!! error TS2345: Argument of type 'string[]' is not assignable to parameter of type '{ length: any[]; }'. !!! error TS2345: Types of property 'length' are incompatible. -!!! error TS2345: Type 'number' is not assignable to type 'any[]'. -!!! error TS2345: Property 'length' is missing in type 'Number'. \ No newline at end of file +!!! error TS2345: Type 'number' is not assignable to type 'any[]'. \ No newline at end of file diff --git a/tests/baselines/reference/wrappedRecursiveGenericType.errors.txt b/tests/baselines/reference/wrappedRecursiveGenericType.errors.txt index 5afc7361a23..da97e05713b 100644 --- a/tests/baselines/reference/wrappedRecursiveGenericType.errors.txt +++ b/tests/baselines/reference/wrappedRecursiveGenericType.errors.txt @@ -1,5 +1,4 @@ tests/cases/compiler/wrappedRecursiveGenericType.ts(13,1): error TS2322: Type 'number' is not assignable to type 'X'. - Property 'e' is missing in type 'Number'. tests/cases/compiler/wrappedRecursiveGenericType.ts(14,1): error TS2322: Type 'number' is not assignable to type 'X'. @@ -19,7 +18,6 @@ tests/cases/compiler/wrappedRecursiveGenericType.ts(14,1): error TS2322: Type 'n x.a.b.val = 5; // val -> X (This should be an error) ~~~~~~~~~ !!! error TS2322: Type 'number' is not assignable to type 'X'. -!!! error TS2322: Property 'e' is missing in type 'Number'. x.a.b.a.val = 5; // val -> X (This should be an error) ~~~~~~~~~~~ !!! error TS2322: Type 'number' is not assignable to type 'X'. \ No newline at end of file From 6e0fde37f8a39aa2a52ca4a1cc9d1bdea214024c Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 13 Jan 2016 23:19:49 -0800 Subject: [PATCH 149/209] Added missing semicolon. --- src/compiler/checker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 28748805ffa..ffcd2406831 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5096,7 +5096,7 @@ namespace ts { return result !== Ternary.False; function reportError(message: DiagnosticMessage, arg0?: string, arg1?: string, arg2?: string): void { - Debug.assert(!!errorNode) + Debug.assert(!!errorNode); errorInfo = chainDiagnosticMessages(errorInfo, message, arg0, arg1, arg2); } From dbfe862dbd87e491728fdd83c82c26572c63af7b Mon Sep 17 00:00:00 2001 From: Zhengbo Li Date: Thu, 14 Jan 2016 00:34:43 -0800 Subject: [PATCH 150/209] not casting relative filenames in 'tsc watch' to Path --- src/compiler/core.ts | 7 +++++++ src/compiler/sys.ts | 6 +++--- src/compiler/tsc.ts | 6 ++++-- src/server/editorServices.ts | 4 ++-- src/services/services.ts | 7 ------- 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index aba2e48e4a1..639660a2a4c 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -872,4 +872,11 @@ namespace ts { } return copiedList; } + + export function createGetCanonicalFileName(useCaseSensitivefileNames: boolean): (fileName: string) => string { + return useCaseSensitivefileNames + ? ((fileName) => fileName) + : ((fileName) => fileName.toLowerCase()); + } + } diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 073a662ce1c..e6f908d250a 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -11,7 +11,7 @@ namespace ts { write(s: string): void; readFile(path: string, encoding?: string): string; writeFile(path: string, data: string, writeByteOrderMark?: boolean): void; - watchFile?(path: string, callback: FileWatcherCallback): FileWatcher; + watchFile?(path: Path, callback: FileWatcherCallback): FileWatcher; watchDirectory?(path: string, callback: DirectoryWatcherCallback, recursive?: boolean): FileWatcher; resolvePath(path: string): string; fileExists(path: string): boolean; @@ -500,13 +500,13 @@ namespace ts { }, readFile, writeFile, - watchFile: (fileName, callback) => { + watchFile: (filePath, callback) => { // Node 4.0 stablized the `fs.watch` function on Windows which avoids polling // and is more efficient than `fs.watchFile` (ref: https://github.com/nodejs/node/pull/2649 // and https://github.com/Microsoft/TypeScript/issues/4643), therefore // if the current node.js version is newer than 4, use `fs.watch` instead. const watchSet = isNode4OrLater() ? watchedFileSet : pollingWatchedFileSet; - const watchedFile = watchSet.addFile(fileName, callback); + const watchedFile = watchSet.addFile(filePath, callback); return { close: () => watchSet.removeFile(watchedFile) }; diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index d064ec54c9c..808ee6da804 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -334,7 +334,8 @@ namespace ts { return sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); } if (configFileName) { - configFileWatcher = sys.watchFile(configFileName, configFileChanged); + const configFilePath = toPath(configFileName, sys.getCurrentDirectory(), createGetCanonicalFileName(sys.useCaseSensitiveFileNames)); + configFileWatcher = sys.watchFile(configFilePath, configFileChanged); } if (sys.watchDirectory && configFileName) { const directory = ts.getDirectoryPath(configFileName); @@ -442,7 +443,8 @@ namespace ts { const sourceFile = hostGetSourceFile(fileName, languageVersion, onError); if (sourceFile && compilerOptions.watch) { // Attach a file watcher - sourceFile.fileWatcher = sys.watchFile(sourceFile.fileName, (fileName: string, removed?: boolean) => sourceFileChanged(sourceFile, removed)); + const filePath = toPath(sourceFile.fileName, sys.getCurrentDirectory(), createGetCanonicalFileName(sys.useCaseSensitiveFileNames)); + sourceFile.fileWatcher = sys.watchFile(filePath, (fileName: string, removed?: boolean) => sourceFileChanged(sourceFile, removed)); } return sourceFile; } diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 5a1c85fc13c..0442575aded 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -1000,7 +1000,7 @@ namespace ts.server { info.setFormatOptions(this.getFormatCodeOptions()); this.filenameToScriptInfo[fileName] = info; if (!info.isOpen) { - info.fileWatcher = this.host.watchFile(fileName, _ => { this.watchedFileChanged(fileName); }); + info.fileWatcher = this.host.watchFile(fileName, _ => { this.watchedFileChanged(fileName); }); } } } @@ -1213,7 +1213,7 @@ namespace ts.server { } } project.finishGraph(); - project.projectFileWatcher = this.host.watchFile(configFilename, _ => this.watchedProjectConfigFileChanged(project)); + project.projectFileWatcher = this.host.watchFile(configFilename, _ => this.watchedProjectConfigFileChanged(project)); this.log("Add recursive watcher for: " + ts.getDirectoryPath(configFilename)); project.directoryWatcher = this.host.watchDirectory( ts.getDirectoryPath(configFilename), diff --git a/src/services/services.ts b/src/services/services.ts index 0ffd1138cba..0f3c18f7a85 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -2008,13 +2008,6 @@ namespace ts { return createLanguageServiceSourceFile(sourceFile.fileName, scriptSnapshot, sourceFile.languageVersion, version, /*setNodeParents*/ true); } - export function createGetCanonicalFileName(useCaseSensitivefileNames: boolean): (fileName: string) => string { - return useCaseSensitivefileNames - ? ((fileName) => fileName) - : ((fileName) => fileName.toLowerCase()); - } - - export function createDocumentRegistry(useCaseSensitiveFileNames?: boolean, currentDirectory = ""): DocumentRegistry { // Maps from compiler setting target (ES3, ES5, etc.) to all the cached documents we have // for those settings. From 94eb1079fd4ed64d43f36f7ad7d134b3a54d8aa1 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 14 Jan 2016 10:14:25 -0800 Subject: [PATCH 151/209] Print the names of files being linted. --- Jakefile.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Jakefile.js b/Jakefile.js index 0749ba8cc26..7024ad2afdf 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -893,6 +893,7 @@ function getLinterOptions() { function lintFileContents(options, path, contents) { var ll = new Linter(path, contents, options); + console.log("Linting '" + path + "'.") return ll.lint(); } From 62c3bfb1fb6714fc383379caae8b55d81bf62fbe Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 14 Jan 2016 10:17:32 -0800 Subject: [PATCH 152/209] Temporarily use an older nightly so builds can succeed. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 261cdfa64b7..f0ba128a919 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "istanbul": "latest", "mocha-fivemat-progress-reporter": "latest", "tslint": "next", - "typescript": "next", + "typescript": "1.8.0-dev.20160113", "tsd": "latest" }, "scripts": { From 17ff54d09b33b0eee3a997857c747fbcb4e1da7f Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 14 Jan 2016 10:54:08 -0800 Subject: [PATCH 153/209] Just check if the original type is a primitive instead of checking the apparent type. --- src/compiler/checker.ts | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ffcd2406831..6414d4d87e1 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -419,14 +419,6 @@ namespace ts { return node.kind === SyntaxKind.SourceFile && !isExternalOrCommonJsModule(node); } - /** Is this type one of the apparent types created from the primitive types. */ - function isPrimitiveApparentType(type: Type): boolean { - return type === globalStringType || - type === globalNumberType || - type === globalBooleanType || - type === globalESSymbolType; - } - function getSymbol(symbols: SymbolTable, name: string, meaning: SymbolFlags): Symbol { if (meaning && hasProperty(symbols, name)) { const symbol = symbols[name]; @@ -5234,16 +5226,16 @@ namespace ts { } // Even if relationship doesn't hold for unions, intersections, or generic type references, // it may hold in a structural comparison. - const apparentType = getApparentType(source); + const apparentSource = getApparentType(source); // In a check of the form X = A & B, we will have previously checked if A relates to X or B relates // to X. Failing both of those we want to check if the aggregation of A and B's members structurally // relates to X. Thus, we include intersection types on the source side here. - if (apparentType.flags & (TypeFlags.ObjectType | TypeFlags.Intersection) && target.flags & TypeFlags.ObjectType) { + if (apparentSource.flags & (TypeFlags.ObjectType | TypeFlags.Intersection) && target.flags & TypeFlags.ObjectType) { // Report structural errors only if we haven't reported any errors yet - const reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo && !isPrimitiveApparentType(apparentType) + const reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo && !(source.flags & TypeFlags.Primitive) ? ReportErrors.Elaborate : ReportErrors.None; - if (result = objectTypeRelatedTo(apparentType, source, target, reportStructuralErrors)) { + if (result = objectTypeRelatedTo(apparentSource, source, target, reportStructuralErrors)) { errorInfo = saveErrorInfo; return result; } From 3aa92f56114890a07f858c4808576e7ffc498563 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Thu, 14 Jan 2016 10:56:49 -0800 Subject: [PATCH 154/209] addressed PR feedback --- src/compiler/checker.ts | 32 ++++++++++++------- src/compiler/program.ts | 20 ++++-------- ...ugmentationDisallowedExtensions.errors.txt | 16 ++++++++-- .../moduleAugmentationDisallowedExtensions.js | 2 +- .../moduleAugmentationDisallowedExtensions.ts | 2 +- 5 files changed, 42 insertions(+), 30 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index de3d8fde307..f94afb3fc57 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -14246,7 +14246,7 @@ namespace ts { if (checkBody) { // body of ambient external module is always a module block for (const statement of (node.body).statements) { - checkBodyOfModuleAugmentation(statement, isGlobalAugmentation); + checkModuleAugmentationElement(statement, isGlobalAugmentation); } } } @@ -14273,20 +14273,12 @@ namespace ts { checkSourceElement(node.body); } - function checkBodyOfModuleAugmentation(node: Node, isGlobalAugmentation: boolean): void { + function checkModuleAugmentationElement(node: Node, isGlobalAugmentation: boolean): void { switch (node.kind) { case SyntaxKind.VariableStatement: // error each individual name in variable statement instead of marking the entire variable statement for (const decl of (node).declarationList.declarations) { - if (isBindingPattern(decl.name)) { - for (const el of (decl.name).elements) { - // mark individual names in binding pattern - checkBodyOfModuleAugmentation(el, isGlobalAugmentation); - } - } - else { - checkBodyOfModuleAugmentation(decl, isGlobalAugmentation); - } + checkModuleAugmentationElement(decl, isGlobalAugmentation); } break; case SyntaxKind.ExportAssignment: @@ -14302,7 +14294,23 @@ namespace ts { case SyntaxKind.ImportDeclaration: grammarErrorOnFirstToken(node, Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); break; - default: + case SyntaxKind.BindingElement: + case SyntaxKind.VariableDeclaration: + const name = (node).name; + if (isBindingPattern(name)) { + for (const el of name.elements) { + // mark individual names in binding pattern + checkModuleAugmentationElement(el, isGlobalAugmentation); + } + break; + } + // fallthrough + case SyntaxKind.ClassDeclaration: + case SyntaxKind.EnumDeclaration: + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.InterfaceDeclaration: + case SyntaxKind.ModuleDeclaration: + case SyntaxKind.TypeAliasDeclaration: const symbol = getSymbolOfNode(node); if (symbol) { // module augmentations cannot introduce new names on the top level scope of the module diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 80a2a1f342d..52c9fa4ef84 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -527,13 +527,7 @@ namespace ts { } if (resolveModuleNamesWorker) { - const moduleNames: string[] = []; - for (const moduleName of newSourceFile.imports) { - moduleNames.push(moduleName.text); - } - for (const moduleName of newSourceFile.moduleAugmentations) { - moduleNames.push(moduleName.text); - } + const moduleNames = map(concatenate(newSourceFile.imports, newSourceFile.moduleAugmentations), getTextOfLiteral); const resolutions = resolveModuleNamesWorker(moduleNames, getNormalizedAbsolutePath(newSourceFile.fileName, currentDirectory)); // ensure that module resolution results are still correct for (let i = 0; i < moduleNames.length; i++) { @@ -922,6 +916,10 @@ namespace ts { return a.text === b.text; } + function getTextOfLiteral(literal: LiteralExpression): string { + return literal.text; + } + function collectExternalModuleReferences(file: SourceFile): void { if (file.imports) { return; @@ -1128,13 +1126,7 @@ namespace ts { collectExternalModuleReferences(file); if (file.imports.length || file.moduleAugmentations.length) { file.resolvedModules = {}; - const moduleNames: string[] = []; - for (const name of file.imports) { - moduleNames.push(name.text); - } - for (const name of file.moduleAugmentations) { - moduleNames.push(name.text); - } + const moduleNames = map(concatenate(file.imports, file.moduleAugmentations), getTextOfLiteral); const resolutions = resolveModuleNamesWorker(moduleNames, getNormalizedAbsolutePath(file.fileName, currentDirectory)); for (let i = 0; i < moduleNames.length; i++) { const resolution = resolutions[i]; diff --git a/tests/baselines/reference/moduleAugmentationDisallowedExtensions.errors.txt b/tests/baselines/reference/moduleAugmentationDisallowedExtensions.errors.txt index f90b07dd815..974d20515b6 100644 --- a/tests/baselines/reference/moduleAugmentationDisallowedExtensions.errors.txt +++ b/tests/baselines/reference/moduleAugmentationDisallowedExtensions.errors.txt @@ -3,6 +3,10 @@ tests/cases/compiler/x.ts(8,9): error TS2663: Module augmentation cannot introdu tests/cases/compiler/x.ts(9,11): error TS2663: Module augmentation cannot introduce new names in the top level scope. tests/cases/compiler/x.ts(10,10): error TS2663: Module augmentation cannot introduce new names in the top level scope. tests/cases/compiler/x.ts(10,14): error TS2663: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/x.ts(10,23): error TS2663: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/x.ts(10,38): error TS2663: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/x.ts(10,43): error TS2663: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/x.ts(10,48): error TS2663: Module augmentation cannot introduce new names in the top level scope. tests/cases/compiler/x.ts(11,15): error TS2663: Module augmentation cannot introduce new names in the top level scope. tests/cases/compiler/x.ts(12,15): error TS2663: Module augmentation cannot introduce new names in the top level scope. tests/cases/compiler/x.ts(15,11): error TS2663: Module augmentation cannot introduce new names in the top level scope. @@ -23,7 +27,7 @@ tests/cases/compiler/x.ts(25,5): error TS2664: Exports and export assignments ar export let a = 1; -==== tests/cases/compiler/x.ts (19 errors) ==== +==== tests/cases/compiler/x.ts (23 errors) ==== namespace N1 { export let x = 1; @@ -39,10 +43,18 @@ tests/cases/compiler/x.ts(25,5): error TS2664: Exports and export assignments ar const z: number; ~ !!! error TS2663: Module augmentation cannot introduce new names in the top level scope. - let {x1, y1}: {x1: number, y1: string} + let {x1, y1, z0: {n}, z1: {arr: [el1, el2, el3]}}: {x1: number, y1: string, z0: {n: number}, z1: {arr: number[]} } ~~ !!! error TS2663: Module augmentation cannot introduce new names in the top level scope. ~~ +!!! error TS2663: Module augmentation cannot introduce new names in the top level scope. + ~ +!!! error TS2663: Module augmentation cannot introduce new names in the top level scope. + ~~~ +!!! error TS2663: Module augmentation cannot introduce new names in the top level scope. + ~~~ +!!! error TS2663: Module augmentation cannot introduce new names in the top level scope. + ~~~ !!! error TS2663: Module augmentation cannot introduce new names in the top level scope. interface A { x } ~ diff --git a/tests/baselines/reference/moduleAugmentationDisallowedExtensions.js b/tests/baselines/reference/moduleAugmentationDisallowedExtensions.js index 62b14d71277..8c497d63c42 100644 --- a/tests/baselines/reference/moduleAugmentationDisallowedExtensions.js +++ b/tests/baselines/reference/moduleAugmentationDisallowedExtensions.js @@ -14,7 +14,7 @@ declare module "./observable" { var x: number; let y: number; const z: number; - let {x1, y1}: {x1: number, y1: string} + let {x1, y1, z0: {n}, z1: {arr: [el1, el2, el3]}}: {x1: number, y1: string, z0: {n: number}, z1: {arr: number[]} } interface A { x } namespace N { export class C {} diff --git a/tests/cases/compiler/moduleAugmentationDisallowedExtensions.ts b/tests/cases/compiler/moduleAugmentationDisallowedExtensions.ts index 116c5cb7820..b4b286db502 100644 --- a/tests/cases/compiler/moduleAugmentationDisallowedExtensions.ts +++ b/tests/cases/compiler/moduleAugmentationDisallowedExtensions.ts @@ -13,7 +13,7 @@ declare module "./observable" { var x: number; let y: number; const z: number; - let {x1, y1}: {x1: number, y1: string} + let {x1, y1, z0: {n}, z1: {arr: [el1, el2, el3]}}: {x1: number, y1: string, z0: {n: number}, z1: {arr: number[]} } interface A { x } namespace N { export class C {} From e8d4cf82314e367a55310f8adcbd10131f62efb9 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 14 Jan 2016 11:01:21 -0800 Subject: [PATCH 155/209] Documented the 'ReportErrors' enum. --- src/compiler/checker.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 6414d4d87e1..4a73e071061 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -3,8 +3,20 @@ /* @internal */ namespace ts { const enum ReportErrors { - None = 0, + /** + * Do not report errors at all. + */ + None, + /** + * Report errors in any fashion if any are encountered. + * This option implies that if an error has already been cached for a relationship + * between two types, it is okay to use the top-level error without elaboration. + */ Basic, + /** + * Always force elaboration when comparing two types, + * even if the relation has been cached + */ Elaborate, } From e547a1abd27586b41ce7285afe0fadbbf4314e34 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Thu, 14 Jan 2016 11:30:02 -0800 Subject: [PATCH 156/209] Update CONTRIBUTING.md Add guidelines for logging issues --- CONTRIBUTING.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3a712b5619a..d9941d92e87 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,3 +1,45 @@ +# Instructions for Logging Issues + +## 1. Read the FAQ + +Please [read the FAQ](https://github.com/Microsoft/TypeScript/wiki/FAQ) before logging new issues, even if you think you have found a bug. + +Issues that ask questions answered in the FAQ will be closed without elaboration. + +## 2. Search for Duplicates + +[Search the existing issues](https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&q=is%3Aissue) before logging a new one. + +## 3. Do you have a question? + +The issue tracker is for **issues**, in other words, bugs and suggestions. +If you have a *question*, please use [http://stackoverflow.com/questions/tagged/typescript](Stack Overflow), [https://gitter.im/Microsoft/TypeScript](Gitter), your favorite search engine, or other resources. +Due to increased traffic, we can no longer answer questions in the issue tracker. + +## 4. Did you find a bug? + +When logging a bug, please be sure to include the following: + * What version of TypeScript you're using (run `tsc --v`) + * If at all possible, an *isolated* way to reproduce the behavior + * The behavior you expect to see, and the actual behavior + +You can try out the nightly build of TypeScript (`npm install typescript@next`) to see if the bug has already been fixed. + +## 5. Do you have a suggestion? + +We also accept suggestions in the issue tracker. +Be sure to [check the FAQ](https://github.com/Microsoft/TypeScript/wiki/FAQ) and [search](https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&q=is%3Aissue) first. + +In general, things we find useful when reviewing suggestins are: +* A description of the problem you're trying to solve +* An overview of the suggested solution +* Examples of how the suggestion would work in various places + * Code examples showing e.g. "this would be an error, this wouldn't" + * Code examples showing the generated JavaScript (if applicable) +* If relevant, precedent in other languages can be useful for establishing context and expected behavior + +# Instructions for Contributing Code + ## Contributing bug fixes TypeScript is currently accepting contributions in the form of bug fixes. A bug must have an issue tracking it in the issue tracker that has been approved ("Milestone == Community") by the TypeScript team. Your pull request should include a link to the bug that you are fixing. If you've submitted a PR for a bug, please post a comment in the bug to avoid duplication of effort. From 273cfc1cd787b0a15d0fa6b608e6d7edd6c4d366 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 14 Jan 2016 11:33:05 -0800 Subject: [PATCH 157/209] Back to booleans. I totally have an infinite amount of time to work on this. --- src/compiler/checker.ts | 98 +++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 63 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 4a73e071061..2ce41bb4878 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2,24 +2,6 @@ /* @internal */ namespace ts { - const enum ReportErrors { - /** - * Do not report errors at all. - */ - None, - /** - * Report errors in any fashion if any are encountered. - * This option implies that if an error has already been cached for a relationship - * between two types, it is okay to use the top-level error without elaboration. - */ - Basic, - /** - * Always force elaboration when comparing two types, - * even if the relation has been cached - */ - Elaborate, - } - let nextSymbolId = 1; let nextNodeId = 1; let nextMergeId = 1; @@ -4937,7 +4919,7 @@ namespace ts { function isSignatureAssignableTo(source: Signature, target: Signature, ignoreReturnTypes: boolean): boolean { - return compareSignaturesRelated(source, target, ignoreReturnTypes, ReportErrors.None, /*errorReporter*/ undefined, compareTypesAssignable) !== Ternary.False; + return compareSignaturesRelated(source, target, ignoreReturnTypes, /*reportErrors*/ false, /*errorReporter*/ undefined, compareTypesAssignable) !== Ternary.False; } /** @@ -4946,9 +4928,9 @@ namespace ts { function compareSignaturesRelated(source: Signature, target: Signature, ignoreReturnTypes: boolean, - reportErrors: ReportErrors, + reportErrors: boolean, errorReporter: (d: DiagnosticMessage, arg0?: string, arg1?: string) => void, - compareTypes: (s: Type, t: Type, reportErrors?: ReportErrors) => Ternary): Ternary { + compareTypes: (s: Type, t: Type, reportErrors?: boolean) => Ternary): Ternary { // TODO (drosen): De-duplicate code between related functions. if (source === target) { return Ternary.True; @@ -4972,7 +4954,7 @@ namespace ts { for (let i = 0; i < checkCount; i++) { const s = i < sourceMax ? getTypeOfSymbol(sourceParams[i]) : getRestTypeOfSignature(source); const t = i < targetMax ? getTypeOfSymbol(targetParams[i]) : getRestTypeOfSignature(target); - const related = compareTypes(t, s, /*reportErrors*/ ReportErrors.None) || compareTypes(s, t, reportErrors); + const related = compareTypes(t, s, /*reportErrors*/ false) || compareTypes(s, t, reportErrors); if (!related) { if (reportErrors) { errorReporter(Diagnostics.Types_of_parameters_0_and_1_are_incompatible, @@ -5078,19 +5060,11 @@ namespace ts { Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking"); - const result = isRelatedTo(source, target, !!errorNode ? ReportErrors.Basic : ReportErrors.None, headMessage); + const result = isRelatedTo(source, target, /*reportErrors*/ !!errorNode, headMessage); if (overflow) { error(errorNode, Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target)); } else if (errorInfo) { - // If we already computed this relation, but in a context where we didn't want to report errors (e.g. overload resolution), - // then we'll only have a top-level error (e.g. 'Class X does not implement interface Y') without any details. If this happened, - // request a recompuation to get a complete error message. This will be skipped if we've already done this computation in a context - // where errors were being reported. - if (errorInfo.next === undefined) { - errorInfo = undefined; - isRelatedTo(source, target, !!errorNode ? ReportErrors.Elaborate : ReportErrors.None, headMessage); - } if (containingMessageChain) { errorInfo = concatenateDiagnosticMessageChains(containingMessageChain, errorInfo); } @@ -5118,7 +5092,7 @@ namespace ts { // Ternary.True if they are related with no assumptions, // Ternary.Maybe if they are related with assumptions of other relationships, or // Ternary.False if they are not related. - function isRelatedTo(source: Type, target: Type, reportErrors?: ReportErrors, headMessage?: DiagnosticMessage): Ternary { + function isRelatedTo(source: Type, target: Type, reportErrors?: boolean, headMessage?: DiagnosticMessage): Ternary { let result: Ternary; // both types are the same - covers 'they are the same primitive type or both are Any' or the same type parameter cases if (source === target) return Ternary.True; @@ -5206,7 +5180,7 @@ namespace ts { // A & B = (A & B) | (C & D). if (source.flags & TypeFlags.Intersection) { // If target is a union type the following check will report errors so we suppress them here - if (result = someTypeRelatedToType(source, target, !(target.flags & TypeFlags.Union) ? reportErrors : ReportErrors.None)) { + if (result = someTypeRelatedToType(source, target, reportErrors && !(target.flags & TypeFlags.Union))) { return result; } } @@ -5223,7 +5197,7 @@ namespace ts { constraint = emptyObjectType; } // Report constraint errors only if the constraint is not the empty object type - const reportConstraintErrors = constraint !== emptyObjectType ? reportErrors : ReportErrors.None; + const reportConstraintErrors = reportErrors && constraint !== emptyObjectType; if (result = isRelatedTo(constraint, target, reportConstraintErrors)) { errorInfo = saveErrorInfo; return result; @@ -5244,9 +5218,7 @@ namespace ts { // relates to X. Thus, we include intersection types on the source side here. if (apparentSource.flags & (TypeFlags.ObjectType | TypeFlags.Intersection) && target.flags & TypeFlags.ObjectType) { // Report structural errors only if we haven't reported any errors yet - const reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo && !(source.flags & TypeFlags.Primitive) - ? ReportErrors.Elaborate - : ReportErrors.None; + const reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo && !(source.flags & TypeFlags.Primitive); if (result = objectTypeRelatedTo(apparentSource, source, target, reportStructuralErrors)) { errorInfo = saveErrorInfo; return result; @@ -5265,11 +5237,11 @@ namespace ts { if (source.flags & TypeFlags.ObjectType && target.flags & TypeFlags.ObjectType) { if (source.flags & TypeFlags.Reference && target.flags & TypeFlags.Reference && (source).target === (target).target) { // We have type references to same target type, see if all type arguments are identical - if (result = typeArgumentsRelatedTo(source, target, ReportErrors.None)) { + if (result = typeArgumentsRelatedTo(source, target, /*reportErrors*/ false)) { return result; } } - return objectTypeRelatedTo(source, source, target, ReportErrors.None); + return objectTypeRelatedTo(source, source, target, /*reportErrors*/ false); } if (source.flags & TypeFlags.Union && target.flags & TypeFlags.Union || source.flags & TypeFlags.Intersection && target.flags & TypeFlags.Intersection) { @@ -5304,7 +5276,7 @@ namespace ts { return false; } - function hasExcessProperties(source: FreshObjectLiteralType, target: Type, reportErrors: ReportErrors): boolean { + function hasExcessProperties(source: FreshObjectLiteralType, target: Type, reportErrors: boolean): boolean { if (!(target.flags & TypeFlags.ObjectLiteralPatternWithComputedProperties) && someConstituentTypeHasKind(target, TypeFlags.ObjectType)) { for (const prop of getPropertiesOfObjectType(source)) { if (!isKnownProperty(target, prop.name)) { @@ -5328,7 +5300,7 @@ namespace ts { let result = Ternary.True; const sourceTypes = source.types; for (const sourceType of sourceTypes) { - const related = typeRelatedToSomeType(sourceType, target, ReportErrors.None); + const related = typeRelatedToSomeType(sourceType, target, /*reportErrors*/ false); if (!related) { return Ternary.False; } @@ -5337,10 +5309,10 @@ namespace ts { return result; } - function typeRelatedToSomeType(source: Type, target: UnionOrIntersectionType, reportErrors: ReportErrors): Ternary { + function typeRelatedToSomeType(source: Type, target: UnionOrIntersectionType, reportErrors: boolean): Ternary { const targetTypes = target.types; for (let i = 0, len = targetTypes.length; i < len; i++) { - const related = isRelatedTo(source, targetTypes[i], i === len - 1 ? reportErrors : ReportErrors.None); + const related = isRelatedTo(source, targetTypes[i], reportErrors && i === len - 1); if (related) { return related; } @@ -5348,7 +5320,7 @@ namespace ts { return Ternary.False; } - function typeRelatedToEachType(source: Type, target: UnionOrIntersectionType, reportErrors: ReportErrors): Ternary { + function typeRelatedToEachType(source: Type, target: UnionOrIntersectionType, reportErrors: boolean): Ternary { let result = Ternary.True; const targetTypes = target.types; for (const targetType of targetTypes) { @@ -5361,10 +5333,10 @@ namespace ts { return result; } - function someTypeRelatedToType(source: UnionOrIntersectionType, target: Type, reportErrors: ReportErrors): Ternary { + function someTypeRelatedToType(source: UnionOrIntersectionType, target: Type, reportErrors: boolean): Ternary { const sourceTypes = source.types; for (let i = 0, len = sourceTypes.length; i < len; i++) { - const related = isRelatedTo(sourceTypes[i], target, i === len - 1 ? reportErrors : ReportErrors.None); + const related = isRelatedTo(sourceTypes[i], target, reportErrors && i === len - 1); if (related) { return related; } @@ -5372,7 +5344,7 @@ namespace ts { return Ternary.False; } - function eachTypeRelatedToType(source: UnionOrIntersectionType, target: Type, reportErrors: ReportErrors): Ternary { + function eachTypeRelatedToType(source: UnionOrIntersectionType, target: Type, reportErrors: boolean): Ternary { let result = Ternary.True; const sourceTypes = source.types; for (const sourceType of sourceTypes) { @@ -5385,7 +5357,7 @@ namespace ts { return result; } - function typeArgumentsRelatedTo(source: TypeReference, target: TypeReference, reportErrors: ReportErrors): Ternary { + function typeArgumentsRelatedTo(source: TypeReference, target: TypeReference, reportErrors: boolean): Ternary { const sources = source.typeArguments || emptyArray; const targets = target.typeArguments || emptyArray; if (sources.length !== targets.length && relation === identityRelation) { @@ -5408,14 +5380,14 @@ namespace ts { // Third, check if both types are part of deeply nested chains of generic type instantiations and if so assume the types are // equal and infinitely expanding. Fourth, if we have reached a depth of 100 nested comparisons, assume we have runaway recursion // and issue an error. Otherwise, actually compare the structure of the two types. - function objectTypeRelatedTo(source: Type, originalSource: Type, target: Type, reportErrors: ReportErrors): Ternary { + function objectTypeRelatedTo(source: Type, originalSource: Type, target: Type, reportErrors: boolean): Ternary { if (overflow) { return Ternary.False; } const id = relation !== identityRelation || source.id < target.id ? source.id + "," + target.id : target.id + "," + source.id; const related = relation[id]; if (related !== undefined) { - if (reportErrors === ReportErrors.Elaborate && related === RelationComparisonResult.Failed) { + if (reportErrors && related === RelationComparisonResult.Failed) { // We are elaborating errors and the cached result is an unreported failure. Record the result as a reported // failure and continue computing the relation such that errors get reported. relation[id] = RelationComparisonResult.FailedAndReported; @@ -5485,7 +5457,7 @@ namespace ts { return result; } - function propertiesRelatedTo(source: Type, target: Type, reportErrors: ReportErrors): Ternary { + function propertiesRelatedTo(source: Type, target: Type, reportErrors: boolean): Ternary { if (relation === identityRelation) { return propertiesIdenticalTo(source, target); } @@ -5593,7 +5565,7 @@ namespace ts { return result; } - function signaturesRelatedTo(source: Type, target: Type, kind: SignatureKind, reportErrors: ReportErrors): Ternary { + function signaturesRelatedTo(source: Type, target: Type, kind: SignatureKind, reportErrors: boolean): Ternary { if (relation === identityRelation) { return signaturesIdenticalTo(source, target, kind); } @@ -5630,7 +5602,7 @@ namespace ts { errorInfo = saveErrorInfo; continue outer; } - shouldElaborateErrors = ReportErrors.None; + shouldElaborateErrors = false; } } // don't elaborate the primitive apparent types (like Number) @@ -5649,7 +5621,7 @@ namespace ts { /** * See signatureAssignableTo, compareSignaturesIdentical */ - function signatureRelatedTo(source: Signature, target: Signature, reportErrors: ReportErrors): Ternary { + function signatureRelatedTo(source: Signature, target: Signature, reportErrors: boolean): Ternary { return compareSignaturesRelated(source, target, /*ignoreReturnTypes*/ false, reportErrors, reportError, isRelatedTo); } @@ -5670,7 +5642,7 @@ namespace ts { return result; } - function stringIndexTypesRelatedTo(source: Type, originalSource: Type, target: Type, reportErrors: ReportErrors): Ternary { + function stringIndexTypesRelatedTo(source: Type, originalSource: Type, target: Type, reportErrors: boolean): Ternary { if (relation === identityRelation) { return indexTypesIdenticalTo(IndexKind.String, source, target); } @@ -5700,7 +5672,7 @@ namespace ts { return Ternary.True; } - function numberIndexTypesRelatedTo(source: Type, originalSource: Type, target: Type, reportErrors: ReportErrors): Ternary { + function numberIndexTypesRelatedTo(source: Type, originalSource: Type, target: Type, reportErrors: boolean): Ternary { if (relation === identityRelation) { return indexTypesIdenticalTo(IndexKind.Number, source, target); } @@ -5722,7 +5694,7 @@ namespace ts { let related: Ternary; if (sourceStringType && sourceNumberType) { // If we know for sure we're testing both string and numeric index types then only report errors from the second one - related = isRelatedTo(sourceStringType, targetType, ReportErrors.None) || isRelatedTo(sourceNumberType, targetType, reportErrors); + related = isRelatedTo(sourceStringType, targetType, /*reportErrors*/ false) || isRelatedTo(sourceNumberType, targetType, reportErrors); } else { related = isRelatedTo(sourceStringType || sourceNumberType, targetType, reportErrors); @@ -9003,7 +8975,7 @@ namespace ts { getInferredTypes(context); } - function checkTypeArguments(signature: Signature, typeArgumentNodes: TypeNode[], typeArgumentTypes: Type[], reportErrors: ReportErrors, headMessage?: DiagnosticMessage): boolean { + function checkTypeArguments(signature: Signature, typeArgumentNodes: TypeNode[], typeArgumentTypes: Type[], reportErrors: boolean, headMessage?: DiagnosticMessage): boolean { const typeParameters = signature.typeParameters; let typeArgumentsAreAssignable = true; let mapper: TypeMapper; @@ -9033,7 +9005,7 @@ namespace ts { return typeArgumentsAreAssignable; } - function checkApplicableSignature(node: CallLikeExpression, args: Expression[], signature: Signature, relation: Map, excludeArgument: boolean[], reportErrors: ReportErrors) { + function checkApplicableSignature(node: CallLikeExpression, args: Expression[], signature: Signature, relation: Map, excludeArgument: boolean[], reportErrors: boolean) { const argCount = getEffectiveArgumentCount(node, args, signature); for (let i = 0; i < argCount; i++) { const arg = getEffectiveArgument(node, args, i); @@ -9481,12 +9453,12 @@ namespace ts { // in arguments too early. If possible, we'd like to only type them once we know the correct // overload. However, this matters for the case where the call is correct. When the call is // an error, we don't need to exclude any arguments, although it would cause no harm to do so. - checkApplicableSignature(node, args, candidateForArgumentError, assignableRelation, /*excludeArgument*/ undefined, ReportErrors.Basic); + checkApplicableSignature(node, args, candidateForArgumentError, assignableRelation, /*excludeArgument*/ undefined, /*reportErrors*/ true); } else if (candidateForTypeArgumentError) { if (!isTaggedTemplate && !isDecorator && typeArguments) { const typeArguments = (node).typeArguments; - checkTypeArguments(candidateForTypeArgumentError, typeArguments, map(typeArguments, getTypeFromTypeNode), ReportErrors.Basic, headMessage); + checkTypeArguments(candidateForTypeArgumentError, typeArguments, map(typeArguments, getTypeFromTypeNode), /*reportErrors*/ true, headMessage); } else { Debug.assert(resultOfFailedInference.failedTypeParameterIndex >= 0); @@ -9554,7 +9526,7 @@ namespace ts { let typeArgumentTypes: Type[]; if (typeArguments) { typeArgumentTypes = map(typeArguments, getTypeFromTypeNode); - typeArgumentsAreValid = checkTypeArguments(candidate, typeArguments, typeArgumentTypes, ReportErrors.None); + typeArgumentsAreValid = checkTypeArguments(candidate, typeArguments, typeArgumentTypes, /*reportErrors*/ false); } else { inferTypeArguments(node, candidate, args, excludeArgument, inferenceContext); @@ -9566,7 +9538,7 @@ namespace ts { } candidate = getSignatureInstantiation(candidate, typeArgumentTypes); } - if (!checkApplicableSignature(node, args, candidate, relation, excludeArgument, ReportErrors.None)) { + if (!checkApplicableSignature(node, args, candidate, relation, excludeArgument, /*reportErrors*/ false)) { break; } const index = excludeArgument ? indexOf(excludeArgument, true) : -1; From 36c489c8dbea802c85a188670e163304d75da8fe Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Thu, 14 Jan 2016 16:07:26 -0800 Subject: [PATCH 158/209] address PR feedback --- src/compiler/checker.ts | 19 +++++++------- .../moduleAugmentationImportsAndExports1.js | 4 +-- ...duleAugmentationImportsAndExports1.symbols | 5 +++- ...moduleAugmentationImportsAndExports1.types | 13 +++++----- ...eAugmentationImportsAndExports2.errors.txt | 7 +++-- .../moduleAugmentationImportsAndExports2.js | 4 +-- ...eAugmentationImportsAndExports3.errors.txt | 2 +- .../moduleAugmentationImportsAndExports3.js | 4 +-- .../moduleAugmentationImportsAndExports4.js | 4 +-- ...duleAugmentationImportsAndExports4.symbols | 11 +++++--- ...moduleAugmentationImportsAndExports4.types | 13 +++++----- ...eAugmentationImportsAndExports5.errors.txt | 2 +- .../moduleAugmentationImportsAndExports5.js | 4 +-- .../moduleAugmentationImportsAndExports6.js | 4 +-- ...duleAugmentationImportsAndExports6.symbols | 11 +++++--- ...moduleAugmentationImportsAndExports6.types | 13 +++++----- .../reference/moduleAugmentationsImports1.js | 8 +++--- .../moduleAugmentationsImports1.symbols | 10 +++++-- .../moduleAugmentationsImports1.types | 26 +++++++++---------- .../reference/moduleAugmentationsImports2.js | 8 +++--- .../moduleAugmentationsImports2.symbols | 10 +++++-- .../moduleAugmentationsImports2.types | 26 +++++++++---------- .../reference/moduleAugmentationsImports3.js | 4 +-- .../moduleAugmentationsImports3.symbols | 5 +++- .../moduleAugmentationsImports3.types | 13 +++++----- .../moduleAugmentationImportsAndExports1.ts | 2 +- .../moduleAugmentationImportsAndExports2.ts | 2 +- .../moduleAugmentationImportsAndExports3.ts | 2 +- .../moduleAugmentationImportsAndExports4.ts | 2 +- .../moduleAugmentationImportsAndExports5.ts | 2 +- .../moduleAugmentationImportsAndExports6.ts | 2 +- .../compiler/moduleAugmentationsImports1.ts | 4 +-- .../compiler/moduleAugmentationsImports2.ts | 4 +-- .../compiler/moduleAugmentationsImports3.ts | 2 +- 34 files changed, 135 insertions(+), 117 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 3b48ff4bf45..1f265e59e06 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2490,7 +2490,7 @@ namespace ts { // Every class automatically contains a static property member named 'prototype', // the type of which is an instantiation of the class type with type Any supplied as a type argument for each type parameter. // It is an error to explicitly declare a static property member with the name 'prototype'. - const classType = getDeclaredTypeOfSymbol(prototype.parent); + const classType = getDeclaredTypeOfSymbol(getMergedSymbol(prototype.parent)); return classType.typeParameters ? createTypeReference(classType, map(classType.typeParameters, _ => anyType)) : classType; } @@ -14364,9 +14364,6 @@ namespace ts { reportError = symbol.parent !== undefined; } else { - // this symbol contains only merged content from external modules and augmentations so it should always be exported (parent !== undefined) - // and parent should have value side (valueDeclaration !== undefined) - Debug.assert(symbol.parent !== undefined && symbol.parent.valueDeclaration !== undefined); // symbol should not originate in augmentation reportError = isExternalModuleAugmentation(symbol.parent.valueDeclaration); } @@ -15714,20 +15711,22 @@ namespace ts { bindSourceFile(file, compilerOptions); }); - let mergeAugmentations = false; + let augmentations: LiteralExpression[][]; // Initialize global symbol table forEach(host.getSourceFiles(), file => { if (!isExternalOrCommonJsModule(file)) { mergeSymbolTable(globals, file.locals); } - mergeAugmentations = mergeAugmentations || file.moduleAugmentations.length > 0; + if (file.moduleAugmentations) { + (augmentations || (augmentations = [])).push(file.moduleAugmentations); + } }); - if (mergeAugmentations) { + if (augmentations) { // merge module augmentations. - // this needs to be done after global symbol table is initialized to make sure that all ambient modules are indexed - for (const file of host.getSourceFiles()) { - for (const augmentation of file.moduleAugmentations) { + // this needs to be done after global symbol table is initialized to make sure that all ambient modules are indexed + for (const list of augmentations) { + for (const augmentation of list) { mergeModuleAugmentation(augmentation); } } diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports1.js b/tests/baselines/reference/moduleAugmentationImportsAndExports1.js index 6c6dc72337e..7159e7b5d0c 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports1.js +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports1.js @@ -13,7 +13,7 @@ export class B { import {A} from "./f1"; import {B} from "./f2"; -(A.prototype).foo = function () {} +A.prototype.foo = function () { return undefined; } declare module "./f1" { interface A { foo(): B; @@ -46,7 +46,7 @@ exports.B = B; //// [f3.js] "use strict"; var f1_1 = require("./f1"); -f1_1.A.prototype.foo = function () { }; +f1_1.A.prototype.foo = function () { return undefined; }; //// [f4.js] "use strict"; require("./f3"); diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports1.symbols b/tests/baselines/reference/moduleAugmentationImportsAndExports1.symbols index 4d9f8217e4c..c641cad5228 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports1.symbols +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports1.symbols @@ -18,10 +18,13 @@ import {A} from "./f1"; import {B} from "./f2"; >B : Symbol(B, Decl(f3.ts, 1, 8)) -(A.prototype).foo = function () {} +A.prototype.foo = function () { return undefined; } +>A.prototype.foo : Symbol(A.foo, Decl(f3.ts, 5, 17)) >A.prototype : Symbol(A.prototype) >A : Symbol(A, Decl(f3.ts, 0, 8)) >prototype : Symbol(A.prototype) +>foo : Symbol(A.foo, Decl(f3.ts, 5, 17)) +>undefined : Symbol(undefined) declare module "./f1" { interface A { diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports1.types b/tests/baselines/reference/moduleAugmentationImportsAndExports1.types index 53ea84f96eb..886a04b54ef 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports1.types +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports1.types @@ -18,16 +18,15 @@ import {A} from "./f1"; import {B} from "./f2"; >B : typeof B -(A.prototype).foo = function () {} ->(A.prototype).foo = function () {} : () => void ->(A.prototype).foo : any ->(A.prototype) : any ->A.prototype : any +A.prototype.foo = function () { return undefined; } +>A.prototype.foo = function () { return undefined; } : () => any +>A.prototype.foo : () => B >A.prototype : A >A : typeof A >prototype : A ->foo : any ->function () {} : () => void +>foo : () => B +>function () { return undefined; } : () => any +>undefined : undefined declare module "./f1" { interface A { diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports2.errors.txt b/tests/baselines/reference/moduleAugmentationImportsAndExports2.errors.txt index 28cb7a7a7e9..deb3881e209 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports2.errors.txt +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports2.errors.txt @@ -1,3 +1,4 @@ +tests/cases/compiler/f3.ts(3,13): error TS2339: Property 'foo' does not exist on type 'A'. tests/cases/compiler/f3.ts(11,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. tests/cases/compiler/f3.ts(11,21): error TS2307: Cannot find module './f2'. tests/cases/compiler/f3.ts(12,5): error TS2666: Exports and export assignments are not permitted in module augmentations. @@ -19,10 +20,12 @@ tests/cases/compiler/f4.ts(5,11): error TS2339: Property 'foo' does not exist on n: number; } -==== tests/cases/compiler/f3.ts (9 errors) ==== +==== tests/cases/compiler/f3.ts (10 errors) ==== import {A} from "./f1"; - (A.prototype).foo = function () {} + A.prototype.foo = function () { return undefined; } + ~~~ +!!! error TS2339: Property 'foo' does not exist on type 'A'. namespace N { export interface Ifc { a } diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports2.js b/tests/baselines/reference/moduleAugmentationImportsAndExports2.js index b0351c1c332..3a4a807a334 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports2.js +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports2.js @@ -12,7 +12,7 @@ export class B { //// [f3.ts] import {A} from "./f1"; -(A.prototype).foo = function () {} +A.prototype.foo = function () { return undefined; } namespace N { export interface Ifc { a } @@ -58,7 +58,7 @@ exports.B = B; //// [f3.js] "use strict"; var f1_1 = require("./f1"); -f1_1.A.prototype.foo = function () { }; +f1_1.A.prototype.foo = function () { return undefined; }; //// [f4.js] "use strict"; require("./f3"); diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports3.errors.txt b/tests/baselines/reference/moduleAugmentationImportsAndExports3.errors.txt index b84ac9ece87..a7c8fa2cff2 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports3.errors.txt +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports3.errors.txt @@ -18,7 +18,7 @@ tests/cases/compiler/f3.ts(13,16): error TS4000: Import declaration 'C' is using ==== tests/cases/compiler/f3.ts (6 errors) ==== import {A} from "./f1"; - (A.prototype).foo = function () {} + A.prototype.foo = function () { return undefined; } namespace N { export interface Ifc { a } diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports3.js b/tests/baselines/reference/moduleAugmentationImportsAndExports3.js index 381ae5e1d10..d872a79e985 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports3.js +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports3.js @@ -12,7 +12,7 @@ export class B { //// [f3.ts] import {A} from "./f1"; -(A.prototype).foo = function () {} +A.prototype.foo = function () { return undefined; } namespace N { export interface Ifc { a } @@ -56,7 +56,7 @@ exports.B = B; //// [f3.js] "use strict"; var f1_1 = require("./f1"); -f1_1.A.prototype.foo = function () { }; +f1_1.A.prototype.foo = function () { return undefined; }; //// [f4.js] "use strict"; require("./f3"); diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports4.js b/tests/baselines/reference/moduleAugmentationImportsAndExports4.js index cbb844fa20e..53095555815 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports4.js +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports4.js @@ -13,7 +13,7 @@ export class B { import {A} from "./f1"; import {B} from "./f2"; -(A.prototype).foo = function () {} +A.prototype.foo = function () { return undefined; } namespace N { export interface Ifc { a: number; } @@ -58,7 +58,7 @@ exports.B = B; //// [f3.js] "use strict"; var f1_1 = require("./f1"); -f1_1.A.prototype.foo = function () { }; +f1_1.A.prototype.foo = function () { return undefined; }; //// [f4.js] "use strict"; require("./f3"); diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports4.symbols b/tests/baselines/reference/moduleAugmentationImportsAndExports4.symbols index d526ce96866..94dc05519dd 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports4.symbols +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports4.symbols @@ -18,13 +18,16 @@ import {A} from "./f1"; import {B} from "./f2"; >B : Symbol(B, Decl(f3.ts, 1, 8)) -(A.prototype).foo = function () {} +A.prototype.foo = function () { return undefined; } +>A.prototype.foo : Symbol(A.foo, Decl(f3.ts, 13, 17)) >A.prototype : Symbol(A.prototype) >A : Symbol(A, Decl(f3.ts, 0, 8)) >prototype : Symbol(A.prototype) +>foo : Symbol(A.foo, Decl(f3.ts, 13, 17)) +>undefined : Symbol(undefined) namespace N { ->N : Symbol(N, Decl(f3.ts, 3, 39)) +>N : Symbol(N, Decl(f3.ts, 3, 51)) export interface Ifc { a: number; } >Ifc : Symbol(Ifc, Decl(f3.ts, 5, 13)) @@ -36,12 +39,12 @@ namespace N { } import I = N.Ifc; >I : Symbol(I, Decl(f3.ts, 8, 1)) ->N : Symbol(N, Decl(f3.ts, 3, 39)) +>N : Symbol(N, Decl(f3.ts, 3, 51)) >Ifc : Symbol(I, Decl(f3.ts, 5, 13)) import C = N.Cls; >C : Symbol(C, Decl(f3.ts, 9, 17)) ->N : Symbol(N, Decl(f3.ts, 3, 39)) +>N : Symbol(N, Decl(f3.ts, 3, 51)) >Cls : Symbol(C, Decl(f3.ts, 6, 39)) declare module "./f1" { diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports4.types b/tests/baselines/reference/moduleAugmentationImportsAndExports4.types index 5931989ab42..454dc5d27ec 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports4.types +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports4.types @@ -18,16 +18,15 @@ import {A} from "./f1"; import {B} from "./f2"; >B : typeof B -(A.prototype).foo = function () {} ->(A.prototype).foo = function () {} : () => void ->(A.prototype).foo : any ->(A.prototype) : any ->A.prototype : any +A.prototype.foo = function () { return undefined; } +>A.prototype.foo = function () { return undefined; } : () => any +>A.prototype.foo : () => B >A.prototype : A >A : typeof A >prototype : A ->foo : any ->function () {} : () => void +>foo : () => B +>function () { return undefined; } : () => any +>undefined : undefined namespace N { >N : any diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports5.errors.txt b/tests/baselines/reference/moduleAugmentationImportsAndExports5.errors.txt index 177038d8aaf..5f783453888 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports5.errors.txt +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports5.errors.txt @@ -15,7 +15,7 @@ tests/cases/compiler/f3.ts(11,12): error TS4000: Import declaration 'C' is using import {A} from "./f1"; import {B} from "./f2"; - (A.prototype).foo = function () {} + A.prototype.foo = function () { return undefined; } namespace N { export interface Ifc { a: number; } diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports5.js b/tests/baselines/reference/moduleAugmentationImportsAndExports5.js index a69ccbf3855..c9b622ccf25 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports5.js +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports5.js @@ -13,7 +13,7 @@ export class B { import {A} from "./f1"; import {B} from "./f2"; -(A.prototype).foo = function () {} +A.prototype.foo = function () { return undefined; } namespace N { export interface Ifc { a: number; } @@ -58,7 +58,7 @@ exports.B = B; //// [f3.js] "use strict"; var f1_1 = require("./f1"); -f1_1.A.prototype.foo = function () { }; +f1_1.A.prototype.foo = function () { return undefined; }; //// [f4.js] "use strict"; require("./f3"); diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports6.js b/tests/baselines/reference/moduleAugmentationImportsAndExports6.js index c0cc8778ab1..f0b297720b3 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports6.js +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports6.js @@ -13,7 +13,7 @@ export class B { import {A} from "./f1"; import {B} from "./f2"; -(A.prototype).foo = function () {} +A.prototype.foo = function () { return undefined; } export namespace N { export interface Ifc { a: number; } @@ -58,7 +58,7 @@ exports.B = B; //// [f3.js] "use strict"; var f1_1 = require("./f1"); -f1_1.A.prototype.foo = function () { }; +f1_1.A.prototype.foo = function () { return undefined; }; //// [f4.js] "use strict"; require("./f3"); diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports6.symbols b/tests/baselines/reference/moduleAugmentationImportsAndExports6.symbols index 3add4b08e8d..92952ef94bc 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports6.symbols +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports6.symbols @@ -18,13 +18,16 @@ import {A} from "./f1"; import {B} from "./f2"; >B : Symbol(B, Decl(f3.ts, 1, 8)) -(A.prototype).foo = function () {} +A.prototype.foo = function () { return undefined; } +>A.prototype.foo : Symbol(A.foo, Decl(f3.ts, 13, 17)) >A.prototype : Symbol(A.prototype) >A : Symbol(A, Decl(f3.ts, 0, 8)) >prototype : Symbol(A.prototype) +>foo : Symbol(A.foo, Decl(f3.ts, 13, 17)) +>undefined : Symbol(undefined) export namespace N { ->N : Symbol(N, Decl(f3.ts, 3, 39)) +>N : Symbol(N, Decl(f3.ts, 3, 51)) export interface Ifc { a: number; } >Ifc : Symbol(Ifc, Decl(f3.ts, 5, 20)) @@ -36,12 +39,12 @@ export namespace N { } import I = N.Ifc; >I : Symbol(I, Decl(f3.ts, 8, 1)) ->N : Symbol(N, Decl(f3.ts, 3, 39)) +>N : Symbol(N, Decl(f3.ts, 3, 51)) >Ifc : Symbol(I, Decl(f3.ts, 5, 20)) import C = N.Cls; >C : Symbol(C, Decl(f3.ts, 9, 17)) ->N : Symbol(N, Decl(f3.ts, 3, 39)) +>N : Symbol(N, Decl(f3.ts, 3, 51)) >Cls : Symbol(C, Decl(f3.ts, 6, 39)) declare module "./f1" { diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports6.types b/tests/baselines/reference/moduleAugmentationImportsAndExports6.types index f7935e16c16..0c201599b52 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports6.types +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports6.types @@ -18,16 +18,15 @@ import {A} from "./f1"; import {B} from "./f2"; >B : typeof B -(A.prototype).foo = function () {} ->(A.prototype).foo = function () {} : () => void ->(A.prototype).foo : any ->(A.prototype) : any ->A.prototype : any +A.prototype.foo = function () { return undefined; } +>A.prototype.foo = function () { return undefined; } : () => any +>A.prototype.foo : () => B >A.prototype : A >A : typeof A >prototype : A ->foo : any ->function () {} : () => void +>foo : () => B +>function () { return undefined; } : () => any +>undefined : undefined export namespace N { >N : any diff --git a/tests/baselines/reference/moduleAugmentationsImports1.js b/tests/baselines/reference/moduleAugmentationsImports1.js index 4730afa4a5f..2c635a0719e 100644 --- a/tests/baselines/reference/moduleAugmentationsImports1.js +++ b/tests/baselines/reference/moduleAugmentationsImports1.js @@ -19,8 +19,8 @@ import {A} from "./a"; import {B} from "./b"; import {Cls} from "C"; -(A.prototype).getB = function () {}; -(A.prototype).getCls = function () {} +A.prototype.getB = function () { return undefined; } +A.prototype.getCls = function () { return undefined; } declare module "./a" { interface A { @@ -64,8 +64,8 @@ define("b", ["require", "exports"], function (require, exports) { /// define("d", ["require", "exports", "a"], function (require, exports, a_1) { "use strict"; - a_1.A.prototype.getB = function () { }; - a_1.A.prototype.getCls = function () { }; + a_1.A.prototype.getB = function () { return undefined; }; + a_1.A.prototype.getCls = function () { return undefined; }; }); define("main", ["require", "exports", "d"], function (require, exports) { "use strict"; diff --git a/tests/baselines/reference/moduleAugmentationsImports1.symbols b/tests/baselines/reference/moduleAugmentationsImports1.symbols index 8f4cfd09868..38ef8f55229 100644 --- a/tests/baselines/reference/moduleAugmentationsImports1.symbols +++ b/tests/baselines/reference/moduleAugmentationsImports1.symbols @@ -27,15 +27,21 @@ import {B} from "./b"; import {Cls} from "C"; >Cls : Symbol(Cls, Decl(d.ts, 4, 8)) -(A.prototype).getB = function () {}; +A.prototype.getB = function () { return undefined; } +>A.prototype.getB : Symbol(A.getB, Decl(d.ts, 10, 17)) >A.prototype : Symbol(A.prototype) >A : Symbol(A, Decl(d.ts, 2, 8)) >prototype : Symbol(A.prototype) +>getB : Symbol(A.getB, Decl(d.ts, 10, 17)) +>undefined : Symbol(undefined) -(A.prototype).getCls = function () {} +A.prototype.getCls = function () { return undefined; } +>A.prototype.getCls : Symbol(A.getCls, Decl(d.ts, 16, 17)) >A.prototype : Symbol(A.prototype) >A : Symbol(A, Decl(d.ts, 2, 8)) >prototype : Symbol(A.prototype) +>getCls : Symbol(A.getCls, Decl(d.ts, 16, 17)) +>undefined : Symbol(undefined) declare module "./a" { interface A { diff --git a/tests/baselines/reference/moduleAugmentationsImports1.types b/tests/baselines/reference/moduleAugmentationsImports1.types index 14e0d32da59..bf0bfee0a7a 100644 --- a/tests/baselines/reference/moduleAugmentationsImports1.types +++ b/tests/baselines/reference/moduleAugmentationsImports1.types @@ -27,27 +27,25 @@ import {B} from "./b"; import {Cls} from "C"; >Cls : typeof Cls -(A.prototype).getB = function () {}; ->(A.prototype).getB = function () {} : () => void ->(A.prototype).getB : any ->(A.prototype) : any ->A.prototype : any +A.prototype.getB = function () { return undefined; } +>A.prototype.getB = function () { return undefined; } : () => any +>A.prototype.getB : () => B >A.prototype : A >A : typeof A >prototype : A ->getB : any ->function () {} : () => void +>getB : () => B +>function () { return undefined; } : () => any +>undefined : undefined -(A.prototype).getCls = function () {} ->(A.prototype).getCls = function () {} : () => void ->(A.prototype).getCls : any ->(A.prototype) : any ->A.prototype : any +A.prototype.getCls = function () { return undefined; } +>A.prototype.getCls = function () { return undefined; } : () => any +>A.prototype.getCls : () => Cls >A.prototype : A >A : typeof A >prototype : A ->getCls : any ->function () {} : () => void +>getCls : () => Cls +>function () { return undefined; } : () => any +>undefined : undefined declare module "./a" { interface A { diff --git a/tests/baselines/reference/moduleAugmentationsImports2.js b/tests/baselines/reference/moduleAugmentationsImports2.js index b0aee584a55..f70426b49bd 100644 --- a/tests/baselines/reference/moduleAugmentationsImports2.js +++ b/tests/baselines/reference/moduleAugmentationsImports2.js @@ -18,7 +18,7 @@ declare module "C" { import {A} from "./a"; import {B} from "./b"; -(A.prototype).getB = function () {}; +A.prototype.getB = function () { return undefined; } declare module "./a" { interface A { @@ -30,7 +30,7 @@ declare module "./a" { import {A} from "./a"; import {Cls} from "C"; -(A.prototype).getCls = function () {} +A.prototype.getCls = function () { return undefined; } declare module "./a" { interface A { @@ -69,11 +69,11 @@ define("b", ["require", "exports"], function (require, exports) { /// define("d", ["require", "exports", "a"], function (require, exports, a_1) { "use strict"; - a_1.A.prototype.getB = function () { }; + a_1.A.prototype.getB = function () { return undefined; }; }); define("e", ["require", "exports", "a"], function (require, exports, a_2) { "use strict"; - a_2.A.prototype.getCls = function () { }; + a_2.A.prototype.getCls = function () { return undefined; }; }); define("main", ["require", "exports", "d", "e"], function (require, exports) { "use strict"; diff --git a/tests/baselines/reference/moduleAugmentationsImports2.symbols b/tests/baselines/reference/moduleAugmentationsImports2.symbols index 20a5f779b8d..643ccf20eb2 100644 --- a/tests/baselines/reference/moduleAugmentationsImports2.symbols +++ b/tests/baselines/reference/moduleAugmentationsImports2.symbols @@ -24,10 +24,13 @@ import {A} from "./a"; import {B} from "./b"; >B : Symbol(B, Decl(d.ts, 3, 8)) -(A.prototype).getB = function () {}; +A.prototype.getB = function () { return undefined; } +>A.prototype.getB : Symbol(A.getB, Decl(d.ts, 8, 17)) >A.prototype : Symbol(A.prototype) >A : Symbol(A, Decl(d.ts, 2, 8)) >prototype : Symbol(A.prototype) +>getB : Symbol(A.getB, Decl(d.ts, 8, 17)) +>undefined : Symbol(undefined) declare module "./a" { interface A { @@ -46,10 +49,13 @@ import {A} from "./a"; import {Cls} from "C"; >Cls : Symbol(Cls, Decl(e.ts, 1, 8)) -(A.prototype).getCls = function () {} +A.prototype.getCls = function () { return undefined; } +>A.prototype.getCls : Symbol(A.getCls, Decl(e.ts, 6, 17)) >A.prototype : Symbol(A.prototype) >A : Symbol(A, Decl(e.ts, 0, 8)) >prototype : Symbol(A.prototype) +>getCls : Symbol(A.getCls, Decl(e.ts, 6, 17)) +>undefined : Symbol(undefined) declare module "./a" { interface A { diff --git a/tests/baselines/reference/moduleAugmentationsImports2.types b/tests/baselines/reference/moduleAugmentationsImports2.types index b2c20f17886..56b40625600 100644 --- a/tests/baselines/reference/moduleAugmentationsImports2.types +++ b/tests/baselines/reference/moduleAugmentationsImports2.types @@ -24,16 +24,15 @@ import {A} from "./a"; import {B} from "./b"; >B : typeof B -(A.prototype).getB = function () {}; ->(A.prototype).getB = function () {} : () => void ->(A.prototype).getB : any ->(A.prototype) : any ->A.prototype : any +A.prototype.getB = function () { return undefined; } +>A.prototype.getB = function () { return undefined; } : () => any +>A.prototype.getB : () => B >A.prototype : A >A : typeof A >prototype : A ->getB : any ->function () {} : () => void +>getB : () => B +>function () { return undefined; } : () => any +>undefined : undefined declare module "./a" { interface A { @@ -52,16 +51,15 @@ import {A} from "./a"; import {Cls} from "C"; >Cls : typeof Cls -(A.prototype).getCls = function () {} ->(A.prototype).getCls = function () {} : () => void ->(A.prototype).getCls : any ->(A.prototype) : any ->A.prototype : any +A.prototype.getCls = function () { return undefined; } +>A.prototype.getCls = function () { return undefined; } : () => any +>A.prototype.getCls : () => Cls >A.prototype : A >A : typeof A >prototype : A ->getCls : any ->function () {} : () => void +>getCls : () => Cls +>function () { return undefined; } : () => any +>undefined : undefined declare module "./a" { interface A { diff --git a/tests/baselines/reference/moduleAugmentationsImports3.js b/tests/baselines/reference/moduleAugmentationsImports3.js index 2254d3e3ff9..3654583b5c9 100644 --- a/tests/baselines/reference/moduleAugmentationsImports3.js +++ b/tests/baselines/reference/moduleAugmentationsImports3.js @@ -28,7 +28,7 @@ declare module "D" { import {A} from "./a"; import {Cls} from "C"; -(A.prototype).getCls = function () {} +A.prototype.getCls = function () { return undefined; } declare module "./a" { interface A { @@ -67,7 +67,7 @@ define("b", ["require", "exports"], function (require, exports) { }); define("e", ["require", "exports", "a"], function (require, exports, a_1) { "use strict"; - a_1.A.prototype.getCls = function () { }; + a_1.A.prototype.getCls = function () { return undefined; }; }); define("main", ["require", "exports", "D", "e"], function (require, exports) { "use strict"; diff --git a/tests/baselines/reference/moduleAugmentationsImports3.symbols b/tests/baselines/reference/moduleAugmentationsImports3.symbols index 514e412c5cf..db8eee074c0 100644 --- a/tests/baselines/reference/moduleAugmentationsImports3.symbols +++ b/tests/baselines/reference/moduleAugmentationsImports3.symbols @@ -74,10 +74,13 @@ import {A} from "./a"; import {Cls} from "C"; >Cls : Symbol(Cls, Decl(e.ts, 2, 8)) -(A.prototype).getCls = function () {} +A.prototype.getCls = function () { return undefined; } +>A.prototype.getCls : Symbol(A.getCls, Decl(e.ts, 7, 17)) >A.prototype : Symbol(A.prototype) >A : Symbol(A, Decl(e.ts, 1, 8)) >prototype : Symbol(A.prototype) +>getCls : Symbol(A.getCls, Decl(e.ts, 7, 17)) +>undefined : Symbol(undefined) declare module "./a" { interface A { diff --git a/tests/baselines/reference/moduleAugmentationsImports3.types b/tests/baselines/reference/moduleAugmentationsImports3.types index ba930c4f857..04d17296c56 100644 --- a/tests/baselines/reference/moduleAugmentationsImports3.types +++ b/tests/baselines/reference/moduleAugmentationsImports3.types @@ -78,16 +78,15 @@ import {A} from "./a"; import {Cls} from "C"; >Cls : typeof Cls -(A.prototype).getCls = function () {} ->(A.prototype).getCls = function () {} : () => void ->(A.prototype).getCls : any ->(A.prototype) : any ->A.prototype : any +A.prototype.getCls = function () { return undefined; } +>A.prototype.getCls = function () { return undefined; } : () => any +>A.prototype.getCls : () => Cls >A.prototype : A >A : typeof A >prototype : A ->getCls : any ->function () {} : () => void +>getCls : () => Cls +>function () { return undefined; } : () => any +>undefined : undefined declare module "./a" { interface A { diff --git a/tests/cases/compiler/moduleAugmentationImportsAndExports1.ts b/tests/cases/compiler/moduleAugmentationImportsAndExports1.ts index b5e8a07a70e..165057cf025 100644 --- a/tests/cases/compiler/moduleAugmentationImportsAndExports1.ts +++ b/tests/cases/compiler/moduleAugmentationImportsAndExports1.ts @@ -13,7 +13,7 @@ export class B { import {A} from "./f1"; import {B} from "./f2"; -(A.prototype).foo = function () {} +A.prototype.foo = function () { return undefined; } declare module "./f1" { interface A { foo(): B; diff --git a/tests/cases/compiler/moduleAugmentationImportsAndExports2.ts b/tests/cases/compiler/moduleAugmentationImportsAndExports2.ts index 8cd9f8ffdba..8e76475c404 100644 --- a/tests/cases/compiler/moduleAugmentationImportsAndExports2.ts +++ b/tests/cases/compiler/moduleAugmentationImportsAndExports2.ts @@ -12,7 +12,7 @@ export class B { // @filename: f3.ts import {A} from "./f1"; -(A.prototype).foo = function () {} +A.prototype.foo = function () { return undefined; } namespace N { export interface Ifc { a } diff --git a/tests/cases/compiler/moduleAugmentationImportsAndExports3.ts b/tests/cases/compiler/moduleAugmentationImportsAndExports3.ts index 170bb6c3d11..ea1d5e435da 100644 --- a/tests/cases/compiler/moduleAugmentationImportsAndExports3.ts +++ b/tests/cases/compiler/moduleAugmentationImportsAndExports3.ts @@ -12,7 +12,7 @@ export class B { // @filename: f3.ts import {A} from "./f1"; -(A.prototype).foo = function () {} +A.prototype.foo = function () { return undefined; } namespace N { export interface Ifc { a } diff --git a/tests/cases/compiler/moduleAugmentationImportsAndExports4.ts b/tests/cases/compiler/moduleAugmentationImportsAndExports4.ts index d9eb823d8e0..3f3b9e19400 100644 --- a/tests/cases/compiler/moduleAugmentationImportsAndExports4.ts +++ b/tests/cases/compiler/moduleAugmentationImportsAndExports4.ts @@ -12,7 +12,7 @@ export class B { import {A} from "./f1"; import {B} from "./f2"; -(A.prototype).foo = function () {} +A.prototype.foo = function () { return undefined; } namespace N { export interface Ifc { a: number; } diff --git a/tests/cases/compiler/moduleAugmentationImportsAndExports5.ts b/tests/cases/compiler/moduleAugmentationImportsAndExports5.ts index 2e799a215b5..8dbff8f7cc9 100644 --- a/tests/cases/compiler/moduleAugmentationImportsAndExports5.ts +++ b/tests/cases/compiler/moduleAugmentationImportsAndExports5.ts @@ -13,7 +13,7 @@ export class B { import {A} from "./f1"; import {B} from "./f2"; -(A.prototype).foo = function () {} +A.prototype.foo = function () { return undefined; } namespace N { export interface Ifc { a: number; } diff --git a/tests/cases/compiler/moduleAugmentationImportsAndExports6.ts b/tests/cases/compiler/moduleAugmentationImportsAndExports6.ts index aafab20943f..e9e216cbbbe 100644 --- a/tests/cases/compiler/moduleAugmentationImportsAndExports6.ts +++ b/tests/cases/compiler/moduleAugmentationImportsAndExports6.ts @@ -13,7 +13,7 @@ export class B { import {A} from "./f1"; import {B} from "./f2"; -(A.prototype).foo = function () {} +A.prototype.foo = function () { return undefined; } export namespace N { export interface Ifc { a: number; } diff --git a/tests/cases/compiler/moduleAugmentationsImports1.ts b/tests/cases/compiler/moduleAugmentationsImports1.ts index cec14867802..ad029bdfc4a 100644 --- a/tests/cases/compiler/moduleAugmentationsImports1.ts +++ b/tests/cases/compiler/moduleAugmentationsImports1.ts @@ -20,8 +20,8 @@ import {A} from "./a"; import {B} from "./b"; import {Cls} from "C"; -(A.prototype).getB = function () {}; -(A.prototype).getCls = function () {} +A.prototype.getB = function () { return undefined; } +A.prototype.getCls = function () { return undefined; } declare module "./a" { interface A { diff --git a/tests/cases/compiler/moduleAugmentationsImports2.ts b/tests/cases/compiler/moduleAugmentationsImports2.ts index 1b0365ec420..bf5b4b1cd17 100644 --- a/tests/cases/compiler/moduleAugmentationsImports2.ts +++ b/tests/cases/compiler/moduleAugmentationsImports2.ts @@ -19,7 +19,7 @@ declare module "C" { import {A} from "./a"; import {B} from "./b"; -(A.prototype).getB = function () {}; +A.prototype.getB = function () { return undefined; } declare module "./a" { interface A { @@ -31,7 +31,7 @@ declare module "./a" { import {A} from "./a"; import {Cls} from "C"; -(A.prototype).getCls = function () {} +A.prototype.getCls = function () { return undefined; } declare module "./a" { interface A { diff --git a/tests/cases/compiler/moduleAugmentationsImports3.ts b/tests/cases/compiler/moduleAugmentationsImports3.ts index 2075d66e1d3..92cc6c73a3c 100644 --- a/tests/cases/compiler/moduleAugmentationsImports3.ts +++ b/tests/cases/compiler/moduleAugmentationsImports3.ts @@ -29,7 +29,7 @@ declare module "D" { import {A} from "./a"; import {Cls} from "C"; -(A.prototype).getCls = function () {} +A.prototype.getCls = function () { return undefined; } declare module "./a" { interface A { From 32454d0a84e84d820aa4946c5624d293c4002597 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 14 Jan 2016 16:28:07 -0800 Subject: [PATCH 159/209] Added tests. --- .../compiler/accessInstanceMemberFromStaticMethod01.ts | 7 +++++++ .../compiler/accessStaticMemberFromInstanceMethod01.ts | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 tests/cases/compiler/accessInstanceMemberFromStaticMethod01.ts create mode 100644 tests/cases/compiler/accessStaticMemberFromInstanceMethod01.ts diff --git a/tests/cases/compiler/accessInstanceMemberFromStaticMethod01.ts b/tests/cases/compiler/accessInstanceMemberFromStaticMethod01.ts new file mode 100644 index 00000000000..cdca697f13f --- /dev/null +++ b/tests/cases/compiler/accessInstanceMemberFromStaticMethod01.ts @@ -0,0 +1,7 @@ +class C { + static foo: string; + + bar() { + let k = foo; + } +} \ No newline at end of file diff --git a/tests/cases/compiler/accessStaticMemberFromInstanceMethod01.ts b/tests/cases/compiler/accessStaticMemberFromInstanceMethod01.ts new file mode 100644 index 00000000000..654ae39aacd --- /dev/null +++ b/tests/cases/compiler/accessStaticMemberFromInstanceMethod01.ts @@ -0,0 +1,7 @@ +class C { + foo: string; + + static bar() { + let k = foo; + } +} \ No newline at end of file From e7cee960077dbefb783515867ead98490d4da4b4 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 14 Jan 2016 16:28:22 -0800 Subject: [PATCH 160/209] Accepted baselines. --- ...InstanceMemberFromStaticMethod01.errors.txt | 13 +++++++++++++ .../accessInstanceMemberFromStaticMethod01.js | 18 ++++++++++++++++++ ...StaticMemberFromInstanceMethod01.errors.txt | 13 +++++++++++++ .../accessStaticMemberFromInstanceMethod01.js | 18 ++++++++++++++++++ 4 files changed, 62 insertions(+) create mode 100644 tests/baselines/reference/accessInstanceMemberFromStaticMethod01.errors.txt create mode 100644 tests/baselines/reference/accessInstanceMemberFromStaticMethod01.js create mode 100644 tests/baselines/reference/accessStaticMemberFromInstanceMethod01.errors.txt create mode 100644 tests/baselines/reference/accessStaticMemberFromInstanceMethod01.js diff --git a/tests/baselines/reference/accessInstanceMemberFromStaticMethod01.errors.txt b/tests/baselines/reference/accessInstanceMemberFromStaticMethod01.errors.txt new file mode 100644 index 00000000000..f1cd943f9ac --- /dev/null +++ b/tests/baselines/reference/accessInstanceMemberFromStaticMethod01.errors.txt @@ -0,0 +1,13 @@ +tests/cases/compiler/accessInstanceMemberFromStaticMethod01.ts(5,17): error TS2304: Cannot find name 'foo'. + + +==== tests/cases/compiler/accessInstanceMemberFromStaticMethod01.ts (1 errors) ==== + class C { + static foo: string; + + bar() { + let k = foo; + ~~~ +!!! error TS2304: Cannot find name 'foo'. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/accessInstanceMemberFromStaticMethod01.js b/tests/baselines/reference/accessInstanceMemberFromStaticMethod01.js new file mode 100644 index 00000000000..763be0568dc --- /dev/null +++ b/tests/baselines/reference/accessInstanceMemberFromStaticMethod01.js @@ -0,0 +1,18 @@ +//// [accessInstanceMemberFromStaticMethod01.ts] +class C { + static foo: string; + + bar() { + let k = foo; + } +} + +//// [accessInstanceMemberFromStaticMethod01.js] +var C = (function () { + function C() { + } + C.prototype.bar = function () { + var k = foo; + }; + return C; +}()); diff --git a/tests/baselines/reference/accessStaticMemberFromInstanceMethod01.errors.txt b/tests/baselines/reference/accessStaticMemberFromInstanceMethod01.errors.txt new file mode 100644 index 00000000000..612a89a1043 --- /dev/null +++ b/tests/baselines/reference/accessStaticMemberFromInstanceMethod01.errors.txt @@ -0,0 +1,13 @@ +tests/cases/compiler/accessStaticMemberFromInstanceMethod01.ts(5,17): error TS2304: Cannot find name 'foo'. + + +==== tests/cases/compiler/accessStaticMemberFromInstanceMethod01.ts (1 errors) ==== + class C { + foo: string; + + static bar() { + let k = foo; + ~~~ +!!! error TS2304: Cannot find name 'foo'. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/accessStaticMemberFromInstanceMethod01.js b/tests/baselines/reference/accessStaticMemberFromInstanceMethod01.js new file mode 100644 index 00000000000..fd8ee14b2e1 --- /dev/null +++ b/tests/baselines/reference/accessStaticMemberFromInstanceMethod01.js @@ -0,0 +1,18 @@ +//// [accessStaticMemberFromInstanceMethod01.ts] +class C { + foo: string; + + static bar() { + let k = foo; + } +} + +//// [accessStaticMemberFromInstanceMethod01.js] +var C = (function () { + function C() { + } + C.bar = function () { + var k = foo; + }; + return C; +}()); From e980f46cbe443d5b74b7f34b52232bff693ca685 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 14 Jan 2016 17:05:09 -0800 Subject: [PATCH 161/209] Look up static members from instance methods. --- src/compiler/checker.ts | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 83953daa95a..d84e550b9b9 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -789,22 +789,25 @@ namespace ts { let location = container; while (location) { if (isClassLike(location.parent)) { - const symbol = getSymbolOfNode(location.parent); - let classType: Type; - if (location.flags & NodeFlags.Static) { - classType = getTypeOfSymbol(symbol); - if (getPropertyOfType(classType, name)) { - error(errorLocation, Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0, typeof nameArg === "string" ? nameArg : declarationNameToString(nameArg), symbolToString(symbol)); - return true; - } + const classSymbol = getSymbolOfNode(location.parent); + if (!classSymbol) { + break; } - else { - if (location === container) { - classType = (getDeclaredTypeOfSymbol(symbol)).thisType; - if (getPropertyOfType(classType, name)) { - error(errorLocation, Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0, typeof nameArg === "string" ? nameArg : declarationNameToString(nameArg)); - return true; - } + + // Check to see if a static member exists. + const constructorType = getTypeOfSymbol(classSymbol); + if (getPropertyOfType(constructorType, name)) { + error(errorLocation, Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0, typeof nameArg === "string" ? nameArg : declarationNameToString(nameArg), symbolToString(classSymbol)); + return true; + } + + // No static member is present. + // Check if we're in an instance method and look for a relevant instance member. + if (location === container && !(location.flags & NodeFlags.Static)) { + const instanceType = (getDeclaredTypeOfSymbol(classSymbol)).thisType; + if (getPropertyOfType(instanceType, name)) { + error(errorLocation, Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0, typeof nameArg === "string" ? nameArg : declarationNameToString(nameArg)); + return true; } } } From 806565457fe73524fb946453c45c9414e7218498 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 14 Jan 2016 17:05:28 -0800 Subject: [PATCH 162/209] Accepted baselines. --- .../accessInstanceMemberFromStaticMethod01.errors.txt | 4 ++-- .../scopeCheckExtendedClassInsidePublicMethod2.errors.txt | 4 ++-- .../reference/scopeCheckInsidePublicMethod1.errors.txt | 4 ++-- .../baselines/reference/staticClassMemberError.errors.txt | 4 ++-- tests/baselines/reference/staticVisibility.errors.txt | 8 ++++---- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/baselines/reference/accessInstanceMemberFromStaticMethod01.errors.txt b/tests/baselines/reference/accessInstanceMemberFromStaticMethod01.errors.txt index f1cd943f9ac..0ce9c614618 100644 --- a/tests/baselines/reference/accessInstanceMemberFromStaticMethod01.errors.txt +++ b/tests/baselines/reference/accessInstanceMemberFromStaticMethod01.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/accessInstanceMemberFromStaticMethod01.ts(5,17): error TS2304: Cannot find name 'foo'. +tests/cases/compiler/accessInstanceMemberFromStaticMethod01.ts(5,17): error TS2662: Cannot find name 'foo'. Did you mean the static member 'C.foo'? ==== tests/cases/compiler/accessInstanceMemberFromStaticMethod01.ts (1 errors) ==== @@ -8,6 +8,6 @@ tests/cases/compiler/accessInstanceMemberFromStaticMethod01.ts(5,17): error TS23 bar() { let k = foo; ~~~ -!!! error TS2304: Cannot find name 'foo'. +!!! error TS2662: Cannot find name 'foo'. Did you mean the static member 'C.foo'? } } \ No newline at end of file diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.errors.txt b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.errors.txt index 91cb87dbeb8..378e20f19b8 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.errors.txt +++ b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/scopeCheckExtendedClassInsidePublicMethod2.ts(4,7): error TS2663: Cannot find name 'v'. Did you mean the instance member 'this.v'? -tests/cases/compiler/scopeCheckExtendedClassInsidePublicMethod2.ts(6,7): error TS2304: Cannot find name 's'. +tests/cases/compiler/scopeCheckExtendedClassInsidePublicMethod2.ts(6,7): error TS2662: Cannot find name 's'. Did you mean the static member 'D.s'? ==== tests/cases/compiler/scopeCheckExtendedClassInsidePublicMethod2.ts (2 errors) ==== @@ -12,6 +12,6 @@ tests/cases/compiler/scopeCheckExtendedClassInsidePublicMethod2.ts(6,7): error T this.p = 1; s = 1; ~ -!!! error TS2304: Cannot find name 's'. +!!! error TS2662: Cannot find name 's'. Did you mean the static member 'D.s'? } } \ No newline at end of file diff --git a/tests/baselines/reference/scopeCheckInsidePublicMethod1.errors.txt b/tests/baselines/reference/scopeCheckInsidePublicMethod1.errors.txt index 5c9473a7875..ec93fea7369 100644 --- a/tests/baselines/reference/scopeCheckInsidePublicMethod1.errors.txt +++ b/tests/baselines/reference/scopeCheckInsidePublicMethod1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/scopeCheckInsidePublicMethod1.ts(4,7): error TS2304: Cannot find name 's'. +tests/cases/compiler/scopeCheckInsidePublicMethod1.ts(4,7): error TS2662: Cannot find name 's'. Did you mean the static member 'C.s'? ==== tests/cases/compiler/scopeCheckInsidePublicMethod1.ts (1 errors) ==== @@ -7,6 +7,6 @@ tests/cases/compiler/scopeCheckInsidePublicMethod1.ts(4,7): error TS2304: Cannot public a() { s = 1; // ERR ~ -!!! error TS2304: Cannot find name 's'. +!!! error TS2662: Cannot find name 's'. Did you mean the static member 'C.s'? } } \ No newline at end of file diff --git a/tests/baselines/reference/staticClassMemberError.errors.txt b/tests/baselines/reference/staticClassMemberError.errors.txt index 9483e3387b7..43a2cd6934d 100644 --- a/tests/baselines/reference/staticClassMemberError.errors.txt +++ b/tests/baselines/reference/staticClassMemberError.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/staticClassMemberError.ts(4,3): error TS2304: Cannot find name 's'. +tests/cases/compiler/staticClassMemberError.ts(4,3): error TS2662: Cannot find name 's'. Did you mean the static member 'C.s'? tests/cases/compiler/staticClassMemberError.ts(9,10): error TS2300: Duplicate identifier 'Foo'. tests/cases/compiler/staticClassMemberError.ts(9,10): error TS2391: Function implementation is missing or not immediately following the declaration. tests/cases/compiler/staticClassMemberError.ts(10,7): error TS2300: Duplicate identifier 'Foo'. @@ -10,7 +10,7 @@ tests/cases/compiler/staticClassMemberError.ts(10,7): error TS2300: Duplicate id public a() { s = 1; ~ -!!! error TS2304: Cannot find name 's'. +!!! error TS2662: Cannot find name 's'. Did you mean the static member 'C.s'? } } diff --git a/tests/baselines/reference/staticVisibility.errors.txt b/tests/baselines/reference/staticVisibility.errors.txt index dccad4a2e2b..a92cb7f88cd 100644 --- a/tests/baselines/reference/staticVisibility.errors.txt +++ b/tests/baselines/reference/staticVisibility.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/staticVisibility.ts(10,9): error TS2304: Cannot find name 's'. -tests/cases/compiler/staticVisibility.ts(13,9): error TS2304: Cannot find name 'b'. +tests/cases/compiler/staticVisibility.ts(10,9): error TS2662: Cannot find name 's'. Did you mean the static member 'C1.s'? +tests/cases/compiler/staticVisibility.ts(13,9): error TS2662: Cannot find name 'b'. Did you mean the static member 'C1.b'? tests/cases/compiler/staticVisibility.ts(18,9): error TS2304: Cannot find name 'v'. tests/cases/compiler/staticVisibility.ts(19,14): error TS2339: Property 'p' does not exist on type 'typeof C1'. tests/cases/compiler/staticVisibility.ts(31,12): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. @@ -19,12 +19,12 @@ tests/cases/compiler/staticVisibility.ts(33,29): error TS2304: Cannot find name s = 1; // should be error ~ -!!! error TS2304: Cannot find name 's'. +!!! error TS2662: Cannot find name 's'. Did you mean the static member 'C1.s'? C1.s = 1; // should be ok b(); // should be error ~ -!!! error TS2304: Cannot find name 'b'. +!!! error TS2662: Cannot find name 'b'. Did you mean the static member 'C1.b'? C1.b(); // should be ok } From 2eb73a0d2744b59a0873b2bf8827fda5a1f6cae3 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Thu, 14 Jan 2016 17:36:08 -0800 Subject: [PATCH 163/209] Fix for https://github.com/Microsoft/TypeScript/issues/6428 --- src/compiler/checker.ts | 4 +++- .../declarationEmit_UnknownImport.errors.txt | 15 +++++++++++++ .../declarationEmit_UnknownImport.js | 7 +++++++ .../declarationEmit_UnknownImport2.errors.txt | 21 +++++++++++++++++++ .../declarationEmit_UnknownImport2.js | 8 +++++++ .../compiler/declarationEmit_UnknownImport.ts | 6 ++++++ .../declarationEmit_UnknownImport2.ts | 6 ++++++ 7 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 tests/baselines/reference/declarationEmit_UnknownImport.errors.txt create mode 100644 tests/baselines/reference/declarationEmit_UnknownImport.js create mode 100644 tests/baselines/reference/declarationEmit_UnknownImport2.errors.txt create mode 100644 tests/baselines/reference/declarationEmit_UnknownImport2.js create mode 100644 tests/cases/compiler/declarationEmit_UnknownImport.ts create mode 100644 tests/cases/compiler/declarationEmit_UnknownImport2.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 281468d8420..ededb8d1da1 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2326,7 +2326,9 @@ namespace ts { const firstIdentifier = getFirstIdentifier(internalModuleReference); const importSymbol = resolveName(declaration, firstIdentifier.text, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace, Diagnostics.Cannot_find_name_0, firstIdentifier); - buildVisibleNodeList(importSymbol.declarations); + if (importSymbol) { + buildVisibleNodeList(importSymbol.declarations); + } } }); } diff --git a/tests/baselines/reference/declarationEmit_UnknownImport.errors.txt b/tests/baselines/reference/declarationEmit_UnknownImport.errors.txt new file mode 100644 index 00000000000..2ae0b6a160d --- /dev/null +++ b/tests/baselines/reference/declarationEmit_UnknownImport.errors.txt @@ -0,0 +1,15 @@ +tests/cases/compiler/declarationEmit_UnknownImport.ts(2,1): error TS2304: Cannot find name 'SomeNonExistingName'. +tests/cases/compiler/declarationEmit_UnknownImport.ts(2,14): error TS2503: Cannot find namespace 'SomeNonExistingName'. +tests/cases/compiler/declarationEmit_UnknownImport.ts(2,14): error TS4000: Import declaration 'Foo' is using private name 'SomeNonExistingName'. + + +==== tests/cases/compiler/declarationEmit_UnknownImport.ts (3 errors) ==== + + import Foo = SomeNonExistingName + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'SomeNonExistingName'. + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2503: Cannot find namespace 'SomeNonExistingName'. + ~~~~~~~~~~~~~~~~~~~ +!!! error TS4000: Import declaration 'Foo' is using private name 'SomeNonExistingName'. + export {Foo} \ No newline at end of file diff --git a/tests/baselines/reference/declarationEmit_UnknownImport.js b/tests/baselines/reference/declarationEmit_UnknownImport.js new file mode 100644 index 00000000000..601d2a92c88 --- /dev/null +++ b/tests/baselines/reference/declarationEmit_UnknownImport.js @@ -0,0 +1,7 @@ +//// [declarationEmit_UnknownImport.ts] + +import Foo = SomeNonExistingName +export {Foo} + +//// [declarationEmit_UnknownImport.js] +"use strict"; diff --git a/tests/baselines/reference/declarationEmit_UnknownImport2.errors.txt b/tests/baselines/reference/declarationEmit_UnknownImport2.errors.txt new file mode 100644 index 00000000000..0e0bf6690e4 --- /dev/null +++ b/tests/baselines/reference/declarationEmit_UnknownImport2.errors.txt @@ -0,0 +1,21 @@ +tests/cases/compiler/declarationEmit_UnknownImport2.ts(2,1): error TS2304: Cannot find name 'From'. +tests/cases/compiler/declarationEmit_UnknownImport2.ts(2,12): error TS1005: '=' expected. +tests/cases/compiler/declarationEmit_UnknownImport2.ts(2,12): error TS2503: Cannot find namespace 'From'. +tests/cases/compiler/declarationEmit_UnknownImport2.ts(2,12): error TS4000: Import declaration 'Foo' is using private name 'From'. +tests/cases/compiler/declarationEmit_UnknownImport2.ts(2,17): error TS1005: ';' expected. + + +==== tests/cases/compiler/declarationEmit_UnknownImport2.ts (5 errors) ==== + + import Foo From './Foo'; // Syntax error + ~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'From'. + ~~~~ +!!! error TS1005: '=' expected. + ~~~~ +!!! error TS2503: Cannot find namespace 'From'. + ~~~~ +!!! error TS4000: Import declaration 'Foo' is using private name 'From'. + ~~~~~~~ +!!! error TS1005: ';' expected. + export default Foo \ No newline at end of file diff --git a/tests/baselines/reference/declarationEmit_UnknownImport2.js b/tests/baselines/reference/declarationEmit_UnknownImport2.js new file mode 100644 index 00000000000..213b4fc7369 --- /dev/null +++ b/tests/baselines/reference/declarationEmit_UnknownImport2.js @@ -0,0 +1,8 @@ +//// [declarationEmit_UnknownImport2.ts] + +import Foo From './Foo'; // Syntax error +export default Foo + +//// [declarationEmit_UnknownImport2.js] +"use strict"; +'./Foo'; // Syntax error diff --git a/tests/cases/compiler/declarationEmit_UnknownImport.ts b/tests/cases/compiler/declarationEmit_UnknownImport.ts new file mode 100644 index 00000000000..9f6344322bc --- /dev/null +++ b/tests/cases/compiler/declarationEmit_UnknownImport.ts @@ -0,0 +1,6 @@ +// @target: es5 +// @module: commonjs +// @declaration: true + +import Foo = SomeNonExistingName +export {Foo} \ No newline at end of file diff --git a/tests/cases/compiler/declarationEmit_UnknownImport2.ts b/tests/cases/compiler/declarationEmit_UnknownImport2.ts new file mode 100644 index 00000000000..035d1d860c5 --- /dev/null +++ b/tests/cases/compiler/declarationEmit_UnknownImport2.ts @@ -0,0 +1,6 @@ +// @target: es5 +// @module: commonjs +// @declaration: true + +import Foo From './Foo'; // Syntax error +export default Foo \ No newline at end of file From fb1ad3231c20c0223245939c488b7f5cfe5c68d8 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Thu, 14 Jan 2016 17:51:34 -0800 Subject: [PATCH 164/209] Move emit helper flags to binder. Fixes #6113 --- src/compiler/binder.ts | 88 +++++++++++++++++-- src/compiler/checker.ts | 49 +---------- src/compiler/emitter.ts | 8 +- src/compiler/types.ts | 13 +-- .../reference/asyncFunctionsAcrossFiles.js | 57 ++++++++++++ .../asyncFunctionsAcrossFiles.symbols | 32 +++++++ .../reference/asyncFunctionsAcrossFiles.types | 40 +++++++++ .../reference/classExtendsAcrossFiles.js | 71 +++++++++++++++ .../reference/classExtendsAcrossFiles.symbols | 46 ++++++++++ .../reference/classExtendsAcrossFiles.types | 52 +++++++++++ .../compiler/asyncFunctionsAcrossFiles.ts | 15 ++++ .../cases/compiler/classExtendsAcrossFiles.ts | 20 +++++ 12 files changed, 428 insertions(+), 63 deletions(-) create mode 100644 tests/baselines/reference/asyncFunctionsAcrossFiles.js create mode 100644 tests/baselines/reference/asyncFunctionsAcrossFiles.symbols create mode 100644 tests/baselines/reference/asyncFunctionsAcrossFiles.types create mode 100644 tests/baselines/reference/classExtendsAcrossFiles.js create mode 100644 tests/baselines/reference/classExtendsAcrossFiles.symbols create mode 100644 tests/baselines/reference/classExtendsAcrossFiles.types create mode 100644 tests/cases/compiler/asyncFunctionsAcrossFiles.ts create mode 100644 tests/cases/compiler/classExtendsAcrossFiles.ts diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index f7108c5d2d7..1c1238b1479 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -104,6 +104,7 @@ namespace ts { function createBinder(): (file: SourceFile, options: CompilerOptions) => void { let file: SourceFile; let options: CompilerOptions; + let languageVersion: ScriptTarget; let parent: Node; let container: Node; let blockScopeContainer: Node; @@ -117,6 +118,12 @@ namespace ts { let labelIndexMap: Map; let implicitLabels: number[]; + // state used for emit helpers + let hasClassExtends: boolean; + let hasAsyncFunctions: boolean; + let hasDecorators: boolean; + let hasParameterDecorators: boolean; + // If this file is an external module, then it is automatically in strict-mode according to // ES6. If it is not an external module, then we'll determine if it is in strict mode or // not depending on if we see "use strict" in certain places (or if we hit a class/namespace). @@ -129,6 +136,7 @@ namespace ts { function bindSourceFile(f: SourceFile, opts: CompilerOptions) { file = f; options = opts; + languageVersion = options.target || ScriptTarget.ES3; inStrictMode = !!file.externalModuleIndicator; classifiableNames = {}; Symbol = objectAllocator.getSymbolConstructor(); @@ -141,6 +149,7 @@ namespace ts { file = undefined; options = undefined; + languageVersion = undefined; parent = undefined; container = undefined; blockScopeContainer = undefined; @@ -150,6 +159,10 @@ namespace ts { labelStack = undefined; labelIndexMap = undefined; implicitLabels = undefined; + hasClassExtends = false; + hasAsyncFunctions = false; + hasDecorators = false; + hasParameterDecorators = false; } return bindSourceFile; @@ -423,6 +436,9 @@ namespace ts { // reset all reachability check related flags on node (for incremental scenarios) flags &= ~NodeFlags.ReachabilityCheckFlags; + // reset all emit helper flags on node (for incremental scenarios) + flags &= ~NodeFlags.EmitHelperFlags; + if (kind === SyntaxKind.InterfaceDeclaration) { seenThisKeyword = false; } @@ -453,6 +469,21 @@ namespace ts { flags = seenThisKeyword ? flags | NodeFlags.ContainsThis : flags & ~NodeFlags.ContainsThis; } + if (kind === SyntaxKind.SourceFile) { + if (hasClassExtends) { + flags |= NodeFlags.HasClassExtends; + } + if (hasDecorators) { + flags |= NodeFlags.HasDecorators; + } + if (hasParameterDecorators) { + flags |= NodeFlags.HasParamDecorators; + } + if (hasAsyncFunctions) { + flags |= NodeFlags.HasAsyncFunctions; + } + } + node.flags = flags; if (saveState) { @@ -1246,8 +1277,7 @@ namespace ts { return bindPropertyOrMethodOrAccessor(node, SymbolFlags.Method | ((node).questionToken ? SymbolFlags.Optional : SymbolFlags.None), isObjectLiteralMethod(node) ? SymbolFlags.PropertyExcludes : SymbolFlags.MethodExcludes); case SyntaxKind.FunctionDeclaration: - checkStrictModeFunctionName(node); - return declareSymbolAndAddToSymbolTable(node, SymbolFlags.Function, SymbolFlags.FunctionExcludes); + return bindFunctionDeclaration(node); case SyntaxKind.Constructor: return declareSymbolAndAddToSymbolTable(node, SymbolFlags.Constructor, /*symbolExcludes:*/ SymbolFlags.None); case SyntaxKind.GetAccessor: @@ -1263,9 +1293,7 @@ namespace ts { return bindObjectLiteralExpression(node); case SyntaxKind.FunctionExpression: case SyntaxKind.ArrowFunction: - checkStrictModeFunctionName(node); - const bindingName = (node).name ? (node).name.text : "__function"; - return bindAnonymousDeclaration(node, SymbolFlags.Function, bindingName); + return bindFunctionExpression(node); case SyntaxKind.CallExpression: if (isInJavaScriptFile(node)) { @@ -1415,6 +1443,16 @@ namespace ts { } function bindClassLikeDeclaration(node: ClassLikeDeclaration) { + if (!isDeclarationFile(file) && !isInAmbientContext(node)) { + if (getClassExtendsHeritageClauseElement(node) !== undefined && + languageVersion < ScriptTarget.ES6) { + hasClassExtends = true; + } + if (nodeIsDecorated(node)) { + hasDecorators = true; + } + } + if (node.kind === SyntaxKind.ClassDeclaration) { bindBlockScopedDeclaration(node, SymbolFlags.Class, SymbolFlags.ClassExcludes); } @@ -1484,6 +1522,14 @@ namespace ts { } function bindParameter(node: ParameterDeclaration) { + if (nodeIsDecorated(node) && + nodeCanBeDecorated(node) && + !isDeclarationFile(file) && + !isInAmbientContext(node)) { + hasDecorators = true; + hasParameterDecorators = true; + } + if (inStrictMode) { // It is a SyntaxError if the identifier eval or arguments appears within a FormalParameterList of a // strict mode FunctionLikeDeclaration or FunctionExpression(13.1) @@ -1505,7 +1551,39 @@ namespace ts { } } + function bindFunctionDeclaration(node: FunctionDeclaration) { + if (!isDeclarationFile(file) && !isInAmbientContext(node)) { + if (isAsyncFunctionLike(node)) { + hasAsyncFunctions = true; + } + } + + checkStrictModeFunctionName(node); + return declareSymbolAndAddToSymbolTable(node, SymbolFlags.Function, SymbolFlags.FunctionExcludes); + } + + function bindFunctionExpression(node: FunctionExpression) { + if (!isDeclarationFile(file) && !isInAmbientContext(node)) { + if (isAsyncFunctionLike(node)) { + hasAsyncFunctions = true; + } + } + + checkStrictModeFunctionName(node); + const bindingName = (node).name ? (node).name.text : "__function"; + return bindAnonymousDeclaration(node, SymbolFlags.Function, bindingName); + } + function bindPropertyOrMethodOrAccessor(node: Declaration, symbolFlags: SymbolFlags, symbolExcludes: SymbolFlags) { + if (!isDeclarationFile(file) && !isInAmbientContext(node)) { + if (isAsyncFunctionLike(node)) { + hasAsyncFunctions = true; + } + if (nodeIsDecorated(node) && nodeCanBeDecorated(node)) { + hasDecorators = true; + } + } + return hasDynamicName(node) ? bindAnonymousDeclaration(node, symbolFlags, "__computed") : declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes); diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 281468d8420..a2d1292c513 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -174,11 +174,6 @@ namespace ts { const unionTypes: Map = {}; const intersectionTypes: Map = {}; const stringLiteralTypes: Map = {}; - let emitExtends = false; - let emitDecorate = false; - let emitParam = false; - let emitAwaiter = false; - const emitGenerator = false; const resolutionTargets: TypeSystemEntity[] = []; const resolutionResults: boolean[] = []; @@ -444,7 +439,7 @@ namespace ts { * Get symbols that represent parameter-property-declaration as parameter and as property declaration * @param parameter a parameterDeclaration node * @param parameterName a name of the parameter to get the symbols for. - * @return a tuple of two symbols + * @return a tuple of two symbols */ function getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: string): [Symbol, Symbol] { const constructoDeclaration = parameter.parent; @@ -10220,11 +10215,6 @@ namespace ts { return anyFunctionType; } - const isAsync = isAsyncFunctionLike(node); - if (isAsync) { - emitAwaiter = true; - } - const links = getNodeLinks(node); const type = getTypeOfSymbol(node.symbol); const contextSensitive = isContextSensitive(node); @@ -10273,10 +10263,6 @@ namespace ts { Debug.assert(node.kind !== SyntaxKind.MethodDeclaration || isObjectLiteralMethod(node)); const isAsync = isAsyncFunctionLike(node); - if (isAsync) { - emitAwaiter = true; - } - const returnOrPromisedType = node.type && (isAsync ? checkAsyncFunctionReturnType(node) : getTypeFromTypeNode(node.type)); if (!node.asteriskToken) { // return is not necessary in the body of generators @@ -12413,11 +12399,6 @@ namespace ts { } } - emitDecorate = true; - if (node.kind === SyntaxKind.Parameter) { - emitParam = true; - } - forEach(node.decorators, checkDecorator); } @@ -12435,9 +12416,6 @@ namespace ts { checkDecorators(node); checkSignatureDeclaration(node); const isAsync = isAsyncFunctionLike(node); - if (isAsync) { - emitAwaiter = true; - } // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including @@ -13568,7 +13546,6 @@ namespace ts { const baseTypeNode = getClassExtendsHeritageClauseElement(node); if (baseTypeNode) { - emitExtends = emitExtends || !isInAmbientContext(node); const baseTypes = getBaseTypes(type); if (baseTypes.length && produceDiagnostics) { const baseType = baseTypes[0]; @@ -14648,10 +14625,6 @@ namespace ts { // Grammar checking checkGrammarSourceFile(node); - emitExtends = false; - emitDecorate = false; - emitParam = false; - emitAwaiter = false; potentialThisCollisions.length = 0; deferredNodes = []; @@ -14668,26 +14641,6 @@ namespace ts { potentialThisCollisions.length = 0; } - if (emitExtends) { - links.flags |= NodeCheckFlags.EmitExtends; - } - - if (emitDecorate) { - links.flags |= NodeCheckFlags.EmitDecorate; - } - - if (emitParam) { - links.flags |= NodeCheckFlags.EmitParam; - } - - if (emitAwaiter) { - links.flags |= NodeCheckFlags.EmitAwaiter; - } - - if (emitGenerator || (emitAwaiter && languageVersion < ScriptTarget.ES6)) { - links.flags |= NodeCheckFlags.EmitGenerator; - } - links.flags |= NodeCheckFlags.TypeChecked; } } diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index c751693dfad..1ebbbe74ab0 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -7353,12 +7353,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi if (!compilerOptions.noEmitHelpers) { // Only Emit __extends function when target ES5. // For target ES6 and above, we can emit classDeclaration as is. - if ((languageVersion < ScriptTarget.ES6) && (!extendsEmitted && resolver.getNodeCheckFlags(node) & NodeCheckFlags.EmitExtends)) { + if ((languageVersion < ScriptTarget.ES6) && (!extendsEmitted && node.flags & NodeFlags.HasClassExtends)) { writeLines(extendsHelper); extendsEmitted = true; } - if (!decorateEmitted && resolver.getNodeCheckFlags(node) & NodeCheckFlags.EmitDecorate) { + if (!decorateEmitted && node.flags & NodeFlags.HasDecorators) { writeLines(decorateHelper); if (compilerOptions.emitDecoratorMetadata) { writeLines(metadataHelper); @@ -7366,12 +7366,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi decorateEmitted = true; } - if (!paramEmitted && resolver.getNodeCheckFlags(node) & NodeCheckFlags.EmitParam) { + if (!paramEmitted && node.flags & NodeFlags.HasParamDecorators) { writeLines(paramHelper); paramEmitted = true; } - if (!awaiterEmitted && resolver.getNodeCheckFlags(node) & NodeCheckFlags.EmitAwaiter) { + if (!awaiterEmitted && node.flags & NodeFlags.HasAsyncFunctions) { writeLines(awaiterHelper); awaiterEmitted = true; } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index ce4ffe05f92..a4632bed3b9 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -389,11 +389,17 @@ namespace ts { ContainsThis = 1 << 18, // Interface contains references to "this" HasImplicitReturn = 1 << 19, // If function implicitly returns on one of codepaths (initialized by binding) HasExplicitReturn = 1 << 20, // If function has explicit reachable return on one of codepaths (initialized by binding) + HasClassExtends = 1 << 21, // If the file has a non-ambient class with an extends clause in ES5 or lower (initialized by binding) + HasDecorators = 1 << 22, // If the file has decorators (initialized by binding) + HasParamDecorators = 1 << 23, // If the file has parameter decorators (initialized by binding) + HasAsyncFunctions = 1 << 24, // If the file has async functions (initialized by binding) + Modifier = Export | Ambient | Public | Private | Protected | Static | Abstract | Default | Async, AccessibilityModifier = Public | Private | Protected, BlockScoped = Let | Const, - ReachabilityCheckFlags = HasImplicitReturn | HasExplicitReturn + ReachabilityCheckFlags = HasImplicitReturn | HasExplicitReturn, + EmitHelperFlags = HasClassExtends | HasDecorators | HasParamDecorators | HasAsyncFunctions, } /* @internal */ @@ -2044,11 +2050,6 @@ namespace ts { TypeChecked = 0x00000001, // Node has been type checked LexicalThis = 0x00000002, // Lexical 'this' reference CaptureThis = 0x00000004, // Lexical 'this' used in body - EmitExtends = 0x00000008, // Emit __extends - EmitDecorate = 0x00000010, // Emit __decorate - EmitParam = 0x00000020, // Emit __param helper for decorators - EmitAwaiter = 0x00000040, // Emit __awaiter - EmitGenerator = 0x00000080, // Emit __generator SuperInstance = 0x00000100, // Instance 'super' reference SuperStatic = 0x00000200, // Static 'super' reference ContextChecked = 0x00000400, // Contextual types have been assigned diff --git a/tests/baselines/reference/asyncFunctionsAcrossFiles.js b/tests/baselines/reference/asyncFunctionsAcrossFiles.js new file mode 100644 index 00000000000..56ff9a42b7c --- /dev/null +++ b/tests/baselines/reference/asyncFunctionsAcrossFiles.js @@ -0,0 +1,57 @@ +//// [tests/cases/compiler/asyncFunctionsAcrossFiles.ts] //// + +//// [a.ts] +import { b } from './b'; +export const a = { + f: async () => { + await b.f(); + } +}; +//// [b.ts] +import { a } from './a'; +export const b = { + f: async () => { + await a.f(); + } +}; + +//// [b.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) { + return new Promise(function (resolve, reject) { + generator = generator.call(thisArg, _arguments); + function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); } + function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } + function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } + function step(verb, value) { + var result = generator[verb](value); + result.done ? resolve(result.value) : cast(result.value).then(onfulfill, onreject); + } + step("next", void 0); + }); +}; +import { a } from './a'; +export const b = { + f: () => __awaiter(this, void 0, Promise, function* () { + yield a.f(); + }) +}; +//// [a.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) { + return new Promise(function (resolve, reject) { + generator = generator.call(thisArg, _arguments); + function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); } + function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } + function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } + function step(verb, value) { + var result = generator[verb](value); + result.done ? resolve(result.value) : cast(result.value).then(onfulfill, onreject); + } + step("next", void 0); + }); +}; +import { b } from './b'; +export const a = { + f: () => __awaiter(this, void 0, Promise, function* () { + yield b.f(); + }) +}; diff --git a/tests/baselines/reference/asyncFunctionsAcrossFiles.symbols b/tests/baselines/reference/asyncFunctionsAcrossFiles.symbols new file mode 100644 index 00000000000..2e9c52d5d91 --- /dev/null +++ b/tests/baselines/reference/asyncFunctionsAcrossFiles.symbols @@ -0,0 +1,32 @@ +=== tests/cases/compiler/a.ts === +import { b } from './b'; +>b : Symbol(b, Decl(a.ts, 0, 8)) + +export const a = { +>a : Symbol(a, Decl(a.ts, 1, 12)) + + f: async () => { +>f : Symbol(f, Decl(a.ts, 1, 18)) + + await b.f(); +>b.f : Symbol(f, Decl(b.ts, 1, 18)) +>b : Symbol(b, Decl(a.ts, 0, 8)) +>f : Symbol(f, Decl(b.ts, 1, 18)) + } +}; +=== tests/cases/compiler/b.ts === +import { a } from './a'; +>a : Symbol(a, Decl(b.ts, 0, 8)) + +export const b = { +>b : Symbol(b, Decl(b.ts, 1, 12)) + + f: async () => { +>f : Symbol(f, Decl(b.ts, 1, 18)) + + await a.f(); +>a.f : Symbol(f, Decl(a.ts, 1, 18)) +>a : Symbol(a, Decl(b.ts, 0, 8)) +>f : Symbol(f, Decl(a.ts, 1, 18)) + } +}; diff --git a/tests/baselines/reference/asyncFunctionsAcrossFiles.types b/tests/baselines/reference/asyncFunctionsAcrossFiles.types new file mode 100644 index 00000000000..0b946141541 --- /dev/null +++ b/tests/baselines/reference/asyncFunctionsAcrossFiles.types @@ -0,0 +1,40 @@ +=== tests/cases/compiler/a.ts === +import { b } from './b'; +>b : { f: () => Promise; } + +export const a = { +>a : { f: () => Promise; } +>{ f: async () => { await b.f(); }} : { f: () => Promise; } + + f: async () => { +>f : () => Promise +>async () => { await b.f(); } : () => Promise + + await b.f(); +>await b.f() : void +>b.f() : Promise +>b.f : () => Promise +>b : { f: () => Promise; } +>f : () => Promise + } +}; +=== tests/cases/compiler/b.ts === +import { a } from './a'; +>a : { f: () => Promise; } + +export const b = { +>b : { f: () => Promise; } +>{ f: async () => { await a.f(); }} : { f: () => Promise; } + + f: async () => { +>f : () => Promise +>async () => { await a.f(); } : () => Promise + + await a.f(); +>await a.f() : void +>a.f() : Promise +>a.f : () => Promise +>a : { f: () => Promise; } +>f : () => Promise + } +}; diff --git a/tests/baselines/reference/classExtendsAcrossFiles.js b/tests/baselines/reference/classExtendsAcrossFiles.js new file mode 100644 index 00000000000..b533b880036 --- /dev/null +++ b/tests/baselines/reference/classExtendsAcrossFiles.js @@ -0,0 +1,71 @@ +//// [tests/cases/compiler/classExtendsAcrossFiles.ts] //// + +//// [a.ts] +import { b } from './b'; +export const a = { + f: () => { + class A { } + class B extends A { } + b.f(); + } +}; +//// [b.ts] +import { a } from './a'; +export const b = { + f: () => { + class A { } + class B extends A { } + a.f(); + } +}; + +//// [b.js] +"use strict"; +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var a_1 = require('./a'); +exports.b = { + f: function () { + var A = (function () { + function A() { + } + return A; + }()); + var B = (function (_super) { + __extends(B, _super); + function B() { + _super.apply(this, arguments); + } + return B; + }(A)); + a_1.a.f(); + } +}; +//// [a.js] +"use strict"; +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var b_1 = require('./b'); +exports.a = { + f: function () { + var A = (function () { + function A() { + } + return A; + }()); + var B = (function (_super) { + __extends(B, _super); + function B() { + _super.apply(this, arguments); + } + return B; + }(A)); + b_1.b.f(); + } +}; diff --git a/tests/baselines/reference/classExtendsAcrossFiles.symbols b/tests/baselines/reference/classExtendsAcrossFiles.symbols new file mode 100644 index 00000000000..cf81c923912 --- /dev/null +++ b/tests/baselines/reference/classExtendsAcrossFiles.symbols @@ -0,0 +1,46 @@ +=== tests/cases/compiler/a.ts === +import { b } from './b'; +>b : Symbol(b, Decl(a.ts, 0, 8)) + +export const a = { +>a : Symbol(a, Decl(a.ts, 1, 12)) + + f: () => { +>f : Symbol(f, Decl(a.ts, 1, 18)) + + class A { } +>A : Symbol(A, Decl(a.ts, 2, 14)) + + class B extends A { } +>B : Symbol(B, Decl(a.ts, 3, 19)) +>A : Symbol(A, Decl(a.ts, 2, 14)) + + b.f(); +>b.f : Symbol(f, Decl(b.ts, 1, 18)) +>b : Symbol(b, Decl(a.ts, 0, 8)) +>f : Symbol(f, Decl(b.ts, 1, 18)) + } +}; +=== tests/cases/compiler/b.ts === +import { a } from './a'; +>a : Symbol(a, Decl(b.ts, 0, 8)) + +export const b = { +>b : Symbol(b, Decl(b.ts, 1, 12)) + + f: () => { +>f : Symbol(f, Decl(b.ts, 1, 18)) + + class A { } +>A : Symbol(A, Decl(b.ts, 2, 14)) + + class B extends A { } +>B : Symbol(B, Decl(b.ts, 3, 19)) +>A : Symbol(A, Decl(b.ts, 2, 14)) + + a.f(); +>a.f : Symbol(f, Decl(a.ts, 1, 18)) +>a : Symbol(a, Decl(b.ts, 0, 8)) +>f : Symbol(f, Decl(a.ts, 1, 18)) + } +}; diff --git a/tests/baselines/reference/classExtendsAcrossFiles.types b/tests/baselines/reference/classExtendsAcrossFiles.types new file mode 100644 index 00000000000..fe3427ba043 --- /dev/null +++ b/tests/baselines/reference/classExtendsAcrossFiles.types @@ -0,0 +1,52 @@ +=== tests/cases/compiler/a.ts === +import { b } from './b'; +>b : { f: () => void; } + +export const a = { +>a : { f: () => void; } +>{ f: () => { class A { } class B extends A { } b.f(); }} : { f: () => void; } + + f: () => { +>f : () => void +>() => { class A { } class B extends A { } b.f(); } : () => void + + class A { } +>A : A + + class B extends A { } +>B : B +>A : A + + b.f(); +>b.f() : void +>b.f : () => void +>b : { f: () => void; } +>f : () => void + } +}; +=== tests/cases/compiler/b.ts === +import { a } from './a'; +>a : { f: () => void; } + +export const b = { +>b : { f: () => void; } +>{ f: () => { class A { } class B extends A { } a.f(); }} : { f: () => void; } + + f: () => { +>f : () => void +>() => { class A { } class B extends A { } a.f(); } : () => void + + class A { } +>A : A + + class B extends A { } +>B : B +>A : A + + a.f(); +>a.f() : void +>a.f : () => void +>a : { f: () => void; } +>f : () => void + } +}; diff --git a/tests/cases/compiler/asyncFunctionsAcrossFiles.ts b/tests/cases/compiler/asyncFunctionsAcrossFiles.ts new file mode 100644 index 00000000000..c5f6a220fd8 --- /dev/null +++ b/tests/cases/compiler/asyncFunctionsAcrossFiles.ts @@ -0,0 +1,15 @@ +// @target: es6 +// @filename: a.ts +import { b } from './b'; +export const a = { + f: async () => { + await b.f(); + } +}; +// @filename: b.ts +import { a } from './a'; +export const b = { + f: async () => { + await a.f(); + } +}; \ No newline at end of file diff --git a/tests/cases/compiler/classExtendsAcrossFiles.ts b/tests/cases/compiler/classExtendsAcrossFiles.ts new file mode 100644 index 00000000000..14e227647e7 --- /dev/null +++ b/tests/cases/compiler/classExtendsAcrossFiles.ts @@ -0,0 +1,20 @@ +// @target: es5 +// @module: commonjs +// @filename: a.ts +import { b } from './b'; +export const a = { + f: () => { + class A { } + class B extends A { } + b.f(); + } +}; +// @filename: b.ts +import { a } from './a'; +export const b = { + f: () => { + class A { } + class B extends A { } + a.f(); + } +}; \ No newline at end of file From 1d78bafa01bd934588b8f80c75cd13b0b66754d8 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Thu, 14 Jan 2016 18:01:20 -0800 Subject: [PATCH 165/209] Removed unneeded language version check. --- src/compiler/binder.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 1c1238b1479..3127561feaa 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -104,7 +104,6 @@ namespace ts { function createBinder(): (file: SourceFile, options: CompilerOptions) => void { let file: SourceFile; let options: CompilerOptions; - let languageVersion: ScriptTarget; let parent: Node; let container: Node; let blockScopeContainer: Node; @@ -136,7 +135,6 @@ namespace ts { function bindSourceFile(f: SourceFile, opts: CompilerOptions) { file = f; options = opts; - languageVersion = options.target || ScriptTarget.ES3; inStrictMode = !!file.externalModuleIndicator; classifiableNames = {}; Symbol = objectAllocator.getSymbolConstructor(); @@ -149,7 +147,6 @@ namespace ts { file = undefined; options = undefined; - languageVersion = undefined; parent = undefined; container = undefined; blockScopeContainer = undefined; @@ -1444,8 +1441,7 @@ namespace ts { function bindClassLikeDeclaration(node: ClassLikeDeclaration) { if (!isDeclarationFile(file) && !isInAmbientContext(node)) { - if (getClassExtendsHeritageClauseElement(node) !== undefined && - languageVersion < ScriptTarget.ES6) { + if (getClassExtendsHeritageClauseElement(node) !== undefined) { hasClassExtends = true; } if (nodeIsDecorated(node)) { From 0a0c3e0cbd574f6efc3f0326294183cfe960a2d7 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Thu, 14 Jan 2016 23:20:21 -0800 Subject: [PATCH 166/209] do not crash if initializer in For-statement is missing --- src/compiler/emitter.ts | 3 +- .../reference/capturedLetConstInLoop11.js | 35 +++++++++++++++++++ .../capturedLetConstInLoop11.symbols | 24 +++++++++++++ .../reference/capturedLetConstInLoop11.types | 29 +++++++++++++++ .../reference/capturedLetConstInLoop11_ES6.js | 28 +++++++++++++++ .../capturedLetConstInLoop11_ES6.symbols | 24 +++++++++++++ .../capturedLetConstInLoop11_ES6.types | 29 +++++++++++++++ .../compiler/capturedLetConstInLoop11.ts | 13 +++++++ .../compiler/capturedLetConstInLoop11_ES6.ts | 14 ++++++++ 9 files changed, 198 insertions(+), 1 deletion(-) create mode 100644 tests/baselines/reference/capturedLetConstInLoop11.js create mode 100644 tests/baselines/reference/capturedLetConstInLoop11.symbols create mode 100644 tests/baselines/reference/capturedLetConstInLoop11.types create mode 100644 tests/baselines/reference/capturedLetConstInLoop11_ES6.js create mode 100644 tests/baselines/reference/capturedLetConstInLoop11_ES6.symbols create mode 100644 tests/baselines/reference/capturedLetConstInLoop11_ES6.types create mode 100644 tests/cases/compiler/capturedLetConstInLoop11.ts create mode 100644 tests/cases/compiler/capturedLetConstInLoop11_ES6.ts diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index c751693dfad..ea0330a23b9 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -2886,7 +2886,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi case SyntaxKind.ForStatement: case SyntaxKind.ForInStatement: case SyntaxKind.ForOfStatement: - if ((node).initializer.kind === SyntaxKind.VariableDeclarationList) { + const initializer = (node).initializer; + if (initializer && initializer.kind === SyntaxKind.VariableDeclarationList) { loopInitializer = (node).initializer; } break; diff --git a/tests/baselines/reference/capturedLetConstInLoop11.js b/tests/baselines/reference/capturedLetConstInLoop11.js new file mode 100644 index 00000000000..fa295739d02 --- /dev/null +++ b/tests/baselines/reference/capturedLetConstInLoop11.js @@ -0,0 +1,35 @@ +//// [capturedLetConstInLoop11.ts] +for (;;) { + let x = 1; + () => x; +} + +function foo() { + for (;;) { + const a = 0; + switch(a) { + case 0: return () => a; + } + } +} + +//// [capturedLetConstInLoop11.js] +var _loop_1 = function() { + var x = 1; + (function () { return x; }); +}; +for (;;) { + _loop_1(); +} +function foo() { + var _loop_2 = function() { + var a = 0; + switch (a) { + case 0: return { value: function () { return a; } }; + } + }; + for (;;) { + var state_2 = _loop_2(); + if (typeof state_2 === "object") return state_2.value + } +} diff --git a/tests/baselines/reference/capturedLetConstInLoop11.symbols b/tests/baselines/reference/capturedLetConstInLoop11.symbols new file mode 100644 index 00000000000..2e242906b73 --- /dev/null +++ b/tests/baselines/reference/capturedLetConstInLoop11.symbols @@ -0,0 +1,24 @@ +=== tests/cases/compiler/capturedLetConstInLoop11.ts === +for (;;) { + let x = 1; +>x : Symbol(x, Decl(capturedLetConstInLoop11.ts, 1, 7)) + + () => x; +>x : Symbol(x, Decl(capturedLetConstInLoop11.ts, 1, 7)) +} + +function foo() { +>foo : Symbol(foo, Decl(capturedLetConstInLoop11.ts, 3, 1)) + + for (;;) { + const a = 0; +>a : Symbol(a, Decl(capturedLetConstInLoop11.ts, 7, 13)) + + switch(a) { +>a : Symbol(a, Decl(capturedLetConstInLoop11.ts, 7, 13)) + + case 0: return () => a; +>a : Symbol(a, Decl(capturedLetConstInLoop11.ts, 7, 13)) + } + } +} diff --git a/tests/baselines/reference/capturedLetConstInLoop11.types b/tests/baselines/reference/capturedLetConstInLoop11.types new file mode 100644 index 00000000000..93e18f2cb27 --- /dev/null +++ b/tests/baselines/reference/capturedLetConstInLoop11.types @@ -0,0 +1,29 @@ +=== tests/cases/compiler/capturedLetConstInLoop11.ts === +for (;;) { + let x = 1; +>x : number +>1 : number + + () => x; +>() => x : () => number +>x : number +} + +function foo() { +>foo : () => () => number + + for (;;) { + const a = 0; +>a : number +>0 : number + + switch(a) { +>a : number + + case 0: return () => a; +>0 : number +>() => a : () => number +>a : number + } + } +} diff --git a/tests/baselines/reference/capturedLetConstInLoop11_ES6.js b/tests/baselines/reference/capturedLetConstInLoop11_ES6.js new file mode 100644 index 00000000000..49f6e9f5214 --- /dev/null +++ b/tests/baselines/reference/capturedLetConstInLoop11_ES6.js @@ -0,0 +1,28 @@ +//// [capturedLetConstInLoop11_ES6.ts] +for (;;) { + let x = 1; + () => x; +} + +function foo() { + for (;;) { + const a = 0; + switch(a) { + case 0: return () => a; + } + } +} + +//// [capturedLetConstInLoop11_ES6.js] +for (;;) { + let x = 1; + (() => x); +} +function foo() { + for (;;) { + const a = 0; + switch (a) { + case 0: return () => a; + } + } +} diff --git a/tests/baselines/reference/capturedLetConstInLoop11_ES6.symbols b/tests/baselines/reference/capturedLetConstInLoop11_ES6.symbols new file mode 100644 index 00000000000..6079bf490a3 --- /dev/null +++ b/tests/baselines/reference/capturedLetConstInLoop11_ES6.symbols @@ -0,0 +1,24 @@ +=== tests/cases/compiler/capturedLetConstInLoop11_ES6.ts === +for (;;) { + let x = 1; +>x : Symbol(x, Decl(capturedLetConstInLoop11_ES6.ts, 1, 7)) + + () => x; +>x : Symbol(x, Decl(capturedLetConstInLoop11_ES6.ts, 1, 7)) +} + +function foo() { +>foo : Symbol(foo, Decl(capturedLetConstInLoop11_ES6.ts, 3, 1)) + + for (;;) { + const a = 0; +>a : Symbol(a, Decl(capturedLetConstInLoop11_ES6.ts, 7, 13)) + + switch(a) { +>a : Symbol(a, Decl(capturedLetConstInLoop11_ES6.ts, 7, 13)) + + case 0: return () => a; +>a : Symbol(a, Decl(capturedLetConstInLoop11_ES6.ts, 7, 13)) + } + } +} diff --git a/tests/baselines/reference/capturedLetConstInLoop11_ES6.types b/tests/baselines/reference/capturedLetConstInLoop11_ES6.types new file mode 100644 index 00000000000..de75d5d1511 --- /dev/null +++ b/tests/baselines/reference/capturedLetConstInLoop11_ES6.types @@ -0,0 +1,29 @@ +=== tests/cases/compiler/capturedLetConstInLoop11_ES6.ts === +for (;;) { + let x = 1; +>x : number +>1 : number + + () => x; +>() => x : () => number +>x : number +} + +function foo() { +>foo : () => () => number + + for (;;) { + const a = 0; +>a : number +>0 : number + + switch(a) { +>a : number + + case 0: return () => a; +>0 : number +>() => a : () => number +>a : number + } + } +} diff --git a/tests/cases/compiler/capturedLetConstInLoop11.ts b/tests/cases/compiler/capturedLetConstInLoop11.ts new file mode 100644 index 00000000000..bda0cec9d69 --- /dev/null +++ b/tests/cases/compiler/capturedLetConstInLoop11.ts @@ -0,0 +1,13 @@ +for (;;) { + let x = 1; + () => x; +} + +function foo() { + for (;;) { + const a = 0; + switch(a) { + case 0: return () => a; + } + } +} \ No newline at end of file diff --git a/tests/cases/compiler/capturedLetConstInLoop11_ES6.ts b/tests/cases/compiler/capturedLetConstInLoop11_ES6.ts new file mode 100644 index 00000000000..24005ed4833 --- /dev/null +++ b/tests/cases/compiler/capturedLetConstInLoop11_ES6.ts @@ -0,0 +1,14 @@ +// @target: ES6 +for (;;) { + let x = 1; + () => x; +} + +function foo() { + for (;;) { + const a = 0; + switch(a) { + case 0: return () => a; + } + } +} \ No newline at end of file From 7079de8b93fcc87021cf45b446285739d861beb1 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Fri, 15 Jan 2016 12:40:34 -0800 Subject: [PATCH 167/209] Updated version of __awaiter. Fixes #5941. --- src/compiler/emitter.ts | 17 ++++++----------- .../reference/asyncAwaitIsolatedModules_es6.js | 17 ++++++----------- tests/baselines/reference/asyncAwait_es6.js | 17 ++++++----------- .../reference/asyncImportedPromise_es6.js | 17 ++++++----------- tests/baselines/reference/asyncMultiFile.js | 17 ++++++----------- .../baselines/reference/reachabilityChecks7.js | 17 ++++++----------- 6 files changed, 36 insertions(+), 66 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index ea0330a23b9..e5f0f7163e6 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -319,17 +319,12 @@ var __param = (this && this.__param) || function (paramIndex, decorator) { };`; const awaiterHelper = ` -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) { - return new Promise(function (resolve, reject) { - generator = generator.call(thisArg, _arguments); - function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); } - function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } - function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } - function step(verb, value) { - var result = generator[verb](value); - result.done ? resolve(result.value) : cast(result.value).then(onfulfill, onreject); - } - step("next", void 0); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new P(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.call(thisArg, _arguments)).next()); }); };`; diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es6.js b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.js index 7007c66ae28..450ded9d4f5 100644 --- a/tests/baselines/reference/asyncAwaitIsolatedModules_es6.js +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.js @@ -40,17 +40,12 @@ module M { } //// [asyncAwaitIsolatedModules_es6.js] -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) { - return new Promise(function (resolve, reject) { - generator = generator.call(thisArg, _arguments); - function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); } - function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } - function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } - function step(verb, value) { - var result = generator[verb](value); - result.done ? resolve(result.value) : cast(result.value).then(onfulfill, onreject); - } - step("next", void 0); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new P(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.call(thisArg, _arguments)).next()); }); }; function f0() { diff --git a/tests/baselines/reference/asyncAwait_es6.js b/tests/baselines/reference/asyncAwait_es6.js index 155a44d339d..61ed71198c8 100644 --- a/tests/baselines/reference/asyncAwait_es6.js +++ b/tests/baselines/reference/asyncAwait_es6.js @@ -40,17 +40,12 @@ module M { } //// [asyncAwait_es6.js] -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) { - return new Promise(function (resolve, reject) { - generator = generator.call(thisArg, _arguments); - function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); } - function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } - function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } - function step(verb, value) { - var result = generator[verb](value); - result.done ? resolve(result.value) : cast(result.value).then(onfulfill, onreject); - } - step("next", void 0); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new P(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.call(thisArg, _arguments)).next()); }); }; function f0() { diff --git a/tests/baselines/reference/asyncImportedPromise_es6.js b/tests/baselines/reference/asyncImportedPromise_es6.js index a9c7540d88f..d861012488c 100644 --- a/tests/baselines/reference/asyncImportedPromise_es6.js +++ b/tests/baselines/reference/asyncImportedPromise_es6.js @@ -16,17 +16,12 @@ class Task extends Promise { exports.Task = Task; //// [test.js] "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) { - return new Promise(function (resolve, reject) { - generator = generator.call(thisArg, _arguments); - function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); } - function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } - function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } - function step(verb, value) { - var result = generator[verb](value); - result.done ? resolve(result.value) : cast(result.value).then(onfulfill, onreject); - } - step("next", void 0); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new P(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.call(thisArg, _arguments)).next()); }); }; var task_1 = require("./task"); diff --git a/tests/baselines/reference/asyncMultiFile.js b/tests/baselines/reference/asyncMultiFile.js index e93dc586255..95cf264f170 100644 --- a/tests/baselines/reference/asyncMultiFile.js +++ b/tests/baselines/reference/asyncMultiFile.js @@ -6,17 +6,12 @@ async function f() {} function g() { } //// [a.js] -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) { - return new Promise(function (resolve, reject) { - generator = generator.call(thisArg, _arguments); - function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); } - function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } - function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } - function step(verb, value) { - var result = generator[verb](value); - result.done ? resolve(result.value) : cast(result.value).then(onfulfill, onreject); - } - step("next", void 0); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new P(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.call(thisArg, _arguments)).next()); }); }; function f() { diff --git a/tests/baselines/reference/reachabilityChecks7.js b/tests/baselines/reference/reachabilityChecks7.js index c78f99953e9..39b7b0149a5 100644 --- a/tests/baselines/reference/reachabilityChecks7.js +++ b/tests/baselines/reference/reachabilityChecks7.js @@ -31,17 +31,12 @@ declare function use(s: string): void; let x1 = () => { use("Test"); } //// [reachabilityChecks7.js] -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) { - return new Promise(function (resolve, reject) { - generator = generator.call(thisArg, _arguments); - function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); } - function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } - function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } - function step(verb, value) { - var result = generator[verb](value); - result.done ? resolve(result.value) : cast(result.value).then(onfulfill, onreject); - } - step("next", void 0); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new P(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.call(thisArg, _arguments)).next()); }); }; // async function without return type annotation - error From b75ce4fdea6eb10fc474f84a9312f2e0c427cf62 Mon Sep 17 00:00:00 2001 From: Jason Killian Date: Fri, 15 Jan 2016 15:41:57 -0500 Subject: [PATCH 168/209] Add failing test --- .../getPropertySymbolsFromBaseTypesDoesntCrash.ts | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/cases/fourslash/getPropertySymbolsFromBaseTypesDoesntCrash.ts diff --git a/tests/cases/fourslash/getPropertySymbolsFromBaseTypesDoesntCrash.ts b/tests/cases/fourslash/getPropertySymbolsFromBaseTypesDoesntCrash.ts new file mode 100644 index 00000000000..0c89de63a43 --- /dev/null +++ b/tests/cases/fourslash/getPropertySymbolsFromBaseTypesDoesntCrash.ts @@ -0,0 +1,9 @@ +/// + +// @Filename: file1.ts +//// class ClassA implements IInterface { +//// private /*1*/value: number; +//// } + +goTo.marker("1"); +verify.documentHighlightsAtPositionCount(1, ["file1.ts"]); \ No newline at end of file From 047c62c24025b9ec0086223b9248a464c6d63501 Mon Sep 17 00:00:00 2001 From: Jason Killian Date: Fri, 15 Jan 2016 15:48:22 -0500 Subject: [PATCH 169/209] Fix issue #6478 (bug in the language services) --- src/services/services.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/services/services.ts b/src/services/services.ts index 8e998760b49..062e3da1bfa 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -6028,6 +6028,10 @@ namespace ts { */ function getPropertySymbolsFromBaseTypes(symbol: Symbol, propertyName: string, result: Symbol[], previousIterationSymbolsCache: SymbolTable): void { + if (!symbol) { + return; + } + // If the current symbol is the same as the previous-iteration symbol, we can just return the symbol that has already been visited // This is particularly important for the following cases, so that we do not infinitely visit the same symbol. // For example: @@ -6043,7 +6047,7 @@ namespace ts { return; } - if (symbol && symbol.flags & (SymbolFlags.Class | SymbolFlags.Interface)) { + if (symbol.flags & (SymbolFlags.Class | SymbolFlags.Interface)) { forEach(symbol.getDeclarations(), declaration => { if (declaration.kind === SyntaxKind.ClassDeclaration) { getPropertySymbolFromTypeReference(getClassExtendsHeritageClauseElement(declaration)); From c2f453b8fb141d8015e328a2326406b0f70858ac Mon Sep 17 00:00:00 2001 From: zhengbli Date: Fri, 15 Jan 2016 14:58:04 -0800 Subject: [PATCH 170/209] Fix the getCanonicalFileName in sys.ts and also check null value in file watcher call back --- src/compiler/sys.ts | 8 ++++++-- src/server/editorServices.ts | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index e6f908d250a..1a97e9c8d0a 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -378,7 +378,11 @@ namespace ts { */ function fileEventHandler(eventName: string, relativefileName: string, baseDirPath: Path) { // When files are deleted from disk, the triggered "rename" event would have a relativefileName of "undefined" - const filePath = relativefileName === undefined ? undefined : toPath(relativefileName, baseDirPath, getCanonicalPath); + /* tslint:disable:no-null */ + const filePath = relativefileName === undefined || relativefileName === null + ? undefined + : toPath(relativefileName, baseDirPath, createGetCanonicalFileName(sys.useCaseSensitiveFileNames)); + /* tslint:enable:no-null */ if (eventName === "change" && fileWatcherCallbacks.contains(filePath)) { for (const fileCallback of fileWatcherCallbacks.get(filePath)) { fileCallback(filePath); @@ -460,7 +464,7 @@ namespace ts { } function getCanonicalPath(path: string): string { - return useCaseSensitiveFileNames ? path.toLowerCase() : path; + return useCaseSensitiveFileNames ? path : path.toLowerCase(); } function readDirectory(path: string, extension?: string, exclude?: string[]): string[] { diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index fd9f1077dd9..7cc3a6c96a6 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -1002,7 +1002,9 @@ namespace ts.server { info.setFormatOptions(this.getFormatCodeOptions()); this.filenameToScriptInfo[fileName] = info; if (!info.isOpen) { - info.fileWatcher = this.host.watchFile(fileName, _ => { this.watchedFileChanged(fileName); }); + info.fileWatcher = this.host.watchFile( + toPath(fileName, fileName, createGetCanonicalFileName(sys.useCaseSensitiveFileNames)), + _ => { this.watchedFileChanged(fileName); }); } } } @@ -1215,7 +1217,9 @@ namespace ts.server { } } project.finishGraph(); - project.projectFileWatcher = this.host.watchFile(configFilename, _ => this.watchedProjectConfigFileChanged(project)); + project.projectFileWatcher = this.host.watchFile( + toPath(configFilename, configFilename, createGetCanonicalFileName(sys.useCaseSensitiveFileNames)), + _ => this.watchedProjectConfigFileChanged(project)); this.log("Add recursive watcher for: " + ts.getDirectoryPath(configFilename)); project.directoryWatcher = this.host.watchDirectory( ts.getDirectoryPath(configFilename), From c244306514a7e338a17c2a1b9f2e3959308435cb Mon Sep 17 00:00:00 2001 From: zhengbli Date: Fri, 15 Jan 2016 16:55:25 -0800 Subject: [PATCH 171/209] address CR feedback: use typeof check instead of checking undefined and null value --- src/compiler/sys.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 1a97e9c8d0a..bf25d39aa43 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -376,13 +376,11 @@ namespace ts { /** * @param watcherPath is the path from which the watcher is triggered. */ - function fileEventHandler(eventName: string, relativefileName: string, baseDirPath: Path) { + function fileEventHandler(eventName: string, relativeFileName: string, baseDirPath: Path) { // When files are deleted from disk, the triggered "rename" event would have a relativefileName of "undefined" - /* tslint:disable:no-null */ - const filePath = relativefileName === undefined || relativefileName === null + const filePath = typeof relativeFileName !== "string" ? undefined - : toPath(relativefileName, baseDirPath, createGetCanonicalFileName(sys.useCaseSensitiveFileNames)); - /* tslint:enable:no-null */ + : toPath(relativeFileName, baseDirPath, createGetCanonicalFileName(sys.useCaseSensitiveFileNames)); if (eventName === "change" && fileWatcherCallbacks.contains(filePath)) { for (const fileCallback of fileWatcherCallbacks.get(filePath)) { fileCallback(filePath); From 0dc485ad2c14e6ad3d2115a9f61366c1976b9d13 Mon Sep 17 00:00:00 2001 From: Asad Saeeduddin Date: Fri, 15 Jan 2016 23:31:45 -0500 Subject: [PATCH 172/209] Added test case --- ...gReturnStatementsAndExpressions.errors.txt | 23 ++++++++++++++++--- ...nsMissingReturnStatementsAndExpressions.js | 20 ++++++++++++++++ ...nsMissingReturnStatementsAndExpressions.ts | 11 +++++++++ 3 files changed, 51 insertions(+), 3 deletions(-) diff --git a/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt b/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt index 58ffd051d4d..41528f70880 100644 --- a/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt +++ b/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt @@ -1,9 +1,11 @@ tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(3,16): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. -tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(95,16): error TS2378: A 'get' accessor must return a value. -tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(118,5): error TS1003: Identifier expected. +tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(93,17): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. +tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(101,17): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. +tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(106,16): error TS2378: A 'get' accessor must return a value. +tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(129,5): error TS1003: Identifier expected. -==== tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts (3 errors) ==== +==== tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts (5 errors) ==== function f1(): string { @@ -98,6 +100,21 @@ tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(118,5): e return "Okay, not type annotated."; } + function f19(): void | number { + ~~~~~~~~~~~~~ +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. + // Okay; function return type is union containing void + } + + function f20(): any | number { + // Okay; function return type is union containing any + } + + function f21(): number | string { + ~~~~~~~~~~~~~~~ +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. + // Not okay; union does not contain void or any + } class C { public get m1() { diff --git a/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.js b/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.js index 4dfe851683a..17468722e20 100644 --- a/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.js +++ b/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.js @@ -91,6 +91,17 @@ function f18() { return "Okay, not type annotated."; } +function f19(): void | number { + // Okay; function return type is union containing void +} + +function f20(): any | number { + // Okay; function return type is union containing any +} + +function f21(): number | string { + // Not okay; union does not contain void or any +} class C { public get m1() { @@ -191,6 +202,15 @@ function f17() { function f18() { return "Okay, not type annotated."; } +function f19() { + // Okay; function return type is union containing void +} +function f20() { + // Okay; function return type is union containing any +} +function f21() { + // Not okay; union does not contain void or any +} var C = (function () { function C() { } diff --git a/tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts b/tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts index fde615af41d..582940038c5 100644 --- a/tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts +++ b/tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts @@ -92,6 +92,17 @@ function f18() { return "Okay, not type annotated."; } +function f19(): void | number { + // Okay; function return type is union containing void +} + +function f20(): any | number { + // Okay; function return type is union containing any +} + +function f21(): number | string { + // Not okay; union does not contain void or any +} class C { public get m1() { From e568892ea52eb0b479f890a2aa833e019426a2c3 Mon Sep 17 00:00:00 2001 From: Asad Saeeduddin Date: Fri, 15 Jan 2016 23:50:30 -0500 Subject: [PATCH 173/209] Allow missing return for unions containing any or void --- doc/spec.md | 10 +++++----- src/compiler/checker.ts | 11 +++++++++-- ...nsMissingReturnStatementsAndExpressions.errors.txt | 5 +---- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/doc/spec.md b/doc/spec.md index 30de2c5a6b6..4c1ec4f2302 100644 --- a/doc/spec.md +++ b/doc/spec.md @@ -265,7 +265,7 @@ function f() { To benefit from this inference, a programmer can use the TypeScript language service. For example, a code editor can incorporate the TypeScript language service and use the service to find the members of a string object as in the following screen shot. -  ![](images/image1.png) +  ![](images/image1.png) In this example, the programmer benefits from type inference without providing type annotations. Some beneficial tools, however, do require the programmer to provide type annotations. In TypeScript, we can express a parameter requirement as in the following code fragment. @@ -413,7 +413,7 @@ This signature denotes that a function may be passed as the parameter of the '$' A typical client would not need to add any additional typing but could just use a community-supplied typing to discover (through statement completion with documentation tips) and verify (through static checking) correct use of the library, as in the following screen shot. -  ![](images/image2.png) +  ![](images/image2.png) Section [3.3](#3.3) provides additional information about object types. @@ -630,7 +630,7 @@ An important goal of TypeScript is to provide accurate and straightforward types JavaScript programming interfaces often include functions whose behavior is discriminated by a string constant passed to the function. The Document Object Model makes heavy use of this pattern. For example, the following screen shot shows that the 'createElement' method of the 'document' object has multiple signatures, some of which identify the types returned when specific strings are passed into the method. -  ![](images/image3.png) +  ![](images/image3.png) The following code fragment uses this feature. Because the 'span' variable is inferred to have the type 'HTMLSpanElement', the code can reference without static error the 'isMultiline' property of 'span'. @@ -641,7 +641,7 @@ span.isMultiLine = false; // OK: HTMLSpanElement has isMultiline property In the following screen shot, a programming tool combines information from overloading on string parameters with contextual typing to infer that the type of the variable 'e' is 'MouseEvent' and that therefore 'e' has a 'clientX' property. -  ![](images/image4.png) +  ![](images/image4.png) Section [3.9.2.4](#3.9.2.4) provides details on how to use string literals in function signatures. @@ -3885,7 +3885,7 @@ function g(x: number) { the inferred return type for 'f' and 'g' is Any because the functions reference themselves through a cycle with no return type annotations. Adding an explicit return type 'number' to either breaks the cycle and causes the return type 'number' to be inferred for the other. -An explicitly typed function whose return type isn't the Void or the Any type must have at least one return statement somewhere in its body. An exception to this rule is if the function implementation consists of a single 'throw' statement. +An explicitly typed function whose return type isn't the Void type, the Any type, or a union type containing the Void or Any type as a constituent must have at least one return statement somewhere in its body. An exception to this rule is if the function implementation consists of a single 'throw' statement. The type of 'this' in a function implementation is the Any type. diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index dd943ec807e..133f09ef422 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2466,6 +2466,12 @@ namespace ts { return type && (type.flags & TypeFlags.Any) !== 0; } + function isUnionContaining(type: Type, kinds: TypeFlags) { + return type + && (type.flags & TypeFlags.Union) + && someConstituentTypeHasKind(type, kinds); + } + // Return the type of a binding element parent. We check SymbolLinks first to see if a type has been // assigned by contextual typing. function getTypeForBindingElementParent(node: VariableLikeDeclaration) { @@ -10201,7 +10207,8 @@ namespace ts { /* *TypeScript Specification 1.0 (6.3) - July 2014 - * An explicitly typed function whose return type isn't the Void or the Any type + * An explicitly typed function whose return type isn't the Void type, + * the Any type, or a union type containing the Void or Any type as a constituent * must have at least one return statement somewhere in its body. * An exception to this rule is if the function implementation consists of a single 'throw' statement. * @param returnType - return type of the function, can be undefined if return type is not explicitly specified @@ -10212,7 +10219,7 @@ namespace ts { } // Functions with with an explicitly specified 'void' or 'any' return type don't need any return expressions. - if (returnType === voidType || isTypeAny(returnType)) { + if (returnType === voidType || isTypeAny(returnType) || isUnionContaining(returnType, TypeFlags.Any) || isUnionContaining(returnType, TypeFlags.Void)) { return; } diff --git a/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt b/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt index 41528f70880..1ccc296b75b 100644 --- a/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt +++ b/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt @@ -1,11 +1,10 @@ tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(3,16): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. -tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(93,17): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(101,17): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(106,16): error TS2378: A 'get' accessor must return a value. tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(129,5): error TS1003: Identifier expected. -==== tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts (5 errors) ==== +==== tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts (4 errors) ==== function f1(): string { @@ -101,8 +100,6 @@ tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(129,5): e } function f19(): void | number { - ~~~~~~~~~~~~~ -!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. // Okay; function return type is union containing void } From eb87bad2c88ead32de1739317ffc74c6c524279a Mon Sep 17 00:00:00 2001 From: Asad Saeeduddin Date: Sat, 16 Jan 2016 00:15:19 -0500 Subject: [PATCH 174/209] Removed trailing whitespace --- src/compiler/checker.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 133f09ef422..b7637682f1a 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2467,9 +2467,7 @@ namespace ts { } function isUnionContaining(type: Type, kinds: TypeFlags) { - return type - && (type.flags & TypeFlags.Union) - && someConstituentTypeHasKind(type, kinds); + return type && (type.flags & TypeFlags.Union) && someConstituentTypeHasKind(type, kinds); } // Return the type of a binding element parent. We check SymbolLinks first to see if a type has been From 6fa51f1c029baa0881aa0fbf062a5d5562821180 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Sat, 16 Jan 2016 12:59:02 -0800 Subject: [PATCH 175/209] Go back to depending on nightly builds of TypeScript. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f0ba128a919..261cdfa64b7 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "istanbul": "latest", "mocha-fivemat-progress-reporter": "latest", "tslint": "next", - "typescript": "1.8.0-dev.20160113", + "typescript": "next", "tsd": "latest" }, "scripts": { From 26fdf891e9829a0ff9051d40a944196cd4444991 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Sat, 16 Jan 2016 14:05:46 -0800 Subject: [PATCH 176/209] Fix lint errors. --- src/compiler/checker.ts | 2 +- src/compiler/core.ts | 3 ++- src/compiler/emitter.ts | 10 +++++----- src/compiler/program.ts | 2 +- src/services/services.ts | 3 ++- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 573c0655cce..e0f40d5085e 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -14600,7 +14600,7 @@ namespace ts { } function hasExportedMembers(moduleSymbol: Symbol) { - for (var id in moduleSymbol.exports) { + for (const id in moduleSymbol.exports) { if (id !== "export=") { return true; } diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 4056d9c3e9d..cfdcb2b930c 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -718,7 +718,8 @@ namespace ts { } // Find the component that differs - for (var joinStartIndex = 0; joinStartIndex < pathComponents.length && joinStartIndex < directoryComponents.length; joinStartIndex++) { + let joinStartIndex: number; + for (joinStartIndex = 0; joinStartIndex < pathComponents.length && joinStartIndex < directoryComponents.length; joinStartIndex++) { if (getCanonicalFileName(directoryComponents[joinStartIndex]) !== getCanonicalFileName(pathComponents[joinStartIndex])) { break; } diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index ea0330a23b9..417e245dae5 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1250,7 +1250,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi else { // One object literal with all the attributes in them write("{"); - for (var i = 0; i < attrs.length; i++) { + for (let i = 0, n = attrs.length; i < n; i++) { if (i > 0) { write(", "); } @@ -1262,7 +1262,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi // Children if (children) { - for (var i = 0; i < children.length; i++) { + for (let i = 0; i < children.length; i++) { // Don't emit empty expressions if (children[i].kind === SyntaxKind.JsxExpression && !((children[i]).expression)) { continue; @@ -1356,7 +1356,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi function emitJsxElement(node: JsxElement) { emitJsxOpeningOrSelfClosingElement(node.openingElement); - for (var i = 0, n = node.children.length; i < n; i++) { + for (let i = 0, n = node.children.length; i < n; i++) { emit(node.children[i]); } @@ -5172,7 +5172,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi // a lexical declaration such as a LexicalDeclaration or a ClassDeclaration. if (isClassExpressionWithStaticProperties) { - for (var property of staticProperties) { + for (const property of staticProperties) { write(","); writeLine(); emitPropertyDeclaration(node, property, /*receiver*/ tempVariable, /*isExpression*/ true); @@ -5719,7 +5719,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi const parameters = valueDeclaration.parameters; const parameterCount = parameters.length; if (parameterCount > 0) { - for (var i = 0; i < parameterCount; i++) { + for (let i = 0; i < parameterCount; i++) { if (i > 0) { write(", "); } diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 52c9fa4ef84..398ce27ef48 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1217,7 +1217,7 @@ namespace ts { if (sourceFiles) { const absoluteRootDirectoryPath = host.getCanonicalFileName(getNormalizedAbsolutePath(rootDirectory, currentDirectory)); - for (var sourceFile of sourceFiles) { + for (const sourceFile of sourceFiles) { if (!isDeclarationFile(sourceFile)) { const absoluteSourceFilePath = host.getCanonicalFileName(getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory)); if (absoluteSourceFilePath.indexOf(absoluteRootDirectoryPath) !== 0) { diff --git a/src/services/services.ts b/src/services/services.ts index e449c40a870..0fae1c0aa45 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -6828,7 +6828,8 @@ namespace ts { function classifyDisabledMergeCode(text: string, start: number, end: number) { // Classify the line that the ======= marker is on as a comment. Then just lex // all further tokens and add them to the result. - for (var i = start; i < end; i++) { + let i: number; + for (i = start; i < end; i++) { if (isLineBreak(text.charCodeAt(i))) { break; } From 28840863a635b6803505a821bcb18d9638c38012 Mon Sep 17 00:00:00 2001 From: Asad Saeeduddin Date: Tue, 19 Jan 2016 15:23:57 -0500 Subject: [PATCH 177/209] Addressed PR feedback: refactored away helper function, generated spec from docx --- doc/TypeScript Language Specification.docx | Bin 316896 -> 317460 bytes doc/spec.md | 8 ++++---- src/compiler/checker.ts | 6 +----- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/doc/TypeScript Language Specification.docx b/doc/TypeScript Language Specification.docx index 78c869175512d02338a61741a2bbbe570aa97bcb..4b8d3998f905a43b52b728204eaeb7c0d7c1e834 100644 GIT binary patch delta 263837 zcmW(+Wmq1)5~XPI;!v!}i@Q_Y9g4dYcXwN?xW2d-cQ5Yl?(XhRp}^(4`!mTi$!0S% z=bX%Lm0=`QWBf)!K`W9O3)F&w@Ph(Dpg|<(OhIGBlOTx$VJQp<&=_HD-X1Ks|K#6J zvpdJF&*MBg_P-}n-ruf-4G{FQ)0;VZ+>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&4 zu;{=c#=4V*<;@de@y#m2F*)sDi{na<+Huoo3bfR>UnyBheRXL|x_?ilZug$LDxXr? zQ6hQEbi0cM4ZxxSlT?Ue5BDklV)0Ea4ONKpTpH(#PdO^1F#Lg^^y79BM0J<6k6_ld z&wwlA=M!CeX;6%txc=D~X9Bi*LVTY4qcTLLWl^KJ?(L&hd4{G;mjU4Ie9W3>^czKmtB-}UraIO?kBaL4ip{m`U~4|0Z`!u#vX4u44lxServfrF*` z{0cTF76le;qaU}6Sn9_!r)51HtaB__^8l_OEr(Z(K{N=GM}$~d*TEM5dJ(~H4&vUW z+g1$ycq#DsKLpxrVCsXo%ygN|w=`$K?TH9{EUX*WBe#Tz;YdU$5sbuxmrOk~ju#IIx|UIJaOHL%8hNsh+U+L%5Hy zlN(@zm)G)P*sWpQM>sUcI57ALDCIJYd!3HAf3q&%6blRX1p99zdw&;}JPeNPUx%t- zVUhi-Q}CT#2yAi~_YU3PA2s-w&|o5rdIVPzo8}u#cLbM*?)PRHcv}m!gZf`$;5)_= z*w+zUcDjG!Y~L_{F{8Ev)|srGGTN diff --git a/doc/spec.md b/doc/spec.md index 4c1ec4f2302..fa69d321056 100644 --- a/doc/spec.md +++ b/doc/spec.md @@ -265,7 +265,7 @@ function f() { To benefit from this inference, a programmer can use the TypeScript language service. For example, a code editor can incorporate the TypeScript language service and use the service to find the members of a string object as in the following screen shot. -  ![](images/image1.png) +  ![](images/image1.png) In this example, the programmer benefits from type inference without providing type annotations. Some beneficial tools, however, do require the programmer to provide type annotations. In TypeScript, we can express a parameter requirement as in the following code fragment. @@ -413,7 +413,7 @@ This signature denotes that a function may be passed as the parameter of the '$' A typical client would not need to add any additional typing but could just use a community-supplied typing to discover (through statement completion with documentation tips) and verify (through static checking) correct use of the library, as in the following screen shot. -  ![](images/image2.png) +  ![](images/image2.png) Section [3.3](#3.3) provides additional information about object types. @@ -630,7 +630,7 @@ An important goal of TypeScript is to provide accurate and straightforward types JavaScript programming interfaces often include functions whose behavior is discriminated by a string constant passed to the function. The Document Object Model makes heavy use of this pattern. For example, the following screen shot shows that the 'createElement' method of the 'document' object has multiple signatures, some of which identify the types returned when specific strings are passed into the method. -  ![](images/image3.png) +  ![](images/image3.png) The following code fragment uses this feature. Because the 'span' variable is inferred to have the type 'HTMLSpanElement', the code can reference without static error the 'isMultiline' property of 'span'. @@ -641,7 +641,7 @@ span.isMultiLine = false; // OK: HTMLSpanElement has isMultiline property In the following screen shot, a programming tool combines information from overloading on string parameters with contextual typing to infer that the type of the variable 'e' is 'MouseEvent' and that therefore 'e' has a 'clientX' property. -  ![](images/image4.png) +  ![](images/image4.png) Section [3.9.2.4](#3.9.2.4) provides details on how to use string literals in function signatures. diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index b7637682f1a..f2e65004b80 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2466,10 +2466,6 @@ namespace ts { return type && (type.flags & TypeFlags.Any) !== 0; } - function isUnionContaining(type: Type, kinds: TypeFlags) { - return type && (type.flags & TypeFlags.Union) && someConstituentTypeHasKind(type, kinds); - } - // Return the type of a binding element parent. We check SymbolLinks first to see if a type has been // assigned by contextual typing. function getTypeForBindingElementParent(node: VariableLikeDeclaration) { @@ -10217,7 +10213,7 @@ namespace ts { } // Functions with with an explicitly specified 'void' or 'any' return type don't need any return expressions. - if (returnType === voidType || isTypeAny(returnType) || isUnionContaining(returnType, TypeFlags.Any) || isUnionContaining(returnType, TypeFlags.Void)) { + if (returnType === voidType || isTypeAny(returnType) || (returnType && (returnType.flags & TypeFlags.Union) && someConstituentTypeHasKind(returnType, TypeFlags.Any | TypeFlags.Void))) { return; } From b5ed7f3edaccf373adc07dd4018cad85b819cc43 Mon Sep 17 00:00:00 2001 From: zhengbli Date: Tue, 19 Jan 2016 16:30:52 -0800 Subject: [PATCH 178/209] Add support for jsconfig.json in language service --- src/compiler/commandLineParser.ts | 11 ++++++++--- src/compiler/tsc.ts | 2 +- src/server/editorServices.ts | 16 ++++++++++------ 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 247a204e9bd..af795377bc0 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -493,8 +493,9 @@ namespace ts { * @param basePath A root directory to resolve relative path entries in the config * file to. e.g. outDir */ - export function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions: CompilerOptions = {}): ParsedCommandLine { - const { options: optionsFromJsonConfigFile, errors } = convertCompilerOptionsFromJson(json["compilerOptions"], basePath); + export function parseJsonConfigFileContent(json: any, host: ParseConfigHost, configFileName: string, existingOptions: CompilerOptions = {}): ParsedCommandLine { + const basePath = getDirectoryPath(configFileName); + const { options: optionsFromJsonConfigFile, errors } = convertCompilerOptionsFromJson(json["compilerOptions"], basePath, configFileName); const options = extend(existingOptions, optionsFromJsonConfigFile); return { @@ -547,10 +548,14 @@ namespace ts { } } - export function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string): { options: CompilerOptions, errors: Diagnostic[] } { + export function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): { options: CompilerOptions, errors: Diagnostic[] } { const options: CompilerOptions = {}; const errors: Diagnostic[] = []; + if (configFileName && getBaseFileName(configFileName) === "jsconfig.json") { + options.allowJs = true; + } + if (!jsonOptions) { return { options, errors }; } diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index 808ee6da804..94dc8b18847 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -376,7 +376,7 @@ namespace ts { sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); return; } - const configParseResult = parseJsonConfigFileContent(configObject, sys, getDirectoryPath(configFileName), commandLine.options); + const configParseResult = parseJsonConfigFileContent(configObject, sys, configFileName, commandLine.options); if (configParseResult.errors.length > 0) { reportDiagnostics(configParseResult.errors, /* compilerHost */ undefined); sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 7cc3a6c96a6..a43252868d8 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -1026,10 +1026,16 @@ namespace ts.server { // the newly opened file. findConfigFile(searchPath: string): string { while (true) { - const fileName = ts.combinePaths(searchPath, "tsconfig.json"); - if (this.host.fileExists(fileName)) { - return fileName; + const tsconfigFileName = ts.combinePaths(searchPath, "tsconfig.json"); + if (this.host.fileExists(tsconfigFileName)) { + return tsconfigFileName; } + + const jsconfigFileName = ts.combinePaths(searchPath, "jsconfig.json"); + if (this.host.fileExists(jsconfigFileName)) { + return jsconfigFileName; + } + const parentPath = ts.getDirectoryPath(searchPath); if (parentPath === searchPath) { break; @@ -1172,15 +1178,13 @@ namespace ts.server { configFileToProjectOptions(configFilename: string): { succeeded: boolean, projectOptions?: ProjectOptions, error?: ProjectOpenResult } { configFilename = ts.normalizePath(configFilename); - // file references will be relative to dirPath (or absolute) - const dirPath = ts.getDirectoryPath(configFilename); const contents = this.host.readFile(configFilename); const rawConfig: { config?: ProjectOptions; error?: Diagnostic; } = ts.parseConfigFileTextToJson(configFilename, contents); if (rawConfig.error) { return { succeeded: false, error: rawConfig.error }; } else { - const parsedCommandLine = ts.parseJsonConfigFileContent(rawConfig.config, this.host, dirPath); + const parsedCommandLine = ts.parseJsonConfigFileContent(rawConfig.config, this.host, configFilename); Debug.assert(!!parsedCommandLine.fileNames); if (parsedCommandLine.errors && (parsedCommandLine.errors.length > 0)) { From 7cf97eb57f8247d1def46f95a05fd21e50b5b664 Mon Sep 17 00:00:00 2001 From: zhengbli Date: Tue, 19 Jan 2016 17:29:51 -0800 Subject: [PATCH 179/209] update lib from TSJS 20160119 --- src/lib/dom.generated.d.ts | 45 +++++++++++++++++++++++--------- src/lib/webworker.generated.d.ts | 4 +-- 2 files changed, 34 insertions(+), 15 deletions(-) diff --git a/src/lib/dom.generated.d.ts b/src/lib/dom.generated.d.ts index 0144d752b99..9970749e5a8 100644 --- a/src/lib/dom.generated.d.ts +++ b/src/lib/dom.generated.d.ts @@ -1255,7 +1255,7 @@ interface Console { select(element: Element): void; time(timerName?: string): void; timeEnd(timerName?: string): void; - trace(): void; + trace(message?: any, ...optionalParams: any[]): void; warn(message?: any, ...optionalParams: any[]): void; } @@ -1514,9 +1514,9 @@ interface DataTransferItemList { length: number; add(data: File): DataTransferItem; clear(): void; - item(index: number): File; + item(index: number): DataTransferItem; remove(index: number): void; - [index: number]: File; + [index: number]: DataTransferItem; } declare var DataTransferItemList: { @@ -2569,6 +2569,8 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven * @param content The text and HTML tags to write. */ writeln(...content: string[]): void; + createElement(tagName: "picture"): HTMLPictureElement; + getElementsByTagName(tagname: "picture"): NodeListOf; addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void; addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; @@ -2981,6 +2983,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec webkitRequestFullscreen(): void; getElementsByClassName(classNames: string): NodeListOf; matches(selector: string): boolean; + getElementsByTagName(tagname: "picture"): NodeListOf; addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; @@ -3770,6 +3773,7 @@ interface HTMLCanvasElement extends HTMLElement { * @param type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image. */ toDataURL(type?: string, ...args: any[]): string; + toBlob(): Blob; } declare var HTMLCanvasElement: { @@ -6924,7 +6928,7 @@ interface IDBDatabase extends EventTarget { objectStoreNames: DOMStringList; onabort: (ev: Event) => any; onerror: (ev: Event) => any; - version: string; + version: number; close(): void; createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore; deleteObjectStore(name: string): void; @@ -7640,7 +7644,7 @@ declare var MediaQueryList: { interface MediaSource extends EventTarget { activeSourceBuffers: SourceBufferList; duration: number; - readyState: number; + readyState: string; sourceBuffers: SourceBufferList; addSourceBuffer(type: string): SourceBuffer; endOfStream(error?: number): void; @@ -10369,17 +10373,16 @@ declare var Storage: { } interface StorageEvent extends Event { - key: string; - newValue: any; - oldValue: any; - storageArea: Storage; url: string; - initStorageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, keyArg: string, oldValueArg: any, newValueArg: any, urlArg: string, storageAreaArg: Storage): void; + key?: string; + oldValue?: string; + newValue?: string; + storageArea?: Storage; } declare var StorageEvent: { prototype: StorageEvent; - new(): StorageEvent; + new (type: string, eventInitDict?: StorageEventInit): StorageEvent; } interface StyleMedia { @@ -11977,7 +11980,7 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window msMatchMedia(mediaQuery: string): MediaQueryList; msRequestAnimationFrame(callback: FrameRequestCallback): number; msWriteProfilerMark(profilerMarkName: string): void; - open(url?: string, target?: string, features?: string, replace?: boolean): any; + open(url?: string, target?: string, features?: string, replace?: boolean): Window; postMessage(message: any, targetOrigin: string, ports?: any): void; print(): void; prompt(message?: string, _default?: string): string; @@ -12579,6 +12582,14 @@ interface XMLHttpRequestEventTarget { addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; } +interface StorageEventInit extends EventInit { + key?: string; + oldValue?: string; + newValue?: string; + url: string; + storageArea?: Storage; +} + interface IDBObjectStoreParameters { keyPath?: string | string[]; autoIncrement?: boolean; @@ -12633,6 +12644,14 @@ declare var HTMLTemplateElement: { new(): HTMLTemplateElement; } +interface HTMLPictureElement extends HTMLElement { +} + +declare var HTMLPictureElement: { + prototype: HTMLPictureElement; + new(): HTMLPictureElement; +} + declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject; interface ErrorEventHandler { @@ -12829,7 +12848,7 @@ declare function msCancelRequestAnimationFrame(handle: number): void; declare function msMatchMedia(mediaQuery: string): MediaQueryList; declare function msRequestAnimationFrame(callback: FrameRequestCallback): number; declare function msWriteProfilerMark(profilerMarkName: string): void; -declare function open(url?: string, target?: string, features?: string, replace?: boolean): any; +declare function open(url?: string, target?: string, features?: string, replace?: boolean): Window; declare function postMessage(message: any, targetOrigin: string, ports?: any): void; declare function print(): void; declare function prompt(message?: string, _default?: string): string; diff --git a/src/lib/webworker.generated.d.ts b/src/lib/webworker.generated.d.ts index a1d87f79787..d2008542cc6 100644 --- a/src/lib/webworker.generated.d.ts +++ b/src/lib/webworker.generated.d.ts @@ -69,7 +69,7 @@ interface Console { select(element: any): void; time(timerName?: string): void; timeEnd(timerName?: string): void; - trace(): void; + trace(message?: any, ...optionalParams: any[]): void; warn(message?: any, ...optionalParams: any[]): void; } @@ -309,7 +309,7 @@ interface IDBDatabase extends EventTarget { objectStoreNames: DOMStringList; onabort: (ev: Event) => any; onerror: (ev: Event) => any; - version: string; + version: number; close(): void; createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore; deleteObjectStore(name: string): void; From 50ed33ea3ebaf1da2ccff980e9e899a55d293097 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 20 Jan 2016 15:43:15 -0800 Subject: [PATCH 180/209] Updated nodeIsDecorated --- src/compiler/binder.ts | 13 +++++----- src/compiler/utilities.ts | 54 ++++++++++----------------------------- 2 files changed, 20 insertions(+), 47 deletions(-) diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 5eee3c31723..06bdf81dd43 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -361,8 +361,8 @@ namespace ts { // when the emitter comes back to it, it knows not to qualify the name if it was found in a containing scope. // NOTE: Nested ambient modules always should go to to 'locals' table to prevent their automatic merge - // during global merging in the checker. Why? The only case when ambient module is permitted inside another module is module augmentation - // and this case is specially handled. Module augmentations should only be merged with original module definition + // during global merging in the checker. Why? The only case when ambient module is permitted inside another module is module augmentation + // and this case is specially handled. Module augmentations should only be merged with original module definition // and should never be merged directly with other augmentation, and the latter case would be possible if automatic merge is allowed. if (!isAmbientModule(node) && (hasExportModifier || container.flags & NodeFlags.ExportContext)) { const exportKind = @@ -1527,10 +1527,9 @@ namespace ts { } function bindParameter(node: ParameterDeclaration) { - if (nodeIsDecorated(node) && - nodeCanBeDecorated(node) && - !isDeclarationFile(file) && - !isInAmbientContext(node)) { + if (!isDeclarationFile(file) && + !isInAmbientContext(node) && + nodeIsDecorated(node)) { hasDecorators = true; hasParameterDecorators = true; } @@ -1584,7 +1583,7 @@ namespace ts { if (isAsyncFunctionLike(node)) { hasAsyncFunctions = true; } - if (nodeIsDecorated(node) && nodeCanBeDecorated(node)) { + if (nodeIsDecorated(node)) { hasDecorators = true; } } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 69941a6095d..4636c8d144c 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -802,8 +802,8 @@ namespace ts { } /** - * Given an super call\property node returns a closest node where either - * - super call\property is legal in the node and not legal in the parent node the node. + * Given an super call\property node returns a closest node where either + * - super call\property is legal in the node and not legal in the parent node the node. * i.e. super call is legal in constructor but not legal in the class body. * - node is arrow function (so caller might need to call getSuperContainer in case it needs to climb higher) * - super call\property is definitely illegal in the node (but might be legal in some subnode) @@ -885,54 +885,28 @@ namespace ts { // property declarations are valid if their parent is a class declaration. return node.parent.kind === SyntaxKind.ClassDeclaration; - case SyntaxKind.Parameter: - // if the parameter's parent has a body and its grandparent is a class declaration, this is a valid target; - return (node.parent).body && node.parent.parent.kind === SyntaxKind.ClassDeclaration; - case SyntaxKind.GetAccessor: case SyntaxKind.SetAccessor: case SyntaxKind.MethodDeclaration: // if this method has a body and its parent is a class declaration, this is a valid target. - return (node).body && node.parent.kind === SyntaxKind.ClassDeclaration; + return (node).body !== undefined + && node.parent.kind === SyntaxKind.ClassDeclaration; + + case SyntaxKind.Parameter: + // if the parameter's parent has a body and its grandparent is a class declaration, this is a valid target; + return (node.parent).body !== undefined + && (node.parent.kind === SyntaxKind.Constructor + || node.parent.kind === SyntaxKind.MethodDeclaration + || node.parent.kind === SyntaxKind.SetAccessor) + && node.parent.parent.kind === SyntaxKind.ClassDeclaration; } return false; } export function nodeIsDecorated(node: Node): boolean { - switch (node.kind) { - case SyntaxKind.ClassDeclaration: - if (node.decorators) { - return true; - } - - return false; - - case SyntaxKind.PropertyDeclaration: - case SyntaxKind.Parameter: - if (node.decorators) { - return true; - } - - return false; - - case SyntaxKind.GetAccessor: - if ((node).body && node.decorators) { - return true; - } - - return false; - - case SyntaxKind.MethodDeclaration: - case SyntaxKind.SetAccessor: - if ((node).body && node.decorators) { - return true; - } - - return false; - } - - return false; + return node.decorators !== undefined + && nodeCanBeDecorated(node); } export function isPropertyAccessExpression(node: Node): node is PropertyAccessExpression { From d64b603e4bf07935d129ad38d4488b0bfaba11c0 Mon Sep 17 00:00:00 2001 From: Zhengbo Li Date: Wed, 20 Jan 2016 16:53:15 -0800 Subject: [PATCH 181/209] revert breaking changes --- src/compiler/commandLineParser.ts | 5 ++--- src/compiler/tsc.ts | 4 ++-- src/server/editorServices.ts | 32 ++++++++++++++++--------------- 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index af795377bc0..2e6727749f1 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -493,8 +493,7 @@ namespace ts { * @param basePath A root directory to resolve relative path entries in the config * file to. e.g. outDir */ - export function parseJsonConfigFileContent(json: any, host: ParseConfigHost, configFileName: string, existingOptions: CompilerOptions = {}): ParsedCommandLine { - const basePath = getDirectoryPath(configFileName); + export function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions: CompilerOptions = {}, configFileName?: string): ParsedCommandLine { const { options: optionsFromJsonConfigFile, errors } = convertCompilerOptionsFromJson(json["compilerOptions"], basePath, configFileName); const options = extend(existingOptions, optionsFromJsonConfigFile); @@ -524,7 +523,7 @@ namespace ts { for (const extension of supportedExtensions) { const filesInDirWithExtension = host.readDirectory(basePath, extension, exclude); for (const fileName of filesInDirWithExtension) { - // .ts extension would read the .d.ts extension files too but since .d.ts is lower priority extension, + // .ts extension would read the .d.ts extension files too but since .d.ts is lower priority extension, // lets pick them when its turn comes up if (extension === ".ts" && fileExtensionIs(fileName, ".d.ts")) { continue; diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index 94dc8b18847..9b2457d0916 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -340,7 +340,7 @@ namespace ts { if (sys.watchDirectory && configFileName) { const directory = ts.getDirectoryPath(configFileName); directoryWatcher = sys.watchDirectory( - // When the configFileName is just "tsconfig.json", the watched directory should be + // When the configFileName is just "tsconfig.json", the watched directory should be // the current direcotry; if there is a given "project" parameter, then the configFileName // is an absolute file name. directory == "" ? "." : directory, @@ -376,7 +376,7 @@ namespace ts { sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); return; } - const configParseResult = parseJsonConfigFileContent(configObject, sys, configFileName, commandLine.options); + const configParseResult = parseJsonConfigFileContent(configObject, sys, getDirectoryPath(configFileName), commandLine.options); if (configParseResult.errors.length > 0) { reportDiagnostics(configParseResult.errors, /* compilerHost */ undefined); sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index a43252868d8..e2ec5cc159f 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -120,7 +120,7 @@ namespace ts.server { if (!resolution) { const existingResolution = currentResolutionsInFile && ts.lookUp(currentResolutionsInFile, moduleName); if (moduleResolutionIsValid(existingResolution)) { - // ok, it is safe to use existing module resolution results + // ok, it is safe to use existing module resolution results resolution = existingResolution; } else { @@ -145,8 +145,8 @@ namespace ts.server { } if (resolution.resolvedModule) { - // TODO: consider checking failedLookupLocations - // TODO: use lastCheckTime to track expiration for module name resolution + // TODO: consider checking failedLookupLocations + // TODO: use lastCheckTime to track expiration for module name resolution return true; } @@ -483,7 +483,7 @@ namespace ts.server { openFileRootsConfigured: ScriptInfo[] = []; // a path to directory watcher map that detects added tsconfig files directoryWatchersForTsconfig: ts.Map = {}; - // count of how many projects are using the directory watcher. If the + // count of how many projects are using the directory watcher. If the // number becomes 0 for a watcher, then we should close it. directoryWatchersRefCount: ts.Map = {}; hostConfiguration: HostConfiguration; @@ -564,11 +564,11 @@ namespace ts.server { // We check if the project file list has changed. If so, we update the project. if (!arrayIsEqualTo(currentRootFiles && currentRootFiles.sort(), newRootFiles && newRootFiles.sort())) { // For configured projects, the change is made outside the tsconfig file, and - // it is not likely to affect the project for other files opened by the client. We can + // it is not likely to affect the project for other files opened by the client. We can // just update the current project. this.updateConfiguredProject(project); - // Call updateProjectStructure to clean up inferred projects we may have + // Call updateProjectStructure to clean up inferred projects we may have // created for the new files this.updateProjectStructure(); } @@ -792,8 +792,8 @@ namespace ts.server { * @param info The file that has been closed or newly configured */ closeOpenFile(info: ScriptInfo) { - // Closing file should trigger re-reading the file content from disk. This is - // because the user may chose to discard the buffer content before saving + // Closing file should trigger re-reading the file content from disk. This is + // because the user may chose to discard the buffer content before saving // to the disk, and the server's version of the file can be out of sync. info.svc.reloadFromFile(info.fileName); @@ -891,8 +891,8 @@ namespace ts.server { } /** - * This function is to update the project structure for every projects. - * It is called on the premise that all the configured projects are + * This function is to update the project structure for every projects. + * It is called on the premise that all the configured projects are * up to date. */ updateProjectStructure() { @@ -946,7 +946,7 @@ namespace ts.server { if (rootFile.defaultProject && rootFile.defaultProject.isConfiguredProject()) { // If the root file has already been added into a configured project, - // meaning the original inferred project is gone already. + // meaning the original inferred project is gone already. if (!rootedProject.isConfiguredProject()) { this.removeProject(rootedProject); } @@ -1059,9 +1059,9 @@ namespace ts.server { } /** - * This function tries to search for a tsconfig.json for the given file. If we found it, + * This function tries to search for a tsconfig.json for the given file. If we found it, * we first detect if there is already a configured project created for it: if so, we re-read - * the tsconfig file content and update the project; otherwise we create a new one. + * the tsconfig file content and update the project; otherwise we create a new one. */ openOrUpdateConfiguredProjectForFile(fileName: string) { const searchPath = ts.normalizePath(getDirectoryPath(fileName)); @@ -1178,13 +1178,15 @@ namespace ts.server { configFileToProjectOptions(configFilename: string): { succeeded: boolean, projectOptions?: ProjectOptions, error?: ProjectOpenResult } { configFilename = ts.normalizePath(configFilename); + // file references will be relative to dirPath (or absolute) + const dirPath = ts.getDirectoryPath(configFilename); const contents = this.host.readFile(configFilename); const rawConfig: { config?: ProjectOptions; error?: Diagnostic; } = ts.parseConfigFileTextToJson(configFilename, contents); if (rawConfig.error) { return { succeeded: false, error: rawConfig.error }; } else { - const parsedCommandLine = ts.parseJsonConfigFileContent(rawConfig.config, this.host, configFilename); + const parsedCommandLine = ts.parseJsonConfigFileContent(rawConfig.config, this.host, dirPath, /*existingOptions*/ {}, configFilename); Debug.assert(!!parsedCommandLine.fileNames); if (parsedCommandLine.errors && (parsedCommandLine.errors.length > 0)) { @@ -1263,7 +1265,7 @@ namespace ts.server { info = this.openFile(fileName, /*openedByClient*/ false); } else { - // if the root file was opened by client, it would belong to either + // if the root file was opened by client, it would belong to either // openFileRoots or openFileReferenced. if (info.isOpen) { if (this.openFileRoots.indexOf(info) >= 0) { From 831daead55cbb9f1a52a7690950d1a11139ec030 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Thu, 21 Jan 2016 10:01:40 -0800 Subject: [PATCH 182/209] Updated failing test --- .../reference/asyncFunctionsAcrossFiles.js | 34 +++++++------------ 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/tests/baselines/reference/asyncFunctionsAcrossFiles.js b/tests/baselines/reference/asyncFunctionsAcrossFiles.js index 56ff9a42b7c..05b8ca56421 100644 --- a/tests/baselines/reference/asyncFunctionsAcrossFiles.js +++ b/tests/baselines/reference/asyncFunctionsAcrossFiles.js @@ -16,17 +16,12 @@ export const b = { }; //// [b.js] -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) { - return new Promise(function (resolve, reject) { - generator = generator.call(thisArg, _arguments); - function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); } - function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } - function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } - function step(verb, value) { - var result = generator[verb](value); - result.done ? resolve(result.value) : cast(result.value).then(onfulfill, onreject); - } - step("next", void 0); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new P(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.call(thisArg, _arguments)).next()); }); }; import { a } from './a'; @@ -36,17 +31,12 @@ export const b = { }) }; //// [a.js] -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) { - return new Promise(function (resolve, reject) { - generator = generator.call(thisArg, _arguments); - function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); } - function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } - function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } - function step(verb, value) { - var result = generator[verb](value); - result.done ? resolve(result.value) : cast(result.value).then(onfulfill, onreject); - } - step("next", void 0); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new P(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.call(thisArg, _arguments)).next()); }); }; import { b } from './b'; From ea94a05feb963db390b875894d52dfedcde40d5f Mon Sep 17 00:00:00 2001 From: Zhengbo Li Date: Thu, 21 Jan 2016 10:43:07 -0800 Subject: [PATCH 183/209] Add support for jsconfig in shims --- src/services/shims.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/services/shims.ts b/src/services/shims.ts index 3dc28763b17..9ca3f19244d 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -946,7 +946,8 @@ namespace ts { }; } - const configFile = parseJsonConfigFileContent(result.config, this.host, getDirectoryPath(normalizeSlashes(fileName))); + const normalizedFileName = normalizeSlashes(fileName); + const configFile = parseJsonConfigFileContent(result.config, this.host, getDirectoryPath(normalizedFileName), /*existingOptions*/ {}, normalizedFileName); return { options: configFile.options, From 2653a8da461eb9c43e0f6fdb47c29c0a95b9741e Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Thu, 21 Jan 2016 12:27:11 -0800 Subject: [PATCH 184/209] Treat .js as JSX --- src/compiler/parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index e391408b419..16196e277dc 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -546,7 +546,7 @@ namespace ts { function getLanguageVariant(fileName: string) { // .tsx and .jsx files are treated as jsx language variant. - return fileExtensionIs(fileName, ".tsx") || fileExtensionIs(fileName, ".jsx") ? LanguageVariant.JSX : LanguageVariant.Standard; + return fileExtensionIs(fileName, ".tsx") || fileExtensionIs(fileName, ".jsx") || fileExtensionIs(fileName, '.js') ? LanguageVariant.JSX : LanguageVariant.Standard; } function initializeState(fileName: string, _sourceText: string, languageVersion: ScriptTarget, isJavaScriptFile: boolean, _syntaxCursor: IncrementalParser.SyntaxCursor) { From f252b9dd58fe895613573b00efacbeb7daf1a981 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Thu, 21 Jan 2016 13:35:58 -0800 Subject: [PATCH 185/209] handle undefined entry as export specifier --- src/compiler/checker.ts | 2 +- .../reference/reExportUndefined1.errors.txt | 8 +++++++ .../baselines/reference/reExportUndefined1.js | 6 ++++++ .../baselines/reference/reExportUndefined2.js | 20 ++++++++++++++++++ .../reference/reExportUndefined2.symbols | 20 ++++++++++++++++++ .../reference/reExportUndefined2.types | 21 +++++++++++++++++++ tests/cases/compiler/reExportUndefined1.ts | 4 ++++ tests/cases/compiler/reExportUndefined2.ts | 10 +++++++++ 8 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 tests/baselines/reference/reExportUndefined1.errors.txt create mode 100644 tests/baselines/reference/reExportUndefined1.js create mode 100644 tests/baselines/reference/reExportUndefined2.js create mode 100644 tests/baselines/reference/reExportUndefined2.symbols create mode 100644 tests/baselines/reference/reExportUndefined2.types create mode 100644 tests/cases/compiler/reExportUndefined1.ts create mode 100644 tests/cases/compiler/reExportUndefined2.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index edc1868401d..b3f1cfe6c74 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -14476,7 +14476,7 @@ namespace ts { // find immediate value referenced by exported name (SymbolFlags.Alias is set so we don't chase down aliases) const symbol = resolveName(exportedName, exportedName.text, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); - if (symbol && isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0]))) { + if (symbol && (symbol === undefinedSymbol || isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0])))) { error(exportedName, Diagnostics.Cannot_re_export_name_that_is_not_defined_in_the_module); } else { diff --git a/tests/baselines/reference/reExportUndefined1.errors.txt b/tests/baselines/reference/reExportUndefined1.errors.txt new file mode 100644 index 00000000000..ff3259ae37e --- /dev/null +++ b/tests/baselines/reference/reExportUndefined1.errors.txt @@ -0,0 +1,8 @@ +tests/cases/compiler/a.ts(2,10): error TS2661: Cannot re-export name that is not defined in the module. + + +==== tests/cases/compiler/a.ts (1 errors) ==== + + export { undefined }; + ~~~~~~~~~ +!!! error TS2661: Cannot re-export name that is not defined in the module. \ No newline at end of file diff --git a/tests/baselines/reference/reExportUndefined1.js b/tests/baselines/reference/reExportUndefined1.js new file mode 100644 index 00000000000..94729e4f544 --- /dev/null +++ b/tests/baselines/reference/reExportUndefined1.js @@ -0,0 +1,6 @@ +//// [a.ts] + +export { undefined }; + +//// [a.js] +"use strict"; diff --git a/tests/baselines/reference/reExportUndefined2.js b/tests/baselines/reference/reExportUndefined2.js new file mode 100644 index 00000000000..53b78599cbe --- /dev/null +++ b/tests/baselines/reference/reExportUndefined2.js @@ -0,0 +1,20 @@ +//// [tests/cases/compiler/reExportUndefined2.ts] //// + +//// [a.ts] + +var undefined; +export { undefined }; + +//// [b.ts] +import { undefined } from "./a"; +declare function use(a: number); +use(undefined); + +//// [a.js] +"use strict"; +var undefined; +exports.undefined = undefined; +//// [b.js] +"use strict"; +var a_1 = require("./a"); +use(a_1.undefined); diff --git a/tests/baselines/reference/reExportUndefined2.symbols b/tests/baselines/reference/reExportUndefined2.symbols new file mode 100644 index 00000000000..c4f532ed6dc --- /dev/null +++ b/tests/baselines/reference/reExportUndefined2.symbols @@ -0,0 +1,20 @@ +=== tests/cases/compiler/a.ts === + +var undefined; +>undefined : Symbol(undefined, Decl(a.ts, 1, 3)) + +export { undefined }; +>undefined : Symbol(undefined, Decl(a.ts, 2, 8)) + +=== tests/cases/compiler/b.ts === +import { undefined } from "./a"; +>undefined : Symbol(undefined, Decl(b.ts, 0, 8)) + +declare function use(a: number); +>use : Symbol(use, Decl(b.ts, 0, 32)) +>a : Symbol(a, Decl(b.ts, 1, 21)) + +use(undefined); +>use : Symbol(use, Decl(b.ts, 0, 32)) +>undefined : Symbol(undefined, Decl(b.ts, 0, 8)) + diff --git a/tests/baselines/reference/reExportUndefined2.types b/tests/baselines/reference/reExportUndefined2.types new file mode 100644 index 00000000000..d3f3dc9d726 --- /dev/null +++ b/tests/baselines/reference/reExportUndefined2.types @@ -0,0 +1,21 @@ +=== tests/cases/compiler/a.ts === + +var undefined; +>undefined : any + +export { undefined }; +>undefined : any + +=== tests/cases/compiler/b.ts === +import { undefined } from "./a"; +>undefined : any + +declare function use(a: number); +>use : (a: number) => any +>a : number + +use(undefined); +>use(undefined) : any +>use : (a: number) => any +>undefined : any + diff --git a/tests/cases/compiler/reExportUndefined1.ts b/tests/cases/compiler/reExportUndefined1.ts new file mode 100644 index 00000000000..7d949ca1c28 --- /dev/null +++ b/tests/cases/compiler/reExportUndefined1.ts @@ -0,0 +1,4 @@ +// @module: commonjs + +// @filename: a.ts +export { undefined }; \ No newline at end of file diff --git a/tests/cases/compiler/reExportUndefined2.ts b/tests/cases/compiler/reExportUndefined2.ts new file mode 100644 index 00000000000..0d3e381fcfa --- /dev/null +++ b/tests/cases/compiler/reExportUndefined2.ts @@ -0,0 +1,10 @@ +// @module: commonjs + +// @filename: a.ts +var undefined; +export { undefined }; + +// @filename: b.ts +import { undefined } from "./a"; +declare function use(a: number); +use(undefined); \ No newline at end of file From 4b284abd5199b22e21d4770325759235ec523447 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Thu, 21 Jan 2016 14:14:31 -0800 Subject: [PATCH 186/209] Update LKG --- lib/lib.core.d.ts | 1 - lib/lib.core.es6.d.ts | 17 +- lib/lib.d.ts | 46 +- lib/lib.dom.d.ts | 45 +- lib/lib.es6.d.ts | 64 +- lib/lib.webworker.d.ts | 4 +- lib/tsc.js | 5684 ++++++++++++----------- lib/tsserver.js | 7591 ++++++++++++++++-------------- lib/typescript.d.ts | 318 +- lib/typescript.js | 8622 +++++++++++++++++++---------------- lib/typescriptServices.d.ts | 318 +- lib/typescriptServices.js | 8622 +++++++++++++++++++---------------- 12 files changed, 16982 insertions(+), 14350 deletions(-) diff --git a/lib/lib.core.d.ts b/lib/lib.core.d.ts index 50fd8a8e495..145564d7044 100644 --- a/lib/lib.core.d.ts +++ b/lib/lib.core.d.ts @@ -14,7 +14,6 @@ and limitations under the License. ***************************************************************************** */ /// - ///////////////////////////// /// ECMAScript APIs ///////////////////////////// diff --git a/lib/lib.core.es6.d.ts b/lib/lib.core.es6.d.ts index 0470c4827cd..753c3bbf65f 100644 --- a/lib/lib.core.es6.d.ts +++ b/lib/lib.core.es6.d.ts @@ -14,7 +14,6 @@ and limitations under the License. ***************************************************************************** */ /// - ///////////////////////////// /// ECMAScript APIs ///////////////////////////// @@ -5121,15 +5120,15 @@ interface PromiseConstructor { * @param values An array of Promises. * @returns A new Promise. */ - all(values: [T1 | PromiseLike, T2 | PromiseLike]): Promise<[T1, T2]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike]): Promise<[T1, T2, T3]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike ]): Promise<[T1, T2, T3, T4]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike]): Promise<[T1, T2, T3, T4, T5]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>; all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike, T10 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>; + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>; + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>; + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7]>; + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6]>; + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike]): Promise<[T1, T2, T3, T4, T5]>; + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike ]): Promise<[T1, T2, T3, T4]>; + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike]): Promise<[T1, T2, T3]>; + all(values: [T1 | PromiseLike, T2 | PromiseLike]): Promise<[T1, T2]>; all(values: Iterable>): Promise; /** diff --git a/lib/lib.d.ts b/lib/lib.d.ts index 155d864619e..5b2c53c7cc1 100644 --- a/lib/lib.d.ts +++ b/lib/lib.d.ts @@ -14,7 +14,6 @@ and limitations under the License. ***************************************************************************** */ /// - ///////////////////////////// /// ECMAScript APIs ///////////////////////////// @@ -5296,7 +5295,7 @@ interface Console { select(element: Element): void; time(timerName?: string): void; timeEnd(timerName?: string): void; - trace(): void; + trace(message?: any, ...optionalParams: any[]): void; warn(message?: any, ...optionalParams: any[]): void; } @@ -5555,9 +5554,9 @@ interface DataTransferItemList { length: number; add(data: File): DataTransferItem; clear(): void; - item(index: number): File; + item(index: number): DataTransferItem; remove(index: number): void; - [index: number]: File; + [index: number]: DataTransferItem; } declare var DataTransferItemList: { @@ -6610,6 +6609,8 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven * @param content The text and HTML tags to write. */ writeln(...content: string[]): void; + createElement(tagName: "picture"): HTMLPictureElement; + getElementsByTagName(tagname: "picture"): NodeListOf; addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void; addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; @@ -7022,6 +7023,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec webkitRequestFullscreen(): void; getElementsByClassName(classNames: string): NodeListOf; matches(selector: string): boolean; + getElementsByTagName(tagname: "picture"): NodeListOf; addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; @@ -7811,6 +7813,7 @@ interface HTMLCanvasElement extends HTMLElement { * @param type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image. */ toDataURL(type?: string, ...args: any[]): string; + toBlob(): Blob; } declare var HTMLCanvasElement: { @@ -10965,7 +10968,7 @@ interface IDBDatabase extends EventTarget { objectStoreNames: DOMStringList; onabort: (ev: Event) => any; onerror: (ev: Event) => any; - version: string; + version: number; close(): void; createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore; deleteObjectStore(name: string): void; @@ -11681,7 +11684,7 @@ declare var MediaQueryList: { interface MediaSource extends EventTarget { activeSourceBuffers: SourceBufferList; duration: number; - readyState: number; + readyState: string; sourceBuffers: SourceBufferList; addSourceBuffer(type: string): SourceBuffer; endOfStream(error?: number): void; @@ -14410,17 +14413,16 @@ declare var Storage: { } interface StorageEvent extends Event { - key: string; - newValue: any; - oldValue: any; - storageArea: Storage; url: string; - initStorageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, keyArg: string, oldValueArg: any, newValueArg: any, urlArg: string, storageAreaArg: Storage): void; + key?: string; + oldValue?: string; + newValue?: string; + storageArea?: Storage; } declare var StorageEvent: { prototype: StorageEvent; - new(): StorageEvent; + new (type: string, eventInitDict?: StorageEventInit): StorageEvent; } interface StyleMedia { @@ -16018,7 +16020,7 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window msMatchMedia(mediaQuery: string): MediaQueryList; msRequestAnimationFrame(callback: FrameRequestCallback): number; msWriteProfilerMark(profilerMarkName: string): void; - open(url?: string, target?: string, features?: string, replace?: boolean): any; + open(url?: string, target?: string, features?: string, replace?: boolean): Window; postMessage(message: any, targetOrigin: string, ports?: any): void; print(): void; prompt(message?: string, _default?: string): string; @@ -16620,6 +16622,14 @@ interface XMLHttpRequestEventTarget { addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; } +interface StorageEventInit extends EventInit { + key?: string; + oldValue?: string; + newValue?: string; + url: string; + storageArea?: Storage; +} + interface IDBObjectStoreParameters { keyPath?: string | string[]; autoIncrement?: boolean; @@ -16674,6 +16684,14 @@ declare var HTMLTemplateElement: { new(): HTMLTemplateElement; } +interface HTMLPictureElement extends HTMLElement { +} + +declare var HTMLPictureElement: { + prototype: HTMLPictureElement; + new(): HTMLPictureElement; +} + declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject; interface ErrorEventHandler { @@ -16870,7 +16888,7 @@ declare function msCancelRequestAnimationFrame(handle: number): void; declare function msMatchMedia(mediaQuery: string): MediaQueryList; declare function msRequestAnimationFrame(callback: FrameRequestCallback): number; declare function msWriteProfilerMark(profilerMarkName: string): void; -declare function open(url?: string, target?: string, features?: string, replace?: boolean): any; +declare function open(url?: string, target?: string, features?: string, replace?: boolean): Window; declare function postMessage(message: any, targetOrigin: string, ports?: any): void; declare function print(): void; declare function prompt(message?: string, _default?: string): string; diff --git a/lib/lib.dom.d.ts b/lib/lib.dom.d.ts index b2ad2c73df6..542149d7719 100644 --- a/lib/lib.dom.d.ts +++ b/lib/lib.dom.d.ts @@ -1472,7 +1472,7 @@ interface Console { select(element: Element): void; time(timerName?: string): void; timeEnd(timerName?: string): void; - trace(): void; + trace(message?: any, ...optionalParams: any[]): void; warn(message?: any, ...optionalParams: any[]): void; } @@ -1731,9 +1731,9 @@ interface DataTransferItemList { length: number; add(data: File): DataTransferItem; clear(): void; - item(index: number): File; + item(index: number): DataTransferItem; remove(index: number): void; - [index: number]: File; + [index: number]: DataTransferItem; } declare var DataTransferItemList: { @@ -2786,6 +2786,8 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven * @param content The text and HTML tags to write. */ writeln(...content: string[]): void; + createElement(tagName: "picture"): HTMLPictureElement; + getElementsByTagName(tagname: "picture"): NodeListOf; addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void; addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; @@ -3198,6 +3200,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec webkitRequestFullscreen(): void; getElementsByClassName(classNames: string): NodeListOf; matches(selector: string): boolean; + getElementsByTagName(tagname: "picture"): NodeListOf; addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; @@ -3987,6 +3990,7 @@ interface HTMLCanvasElement extends HTMLElement { * @param type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image. */ toDataURL(type?: string, ...args: any[]): string; + toBlob(): Blob; } declare var HTMLCanvasElement: { @@ -7141,7 +7145,7 @@ interface IDBDatabase extends EventTarget { objectStoreNames: DOMStringList; onabort: (ev: Event) => any; onerror: (ev: Event) => any; - version: string; + version: number; close(): void; createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore; deleteObjectStore(name: string): void; @@ -7857,7 +7861,7 @@ declare var MediaQueryList: { interface MediaSource extends EventTarget { activeSourceBuffers: SourceBufferList; duration: number; - readyState: number; + readyState: string; sourceBuffers: SourceBufferList; addSourceBuffer(type: string): SourceBuffer; endOfStream(error?: number): void; @@ -10586,17 +10590,16 @@ declare var Storage: { } interface StorageEvent extends Event { - key: string; - newValue: any; - oldValue: any; - storageArea: Storage; url: string; - initStorageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, keyArg: string, oldValueArg: any, newValueArg: any, urlArg: string, storageAreaArg: Storage): void; + key?: string; + oldValue?: string; + newValue?: string; + storageArea?: Storage; } declare var StorageEvent: { prototype: StorageEvent; - new(): StorageEvent; + new (type: string, eventInitDict?: StorageEventInit): StorageEvent; } interface StyleMedia { @@ -12194,7 +12197,7 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window msMatchMedia(mediaQuery: string): MediaQueryList; msRequestAnimationFrame(callback: FrameRequestCallback): number; msWriteProfilerMark(profilerMarkName: string): void; - open(url?: string, target?: string, features?: string, replace?: boolean): any; + open(url?: string, target?: string, features?: string, replace?: boolean): Window; postMessage(message: any, targetOrigin: string, ports?: any): void; print(): void; prompt(message?: string, _default?: string): string; @@ -12796,6 +12799,14 @@ interface XMLHttpRequestEventTarget { addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; } +interface StorageEventInit extends EventInit { + key?: string; + oldValue?: string; + newValue?: string; + url: string; + storageArea?: Storage; +} + interface IDBObjectStoreParameters { keyPath?: string | string[]; autoIncrement?: boolean; @@ -12850,6 +12861,14 @@ declare var HTMLTemplateElement: { new(): HTMLTemplateElement; } +interface HTMLPictureElement extends HTMLElement { +} + +declare var HTMLPictureElement: { + prototype: HTMLPictureElement; + new(): HTMLPictureElement; +} + declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject; interface ErrorEventHandler { @@ -13046,7 +13065,7 @@ declare function msCancelRequestAnimationFrame(handle: number): void; declare function msMatchMedia(mediaQuery: string): MediaQueryList; declare function msRequestAnimationFrame(callback: FrameRequestCallback): number; declare function msWriteProfilerMark(profilerMarkName: string): void; -declare function open(url?: string, target?: string, features?: string, replace?: boolean): any; +declare function open(url?: string, target?: string, features?: string, replace?: boolean): Window; declare function postMessage(message: any, targetOrigin: string, ports?: any): void; declare function print(): void; declare function prompt(message?: string, _default?: string): string; diff --git a/lib/lib.es6.d.ts b/lib/lib.es6.d.ts index ef3399ba804..70f464ad48e 100644 --- a/lib/lib.es6.d.ts +++ b/lib/lib.es6.d.ts @@ -13,6 +13,7 @@ See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ +/// declare type PropertyKey = string | number | symbol; interface Symbol { @@ -1296,15 +1297,15 @@ interface PromiseConstructor { * @param values An array of Promises. * @returns A new Promise. */ - all(values: [T1 | PromiseLike, T2 | PromiseLike]): Promise<[T1, T2]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike]): Promise<[T1, T2, T3]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike ]): Promise<[T1, T2, T3, T4]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike]): Promise<[T1, T2, T3, T4, T5]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>; all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike, T10 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>; + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>; + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>; + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7]>; + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6]>; + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike]): Promise<[T1, T2, T3, T4, T5]>; + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike ]): Promise<[T1, T2, T3, T4]>; + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike]): Promise<[T1, T2, T3]>; + all(values: [T1 | PromiseLike, T2 | PromiseLike]): Promise<[T1, T2]>; all(values: Iterable>): Promise; /** @@ -1346,8 +1347,6 @@ interface PromiseConstructor { } declare var Promise: PromiseConstructor; -/// - ///////////////////////////// /// ECMAScript APIs ///////////////////////////// @@ -6629,7 +6628,7 @@ interface Console { select(element: Element): void; time(timerName?: string): void; timeEnd(timerName?: string): void; - trace(): void; + trace(message?: any, ...optionalParams: any[]): void; warn(message?: any, ...optionalParams: any[]): void; } @@ -6888,9 +6887,9 @@ interface DataTransferItemList { length: number; add(data: File): DataTransferItem; clear(): void; - item(index: number): File; + item(index: number): DataTransferItem; remove(index: number): void; - [index: number]: File; + [index: number]: DataTransferItem; } declare var DataTransferItemList: { @@ -7943,6 +7942,8 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven * @param content The text and HTML tags to write. */ writeln(...content: string[]): void; + createElement(tagName: "picture"): HTMLPictureElement; + getElementsByTagName(tagname: "picture"): NodeListOf; addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void; addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; @@ -8355,6 +8356,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec webkitRequestFullscreen(): void; getElementsByClassName(classNames: string): NodeListOf; matches(selector: string): boolean; + getElementsByTagName(tagname: "picture"): NodeListOf; addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; @@ -9144,6 +9146,7 @@ interface HTMLCanvasElement extends HTMLElement { * @param type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image. */ toDataURL(type?: string, ...args: any[]): string; + toBlob(): Blob; } declare var HTMLCanvasElement: { @@ -12298,7 +12301,7 @@ interface IDBDatabase extends EventTarget { objectStoreNames: DOMStringList; onabort: (ev: Event) => any; onerror: (ev: Event) => any; - version: string; + version: number; close(): void; createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore; deleteObjectStore(name: string): void; @@ -13014,7 +13017,7 @@ declare var MediaQueryList: { interface MediaSource extends EventTarget { activeSourceBuffers: SourceBufferList; duration: number; - readyState: number; + readyState: string; sourceBuffers: SourceBufferList; addSourceBuffer(type: string): SourceBuffer; endOfStream(error?: number): void; @@ -15743,17 +15746,16 @@ declare var Storage: { } interface StorageEvent extends Event { - key: string; - newValue: any; - oldValue: any; - storageArea: Storage; url: string; - initStorageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, keyArg: string, oldValueArg: any, newValueArg: any, urlArg: string, storageAreaArg: Storage): void; + key?: string; + oldValue?: string; + newValue?: string; + storageArea?: Storage; } declare var StorageEvent: { prototype: StorageEvent; - new(): StorageEvent; + new (type: string, eventInitDict?: StorageEventInit): StorageEvent; } interface StyleMedia { @@ -17351,7 +17353,7 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window msMatchMedia(mediaQuery: string): MediaQueryList; msRequestAnimationFrame(callback: FrameRequestCallback): number; msWriteProfilerMark(profilerMarkName: string): void; - open(url?: string, target?: string, features?: string, replace?: boolean): any; + open(url?: string, target?: string, features?: string, replace?: boolean): Window; postMessage(message: any, targetOrigin: string, ports?: any): void; print(): void; prompt(message?: string, _default?: string): string; @@ -17953,6 +17955,14 @@ interface XMLHttpRequestEventTarget { addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; } +interface StorageEventInit extends EventInit { + key?: string; + oldValue?: string; + newValue?: string; + url: string; + storageArea?: Storage; +} + interface IDBObjectStoreParameters { keyPath?: string | string[]; autoIncrement?: boolean; @@ -18007,6 +18017,14 @@ declare var HTMLTemplateElement: { new(): HTMLTemplateElement; } +interface HTMLPictureElement extends HTMLElement { +} + +declare var HTMLPictureElement: { + prototype: HTMLPictureElement; + new(): HTMLPictureElement; +} + declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject; interface ErrorEventHandler { @@ -18203,7 +18221,7 @@ declare function msCancelRequestAnimationFrame(handle: number): void; declare function msMatchMedia(mediaQuery: string): MediaQueryList; declare function msRequestAnimationFrame(callback: FrameRequestCallback): number; declare function msWriteProfilerMark(profilerMarkName: string): void; -declare function open(url?: string, target?: string, features?: string, replace?: boolean): any; +declare function open(url?: string, target?: string, features?: string, replace?: boolean): Window; declare function postMessage(message: any, targetOrigin: string, ports?: any): void; declare function print(): void; declare function prompt(message?: string, _default?: string): string; diff --git a/lib/lib.webworker.d.ts b/lib/lib.webworker.d.ts index 1138538a1b8..33e0d0f9ded 100644 --- a/lib/lib.webworker.d.ts +++ b/lib/lib.webworker.d.ts @@ -286,7 +286,7 @@ interface Console { select(element: any): void; time(timerName?: string): void; timeEnd(timerName?: string): void; - trace(): void; + trace(message?: any, ...optionalParams: any[]): void; warn(message?: any, ...optionalParams: any[]): void; } @@ -526,7 +526,7 @@ interface IDBDatabase extends EventTarget { objectStoreNames: DOMStringList; onabort: (ev: Event) => any; onerror: (ev: Event) => any; - version: string; + version: number; close(): void; createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore; deleteObjectStore(name: string): void; diff --git a/lib/tsc.js b/lib/tsc.js index 543deadb433..2208201fef0 100644 --- a/lib/tsc.js +++ b/lib/tsc.js @@ -19,7 +19,7 @@ var ts; function OperationCanceledException() { } return OperationCanceledException; - })(); + }()); ts.OperationCanceledException = OperationCanceledException; (function (ExitStatus) { ExitStatus[ExitStatus["Success"] = 0] = "Success"; @@ -636,7 +636,8 @@ var ts; if (directoryComponents.length > 1 && lastOrUndefined(directoryComponents) === "") { directoryComponents.length--; } - for (var joinStartIndex = 0; joinStartIndex < pathComponents.length && joinStartIndex < directoryComponents.length; joinStartIndex++) { + var joinStartIndex; + for (joinStartIndex = 0; joinStartIndex < pathComponents.length && joinStartIndex < directoryComponents.length; joinStartIndex++) { if (getCanonicalFileName(directoryComponents[joinStartIndex]) !== getCanonicalFileName(pathComponents[joinStartIndex])) { break; } @@ -773,6 +774,12 @@ var ts; return copiedList; } ts.copyListRemovingItem = copyListRemovingItem; + function createGetCanonicalFileName(useCaseSensitivefileNames) { + return useCaseSensitivefileNames + ? (function (fileName) { return fileName; }) + : (function (fileName) { return fileName.toLowerCase(); }); + } + ts.createGetCanonicalFileName = createGetCanonicalFileName; })(ts || (ts = {})); var ts; (function (ts) { @@ -911,7 +918,7 @@ var ts; var _fs = require("fs"); var _path = require("path"); var _os = require("os"); - function createWatchedFileSet(interval, chunkSize) { + function createPollingWatchedFileSet(interval, chunkSize) { if (interval === void 0) { interval = 2500; } if (chunkSize === void 0) { chunkSize = 30; } var watchedFiles = []; @@ -925,13 +932,13 @@ var ts; if (!watchedFile) { return; } - _fs.stat(watchedFile.fileName, function (err, stats) { + _fs.stat(watchedFile.filePath, function (err, stats) { if (err) { - watchedFile.callback(watchedFile.fileName); + watchedFile.callback(watchedFile.filePath); } else if (watchedFile.mtime.getTime() !== stats.mtime.getTime()) { - watchedFile.mtime = getModifiedTime(watchedFile.fileName); - watchedFile.callback(watchedFile.fileName, watchedFile.mtime.getTime() === 0); + watchedFile.mtime = getModifiedTime(watchedFile.filePath); + watchedFile.callback(watchedFile.filePath, watchedFile.mtime.getTime() === 0); } }); } @@ -954,11 +961,11 @@ var ts; nextFileToCheck = nextToCheck; }, interval); } - function addFile(fileName, callback) { + function addFile(filePath, callback) { var file = { - fileName: fileName, + filePath: filePath, callback: callback, - mtime: getModifiedTime(fileName) + mtime: getModifiedTime(filePath) }; watchedFiles.push(file); if (watchedFiles.length === 1) { @@ -977,7 +984,77 @@ var ts; removeFile: removeFile }; } + function createWatchedFileSet() { + var dirWatchers = ts.createFileMap(); + var fileWatcherCallbacks = ts.createFileMap(); + return { addFile: addFile, removeFile: removeFile }; + function reduceDirWatcherRefCountForFile(filePath) { + var dirPath = ts.getDirectoryPath(filePath); + if (dirWatchers.contains(dirPath)) { + var watcher = dirWatchers.get(dirPath); + watcher.referenceCount -= 1; + if (watcher.referenceCount <= 0) { + watcher.close(); + dirWatchers.remove(dirPath); + } + } + } + function addDirWatcher(dirPath) { + if (dirWatchers.contains(dirPath)) { + var watcher_1 = dirWatchers.get(dirPath); + watcher_1.referenceCount += 1; + return; + } + var watcher = _fs.watch(dirPath, { persistent: true }, function (eventName, relativeFileName) { return fileEventHandler(eventName, relativeFileName, dirPath); }); + watcher.referenceCount = 1; + dirWatchers.set(dirPath, watcher); + return; + } + function addFileWatcherCallback(filePath, callback) { + if (fileWatcherCallbacks.contains(filePath)) { + fileWatcherCallbacks.get(filePath).push(callback); + } + else { + fileWatcherCallbacks.set(filePath, [callback]); + } + } + function addFile(filePath, callback) { + addFileWatcherCallback(filePath, callback); + addDirWatcher(ts.getDirectoryPath(filePath)); + return { filePath: filePath, callback: callback }; + } + function removeFile(watchedFile) { + removeFileWatcherCallback(watchedFile.filePath, watchedFile.callback); + reduceDirWatcherRefCountForFile(watchedFile.filePath); + } + function removeFileWatcherCallback(filePath, callback) { + if (fileWatcherCallbacks.contains(filePath)) { + var newCallbacks = ts.copyListRemovingItem(callback, fileWatcherCallbacks.get(filePath)); + if (newCallbacks.length === 0) { + fileWatcherCallbacks.remove(filePath); + } + else { + fileWatcherCallbacks.set(filePath, newCallbacks); + } + } + } + function fileEventHandler(eventName, relativeFileName, baseDirPath) { + var filePath = typeof relativeFileName !== "string" + ? undefined + : ts.toPath(relativeFileName, baseDirPath, ts.createGetCanonicalFileName(ts.sys.useCaseSensitiveFileNames)); + if (eventName === "change" && fileWatcherCallbacks.contains(filePath)) { + for (var _i = 0, _a = fileWatcherCallbacks.get(filePath); _i < _a.length; _i++) { + var fileCallback = _a[_i]; + fileCallback(filePath); + } + } + } + } + var pollingWatchedFileSet = createPollingWatchedFileSet(); var watchedFileSet = createWatchedFileSet(); + function isNode4OrLater() { + return parseInt(process.version.charAt(1)) >= 4; + } var platform = _os.platform(); var useCaseSensitiveFileNames = platform !== "win32" && platform !== "win64" && platform !== "darwin"; function readFile(fileName, encoding) { @@ -1019,7 +1096,7 @@ var ts; } } function getCanonicalPath(path) { - return useCaseSensitiveFileNames ? path.toLowerCase() : path; + return useCaseSensitiveFileNames ? path : path.toLowerCase(); } function readDirectory(path, extension, exclude) { var result = []; @@ -1059,14 +1136,22 @@ var ts; }, readFile: readFile, writeFile: writeFile, - watchFile: function (fileName, callback) { - var watchedFile = watchedFileSet.addFile(fileName, callback); + watchFile: function (filePath, callback) { + var watchSet = isNode4OrLater() ? watchedFileSet : pollingWatchedFileSet; + var watchedFile = watchSet.addFile(filePath, callback); return { - close: function () { return watchedFileSet.removeFile(watchedFile); } + close: function () { return watchSet.removeFile(watchedFile); } }; }, watchDirectory: function (path, callback, recursive) { - return _fs.watch(path, { persistent: true, recursive: !!recursive }, function (eventName, relativeFileName) { + var options; + if (isNode4OrLater() && (process.platform === "win32" || process.platform === "darwin")) { + options = { persistent: true, recursive: !!recursive }; + } + else { + options = { persistent: true }; + } + return _fs.watch(path, options, function (eventName, relativeFileName) { if (eventName === "rename") { callback(!relativeFileName ? relativeFileName : ts.normalizePath(ts.combinePaths(path, relativeFileName))); } @@ -1325,7 +1410,6 @@ var ts; Cannot_find_parameter_0: { code: 1225, category: ts.DiagnosticCategory.Error, key: "Cannot_find_parameter_0_1225", message: "Cannot find parameter '{0}'." }, Type_predicate_0_is_not_assignable_to_1: { code: 1226, category: ts.DiagnosticCategory.Error, key: "Type_predicate_0_is_not_assignable_to_1_1226", message: "Type predicate '{0}' is not assignable to '{1}'." }, Parameter_0_is_not_in_the_same_position_as_parameter_1: { code: 1227, category: ts.DiagnosticCategory.Error, key: "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227", message: "Parameter '{0}' is not in the same position as parameter '{1}'." }, - A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods: { code: 1228, category: ts.DiagnosticCategory.Error, key: "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228", message: "A type predicate is only allowed in return type position for functions and methods." }, A_type_predicate_cannot_reference_a_rest_parameter: { code: 1229, category: ts.DiagnosticCategory.Error, key: "A_type_predicate_cannot_reference_a_rest_parameter_1229", message: "A type predicate cannot reference a rest parameter." }, A_type_predicate_cannot_reference_element_0_in_a_binding_pattern: { code: 1230, category: ts.DiagnosticCategory.Error, key: "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230", message: "A type predicate cannot reference element '{0}' in a binding pattern." }, An_export_assignment_can_only_be_used_in_a_module: { code: 1231, category: ts.DiagnosticCategory.Error, key: "An_export_assignment_can_only_be_used_in_a_module_1231", message: "An export assignment can only be used in a module." }, @@ -1561,7 +1645,6 @@ var ts; All_declarations_of_an_abstract_method_must_be_consecutive: { code: 2516, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_an_abstract_method_must_be_consecutive_2516", message: "All declarations of an abstract method must be consecutive." }, Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type: { code: 2517, category: ts.DiagnosticCategory.Error, key: "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517", message: "Cannot assign an abstract constructor type to a non-abstract constructor type." }, A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard: { code: 2518, category: ts.DiagnosticCategory.Error, key: "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518", message: "A 'this'-based type guard is not compatible with a parameter-based type guard." }, - A_this_based_type_predicate_is_only_allowed_within_a_class_or_interface_s_members_get_accessors_or_return_type_positions_for_functions_and_methods: { code: 2519, category: ts.DiagnosticCategory.Error, key: "A_this_based_type_predicate_is_only_allowed_within_a_class_or_interface_s_members_get_accessors_or_r_2519", message: "A 'this'-based type predicate is only allowed within a class or interface's members, get accessors, or return type positions for functions and methods." }, Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: { code: 2520, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520", message: "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions." }, Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions: { code: 2521, category: ts.DiagnosticCategory.Error, key: "Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521", message: "Expression resolves to variable declaration '{0}' that compiler uses to support async functions." }, The_arguments_object_cannot_be_referenced_in_an_async_arrow_function_Consider_using_a_standard_async_function_expression: { code: 2522, category: ts.DiagnosticCategory.Error, key: "The_arguments_object_cannot_be_referenced_in_an_async_arrow_function_Consider_using_a_standard_async_2522", message: "The 'arguments' object cannot be referenced in an async arrow function. Consider using a standard async function expression." }, @@ -1590,6 +1673,16 @@ var ts; Type_0_provides_no_match_for_the_signature_1: { code: 2658, category: ts.DiagnosticCategory.Error, key: "Type_0_provides_no_match_for_the_signature_1_2658", message: "Type '{0}' provides no match for the signature '{1}'" }, super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher: { code: 2659, category: ts.DiagnosticCategory.Error, key: "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", message: "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher." }, super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions: { code: 2660, category: ts.DiagnosticCategory.Error, key: "super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660", message: "'super' can only be referenced in members of derived classes or object literal expressions." }, + Cannot_re_export_name_that_is_not_defined_in_the_module: { code: 2661, category: ts.DiagnosticCategory.Error, key: "Cannot_re_export_name_that_is_not_defined_in_the_module_2661", message: "Cannot re-export name that is not defined in the module." }, + Cannot_find_name_0_Did_you_mean_the_static_member_1_0: { code: 2662, category: ts.DiagnosticCategory.Error, key: "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662", message: "Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?" }, + Cannot_find_name_0_Did_you_mean_the_instance_member_this_0: { code: 2663, category: ts.DiagnosticCategory.Error, key: "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663", message: "Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?" }, + Invalid_module_name_in_augmentation_module_0_cannot_be_found: { code: 2664, category: ts.DiagnosticCategory.Error, key: "Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664", message: "Invalid module name in augmentation, module '{0}' cannot be found." }, + Module_augmentation_cannot_introduce_new_names_in_the_top_level_scope: { code: 2665, category: ts.DiagnosticCategory.Error, key: "Module_augmentation_cannot_introduce_new_names_in_the_top_level_scope_2665", message: "Module augmentation cannot introduce new names in the top level scope." }, + Exports_and_export_assignments_are_not_permitted_in_module_augmentations: { code: 2666, category: ts.DiagnosticCategory.Error, key: "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666", message: "Exports and export assignments are not permitted in module augmentations." }, + Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module: { code: 2667, category: ts.DiagnosticCategory.Error, key: "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667", message: "Imports are not permitted in module augmentations. Consider moving them to the enclosing external module." }, + export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible: { code: 2668, category: ts.DiagnosticCategory.Error, key: "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668", message: "'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible." }, + Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations: { code: 2669, category: ts.DiagnosticCategory.Error, key: "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669", message: "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations." }, + Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context: { code: 2670, category: ts.DiagnosticCategory.Error, key: "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670", message: "Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context." }, Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import_declaration_0_is_using_private_name_1_4000", message: "Import declaration '{0}' is using private name '{1}'." }, Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", message: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", message: "Type parameter '{0}' of exported interface has or is using private name '{1}'." }, @@ -1754,6 +1847,7 @@ var ts; _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: { code: 7010, category: ts.DiagnosticCategory.Error, key: "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010", message: "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type." }, Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: { code: 7011, category: ts.DiagnosticCategory.Error, key: "Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011", message: "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type." }, Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: { code: 7013, category: ts.DiagnosticCategory.Error, key: "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013", message: "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type." }, + Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number: { code: 7015, category: ts.DiagnosticCategory.Error, key: "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015", message: "Element implicitly has an 'any' type because index expression is not of type 'number'." }, Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation: { code: 7016, category: ts.DiagnosticCategory.Error, key: "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation_7016", message: "Property '{0}' implicitly has type 'any', because its 'set' accessor lacks a type annotation." }, Index_signature_of_object_type_implicitly_has_an_any_type: { code: 7017, category: ts.DiagnosticCategory.Error, key: "Index_signature_of_object_type_implicitly_has_an_any_type_7017", message: "Index signature of object type implicitly has an 'any' type." }, Object_literal_s_property_0_implicitly_has_an_1_type: { code: 7018, category: ts.DiagnosticCategory.Error, key: "Object_literal_s_property_0_implicitly_has_an_1_type_7018", message: "Object literal's property '{0}' implicitly has an '{1}' type." }, @@ -1849,6 +1943,7 @@ var ts; "protected": 111, "public": 112, "require": 127, + "global": 134, "return": 94, "set": 129, "static": 113, @@ -1869,7 +1964,7 @@ var ts; "yield": 114, "async": 118, "await": 119, - "of": 134, + "of": 135, "{": 15, "}": 16, "(": 17, @@ -3130,7 +3225,7 @@ var ts; break; } } - return token = 238; + return token = 239; } function scanJsxIdentifier() { if (tokenIsIdentifierOrKeyword(token)) { @@ -3296,7 +3391,7 @@ var ts; } } function getSourceFileOfNode(node) { - while (node && node.kind !== 250) { + while (node && node.kind !== 251) { node = node.parent; } return node; @@ -3380,6 +3475,28 @@ var ts; isCatchClauseVariableDeclaration(declaration); } ts.isBlockOrCatchScoped = isBlockOrCatchScoped; + function isAmbientModule(node) { + return node && node.kind === 221 && + (node.name.kind === 9 || isGlobalScopeAugmentation(node)); + } + ts.isAmbientModule = isAmbientModule; + function isGlobalScopeAugmentation(module) { + return !!(module.flags & 2097152); + } + ts.isGlobalScopeAugmentation = isGlobalScopeAugmentation; + function isExternalModuleAugmentation(node) { + if (!node || !isAmbientModule(node)) { + return false; + } + switch (node.parent.kind) { + case 251: + return isExternalModule(node.parent); + case 222: + return isAmbientModule(node.parent.parent) && !isExternalModule(node.parent.parent.parent); + } + return false; + } + ts.isExternalModuleAugmentation = isExternalModuleAugmentation; function getEnclosingBlockScopeContainer(node) { var current = node.parent; while (current) { @@ -3387,15 +3504,15 @@ var ts; return current; } switch (current.kind) { - case 250: - case 222: - case 246: - case 220: - case 201: + case 251: + case 223: + case 247: + case 221: case 202: case 203: + case 204: return current; - case 194: + case 195: if (!isFunctionLike(current.parent)) { return current; } @@ -3406,9 +3523,9 @@ var ts; ts.getEnclosingBlockScopeContainer = getEnclosingBlockScopeContainer; function isCatchClauseVariableDeclaration(declaration) { return declaration && - declaration.kind === 213 && + declaration.kind === 214 && declaration.parent && - declaration.parent.kind === 246; + declaration.parent.kind === 247; } ts.isCatchClauseVariableDeclaration = isCatchClauseVariableDeclaration; function declarationNameToString(name) { @@ -3444,23 +3561,24 @@ var ts; function getErrorSpanForNode(sourceFile, node) { var errorNode = node; switch (node.kind) { - case 250: + case 251: var pos_1 = ts.skipTrivia(sourceFile.text, 0, false); if (pos_1 === sourceFile.text.length) { return ts.createTextSpan(0, 0); } return getSpanOfTokenAtPosition(sourceFile, pos_1); - case 213: - case 165: - case 216: - case 188: + case 214: + case 166: case 217: + case 189: + case 218: + case 221: case 220: + case 250: + case 216: + case 176: + case 144: case 219: - case 249: - case 215: - case 175: - case 143: errorNode = node.name; break; } @@ -3486,11 +3604,11 @@ var ts; } ts.isDeclarationFile = isDeclarationFile; function isConstEnumDeclaration(node) { - return node.kind === 219 && isConst(node); + return node.kind === 220 && isConst(node); } ts.isConstEnumDeclaration = isConstEnumDeclaration; function walkUpBindingElementsAndPatterns(node) { - while (node && (node.kind === 165 || isBindingPattern(node))) { + while (node && (node.kind === 166 || isBindingPattern(node))) { node = node.parent; } return node; @@ -3498,14 +3616,14 @@ var ts; function getCombinedNodeFlags(node) { node = walkUpBindingElementsAndPatterns(node); var flags = node.flags; - if (node.kind === 213) { + if (node.kind === 214) { node = node.parent; } - if (node && node.kind === 214) { + if (node && node.kind === 215) { flags |= node.flags; node = node.parent; } - if (node && node.kind === 195) { + if (node && node.kind === 196) { flags |= node.flags; } return flags; @@ -3520,7 +3638,7 @@ var ts; } ts.isLet = isLet; function isPrologueDirective(node) { - return node.kind === 197 && node.expression.kind === 9; + return node.kind === 198 && node.expression.kind === 9; } ts.isPrologueDirective = isPrologueDirective; function getLeadingCommentRangesOfNode(node, sourceFileOfNode) { @@ -3536,7 +3654,7 @@ var ts; } ts.getJsDocComments = getJsDocComments; function getJsDocCommentsFromText(node, text) { - var commentRanges = (node.kind === 138 || node.kind === 137) ? + var commentRanges = (node.kind === 139 || node.kind === 138) ? ts.concatenate(ts.getTrailingCommentRanges(text, node.pos), ts.getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRangesOfNodeFromText(node, text); return ts.filter(commentRanges, isJsDocComment); @@ -3550,7 +3668,7 @@ var ts; ts.fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*/; ts.fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*/; function isTypeNode(node) { - if (150 <= node.kind && node.kind <= 162) { + if (151 <= node.kind && node.kind <= 163) { return true; } switch (node.kind) { @@ -3561,56 +3679,56 @@ var ts; case 131: return true; case 103: - return node.parent.kind !== 179; - case 190: + return node.parent.kind !== 180; + case 191: return !isExpressionWithTypeArgumentsInClassExtendsClause(node); case 69: - if (node.parent.kind === 135 && node.parent.right === node) { + if (node.parent.kind === 136 && node.parent.right === node) { node = node.parent; } - else if (node.parent.kind === 168 && node.parent.name === node) { + else if (node.parent.kind === 169 && node.parent.name === node) { node = node.parent; } - ts.Debug.assert(node.kind === 69 || node.kind === 135 || node.kind === 168, "'node' was expected to be a qualified name, identifier or property access in 'isTypeNode'."); - case 135: - case 168: + ts.Debug.assert(node.kind === 69 || node.kind === 136 || node.kind === 169, "'node' was expected to be a qualified name, identifier or property access in 'isTypeNode'."); + case 136: + case 169: case 97: var parent_1 = node.parent; - if (parent_1.kind === 154) { + if (parent_1.kind === 155) { return false; } - if (150 <= parent_1.kind && parent_1.kind <= 162) { + if (151 <= parent_1.kind && parent_1.kind <= 163) { return true; } switch (parent_1.kind) { - case 190: + case 191: return !isExpressionWithTypeArgumentsInClassExtendsClause(parent_1); - case 137: - return node === parent_1.constraint; - case 141: - case 140: case 138: - case 213: + return node === parent_1.constraint; + case 142: + case 141: + case 139: + case 214: return node === parent_1.type; - case 215: - case 175: + case 216: case 176: + case 177: + case 145: case 144: case 143: - case 142: - case 145: case 146: - return node === parent_1.type; case 147: + return node === parent_1.type; case 148: case 149: + case 150: return node === parent_1.type; - case 173: + case 174: return node === parent_1.type; - case 170: case 171: - return parent_1.typeArguments && ts.indexOf(parent_1.typeArguments, node) >= 0; case 172: + return parent_1.typeArguments && ts.indexOf(parent_1.typeArguments, node) >= 0; + case 173: return false; } } @@ -3621,23 +3739,23 @@ var ts; return traverse(body); function traverse(node) { switch (node.kind) { - case 206: + case 207: return visitor(node); - case 222: - case 194: - case 198: + case 223: + case 195: case 199: case 200: case 201: case 202: case 203: - case 207: + case 204: case 208: - case 243: - case 244: case 209: - case 211: - case 246: + case 244: + case 245: + case 210: + case 212: + case 247: return ts.forEachChild(node, traverse); } } @@ -3647,23 +3765,23 @@ var ts; return traverse(body); function traverse(node) { switch (node.kind) { - case 186: + case 187: visitor(node); var operand = node.expression; if (operand) { traverse(operand); } - case 219: - case 217: case 220: case 218: - case 216: - case 188: + case 221: + case 219: + case 217: + case 189: return; default: if (isFunctionLike(node)) { var name_5 = node.name; - if (name_5 && name_5.kind === 136) { + if (name_5 && name_5.kind === 137) { traverse(name_5.expression); return; } @@ -3678,14 +3796,14 @@ var ts; function isVariableLike(node) { if (node) { switch (node.kind) { - case 165: - case 249: - case 138: - case 247: - case 141: - case 140: + case 166: + case 250: + case 139: case 248: - case 213: + case 142: + case 141: + case 249: + case 214: return true; } } @@ -3693,11 +3811,11 @@ var ts; } ts.isVariableLike = isVariableLike; function isAccessor(node) { - return node && (node.kind === 145 || node.kind === 146); + return node && (node.kind === 146 || node.kind === 147); } ts.isAccessor = isAccessor; function isClassLike(node) { - return node && (node.kind === 216 || node.kind === 188); + return node && (node.kind === 217 || node.kind === 189); } ts.isClassLike = isClassLike; function isFunctionLike(node) { @@ -3706,32 +3824,32 @@ var ts; ts.isFunctionLike = isFunctionLike; function isFunctionLikeKind(kind) { switch (kind) { - case 144: - case 175: - case 215: - case 176: - case 143: - case 142: case 145: + case 176: + case 216: + case 177: + case 144: + case 143: case 146: case 147: case 148: case 149: - case 152: + case 150: case 153: + case 154: return true; } } ts.isFunctionLikeKind = isFunctionLikeKind; function introducesArgumentsExoticObject(node) { switch (node.kind) { - case 143: - case 142: case 144: + case 143: case 145: case 146: - case 215: - case 175: + case 147: + case 216: + case 176: return true; } return false; @@ -3739,24 +3857,24 @@ var ts; ts.introducesArgumentsExoticObject = introducesArgumentsExoticObject; function isIterationStatement(node, lookInLabeledStatements) { switch (node.kind) { - case 201: case 202: case 203: - case 199: + case 204: case 200: + case 201: return true; - case 209: + case 210: return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); } return false; } ts.isIterationStatement = isIterationStatement; function isFunctionBlock(node) { - return node && node.kind === 194 && isFunctionLike(node.parent); + return node && node.kind === 195 && isFunctionLike(node.parent); } ts.isFunctionBlock = isFunctionBlock; function isObjectLiteralMethod(node) { - return node && node.kind === 143 && node.parent.kind === 167; + return node && node.kind === 144 && node.parent.kind === 168; } ts.isObjectLiteralMethod = isObjectLiteralMethod; function isIdentifierTypePredicate(predicate) { @@ -3788,39 +3906,39 @@ var ts; return undefined; } switch (node.kind) { - case 136: + case 137: if (isClassLike(node.parent.parent)) { return node; } node = node.parent; break; - case 139: - if (node.parent.kind === 138 && isClassElement(node.parent.parent)) { + case 140: + if (node.parent.kind === 139 && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; } break; - case 176: + case 177: if (!includeArrowFunctions) { continue; } - case 215: - case 175: - case 220: - case 141: - case 140: - case 143: + case 216: + case 176: + case 221: case 142: + case 141: case 144: + case 143: case 145: case 146: case 147: case 148: case 149: - case 219: - case 250: + case 150: + case 220: + case 251: return node; } } @@ -3833,25 +3951,25 @@ var ts; return node; } switch (node.kind) { - case 136: + case 137: node = node.parent; break; - case 215: - case 175: + case 216: case 176: + case 177: if (!stopOnFunctions) { continue; } - case 141: - case 140: - case 143: case 142: + case 141: case 144: + case 143: case 145: case 146: + case 147: return node; - case 139: - if (node.parent.kind === 138 && isClassElement(node.parent.parent)) { + case 140: + if (node.parent.kind === 139 && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { @@ -3865,12 +3983,12 @@ var ts; function getEntityNameFromTypeNode(node) { if (node) { switch (node.kind) { - case 151: + case 152: return node.typeName; - case 190: + case 191: return node.expression; case 69: - case 135: + case 136: return node; } } @@ -3878,7 +3996,7 @@ var ts; } ts.getEntityNameFromTypeNode = getEntityNameFromTypeNode; function getInvokedExpression(node) { - if (node.kind === 172) { + if (node.kind === 173) { return node.tag; } return node.expression; @@ -3886,54 +4004,36 @@ var ts; ts.getInvokedExpression = getInvokedExpression; function nodeCanBeDecorated(node) { switch (node.kind) { - case 216: + case 217: return true; - case 141: - return node.parent.kind === 216; - case 138: - return node.parent.body && node.parent.parent.kind === 216; - case 145: + case 142: + return node.parent.kind === 217; case 146: - case 143: - return node.body && node.parent.kind === 216; + case 147: + case 144: + return node.body !== undefined + && node.parent.kind === 217; + case 139: + return node.parent.body !== undefined + && (node.parent.kind === 145 + || node.parent.kind === 144 + || node.parent.kind === 147) + && node.parent.parent.kind === 217; } return false; } ts.nodeCanBeDecorated = nodeCanBeDecorated; function nodeIsDecorated(node) { - switch (node.kind) { - case 216: - if (node.decorators) { - return true; - } - return false; - case 141: - case 138: - if (node.decorators) { - return true; - } - return false; - case 145: - if (node.body && node.decorators) { - return true; - } - return false; - case 143: - case 146: - if (node.body && node.decorators) { - return true; - } - return false; - } - return false; + return node.decorators !== undefined + && nodeCanBeDecorated(node); } ts.nodeIsDecorated = nodeIsDecorated; function isPropertyAccessExpression(node) { - return node.kind === 168; + return node.kind === 169; } ts.isPropertyAccessExpression = isPropertyAccessExpression; function isElementAccessExpression(node) { - return node.kind === 169; + return node.kind === 170; } ts.isElementAccessExpression = isElementAccessExpression; function isExpression(node) { @@ -3943,42 +4043,42 @@ var ts; case 99: case 84: case 10: - case 166: case 167: case 168: case 169: case 170: case 171: case 172: - case 191: case 173: + case 192: case 174: case 175: - case 188: case 176: - case 179: + case 189: case 177: + case 180: case 178: - case 181: + case 179: case 182: case 183: case 184: - case 187: case 185: - case 11: - case 189: - case 235: - case 236: + case 188: case 186: - case 180: + case 11: + case 190: + case 236: + case 237: + case 187: + case 181: return true; - case 135: - while (node.parent.kind === 135) { + case 136: + while (node.parent.kind === 136) { node = node.parent; } - return node.parent.kind === 154; + return node.parent.kind === 155; case 69: - if (node.parent.kind === 154) { + if (node.parent.kind === 155) { return true; } case 8: @@ -3986,47 +4086,47 @@ var ts; case 97: var parent_2 = node.parent; switch (parent_2.kind) { - case 213: - case 138: + case 214: + case 139: + case 142: case 141: - case 140: - case 249: - case 247: - case 165: + case 250: + case 248: + case 166: return parent_2.initializer === node; - case 197: case 198: case 199: case 200: - case 206: + case 201: case 207: case 208: - case 243: - case 210: - case 208: + case 209: + case 244: + case 211: + case 209: return parent_2.expression === node; - case 201: + case 202: var forStatement = parent_2; - return (forStatement.initializer === node && forStatement.initializer.kind !== 214) || + return (forStatement.initializer === node && forStatement.initializer.kind !== 215) || forStatement.condition === node || forStatement.incrementor === node; - case 202: case 203: + case 204: var forInStatement = parent_2; - return (forInStatement.initializer === node && forInStatement.initializer.kind !== 214) || + return (forInStatement.initializer === node && forInStatement.initializer.kind !== 215) || forInStatement.expression === node; - case 173: - case 191: - return node === parent_2.expression; + case 174: case 192: return node === parent_2.expression; - case 136: + case 193: return node === parent_2.expression; - case 139: + case 137: + return node === parent_2.expression; + case 140: + case 243: case 242: - case 241: return true; - case 190: + case 191: return parent_2.expression === node && isExpressionWithTypeArgumentsInClassExtendsClause(parent_2); default: if (isExpression(parent_2)) { @@ -4048,7 +4148,7 @@ var ts; } ts.isInstantiatedModule = isInstantiatedModule; function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 223 && node.moduleReference.kind === 234; + return node.kind === 224 && node.moduleReference.kind === 235; } ts.isExternalModuleImportEqualsDeclaration = isExternalModuleImportEqualsDeclaration; function getExternalModuleImportEqualsDeclarationExpression(node) { @@ -4057,7 +4157,7 @@ var ts; } ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression; function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 223 && node.moduleReference.kind !== 234; + return node.kind === 224 && node.moduleReference.kind !== 235; } ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration; function isSourceFileJavaScript(file) { @@ -4069,7 +4169,7 @@ var ts; } ts.isInJavaScriptFile = isInJavaScriptFile; function isRequireCall(expression) { - return expression.kind === 170 && + return expression.kind === 171 && expression.expression.kind === 69 && expression.expression.text === "require" && expression.arguments.length === 1 && @@ -4077,11 +4177,11 @@ var ts; } ts.isRequireCall = isRequireCall; function getSpecialPropertyAssignmentKind(expression) { - if (expression.kind !== 183) { + if (expression.kind !== 184) { return 0; } var expr = expression; - if (expr.operatorToken.kind !== 56 || expr.left.kind !== 168) { + if (expr.operatorToken.kind !== 56 || expr.left.kind !== 169) { return 0; } var lhs = expr.left; @@ -4097,7 +4197,7 @@ var ts; else if (lhs.expression.kind === 97) { return 4; } - else if (lhs.expression.kind === 168) { + else if (lhs.expression.kind === 169) { var innerPropertyAccess = lhs.expression; if (innerPropertyAccess.expression.kind === 69 && innerPropertyAccess.name.text === "prototype") { return 3; @@ -4107,30 +4207,33 @@ var ts; } ts.getSpecialPropertyAssignmentKind = getSpecialPropertyAssignmentKind; function getExternalModuleName(node) { - if (node.kind === 224) { + if (node.kind === 225) { return node.moduleSpecifier; } - if (node.kind === 223) { + if (node.kind === 224) { var reference = node.moduleReference; - if (reference.kind === 234) { + if (reference.kind === 235) { return reference.expression; } } - if (node.kind === 230) { + if (node.kind === 231) { return node.moduleSpecifier; } + if (node.kind === 221 && node.name.kind === 9) { + return node.name; + } } ts.getExternalModuleName = getExternalModuleName; function hasQuestionToken(node) { if (node) { switch (node.kind) { - case 138: + case 139: + case 144: case 143: - case 142: + case 249: case 248: - case 247: + case 142: case 141: - case 140: return node.questionToken !== undefined; } } @@ -4138,9 +4241,9 @@ var ts; } ts.hasQuestionToken = hasQuestionToken; function isJSDocConstructSignature(node) { - return node.kind === 263 && + return node.kind === 264 && node.parameters.length > 0 && - node.parameters[0].type.kind === 265; + node.parameters[0].type.kind === 266; } ts.isJSDocConstructSignature = isJSDocConstructSignature; function getJSDocTag(node, kind) { @@ -4154,15 +4257,15 @@ var ts; } } function getJSDocTypeTag(node) { - return getJSDocTag(node, 271); + return getJSDocTag(node, 272); } ts.getJSDocTypeTag = getJSDocTypeTag; function getJSDocReturnTag(node) { - return getJSDocTag(node, 270); + return getJSDocTag(node, 271); } ts.getJSDocReturnTag = getJSDocReturnTag; function getJSDocTemplateTag(node) { - return getJSDocTag(node, 272); + return getJSDocTag(node, 273); } ts.getJSDocTemplateTag = getJSDocTemplateTag; function getCorrespondingJSDocParameterTag(parameter) { @@ -4171,7 +4274,7 @@ var ts; var docComment = parameter.parent.jsDocComment; if (docComment) { return ts.forEach(docComment.tags, function (t) { - if (t.kind === 269) { + if (t.kind === 270) { var parameterTag = t; var name_6 = parameterTag.preParameterName || parameterTag.postParameterName; if (name_6.text === parameterName) { @@ -4190,12 +4293,12 @@ var ts; function isRestParameter(node) { if (node) { if (node.parserContextFlags & 32) { - if (node.type && node.type.kind === 264) { + if (node.type && node.type.kind === 265) { return true; } var paramTag = getCorrespondingJSDocParameterTag(node); if (paramTag && paramTag.typeExpression) { - return paramTag.typeExpression.type.kind === 264; + return paramTag.typeExpression.type.kind === 265; } } return node.dotDotDotToken !== undefined; @@ -4216,7 +4319,7 @@ var ts; } ts.isTemplateLiteralKind = isTemplateLiteralKind; function isBindingPattern(node) { - return !!node && (node.kind === 164 || node.kind === 163); + return !!node && (node.kind === 165 || node.kind === 164); } ts.isBindingPattern = isBindingPattern; function isNodeDescendentOf(node, ancestor) { @@ -4240,34 +4343,34 @@ var ts; ts.isInAmbientContext = isInAmbientContext; function isDeclaration(node) { switch (node.kind) { - case 176: - case 165: - case 216: - case 188: - case 144: - case 219: - case 249: - case 232: - case 215: - case 175: - case 145: - case 225: - case 223: - case 228: + case 177: + case 166: case 217: - case 143: - case 142: + case 189: + case 145: case 220: - case 226: - case 138: - case 247: - case 141: - case 140: + case 250: + case 233: + case 216: + case 176: case 146: - case 248: + case 226: + case 224: + case 229: case 218: - case 137: - case 213: + case 144: + case 143: + case 221: + case 227: + case 139: + case 248: + case 142: + case 141: + case 147: + case 249: + case 219: + case 138: + case 214: return true; } return false; @@ -4275,25 +4378,25 @@ var ts; ts.isDeclaration = isDeclaration; function isStatement(n) { switch (n.kind) { - case 205: - case 204: - case 212: - case 199: - case 197: - case 196: - case 202: - case 203: - case 201: - case 198: - case 209: case 206: - case 208: - case 210: - case 211: - case 195: + case 205: + case 213: case 200: + case 198: + case 197: + case 203: + case 204: + case 202: + case 199: + case 210: case 207: - case 229: + case 209: + case 211: + case 212: + case 196: + case 201: + case 208: + case 230: return true; default: return false; @@ -4302,13 +4405,13 @@ var ts; ts.isStatement = isStatement; function isClassElement(n) { switch (n.kind) { - case 144: - case 141: - case 143: case 145: - case 146: case 142: - case 149: + case 144: + case 146: + case 147: + case 143: + case 150: return true; default: return false; @@ -4320,7 +4423,7 @@ var ts; return false; } var parent = name.parent; - if (parent.kind === 228 || parent.kind === 232) { + if (parent.kind === 229 || parent.kind === 233) { if (parent.propertyName) { return true; } @@ -4334,40 +4437,40 @@ var ts; function isIdentifierName(node) { var parent = node.parent; switch (parent.kind) { - case 141: - case 140: - case 143: case 142: - case 145: + case 141: + case 144: + case 143: case 146: - case 249: - case 247: - case 168: + case 147: + case 250: + case 248: + case 169: return parent.name === node; - case 135: + case 136: if (parent.right === node) { - while (parent.kind === 135) { + while (parent.kind === 136) { parent = parent.parent; } - return parent.kind === 154; + return parent.kind === 155; } return false; - case 165: - case 228: + case 166: + case 229: return parent.propertyName === node; - case 232: + case 233: return true; } return false; } ts.isIdentifierName = isIdentifierName; function isAliasSymbolDeclaration(node) { - return node.kind === 223 || - node.kind === 225 && !!node.name || - node.kind === 226 || - node.kind === 228 || - node.kind === 232 || - node.kind === 229 && node.expression.kind === 69; + return node.kind === 224 || + node.kind === 226 && !!node.name || + node.kind === 227 || + node.kind === 229 || + node.kind === 233 || + node.kind === 230 && node.expression.kind === 69; } ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration; function getClassExtendsHeritageClauseElement(node) { @@ -4449,7 +4552,7 @@ var ts; } ts.getFileReferenceFromReferencePath = getFileReferenceFromReferencePath; function isKeyword(token) { - return 70 <= token && token <= 134; + return 70 <= token && token <= 135; } ts.isKeyword = isKeyword; function isTrivia(token) { @@ -4469,7 +4572,7 @@ var ts; } ts.hasDynamicName = hasDynamicName; function isDynamicName(name) { - return name.kind === 136 && + return name.kind === 137 && !isStringOrNumericLiteral(name.expression.kind) && !isWellKnownSymbolSyntactically(name.expression); } @@ -4482,7 +4585,7 @@ var ts; if (name.kind === 69 || name.kind === 9 || name.kind === 8) { return name.text; } - if (name.kind === 136) { + if (name.kind === 137) { var nameExpression = name.expression; if (isWellKnownSymbolSyntactically(nameExpression)) { var rightHandSideName = nameExpression.name.text; @@ -4519,18 +4622,18 @@ var ts; ts.isModifierKind = isModifierKind; function isParameterDeclaration(node) { var root = getRootDeclaration(node); - return root.kind === 138; + return root.kind === 139; } ts.isParameterDeclaration = isParameterDeclaration; function getRootDeclaration(node) { - while (node.kind === 165) { + while (node.kind === 166) { node = node.parent.parent; } return node; } ts.getRootDeclaration = getRootDeclaration; function nodeStartsNewLexicalEnvironment(n) { - return isFunctionLike(n) || n.kind === 220 || n.kind === 250; + return isFunctionLike(n) || n.kind === 221 || n.kind === 251; } ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment; function cloneNode(node, location, flags, parent) { @@ -4563,7 +4666,7 @@ var ts; } ts.cloneEntityName = cloneEntityName; function isQualifiedName(node) { - return node.kind === 135; + return node.kind === 136; } ts.isQualifiedName = isQualifiedName; function nodeIsSynthesized(node) { @@ -4876,7 +4979,7 @@ var ts; ts.getLineOfLocalPositionFromLineMap = getLineOfLocalPositionFromLineMap; function getFirstConstructorWithBody(node) { return ts.forEach(node.members, function (member) { - if (member.kind === 144 && nodeIsPresent(member.body)) { + if (member.kind === 145 && nodeIsPresent(member.body)) { return member; } }); @@ -4893,10 +4996,10 @@ var ts; var setAccessor; if (hasDynamicName(accessor)) { firstAccessor = accessor; - if (accessor.kind === 145) { + if (accessor.kind === 146) { getAccessor = accessor; } - else if (accessor.kind === 146) { + else if (accessor.kind === 147) { setAccessor = accessor; } else { @@ -4905,7 +5008,7 @@ var ts; } else { ts.forEach(declarations, function (member) { - if ((member.kind === 145 || member.kind === 146) + if ((member.kind === 146 || member.kind === 147) && (member.flags & 64) === (accessor.flags & 64)) { var memberName = getPropertyNameForPropertyNameNode(member.name); var accessorName = getPropertyNameForPropertyNameNode(accessor.name); @@ -4916,10 +5019,10 @@ var ts; else if (!secondAccessor) { secondAccessor = member; } - if (member.kind === 145 && !getAccessor) { + if (member.kind === 146 && !getAccessor) { getAccessor = member; } - if (member.kind === 146 && !setAccessor) { + if (member.kind === 147 && !setAccessor) { setAccessor = member; } } @@ -5085,24 +5188,24 @@ var ts; function isLeftHandSideExpression(expr) { if (expr) { switch (expr.kind) { - case 168: case 169: - case 171: case 170: - case 235: - case 236: case 172: - case 166: - case 174: + case 171: + case 236: + case 237: + case 173: case 167: - case 188: case 175: + case 168: + case 189: + case 176: case 69: case 10: case 8: case 9: case 11: - case 185: + case 186: case 84: case 93: case 97: @@ -5119,7 +5222,7 @@ var ts; } ts.isAssignmentOperator = isAssignmentOperator; function isExpressionWithTypeArgumentsInClassExtendsClause(node) { - return node.kind === 190 && + return node.kind === 191 && node.parent.token === 83 && isClassLike(node.parent.parent); } @@ -5140,16 +5243,16 @@ var ts; } } function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return (node.parent.kind === 135 && node.parent.right === node) || - (node.parent.kind === 168 && node.parent.name === node); + return (node.parent.kind === 136 && node.parent.right === node) || + (node.parent.kind === 169 && node.parent.name === node); } ts.isRightSideOfQualifiedNameOrPropertyAccess = isRightSideOfQualifiedNameOrPropertyAccess; function isEmptyObjectLiteralOrArrayLiteral(expression) { var kind = expression.kind; - if (kind === 167) { + if (kind === 168) { return expression.properties.length === 0; } - if (kind === 166) { + if (kind === 167) { return expression.elements.length === 0; } return false; @@ -5393,9 +5496,9 @@ var ts; } ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions; function getTypeParameterOwner(d) { - if (d && d.kind === 137) { + if (d && d.kind === 138) { for (var current = d; current; current = current.parent) { - if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 217) { + if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 218) { return current; } } @@ -5403,7 +5506,7 @@ var ts; } ts.getTypeParameterOwner = getTypeParameterOwner; function isParameterPropertyDeclaration(node) { - return node.flags & 56 && node.parent.kind === 144 && ts.isClassLike(node.parent.parent); + return node.flags & 56 && node.parent.kind === 145 && ts.isClassLike(node.parent.parent); } ts.isParameterPropertyDeclaration = isParameterPropertyDeclaration; })(ts || (ts = {})); @@ -5413,7 +5516,7 @@ var ts; var NodeConstructor; var SourceFileConstructor; function createNode(kind, pos, end) { - if (kind === 250) { + if (kind === 251) { return new (SourceFileConstructor || (SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor()))(kind, pos, end); } else { @@ -5449,26 +5552,26 @@ var ts; var visitNodes = cbNodeArray ? visitNodeArray : visitEachNode; var cbNodes = cbNodeArray || cbNode; switch (node.kind) { - case 135: + case 136: return visitNode(cbNode, node.left) || visitNode(cbNode, node.right); - case 137: + case 138: return visitNode(cbNode, node.name) || visitNode(cbNode, node.constraint) || visitNode(cbNode, node.expression); - case 248: + case 249: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.equalsToken) || visitNode(cbNode, node.objectAssignmentInitializer); - case 138: + case 139: + case 142: case 141: - case 140: - case 247: - case 213: - case 165: + case 248: + case 214: + case 166: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.propertyName) || @@ -5477,24 +5580,24 @@ var ts; visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.type) || visitNode(cbNode, node.initializer); - case 152: case 153: - case 147: + case 154: case 148: case 149: + case 150: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNodes(cbNodes, node.typeParameters) || visitNodes(cbNodes, node.parameters) || visitNode(cbNode, node.type); - case 143: - case 142: case 144: + case 143: case 145: case 146: - case 175: - case 215: + case 147: case 176: + case 216: + case 177: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.asteriskToken) || @@ -5505,160 +5608,153 @@ var ts; visitNode(cbNode, node.type) || visitNode(cbNode, node.equalsGreaterThanToken) || visitNode(cbNode, node.body); - case 151: + case 152: return visitNode(cbNode, node.typeName) || visitNodes(cbNodes, node.typeArguments); - case 150: + case 151: return visitNode(cbNode, node.parameterName) || visitNode(cbNode, node.type); - case 154: - return visitNode(cbNode, node.exprName); case 155: - return visitNodes(cbNodes, node.members); + return visitNode(cbNode, node.exprName); case 156: - return visitNode(cbNode, node.elementType); + return visitNodes(cbNodes, node.members); case 157: - return visitNodes(cbNodes, node.elementTypes); + return visitNode(cbNode, node.elementType); case 158: + return visitNodes(cbNodes, node.elementTypes); case 159: - return visitNodes(cbNodes, node.types); case 160: + return visitNodes(cbNodes, node.types); + case 161: return visitNode(cbNode, node.type); - case 163: case 164: - return visitNodes(cbNodes, node.elements); - case 166: + case 165: return visitNodes(cbNodes, node.elements); case 167: - return visitNodes(cbNodes, node.properties); + return visitNodes(cbNodes, node.elements); case 168: + return visitNodes(cbNodes, node.properties); + case 169: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.dotToken) || visitNode(cbNode, node.name); - case 169: + case 170: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.argumentExpression); - case 170: case 171: + case 172: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.typeArguments) || visitNodes(cbNodes, node.arguments); - case 172: + case 173: return visitNode(cbNode, node.tag) || visitNode(cbNode, node.template); - case 173: + case 174: return visitNode(cbNode, node.type) || visitNode(cbNode, node.expression); - case 174: - return visitNode(cbNode, node.expression); - case 177: + case 175: return visitNode(cbNode, node.expression); case 178: return visitNode(cbNode, node.expression); case 179: return visitNode(cbNode, node.expression); - case 181: - return visitNode(cbNode, node.operand); - case 186: - return visitNode(cbNode, node.asteriskToken) || - visitNode(cbNode, node.expression); case 180: return visitNode(cbNode, node.expression); case 182: return visitNode(cbNode, node.operand); + case 187: + return visitNode(cbNode, node.asteriskToken) || + visitNode(cbNode, node.expression); + case 181: + return visitNode(cbNode, node.expression); case 183: + return visitNode(cbNode, node.operand); + case 184: return visitNode(cbNode, node.left) || visitNode(cbNode, node.operatorToken) || visitNode(cbNode, node.right); - case 191: + case 192: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.type); - case 184: + case 185: return visitNode(cbNode, node.condition) || visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.whenTrue) || visitNode(cbNode, node.colonToken) || visitNode(cbNode, node.whenFalse); - case 187: + case 188: return visitNode(cbNode, node.expression); - case 194: - case 221: + case 195: + case 222: return visitNodes(cbNodes, node.statements); - case 250: + case 251: return visitNodes(cbNodes, node.statements) || visitNode(cbNode, node.endOfFileToken); - case 195: + case 196: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.declarationList); - case 214: + case 215: return visitNodes(cbNodes, node.declarations); - case 197: - return visitNode(cbNode, node.expression); case 198: + return visitNode(cbNode, node.expression); + case 199: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.thenStatement) || visitNode(cbNode, node.elseStatement); - case 199: + case 200: return visitNode(cbNode, node.statement) || visitNode(cbNode, node.expression); - case 200: - return visitNode(cbNode, node.expression) || - visitNode(cbNode, node.statement); case 201: - return visitNode(cbNode, node.initializer) || - visitNode(cbNode, node.condition) || - visitNode(cbNode, node.incrementor) || + return visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); case 202: return visitNode(cbNode, node.initializer) || - visitNode(cbNode, node.expression) || + visitNode(cbNode, node.condition) || + visitNode(cbNode, node.incrementor) || visitNode(cbNode, node.statement); case 203: return visitNode(cbNode, node.initializer) || visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); case 204: - case 205: - return visitNode(cbNode, node.label); - case 206: - return visitNode(cbNode, node.expression); - case 207: - return visitNode(cbNode, node.expression) || + return visitNode(cbNode, node.initializer) || + visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); + case 205: + case 206: + return visitNode(cbNode, node.label); + case 207: + return visitNode(cbNode, node.expression); case 208: + return visitNode(cbNode, node.expression) || + visitNode(cbNode, node.statement); + case 209: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.caseBlock); - case 222: + case 223: return visitNodes(cbNodes, node.clauses); - case 243: + case 244: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.statements); - case 244: + case 245: return visitNodes(cbNodes, node.statements); - case 209: + case 210: return visitNode(cbNode, node.label) || visitNode(cbNode, node.statement); - case 210: - return visitNode(cbNode, node.expression); case 211: + return visitNode(cbNode, node.expression); + case 212: return visitNode(cbNode, node.tryBlock) || visitNode(cbNode, node.catchClause) || visitNode(cbNode, node.finallyBlock); - case 246: + case 247: return visitNode(cbNode, node.variableDeclaration) || visitNode(cbNode, node.block); - case 139: + case 140: return visitNode(cbNode, node.expression); - case 216: - case 188: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.name) || - visitNodes(cbNodes, node.typeParameters) || - visitNodes(cbNodes, node.heritageClauses) || - visitNodes(cbNodes, node.members); case 217: + case 189: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || @@ -5670,125 +5766,132 @@ var ts; visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeParameters) || - visitNode(cbNode, node.type); + visitNodes(cbNodes, node.heritageClauses) || + visitNodes(cbNodes, node.members); case 219: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || - visitNodes(cbNodes, node.members); - case 249: - return visitNode(cbNode, node.name) || - visitNode(cbNode, node.initializer); + visitNodes(cbNodes, node.typeParameters) || + visitNode(cbNode, node.type); case 220: + return visitNodes(cbNodes, node.decorators) || + visitNodes(cbNodes, node.modifiers) || + visitNode(cbNode, node.name) || + visitNodes(cbNodes, node.members); + case 250: + return visitNode(cbNode, node.name) || + visitNode(cbNode, node.initializer); + case 221: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.body); - case 223: + case 224: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.moduleReference); - case 224: + case 225: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.importClause) || visitNode(cbNode, node.moduleSpecifier); - case 225: + case 226: return visitNode(cbNode, node.name) || visitNode(cbNode, node.namedBindings); - case 226: - return visitNode(cbNode, node.name); case 227: - case 231: + return visitNode(cbNode, node.name); + case 228: + case 232: return visitNodes(cbNodes, node.elements); - case 230: + case 231: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.exportClause) || visitNode(cbNode, node.moduleSpecifier); - case 228: - case 232: + case 229: + case 233: return visitNode(cbNode, node.propertyName) || visitNode(cbNode, node.name); - case 229: + case 230: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.expression); - case 185: + case 186: return visitNode(cbNode, node.head) || visitNodes(cbNodes, node.templateSpans); - case 192: + case 193: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.literal); - case 136: + case 137: return visitNode(cbNode, node.expression); - case 245: + case 246: return visitNodes(cbNodes, node.types); - case 190: + case 191: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.typeArguments); - case 234: - return visitNode(cbNode, node.expression); - case 233: - return visitNodes(cbNodes, node.decorators); case 235: + return visitNode(cbNode, node.expression); + case 234: + return visitNodes(cbNodes, node.decorators); + case 236: return visitNode(cbNode, node.openingElement) || visitNodes(cbNodes, node.children) || visitNode(cbNode, node.closingElement); - case 236: case 237: + case 238: return visitNode(cbNode, node.tagName) || visitNodes(cbNodes, node.attributes); - case 240: + case 241: return visitNode(cbNode, node.name) || visitNode(cbNode, node.initializer); - case 241: - return visitNode(cbNode, node.expression); case 242: return visitNode(cbNode, node.expression); - case 239: + case 243: + return visitNode(cbNode, node.expression); + case 240: return visitNode(cbNode, node.tagName); - case 251: + case 252: return visitNode(cbNode, node.type); - case 255: - return visitNodes(cbNodes, node.types); case 256: return visitNodes(cbNodes, node.types); - case 254: + case 257: + return visitNodes(cbNodes, node.types); + case 255: return visitNode(cbNode, node.elementType); + case 259: + return visitNode(cbNode, node.type); case 258: return visitNode(cbNode, node.type); - case 257: - return visitNode(cbNode, node.type); - case 259: + case 260: return visitNodes(cbNodes, node.members); - case 261: + case 262: return visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeArguments); - case 262: - return visitNode(cbNode, node.type); case 263: + return visitNode(cbNode, node.type); + case 264: return visitNodes(cbNodes, node.parameters) || visitNode(cbNode, node.type); - case 264: - return visitNode(cbNode, node.type); case 265: return visitNode(cbNode, node.type); case 266: return visitNode(cbNode, node.type); - case 260: + case 267: + return visitNode(cbNode, node.type); + case 261: return visitNode(cbNode, node.name) || visitNode(cbNode, node.type); - case 267: + case 268: return visitNodes(cbNodes, node.tags); - case 269: + case 270: return visitNode(cbNode, node.preParameterName) || visitNode(cbNode, node.typeExpression) || visitNode(cbNode, node.postParameterName); - case 270: - return visitNode(cbNode, node.typeExpression); case 271: return visitNode(cbNode, node.typeExpression); case 272: + return visitNode(cbNode, node.typeExpression); + case 273: return visitNodes(cbNodes, node.typeParameters); } } @@ -5895,9 +5998,9 @@ var ts; return; function visit(node) { switch (node.kind) { - case 195: - case 215: - case 138: + case 196: + case 216: + case 139: addJSDocComment(node); } forEachChild(node, visit); @@ -5931,7 +6034,7 @@ var ts; } Parser.fixupParentReferences = fixupParentReferences; function createSourceFile(fileName, languageVersion) { - var sourceFile = new SourceFileConstructor(250, 0, sourceText.length); + var sourceFile = new SourceFileConstructor(251, 0, sourceText.length); nodeCount++; sourceFile.text = sourceText; sourceFile.bindDiagnostics = []; @@ -6222,7 +6325,7 @@ var ts; return token === 9 || token === 8 || ts.tokenIsIdentifierOrKeyword(token); } function parseComputedPropertyName() { - var node = createNode(136); + var node = createNode(137); parseExpected(19); node.expression = allowInAnd(parseExpression); parseExpected(20); @@ -6521,14 +6624,14 @@ var ts; function isReusableClassMember(node) { if (node) { switch (node.kind) { - case 144: - case 149: case 145: + case 150: case 146: - case 141: - case 193: + case 147: + case 142: + case 194: return true; - case 143: + case 144: var methodDeclaration = node; var nameIsConstructor = methodDeclaration.name.kind === 69 && methodDeclaration.name.originalKeywordKind === 121; @@ -6540,8 +6643,8 @@ var ts; function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 243: case 244: + case 245: return true; } } @@ -6550,65 +6653,65 @@ var ts; function isReusableStatement(node) { if (node) { switch (node.kind) { - case 215: + case 216: + case 196: case 195: - case 194: + case 199: case 198: - case 197: - case 210: + case 211: + case 207: + case 209: case 206: - case 208: case 205: + case 203: case 204: case 202: - case 203: case 201: - case 200: - case 207: - case 196: - case 211: - case 209: - case 199: + case 208: + case 197: case 212: + case 210: + case 200: + case 213: + case 225: case 224: - case 223: + case 231: case 230: - case 229: - case 220: - case 216: + case 221: case 217: - case 219: case 218: + case 220: + case 219: return true; } } return false; } function isReusableEnumMember(node) { - return node.kind === 249; + return node.kind === 250; } function isReusableTypeMember(node) { if (node) { switch (node.kind) { - case 148: - case 142: case 149: - case 140: - case 147: + case 143: + case 150: + case 141: + case 148: return true; } } return false; } function isReusableVariableDeclaration(node) { - if (node.kind !== 213) { + if (node.kind !== 214) { return false; } var variableDeclarator = node; return variableDeclarator.initializer === undefined; } function isReusableParameter(node) { - if (node.kind !== 138) { + if (node.kind !== 139) { return false; } var parameter = node; @@ -6708,7 +6811,7 @@ var ts; function parseEntityName(allowReservedWords, diagnosticMessage) { var entity = parseIdentifier(diagnosticMessage); while (parseOptional(21)) { - var node = createNode(135, entity.pos); + var node = createNode(136, entity.pos); node.left = entity; node.right = parseRightSideOfDot(allowReservedWords); entity = finishNode(node); @@ -6725,7 +6828,7 @@ var ts; return allowIdentifierNames ? parseIdentifierName() : parseIdentifier(); } function parseTemplateExpression() { - var template = createNode(185); + var template = createNode(186); template.head = parseTemplateLiteralFragment(); ts.Debug.assert(template.head.kind === 12, "Template head has wrong token kind"); var templateSpans = []; @@ -6738,7 +6841,7 @@ var ts; return finishNode(template); } function parseTemplateSpan() { - var span = createNode(192); + var span = createNode(193); span.expression = allowInAnd(parseExpression); var literal; if (token === 16) { @@ -6752,7 +6855,7 @@ var ts; return finishNode(span); } function parseStringLiteralTypeNode() { - return parseLiteralLikeNode(162, true); + return parseLiteralLikeNode(163, true); } function parseLiteralNode(internName) { return parseLiteralLikeNode(token, internName); @@ -6780,12 +6883,9 @@ var ts; } return node; } - function parseTypeReferenceOrTypePredicate() { + function parseTypeReference() { var typeName = parseEntityName(false, ts.Diagnostics.Type_expected); - if (typeName.kind === 69 && token === 124 && !scanner.hasPrecedingLineBreak()) { - return parseTypePredicate(typeName); - } - var node = createNode(151, typeName.pos); + var node = createNode(152, typeName.pos); node.typeName = typeName; if (!scanner.hasPrecedingLineBreak() && token === 25) { node.typeArguments = parseBracketedList(18, parseType, 25, 27); @@ -6794,24 +6894,24 @@ var ts; } function parseTypePredicate(lhs) { nextToken(); - var node = createNode(150, lhs.pos); + var node = createNode(151, lhs.pos); node.parameterName = lhs; node.type = parseType(); return finishNode(node); } function parseThisTypeNode() { - var node = createNode(161); + var node = createNode(162); nextToken(); return finishNode(node); } function parseTypeQuery() { - var node = createNode(154); + var node = createNode(155); parseExpected(101); node.exprName = parseEntityName(true); return finishNode(node); } function parseTypeParameter() { - var node = createNode(137); + var node = createNode(138); node.name = parseIdentifier(); if (parseOptional(83)) { if (isStartOfType() || !isStartOfExpression()) { @@ -6844,7 +6944,7 @@ var ts; } } function parseParameter() { - var node = createNode(138); + var node = createNode(139); node.decorators = parseDecorators(); setModifiers(node, parseModifiers()); node.dotDotDotToken = parseOptionalToken(22); @@ -6869,10 +6969,10 @@ var ts; signature.parameters = parseParameterList(yieldContext, awaitContext, requireCompleteParameterList); if (returnTokenRequired) { parseExpected(returnToken); - signature.type = parseType(); + signature.type = parseTypeOrTypePredicate(); } else if (parseOptional(returnToken)) { - signature.type = parseType(); + signature.type = parseTypeOrTypePredicate(); } } function parseParameterList(yieldContext, awaitContext, requireCompleteParameterList) { @@ -6899,7 +6999,7 @@ var ts; } function parseSignatureMember(kind) { var node = createNode(kind); - if (kind === 148) { + if (kind === 149) { parseExpected(92); } fillSignature(54, false, false, false, node); @@ -6939,7 +7039,7 @@ var ts; return token === 54 || token === 24 || token === 20; } function parseIndexSignatureDeclaration(fullStart, decorators, modifiers) { - var node = createNode(149, fullStart); + var node = createNode(150, fullStart); node.decorators = decorators; setModifiers(node, modifiers); node.parameters = parseBracketedList(16, parseParameter, 19, 20); @@ -6952,7 +7052,7 @@ var ts; var name = parsePropertyName(); var questionToken = parseOptionalToken(53); if (token === 17 || token === 25) { - var method = createNode(142, fullStart); + var method = createNode(143, fullStart); method.name = name; method.questionToken = questionToken; fillSignature(54, false, false, false, method); @@ -6960,7 +7060,7 @@ var ts; return finishNode(method); } else { - var property = createNode(140, fullStart); + var property = createNode(141, fullStart); property.name = name; property.questionToken = questionToken; property.type = parseTypeAnnotation(); @@ -7005,14 +7105,14 @@ var ts; switch (token) { case 17: case 25: - return parseSignatureMember(147); + return parseSignatureMember(148); case 19: return isIndexSignature() ? parseIndexSignatureDeclaration(scanner.getStartPos(), undefined, undefined) : parsePropertyOrMethodSignature(); case 92: if (lookAhead(isStartOfConstructSignature)) { - return parseSignatureMember(148); + return parseSignatureMember(149); } case 9: case 8: @@ -7042,7 +7142,7 @@ var ts; return token === 17 || token === 25; } function parseTypeLiteral() { - var node = createNode(155); + var node = createNode(156); node.members = parseObjectTypeMembers(); return finishNode(node); } @@ -7058,12 +7158,12 @@ var ts; return members; } function parseTupleType() { - var node = createNode(157); + var node = createNode(158); node.elementTypes = parseBracketedList(19, parseType, 19, 20); return finishNode(node); } function parseParenthesizedType() { - var node = createNode(160); + var node = createNode(161); parseExpected(17); node.type = parseType(); parseExpected(18); @@ -7071,7 +7171,7 @@ var ts; } function parseFunctionOrConstructorType(kind) { var node = createNode(kind); - if (kind === 153) { + if (kind === 154) { parseExpected(92); } fillSignature(34, false, false, false, node); @@ -7089,7 +7189,7 @@ var ts; case 120: case 131: var node = tryParse(parseKeywordAndNoDot); - return node || parseTypeReferenceOrTypePredicate(); + return node || parseTypeReference(); case 9: return parseStringLiteralTypeNode(); case 103: @@ -7112,7 +7212,7 @@ var ts; case 17: return parseParenthesizedType(); default: - return parseTypeReferenceOrTypePredicate(); + return parseTypeReference(); } } function isStartOfType() { @@ -7145,7 +7245,7 @@ var ts; var type = parseNonArrayType(); while (!scanner.hasPrecedingLineBreak() && parseOptional(19)) { parseExpected(20); - var node = createNode(156, type.pos); + var node = createNode(157, type.pos); node.elementType = type; type = finishNode(node); } @@ -7167,10 +7267,10 @@ var ts; return type; } function parseIntersectionTypeOrHigher() { - return parseUnionOrIntersectionType(159, parseArrayTypeOrHigher, 46); + return parseUnionOrIntersectionType(160, parseArrayTypeOrHigher, 46); } function parseUnionTypeOrHigher() { - return parseUnionOrIntersectionType(158, parseIntersectionTypeOrHigher, 47); + return parseUnionOrIntersectionType(159, parseIntersectionTypeOrHigher, 47); } function isStartOfFunctionType() { if (token === 25) { @@ -7199,15 +7299,35 @@ var ts; } return false; } + function parseTypeOrTypePredicate() { + var typePredicateVariable = isIdentifier() && tryParse(parseTypePredicatePrefix); + var type = parseType(); + if (typePredicateVariable) { + var node = createNode(151, typePredicateVariable.pos); + node.parameterName = typePredicateVariable; + node.type = type; + return finishNode(node); + } + else { + return type; + } + } + function parseTypePredicatePrefix() { + var id = parseIdentifier(); + if (token === 124 && !scanner.hasPrecedingLineBreak()) { + nextToken(); + return id; + } + } function parseType() { return doOutsideOfContext(10, parseTypeWorker); } function parseTypeWorker() { if (isStartOfFunctionType()) { - return parseFunctionOrConstructorType(152); + return parseFunctionOrConstructorType(153); } if (token === 92) { - return parseFunctionOrConstructorType(153); + return parseFunctionOrConstructorType(154); } return parseUnionTypeOrHigher(); } @@ -7326,7 +7446,7 @@ var ts; return !scanner.hasPrecedingLineBreak() && isIdentifier(); } function parseYieldExpression() { - var node = createNode(186); + var node = createNode(187); nextToken(); if (!scanner.hasPrecedingLineBreak() && (token === 37 || isStartOfExpression())) { @@ -7340,8 +7460,8 @@ var ts; } function parseSimpleArrowFunctionExpression(identifier) { ts.Debug.assert(token === 34, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); - var node = createNode(176, identifier.pos); - var parameter = createNode(138, identifier.pos); + var node = createNode(177, identifier.pos); + var parameter = createNode(139, identifier.pos); parameter.name = identifier; finishNode(parameter); node.parameters = [parameter]; @@ -7452,7 +7572,7 @@ var ts; return parseParenthesizedArrowFunctionExpressionHead(false); } function parseParenthesizedArrowFunctionExpressionHead(allowAmbiguity) { - var node = createNode(176); + var node = createNode(177); setModifiers(node, parseModifiersForArrowFunction()); var isAsync = !!(node.flags & 256); fillSignature(54, false, isAsync, !allowAmbiguity, node); @@ -7484,7 +7604,7 @@ var ts; if (!questionToken) { return leftOperand; } - var node = createNode(184, leftOperand.pos); + var node = createNode(185, leftOperand.pos); node.condition = leftOperand; node.questionToken = questionToken; node.whenTrue = doOutsideOfContext(disallowInAndDecoratorContext, parseAssignmentExpressionOrHigher); @@ -7497,7 +7617,7 @@ var ts; return parseBinaryExpressionRest(precedence, leftOperand); } function isInOrOfKeyword(t) { - return t === 90 || t === 134; + return t === 90 || t === 135; } function parseBinaryExpressionRest(precedence, leftOperand) { while (true) { @@ -7575,43 +7695,43 @@ var ts; return -1; } function makeBinaryExpression(left, operatorToken, right) { - var node = createNode(183, left.pos); + var node = createNode(184, left.pos); node.left = left; node.operatorToken = operatorToken; node.right = right; return finishNode(node); } function makeAsExpression(left, right) { - var node = createNode(191, left.pos); + var node = createNode(192, left.pos); node.expression = left; node.type = right; return finishNode(node); } function parsePrefixUnaryExpression() { - var node = createNode(181); + var node = createNode(182); node.operator = token; nextToken(); node.operand = parseSimpleUnaryExpression(); return finishNode(node); } function parseDeleteExpression() { - var node = createNode(177); - nextToken(); - node.expression = parseSimpleUnaryExpression(); - return finishNode(node); - } - function parseTypeOfExpression() { var node = createNode(178); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } - function parseVoidExpression() { + function parseTypeOfExpression() { var node = createNode(179); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } + function parseVoidExpression() { + var node = createNode(180); + nextToken(); + node.expression = parseSimpleUnaryExpression(); + return finishNode(node); + } function isAwaitExpression() { if (token === 119) { if (inAwaitContext()) { @@ -7622,7 +7742,7 @@ var ts; return false; } function parseAwaitExpression() { - var node = createNode(180); + var node = createNode(181); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); @@ -7641,7 +7761,7 @@ var ts; var simpleUnaryExpression = parseSimpleUnaryExpression(); if (token === 38) { var start = ts.skipTrivia(sourceText, simpleUnaryExpression.pos); - if (simpleUnaryExpression.kind === 173) { + if (simpleUnaryExpression.kind === 174) { parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); } else { @@ -7689,7 +7809,7 @@ var ts; } function parseIncrementExpression() { if (token === 41 || token === 42) { - var node = createNode(181); + var node = createNode(182); node.operator = token; nextToken(); node.operand = parseLeftHandSideExpressionOrHigher(); @@ -7701,7 +7821,7 @@ var ts; var expression = parseLeftHandSideExpressionOrHigher(); ts.Debug.assert(ts.isLeftHandSideExpression(expression)); if ((token === 41 || token === 42) && !scanner.hasPrecedingLineBreak()) { - var node = createNode(182, expression.pos); + var node = createNode(183, expression.pos); node.operand = expression; node.operator = token; nextToken(); @@ -7724,7 +7844,7 @@ var ts; if (token === 17 || token === 21 || token === 19) { return expression; } - var node = createNode(168, expression.pos); + var node = createNode(169, expression.pos); node.expression = expression; node.dotToken = parseExpectedToken(21, false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); node.name = parseRightSideOfDot(true); @@ -7743,8 +7863,8 @@ var ts; function parseJsxElementOrSelfClosingElement(inExpressionContext) { var opening = parseJsxOpeningOrSelfClosingElement(inExpressionContext); var result; - if (opening.kind === 237) { - var node = createNode(235, opening.pos); + if (opening.kind === 238) { + var node = createNode(236, opening.pos); node.openingElement = opening; node.children = parseJsxChildren(node.openingElement.tagName); node.closingElement = parseJsxClosingElement(inExpressionContext); @@ -7754,14 +7874,14 @@ var ts; result = finishNode(node); } else { - ts.Debug.assert(opening.kind === 236); + ts.Debug.assert(opening.kind === 237); result = opening; } if (inExpressionContext && token === 25) { var invalidElement = tryParse(function () { return parseJsxElementOrSelfClosingElement(true); }); if (invalidElement) { parseErrorAtCurrentToken(ts.Diagnostics.JSX_expressions_must_have_one_parent_element); - var badNode = createNode(183, result.pos); + var badNode = createNode(184, result.pos); badNode.end = invalidElement.end; badNode.left = result; badNode.right = invalidElement; @@ -7773,13 +7893,13 @@ var ts; return result; } function parseJsxText() { - var node = createNode(238, scanner.getStartPos()); + var node = createNode(239, scanner.getStartPos()); token = scanner.scanJsxToken(); return finishNode(node); } function parseJsxChild() { switch (token) { - case 238: + case 239: return parseJsxText(); case 15: return parseJsxExpression(false); @@ -7815,7 +7935,7 @@ var ts; var attributes = parseList(13, parseJsxAttribute); var node; if (token === 27) { - node = createNode(237, fullStart); + node = createNode(238, fullStart); scanJsxText(); } else { @@ -7827,7 +7947,7 @@ var ts; parseExpected(27, undefined, false); scanJsxText(); } - node = createNode(236, fullStart); + node = createNode(237, fullStart); } node.tagName = tagName; node.attributes = attributes; @@ -7838,7 +7958,7 @@ var ts; var elementName = parseIdentifierName(); while (parseOptional(21)) { scanJsxIdentifier(); - var node = createNode(135, elementName.pos); + var node = createNode(136, elementName.pos); node.left = elementName; node.right = parseIdentifierName(); elementName = finishNode(node); @@ -7846,7 +7966,7 @@ var ts; return elementName; } function parseJsxExpression(inExpressionContext) { - var node = createNode(242); + var node = createNode(243); parseExpected(15); if (token !== 16) { node.expression = parseAssignmentExpressionOrHigher(); @@ -7865,7 +7985,7 @@ var ts; return parseJsxSpreadAttribute(); } scanJsxIdentifier(); - var node = createNode(240); + var node = createNode(241); node.name = parseIdentifierName(); if (parseOptional(56)) { switch (token) { @@ -7880,7 +8000,7 @@ var ts; return finishNode(node); } function parseJsxSpreadAttribute() { - var node = createNode(241); + var node = createNode(242); parseExpected(15); parseExpected(22); node.expression = parseExpression(); @@ -7888,7 +8008,7 @@ var ts; return finishNode(node); } function parseJsxClosingElement(inExpressionContext) { - var node = createNode(239); + var node = createNode(240); parseExpected(26); node.tagName = parseJsxElementName(); if (inExpressionContext) { @@ -7901,7 +8021,7 @@ var ts; return finishNode(node); } function parseTypeAssertion() { - var node = createNode(173); + var node = createNode(174); parseExpected(25); node.type = parseType(); parseExpected(27); @@ -7912,7 +8032,7 @@ var ts; while (true) { var dotToken = parseOptionalToken(21); if (dotToken) { - var propertyAccess = createNode(168, expression.pos); + var propertyAccess = createNode(169, expression.pos); propertyAccess.expression = expression; propertyAccess.dotToken = dotToken; propertyAccess.name = parseRightSideOfDot(true); @@ -7920,7 +8040,7 @@ var ts; continue; } if (!inDecoratorContext() && parseOptional(19)) { - var indexedAccess = createNode(169, expression.pos); + var indexedAccess = createNode(170, expression.pos); indexedAccess.expression = expression; if (token !== 20) { indexedAccess.argumentExpression = allowInAnd(parseExpression); @@ -7934,7 +8054,7 @@ var ts; continue; } if (token === 11 || token === 12) { - var tagExpression = createNode(172, expression.pos); + var tagExpression = createNode(173, expression.pos); tagExpression.tag = expression; tagExpression.template = token === 11 ? parseLiteralNode() @@ -7953,7 +8073,7 @@ var ts; if (!typeArguments) { return expression; } - var callExpr = createNode(170, expression.pos); + var callExpr = createNode(171, expression.pos); callExpr.expression = expression; callExpr.typeArguments = typeArguments; callExpr.arguments = parseArgumentList(); @@ -7961,7 +8081,7 @@ var ts; continue; } else if (token === 17) { - var callExpr = createNode(170, expression.pos); + var callExpr = createNode(171, expression.pos); callExpr.expression = expression; callExpr.arguments = parseArgumentList(); expression = finishNode(callExpr); @@ -8056,28 +8176,28 @@ var ts; return parseIdentifier(ts.Diagnostics.Expression_expected); } function parseParenthesizedExpression() { - var node = createNode(174); + var node = createNode(175); parseExpected(17); node.expression = allowInAnd(parseExpression); parseExpected(18); return finishNode(node); } function parseSpreadElement() { - var node = createNode(187); + var node = createNode(188); parseExpected(22); node.expression = parseAssignmentExpressionOrHigher(); return finishNode(node); } function parseArgumentOrArrayLiteralElement() { return token === 22 ? parseSpreadElement() : - token === 24 ? createNode(189) : + token === 24 ? createNode(190) : parseAssignmentExpressionOrHigher(); } function parseArgumentExpression() { return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement); } function parseArrayLiteralExpression() { - var node = createNode(166); + var node = createNode(167); parseExpected(19); if (scanner.hasPrecedingLineBreak()) node.flags |= 1024; @@ -8087,10 +8207,10 @@ var ts; } function tryParseAccessorDeclaration(fullStart, decorators, modifiers) { if (parseContextualModifier(123)) { - return parseAccessorDeclaration(145, fullStart, decorators, modifiers); + return parseAccessorDeclaration(146, fullStart, decorators, modifiers); } else if (parseContextualModifier(129)) { - return parseAccessorDeclaration(146, fullStart, decorators, modifiers); + return parseAccessorDeclaration(147, fullStart, decorators, modifiers); } return undefined; } @@ -8111,7 +8231,7 @@ var ts; } var isShorthandPropertyAssignment = tokenIsIdentifier && (token === 24 || token === 16 || token === 56); if (isShorthandPropertyAssignment) { - var shorthandDeclaration = createNode(248, fullStart); + var shorthandDeclaration = createNode(249, fullStart); shorthandDeclaration.name = propertyName; shorthandDeclaration.questionToken = questionToken; var equalsToken = parseOptionalToken(56); @@ -8122,7 +8242,7 @@ var ts; return finishNode(shorthandDeclaration); } else { - var propertyAssignment = createNode(247, fullStart); + var propertyAssignment = createNode(248, fullStart); propertyAssignment.modifiers = modifiers; propertyAssignment.name = propertyName; propertyAssignment.questionToken = questionToken; @@ -8132,7 +8252,7 @@ var ts; } } function parseObjectLiteralExpression() { - var node = createNode(167); + var node = createNode(168); parseExpected(15); if (scanner.hasPrecedingLineBreak()) { node.flags |= 1024; @@ -8146,7 +8266,7 @@ var ts; if (saveDecoratorContext) { setDecoratorContext(false); } - var node = createNode(175); + var node = createNode(176); setModifiers(node, parseModifiers()); parseExpected(87); node.asteriskToken = parseOptionalToken(37); @@ -8168,7 +8288,7 @@ var ts; return isIdentifier() ? parseIdentifier() : undefined; } function parseNewExpression() { - var node = createNode(171); + var node = createNode(172); parseExpected(92); node.expression = parseMemberExpressionOrHigher(); node.typeArguments = tryParse(parseTypeArgumentsInExpression); @@ -8178,7 +8298,7 @@ var ts; return finishNode(node); } function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) { - var node = createNode(194); + var node = createNode(195); if (parseExpected(15, diagnosticMessage) || ignoreMissingOpenBrace) { node.statements = parseList(1, parseStatement); parseExpected(16); @@ -8206,12 +8326,12 @@ var ts; return block; } function parseEmptyStatement() { - var node = createNode(196); + var node = createNode(197); parseExpected(23); return finishNode(node); } function parseIfStatement() { - var node = createNode(198); + var node = createNode(199); parseExpected(88); parseExpected(17); node.expression = allowInAnd(parseExpression); @@ -8221,7 +8341,7 @@ var ts; return finishNode(node); } function parseDoStatement() { - var node = createNode(199); + var node = createNode(200); parseExpected(79); node.statement = parseStatement(); parseExpected(104); @@ -8232,7 +8352,7 @@ var ts; return finishNode(node); } function parseWhileStatement() { - var node = createNode(200); + var node = createNode(201); parseExpected(104); parseExpected(17); node.expression = allowInAnd(parseExpression); @@ -8255,21 +8375,21 @@ var ts; } var forOrForInOrForOfStatement; if (parseOptional(90)) { - var forInStatement = createNode(202, pos); + var forInStatement = createNode(203, pos); forInStatement.initializer = initializer; forInStatement.expression = allowInAnd(parseExpression); parseExpected(18); forOrForInOrForOfStatement = forInStatement; } - else if (parseOptional(134)) { - var forOfStatement = createNode(203, pos); + else if (parseOptional(135)) { + var forOfStatement = createNode(204, pos); forOfStatement.initializer = initializer; forOfStatement.expression = allowInAnd(parseAssignmentExpressionOrHigher); parseExpected(18); forOrForInOrForOfStatement = forOfStatement; } else { - var forStatement = createNode(201, pos); + var forStatement = createNode(202, pos); forStatement.initializer = initializer; parseExpected(23); if (token !== 23 && token !== 18) { @@ -8287,7 +8407,7 @@ var ts; } function parseBreakOrContinueStatement(kind) { var node = createNode(kind); - parseExpected(kind === 205 ? 70 : 75); + parseExpected(kind === 206 ? 70 : 75); if (!canParseSemicolon()) { node.label = parseIdentifier(); } @@ -8295,7 +8415,7 @@ var ts; return finishNode(node); } function parseReturnStatement() { - var node = createNode(206); + var node = createNode(207); parseExpected(94); if (!canParseSemicolon()) { node.expression = allowInAnd(parseExpression); @@ -8304,7 +8424,7 @@ var ts; return finishNode(node); } function parseWithStatement() { - var node = createNode(207); + var node = createNode(208); parseExpected(105); parseExpected(17); node.expression = allowInAnd(parseExpression); @@ -8313,7 +8433,7 @@ var ts; return finishNode(node); } function parseCaseClause() { - var node = createNode(243); + var node = createNode(244); parseExpected(71); node.expression = allowInAnd(parseExpression); parseExpected(54); @@ -8321,7 +8441,7 @@ var ts; return finishNode(node); } function parseDefaultClause() { - var node = createNode(244); + var node = createNode(245); parseExpected(77); parseExpected(54); node.statements = parseList(3, parseStatement); @@ -8331,12 +8451,12 @@ var ts; return token === 71 ? parseCaseClause() : parseDefaultClause(); } function parseSwitchStatement() { - var node = createNode(208); + var node = createNode(209); parseExpected(96); parseExpected(17); node.expression = allowInAnd(parseExpression); parseExpected(18); - var caseBlock = createNode(222, scanner.getStartPos()); + var caseBlock = createNode(223, scanner.getStartPos()); parseExpected(15); caseBlock.clauses = parseList(2, parseCaseOrDefaultClause); parseExpected(16); @@ -8344,14 +8464,14 @@ var ts; return finishNode(node); } function parseThrowStatement() { - var node = createNode(210); + var node = createNode(211); parseExpected(98); node.expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression); parseSemicolon(); return finishNode(node); } function parseTryStatement() { - var node = createNode(211); + var node = createNode(212); parseExpected(100); node.tryBlock = parseBlock(false); node.catchClause = token === 72 ? parseCatchClause() : undefined; @@ -8362,7 +8482,7 @@ var ts; return finishNode(node); } function parseCatchClause() { - var result = createNode(246); + var result = createNode(247); parseExpected(72); if (parseExpected(17)) { result.variableDeclaration = parseVariableDeclaration(); @@ -8372,7 +8492,7 @@ var ts; return finishNode(result); } function parseDebuggerStatement() { - var node = createNode(212); + var node = createNode(213); parseExpected(76); parseSemicolon(); return finishNode(node); @@ -8381,13 +8501,13 @@ var ts; var fullStart = scanner.getStartPos(); var expression = allowInAnd(parseExpression); if (expression.kind === 69 && parseOptional(54)) { - var labeledStatement = createNode(209, fullStart); + var labeledStatement = createNode(210, fullStart); labeledStatement.label = expression; labeledStatement.statement = parseStatement(); return finishNode(labeledStatement); } else { - var expressionStatement = createNode(197, fullStart); + var expressionStatement = createNode(198, fullStart); expressionStatement.expression = expression; parseSemicolon(); return finishNode(expressionStatement); @@ -8432,6 +8552,8 @@ var ts; return false; } continue; + case 134: + return nextToken() === 15; case 89: nextToken(); return token === 9 || token === 37 || @@ -8489,6 +8611,7 @@ var ts; case 125: case 126: case 132: + case 134: return true; case 112: case 110: @@ -8532,9 +8655,9 @@ var ts; case 86: return parseForOrForInOrForOfStatement(); case 75: - return parseBreakOrContinueStatement(204); - case 70: return parseBreakOrContinueStatement(205); + case 70: + return parseBreakOrContinueStatement(206); case 94: return parseReturnStatement(); case 105: @@ -8566,6 +8689,7 @@ var ts; case 112: case 115: case 113: + case 134: if (isStartOfDeclaration()) { return parseDeclaration(); } @@ -8592,6 +8716,7 @@ var ts; return parseTypeAliasDeclaration(fullStart, decorators, modifiers); case 81: return parseEnumDeclaration(fullStart, decorators, modifiers); + case 134: case 125: case 126: return parseModuleDeclaration(fullStart, decorators, modifiers); @@ -8604,7 +8729,7 @@ var ts; parseExportDeclaration(fullStart, decorators, modifiers); default: if (decorators || modifiers) { - var node = createMissingNode(233, true, ts.Diagnostics.Declaration_expected); + var node = createMissingNode(234, true, ts.Diagnostics.Declaration_expected); node.pos = fullStart; node.decorators = decorators; setModifiers(node, modifiers); @@ -8625,16 +8750,16 @@ var ts; } function parseArrayBindingElement() { if (token === 24) { - return createNode(189); + return createNode(190); } - var node = createNode(165); + var node = createNode(166); node.dotDotDotToken = parseOptionalToken(22); node.name = parseIdentifierOrPattern(); node.initializer = parseBindingElementInitializer(false); return finishNode(node); } function parseObjectBindingElement() { - var node = createNode(165); + var node = createNode(166); var tokenIsIdentifier = isIdentifier(); var propertyName = parsePropertyName(); if (tokenIsIdentifier && token !== 54) { @@ -8649,14 +8774,14 @@ var ts; return finishNode(node); } function parseObjectBindingPattern() { - var node = createNode(163); + var node = createNode(164); parseExpected(15); node.elements = parseDelimitedList(9, parseObjectBindingElement); parseExpected(16); return finishNode(node); } function parseArrayBindingPattern() { - var node = createNode(164); + var node = createNode(165); parseExpected(19); node.elements = parseDelimitedList(10, parseArrayBindingElement); parseExpected(20); @@ -8675,7 +8800,7 @@ var ts; return parseIdentifier(); } function parseVariableDeclaration() { - var node = createNode(213); + var node = createNode(214); node.name = parseIdentifierOrPattern(); node.type = parseTypeAnnotation(); if (!isInOrOfKeyword(token)) { @@ -8684,7 +8809,7 @@ var ts; return finishNode(node); } function parseVariableDeclarationList(inForStatementInitializer) { - var node = createNode(214); + var node = createNode(215); switch (token) { case 102: break; @@ -8698,7 +8823,7 @@ var ts; ts.Debug.fail(); } nextToken(); - if (token === 134 && lookAhead(canFollowContextualOfKeyword)) { + if (token === 135 && lookAhead(canFollowContextualOfKeyword)) { node.declarations = createMissingList(); } else { @@ -8713,7 +8838,7 @@ var ts; return nextTokenIsIdentifier() && nextToken() === 18; } function parseVariableStatement(fullStart, decorators, modifiers) { - var node = createNode(195, fullStart); + var node = createNode(196, fullStart); node.decorators = decorators; setModifiers(node, modifiers); node.declarationList = parseVariableDeclarationList(false); @@ -8721,7 +8846,7 @@ var ts; return finishNode(node); } function parseFunctionDeclaration(fullStart, decorators, modifiers) { - var node = createNode(215, fullStart); + var node = createNode(216, fullStart); node.decorators = decorators; setModifiers(node, modifiers); parseExpected(87); @@ -8734,7 +8859,7 @@ var ts; return finishNode(node); } function parseConstructorDeclaration(pos, decorators, modifiers) { - var node = createNode(144, pos); + var node = createNode(145, pos); node.decorators = decorators; setModifiers(node, modifiers); parseExpected(121); @@ -8743,7 +8868,7 @@ var ts; return finishNode(node); } function parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, diagnosticMessage) { - var method = createNode(143, fullStart); + var method = createNode(144, fullStart); method.decorators = decorators; setModifiers(method, modifiers); method.asteriskToken = asteriskToken; @@ -8756,7 +8881,7 @@ var ts; return finishNode(method); } function parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken) { - var property = createNode(141, fullStart); + var property = createNode(142, fullStart); property.decorators = decorators; setModifiers(property, modifiers); property.name = name; @@ -8852,7 +8977,7 @@ var ts; decorators = []; decorators.pos = decoratorStart; } - var decorator = createNode(139, decoratorStart); + var decorator = createNode(140, decoratorStart); decorator.expression = doInDecoratorContext(parseLeftHandSideExpressionOrHigher); decorators.push(finishNode(decorator)); } @@ -8908,7 +9033,7 @@ var ts; } function parseClassElement() { if (token === 23) { - var result = createNode(193); + var result = createNode(194); nextToken(); return finishNode(result); } @@ -8939,10 +9064,10 @@ var ts; ts.Debug.fail("Should not have attempted to parse class member declaration."); } function parseClassExpression() { - return parseClassDeclarationOrExpression(scanner.getStartPos(), undefined, undefined, 188); + return parseClassDeclarationOrExpression(scanner.getStartPos(), undefined, undefined, 189); } function parseClassDeclaration(fullStart, decorators, modifiers) { - return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 216); + return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 217); } function parseClassDeclarationOrExpression(fullStart, decorators, modifiers, kind) { var node = createNode(kind, fullStart); @@ -8977,7 +9102,7 @@ var ts; } function parseHeritageClause() { if (token === 83 || token === 106) { - var node = createNode(245); + var node = createNode(246); node.token = token; nextToken(); node.types = parseDelimitedList(7, parseExpressionWithTypeArguments); @@ -8986,7 +9111,7 @@ var ts; return undefined; } function parseExpressionWithTypeArguments() { - var node = createNode(190); + var node = createNode(191); node.expression = parseLeftHandSideExpressionOrHigher(); if (token === 25) { node.typeArguments = parseBracketedList(18, parseType, 25, 27); @@ -9000,7 +9125,7 @@ var ts; return parseList(5, parseClassElement); } function parseInterfaceDeclaration(fullStart, decorators, modifiers) { - var node = createNode(217, fullStart); + var node = createNode(218, fullStart); node.decorators = decorators; setModifiers(node, modifiers); parseExpected(107); @@ -9011,7 +9136,7 @@ var ts; return finishNode(node); } function parseTypeAliasDeclaration(fullStart, decorators, modifiers) { - var node = createNode(218, fullStart); + var node = createNode(219, fullStart); node.decorators = decorators; setModifiers(node, modifiers); parseExpected(132); @@ -9023,13 +9148,13 @@ var ts; return finishNode(node); } function parseEnumMember() { - var node = createNode(249, scanner.getStartPos()); + var node = createNode(250, scanner.getStartPos()); node.name = parsePropertyName(); node.initializer = allowInAnd(parseNonParameterInitializer); return finishNode(node); } function parseEnumDeclaration(fullStart, decorators, modifiers) { - var node = createNode(219, fullStart); + var node = createNode(220, fullStart); node.decorators = decorators; setModifiers(node, modifiers); parseExpected(81); @@ -9044,7 +9169,7 @@ var ts; return finishNode(node); } function parseModuleBlock() { - var node = createNode(221, scanner.getStartPos()); + var node = createNode(222, scanner.getStartPos()); if (parseExpected(15)) { node.statements = parseList(1, parseStatement); parseExpected(16); @@ -9055,7 +9180,7 @@ var ts; return finishNode(node); } function parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags) { - var node = createNode(220, fullStart); + var node = createNode(221, fullStart); var namespaceFlag = flags & 65536; node.decorators = decorators; setModifiers(node, modifiers); @@ -9067,16 +9192,25 @@ var ts; return finishNode(node); } function parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers) { - var node = createNode(220, fullStart); + var node = createNode(221, fullStart); node.decorators = decorators; setModifiers(node, modifiers); - node.name = parseLiteralNode(true); + if (token === 134) { + node.name = parseIdentifier(); + node.flags |= 2097152; + } + else { + node.name = parseLiteralNode(true); + } node.body = parseModuleBlock(); return finishNode(node); } function parseModuleDeclaration(fullStart, decorators, modifiers) { var flags = modifiers ? modifiers.flags : 0; - if (parseOptional(126)) { + if (token === 134) { + return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers); + } + else if (parseOptional(126)) { flags |= 65536; } else { @@ -9104,7 +9238,7 @@ var ts; if (isIdentifier()) { identifier = parseIdentifier(); if (token !== 24 && token !== 133) { - var importEqualsDeclaration = createNode(223, fullStart); + var importEqualsDeclaration = createNode(224, fullStart); importEqualsDeclaration.decorators = decorators; setModifiers(importEqualsDeclaration, modifiers); importEqualsDeclaration.name = identifier; @@ -9114,7 +9248,7 @@ var ts; return finishNode(importEqualsDeclaration); } } - var importDeclaration = createNode(224, fullStart); + var importDeclaration = createNode(225, fullStart); importDeclaration.decorators = decorators; setModifiers(importDeclaration, modifiers); if (identifier || @@ -9128,13 +9262,13 @@ var ts; return finishNode(importDeclaration); } function parseImportClause(identifier, fullStart) { - var importClause = createNode(225, fullStart); + var importClause = createNode(226, fullStart); if (identifier) { importClause.name = identifier; } if (!importClause.name || parseOptional(24)) { - importClause.namedBindings = token === 37 ? parseNamespaceImport() : parseNamedImportsOrExports(227); + importClause.namedBindings = token === 37 ? parseNamespaceImport() : parseNamedImportsOrExports(228); } return finishNode(importClause); } @@ -9144,7 +9278,7 @@ var ts; : parseEntityName(false); } function parseExternalModuleReference() { - var node = createNode(234); + var node = createNode(235); parseExpected(127); parseExpected(17); node.expression = parseModuleSpecifier(); @@ -9162,7 +9296,7 @@ var ts; } } function parseNamespaceImport() { - var namespaceImport = createNode(226); + var namespaceImport = createNode(227); parseExpected(37); parseExpected(116); namespaceImport.name = parseIdentifier(); @@ -9170,14 +9304,14 @@ var ts; } function parseNamedImportsOrExports(kind) { var node = createNode(kind); - node.elements = parseBracketedList(21, kind === 227 ? parseImportSpecifier : parseExportSpecifier, 15, 16); + node.elements = parseBracketedList(21, kind === 228 ? parseImportSpecifier : parseExportSpecifier, 15, 16); return finishNode(node); } function parseExportSpecifier() { - return parseImportOrExportSpecifier(232); + return parseImportOrExportSpecifier(233); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(228); + return parseImportOrExportSpecifier(229); } function parseImportOrExportSpecifier(kind) { var node = createNode(kind); @@ -9196,13 +9330,13 @@ var ts; else { node.name = identifierName; } - if (kind === 228 && checkIdentifierIsKeyword) { + if (kind === 229 && checkIdentifierIsKeyword) { parseErrorAtPosition(checkIdentifierStart, checkIdentifierEnd - checkIdentifierStart, ts.Diagnostics.Identifier_expected); } return finishNode(node); } function parseExportDeclaration(fullStart, decorators, modifiers) { - var node = createNode(230, fullStart); + var node = createNode(231, fullStart); node.decorators = decorators; setModifiers(node, modifiers); if (parseOptional(37)) { @@ -9210,7 +9344,7 @@ var ts; node.moduleSpecifier = parseModuleSpecifier(); } else { - node.exportClause = parseNamedImportsOrExports(231); + node.exportClause = parseNamedImportsOrExports(232); if (token === 133 || (token === 9 && !scanner.hasPrecedingLineBreak())) { parseExpected(133); node.moduleSpecifier = parseModuleSpecifier(); @@ -9220,7 +9354,7 @@ var ts; return finishNode(node); } function parseExportAssignment(fullStart, decorators, modifiers) { - var node = createNode(229, fullStart); + var node = createNode(230, fullStart); node.decorators = decorators; setModifiers(node, modifiers); if (parseOptional(56)) { @@ -9292,10 +9426,10 @@ var ts; function setExternalModuleIndicator(sourceFile) { sourceFile.externalModuleIndicator = ts.forEach(sourceFile.statements, function (node) { return node.flags & 2 - || node.kind === 223 && node.moduleReference.kind === 234 - || node.kind === 224 - || node.kind === 229 + || node.kind === 224 && node.moduleReference.kind === 235 + || node.kind === 225 || node.kind === 230 + || node.kind === 231 ? node : undefined; }); @@ -9330,7 +9464,7 @@ var ts; function parseJSDocTypeExpression(start, length) { scanner.setText(sourceText, start, length); token = nextToken(); - var result = createNode(251); + var result = createNode(252); parseExpected(15); result.type = parseJSDocTopLevelType(); parseExpected(16); @@ -9341,12 +9475,12 @@ var ts; function parseJSDocTopLevelType() { var type = parseJSDocType(); if (token === 47) { - var unionType = createNode(255, type.pos); + var unionType = createNode(256, type.pos); unionType.types = parseJSDocTypeList(type); type = finishNode(unionType); } if (token === 56) { - var optionalType = createNode(262, type.pos); + var optionalType = createNode(263, type.pos); nextToken(); optionalType.type = type; type = finishNode(optionalType); @@ -9357,20 +9491,20 @@ var ts; var type = parseBasicTypeExpression(); while (true) { if (token === 19) { - var arrayType = createNode(254, type.pos); + var arrayType = createNode(255, type.pos); arrayType.elementType = type; nextToken(); parseExpected(20); type = finishNode(arrayType); } else if (token === 53) { - var nullableType = createNode(257, type.pos); + var nullableType = createNode(258, type.pos); nullableType.type = type; nextToken(); type = finishNode(nullableType); } else if (token === 49) { - var nonNullableType = createNode(258, type.pos); + var nonNullableType = createNode(259, type.pos); nonNullableType.type = type; nextToken(); type = finishNode(nonNullableType); @@ -9414,27 +9548,27 @@ var ts; return parseJSDocTypeReference(); } function parseJSDocThisType() { - var result = createNode(266); + var result = createNode(267); nextToken(); parseExpected(54); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocConstructorType() { - var result = createNode(265); + var result = createNode(266); nextToken(); parseExpected(54); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocVariadicType() { - var result = createNode(264); + var result = createNode(265); nextToken(); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocFunctionType() { - var result = createNode(263); + var result = createNode(264); nextToken(); parseExpected(17); result.parameters = parseDelimitedList(22, parseJSDocParameter); @@ -9447,12 +9581,12 @@ var ts; return finishNode(result); } function parseJSDocParameter() { - var parameter = createNode(138); + var parameter = createNode(139); parameter.type = parseJSDocType(); return finishNode(parameter); } function parseJSDocTypeReference() { - var result = createNode(261); + var result = createNode(262); result.name = parseSimplePropertyName(); while (parseOptional(21)) { if (token === 25) { @@ -9481,13 +9615,13 @@ var ts; } } function parseQualifiedName(left) { - var result = createNode(135, left.pos); + var result = createNode(136, left.pos); result.left = left; result.right = parseIdentifierName(); return finishNode(result); } function parseJSDocRecordType() { - var result = createNode(259); + var result = createNode(260); nextToken(); result.members = parseDelimitedList(24, parseJSDocRecordMember); checkForTrailingComma(result.members); @@ -9495,7 +9629,7 @@ var ts; return finishNode(result); } function parseJSDocRecordMember() { - var result = createNode(260); + var result = createNode(261); result.name = parseSimplePropertyName(); if (token === 54) { nextToken(); @@ -9504,13 +9638,13 @@ var ts; return finishNode(result); } function parseJSDocNonNullableType() { - var result = createNode(258); + var result = createNode(259); nextToken(); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocTupleType() { - var result = createNode(256); + var result = createNode(257); nextToken(); result.types = parseDelimitedList(25, parseJSDocType); checkForTrailingComma(result.types); @@ -9524,7 +9658,7 @@ var ts; } } function parseJSDocUnionType() { - var result = createNode(255); + var result = createNode(256); nextToken(); result.types = parseJSDocTypeList(parseJSDocType()); parseExpected(18); @@ -9542,7 +9676,7 @@ var ts; return types; } function parseJSDocAllType() { - var result = createNode(252); + var result = createNode(253); nextToken(); return finishNode(result); } @@ -9555,11 +9689,11 @@ var ts; token === 27 || token === 56 || token === 47) { - var result = createNode(253, pos); + var result = createNode(254, pos); return finishNode(result); } else { - var result = createNode(257, pos); + var result = createNode(258, pos); result.type = parseJSDocType(); return finishNode(result); } @@ -9630,7 +9764,7 @@ var ts; if (!tags) { return undefined; } - var result = createNode(267, start); + var result = createNode(268, start); result.tags = tags; return finishNode(result, end); } @@ -9667,7 +9801,7 @@ var ts; return undefined; } function handleUnknownTag(atToken, tagName) { - var result = createNode(268, atToken.pos); + var result = createNode(269, atToken.pos); result.atToken = atToken; result.tagName = tagName; return finishNode(result, pos); @@ -9718,7 +9852,7 @@ var ts; if (!typeExpression) { typeExpression = tryParseTypeExpression(); } - var result = createNode(269, atToken.pos); + var result = createNode(270, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.preParameterName = preName; @@ -9728,16 +9862,6 @@ var ts; return finishNode(result, pos); } function handleReturnTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 270; })) { - parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); - } - var result = createNode(270, atToken.pos); - result.atToken = atToken; - result.tagName = tagName; - result.typeExpression = tryParseTypeExpression(); - return finishNode(result, pos); - } - function handleTypeTag(atToken, tagName) { if (ts.forEach(tags, function (t) { return t.kind === 271; })) { parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } @@ -9747,10 +9871,20 @@ var ts; result.typeExpression = tryParseTypeExpression(); return finishNode(result, pos); } - function handleTemplateTag(atToken, tagName) { + function handleTypeTag(atToken, tagName) { if (ts.forEach(tags, function (t) { return t.kind === 272; })) { parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } + var result = createNode(272, atToken.pos); + result.atToken = atToken; + result.tagName = tagName; + result.typeExpression = tryParseTypeExpression(); + return finishNode(result, pos); + } + function handleTemplateTag(atToken, tagName) { + if (ts.forEach(tags, function (t) { return t.kind === 273; })) { + parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); + } var typeParameters = []; typeParameters.pos = pos; while (true) { @@ -9761,7 +9895,7 @@ var ts; parseErrorAtPosition(startPos, 0, ts.Diagnostics.Identifier_expected); return undefined; } - var typeParameter = createNode(137, name_8.pos); + var typeParameter = createNode(138, name_8.pos); typeParameter.name = name_8; finishNode(typeParameter, pos); typeParameters.push(typeParameter); @@ -9772,7 +9906,7 @@ var ts; pos++; } typeParameters.end = pos; - var result = createNode(272, atToken.pos); + var result = createNode(273, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeParameters = typeParameters; @@ -10094,16 +10228,16 @@ var ts; : 4; } function getModuleInstanceState(node) { - if (node.kind === 217 || node.kind === 218) { + if (node.kind === 218 || node.kind === 219) { return 0; } else if (ts.isConstEnumDeclaration(node)) { return 2; } - else if ((node.kind === 224 || node.kind === 223) && !(node.flags & 2)) { + else if ((node.kind === 225 || node.kind === 224) && !(node.flags & 2)) { return 0; } - else if (node.kind === 221) { + else if (node.kind === 222) { var state = 0; ts.forEachChild(node, function (n) { switch (getModuleInstanceState(n)) { @@ -10119,7 +10253,7 @@ var ts; }); return state; } - else if (node.kind === 220) { + else if (node.kind === 221) { return getModuleInstanceState(node.body); } else { @@ -10147,6 +10281,10 @@ var ts; var labelStack; var labelIndexMap; var implicitLabels; + var hasClassExtends; + var hasAsyncFunctions; + var hasDecorators; + var hasParameterDecorators; var inStrictMode; var symbolCount = 0; var Symbol; @@ -10173,6 +10311,10 @@ var ts; labelStack = undefined; labelIndexMap = undefined; implicitLabels = undefined; + hasClassExtends = false; + hasAsyncFunctions = false; + hasDecorators = false; + hasParameterDecorators = false; } return bindSourceFile; function createSymbol(flags, name) { @@ -10195,17 +10337,17 @@ var ts; if (symbolFlags & 107455) { var valueDeclaration = symbol.valueDeclaration; if (!valueDeclaration || - (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 220)) { + (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 221)) { symbol.valueDeclaration = node; } } } function getDeclarationName(node) { if (node.name) { - if (node.kind === 220 && node.name.kind === 9) { - return "\"" + node.name.text + "\""; + if (ts.isAmbientModule(node)) { + return ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + node.name.text + "\""; } - if (node.name.kind === 136) { + if (node.name.kind === 137) { var nameExpression = node.name.expression; if (ts.isStringOrNumericLiteral(nameExpression.kind)) { return nameExpression.text; @@ -10216,21 +10358,21 @@ var ts; return node.name.text; } switch (node.kind) { - case 144: + case 145: return "__constructor"; - case 152: - case 147: - return "__call"; case 153: case 148: - return "__new"; + return "__call"; + case 154: case 149: + return "__new"; + case 150: return "__index"; - case 230: + case 231: return "__export"; - case 229: + case 230: return node.isExportEquals ? "export=" : "default"; - case 183: + case 184: switch (ts.getSpecialPropertyAssignmentKind(node)) { case 2: return "export="; @@ -10242,8 +10384,8 @@ var ts; } ts.Debug.fail("Unknown binary declaration kind"); break; - case 215: case 216: + case 217: return node.flags & 512 ? "default" : undefined; } } @@ -10291,7 +10433,7 @@ var ts; function declareModuleMember(node, symbolFlags, symbolExcludes) { var hasExportModifier = ts.getCombinedNodeFlags(node) & 2; if (symbolFlags & 8388608) { - if (node.kind === 232 || (node.kind === 223 && hasExportModifier)) { + if (node.kind === 233 || (node.kind === 224 && hasExportModifier)) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } else { @@ -10299,7 +10441,7 @@ var ts; } } else { - if (hasExportModifier || container.flags & 131072) { + if (!ts.isAmbientModule(node) && (hasExportModifier || container.flags & 131072)) { var exportKind = (symbolFlags & 107455 ? 1048576 : 0) | (symbolFlags & 793056 ? 2097152 : 0) | (symbolFlags & 1536 ? 4194304 : 0); @@ -10338,10 +10480,11 @@ var ts; var kind = node.kind; var flags = node.flags; flags &= ~1572864; - if (kind === 217) { + flags &= ~62914560; + if (kind === 218) { seenThisKeyword = false; } - var saveState = kind === 250 || kind === 221 || ts.isFunctionLikeKind(kind); + var saveState = kind === 251 || kind === 222 || ts.isFunctionLikeKind(kind); if (saveState) { savedReachabilityState = currentReachabilityState; savedLabelStack = labelStack; @@ -10359,9 +10502,23 @@ var ts; flags |= 1048576; } } - if (kind === 217) { + if (kind === 218) { flags = seenThisKeyword ? flags | 262144 : flags & ~262144; } + if (kind === 251) { + if (hasClassExtends) { + flags |= 4194304; + } + if (hasDecorators) { + flags |= 8388608; + } + if (hasParameterDecorators) { + flags |= 16777216; + } + if (hasAsyncFunctions) { + flags |= 33554432; + } + } node.flags = flags; if (saveState) { hasExplicitReturn = savedHasExplicitReturn; @@ -10380,40 +10537,40 @@ var ts; return; } switch (node.kind) { - case 200: + case 201: bindWhileStatement(node); break; - case 199: + case 200: bindDoStatement(node); break; - case 201: + case 202: bindForStatement(node); break; - case 202: case 203: + case 204: bindForInOrForOfStatement(node); break; - case 198: + case 199: bindIfStatement(node); break; - case 206: - case 210: + case 207: + case 211: bindReturnOrThrow(node); break; + case 206: case 205: - case 204: bindBreakOrContinueStatement(node); break; - case 211: + case 212: bindTryStatement(node); break; - case 208: + case 209: bindSwitchStatement(node); break; - case 222: + case 223: bindCaseBlock(node); break; - case 209: + case 210: bindLabeledStatement(node); break; default: @@ -10475,14 +10632,14 @@ var ts; } function bindReturnOrThrow(n) { bind(n.expression); - if (n.kind === 206) { + if (n.kind === 207) { hasExplicitReturn = true; } currentReachabilityState = 4; } function bindBreakOrContinueStatement(n) { bind(n.label); - var isValidJump = jumpToLabel(n.label, n.kind === 205 ? currentReachabilityState : 4); + var isValidJump = jumpToLabel(n.label, n.kind === 206 ? currentReachabilityState : 4); if (isValidJump) { currentReachabilityState = 4; } @@ -10503,7 +10660,7 @@ var ts; var postSwitchLabel = pushImplicitLabel(); bind(n.expression); bind(n.caseBlock); - var hasDefault = ts.forEach(n.caseBlock.clauses, function (c) { return c.kind === 244; }); + var hasDefault = ts.forEach(n.caseBlock.clauses, function (c) { return c.kind === 245; }); var postSwitchState = hasDefault && currentReachabilityState !== 2 ? 4 : preSwitchState; popImplicitLabel(postSwitchLabel, postSwitchState); } @@ -10528,37 +10685,37 @@ var ts; } function getContainerFlags(node) { switch (node.kind) { - case 188: - case 216: + case 189: case 217: - case 219: - case 155: - case 167: + case 218: + case 220: + case 156: + case 168: return 1; - case 147: case 148: case 149: - case 143: - case 142: - case 215: + case 150: case 144: + case 143: + case 216: case 145: case 146: - case 152: + case 147: case 153: - case 175: + case 154: case 176: - case 220: - case 250: - case 218: + case 177: + case 221: + case 251: + case 219: return 5; - case 246: - case 201: + case 247: case 202: case 203: - case 222: + case 204: + case 223: return 2; - case 194: + case 195: return ts.isFunctionLike(node.parent) ? 0 : 2; } return 0; @@ -10574,33 +10731,33 @@ var ts; } function declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes) { switch (container.kind) { - case 220: + case 221: return declareModuleMember(node, symbolFlags, symbolExcludes); - case 250: + case 251: return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 188: - case 216: - return declareClassMember(node, symbolFlags, symbolExcludes); - case 219: - return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 155: - case 167: + case 189: case 217: + return declareClassMember(node, symbolFlags, symbolExcludes); + case 220: + return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); + case 156: + case 168: + case 218: return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 152: case 153: - case 147: + case 154: case 148: case 149: - case 143: - case 142: + case 150: case 144: + case 143: case 145: case 146: - case 215: - case 175: + case 147: + case 216: case 176: - case 218: + case 177: + case 219: return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes); } } @@ -10615,11 +10772,11 @@ var ts; : declareSymbol(file.locals, undefined, node, symbolFlags, symbolExcludes); } function hasExportDeclarations(node) { - var body = node.kind === 250 ? node : node.body; - if (body.kind === 250 || body.kind === 221) { + var body = node.kind === 251 ? node : node.body; + if (body.kind === 251 || body.kind === 222) { for (var _i = 0, _a = body.statements; _i < _a.length; _i++) { var stat = _a[_i]; - if (stat.kind === 230 || stat.kind === 229) { + if (stat.kind === 231 || stat.kind === 230) { return true; } } @@ -10636,7 +10793,10 @@ var ts; } function bindModuleDeclaration(node) { setExportContextFlag(node); - if (node.name.kind === 9) { + if (ts.isAmbientModule(node)) { + if (node.flags & 2) { + errorOnFirstToken(node, ts.Diagnostics.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible); + } declareSymbolAndAddToSymbolTable(node, 512, 106639); } else { @@ -10678,7 +10838,7 @@ var ts; continue; } var identifier = prop.name; - var currentKind = prop.kind === 247 || prop.kind === 248 || prop.kind === 143 + var currentKind = prop.kind === 248 || prop.kind === 249 || prop.kind === 144 ? 1 : 2; var existingKind = seen[identifier.text]; @@ -10700,10 +10860,10 @@ var ts; } function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { switch (blockScopeContainer.kind) { - case 220: + case 221: declareModuleMember(node, symbolFlags, symbolExcludes); break; - case 250: + case 251: if (ts.isExternalModule(container)) { declareModuleMember(node, symbolFlags, symbolExcludes); break; @@ -10825,17 +10985,17 @@ var ts; } function updateStrictMode(node) { switch (node.kind) { - case 250: - case 221: + case 251: + case 222: updateStrictModeStatementList(node.statements); return; - case 194: + case 195: if (ts.isFunctionLike(node.parent)) { updateStrictModeStatementList(node.statements); } return; - case 216: - case 188: + case 217: + case 189: inStrictMode = true; return; } @@ -10860,7 +11020,7 @@ var ts; switch (node.kind) { case 69: return checkStrictModeIdentifier(node); - case 183: + case 184: if (ts.isInJavaScriptFile(node)) { var specialKind = ts.getSpecialPropertyAssignmentKind(node); switch (specialKind) { @@ -10883,94 +11043,91 @@ var ts; } } return checkStrictModeBinaryExpression(node); - case 246: + case 247: return checkStrictModeCatchClause(node); - case 177: + case 178: return checkStrictModeDeleteExpression(node); case 8: return checkStrictModeNumericLiteral(node); - case 182: + case 183: return checkStrictModePostfixUnaryExpression(node); - case 181: + case 182: return checkStrictModePrefixUnaryExpression(node); - case 207: + case 208: return checkStrictModeWithStatement(node); - case 161: + case 162: seenThisKeyword = true; return; - case 150: + case 151: return checkTypePredicate(node); - case 137: - return declareSymbolAndAddToSymbolTable(node, 262144, 530912); case 138: + return declareSymbolAndAddToSymbolTable(node, 262144, 530912); + case 139: return bindParameter(node); - case 213: - case 165: + case 214: + case 166: return bindVariableDeclarationOrBindingElement(node); + case 142: case 141: - case 140: return bindPropertyOrMethodOrAccessor(node, 4 | (node.questionToken ? 536870912 : 0), 107455); - case 247: case 248: - return bindPropertyOrMethodOrAccessor(node, 4, 107455); case 249: + return bindPropertyOrMethodOrAccessor(node, 4, 107455); + case 250: return bindPropertyOrMethodOrAccessor(node, 8, 107455); - case 147: case 148: case 149: + case 150: return declareSymbolAndAddToSymbolTable(node, 131072, 0); - case 143: - case 142: - return bindPropertyOrMethodOrAccessor(node, 8192 | (node.questionToken ? 536870912 : 0), ts.isObjectLiteralMethod(node) ? 107455 : 99263); - case 215: - checkStrictModeFunctionName(node); - return declareSymbolAndAddToSymbolTable(node, 16, 106927); case 144: - return declareSymbolAndAddToSymbolTable(node, 16384, 0); + case 143: + return bindPropertyOrMethodOrAccessor(node, 8192 | (node.questionToken ? 536870912 : 0), ts.isObjectLiteralMethod(node) ? 107455 : 99263); + case 216: + return bindFunctionDeclaration(node); case 145: - return bindPropertyOrMethodOrAccessor(node, 32768, 41919); + return declareSymbolAndAddToSymbolTable(node, 16384, 0); case 146: + return bindPropertyOrMethodOrAccessor(node, 32768, 41919); + case 147: return bindPropertyOrMethodOrAccessor(node, 65536, 74687); - case 152: case 153: + case 154: return bindFunctionOrConstructorType(node); - case 155: + case 156: return bindAnonymousDeclaration(node, 2048, "__type"); - case 167: + case 168: return bindObjectLiteralExpression(node); - case 175: case 176: - checkStrictModeFunctionName(node); - var bindingName = node.name ? node.name.text : "__function"; - return bindAnonymousDeclaration(node, 16, bindingName); - case 170: + case 177: + return bindFunctionExpression(node); + case 171: if (ts.isInJavaScriptFile(node)) { bindCallExpression(node); } break; - case 188: - case 216: - return bindClassLikeDeclaration(node); + case 189: case 217: - return bindBlockScopedDeclaration(node, 64, 792960); + return bindClassLikeDeclaration(node); case 218: - return bindBlockScopedDeclaration(node, 524288, 793056); + return bindBlockScopedDeclaration(node, 64, 792960); case 219: - return bindEnumDeclaration(node); + return bindBlockScopedDeclaration(node, 524288, 793056); case 220: + return bindEnumDeclaration(node); + case 221: return bindModuleDeclaration(node); - case 223: - case 226: - case 228: - case 232: - return declareSymbolAndAddToSymbolTable(node, 8388608, 8388608); - case 225: - return bindImportClause(node); - case 230: - return bindExportDeclaration(node); + case 224: + case 227: case 229: + case 233: + return declareSymbolAndAddToSymbolTable(node, 8388608, 8388608); + case 226: + return bindImportClause(node); + case 231: + return bindExportDeclaration(node); + case 230: return bindExportAssignment(node); - case 250: + case 251: return bindSourceFileIfExternalModule(); } } @@ -10979,7 +11136,7 @@ var ts; if (parameterName && parameterName.kind === 69) { checkStrictModeIdentifier(parameterName); } - if (parameterName && parameterName.kind === 161) { + if (parameterName && parameterName.kind === 162) { seenThisKeyword = true; } bind(type); @@ -10994,7 +11151,7 @@ var ts; bindAnonymousDeclaration(file, 512, "\"" + ts.removeFileExtension(file.fileName) + "\""); } function bindExportAssignment(node) { - var boundExpression = node.kind === 229 ? node.expression : node.right; + var boundExpression = node.kind === 230 ? node.expression : node.right; if (!container.symbol || !container.symbol.exports) { bindAnonymousDeclaration(node, 8388608, getDeclarationName(node)); } @@ -11033,7 +11190,7 @@ var ts; bindExportAssignment(node); } function bindThisPropertyAssignment(node) { - if (container.kind === 175 || container.kind === 215) { + if (container.kind === 176 || container.kind === 216) { container.symbol.members = container.symbol.members || {}; declareSymbol(container.symbol.members, container.symbol, node, 4, 107455); } @@ -11055,7 +11212,15 @@ var ts; } } function bindClassLikeDeclaration(node) { - if (node.kind === 216) { + if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) { + if (ts.getClassExtendsHeritageClauseElement(node) !== undefined) { + hasClassExtends = true; + } + if (ts.nodeIsDecorated(node)) { + hasDecorators = true; + } + } + if (node.kind === 217) { bindBlockScopedDeclaration(node, 32, 899519); } else { @@ -11098,6 +11263,12 @@ var ts; } } function bindParameter(node) { + if (!ts.isDeclarationFile(file) && + !ts.isInAmbientContext(node) && + ts.nodeIsDecorated(node)) { + hasDecorators = true; + hasParameterDecorators = true; + } if (inStrictMode) { checkStrictModeEvalOrArguments(node, node.name); } @@ -11112,7 +11283,34 @@ var ts; declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4, 107455); } } + function bindFunctionDeclaration(node) { + if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) { + if (ts.isAsyncFunctionLike(node)) { + hasAsyncFunctions = true; + } + } + checkStrictModeFunctionName(node); + return declareSymbolAndAddToSymbolTable(node, 16, 106927); + } + function bindFunctionExpression(node) { + if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) { + if (ts.isAsyncFunctionLike(node)) { + hasAsyncFunctions = true; + } + } + checkStrictModeFunctionName(node); + var bindingName = node.name ? node.name.text : "__function"; + return bindAnonymousDeclaration(node, 16, bindingName); + } function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) { + if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) { + if (ts.isAsyncFunctionLike(node)) { + hasAsyncFunctions = true; + } + if (ts.nodeIsDecorated(node)) { + hasDecorators = true; + } + } return ts.hasDynamicName(node) ? bindAnonymousDeclaration(node, symbolFlags, "__computed") : declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes); @@ -11172,15 +11370,15 @@ var ts; function checkUnreachable(node) { switch (currentReachabilityState) { case 4: - var reportError = (ts.isStatement(node) && node.kind !== 196) || - node.kind === 216 || - (node.kind === 220 && shouldReportErrorOnModuleDeclaration(node)) || - (node.kind === 219 && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums)); + var reportError = (ts.isStatement(node) && node.kind !== 197) || + node.kind === 217 || + (node.kind === 221 && shouldReportErrorOnModuleDeclaration(node)) || + (node.kind === 220 && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums)); if (reportError) { currentReachabilityState = 8; var reportUnreachableCode = !options.allowUnreachableCode && !ts.isInAmbientContext(node) && - (node.kind !== 195 || + (node.kind !== 196 || ts.getCombinedNodeFlags(node.declarationList) & 24576 || ts.forEach(node.declarationList.declarations, function (d) { return d.initializer; })); if (reportUnreachableCode) { @@ -11254,6 +11452,7 @@ var ts; getTypeCount: function () { return typeCount; }, isUndefinedSymbol: function (symbol) { return symbol === undefinedSymbol; }, isArgumentsSymbol: function (symbol) { return symbol === argumentsSymbol; }, + isUnknownSymbol: function (symbol) { return symbol === unknownSymbol; }, getDiagnostics: getDiagnostics, getGlobalDiagnostics: getGlobalDiagnostics, getTypeOfSymbolAtLocation: getNarrowedTypeOfSymbol, @@ -11268,6 +11467,7 @@ var ts; getSymbolsInScope: getSymbolsInScope, getSymbolAtLocation: getSymbolAtLocation, getShorthandAssignmentValueSymbol: getShorthandAssignmentValueSymbol, + getExportSpecifierLocalTargetSymbol: getExportSpecifierLocalTargetSymbol, getTypeAtLocation: getTypeOfNode, typeToString: typeToString, getSymbolDisplayBuilder: getSymbolDisplayBuilder, @@ -11341,11 +11541,6 @@ var ts; var unionTypes = {}; var intersectionTypes = {}; var stringLiteralTypes = {}; - var emitExtends = false; - var emitDecorate = false; - var emitParam = false; - var emitAwaiter = false; - var emitGenerator = false; var resolutionTargets = []; var resolutionResults = []; var resolutionPropertyNames = []; @@ -11478,7 +11673,7 @@ var ts; target.flags |= source.flags; if (source.valueDeclaration && (!target.valueDeclaration || - (target.valueDeclaration.kind === 220 && source.valueDeclaration.kind !== 220))) { + (target.valueDeclaration.kind === 221 && source.valueDeclaration.kind !== 221))) { target.valueDeclaration = source.valueDeclaration; } ts.forEach(source.declarations, function (node) { @@ -11532,6 +11727,24 @@ var ts; } } } + function mergeModuleAugmentation(moduleName) { + var moduleAugmentation = moduleName.parent; + if (moduleAugmentation.symbol.valueDeclaration !== moduleAugmentation) { + ts.Debug.assert(moduleAugmentation.symbol.declarations.length > 1); + return; + } + if (ts.isGlobalScopeAugmentation(moduleAugmentation)) { + mergeSymbolTable(globals, moduleAugmentation.symbol.exports); + } + else { + var mainModule = resolveExternalModuleNameWorker(moduleName, moduleName, ts.Diagnostics.Invalid_module_name_in_augmentation_module_0_cannot_be_found); + if (!mainModule) { + return; + } + mainModule = mainModule.flags & 33554432 ? mainModule : cloneSymbol(mainModule); + mergeSymbol(mainModule, moduleAugmentation.symbol); + } + } function addToSymbolTable(target, source, message) { for (var id in source) { if (ts.hasProperty(source, id)) { @@ -11557,17 +11770,8 @@ var ts; var nodeId = getNodeId(node); return nodeLinks[nodeId] || (nodeLinks[nodeId] = {}); } - function getSourceFile(node) { - return ts.getAncestor(node, 250); - } function isGlobalSourceFile(node) { - return node.kind === 250 && !ts.isExternalOrCommonJsModule(node); - } - function isPrimitiveApparentType(type) { - return type === globalStringType || - type === globalNumberType || - type === globalBooleanType || - type === globalESSymbolType; + return node.kind === 251 && !ts.isExternalOrCommonJsModule(node); } function getSymbol(symbols, name, meaning) { if (meaning && ts.hasProperty(symbols, name)) { @@ -11605,18 +11809,18 @@ var ts; return ts.indexOf(sourceFiles, declarationFile) <= ts.indexOf(sourceFiles, useFile); } if (declaration.pos <= usage.pos) { - return declaration.kind !== 213 || + return declaration.kind !== 214 || !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage); } return isUsedInFunctionOrNonStaticProperty(declaration, usage); function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage) { var container = ts.getEnclosingBlockScopeContainer(declaration); - if (declaration.parent.parent.kind === 195 || - declaration.parent.parent.kind === 201) { + if (declaration.parent.parent.kind === 196 || + declaration.parent.parent.kind === 202) { return isSameScopeDescendentOf(usage, declaration, container); } - else if (declaration.parent.parent.kind === 203 || - declaration.parent.parent.kind === 202) { + else if (declaration.parent.parent.kind === 204 || + declaration.parent.parent.kind === 203) { var expression = declaration.parent.parent.expression; return isSameScopeDescendentOf(usage, expression, container); } @@ -11632,7 +11836,7 @@ var ts; return true; } var initializerOfNonStaticProperty = current.parent && - current.parent.kind === 141 && + current.parent.kind === 142 && (current.parent.flags & 64) === 0 && current.parent.initializer === current; if (initializerOfNonStaticProperty) { @@ -11657,15 +11861,15 @@ var ts; if (meaning & result.flags & 793056) { useResult = result.flags & 262144 ? lastLocation === location.type || - lastLocation.kind === 138 || - lastLocation.kind === 137 + lastLocation.kind === 139 || + lastLocation.kind === 138 : false; } if (meaning & 107455 && result.flags & 1) { useResult = - lastLocation.kind === 138 || + lastLocation.kind === 139 || (lastLocation === location.type && - result.valueDeclaration.kind === 138); + result.valueDeclaration.kind === 139); } } if (useResult) { @@ -11677,13 +11881,12 @@ var ts; } } switch (location.kind) { - case 250: + case 251: if (!ts.isExternalOrCommonJsModule(location)) break; - case 220: + case 221: var moduleExports = getSymbolOfNode(location).exports; - if (location.kind === 250 || - (location.kind === 220 && location.name.kind === 9)) { + if (location.kind === 251 || ts.isAmbientModule(location)) { if (result = moduleExports["default"]) { var localSymbol = ts.getLocalSymbolForExportDefault(result); if (localSymbol && (result.flags & meaning) && localSymbol.name === name) { @@ -11693,7 +11896,7 @@ var ts; } if (ts.hasProperty(moduleExports, name) && moduleExports[name].flags === 8388608 && - ts.getDeclarationOfKind(moduleExports[name], 232)) { + ts.getDeclarationOfKind(moduleExports[name], 233)) { break; } } @@ -11701,13 +11904,13 @@ var ts; break loop; } break; - case 219: + case 220: if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8)) { break loop; } break; + case 142: case 141: - case 140: if (ts.isClassLike(location.parent) && !(location.flags & 64)) { var ctor = findConstructorDeclaration(location.parent); if (ctor && ctor.locals) { @@ -11717,9 +11920,9 @@ var ts; } } break; - case 216: - case 188: case 217: + case 189: + case 218: if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & 793056)) { if (lastLocation && lastLocation.flags & 64) { error(errorLocation, ts.Diagnostics.Static_members_cannot_reference_class_type_parameters); @@ -11727,7 +11930,7 @@ var ts; } break loop; } - if (location.kind === 188 && meaning & 32) { + if (location.kind === 189 && meaning & 32) { var className = location.name; if (className && name === className.text) { result = location.symbol; @@ -11735,28 +11938,28 @@ var ts; } } break; - case 136: + case 137: grandparent = location.parent.parent; - if (ts.isClassLike(grandparent) || grandparent.kind === 217) { + if (ts.isClassLike(grandparent) || grandparent.kind === 218) { if (result = getSymbol(getSymbolOfNode(grandparent).members, name, meaning & 793056)) { error(errorLocation, ts.Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); return undefined; } } break; - case 143: - case 142: case 144: + case 143: case 145: case 146: - case 215: - case 176: + case 147: + case 216: + case 177: if (meaning & 3 && name === "arguments") { result = argumentsSymbol; break loop; } break; - case 175: + case 176: if (meaning & 3 && name === "arguments") { result = argumentsSymbol; break loop; @@ -11769,8 +11972,8 @@ var ts; } } break; - case 139: - if (location.parent && location.parent.kind === 138) { + case 140: + if (location.parent && location.parent.kind === 139) { location = location.parent; } if (location.parent && ts.isClassElement(location.parent)) { @@ -11786,7 +11989,9 @@ var ts; } if (!result) { if (nameNotFoundMessage) { - error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg)); + if (!checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg)) { + error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg)); + } } return undefined; } @@ -11805,11 +12010,40 @@ var ts; } return result; } + function checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) { + if (!errorLocation || (errorLocation.kind === 69 && (isTypeReferenceIdentifier(errorLocation)) || isInTypeQuery(errorLocation))) { + return false; + } + var container = ts.getThisContainer(errorLocation, true); + var location = container; + while (location) { + if (ts.isClassLike(location.parent)) { + var classSymbol = getSymbolOfNode(location.parent); + if (!classSymbol) { + break; + } + var constructorType = getTypeOfSymbol(classSymbol); + if (getPropertyOfType(constructorType, name)) { + error(errorLocation, ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg), symbolToString(classSymbol)); + return true; + } + if (location === container && !(location.flags & 64)) { + var instanceType = getDeclaredTypeOfSymbol(classSymbol).thisType; + if (getPropertyOfType(instanceType, name)) { + error(errorLocation, ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg)); + return true; + } + } + } + location = location.parent; + } + return false; + } function checkResolvedBlockScopedVariable(result, errorLocation) { ts.Debug.assert((result.flags & 2) !== 0); var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) ? d : undefined; }); ts.Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined"); - if (!isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 213), errorLocation)) { + if (!isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 214), errorLocation)) { error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name)); } } @@ -11826,10 +12060,10 @@ var ts; } function getAnyImportSyntax(node) { if (ts.isAliasSymbolDeclaration(node)) { - if (node.kind === 223) { + if (node.kind === 224) { return node; } - while (node && node.kind !== 224) { + while (node && node.kind !== 225) { node = node.parent; } return node; @@ -11839,7 +12073,7 @@ var ts; return ts.forEach(symbol.declarations, function (d) { return ts.isAliasSymbolDeclaration(d) ? d : undefined; }); } function getTargetOfImportEqualsDeclaration(node) { - if (node.moduleReference.kind === 234) { + if (node.moduleReference.kind === 235) { return resolveExternalModuleSymbol(resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node))); } return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, node); @@ -11923,17 +12157,17 @@ var ts; } function getTargetOfAliasDeclaration(node) { switch (node.kind) { - case 223: + case 224: return getTargetOfImportEqualsDeclaration(node); - case 225: - return getTargetOfImportClause(node); case 226: + return getTargetOfImportClause(node); + case 227: return getTargetOfNamespaceImport(node); - case 228: - return getTargetOfImportSpecifier(node); - case 232: - return getTargetOfExportSpecifier(node); case 229: + return getTargetOfImportSpecifier(node); + case 233: + return getTargetOfExportSpecifier(node); + case 230: return getTargetOfExportAssignment(node); } } @@ -11975,10 +12209,10 @@ var ts; if (!links.referenced) { links.referenced = true; var node = getDeclarationOfAliasSymbol(symbol); - if (node.kind === 229) { + if (node.kind === 230) { checkExpressionCached(node.expression); } - else if (node.kind === 232) { + else if (node.kind === 233) { checkExpressionCached(node.propertyName || node.name); } else if (ts.isInternalModuleImportEqualsDeclaration(node)) { @@ -11988,17 +12222,17 @@ var ts; } function getSymbolOfPartOfRightHandSideOfImportEquals(entityName, importDeclaration) { if (!importDeclaration) { - importDeclaration = ts.getAncestor(entityName, 223); + importDeclaration = ts.getAncestor(entityName, 224); ts.Debug.assert(importDeclaration !== undefined); } if (entityName.kind === 69 && ts.isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { entityName = entityName.parent; } - if (entityName.kind === 69 || entityName.parent.kind === 135) { + if (entityName.kind === 69 || entityName.parent.kind === 136) { return resolveEntityName(entityName, 1536); } else { - ts.Debug.assert(entityName.parent.kind === 223); + ts.Debug.assert(entityName.parent.kind === 224); return resolveEntityName(entityName, 107455 | 793056 | 1536); } } @@ -12017,9 +12251,9 @@ var ts; return undefined; } } - else if (name.kind === 135 || name.kind === 168) { - var left = name.kind === 135 ? name.left : name.expression; - var right = name.kind === 135 ? name.right : name.name; + else if (name.kind === 136 || name.kind === 169) { + var left = name.kind === 136 ? name.left : name.expression; + var right = name.kind === 136 ? name.right : name.name; var namespace = resolveEntityName(left, 1536, ignoreErrors); if (!namespace || namespace === unknownSymbol || ts.nodeIsMissing(right)) { return undefined; @@ -12039,6 +12273,9 @@ var ts; return symbol.flags & meaning ? symbol : resolveAlias(symbol); } function resolveExternalModuleName(location, moduleReferenceExpression) { + return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ts.Diagnostics.Cannot_find_module_0); + } + function resolveExternalModuleNameWorker(location, moduleReferenceExpression, moduleNotFoundError) { if (moduleReferenceExpression.kind !== 9) { return; } @@ -12051,19 +12288,24 @@ var ts; if (!isRelative) { var symbol = getSymbol(globals, "\"" + moduleName + "\"", 512); if (symbol) { - return symbol; + return getMergedSymbol(symbol); } } - var resolvedModule = ts.getResolvedModule(getSourceFile(location), moduleReferenceLiteral.text); + var resolvedModule = ts.getResolvedModule(ts.getSourceFileOfNode(location), moduleReferenceLiteral.text); var sourceFile = resolvedModule && host.getSourceFile(resolvedModule.resolvedFileName); if (sourceFile) { if (sourceFile.symbol) { - return sourceFile.symbol; + return getMergedSymbol(sourceFile.symbol); } - error(moduleReferenceLiteral, ts.Diagnostics.File_0_is_not_a_module, sourceFile.fileName); - return; + if (moduleNotFoundError) { + error(moduleReferenceLiteral, ts.Diagnostics.File_0_is_not_a_module, sourceFile.fileName); + } + return undefined; } - error(moduleReferenceLiteral, ts.Diagnostics.Cannot_find_module_0, moduleName); + if (moduleNotFoundError) { + error(moduleReferenceLiteral, moduleNotFoundError, moduleName); + } + return undefined; } function resolveExternalModuleSymbol(moduleSymbol) { return moduleSymbol && resolveSymbol(moduleSymbol.exports["export="]) || moduleSymbol; @@ -12174,7 +12416,7 @@ var ts; var members = node.members; for (var _i = 0, members_1 = members; _i < members_1.length; _i++) { var member = members_1[_i]; - if (member.kind === 144 && ts.nodeIsPresent(member.body)) { + if (member.kind === 145 && ts.nodeIsPresent(member.body)) { return member; } } @@ -12240,17 +12482,17 @@ var ts; } } switch (location_1.kind) { - case 250: + case 251: if (!ts.isExternalOrCommonJsModule(location_1)) { break; } - case 220: + case 221: if (result = callback(getSymbolOfNode(location_1).exports)) { return result; } break; - case 216: case 217: + case 218: if (result = callback(getSymbolOfNode(location_1).members)) { return result; } @@ -12283,7 +12525,7 @@ var ts; return ts.forEachValue(symbols, function (symbolFromSymbolTable) { if (symbolFromSymbolTable.flags & 8388608 && symbolFromSymbolTable.name !== "export=" - && !ts.getDeclarationOfKind(symbolFromSymbolTable, 232)) { + && !ts.getDeclarationOfKind(symbolFromSymbolTable, 233)) { if (!useOnlyExternalAliasing || ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) { var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable); @@ -12312,7 +12554,7 @@ var ts; if (symbolFromSymbolTable === symbol) { return true; } - symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 && !ts.getDeclarationOfKind(symbolFromSymbolTable, 232)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; + symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 && !ts.getDeclarationOfKind(symbolFromSymbolTable, 233)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; if (symbolFromSymbolTable.flags & meaning) { qualify = true; return true; @@ -12367,8 +12609,7 @@ var ts; } } function hasExternalModuleSymbol(declaration) { - return (declaration.kind === 220 && declaration.name.kind === 9) || - (declaration.kind === 250 && ts.isExternalOrCommonJsModule(declaration)); + return ts.isAmbientModule(declaration) || (declaration.kind === 251 && ts.isExternalOrCommonJsModule(declaration)); } function hasVisibleDeclarations(symbol) { var aliasesToMakeVisible; @@ -12400,11 +12641,11 @@ var ts; } function isEntityNameVisible(entityName, enclosingDeclaration) { var meaning; - if (entityName.parent.kind === 154) { + if (entityName.parent.kind === 155) { meaning = 107455 | 1048576; } - else if (entityName.kind === 135 || entityName.kind === 168 || - entityName.parent.kind === 223) { + else if (entityName.kind === 136 || entityName.kind === 169 || + entityName.parent.kind === 224) { meaning = 1536; } else { @@ -12455,15 +12696,20 @@ var ts; function getTypeAliasForTypeLiteral(type) { if (type.symbol && type.symbol.flags & 2048) { var node = type.symbol.declarations[0].parent; - while (node.kind === 160) { + while (node.kind === 161) { node = node.parent; } - if (node.kind === 218) { + if (node.kind === 219) { return getSymbolOfNode(node); } } return undefined; } + function isTopLevelInExternalModuleAugmentation(node) { + return node && node.parent && + node.parent.kind === 222 && + ts.isExternalModuleAugmentation(node.parent.parent); + } function getSymbolDisplayBuilder() { function getNameOfSymbol(symbol) { if (symbol.declarations && symbol.declarations.length) { @@ -12472,10 +12718,10 @@ var ts; return ts.declarationNameToString(declaration.name); } switch (declaration.kind) { - case 188: + case 189: return "(Anonymous class)"; - case 175: case 176: + case 177: return "(Anonymous function)"; } } @@ -12689,7 +12935,7 @@ var ts; var isNonLocalFunctionSymbol = !!(symbol.flags & 16) && (symbol.parent || ts.forEach(symbol.declarations, function (declaration) { - return declaration.parent.kind === 250 || declaration.parent.kind === 221; + return declaration.parent.kind === 251 || declaration.parent.kind === 222; })); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { return !!(flags & 2) || @@ -12943,60 +13189,63 @@ var ts; return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 165: + case 166: return isDeclarationVisible(node.parent.parent); - case 213: + case 214: if (ts.isBindingPattern(node.name) && !node.name.elements.length) { return false; } - case 220: - case 216: + case 221: case 217: case 218: - case 215: case 219: - case 223: + case 216: + case 220: + case 224: + if (ts.isExternalModuleAugmentation(node)) { + return true; + } var parent_4 = getDeclarationContainer(node); if (!(ts.getCombinedNodeFlags(node) & 2) && - !(node.kind !== 223 && parent_4.kind !== 250 && ts.isInAmbientContext(parent_4))) { + !(node.kind !== 224 && parent_4.kind !== 251 && ts.isInAmbientContext(parent_4))) { return isGlobalSourceFile(parent_4); } return isDeclarationVisible(parent_4); - case 141: - case 140: - case 145: - case 146: - case 143: case 142: + case 141: + case 146: + case 147: + case 144: + case 143: if (node.flags & (16 | 32)) { return false; } - case 144: - case 148: - case 147: + case 145: case 149: - case 138: - case 221: - case 152: + case 148: + case 150: + case 139: + case 222: case 153: - case 155: - case 151: + case 154: case 156: + case 152: case 157: case 158: case 159: case 160: + case 161: return isDeclarationVisible(node.parent); - case 225: case 226: - case 228: - return false; - case 137: - case 250: - return true; + case 227: case 229: return false; + case 138: + case 251: + return true; + case 230: + return false; default: ts.Debug.fail("isDeclarationVisible unknown: SyntaxKind: " + node.kind); } @@ -13004,10 +13253,10 @@ var ts; } function collectLinkedAliases(node) { var exportSymbol; - if (node.parent && node.parent.kind === 229) { + if (node.parent && node.parent.kind === 230) { exportSymbol = resolveName(node.parent, node.text, 107455 | 793056 | 1536 | 8388608, ts.Diagnostics.Cannot_find_name_0, node); } - else if (node.parent.kind === 232) { + else if (node.parent.kind === 233) { var exportSpecifier = node.parent; exportSymbol = exportSpecifier.parent.parent.moduleSpecifier ? getExternalModuleMember(exportSpecifier.parent.parent, exportSpecifier) : @@ -13029,7 +13278,9 @@ var ts; var internalModuleReference = declaration.moduleReference; var firstIdentifier = getFirstIdentifier(internalModuleReference); var importSymbol = resolveName(declaration, firstIdentifier.text, 107455 | 793056 | 1536, ts.Diagnostics.Cannot_find_name_0, firstIdentifier); - buildVisibleNodeList(importSymbol.declarations); + if (importSymbol) { + buildVisibleNodeList(importSymbol.declarations); + } } }); } @@ -13082,10 +13333,10 @@ var ts; } function getDeclarationContainer(node) { node = ts.getRootDeclaration(node); - return node.kind === 213 ? node.parent.parent.parent : node.parent; + return node.kind === 214 ? node.parent.parent.parent : node.parent; } function getTypeOfPrototypeProperty(prototype) { - var classType = getDeclaredTypeOfSymbol(prototype.parent); + var classType = getDeclaredTypeOfSymbol(getMergedSymbol(prototype.parent)); return classType.typeParameters ? createTypeReference(classType, ts.map(classType.typeParameters, function (_) { return anyType; })) : classType; } function getTypeOfPropertyOfType(type, name) { @@ -13106,7 +13357,7 @@ var ts; case 9: case 8: return name.text; - case 136: + case 137: if (ts.isStringOrNumericLiteral(name.expression.kind)) { return name.expression.text; } @@ -13114,7 +13365,7 @@ var ts; return undefined; } function isComputedNonLiteralName(name) { - return name.kind === 136 && !ts.isStringOrNumericLiteral(name.expression.kind); + return name.kind === 137 && !ts.isStringOrNumericLiteral(name.expression.kind); } function getTypeForBindingElement(declaration) { var pattern = declaration.parent; @@ -13129,7 +13380,7 @@ var ts; return parentType; } var type; - if (pattern.kind === 163) { + if (pattern.kind === 164) { var name_10 = declaration.propertyName || declaration.name; if (isComputedNonLiteralName(name_10)) { return anyType; @@ -13167,10 +13418,10 @@ var ts; return type; } function getTypeForVariableLikeDeclaration(declaration) { - if (declaration.parent.parent.kind === 202) { - return anyType; - } if (declaration.parent.parent.kind === 203) { + return stringType; + } + if (declaration.parent.parent.kind === 204) { return checkRightHandSideOfForOf(declaration.parent.parent.expression) || anyType; } if (ts.isBindingPattern(declaration.parent)) { @@ -13179,10 +13430,10 @@ var ts; if (declaration.type) { return getTypeFromTypeNode(declaration.type); } - if (declaration.kind === 138) { + if (declaration.kind === 139) { var func = declaration.parent; - if (func.kind === 146 && !ts.hasDynamicName(func)) { - var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 145); + if (func.kind === 147 && !ts.hasDynamicName(func)) { + var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 146); if (getter) { return getReturnTypeOfSignature(getSignatureFromDeclaration(getter)); } @@ -13195,7 +13446,7 @@ var ts; if (declaration.initializer) { return checkExpressionCached(declaration.initializer); } - if (declaration.kind === 248) { + if (declaration.kind === 249) { return checkIdentifier(declaration.name); } if (ts.isBindingPattern(declaration.name)) { @@ -13242,7 +13493,7 @@ var ts; if (elements.length === 0 || elements[elements.length - 1].dotDotDotToken) { return languageVersion >= 2 ? createIterableType(anyType) : anyArrayType; } - var elementTypes = ts.map(elements, function (e) { return e.kind === 189 ? anyType : getTypeFromBindingElement(e, includePatternInType); }); + var elementTypes = ts.map(elements, function (e) { return e.kind === 190 ? anyType : getTypeFromBindingElement(e, includePatternInType); }); if (includePatternInType) { var result = createNewTupleType(elementTypes); result.pattern = pattern; @@ -13251,7 +13502,7 @@ var ts; return createTupleType(elementTypes); } function getTypeFromBindingPattern(pattern, includePatternInType) { - return pattern.kind === 163 + return pattern.kind === 164 ? getTypeFromObjectBindingPattern(pattern, includePatternInType) : getTypeFromArrayBindingPattern(pattern, includePatternInType); } @@ -13261,10 +13512,10 @@ var ts; if (reportErrors) { reportErrorsFromWidening(declaration, type); } - if (declaration.kind === 247) { + if (declaration.kind === 248) { return type; } - if (type.flags & 134217728 && (declaration.kind === 141 || declaration.kind === 140)) { + if (type.flags & 134217728 && (declaration.kind === 142 || declaration.kind === 141)) { return type; } return getWidenedType(type); @@ -13272,7 +13523,7 @@ var ts; type = declaration.dotDotDotToken ? anyArrayType : anyType; if (reportErrors && compilerOptions.noImplicitAny) { var root = ts.getRootDeclaration(declaration); - if (!isPrivateWithinAmbient(root) && !(root.kind === 138 && isPrivateWithinAmbient(root.parent))) { + if (!isPrivateWithinAmbient(root) && !(root.kind === 139 && isPrivateWithinAmbient(root.parent))) { reportImplicitAnyError(declaration, type); } } @@ -13285,17 +13536,17 @@ var ts; return links.type = getTypeOfPrototypeProperty(symbol); } var declaration = symbol.valueDeclaration; - if (declaration.parent.kind === 246) { + if (declaration.parent.kind === 247) { return links.type = anyType; } - if (declaration.kind === 229) { + if (declaration.kind === 230) { return links.type = checkExpression(declaration.expression); } - if (declaration.kind === 183) { + if (declaration.kind === 184) { return links.type = checkExpression(declaration.right); } - if (declaration.kind === 168) { - if (declaration.parent.kind === 183) { + if (declaration.kind === 169) { + if (declaration.parent.kind === 184) { return links.type = checkExpressionCached(declaration.parent.right); } } @@ -13321,7 +13572,7 @@ var ts; } function getAnnotatedAccessorType(accessor) { if (accessor) { - if (accessor.kind === 145) { + if (accessor.kind === 146) { return accessor.type && getTypeFromTypeNode(accessor.type); } else { @@ -13337,8 +13588,8 @@ var ts; if (!pushTypeResolution(symbol, 0)) { return unknownType; } - var getter = ts.getDeclarationOfKind(symbol, 145); - var setter = ts.getDeclarationOfKind(symbol, 146); + var getter = ts.getDeclarationOfKind(symbol, 146); + var setter = ts.getDeclarationOfKind(symbol, 147); var type; var getterReturnType = getAnnotatedAccessorType(getter); if (getterReturnType) { @@ -13364,7 +13615,7 @@ var ts; if (!popTypeResolution()) { type = anyType; if (compilerOptions.noImplicitAny) { - var getter_1 = ts.getDeclarationOfKind(symbol, 145); + var getter_1 = ts.getDeclarationOfKind(symbol, 146); error(getter_1, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol)); } } @@ -13453,9 +13704,9 @@ var ts; if (!node) { return typeParameters; } - if (node.kind === 216 || node.kind === 188 || - node.kind === 215 || node.kind === 175 || - node.kind === 143 || node.kind === 176) { + if (node.kind === 217 || node.kind === 189 || + node.kind === 216 || node.kind === 176 || + node.kind === 144 || node.kind === 177) { var declarations = node.typeParameters; if (declarations) { return appendTypeParameters(appendOuterTypeParameters(typeParameters, node), declarations); @@ -13464,15 +13715,15 @@ var ts; } } function getOuterTypeParametersOfClassOrInterface(symbol) { - var declaration = symbol.flags & 32 ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 217); + var declaration = symbol.flags & 32 ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 218); return appendOuterTypeParameters(undefined, declaration); } function getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol) { var result; for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var node = _a[_i]; - if (node.kind === 217 || node.kind === 216 || - node.kind === 188 || node.kind === 218) { + if (node.kind === 218 || node.kind === 217 || + node.kind === 189 || node.kind === 219) { var declaration = node; if (declaration.typeParameters) { result = appendTypeParameters(result, declaration.typeParameters); @@ -13595,7 +13846,7 @@ var ts; type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 217 && ts.getInterfaceBaseTypeNodes(declaration)) { + if (declaration.kind === 218 && ts.getInterfaceBaseTypeNodes(declaration)) { for (var _b = 0, _c = ts.getInterfaceBaseTypeNodes(declaration); _b < _c.length; _b++) { var node = _c[_b]; var baseType = getTypeFromTypeNode(node); @@ -13624,7 +13875,7 @@ var ts; function isIndependentInterface(symbol) { for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 217) { + if (declaration.kind === 218) { if (declaration.flags & 262144) { return false; } @@ -13673,7 +13924,7 @@ var ts; if (!pushTypeResolution(symbol, 2)) { return unknownType; } - var declaration = ts.getDeclarationOfKind(symbol, 218); + var declaration = ts.getDeclarationOfKind(symbol, 219); var type = getTypeFromTypeNode(declaration.type); if (popTypeResolution()) { links.typeParameters = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); @@ -13704,7 +13955,7 @@ var ts; if (!links.declaredType) { var type = createType(512); type.symbol = symbol; - if (!ts.getDeclarationOfKind(symbol, 137).constraint) { + if (!ts.getDeclarationOfKind(symbol, 138).constraint) { type.constraint = noConstraintType; } links.declaredType = type; @@ -13756,11 +14007,11 @@ var ts; case 120: case 131: case 103: - case 162: + case 163: return true; - case 156: + case 157: return isIndependentType(node.elementType); - case 151: + case 152: return isIndependentTypeReference(node); } return false; @@ -13769,7 +14020,7 @@ var ts; return node.type && isIndependentType(node.type) || !node.type && !node.initializer; } function isIndependentFunctionLikeDeclaration(node) { - if (node.kind !== 144 && (!node.type || !isIndependentType(node.type))) { + if (node.kind !== 145 && (!node.type || !isIndependentType(node.type))) { return false; } for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) { @@ -13785,12 +14036,12 @@ var ts; var declaration = symbol.declarations[0]; if (declaration) { switch (declaration.kind) { - case 141: - case 140: - return isIndependentVariableLikeDeclaration(declaration); - case 143: case 142: + case 141: + return isIndependentVariableLikeDeclaration(declaration); case 144: + case 143: + case 145: return isIndependentFunctionLikeDeclaration(declaration); } } @@ -14303,7 +14554,7 @@ var ts; function getSignatureFromDeclaration(declaration) { var links = getNodeLinks(declaration); if (!links.resolvedSignature) { - var classType = declaration.kind === 144 ? + var classType = declaration.kind === 145 ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : undefined; var typeParameters = classType ? classType.localTypeParameters : @@ -14319,7 +14570,7 @@ var ts; paramSymbol = resolvedSymbol; } parameters.push(paramSymbol); - if (param.type && param.type.kind === 162) { + if (param.type && param.type.kind === 163) { hasStringLiterals = true; } if (param.initializer || param.questionToken || param.dotDotDotToken) { @@ -14342,8 +14593,8 @@ var ts; returnType = getTypeFromTypeNode(declaration.type); } else { - if (declaration.kind === 145 && !ts.hasDynamicName(declaration)) { - var setter = ts.getDeclarationOfKind(declaration.symbol, 146); + if (declaration.kind === 146 && !ts.hasDynamicName(declaration)) { + var setter = ts.getDeclarationOfKind(declaration.symbol, 147); returnType = getAnnotatedAccessorType(setter); } if (!returnType && ts.nodeIsMissing(declaration.body)) { @@ -14361,19 +14612,19 @@ var ts; for (var i = 0, len = symbol.declarations.length; i < len; i++) { var node = symbol.declarations[i]; switch (node.kind) { - case 152: case 153: - case 215: - case 143: - case 142: + case 154: + case 216: case 144: - case 147: + case 143: + case 145: case 148: case 149: - case 145: + case 150: case 146: - case 175: + case 147: case 176: + case 177: if (i > 0 && node.body) { var previous = symbol.declarations[i - 1]; if (node.parent === previous.parent && node.kind === previous.kind && node.pos === previous.end) { @@ -14453,7 +14704,7 @@ var ts; } function getOrCreateTypeFromSignature(signature) { if (!signature.isolatedSignatureType) { - var isConstructor = signature.declaration.kind === 144 || signature.declaration.kind === 148; + var isConstructor = signature.declaration.kind === 145 || signature.declaration.kind === 149; var type = createObjectType(65536 | 262144); type.members = emptySymbols; type.properties = emptyArray; @@ -14490,7 +14741,7 @@ var ts; : undefined; } function getConstraintDeclaration(type) { - return ts.getDeclarationOfKind(type.symbol, 137).constraint; + return ts.getDeclarationOfKind(type.symbol, 138).constraint; } function hasConstraintReferenceTo(type, target) { var checked; @@ -14523,7 +14774,7 @@ var ts; return typeParameter.constraint === noConstraintType ? undefined : typeParameter.constraint; } function getParentSymbolOfTypeParameter(typeParameter) { - return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 137).parent); + return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 138).parent); } function getTypeListId(types) { if (types) { @@ -14609,7 +14860,7 @@ var ts; function getTypeFromTypeReference(node) { var links = getNodeLinks(node); if (!links.resolvedType) { - var typeNameOrExpression = node.kind === 151 ? node.typeName : + var typeNameOrExpression = node.kind === 152 ? node.typeName : ts.isSupportedExpressionWithTypeArguments(node) ? node.expression : undefined; var symbol = typeNameOrExpression && resolveEntityName(typeNameOrExpression, 793056) || unknownSymbol; @@ -14635,9 +14886,9 @@ var ts; for (var _i = 0, declarations_3 = declarations; _i < declarations_3.length; _i++) { var declaration = declarations_3[_i]; switch (declaration.kind) { - case 216: case 217: - case 219: + case 218: + case 220: return declaration; } } @@ -14853,9 +15104,9 @@ var ts; function getThisType(node) { var container = ts.getThisContainer(node, false); var parent = container && container.parent; - if (parent && (ts.isClassLike(parent) || parent.kind === 217)) { + if (parent && (ts.isClassLike(parent) || parent.kind === 218)) { if (!(container.flags & 64) && - (container.kind !== 144 || ts.isNodeDescendentOf(node, container.body))) { + (container.kind !== 145 || ts.isNodeDescendentOf(node, container.body))) { return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent)).thisType; } } @@ -14899,34 +15150,34 @@ var ts; return esSymbolType; case 103: return voidType; - case 161: - return getTypeFromThisTypeNode(node); case 162: + return getTypeFromThisTypeNode(node); + case 163: return getTypeFromStringLiteralTypeNode(node); - case 151: - return getTypeFromTypeReference(node); - case 150: - return getTypeFromPredicateTypeNode(node); - case 190: - return getTypeFromTypeReference(node); - case 154: - return getTypeFromTypeQueryNode(node); - case 156: - return getTypeFromArrayTypeNode(node); - case 157: - return getTypeFromTupleTypeNode(node); - case 158: - return getTypeFromUnionTypeNode(node); - case 159: - return getTypeFromIntersectionTypeNode(node); - case 160: - return getTypeFromTypeNode(node.type); case 152: - case 153: + return getTypeFromTypeReference(node); + case 151: + return getTypeFromPredicateTypeNode(node); + case 191: + return getTypeFromTypeReference(node); case 155: + return getTypeFromTypeQueryNode(node); + case 157: + return getTypeFromArrayTypeNode(node); + case 158: + return getTypeFromTupleTypeNode(node); + case 159: + return getTypeFromUnionTypeNode(node); + case 160: + return getTypeFromIntersectionTypeNode(node); + case 161: + return getTypeFromTypeNode(node.type); + case 153: + case 154: + case 156: return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); case 69: - case 135: + case 136: var symbol = getSymbolAtLocation(node); return symbol && getDeclaredTypeOfSymbol(symbol); default: @@ -15106,27 +15357,27 @@ var ts; return type; } function isContextSensitive(node) { - ts.Debug.assert(node.kind !== 143 || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 144 || ts.isObjectLiteralMethod(node)); switch (node.kind) { - case 175: case 176: + case 177: return isContextSensitiveFunctionLikeDeclaration(node); - case 167: + case 168: return ts.forEach(node.properties, isContextSensitive); - case 166: + case 167: return ts.forEach(node.elements, isContextSensitive); - case 184: + case 185: return isContextSensitive(node.whenTrue) || isContextSensitive(node.whenFalse); - case 183: + case 184: return node.operatorToken.kind === 52 && (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 247: + case 248: return isContextSensitive(node.initializer); + case 144: case 143: - case 142: return isContextSensitiveFunctionLikeDeclaration(node); - case 174: + case 175: return isContextSensitive(node.expression); } return false; @@ -15154,6 +15405,9 @@ var ts; function compareTypesIdentical(source, target) { return checkTypeRelatedTo(source, target, identityRelation, undefined) ? -1 : 0; } + function compareTypesAssignable(source, target) { + return checkTypeRelatedTo(source, target, assignableRelation, undefined) ? -1 : 0; + } function isTypeSubtypeOf(source, target) { return checkTypeSubtypeOf(source, target, undefined); } @@ -15167,39 +15421,52 @@ var ts; return checkTypeRelatedTo(source, target, assignableRelation, errorNode, headMessage, containingMessageChain); } function isSignatureAssignableTo(source, target, ignoreReturnTypes) { + return compareSignaturesRelated(source, target, ignoreReturnTypes, false, undefined, compareTypesAssignable) !== 0; + } + function compareSignaturesRelated(source, target, ignoreReturnTypes, reportErrors, errorReporter, compareTypes) { if (source === target) { - return true; + return -1; } if (!target.hasRestParameter && source.minArgumentCount > target.parameters.length) { - return false; + return 0; } source = getErasedSignature(source); target = getErasedSignature(target); + var result = -1; var sourceMax = getNumNonRestParameters(source); var targetMax = getNumNonRestParameters(target); var checkCount = getNumParametersToCheckForSignatureRelatability(source, sourceMax, target, targetMax); + var sourceParams = source.parameters; + var targetParams = target.parameters; for (var i = 0; i < checkCount; i++) { - var s = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source); - var t = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target); - var related = isTypeAssignableTo(t, s) || isTypeAssignableTo(s, t); + var s = i < sourceMax ? getTypeOfSymbol(sourceParams[i]) : getRestTypeOfSignature(source); + var t = i < targetMax ? getTypeOfSymbol(targetParams[i]) : getRestTypeOfSignature(target); + var related = compareTypes(t, s, false) || compareTypes(s, t, reportErrors); if (!related) { - return false; + if (reportErrors) { + errorReporter(ts.Diagnostics.Types_of_parameters_0_and_1_are_incompatible, sourceParams[i < sourceMax ? i : sourceMax].name, targetParams[i < targetMax ? i : targetMax].name); + } + return 0; } + result &= related; } if (!ignoreReturnTypes) { var targetReturnType = getReturnTypeOfSignature(target); if (targetReturnType === voidType) { - return true; + return result; } var sourceReturnType = getReturnTypeOfSignature(source); if (targetReturnType.flags & 134217728 && targetReturnType.predicate.kind === 1) { if (!(sourceReturnType.flags & 134217728)) { - return false; + if (reportErrors) { + errorReporter(ts.Diagnostics.Signature_0_must_have_a_type_predicate, signatureToString(source)); + } + return 0; } } - return isTypeAssignableTo(sourceReturnType, targetReturnType); + result &= compareTypes(sourceReturnType, targetReturnType, reportErrors); } - return true; + return result; } function isImplementationCompatibleWithOverload(implementation, overload) { var erasedSource = getErasedSignature(implementation); @@ -15242,18 +15509,12 @@ var ts; var expandingFlags; var depth = 0; var overflow = false; - var elaborateErrors = false; ts.Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking"); - var result = isRelatedTo(source, target, errorNode !== undefined, headMessage); + var result = isRelatedTo(source, target, !!errorNode, headMessage); if (overflow) { error(errorNode, ts.Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target)); } else if (errorInfo) { - if (errorInfo.next === undefined) { - errorInfo = undefined; - elaborateErrors = true; - isRelatedTo(source, target, errorNode !== undefined, headMessage); - } if (containingMessageChain) { errorInfo = ts.concatenateDiagnosticMessageChains(containingMessageChain, errorInfo); } @@ -15261,6 +15522,7 @@ var ts; } return result !== 0; function reportError(message, arg0, arg1, arg2) { + ts.Debug.assert(!!errorNode); errorInfo = ts.chainDiagnosticMessages(errorInfo, message, arg0, arg1, arg2); } function reportRelationError(message, source, target) { @@ -15381,10 +15643,10 @@ var ts; return result; } } - var apparentType = getApparentType(source); - if (apparentType.flags & (80896 | 32768) && target.flags & 80896) { - var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo; - if (result = objectTypeRelatedTo(apparentType, source, target, reportStructuralErrors)) { + var apparentSource = getApparentType(source); + if (apparentSource.flags & (80896 | 32768) && target.flags & 80896) { + var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo && !(source.flags & 16777726); + if (result = objectTypeRelatedTo(apparentSource, source, target, reportStructuralErrors)) { errorInfo = saveErrorInfo; return result; } @@ -15439,6 +15701,7 @@ var ts; var prop = _a[_i]; if (!isKnownProperty(target, prop.name)) { if (reportErrors) { + ts.Debug.assert(!!errorNode); errorNode = prop.valueDeclaration; reportError(ts.Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(prop), typeToString(target)); } @@ -15531,7 +15794,7 @@ var ts; var id = relation !== identityRelation || source.id < target.id ? source.id + "," + target.id : target.id + "," + source.id; var related = relation[id]; if (related !== undefined) { - if (elaborateErrors && related === 2) { + if (reportErrors && related === 2) { relation[id] = 3; } else { @@ -15725,7 +15988,7 @@ var ts; shouldElaborateErrors = false; } } - if (shouldElaborateErrors && !isPrimitiveApparentType(source)) { + if (shouldElaborateErrors) { reportError(ts.Diagnostics.Type_0_provides_no_match_for_the_signature_1, typeToString(source), signatureToString(t, undefined, undefined, kind)); } return 0; @@ -15734,65 +15997,7 @@ var ts; return result; } function signatureRelatedTo(source, target, reportErrors) { - if (source === target) { - return -1; - } - if (!target.hasRestParameter && source.minArgumentCount > target.parameters.length) { - return 0; - } - var sourceMax = source.parameters.length; - var targetMax = target.parameters.length; - var checkCount; - if (source.hasRestParameter && target.hasRestParameter) { - checkCount = sourceMax > targetMax ? sourceMax : targetMax; - sourceMax--; - targetMax--; - } - else if (source.hasRestParameter) { - sourceMax--; - checkCount = targetMax; - } - else if (target.hasRestParameter) { - targetMax--; - checkCount = sourceMax; - } - else { - checkCount = sourceMax < targetMax ? sourceMax : targetMax; - } - source = getErasedSignature(source); - target = getErasedSignature(target); - var result = -1; - for (var i = 0; i < checkCount; i++) { - var s = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source); - var t = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target); - var saveErrorInfo = errorInfo; - var related = isRelatedTo(s, t, reportErrors); - if (!related) { - related = isRelatedTo(t, s, false); - if (!related) { - if (reportErrors) { - reportError(ts.Diagnostics.Types_of_parameters_0_and_1_are_incompatible, source.parameters[i < sourceMax ? i : sourceMax].name, target.parameters[i < targetMax ? i : targetMax].name); - } - return 0; - } - errorInfo = saveErrorInfo; - } - result &= related; - } - var targetReturnType = getReturnTypeOfSignature(target); - if (targetReturnType === voidType) { - return result; - } - var sourceReturnType = getReturnTypeOfSignature(source); - if (targetReturnType.flags & 134217728 && targetReturnType.predicate.kind === 1) { - if (!(sourceReturnType.flags & 134217728)) { - if (reportErrors) { - reportError(ts.Diagnostics.Signature_0_must_have_a_type_predicate, signatureToString(source)); - } - return 0; - } - } - return result & isRelatedTo(sourceReturnType, targetReturnType, reportErrors); + return compareSignaturesRelated(source, target, false, reportErrors, reportError, isRelatedTo); } function signaturesIdenticalTo(source, target, kind) { var sourceSignatures = getSignaturesOfType(source, kind); @@ -16155,22 +16360,22 @@ var ts; var typeAsString = typeToString(getWidenedType(type)); var diagnostic; switch (declaration.kind) { + case 142: case 141: - case 140: diagnostic = ts.Diagnostics.Member_0_implicitly_has_an_1_type; break; - case 138: + case 139: diagnostic = declaration.dotDotDotToken ? ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : ts.Diagnostics.Parameter_0_implicitly_has_an_1_type; break; - case 215: + case 216: + case 144: case 143: - case 142: - case 145: case 146: - case 175: + case 147: case 176: + case 177: if (!declaration.name) { error(declaration, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; @@ -16459,10 +16664,10 @@ var ts; function isInTypeQuery(node) { while (node) { switch (node.kind) { - case 154: + case 155: return true; case 69: - case 135: + case 136: node = node.parent; continue; default: @@ -16503,55 +16708,55 @@ var ts; } function isAssignedIn(node) { switch (node.kind) { - case 183: + case 184: return isAssignedInBinaryExpression(node); - case 213: - case 165: - return isAssignedInVariableDeclaration(node); - case 163: - case 164: + case 214: case 166: + return isAssignedInVariableDeclaration(node); + case 164: + case 165: case 167: case 168: case 169: case 170: case 171: - case 173: - case 191: + case 172: case 174: - case 181: - case 177: - case 180: - case 178: - case 179: + case 192: + case 175: case 182: - case 186: - case 184: + case 178: + case 181: + case 179: + case 180: + case 183: case 187: - case 194: + case 185: + case 188: case 195: - case 197: + case 196: case 198: case 199: case 200: case 201: case 202: case 203: - case 206: + case 204: case 207: case 208: - case 243: - case 244: case 209: + case 244: + case 245: case 210: case 211: - case 246: - case 235: + case 212: + case 247: case 236: - case 240: - case 241: case 237: + case 241: case 242: + case 238: + case 243: return ts.forEachChild(node, isAssignedIn); } return false; @@ -16561,7 +16766,7 @@ var ts; var type = getTypeOfSymbol(symbol); if (node && symbol.flags & 3) { if (isTypeAny(type) || type.flags & (80896 | 16384 | 512)) { - var declaration = ts.getDeclarationOfKind(symbol, 213); + var declaration = ts.getDeclarationOfKind(symbol, 214); var top_1 = declaration && getDeclarationContainer(declaration); var originalType = type; var nodeStack = []; @@ -16569,13 +16774,13 @@ var ts; var child = node; node = node.parent; switch (node.kind) { - case 198: + case 199: + case 185: case 184: - case 183: nodeStack.push({ node: node, child: child }); break; - case 250: - case 220: + case 251: + case 221: break loop; } if (node === top_1) { @@ -16586,17 +16791,17 @@ var ts; while (nodes = nodeStack.pop()) { var node_1 = nodes.node, child = nodes.child; switch (node_1.kind) { - case 198: + case 199: if (child !== node_1.expression) { type = narrowType(type, node_1.expression, child === node_1.thenStatement); } break; - case 184: + case 185: if (child !== node_1.condition) { type = narrowType(type, node_1.condition, child === node_1.whenTrue); } break; - case 183: + case 184: if (child === node_1.right) { if (node_1.operatorToken.kind === 51) { type = narrowType(type, node_1.left, true); @@ -16620,7 +16825,7 @@ var ts; } return type; function narrowTypeByEquality(type, expr, assumeTrue) { - if (expr.left.kind !== 178 || expr.right.kind !== 9) { + if (expr.left.kind !== 179 || expr.right.kind !== 9) { return type; } var left = expr.left; @@ -16635,9 +16840,6 @@ var ts; if (typeInfo && typeInfo.type === undefinedType) { return type; } - if (!!(type.flags & 1) && typeInfo && assumeTrue) { - return typeInfo.type; - } var flags; if (typeInfo) { flags = typeInfo.flags; @@ -16647,6 +16849,9 @@ var ts; flags = 132 | 258 | 16777216 | 8; } if (!(type.flags & 16384)) { + if (assumeTrue && typeInfo && isTypeSubtypeOf(typeInfo.type, type)) { + return typeInfo.type; + } return filterUnion(type) ? type : emptyUnionType; } return getUnionType(ts.filter(type.types, filterUnion), true); @@ -16761,7 +16966,7 @@ var ts; return narrowTypeByThisTypePredicate(type, memberType.predicate, expr, assumeTrue); } function narrowTypeByThisTypePredicate(type, predicate, expression, assumeTrue) { - if (expression.kind === 169 || expression.kind === 168) { + if (expression.kind === 170 || expression.kind === 169) { var accessExpression = expression; var possibleIdentifier = skipParenthesizedNodes(accessExpression.expression); if (possibleIdentifier.kind === 69 && getSymbolAtTypePredicatePosition(possibleIdentifier) === symbol) { @@ -16774,18 +16979,18 @@ var ts; expr = skipParenthesizedNodes(expr); switch (expr.kind) { case 69: - case 168: - case 135: + case 169: + case 136: return getSymbolOfEntityNameOrPropertyAccessExpression(expr); } } function narrowType(type, expr, assumeTrue) { switch (expr.kind) { - case 170: + case 171: return narrowTypeByTypePredicate(type, expr, assumeTrue); - case 174: + case 175: return narrowType(type, expr.expression, assumeTrue); - case 183: + case 184: var operator = expr.operatorToken.kind; if (operator === 32 || operator === 33) { return narrowTypeByEquality(type, expr, assumeTrue); @@ -16800,20 +17005,20 @@ var ts; return narrowTypeByInstanceof(type, expr, assumeTrue); } break; - case 181: + case 182: if (expr.operator === 49) { return narrowType(type, expr.operand, !assumeTrue); } break; + case 170: case 169: - case 168: return narrowTypeByTypePredicateMember(type, expr, assumeTrue); } return type; } } function skipParenthesizedNodes(expression) { - while (expression.kind === 174) { + while (expression.kind === 175) { expression = expression.expression; } return expression; @@ -16822,7 +17027,7 @@ var ts; var symbol = getResolvedSymbol(node); if (symbol === argumentsSymbol) { var container = ts.getContainingFunction(node); - if (container.kind === 176) { + if (container.kind === 177) { if (languageVersion < 2) { error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); } @@ -16853,7 +17058,7 @@ var ts; function checkBlockScopedBindingCapturedInLoop(node, symbol) { if (languageVersion >= 2 || (symbol.flags & (2 | 32)) === 0 || - symbol.valueDeclaration.parent.kind === 246) { + symbol.valueDeclaration.parent.kind === 247) { return; } var container; @@ -16862,11 +17067,11 @@ var ts; } else { container = symbol.valueDeclaration; - while (container.kind !== 214) { + while (container.kind !== 215) { container = container.parent; } container = container.parent; - if (container.kind === 195) { + if (container.kind === 196) { container = container.parent; } } @@ -16885,7 +17090,7 @@ var ts; } function captureLexicalThis(node, container) { getNodeLinks(node).flags |= 2; - if (container.kind === 141 || container.kind === 144) { + if (container.kind === 142 || container.kind === 145) { var classNode = container.parent; getNodeLinks(classNode).flags |= 4; } @@ -16896,29 +17101,29 @@ var ts; function checkThisExpression(node) { var container = ts.getThisContainer(node, true); var needToCaptureLexicalThis = false; - if (container.kind === 176) { + if (container.kind === 177) { container = ts.getThisContainer(container, false); needToCaptureLexicalThis = (languageVersion < 2); } switch (container.kind) { - case 220: + case 221: error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); break; - case 219: + case 220: error(node, ts.Diagnostics.this_cannot_be_referenced_in_current_location); break; - case 144: + case 145: if (isInConstructorArgumentInitializer(node, container)) { error(node, ts.Diagnostics.this_cannot_be_referenced_in_constructor_arguments); } break; + case 142: case 141: - case 140: if (container.flags & 64) { error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer); } break; - case 136: + case 137: error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); break; } @@ -16929,7 +17134,7 @@ var ts; var symbol = getSymbolOfNode(container.parent); return container.flags & 64 ? getTypeOfSymbol(symbol) : getDeclaredTypeOfSymbol(symbol).thisType; } - if (ts.isInJavaScriptFile(node) && container.kind === 175) { + if (ts.isInJavaScriptFile(node) && container.kind === 176) { if (ts.getSpecialPropertyAssignmentKind(container.parent) === 3) { var className = container.parent .left @@ -16945,18 +17150,18 @@ var ts; } function isInConstructorArgumentInitializer(node, constructorDecl) { for (var n = node; n && n !== constructorDecl; n = n.parent) { - if (n.kind === 138) { + if (n.kind === 139) { return true; } } return false; } function checkSuperExpression(node) { - var isCallExpression = node.parent.kind === 170 && node.parent.expression === node; + var isCallExpression = node.parent.kind === 171 && node.parent.expression === node; var container = ts.getSuperContainer(node, true); var needToCaptureLexicalThis = false; if (!isCallExpression) { - while (container && container.kind === 176) { + while (container && container.kind === 177) { container = ts.getSuperContainer(container, true); needToCaptureLexicalThis = languageVersion < 2; } @@ -16965,16 +17170,16 @@ var ts; var nodeCheckFlag = 0; if (!canUseSuperExpression) { var current = node; - while (current && current !== container && current.kind !== 136) { + while (current && current !== container && current.kind !== 137) { current = current.parent; } - if (current && current.kind === 136) { + if (current && current.kind === 137) { error(node, ts.Diagnostics.super_cannot_be_referenced_in_a_computed_property_name); } else if (isCallExpression) { error(node, ts.Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors); } - else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 167)) { + else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 168)) { error(node, ts.Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions); } else { @@ -16992,7 +17197,7 @@ var ts; if (needToCaptureLexicalThis) { captureLexicalThis(node.parent, container); } - if (container.parent.kind === 167) { + if (container.parent.kind === 168) { if (languageVersion < 2) { error(node, ts.Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher); return unknownType; @@ -17010,7 +17215,7 @@ var ts; } return unknownType; } - if (container.kind === 144 && isInConstructorArgumentInitializer(node, container)) { + if (container.kind === 145 && isInConstructorArgumentInitializer(node, container)) { error(node, ts.Diagnostics.super_cannot_be_referenced_in_constructor_arguments); return unknownType; } @@ -17022,24 +17227,24 @@ var ts; return false; } if (isCallExpression) { - return container.kind === 144; + return container.kind === 145; } else { - if (ts.isClassLike(container.parent) || container.parent.kind === 167) { + if (ts.isClassLike(container.parent) || container.parent.kind === 168) { if (container.flags & 64) { - return container.kind === 143 || - container.kind === 142 || - container.kind === 145 || - container.kind === 146; + return container.kind === 144 || + container.kind === 143 || + container.kind === 146 || + container.kind === 147; } else { - return container.kind === 143 || - container.kind === 142 || - container.kind === 145 || + return container.kind === 144 || + container.kind === 143 || container.kind === 146 || + container.kind === 147 || + container.kind === 142 || container.kind === 141 || - container.kind === 140 || - container.kind === 144; + container.kind === 145; } } } @@ -17074,7 +17279,7 @@ var ts; if (declaration.type) { return getTypeFromTypeNode(declaration.type); } - if (declaration.kind === 138) { + if (declaration.kind === 139) { var type = getContextuallyTypedParameterType(declaration); if (type) { return type; @@ -17107,7 +17312,7 @@ var ts; } function isInParameterInitializerBeforeContainingFunction(node) { while (node.parent && !ts.isFunctionLike(node.parent)) { - if (node.parent.kind === 138 && node.parent.initializer === node) { + if (node.parent.kind === 139 && node.parent.initializer === node) { return true; } node = node.parent; @@ -17116,8 +17321,8 @@ var ts; } function getContextualReturnType(functionDecl) { if (functionDecl.type || - functionDecl.kind === 144 || - functionDecl.kind === 145 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 146))) { + functionDecl.kind === 145 || + functionDecl.kind === 146 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 147))) { return getReturnTypeOfSignature(getSignatureFromDeclaration(functionDecl)); } var signature = getContextualSignatureForFunctionLikeDeclaration(functionDecl); @@ -17136,7 +17341,7 @@ var ts; return undefined; } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { - if (template.parent.kind === 172) { + if (template.parent.kind === 173) { return getContextualTypeForArgument(template.parent, substitutionExpression); } return undefined; @@ -17247,13 +17452,13 @@ var ts; var kind = attribute.kind; var jsxElement = attribute.parent; var attrsType = getJsxElementAttributesType(jsxElement); - if (attribute.kind === 240) { + if (attribute.kind === 241) { if (!attrsType || isTypeAny(attrsType)) { return undefined; } return getTypeOfPropertyOfType(attrsType, attribute.name.text); } - else if (attribute.kind === 241) { + else if (attribute.kind === 242) { return attrsType; } ts.Debug.fail("Expected JsxAttribute or JsxSpreadAttribute, got ts.SyntaxKind[" + kind + "]"); @@ -17271,40 +17476,40 @@ var ts; } var parent = node.parent; switch (parent.kind) { - case 213: - case 138: + case 214: + case 139: + case 142: case 141: - case 140: - case 165: - return getContextualTypeForInitializerExpression(node); - case 176: - case 206: - return getContextualTypeForReturnExpression(node); - case 186: - return getContextualTypeForYieldOperand(parent); - case 170: - case 171: - return getContextualTypeForArgument(parent, node); - case 173: - case 191: - return getTypeFromTypeNode(parent.type); - case 183: - return getContextualTypeForBinaryOperand(node); - case 247: - return getContextualTypeForObjectLiteralElement(parent); case 166: - return getContextualTypeForElementExpression(node); - case 184: - return getContextualTypeForConditionalOperand(node); - case 192: - ts.Debug.assert(parent.parent.kind === 185); - return getContextualTypeForSubstitutionExpression(parent.parent, node); + return getContextualTypeForInitializerExpression(node); + case 177: + case 207: + return getContextualTypeForReturnExpression(node); + case 187: + return getContextualTypeForYieldOperand(parent); + case 171: + case 172: + return getContextualTypeForArgument(parent, node); case 174: + case 192: + return getTypeFromTypeNode(parent.type); + case 184: + return getContextualTypeForBinaryOperand(node); + case 248: + return getContextualTypeForObjectLiteralElement(parent); + case 167: + return getContextualTypeForElementExpression(node); + case 185: + return getContextualTypeForConditionalOperand(node); + case 193: + ts.Debug.assert(parent.parent.kind === 186); + return getContextualTypeForSubstitutionExpression(parent.parent, node); + case 175: return getContextualType(parent); - case 242: + case 243: return getContextualType(parent); - case 240: case 241: + case 242: return getContextualTypeForJsxAttribute(parent); } return undefined; @@ -17319,7 +17524,7 @@ var ts; } } function isFunctionExpressionOrArrowFunction(node) { - return node.kind === 175 || node.kind === 176; + return node.kind === 176 || node.kind === 177; } function getContextualSignatureForFunctionLikeDeclaration(node) { return isFunctionExpressionOrArrowFunction(node) || ts.isObjectLiteralMethod(node) @@ -17327,7 +17532,7 @@ var ts; : undefined; } function getContextualSignature(node) { - ts.Debug.assert(node.kind !== 143 || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 144 || ts.isObjectLiteralMethod(node)); var type = ts.isObjectLiteralMethod(node) ? getContextualTypeForObjectLiteralMethod(node) : getApparentTypeOfContextualType(node); @@ -17367,13 +17572,13 @@ var ts; } function isAssignmentTarget(node) { var parent = node.parent; - if (parent.kind === 183 && parent.operatorToken.kind === 56 && parent.left === node) { + if (parent.kind === 184 && parent.operatorToken.kind === 56 && parent.left === node) { return true; } - if (parent.kind === 247) { + if (parent.kind === 248) { return isAssignmentTarget(parent.parent); } - if (parent.kind === 166) { + if (parent.kind === 167) { return isAssignmentTarget(parent); } return false; @@ -17383,8 +17588,8 @@ var ts; return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, false); } function hasDefaultValue(node) { - return (node.kind === 165 && !!node.initializer) || - (node.kind === 183 && node.operatorToken.kind === 56); + return (node.kind === 166 && !!node.initializer) || + (node.kind === 184 && node.operatorToken.kind === 56); } function checkArrayLiteral(node, contextualMapper) { var elements = node.elements; @@ -17393,7 +17598,7 @@ var ts; var inDestructuringPattern = isAssignmentTarget(node); for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) { var e = elements_1[_i]; - if (inDestructuringPattern && e.kind === 187) { + if (inDestructuringPattern && e.kind === 188) { var restArrayType = checkExpression(e.expression, contextualMapper); var restElementType = getIndexTypeOfType(restArrayType, 1) || (languageVersion >= 2 ? getElementTypeOfIterable(restArrayType, undefined) : undefined); @@ -17405,7 +17610,7 @@ var ts; var type = checkExpression(e, contextualMapper); elementTypes.push(type); } - hasSpreadElement = hasSpreadElement || e.kind === 187; + hasSpreadElement = hasSpreadElement || e.kind === 188; } if (!hasSpreadElement) { if (inDestructuringPattern && elementTypes.length) { @@ -17416,7 +17621,7 @@ var ts; var contextualType = getApparentTypeOfContextualType(node); if (contextualType && contextualTypeIsTupleLikeType(contextualType)) { var pattern = contextualType.pattern; - if (pattern && (pattern.kind === 164 || pattern.kind === 166)) { + if (pattern && (pattern.kind === 165 || pattern.kind === 167)) { var patternElements = pattern.elements; for (var i = elementTypes.length; i < patternElements.length; i++) { var patternElement = patternElements[i]; @@ -17424,7 +17629,7 @@ var ts; elementTypes.push(contextualType.elementTypes[i]); } else { - if (patternElement.kind !== 189) { + if (patternElement.kind !== 190) { error(patternElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value); } elementTypes.push(unknownType); @@ -17439,7 +17644,7 @@ var ts; return createArrayType(elementTypes.length ? getUnionType(elementTypes) : undefinedType); } function isNumericName(name) { - return name.kind === 136 ? isNumericComputedName(name) : isNumericLiteralName(name.text); + return name.kind === 137 ? isNumericComputedName(name) : isNumericLiteralName(name.text); } function isNumericComputedName(name) { return isTypeAnyOrAllConstituentTypesHaveKind(checkComputedPropertyName(name), 132); @@ -17470,31 +17675,31 @@ var ts; var propertiesArray = []; var contextualType = getApparentTypeOfContextualType(node); var contextualTypeHasPattern = contextualType && contextualType.pattern && - (contextualType.pattern.kind === 163 || contextualType.pattern.kind === 167); + (contextualType.pattern.kind === 164 || contextualType.pattern.kind === 168); var typeFlags = 0; var patternWithComputedProperties = false; for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var memberDecl = _a[_i]; var member = memberDecl.symbol; - if (memberDecl.kind === 247 || - memberDecl.kind === 248 || + if (memberDecl.kind === 248 || + memberDecl.kind === 249 || ts.isObjectLiteralMethod(memberDecl)) { var type = void 0; - if (memberDecl.kind === 247) { + if (memberDecl.kind === 248) { type = checkPropertyAssignment(memberDecl, contextualMapper); } - else if (memberDecl.kind === 143) { + else if (memberDecl.kind === 144) { type = checkObjectLiteralMethod(memberDecl, contextualMapper); } else { - ts.Debug.assert(memberDecl.kind === 248); + ts.Debug.assert(memberDecl.kind === 249); type = checkExpression(memberDecl.name, contextualMapper); } typeFlags |= type.flags; var prop = createSymbol(4 | 67108864 | member.flags, member.name); if (inDestructuringPattern) { - var isOptional = (memberDecl.kind === 247 && hasDefaultValue(memberDecl.initializer)) || - (memberDecl.kind === 248 && memberDecl.objectAssignmentInitializer); + var isOptional = (memberDecl.kind === 248 && hasDefaultValue(memberDecl.initializer)) || + (memberDecl.kind === 249 && memberDecl.objectAssignmentInitializer); if (isOptional) { prop.flags |= 536870912; } @@ -17521,7 +17726,7 @@ var ts; member = prop; } else { - ts.Debug.assert(memberDecl.kind === 145 || memberDecl.kind === 146); + ts.Debug.assert(memberDecl.kind === 146 || memberDecl.kind === 147); checkAccessorDeclaration(memberDecl); } if (!ts.hasDynamicName(memberDecl)) { @@ -17579,13 +17784,13 @@ var ts; for (var _i = 0, _a = node.children; _i < _a.length; _i++) { var child = _a[_i]; switch (child.kind) { - case 242: + case 243: checkJsxExpression(child); break; - case 235: + case 236: checkJsxElement(child); break; - case 236: + case 237: checkJsxSelfClosingElement(child); break; } @@ -17596,7 +17801,7 @@ var ts; return name.indexOf("-") < 0; } function isJsxIntrinsicIdentifier(tagName) { - if (tagName.kind === 135) { + if (tagName.kind === 136) { return false; } else { @@ -17690,6 +17895,7 @@ var ts; if (compilerOptions.noImplicitAny) { error(node, ts.Diagnostics.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists, JsxNames.IntrinsicElements); } + return unknownSymbol; } } function lookupClassTag(node) { @@ -17760,17 +17966,21 @@ var ts; var sym = getJsxElementTagSymbol(node); if (links.jsxFlags & 4) { var elemInstanceType = getJsxElementInstanceType(node); - var callSignature = getSingleCallSignature(getTypeOfSymbol(sym)); - var callReturnType = callSignature && getReturnTypeOfSignature(callSignature); - var paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0])); - if (callReturnType && isTypeAssignableTo(callReturnType, jsxElementType) && (paramType.flags & 80896)) { - var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes); - if (intrinsicAttributes !== unknownType) { - paramType = intersectTypes(intrinsicAttributes, paramType); - } - return paramType; - } var elemClassType = getJsxGlobalElementClassType(); + if (!elemClassType || !isTypeAssignableTo(elemInstanceType, elemClassType)) { + var elemType = getTypeOfSymbol(sym); + var callSignatures = elemType && getSignaturesOfType(elemType, 0); + var callSignature = callSignatures && callSignatures.length > 0 && callSignatures[0]; + var callReturnType = callSignature && getReturnTypeOfSignature(callSignature); + var paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0])); + if (callReturnType && isTypeAssignableTo(callReturnType, jsxElementType)) { + var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes); + if (intrinsicAttributes !== unknownType) { + paramType = intersectTypes(intrinsicAttributes, paramType); + } + return links.resolvedJsxType = paramType; + } + } if (elemClassType) { checkTypeRelatedTo(elemInstanceType, elemClassType, assignableRelation, node, ts.Diagnostics.JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements); } @@ -17868,11 +18078,11 @@ var ts; var nameTable = {}; var sawSpreadedAny = false; for (var i = node.attributes.length - 1; i >= 0; i--) { - if (node.attributes[i].kind === 240) { + if (node.attributes[i].kind === 241) { checkJsxAttribute((node.attributes[i]), targetAttributesType, nameTable); } else { - ts.Debug.assert(node.attributes[i].kind === 241); + ts.Debug.assert(node.attributes[i].kind === 242); var spreadType = checkJsxSpreadAttribute((node.attributes[i]), targetAttributesType, nameTable); if (isTypeAny(spreadType)) { sawSpreadedAny = true; @@ -17898,7 +18108,7 @@ var ts; } } function getDeclarationKindFromSymbol(s) { - return s.valueDeclaration ? s.valueDeclaration.kind : 141; + return s.valueDeclaration ? s.valueDeclaration.kind : 142; } function getDeclarationFlagsFromSymbol(s) { return s.valueDeclaration ? ts.getCombinedNodeFlags(s.valueDeclaration) : s.flags & 134217728 ? 8 | 64 : 0; @@ -17907,10 +18117,10 @@ var ts; var flags = getDeclarationFlagsFromSymbol(prop); var declaringClass = getDeclaredTypeOfSymbol(prop.parent); if (left.kind === 95) { - var errorNode = node.kind === 168 ? + var errorNode = node.kind === 169 ? node.name : node.right; - if (languageVersion < 2 && getDeclarationKindFromSymbol(prop) !== 143) { + if (languageVersion < 2 && getDeclarationKindFromSymbol(prop) !== 144) { error(errorNode, ts.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword); return false; } @@ -17979,7 +18189,7 @@ var ts; return getTypeOfSymbol(prop); } function isValidPropertyAccess(node, propertyName) { - var left = node.kind === 168 + var left = node.kind === 169 ? node.expression : node.left; var type = checkExpression(left); @@ -17991,10 +18201,47 @@ var ts; } return true; } + function getForInVariableSymbol(node) { + var initializer = node.initializer; + if (initializer.kind === 215) { + var variable = initializer.declarations[0]; + if (variable && !ts.isBindingPattern(variable.name)) { + return getSymbolOfNode(variable); + } + } + else if (initializer.kind === 69) { + return getResolvedSymbol(initializer); + } + return undefined; + } + function hasNumericPropertyNames(type) { + return getIndexTypeOfType(type, 1) && !getIndexTypeOfType(type, 0); + } + function isForInVariableForNumericPropertyNames(expr) { + var e = skipParenthesizedNodes(expr); + if (e.kind === 69) { + var symbol = getResolvedSymbol(e); + if (symbol.flags & 3) { + var child = expr; + var node = expr.parent; + while (node) { + if (node.kind === 203 && + child === node.statement && + getForInVariableSymbol(node) === symbol && + hasNumericPropertyNames(checkExpression(node.expression))) { + return true; + } + child = node; + node = node.parent; + } + } + } + return false; + } function checkIndexedAccess(node) { if (!node.argumentExpression) { - var sourceFile = getSourceFile(node); - if (node.parent.kind === 171 && node.parent.expression === node) { + var sourceFile = ts.getSourceFileOfNode(node); + if (node.parent.kind === 172 && node.parent.expression === node) { var start = ts.skipTrivia(sourceFile.text, node.expression.end); var end = node.end; grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead); @@ -18031,7 +18278,7 @@ var ts; } } if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 258 | 132 | 16777216)) { - if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 132)) { + if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 132) || isForInVariableForNumericPropertyNames(node.argumentExpression)) { var numberIndexType = getIndexTypeOfType(objectType, 1); if (numberIndexType) { return numberIndexType; @@ -18042,7 +18289,9 @@ var ts; return stringIndexType; } if (compilerOptions.noImplicitAny && !compilerOptions.suppressImplicitAnyIndexErrors && !isTypeAny(objectType)) { - error(node, ts.Diagnostics.Index_signature_of_object_type_implicitly_has_an_any_type); + error(node, getIndexTypeOfType(objectType, 1) ? + ts.Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number : + ts.Diagnostics.Index_signature_of_object_type_implicitly_has_an_any_type); } return anyType; } @@ -18053,7 +18302,7 @@ var ts; if (indexArgumentExpression.kind === 9 || indexArgumentExpression.kind === 8) { return indexArgumentExpression.text; } - if (indexArgumentExpression.kind === 169 || indexArgumentExpression.kind === 168) { + if (indexArgumentExpression.kind === 170 || indexArgumentExpression.kind === 169) { var value = getConstantValue(indexArgumentExpression); if (value !== undefined) { return value.toString(); @@ -18096,10 +18345,10 @@ var ts; return true; } function resolveUntypedCall(node) { - if (node.kind === 172) { + if (node.kind === 173) { checkExpression(node.template); } - else if (node.kind !== 139) { + else if (node.kind !== 140) { ts.forEach(node.arguments, function (argument) { checkExpression(argument); }); @@ -18150,7 +18399,7 @@ var ts; function getSpreadArgumentIndex(args) { for (var i = 0; i < args.length; i++) { var arg = args[i]; - if (arg && arg.kind === 187) { + if (arg && arg.kind === 188) { return i; } } @@ -18162,11 +18411,11 @@ var ts; var callIsIncomplete; var isDecorator; var spreadArgIndex = -1; - if (node.kind === 172) { + if (node.kind === 173) { var tagExpression = node; adjustedArgCount = args.length; typeArguments = undefined; - if (tagExpression.template.kind === 185) { + if (tagExpression.template.kind === 186) { var templateExpression = tagExpression.template; var lastSpan = ts.lastOrUndefined(templateExpression.templateSpans); ts.Debug.assert(lastSpan !== undefined); @@ -18178,7 +18427,7 @@ var ts; callIsIncomplete = !!templateLiteral.isUnterminated; } } - else if (node.kind === 139) { + else if (node.kind === 140) { isDecorator = true; typeArguments = undefined; adjustedArgCount = getEffectiveArgumentCount(node, undefined, signature); @@ -18186,7 +18435,7 @@ var ts; else { var callExpression = node; if (!callExpression.arguments) { - ts.Debug.assert(callExpression.kind === 171); + ts.Debug.assert(callExpression.kind === 172); return signature.minArgumentCount === 0; } adjustedArgCount = callExpression.arguments.hasTrailingComma ? args.length + 1 : args.length; @@ -18239,7 +18488,7 @@ var ts; var argCount = getEffectiveArgumentCount(node, args, signature); for (var i = 0; i < argCount; i++) { var arg = getEffectiveArgument(node, args, i); - if (arg === undefined || arg.kind !== 189) { + if (arg === undefined || arg.kind !== 190) { var paramType = getTypeAtPosition(signature, i); var argType = getEffectiveArgumentType(node, i, arg); if (argType === undefined) { @@ -18288,7 +18537,7 @@ var ts; var argCount = getEffectiveArgumentCount(node, args, signature); for (var i = 0; i < argCount; i++) { var arg = getEffectiveArgument(node, args, i); - if (arg === undefined || arg.kind !== 189) { + if (arg === undefined || arg.kind !== 190) { var paramType = getTypeAtPosition(signature, i); var argType = getEffectiveArgumentType(node, i, arg); if (argType === undefined) { @@ -18307,16 +18556,16 @@ var ts; } function getEffectiveCallArguments(node) { var args; - if (node.kind === 172) { + if (node.kind === 173) { var template = node.template; args = [undefined]; - if (template.kind === 185) { + if (template.kind === 186) { ts.forEach(template.templateSpans, function (span) { args.push(span.expression); }); } } - else if (node.kind === 139) { + else if (node.kind === 140) { return undefined; } else { @@ -18325,21 +18574,21 @@ var ts; return args; } function getEffectiveArgumentCount(node, args, signature) { - if (node.kind === 139) { + if (node.kind === 140) { switch (node.parent.kind) { - case 216: - case 188: + case 217: + case 189: return 1; - case 141: + case 142: return 2; - case 143: - case 145: + case 144: case 146: + case 147: if (languageVersion === 0) { return 2; } return signature.parameters.length >= 3 ? 3 : 2; - case 138: + case 139: return 3; } } @@ -18348,48 +18597,48 @@ var ts; } } function getEffectiveDecoratorFirstArgumentType(node) { - if (node.kind === 216) { + if (node.kind === 217) { var classSymbol = getSymbolOfNode(node); return getTypeOfSymbol(classSymbol); } - if (node.kind === 138) { + if (node.kind === 139) { node = node.parent; - if (node.kind === 144) { + if (node.kind === 145) { var classSymbol = getSymbolOfNode(node); return getTypeOfSymbol(classSymbol); } } - if (node.kind === 141 || - node.kind === 143 || - node.kind === 145 || - node.kind === 146) { + if (node.kind === 142 || + node.kind === 144 || + node.kind === 146 || + node.kind === 147) { return getParentTypeOfClassElement(node); } ts.Debug.fail("Unsupported decorator target."); return unknownType; } function getEffectiveDecoratorSecondArgumentType(node) { - if (node.kind === 216) { + if (node.kind === 217) { ts.Debug.fail("Class decorators should not have a second synthetic argument."); return unknownType; } - if (node.kind === 138) { + if (node.kind === 139) { node = node.parent; - if (node.kind === 144) { + if (node.kind === 145) { return anyType; } } - if (node.kind === 141 || - node.kind === 143 || - node.kind === 145 || - node.kind === 146) { + if (node.kind === 142 || + node.kind === 144 || + node.kind === 146 || + node.kind === 147) { var element = node; switch (element.name.kind) { case 69: case 8: case 9: return getStringLiteralTypeForText(element.name.text); - case 136: + case 137: var nameType = checkComputedPropertyName(element.name); if (allConstituentTypesHaveKind(nameType, 16777216)) { return nameType; @@ -18406,20 +18655,20 @@ var ts; return unknownType; } function getEffectiveDecoratorThirdArgumentType(node) { - if (node.kind === 216) { + if (node.kind === 217) { ts.Debug.fail("Class decorators should not have a third synthetic argument."); return unknownType; } - if (node.kind === 138) { + if (node.kind === 139) { return numberType; } - if (node.kind === 141) { + if (node.kind === 142) { ts.Debug.fail("Property decorators should not have a third synthetic argument."); return unknownType; } - if (node.kind === 143 || - node.kind === 145 || - node.kind === 146) { + if (node.kind === 144 || + node.kind === 146 || + node.kind === 147) { var propertyType = getTypeOfNode(node); return createTypedPropertyDescriptorType(propertyType); } @@ -18440,26 +18689,26 @@ var ts; return unknownType; } function getEffectiveArgumentType(node, argIndex, arg) { - if (node.kind === 139) { + if (node.kind === 140) { return getEffectiveDecoratorArgumentType(node, argIndex); } - else if (argIndex === 0 && node.kind === 172) { + else if (argIndex === 0 && node.kind === 173) { return globalTemplateStringsArrayType; } return undefined; } function getEffectiveArgument(node, args, argIndex) { - if (node.kind === 139 || - (argIndex === 0 && node.kind === 172)) { + if (node.kind === 140 || + (argIndex === 0 && node.kind === 173)) { return undefined; } return args[argIndex]; } function getEffectiveArgumentErrorNode(node, argIndex, arg) { - if (node.kind === 139) { + if (node.kind === 140) { return node.expression; } - else if (argIndex === 0 && node.kind === 172) { + else if (argIndex === 0 && node.kind === 173) { return node.template; } else { @@ -18467,8 +18716,8 @@ var ts; } } function resolveCall(node, signatures, candidatesOutArray, headMessage) { - var isTaggedTemplate = node.kind === 172; - var isDecorator = node.kind === 139; + var isTaggedTemplate = node.kind === 173; + var isDecorator = node.kind === 140; var typeArguments; if (!isTaggedTemplate && !isDecorator) { typeArguments = node.typeArguments; @@ -18700,16 +18949,16 @@ var ts; } function getDiagnosticHeadMessageForDecoratorResolution(node) { switch (node.parent.kind) { - case 216: - case 188: + case 217: + case 189: return ts.Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression; - case 138: + case 139: return ts.Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression; - case 141: + case 142: return ts.Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression; - case 143: - case 145: + case 144: case 146: + case 147: return ts.Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression; } } @@ -18737,16 +18986,16 @@ var ts; var links = getNodeLinks(node); if (!links.resolvedSignature || candidatesOutArray) { links.resolvedSignature = anySignature; - if (node.kind === 170) { + if (node.kind === 171) { links.resolvedSignature = resolveCallExpression(node, candidatesOutArray); } - else if (node.kind === 171) { + else if (node.kind === 172) { links.resolvedSignature = resolveNewExpression(node, candidatesOutArray); } - else if (node.kind === 172) { + else if (node.kind === 173) { links.resolvedSignature = resolveTaggedTemplateExpression(node, candidatesOutArray); } - else if (node.kind === 139) { + else if (node.kind === 140) { links.resolvedSignature = resolveDecorator(node, candidatesOutArray); } else { @@ -18768,12 +19017,12 @@ var ts; if (node.expression.kind === 95) { return voidType; } - if (node.kind === 171) { + if (node.kind === 172) { var declaration = signature.declaration; if (declaration && - declaration.kind !== 144 && - declaration.kind !== 148 && - declaration.kind !== 153) { + declaration.kind !== 145 && + declaration.kind !== 149 && + declaration.kind !== 154) { var funcSymbol = checkExpression(node.expression).symbol; if (funcSymbol && funcSymbol.members && (funcSymbol.flags & 16)) { return getInferredClassType(funcSymbol); @@ -18827,7 +19076,7 @@ var ts; if (ts.isBindingPattern(node.name)) { for (var _i = 0, _a = node.name.elements; _i < _a.length; _i++) { var element = _a[_i]; - if (element.kind !== 189) { + if (element.kind !== 190) { if (element.name.kind === 69) { getSymbolLinks(getSymbolOfNode(element)).type = getTypeForBindingElement(element); } @@ -18861,7 +19110,7 @@ var ts; } var isAsync = ts.isAsyncFunctionLike(func); var type; - if (func.body.kind !== 194) { + if (func.body.kind !== 195) { type = checkExpressionCached(func.body, contextualMapper); if (isAsync) { type = checkAwaitedType(type, func, ts.Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member); @@ -18966,7 +19215,7 @@ var ts; if (returnType === voidType || isTypeAny(returnType)) { return; } - if (ts.nodeIsMissing(func.body) || func.body.kind !== 194 || !(func.flags & 524288)) { + if (ts.nodeIsMissing(func.body) || func.body.kind !== 195 || !(func.flags & 524288)) { return; } var hasExplicitReturn = func.flags & 1048576; @@ -18986,18 +19235,14 @@ var ts; } } function checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper) { - ts.Debug.assert(node.kind !== 143 || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 144 || ts.isObjectLiteralMethod(node)); var hasGrammarError = checkGrammarFunctionLikeDeclaration(node); - if (!hasGrammarError && node.kind === 175) { + if (!hasGrammarError && node.kind === 176) { checkGrammarForGenerator(node); } if (contextualMapper === identityMapper && isContextSensitive(node)) { return anyFunctionType; } - var isAsync = ts.isAsyncFunctionLike(node); - if (isAsync) { - emitAwaiter = true; - } var links = getNodeLinks(node); var type = getTypeOfSymbol(node.symbol); var contextSensitive = isContextSensitive(node); @@ -19025,18 +19270,15 @@ var ts; } } } - if (produceDiagnostics && node.kind !== 143 && node.kind !== 142) { + if (produceDiagnostics && node.kind !== 144 && node.kind !== 143) { checkCollisionWithCapturedSuperVariable(node, node.name); checkCollisionWithCapturedThisVariable(node, node.name); } return type; } function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) { - ts.Debug.assert(node.kind !== 143 || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 144 || ts.isObjectLiteralMethod(node)); var isAsync = ts.isAsyncFunctionLike(node); - if (isAsync) { - emitAwaiter = true; - } var returnOrPromisedType = node.type && (isAsync ? checkAsyncFunctionReturnType(node) : getTypeFromTypeNode(node.type)); if (!node.asteriskToken) { checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnOrPromisedType); @@ -19045,7 +19287,7 @@ var ts; if (!node.type) { getReturnTypeOfSignature(getSignatureFromDeclaration(node)); } - if (node.body.kind === 194) { + if (node.body.kind === 195) { checkSourceElement(node.body); } else { @@ -19080,13 +19322,13 @@ var ts; var symbol = findSymbol(n); return !symbol || symbol === unknownSymbol || symbol === argumentsSymbol || (symbol.flags & 3) !== 0; } - case 168: { + case 169: { var symbol = findSymbol(n); return !symbol || symbol === unknownSymbol || (symbol.flags & ~8) !== 0; } - case 169: + case 170: return true; - case 174: + case 175: return isReferenceOrErrorExpression(n.expression); default: return false; @@ -19095,11 +19337,11 @@ var ts; function isConstVariableReference(n) { switch (n.kind) { case 69: - case 168: { + case 169: { var symbol = findSymbol(n); return symbol && (symbol.flags & 3) !== 0 && (getDeclarationFlagsFromSymbol(symbol) & 16384) !== 0; } - case 169: { + case 170: { var index = n.argumentExpression; var symbol = findSymbol(n.expression); if (symbol && index && index.kind === 9) { @@ -19109,7 +19351,7 @@ var ts; } return false; } - case 174: + case 175: return isConstVariableReference(n.expression); default: return false; @@ -19239,9 +19481,9 @@ var ts; var properties = node.properties; for (var _i = 0, properties_3 = properties; _i < properties_3.length; _i++) { var p = properties_3[_i]; - if (p.kind === 247 || p.kind === 248) { + if (p.kind === 248 || p.kind === 249) { var name_13 = p.name; - if (name_13.kind === 136) { + if (name_13.kind === 137) { checkComputedPropertyName(name_13); } if (isComputedNonLiteralName(name_13)) { @@ -19254,7 +19496,7 @@ var ts; isNumericLiteralName(text) && getIndexTypeOfType(sourceType, 1) || getIndexTypeOfType(sourceType, 0); if (type) { - if (p.kind === 248) { + if (p.kind === 249) { checkDestructuringAssignment(p, type); } else { @@ -19276,8 +19518,8 @@ var ts; var elements = node.elements; for (var i = 0; i < elements.length; i++) { var e = elements[i]; - if (e.kind !== 189) { - if (e.kind !== 187) { + if (e.kind !== 190) { + if (e.kind !== 188) { var propName = "" + i; var type = isTypeAny(sourceType) ? sourceType @@ -19302,7 +19544,7 @@ var ts; } else { var restExpression = e.expression; - if (restExpression.kind === 183 && restExpression.operatorToken.kind === 56) { + if (restExpression.kind === 184 && restExpression.operatorToken.kind === 56) { error(restExpression.operatorToken, ts.Diagnostics.A_rest_element_cannot_have_an_initializer); } else { @@ -19316,7 +19558,7 @@ var ts; } function checkDestructuringAssignment(exprOrAssignment, sourceType, contextualMapper) { var target; - if (exprOrAssignment.kind === 248) { + if (exprOrAssignment.kind === 249) { var prop = exprOrAssignment; if (prop.objectAssignmentInitializer) { checkBinaryLikeExpression(prop.name, prop.equalsToken, prop.objectAssignmentInitializer, contextualMapper); @@ -19326,14 +19568,14 @@ var ts; else { target = exprOrAssignment; } - if (target.kind === 183 && target.operatorToken.kind === 56) { + if (target.kind === 184 && target.operatorToken.kind === 56) { checkBinaryExpression(target, contextualMapper); target = target.left; } - if (target.kind === 167) { + if (target.kind === 168) { return checkObjectLiteralAssignment(target, sourceType, contextualMapper); } - if (target.kind === 166) { + if (target.kind === 167) { return checkArrayLiteralAssignment(target, sourceType, contextualMapper); } return checkReferenceAssignment(target, sourceType, contextualMapper); @@ -19350,7 +19592,7 @@ var ts; } function checkBinaryLikeExpression(left, operatorToken, right, contextualMapper, errorNode) { var operator = operatorToken.kind; - if (operator === 56 && (left.kind === 167 || left.kind === 166)) { + if (operator === 56 && (left.kind === 168 || left.kind === 167)) { return checkDestructuringAssignment(left, checkExpression(right, contextualMapper), contextualMapper); } var leftType = checkExpression(left, contextualMapper); @@ -19574,14 +19816,14 @@ var ts; return links.resolvedType; } function checkPropertyAssignment(node, contextualMapper) { - if (node.name.kind === 136) { + if (node.name.kind === 137) { checkComputedPropertyName(node.name); } return checkExpression(node.initializer, contextualMapper); } function checkObjectLiteralMethod(node, contextualMapper) { checkGrammarMethod(node); - if (node.name.kind === 136) { + if (node.name.kind === 137) { checkComputedPropertyName(node.name); } var uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper); @@ -19604,7 +19846,7 @@ var ts; } function checkExpression(node, contextualMapper) { var type; - if (node.kind === 135) { + if (node.kind === 136) { type = checkQualifiedName(node); } else { @@ -19612,9 +19854,9 @@ var ts; type = instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, contextualMapper); } if (isConstEnumObjectType(type)) { - var ok = (node.parent.kind === 168 && node.parent.expression === node) || - (node.parent.kind === 169 && node.parent.expression === node) || - ((node.kind === 69 || node.kind === 135) && isInRightSideOfImportOrExportAssignment(node)); + var ok = (node.parent.kind === 169 && node.parent.expression === node) || + (node.parent.kind === 170 && node.parent.expression === node) || + ((node.kind === 69 || node.kind === 136) && isInRightSideOfImportOrExportAssignment(node)); if (!ok) { error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment); } @@ -19640,7 +19882,7 @@ var ts; return booleanType; case 8: return checkNumericLiteral(node); - case 185: + case 186: return checkTemplateExpression(node); case 9: return checkStringLiteralExpression(node); @@ -19648,58 +19890,58 @@ var ts; return stringType; case 10: return globalRegExpType; - case 166: - return checkArrayLiteral(node, contextualMapper); case 167: - return checkObjectLiteral(node, contextualMapper); + return checkArrayLiteral(node, contextualMapper); case 168: - return checkPropertyAccessExpression(node); + return checkObjectLiteral(node, contextualMapper); case 169: - return checkIndexedAccess(node); + return checkPropertyAccessExpression(node); case 170: + return checkIndexedAccess(node); case 171: - return checkCallExpression(node); case 172: - return checkTaggedTemplateExpression(node); - case 174: - return checkExpression(node.expression, contextualMapper); - case 188: - return checkClassExpression(node); - case 175: - case 176: - return checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper); - case 178: - return checkTypeOfExpression(node); + return checkCallExpression(node); case 173: - case 191: - return checkAssertion(node); - case 177: - return checkDeleteExpression(node); - case 179: - return checkVoidExpression(node); - case 180: - return checkAwaitExpression(node); - case 181: - return checkPrefixUnaryExpression(node); - case 182: - return checkPostfixUnaryExpression(node); - case 183: - return checkBinaryExpression(node, contextualMapper); - case 184: - return checkConditionalExpression(node, contextualMapper); - case 187: - return checkSpreadElementExpression(node, contextualMapper); + return checkTaggedTemplateExpression(node); + case 175: + return checkExpression(node.expression, contextualMapper); case 189: + return checkClassExpression(node); + case 176: + case 177: + return checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper); + case 179: + return checkTypeOfExpression(node); + case 174: + case 192: + return checkAssertion(node); + case 178: + return checkDeleteExpression(node); + case 180: + return checkVoidExpression(node); + case 181: + return checkAwaitExpression(node); + case 182: + return checkPrefixUnaryExpression(node); + case 183: + return checkPostfixUnaryExpression(node); + case 184: + return checkBinaryExpression(node, contextualMapper); + case 185: + return checkConditionalExpression(node, contextualMapper); + case 188: + return checkSpreadElementExpression(node, contextualMapper); + case 190: return undefinedType; - case 186: + case 187: return checkYieldExpression(node); - case 242: + case 243: return checkJsxExpression(node); - case 235: - return checkJsxElement(node); case 236: - return checkJsxSelfClosingElement(node); + return checkJsxElement(node); case 237: + return checkJsxSelfClosingElement(node); + case 238: ts.Debug.fail("Shouldn't ever directly check a JsxOpeningElement"); } return unknownType; @@ -19720,7 +19962,7 @@ var ts; var func = ts.getContainingFunction(node); if (node.flags & 56) { func = ts.getContainingFunction(node); - if (!(func.kind === 144 && ts.nodeIsPresent(func.body))) { + if (!(func.kind === 145 && ts.nodeIsPresent(func.body))) { error(node, ts.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } } @@ -19735,9 +19977,9 @@ var ts; if (!node.asteriskToken || !node.body) { return false; } - return node.kind === 143 || - node.kind === 215 || - node.kind === 175; + return node.kind === 144 || + node.kind === 216 || + node.kind === 176; } function getTypePredicateParameterIndex(parameterList, parameter) { if (parameterList) { @@ -19751,104 +19993,97 @@ var ts; } return -1; } - function isInLegalParameterTypePredicatePosition(node) { - switch (node.parent.kind) { - case 176: - case 147: - case 215: - case 175: - case 152: - case 143: - case 142: - return node === node.parent.type; + function checkTypePredicate(node) { + var parent = getTypePredicateParent(node); + if (!parent) { + return; + } + var returnType = getReturnTypeOfSignature(getSignatureFromDeclaration(parent)); + if (!returnType || !(returnType.flags & 134217728)) { + return; + } + var parameterName = node.parameterName; + if (parameterName.kind === 162) { + getTypeFromThisTypeNode(parameterName); + } + else { + var typePredicate = returnType.predicate; + if (typePredicate.parameterIndex >= 0) { + if (parent.parameters[typePredicate.parameterIndex].dotDotDotToken) { + error(parameterName, ts.Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); + } + else { + checkTypeAssignableTo(typePredicate.type, getTypeOfNode(parent.parameters[typePredicate.parameterIndex]), node.type); + } + } + else if (parameterName) { + var hasReportedError = false; + for (var _i = 0, _a = parent.parameters; _i < _a.length; _i++) { + var name_14 = _a[_i].name; + if ((name_14.kind === 164 || + name_14.kind === 165) && + checkIfTypePredicateVariableIsDeclaredInBindingPattern(name_14, parameterName, typePredicate.parameterName)) { + hasReportedError = true; + break; + } + } + if (!hasReportedError) { + error(node.parameterName, ts.Diagnostics.Cannot_find_parameter_0, typePredicate.parameterName); + } + } } - return false; } - function isInLegalThisTypePredicatePosition(node) { - if (isInLegalParameterTypePredicatePosition(node)) { - return true; - } + function getTypePredicateParent(node) { switch (node.parent.kind) { - case 141: - case 140: - case 145: - return node === node.parent.type; + case 177: + case 148: + case 216: + case 176: + case 153: + case 144: + case 143: + var parent_6 = node.parent; + if (node === parent_6.type) { + return parent_6; + } + } + } + function checkIfTypePredicateVariableIsDeclaredInBindingPattern(pattern, predicateVariableNode, predicateVariableName) { + for (var _i = 0, _a = pattern.elements; _i < _a.length; _i++) { + var name_15 = _a[_i].name; + if (name_15.kind === 69 && + name_15.text === predicateVariableName) { + error(predicateVariableNode, ts.Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, predicateVariableName); + return true; + } + else if (name_15.kind === 165 || + name_15.kind === 164) { + if (checkIfTypePredicateVariableIsDeclaredInBindingPattern(name_15, predicateVariableNode, predicateVariableName)) { + return true; + } + } } - return false; } function checkSignatureDeclaration(node) { - if (node.kind === 149) { + if (node.kind === 150) { checkGrammarIndexSignature(node); } - else if (node.kind === 152 || node.kind === 215 || node.kind === 153 || - node.kind === 147 || node.kind === 144 || - node.kind === 148) { + else if (node.kind === 153 || node.kind === 216 || node.kind === 154 || + node.kind === 148 || node.kind === 145 || + node.kind === 149) { checkGrammarFunctionLikeDeclaration(node); } checkTypeParameters(node.typeParameters); ts.forEach(node.parameters, checkParameter); - if (node.type) { - if (node.type.kind === 150) { - var returnType = getReturnTypeOfSignature(getSignatureFromDeclaration(node)); - if (!returnType || !(returnType.flags & 134217728)) { - return; - } - var typePredicate = returnType.predicate; - var typePredicateNode = node.type; - checkSourceElement(typePredicateNode); - if (ts.isIdentifierTypePredicate(typePredicate)) { - if (typePredicate.parameterIndex >= 0) { - if (node.parameters[typePredicate.parameterIndex].dotDotDotToken) { - error(typePredicateNode.parameterName, ts.Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); - } - else { - checkTypeAssignableTo(typePredicate.type, getTypeOfNode(node.parameters[typePredicate.parameterIndex]), typePredicateNode.type); - } - } - else if (typePredicateNode.parameterName) { - var hasReportedError = false; - for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) { - var param = _a[_i]; - if (hasReportedError) { - break; - } - if (param.name.kind === 163 || - param.name.kind === 164) { - (function checkBindingPattern(pattern) { - for (var _i = 0, _a = pattern.elements; _i < _a.length; _i++) { - var element = _a[_i]; - if (element.name.kind === 69 && - element.name.text === typePredicate.parameterName) { - error(typePredicateNode.parameterName, ts.Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, typePredicate.parameterName); - hasReportedError = true; - break; - } - else if (element.name.kind === 164 || - element.name.kind === 163) { - checkBindingPattern(element.name); - } - } - })(param.name); - } - } - if (!hasReportedError) { - error(typePredicateNode.parameterName, ts.Diagnostics.Cannot_find_parameter_0, typePredicate.parameterName); - } - } - } - } - else { - checkSourceElement(node.type); - } - } + checkSourceElement(node.type); if (produceDiagnostics) { checkCollisionWithArgumentsInGeneratedCode(node); if (compilerOptions.noImplicitAny && !node.type) { switch (node.kind) { - case 148: + case 149: error(node, ts.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; - case 147: + case 148: error(node, ts.Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; } @@ -19870,7 +20105,7 @@ var ts; checkSpecializedSignatureDeclaration(node); } function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 217) { + if (node.kind === 218) { var nodeSymbol = getSymbolOfNode(node); if (nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) { return; @@ -19933,7 +20168,7 @@ var ts; return; } function isSuperCallExpression(n) { - return n.kind === 170 && n.expression.kind === 95; + return n.kind === 171 && n.expression.kind === 95; } function containsSuperCallAsComputedPropertyName(n) { return n.name && containsSuperCall(n.name); @@ -19954,12 +20189,12 @@ var ts; if (n.kind === 97) { error(n, ts.Diagnostics.this_cannot_be_referenced_in_current_location); } - else if (n.kind !== 175 && n.kind !== 215) { + else if (n.kind !== 176 && n.kind !== 216) { ts.forEachChild(n, markThisReferencesAsErrors); } } function isInstancePropertyWithInitializer(n) { - return n.kind === 141 && + return n.kind === 142 && !(n.flags & 64) && !!n.initializer; } @@ -19979,7 +20214,7 @@ var ts; var superCallStatement; for (var _i = 0, statements_2 = statements; _i < statements_2.length; _i++) { var statement = statements_2[_i]; - if (statement.kind === 197 && isSuperCallExpression(statement.expression)) { + if (statement.kind === 198 && isSuperCallExpression(statement.expression)) { superCallStatement = statement; break; } @@ -20005,7 +20240,7 @@ var ts; checkGrammarFunctionLikeDeclaration(node) || checkGrammarAccessor(node) || checkGrammarComputedPropertyName(node.name); checkDecorators(node); checkSignatureDeclaration(node); - if (node.kind === 145) { + if (node.kind === 146) { if (!ts.isInAmbientContext(node) && ts.nodeIsPresent(node.body) && (node.flags & 524288)) { if (node.flags & 1048576) { if (compilerOptions.noImplicitReturns) { @@ -20017,11 +20252,11 @@ var ts; } } } - if (node.name.kind === 136) { + if (node.name.kind === 137) { checkComputedPropertyName(node.name); } if (!ts.hasDynamicName(node)) { - var otherKind = node.kind === 145 ? 146 : 145; + var otherKind = node.kind === 146 ? 147 : 146; var otherAccessor = ts.getDeclarationOfKind(node.symbol, otherKind); if (otherAccessor) { if (((node.flags & 56) !== (otherAccessor.flags & 56))) { @@ -20038,7 +20273,7 @@ var ts; } getTypeOfAccessors(getSymbolOfNode(node)); } - if (node.parent.kind !== 167) { + if (node.parent.kind !== 168) { checkSourceElement(node.body); } else { @@ -20120,9 +20355,9 @@ var ts; return; } var signaturesToCheck; - if (!signatureDeclarationNode.name && signatureDeclarationNode.parent && signatureDeclarationNode.parent.kind === 217) { - ts.Debug.assert(signatureDeclarationNode.kind === 147 || signatureDeclarationNode.kind === 148); - var signatureKind = signatureDeclarationNode.kind === 147 ? 0 : 1; + if (!signatureDeclarationNode.name && signatureDeclarationNode.parent && signatureDeclarationNode.parent.kind === 218) { + ts.Debug.assert(signatureDeclarationNode.kind === 148 || signatureDeclarationNode.kind === 149); + var signatureKind = signatureDeclarationNode.kind === 148 ? 0 : 1; var containingSymbol = getSymbolOfNode(signatureDeclarationNode.parent); var containingType = getDeclaredTypeOfSymbol(containingSymbol); signaturesToCheck = getSignaturesOfType(containingType, signatureKind); @@ -20140,9 +20375,9 @@ var ts; } function getEffectiveDeclarationFlags(n, flagsToCheck) { var flags = ts.getCombinedNodeFlags(n); - if (n.parent.kind !== 217 && - n.parent.kind !== 216 && - n.parent.kind !== 188 && + if (n.parent.kind !== 218 && + n.parent.kind !== 217 && + n.parent.kind !== 189 && ts.isInAmbientContext(n)) { if (!(flags & 4)) { flags |= 2; @@ -20219,7 +20454,7 @@ var ts; if (subsequentNode.kind === node.kind) { var errorNode_1 = subsequentNode.name || subsequentNode; if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) { - var reportError = (node.kind === 143 || node.kind === 142) && + var reportError = (node.kind === 144 || node.kind === 143) && (node.flags & 64) !== (subsequentNode.flags & 64); if (reportError) { var diagnostic = node.flags & 64 ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static; @@ -20253,11 +20488,11 @@ var ts; var current = declarations_4[_i]; var node = current; var inAmbientContext = ts.isInAmbientContext(node); - var inAmbientContextOrInterface = node.parent.kind === 217 || node.parent.kind === 155 || inAmbientContext; + var inAmbientContextOrInterface = node.parent.kind === 218 || node.parent.kind === 156 || inAmbientContext; if (inAmbientContextOrInterface) { previousDeclaration = undefined; } - if (node.kind === 215 || node.kind === 143 || node.kind === 142 || node.kind === 144) { + if (node.kind === 216 || node.kind === 144 || node.kind === 143 || node.kind === 145) { var currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; allNodeFlags &= currentNodeFlags; @@ -20370,16 +20605,16 @@ var ts; } function getDeclarationSpaces(d) { switch (d.kind) { - case 217: + case 218: return 2097152; - case 220: - return d.name.kind === 9 || ts.getModuleInstanceState(d) !== 0 + case 221: + return ts.isAmbientModule(d) || ts.getModuleInstanceState(d) !== 0 ? 4194304 | 1048576 : 4194304; - case 216: - case 219: + case 217: + case 220: return 2097152 | 1048576; - case 223: + case 224: var result = 0; var target = resolveAlias(getSymbolOfNode(d)); ts.forEach(target.declarations, function (d) { result |= getDeclarationSpaces(d); }); @@ -20510,22 +20745,22 @@ var ts; var headMessage = getDiagnosticHeadMessageForDecoratorResolution(node); var errorInfo; switch (node.parent.kind) { - case 216: + case 217: var classSymbol = getSymbolOfNode(node.parent); var classConstructorType = getTypeOfSymbol(classSymbol); expectedReturnType = getUnionType([classConstructorType, voidType]); break; - case 138: + case 139: expectedReturnType = voidType; errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any); break; - case 141: + case 142: expectedReturnType = voidType; errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_property_decorator_function_must_be_either_void_or_any); break; - case 143: - case 145: + case 144: case 146: + case 147: var methodType = getTypeOfNode(node.parent); var descriptorType = createTypedPropertyDescriptorType(methodType); expectedReturnType = getUnionType([descriptorType, voidType]); @@ -20534,9 +20769,9 @@ var ts; checkTypeAssignableTo(returnType, expectedReturnType, node, headMessage, errorInfo); } function checkTypeNodeAsExpression(node) { - if (node && node.kind === 151) { + if (node && node.kind === 152) { var root = getFirstIdentifier(node.typeName); - var meaning = root.parent.kind === 151 ? 793056 : 1536; + var meaning = root.parent.kind === 152 ? 793056 : 1536; var rootSymbol = resolveName(root, root.text, meaning | 8388608, undefined, undefined); if (rootSymbol && rootSymbol.flags & 8388608) { var aliasTarget = resolveAlias(rootSymbol); @@ -20570,28 +20805,24 @@ var ts; } if (compilerOptions.emitDecoratorMetadata) { switch (node.kind) { - case 216: + case 217: var constructor = ts.getFirstConstructorWithBody(node); if (constructor) { checkParameterTypeAnnotationsAsExpressions(constructor); } break; - case 143: - case 145: + case 144: case 146: + case 147: checkParameterTypeAnnotationsAsExpressions(node); checkReturnTypeAnnotationAsExpression(node); break; - case 141: - case 138: + case 142: + case 139: checkTypeAnnotationAsExpression(node); break; } } - emitDecorate = true; - if (node.kind === 138) { - emitParam = true; - } ts.forEach(node.decorators, checkDecorator); } function checkFunctionDeclaration(node) { @@ -20606,16 +20837,13 @@ var ts; checkDecorators(node); checkSignatureDeclaration(node); var isAsync = ts.isAsyncFunctionLike(node); - if (isAsync) { - emitAwaiter = true; - } - if (node.name && node.name.kind === 136) { + if (node.name && node.name.kind === 137) { checkComputedPropertyName(node.name); } if (!ts.hasDynamicName(node)) { var symbol = getSymbolOfNode(node); var localSymbol = node.localSymbol || symbol; - var firstDeclaration = ts.forEach(localSymbol.declarations, function (declaration) { return declaration.kind === node.kind && !ts.isSourceFileJavaScript(getSourceFile(declaration)) ? + var firstDeclaration = ts.forEach(localSymbol.declarations, function (declaration) { return declaration.kind === node.kind && !ts.isSourceFileJavaScript(ts.getSourceFileOfNode(declaration)) ? declaration : undefined; }); if (node === firstDeclaration) { checkFunctionOrConstructorSymbol(localSymbol); @@ -20641,7 +20869,7 @@ var ts; } } function checkBlock(node) { - if (node.kind === 194) { + if (node.kind === 195) { checkGrammarStatementInAmbientContext(node); } ts.forEach(node.statements, checkSourceElement); @@ -20660,19 +20888,19 @@ var ts; if (!(identifier && identifier.text === name)) { return false; } - if (node.kind === 141 || - node.kind === 140 || + if (node.kind === 142 || + node.kind === 141 || + node.kind === 144 || node.kind === 143 || - node.kind === 142 || - node.kind === 145 || - node.kind === 146) { + node.kind === 146 || + node.kind === 147) { return false; } if (ts.isInAmbientContext(node)) { return false; } var root = ts.getRootDeclaration(node); - if (root.kind === 138 && ts.nodeIsMissing(root.parent.body)) { + if (root.kind === 139 && ts.nodeIsMissing(root.parent.body)) { return false; } return true; @@ -20720,11 +20948,11 @@ var ts; if (!needCollisionCheckForIdentifier(node, name, "require") && !needCollisionCheckForIdentifier(node, name, "exports")) { return; } - if (node.kind === 220 && ts.getModuleInstanceState(node) !== 1) { + if (node.kind === 221 && ts.getModuleInstanceState(node) !== 1) { return; } var parent = getDeclarationContainer(node); - if (parent.kind === 250 && ts.isExternalOrCommonJsModule(parent)) { + if (parent.kind === 251 && ts.isExternalOrCommonJsModule(parent)) { error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, ts.declarationNameToString(name), ts.declarationNameToString(name)); } } @@ -20732,7 +20960,7 @@ var ts; if ((ts.getCombinedNodeFlags(node) & 24576) !== 0 || ts.isParameterDeclaration(node)) { return; } - if (node.kind === 213 && !node.initializer) { + if (node.kind === 214 && !node.initializer) { return; } var symbol = getSymbolOfNode(node); @@ -20742,25 +20970,25 @@ var ts; localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2) { if (getDeclarationFlagsFromSymbol(localDeclarationSymbol) & 24576) { - var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 214); - var container = varDeclList.parent.kind === 195 && varDeclList.parent.parent + var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 215); + var container = varDeclList.parent.kind === 196 && varDeclList.parent.parent ? varDeclList.parent.parent : undefined; var namesShareScope = container && - (container.kind === 194 && ts.isFunctionLike(container.parent) || + (container.kind === 195 && ts.isFunctionLike(container.parent) || + container.kind === 222 || container.kind === 221 || - container.kind === 220 || - container.kind === 250); + container.kind === 251); if (!namesShareScope) { - var name_14 = symbolToString(localDeclarationSymbol); - error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name_14, name_14); + var name_16 = symbolToString(localDeclarationSymbol); + error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name_16, name_16); } } } } } function checkParameterInitializer(node) { - if (ts.getRootDeclaration(node).kind !== 138) { + if (ts.getRootDeclaration(node).kind !== 139) { return; } var func = ts.getContainingFunction(node); @@ -20769,7 +20997,7 @@ var ts; if (n.kind === 69) { var referencedSymbol = getNodeLinks(n).resolvedSymbol; if (referencedSymbol && referencedSymbol !== unknownSymbol && getSymbol(func.locals, referencedSymbol.name, 107455) === referencedSymbol) { - if (referencedSymbol.valueDeclaration.kind === 138) { + if (referencedSymbol.valueDeclaration.kind === 139) { if (referencedSymbol.valueDeclaration === node) { error(n, ts.Diagnostics.Parameter_0_cannot_be_referenced_in_its_initializer, ts.declarationNameToString(node.name)); return; @@ -20789,26 +21017,26 @@ var ts; function checkVariableLikeDeclaration(node) { checkDecorators(node); checkSourceElement(node.type); - if (node.name.kind === 136) { + if (node.name.kind === 137) { checkComputedPropertyName(node.name); if (node.initializer) { checkExpressionCached(node.initializer); } } - if (node.kind === 165) { - if (node.propertyName && node.propertyName.kind === 136) { + if (node.kind === 166) { + if (node.propertyName && node.propertyName.kind === 137) { checkComputedPropertyName(node.propertyName); } } if (ts.isBindingPattern(node.name)) { ts.forEach(node.name.elements, checkSourceElement); } - if (node.initializer && ts.getRootDeclaration(node).kind === 138 && ts.nodeIsMissing(ts.getContainingFunction(node).body)) { + if (node.initializer && ts.getRootDeclaration(node).kind === 139 && ts.nodeIsMissing(ts.getContainingFunction(node).body)) { error(node, ts.Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation); return; } if (ts.isBindingPattern(node.name)) { - if (node.initializer) { + if (node.initializer && node.parent.parent.kind !== 203) { checkTypeAssignableTo(checkExpressionCached(node.initializer), getWidenedTypeForVariableLikeDeclaration(node), node, undefined); checkParameterInitializer(node); } @@ -20817,7 +21045,7 @@ var ts; var symbol = getSymbolOfNode(node); var type = getTypeOfVariableOrParameterOrProperty(symbol); if (node === symbol.valueDeclaration) { - if (node.initializer) { + if (node.initializer && node.parent.parent.kind !== 203) { checkTypeAssignableTo(checkExpressionCached(node.initializer), type, node, undefined); checkParameterInitializer(node); } @@ -20831,9 +21059,9 @@ var ts; checkTypeAssignableTo(checkExpressionCached(node.initializer), declarationType, node, undefined); } } - if (node.kind !== 141 && node.kind !== 140) { + if (node.kind !== 142 && node.kind !== 141) { checkExportsOnMergedDeclarations(node); - if (node.kind === 213 || node.kind === 165) { + if (node.kind === 214 || node.kind === 166) { checkVarDeclaredNamesNotShadowed(node); } checkCollisionWithCapturedSuperVariable(node, node.name); @@ -20854,7 +21082,7 @@ var ts; ts.forEach(node.declarationList.declarations, checkSourceElement); } function checkGrammarDisallowedModifiersOnObjectLiteralExpressionMethod(node) { - if (node.modifiers && node.parent.kind === 167) { + if (node.modifiers && node.parent.kind === 168) { if (ts.isAsyncFunctionLike(node)) { if (node.modifiers.length > 1) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); @@ -20873,7 +21101,7 @@ var ts; checkGrammarStatementInAmbientContext(node); checkExpression(node.expression); checkSourceElement(node.thenStatement); - if (node.thenStatement.kind === 196) { + if (node.thenStatement.kind === 197) { error(node.thenStatement, ts.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); @@ -20890,12 +21118,12 @@ var ts; } function checkForStatement(node) { if (!checkGrammarStatementInAmbientContext(node)) { - if (node.initializer && node.initializer.kind === 214) { + if (node.initializer && node.initializer.kind === 215) { checkGrammarVariableDeclarationList(node.initializer); } } if (node.initializer) { - if (node.initializer.kind === 214) { + if (node.initializer.kind === 215) { ts.forEach(node.initializer.declarations, checkVariableDeclaration); } else { @@ -20910,13 +21138,13 @@ var ts; } function checkForOfStatement(node) { checkGrammarForInOrForOfStatement(node); - if (node.initializer.kind === 214) { + if (node.initializer.kind === 215) { checkForInOrForOfVariableDeclaration(node); } else { var varExpr = node.initializer; var iteratedType = checkRightHandSideOfForOf(node.expression); - if (varExpr.kind === 166 || varExpr.kind === 167) { + if (varExpr.kind === 167 || varExpr.kind === 168) { checkDestructuringAssignment(varExpr, iteratedType || unknownType); } else { @@ -20931,7 +21159,7 @@ var ts; } function checkForInStatement(node) { checkGrammarForInOrForOfStatement(node); - if (node.initializer.kind === 214) { + if (node.initializer.kind === 215) { var variable = node.initializer.declarations[0]; if (variable && ts.isBindingPattern(variable.name)) { error(variable.name, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); @@ -20941,7 +21169,7 @@ var ts; else { var varExpr = node.initializer; var leftType = checkExpression(varExpr); - if (varExpr.kind === 166 || varExpr.kind === 167) { + if (varExpr.kind === 167 || varExpr.kind === 168) { error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } else if (!isTypeAnyOrAllConstituentTypesHaveKind(leftType, 258)) { @@ -21109,7 +21337,7 @@ var ts; checkGrammarStatementInAmbientContext(node) || checkGrammarBreakOrContinueStatement(node); } function isGetAccessorWithAnnotatatedSetAccessor(node) { - return !!(node.kind === 145 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 146))); + return !!(node.kind === 146 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 147))); } function checkReturnStatement(node) { if (!checkGrammarStatementInAmbientContext(node)) { @@ -21127,10 +21355,10 @@ var ts; if (func.asteriskToken) { return; } - if (func.kind === 146) { + if (func.kind === 147) { error(node.expression, ts.Diagnostics.Setters_cannot_return_a_value); } - else if (func.kind === 144) { + else if (func.kind === 145) { if (!checkTypeAssignableTo(exprType, returnType, node.expression)) { error(node.expression, ts.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); } @@ -21166,7 +21394,7 @@ var ts; var expressionType = checkExpression(node.expression); var expressionTypeIsStringLike = someConstituentTypeHasKind(expressionType, 258); ts.forEach(node.caseBlock.clauses, function (clause) { - if (clause.kind === 244 && !hasDuplicateDefaultClause) { + if (clause.kind === 245 && !hasDuplicateDefaultClause) { if (firstDefaultClause === undefined) { firstDefaultClause = clause; } @@ -21178,7 +21406,7 @@ var ts; hasDuplicateDefaultClause = true; } } - if (produceDiagnostics && clause.kind === 243) { + if (produceDiagnostics && clause.kind === 244) { var caseClause = clause; var caseType = checkExpression(caseClause.expression); var expressionTypeIsAssignableToCaseType = (expressionTypeIsStringLike && someConstituentTypeHasKind(caseType, 258)) || @@ -21197,7 +21425,7 @@ var ts; if (ts.isFunctionLike(current)) { break; } - if (current.kind === 209 && current.label.text === node.label.text) { + if (current.kind === 210 && current.label.text === node.label.text) { var sourceFile = ts.getSourceFileOfNode(node); grammarErrorOnNode(node.label, ts.Diagnostics.Duplicate_label_0, ts.getTextOfNodeFromSourceText(sourceFile.text, node.label)); break; @@ -21291,7 +21519,7 @@ var ts; return; } var errorNode; - if (prop.valueDeclaration.name.kind === 136 || prop.parent === containingType.symbol) { + if (prop.valueDeclaration.name.kind === 137 || prop.parent === containingType.symbol) { errorNode = prop.valueDeclaration; } else if (indexDeclaration) { @@ -21366,7 +21594,6 @@ var ts; var staticType = getTypeOfSymbol(symbol); var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node); if (baseTypeNode) { - emitExtends = emitExtends || !ts.isInAmbientContext(node); var baseTypes = getBaseTypes(type); if (baseTypes.length && produceDiagnostics) { var baseType = baseTypes[0]; @@ -21440,7 +21667,7 @@ var ts; if (derived === base) { var derivedClassDecl = getClassLikeDeclarationOfSymbol(type.symbol); if (baseDeclarationFlags & 128 && (!derivedClassDecl || !(derivedClassDecl.flags & 128))) { - if (derivedClassDecl.kind === 188) { + if (derivedClassDecl.kind === 189) { error(derivedClassDecl, ts.Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, symbolToString(baseProperty), typeToString(baseType)); } else { @@ -21484,7 +21711,7 @@ var ts; } } function isAccessor(kind) { - return kind === 145 || kind === 146; + return kind === 146 || kind === 147; } function areTypeParametersIdentical(list1, list2) { if (!list1 && !list2) { @@ -21550,7 +21777,7 @@ var ts; checkTypeNameIsReserved(node.name, ts.Diagnostics.Interface_name_cannot_be_0); checkExportsOnMergedDeclarations(node); var symbol = getSymbolOfNode(node); - var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 217); + var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 218); if (symbol.declarations.length > 1) { if (node !== firstInterfaceDecl && !areTypeParametersIdentical(firstInterfaceDecl.typeParameters, node.typeParameters)) { error(node.name, ts.Diagnostics.All_declarations_of_an_interface_must_have_identical_type_parameters); @@ -21648,7 +21875,7 @@ var ts; return value; function evalConstant(e) { switch (e.kind) { - case 181: + case 182: var value_1 = evalConstant(e.operand); if (value_1 === undefined) { return undefined; @@ -21659,7 +21886,7 @@ var ts; case 50: return ~value_1; } return undefined; - case 183: + case 184: var left = evalConstant(e.left); if (left === undefined) { return undefined; @@ -21684,11 +21911,11 @@ var ts; return undefined; case 8: return +e.text; - case 174: + case 175: return evalConstant(e.expression); case 69: + case 170: case 169: - case 168: var member = initializer.parent; var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent)); var enumType_1; @@ -21699,7 +21926,7 @@ var ts; } else { var expression; - if (e.kind === 169) { + if (e.kind === 170) { if (e.argumentExpression === undefined || e.argumentExpression.kind !== 9) { return undefined; @@ -21716,7 +21943,7 @@ var ts; if (current.kind === 69) { break; } - else if (current.kind === 168) { + else if (current.kind === 169) { current = current.expression; } else { @@ -21775,7 +22002,7 @@ var ts; } var seenEnumMissingInitialInitializer = false; ts.forEach(enumSymbol.declarations, function (declaration) { - if (declaration.kind !== 219) { + if (declaration.kind !== 220) { return false; } var enumDeclaration = declaration; @@ -21798,8 +22025,8 @@ var ts; var declarations = symbol.declarations; for (var _i = 0, declarations_5 = declarations; _i < declarations_5.length; _i++) { var declaration = declarations_5[_i]; - if ((declaration.kind === 216 || - (declaration.kind === 215 && ts.nodeIsPresent(declaration.body))) && + if ((declaration.kind === 217 || + (declaration.kind === 216 && ts.nodeIsPresent(declaration.body))) && !ts.isInAmbientContext(declaration)) { return declaration; } @@ -21821,7 +22048,12 @@ var ts; } function checkModuleDeclaration(node) { if (produceDiagnostics) { - var isAmbientExternalModule = node.name.kind === 9; + var isGlobalAugmentation = ts.isGlobalScopeAugmentation(node); + var inAmbientContext = ts.isInAmbientContext(node); + if (isGlobalAugmentation && !inAmbientContext) { + error(node.name, ts.Diagnostics.Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context); + } + var isAmbientExternalModule = ts.isAmbientModule(node); var contextErrorMessage = isAmbientExternalModule ? ts.Diagnostics.An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file : ts.Diagnostics.A_namespace_declaration_is_only_allowed_in_a_namespace_or_module; @@ -21829,7 +22061,7 @@ var ts; return; } if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node)) { - if (!ts.isInAmbientContext(node) && node.name.kind === 9) { + if (!inAmbientContext && node.name.kind === 9) { grammarErrorOnNode(node.name, ts.Diagnostics.Only_ambient_modules_can_use_quoted_names); } } @@ -21839,7 +22071,7 @@ var ts; var symbol = getSymbolOfNode(node); if (symbol.flags & 512 && symbol.declarations.length > 1 - && !ts.isInAmbientContext(node) + && !inAmbientContext && ts.isInstantiatedModule(node, compilerOptions.preserveConstEnums || compilerOptions.isolatedModules)) { var firstNonAmbientClassOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol); if (firstNonAmbientClassOrFunc) { @@ -21850,29 +22082,102 @@ var ts; error(node.name, ts.Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged); } } - var mergedClass = ts.getDeclarationOfKind(symbol, 216); + var mergedClass = ts.getDeclarationOfKind(symbol, 217); if (mergedClass && inSameLexicalScope(node, mergedClass)) { getNodeLinks(node).flags |= 32768; } } if (isAmbientExternalModule) { - if (!isGlobalSourceFile(node.parent)) { - error(node.name, ts.Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces); + if (ts.isExternalModuleAugmentation(node)) { + var checkBody = isGlobalAugmentation || (getSymbolOfNode(node).flags & 33554432); + if (checkBody) { + for (var _i = 0, _a = node.body.statements; _i < _a.length; _i++) { + var statement = _a[_i]; + checkModuleAugmentationElement(statement, isGlobalAugmentation); + } + } } - if (ts.isExternalModuleNameRelative(node.name.text)) { - error(node.name, ts.Diagnostics.Ambient_module_declaration_cannot_specify_relative_module_name); + else if (isGlobalSourceFile(node.parent)) { + if (isGlobalAugmentation) { + error(node.name, ts.Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations); + } + else if (ts.isExternalModuleNameRelative(node.name.text)) { + error(node.name, ts.Diagnostics.Ambient_module_declaration_cannot_specify_relative_module_name); + } + } + else { + if (isGlobalAugmentation) { + error(node.name, ts.Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations); + } + else { + error(node.name, ts.Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces); + } } } } checkSourceElement(node.body); } + function checkModuleAugmentationElement(node, isGlobalAugmentation) { + switch (node.kind) { + case 196: + for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) { + var decl = _a[_i]; + checkModuleAugmentationElement(decl, isGlobalAugmentation); + } + break; + case 230: + case 231: + grammarErrorOnFirstToken(node, ts.Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); + break; + case 224: + if (node.moduleReference.kind !== 9) { + error(node.name, ts.Diagnostics.Module_augmentation_cannot_introduce_new_names_in_the_top_level_scope); + break; + } + case 225: + grammarErrorOnFirstToken(node, ts.Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); + break; + case 166: + case 214: + var name_17 = node.name; + if (ts.isBindingPattern(name_17)) { + for (var _b = 0, _c = name_17.elements; _b < _c.length; _b++) { + var el = _c[_b]; + checkModuleAugmentationElement(el, isGlobalAugmentation); + } + break; + } + case 217: + case 220: + case 216: + case 218: + case 221: + case 219: + var symbol = getSymbolOfNode(node); + if (symbol) { + var reportError = !(symbol.flags & 33554432); + if (!reportError) { + if (isGlobalAugmentation) { + reportError = symbol.parent !== undefined; + } + else { + reportError = ts.isExternalModuleAugmentation(symbol.parent.valueDeclaration); + } + } + if (reportError) { + error(node, ts.Diagnostics.Module_augmentation_cannot_introduce_new_names_in_the_top_level_scope); + } + } + break; + } + } function getFirstIdentifier(node) { while (true) { - if (node.kind === 135) { + if (node.kind === 136) { node = node.left; } - else if (node.kind === 168) { + else if (node.kind === 169) { node = node.expression; } else { @@ -21888,16 +22193,18 @@ var ts; error(moduleName, ts.Diagnostics.String_literal_expected); return false; } - var inAmbientExternalModule = node.parent.kind === 221 && node.parent.parent.name.kind === 9; - if (node.parent.kind !== 250 && !inAmbientExternalModule) { - error(moduleName, node.kind === 230 ? + var inAmbientExternalModule = node.parent.kind === 222 && ts.isAmbientModule(node.parent.parent); + if (node.parent.kind !== 251 && !inAmbientExternalModule) { + error(moduleName, node.kind === 231 ? ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : ts.Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); return false; } if (inAmbientExternalModule && ts.isExternalModuleNameRelative(moduleName.text)) { - error(node, ts.Diagnostics.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name); - return false; + if (!isTopLevelInExternalModuleAugmentation(node)) { + error(node, ts.Diagnostics.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name); + return false; + } } return true; } @@ -21909,7 +22216,7 @@ var ts; (symbol.flags & 793056 ? 793056 : 0) | (symbol.flags & 1536 ? 1536 : 0); if (target.flags & excludedMeanings) { - var message = node.kind === 232 ? + var message = node.kind === 233 ? ts.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; error(node, message, symbolToString(symbol)); @@ -21935,7 +22242,7 @@ var ts; checkImportBinding(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 226) { + if (importClause.namedBindings.kind === 227) { checkImportBinding(importClause.namedBindings); } else { @@ -21986,8 +22293,8 @@ var ts; if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause) { ts.forEach(node.exportClause.elements, checkExportSpecifier); - var inAmbientExternalModule = node.parent.kind === 221 && node.parent.parent.name.kind === 9; - if (node.parent.kind !== 250 && !inAmbientExternalModule) { + var inAmbientExternalModule = node.parent.kind === 222 && ts.isAmbientModule(node.parent.parent); + if (node.parent.kind !== 251 && !inAmbientExternalModule) { error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); } } @@ -22000,22 +22307,29 @@ var ts; } } function checkGrammarModuleElementContext(node, errorMessage) { - if (node.parent.kind !== 250 && node.parent.kind !== 221 && node.parent.kind !== 220) { + if (node.parent.kind !== 251 && node.parent.kind !== 222 && node.parent.kind !== 221) { return grammarErrorOnFirstToken(node, errorMessage); } } function checkExportSpecifier(node) { checkAliasSymbol(node); if (!node.parent.parent.moduleSpecifier) { - markExportAsReferenced(node); + var exportedName = node.propertyName || node.name; + var symbol = resolveName(exportedName, exportedName.text, 107455 | 793056 | 1536 | 8388608, undefined, undefined); + if (symbol && isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0]))) { + error(exportedName, ts.Diagnostics.Cannot_re_export_name_that_is_not_defined_in_the_module); + } + else { + markExportAsReferenced(node); + } } } function checkExportAssignment(node) { if (checkGrammarModuleElementContext(node, ts.Diagnostics.An_export_assignment_can_only_be_used_in_a_module)) { return; } - var container = node.parent.kind === 250 ? node.parent : node.parent.parent; - if (container.kind === 220 && container.name.kind === 69) { + var container = node.parent.kind === 251 ? node.parent : node.parent.parent; + if (container.kind === 221 && !ts.isAmbientModule(container)) { error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); return; } @@ -22053,7 +22367,9 @@ var ts; var exportEqualsSymbol = moduleSymbol.exports["export="]; if (exportEqualsSymbol && hasExportedMembers(moduleSymbol)) { var declaration = getDeclarationOfAliasSymbol(exportEqualsSymbol) || exportEqualsSymbol.valueDeclaration; - error(declaration, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); + if (!isTopLevelInExternalModuleAugmentation(declaration)) { + error(declaration, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); + } } var exports = getExportsOfModule(moduleSymbol); for (var id in exports) { @@ -22074,21 +22390,7 @@ var ts; links.exportsChecked = true; } function isNotOverload(declaration) { - return declaration.kind !== 215 || !!declaration.body; - } - } - function checkTypePredicate(node) { - var parameterName = node.parameterName; - if (parameterName.kind === 69 && !isInLegalParameterTypePredicatePosition(node)) { - error(node, ts.Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); - } - else if (parameterName.kind === 161) { - if (!isInLegalThisTypePredicatePosition(node)) { - error(node, ts.Diagnostics.A_this_based_type_predicate_is_only_allowed_within_a_class_or_interface_s_members_get_accessors_or_return_type_positions_for_functions_and_methods); - } - else { - getTypeFromThisTypeNode(parameterName); - } + return declaration.kind !== 216 || !!declaration.body; } } function checkSourceElement(node) { @@ -22098,118 +22400,118 @@ var ts; var kind = node.kind; if (cancellationToken) { switch (kind) { - case 220: - case 216: + case 221: case 217: - case 215: + case 218: + case 216: cancellationToken.throwIfCancellationRequested(); } } switch (kind) { - case 137: - return checkTypeParameter(node); case 138: + return checkTypeParameter(node); + case 139: return checkParameter(node); + case 142: case 141: - case 140: return checkPropertyDeclaration(node); - case 152: case 153: - case 147: + case 154: case 148: - return checkSignatureDeclaration(node); case 149: return checkSignatureDeclaration(node); - case 143: - case 142: - return checkMethodDeclaration(node); - case 144: - return checkConstructorDeclaration(node); - case 145: - case 146: - return checkAccessorDeclaration(node); - case 151: - return checkTypeReferenceNode(node); case 150: + return checkSignatureDeclaration(node); + case 144: + case 143: + return checkMethodDeclaration(node); + case 145: + return checkConstructorDeclaration(node); + case 146: + case 147: + return checkAccessorDeclaration(node); + case 152: + return checkTypeReferenceNode(node); + case 151: return checkTypePredicate(node); - case 154: - return checkTypeQuery(node); case 155: - return checkTypeLiteral(node); + return checkTypeQuery(node); case 156: - return checkArrayType(node); + return checkTypeLiteral(node); case 157: - return checkTupleType(node); + return checkArrayType(node); case 158: + return checkTupleType(node); case 159: - return checkUnionOrIntersectionType(node); case 160: + return checkUnionOrIntersectionType(node); + case 161: return checkSourceElement(node.type); - case 215: - return checkFunctionDeclaration(node); - case 194: - case 221: - return checkBlock(node); - case 195: - return checkVariableStatement(node); - case 197: - return checkExpressionStatement(node); - case 198: - return checkIfStatement(node); - case 199: - return checkDoStatement(node); - case 200: - return checkWhileStatement(node); - case 201: - return checkForStatement(node); - case 202: - return checkForInStatement(node); - case 203: - return checkForOfStatement(node); - case 204: - case 205: - return checkBreakOrContinueStatement(node); - case 206: - return checkReturnStatement(node); - case 207: - return checkWithStatement(node); - case 208: - return checkSwitchStatement(node); - case 209: - return checkLabeledStatement(node); - case 210: - return checkThrowStatement(node); - case 211: - return checkTryStatement(node); - case 213: - return checkVariableDeclaration(node); - case 165: - return checkBindingElement(node); case 216: - return checkClassDeclaration(node); - case 217: - return checkInterfaceDeclaration(node); - case 218: - return checkTypeAliasDeclaration(node); - case 219: - return checkEnumDeclaration(node); - case 220: - return checkModuleDeclaration(node); - case 224: - return checkImportDeclaration(node); - case 223: - return checkImportEqualsDeclaration(node); - case 230: - return checkExportDeclaration(node); - case 229: - return checkExportAssignment(node); + return checkFunctionDeclaration(node); + case 195: + case 222: + return checkBlock(node); case 196: - checkGrammarStatementInAmbientContext(node); - return; + return checkVariableStatement(node); + case 198: + return checkExpressionStatement(node); + case 199: + return checkIfStatement(node); + case 200: + return checkDoStatement(node); + case 201: + return checkWhileStatement(node); + case 202: + return checkForStatement(node); + case 203: + return checkForInStatement(node); + case 204: + return checkForOfStatement(node); + case 205: + case 206: + return checkBreakOrContinueStatement(node); + case 207: + return checkReturnStatement(node); + case 208: + return checkWithStatement(node); + case 209: + return checkSwitchStatement(node); + case 210: + return checkLabeledStatement(node); + case 211: + return checkThrowStatement(node); case 212: + return checkTryStatement(node); + case 214: + return checkVariableDeclaration(node); + case 166: + return checkBindingElement(node); + case 217: + return checkClassDeclaration(node); + case 218: + return checkInterfaceDeclaration(node); + case 219: + return checkTypeAliasDeclaration(node); + case 220: + return checkEnumDeclaration(node); + case 221: + return checkModuleDeclaration(node); + case 225: + return checkImportDeclaration(node); + case 224: + return checkImportEqualsDeclaration(node); + case 231: + return checkExportDeclaration(node); + case 230: + return checkExportAssignment(node); + case 197: checkGrammarStatementInAmbientContext(node); return; - case 233: + case 213: + checkGrammarStatementInAmbientContext(node); + return; + case 234: return checkMissingDeclaration(node); } } @@ -22222,17 +22524,17 @@ var ts; for (var _i = 0, deferredNodes_1 = deferredNodes; _i < deferredNodes_1.length; _i++) { var node = deferredNodes_1[_i]; switch (node.kind) { - case 175: case 176: + case 177: + case 144: case 143: - case 142: checkFunctionExpressionOrObjectLiteralMethodDeferred(node); break; - case 145: case 146: + case 147: checkAccessorDeferred(node); break; - case 188: + case 189: checkClassExpressionDeferred(node); break; } @@ -22252,10 +22554,6 @@ var ts; } } checkGrammarSourceFile(node); - emitExtends = false; - emitDecorate = false; - emitParam = false; - emitAwaiter = false; potentialThisCollisions.length = 0; deferredNodes = []; ts.forEach(node.statements, checkSourceElement); @@ -22268,21 +22566,6 @@ var ts; ts.forEach(potentialThisCollisions, checkIfThisIsCapturedInEnclosingScope); potentialThisCollisions.length = 0; } - if (emitExtends) { - links.flags |= 8; - } - if (emitDecorate) { - links.flags |= 16; - } - if (emitParam) { - links.flags |= 32; - } - if (emitAwaiter) { - links.flags |= 64; - } - if (emitGenerator || (emitAwaiter && languageVersion < 2)) { - links.flags |= 128; - } links.flags |= 1; } } @@ -22316,7 +22599,7 @@ var ts; function isInsideWithStatementBody(node) { if (node) { while (node.parent) { - if (node.parent.kind === 207 && node.parent.statement === node) { + if (node.parent.kind === 208 && node.parent.statement === node) { return true; } node = node.parent; @@ -22338,28 +22621,28 @@ var ts; copySymbols(location.locals, meaning); } switch (location.kind) { - case 250: + case 251: if (!ts.isExternalOrCommonJsModule(location)) { break; } - case 220: + case 221: copySymbols(getSymbolOfNode(location).exports, meaning & 8914931); break; - case 219: + case 220: copySymbols(getSymbolOfNode(location).exports, meaning & 8); break; - case 188: + case 189: var className = location.name; if (className) { copySymbol(location.symbol, meaning); } - case 216: case 217: + case 218: if (!(memberFlags & 64)) { copySymbols(getSymbolOfNode(location).members, meaning & 793056); } break; - case 175: + case 176: var funcName = location.name; if (funcName) { copySymbol(location.symbol, meaning); @@ -22398,36 +22681,36 @@ var ts; } function isTypeDeclaration(node) { switch (node.kind) { - case 137: - case 216: + case 138: case 217: case 218: case 219: + case 220: return true; } } function isTypeReferenceIdentifier(entityName) { var node = entityName; - while (node.parent && node.parent.kind === 135) { + while (node.parent && node.parent.kind === 136) { node = node.parent; } - return node.parent && node.parent.kind === 151; + return node.parent && node.parent.kind === 152; } function isHeritageClauseElementIdentifier(entityName) { var node = entityName; - while (node.parent && node.parent.kind === 168) { + while (node.parent && node.parent.kind === 169) { node = node.parent; } - return node.parent && node.parent.kind === 190; + return node.parent && node.parent.kind === 191; } function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) { - while (nodeOnRightSide.parent.kind === 135) { + while (nodeOnRightSide.parent.kind === 136) { nodeOnRightSide = nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 223) { + if (nodeOnRightSide.parent.kind === 224) { return nodeOnRightSide.parent.moduleReference === nodeOnRightSide && nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 229) { + if (nodeOnRightSide.parent.kind === 230) { return nodeOnRightSide.parent.expression === nodeOnRightSide && nodeOnRightSide.parent; } return undefined; @@ -22439,10 +22722,10 @@ var ts; if (ts.isDeclarationName(entityName)) { return getSymbolOfNode(entityName.parent); } - if (entityName.parent.kind === 229) { + if (entityName.parent.kind === 230) { return resolveEntityName(entityName, 107455 | 793056 | 1536 | 8388608); } - if (entityName.kind !== 168) { + if (entityName.kind !== 169) { if (isInRightSideOfImportOrExportAssignment(entityName)) { return getSymbolOfPartOfRightHandSideOfImportEquals(entityName); } @@ -22452,7 +22735,7 @@ var ts; } if (isHeritageClauseElementIdentifier(entityName)) { var meaning = 0; - if (entityName.parent.kind === 190) { + if (entityName.parent.kind === 191) { meaning = 793056; if (ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) { meaning |= 107455; @@ -22464,9 +22747,9 @@ var ts; meaning |= 8388608; return resolveEntityName(entityName, meaning); } - else if ((entityName.parent.kind === 237) || - (entityName.parent.kind === 236) || - (entityName.parent.kind === 239)) { + else if ((entityName.parent.kind === 238) || + (entityName.parent.kind === 237) || + (entityName.parent.kind === 240)) { return getJsxElementTagSymbol(entityName.parent); } else if (ts.isExpression(entityName)) { @@ -22477,14 +22760,14 @@ var ts; var meaning = 107455 | 8388608; return resolveEntityName(entityName, meaning); } - else if (entityName.kind === 168) { + else if (entityName.kind === 169) { var symbol = getNodeLinks(entityName).resolvedSymbol; if (!symbol) { checkPropertyAccessExpression(entityName); } return getNodeLinks(entityName).resolvedSymbol; } - else if (entityName.kind === 135) { + else if (entityName.kind === 136) { var symbol = getNodeLinks(entityName).resolvedSymbol; if (!symbol) { checkQualifiedName(entityName); @@ -22493,14 +22776,14 @@ var ts; } } else if (isTypeReferenceIdentifier(entityName)) { - var meaning = entityName.parent.kind === 151 ? 793056 : 1536; + var meaning = entityName.parent.kind === 152 ? 793056 : 1536; meaning |= 8388608; return resolveEntityName(entityName, meaning); } - else if (entityName.parent.kind === 240) { + else if (entityName.parent.kind === 241) { return getJsxAttributePropertySymbol(entityName.parent); } - if (entityName.parent.kind === 150) { + if (entityName.parent.kind === 151) { return resolveEntityName(entityName, 1); } return undefined; @@ -22514,12 +22797,12 @@ var ts; } if (node.kind === 69) { if (isInRightSideOfImportOrExportAssignment(node)) { - return node.parent.kind === 229 + return node.parent.kind === 230 ? getSymbolOfEntityNameOrPropertyAccessExpression(node) : getSymbolOfPartOfRightHandSideOfImportEquals(node); } - else if (node.parent.kind === 165 && - node.parent.parent.kind === 163 && + else if (node.parent.kind === 166 && + node.parent.parent.kind === 164 && node === node.parent.propertyName) { var typeOfPattern = getTypeOfNode(node.parent.parent); var propertyDeclaration = typeOfPattern && getPropertyOfType(typeOfPattern, node.text); @@ -22530,30 +22813,30 @@ var ts; } switch (node.kind) { case 69: - case 168: - case 135: + case 169: + case 136: return getSymbolOfEntityNameOrPropertyAccessExpression(node); case 97: case 95: var type = ts.isExpression(node) ? checkExpression(node) : getTypeFromTypeNode(node); return type.symbol; - case 161: + case 162: return getTypeFromTypeNode(node).symbol; case 121: var constructorDeclaration = node.parent; - if (constructorDeclaration && constructorDeclaration.kind === 144) { + if (constructorDeclaration && constructorDeclaration.kind === 145) { return constructorDeclaration.parent.symbol; } return undefined; case 9: if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) || - ((node.parent.kind === 224 || node.parent.kind === 230) && + ((node.parent.kind === 225 || node.parent.kind === 231) && node.parent.moduleSpecifier === node)) { return resolveExternalModuleName(node, node); } case 8: - if (node.parent.kind === 169 && node.parent.argumentExpression === node) { + if (node.parent.kind === 170 && node.parent.argumentExpression === node) { var objectType = checkExpression(node.parent.expression); if (objectType === unknownType) return undefined; @@ -22567,11 +22850,16 @@ var ts; return undefined; } function getShorthandAssignmentValueSymbol(location) { - if (location && location.kind === 248) { - return resolveEntityName(location.name, 107455); + if (location && location.kind === 249) { + return resolveEntityName(location.name, 107455 | 8388608); } return undefined; } + function getExportSpecifierLocalTargetSymbol(node) { + return node.parent.parent.moduleSpecifier ? + getExternalModuleMember(node.parent.parent, node) : + resolveEntityName(node.propertyName || node.name, 107455 | 793056 | 1536 | 8388608); + } function getTypeOfNode(node) { if (isInsideWithStatementBody(node)) { return unknownType; @@ -22638,9 +22926,9 @@ var ts; function getRootSymbols(symbol) { if (symbol.flags & 268435456) { var symbols = []; - var name_15 = symbol.name; + var name_18 = symbol.name; ts.forEach(getSymbolLinks(symbol).containingType.types, function (t) { - var symbol = getPropertyOfType(t, name_15); + var symbol = getPropertyOfType(t, name_18); if (symbol) { symbols.push(symbol); } @@ -22689,11 +22977,11 @@ var ts; } var parentSymbol = getParentOfSymbol(symbol); if (parentSymbol) { - if (parentSymbol.flags & 512 && parentSymbol.valueDeclaration.kind === 250) { + if (parentSymbol.flags & 512 && parentSymbol.valueDeclaration.kind === 251) { return parentSymbol.valueDeclaration; } for (var n = node.parent; n; n = n.parent) { - if ((n.kind === 220 || n.kind === 219) && getSymbolOfNode(n) === parentSymbol) { + if ((n.kind === 221 || n.kind === 220) && getSymbolOfNode(n) === parentSymbol) { return n; } } @@ -22706,11 +22994,11 @@ var ts; } function isStatementWithLocals(node) { switch (node.kind) { - case 194: - case 222: - case 201: + case 195: + case 223: case 202: case 203: + case 204: return true; } return false; @@ -22736,22 +23024,22 @@ var ts; } function isValueAliasDeclaration(node) { switch (node.kind) { - case 223: - case 225: + case 224: case 226: - case 228: - case 232: + case 227: + case 229: + case 233: return isAliasResolvedToValue(getSymbolOfNode(node)); - case 230: + case 231: var exportClause = node.exportClause; return exportClause && ts.forEach(exportClause.elements, isValueAliasDeclaration); - case 229: + case 230: return node.expression && node.expression.kind === 69 ? isAliasResolvedToValue(getSymbolOfNode(node)) : true; } return false; } function isTopLevelValueImportEqualsWithEntityName(node) { - if (node.parent.kind !== 250 || !ts.isInternalModuleImportEqualsDeclaration(node)) { + if (node.parent.kind !== 251 || !ts.isInternalModuleImportEqualsDeclaration(node)) { return false; } var isValue = isAliasResolvedToValue(getSymbolOfNode(node)); @@ -22799,7 +23087,7 @@ var ts; return getNodeLinks(node).enumMemberValue; } function getConstantValue(node) { - if (node.kind === 249) { + if (node.kind === 250) { return getEnumMemberValue(node); } var symbol = getNodeLinks(node).resolvedSymbol; @@ -22915,21 +23203,34 @@ var ts; } function getExternalModuleFileFromDeclaration(declaration) { var specifier = ts.getExternalModuleName(declaration); - var moduleSymbol = getSymbolAtLocation(specifier); + var moduleSymbol = resolveExternalModuleNameWorker(specifier, specifier, undefined); if (!moduleSymbol) { return undefined; } - return ts.getDeclarationOfKind(moduleSymbol, 250); + return ts.getDeclarationOfKind(moduleSymbol, 251); } function initializeTypeChecker() { ts.forEach(host.getSourceFiles(), function (file) { ts.bindSourceFile(file, compilerOptions); }); + var augmentations; ts.forEach(host.getSourceFiles(), function (file) { if (!ts.isExternalOrCommonJsModule(file)) { mergeSymbolTable(globals, file.locals); } + if (file.moduleAugmentations) { + (augmentations || (augmentations = [])).push(file.moduleAugmentations); + } }); + if (augmentations) { + for (var _i = 0, augmentations_1 = augmentations; _i < augmentations_1.length; _i++) { + var list = augmentations_1[_i]; + for (var _a = 0, list_2 = list; _a < list_2.length; _a++) { + var augmentation = list_2[_a]; + mergeModuleAugmentation(augmentation); + } + } + } addToSymbolTable(globals, builtinGlobals, ts.Diagnostics.Declaration_name_conflicts_with_built_in_global_identifier_0); getSymbolLinks(undefinedSymbol).type = undefinedType; getSymbolLinks(argumentsSymbol).type = getGlobalType("IArguments"); @@ -22994,14 +23295,14 @@ var ts; return false; } if (!ts.nodeCanBeDecorated(node)) { - if (node.kind === 143 && !ts.nodeIsPresent(node.body)) { + if (node.kind === 144 && !ts.nodeIsPresent(node.body)) { return grammarErrorOnFirstToken(node, ts.Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload); } else { return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_are_not_valid_here); } } - else if (node.kind === 145 || node.kind === 146) { + else if (node.kind === 146 || node.kind === 147) { var accessors = ts.getAllAccessorDeclarations(node.parent.members, node); if (accessors.firstAccessor.decorators && node === accessors.secondAccessor) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); @@ -23011,38 +23312,38 @@ var ts; } function checkGrammarModifiers(node) { switch (node.kind) { - case 145: case 146: - case 144: - case 141: - case 140: - case 143: + case 147: + case 145: case 142: - case 149: - case 220: + case 141: + case 144: + case 143: + case 150: + case 221: + case 225: case 224: - case 223: + case 231: case 230: - case 229: - case 138: - break; - case 215: - if (node.modifiers && (node.modifiers.length > 1 || node.modifiers[0].kind !== 118) && - node.parent.kind !== 221 && node.parent.kind !== 250) { - return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); - } + case 139: break; case 216: - case 217: - case 195: - case 218: - if (node.modifiers && node.parent.kind !== 221 && node.parent.kind !== 250) { + if (node.modifiers && (node.modifiers.length > 1 || node.modifiers[0].kind !== 118) && + node.parent.kind !== 222 && node.parent.kind !== 251) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); } break; + case 217: + case 218: + case 196: case 219: + if (node.modifiers && node.parent.kind !== 222 && node.parent.kind !== 251) { + return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); + } + break; + case 220: if (node.modifiers && (node.modifiers.length > 1 || node.modifiers[0].kind !== 74) && - node.parent.kind !== 221 && node.parent.kind !== 250) { + node.parent.kind !== 222 && node.parent.kind !== 251) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); } break; @@ -23058,7 +23359,7 @@ var ts; var modifier = _a[_i]; switch (modifier.kind) { case 74: - if (node.kind !== 219 && node.parent.kind === 216) { + if (node.kind !== 220 && node.parent.kind === 217) { return grammarErrorOnNode(node, ts.Diagnostics.A_class_member_cannot_have_the_0_keyword, ts.tokenToString(74)); } break; @@ -23086,7 +23387,7 @@ var ts; else if (flags & 256) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "async"); } - else if (node.parent.kind === 221 || node.parent.kind === 250) { + else if (node.parent.kind === 222 || node.parent.kind === 251) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_element, text); } else if (flags & 128) { @@ -23106,10 +23407,10 @@ var ts; else if (flags & 256) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "static", "async"); } - else if (node.parent.kind === 221 || node.parent.kind === 250) { + else if (node.parent.kind === 222 || node.parent.kind === 251) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_element, "static"); } - else if (node.kind === 138) { + else if (node.kind === 139) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static"); } else if (flags & 128) { @@ -23131,10 +23432,10 @@ var ts; else if (flags & 256) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "export", "async"); } - else if (node.parent.kind === 216) { + else if (node.parent.kind === 217) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "export"); } - else if (node.kind === 138) { + else if (node.kind === 139) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export"); } flags |= 2; @@ -23146,13 +23447,13 @@ var ts; else if (flags & 256) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); } - else if (node.parent.kind === 216) { + else if (node.parent.kind === 217) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "declare"); } - else if (node.kind === 138) { + else if (node.kind === 139) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare"); } - else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 221) { + else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 222) { return grammarErrorOnNode(modifier, ts.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } flags |= 4; @@ -23162,11 +23463,11 @@ var ts; if (flags & 128) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "abstract"); } - if (node.kind !== 216) { - if (node.kind !== 143) { + if (node.kind !== 217) { + if (node.kind !== 144) { return grammarErrorOnNode(modifier, ts.Diagnostics.abstract_modifier_can_only_appear_on_a_class_or_method_declaration); } - if (!(node.parent.kind === 216 && node.parent.flags & 128)) { + if (!(node.parent.kind === 217 && node.parent.flags & 128)) { return grammarErrorOnNode(modifier, ts.Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class); } if (flags & 64) { @@ -23185,7 +23486,7 @@ var ts; else if (flags & 4 || ts.isInAmbientContext(node.parent)) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); } - else if (node.kind === 138) { + else if (node.kind === 139) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); } flags |= 256; @@ -23193,7 +23494,7 @@ var ts; break; } } - if (node.kind === 144) { + if (node.kind === 145) { if (flags & 64) { return grammarErrorOnNode(lastStatic, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); } @@ -23211,10 +23512,10 @@ var ts; } return; } - else if ((node.kind === 224 || node.kind === 223) && flags & 4) { + else if ((node.kind === 225 || node.kind === 224) && flags & 4) { return grammarErrorOnNode(lastDeclare, ts.Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); } - else if (node.kind === 138 && (flags & 56) && ts.isBindingPattern(node.name)) { + else if (node.kind === 139 && (flags & 56) && ts.isBindingPattern(node.name)) { return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_may_not_be_a_binding_pattern); } if (flags & 256) { @@ -23226,10 +23527,10 @@ var ts; return grammarErrorOnNode(asyncModifier, ts.Diagnostics.Async_functions_are_only_available_when_targeting_ECMAScript_6_and_higher); } switch (node.kind) { - case 143: - case 215: - case 175: + case 144: + case 216: case 176: + case 177: if (!node.asteriskToken) { return false; } @@ -23294,7 +23595,7 @@ var ts; checkGrammarParameterList(node.parameters) || checkGrammarArrowFunction(node, file); } function checkGrammarArrowFunction(node, file) { - if (node.kind === 176) { + if (node.kind === 177) { var arrowFunction = node; var startLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.pos).line; var endLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.end).line; @@ -23361,7 +23662,7 @@ var ts; var sourceFile = ts.getSourceFileOfNode(node); for (var _i = 0, args_1 = args; _i < args_1.length; _i++) { var arg = args_1[_i]; - if (arg.kind === 189) { + if (arg.kind === 190) { return grammarErrorAtPos(sourceFile, arg.pos, 0, ts.Diagnostics.Argument_expression_expected); } } @@ -23432,19 +23733,19 @@ var ts; return false; } function checkGrammarComputedPropertyName(node) { - if (node.kind !== 136) { + if (node.kind !== 137) { return false; } var computedPropertyName = node; - if (computedPropertyName.expression.kind === 183 && computedPropertyName.expression.operatorToken.kind === 24) { + if (computedPropertyName.expression.kind === 184 && computedPropertyName.expression.operatorToken.kind === 24) { return grammarErrorOnNode(computedPropertyName.expression, ts.Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name); } } function checkGrammarForGenerator(node) { if (node.asteriskToken) { - ts.Debug.assert(node.kind === 215 || - node.kind === 175 || - node.kind === 143); + ts.Debug.assert(node.kind === 216 || + node.kind === 176 || + node.kind === 144); if (ts.isInAmbientContext(node)) { return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_not_allowed_in_an_ambient_context); } @@ -23468,58 +23769,58 @@ var ts; var SetAccesor = 4; var GetOrSetAccessor = GetAccessor | SetAccesor; var _loop_1 = function(prop) { - var name_16 = prop.name; - if (prop.kind === 189 || - name_16.kind === 136) { - checkGrammarComputedPropertyName(name_16); + var name_19 = prop.name; + if (prop.kind === 190 || + name_19.kind === 137) { + checkGrammarComputedPropertyName(name_19); return "continue"; } - if (prop.kind === 248 && !inDestructuring && prop.objectAssignmentInitializer) { + if (prop.kind === 249 && !inDestructuring && prop.objectAssignmentInitializer) { return { value: grammarErrorOnNode(prop.equalsToken, ts.Diagnostics.can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment) }; } ts.forEach(prop.modifiers, function (mod) { - if (mod.kind !== 118 || prop.kind !== 143) { + if (mod.kind !== 118 || prop.kind !== 144) { grammarErrorOnNode(mod, ts.Diagnostics._0_modifier_cannot_be_used_here, ts.getTextOfNode(mod)); } }); var currentKind = void 0; - if (prop.kind === 247 || prop.kind === 248) { + if (prop.kind === 248 || prop.kind === 249) { checkGrammarForInvalidQuestionMark(prop, prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional); - if (name_16.kind === 8) { - checkGrammarNumericLiteral(name_16); + if (name_19.kind === 8) { + checkGrammarNumericLiteral(name_19); } currentKind = Property; } - else if (prop.kind === 143) { + else if (prop.kind === 144) { currentKind = Property; } - else if (prop.kind === 145) { + else if (prop.kind === 146) { currentKind = GetAccessor; } - else if (prop.kind === 146) { + else if (prop.kind === 147) { currentKind = SetAccesor; } else { ts.Debug.fail("Unexpected syntax kind:" + prop.kind); } - if (!ts.hasProperty(seen, name_16.text)) { - seen[name_16.text] = currentKind; + if (!ts.hasProperty(seen, name_19.text)) { + seen[name_19.text] = currentKind; } else { - var existingKind = seen[name_16.text]; + var existingKind = seen[name_19.text]; if (currentKind === Property && existingKind === Property) { return "continue"; } else if ((currentKind & GetOrSetAccessor) && (existingKind & GetOrSetAccessor)) { if (existingKind !== GetOrSetAccessor && currentKind !== existingKind) { - seen[name_16.text] = currentKind | existingKind; + seen[name_19.text] = currentKind | existingKind; } else { - return { value: grammarErrorOnNode(name_16, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name) }; + return { value: grammarErrorOnNode(name_19, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name) }; } } else { - return { value: grammarErrorOnNode(name_16, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name) }; + return { value: grammarErrorOnNode(name_19, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name) }; } } }; @@ -23534,19 +23835,19 @@ var ts; var seen = {}; for (var _i = 0, _a = node.attributes; _i < _a.length; _i++) { var attr = _a[_i]; - if (attr.kind === 241) { + if (attr.kind === 242) { continue; } var jsxAttr = attr; - var name_17 = jsxAttr.name; - if (!ts.hasProperty(seen, name_17.text)) { - seen[name_17.text] = true; + var name_20 = jsxAttr.name; + if (!ts.hasProperty(seen, name_20.text)) { + seen[name_20.text] = true; } else { - return grammarErrorOnNode(name_17, ts.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); + return grammarErrorOnNode(name_20, ts.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); } var initializer = jsxAttr.initializer; - if (initializer && initializer.kind === 242 && !initializer.expression) { + if (initializer && initializer.kind === 243 && !initializer.expression) { return grammarErrorOnNode(jsxAttr.initializer, ts.Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression); } } @@ -23555,7 +23856,7 @@ var ts; if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) { return true; } - if (forInOrOfStatement.initializer.kind === 214) { + if (forInOrOfStatement.initializer.kind === 215) { var variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { var declarations = variableList.declarations; @@ -23563,20 +23864,20 @@ var ts; return false; } if (declarations.length > 1) { - var diagnostic = forInOrOfStatement.kind === 202 + var diagnostic = forInOrOfStatement.kind === 203 ? ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic); } var firstDeclaration = declarations[0]; if (firstDeclaration.initializer) { - var diagnostic = forInOrOfStatement.kind === 202 + var diagnostic = forInOrOfStatement.kind === 203 ? ts.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : ts.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; return grammarErrorOnNode(firstDeclaration.name, diagnostic); } if (firstDeclaration.type) { - var diagnostic = forInOrOfStatement.kind === 202 + var diagnostic = forInOrOfStatement.kind === 203 ? ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; return grammarErrorOnNode(firstDeclaration, diagnostic); @@ -23599,10 +23900,10 @@ var ts; else if (accessor.typeParameters) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.An_accessor_cannot_have_type_parameters); } - else if (kind === 145 && accessor.parameters.length) { + else if (kind === 146 && accessor.parameters.length) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_get_accessor_cannot_have_parameters); } - else if (kind === 146) { + else if (kind === 147) { if (accessor.type) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } @@ -23637,12 +23938,12 @@ var ts; checkGrammarForGenerator(node)) { return true; } - if (node.parent.kind === 167) { + if (node.parent.kind === 168) { if (checkGrammarForInvalidQuestionMark(node, node.questionToken, ts.Diagnostics.A_class_member_cannot_be_declared_optional)) { return true; } else if (node.body === undefined) { - return grammarErrorAtPos(getSourceFile(node), node.end - 1, ";".length, ts.Diagnostics._0_expected, "{"); + return grammarErrorAtPos(ts.getSourceFileOfNode(node), node.end - 1, ";".length, ts.Diagnostics._0_expected, "{"); } } if (ts.isClassLike(node.parent)) { @@ -23656,10 +23957,10 @@ var ts; return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol); } } - else if (node.parent.kind === 217) { + else if (node.parent.kind === 218) { return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol); } - else if (node.parent.kind === 155) { + else if (node.parent.kind === 156) { return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol); } } @@ -23670,9 +23971,9 @@ var ts; return grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary); } switch (current.kind) { - case 209: + case 210: if (node.label && current.label.text === node.label.text) { - var isMisplacedContinueLabel = node.kind === 204 + var isMisplacedContinueLabel = node.kind === 205 && !ts.isIterationStatement(current.statement, true); if (isMisplacedContinueLabel) { return grammarErrorOnNode(node, ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement); @@ -23680,8 +23981,8 @@ var ts; return false; } break; - case 208: - if (node.kind === 205 && !node.label) { + case 209: + if (node.kind === 206 && !node.label) { return false; } break; @@ -23694,13 +23995,13 @@ var ts; current = current.parent; } if (node.label) { - var message = node.kind === 205 + var message = node.kind === 206 ? ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } else { - var message = node.kind === 205 + var message = node.kind === 206 ? ts.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : ts.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); @@ -23712,7 +24013,7 @@ var ts; if (node !== ts.lastOrUndefined(elements)) { return grammarErrorOnNode(node, ts.Diagnostics.A_rest_element_must_be_last_in_an_array_destructuring_pattern); } - if (node.name.kind === 164 || node.name.kind === 163) { + if (node.name.kind === 165 || node.name.kind === 164) { return grammarErrorOnNode(node.name, ts.Diagnostics.A_rest_element_cannot_contain_a_binding_pattern); } if (node.initializer) { @@ -23721,7 +24022,7 @@ var ts; } } function checkGrammarVariableDeclaration(node) { - if (node.parent.parent.kind !== 202 && node.parent.parent.kind !== 203) { + if (node.parent.parent.kind !== 203 && node.parent.parent.kind !== 204) { if (ts.isInAmbientContext(node)) { if (node.initializer) { var equalsTokenLength = "=".length; @@ -23750,7 +24051,7 @@ var ts; var elements = name.elements; for (var _i = 0, elements_2 = elements; _i < elements_2.length; _i++) { var element = elements_2[_i]; - if (element.kind !== 189) { + if (element.kind !== 190) { checkGrammarNameInLetOrConstDeclarations(element.name); } } @@ -23767,15 +24068,15 @@ var ts; } function allowLetAndConstDeclarations(parent) { switch (parent.kind) { - case 198: case 199: case 200: - case 207: case 201: + case 208: case 202: case 203: + case 204: return false; - case 209: + case 210: return allowLetAndConstDeclarations(parent.parent); } return true; @@ -23831,7 +24132,7 @@ var ts; return true; } } - else if (node.parent.kind === 217) { + else if (node.parent.kind === 218) { if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol)) { return true; } @@ -23839,7 +24140,7 @@ var ts; return grammarErrorOnNode(node.initializer, ts.Diagnostics.An_interface_property_cannot_have_an_initializer); } } - else if (node.parent.kind === 155) { + else if (node.parent.kind === 156) { if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol)) { return true; } @@ -23852,12 +24153,12 @@ var ts; } } function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { - if (node.kind === 217 || - node.kind === 218 || + if (node.kind === 218 || + node.kind === 219 || + node.kind === 225 || node.kind === 224 || - node.kind === 223 || + node.kind === 231 || node.kind === 230 || - node.kind === 229 || (node.flags & 4) || (node.flags & (2 | 512))) { return false; @@ -23867,7 +24168,7 @@ var ts; function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) { for (var _i = 0, _a = file.statements; _i < _a.length; _i++) { var decl = _a[_i]; - if (ts.isDeclaration(decl) || decl.kind === 195) { + if (ts.isDeclaration(decl) || decl.kind === 196) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; } @@ -23886,7 +24187,7 @@ var ts; if (!links.hasReportedStatementInAmbientContext && ts.isFunctionLike(node.parent)) { return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } - if (node.parent.kind === 194 || node.parent.kind === 221 || node.parent.kind === 250) { + if (node.parent.kind === 195 || node.parent.kind === 222 || node.parent.kind === 251) { var links_1 = getNodeLinks(node.parent); if (!links_1.hasReportedStatementInAmbientContext) { return links_1.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); @@ -23922,8 +24223,9 @@ var ts; getSourceMapData: function () { return undefined; }, setSourceFile: function (sourceFile) { }, emitStart: function (range) { }, - emitEnd: function (range) { }, + emitEnd: function (range, stopOverridingSpan) { }, emitPos: function (pos) { }, + changeEmitSourcePos: function () { }, getText: function () { return undefined; }, getSourceMappingURL: function () { return undefined; }, initialize: function (filePath, sourceMapFilePath, sourceFiles, isBundledEmit) { }, @@ -23937,6 +24239,8 @@ var ts; var compilerOptions = host.getCompilerOptions(); var currentSourceFile; var sourceMapDir; + var stopOverridingSpan = false; + var modifyLastSourcePos = false; var sourceMapSourceIndex; var lastRecordedSourceMapSpan; var lastEncodedSourceMapSpan; @@ -23948,6 +24252,7 @@ var ts; emitPos: emitPos, emitStart: emitStart, emitEnd: emitEnd, + changeEmitSourcePos: changeEmitSourcePos, getText: getText, getSourceMappingURL: getSourceMappingURL, initialize: initialize, @@ -24011,6 +24316,29 @@ var ts; lastEncodedNameIndex = undefined; sourceMapData = undefined; } + function updateLastEncodedAndRecordedSpans() { + if (modifyLastSourcePos) { + modifyLastSourcePos = false; + lastRecordedSourceMapSpan.emittedLine = lastEncodedSourceMapSpan.emittedLine; + lastRecordedSourceMapSpan.emittedColumn = lastEncodedSourceMapSpan.emittedColumn; + sourceMapData.sourceMapDecodedMappings.pop(); + lastEncodedSourceMapSpan = sourceMapData.sourceMapDecodedMappings.length ? + sourceMapData.sourceMapDecodedMappings[sourceMapData.sourceMapDecodedMappings.length - 1] : + undefined; + var sourceMapMappings = sourceMapData.sourceMapMappings; + var lenthToSet = sourceMapMappings.length - 1; + for (; lenthToSet >= 0; lenthToSet--) { + var currentChar = sourceMapMappings.charAt(lenthToSet); + if (currentChar === ",") { + break; + } + if (currentChar === ";" && lenthToSet !== 0 && sourceMapMappings.charAt(lenthToSet - 1) !== ";") { + break; + } + } + sourceMapData.sourceMapMappings = sourceMapMappings.substr(0, Math.max(0, lenthToSet)); + } + } function encodeLastRecordedSourceMapSpan() { if (!lastRecordedSourceMapSpan || lastRecordedSourceMapSpan === lastEncodedSourceMapSpan) { return; @@ -24032,6 +24360,7 @@ var ts; sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.sourceLine - lastEncodedSourceMapSpan.sourceLine); sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.sourceColumn - lastEncodedSourceMapSpan.sourceColumn); if (lastRecordedSourceMapSpan.nameIndex >= 0) { + ts.Debug.assert(false, "We do not support name index right now, Make sure to update updateLastEncodedAndRecordedSpans when we start using this"); sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.nameIndex - lastEncodedNameIndex); lastEncodedNameIndex = lastRecordedSourceMapSpan.nameIndex; } @@ -24061,19 +24390,29 @@ var ts; sourceColumn: sourceLinePos.character, sourceIndex: sourceMapSourceIndex }; + stopOverridingSpan = false; } - else { + else if (!stopOverridingSpan) { lastRecordedSourceMapSpan.sourceLine = sourceLinePos.line; lastRecordedSourceMapSpan.sourceColumn = sourceLinePos.character; lastRecordedSourceMapSpan.sourceIndex = sourceMapSourceIndex; } + updateLastEncodedAndRecordedSpans(); + } + function getStartPos(range) { + var rangeHasDecorators = !!range.decorators; + return range.pos !== -1 ? ts.skipTrivia(currentSourceFile.text, rangeHasDecorators ? range.decorators.end : range.pos) : -1; } function emitStart(range) { - var rangeHasDecorators = !!range.decorators; - emitPos(range.pos !== -1 ? ts.skipTrivia(currentSourceFile.text, rangeHasDecorators ? range.decorators.end : range.pos) : -1); + emitPos(getStartPos(range)); } - function emitEnd(range) { + function emitEnd(range, stopOverridingEnd) { emitPos(range.end); + stopOverridingSpan = stopOverridingEnd; + } + function changeEmitSourcePos() { + ts.Debug.assert(!modifyLastSourcePos); + modifyLastSourcePos = true; } function setSourceFile(sourceFile) { currentSourceFile = sourceFile; @@ -24160,6 +24499,7 @@ var ts; var writeTextOfNode; var writer = createAndSetNewTextWriterWithSymbolWriter(); var enclosingDeclaration; + var resultHasExternalModuleIndicator; var currentText; var currentLineMap; var currentIdentifiers; @@ -24190,6 +24530,7 @@ var ts; } }); } + resultHasExternalModuleIndicator = false; if (!isBundledEmit || !ts.isExternalModule(sourceFile)) { noDeclare = false; emitSourceFile(sourceFile); @@ -24208,7 +24549,7 @@ var ts; var oldWriter = writer; ts.forEach(moduleElementDeclarationEmitInfo, function (aliasEmitInfo) { if (aliasEmitInfo.isVisible && !aliasEmitInfo.asynchronousOutput) { - ts.Debug.assert(aliasEmitInfo.node.kind === 224); + ts.Debug.assert(aliasEmitInfo.node.kind === 225); createAndSetNewTextWriterWithSymbolWriter(); ts.Debug.assert(aliasEmitInfo.indent === 0 || (aliasEmitInfo.indent === 1 && isBundledEmit)); for (var i = 0; i < aliasEmitInfo.indent; i++) { @@ -24225,6 +24566,10 @@ var ts; allSourcesModuleElementDeclarationEmitInfo = allSourcesModuleElementDeclarationEmitInfo.concat(moduleElementDeclarationEmitInfo); moduleElementDeclarationEmitInfo = []; } + if (!isBundledEmit && ts.isExternalModule(sourceFile) && sourceFile.moduleAugmentations.length && !resultHasExternalModuleIndicator) { + write("export {};"); + writeLine(); + } }); return { reportedDeclarationError: reportedDeclarationError, @@ -24271,10 +24616,10 @@ var ts; var oldWriter = writer; ts.forEach(nodes, function (declaration) { var nodeToCheck; - if (declaration.kind === 213) { + if (declaration.kind === 214) { nodeToCheck = declaration.parent.parent; } - else if (declaration.kind === 227 || declaration.kind === 228 || declaration.kind === 225) { + else if (declaration.kind === 228 || declaration.kind === 229 || declaration.kind === 226) { ts.Debug.fail("We should be getting ImportDeclaration instead to write"); } else { @@ -24285,7 +24630,7 @@ var ts; moduleElementEmitInfo = ts.forEach(asynchronousSubModuleDeclarationEmitInfo, function (declEmitInfo) { return declEmitInfo.node === nodeToCheck ? declEmitInfo : undefined; }); } if (moduleElementEmitInfo) { - if (moduleElementEmitInfo.node.kind === 224) { + if (moduleElementEmitInfo.node.kind === 225) { moduleElementEmitInfo.isVisible = true; } else { @@ -24293,12 +24638,12 @@ var ts; for (var declarationIndent = moduleElementEmitInfo.indent; declarationIndent; declarationIndent--) { increaseIndent(); } - if (nodeToCheck.kind === 220) { + if (nodeToCheck.kind === 221) { ts.Debug.assert(asynchronousSubModuleDeclarationEmitInfo === undefined); asynchronousSubModuleDeclarationEmitInfo = []; } writeModuleElement(nodeToCheck); - if (nodeToCheck.kind === 220) { + if (nodeToCheck.kind === 221) { moduleElementEmitInfo.subModuleElementDeclarationEmitInfo = asynchronousSubModuleDeclarationEmitInfo; asynchronousSubModuleDeclarationEmitInfo = undefined; } @@ -24401,35 +24746,35 @@ var ts; case 120: case 131: case 103: - case 161: case 162: + case 163: return writeTextOfNode(currentText, type); - case 190: + case 191: return emitExpressionWithTypeArguments(type); - case 151: - return emitTypeReference(type); - case 154: - return emitTypeQuery(type); - case 156: - return emitArrayType(type); - case 157: - return emitTupleType(type); - case 158: - return emitUnionType(type); - case 159: - return emitIntersectionType(type); - case 160: - return emitParenType(type); case 152: - case 153: - return emitSignatureDeclarationWithJsDocComments(type); + return emitTypeReference(type); case 155: + return emitTypeQuery(type); + case 157: + return emitArrayType(type); + case 158: + return emitTupleType(type); + case 159: + return emitUnionType(type); + case 160: + return emitIntersectionType(type); + case 161: + return emitParenType(type); + case 153: + case 154: + return emitSignatureDeclarationWithJsDocComments(type); + case 156: return emitTypeLiteral(type); case 69: return emitEntityName(type); - case 135: + case 136: return emitEntityName(type); - case 150: + case 151: return emitTypePredicate(type); } function writeEntityName(entityName) { @@ -24437,21 +24782,21 @@ var ts; writeTextOfNode(currentText, entityName); } else { - var left = entityName.kind === 135 ? entityName.left : entityName.expression; - var right = entityName.kind === 135 ? entityName.right : entityName.name; + var left = entityName.kind === 136 ? entityName.left : entityName.expression; + var right = entityName.kind === 136 ? entityName.right : entityName.name; writeEntityName(left); write("."); writeTextOfNode(currentText, right); } } function emitEntityName(entityName) { - var visibilityResult = resolver.isEntityNameVisible(entityName, entityName.parent.kind === 223 ? entityName.parent : enclosingDeclaration); + var visibilityResult = resolver.isEntityNameVisible(entityName, entityName.parent.kind === 224 ? entityName.parent : enclosingDeclaration); handleSymbolAccessibilityError(visibilityResult); writeEntityName(entityName); } function emitExpressionWithTypeArguments(node) { if (ts.isSupportedExpressionWithTypeArguments(node)) { - ts.Debug.assert(node.expression.kind === 69 || node.expression.kind === 168); + ts.Debug.assert(node.expression.kind === 69 || node.expression.kind === 169); emitEntityName(node.expression); if (node.typeArguments) { write("<"); @@ -24525,9 +24870,9 @@ var ts; var count = 0; while (true) { count++; - var name_18 = baseName + "_" + count; - if (!ts.hasProperty(currentIdentifiers, name_18)) { - return name_18; + var name_21 = baseName + "_" + count; + if (!ts.hasProperty(currentIdentifiers, name_21)) { + return name_21; } } } @@ -24568,10 +24913,10 @@ var ts; if (isModuleElementVisible) { writeModuleElement(node); } - else if (node.kind === 223 || - (node.parent.kind === 250 && isCurrentFileExternalModule)) { + else if (node.kind === 224 || + (node.parent.kind === 251 && isCurrentFileExternalModule)) { var isVisible; - if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 250) { + if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 251) { asynchronousSubModuleDeclarationEmitInfo.push({ node: node, outputPos: writer.getTextPos(), @@ -24580,7 +24925,7 @@ var ts; }); } else { - if (node.kind === 224) { + if (node.kind === 225) { var importDeclaration = node; if (importDeclaration.importClause) { isVisible = (importDeclaration.importClause.name && resolver.isDeclarationVisible(importDeclaration.importClause)) || @@ -24598,37 +24943,37 @@ var ts; } function writeModuleElement(node) { switch (node.kind) { - case 215: - return writeFunctionDeclaration(node); - case 195: - return writeVariableStatement(node); - case 217: - return writeInterfaceDeclaration(node); case 216: - return writeClassDeclaration(node); + return writeFunctionDeclaration(node); + case 196: + return writeVariableStatement(node); case 218: - return writeTypeAliasDeclaration(node); + return writeInterfaceDeclaration(node); + case 217: + return writeClassDeclaration(node); case 219: - return writeEnumDeclaration(node); + return writeTypeAliasDeclaration(node); case 220: + return writeEnumDeclaration(node); + case 221: return writeModuleDeclaration(node); - case 223: - return writeImportEqualsDeclaration(node); case 224: + return writeImportEqualsDeclaration(node); + case 225: return writeImportDeclaration(node); default: ts.Debug.fail("Unknown symbol kind"); } } function emitModuleElementDeclarationFlags(node) { - if (node.parent.kind === 250) { + if (node.parent.kind === 251) { if (node.flags & 2) { write("export "); } if (node.flags & 512) { write("default "); } - else if (node.kind !== 217 && !noDeclare) { + else if (node.kind !== 218 && !noDeclare) { write("declare "); } } @@ -24675,7 +25020,7 @@ var ts; } function isVisibleNamedBinding(namedBindings) { if (namedBindings) { - if (namedBindings.kind === 226) { + if (namedBindings.kind === 227) { return resolver.isDeclarationVisible(namedBindings); } else { @@ -24701,7 +25046,7 @@ var ts; if (currentWriterPos !== writer.getTextPos()) { write(", "); } - if (node.importClause.namedBindings.kind === 226) { + if (node.importClause.namedBindings.kind === 227) { write("* as "); writeTextOfNode(currentText, node.importClause.namedBindings.name); } @@ -24718,11 +25063,15 @@ var ts; writer.writeLine(); } function emitExternalModuleSpecifier(parent) { + resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 221; var moduleSpecifier; - if (parent.kind === 223) { + if (parent.kind === 224) { var node = parent; moduleSpecifier = ts.getExternalModuleImportEqualsDeclarationExpression(node); } + else if (parent.kind === 221) { + moduleSpecifier = parent.name; + } else { var node = parent; moduleSpecifier = node.moduleSpecifier; @@ -24771,14 +25120,24 @@ var ts; function writeModuleDeclaration(node) { emitJsDocComments(node); emitModuleElementDeclarationFlags(node); - if (node.flags & 65536) { - write("namespace "); + if (ts.isGlobalScopeAugmentation(node)) { + write("global "); } else { - write("module "); + if (node.flags & 65536) { + write("namespace "); + } + else { + write("module "); + } + if (ts.isExternalModuleAugmentation(node)) { + emitExternalModuleSpecifier(node); + } + else { + writeTextOfNode(currentText, node.name); + } } - writeTextOfNode(currentText, node.name); - while (node.body.kind !== 221) { + while (node.body.kind !== 222) { node = node.body; write("."); writeTextOfNode(currentText, node.name); @@ -24843,7 +25202,7 @@ var ts; writeLine(); } function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 143 && (node.parent.flags & 16); + return node.parent.kind === 144 && (node.parent.flags & 16); } function emitTypeParameters(typeParameters) { function emitTypeParameter(node) { @@ -24853,15 +25212,15 @@ var ts; writeTextOfNode(currentText, node.name); if (node.constraint && !isPrivateMethodTypeParameter(node)) { write(" extends "); - if (node.parent.kind === 152 || - node.parent.kind === 153 || - (node.parent.parent && node.parent.parent.kind === 155)) { - ts.Debug.assert(node.parent.kind === 143 || - node.parent.kind === 142 || - node.parent.kind === 152 || + if (node.parent.kind === 153 || + node.parent.kind === 154 || + (node.parent.parent && node.parent.parent.kind === 156)) { + ts.Debug.assert(node.parent.kind === 144 || + node.parent.kind === 143 || node.parent.kind === 153 || - node.parent.kind === 147 || - node.parent.kind === 148); + node.parent.kind === 154 || + node.parent.kind === 148 || + node.parent.kind === 149); emitType(node.constraint); } else { @@ -24871,31 +25230,31 @@ var ts; function getTypeParameterConstraintVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; switch (node.parent.kind) { - case 216: + case 217: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; break; - case 217: + case 218: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; break; - case 148: + case 149: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 147: + case 148: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; break; + case 144: case 143: - case 142: if (node.parent.flags & 64) { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.parent.kind === 216) { + else if (node.parent.parent.kind === 217) { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } break; - case 215: + case 216: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; break; default: @@ -24928,7 +25287,7 @@ var ts; } function getHeritageClauseVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; - if (node.parent.parent.kind === 216) { + if (node.parent.parent.kind === 217) { diagnosticMessage = isImplementsList ? ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : ts.Diagnostics.Extends_clause_of_exported_class_0_has_or_is_using_private_name_1; @@ -25008,16 +25367,16 @@ var ts; writeLine(); } function emitVariableDeclaration(node) { - if (node.kind !== 213 || resolver.isDeclarationVisible(node)) { + if (node.kind !== 214 || resolver.isDeclarationVisible(node)) { if (ts.isBindingPattern(node.name)) { emitBindingPattern(node.name); } else { writeTextOfNode(currentText, node.name); - if ((node.kind === 141 || node.kind === 140) && ts.hasQuestionToken(node)) { + if ((node.kind === 142 || node.kind === 141) && ts.hasQuestionToken(node)) { write("?"); } - if ((node.kind === 141 || node.kind === 140) && node.parent.kind === 155) { + if ((node.kind === 142 || node.kind === 141) && node.parent.kind === 156) { emitTypeOfVariableDeclarationFromTypeLiteral(node); } else if (!(node.flags & 16)) { @@ -25026,14 +25385,14 @@ var ts; } } function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult) { - if (node.kind === 213) { + if (node.kind === 214) { return symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; } - else if (node.kind === 141 || node.kind === 140) { + else if (node.kind === 142 || node.kind === 141) { if (node.flags & 64) { return symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? @@ -25041,7 +25400,7 @@ var ts; ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.kind === 216) { + else if (node.parent.kind === 217) { return symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : @@ -25067,7 +25426,7 @@ var ts; var elements = []; for (var _i = 0, _a = bindingPattern.elements; _i < _a.length; _i++) { var element = _a[_i]; - if (element.kind !== 189) { + if (element.kind !== 190) { elements.push(element); } } @@ -25133,7 +25492,7 @@ var ts; accessorWithTypeAnnotation = node; var type = getTypeAnnotationFromAccessor(node); if (!type) { - var anotherAccessor = node.kind === 145 ? accessors.setAccessor : accessors.getAccessor; + var anotherAccessor = node.kind === 146 ? accessors.setAccessor : accessors.getAccessor; type = getTypeAnnotationFromAccessor(anotherAccessor); if (type) { accessorWithTypeAnnotation = anotherAccessor; @@ -25146,7 +25505,7 @@ var ts; } function getTypeAnnotationFromAccessor(accessor) { if (accessor) { - return accessor.kind === 145 + return accessor.kind === 146 ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type @@ -25155,7 +25514,7 @@ var ts; } function getAccessorDeclarationTypeVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; - if (accessorWithTypeAnnotation.kind === 146) { + if (accessorWithTypeAnnotation.kind === 147) { if (accessorWithTypeAnnotation.parent.flags & 64) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 : @@ -25201,17 +25560,17 @@ var ts; } if (!resolver.isImplementationOfOverload(node)) { emitJsDocComments(node); - if (node.kind === 215) { + if (node.kind === 216) { emitModuleElementDeclarationFlags(node); } - else if (node.kind === 143) { + else if (node.kind === 144) { emitClassMemberDeclarationFlags(node); } - if (node.kind === 215) { + if (node.kind === 216) { write("function "); writeTextOfNode(currentText, node.name); } - else if (node.kind === 144) { + else if (node.kind === 145) { write("constructor"); } else { @@ -25230,31 +25589,31 @@ var ts; function emitSignatureDeclaration(node) { var prevEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = node; - if (node.kind === 148 || node.kind === 153) { + if (node.kind === 149 || node.kind === 154) { write("new "); } emitTypeParameters(node.typeParameters); - if (node.kind === 149) { + if (node.kind === 150) { write("["); } else { write("("); } emitCommaList(node.parameters, emitParameterDeclaration); - if (node.kind === 149) { + if (node.kind === 150) { write("]"); } else { write(")"); } - var isFunctionTypeOrConstructorType = node.kind === 152 || node.kind === 153; - if (isFunctionTypeOrConstructorType || node.parent.kind === 155) { + var isFunctionTypeOrConstructorType = node.kind === 153 || node.kind === 154; + if (isFunctionTypeOrConstructorType || node.parent.kind === 156) { if (node.type) { write(isFunctionTypeOrConstructorType ? " => " : ": "); emitType(node.type); } } - else if (node.kind !== 144 && !(node.flags & 16)) { + else if (node.kind !== 145 && !(node.flags & 16)) { writeReturnTypeAtSignature(node, getReturnTypeVisibilityError); } enclosingDeclaration = prevEnclosingDeclaration; @@ -25265,23 +25624,23 @@ var ts; function getReturnTypeVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; switch (node.kind) { - case 148: + case 149: diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 147: + case 148: diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 149: + case 150: diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; break; + case 144: case 143: - case 142: if (node.flags & 64) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? @@ -25289,7 +25648,7 @@ var ts; ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; } - else if (node.parent.kind === 216) { + else if (node.parent.kind === 217) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : @@ -25302,7 +25661,7 @@ var ts; ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; } break; - case 215: + case 216: diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : @@ -25334,9 +25693,9 @@ var ts; write("?"); } decreaseIndent(); - if (node.parent.kind === 152 || - node.parent.kind === 153 || - node.parent.parent.kind === 155) { + if (node.parent.kind === 153 || + node.parent.kind === 154 || + node.parent.parent.kind === 156) { emitTypeOfVariableDeclarationFromTypeLiteral(node); } else if (!(node.parent.flags & 16)) { @@ -25352,22 +25711,22 @@ var ts; } function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult) { switch (node.parent.kind) { - case 144: + case 145: return symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; - case 148: + case 149: return symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; - case 147: + case 148: return symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; + case 144: case 143: - case 142: if (node.parent.flags & 64) { return symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? @@ -25375,7 +25734,7 @@ var ts; ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.parent.kind === 216) { + else if (node.parent.parent.kind === 217) { return symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : @@ -25387,7 +25746,7 @@ var ts; ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } - case 215: + case 216: return symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : @@ -25398,12 +25757,12 @@ var ts; } } function emitBindingPattern(bindingPattern) { - if (bindingPattern.kind === 163) { + if (bindingPattern.kind === 164) { write("{"); emitCommaList(bindingPattern.elements, emitBindingElement); write("}"); } - else if (bindingPattern.kind === 164) { + else if (bindingPattern.kind === 165) { write("["); var elements = bindingPattern.elements; emitCommaList(elements, emitBindingElement); @@ -25414,10 +25773,10 @@ var ts; } } function emitBindingElement(bindingElement) { - if (bindingElement.kind === 189) { + if (bindingElement.kind === 190) { write(" "); } - else if (bindingElement.kind === 165) { + else if (bindingElement.kind === 166) { if (bindingElement.propertyName) { writeTextOfNode(currentText, bindingElement.propertyName); write(": "); @@ -25439,39 +25798,39 @@ var ts; } function emitNode(node) { switch (node.kind) { - case 215: - case 220: - case 223: - case 217: case 216: - case 218: - case 219: - return emitModuleElement(node, isModuleElementVisible(node)); - case 195: - return emitModuleElement(node, isVariableStatementVisible(node)); + case 221: case 224: + case 218: + case 217: + case 219: + case 220: + return emitModuleElement(node, isModuleElementVisible(node)); + case 196: + return emitModuleElement(node, isVariableStatementVisible(node)); + case 225: return emitModuleElement(node, !node.importClause); - case 230: + case 231: return emitExportDeclaration(node); + case 145: case 144: case 143: - case 142: return writeFunctionDeclaration(node); - case 148: - case 147: case 149: + case 148: + case 150: return emitSignatureDeclarationWithJsDocComments(node); - case 145: case 146: + case 147: return emitAccessorDeclaration(node); + case 142: case 141: - case 140: return emitPropertyDeclaration(node); - case 249: - return emitEnumMemberDeclaration(node); - case 229: - return emitExportAssignment(node); case 250: + return emitEnumMemberDeclaration(node); + case 230: + return emitExportAssignment(node); + case 251: return emitSourceFile(node); } } @@ -25798,7 +26157,7 @@ var ts; var decorateHelper = "\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};"; var metadataHelper = "\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};"; var paramHelper = "\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};"; - var awaiterHelper = "\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) {\n return new Promise(function (resolve, reject) {\n generator = generator.call(thisArg, _arguments);\n function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); }\n function onfulfill(value) { try { step(\"next\", value); } catch (e) { reject(e); } }\n function onreject(value) { try { step(\"throw\", value); } catch (e) { reject(e); } }\n function step(verb, value) {\n var result = generator[verb](value);\n result.done ? resolve(result.value) : cast(result.value).then(onfulfill, onreject);\n }\n step(\"next\", void 0);\n });\n};"; + var awaiterHelper = "\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new P(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.call(thisArg, _arguments)).next());\n });\n};"; var compilerOptions = host.getCompilerOptions(); var languageVersion = ts.getEmitScriptTarget(compilerOptions); var modulekind = ts.getEmitModuleKind(compilerOptions); @@ -25886,6 +26245,7 @@ var ts; var sourceMapData; var isOwnFileEmit; var emitLeadingCommentsOfPosition = compilerOptions.removeComments ? function (pos) { } : emitLeadingCommentsOfPositionWorker; + var setSourceMapWriterEmit = compilerOptions.sourceMap || compilerOptions.inlineSourceMap ? changeSourceMapEmit : function (writer) { }; var moduleEmitDelegates = (_a = {}, _a[5] = emitES6Module, _a[2] = emitAMDModule, @@ -25964,19 +26324,19 @@ var ts; } function makeTempVariableName(flags) { if (flags && !(tempFlags & flags)) { - var name_19 = flags === 268435456 ? "_i" : "_n"; - if (isUniqueName(name_19)) { + var name_22 = flags === 268435456 ? "_i" : "_n"; + if (isUniqueName(name_22)) { tempFlags |= flags; - return name_19; + return name_22; } } while (true) { var count = tempFlags & 268435455; tempFlags++; if (count !== 8 && count !== 13) { - var name_20 = count < 26 ? "_" + String.fromCharCode(97 + count) : "_" + (count - 26); - if (isUniqueName(name_20)) { - return name_20; + var name_23 = count < 26 ? "_" + String.fromCharCode(97 + count) : "_" + (count - 26); + if (isUniqueName(name_23)) { + return name_23; } } } @@ -26014,17 +26374,17 @@ var ts; switch (node.kind) { case 69: return makeUniqueName(node.text); + case 221: case 220: - case 219: return generateNameForModuleOrEnum(node); - case 224: - case 230: + case 225: + case 231: return generateNameForImportOrExportDeclaration(node); - case 215: case 216: - case 229: + case 217: + case 230: return generateNameForExportDefault(); - case 188: + case 189: return generateNameForClassExpression(); } } @@ -26264,10 +26624,10 @@ var ts; emitParenthesizedIf(node.tag, needsParenthesisForPropertyAccessOrInvocation(node.tag)); write("("); emit(tempVariable); - if (node.template.kind === 185) { + if (node.template.kind === 186) { ts.forEach(node.template.templateSpans, function (templateSpan) { write(", "); - var needsParens = templateSpan.expression.kind === 183 + var needsParens = templateSpan.expression.kind === 184 && templateSpan.expression.operatorToken.kind === 24; emitParenthesizedIf(templateSpan.expression, needsParens); }); @@ -26291,7 +26651,7 @@ var ts; } for (var i = 0, n = node.templateSpans.length; i < n; i++) { var templateSpan = node.templateSpans[i]; - var needsParens = templateSpan.expression.kind !== 174 + var needsParens = templateSpan.expression.kind !== 175 && comparePrecedenceToBinaryPlus(templateSpan.expression) !== 1; if (i > 0 || headEmitted) { write(" + "); @@ -26311,11 +26671,11 @@ var ts; } function templateNeedsParens(template, parent) { switch (parent.kind) { - case 170: case 171: - return parent.expression === template; case 172: - case 174: + return parent.expression === template; + case 173: + case 175: return false; default: return comparePrecedenceToBinaryPlus(parent) !== -1; @@ -26323,7 +26683,7 @@ var ts; } function comparePrecedenceToBinaryPlus(expression) { switch (expression.kind) { - case 183: + case 184: switch (expression.operatorToken.kind) { case 37: case 39: @@ -26335,8 +26695,8 @@ var ts; default: return -1; } - case 186: - case 184: + case 187: + case 185: return -1; default: return 1; @@ -26392,37 +26752,37 @@ var ts; } else { var attrs = openingNode.attributes; - if (ts.forEach(attrs, function (attr) { return attr.kind === 241; })) { + if (ts.forEach(attrs, function (attr) { return attr.kind === 242; })) { emitExpressionIdentifier(syntheticReactRef); write(".__spread("); var haveOpenedObjectLiteral = false; - for (var i_1 = 0; i_1 < attrs.length; i_1++) { - if (attrs[i_1].kind === 241) { - if (i_1 === 0) { + for (var i = 0; i < attrs.length; i++) { + if (attrs[i].kind === 242) { + if (i === 0) { write("{}, "); } if (haveOpenedObjectLiteral) { write("}"); haveOpenedObjectLiteral = false; } - if (i_1 > 0) { + if (i > 0) { write(", "); } - emit(attrs[i_1].expression); + emit(attrs[i].expression); } else { - ts.Debug.assert(attrs[i_1].kind === 240); + ts.Debug.assert(attrs[i].kind === 241); if (haveOpenedObjectLiteral) { write(", "); } else { haveOpenedObjectLiteral = true; - if (i_1 > 0) { + if (i > 0) { write(", "); } write("{"); } - emitJsxAttribute(attrs[i_1]); + emitJsxAttribute(attrs[i]); } } if (haveOpenedObjectLiteral) @@ -26431,7 +26791,7 @@ var ts; } else { write("{"); - for (var i = 0; i < attrs.length; i++) { + for (var i = 0, n = attrs.length; i < n; i++) { if (i > 0) { write(", "); } @@ -26442,10 +26802,10 @@ var ts; } if (children) { for (var i = 0; i < children.length; i++) { - if (children[i].kind === 242 && !(children[i].expression)) { + if (children[i].kind === 243 && !(children[i].expression)) { continue; } - if (children[i].kind === 238) { + if (children[i].kind === 239) { var text = getTextToEmit(children[i]); if (text !== undefined) { write(", \""); @@ -26462,11 +26822,11 @@ var ts; write(")"); emitTrailingComments(openingNode); } - if (node.kind === 235) { + if (node.kind === 236) { emitJsxElement(node.openingElement, node.children); } else { - ts.Debug.assert(node.kind === 236); + ts.Debug.assert(node.kind === 237); emitJsxElement(node); } } @@ -26488,11 +26848,11 @@ var ts; if (i > 0) { write(" "); } - if (attribs[i].kind === 241) { + if (attribs[i].kind === 242) { emitJsxSpreadAttribute(attribs[i]); } else { - ts.Debug.assert(attribs[i].kind === 240); + ts.Debug.assert(attribs[i].kind === 241); emitJsxAttribute(attribs[i]); } } @@ -26500,11 +26860,11 @@ var ts; function emitJsxOpeningOrSelfClosingElement(node) { write("<"); emit(node.tagName); - if (node.attributes.length > 0 || (node.kind === 236)) { + if (node.attributes.length > 0 || (node.kind === 237)) { write(" "); } emitAttributes(node.attributes); - if (node.kind === 236) { + if (node.kind === 237) { write("/>"); } else { @@ -26523,20 +26883,20 @@ var ts; } emitJsxClosingElement(node.closingElement); } - if (node.kind === 235) { + if (node.kind === 236) { emitJsxElement(node); } else { - ts.Debug.assert(node.kind === 236); + ts.Debug.assert(node.kind === 237); emitJsxOpeningOrSelfClosingElement(node); } } function emitExpressionForPropertyName(node) { - ts.Debug.assert(node.kind !== 165); + ts.Debug.assert(node.kind !== 166); if (node.kind === 9) { emitLiteral(node); } - else if (node.kind === 136) { + else if (node.kind === 137) { if (ts.nodeIsDecorated(node.parent)) { if (!computedPropertyNamesToGeneratedNames) { computedPropertyNamesToGeneratedNames = []; @@ -26567,62 +26927,62 @@ var ts; function isExpressionIdentifier(node) { var parent = node.parent; switch (parent.kind) { - case 166: - case 191: - case 183: - case 170: - case 243: - case 136: + case 167: + case 192: case 184: - case 139: - case 177: - case 199: - case 169: - case 229: - case 197: - case 190: - case 201: + case 171: + case 244: + case 137: + case 185: + case 140: + case 178: + case 200: + case 170: + case 230: + case 198: + case 191: case 202: case 203: - case 198: - case 239: - case 236: + case 204: + case 199: + case 240: case 237: - case 241: + case 238: case 242: - case 171: - case 174: - case 182: - case 181: - case 206: - case 248: - case 187: - case 208: + case 243: case 172: - case 192: - case 210: - case 173: - case 178: - case 179: - case 200: - case 207: - case 186: - return true; - case 165: - case 249: - case 138: - case 247: - case 141: - case 213: - return parent.initializer === node; - case 168: - return parent.expression === node; - case 176: case 175: + case 183: + case 182: + case 207: + case 249: + case 188: + case 209: + case 173: + case 193: + case 211: + case 174: + case 179: + case 180: + case 201: + case 208: + case 187: + return true; + case 166: + case 250: + case 139: + case 248: + case 142: + case 214: + return parent.initializer === node; + case 169: + return parent.expression === node; + case 177: + case 176: return parent.body === node; - case 223: + case 224: return parent.moduleReference === node; - case 135: + case 136: return parent.left === node; } return false; @@ -26634,7 +26994,7 @@ var ts; } var container = resolver.getReferencedExportContainer(node); if (container) { - if (container.kind === 250) { + if (container.kind === 251) { if (modulekind !== 5 && modulekind !== 4) { write("exports."); } @@ -26648,15 +27008,15 @@ var ts; if (modulekind !== 5) { var declaration = resolver.getReferencedImportDeclaration(node); if (declaration) { - if (declaration.kind === 225) { + if (declaration.kind === 226) { write(getGeneratedNameForNode(declaration.parent)); write(languageVersion === 0 ? "[\"default\"]" : ".default"); return; } - else if (declaration.kind === 228) { + else if (declaration.kind === 229) { write(getGeneratedNameForNode(declaration.parent.parent.parent)); - var name_21 = declaration.propertyName || declaration.name; - var identifier = ts.getTextOfNodeFromSourceText(currentText, name_21); + var name_24 = declaration.propertyName || declaration.name; + var identifier = ts.getTextOfNodeFromSourceText(currentText, name_24); if (languageVersion === 0 && identifier === "default") { write("[\"default\"]"); } @@ -26685,13 +27045,13 @@ var ts; } function isNameOfNestedRedeclaration(node) { if (languageVersion < 2) { - var parent_6 = node.parent; - switch (parent_6.kind) { - case 165: - case 216: - case 219: - case 213: - return parent_6.name === node && resolver.isNestedRedeclaration(parent_6); + var parent_7 = node.parent; + switch (parent_7.kind) { + case 166: + case 217: + case 220: + case 214: + return parent_7.name === node && resolver.isNestedRedeclaration(parent_7); } } return false; @@ -26699,8 +27059,8 @@ var ts; function emitIdentifier(node) { if (convertedLoopState) { if (node.text == "arguments" && resolver.isArgumentsLocalBinding(node)) { - var name_22 = convertedLoopState.argumentsName || (convertedLoopState.argumentsName = makeUniqueName("arguments")); - write(name_22); + var name_25 = convertedLoopState.argumentsName || (convertedLoopState.argumentsName = makeUniqueName("arguments")); + write(name_25); return; } } @@ -26800,10 +27160,10 @@ var ts; } } function needsParenthesisForAwaitExpressionAsYield(node) { - if (node.parent.kind === 183 && !ts.isAssignmentOperator(node.parent.operatorToken.kind)) { + if (node.parent.kind === 184 && !ts.isAssignmentOperator(node.parent.operatorToken.kind)) { return true; } - else if (node.parent.kind === 184 && node.parent.condition === node) { + else if (node.parent.kind === 185 && node.parent.condition === node) { return true; } return false; @@ -26811,11 +27171,11 @@ var ts; function needsParenthesisForPropertyAccessOrInvocation(node) { switch (node.kind) { case 69: - case 166: - case 168: + case 167: case 169: case 170: - case 174: + case 171: + case 175: return false; } return true; @@ -26832,17 +27192,17 @@ var ts; write(", "); } var e = elements[pos]; - if (e.kind === 187) { + if (e.kind === 188) { e = e.expression; emitParenthesizedIf(e, group === 0 && needsParenthesisForPropertyAccessOrInvocation(e)); pos++; - if (pos === length && group === 0 && needsUniqueCopy && e.kind !== 166) { + if (pos === length && group === 0 && needsUniqueCopy && e.kind !== 167) { write(".slice()"); } } else { var i = pos; - while (i < length && elements[i].kind !== 187) { + while (i < length && elements[i].kind !== 188) { i++; } write("["); @@ -26865,7 +27225,7 @@ var ts; } } function isSpreadElementExpression(node) { - return node.kind === 187; + return node.kind === 188; } function emitArrayLiteral(node) { var elements = node.elements; @@ -26926,7 +27286,7 @@ var ts; writeComma(); var property = properties[i]; emitStart(property); - if (property.kind === 145 || property.kind === 146) { + if (property.kind === 146 || property.kind === 147) { var accessors = ts.getAllAccessorDeclarations(node.properties, property); if (property !== accessors.firstAccessor) { continue; @@ -26977,13 +27337,13 @@ var ts; emitMemberAccessForPropertyName(property.name); emitEnd(property.name); write(" = "); - if (property.kind === 247) { + if (property.kind === 248) { emit(property.initializer); } - else if (property.kind === 248) { + else if (property.kind === 249) { emitExpressionIdentifier(property.name); } - else if (property.kind === 143) { + else if (property.kind === 144) { emitFunctionDeclaration(property); } else { @@ -27015,7 +27375,7 @@ var ts; var numProperties = properties.length; var numInitialNonComputedProperties = numProperties; for (var i = 0, n = properties.length; i < n; i++) { - if (properties[i].name.kind === 136) { + if (properties[i].name.kind === 137) { numInitialNonComputedProperties = i; break; } @@ -27029,35 +27389,35 @@ var ts; emitObjectLiteralBody(node, properties.length); } function createBinaryExpression(left, operator, right, startsOnNewLine) { - var result = ts.createSynthesizedNode(183, startsOnNewLine); + var result = ts.createSynthesizedNode(184, startsOnNewLine); result.operatorToken = ts.createSynthesizedNode(operator); result.left = left; result.right = right; return result; } function createPropertyAccessExpression(expression, name) { - var result = ts.createSynthesizedNode(168); + var result = ts.createSynthesizedNode(169); result.expression = parenthesizeForAccess(expression); result.dotToken = ts.createSynthesizedNode(21); result.name = name; return result; } function createElementAccessExpression(expression, argumentExpression) { - var result = ts.createSynthesizedNode(169); + var result = ts.createSynthesizedNode(170); result.expression = parenthesizeForAccess(expression); result.argumentExpression = argumentExpression; return result; } function parenthesizeForAccess(expr) { - while (expr.kind === 173 || expr.kind === 191) { + while (expr.kind === 174 || expr.kind === 192) { expr = expr.expression; } if (ts.isLeftHandSideExpression(expr) && - expr.kind !== 171 && + expr.kind !== 172 && expr.kind !== 8) { return expr; } - var node = ts.createSynthesizedNode(174); + var node = ts.createSynthesizedNode(175); node.expression = expr; return node; } @@ -27084,7 +27444,7 @@ var ts; } function isNamespaceExportReference(node) { var container = resolver.getReferencedExportContainer(node); - return container && container.kind !== 250; + return container && container.kind !== 251; } function emitShorthandPropertyAssignment(node) { writeTextOfNode(currentText, node.name); @@ -27102,7 +27462,7 @@ var ts; if (constantValue !== undefined) { write(constantValue.toString()); if (!compilerOptions.removeComments) { - var propertyName = node.kind === 168 ? ts.declarationNameToString(node.name) : ts.getTextOfNode(node.argumentExpression); + var propertyName = node.kind === 169 ? ts.declarationNameToString(node.name) : ts.getTextOfNode(node.argumentExpression); write(" /* " + propertyName + " */"); } return true; @@ -27113,7 +27473,7 @@ var ts; if (compilerOptions.isolatedModules) { return undefined; } - return node.kind === 168 || node.kind === 169 + return node.kind === 169 || node.kind === 170 ? resolver.getConstantValue(node) : undefined; } @@ -27193,7 +27553,7 @@ var ts; } emitExpressionIdentifier(node); break; - case 135: + case 136: emitQualifiedNameAsExpression(node, useFallback); break; default: @@ -27211,10 +27571,10 @@ var ts; write("]"); } function hasSpreadElement(elements) { - return ts.forEach(elements, function (e) { return e.kind === 187; }); + return ts.forEach(elements, function (e) { return e.kind === 188; }); } function skipParentheses(node) { - while (node.kind === 174 || node.kind === 173 || node.kind === 191) { + while (node.kind === 175 || node.kind === 174 || node.kind === 192) { node = node.expression; } return node; @@ -27235,12 +27595,12 @@ var ts; function emitCallWithSpread(node) { var target; var expr = skipParentheses(node.expression); - if (expr.kind === 168) { + if (expr.kind === 169) { target = emitCallTarget(expr.expression); write("."); emit(expr.name); } - else if (expr.kind === 169) { + else if (expr.kind === 170) { target = emitCallTarget(expr.expression); write("["); emit(expr.argumentExpression); @@ -27281,7 +27641,7 @@ var ts; } else { emit(node.expression); - superCall = node.expression.kind === 168 && node.expression.expression.kind === 95; + superCall = node.expression.kind === 169 && node.expression.expression.kind === 95; } if (superCall && languageVersion < 2) { write(".call("); @@ -27332,21 +27692,21 @@ var ts; } } function emitParenExpression(node) { - if (!ts.nodeIsSynthesized(node) && node.parent.kind !== 176) { - if (node.expression.kind === 173 || node.expression.kind === 191) { + if (!ts.nodeIsSynthesized(node) && node.parent.kind !== 177) { + if (node.expression.kind === 174 || node.expression.kind === 192) { var operand = node.expression.expression; - while (operand.kind === 173 || operand.kind === 191) { + while (operand.kind === 174 || operand.kind === 192) { operand = operand.expression; } - if (operand.kind !== 181 && + if (operand.kind !== 182 && + operand.kind !== 180 && operand.kind !== 179 && operand.kind !== 178 && - operand.kind !== 177 && - operand.kind !== 182 && - operand.kind !== 171 && - !(operand.kind === 170 && node.parent.kind === 171) && - !(operand.kind === 175 && node.parent.kind === 170) && - !(operand.kind === 8 && node.parent.kind === 168)) { + operand.kind !== 183 && + operand.kind !== 172 && + !(operand.kind === 171 && node.parent.kind === 172) && + !(operand.kind === 176 && node.parent.kind === 171) && + !(operand.kind === 8 && node.parent.kind === 169)) { emit(operand); return; } @@ -27375,7 +27735,7 @@ var ts; if (!isCurrentFileSystemExternalModule() || node.kind !== 69 || ts.nodeIsSynthesized(node)) { return false; } - var isVariableDeclarationOrBindingElement = node.parent && (node.parent.kind === 213 || node.parent.kind === 165); + var isVariableDeclarationOrBindingElement = node.parent && (node.parent.kind === 214 || node.parent.kind === 166); var targetDeclaration = isVariableDeclarationOrBindingElement ? node.parent : resolver.getReferencedValueDeclaration(node); @@ -27390,7 +27750,7 @@ var ts; write("\", "); } write(ts.tokenToString(node.operator)); - if (node.operand.kind === 181) { + if (node.operand.kind === 182) { var operand = node.operand; if (node.operator === 35 && (operand.operator === 35 || operand.operator === 41)) { write(" "); @@ -27433,10 +27793,10 @@ var ts; } var current = node; while (current) { - if (current.kind === 250) { + if (current.kind === 251) { return !isExported || ((ts.getCombinedNodeFlags(node) & 2) !== 0); } - else if (ts.isFunctionLike(current) || current.kind === 221) { + else if (ts.isFunctionLike(current) || current.kind === 222) { return false; } else { @@ -27452,14 +27812,14 @@ var ts; if (ts.isElementAccessExpression(leftHandSideExpression)) { shouldEmitParentheses = true; write("("); - synthesizedLHS = ts.createSynthesizedNode(169, false); + synthesizedLHS = ts.createSynthesizedNode(170, false); var identifier = emitTempVariableAssignment(leftHandSideExpression.expression, false, false); synthesizedLHS.expression = identifier; if (leftHandSideExpression.argumentExpression.kind !== 8 && leftHandSideExpression.argumentExpression.kind !== 9) { var tempArgumentExpression = createAndRecordTempVariable(268435456); synthesizedLHS.argumentExpression = tempArgumentExpression; - emitAssignment(tempArgumentExpression, leftHandSideExpression.argumentExpression, true); + emitAssignment(tempArgumentExpression, leftHandSideExpression.argumentExpression, true, leftHandSideExpression.expression); } else { synthesizedLHS.argumentExpression = leftHandSideExpression.argumentExpression; @@ -27469,7 +27829,7 @@ var ts; else if (ts.isPropertyAccessExpression(leftHandSideExpression)) { shouldEmitParentheses = true; write("("); - synthesizedLHS = ts.createSynthesizedNode(168, false); + synthesizedLHS = ts.createSynthesizedNode(169, false); var identifier = emitTempVariableAssignment(leftHandSideExpression.expression, false, false); synthesizedLHS.expression = identifier; synthesizedLHS.dotToken = leftHandSideExpression.dotToken; @@ -27497,8 +27857,8 @@ var ts; } function emitBinaryExpression(node) { if (languageVersion < 2 && node.operatorToken.kind === 56 && - (node.left.kind === 167 || node.left.kind === 166)) { - emitDestructuring(node, node.parent.kind === 197); + (node.left.kind === 168 || node.left.kind === 167)) { + emitDestructuring(node, node.parent.kind === 198); } else { var exportChanged = node.operatorToken.kind >= 56 && @@ -27550,7 +27910,7 @@ var ts; } } function isSingleLineEmptyBlock(node) { - if (node && node.kind === 194) { + if (node && node.kind === 195) { var block = node; return block.statements.length === 0 && nodeEndIsOnSameLineAsNodeStart(block, block); } @@ -27564,12 +27924,12 @@ var ts; } emitToken(15, node.pos); increaseIndent(); - if (node.kind === 221) { - ts.Debug.assert(node.parent.kind === 220); + if (node.kind === 222) { + ts.Debug.assert(node.parent.kind === 221); emitCaptureThisForNodeIfNecessary(node.parent); } emitLines(node.statements); - if (node.kind === 221) { + if (node.kind === 222) { emitTempDeclarations(true); } decreaseIndent(); @@ -27577,7 +27937,7 @@ var ts; emitToken(16, node.statements.end); } function emitEmbeddedStatement(node) { - if (node.kind === 194) { + if (node.kind === 195) { write(" "); emit(node); } @@ -27589,7 +27949,7 @@ var ts; } } function emitExpressionStatement(node) { - emitParenthesizedIf(node.expression, node.expression.kind === 176); + emitParenthesizedIf(node.expression, node.expression.kind === 177); write(";"); } function emitIfStatement(node) { @@ -27602,7 +27962,7 @@ var ts; if (node.elseStatement) { writeLine(); emitToken(80, node.thenStatement.end); - if (node.elseStatement.kind === 198) { + if (node.elseStatement.kind === 199) { write(" "); emit(node.elseStatement); } @@ -27622,7 +27982,7 @@ var ts; else { emitNormalLoopBody(node, true); } - if (node.statement.kind === 194) { + if (node.statement.kind === 195) { write(" "); } else { @@ -27646,7 +28006,7 @@ var ts; emitNormalLoopBody(node, true); } } - function tryEmitStartOfVariableDeclarationList(decl, startPos) { + function tryEmitStartOfVariableDeclarationList(decl) { if (shouldHoistVariable(decl, true)) { return false; } @@ -27657,31 +28017,20 @@ var ts; } return false; } - var tokenKind = 102; + emitStart(decl); if (decl && languageVersion >= 2) { if (ts.isLet(decl)) { - tokenKind = 108; + write("let "); } else if (ts.isConst(decl)) { - tokenKind = 74; + write("const "); + } + else { + write("var "); } - } - if (startPos !== undefined) { - emitToken(tokenKind, startPos); - write(" "); } else { - switch (tokenKind) { - case 102: - write("var "); - break; - case 108: - write("let "); - break; - case 74: - write("const "); - break; - } + write("var "); } return true; } @@ -27713,7 +28062,7 @@ var ts; } else { var loop = convertLoopBody(node); - if (node.parent.kind === 209) { + if (node.parent.kind === 210) { emitLabelAndColon(node.parent); } loopEmitter(node, loop); @@ -27723,10 +28072,11 @@ var ts; var functionName = makeUniqueName("_loop"); var loopInitializer; switch (node.kind) { - case 201: case 202: case 203: - if (node.initializer.kind === 214) { + case 204: + var initializer = node.initializer; + if (initializer && initializer.kind === 215) { loopInitializer = node.initializer; } break; @@ -27739,7 +28089,7 @@ var ts; collectNames(varDeclaration.name); } } - var bodyIsBlock = node.statement.kind === 194; + var bodyIsBlock = node.statement.kind === 195; var paramList = loopParameters ? loopParameters.join(", ") : ""; writeLine(); write("var " + functionName + " = function(" + paramList + ")"); @@ -27836,7 +28186,7 @@ var ts; if (emitAsEmbeddedStatement) { emitEmbeddedStatement(node.statement); } - else if (node.statement.kind === 194) { + else if (node.statement.kind === 195) { emitLines(node.statement.statements); } else { @@ -27932,9 +28282,9 @@ var ts; var endPos = emitToken(86, node.pos); write(" "); endPos = emitToken(17, endPos); - if (node.initializer && node.initializer.kind === 214) { + if (node.initializer && node.initializer.kind === 215) { var variableDeclarationList = node.initializer; - var startIsEmitted = tryEmitStartOfVariableDeclarationList(variableDeclarationList, endPos); + var startIsEmitted = tryEmitStartOfVariableDeclarationList(variableDeclarationList); if (startIsEmitted) { emitCommaList(variableDeclarationList.declarations); } @@ -27958,7 +28308,7 @@ var ts; } } function emitForInOrForOfStatement(node) { - if (languageVersion < 2 && node.kind === 203) { + if (languageVersion < 2 && node.kind === 204) { emitLoop(node, emitDownLevelForOfStatementWorker); } else { @@ -27969,17 +28319,17 @@ var ts; var endPos = emitToken(86, node.pos); write(" "); endPos = emitToken(17, endPos); - if (node.initializer.kind === 214) { + if (node.initializer.kind === 215) { var variableDeclarationList = node.initializer; if (variableDeclarationList.declarations.length >= 1) { - tryEmitStartOfVariableDeclarationList(variableDeclarationList, endPos); + tryEmitStartOfVariableDeclarationList(variableDeclarationList); emit(variableDeclarationList.declarations[0]); } } else { emit(node.initializer); } - if (node.kind === 202) { + if (node.kind === 203) { write(" in "); } else { @@ -28015,24 +28365,24 @@ var ts; emitNodeWithoutSourceMap(node.expression); emitEnd(node.expression); write("; "); - emitStart(node.initializer); + emitStart(node.expression); emitNodeWithoutSourceMap(counter); write(" < "); emitNodeWithCommentsAndWithoutSourcemap(rhsReference); write(".length"); - emitEnd(node.initializer); + emitEnd(node.expression); write("; "); - emitStart(node.initializer); + emitStart(node.expression); emitNodeWithoutSourceMap(counter); write("++"); - emitEnd(node.initializer); + emitEnd(node.expression); emitToken(18, node.expression.end); write(" {"); writeLine(); increaseIndent(); var rhsIterationValue = createElementAccessExpression(rhsReference, counter); emitStart(node.initializer); - if (node.initializer.kind === 214) { + if (node.initializer.kind === 215) { write("var "); var variableDeclarationList = node.initializer; if (variableDeclarationList.declarations.length > 0) { @@ -28054,7 +28404,7 @@ var ts; } else { var assignmentExpression = createBinaryExpression(node.initializer, 56, rhsIterationValue, false); - if (node.initializer.kind === 166 || node.initializer.kind === 167) { + if (node.initializer.kind === 167 || node.initializer.kind === 168) { emitDestructuring(assignmentExpression, true, undefined); } else { @@ -28076,12 +28426,12 @@ var ts; } function emitBreakOrContinueStatement(node) { if (convertedLoopState) { - var jump = node.kind === 205 ? 2 : 4; + var jump = node.kind === 206 ? 2 : 4; var canUseBreakOrContinue = (node.label && convertedLoopState.labels && convertedLoopState.labels[node.label.text]) || (!node.label && (convertedLoopState.allowedNonLabeledJumps & jump)); if (!canUseBreakOrContinue) { if (!node.label) { - if (node.kind === 205) { + if (node.kind === 206) { convertedLoopState.nonLocalJumps |= 2; write("return \"break\";"); } @@ -28092,7 +28442,7 @@ var ts; } else { var labelMarker; - if (node.kind === 205) { + if (node.kind === 206) { labelMarker = "break-" + node.label.text; setLabeledJump(convertedLoopState, true, node.label.text, labelMarker); } @@ -28105,7 +28455,7 @@ var ts; return; } } - emitToken(node.kind === 205 ? 70 : 75, node.pos); + emitToken(node.kind === 206 ? 70 : 75, node.pos); emitOptional(" ", node.label); write(";"); } @@ -28170,7 +28520,7 @@ var ts; ts.getLineOfLocalPositionFromLineMap(currentLineMap, ts.skipTrivia(currentText, node2.pos)); } function emitCaseOrDefaultClause(node) { - if (node.kind === 243) { + if (node.kind === 244) { write("case "); emit(node.expression); write(":"); @@ -28239,7 +28589,7 @@ var ts; function getContainingModule(node) { do { node = node.parent; - } while (node && node.kind !== 220); + } while (node && node.kind !== 221); return node; } function emitContainingModuleName(node) { @@ -28264,13 +28614,13 @@ var ts; function createVoidZero() { var zero = ts.createSynthesizedNode(8); zero.text = "0"; - var result = ts.createSynthesizedNode(179); + var result = ts.createSynthesizedNode(180); result.expression = zero; return result; } function emitEs6ExportDefaultCompat(node) { - if (node.parent.kind === 250) { - ts.Debug.assert(!!(node.flags & 512) || node.kind === 229); + if (node.parent.kind === 251) { + ts.Debug.assert(!!(node.flags & 512) || node.kind === 230); if (modulekind === 1 || modulekind === 2 || modulekind === 3) { if (!isEs6Module) { if (languageVersion !== 0) { @@ -28355,7 +28705,7 @@ var ts; emitEnd(specifier.name); write(";"); } - function emitAssignment(name, value, shouldEmitCommaBeforeAssignment) { + function emitAssignment(name, value, shouldEmitCommaBeforeAssignment, nodeForSourceMap) { if (shouldEmitCommaBeforeAssignment) { write(", "); } @@ -28365,63 +28715,75 @@ var ts; emitNodeWithCommentsAndWithoutSourcemap(name); write("\", "); } - var isVariableDeclarationOrBindingElement = name.parent && (name.parent.kind === 213 || name.parent.kind === 165); - if (isVariableDeclarationOrBindingElement) { - emitModuleMemberName(name.parent); - } - else { - emit(name); - } - write(" = "); - emit(value); + var isVariableDeclarationOrBindingElement = name.parent && (name.parent.kind === 214 || name.parent.kind === 166); + emitStart(isFirstVariableDeclaration(nodeForSourceMap) ? nodeForSourceMap.parent : nodeForSourceMap); + withTemporaryNoSourceMap(function () { + if (isVariableDeclarationOrBindingElement) { + emitModuleMemberName(name.parent); + } + else { + emit(name); + } + write(" = "); + emit(value); + }); + emitEnd(nodeForSourceMap, true); if (exportChanged) { write(")"); } } - function emitTempVariableAssignment(expression, canDefineTempVariablesInPlace, shouldEmitCommaBeforeAssignment) { + function emitTempVariableAssignment(expression, canDefineTempVariablesInPlace, shouldEmitCommaBeforeAssignment, sourceMapNode) { var identifier = createTempVariable(0); if (!canDefineTempVariablesInPlace) { recordTempDeclaration(identifier); } - emitAssignment(identifier, expression, shouldEmitCommaBeforeAssignment); + emitAssignment(identifier, expression, shouldEmitCommaBeforeAssignment, sourceMapNode || expression.parent); return identifier; } + function isFirstVariableDeclaration(root) { + return root.kind === 214 && + root.parent.kind === 215 && + root.parent.declarations[0] === root; + } function emitDestructuring(root, isAssignmentExpressionStatement, value) { var emitCount = 0; var canDefineTempVariablesInPlace = false; - if (root.kind === 213) { + if (root.kind === 214) { var isExported = ts.getCombinedNodeFlags(root) & 2; var isSourceLevelForSystemModuleKind = shouldHoistDeclarationInSystemJsModule(root); canDefineTempVariablesInPlace = !isExported && !isSourceLevelForSystemModuleKind; } - else if (root.kind === 138) { + else if (root.kind === 139) { canDefineTempVariablesInPlace = true; } - if (root.kind === 183) { + if (root.kind === 184) { emitAssignmentExpression(root); } else { ts.Debug.assert(!isAssignmentExpressionStatement); + if (isFirstVariableDeclaration(root)) { + sourceMap.changeEmitSourcePos(); + } emitBindingElement(root, value); } - function ensureIdentifier(expr, reuseIdentifierExpressions) { + function ensureIdentifier(expr, reuseIdentifierExpressions, sourceMapNode) { if (expr.kind === 69 && reuseIdentifierExpressions) { return expr; } - var identifier = emitTempVariableAssignment(expr, canDefineTempVariablesInPlace, emitCount > 0); + var identifier = emitTempVariableAssignment(expr, canDefineTempVariablesInPlace, emitCount > 0, sourceMapNode); emitCount++; return identifier; } - function createDefaultValueCheck(value, defaultValue) { - value = ensureIdentifier(value, true); - var equals = ts.createSynthesizedNode(183); + function createDefaultValueCheck(value, defaultValue, sourceMapNode) { + value = ensureIdentifier(value, true, sourceMapNode); + var equals = ts.createSynthesizedNode(184); equals.left = value; equals.operatorToken = ts.createSynthesizedNode(32); equals.right = createVoidZero(); return createConditionalExpression(equals, defaultValue, value); } function createConditionalExpression(condition, whenTrue, whenFalse) { - var cond = ts.createSynthesizedNode(184); + var cond = ts.createSynthesizedNode(185); cond.condition = condition; cond.questionToken = ts.createSynthesizedNode(53); cond.whenTrue = whenTrue; @@ -28436,9 +28798,9 @@ var ts; } function createPropertyAccessForDestructuringProperty(object, propName) { var index; - var nameIsComputed = propName.kind === 136; + var nameIsComputed = propName.kind === 137; if (nameIsComputed) { - index = ensureIdentifier(propName.expression, false); + index = ensureIdentifier(propName.expression, false, propName); } else { index = ts.createSynthesizedNode(propName.kind); @@ -28449,7 +28811,7 @@ var ts; : createElementAccessExpression(object, index); } function createSliceCall(value, sliceIndex) { - var call = ts.createSynthesizedNode(170); + var call = ts.createSynthesizedNode(171); var sliceIdentifier = ts.createSynthesizedNode(69); sliceIdentifier.text = "slice"; call.expression = createPropertyAccessExpression(value, sliceIdentifier); @@ -28457,56 +28819,56 @@ var ts; call.arguments[0] = createNumericLiteral(sliceIndex); return call; } - function emitObjectLiteralAssignment(target, value) { + function emitObjectLiteralAssignment(target, value, sourceMapNode) { var properties = target.properties; if (properties.length !== 1) { - value = ensureIdentifier(value, true); + value = ensureIdentifier(value, true, sourceMapNode); } for (var _a = 0, properties_5 = properties; _a < properties_5.length; _a++) { var p = properties_5[_a]; - if (p.kind === 247 || p.kind === 248) { + if (p.kind === 248 || p.kind === 249) { var propName = p.name; - var target_1 = p.kind === 248 ? p : p.initializer || propName; - emitDestructuringAssignment(target_1, createPropertyAccessForDestructuringProperty(value, propName)); + var target_1 = p.kind === 249 ? p : p.initializer || propName; + emitDestructuringAssignment(target_1, createPropertyAccessForDestructuringProperty(value, propName), p); } } } - function emitArrayLiteralAssignment(target, value) { + function emitArrayLiteralAssignment(target, value, sourceMapNode) { var elements = target.elements; if (elements.length !== 1) { - value = ensureIdentifier(value, true); + value = ensureIdentifier(value, true, sourceMapNode); } for (var i = 0; i < elements.length; i++) { var e = elements[i]; - if (e.kind !== 189) { - if (e.kind !== 187) { - emitDestructuringAssignment(e, createElementAccessExpression(value, createNumericLiteral(i))); + if (e.kind !== 190) { + if (e.kind !== 188) { + emitDestructuringAssignment(e, createElementAccessExpression(value, createNumericLiteral(i)), e); } else if (i === elements.length - 1) { - emitDestructuringAssignment(e.expression, createSliceCall(value, i)); + emitDestructuringAssignment(e.expression, createSliceCall(value, i), e); } } } } - function emitDestructuringAssignment(target, value) { - if (target.kind === 248) { + function emitDestructuringAssignment(target, value, sourceMapNode) { + if (target.kind === 249) { if (target.objectAssignmentInitializer) { - value = createDefaultValueCheck(value, target.objectAssignmentInitializer); + value = createDefaultValueCheck(value, target.objectAssignmentInitializer, sourceMapNode); } target = target.name; } - else if (target.kind === 183 && target.operatorToken.kind === 56) { - value = createDefaultValueCheck(value, target.right); + else if (target.kind === 184 && target.operatorToken.kind === 56) { + value = createDefaultValueCheck(value, target.right, sourceMapNode); target = target.left; } - if (target.kind === 167) { - emitObjectLiteralAssignment(target, value); + if (target.kind === 168) { + emitObjectLiteralAssignment(target, value, sourceMapNode); } - else if (target.kind === 166) { - emitArrayLiteralAssignment(target, value); + else if (target.kind === 167) { + emitArrayLiteralAssignment(target, value, sourceMapNode); } else { - emitAssignment(target, value, emitCount > 0); + emitAssignment(target, value, emitCount > 0, sourceMapNode); emitCount++; } } @@ -28517,24 +28879,24 @@ var ts; emit(value); } else if (isAssignmentExpressionStatement) { - emitDestructuringAssignment(target, value); + emitDestructuringAssignment(target, value, ts.nodeIsSynthesized(root) ? target : root); } else { - if (root.parent.kind !== 174) { + if (root.parent.kind !== 175) { write("("); } - value = ensureIdentifier(value, true); - emitDestructuringAssignment(target, value); + value = ensureIdentifier(value, true, root); + emitDestructuringAssignment(target, value, root); write(", "); emit(value); - if (root.parent.kind !== 174) { + if (root.parent.kind !== 175) { write(")"); } } } function emitBindingElement(target, value) { if (target.initializer) { - value = value ? createDefaultValueCheck(value, target.initializer) : target.initializer; + value = value ? createDefaultValueCheck(value, target.initializer, target) : target.initializer; } else if (!value) { value = createVoidZero(); @@ -28544,15 +28906,15 @@ var ts; var elements = pattern.elements; var numElements = elements.length; if (numElements !== 1) { - value = ensureIdentifier(value, numElements !== 0); + value = ensureIdentifier(value, numElements !== 0, target); } for (var i = 0; i < numElements; i++) { var element = elements[i]; - if (pattern.kind === 163) { + if (pattern.kind === 164) { var propName = element.propertyName || element.name; emitBindingElement(element, createPropertyAccessForDestructuringProperty(value, propName)); } - else if (element.kind !== 189) { + else if (element.kind !== 190) { if (!element.dotDotDotToken) { emitBindingElement(element, createElementAccessExpression(value, createNumericLiteral(i))); } @@ -28563,7 +28925,7 @@ var ts; } } else { - emitAssignment(target.name, value, emitCount > 0); + emitAssignment(target.name, value, emitCount > 0, target); emitCount++; } } @@ -28584,8 +28946,8 @@ var ts; var isLetDefinedInLoop = (resolver.getNodeCheckFlags(node) & 16384) && (getCombinedFlagsForIdentifier(node.name) & 8192); if (isLetDefinedInLoop && - node.parent.parent.kind !== 202 && - node.parent.parent.kind !== 203) { + node.parent.parent.kind !== 203 && + node.parent.parent.kind !== 204) { initializer = createVoidZero(); } } @@ -28603,7 +28965,7 @@ var ts; } } function emitExportVariableAssignments(node) { - if (node.kind === 189) { + if (node.kind === 190) { return; } var name = node.name; @@ -28615,7 +28977,7 @@ var ts; } } function getCombinedFlagsForIdentifier(node) { - if (!node.parent || (node.parent.kind !== 213 && node.parent.kind !== 165)) { + if (!node.parent || (node.parent.kind !== 214 && node.parent.kind !== 166)) { return 0; } return ts.getCombinedNodeFlags(node.parent); @@ -28623,7 +28985,7 @@ var ts; function isES6ExportedDeclaration(node) { return !!(node.flags & 2) && modulekind === 5 && - node.parent.kind === 250; + node.parent.kind === 251; } function emitVariableStatement(node) { var startIsEmitted = false; @@ -28668,12 +29030,12 @@ var ts; function emitParameter(node) { if (languageVersion < 2) { if (ts.isBindingPattern(node.name)) { - var name_23 = createTempVariable(0); + var name_26 = createTempVariable(0); if (!tempParameters) { tempParameters = []; } - tempParameters.push(name_23); - emit(name_23); + tempParameters.push(name_26); + emit(name_26); } else { emit(node.name); @@ -28772,12 +29134,12 @@ var ts; } } function emitAccessor(node) { - write(node.kind === 145 ? "get " : "set "); + write(node.kind === 146 ? "get " : "set "); emit(node.name); emitSignatureAndBody(node); } function shouldEmitAsArrowFunction(node) { - return node.kind === 176 && languageVersion >= 2; + return node.kind === 177 && languageVersion >= 2; } function emitDeclarationName(node) { if (node.name) { @@ -28788,10 +29150,10 @@ var ts; } } function shouldEmitFunctionName(node) { - if (node.kind === 175) { + if (node.kind === 176) { return !!node.name; } - if (node.kind === 215) { + if (node.kind === 216) { return !!node.name || modulekind !== 5; } } @@ -28800,12 +29162,12 @@ var ts; return emitCommentsOnNotEmittedNode(node); } var kind = node.kind, parent = node.parent; - if (kind !== 143 && - kind !== 142 && + if (kind !== 144 && + kind !== 143 && parent && - parent.kind !== 247 && - parent.kind !== 170 && - parent.kind !== 166) { + parent.kind !== 248 && + parent.kind !== 171 && + parent.kind !== 167) { emitLeadingComments(node); } emitStart(node); @@ -28826,11 +29188,11 @@ var ts; emitDeclarationName(node); } emitSignatureAndBody(node); - if (modulekind !== 5 && kind === 215 && parent === currentSourceFile && node.name) { + if (modulekind !== 5 && kind === 216 && parent === currentSourceFile && node.name) { emitExportMemberAssignments(node.name); } emitEnd(node); - if (kind !== 143 && kind !== 142) { + if (kind !== 144 && kind !== 143) { emitTrailingComments(node); } } @@ -28862,7 +29224,7 @@ var ts; } function emitAsyncFunctionBodyForES6(node) { var promiseConstructor = ts.getEntityNameFromTypeNode(node.type); - var isArrowFunction = node.kind === 176; + var isArrowFunction = node.kind === 177; var hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 4096) !== 0; if (!isArrowFunction) { write(" {"); @@ -28903,7 +29265,7 @@ var ts; write(" { }"); } else { - if (node.body.kind === 194) { + if (node.body.kind === 195) { emitBlockFunctionBody(node, node.body); } else { @@ -28955,10 +29317,10 @@ var ts; } write(" "); var current = body; - while (current.kind === 173) { + while (current.kind === 174) { current = current.expression; } - emitParenthesizedIf(body, current.kind === 167); + emitParenthesizedIf(body, current.kind === 168); } function emitDownLevelExpressionFunctionBody(node, body) { write(" {"); @@ -29028,9 +29390,9 @@ var ts; function findInitialSuperCall(ctor) { if (ctor.body) { var statement = ctor.body.statements[0]; - if (statement && statement.kind === 197) { + if (statement && statement.kind === 198) { var expr = statement.expression; - if (expr && expr.kind === 170) { + if (expr && expr.kind === 171) { var func = expr.expression; if (func && func.kind === 95) { return statement; @@ -29061,7 +29423,7 @@ var ts; emitNodeWithCommentsAndWithoutSourcemap(memberName); write("]"); } - else if (memberName.kind === 136) { + else if (memberName.kind === 137) { emitComputedPropertyName(memberName); } else { @@ -29073,7 +29435,7 @@ var ts; var properties = []; for (var _a = 0, _b = node.members; _a < _b.length; _a++) { var member = _b[_a]; - if (member.kind === 141 && isStatic === ((member.flags & 64) !== 0) && member.initializer) { + if (member.kind === 142 && isStatic === ((member.flags & 64) !== 0) && member.initializer) { properties.push(member); } } @@ -29113,11 +29475,11 @@ var ts; } function emitMemberFunctionsForES5AndLower(node) { ts.forEach(node.members, function (member) { - if (member.kind === 193) { + if (member.kind === 194) { writeLine(); write(";"); } - else if (member.kind === 143 || node.kind === 142) { + else if (member.kind === 144 || node.kind === 143) { if (!member.body) { return emitCommentsOnNotEmittedNode(member); } @@ -29134,7 +29496,7 @@ var ts; write(";"); emitTrailingComments(member); } - else if (member.kind === 145 || member.kind === 146) { + else if (member.kind === 146 || member.kind === 147) { var accessors = ts.getAllAccessorDeclarations(node.members, member); if (member === accessors.firstAccessor) { writeLine(); @@ -29184,22 +29546,22 @@ var ts; function emitMemberFunctionsForES6AndHigher(node) { for (var _a = 0, _b = node.members; _a < _b.length; _a++) { var member = _b[_a]; - if ((member.kind === 143 || node.kind === 142) && !member.body) { + if ((member.kind === 144 || node.kind === 143) && !member.body) { emitCommentsOnNotEmittedNode(member); } - else if (member.kind === 143 || - member.kind === 145 || - member.kind === 146) { + else if (member.kind === 144 || + member.kind === 146 || + member.kind === 147) { writeLine(); emitLeadingComments(member); emitStart(member); if (member.flags & 64) { write("static "); } - if (member.kind === 145) { + if (member.kind === 146) { write("get "); } - else if (member.kind === 146) { + else if (member.kind === 147) { write("set "); } if (member.asteriskToken) { @@ -29210,7 +29572,7 @@ var ts; emitEnd(member); emitTrailingComments(member); } - else if (member.kind === 193) { + else if (member.kind === 194) { writeLine(); write(";"); } @@ -29235,10 +29597,10 @@ var ts; function emitConstructorWorker(node, baseTypeElement) { var hasInstancePropertyWithInitializer = false; ts.forEach(node.members, function (member) { - if (member.kind === 144 && !member.body) { + if (member.kind === 145 && !member.body) { emitCommentsOnNotEmittedNode(member); } - if (member.kind === 141 && member.initializer && (member.flags & 64) === 0) { + if (member.kind === 142 && member.initializer && (member.flags & 64) === 0) { hasInstancePropertyWithInitializer = true; } }); @@ -29342,7 +29704,7 @@ var ts; } function emitClassLikeDeclarationForES6AndHigher(node) { var thisNodeIsDecorated = ts.nodeIsDecorated(node); - if (node.kind === 216) { + if (node.kind === 217) { if (thisNodeIsDecorated) { if (isES6ExportedDeclaration(node) && !(node.flags & 512)) { write("export "); @@ -29359,7 +29721,7 @@ var ts; } } var staticProperties = getInitializedProperties(node, true); - var isClassExpressionWithStaticProperties = staticProperties.length > 0 && node.kind === 188; + var isClassExpressionWithStaticProperties = staticProperties.length > 0 && node.kind === 189; var tempVariable; if (isClassExpressionWithStaticProperties) { tempVariable = createAndRecordTempVariable(0); @@ -29422,7 +29784,7 @@ var ts; write(";"); } } - else if (node.parent.kind !== 250) { + else if (node.parent.kind !== 251) { writeLine(); emitStart(node); emitModuleMemberName(node); @@ -29434,7 +29796,7 @@ var ts; } } function emitClassLikeDeclarationBelowES6(node) { - if (node.kind === 216) { + if (node.kind === 217) { if (!shouldHoistDeclarationInSystemJsModule(node)) { write("var "); } @@ -29494,11 +29856,11 @@ var ts; emit(baseTypeNode.expression); } write("))"); - if (node.kind === 216) { + if (node.kind === 217) { write(";"); } emitEnd(node); - if (node.kind === 216) { + if (node.kind === 217) { emitExportMemberAssignment(node); } } @@ -29565,7 +29927,7 @@ var ts; } else { decorators = member.decorators; - if (member.kind === 143) { + if (member.kind === 144) { functionLikeMember = member; } } @@ -29591,7 +29953,7 @@ var ts; write(", "); emitExpressionForPropertyName(member.name); if (languageVersion > 0) { - if (member.kind !== 141) { + if (member.kind !== 142) { write(", null"); } else { @@ -29626,45 +29988,45 @@ var ts; } function shouldEmitTypeMetadata(node) { switch (node.kind) { - case 143: - case 145: + case 144: case 146: - case 141: + case 147: + case 142: return true; } return false; } function shouldEmitReturnTypeMetadata(node) { switch (node.kind) { - case 143: + case 144: return true; } return false; } function shouldEmitParamTypesMetadata(node) { switch (node.kind) { - case 216: - case 143: - case 146: + case 217: + case 144: + case 147: return true; } return false; } function emitSerializedTypeOfNode(node) { switch (node.kind) { - case 216: + case 217: write("Function"); return; - case 141: + case 142: emitSerializedTypeNode(node.type); return; - case 138: - emitSerializedTypeNode(node.type); - return; - case 145: + case 139: emitSerializedTypeNode(node.type); return; case 146: + emitSerializedTypeNode(node.type); + return; + case 147: emitSerializedTypeNode(ts.getSetAccessorTypeAnnotationNode(node)); return; } @@ -29680,23 +30042,23 @@ var ts; case 103: write("void 0"); return; - case 160: + case 161: emitSerializedTypeNode(node.type); return; - case 152: case 153: + case 154: write("Function"); return; - case 156: case 157: + case 158: write("Array"); return; - case 150: + case 151: case 120: write("Boolean"); return; case 130: - case 162: + case 163: write("String"); return; case 128: @@ -29705,15 +30067,15 @@ var ts; case 131: write("Symbol"); return; - case 151: + case 152: emitSerializedTypeReferenceNode(node); return; - case 154: case 155: - case 158: + case 156: case 159: + case 160: case 117: - case 161: + case 162: break; default: ts.Debug.fail("Cannot serialize unexpected type node."); @@ -29777,7 +30139,7 @@ var ts; function emitSerializedParameterTypesOfNode(node) { if (node) { var valueDeclaration; - if (node.kind === 216) { + if (node.kind === 217) { valueDeclaration = ts.getFirstConstructorWithBody(node); } else if (ts.isFunctionLike(node) && ts.nodeIsPresent(node.body)) { @@ -29793,10 +30155,10 @@ var ts; } if (parameters[i].dotDotDotToken) { var parameterType = parameters[i].type; - if (parameterType.kind === 156) { + if (parameterType.kind === 157) { parameterType = parameterType.elementType; } - else if (parameterType.kind === 151 && parameterType.typeArguments && parameterType.typeArguments.length === 1) { + else if (parameterType.kind === 152 && parameterType.typeArguments && parameterType.typeArguments.length === 1) { parameterType = parameterType.typeArguments[0]; } else { @@ -29868,7 +30230,7 @@ var ts; } if (!shouldHoistDeclarationInSystemJsModule(node)) { var isES6ExportedEnum = isES6ExportedDeclaration(node); - if (!(node.flags & 2) || (isES6ExportedEnum && isFirstDeclarationOfKind(node, node.symbol && node.symbol.declarations, 219))) { + if (!(node.flags & 2) || (isES6ExportedEnum && isFirstDeclarationOfKind(node, node.symbol && node.symbol.declarations, 220))) { emitStart(node); if (isES6ExportedEnum) { write("export "); @@ -29948,7 +30310,7 @@ var ts; } } function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 220) { + if (moduleDeclaration.body.kind === 221) { var recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); return recursiveInnerModule || moduleDeclaration.body; } @@ -29971,7 +30333,7 @@ var ts; var emitVarForModule = !hoistedInDeclarationScope && !isModuleMergedWithES6Class(node); if (emitVarForModule) { var isES6ExportedNamespace = isES6ExportedDeclaration(node); - if (!isES6ExportedNamespace || isFirstDeclarationOfKind(node, node.symbol && node.symbol.declarations, 220)) { + if (!isES6ExportedNamespace || isFirstDeclarationOfKind(node, node.symbol && node.symbol.declarations, 221)) { emitStart(node); if (isES6ExportedNamespace) { write("export "); @@ -29989,7 +30351,7 @@ var ts; write(getGeneratedNameForNode(node)); emitEnd(node.name); write(") "); - if (node.body.kind === 221) { + if (node.body.kind === 222) { var saveConvertedLoopState = convertedLoopState; var saveTempFlags = tempFlags; var saveTempVariables = tempVariables; @@ -30060,16 +30422,16 @@ var ts; } } function getNamespaceDeclarationNode(node) { - if (node.kind === 223) { + if (node.kind === 224) { return node; } var importClause = node.importClause; - if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 226) { + if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 227) { return importClause.namedBindings; } } function isDefaultImport(node) { - return node.kind === 224 && node.importClause && !!node.importClause.name; + return node.kind === 225 && node.importClause && !!node.importClause.name; } function emitExportImportAssignments(node) { if (ts.isAliasSymbolDeclaration(node) && resolver.isValueAliasDeclaration(node)) { @@ -30096,7 +30458,7 @@ var ts; if (shouldEmitNamedBindings) { emitLeadingComments(node.importClause.namedBindings); emitStart(node.importClause.namedBindings); - if (node.importClause.namedBindings.kind === 226) { + if (node.importClause.namedBindings.kind === 227) { write("* as "); emit(node.importClause.namedBindings.name); } @@ -30122,7 +30484,7 @@ var ts; } function emitExternalImportDeclaration(node) { if (ts.contains(externalImports, node)) { - var isExportedImport = node.kind === 223 && (node.flags & 2) !== 0; + var isExportedImport = node.kind === 224 && (node.flags & 2) !== 0; var namespaceDeclaration = getNamespaceDeclarationNode(node); if (modulekind !== 2) { emitLeadingComments(node); @@ -30134,7 +30496,7 @@ var ts; write(" = "); } else { - var isNakedImport = 224 && !node.importClause; + var isNakedImport = 225 && !node.importClause; if (!isNakedImport) { write("var "); write(getGeneratedNameForNode(node)); @@ -30301,8 +30663,8 @@ var ts; write("export default "); var expression = node.expression; emit(expression); - if (expression.kind !== 215 && - expression.kind !== 216) { + if (expression.kind !== 216 && + expression.kind !== 217) { write(";"); } emitEnd(node); @@ -30339,18 +30701,18 @@ var ts; for (var _a = 0, _b = sourceFile.statements; _a < _b.length; _a++) { var node = _b[_a]; switch (node.kind) { - case 224: + case 225: if (!node.importClause || resolver.isReferencedAliasDeclaration(node.importClause, true)) { externalImports.push(node); } break; - case 223: - if (node.moduleReference.kind === 234 && resolver.isReferencedAliasDeclaration(node)) { + case 224: + if (node.moduleReference.kind === 235 && resolver.isReferencedAliasDeclaration(node)) { externalImports.push(node); } break; - case 230: + case 231: if (node.moduleSpecifier) { if (!node.exportClause) { if (resolver.moduleExportsSomeValue(node.moduleSpecifier)) { @@ -30365,12 +30727,12 @@ var ts; else { for (var _c = 0, _d = node.exportClause.elements; _c < _d.length; _c++) { var specifier = _d[_c]; - var name_24 = (specifier.propertyName || specifier.name).text; - (exportSpecifiers[name_24] || (exportSpecifiers[name_24] = [])).push(specifier); + var name_27 = (specifier.propertyName || specifier.name).text; + (exportSpecifiers[name_27] || (exportSpecifiers[name_27] = [])).push(specifier); } } break; - case 229: + case 230: if (node.isExportEquals && !exportEquals) { exportEquals = node; } @@ -30395,18 +30757,18 @@ var ts; if (namespaceDeclaration && !isDefaultImport(node)) { return ts.getTextOfNodeFromSourceText(currentText, namespaceDeclaration.name); } - if (node.kind === 224 && node.importClause) { + if (node.kind === 225 && node.importClause) { return getGeneratedNameForNode(node); } - if (node.kind === 230 && node.moduleSpecifier) { + if (node.kind === 231 && node.moduleSpecifier) { return getGeneratedNameForNode(node); } } function getExternalModuleNameText(importNode, emitRelativePathAsModuleName) { if (emitRelativePathAsModuleName) { - var name_25 = getExternalModuleNameFromDeclaration(host, resolver, importNode); - if (name_25) { - return "\"" + name_25 + "\""; + var name_28 = getExternalModuleNameFromDeclaration(host, resolver, importNode); + if (name_28) { + return "\"" + name_28 + "\""; } } var moduleName = ts.getExternalModuleName(importNode); @@ -30423,8 +30785,8 @@ var ts; var started = false; for (var _a = 0, externalImports_1 = externalImports; _a < externalImports_1.length; _a++) { var importNode = externalImports_1[_a]; - var skipNode = importNode.kind === 230 || - (importNode.kind === 224 && !importNode.importClause); + var skipNode = importNode.kind === 231 || + (importNode.kind === 225 && !importNode.importClause); if (skipNode) { continue; } @@ -30449,7 +30811,7 @@ var ts; var hasExportDeclarationWithExportClause = false; for (var _a = 0, externalImports_2 = externalImports; _a < externalImports_2.length; _a++) { var externalImport = externalImports_2[_a]; - if (externalImport.kind === 230 && externalImport.exportClause) { + if (externalImport.kind === 231 && externalImport.exportClause) { hasExportDeclarationWithExportClause = true; break; } @@ -30478,7 +30840,7 @@ var ts; } for (var _d = 0, externalImports_3 = externalImports; _d < externalImports_3.length; _d++) { var externalImport = externalImports_3[_d]; - if (externalImport.kind !== 230) { + if (externalImport.kind !== 231) { continue; } var exportDecl = externalImport; @@ -30552,11 +30914,11 @@ var ts; var seen = {}; for (var i = 0; i < hoistedVars.length; i++) { var local = hoistedVars[i]; - var name_26 = local.kind === 69 + var name_29 = local.kind === 69 ? local : local.name; - if (name_26) { - var text = ts.unescapeIdentifier(name_26.text); + if (name_29) { + var text = ts.unescapeIdentifier(name_29.text); if (ts.hasProperty(seen, text)) { continue; } @@ -30567,7 +30929,7 @@ var ts; if (i !== 0) { write(", "); } - if (local.kind === 216 || local.kind === 220 || local.kind === 219) { + if (local.kind === 217 || local.kind === 221 || local.kind === 220) { emitDeclarationName(local); } else { @@ -30601,21 +30963,21 @@ var ts; if (node.flags & 4) { return; } - if (node.kind === 215) { + if (node.kind === 216) { if (!hoistedFunctionDeclarations) { hoistedFunctionDeclarations = []; } hoistedFunctionDeclarations.push(node); return; } - if (node.kind === 216) { + if (node.kind === 217) { if (!hoistedVars) { hoistedVars = []; } hoistedVars.push(node); return; } - if (node.kind === 219) { + if (node.kind === 220) { if (shouldEmitEnumDeclaration(node)) { if (!hoistedVars) { hoistedVars = []; @@ -30624,7 +30986,7 @@ var ts; } return; } - if (node.kind === 220) { + if (node.kind === 221) { if (shouldEmitModuleDeclaration(node)) { if (!hoistedVars) { hoistedVars = []; @@ -30633,17 +30995,17 @@ var ts; } return; } - if (node.kind === 213 || node.kind === 165) { + if (node.kind === 214 || node.kind === 166) { if (shouldHoistVariable(node, false)) { - var name_27 = node.name; - if (name_27.kind === 69) { + var name_30 = node.name; + if (name_30.kind === 69) { if (!hoistedVars) { hoistedVars = []; } - hoistedVars.push(name_27); + hoistedVars.push(name_30); } else { - ts.forEachChild(name_27, visit); + ts.forEachChild(name_30, visit); } } return; @@ -30669,7 +31031,7 @@ var ts; return false; } return (ts.getCombinedNodeFlags(node) & 24576) === 0 || - ts.getEnclosingBlockScopeContainer(node).kind === 250; + ts.getEnclosingBlockScopeContainer(node).kind === 251; } function isCurrentFileSystemExternalModule() { return modulekind === 4 && isCurrentFileExternalModule; @@ -30707,29 +31069,29 @@ var ts; var entry = group_1[_a]; var importVariableName = getLocalNameForExternalImport(entry) || ""; switch (entry.kind) { - case 224: + case 225: if (!entry.importClause) { break; } - case 223: + case 224: ts.Debug.assert(importVariableName !== ""); writeLine(); write(importVariableName + " = " + parameterName + ";"); writeLine(); break; - case 230: + case 231: ts.Debug.assert(importVariableName !== ""); if (entry.exportClause) { writeLine(); write(exportFunctionForFile + "({"); writeLine(); increaseIndent(); - for (var i_2 = 0, len = entry.exportClause.elements.length; i_2 < len; i_2++) { - if (i_2 !== 0) { + for (var i_1 = 0, len = entry.exportClause.elements.length; i_1 < len; i_1++) { + if (i_1 !== 0) { write(","); writeLine(); } - var e = entry.exportClause.elements[i_2]; + var e = entry.exportClause.elements[i_1]; write("\""); emitNodeWithCommentsAndWithoutSourcemap(e.name); write("\": " + parameterName + "[\""); @@ -30761,10 +31123,10 @@ var ts; for (var i = startIndex; i < node.statements.length; i++) { var statement = node.statements[i]; switch (statement.kind) { - case 215: - case 224: + case 216: + case 225: continue; - case 230: + case 231: if (!statement.moduleSpecifier) { for (var _a = 0, _b = statement.exportClause.elements; _a < _b.length; _a++) { var element = _b[_a]; @@ -30772,7 +31134,7 @@ var ts; } } continue; - case 223: + case 224: if (!ts.isInternalModuleImportEqualsDeclaration(statement)) { continue; } @@ -31088,22 +31450,22 @@ var ts; } function emitEmitHelpers(node) { if (!compilerOptions.noEmitHelpers) { - if ((languageVersion < 2) && (!extendsEmitted && resolver.getNodeCheckFlags(node) & 8)) { + if ((languageVersion < 2) && (!extendsEmitted && node.flags & 4194304)) { writeLines(extendsHelper); extendsEmitted = true; } - if (!decorateEmitted && resolver.getNodeCheckFlags(node) & 16) { + if (!decorateEmitted && node.flags & 8388608) { writeLines(decorateHelper); if (compilerOptions.emitDecoratorMetadata) { writeLines(metadataHelper); } decorateEmitted = true; } - if (!paramEmitted && resolver.getNodeCheckFlags(node) & 32) { + if (!paramEmitted && node.flags & 16777216) { writeLines(paramHelper); paramEmitted = true; } - if (!awaiterEmitted && resolver.getNodeCheckFlags(node) & 64) { + if (!awaiterEmitted && node.flags & 33554432) { writeLines(awaiterHelper); awaiterEmitted = true; } @@ -31171,30 +31533,43 @@ var ts; emitJavaScriptWorker(node); } } + function changeSourceMapEmit(writer) { + sourceMap = writer; + emitStart = writer.emitStart; + emitEnd = writer.emitEnd; + emitPos = writer.emitPos; + setSourceFile = writer.setSourceFile; + } + function withTemporaryNoSourceMap(callback) { + var prevSourceMap = sourceMap; + setSourceMapWriterEmit(ts.getNullSourceMapWriter()); + callback(); + setSourceMapWriterEmit(prevSourceMap); + } function isSpecializedCommentHandling(node) { switch (node.kind) { - case 217: - case 215: - case 224: - case 223: case 218: - case 229: + case 216: + case 225: + case 224: + case 219: + case 230: return true; } } function shouldEmitLeadingAndTrailingComments(node) { switch (node.kind) { - case 195: + case 196: return shouldEmitLeadingAndTrailingCommentsForVariableStatement(node); - case 220: + case 221: return shouldEmitModuleDeclaration(node); - case 219: + case 220: return shouldEmitEnumDeclaration(node); } ts.Debug.assert(!isSpecializedCommentHandling(node)); - if (node.kind !== 194 && + if (node.kind !== 195 && node.parent && - node.parent.kind === 176 && + node.parent.kind === 177 && node.parent.body === node && compilerOptions.target <= 1) { return false; @@ -31205,13 +31580,13 @@ var ts; switch (node.kind) { case 69: return emitIdentifier(node); - case 138: + case 139: return emitParameter(node); + case 144: case 143: - case 142: return emitMethod(node); - case 145: case 146: + case 147: return emitAccessor(node); case 97: return emitThis(node); @@ -31231,142 +31606,142 @@ var ts; case 13: case 14: return emitLiteral(node); - case 185: - return emitTemplateExpression(node); - case 192: - return emitTemplateSpan(node); - case 235: - case 236: - return emitJsxElement(node); - case 238: - return emitJsxText(node); - case 242: - return emitJsxExpression(node); - case 135: - return emitQualifiedName(node); - case 163: - return emitObjectBindingPattern(node); - case 164: - return emitArrayBindingPattern(node); - case 165: - return emitBindingElement(node); - case 166: - return emitArrayLiteral(node); - case 167: - return emitObjectLiteral(node); - case 247: - return emitPropertyAssignment(node); - case 248: - return emitShorthandPropertyAssignment(node); - case 136: - return emitComputedPropertyName(node); - case 168: - return emitPropertyAccess(node); - case 169: - return emitIndexedAccess(node); - case 170: - return emitCallExpression(node); - case 171: - return emitNewExpression(node); - case 172: - return emitTaggedTemplateExpression(node); - case 173: - return emit(node.expression); - case 191: - return emit(node.expression); - case 174: - return emitParenExpression(node); - case 215: - case 175: - case 176: - return emitFunctionDeclaration(node); - case 177: - return emitDeleteExpression(node); - case 178: - return emitTypeOfExpression(node); - case 179: - return emitVoidExpression(node); - case 180: - return emitAwaitExpression(node); - case 181: - return emitPrefixUnaryExpression(node); - case 182: - return emitPostfixUnaryExpression(node); - case 183: - return emitBinaryExpression(node); - case 184: - return emitConditionalExpression(node); - case 187: - return emitSpreadElementExpression(node); case 186: - return emitYieldExpression(node); - case 189: - return; - case 194: - case 221: - return emitBlock(node); - case 195: - return emitVariableStatement(node); - case 196: - return write(";"); - case 197: - return emitExpressionStatement(node); - case 198: - return emitIfStatement(node); - case 199: - return emitDoStatement(node); - case 200: - return emitWhileStatement(node); - case 201: - return emitForStatement(node); - case 203: - case 202: - return emitForInOrForOfStatement(node); - case 204: - case 205: - return emitBreakOrContinueStatement(node); - case 206: - return emitReturnStatement(node); - case 207: - return emitWithStatement(node); - case 208: - return emitSwitchStatement(node); + return emitTemplateExpression(node); + case 193: + return emitTemplateSpan(node); + case 236: + case 237: + return emitJsxElement(node); + case 239: + return emitJsxText(node); case 243: - case 244: - return emitCaseOrDefaultClause(node); - case 209: - return emitLabeledStatement(node); - case 210: - return emitThrowStatement(node); - case 211: - return emitTryStatement(node); - case 246: - return emitCatchClause(node); - case 212: - return emitDebuggerStatement(node); - case 213: - return emitVariableDeclaration(node); - case 188: - return emitClassExpression(node); - case 216: - return emitClassDeclaration(node); - case 217: - return emitInterfaceDeclaration(node); - case 219: - return emitEnumDeclaration(node); + return emitJsxExpression(node); + case 136: + return emitQualifiedName(node); + case 164: + return emitObjectBindingPattern(node); + case 165: + return emitArrayBindingPattern(node); + case 166: + return emitBindingElement(node); + case 167: + return emitArrayLiteral(node); + case 168: + return emitObjectLiteral(node); + case 248: + return emitPropertyAssignment(node); case 249: - return emitEnumMember(node); + return emitShorthandPropertyAssignment(node); + case 137: + return emitComputedPropertyName(node); + case 169: + return emitPropertyAccess(node); + case 170: + return emitIndexedAccess(node); + case 171: + return emitCallExpression(node); + case 172: + return emitNewExpression(node); + case 173: + return emitTaggedTemplateExpression(node); + case 174: + return emit(node.expression); + case 192: + return emit(node.expression); + case 175: + return emitParenExpression(node); + case 216: + case 176: + case 177: + return emitFunctionDeclaration(node); + case 178: + return emitDeleteExpression(node); + case 179: + return emitTypeOfExpression(node); + case 180: + return emitVoidExpression(node); + case 181: + return emitAwaitExpression(node); + case 182: + return emitPrefixUnaryExpression(node); + case 183: + return emitPostfixUnaryExpression(node); + case 184: + return emitBinaryExpression(node); + case 185: + return emitConditionalExpression(node); + case 188: + return emitSpreadElementExpression(node); + case 187: + return emitYieldExpression(node); + case 190: + return; + case 195: + case 222: + return emitBlock(node); + case 196: + return emitVariableStatement(node); + case 197: + return write(";"); + case 198: + return emitExpressionStatement(node); + case 199: + return emitIfStatement(node); + case 200: + return emitDoStatement(node); + case 201: + return emitWhileStatement(node); + case 202: + return emitForStatement(node); + case 204: + case 203: + return emitForInOrForOfStatement(node); + case 205: + case 206: + return emitBreakOrContinueStatement(node); + case 207: + return emitReturnStatement(node); + case 208: + return emitWithStatement(node); + case 209: + return emitSwitchStatement(node); + case 244: + case 245: + return emitCaseOrDefaultClause(node); + case 210: + return emitLabeledStatement(node); + case 211: + return emitThrowStatement(node); + case 212: + return emitTryStatement(node); + case 247: + return emitCatchClause(node); + case 213: + return emitDebuggerStatement(node); + case 214: + return emitVariableDeclaration(node); + case 189: + return emitClassExpression(node); + case 217: + return emitClassDeclaration(node); + case 218: + return emitInterfaceDeclaration(node); case 220: - return emitModuleDeclaration(node); - case 224: - return emitImportDeclaration(node); - case 223: - return emitImportEqualsDeclaration(node); - case 230: - return emitExportDeclaration(node); - case 229: - return emitExportAssignment(node); + return emitEnumDeclaration(node); case 250: + return emitEnumMember(node); + case 221: + return emitModuleDeclaration(node); + case 225: + return emitImportDeclaration(node); + case 224: + return emitImportEqualsDeclaration(node); + case 231: + return emitExportDeclaration(node); + case 230: + return emitExportAssignment(node); + case 251: return emitSourceFileNode(node); } } @@ -31396,7 +31771,7 @@ var ts; } function getLeadingCommentsToEmit(node) { if (node.parent) { - if (node.parent.kind === 250 || node.pos !== node.parent.pos) { + if (node.parent.kind === 251 || node.pos !== node.parent.pos) { if (hasDetachedComments(node.pos)) { return getLeadingCommentsWithoutDetachedComments(); } @@ -31408,7 +31783,7 @@ var ts; } function getTrailingCommentsToEmit(node) { if (node.parent) { - if (node.parent.kind === 250 || node.end !== node.parent.end) { + if (node.parent.kind === 251 || node.end !== node.parent.end) { return ts.getTrailingCommentRanges(currentText, node.end); } } @@ -31794,7 +32169,23 @@ var ts; var currentDirectory = host.getCurrentDirectory(); var resolveModuleNamesWorker = host.resolveModuleNames ? (function (moduleNames, containingFile) { return host.resolveModuleNames(moduleNames, containingFile); }) - : (function (moduleNames, containingFile) { return ts.map(moduleNames, function (moduleName) { return resolveModuleName(moduleName, containingFile, options, host).resolvedModule; }); }); + : (function (moduleNames, containingFile) { + var resolvedModuleNames = []; + var lookup = {}; + for (var _i = 0, moduleNames_1 = moduleNames; _i < moduleNames_1.length; _i++) { + var moduleName = moduleNames_1[_i]; + var resolvedName = void 0; + if (ts.hasProperty(lookup, moduleName)) { + resolvedName = lookup[moduleName]; + } + else { + resolvedName = resolveModuleName(moduleName, containingFile, options, host).resolvedModule; + lookup[moduleName] = resolvedName; + } + resolvedModuleNames.push(resolvedName); + } + return resolvedModuleNames; + }); var filesByName = ts.createFileMap(); var filesByNameIgnoreCase = host.useCaseSensitiveFileNames() ? ts.createFileMap(function (fileName) { return fileName.toLowerCase(); }) : undefined; if (oldProgram) { @@ -31896,8 +32287,11 @@ var ts; if (!ts.arrayIsEqualTo(oldSourceFile.imports, newSourceFile.imports, moduleNameIsEqualTo)) { return false; } + if (!ts.arrayIsEqualTo(oldSourceFile.moduleAugmentations, newSourceFile.moduleAugmentations, moduleNameIsEqualTo)) { + return false; + } if (resolveModuleNamesWorker) { - var moduleNames = ts.map(newSourceFile.imports, function (name) { return name.text; }); + var moduleNames = ts.map(ts.concatenate(newSourceFile.imports, newSourceFile.moduleAugmentations), getTextOfLiteral); var resolutions = resolveModuleNamesWorker(moduleNames, ts.getNormalizedAbsolutePath(newSourceFile.fileName, currentDirectory)); for (var i = 0; i < moduleNames.length; i++) { var newResolution = resolutions[i]; @@ -32034,44 +32428,44 @@ var ts; return false; } switch (node.kind) { - case 223: + case 224: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.import_can_only_be_used_in_a_ts_file)); return true; - case 229: + case 230: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.export_can_only_be_used_in_a_ts_file)); return true; - case 216: + case 217: var classDeclaration = node; if (checkModifiers(classDeclaration.modifiers) || checkTypeParameters(classDeclaration.typeParameters)) { return true; } break; - case 245: + case 246: var heritageClause = node; if (heritageClause.token === 106) { diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.implements_clauses_can_only_be_used_in_a_ts_file)); return true; } break; - case 217: + case 218: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.interface_declarations_can_only_be_used_in_a_ts_file)); return true; - case 220: + case 221: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.module_declarations_can_only_be_used_in_a_ts_file)); return true; - case 218: + case 219: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.type_aliases_can_only_be_used_in_a_ts_file)); return true; - case 143: - case 142: case 144: + case 143: case 145: case 146: - case 175: - case 215: + case 147: case 176: - case 215: + case 216: + case 177: + case 216: var functionDeclaration = node; if (checkModifiers(functionDeclaration.modifiers) || checkTypeParameters(functionDeclaration.typeParameters) || @@ -32079,20 +32473,20 @@ var ts; return true; } break; - case 195: + case 196: var variableStatement = node; if (checkModifiers(variableStatement.modifiers)) { return true; } break; - case 213: + case 214: var variableDeclaration = node; if (checkTypeAnnotation(variableDeclaration.type)) { return true; } break; - case 170: case 171: + case 172: var expression = node; if (expression.typeArguments && expression.typeArguments.length > 0) { var start_2 = expression.typeArguments.pos; @@ -32100,7 +32494,7 @@ var ts; return true; } break; - case 138: + case 139: var parameter = node; if (parameter.modifiers) { var start_3 = parameter.modifiers.pos; @@ -32116,17 +32510,17 @@ var ts; return true; } break; - case 141: + case 142: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.property_declarations_can_only_be_used_in_a_ts_file)); return true; - case 219: + case 220: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.enum_declarations_can_only_be_used_in_a_ts_file)); return true; - case 173: + case 174: var typeAssertionExpression = node; diagnostics.push(ts.createDiagnosticForNode(typeAssertionExpression.type, ts.Diagnostics.type_assertion_expressions_can_only_be_used_in_a_ts_file)); return true; - case 139: + case 140: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.decorators_can_only_be_used_in_a_ts_file)); return true; } @@ -32202,51 +32596,64 @@ var ts; function moduleNameIsEqualTo(a, b) { return a.text === b.text; } + function getTextOfLiteral(literal) { + return literal.text; + } function collectExternalModuleReferences(file) { if (file.imports) { return; } var isJavaScriptFile = ts.isSourceFileJavaScript(file); + var isExternalModuleFile = ts.isExternalModule(file); var imports; + var moduleAugmentations; for (var _i = 0, _a = file.statements; _i < _a.length; _i++) { var node = _a[_i]; - collect(node, true, false); + collectModuleReferences(node, false); + if (isJavaScriptFile) { + collectRequireCalls(node); + } } file.imports = imports || emptyArray; + file.moduleAugmentations = moduleAugmentations || emptyArray; return; - function collect(node, allowRelativeModuleNames, collectOnlyRequireCalls) { - if (!collectOnlyRequireCalls) { - switch (node.kind) { - case 224: - case 223: - case 230: - var moduleNameExpr = ts.getExternalModuleName(node); - if (!moduleNameExpr || moduleNameExpr.kind !== 9) { - break; - } - if (!moduleNameExpr.text) { - break; - } - if (allowRelativeModuleNames || !ts.isExternalModuleNameRelative(moduleNameExpr.text)) { - (imports || (imports = [])).push(moduleNameExpr); - } + function collectModuleReferences(node, inAmbientModule) { + switch (node.kind) { + case 225: + case 224: + case 231: + var moduleNameExpr = ts.getExternalModuleName(node); + if (!moduleNameExpr || moduleNameExpr.kind !== 9) { break; - case 220: - if (node.name.kind === 9 && (node.flags & 4 || ts.isDeclarationFile(file))) { - ts.forEachChild(node.body, function (node) { - collect(node, false, collectOnlyRequireCalls); - }); - } + } + if (!moduleNameExpr.text) { break; - } + } + if (!inAmbientModule || !ts.isExternalModuleNameRelative(moduleNameExpr.text)) { + (imports || (imports = [])).push(moduleNameExpr); + } + break; + case 221: + if (ts.isAmbientModule(node) && (inAmbientModule || node.flags & 4 || ts.isDeclarationFile(file))) { + var moduleName = node.name; + if (isExternalModuleFile || (inAmbientModule && !ts.isExternalModuleNameRelative(moduleName.text))) { + (moduleAugmentations || (moduleAugmentations = [])).push(moduleName); + } + else if (!inAmbientModule) { + for (var _i = 0, _a = node.body.statements; _i < _a.length; _i++) { + var statement = _a[_i]; + collectModuleReferences(statement, true); + } + } + } } - if (isJavaScriptFile) { - if (ts.isRequireCall(node)) { - (imports || (imports = [])).push(node.arguments[0]); - } - else { - ts.forEachChild(node, function (node) { return collect(node, allowRelativeModuleNames, true); }); - } + } + function collectRequireCalls(node) { + if (ts.isRequireCall(node)) { + (imports || (imports = [])).push(node.arguments[0]); + } + else { + ts.forEachChild(node, collectRequireCalls); } } } @@ -32352,14 +32759,17 @@ var ts; } function processImportedModules(file, basePath) { collectExternalModuleReferences(file); - if (file.imports.length) { + if (file.imports.length || file.moduleAugmentations.length) { file.resolvedModules = {}; - var moduleNames = ts.map(file.imports, function (name) { return name.text; }); + var moduleNames = ts.map(ts.concatenate(file.imports, file.moduleAugmentations), getTextOfLiteral); var resolutions = resolveModuleNamesWorker(moduleNames, ts.getNormalizedAbsolutePath(file.fileName, currentDirectory)); - for (var i = 0; i < file.imports.length; i++) { + for (var i = 0; i < moduleNames.length; i++) { var resolution = resolutions[i]; ts.setResolvedModule(file, moduleNames[i], resolution); - if (resolution && !options.noResolve) { + var shouldAddFile = resolution && + !options.noResolve && + i < file.imports.length; + if (shouldAddFile) { var importedFile = findSourceFile(resolution.resolvedFileName, ts.toPath(resolution.resolvedFileName, currentDirectory, getCanonicalFileName), false, file, ts.skipTrivia(file.text, file.imports[i].pos), file.imports[i].end); if (importedFile && resolution.isExternalLibraryImport) { if (!ts.isExternalModule(importedFile)) { @@ -33351,7 +33761,8 @@ var ts; return ts.sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped); } if (configFileName) { - configFileWatcher = ts.sys.watchFile(configFileName, configFileChanged); + var configFilePath = ts.toPath(configFileName, ts.sys.getCurrentDirectory(), ts.createGetCanonicalFileName(ts.sys.useCaseSensitiveFileNames)); + configFileWatcher = ts.sys.watchFile(configFilePath, configFileChanged); } if (ts.sys.watchDirectory && configFileName) { var directory = ts.getDirectoryPath(configFileName); @@ -33435,7 +33846,8 @@ var ts; } var sourceFile = hostGetSourceFile(fileName, languageVersion, onError); if (sourceFile && compilerOptions.watch) { - sourceFile.fileWatcher = ts.sys.watchFile(sourceFile.fileName, function (fileName, removed) { return sourceFileChanged(sourceFile, removed); }); + var filePath = ts.toPath(sourceFile.fileName, ts.sys.getCurrentDirectory(), ts.createGetCanonicalFileName(ts.sys.useCaseSensitiveFileNames)); + sourceFile.fileWatcher = ts.sys.watchFile(filePath, function (fileName, removed) { return sourceFileChanged(sourceFile, removed); }); } return sourceFile; } @@ -33646,10 +34058,10 @@ var ts; function serializeCompilerOptions(options) { var result = {}; var optionsNameMap = ts.getOptionNameMap().optionNameMap; - for (var name_28 in options) { - if (ts.hasProperty(options, name_28)) { - var value = options[name_28]; - switch (name_28) { + for (var name_31 in options) { + if (ts.hasProperty(options, name_31)) { + var value = options[name_31]; + switch (name_31) { case "init": case "watch": case "version": @@ -33657,17 +34069,17 @@ var ts; case "project": break; default: - var optionDefinition = optionsNameMap[name_28.toLowerCase()]; + var optionDefinition = optionsNameMap[name_31.toLowerCase()]; if (optionDefinition) { if (typeof optionDefinition.type === "string") { - result[name_28] = value; + result[name_31] = value; } else { var typeMap = optionDefinition.type; for (var key in typeMap) { if (ts.hasProperty(typeMap, key)) { if (typeMap[key] === value) - result[name_28] = key; + result[name_31] = key; } } } diff --git a/lib/tsserver.js b/lib/tsserver.js index b04981dc6db..ba62ebe0dde 100644 --- a/lib/tsserver.js +++ b/lib/tsserver.js @@ -636,7 +636,8 @@ var ts; if (directoryComponents.length > 1 && lastOrUndefined(directoryComponents) === "") { directoryComponents.length--; } - for (var joinStartIndex = 0; joinStartIndex < pathComponents.length && joinStartIndex < directoryComponents.length; joinStartIndex++) { + var joinStartIndex; + for (joinStartIndex = 0; joinStartIndex < pathComponents.length && joinStartIndex < directoryComponents.length; joinStartIndex++) { if (getCanonicalFileName(directoryComponents[joinStartIndex]) !== getCanonicalFileName(pathComponents[joinStartIndex])) { break; } @@ -773,6 +774,12 @@ var ts; return copiedList; } ts.copyListRemovingItem = copyListRemovingItem; + function createGetCanonicalFileName(useCaseSensitivefileNames) { + return useCaseSensitivefileNames + ? (function (fileName) { return fileName; }) + : (function (fileName) { return fileName.toLowerCase(); }); + } + ts.createGetCanonicalFileName = createGetCanonicalFileName; })(ts || (ts = {})); var ts; (function (ts) { @@ -911,7 +918,7 @@ var ts; var _fs = require("fs"); var _path = require("path"); var _os = require("os"); - function createWatchedFileSet(interval, chunkSize) { + function createPollingWatchedFileSet(interval, chunkSize) { if (interval === void 0) { interval = 2500; } if (chunkSize === void 0) { chunkSize = 30; } var watchedFiles = []; @@ -925,13 +932,13 @@ var ts; if (!watchedFile) { return; } - _fs.stat(watchedFile.fileName, function (err, stats) { + _fs.stat(watchedFile.filePath, function (err, stats) { if (err) { - watchedFile.callback(watchedFile.fileName); + watchedFile.callback(watchedFile.filePath); } else if (watchedFile.mtime.getTime() !== stats.mtime.getTime()) { - watchedFile.mtime = getModifiedTime(watchedFile.fileName); - watchedFile.callback(watchedFile.fileName, watchedFile.mtime.getTime() === 0); + watchedFile.mtime = getModifiedTime(watchedFile.filePath); + watchedFile.callback(watchedFile.filePath, watchedFile.mtime.getTime() === 0); } }); } @@ -954,11 +961,11 @@ var ts; nextFileToCheck = nextToCheck; }, interval); } - function addFile(fileName, callback) { + function addFile(filePath, callback) { var file = { - fileName: fileName, + filePath: filePath, callback: callback, - mtime: getModifiedTime(fileName) + mtime: getModifiedTime(filePath) }; watchedFiles.push(file); if (watchedFiles.length === 1) { @@ -977,7 +984,77 @@ var ts; removeFile: removeFile }; } + function createWatchedFileSet() { + var dirWatchers = ts.createFileMap(); + var fileWatcherCallbacks = ts.createFileMap(); + return { addFile: addFile, removeFile: removeFile }; + function reduceDirWatcherRefCountForFile(filePath) { + var dirPath = ts.getDirectoryPath(filePath); + if (dirWatchers.contains(dirPath)) { + var watcher = dirWatchers.get(dirPath); + watcher.referenceCount -= 1; + if (watcher.referenceCount <= 0) { + watcher.close(); + dirWatchers.remove(dirPath); + } + } + } + function addDirWatcher(dirPath) { + if (dirWatchers.contains(dirPath)) { + var watcher_1 = dirWatchers.get(dirPath); + watcher_1.referenceCount += 1; + return; + } + var watcher = _fs.watch(dirPath, { persistent: true }, function (eventName, relativeFileName) { return fileEventHandler(eventName, relativeFileName, dirPath); }); + watcher.referenceCount = 1; + dirWatchers.set(dirPath, watcher); + return; + } + function addFileWatcherCallback(filePath, callback) { + if (fileWatcherCallbacks.contains(filePath)) { + fileWatcherCallbacks.get(filePath).push(callback); + } + else { + fileWatcherCallbacks.set(filePath, [callback]); + } + } + function addFile(filePath, callback) { + addFileWatcherCallback(filePath, callback); + addDirWatcher(ts.getDirectoryPath(filePath)); + return { filePath: filePath, callback: callback }; + } + function removeFile(watchedFile) { + removeFileWatcherCallback(watchedFile.filePath, watchedFile.callback); + reduceDirWatcherRefCountForFile(watchedFile.filePath); + } + function removeFileWatcherCallback(filePath, callback) { + if (fileWatcherCallbacks.contains(filePath)) { + var newCallbacks = ts.copyListRemovingItem(callback, fileWatcherCallbacks.get(filePath)); + if (newCallbacks.length === 0) { + fileWatcherCallbacks.remove(filePath); + } + else { + fileWatcherCallbacks.set(filePath, newCallbacks); + } + } + } + function fileEventHandler(eventName, relativeFileName, baseDirPath) { + var filePath = typeof relativeFileName !== "string" + ? undefined + : ts.toPath(relativeFileName, baseDirPath, ts.createGetCanonicalFileName(ts.sys.useCaseSensitiveFileNames)); + if (eventName === "change" && fileWatcherCallbacks.contains(filePath)) { + for (var _i = 0, _a = fileWatcherCallbacks.get(filePath); _i < _a.length; _i++) { + var fileCallback = _a[_i]; + fileCallback(filePath); + } + } + } + } + var pollingWatchedFileSet = createPollingWatchedFileSet(); var watchedFileSet = createWatchedFileSet(); + function isNode4OrLater() { + return parseInt(process.version.charAt(1)) >= 4; + } var platform = _os.platform(); var useCaseSensitiveFileNames = platform !== "win32" && platform !== "win64" && platform !== "darwin"; function readFile(fileName, encoding) { @@ -1019,7 +1096,7 @@ var ts; } } function getCanonicalPath(path) { - return useCaseSensitiveFileNames ? path.toLowerCase() : path; + return useCaseSensitiveFileNames ? path : path.toLowerCase(); } function readDirectory(path, extension, exclude) { var result = []; @@ -1059,14 +1136,22 @@ var ts; }, readFile: readFile, writeFile: writeFile, - watchFile: function (fileName, callback) { - var watchedFile = watchedFileSet.addFile(fileName, callback); + watchFile: function (filePath, callback) { + var watchSet = isNode4OrLater() ? watchedFileSet : pollingWatchedFileSet; + var watchedFile = watchSet.addFile(filePath, callback); return { - close: function () { return watchedFileSet.removeFile(watchedFile); } + close: function () { return watchSet.removeFile(watchedFile); } }; }, watchDirectory: function (path, callback, recursive) { - return _fs.watch(path, { persistent: true, recursive: !!recursive }, function (eventName, relativeFileName) { + var options; + if (isNode4OrLater() && (process.platform === "win32" || process.platform === "darwin")) { + options = { persistent: true, recursive: !!recursive }; + } + else { + options = { persistent: true }; + } + return _fs.watch(path, options, function (eventName, relativeFileName) { if (eventName === "rename") { callback(!relativeFileName ? relativeFileName : ts.normalizePath(ts.combinePaths(path, relativeFileName))); } @@ -1325,7 +1410,6 @@ var ts; Cannot_find_parameter_0: { code: 1225, category: ts.DiagnosticCategory.Error, key: "Cannot_find_parameter_0_1225", message: "Cannot find parameter '{0}'." }, Type_predicate_0_is_not_assignable_to_1: { code: 1226, category: ts.DiagnosticCategory.Error, key: "Type_predicate_0_is_not_assignable_to_1_1226", message: "Type predicate '{0}' is not assignable to '{1}'." }, Parameter_0_is_not_in_the_same_position_as_parameter_1: { code: 1227, category: ts.DiagnosticCategory.Error, key: "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227", message: "Parameter '{0}' is not in the same position as parameter '{1}'." }, - A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods: { code: 1228, category: ts.DiagnosticCategory.Error, key: "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228", message: "A type predicate is only allowed in return type position for functions and methods." }, A_type_predicate_cannot_reference_a_rest_parameter: { code: 1229, category: ts.DiagnosticCategory.Error, key: "A_type_predicate_cannot_reference_a_rest_parameter_1229", message: "A type predicate cannot reference a rest parameter." }, A_type_predicate_cannot_reference_element_0_in_a_binding_pattern: { code: 1230, category: ts.DiagnosticCategory.Error, key: "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230", message: "A type predicate cannot reference element '{0}' in a binding pattern." }, An_export_assignment_can_only_be_used_in_a_module: { code: 1231, category: ts.DiagnosticCategory.Error, key: "An_export_assignment_can_only_be_used_in_a_module_1231", message: "An export assignment can only be used in a module." }, @@ -1561,7 +1645,6 @@ var ts; All_declarations_of_an_abstract_method_must_be_consecutive: { code: 2516, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_an_abstract_method_must_be_consecutive_2516", message: "All declarations of an abstract method must be consecutive." }, Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type: { code: 2517, category: ts.DiagnosticCategory.Error, key: "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517", message: "Cannot assign an abstract constructor type to a non-abstract constructor type." }, A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard: { code: 2518, category: ts.DiagnosticCategory.Error, key: "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518", message: "A 'this'-based type guard is not compatible with a parameter-based type guard." }, - A_this_based_type_predicate_is_only_allowed_within_a_class_or_interface_s_members_get_accessors_or_return_type_positions_for_functions_and_methods: { code: 2519, category: ts.DiagnosticCategory.Error, key: "A_this_based_type_predicate_is_only_allowed_within_a_class_or_interface_s_members_get_accessors_or_r_2519", message: "A 'this'-based type predicate is only allowed within a class or interface's members, get accessors, or return type positions for functions and methods." }, Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: { code: 2520, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520", message: "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions." }, Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions: { code: 2521, category: ts.DiagnosticCategory.Error, key: "Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521", message: "Expression resolves to variable declaration '{0}' that compiler uses to support async functions." }, The_arguments_object_cannot_be_referenced_in_an_async_arrow_function_Consider_using_a_standard_async_function_expression: { code: 2522, category: ts.DiagnosticCategory.Error, key: "The_arguments_object_cannot_be_referenced_in_an_async_arrow_function_Consider_using_a_standard_async_2522", message: "The 'arguments' object cannot be referenced in an async arrow function. Consider using a standard async function expression." }, @@ -1590,6 +1673,16 @@ var ts; Type_0_provides_no_match_for_the_signature_1: { code: 2658, category: ts.DiagnosticCategory.Error, key: "Type_0_provides_no_match_for_the_signature_1_2658", message: "Type '{0}' provides no match for the signature '{1}'" }, super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher: { code: 2659, category: ts.DiagnosticCategory.Error, key: "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", message: "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher." }, super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions: { code: 2660, category: ts.DiagnosticCategory.Error, key: "super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660", message: "'super' can only be referenced in members of derived classes or object literal expressions." }, + Cannot_re_export_name_that_is_not_defined_in_the_module: { code: 2661, category: ts.DiagnosticCategory.Error, key: "Cannot_re_export_name_that_is_not_defined_in_the_module_2661", message: "Cannot re-export name that is not defined in the module." }, + Cannot_find_name_0_Did_you_mean_the_static_member_1_0: { code: 2662, category: ts.DiagnosticCategory.Error, key: "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662", message: "Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?" }, + Cannot_find_name_0_Did_you_mean_the_instance_member_this_0: { code: 2663, category: ts.DiagnosticCategory.Error, key: "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663", message: "Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?" }, + Invalid_module_name_in_augmentation_module_0_cannot_be_found: { code: 2664, category: ts.DiagnosticCategory.Error, key: "Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664", message: "Invalid module name in augmentation, module '{0}' cannot be found." }, + Module_augmentation_cannot_introduce_new_names_in_the_top_level_scope: { code: 2665, category: ts.DiagnosticCategory.Error, key: "Module_augmentation_cannot_introduce_new_names_in_the_top_level_scope_2665", message: "Module augmentation cannot introduce new names in the top level scope." }, + Exports_and_export_assignments_are_not_permitted_in_module_augmentations: { code: 2666, category: ts.DiagnosticCategory.Error, key: "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666", message: "Exports and export assignments are not permitted in module augmentations." }, + Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module: { code: 2667, category: ts.DiagnosticCategory.Error, key: "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667", message: "Imports are not permitted in module augmentations. Consider moving them to the enclosing external module." }, + export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible: { code: 2668, category: ts.DiagnosticCategory.Error, key: "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668", message: "'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible." }, + Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations: { code: 2669, category: ts.DiagnosticCategory.Error, key: "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669", message: "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations." }, + Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context: { code: 2670, category: ts.DiagnosticCategory.Error, key: "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670", message: "Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context." }, Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import_declaration_0_is_using_private_name_1_4000", message: "Import declaration '{0}' is using private name '{1}'." }, Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", message: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", message: "Type parameter '{0}' of exported interface has or is using private name '{1}'." }, @@ -1754,6 +1847,7 @@ var ts; _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: { code: 7010, category: ts.DiagnosticCategory.Error, key: "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010", message: "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type." }, Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: { code: 7011, category: ts.DiagnosticCategory.Error, key: "Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011", message: "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type." }, Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: { code: 7013, category: ts.DiagnosticCategory.Error, key: "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013", message: "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type." }, + Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number: { code: 7015, category: ts.DiagnosticCategory.Error, key: "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015", message: "Element implicitly has an 'any' type because index expression is not of type 'number'." }, Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation: { code: 7016, category: ts.DiagnosticCategory.Error, key: "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation_7016", message: "Property '{0}' implicitly has type 'any', because its 'set' accessor lacks a type annotation." }, Index_signature_of_object_type_implicitly_has_an_any_type: { code: 7017, category: ts.DiagnosticCategory.Error, key: "Index_signature_of_object_type_implicitly_has_an_any_type_7017", message: "Index signature of object type implicitly has an 'any' type." }, Object_literal_s_property_0_implicitly_has_an_1_type: { code: 7018, category: ts.DiagnosticCategory.Error, key: "Object_literal_s_property_0_implicitly_has_an_1_type_7018", message: "Object literal's property '{0}' implicitly has an '{1}' type." }, @@ -1849,6 +1943,7 @@ var ts; "protected": 111, "public": 112, "require": 127, + "global": 134, "return": 94, "set": 129, "static": 113, @@ -1869,7 +1964,7 @@ var ts; "yield": 114, "async": 118, "await": 119, - "of": 134, + "of": 135, "{": 15, "}": 16, "(": 17, @@ -3130,7 +3225,7 @@ var ts; break; } } - return token = 238; + return token = 239; } function scanJsxIdentifier() { if (tokenIsIdentifierOrKeyword(token)) { @@ -3831,7 +3926,7 @@ var ts; } } function getSourceFileOfNode(node) { - while (node && node.kind !== 250) { + while (node && node.kind !== 251) { node = node.parent; } return node; @@ -3915,6 +4010,28 @@ var ts; isCatchClauseVariableDeclaration(declaration); } ts.isBlockOrCatchScoped = isBlockOrCatchScoped; + function isAmbientModule(node) { + return node && node.kind === 221 && + (node.name.kind === 9 || isGlobalScopeAugmentation(node)); + } + ts.isAmbientModule = isAmbientModule; + function isGlobalScopeAugmentation(module) { + return !!(module.flags & 2097152); + } + ts.isGlobalScopeAugmentation = isGlobalScopeAugmentation; + function isExternalModuleAugmentation(node) { + if (!node || !isAmbientModule(node)) { + return false; + } + switch (node.parent.kind) { + case 251: + return isExternalModule(node.parent); + case 222: + return isAmbientModule(node.parent.parent) && !isExternalModule(node.parent.parent.parent); + } + return false; + } + ts.isExternalModuleAugmentation = isExternalModuleAugmentation; function getEnclosingBlockScopeContainer(node) { var current = node.parent; while (current) { @@ -3922,15 +4039,15 @@ var ts; return current; } switch (current.kind) { - case 250: - case 222: - case 246: - case 220: - case 201: + case 251: + case 223: + case 247: + case 221: case 202: case 203: + case 204: return current; - case 194: + case 195: if (!isFunctionLike(current.parent)) { return current; } @@ -3941,9 +4058,9 @@ var ts; ts.getEnclosingBlockScopeContainer = getEnclosingBlockScopeContainer; function isCatchClauseVariableDeclaration(declaration) { return declaration && - declaration.kind === 213 && + declaration.kind === 214 && declaration.parent && - declaration.parent.kind === 246; + declaration.parent.kind === 247; } ts.isCatchClauseVariableDeclaration = isCatchClauseVariableDeclaration; function declarationNameToString(name) { @@ -3979,23 +4096,24 @@ var ts; function getErrorSpanForNode(sourceFile, node) { var errorNode = node; switch (node.kind) { - case 250: + case 251: var pos_1 = ts.skipTrivia(sourceFile.text, 0, false); if (pos_1 === sourceFile.text.length) { return ts.createTextSpan(0, 0); } return getSpanOfTokenAtPosition(sourceFile, pos_1); - case 213: - case 165: - case 216: - case 188: + case 214: + case 166: case 217: + case 189: + case 218: + case 221: case 220: + case 250: + case 216: + case 176: + case 144: case 219: - case 249: - case 215: - case 175: - case 143: errorNode = node.name; break; } @@ -4021,11 +4139,11 @@ var ts; } ts.isDeclarationFile = isDeclarationFile; function isConstEnumDeclaration(node) { - return node.kind === 219 && isConst(node); + return node.kind === 220 && isConst(node); } ts.isConstEnumDeclaration = isConstEnumDeclaration; function walkUpBindingElementsAndPatterns(node) { - while (node && (node.kind === 165 || isBindingPattern(node))) { + while (node && (node.kind === 166 || isBindingPattern(node))) { node = node.parent; } return node; @@ -4033,14 +4151,14 @@ var ts; function getCombinedNodeFlags(node) { node = walkUpBindingElementsAndPatterns(node); var flags = node.flags; - if (node.kind === 213) { + if (node.kind === 214) { node = node.parent; } - if (node && node.kind === 214) { + if (node && node.kind === 215) { flags |= node.flags; node = node.parent; } - if (node && node.kind === 195) { + if (node && node.kind === 196) { flags |= node.flags; } return flags; @@ -4055,7 +4173,7 @@ var ts; } ts.isLet = isLet; function isPrologueDirective(node) { - return node.kind === 197 && node.expression.kind === 9; + return node.kind === 198 && node.expression.kind === 9; } ts.isPrologueDirective = isPrologueDirective; function getLeadingCommentRangesOfNode(node, sourceFileOfNode) { @@ -4071,7 +4189,7 @@ var ts; } ts.getJsDocComments = getJsDocComments; function getJsDocCommentsFromText(node, text) { - var commentRanges = (node.kind === 138 || node.kind === 137) ? + var commentRanges = (node.kind === 139 || node.kind === 138) ? ts.concatenate(ts.getTrailingCommentRanges(text, node.pos), ts.getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRangesOfNodeFromText(node, text); return ts.filter(commentRanges, isJsDocComment); @@ -4085,7 +4203,7 @@ var ts; ts.fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*/; ts.fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*/; function isTypeNode(node) { - if (150 <= node.kind && node.kind <= 162) { + if (151 <= node.kind && node.kind <= 163) { return true; } switch (node.kind) { @@ -4096,56 +4214,56 @@ var ts; case 131: return true; case 103: - return node.parent.kind !== 179; - case 190: + return node.parent.kind !== 180; + case 191: return !isExpressionWithTypeArgumentsInClassExtendsClause(node); case 69: - if (node.parent.kind === 135 && node.parent.right === node) { + if (node.parent.kind === 136 && node.parent.right === node) { node = node.parent; } - else if (node.parent.kind === 168 && node.parent.name === node) { + else if (node.parent.kind === 169 && node.parent.name === node) { node = node.parent; } - ts.Debug.assert(node.kind === 69 || node.kind === 135 || node.kind === 168, "'node' was expected to be a qualified name, identifier or property access in 'isTypeNode'."); - case 135: - case 168: + ts.Debug.assert(node.kind === 69 || node.kind === 136 || node.kind === 169, "'node' was expected to be a qualified name, identifier or property access in 'isTypeNode'."); + case 136: + case 169: case 97: var parent_1 = node.parent; - if (parent_1.kind === 154) { + if (parent_1.kind === 155) { return false; } - if (150 <= parent_1.kind && parent_1.kind <= 162) { + if (151 <= parent_1.kind && parent_1.kind <= 163) { return true; } switch (parent_1.kind) { - case 190: + case 191: return !isExpressionWithTypeArgumentsInClassExtendsClause(parent_1); - case 137: - return node === parent_1.constraint; - case 141: - case 140: case 138: - case 213: + return node === parent_1.constraint; + case 142: + case 141: + case 139: + case 214: return node === parent_1.type; - case 215: - case 175: + case 216: case 176: + case 177: + case 145: case 144: case 143: - case 142: - case 145: case 146: - return node === parent_1.type; case 147: + return node === parent_1.type; case 148: case 149: + case 150: return node === parent_1.type; - case 173: + case 174: return node === parent_1.type; - case 170: case 171: - return parent_1.typeArguments && ts.indexOf(parent_1.typeArguments, node) >= 0; case 172: + return parent_1.typeArguments && ts.indexOf(parent_1.typeArguments, node) >= 0; + case 173: return false; } } @@ -4156,23 +4274,23 @@ var ts; return traverse(body); function traverse(node) { switch (node.kind) { - case 206: + case 207: return visitor(node); - case 222: - case 194: - case 198: + case 223: + case 195: case 199: case 200: case 201: case 202: case 203: - case 207: + case 204: case 208: - case 243: - case 244: case 209: - case 211: - case 246: + case 244: + case 245: + case 210: + case 212: + case 247: return ts.forEachChild(node, traverse); } } @@ -4182,23 +4300,23 @@ var ts; return traverse(body); function traverse(node) { switch (node.kind) { - case 186: + case 187: visitor(node); var operand = node.expression; if (operand) { traverse(operand); } - case 219: - case 217: case 220: case 218: - case 216: - case 188: + case 221: + case 219: + case 217: + case 189: return; default: if (isFunctionLike(node)) { var name_5 = node.name; - if (name_5 && name_5.kind === 136) { + if (name_5 && name_5.kind === 137) { traverse(name_5.expression); return; } @@ -4213,14 +4331,14 @@ var ts; function isVariableLike(node) { if (node) { switch (node.kind) { - case 165: - case 249: - case 138: - case 247: - case 141: - case 140: + case 166: + case 250: + case 139: case 248: - case 213: + case 142: + case 141: + case 249: + case 214: return true; } } @@ -4228,11 +4346,11 @@ var ts; } ts.isVariableLike = isVariableLike; function isAccessor(node) { - return node && (node.kind === 145 || node.kind === 146); + return node && (node.kind === 146 || node.kind === 147); } ts.isAccessor = isAccessor; function isClassLike(node) { - return node && (node.kind === 216 || node.kind === 188); + return node && (node.kind === 217 || node.kind === 189); } ts.isClassLike = isClassLike; function isFunctionLike(node) { @@ -4241,32 +4359,32 @@ var ts; ts.isFunctionLike = isFunctionLike; function isFunctionLikeKind(kind) { switch (kind) { - case 144: - case 175: - case 215: - case 176: - case 143: - case 142: case 145: + case 176: + case 216: + case 177: + case 144: + case 143: case 146: case 147: case 148: case 149: - case 152: + case 150: case 153: + case 154: return true; } } ts.isFunctionLikeKind = isFunctionLikeKind; function introducesArgumentsExoticObject(node) { switch (node.kind) { - case 143: - case 142: case 144: + case 143: case 145: case 146: - case 215: - case 175: + case 147: + case 216: + case 176: return true; } return false; @@ -4274,24 +4392,24 @@ var ts; ts.introducesArgumentsExoticObject = introducesArgumentsExoticObject; function isIterationStatement(node, lookInLabeledStatements) { switch (node.kind) { - case 201: case 202: case 203: - case 199: + case 204: case 200: + case 201: return true; - case 209: + case 210: return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); } return false; } ts.isIterationStatement = isIterationStatement; function isFunctionBlock(node) { - return node && node.kind === 194 && isFunctionLike(node.parent); + return node && node.kind === 195 && isFunctionLike(node.parent); } ts.isFunctionBlock = isFunctionBlock; function isObjectLiteralMethod(node) { - return node && node.kind === 143 && node.parent.kind === 167; + return node && node.kind === 144 && node.parent.kind === 168; } ts.isObjectLiteralMethod = isObjectLiteralMethod; function isIdentifierTypePredicate(predicate) { @@ -4323,39 +4441,39 @@ var ts; return undefined; } switch (node.kind) { - case 136: + case 137: if (isClassLike(node.parent.parent)) { return node; } node = node.parent; break; - case 139: - if (node.parent.kind === 138 && isClassElement(node.parent.parent)) { + case 140: + if (node.parent.kind === 139 && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; } break; - case 176: + case 177: if (!includeArrowFunctions) { continue; } - case 215: - case 175: - case 220: - case 141: - case 140: - case 143: + case 216: + case 176: + case 221: case 142: + case 141: case 144: + case 143: case 145: case 146: case 147: case 148: case 149: - case 219: - case 250: + case 150: + case 220: + case 251: return node; } } @@ -4368,25 +4486,25 @@ var ts; return node; } switch (node.kind) { - case 136: + case 137: node = node.parent; break; - case 215: - case 175: + case 216: case 176: + case 177: if (!stopOnFunctions) { continue; } - case 141: - case 140: - case 143: case 142: + case 141: case 144: + case 143: case 145: case 146: + case 147: return node; - case 139: - if (node.parent.kind === 138 && isClassElement(node.parent.parent)) { + case 140: + if (node.parent.kind === 139 && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { @@ -4400,12 +4518,12 @@ var ts; function getEntityNameFromTypeNode(node) { if (node) { switch (node.kind) { - case 151: + case 152: return node.typeName; - case 190: + case 191: return node.expression; case 69: - case 135: + case 136: return node; } } @@ -4413,7 +4531,7 @@ var ts; } ts.getEntityNameFromTypeNode = getEntityNameFromTypeNode; function getInvokedExpression(node) { - if (node.kind === 172) { + if (node.kind === 173) { return node.tag; } return node.expression; @@ -4421,54 +4539,36 @@ var ts; ts.getInvokedExpression = getInvokedExpression; function nodeCanBeDecorated(node) { switch (node.kind) { - case 216: + case 217: return true; - case 141: - return node.parent.kind === 216; - case 138: - return node.parent.body && node.parent.parent.kind === 216; - case 145: + case 142: + return node.parent.kind === 217; case 146: - case 143: - return node.body && node.parent.kind === 216; + case 147: + case 144: + return node.body !== undefined + && node.parent.kind === 217; + case 139: + return node.parent.body !== undefined + && (node.parent.kind === 145 + || node.parent.kind === 144 + || node.parent.kind === 147) + && node.parent.parent.kind === 217; } return false; } ts.nodeCanBeDecorated = nodeCanBeDecorated; function nodeIsDecorated(node) { - switch (node.kind) { - case 216: - if (node.decorators) { - return true; - } - return false; - case 141: - case 138: - if (node.decorators) { - return true; - } - return false; - case 145: - if (node.body && node.decorators) { - return true; - } - return false; - case 143: - case 146: - if (node.body && node.decorators) { - return true; - } - return false; - } - return false; + return node.decorators !== undefined + && nodeCanBeDecorated(node); } ts.nodeIsDecorated = nodeIsDecorated; function isPropertyAccessExpression(node) { - return node.kind === 168; + return node.kind === 169; } ts.isPropertyAccessExpression = isPropertyAccessExpression; function isElementAccessExpression(node) { - return node.kind === 169; + return node.kind === 170; } ts.isElementAccessExpression = isElementAccessExpression; function isExpression(node) { @@ -4478,42 +4578,42 @@ var ts; case 99: case 84: case 10: - case 166: case 167: case 168: case 169: case 170: case 171: case 172: - case 191: case 173: + case 192: case 174: case 175: - case 188: case 176: - case 179: + case 189: case 177: + case 180: case 178: - case 181: + case 179: case 182: case 183: case 184: - case 187: case 185: - case 11: - case 189: - case 235: - case 236: + case 188: case 186: - case 180: + case 11: + case 190: + case 236: + case 237: + case 187: + case 181: return true; - case 135: - while (node.parent.kind === 135) { + case 136: + while (node.parent.kind === 136) { node = node.parent; } - return node.parent.kind === 154; + return node.parent.kind === 155; case 69: - if (node.parent.kind === 154) { + if (node.parent.kind === 155) { return true; } case 8: @@ -4521,47 +4621,47 @@ var ts; case 97: var parent_2 = node.parent; switch (parent_2.kind) { - case 213: - case 138: + case 214: + case 139: + case 142: case 141: - case 140: - case 249: - case 247: - case 165: + case 250: + case 248: + case 166: return parent_2.initializer === node; - case 197: case 198: case 199: case 200: - case 206: + case 201: case 207: case 208: - case 243: - case 210: - case 208: + case 209: + case 244: + case 211: + case 209: return parent_2.expression === node; - case 201: + case 202: var forStatement = parent_2; - return (forStatement.initializer === node && forStatement.initializer.kind !== 214) || + return (forStatement.initializer === node && forStatement.initializer.kind !== 215) || forStatement.condition === node || forStatement.incrementor === node; - case 202: case 203: + case 204: var forInStatement = parent_2; - return (forInStatement.initializer === node && forInStatement.initializer.kind !== 214) || + return (forInStatement.initializer === node && forInStatement.initializer.kind !== 215) || forInStatement.expression === node; - case 173: - case 191: - return node === parent_2.expression; + case 174: case 192: return node === parent_2.expression; - case 136: + case 193: return node === parent_2.expression; - case 139: + case 137: + return node === parent_2.expression; + case 140: + case 243: case 242: - case 241: return true; - case 190: + case 191: return parent_2.expression === node && isExpressionWithTypeArgumentsInClassExtendsClause(parent_2); default: if (isExpression(parent_2)) { @@ -4583,7 +4683,7 @@ var ts; } ts.isInstantiatedModule = isInstantiatedModule; function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 223 && node.moduleReference.kind === 234; + return node.kind === 224 && node.moduleReference.kind === 235; } ts.isExternalModuleImportEqualsDeclaration = isExternalModuleImportEqualsDeclaration; function getExternalModuleImportEqualsDeclarationExpression(node) { @@ -4592,7 +4692,7 @@ var ts; } ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression; function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 223 && node.moduleReference.kind !== 234; + return node.kind === 224 && node.moduleReference.kind !== 235; } ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration; function isSourceFileJavaScript(file) { @@ -4604,7 +4704,7 @@ var ts; } ts.isInJavaScriptFile = isInJavaScriptFile; function isRequireCall(expression) { - return expression.kind === 170 && + return expression.kind === 171 && expression.expression.kind === 69 && expression.expression.text === "require" && expression.arguments.length === 1 && @@ -4612,11 +4712,11 @@ var ts; } ts.isRequireCall = isRequireCall; function getSpecialPropertyAssignmentKind(expression) { - if (expression.kind !== 183) { + if (expression.kind !== 184) { return 0; } var expr = expression; - if (expr.operatorToken.kind !== 56 || expr.left.kind !== 168) { + if (expr.operatorToken.kind !== 56 || expr.left.kind !== 169) { return 0; } var lhs = expr.left; @@ -4632,7 +4732,7 @@ var ts; else if (lhs.expression.kind === 97) { return 4; } - else if (lhs.expression.kind === 168) { + else if (lhs.expression.kind === 169) { var innerPropertyAccess = lhs.expression; if (innerPropertyAccess.expression.kind === 69 && innerPropertyAccess.name.text === "prototype") { return 3; @@ -4642,30 +4742,33 @@ var ts; } ts.getSpecialPropertyAssignmentKind = getSpecialPropertyAssignmentKind; function getExternalModuleName(node) { - if (node.kind === 224) { + if (node.kind === 225) { return node.moduleSpecifier; } - if (node.kind === 223) { + if (node.kind === 224) { var reference = node.moduleReference; - if (reference.kind === 234) { + if (reference.kind === 235) { return reference.expression; } } - if (node.kind === 230) { + if (node.kind === 231) { return node.moduleSpecifier; } + if (node.kind === 221 && node.name.kind === 9) { + return node.name; + } } ts.getExternalModuleName = getExternalModuleName; function hasQuestionToken(node) { if (node) { switch (node.kind) { - case 138: + case 139: + case 144: case 143: - case 142: + case 249: case 248: - case 247: + case 142: case 141: - case 140: return node.questionToken !== undefined; } } @@ -4673,9 +4776,9 @@ var ts; } ts.hasQuestionToken = hasQuestionToken; function isJSDocConstructSignature(node) { - return node.kind === 263 && + return node.kind === 264 && node.parameters.length > 0 && - node.parameters[0].type.kind === 265; + node.parameters[0].type.kind === 266; } ts.isJSDocConstructSignature = isJSDocConstructSignature; function getJSDocTag(node, kind) { @@ -4689,15 +4792,15 @@ var ts; } } function getJSDocTypeTag(node) { - return getJSDocTag(node, 271); + return getJSDocTag(node, 272); } ts.getJSDocTypeTag = getJSDocTypeTag; function getJSDocReturnTag(node) { - return getJSDocTag(node, 270); + return getJSDocTag(node, 271); } ts.getJSDocReturnTag = getJSDocReturnTag; function getJSDocTemplateTag(node) { - return getJSDocTag(node, 272); + return getJSDocTag(node, 273); } ts.getJSDocTemplateTag = getJSDocTemplateTag; function getCorrespondingJSDocParameterTag(parameter) { @@ -4706,7 +4809,7 @@ var ts; var docComment = parameter.parent.jsDocComment; if (docComment) { return ts.forEach(docComment.tags, function (t) { - if (t.kind === 269) { + if (t.kind === 270) { var parameterTag = t; var name_6 = parameterTag.preParameterName || parameterTag.postParameterName; if (name_6.text === parameterName) { @@ -4725,12 +4828,12 @@ var ts; function isRestParameter(node) { if (node) { if (node.parserContextFlags & 32) { - if (node.type && node.type.kind === 264) { + if (node.type && node.type.kind === 265) { return true; } var paramTag = getCorrespondingJSDocParameterTag(node); if (paramTag && paramTag.typeExpression) { - return paramTag.typeExpression.type.kind === 264; + return paramTag.typeExpression.type.kind === 265; } } return node.dotDotDotToken !== undefined; @@ -4751,7 +4854,7 @@ var ts; } ts.isTemplateLiteralKind = isTemplateLiteralKind; function isBindingPattern(node) { - return !!node && (node.kind === 164 || node.kind === 163); + return !!node && (node.kind === 165 || node.kind === 164); } ts.isBindingPattern = isBindingPattern; function isNodeDescendentOf(node, ancestor) { @@ -4775,34 +4878,34 @@ var ts; ts.isInAmbientContext = isInAmbientContext; function isDeclaration(node) { switch (node.kind) { - case 176: - case 165: - case 216: - case 188: - case 144: - case 219: - case 249: - case 232: - case 215: - case 175: - case 145: - case 225: - case 223: - case 228: + case 177: + case 166: case 217: - case 143: - case 142: + case 189: + case 145: case 220: - case 226: - case 138: - case 247: - case 141: - case 140: + case 250: + case 233: + case 216: + case 176: case 146: - case 248: + case 226: + case 224: + case 229: case 218: - case 137: - case 213: + case 144: + case 143: + case 221: + case 227: + case 139: + case 248: + case 142: + case 141: + case 147: + case 249: + case 219: + case 138: + case 214: return true; } return false; @@ -4810,25 +4913,25 @@ var ts; ts.isDeclaration = isDeclaration; function isStatement(n) { switch (n.kind) { - case 205: - case 204: - case 212: - case 199: - case 197: - case 196: - case 202: - case 203: - case 201: - case 198: - case 209: case 206: - case 208: - case 210: - case 211: - case 195: + case 205: + case 213: case 200: + case 198: + case 197: + case 203: + case 204: + case 202: + case 199: + case 210: case 207: - case 229: + case 209: + case 211: + case 212: + case 196: + case 201: + case 208: + case 230: return true; default: return false; @@ -4837,13 +4940,13 @@ var ts; ts.isStatement = isStatement; function isClassElement(n) { switch (n.kind) { - case 144: - case 141: - case 143: case 145: - case 146: case 142: - case 149: + case 144: + case 146: + case 147: + case 143: + case 150: return true; default: return false; @@ -4855,7 +4958,7 @@ var ts; return false; } var parent = name.parent; - if (parent.kind === 228 || parent.kind === 232) { + if (parent.kind === 229 || parent.kind === 233) { if (parent.propertyName) { return true; } @@ -4869,40 +4972,40 @@ var ts; function isIdentifierName(node) { var parent = node.parent; switch (parent.kind) { - case 141: - case 140: - case 143: case 142: - case 145: + case 141: + case 144: + case 143: case 146: - case 249: - case 247: - case 168: + case 147: + case 250: + case 248: + case 169: return parent.name === node; - case 135: + case 136: if (parent.right === node) { - while (parent.kind === 135) { + while (parent.kind === 136) { parent = parent.parent; } - return parent.kind === 154; + return parent.kind === 155; } return false; - case 165: - case 228: + case 166: + case 229: return parent.propertyName === node; - case 232: + case 233: return true; } return false; } ts.isIdentifierName = isIdentifierName; function isAliasSymbolDeclaration(node) { - return node.kind === 223 || - node.kind === 225 && !!node.name || - node.kind === 226 || - node.kind === 228 || - node.kind === 232 || - node.kind === 229 && node.expression.kind === 69; + return node.kind === 224 || + node.kind === 226 && !!node.name || + node.kind === 227 || + node.kind === 229 || + node.kind === 233 || + node.kind === 230 && node.expression.kind === 69; } ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration; function getClassExtendsHeritageClauseElement(node) { @@ -4984,7 +5087,7 @@ var ts; } ts.getFileReferenceFromReferencePath = getFileReferenceFromReferencePath; function isKeyword(token) { - return 70 <= token && token <= 134; + return 70 <= token && token <= 135; } ts.isKeyword = isKeyword; function isTrivia(token) { @@ -5004,7 +5107,7 @@ var ts; } ts.hasDynamicName = hasDynamicName; function isDynamicName(name) { - return name.kind === 136 && + return name.kind === 137 && !isStringOrNumericLiteral(name.expression.kind) && !isWellKnownSymbolSyntactically(name.expression); } @@ -5017,7 +5120,7 @@ var ts; if (name.kind === 69 || name.kind === 9 || name.kind === 8) { return name.text; } - if (name.kind === 136) { + if (name.kind === 137) { var nameExpression = name.expression; if (isWellKnownSymbolSyntactically(nameExpression)) { var rightHandSideName = nameExpression.name.text; @@ -5054,18 +5157,18 @@ var ts; ts.isModifierKind = isModifierKind; function isParameterDeclaration(node) { var root = getRootDeclaration(node); - return root.kind === 138; + return root.kind === 139; } ts.isParameterDeclaration = isParameterDeclaration; function getRootDeclaration(node) { - while (node.kind === 165) { + while (node.kind === 166) { node = node.parent.parent; } return node; } ts.getRootDeclaration = getRootDeclaration; function nodeStartsNewLexicalEnvironment(n) { - return isFunctionLike(n) || n.kind === 220 || n.kind === 250; + return isFunctionLike(n) || n.kind === 221 || n.kind === 251; } ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment; function cloneNode(node, location, flags, parent) { @@ -5098,7 +5201,7 @@ var ts; } ts.cloneEntityName = cloneEntityName; function isQualifiedName(node) { - return node.kind === 135; + return node.kind === 136; } ts.isQualifiedName = isQualifiedName; function nodeIsSynthesized(node) { @@ -5411,7 +5514,7 @@ var ts; ts.getLineOfLocalPositionFromLineMap = getLineOfLocalPositionFromLineMap; function getFirstConstructorWithBody(node) { return ts.forEach(node.members, function (member) { - if (member.kind === 144 && nodeIsPresent(member.body)) { + if (member.kind === 145 && nodeIsPresent(member.body)) { return member; } }); @@ -5428,10 +5531,10 @@ var ts; var setAccessor; if (hasDynamicName(accessor)) { firstAccessor = accessor; - if (accessor.kind === 145) { + if (accessor.kind === 146) { getAccessor = accessor; } - else if (accessor.kind === 146) { + else if (accessor.kind === 147) { setAccessor = accessor; } else { @@ -5440,7 +5543,7 @@ var ts; } else { ts.forEach(declarations, function (member) { - if ((member.kind === 145 || member.kind === 146) + if ((member.kind === 146 || member.kind === 147) && (member.flags & 64) === (accessor.flags & 64)) { var memberName = getPropertyNameForPropertyNameNode(member.name); var accessorName = getPropertyNameForPropertyNameNode(accessor.name); @@ -5451,10 +5554,10 @@ var ts; else if (!secondAccessor) { secondAccessor = member; } - if (member.kind === 145 && !getAccessor) { + if (member.kind === 146 && !getAccessor) { getAccessor = member; } - if (member.kind === 146 && !setAccessor) { + if (member.kind === 147 && !setAccessor) { setAccessor = member; } } @@ -5620,24 +5723,24 @@ var ts; function isLeftHandSideExpression(expr) { if (expr) { switch (expr.kind) { - case 168: case 169: - case 171: case 170: - case 235: - case 236: case 172: - case 166: - case 174: + case 171: + case 236: + case 237: + case 173: case 167: - case 188: case 175: + case 168: + case 189: + case 176: case 69: case 10: case 8: case 9: case 11: - case 185: + case 186: case 84: case 93: case 97: @@ -5654,7 +5757,7 @@ var ts; } ts.isAssignmentOperator = isAssignmentOperator; function isExpressionWithTypeArgumentsInClassExtendsClause(node) { - return node.kind === 190 && + return node.kind === 191 && node.parent.token === 83 && isClassLike(node.parent.parent); } @@ -5675,16 +5778,16 @@ var ts; } } function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return (node.parent.kind === 135 && node.parent.right === node) || - (node.parent.kind === 168 && node.parent.name === node); + return (node.parent.kind === 136 && node.parent.right === node) || + (node.parent.kind === 169 && node.parent.name === node); } ts.isRightSideOfQualifiedNameOrPropertyAccess = isRightSideOfQualifiedNameOrPropertyAccess; function isEmptyObjectLiteralOrArrayLiteral(expression) { var kind = expression.kind; - if (kind === 167) { + if (kind === 168) { return expression.properties.length === 0; } - if (kind === 166) { + if (kind === 167) { return expression.elements.length === 0; } return false; @@ -5928,9 +6031,9 @@ var ts; } ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions; function getTypeParameterOwner(d) { - if (d && d.kind === 137) { + if (d && d.kind === 138) { for (var current = d; current; current = current.parent) { - if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 217) { + if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 218) { return current; } } @@ -5938,7 +6041,7 @@ var ts; } ts.getTypeParameterOwner = getTypeParameterOwner; function isParameterPropertyDeclaration(node) { - return node.flags & 56 && node.parent.kind === 144 && ts.isClassLike(node.parent.parent); + return node.flags & 56 && node.parent.kind === 145 && ts.isClassLike(node.parent.parent); } ts.isParameterPropertyDeclaration = isParameterPropertyDeclaration; })(ts || (ts = {})); @@ -5948,7 +6051,7 @@ var ts; var NodeConstructor; var SourceFileConstructor; function createNode(kind, pos, end) { - if (kind === 250) { + if (kind === 251) { return new (SourceFileConstructor || (SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor()))(kind, pos, end); } else { @@ -5984,26 +6087,26 @@ var ts; var visitNodes = cbNodeArray ? visitNodeArray : visitEachNode; var cbNodes = cbNodeArray || cbNode; switch (node.kind) { - case 135: + case 136: return visitNode(cbNode, node.left) || visitNode(cbNode, node.right); - case 137: + case 138: return visitNode(cbNode, node.name) || visitNode(cbNode, node.constraint) || visitNode(cbNode, node.expression); - case 248: + case 249: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.equalsToken) || visitNode(cbNode, node.objectAssignmentInitializer); - case 138: + case 139: + case 142: case 141: - case 140: - case 247: - case 213: - case 165: + case 248: + case 214: + case 166: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.propertyName) || @@ -6012,24 +6115,24 @@ var ts; visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.type) || visitNode(cbNode, node.initializer); - case 152: case 153: - case 147: + case 154: case 148: case 149: + case 150: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNodes(cbNodes, node.typeParameters) || visitNodes(cbNodes, node.parameters) || visitNode(cbNode, node.type); - case 143: - case 142: case 144: + case 143: case 145: case 146: - case 175: - case 215: + case 147: case 176: + case 216: + case 177: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.asteriskToken) || @@ -6040,160 +6143,153 @@ var ts; visitNode(cbNode, node.type) || visitNode(cbNode, node.equalsGreaterThanToken) || visitNode(cbNode, node.body); - case 151: + case 152: return visitNode(cbNode, node.typeName) || visitNodes(cbNodes, node.typeArguments); - case 150: + case 151: return visitNode(cbNode, node.parameterName) || visitNode(cbNode, node.type); - case 154: - return visitNode(cbNode, node.exprName); case 155: - return visitNodes(cbNodes, node.members); + return visitNode(cbNode, node.exprName); case 156: - return visitNode(cbNode, node.elementType); + return visitNodes(cbNodes, node.members); case 157: - return visitNodes(cbNodes, node.elementTypes); + return visitNode(cbNode, node.elementType); case 158: + return visitNodes(cbNodes, node.elementTypes); case 159: - return visitNodes(cbNodes, node.types); case 160: + return visitNodes(cbNodes, node.types); + case 161: return visitNode(cbNode, node.type); - case 163: case 164: - return visitNodes(cbNodes, node.elements); - case 166: + case 165: return visitNodes(cbNodes, node.elements); case 167: - return visitNodes(cbNodes, node.properties); + return visitNodes(cbNodes, node.elements); case 168: + return visitNodes(cbNodes, node.properties); + case 169: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.dotToken) || visitNode(cbNode, node.name); - case 169: + case 170: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.argumentExpression); - case 170: case 171: + case 172: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.typeArguments) || visitNodes(cbNodes, node.arguments); - case 172: + case 173: return visitNode(cbNode, node.tag) || visitNode(cbNode, node.template); - case 173: + case 174: return visitNode(cbNode, node.type) || visitNode(cbNode, node.expression); - case 174: - return visitNode(cbNode, node.expression); - case 177: + case 175: return visitNode(cbNode, node.expression); case 178: return visitNode(cbNode, node.expression); case 179: return visitNode(cbNode, node.expression); - case 181: - return visitNode(cbNode, node.operand); - case 186: - return visitNode(cbNode, node.asteriskToken) || - visitNode(cbNode, node.expression); case 180: return visitNode(cbNode, node.expression); case 182: return visitNode(cbNode, node.operand); + case 187: + return visitNode(cbNode, node.asteriskToken) || + visitNode(cbNode, node.expression); + case 181: + return visitNode(cbNode, node.expression); case 183: + return visitNode(cbNode, node.operand); + case 184: return visitNode(cbNode, node.left) || visitNode(cbNode, node.operatorToken) || visitNode(cbNode, node.right); - case 191: + case 192: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.type); - case 184: + case 185: return visitNode(cbNode, node.condition) || visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.whenTrue) || visitNode(cbNode, node.colonToken) || visitNode(cbNode, node.whenFalse); - case 187: + case 188: return visitNode(cbNode, node.expression); - case 194: - case 221: + case 195: + case 222: return visitNodes(cbNodes, node.statements); - case 250: + case 251: return visitNodes(cbNodes, node.statements) || visitNode(cbNode, node.endOfFileToken); - case 195: + case 196: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.declarationList); - case 214: + case 215: return visitNodes(cbNodes, node.declarations); - case 197: - return visitNode(cbNode, node.expression); case 198: + return visitNode(cbNode, node.expression); + case 199: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.thenStatement) || visitNode(cbNode, node.elseStatement); - case 199: + case 200: return visitNode(cbNode, node.statement) || visitNode(cbNode, node.expression); - case 200: - return visitNode(cbNode, node.expression) || - visitNode(cbNode, node.statement); case 201: - return visitNode(cbNode, node.initializer) || - visitNode(cbNode, node.condition) || - visitNode(cbNode, node.incrementor) || + return visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); case 202: return visitNode(cbNode, node.initializer) || - visitNode(cbNode, node.expression) || + visitNode(cbNode, node.condition) || + visitNode(cbNode, node.incrementor) || visitNode(cbNode, node.statement); case 203: return visitNode(cbNode, node.initializer) || visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); case 204: - case 205: - return visitNode(cbNode, node.label); - case 206: - return visitNode(cbNode, node.expression); - case 207: - return visitNode(cbNode, node.expression) || + return visitNode(cbNode, node.initializer) || + visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); + case 205: + case 206: + return visitNode(cbNode, node.label); + case 207: + return visitNode(cbNode, node.expression); case 208: + return visitNode(cbNode, node.expression) || + visitNode(cbNode, node.statement); + case 209: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.caseBlock); - case 222: + case 223: return visitNodes(cbNodes, node.clauses); - case 243: + case 244: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.statements); - case 244: + case 245: return visitNodes(cbNodes, node.statements); - case 209: + case 210: return visitNode(cbNode, node.label) || visitNode(cbNode, node.statement); - case 210: - return visitNode(cbNode, node.expression); case 211: + return visitNode(cbNode, node.expression); + case 212: return visitNode(cbNode, node.tryBlock) || visitNode(cbNode, node.catchClause) || visitNode(cbNode, node.finallyBlock); - case 246: + case 247: return visitNode(cbNode, node.variableDeclaration) || visitNode(cbNode, node.block); - case 139: + case 140: return visitNode(cbNode, node.expression); - case 216: - case 188: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.name) || - visitNodes(cbNodes, node.typeParameters) || - visitNodes(cbNodes, node.heritageClauses) || - visitNodes(cbNodes, node.members); case 217: + case 189: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || @@ -6205,125 +6301,132 @@ var ts; visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeParameters) || - visitNode(cbNode, node.type); + visitNodes(cbNodes, node.heritageClauses) || + visitNodes(cbNodes, node.members); case 219: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || - visitNodes(cbNodes, node.members); - case 249: - return visitNode(cbNode, node.name) || - visitNode(cbNode, node.initializer); + visitNodes(cbNodes, node.typeParameters) || + visitNode(cbNode, node.type); case 220: + return visitNodes(cbNodes, node.decorators) || + visitNodes(cbNodes, node.modifiers) || + visitNode(cbNode, node.name) || + visitNodes(cbNodes, node.members); + case 250: + return visitNode(cbNode, node.name) || + visitNode(cbNode, node.initializer); + case 221: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.body); - case 223: + case 224: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.moduleReference); - case 224: + case 225: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.importClause) || visitNode(cbNode, node.moduleSpecifier); - case 225: + case 226: return visitNode(cbNode, node.name) || visitNode(cbNode, node.namedBindings); - case 226: - return visitNode(cbNode, node.name); case 227: - case 231: + return visitNode(cbNode, node.name); + case 228: + case 232: return visitNodes(cbNodes, node.elements); - case 230: + case 231: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.exportClause) || visitNode(cbNode, node.moduleSpecifier); - case 228: - case 232: + case 229: + case 233: return visitNode(cbNode, node.propertyName) || visitNode(cbNode, node.name); - case 229: + case 230: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.expression); - case 185: + case 186: return visitNode(cbNode, node.head) || visitNodes(cbNodes, node.templateSpans); - case 192: + case 193: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.literal); - case 136: + case 137: return visitNode(cbNode, node.expression); - case 245: + case 246: return visitNodes(cbNodes, node.types); - case 190: + case 191: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.typeArguments); - case 234: - return visitNode(cbNode, node.expression); - case 233: - return visitNodes(cbNodes, node.decorators); case 235: + return visitNode(cbNode, node.expression); + case 234: + return visitNodes(cbNodes, node.decorators); + case 236: return visitNode(cbNode, node.openingElement) || visitNodes(cbNodes, node.children) || visitNode(cbNode, node.closingElement); - case 236: case 237: + case 238: return visitNode(cbNode, node.tagName) || visitNodes(cbNodes, node.attributes); - case 240: + case 241: return visitNode(cbNode, node.name) || visitNode(cbNode, node.initializer); - case 241: - return visitNode(cbNode, node.expression); case 242: return visitNode(cbNode, node.expression); - case 239: + case 243: + return visitNode(cbNode, node.expression); + case 240: return visitNode(cbNode, node.tagName); - case 251: + case 252: return visitNode(cbNode, node.type); - case 255: - return visitNodes(cbNodes, node.types); case 256: return visitNodes(cbNodes, node.types); - case 254: + case 257: + return visitNodes(cbNodes, node.types); + case 255: return visitNode(cbNode, node.elementType); + case 259: + return visitNode(cbNode, node.type); case 258: return visitNode(cbNode, node.type); - case 257: - return visitNode(cbNode, node.type); - case 259: + case 260: return visitNodes(cbNodes, node.members); - case 261: + case 262: return visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeArguments); - case 262: - return visitNode(cbNode, node.type); case 263: + return visitNode(cbNode, node.type); + case 264: return visitNodes(cbNodes, node.parameters) || visitNode(cbNode, node.type); - case 264: - return visitNode(cbNode, node.type); case 265: return visitNode(cbNode, node.type); case 266: return visitNode(cbNode, node.type); - case 260: + case 267: + return visitNode(cbNode, node.type); + case 261: return visitNode(cbNode, node.name) || visitNode(cbNode, node.type); - case 267: + case 268: return visitNodes(cbNodes, node.tags); - case 269: + case 270: return visitNode(cbNode, node.preParameterName) || visitNode(cbNode, node.typeExpression) || visitNode(cbNode, node.postParameterName); - case 270: - return visitNode(cbNode, node.typeExpression); case 271: return visitNode(cbNode, node.typeExpression); case 272: + return visitNode(cbNode, node.typeExpression); + case 273: return visitNodes(cbNodes, node.typeParameters); } } @@ -6430,9 +6533,9 @@ var ts; return; function visit(node) { switch (node.kind) { - case 195: - case 215: - case 138: + case 196: + case 216: + case 139: addJSDocComment(node); } forEachChild(node, visit); @@ -6466,7 +6569,7 @@ var ts; } Parser.fixupParentReferences = fixupParentReferences; function createSourceFile(fileName, languageVersion) { - var sourceFile = new SourceFileConstructor(250, 0, sourceText.length); + var sourceFile = new SourceFileConstructor(251, 0, sourceText.length); nodeCount++; sourceFile.text = sourceText; sourceFile.bindDiagnostics = []; @@ -6757,7 +6860,7 @@ var ts; return token === 9 || token === 8 || ts.tokenIsIdentifierOrKeyword(token); } function parseComputedPropertyName() { - var node = createNode(136); + var node = createNode(137); parseExpected(19); node.expression = allowInAnd(parseExpression); parseExpected(20); @@ -7056,14 +7159,14 @@ var ts; function isReusableClassMember(node) { if (node) { switch (node.kind) { - case 144: - case 149: case 145: + case 150: case 146: - case 141: - case 193: + case 147: + case 142: + case 194: return true; - case 143: + case 144: var methodDeclaration = node; var nameIsConstructor = methodDeclaration.name.kind === 69 && methodDeclaration.name.originalKeywordKind === 121; @@ -7075,8 +7178,8 @@ var ts; function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 243: case 244: + case 245: return true; } } @@ -7085,65 +7188,65 @@ var ts; function isReusableStatement(node) { if (node) { switch (node.kind) { - case 215: + case 216: + case 196: case 195: - case 194: + case 199: case 198: - case 197: - case 210: + case 211: + case 207: + case 209: case 206: - case 208: case 205: + case 203: case 204: case 202: - case 203: case 201: - case 200: - case 207: - case 196: - case 211: - case 209: - case 199: + case 208: + case 197: case 212: + case 210: + case 200: + case 213: + case 225: case 224: - case 223: + case 231: case 230: - case 229: - case 220: - case 216: + case 221: case 217: - case 219: case 218: + case 220: + case 219: return true; } } return false; } function isReusableEnumMember(node) { - return node.kind === 249; + return node.kind === 250; } function isReusableTypeMember(node) { if (node) { switch (node.kind) { - case 148: - case 142: case 149: - case 140: - case 147: + case 143: + case 150: + case 141: + case 148: return true; } } return false; } function isReusableVariableDeclaration(node) { - if (node.kind !== 213) { + if (node.kind !== 214) { return false; } var variableDeclarator = node; return variableDeclarator.initializer === undefined; } function isReusableParameter(node) { - if (node.kind !== 138) { + if (node.kind !== 139) { return false; } var parameter = node; @@ -7243,7 +7346,7 @@ var ts; function parseEntityName(allowReservedWords, diagnosticMessage) { var entity = parseIdentifier(diagnosticMessage); while (parseOptional(21)) { - var node = createNode(135, entity.pos); + var node = createNode(136, entity.pos); node.left = entity; node.right = parseRightSideOfDot(allowReservedWords); entity = finishNode(node); @@ -7260,7 +7363,7 @@ var ts; return allowIdentifierNames ? parseIdentifierName() : parseIdentifier(); } function parseTemplateExpression() { - var template = createNode(185); + var template = createNode(186); template.head = parseTemplateLiteralFragment(); ts.Debug.assert(template.head.kind === 12, "Template head has wrong token kind"); var templateSpans = []; @@ -7273,7 +7376,7 @@ var ts; return finishNode(template); } function parseTemplateSpan() { - var span = createNode(192); + var span = createNode(193); span.expression = allowInAnd(parseExpression); var literal; if (token === 16) { @@ -7287,7 +7390,7 @@ var ts; return finishNode(span); } function parseStringLiteralTypeNode() { - return parseLiteralLikeNode(162, true); + return parseLiteralLikeNode(163, true); } function parseLiteralNode(internName) { return parseLiteralLikeNode(token, internName); @@ -7315,12 +7418,9 @@ var ts; } return node; } - function parseTypeReferenceOrTypePredicate() { + function parseTypeReference() { var typeName = parseEntityName(false, ts.Diagnostics.Type_expected); - if (typeName.kind === 69 && token === 124 && !scanner.hasPrecedingLineBreak()) { - return parseTypePredicate(typeName); - } - var node = createNode(151, typeName.pos); + var node = createNode(152, typeName.pos); node.typeName = typeName; if (!scanner.hasPrecedingLineBreak() && token === 25) { node.typeArguments = parseBracketedList(18, parseType, 25, 27); @@ -7329,24 +7429,24 @@ var ts; } function parseTypePredicate(lhs) { nextToken(); - var node = createNode(150, lhs.pos); + var node = createNode(151, lhs.pos); node.parameterName = lhs; node.type = parseType(); return finishNode(node); } function parseThisTypeNode() { - var node = createNode(161); + var node = createNode(162); nextToken(); return finishNode(node); } function parseTypeQuery() { - var node = createNode(154); + var node = createNode(155); parseExpected(101); node.exprName = parseEntityName(true); return finishNode(node); } function parseTypeParameter() { - var node = createNode(137); + var node = createNode(138); node.name = parseIdentifier(); if (parseOptional(83)) { if (isStartOfType() || !isStartOfExpression()) { @@ -7379,7 +7479,7 @@ var ts; } } function parseParameter() { - var node = createNode(138); + var node = createNode(139); node.decorators = parseDecorators(); setModifiers(node, parseModifiers()); node.dotDotDotToken = parseOptionalToken(22); @@ -7404,10 +7504,10 @@ var ts; signature.parameters = parseParameterList(yieldContext, awaitContext, requireCompleteParameterList); if (returnTokenRequired) { parseExpected(returnToken); - signature.type = parseType(); + signature.type = parseTypeOrTypePredicate(); } else if (parseOptional(returnToken)) { - signature.type = parseType(); + signature.type = parseTypeOrTypePredicate(); } } function parseParameterList(yieldContext, awaitContext, requireCompleteParameterList) { @@ -7434,7 +7534,7 @@ var ts; } function parseSignatureMember(kind) { var node = createNode(kind); - if (kind === 148) { + if (kind === 149) { parseExpected(92); } fillSignature(54, false, false, false, node); @@ -7474,7 +7574,7 @@ var ts; return token === 54 || token === 24 || token === 20; } function parseIndexSignatureDeclaration(fullStart, decorators, modifiers) { - var node = createNode(149, fullStart); + var node = createNode(150, fullStart); node.decorators = decorators; setModifiers(node, modifiers); node.parameters = parseBracketedList(16, parseParameter, 19, 20); @@ -7487,7 +7587,7 @@ var ts; var name = parsePropertyName(); var questionToken = parseOptionalToken(53); if (token === 17 || token === 25) { - var method = createNode(142, fullStart); + var method = createNode(143, fullStart); method.name = name; method.questionToken = questionToken; fillSignature(54, false, false, false, method); @@ -7495,7 +7595,7 @@ var ts; return finishNode(method); } else { - var property = createNode(140, fullStart); + var property = createNode(141, fullStart); property.name = name; property.questionToken = questionToken; property.type = parseTypeAnnotation(); @@ -7540,14 +7640,14 @@ var ts; switch (token) { case 17: case 25: - return parseSignatureMember(147); + return parseSignatureMember(148); case 19: return isIndexSignature() ? parseIndexSignatureDeclaration(scanner.getStartPos(), undefined, undefined) : parsePropertyOrMethodSignature(); case 92: if (lookAhead(isStartOfConstructSignature)) { - return parseSignatureMember(148); + return parseSignatureMember(149); } case 9: case 8: @@ -7577,7 +7677,7 @@ var ts; return token === 17 || token === 25; } function parseTypeLiteral() { - var node = createNode(155); + var node = createNode(156); node.members = parseObjectTypeMembers(); return finishNode(node); } @@ -7593,12 +7693,12 @@ var ts; return members; } function parseTupleType() { - var node = createNode(157); + var node = createNode(158); node.elementTypes = parseBracketedList(19, parseType, 19, 20); return finishNode(node); } function parseParenthesizedType() { - var node = createNode(160); + var node = createNode(161); parseExpected(17); node.type = parseType(); parseExpected(18); @@ -7606,7 +7706,7 @@ var ts; } function parseFunctionOrConstructorType(kind) { var node = createNode(kind); - if (kind === 153) { + if (kind === 154) { parseExpected(92); } fillSignature(34, false, false, false, node); @@ -7624,7 +7724,7 @@ var ts; case 120: case 131: var node = tryParse(parseKeywordAndNoDot); - return node || parseTypeReferenceOrTypePredicate(); + return node || parseTypeReference(); case 9: return parseStringLiteralTypeNode(); case 103: @@ -7647,7 +7747,7 @@ var ts; case 17: return parseParenthesizedType(); default: - return parseTypeReferenceOrTypePredicate(); + return parseTypeReference(); } } function isStartOfType() { @@ -7680,7 +7780,7 @@ var ts; var type = parseNonArrayType(); while (!scanner.hasPrecedingLineBreak() && parseOptional(19)) { parseExpected(20); - var node = createNode(156, type.pos); + var node = createNode(157, type.pos); node.elementType = type; type = finishNode(node); } @@ -7702,10 +7802,10 @@ var ts; return type; } function parseIntersectionTypeOrHigher() { - return parseUnionOrIntersectionType(159, parseArrayTypeOrHigher, 46); + return parseUnionOrIntersectionType(160, parseArrayTypeOrHigher, 46); } function parseUnionTypeOrHigher() { - return parseUnionOrIntersectionType(158, parseIntersectionTypeOrHigher, 47); + return parseUnionOrIntersectionType(159, parseIntersectionTypeOrHigher, 47); } function isStartOfFunctionType() { if (token === 25) { @@ -7734,15 +7834,35 @@ var ts; } return false; } + function parseTypeOrTypePredicate() { + var typePredicateVariable = isIdentifier() && tryParse(parseTypePredicatePrefix); + var type = parseType(); + if (typePredicateVariable) { + var node = createNode(151, typePredicateVariable.pos); + node.parameterName = typePredicateVariable; + node.type = type; + return finishNode(node); + } + else { + return type; + } + } + function parseTypePredicatePrefix() { + var id = parseIdentifier(); + if (token === 124 && !scanner.hasPrecedingLineBreak()) { + nextToken(); + return id; + } + } function parseType() { return doOutsideOfContext(10, parseTypeWorker); } function parseTypeWorker() { if (isStartOfFunctionType()) { - return parseFunctionOrConstructorType(152); + return parseFunctionOrConstructorType(153); } if (token === 92) { - return parseFunctionOrConstructorType(153); + return parseFunctionOrConstructorType(154); } return parseUnionTypeOrHigher(); } @@ -7861,7 +7981,7 @@ var ts; return !scanner.hasPrecedingLineBreak() && isIdentifier(); } function parseYieldExpression() { - var node = createNode(186); + var node = createNode(187); nextToken(); if (!scanner.hasPrecedingLineBreak() && (token === 37 || isStartOfExpression())) { @@ -7875,8 +7995,8 @@ var ts; } function parseSimpleArrowFunctionExpression(identifier) { ts.Debug.assert(token === 34, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); - var node = createNode(176, identifier.pos); - var parameter = createNode(138, identifier.pos); + var node = createNode(177, identifier.pos); + var parameter = createNode(139, identifier.pos); parameter.name = identifier; finishNode(parameter); node.parameters = [parameter]; @@ -7987,7 +8107,7 @@ var ts; return parseParenthesizedArrowFunctionExpressionHead(false); } function parseParenthesizedArrowFunctionExpressionHead(allowAmbiguity) { - var node = createNode(176); + var node = createNode(177); setModifiers(node, parseModifiersForArrowFunction()); var isAsync = !!(node.flags & 256); fillSignature(54, false, isAsync, !allowAmbiguity, node); @@ -8019,7 +8139,7 @@ var ts; if (!questionToken) { return leftOperand; } - var node = createNode(184, leftOperand.pos); + var node = createNode(185, leftOperand.pos); node.condition = leftOperand; node.questionToken = questionToken; node.whenTrue = doOutsideOfContext(disallowInAndDecoratorContext, parseAssignmentExpressionOrHigher); @@ -8032,7 +8152,7 @@ var ts; return parseBinaryExpressionRest(precedence, leftOperand); } function isInOrOfKeyword(t) { - return t === 90 || t === 134; + return t === 90 || t === 135; } function parseBinaryExpressionRest(precedence, leftOperand) { while (true) { @@ -8110,43 +8230,43 @@ var ts; return -1; } function makeBinaryExpression(left, operatorToken, right) { - var node = createNode(183, left.pos); + var node = createNode(184, left.pos); node.left = left; node.operatorToken = operatorToken; node.right = right; return finishNode(node); } function makeAsExpression(left, right) { - var node = createNode(191, left.pos); + var node = createNode(192, left.pos); node.expression = left; node.type = right; return finishNode(node); } function parsePrefixUnaryExpression() { - var node = createNode(181); + var node = createNode(182); node.operator = token; nextToken(); node.operand = parseSimpleUnaryExpression(); return finishNode(node); } function parseDeleteExpression() { - var node = createNode(177); - nextToken(); - node.expression = parseSimpleUnaryExpression(); - return finishNode(node); - } - function parseTypeOfExpression() { var node = createNode(178); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } - function parseVoidExpression() { + function parseTypeOfExpression() { var node = createNode(179); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } + function parseVoidExpression() { + var node = createNode(180); + nextToken(); + node.expression = parseSimpleUnaryExpression(); + return finishNode(node); + } function isAwaitExpression() { if (token === 119) { if (inAwaitContext()) { @@ -8157,7 +8277,7 @@ var ts; return false; } function parseAwaitExpression() { - var node = createNode(180); + var node = createNode(181); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); @@ -8176,7 +8296,7 @@ var ts; var simpleUnaryExpression = parseSimpleUnaryExpression(); if (token === 38) { var start = ts.skipTrivia(sourceText, simpleUnaryExpression.pos); - if (simpleUnaryExpression.kind === 173) { + if (simpleUnaryExpression.kind === 174) { parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); } else { @@ -8224,7 +8344,7 @@ var ts; } function parseIncrementExpression() { if (token === 41 || token === 42) { - var node = createNode(181); + var node = createNode(182); node.operator = token; nextToken(); node.operand = parseLeftHandSideExpressionOrHigher(); @@ -8236,7 +8356,7 @@ var ts; var expression = parseLeftHandSideExpressionOrHigher(); ts.Debug.assert(ts.isLeftHandSideExpression(expression)); if ((token === 41 || token === 42) && !scanner.hasPrecedingLineBreak()) { - var node = createNode(182, expression.pos); + var node = createNode(183, expression.pos); node.operand = expression; node.operator = token; nextToken(); @@ -8259,7 +8379,7 @@ var ts; if (token === 17 || token === 21 || token === 19) { return expression; } - var node = createNode(168, expression.pos); + var node = createNode(169, expression.pos); node.expression = expression; node.dotToken = parseExpectedToken(21, false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); node.name = parseRightSideOfDot(true); @@ -8278,8 +8398,8 @@ var ts; function parseJsxElementOrSelfClosingElement(inExpressionContext) { var opening = parseJsxOpeningOrSelfClosingElement(inExpressionContext); var result; - if (opening.kind === 237) { - var node = createNode(235, opening.pos); + if (opening.kind === 238) { + var node = createNode(236, opening.pos); node.openingElement = opening; node.children = parseJsxChildren(node.openingElement.tagName); node.closingElement = parseJsxClosingElement(inExpressionContext); @@ -8289,14 +8409,14 @@ var ts; result = finishNode(node); } else { - ts.Debug.assert(opening.kind === 236); + ts.Debug.assert(opening.kind === 237); result = opening; } if (inExpressionContext && token === 25) { var invalidElement = tryParse(function () { return parseJsxElementOrSelfClosingElement(true); }); if (invalidElement) { parseErrorAtCurrentToken(ts.Diagnostics.JSX_expressions_must_have_one_parent_element); - var badNode = createNode(183, result.pos); + var badNode = createNode(184, result.pos); badNode.end = invalidElement.end; badNode.left = result; badNode.right = invalidElement; @@ -8308,13 +8428,13 @@ var ts; return result; } function parseJsxText() { - var node = createNode(238, scanner.getStartPos()); + var node = createNode(239, scanner.getStartPos()); token = scanner.scanJsxToken(); return finishNode(node); } function parseJsxChild() { switch (token) { - case 238: + case 239: return parseJsxText(); case 15: return parseJsxExpression(false); @@ -8350,7 +8470,7 @@ var ts; var attributes = parseList(13, parseJsxAttribute); var node; if (token === 27) { - node = createNode(237, fullStart); + node = createNode(238, fullStart); scanJsxText(); } else { @@ -8362,7 +8482,7 @@ var ts; parseExpected(27, undefined, false); scanJsxText(); } - node = createNode(236, fullStart); + node = createNode(237, fullStart); } node.tagName = tagName; node.attributes = attributes; @@ -8373,7 +8493,7 @@ var ts; var elementName = parseIdentifierName(); while (parseOptional(21)) { scanJsxIdentifier(); - var node = createNode(135, elementName.pos); + var node = createNode(136, elementName.pos); node.left = elementName; node.right = parseIdentifierName(); elementName = finishNode(node); @@ -8381,7 +8501,7 @@ var ts; return elementName; } function parseJsxExpression(inExpressionContext) { - var node = createNode(242); + var node = createNode(243); parseExpected(15); if (token !== 16) { node.expression = parseAssignmentExpressionOrHigher(); @@ -8400,7 +8520,7 @@ var ts; return parseJsxSpreadAttribute(); } scanJsxIdentifier(); - var node = createNode(240); + var node = createNode(241); node.name = parseIdentifierName(); if (parseOptional(56)) { switch (token) { @@ -8415,7 +8535,7 @@ var ts; return finishNode(node); } function parseJsxSpreadAttribute() { - var node = createNode(241); + var node = createNode(242); parseExpected(15); parseExpected(22); node.expression = parseExpression(); @@ -8423,7 +8543,7 @@ var ts; return finishNode(node); } function parseJsxClosingElement(inExpressionContext) { - var node = createNode(239); + var node = createNode(240); parseExpected(26); node.tagName = parseJsxElementName(); if (inExpressionContext) { @@ -8436,7 +8556,7 @@ var ts; return finishNode(node); } function parseTypeAssertion() { - var node = createNode(173); + var node = createNode(174); parseExpected(25); node.type = parseType(); parseExpected(27); @@ -8447,7 +8567,7 @@ var ts; while (true) { var dotToken = parseOptionalToken(21); if (dotToken) { - var propertyAccess = createNode(168, expression.pos); + var propertyAccess = createNode(169, expression.pos); propertyAccess.expression = expression; propertyAccess.dotToken = dotToken; propertyAccess.name = parseRightSideOfDot(true); @@ -8455,7 +8575,7 @@ var ts; continue; } if (!inDecoratorContext() && parseOptional(19)) { - var indexedAccess = createNode(169, expression.pos); + var indexedAccess = createNode(170, expression.pos); indexedAccess.expression = expression; if (token !== 20) { indexedAccess.argumentExpression = allowInAnd(parseExpression); @@ -8469,7 +8589,7 @@ var ts; continue; } if (token === 11 || token === 12) { - var tagExpression = createNode(172, expression.pos); + var tagExpression = createNode(173, expression.pos); tagExpression.tag = expression; tagExpression.template = token === 11 ? parseLiteralNode() @@ -8488,7 +8608,7 @@ var ts; if (!typeArguments) { return expression; } - var callExpr = createNode(170, expression.pos); + var callExpr = createNode(171, expression.pos); callExpr.expression = expression; callExpr.typeArguments = typeArguments; callExpr.arguments = parseArgumentList(); @@ -8496,7 +8616,7 @@ var ts; continue; } else if (token === 17) { - var callExpr = createNode(170, expression.pos); + var callExpr = createNode(171, expression.pos); callExpr.expression = expression; callExpr.arguments = parseArgumentList(); expression = finishNode(callExpr); @@ -8591,28 +8711,28 @@ var ts; return parseIdentifier(ts.Diagnostics.Expression_expected); } function parseParenthesizedExpression() { - var node = createNode(174); + var node = createNode(175); parseExpected(17); node.expression = allowInAnd(parseExpression); parseExpected(18); return finishNode(node); } function parseSpreadElement() { - var node = createNode(187); + var node = createNode(188); parseExpected(22); node.expression = parseAssignmentExpressionOrHigher(); return finishNode(node); } function parseArgumentOrArrayLiteralElement() { return token === 22 ? parseSpreadElement() : - token === 24 ? createNode(189) : + token === 24 ? createNode(190) : parseAssignmentExpressionOrHigher(); } function parseArgumentExpression() { return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement); } function parseArrayLiteralExpression() { - var node = createNode(166); + var node = createNode(167); parseExpected(19); if (scanner.hasPrecedingLineBreak()) node.flags |= 1024; @@ -8622,10 +8742,10 @@ var ts; } function tryParseAccessorDeclaration(fullStart, decorators, modifiers) { if (parseContextualModifier(123)) { - return parseAccessorDeclaration(145, fullStart, decorators, modifiers); + return parseAccessorDeclaration(146, fullStart, decorators, modifiers); } else if (parseContextualModifier(129)) { - return parseAccessorDeclaration(146, fullStart, decorators, modifiers); + return parseAccessorDeclaration(147, fullStart, decorators, modifiers); } return undefined; } @@ -8646,7 +8766,7 @@ var ts; } var isShorthandPropertyAssignment = tokenIsIdentifier && (token === 24 || token === 16 || token === 56); if (isShorthandPropertyAssignment) { - var shorthandDeclaration = createNode(248, fullStart); + var shorthandDeclaration = createNode(249, fullStart); shorthandDeclaration.name = propertyName; shorthandDeclaration.questionToken = questionToken; var equalsToken = parseOptionalToken(56); @@ -8657,7 +8777,7 @@ var ts; return finishNode(shorthandDeclaration); } else { - var propertyAssignment = createNode(247, fullStart); + var propertyAssignment = createNode(248, fullStart); propertyAssignment.modifiers = modifiers; propertyAssignment.name = propertyName; propertyAssignment.questionToken = questionToken; @@ -8667,7 +8787,7 @@ var ts; } } function parseObjectLiteralExpression() { - var node = createNode(167); + var node = createNode(168); parseExpected(15); if (scanner.hasPrecedingLineBreak()) { node.flags |= 1024; @@ -8681,7 +8801,7 @@ var ts; if (saveDecoratorContext) { setDecoratorContext(false); } - var node = createNode(175); + var node = createNode(176); setModifiers(node, parseModifiers()); parseExpected(87); node.asteriskToken = parseOptionalToken(37); @@ -8703,7 +8823,7 @@ var ts; return isIdentifier() ? parseIdentifier() : undefined; } function parseNewExpression() { - var node = createNode(171); + var node = createNode(172); parseExpected(92); node.expression = parseMemberExpressionOrHigher(); node.typeArguments = tryParse(parseTypeArgumentsInExpression); @@ -8713,7 +8833,7 @@ var ts; return finishNode(node); } function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) { - var node = createNode(194); + var node = createNode(195); if (parseExpected(15, diagnosticMessage) || ignoreMissingOpenBrace) { node.statements = parseList(1, parseStatement); parseExpected(16); @@ -8741,12 +8861,12 @@ var ts; return block; } function parseEmptyStatement() { - var node = createNode(196); + var node = createNode(197); parseExpected(23); return finishNode(node); } function parseIfStatement() { - var node = createNode(198); + var node = createNode(199); parseExpected(88); parseExpected(17); node.expression = allowInAnd(parseExpression); @@ -8756,7 +8876,7 @@ var ts; return finishNode(node); } function parseDoStatement() { - var node = createNode(199); + var node = createNode(200); parseExpected(79); node.statement = parseStatement(); parseExpected(104); @@ -8767,7 +8887,7 @@ var ts; return finishNode(node); } function parseWhileStatement() { - var node = createNode(200); + var node = createNode(201); parseExpected(104); parseExpected(17); node.expression = allowInAnd(parseExpression); @@ -8790,21 +8910,21 @@ var ts; } var forOrForInOrForOfStatement; if (parseOptional(90)) { - var forInStatement = createNode(202, pos); + var forInStatement = createNode(203, pos); forInStatement.initializer = initializer; forInStatement.expression = allowInAnd(parseExpression); parseExpected(18); forOrForInOrForOfStatement = forInStatement; } - else if (parseOptional(134)) { - var forOfStatement = createNode(203, pos); + else if (parseOptional(135)) { + var forOfStatement = createNode(204, pos); forOfStatement.initializer = initializer; forOfStatement.expression = allowInAnd(parseAssignmentExpressionOrHigher); parseExpected(18); forOrForInOrForOfStatement = forOfStatement; } else { - var forStatement = createNode(201, pos); + var forStatement = createNode(202, pos); forStatement.initializer = initializer; parseExpected(23); if (token !== 23 && token !== 18) { @@ -8822,7 +8942,7 @@ var ts; } function parseBreakOrContinueStatement(kind) { var node = createNode(kind); - parseExpected(kind === 205 ? 70 : 75); + parseExpected(kind === 206 ? 70 : 75); if (!canParseSemicolon()) { node.label = parseIdentifier(); } @@ -8830,7 +8950,7 @@ var ts; return finishNode(node); } function parseReturnStatement() { - var node = createNode(206); + var node = createNode(207); parseExpected(94); if (!canParseSemicolon()) { node.expression = allowInAnd(parseExpression); @@ -8839,7 +8959,7 @@ var ts; return finishNode(node); } function parseWithStatement() { - var node = createNode(207); + var node = createNode(208); parseExpected(105); parseExpected(17); node.expression = allowInAnd(parseExpression); @@ -8848,7 +8968,7 @@ var ts; return finishNode(node); } function parseCaseClause() { - var node = createNode(243); + var node = createNode(244); parseExpected(71); node.expression = allowInAnd(parseExpression); parseExpected(54); @@ -8856,7 +8976,7 @@ var ts; return finishNode(node); } function parseDefaultClause() { - var node = createNode(244); + var node = createNode(245); parseExpected(77); parseExpected(54); node.statements = parseList(3, parseStatement); @@ -8866,12 +8986,12 @@ var ts; return token === 71 ? parseCaseClause() : parseDefaultClause(); } function parseSwitchStatement() { - var node = createNode(208); + var node = createNode(209); parseExpected(96); parseExpected(17); node.expression = allowInAnd(parseExpression); parseExpected(18); - var caseBlock = createNode(222, scanner.getStartPos()); + var caseBlock = createNode(223, scanner.getStartPos()); parseExpected(15); caseBlock.clauses = parseList(2, parseCaseOrDefaultClause); parseExpected(16); @@ -8879,14 +8999,14 @@ var ts; return finishNode(node); } function parseThrowStatement() { - var node = createNode(210); + var node = createNode(211); parseExpected(98); node.expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression); parseSemicolon(); return finishNode(node); } function parseTryStatement() { - var node = createNode(211); + var node = createNode(212); parseExpected(100); node.tryBlock = parseBlock(false); node.catchClause = token === 72 ? parseCatchClause() : undefined; @@ -8897,7 +9017,7 @@ var ts; return finishNode(node); } function parseCatchClause() { - var result = createNode(246); + var result = createNode(247); parseExpected(72); if (parseExpected(17)) { result.variableDeclaration = parseVariableDeclaration(); @@ -8907,7 +9027,7 @@ var ts; return finishNode(result); } function parseDebuggerStatement() { - var node = createNode(212); + var node = createNode(213); parseExpected(76); parseSemicolon(); return finishNode(node); @@ -8916,13 +9036,13 @@ var ts; var fullStart = scanner.getStartPos(); var expression = allowInAnd(parseExpression); if (expression.kind === 69 && parseOptional(54)) { - var labeledStatement = createNode(209, fullStart); + var labeledStatement = createNode(210, fullStart); labeledStatement.label = expression; labeledStatement.statement = parseStatement(); return finishNode(labeledStatement); } else { - var expressionStatement = createNode(197, fullStart); + var expressionStatement = createNode(198, fullStart); expressionStatement.expression = expression; parseSemicolon(); return finishNode(expressionStatement); @@ -8967,6 +9087,8 @@ var ts; return false; } continue; + case 134: + return nextToken() === 15; case 89: nextToken(); return token === 9 || token === 37 || @@ -9024,6 +9146,7 @@ var ts; case 125: case 126: case 132: + case 134: return true; case 112: case 110: @@ -9067,9 +9190,9 @@ var ts; case 86: return parseForOrForInOrForOfStatement(); case 75: - return parseBreakOrContinueStatement(204); - case 70: return parseBreakOrContinueStatement(205); + case 70: + return parseBreakOrContinueStatement(206); case 94: return parseReturnStatement(); case 105: @@ -9101,6 +9224,7 @@ var ts; case 112: case 115: case 113: + case 134: if (isStartOfDeclaration()) { return parseDeclaration(); } @@ -9127,6 +9251,7 @@ var ts; return parseTypeAliasDeclaration(fullStart, decorators, modifiers); case 81: return parseEnumDeclaration(fullStart, decorators, modifiers); + case 134: case 125: case 126: return parseModuleDeclaration(fullStart, decorators, modifiers); @@ -9139,7 +9264,7 @@ var ts; parseExportDeclaration(fullStart, decorators, modifiers); default: if (decorators || modifiers) { - var node = createMissingNode(233, true, ts.Diagnostics.Declaration_expected); + var node = createMissingNode(234, true, ts.Diagnostics.Declaration_expected); node.pos = fullStart; node.decorators = decorators; setModifiers(node, modifiers); @@ -9160,16 +9285,16 @@ var ts; } function parseArrayBindingElement() { if (token === 24) { - return createNode(189); + return createNode(190); } - var node = createNode(165); + var node = createNode(166); node.dotDotDotToken = parseOptionalToken(22); node.name = parseIdentifierOrPattern(); node.initializer = parseBindingElementInitializer(false); return finishNode(node); } function parseObjectBindingElement() { - var node = createNode(165); + var node = createNode(166); var tokenIsIdentifier = isIdentifier(); var propertyName = parsePropertyName(); if (tokenIsIdentifier && token !== 54) { @@ -9184,14 +9309,14 @@ var ts; return finishNode(node); } function parseObjectBindingPattern() { - var node = createNode(163); + var node = createNode(164); parseExpected(15); node.elements = parseDelimitedList(9, parseObjectBindingElement); parseExpected(16); return finishNode(node); } function parseArrayBindingPattern() { - var node = createNode(164); + var node = createNode(165); parseExpected(19); node.elements = parseDelimitedList(10, parseArrayBindingElement); parseExpected(20); @@ -9210,7 +9335,7 @@ var ts; return parseIdentifier(); } function parseVariableDeclaration() { - var node = createNode(213); + var node = createNode(214); node.name = parseIdentifierOrPattern(); node.type = parseTypeAnnotation(); if (!isInOrOfKeyword(token)) { @@ -9219,7 +9344,7 @@ var ts; return finishNode(node); } function parseVariableDeclarationList(inForStatementInitializer) { - var node = createNode(214); + var node = createNode(215); switch (token) { case 102: break; @@ -9233,7 +9358,7 @@ var ts; ts.Debug.fail(); } nextToken(); - if (token === 134 && lookAhead(canFollowContextualOfKeyword)) { + if (token === 135 && lookAhead(canFollowContextualOfKeyword)) { node.declarations = createMissingList(); } else { @@ -9248,7 +9373,7 @@ var ts; return nextTokenIsIdentifier() && nextToken() === 18; } function parseVariableStatement(fullStart, decorators, modifiers) { - var node = createNode(195, fullStart); + var node = createNode(196, fullStart); node.decorators = decorators; setModifiers(node, modifiers); node.declarationList = parseVariableDeclarationList(false); @@ -9256,7 +9381,7 @@ var ts; return finishNode(node); } function parseFunctionDeclaration(fullStart, decorators, modifiers) { - var node = createNode(215, fullStart); + var node = createNode(216, fullStart); node.decorators = decorators; setModifiers(node, modifiers); parseExpected(87); @@ -9269,7 +9394,7 @@ var ts; return finishNode(node); } function parseConstructorDeclaration(pos, decorators, modifiers) { - var node = createNode(144, pos); + var node = createNode(145, pos); node.decorators = decorators; setModifiers(node, modifiers); parseExpected(121); @@ -9278,7 +9403,7 @@ var ts; return finishNode(node); } function parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, diagnosticMessage) { - var method = createNode(143, fullStart); + var method = createNode(144, fullStart); method.decorators = decorators; setModifiers(method, modifiers); method.asteriskToken = asteriskToken; @@ -9291,7 +9416,7 @@ var ts; return finishNode(method); } function parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken) { - var property = createNode(141, fullStart); + var property = createNode(142, fullStart); property.decorators = decorators; setModifiers(property, modifiers); property.name = name; @@ -9387,7 +9512,7 @@ var ts; decorators = []; decorators.pos = decoratorStart; } - var decorator = createNode(139, decoratorStart); + var decorator = createNode(140, decoratorStart); decorator.expression = doInDecoratorContext(parseLeftHandSideExpressionOrHigher); decorators.push(finishNode(decorator)); } @@ -9443,7 +9568,7 @@ var ts; } function parseClassElement() { if (token === 23) { - var result = createNode(193); + var result = createNode(194); nextToken(); return finishNode(result); } @@ -9474,10 +9599,10 @@ var ts; ts.Debug.fail("Should not have attempted to parse class member declaration."); } function parseClassExpression() { - return parseClassDeclarationOrExpression(scanner.getStartPos(), undefined, undefined, 188); + return parseClassDeclarationOrExpression(scanner.getStartPos(), undefined, undefined, 189); } function parseClassDeclaration(fullStart, decorators, modifiers) { - return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 216); + return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 217); } function parseClassDeclarationOrExpression(fullStart, decorators, modifiers, kind) { var node = createNode(kind, fullStart); @@ -9512,7 +9637,7 @@ var ts; } function parseHeritageClause() { if (token === 83 || token === 106) { - var node = createNode(245); + var node = createNode(246); node.token = token; nextToken(); node.types = parseDelimitedList(7, parseExpressionWithTypeArguments); @@ -9521,7 +9646,7 @@ var ts; return undefined; } function parseExpressionWithTypeArguments() { - var node = createNode(190); + var node = createNode(191); node.expression = parseLeftHandSideExpressionOrHigher(); if (token === 25) { node.typeArguments = parseBracketedList(18, parseType, 25, 27); @@ -9535,7 +9660,7 @@ var ts; return parseList(5, parseClassElement); } function parseInterfaceDeclaration(fullStart, decorators, modifiers) { - var node = createNode(217, fullStart); + var node = createNode(218, fullStart); node.decorators = decorators; setModifiers(node, modifiers); parseExpected(107); @@ -9546,7 +9671,7 @@ var ts; return finishNode(node); } function parseTypeAliasDeclaration(fullStart, decorators, modifiers) { - var node = createNode(218, fullStart); + var node = createNode(219, fullStart); node.decorators = decorators; setModifiers(node, modifiers); parseExpected(132); @@ -9558,13 +9683,13 @@ var ts; return finishNode(node); } function parseEnumMember() { - var node = createNode(249, scanner.getStartPos()); + var node = createNode(250, scanner.getStartPos()); node.name = parsePropertyName(); node.initializer = allowInAnd(parseNonParameterInitializer); return finishNode(node); } function parseEnumDeclaration(fullStart, decorators, modifiers) { - var node = createNode(219, fullStart); + var node = createNode(220, fullStart); node.decorators = decorators; setModifiers(node, modifiers); parseExpected(81); @@ -9579,7 +9704,7 @@ var ts; return finishNode(node); } function parseModuleBlock() { - var node = createNode(221, scanner.getStartPos()); + var node = createNode(222, scanner.getStartPos()); if (parseExpected(15)) { node.statements = parseList(1, parseStatement); parseExpected(16); @@ -9590,7 +9715,7 @@ var ts; return finishNode(node); } function parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags) { - var node = createNode(220, fullStart); + var node = createNode(221, fullStart); var namespaceFlag = flags & 65536; node.decorators = decorators; setModifiers(node, modifiers); @@ -9602,16 +9727,25 @@ var ts; return finishNode(node); } function parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers) { - var node = createNode(220, fullStart); + var node = createNode(221, fullStart); node.decorators = decorators; setModifiers(node, modifiers); - node.name = parseLiteralNode(true); + if (token === 134) { + node.name = parseIdentifier(); + node.flags |= 2097152; + } + else { + node.name = parseLiteralNode(true); + } node.body = parseModuleBlock(); return finishNode(node); } function parseModuleDeclaration(fullStart, decorators, modifiers) { var flags = modifiers ? modifiers.flags : 0; - if (parseOptional(126)) { + if (token === 134) { + return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers); + } + else if (parseOptional(126)) { flags |= 65536; } else { @@ -9639,7 +9773,7 @@ var ts; if (isIdentifier()) { identifier = parseIdentifier(); if (token !== 24 && token !== 133) { - var importEqualsDeclaration = createNode(223, fullStart); + var importEqualsDeclaration = createNode(224, fullStart); importEqualsDeclaration.decorators = decorators; setModifiers(importEqualsDeclaration, modifiers); importEqualsDeclaration.name = identifier; @@ -9649,7 +9783,7 @@ var ts; return finishNode(importEqualsDeclaration); } } - var importDeclaration = createNode(224, fullStart); + var importDeclaration = createNode(225, fullStart); importDeclaration.decorators = decorators; setModifiers(importDeclaration, modifiers); if (identifier || @@ -9663,13 +9797,13 @@ var ts; return finishNode(importDeclaration); } function parseImportClause(identifier, fullStart) { - var importClause = createNode(225, fullStart); + var importClause = createNode(226, fullStart); if (identifier) { importClause.name = identifier; } if (!importClause.name || parseOptional(24)) { - importClause.namedBindings = token === 37 ? parseNamespaceImport() : parseNamedImportsOrExports(227); + importClause.namedBindings = token === 37 ? parseNamespaceImport() : parseNamedImportsOrExports(228); } return finishNode(importClause); } @@ -9679,7 +9813,7 @@ var ts; : parseEntityName(false); } function parseExternalModuleReference() { - var node = createNode(234); + var node = createNode(235); parseExpected(127); parseExpected(17); node.expression = parseModuleSpecifier(); @@ -9697,7 +9831,7 @@ var ts; } } function parseNamespaceImport() { - var namespaceImport = createNode(226); + var namespaceImport = createNode(227); parseExpected(37); parseExpected(116); namespaceImport.name = parseIdentifier(); @@ -9705,14 +9839,14 @@ var ts; } function parseNamedImportsOrExports(kind) { var node = createNode(kind); - node.elements = parseBracketedList(21, kind === 227 ? parseImportSpecifier : parseExportSpecifier, 15, 16); + node.elements = parseBracketedList(21, kind === 228 ? parseImportSpecifier : parseExportSpecifier, 15, 16); return finishNode(node); } function parseExportSpecifier() { - return parseImportOrExportSpecifier(232); + return parseImportOrExportSpecifier(233); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(228); + return parseImportOrExportSpecifier(229); } function parseImportOrExportSpecifier(kind) { var node = createNode(kind); @@ -9731,13 +9865,13 @@ var ts; else { node.name = identifierName; } - if (kind === 228 && checkIdentifierIsKeyword) { + if (kind === 229 && checkIdentifierIsKeyword) { parseErrorAtPosition(checkIdentifierStart, checkIdentifierEnd - checkIdentifierStart, ts.Diagnostics.Identifier_expected); } return finishNode(node); } function parseExportDeclaration(fullStart, decorators, modifiers) { - var node = createNode(230, fullStart); + var node = createNode(231, fullStart); node.decorators = decorators; setModifiers(node, modifiers); if (parseOptional(37)) { @@ -9745,7 +9879,7 @@ var ts; node.moduleSpecifier = parseModuleSpecifier(); } else { - node.exportClause = parseNamedImportsOrExports(231); + node.exportClause = parseNamedImportsOrExports(232); if (token === 133 || (token === 9 && !scanner.hasPrecedingLineBreak())) { parseExpected(133); node.moduleSpecifier = parseModuleSpecifier(); @@ -9755,7 +9889,7 @@ var ts; return finishNode(node); } function parseExportAssignment(fullStart, decorators, modifiers) { - var node = createNode(229, fullStart); + var node = createNode(230, fullStart); node.decorators = decorators; setModifiers(node, modifiers); if (parseOptional(56)) { @@ -9827,10 +9961,10 @@ var ts; function setExternalModuleIndicator(sourceFile) { sourceFile.externalModuleIndicator = ts.forEach(sourceFile.statements, function (node) { return node.flags & 2 - || node.kind === 223 && node.moduleReference.kind === 234 - || node.kind === 224 - || node.kind === 229 + || node.kind === 224 && node.moduleReference.kind === 235 + || node.kind === 225 || node.kind === 230 + || node.kind === 231 ? node : undefined; }); @@ -9865,7 +9999,7 @@ var ts; function parseJSDocTypeExpression(start, length) { scanner.setText(sourceText, start, length); token = nextToken(); - var result = createNode(251); + var result = createNode(252); parseExpected(15); result.type = parseJSDocTopLevelType(); parseExpected(16); @@ -9876,12 +10010,12 @@ var ts; function parseJSDocTopLevelType() { var type = parseJSDocType(); if (token === 47) { - var unionType = createNode(255, type.pos); + var unionType = createNode(256, type.pos); unionType.types = parseJSDocTypeList(type); type = finishNode(unionType); } if (token === 56) { - var optionalType = createNode(262, type.pos); + var optionalType = createNode(263, type.pos); nextToken(); optionalType.type = type; type = finishNode(optionalType); @@ -9892,20 +10026,20 @@ var ts; var type = parseBasicTypeExpression(); while (true) { if (token === 19) { - var arrayType = createNode(254, type.pos); + var arrayType = createNode(255, type.pos); arrayType.elementType = type; nextToken(); parseExpected(20); type = finishNode(arrayType); } else if (token === 53) { - var nullableType = createNode(257, type.pos); + var nullableType = createNode(258, type.pos); nullableType.type = type; nextToken(); type = finishNode(nullableType); } else if (token === 49) { - var nonNullableType = createNode(258, type.pos); + var nonNullableType = createNode(259, type.pos); nonNullableType.type = type; nextToken(); type = finishNode(nonNullableType); @@ -9949,27 +10083,27 @@ var ts; return parseJSDocTypeReference(); } function parseJSDocThisType() { - var result = createNode(266); + var result = createNode(267); nextToken(); parseExpected(54); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocConstructorType() { - var result = createNode(265); + var result = createNode(266); nextToken(); parseExpected(54); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocVariadicType() { - var result = createNode(264); + var result = createNode(265); nextToken(); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocFunctionType() { - var result = createNode(263); + var result = createNode(264); nextToken(); parseExpected(17); result.parameters = parseDelimitedList(22, parseJSDocParameter); @@ -9982,12 +10116,12 @@ var ts; return finishNode(result); } function parseJSDocParameter() { - var parameter = createNode(138); + var parameter = createNode(139); parameter.type = parseJSDocType(); return finishNode(parameter); } function parseJSDocTypeReference() { - var result = createNode(261); + var result = createNode(262); result.name = parseSimplePropertyName(); while (parseOptional(21)) { if (token === 25) { @@ -10016,13 +10150,13 @@ var ts; } } function parseQualifiedName(left) { - var result = createNode(135, left.pos); + var result = createNode(136, left.pos); result.left = left; result.right = parseIdentifierName(); return finishNode(result); } function parseJSDocRecordType() { - var result = createNode(259); + var result = createNode(260); nextToken(); result.members = parseDelimitedList(24, parseJSDocRecordMember); checkForTrailingComma(result.members); @@ -10030,7 +10164,7 @@ var ts; return finishNode(result); } function parseJSDocRecordMember() { - var result = createNode(260); + var result = createNode(261); result.name = parseSimplePropertyName(); if (token === 54) { nextToken(); @@ -10039,13 +10173,13 @@ var ts; return finishNode(result); } function parseJSDocNonNullableType() { - var result = createNode(258); + var result = createNode(259); nextToken(); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocTupleType() { - var result = createNode(256); + var result = createNode(257); nextToken(); result.types = parseDelimitedList(25, parseJSDocType); checkForTrailingComma(result.types); @@ -10059,7 +10193,7 @@ var ts; } } function parseJSDocUnionType() { - var result = createNode(255); + var result = createNode(256); nextToken(); result.types = parseJSDocTypeList(parseJSDocType()); parseExpected(18); @@ -10077,7 +10211,7 @@ var ts; return types; } function parseJSDocAllType() { - var result = createNode(252); + var result = createNode(253); nextToken(); return finishNode(result); } @@ -10090,11 +10224,11 @@ var ts; token === 27 || token === 56 || token === 47) { - var result = createNode(253, pos); + var result = createNode(254, pos); return finishNode(result); } else { - var result = createNode(257, pos); + var result = createNode(258, pos); result.type = parseJSDocType(); return finishNode(result); } @@ -10165,7 +10299,7 @@ var ts; if (!tags) { return undefined; } - var result = createNode(267, start); + var result = createNode(268, start); result.tags = tags; return finishNode(result, end); } @@ -10202,7 +10336,7 @@ var ts; return undefined; } function handleUnknownTag(atToken, tagName) { - var result = createNode(268, atToken.pos); + var result = createNode(269, atToken.pos); result.atToken = atToken; result.tagName = tagName; return finishNode(result, pos); @@ -10253,7 +10387,7 @@ var ts; if (!typeExpression) { typeExpression = tryParseTypeExpression(); } - var result = createNode(269, atToken.pos); + var result = createNode(270, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.preParameterName = preName; @@ -10263,16 +10397,6 @@ var ts; return finishNode(result, pos); } function handleReturnTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 270; })) { - parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); - } - var result = createNode(270, atToken.pos); - result.atToken = atToken; - result.tagName = tagName; - result.typeExpression = tryParseTypeExpression(); - return finishNode(result, pos); - } - function handleTypeTag(atToken, tagName) { if (ts.forEach(tags, function (t) { return t.kind === 271; })) { parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } @@ -10282,10 +10406,20 @@ var ts; result.typeExpression = tryParseTypeExpression(); return finishNode(result, pos); } - function handleTemplateTag(atToken, tagName) { + function handleTypeTag(atToken, tagName) { if (ts.forEach(tags, function (t) { return t.kind === 272; })) { parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } + var result = createNode(272, atToken.pos); + result.atToken = atToken; + result.tagName = tagName; + result.typeExpression = tryParseTypeExpression(); + return finishNode(result, pos); + } + function handleTemplateTag(atToken, tagName) { + if (ts.forEach(tags, function (t) { return t.kind === 273; })) { + parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); + } var typeParameters = []; typeParameters.pos = pos; while (true) { @@ -10296,7 +10430,7 @@ var ts; parseErrorAtPosition(startPos, 0, ts.Diagnostics.Identifier_expected); return undefined; } - var typeParameter = createNode(137, name_8.pos); + var typeParameter = createNode(138, name_8.pos); typeParameter.name = name_8; finishNode(typeParameter, pos); typeParameters.push(typeParameter); @@ -10307,7 +10441,7 @@ var ts; pos++; } typeParameters.end = pos; - var result = createNode(272, atToken.pos); + var result = createNode(273, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeParameters = typeParameters; @@ -10629,16 +10763,16 @@ var ts; : 4; } function getModuleInstanceState(node) { - if (node.kind === 217 || node.kind === 218) { + if (node.kind === 218 || node.kind === 219) { return 0; } else if (ts.isConstEnumDeclaration(node)) { return 2; } - else if ((node.kind === 224 || node.kind === 223) && !(node.flags & 2)) { + else if ((node.kind === 225 || node.kind === 224) && !(node.flags & 2)) { return 0; } - else if (node.kind === 221) { + else if (node.kind === 222) { var state = 0; ts.forEachChild(node, function (n) { switch (getModuleInstanceState(n)) { @@ -10654,7 +10788,7 @@ var ts; }); return state; } - else if (node.kind === 220) { + else if (node.kind === 221) { return getModuleInstanceState(node.body); } else { @@ -10682,6 +10816,10 @@ var ts; var labelStack; var labelIndexMap; var implicitLabels; + var hasClassExtends; + var hasAsyncFunctions; + var hasDecorators; + var hasParameterDecorators; var inStrictMode; var symbolCount = 0; var Symbol; @@ -10708,6 +10846,10 @@ var ts; labelStack = undefined; labelIndexMap = undefined; implicitLabels = undefined; + hasClassExtends = false; + hasAsyncFunctions = false; + hasDecorators = false; + hasParameterDecorators = false; } return bindSourceFile; function createSymbol(flags, name) { @@ -10730,17 +10872,17 @@ var ts; if (symbolFlags & 107455) { var valueDeclaration = symbol.valueDeclaration; if (!valueDeclaration || - (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 220)) { + (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 221)) { symbol.valueDeclaration = node; } } } function getDeclarationName(node) { if (node.name) { - if (node.kind === 220 && node.name.kind === 9) { - return "\"" + node.name.text + "\""; + if (ts.isAmbientModule(node)) { + return ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + node.name.text + "\""; } - if (node.name.kind === 136) { + if (node.name.kind === 137) { var nameExpression = node.name.expression; if (ts.isStringOrNumericLiteral(nameExpression.kind)) { return nameExpression.text; @@ -10751,21 +10893,21 @@ var ts; return node.name.text; } switch (node.kind) { - case 144: + case 145: return "__constructor"; - case 152: - case 147: - return "__call"; case 153: case 148: - return "__new"; + return "__call"; + case 154: case 149: + return "__new"; + case 150: return "__index"; - case 230: + case 231: return "__export"; - case 229: + case 230: return node.isExportEquals ? "export=" : "default"; - case 183: + case 184: switch (ts.getSpecialPropertyAssignmentKind(node)) { case 2: return "export="; @@ -10777,8 +10919,8 @@ var ts; } ts.Debug.fail("Unknown binary declaration kind"); break; - case 215: case 216: + case 217: return node.flags & 512 ? "default" : undefined; } } @@ -10826,7 +10968,7 @@ var ts; function declareModuleMember(node, symbolFlags, symbolExcludes) { var hasExportModifier = ts.getCombinedNodeFlags(node) & 2; if (symbolFlags & 8388608) { - if (node.kind === 232 || (node.kind === 223 && hasExportModifier)) { + if (node.kind === 233 || (node.kind === 224 && hasExportModifier)) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } else { @@ -10834,7 +10976,7 @@ var ts; } } else { - if (hasExportModifier || container.flags & 131072) { + if (!ts.isAmbientModule(node) && (hasExportModifier || container.flags & 131072)) { var exportKind = (symbolFlags & 107455 ? 1048576 : 0) | (symbolFlags & 793056 ? 2097152 : 0) | (symbolFlags & 1536 ? 4194304 : 0); @@ -10873,10 +11015,11 @@ var ts; var kind = node.kind; var flags = node.flags; flags &= ~1572864; - if (kind === 217) { + flags &= ~62914560; + if (kind === 218) { seenThisKeyword = false; } - var saveState = kind === 250 || kind === 221 || ts.isFunctionLikeKind(kind); + var saveState = kind === 251 || kind === 222 || ts.isFunctionLikeKind(kind); if (saveState) { savedReachabilityState = currentReachabilityState; savedLabelStack = labelStack; @@ -10894,9 +11037,23 @@ var ts; flags |= 1048576; } } - if (kind === 217) { + if (kind === 218) { flags = seenThisKeyword ? flags | 262144 : flags & ~262144; } + if (kind === 251) { + if (hasClassExtends) { + flags |= 4194304; + } + if (hasDecorators) { + flags |= 8388608; + } + if (hasParameterDecorators) { + flags |= 16777216; + } + if (hasAsyncFunctions) { + flags |= 33554432; + } + } node.flags = flags; if (saveState) { hasExplicitReturn = savedHasExplicitReturn; @@ -10915,40 +11072,40 @@ var ts; return; } switch (node.kind) { - case 200: + case 201: bindWhileStatement(node); break; - case 199: + case 200: bindDoStatement(node); break; - case 201: + case 202: bindForStatement(node); break; - case 202: case 203: + case 204: bindForInOrForOfStatement(node); break; - case 198: + case 199: bindIfStatement(node); break; - case 206: - case 210: + case 207: + case 211: bindReturnOrThrow(node); break; + case 206: case 205: - case 204: bindBreakOrContinueStatement(node); break; - case 211: + case 212: bindTryStatement(node); break; - case 208: + case 209: bindSwitchStatement(node); break; - case 222: + case 223: bindCaseBlock(node); break; - case 209: + case 210: bindLabeledStatement(node); break; default: @@ -11010,14 +11167,14 @@ var ts; } function bindReturnOrThrow(n) { bind(n.expression); - if (n.kind === 206) { + if (n.kind === 207) { hasExplicitReturn = true; } currentReachabilityState = 4; } function bindBreakOrContinueStatement(n) { bind(n.label); - var isValidJump = jumpToLabel(n.label, n.kind === 205 ? currentReachabilityState : 4); + var isValidJump = jumpToLabel(n.label, n.kind === 206 ? currentReachabilityState : 4); if (isValidJump) { currentReachabilityState = 4; } @@ -11038,7 +11195,7 @@ var ts; var postSwitchLabel = pushImplicitLabel(); bind(n.expression); bind(n.caseBlock); - var hasDefault = ts.forEach(n.caseBlock.clauses, function (c) { return c.kind === 244; }); + var hasDefault = ts.forEach(n.caseBlock.clauses, function (c) { return c.kind === 245; }); var postSwitchState = hasDefault && currentReachabilityState !== 2 ? 4 : preSwitchState; popImplicitLabel(postSwitchLabel, postSwitchState); } @@ -11063,37 +11220,37 @@ var ts; } function getContainerFlags(node) { switch (node.kind) { - case 188: - case 216: + case 189: case 217: - case 219: - case 155: - case 167: + case 218: + case 220: + case 156: + case 168: return 1; - case 147: case 148: case 149: - case 143: - case 142: - case 215: + case 150: case 144: + case 143: + case 216: case 145: case 146: - case 152: + case 147: case 153: - case 175: + case 154: case 176: - case 220: - case 250: - case 218: + case 177: + case 221: + case 251: + case 219: return 5; - case 246: - case 201: + case 247: case 202: case 203: - case 222: + case 204: + case 223: return 2; - case 194: + case 195: return ts.isFunctionLike(node.parent) ? 0 : 2; } return 0; @@ -11109,33 +11266,33 @@ var ts; } function declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes) { switch (container.kind) { - case 220: + case 221: return declareModuleMember(node, symbolFlags, symbolExcludes); - case 250: + case 251: return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 188: - case 216: - return declareClassMember(node, symbolFlags, symbolExcludes); - case 219: - return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 155: - case 167: + case 189: case 217: + return declareClassMember(node, symbolFlags, symbolExcludes); + case 220: + return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); + case 156: + case 168: + case 218: return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 152: case 153: - case 147: + case 154: case 148: case 149: - case 143: - case 142: + case 150: case 144: + case 143: case 145: case 146: - case 215: - case 175: + case 147: + case 216: case 176: - case 218: + case 177: + case 219: return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes); } } @@ -11150,11 +11307,11 @@ var ts; : declareSymbol(file.locals, undefined, node, symbolFlags, symbolExcludes); } function hasExportDeclarations(node) { - var body = node.kind === 250 ? node : node.body; - if (body.kind === 250 || body.kind === 221) { + var body = node.kind === 251 ? node : node.body; + if (body.kind === 251 || body.kind === 222) { for (var _i = 0, _a = body.statements; _i < _a.length; _i++) { var stat = _a[_i]; - if (stat.kind === 230 || stat.kind === 229) { + if (stat.kind === 231 || stat.kind === 230) { return true; } } @@ -11171,7 +11328,10 @@ var ts; } function bindModuleDeclaration(node) { setExportContextFlag(node); - if (node.name.kind === 9) { + if (ts.isAmbientModule(node)) { + if (node.flags & 2) { + errorOnFirstToken(node, ts.Diagnostics.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible); + } declareSymbolAndAddToSymbolTable(node, 512, 106639); } else { @@ -11213,7 +11373,7 @@ var ts; continue; } var identifier = prop.name; - var currentKind = prop.kind === 247 || prop.kind === 248 || prop.kind === 143 + var currentKind = prop.kind === 248 || prop.kind === 249 || prop.kind === 144 ? 1 : 2; var existingKind = seen[identifier.text]; @@ -11235,10 +11395,10 @@ var ts; } function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { switch (blockScopeContainer.kind) { - case 220: + case 221: declareModuleMember(node, symbolFlags, symbolExcludes); break; - case 250: + case 251: if (ts.isExternalModule(container)) { declareModuleMember(node, symbolFlags, symbolExcludes); break; @@ -11360,17 +11520,17 @@ var ts; } function updateStrictMode(node) { switch (node.kind) { - case 250: - case 221: + case 251: + case 222: updateStrictModeStatementList(node.statements); return; - case 194: + case 195: if (ts.isFunctionLike(node.parent)) { updateStrictModeStatementList(node.statements); } return; - case 216: - case 188: + case 217: + case 189: inStrictMode = true; return; } @@ -11395,7 +11555,7 @@ var ts; switch (node.kind) { case 69: return checkStrictModeIdentifier(node); - case 183: + case 184: if (ts.isInJavaScriptFile(node)) { var specialKind = ts.getSpecialPropertyAssignmentKind(node); switch (specialKind) { @@ -11418,94 +11578,91 @@ var ts; } } return checkStrictModeBinaryExpression(node); - case 246: + case 247: return checkStrictModeCatchClause(node); - case 177: + case 178: return checkStrictModeDeleteExpression(node); case 8: return checkStrictModeNumericLiteral(node); - case 182: + case 183: return checkStrictModePostfixUnaryExpression(node); - case 181: + case 182: return checkStrictModePrefixUnaryExpression(node); - case 207: + case 208: return checkStrictModeWithStatement(node); - case 161: + case 162: seenThisKeyword = true; return; - case 150: + case 151: return checkTypePredicate(node); - case 137: - return declareSymbolAndAddToSymbolTable(node, 262144, 530912); case 138: + return declareSymbolAndAddToSymbolTable(node, 262144, 530912); + case 139: return bindParameter(node); - case 213: - case 165: + case 214: + case 166: return bindVariableDeclarationOrBindingElement(node); + case 142: case 141: - case 140: return bindPropertyOrMethodOrAccessor(node, 4 | (node.questionToken ? 536870912 : 0), 107455); - case 247: case 248: - return bindPropertyOrMethodOrAccessor(node, 4, 107455); case 249: + return bindPropertyOrMethodOrAccessor(node, 4, 107455); + case 250: return bindPropertyOrMethodOrAccessor(node, 8, 107455); - case 147: case 148: case 149: + case 150: return declareSymbolAndAddToSymbolTable(node, 131072, 0); - case 143: - case 142: - return bindPropertyOrMethodOrAccessor(node, 8192 | (node.questionToken ? 536870912 : 0), ts.isObjectLiteralMethod(node) ? 107455 : 99263); - case 215: - checkStrictModeFunctionName(node); - return declareSymbolAndAddToSymbolTable(node, 16, 106927); case 144: - return declareSymbolAndAddToSymbolTable(node, 16384, 0); + case 143: + return bindPropertyOrMethodOrAccessor(node, 8192 | (node.questionToken ? 536870912 : 0), ts.isObjectLiteralMethod(node) ? 107455 : 99263); + case 216: + return bindFunctionDeclaration(node); case 145: - return bindPropertyOrMethodOrAccessor(node, 32768, 41919); + return declareSymbolAndAddToSymbolTable(node, 16384, 0); case 146: + return bindPropertyOrMethodOrAccessor(node, 32768, 41919); + case 147: return bindPropertyOrMethodOrAccessor(node, 65536, 74687); - case 152: case 153: + case 154: return bindFunctionOrConstructorType(node); - case 155: + case 156: return bindAnonymousDeclaration(node, 2048, "__type"); - case 167: + case 168: return bindObjectLiteralExpression(node); - case 175: case 176: - checkStrictModeFunctionName(node); - var bindingName = node.name ? node.name.text : "__function"; - return bindAnonymousDeclaration(node, 16, bindingName); - case 170: + case 177: + return bindFunctionExpression(node); + case 171: if (ts.isInJavaScriptFile(node)) { bindCallExpression(node); } break; - case 188: - case 216: - return bindClassLikeDeclaration(node); + case 189: case 217: - return bindBlockScopedDeclaration(node, 64, 792960); + return bindClassLikeDeclaration(node); case 218: - return bindBlockScopedDeclaration(node, 524288, 793056); + return bindBlockScopedDeclaration(node, 64, 792960); case 219: - return bindEnumDeclaration(node); + return bindBlockScopedDeclaration(node, 524288, 793056); case 220: + return bindEnumDeclaration(node); + case 221: return bindModuleDeclaration(node); - case 223: - case 226: - case 228: - case 232: - return declareSymbolAndAddToSymbolTable(node, 8388608, 8388608); - case 225: - return bindImportClause(node); - case 230: - return bindExportDeclaration(node); + case 224: + case 227: case 229: + case 233: + return declareSymbolAndAddToSymbolTable(node, 8388608, 8388608); + case 226: + return bindImportClause(node); + case 231: + return bindExportDeclaration(node); + case 230: return bindExportAssignment(node); - case 250: + case 251: return bindSourceFileIfExternalModule(); } } @@ -11514,7 +11671,7 @@ var ts; if (parameterName && parameterName.kind === 69) { checkStrictModeIdentifier(parameterName); } - if (parameterName && parameterName.kind === 161) { + if (parameterName && parameterName.kind === 162) { seenThisKeyword = true; } bind(type); @@ -11529,7 +11686,7 @@ var ts; bindAnonymousDeclaration(file, 512, "\"" + ts.removeFileExtension(file.fileName) + "\""); } function bindExportAssignment(node) { - var boundExpression = node.kind === 229 ? node.expression : node.right; + var boundExpression = node.kind === 230 ? node.expression : node.right; if (!container.symbol || !container.symbol.exports) { bindAnonymousDeclaration(node, 8388608, getDeclarationName(node)); } @@ -11568,7 +11725,7 @@ var ts; bindExportAssignment(node); } function bindThisPropertyAssignment(node) { - if (container.kind === 175 || container.kind === 215) { + if (container.kind === 176 || container.kind === 216) { container.symbol.members = container.symbol.members || {}; declareSymbol(container.symbol.members, container.symbol, node, 4, 107455); } @@ -11590,7 +11747,15 @@ var ts; } } function bindClassLikeDeclaration(node) { - if (node.kind === 216) { + if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) { + if (ts.getClassExtendsHeritageClauseElement(node) !== undefined) { + hasClassExtends = true; + } + if (ts.nodeIsDecorated(node)) { + hasDecorators = true; + } + } + if (node.kind === 217) { bindBlockScopedDeclaration(node, 32, 899519); } else { @@ -11633,6 +11798,12 @@ var ts; } } function bindParameter(node) { + if (!ts.isDeclarationFile(file) && + !ts.isInAmbientContext(node) && + ts.nodeIsDecorated(node)) { + hasDecorators = true; + hasParameterDecorators = true; + } if (inStrictMode) { checkStrictModeEvalOrArguments(node, node.name); } @@ -11647,7 +11818,34 @@ var ts; declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4, 107455); } } + function bindFunctionDeclaration(node) { + if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) { + if (ts.isAsyncFunctionLike(node)) { + hasAsyncFunctions = true; + } + } + checkStrictModeFunctionName(node); + return declareSymbolAndAddToSymbolTable(node, 16, 106927); + } + function bindFunctionExpression(node) { + if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) { + if (ts.isAsyncFunctionLike(node)) { + hasAsyncFunctions = true; + } + } + checkStrictModeFunctionName(node); + var bindingName = node.name ? node.name.text : "__function"; + return bindAnonymousDeclaration(node, 16, bindingName); + } function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) { + if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) { + if (ts.isAsyncFunctionLike(node)) { + hasAsyncFunctions = true; + } + if (ts.nodeIsDecorated(node)) { + hasDecorators = true; + } + } return ts.hasDynamicName(node) ? bindAnonymousDeclaration(node, symbolFlags, "__computed") : declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes); @@ -11707,15 +11905,15 @@ var ts; function checkUnreachable(node) { switch (currentReachabilityState) { case 4: - var reportError = (ts.isStatement(node) && node.kind !== 196) || - node.kind === 216 || - (node.kind === 220 && shouldReportErrorOnModuleDeclaration(node)) || - (node.kind === 219 && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums)); + var reportError = (ts.isStatement(node) && node.kind !== 197) || + node.kind === 217 || + (node.kind === 221 && shouldReportErrorOnModuleDeclaration(node)) || + (node.kind === 220 && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums)); if (reportError) { currentReachabilityState = 8; var reportUnreachableCode = !options.allowUnreachableCode && !ts.isInAmbientContext(node) && - (node.kind !== 195 || + (node.kind !== 196 || ts.getCombinedNodeFlags(node.declarationList) & 24576 || ts.forEach(node.declarationList.declarations, function (d) { return d.initializer; })); if (reportUnreachableCode) { @@ -11789,6 +11987,7 @@ var ts; getTypeCount: function () { return typeCount; }, isUndefinedSymbol: function (symbol) { return symbol === undefinedSymbol; }, isArgumentsSymbol: function (symbol) { return symbol === argumentsSymbol; }, + isUnknownSymbol: function (symbol) { return symbol === unknownSymbol; }, getDiagnostics: getDiagnostics, getGlobalDiagnostics: getGlobalDiagnostics, getTypeOfSymbolAtLocation: getNarrowedTypeOfSymbol, @@ -11803,6 +12002,7 @@ var ts; getSymbolsInScope: getSymbolsInScope, getSymbolAtLocation: getSymbolAtLocation, getShorthandAssignmentValueSymbol: getShorthandAssignmentValueSymbol, + getExportSpecifierLocalTargetSymbol: getExportSpecifierLocalTargetSymbol, getTypeAtLocation: getTypeOfNode, typeToString: typeToString, getSymbolDisplayBuilder: getSymbolDisplayBuilder, @@ -11876,11 +12076,6 @@ var ts; var unionTypes = {}; var intersectionTypes = {}; var stringLiteralTypes = {}; - var emitExtends = false; - var emitDecorate = false; - var emitParam = false; - var emitAwaiter = false; - var emitGenerator = false; var resolutionTargets = []; var resolutionResults = []; var resolutionPropertyNames = []; @@ -12013,7 +12208,7 @@ var ts; target.flags |= source.flags; if (source.valueDeclaration && (!target.valueDeclaration || - (target.valueDeclaration.kind === 220 && source.valueDeclaration.kind !== 220))) { + (target.valueDeclaration.kind === 221 && source.valueDeclaration.kind !== 221))) { target.valueDeclaration = source.valueDeclaration; } ts.forEach(source.declarations, function (node) { @@ -12067,6 +12262,24 @@ var ts; } } } + function mergeModuleAugmentation(moduleName) { + var moduleAugmentation = moduleName.parent; + if (moduleAugmentation.symbol.valueDeclaration !== moduleAugmentation) { + ts.Debug.assert(moduleAugmentation.symbol.declarations.length > 1); + return; + } + if (ts.isGlobalScopeAugmentation(moduleAugmentation)) { + mergeSymbolTable(globals, moduleAugmentation.symbol.exports); + } + else { + var mainModule = resolveExternalModuleNameWorker(moduleName, moduleName, ts.Diagnostics.Invalid_module_name_in_augmentation_module_0_cannot_be_found); + if (!mainModule) { + return; + } + mainModule = mainModule.flags & 33554432 ? mainModule : cloneSymbol(mainModule); + mergeSymbol(mainModule, moduleAugmentation.symbol); + } + } function addToSymbolTable(target, source, message) { for (var id in source) { if (ts.hasProperty(source, id)) { @@ -12092,17 +12305,8 @@ var ts; var nodeId = getNodeId(node); return nodeLinks[nodeId] || (nodeLinks[nodeId] = {}); } - function getSourceFile(node) { - return ts.getAncestor(node, 250); - } function isGlobalSourceFile(node) { - return node.kind === 250 && !ts.isExternalOrCommonJsModule(node); - } - function isPrimitiveApparentType(type) { - return type === globalStringType || - type === globalNumberType || - type === globalBooleanType || - type === globalESSymbolType; + return node.kind === 251 && !ts.isExternalOrCommonJsModule(node); } function getSymbol(symbols, name, meaning) { if (meaning && ts.hasProperty(symbols, name)) { @@ -12140,18 +12344,18 @@ var ts; return ts.indexOf(sourceFiles, declarationFile) <= ts.indexOf(sourceFiles, useFile); } if (declaration.pos <= usage.pos) { - return declaration.kind !== 213 || + return declaration.kind !== 214 || !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage); } return isUsedInFunctionOrNonStaticProperty(declaration, usage); function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage) { var container = ts.getEnclosingBlockScopeContainer(declaration); - if (declaration.parent.parent.kind === 195 || - declaration.parent.parent.kind === 201) { + if (declaration.parent.parent.kind === 196 || + declaration.parent.parent.kind === 202) { return isSameScopeDescendentOf(usage, declaration, container); } - else if (declaration.parent.parent.kind === 203 || - declaration.parent.parent.kind === 202) { + else if (declaration.parent.parent.kind === 204 || + declaration.parent.parent.kind === 203) { var expression = declaration.parent.parent.expression; return isSameScopeDescendentOf(usage, expression, container); } @@ -12167,7 +12371,7 @@ var ts; return true; } var initializerOfNonStaticProperty = current.parent && - current.parent.kind === 141 && + current.parent.kind === 142 && (current.parent.flags & 64) === 0 && current.parent.initializer === current; if (initializerOfNonStaticProperty) { @@ -12192,15 +12396,15 @@ var ts; if (meaning & result.flags & 793056) { useResult = result.flags & 262144 ? lastLocation === location.type || - lastLocation.kind === 138 || - lastLocation.kind === 137 + lastLocation.kind === 139 || + lastLocation.kind === 138 : false; } if (meaning & 107455 && result.flags & 1) { useResult = - lastLocation.kind === 138 || + lastLocation.kind === 139 || (lastLocation === location.type && - result.valueDeclaration.kind === 138); + result.valueDeclaration.kind === 139); } } if (useResult) { @@ -12212,13 +12416,12 @@ var ts; } } switch (location.kind) { - case 250: + case 251: if (!ts.isExternalOrCommonJsModule(location)) break; - case 220: + case 221: var moduleExports = getSymbolOfNode(location).exports; - if (location.kind === 250 || - (location.kind === 220 && location.name.kind === 9)) { + if (location.kind === 251 || ts.isAmbientModule(location)) { if (result = moduleExports["default"]) { var localSymbol = ts.getLocalSymbolForExportDefault(result); if (localSymbol && (result.flags & meaning) && localSymbol.name === name) { @@ -12228,7 +12431,7 @@ var ts; } if (ts.hasProperty(moduleExports, name) && moduleExports[name].flags === 8388608 && - ts.getDeclarationOfKind(moduleExports[name], 232)) { + ts.getDeclarationOfKind(moduleExports[name], 233)) { break; } } @@ -12236,13 +12439,13 @@ var ts; break loop; } break; - case 219: + case 220: if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8)) { break loop; } break; + case 142: case 141: - case 140: if (ts.isClassLike(location.parent) && !(location.flags & 64)) { var ctor = findConstructorDeclaration(location.parent); if (ctor && ctor.locals) { @@ -12252,9 +12455,9 @@ var ts; } } break; - case 216: - case 188: case 217: + case 189: + case 218: if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & 793056)) { if (lastLocation && lastLocation.flags & 64) { error(errorLocation, ts.Diagnostics.Static_members_cannot_reference_class_type_parameters); @@ -12262,7 +12465,7 @@ var ts; } break loop; } - if (location.kind === 188 && meaning & 32) { + if (location.kind === 189 && meaning & 32) { var className = location.name; if (className && name === className.text) { result = location.symbol; @@ -12270,28 +12473,28 @@ var ts; } } break; - case 136: + case 137: grandparent = location.parent.parent; - if (ts.isClassLike(grandparent) || grandparent.kind === 217) { + if (ts.isClassLike(grandparent) || grandparent.kind === 218) { if (result = getSymbol(getSymbolOfNode(grandparent).members, name, meaning & 793056)) { error(errorLocation, ts.Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); return undefined; } } break; - case 143: - case 142: case 144: + case 143: case 145: case 146: - case 215: - case 176: + case 147: + case 216: + case 177: if (meaning & 3 && name === "arguments") { result = argumentsSymbol; break loop; } break; - case 175: + case 176: if (meaning & 3 && name === "arguments") { result = argumentsSymbol; break loop; @@ -12304,8 +12507,8 @@ var ts; } } break; - case 139: - if (location.parent && location.parent.kind === 138) { + case 140: + if (location.parent && location.parent.kind === 139) { location = location.parent; } if (location.parent && ts.isClassElement(location.parent)) { @@ -12321,7 +12524,9 @@ var ts; } if (!result) { if (nameNotFoundMessage) { - error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg)); + if (!checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg)) { + error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg)); + } } return undefined; } @@ -12340,11 +12545,40 @@ var ts; } return result; } + function checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) { + if (!errorLocation || (errorLocation.kind === 69 && (isTypeReferenceIdentifier(errorLocation)) || isInTypeQuery(errorLocation))) { + return false; + } + var container = ts.getThisContainer(errorLocation, true); + var location = container; + while (location) { + if (ts.isClassLike(location.parent)) { + var classSymbol = getSymbolOfNode(location.parent); + if (!classSymbol) { + break; + } + var constructorType = getTypeOfSymbol(classSymbol); + if (getPropertyOfType(constructorType, name)) { + error(errorLocation, ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg), symbolToString(classSymbol)); + return true; + } + if (location === container && !(location.flags & 64)) { + var instanceType = getDeclaredTypeOfSymbol(classSymbol).thisType; + if (getPropertyOfType(instanceType, name)) { + error(errorLocation, ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg)); + return true; + } + } + } + location = location.parent; + } + return false; + } function checkResolvedBlockScopedVariable(result, errorLocation) { ts.Debug.assert((result.flags & 2) !== 0); var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) ? d : undefined; }); ts.Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined"); - if (!isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 213), errorLocation)) { + if (!isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 214), errorLocation)) { error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name)); } } @@ -12361,10 +12595,10 @@ var ts; } function getAnyImportSyntax(node) { if (ts.isAliasSymbolDeclaration(node)) { - if (node.kind === 223) { + if (node.kind === 224) { return node; } - while (node && node.kind !== 224) { + while (node && node.kind !== 225) { node = node.parent; } return node; @@ -12374,7 +12608,7 @@ var ts; return ts.forEach(symbol.declarations, function (d) { return ts.isAliasSymbolDeclaration(d) ? d : undefined; }); } function getTargetOfImportEqualsDeclaration(node) { - if (node.moduleReference.kind === 234) { + if (node.moduleReference.kind === 235) { return resolveExternalModuleSymbol(resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node))); } return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, node); @@ -12458,17 +12692,17 @@ var ts; } function getTargetOfAliasDeclaration(node) { switch (node.kind) { - case 223: + case 224: return getTargetOfImportEqualsDeclaration(node); - case 225: - return getTargetOfImportClause(node); case 226: + return getTargetOfImportClause(node); + case 227: return getTargetOfNamespaceImport(node); - case 228: - return getTargetOfImportSpecifier(node); - case 232: - return getTargetOfExportSpecifier(node); case 229: + return getTargetOfImportSpecifier(node); + case 233: + return getTargetOfExportSpecifier(node); + case 230: return getTargetOfExportAssignment(node); } } @@ -12510,10 +12744,10 @@ var ts; if (!links.referenced) { links.referenced = true; var node = getDeclarationOfAliasSymbol(symbol); - if (node.kind === 229) { + if (node.kind === 230) { checkExpressionCached(node.expression); } - else if (node.kind === 232) { + else if (node.kind === 233) { checkExpressionCached(node.propertyName || node.name); } else if (ts.isInternalModuleImportEqualsDeclaration(node)) { @@ -12523,17 +12757,17 @@ var ts; } function getSymbolOfPartOfRightHandSideOfImportEquals(entityName, importDeclaration) { if (!importDeclaration) { - importDeclaration = ts.getAncestor(entityName, 223); + importDeclaration = ts.getAncestor(entityName, 224); ts.Debug.assert(importDeclaration !== undefined); } if (entityName.kind === 69 && ts.isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { entityName = entityName.parent; } - if (entityName.kind === 69 || entityName.parent.kind === 135) { + if (entityName.kind === 69 || entityName.parent.kind === 136) { return resolveEntityName(entityName, 1536); } else { - ts.Debug.assert(entityName.parent.kind === 223); + ts.Debug.assert(entityName.parent.kind === 224); return resolveEntityName(entityName, 107455 | 793056 | 1536); } } @@ -12552,9 +12786,9 @@ var ts; return undefined; } } - else if (name.kind === 135 || name.kind === 168) { - var left = name.kind === 135 ? name.left : name.expression; - var right = name.kind === 135 ? name.right : name.name; + else if (name.kind === 136 || name.kind === 169) { + var left = name.kind === 136 ? name.left : name.expression; + var right = name.kind === 136 ? name.right : name.name; var namespace = resolveEntityName(left, 1536, ignoreErrors); if (!namespace || namespace === unknownSymbol || ts.nodeIsMissing(right)) { return undefined; @@ -12574,6 +12808,9 @@ var ts; return symbol.flags & meaning ? symbol : resolveAlias(symbol); } function resolveExternalModuleName(location, moduleReferenceExpression) { + return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ts.Diagnostics.Cannot_find_module_0); + } + function resolveExternalModuleNameWorker(location, moduleReferenceExpression, moduleNotFoundError) { if (moduleReferenceExpression.kind !== 9) { return; } @@ -12586,19 +12823,24 @@ var ts; if (!isRelative) { var symbol = getSymbol(globals, "\"" + moduleName + "\"", 512); if (symbol) { - return symbol; + return getMergedSymbol(symbol); } } - var resolvedModule = ts.getResolvedModule(getSourceFile(location), moduleReferenceLiteral.text); + var resolvedModule = ts.getResolvedModule(ts.getSourceFileOfNode(location), moduleReferenceLiteral.text); var sourceFile = resolvedModule && host.getSourceFile(resolvedModule.resolvedFileName); if (sourceFile) { if (sourceFile.symbol) { - return sourceFile.symbol; + return getMergedSymbol(sourceFile.symbol); } - error(moduleReferenceLiteral, ts.Diagnostics.File_0_is_not_a_module, sourceFile.fileName); - return; + if (moduleNotFoundError) { + error(moduleReferenceLiteral, ts.Diagnostics.File_0_is_not_a_module, sourceFile.fileName); + } + return undefined; } - error(moduleReferenceLiteral, ts.Diagnostics.Cannot_find_module_0, moduleName); + if (moduleNotFoundError) { + error(moduleReferenceLiteral, moduleNotFoundError, moduleName); + } + return undefined; } function resolveExternalModuleSymbol(moduleSymbol) { return moduleSymbol && resolveSymbol(moduleSymbol.exports["export="]) || moduleSymbol; @@ -12709,7 +12951,7 @@ var ts; var members = node.members; for (var _i = 0, members_1 = members; _i < members_1.length; _i++) { var member = members_1[_i]; - if (member.kind === 144 && ts.nodeIsPresent(member.body)) { + if (member.kind === 145 && ts.nodeIsPresent(member.body)) { return member; } } @@ -12775,17 +13017,17 @@ var ts; } } switch (location_1.kind) { - case 250: + case 251: if (!ts.isExternalOrCommonJsModule(location_1)) { break; } - case 220: + case 221: if (result = callback(getSymbolOfNode(location_1).exports)) { return result; } break; - case 216: case 217: + case 218: if (result = callback(getSymbolOfNode(location_1).members)) { return result; } @@ -12818,7 +13060,7 @@ var ts; return ts.forEachValue(symbols, function (symbolFromSymbolTable) { if (symbolFromSymbolTable.flags & 8388608 && symbolFromSymbolTable.name !== "export=" - && !ts.getDeclarationOfKind(symbolFromSymbolTable, 232)) { + && !ts.getDeclarationOfKind(symbolFromSymbolTable, 233)) { if (!useOnlyExternalAliasing || ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) { var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable); @@ -12847,7 +13089,7 @@ var ts; if (symbolFromSymbolTable === symbol) { return true; } - symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 && !ts.getDeclarationOfKind(symbolFromSymbolTable, 232)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; + symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 && !ts.getDeclarationOfKind(symbolFromSymbolTable, 233)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; if (symbolFromSymbolTable.flags & meaning) { qualify = true; return true; @@ -12902,8 +13144,7 @@ var ts; } } function hasExternalModuleSymbol(declaration) { - return (declaration.kind === 220 && declaration.name.kind === 9) || - (declaration.kind === 250 && ts.isExternalOrCommonJsModule(declaration)); + return ts.isAmbientModule(declaration) || (declaration.kind === 251 && ts.isExternalOrCommonJsModule(declaration)); } function hasVisibleDeclarations(symbol) { var aliasesToMakeVisible; @@ -12935,11 +13176,11 @@ var ts; } function isEntityNameVisible(entityName, enclosingDeclaration) { var meaning; - if (entityName.parent.kind === 154) { + if (entityName.parent.kind === 155) { meaning = 107455 | 1048576; } - else if (entityName.kind === 135 || entityName.kind === 168 || - entityName.parent.kind === 223) { + else if (entityName.kind === 136 || entityName.kind === 169 || + entityName.parent.kind === 224) { meaning = 1536; } else { @@ -12990,15 +13231,20 @@ var ts; function getTypeAliasForTypeLiteral(type) { if (type.symbol && type.symbol.flags & 2048) { var node = type.symbol.declarations[0].parent; - while (node.kind === 160) { + while (node.kind === 161) { node = node.parent; } - if (node.kind === 218) { + if (node.kind === 219) { return getSymbolOfNode(node); } } return undefined; } + function isTopLevelInExternalModuleAugmentation(node) { + return node && node.parent && + node.parent.kind === 222 && + ts.isExternalModuleAugmentation(node.parent.parent); + } function getSymbolDisplayBuilder() { function getNameOfSymbol(symbol) { if (symbol.declarations && symbol.declarations.length) { @@ -13007,10 +13253,10 @@ var ts; return ts.declarationNameToString(declaration.name); } switch (declaration.kind) { - case 188: + case 189: return "(Anonymous class)"; - case 175: case 176: + case 177: return "(Anonymous function)"; } } @@ -13224,7 +13470,7 @@ var ts; var isNonLocalFunctionSymbol = !!(symbol.flags & 16) && (symbol.parent || ts.forEach(symbol.declarations, function (declaration) { - return declaration.parent.kind === 250 || declaration.parent.kind === 221; + return declaration.parent.kind === 251 || declaration.parent.kind === 222; })); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { return !!(flags & 2) || @@ -13478,60 +13724,63 @@ var ts; return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 165: + case 166: return isDeclarationVisible(node.parent.parent); - case 213: + case 214: if (ts.isBindingPattern(node.name) && !node.name.elements.length) { return false; } - case 220: - case 216: + case 221: case 217: case 218: - case 215: case 219: - case 223: + case 216: + case 220: + case 224: + if (ts.isExternalModuleAugmentation(node)) { + return true; + } var parent_4 = getDeclarationContainer(node); if (!(ts.getCombinedNodeFlags(node) & 2) && - !(node.kind !== 223 && parent_4.kind !== 250 && ts.isInAmbientContext(parent_4))) { + !(node.kind !== 224 && parent_4.kind !== 251 && ts.isInAmbientContext(parent_4))) { return isGlobalSourceFile(parent_4); } return isDeclarationVisible(parent_4); - case 141: - case 140: - case 145: - case 146: - case 143: case 142: + case 141: + case 146: + case 147: + case 144: + case 143: if (node.flags & (16 | 32)) { return false; } - case 144: - case 148: - case 147: + case 145: case 149: - case 138: - case 221: - case 152: + case 148: + case 150: + case 139: + case 222: case 153: - case 155: - case 151: + case 154: case 156: + case 152: case 157: case 158: case 159: case 160: + case 161: return isDeclarationVisible(node.parent); - case 225: case 226: - case 228: - return false; - case 137: - case 250: - return true; + case 227: case 229: return false; + case 138: + case 251: + return true; + case 230: + return false; default: ts.Debug.fail("isDeclarationVisible unknown: SyntaxKind: " + node.kind); } @@ -13539,10 +13788,10 @@ var ts; } function collectLinkedAliases(node) { var exportSymbol; - if (node.parent && node.parent.kind === 229) { + if (node.parent && node.parent.kind === 230) { exportSymbol = resolveName(node.parent, node.text, 107455 | 793056 | 1536 | 8388608, ts.Diagnostics.Cannot_find_name_0, node); } - else if (node.parent.kind === 232) { + else if (node.parent.kind === 233) { var exportSpecifier = node.parent; exportSymbol = exportSpecifier.parent.parent.moduleSpecifier ? getExternalModuleMember(exportSpecifier.parent.parent, exportSpecifier) : @@ -13564,7 +13813,9 @@ var ts; var internalModuleReference = declaration.moduleReference; var firstIdentifier = getFirstIdentifier(internalModuleReference); var importSymbol = resolveName(declaration, firstIdentifier.text, 107455 | 793056 | 1536, ts.Diagnostics.Cannot_find_name_0, firstIdentifier); - buildVisibleNodeList(importSymbol.declarations); + if (importSymbol) { + buildVisibleNodeList(importSymbol.declarations); + } } }); } @@ -13617,10 +13868,10 @@ var ts; } function getDeclarationContainer(node) { node = ts.getRootDeclaration(node); - return node.kind === 213 ? node.parent.parent.parent : node.parent; + return node.kind === 214 ? node.parent.parent.parent : node.parent; } function getTypeOfPrototypeProperty(prototype) { - var classType = getDeclaredTypeOfSymbol(prototype.parent); + var classType = getDeclaredTypeOfSymbol(getMergedSymbol(prototype.parent)); return classType.typeParameters ? createTypeReference(classType, ts.map(classType.typeParameters, function (_) { return anyType; })) : classType; } function getTypeOfPropertyOfType(type, name) { @@ -13641,7 +13892,7 @@ var ts; case 9: case 8: return name.text; - case 136: + case 137: if (ts.isStringOrNumericLiteral(name.expression.kind)) { return name.expression.text; } @@ -13649,7 +13900,7 @@ var ts; return undefined; } function isComputedNonLiteralName(name) { - return name.kind === 136 && !ts.isStringOrNumericLiteral(name.expression.kind); + return name.kind === 137 && !ts.isStringOrNumericLiteral(name.expression.kind); } function getTypeForBindingElement(declaration) { var pattern = declaration.parent; @@ -13664,7 +13915,7 @@ var ts; return parentType; } var type; - if (pattern.kind === 163) { + if (pattern.kind === 164) { var name_10 = declaration.propertyName || declaration.name; if (isComputedNonLiteralName(name_10)) { return anyType; @@ -13702,10 +13953,10 @@ var ts; return type; } function getTypeForVariableLikeDeclaration(declaration) { - if (declaration.parent.parent.kind === 202) { - return anyType; - } if (declaration.parent.parent.kind === 203) { + return stringType; + } + if (declaration.parent.parent.kind === 204) { return checkRightHandSideOfForOf(declaration.parent.parent.expression) || anyType; } if (ts.isBindingPattern(declaration.parent)) { @@ -13714,10 +13965,10 @@ var ts; if (declaration.type) { return getTypeFromTypeNode(declaration.type); } - if (declaration.kind === 138) { + if (declaration.kind === 139) { var func = declaration.parent; - if (func.kind === 146 && !ts.hasDynamicName(func)) { - var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 145); + if (func.kind === 147 && !ts.hasDynamicName(func)) { + var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 146); if (getter) { return getReturnTypeOfSignature(getSignatureFromDeclaration(getter)); } @@ -13730,7 +13981,7 @@ var ts; if (declaration.initializer) { return checkExpressionCached(declaration.initializer); } - if (declaration.kind === 248) { + if (declaration.kind === 249) { return checkIdentifier(declaration.name); } if (ts.isBindingPattern(declaration.name)) { @@ -13777,7 +14028,7 @@ var ts; if (elements.length === 0 || elements[elements.length - 1].dotDotDotToken) { return languageVersion >= 2 ? createIterableType(anyType) : anyArrayType; } - var elementTypes = ts.map(elements, function (e) { return e.kind === 189 ? anyType : getTypeFromBindingElement(e, includePatternInType); }); + var elementTypes = ts.map(elements, function (e) { return e.kind === 190 ? anyType : getTypeFromBindingElement(e, includePatternInType); }); if (includePatternInType) { var result = createNewTupleType(elementTypes); result.pattern = pattern; @@ -13786,7 +14037,7 @@ var ts; return createTupleType(elementTypes); } function getTypeFromBindingPattern(pattern, includePatternInType) { - return pattern.kind === 163 + return pattern.kind === 164 ? getTypeFromObjectBindingPattern(pattern, includePatternInType) : getTypeFromArrayBindingPattern(pattern, includePatternInType); } @@ -13796,10 +14047,10 @@ var ts; if (reportErrors) { reportErrorsFromWidening(declaration, type); } - if (declaration.kind === 247) { + if (declaration.kind === 248) { return type; } - if (type.flags & 134217728 && (declaration.kind === 141 || declaration.kind === 140)) { + if (type.flags & 134217728 && (declaration.kind === 142 || declaration.kind === 141)) { return type; } return getWidenedType(type); @@ -13807,7 +14058,7 @@ var ts; type = declaration.dotDotDotToken ? anyArrayType : anyType; if (reportErrors && compilerOptions.noImplicitAny) { var root = ts.getRootDeclaration(declaration); - if (!isPrivateWithinAmbient(root) && !(root.kind === 138 && isPrivateWithinAmbient(root.parent))) { + if (!isPrivateWithinAmbient(root) && !(root.kind === 139 && isPrivateWithinAmbient(root.parent))) { reportImplicitAnyError(declaration, type); } } @@ -13820,17 +14071,17 @@ var ts; return links.type = getTypeOfPrototypeProperty(symbol); } var declaration = symbol.valueDeclaration; - if (declaration.parent.kind === 246) { + if (declaration.parent.kind === 247) { return links.type = anyType; } - if (declaration.kind === 229) { + if (declaration.kind === 230) { return links.type = checkExpression(declaration.expression); } - if (declaration.kind === 183) { + if (declaration.kind === 184) { return links.type = checkExpression(declaration.right); } - if (declaration.kind === 168) { - if (declaration.parent.kind === 183) { + if (declaration.kind === 169) { + if (declaration.parent.kind === 184) { return links.type = checkExpressionCached(declaration.parent.right); } } @@ -13856,7 +14107,7 @@ var ts; } function getAnnotatedAccessorType(accessor) { if (accessor) { - if (accessor.kind === 145) { + if (accessor.kind === 146) { return accessor.type && getTypeFromTypeNode(accessor.type); } else { @@ -13872,8 +14123,8 @@ var ts; if (!pushTypeResolution(symbol, 0)) { return unknownType; } - var getter = ts.getDeclarationOfKind(symbol, 145); - var setter = ts.getDeclarationOfKind(symbol, 146); + var getter = ts.getDeclarationOfKind(symbol, 146); + var setter = ts.getDeclarationOfKind(symbol, 147); var type; var getterReturnType = getAnnotatedAccessorType(getter); if (getterReturnType) { @@ -13899,7 +14150,7 @@ var ts; if (!popTypeResolution()) { type = anyType; if (compilerOptions.noImplicitAny) { - var getter_1 = ts.getDeclarationOfKind(symbol, 145); + var getter_1 = ts.getDeclarationOfKind(symbol, 146); error(getter_1, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol)); } } @@ -13988,9 +14239,9 @@ var ts; if (!node) { return typeParameters; } - if (node.kind === 216 || node.kind === 188 || - node.kind === 215 || node.kind === 175 || - node.kind === 143 || node.kind === 176) { + if (node.kind === 217 || node.kind === 189 || + node.kind === 216 || node.kind === 176 || + node.kind === 144 || node.kind === 177) { var declarations = node.typeParameters; if (declarations) { return appendTypeParameters(appendOuterTypeParameters(typeParameters, node), declarations); @@ -13999,15 +14250,15 @@ var ts; } } function getOuterTypeParametersOfClassOrInterface(symbol) { - var declaration = symbol.flags & 32 ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 217); + var declaration = symbol.flags & 32 ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 218); return appendOuterTypeParameters(undefined, declaration); } function getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol) { var result; for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var node = _a[_i]; - if (node.kind === 217 || node.kind === 216 || - node.kind === 188 || node.kind === 218) { + if (node.kind === 218 || node.kind === 217 || + node.kind === 189 || node.kind === 219) { var declaration = node; if (declaration.typeParameters) { result = appendTypeParameters(result, declaration.typeParameters); @@ -14130,7 +14381,7 @@ var ts; type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 217 && ts.getInterfaceBaseTypeNodes(declaration)) { + if (declaration.kind === 218 && ts.getInterfaceBaseTypeNodes(declaration)) { for (var _b = 0, _c = ts.getInterfaceBaseTypeNodes(declaration); _b < _c.length; _b++) { var node = _c[_b]; var baseType = getTypeFromTypeNode(node); @@ -14159,7 +14410,7 @@ var ts; function isIndependentInterface(symbol) { for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 217) { + if (declaration.kind === 218) { if (declaration.flags & 262144) { return false; } @@ -14208,7 +14459,7 @@ var ts; if (!pushTypeResolution(symbol, 2)) { return unknownType; } - var declaration = ts.getDeclarationOfKind(symbol, 218); + var declaration = ts.getDeclarationOfKind(symbol, 219); var type = getTypeFromTypeNode(declaration.type); if (popTypeResolution()) { links.typeParameters = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); @@ -14239,7 +14490,7 @@ var ts; if (!links.declaredType) { var type = createType(512); type.symbol = symbol; - if (!ts.getDeclarationOfKind(symbol, 137).constraint) { + if (!ts.getDeclarationOfKind(symbol, 138).constraint) { type.constraint = noConstraintType; } links.declaredType = type; @@ -14291,11 +14542,11 @@ var ts; case 120: case 131: case 103: - case 162: + case 163: return true; - case 156: + case 157: return isIndependentType(node.elementType); - case 151: + case 152: return isIndependentTypeReference(node); } return false; @@ -14304,7 +14555,7 @@ var ts; return node.type && isIndependentType(node.type) || !node.type && !node.initializer; } function isIndependentFunctionLikeDeclaration(node) { - if (node.kind !== 144 && (!node.type || !isIndependentType(node.type))) { + if (node.kind !== 145 && (!node.type || !isIndependentType(node.type))) { return false; } for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) { @@ -14320,12 +14571,12 @@ var ts; var declaration = symbol.declarations[0]; if (declaration) { switch (declaration.kind) { - case 141: - case 140: - return isIndependentVariableLikeDeclaration(declaration); - case 143: case 142: + case 141: + return isIndependentVariableLikeDeclaration(declaration); case 144: + case 143: + case 145: return isIndependentFunctionLikeDeclaration(declaration); } } @@ -14838,7 +15089,7 @@ var ts; function getSignatureFromDeclaration(declaration) { var links = getNodeLinks(declaration); if (!links.resolvedSignature) { - var classType = declaration.kind === 144 ? + var classType = declaration.kind === 145 ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : undefined; var typeParameters = classType ? classType.localTypeParameters : @@ -14854,7 +15105,7 @@ var ts; paramSymbol = resolvedSymbol; } parameters.push(paramSymbol); - if (param.type && param.type.kind === 162) { + if (param.type && param.type.kind === 163) { hasStringLiterals = true; } if (param.initializer || param.questionToken || param.dotDotDotToken) { @@ -14877,8 +15128,8 @@ var ts; returnType = getTypeFromTypeNode(declaration.type); } else { - if (declaration.kind === 145 && !ts.hasDynamicName(declaration)) { - var setter = ts.getDeclarationOfKind(declaration.symbol, 146); + if (declaration.kind === 146 && !ts.hasDynamicName(declaration)) { + var setter = ts.getDeclarationOfKind(declaration.symbol, 147); returnType = getAnnotatedAccessorType(setter); } if (!returnType && ts.nodeIsMissing(declaration.body)) { @@ -14896,19 +15147,19 @@ var ts; for (var i = 0, len = symbol.declarations.length; i < len; i++) { var node = symbol.declarations[i]; switch (node.kind) { - case 152: case 153: - case 215: - case 143: - case 142: + case 154: + case 216: case 144: - case 147: + case 143: + case 145: case 148: case 149: - case 145: + case 150: case 146: - case 175: + case 147: case 176: + case 177: if (i > 0 && node.body) { var previous = symbol.declarations[i - 1]; if (node.parent === previous.parent && node.kind === previous.kind && node.pos === previous.end) { @@ -14988,7 +15239,7 @@ var ts; } function getOrCreateTypeFromSignature(signature) { if (!signature.isolatedSignatureType) { - var isConstructor = signature.declaration.kind === 144 || signature.declaration.kind === 148; + var isConstructor = signature.declaration.kind === 145 || signature.declaration.kind === 149; var type = createObjectType(65536 | 262144); type.members = emptySymbols; type.properties = emptyArray; @@ -15025,7 +15276,7 @@ var ts; : undefined; } function getConstraintDeclaration(type) { - return ts.getDeclarationOfKind(type.symbol, 137).constraint; + return ts.getDeclarationOfKind(type.symbol, 138).constraint; } function hasConstraintReferenceTo(type, target) { var checked; @@ -15058,7 +15309,7 @@ var ts; return typeParameter.constraint === noConstraintType ? undefined : typeParameter.constraint; } function getParentSymbolOfTypeParameter(typeParameter) { - return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 137).parent); + return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 138).parent); } function getTypeListId(types) { if (types) { @@ -15144,7 +15395,7 @@ var ts; function getTypeFromTypeReference(node) { var links = getNodeLinks(node); if (!links.resolvedType) { - var typeNameOrExpression = node.kind === 151 ? node.typeName : + var typeNameOrExpression = node.kind === 152 ? node.typeName : ts.isSupportedExpressionWithTypeArguments(node) ? node.expression : undefined; var symbol = typeNameOrExpression && resolveEntityName(typeNameOrExpression, 793056) || unknownSymbol; @@ -15170,9 +15421,9 @@ var ts; for (var _i = 0, declarations_3 = declarations; _i < declarations_3.length; _i++) { var declaration = declarations_3[_i]; switch (declaration.kind) { - case 216: case 217: - case 219: + case 218: + case 220: return declaration; } } @@ -15388,9 +15639,9 @@ var ts; function getThisType(node) { var container = ts.getThisContainer(node, false); var parent = container && container.parent; - if (parent && (ts.isClassLike(parent) || parent.kind === 217)) { + if (parent && (ts.isClassLike(parent) || parent.kind === 218)) { if (!(container.flags & 64) && - (container.kind !== 144 || ts.isNodeDescendentOf(node, container.body))) { + (container.kind !== 145 || ts.isNodeDescendentOf(node, container.body))) { return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent)).thisType; } } @@ -15434,34 +15685,34 @@ var ts; return esSymbolType; case 103: return voidType; - case 161: - return getTypeFromThisTypeNode(node); case 162: + return getTypeFromThisTypeNode(node); + case 163: return getTypeFromStringLiteralTypeNode(node); - case 151: - return getTypeFromTypeReference(node); - case 150: - return getTypeFromPredicateTypeNode(node); - case 190: - return getTypeFromTypeReference(node); - case 154: - return getTypeFromTypeQueryNode(node); - case 156: - return getTypeFromArrayTypeNode(node); - case 157: - return getTypeFromTupleTypeNode(node); - case 158: - return getTypeFromUnionTypeNode(node); - case 159: - return getTypeFromIntersectionTypeNode(node); - case 160: - return getTypeFromTypeNode(node.type); case 152: - case 153: + return getTypeFromTypeReference(node); + case 151: + return getTypeFromPredicateTypeNode(node); + case 191: + return getTypeFromTypeReference(node); case 155: + return getTypeFromTypeQueryNode(node); + case 157: + return getTypeFromArrayTypeNode(node); + case 158: + return getTypeFromTupleTypeNode(node); + case 159: + return getTypeFromUnionTypeNode(node); + case 160: + return getTypeFromIntersectionTypeNode(node); + case 161: + return getTypeFromTypeNode(node.type); + case 153: + case 154: + case 156: return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); case 69: - case 135: + case 136: var symbol = getSymbolAtLocation(node); return symbol && getDeclaredTypeOfSymbol(symbol); default: @@ -15641,27 +15892,27 @@ var ts; return type; } function isContextSensitive(node) { - ts.Debug.assert(node.kind !== 143 || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 144 || ts.isObjectLiteralMethod(node)); switch (node.kind) { - case 175: case 176: + case 177: return isContextSensitiveFunctionLikeDeclaration(node); - case 167: + case 168: return ts.forEach(node.properties, isContextSensitive); - case 166: + case 167: return ts.forEach(node.elements, isContextSensitive); - case 184: + case 185: return isContextSensitive(node.whenTrue) || isContextSensitive(node.whenFalse); - case 183: + case 184: return node.operatorToken.kind === 52 && (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 247: + case 248: return isContextSensitive(node.initializer); + case 144: case 143: - case 142: return isContextSensitiveFunctionLikeDeclaration(node); - case 174: + case 175: return isContextSensitive(node.expression); } return false; @@ -15689,6 +15940,9 @@ var ts; function compareTypesIdentical(source, target) { return checkTypeRelatedTo(source, target, identityRelation, undefined) ? -1 : 0; } + function compareTypesAssignable(source, target) { + return checkTypeRelatedTo(source, target, assignableRelation, undefined) ? -1 : 0; + } function isTypeSubtypeOf(source, target) { return checkTypeSubtypeOf(source, target, undefined); } @@ -15702,39 +15956,52 @@ var ts; return checkTypeRelatedTo(source, target, assignableRelation, errorNode, headMessage, containingMessageChain); } function isSignatureAssignableTo(source, target, ignoreReturnTypes) { + return compareSignaturesRelated(source, target, ignoreReturnTypes, false, undefined, compareTypesAssignable) !== 0; + } + function compareSignaturesRelated(source, target, ignoreReturnTypes, reportErrors, errorReporter, compareTypes) { if (source === target) { - return true; + return -1; } if (!target.hasRestParameter && source.minArgumentCount > target.parameters.length) { - return false; + return 0; } source = getErasedSignature(source); target = getErasedSignature(target); + var result = -1; var sourceMax = getNumNonRestParameters(source); var targetMax = getNumNonRestParameters(target); var checkCount = getNumParametersToCheckForSignatureRelatability(source, sourceMax, target, targetMax); + var sourceParams = source.parameters; + var targetParams = target.parameters; for (var i = 0; i < checkCount; i++) { - var s = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source); - var t = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target); - var related = isTypeAssignableTo(t, s) || isTypeAssignableTo(s, t); + var s = i < sourceMax ? getTypeOfSymbol(sourceParams[i]) : getRestTypeOfSignature(source); + var t = i < targetMax ? getTypeOfSymbol(targetParams[i]) : getRestTypeOfSignature(target); + var related = compareTypes(t, s, false) || compareTypes(s, t, reportErrors); if (!related) { - return false; + if (reportErrors) { + errorReporter(ts.Diagnostics.Types_of_parameters_0_and_1_are_incompatible, sourceParams[i < sourceMax ? i : sourceMax].name, targetParams[i < targetMax ? i : targetMax].name); + } + return 0; } + result &= related; } if (!ignoreReturnTypes) { var targetReturnType = getReturnTypeOfSignature(target); if (targetReturnType === voidType) { - return true; + return result; } var sourceReturnType = getReturnTypeOfSignature(source); if (targetReturnType.flags & 134217728 && targetReturnType.predicate.kind === 1) { if (!(sourceReturnType.flags & 134217728)) { - return false; + if (reportErrors) { + errorReporter(ts.Diagnostics.Signature_0_must_have_a_type_predicate, signatureToString(source)); + } + return 0; } } - return isTypeAssignableTo(sourceReturnType, targetReturnType); + result &= compareTypes(sourceReturnType, targetReturnType, reportErrors); } - return true; + return result; } function isImplementationCompatibleWithOverload(implementation, overload) { var erasedSource = getErasedSignature(implementation); @@ -15777,18 +16044,12 @@ var ts; var expandingFlags; var depth = 0; var overflow = false; - var elaborateErrors = false; ts.Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking"); - var result = isRelatedTo(source, target, errorNode !== undefined, headMessage); + var result = isRelatedTo(source, target, !!errorNode, headMessage); if (overflow) { error(errorNode, ts.Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target)); } else if (errorInfo) { - if (errorInfo.next === undefined) { - errorInfo = undefined; - elaborateErrors = true; - isRelatedTo(source, target, errorNode !== undefined, headMessage); - } if (containingMessageChain) { errorInfo = ts.concatenateDiagnosticMessageChains(containingMessageChain, errorInfo); } @@ -15796,6 +16057,7 @@ var ts; } return result !== 0; function reportError(message, arg0, arg1, arg2) { + ts.Debug.assert(!!errorNode); errorInfo = ts.chainDiagnosticMessages(errorInfo, message, arg0, arg1, arg2); } function reportRelationError(message, source, target) { @@ -15916,10 +16178,10 @@ var ts; return result; } } - var apparentType = getApparentType(source); - if (apparentType.flags & (80896 | 32768) && target.flags & 80896) { - var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo; - if (result = objectTypeRelatedTo(apparentType, source, target, reportStructuralErrors)) { + var apparentSource = getApparentType(source); + if (apparentSource.flags & (80896 | 32768) && target.flags & 80896) { + var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo && !(source.flags & 16777726); + if (result = objectTypeRelatedTo(apparentSource, source, target, reportStructuralErrors)) { errorInfo = saveErrorInfo; return result; } @@ -15974,6 +16236,7 @@ var ts; var prop = _a[_i]; if (!isKnownProperty(target, prop.name)) { if (reportErrors) { + ts.Debug.assert(!!errorNode); errorNode = prop.valueDeclaration; reportError(ts.Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(prop), typeToString(target)); } @@ -16066,7 +16329,7 @@ var ts; var id = relation !== identityRelation || source.id < target.id ? source.id + "," + target.id : target.id + "," + source.id; var related = relation[id]; if (related !== undefined) { - if (elaborateErrors && related === 2) { + if (reportErrors && related === 2) { relation[id] = 3; } else { @@ -16260,7 +16523,7 @@ var ts; shouldElaborateErrors = false; } } - if (shouldElaborateErrors && !isPrimitiveApparentType(source)) { + if (shouldElaborateErrors) { reportError(ts.Diagnostics.Type_0_provides_no_match_for_the_signature_1, typeToString(source), signatureToString(t, undefined, undefined, kind)); } return 0; @@ -16269,65 +16532,7 @@ var ts; return result; } function signatureRelatedTo(source, target, reportErrors) { - if (source === target) { - return -1; - } - if (!target.hasRestParameter && source.minArgumentCount > target.parameters.length) { - return 0; - } - var sourceMax = source.parameters.length; - var targetMax = target.parameters.length; - var checkCount; - if (source.hasRestParameter && target.hasRestParameter) { - checkCount = sourceMax > targetMax ? sourceMax : targetMax; - sourceMax--; - targetMax--; - } - else if (source.hasRestParameter) { - sourceMax--; - checkCount = targetMax; - } - else if (target.hasRestParameter) { - targetMax--; - checkCount = sourceMax; - } - else { - checkCount = sourceMax < targetMax ? sourceMax : targetMax; - } - source = getErasedSignature(source); - target = getErasedSignature(target); - var result = -1; - for (var i = 0; i < checkCount; i++) { - var s = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source); - var t = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target); - var saveErrorInfo = errorInfo; - var related = isRelatedTo(s, t, reportErrors); - if (!related) { - related = isRelatedTo(t, s, false); - if (!related) { - if (reportErrors) { - reportError(ts.Diagnostics.Types_of_parameters_0_and_1_are_incompatible, source.parameters[i < sourceMax ? i : sourceMax].name, target.parameters[i < targetMax ? i : targetMax].name); - } - return 0; - } - errorInfo = saveErrorInfo; - } - result &= related; - } - var targetReturnType = getReturnTypeOfSignature(target); - if (targetReturnType === voidType) { - return result; - } - var sourceReturnType = getReturnTypeOfSignature(source); - if (targetReturnType.flags & 134217728 && targetReturnType.predicate.kind === 1) { - if (!(sourceReturnType.flags & 134217728)) { - if (reportErrors) { - reportError(ts.Diagnostics.Signature_0_must_have_a_type_predicate, signatureToString(source)); - } - return 0; - } - } - return result & isRelatedTo(sourceReturnType, targetReturnType, reportErrors); + return compareSignaturesRelated(source, target, false, reportErrors, reportError, isRelatedTo); } function signaturesIdenticalTo(source, target, kind) { var sourceSignatures = getSignaturesOfType(source, kind); @@ -16690,22 +16895,22 @@ var ts; var typeAsString = typeToString(getWidenedType(type)); var diagnostic; switch (declaration.kind) { + case 142: case 141: - case 140: diagnostic = ts.Diagnostics.Member_0_implicitly_has_an_1_type; break; - case 138: + case 139: diagnostic = declaration.dotDotDotToken ? ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : ts.Diagnostics.Parameter_0_implicitly_has_an_1_type; break; - case 215: + case 216: + case 144: case 143: - case 142: - case 145: case 146: - case 175: + case 147: case 176: + case 177: if (!declaration.name) { error(declaration, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; @@ -16994,10 +17199,10 @@ var ts; function isInTypeQuery(node) { while (node) { switch (node.kind) { - case 154: + case 155: return true; case 69: - case 135: + case 136: node = node.parent; continue; default: @@ -17038,55 +17243,55 @@ var ts; } function isAssignedIn(node) { switch (node.kind) { - case 183: + case 184: return isAssignedInBinaryExpression(node); - case 213: - case 165: - return isAssignedInVariableDeclaration(node); - case 163: - case 164: + case 214: case 166: + return isAssignedInVariableDeclaration(node); + case 164: + case 165: case 167: case 168: case 169: case 170: case 171: - case 173: - case 191: + case 172: case 174: - case 181: - case 177: - case 180: - case 178: - case 179: + case 192: + case 175: case 182: - case 186: - case 184: + case 178: + case 181: + case 179: + case 180: + case 183: case 187: - case 194: + case 185: + case 188: case 195: - case 197: + case 196: case 198: case 199: case 200: case 201: case 202: case 203: - case 206: + case 204: case 207: case 208: - case 243: - case 244: case 209: + case 244: + case 245: case 210: case 211: - case 246: - case 235: + case 212: + case 247: case 236: - case 240: - case 241: case 237: + case 241: case 242: + case 238: + case 243: return ts.forEachChild(node, isAssignedIn); } return false; @@ -17096,7 +17301,7 @@ var ts; var type = getTypeOfSymbol(symbol); if (node && symbol.flags & 3) { if (isTypeAny(type) || type.flags & (80896 | 16384 | 512)) { - var declaration = ts.getDeclarationOfKind(symbol, 213); + var declaration = ts.getDeclarationOfKind(symbol, 214); var top_1 = declaration && getDeclarationContainer(declaration); var originalType = type; var nodeStack = []; @@ -17104,13 +17309,13 @@ var ts; var child = node; node = node.parent; switch (node.kind) { - case 198: + case 199: + case 185: case 184: - case 183: nodeStack.push({ node: node, child: child }); break; - case 250: - case 220: + case 251: + case 221: break loop; } if (node === top_1) { @@ -17121,17 +17326,17 @@ var ts; while (nodes = nodeStack.pop()) { var node_1 = nodes.node, child = nodes.child; switch (node_1.kind) { - case 198: + case 199: if (child !== node_1.expression) { type = narrowType(type, node_1.expression, child === node_1.thenStatement); } break; - case 184: + case 185: if (child !== node_1.condition) { type = narrowType(type, node_1.condition, child === node_1.whenTrue); } break; - case 183: + case 184: if (child === node_1.right) { if (node_1.operatorToken.kind === 51) { type = narrowType(type, node_1.left, true); @@ -17155,7 +17360,7 @@ var ts; } return type; function narrowTypeByEquality(type, expr, assumeTrue) { - if (expr.left.kind !== 178 || expr.right.kind !== 9) { + if (expr.left.kind !== 179 || expr.right.kind !== 9) { return type; } var left = expr.left; @@ -17170,9 +17375,6 @@ var ts; if (typeInfo && typeInfo.type === undefinedType) { return type; } - if (!!(type.flags & 1) && typeInfo && assumeTrue) { - return typeInfo.type; - } var flags; if (typeInfo) { flags = typeInfo.flags; @@ -17182,6 +17384,9 @@ var ts; flags = 132 | 258 | 16777216 | 8; } if (!(type.flags & 16384)) { + if (assumeTrue && typeInfo && isTypeSubtypeOf(typeInfo.type, type)) { + return typeInfo.type; + } return filterUnion(type) ? type : emptyUnionType; } return getUnionType(ts.filter(type.types, filterUnion), true); @@ -17296,7 +17501,7 @@ var ts; return narrowTypeByThisTypePredicate(type, memberType.predicate, expr, assumeTrue); } function narrowTypeByThisTypePredicate(type, predicate, expression, assumeTrue) { - if (expression.kind === 169 || expression.kind === 168) { + if (expression.kind === 170 || expression.kind === 169) { var accessExpression = expression; var possibleIdentifier = skipParenthesizedNodes(accessExpression.expression); if (possibleIdentifier.kind === 69 && getSymbolAtTypePredicatePosition(possibleIdentifier) === symbol) { @@ -17309,18 +17514,18 @@ var ts; expr = skipParenthesizedNodes(expr); switch (expr.kind) { case 69: - case 168: - case 135: + case 169: + case 136: return getSymbolOfEntityNameOrPropertyAccessExpression(expr); } } function narrowType(type, expr, assumeTrue) { switch (expr.kind) { - case 170: + case 171: return narrowTypeByTypePredicate(type, expr, assumeTrue); - case 174: + case 175: return narrowType(type, expr.expression, assumeTrue); - case 183: + case 184: var operator = expr.operatorToken.kind; if (operator === 32 || operator === 33) { return narrowTypeByEquality(type, expr, assumeTrue); @@ -17335,20 +17540,20 @@ var ts; return narrowTypeByInstanceof(type, expr, assumeTrue); } break; - case 181: + case 182: if (expr.operator === 49) { return narrowType(type, expr.operand, !assumeTrue); } break; + case 170: case 169: - case 168: return narrowTypeByTypePredicateMember(type, expr, assumeTrue); } return type; } } function skipParenthesizedNodes(expression) { - while (expression.kind === 174) { + while (expression.kind === 175) { expression = expression.expression; } return expression; @@ -17357,7 +17562,7 @@ var ts; var symbol = getResolvedSymbol(node); if (symbol === argumentsSymbol) { var container = ts.getContainingFunction(node); - if (container.kind === 176) { + if (container.kind === 177) { if (languageVersion < 2) { error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); } @@ -17388,7 +17593,7 @@ var ts; function checkBlockScopedBindingCapturedInLoop(node, symbol) { if (languageVersion >= 2 || (symbol.flags & (2 | 32)) === 0 || - symbol.valueDeclaration.parent.kind === 246) { + symbol.valueDeclaration.parent.kind === 247) { return; } var container; @@ -17397,11 +17602,11 @@ var ts; } else { container = symbol.valueDeclaration; - while (container.kind !== 214) { + while (container.kind !== 215) { container = container.parent; } container = container.parent; - if (container.kind === 195) { + if (container.kind === 196) { container = container.parent; } } @@ -17420,7 +17625,7 @@ var ts; } function captureLexicalThis(node, container) { getNodeLinks(node).flags |= 2; - if (container.kind === 141 || container.kind === 144) { + if (container.kind === 142 || container.kind === 145) { var classNode = container.parent; getNodeLinks(classNode).flags |= 4; } @@ -17431,29 +17636,29 @@ var ts; function checkThisExpression(node) { var container = ts.getThisContainer(node, true); var needToCaptureLexicalThis = false; - if (container.kind === 176) { + if (container.kind === 177) { container = ts.getThisContainer(container, false); needToCaptureLexicalThis = (languageVersion < 2); } switch (container.kind) { - case 220: + case 221: error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); break; - case 219: + case 220: error(node, ts.Diagnostics.this_cannot_be_referenced_in_current_location); break; - case 144: + case 145: if (isInConstructorArgumentInitializer(node, container)) { error(node, ts.Diagnostics.this_cannot_be_referenced_in_constructor_arguments); } break; + case 142: case 141: - case 140: if (container.flags & 64) { error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer); } break; - case 136: + case 137: error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); break; } @@ -17464,7 +17669,7 @@ var ts; var symbol = getSymbolOfNode(container.parent); return container.flags & 64 ? getTypeOfSymbol(symbol) : getDeclaredTypeOfSymbol(symbol).thisType; } - if (ts.isInJavaScriptFile(node) && container.kind === 175) { + if (ts.isInJavaScriptFile(node) && container.kind === 176) { if (ts.getSpecialPropertyAssignmentKind(container.parent) === 3) { var className = container.parent .left @@ -17480,18 +17685,18 @@ var ts; } function isInConstructorArgumentInitializer(node, constructorDecl) { for (var n = node; n && n !== constructorDecl; n = n.parent) { - if (n.kind === 138) { + if (n.kind === 139) { return true; } } return false; } function checkSuperExpression(node) { - var isCallExpression = node.parent.kind === 170 && node.parent.expression === node; + var isCallExpression = node.parent.kind === 171 && node.parent.expression === node; var container = ts.getSuperContainer(node, true); var needToCaptureLexicalThis = false; if (!isCallExpression) { - while (container && container.kind === 176) { + while (container && container.kind === 177) { container = ts.getSuperContainer(container, true); needToCaptureLexicalThis = languageVersion < 2; } @@ -17500,16 +17705,16 @@ var ts; var nodeCheckFlag = 0; if (!canUseSuperExpression) { var current = node; - while (current && current !== container && current.kind !== 136) { + while (current && current !== container && current.kind !== 137) { current = current.parent; } - if (current && current.kind === 136) { + if (current && current.kind === 137) { error(node, ts.Diagnostics.super_cannot_be_referenced_in_a_computed_property_name); } else if (isCallExpression) { error(node, ts.Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors); } - else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 167)) { + else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 168)) { error(node, ts.Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions); } else { @@ -17527,7 +17732,7 @@ var ts; if (needToCaptureLexicalThis) { captureLexicalThis(node.parent, container); } - if (container.parent.kind === 167) { + if (container.parent.kind === 168) { if (languageVersion < 2) { error(node, ts.Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher); return unknownType; @@ -17545,7 +17750,7 @@ var ts; } return unknownType; } - if (container.kind === 144 && isInConstructorArgumentInitializer(node, container)) { + if (container.kind === 145 && isInConstructorArgumentInitializer(node, container)) { error(node, ts.Diagnostics.super_cannot_be_referenced_in_constructor_arguments); return unknownType; } @@ -17557,24 +17762,24 @@ var ts; return false; } if (isCallExpression) { - return container.kind === 144; + return container.kind === 145; } else { - if (ts.isClassLike(container.parent) || container.parent.kind === 167) { + if (ts.isClassLike(container.parent) || container.parent.kind === 168) { if (container.flags & 64) { - return container.kind === 143 || - container.kind === 142 || - container.kind === 145 || - container.kind === 146; + return container.kind === 144 || + container.kind === 143 || + container.kind === 146 || + container.kind === 147; } else { - return container.kind === 143 || - container.kind === 142 || - container.kind === 145 || + return container.kind === 144 || + container.kind === 143 || container.kind === 146 || + container.kind === 147 || + container.kind === 142 || container.kind === 141 || - container.kind === 140 || - container.kind === 144; + container.kind === 145; } } } @@ -17609,7 +17814,7 @@ var ts; if (declaration.type) { return getTypeFromTypeNode(declaration.type); } - if (declaration.kind === 138) { + if (declaration.kind === 139) { var type = getContextuallyTypedParameterType(declaration); if (type) { return type; @@ -17642,7 +17847,7 @@ var ts; } function isInParameterInitializerBeforeContainingFunction(node) { while (node.parent && !ts.isFunctionLike(node.parent)) { - if (node.parent.kind === 138 && node.parent.initializer === node) { + if (node.parent.kind === 139 && node.parent.initializer === node) { return true; } node = node.parent; @@ -17651,8 +17856,8 @@ var ts; } function getContextualReturnType(functionDecl) { if (functionDecl.type || - functionDecl.kind === 144 || - functionDecl.kind === 145 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 146))) { + functionDecl.kind === 145 || + functionDecl.kind === 146 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 147))) { return getReturnTypeOfSignature(getSignatureFromDeclaration(functionDecl)); } var signature = getContextualSignatureForFunctionLikeDeclaration(functionDecl); @@ -17671,7 +17876,7 @@ var ts; return undefined; } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { - if (template.parent.kind === 172) { + if (template.parent.kind === 173) { return getContextualTypeForArgument(template.parent, substitutionExpression); } return undefined; @@ -17782,13 +17987,13 @@ var ts; var kind = attribute.kind; var jsxElement = attribute.parent; var attrsType = getJsxElementAttributesType(jsxElement); - if (attribute.kind === 240) { + if (attribute.kind === 241) { if (!attrsType || isTypeAny(attrsType)) { return undefined; } return getTypeOfPropertyOfType(attrsType, attribute.name.text); } - else if (attribute.kind === 241) { + else if (attribute.kind === 242) { return attrsType; } ts.Debug.fail("Expected JsxAttribute or JsxSpreadAttribute, got ts.SyntaxKind[" + kind + "]"); @@ -17806,40 +18011,40 @@ var ts; } var parent = node.parent; switch (parent.kind) { - case 213: - case 138: + case 214: + case 139: + case 142: case 141: - case 140: - case 165: - return getContextualTypeForInitializerExpression(node); - case 176: - case 206: - return getContextualTypeForReturnExpression(node); - case 186: - return getContextualTypeForYieldOperand(parent); - case 170: - case 171: - return getContextualTypeForArgument(parent, node); - case 173: - case 191: - return getTypeFromTypeNode(parent.type); - case 183: - return getContextualTypeForBinaryOperand(node); - case 247: - return getContextualTypeForObjectLiteralElement(parent); case 166: - return getContextualTypeForElementExpression(node); - case 184: - return getContextualTypeForConditionalOperand(node); - case 192: - ts.Debug.assert(parent.parent.kind === 185); - return getContextualTypeForSubstitutionExpression(parent.parent, node); + return getContextualTypeForInitializerExpression(node); + case 177: + case 207: + return getContextualTypeForReturnExpression(node); + case 187: + return getContextualTypeForYieldOperand(parent); + case 171: + case 172: + return getContextualTypeForArgument(parent, node); case 174: + case 192: + return getTypeFromTypeNode(parent.type); + case 184: + return getContextualTypeForBinaryOperand(node); + case 248: + return getContextualTypeForObjectLiteralElement(parent); + case 167: + return getContextualTypeForElementExpression(node); + case 185: + return getContextualTypeForConditionalOperand(node); + case 193: + ts.Debug.assert(parent.parent.kind === 186); + return getContextualTypeForSubstitutionExpression(parent.parent, node); + case 175: return getContextualType(parent); - case 242: + case 243: return getContextualType(parent); - case 240: case 241: + case 242: return getContextualTypeForJsxAttribute(parent); } return undefined; @@ -17854,7 +18059,7 @@ var ts; } } function isFunctionExpressionOrArrowFunction(node) { - return node.kind === 175 || node.kind === 176; + return node.kind === 176 || node.kind === 177; } function getContextualSignatureForFunctionLikeDeclaration(node) { return isFunctionExpressionOrArrowFunction(node) || ts.isObjectLiteralMethod(node) @@ -17862,7 +18067,7 @@ var ts; : undefined; } function getContextualSignature(node) { - ts.Debug.assert(node.kind !== 143 || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 144 || ts.isObjectLiteralMethod(node)); var type = ts.isObjectLiteralMethod(node) ? getContextualTypeForObjectLiteralMethod(node) : getApparentTypeOfContextualType(node); @@ -17902,13 +18107,13 @@ var ts; } function isAssignmentTarget(node) { var parent = node.parent; - if (parent.kind === 183 && parent.operatorToken.kind === 56 && parent.left === node) { + if (parent.kind === 184 && parent.operatorToken.kind === 56 && parent.left === node) { return true; } - if (parent.kind === 247) { + if (parent.kind === 248) { return isAssignmentTarget(parent.parent); } - if (parent.kind === 166) { + if (parent.kind === 167) { return isAssignmentTarget(parent); } return false; @@ -17918,8 +18123,8 @@ var ts; return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, false); } function hasDefaultValue(node) { - return (node.kind === 165 && !!node.initializer) || - (node.kind === 183 && node.operatorToken.kind === 56); + return (node.kind === 166 && !!node.initializer) || + (node.kind === 184 && node.operatorToken.kind === 56); } function checkArrayLiteral(node, contextualMapper) { var elements = node.elements; @@ -17928,7 +18133,7 @@ var ts; var inDestructuringPattern = isAssignmentTarget(node); for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) { var e = elements_1[_i]; - if (inDestructuringPattern && e.kind === 187) { + if (inDestructuringPattern && e.kind === 188) { var restArrayType = checkExpression(e.expression, contextualMapper); var restElementType = getIndexTypeOfType(restArrayType, 1) || (languageVersion >= 2 ? getElementTypeOfIterable(restArrayType, undefined) : undefined); @@ -17940,7 +18145,7 @@ var ts; var type = checkExpression(e, contextualMapper); elementTypes.push(type); } - hasSpreadElement = hasSpreadElement || e.kind === 187; + hasSpreadElement = hasSpreadElement || e.kind === 188; } if (!hasSpreadElement) { if (inDestructuringPattern && elementTypes.length) { @@ -17951,7 +18156,7 @@ var ts; var contextualType = getApparentTypeOfContextualType(node); if (contextualType && contextualTypeIsTupleLikeType(contextualType)) { var pattern = contextualType.pattern; - if (pattern && (pattern.kind === 164 || pattern.kind === 166)) { + if (pattern && (pattern.kind === 165 || pattern.kind === 167)) { var patternElements = pattern.elements; for (var i = elementTypes.length; i < patternElements.length; i++) { var patternElement = patternElements[i]; @@ -17959,7 +18164,7 @@ var ts; elementTypes.push(contextualType.elementTypes[i]); } else { - if (patternElement.kind !== 189) { + if (patternElement.kind !== 190) { error(patternElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value); } elementTypes.push(unknownType); @@ -17974,7 +18179,7 @@ var ts; return createArrayType(elementTypes.length ? getUnionType(elementTypes) : undefinedType); } function isNumericName(name) { - return name.kind === 136 ? isNumericComputedName(name) : isNumericLiteralName(name.text); + return name.kind === 137 ? isNumericComputedName(name) : isNumericLiteralName(name.text); } function isNumericComputedName(name) { return isTypeAnyOrAllConstituentTypesHaveKind(checkComputedPropertyName(name), 132); @@ -18005,31 +18210,31 @@ var ts; var propertiesArray = []; var contextualType = getApparentTypeOfContextualType(node); var contextualTypeHasPattern = contextualType && contextualType.pattern && - (contextualType.pattern.kind === 163 || contextualType.pattern.kind === 167); + (contextualType.pattern.kind === 164 || contextualType.pattern.kind === 168); var typeFlags = 0; var patternWithComputedProperties = false; for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var memberDecl = _a[_i]; var member = memberDecl.symbol; - if (memberDecl.kind === 247 || - memberDecl.kind === 248 || + if (memberDecl.kind === 248 || + memberDecl.kind === 249 || ts.isObjectLiteralMethod(memberDecl)) { var type = void 0; - if (memberDecl.kind === 247) { + if (memberDecl.kind === 248) { type = checkPropertyAssignment(memberDecl, contextualMapper); } - else if (memberDecl.kind === 143) { + else if (memberDecl.kind === 144) { type = checkObjectLiteralMethod(memberDecl, contextualMapper); } else { - ts.Debug.assert(memberDecl.kind === 248); + ts.Debug.assert(memberDecl.kind === 249); type = checkExpression(memberDecl.name, contextualMapper); } typeFlags |= type.flags; var prop = createSymbol(4 | 67108864 | member.flags, member.name); if (inDestructuringPattern) { - var isOptional = (memberDecl.kind === 247 && hasDefaultValue(memberDecl.initializer)) || - (memberDecl.kind === 248 && memberDecl.objectAssignmentInitializer); + var isOptional = (memberDecl.kind === 248 && hasDefaultValue(memberDecl.initializer)) || + (memberDecl.kind === 249 && memberDecl.objectAssignmentInitializer); if (isOptional) { prop.flags |= 536870912; } @@ -18056,7 +18261,7 @@ var ts; member = prop; } else { - ts.Debug.assert(memberDecl.kind === 145 || memberDecl.kind === 146); + ts.Debug.assert(memberDecl.kind === 146 || memberDecl.kind === 147); checkAccessorDeclaration(memberDecl); } if (!ts.hasDynamicName(memberDecl)) { @@ -18114,13 +18319,13 @@ var ts; for (var _i = 0, _a = node.children; _i < _a.length; _i++) { var child = _a[_i]; switch (child.kind) { - case 242: + case 243: checkJsxExpression(child); break; - case 235: + case 236: checkJsxElement(child); break; - case 236: + case 237: checkJsxSelfClosingElement(child); break; } @@ -18131,7 +18336,7 @@ var ts; return name.indexOf("-") < 0; } function isJsxIntrinsicIdentifier(tagName) { - if (tagName.kind === 135) { + if (tagName.kind === 136) { return false; } else { @@ -18225,6 +18430,7 @@ var ts; if (compilerOptions.noImplicitAny) { error(node, ts.Diagnostics.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists, JsxNames.IntrinsicElements); } + return unknownSymbol; } } function lookupClassTag(node) { @@ -18295,17 +18501,21 @@ var ts; var sym = getJsxElementTagSymbol(node); if (links.jsxFlags & 4) { var elemInstanceType = getJsxElementInstanceType(node); - var callSignature = getSingleCallSignature(getTypeOfSymbol(sym)); - var callReturnType = callSignature && getReturnTypeOfSignature(callSignature); - var paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0])); - if (callReturnType && isTypeAssignableTo(callReturnType, jsxElementType) && (paramType.flags & 80896)) { - var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes); - if (intrinsicAttributes !== unknownType) { - paramType = intersectTypes(intrinsicAttributes, paramType); - } - return paramType; - } var elemClassType = getJsxGlobalElementClassType(); + if (!elemClassType || !isTypeAssignableTo(elemInstanceType, elemClassType)) { + var elemType = getTypeOfSymbol(sym); + var callSignatures = elemType && getSignaturesOfType(elemType, 0); + var callSignature = callSignatures && callSignatures.length > 0 && callSignatures[0]; + var callReturnType = callSignature && getReturnTypeOfSignature(callSignature); + var paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0])); + if (callReturnType && isTypeAssignableTo(callReturnType, jsxElementType)) { + var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes); + if (intrinsicAttributes !== unknownType) { + paramType = intersectTypes(intrinsicAttributes, paramType); + } + return links.resolvedJsxType = paramType; + } + } if (elemClassType) { checkTypeRelatedTo(elemInstanceType, elemClassType, assignableRelation, node, ts.Diagnostics.JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements); } @@ -18403,11 +18613,11 @@ var ts; var nameTable = {}; var sawSpreadedAny = false; for (var i = node.attributes.length - 1; i >= 0; i--) { - if (node.attributes[i].kind === 240) { + if (node.attributes[i].kind === 241) { checkJsxAttribute((node.attributes[i]), targetAttributesType, nameTable); } else { - ts.Debug.assert(node.attributes[i].kind === 241); + ts.Debug.assert(node.attributes[i].kind === 242); var spreadType = checkJsxSpreadAttribute((node.attributes[i]), targetAttributesType, nameTable); if (isTypeAny(spreadType)) { sawSpreadedAny = true; @@ -18433,7 +18643,7 @@ var ts; } } function getDeclarationKindFromSymbol(s) { - return s.valueDeclaration ? s.valueDeclaration.kind : 141; + return s.valueDeclaration ? s.valueDeclaration.kind : 142; } function getDeclarationFlagsFromSymbol(s) { return s.valueDeclaration ? ts.getCombinedNodeFlags(s.valueDeclaration) : s.flags & 134217728 ? 8 | 64 : 0; @@ -18442,10 +18652,10 @@ var ts; var flags = getDeclarationFlagsFromSymbol(prop); var declaringClass = getDeclaredTypeOfSymbol(prop.parent); if (left.kind === 95) { - var errorNode = node.kind === 168 ? + var errorNode = node.kind === 169 ? node.name : node.right; - if (languageVersion < 2 && getDeclarationKindFromSymbol(prop) !== 143) { + if (languageVersion < 2 && getDeclarationKindFromSymbol(prop) !== 144) { error(errorNode, ts.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword); return false; } @@ -18514,7 +18724,7 @@ var ts; return getTypeOfSymbol(prop); } function isValidPropertyAccess(node, propertyName) { - var left = node.kind === 168 + var left = node.kind === 169 ? node.expression : node.left; var type = checkExpression(left); @@ -18526,10 +18736,47 @@ var ts; } return true; } + function getForInVariableSymbol(node) { + var initializer = node.initializer; + if (initializer.kind === 215) { + var variable = initializer.declarations[0]; + if (variable && !ts.isBindingPattern(variable.name)) { + return getSymbolOfNode(variable); + } + } + else if (initializer.kind === 69) { + return getResolvedSymbol(initializer); + } + return undefined; + } + function hasNumericPropertyNames(type) { + return getIndexTypeOfType(type, 1) && !getIndexTypeOfType(type, 0); + } + function isForInVariableForNumericPropertyNames(expr) { + var e = skipParenthesizedNodes(expr); + if (e.kind === 69) { + var symbol = getResolvedSymbol(e); + if (symbol.flags & 3) { + var child = expr; + var node = expr.parent; + while (node) { + if (node.kind === 203 && + child === node.statement && + getForInVariableSymbol(node) === symbol && + hasNumericPropertyNames(checkExpression(node.expression))) { + return true; + } + child = node; + node = node.parent; + } + } + } + return false; + } function checkIndexedAccess(node) { if (!node.argumentExpression) { - var sourceFile = getSourceFile(node); - if (node.parent.kind === 171 && node.parent.expression === node) { + var sourceFile = ts.getSourceFileOfNode(node); + if (node.parent.kind === 172 && node.parent.expression === node) { var start = ts.skipTrivia(sourceFile.text, node.expression.end); var end = node.end; grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead); @@ -18566,7 +18813,7 @@ var ts; } } if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 258 | 132 | 16777216)) { - if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 132)) { + if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 132) || isForInVariableForNumericPropertyNames(node.argumentExpression)) { var numberIndexType = getIndexTypeOfType(objectType, 1); if (numberIndexType) { return numberIndexType; @@ -18577,7 +18824,9 @@ var ts; return stringIndexType; } if (compilerOptions.noImplicitAny && !compilerOptions.suppressImplicitAnyIndexErrors && !isTypeAny(objectType)) { - error(node, ts.Diagnostics.Index_signature_of_object_type_implicitly_has_an_any_type); + error(node, getIndexTypeOfType(objectType, 1) ? + ts.Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number : + ts.Diagnostics.Index_signature_of_object_type_implicitly_has_an_any_type); } return anyType; } @@ -18588,7 +18837,7 @@ var ts; if (indexArgumentExpression.kind === 9 || indexArgumentExpression.kind === 8) { return indexArgumentExpression.text; } - if (indexArgumentExpression.kind === 169 || indexArgumentExpression.kind === 168) { + if (indexArgumentExpression.kind === 170 || indexArgumentExpression.kind === 169) { var value = getConstantValue(indexArgumentExpression); if (value !== undefined) { return value.toString(); @@ -18631,10 +18880,10 @@ var ts; return true; } function resolveUntypedCall(node) { - if (node.kind === 172) { + if (node.kind === 173) { checkExpression(node.template); } - else if (node.kind !== 139) { + else if (node.kind !== 140) { ts.forEach(node.arguments, function (argument) { checkExpression(argument); }); @@ -18685,7 +18934,7 @@ var ts; function getSpreadArgumentIndex(args) { for (var i = 0; i < args.length; i++) { var arg = args[i]; - if (arg && arg.kind === 187) { + if (arg && arg.kind === 188) { return i; } } @@ -18697,11 +18946,11 @@ var ts; var callIsIncomplete; var isDecorator; var spreadArgIndex = -1; - if (node.kind === 172) { + if (node.kind === 173) { var tagExpression = node; adjustedArgCount = args.length; typeArguments = undefined; - if (tagExpression.template.kind === 185) { + if (tagExpression.template.kind === 186) { var templateExpression = tagExpression.template; var lastSpan = ts.lastOrUndefined(templateExpression.templateSpans); ts.Debug.assert(lastSpan !== undefined); @@ -18713,7 +18962,7 @@ var ts; callIsIncomplete = !!templateLiteral.isUnterminated; } } - else if (node.kind === 139) { + else if (node.kind === 140) { isDecorator = true; typeArguments = undefined; adjustedArgCount = getEffectiveArgumentCount(node, undefined, signature); @@ -18721,7 +18970,7 @@ var ts; else { var callExpression = node; if (!callExpression.arguments) { - ts.Debug.assert(callExpression.kind === 171); + ts.Debug.assert(callExpression.kind === 172); return signature.minArgumentCount === 0; } adjustedArgCount = callExpression.arguments.hasTrailingComma ? args.length + 1 : args.length; @@ -18774,7 +19023,7 @@ var ts; var argCount = getEffectiveArgumentCount(node, args, signature); for (var i = 0; i < argCount; i++) { var arg = getEffectiveArgument(node, args, i); - if (arg === undefined || arg.kind !== 189) { + if (arg === undefined || arg.kind !== 190) { var paramType = getTypeAtPosition(signature, i); var argType = getEffectiveArgumentType(node, i, arg); if (argType === undefined) { @@ -18823,7 +19072,7 @@ var ts; var argCount = getEffectiveArgumentCount(node, args, signature); for (var i = 0; i < argCount; i++) { var arg = getEffectiveArgument(node, args, i); - if (arg === undefined || arg.kind !== 189) { + if (arg === undefined || arg.kind !== 190) { var paramType = getTypeAtPosition(signature, i); var argType = getEffectiveArgumentType(node, i, arg); if (argType === undefined) { @@ -18842,16 +19091,16 @@ var ts; } function getEffectiveCallArguments(node) { var args; - if (node.kind === 172) { + if (node.kind === 173) { var template = node.template; args = [undefined]; - if (template.kind === 185) { + if (template.kind === 186) { ts.forEach(template.templateSpans, function (span) { args.push(span.expression); }); } } - else if (node.kind === 139) { + else if (node.kind === 140) { return undefined; } else { @@ -18860,21 +19109,21 @@ var ts; return args; } function getEffectiveArgumentCount(node, args, signature) { - if (node.kind === 139) { + if (node.kind === 140) { switch (node.parent.kind) { - case 216: - case 188: + case 217: + case 189: return 1; - case 141: + case 142: return 2; - case 143: - case 145: + case 144: case 146: + case 147: if (languageVersion === 0) { return 2; } return signature.parameters.length >= 3 ? 3 : 2; - case 138: + case 139: return 3; } } @@ -18883,48 +19132,48 @@ var ts; } } function getEffectiveDecoratorFirstArgumentType(node) { - if (node.kind === 216) { + if (node.kind === 217) { var classSymbol = getSymbolOfNode(node); return getTypeOfSymbol(classSymbol); } - if (node.kind === 138) { + if (node.kind === 139) { node = node.parent; - if (node.kind === 144) { + if (node.kind === 145) { var classSymbol = getSymbolOfNode(node); return getTypeOfSymbol(classSymbol); } } - if (node.kind === 141 || - node.kind === 143 || - node.kind === 145 || - node.kind === 146) { + if (node.kind === 142 || + node.kind === 144 || + node.kind === 146 || + node.kind === 147) { return getParentTypeOfClassElement(node); } ts.Debug.fail("Unsupported decorator target."); return unknownType; } function getEffectiveDecoratorSecondArgumentType(node) { - if (node.kind === 216) { + if (node.kind === 217) { ts.Debug.fail("Class decorators should not have a second synthetic argument."); return unknownType; } - if (node.kind === 138) { + if (node.kind === 139) { node = node.parent; - if (node.kind === 144) { + if (node.kind === 145) { return anyType; } } - if (node.kind === 141 || - node.kind === 143 || - node.kind === 145 || - node.kind === 146) { + if (node.kind === 142 || + node.kind === 144 || + node.kind === 146 || + node.kind === 147) { var element = node; switch (element.name.kind) { case 69: case 8: case 9: return getStringLiteralTypeForText(element.name.text); - case 136: + case 137: var nameType = checkComputedPropertyName(element.name); if (allConstituentTypesHaveKind(nameType, 16777216)) { return nameType; @@ -18941,20 +19190,20 @@ var ts; return unknownType; } function getEffectiveDecoratorThirdArgumentType(node) { - if (node.kind === 216) { + if (node.kind === 217) { ts.Debug.fail("Class decorators should not have a third synthetic argument."); return unknownType; } - if (node.kind === 138) { + if (node.kind === 139) { return numberType; } - if (node.kind === 141) { + if (node.kind === 142) { ts.Debug.fail("Property decorators should not have a third synthetic argument."); return unknownType; } - if (node.kind === 143 || - node.kind === 145 || - node.kind === 146) { + if (node.kind === 144 || + node.kind === 146 || + node.kind === 147) { var propertyType = getTypeOfNode(node); return createTypedPropertyDescriptorType(propertyType); } @@ -18975,26 +19224,26 @@ var ts; return unknownType; } function getEffectiveArgumentType(node, argIndex, arg) { - if (node.kind === 139) { + if (node.kind === 140) { return getEffectiveDecoratorArgumentType(node, argIndex); } - else if (argIndex === 0 && node.kind === 172) { + else if (argIndex === 0 && node.kind === 173) { return globalTemplateStringsArrayType; } return undefined; } function getEffectiveArgument(node, args, argIndex) { - if (node.kind === 139 || - (argIndex === 0 && node.kind === 172)) { + if (node.kind === 140 || + (argIndex === 0 && node.kind === 173)) { return undefined; } return args[argIndex]; } function getEffectiveArgumentErrorNode(node, argIndex, arg) { - if (node.kind === 139) { + if (node.kind === 140) { return node.expression; } - else if (argIndex === 0 && node.kind === 172) { + else if (argIndex === 0 && node.kind === 173) { return node.template; } else { @@ -19002,8 +19251,8 @@ var ts; } } function resolveCall(node, signatures, candidatesOutArray, headMessage) { - var isTaggedTemplate = node.kind === 172; - var isDecorator = node.kind === 139; + var isTaggedTemplate = node.kind === 173; + var isDecorator = node.kind === 140; var typeArguments; if (!isTaggedTemplate && !isDecorator) { typeArguments = node.typeArguments; @@ -19235,16 +19484,16 @@ var ts; } function getDiagnosticHeadMessageForDecoratorResolution(node) { switch (node.parent.kind) { - case 216: - case 188: + case 217: + case 189: return ts.Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression; - case 138: + case 139: return ts.Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression; - case 141: + case 142: return ts.Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression; - case 143: - case 145: + case 144: case 146: + case 147: return ts.Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression; } } @@ -19272,16 +19521,16 @@ var ts; var links = getNodeLinks(node); if (!links.resolvedSignature || candidatesOutArray) { links.resolvedSignature = anySignature; - if (node.kind === 170) { + if (node.kind === 171) { links.resolvedSignature = resolveCallExpression(node, candidatesOutArray); } - else if (node.kind === 171) { + else if (node.kind === 172) { links.resolvedSignature = resolveNewExpression(node, candidatesOutArray); } - else if (node.kind === 172) { + else if (node.kind === 173) { links.resolvedSignature = resolveTaggedTemplateExpression(node, candidatesOutArray); } - else if (node.kind === 139) { + else if (node.kind === 140) { links.resolvedSignature = resolveDecorator(node, candidatesOutArray); } else { @@ -19303,12 +19552,12 @@ var ts; if (node.expression.kind === 95) { return voidType; } - if (node.kind === 171) { + if (node.kind === 172) { var declaration = signature.declaration; if (declaration && - declaration.kind !== 144 && - declaration.kind !== 148 && - declaration.kind !== 153) { + declaration.kind !== 145 && + declaration.kind !== 149 && + declaration.kind !== 154) { var funcSymbol = checkExpression(node.expression).symbol; if (funcSymbol && funcSymbol.members && (funcSymbol.flags & 16)) { return getInferredClassType(funcSymbol); @@ -19362,7 +19611,7 @@ var ts; if (ts.isBindingPattern(node.name)) { for (var _i = 0, _a = node.name.elements; _i < _a.length; _i++) { var element = _a[_i]; - if (element.kind !== 189) { + if (element.kind !== 190) { if (element.name.kind === 69) { getSymbolLinks(getSymbolOfNode(element)).type = getTypeForBindingElement(element); } @@ -19396,7 +19645,7 @@ var ts; } var isAsync = ts.isAsyncFunctionLike(func); var type; - if (func.body.kind !== 194) { + if (func.body.kind !== 195) { type = checkExpressionCached(func.body, contextualMapper); if (isAsync) { type = checkAwaitedType(type, func, ts.Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member); @@ -19501,7 +19750,7 @@ var ts; if (returnType === voidType || isTypeAny(returnType)) { return; } - if (ts.nodeIsMissing(func.body) || func.body.kind !== 194 || !(func.flags & 524288)) { + if (ts.nodeIsMissing(func.body) || func.body.kind !== 195 || !(func.flags & 524288)) { return; } var hasExplicitReturn = func.flags & 1048576; @@ -19521,18 +19770,14 @@ var ts; } } function checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper) { - ts.Debug.assert(node.kind !== 143 || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 144 || ts.isObjectLiteralMethod(node)); var hasGrammarError = checkGrammarFunctionLikeDeclaration(node); - if (!hasGrammarError && node.kind === 175) { + if (!hasGrammarError && node.kind === 176) { checkGrammarForGenerator(node); } if (contextualMapper === identityMapper && isContextSensitive(node)) { return anyFunctionType; } - var isAsync = ts.isAsyncFunctionLike(node); - if (isAsync) { - emitAwaiter = true; - } var links = getNodeLinks(node); var type = getTypeOfSymbol(node.symbol); var contextSensitive = isContextSensitive(node); @@ -19560,18 +19805,15 @@ var ts; } } } - if (produceDiagnostics && node.kind !== 143 && node.kind !== 142) { + if (produceDiagnostics && node.kind !== 144 && node.kind !== 143) { checkCollisionWithCapturedSuperVariable(node, node.name); checkCollisionWithCapturedThisVariable(node, node.name); } return type; } function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) { - ts.Debug.assert(node.kind !== 143 || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 144 || ts.isObjectLiteralMethod(node)); var isAsync = ts.isAsyncFunctionLike(node); - if (isAsync) { - emitAwaiter = true; - } var returnOrPromisedType = node.type && (isAsync ? checkAsyncFunctionReturnType(node) : getTypeFromTypeNode(node.type)); if (!node.asteriskToken) { checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnOrPromisedType); @@ -19580,7 +19822,7 @@ var ts; if (!node.type) { getReturnTypeOfSignature(getSignatureFromDeclaration(node)); } - if (node.body.kind === 194) { + if (node.body.kind === 195) { checkSourceElement(node.body); } else { @@ -19615,13 +19857,13 @@ var ts; var symbol = findSymbol(n); return !symbol || symbol === unknownSymbol || symbol === argumentsSymbol || (symbol.flags & 3) !== 0; } - case 168: { + case 169: { var symbol = findSymbol(n); return !symbol || symbol === unknownSymbol || (symbol.flags & ~8) !== 0; } - case 169: + case 170: return true; - case 174: + case 175: return isReferenceOrErrorExpression(n.expression); default: return false; @@ -19630,11 +19872,11 @@ var ts; function isConstVariableReference(n) { switch (n.kind) { case 69: - case 168: { + case 169: { var symbol = findSymbol(n); return symbol && (symbol.flags & 3) !== 0 && (getDeclarationFlagsFromSymbol(symbol) & 16384) !== 0; } - case 169: { + case 170: { var index = n.argumentExpression; var symbol = findSymbol(n.expression); if (symbol && index && index.kind === 9) { @@ -19644,7 +19886,7 @@ var ts; } return false; } - case 174: + case 175: return isConstVariableReference(n.expression); default: return false; @@ -19774,9 +20016,9 @@ var ts; var properties = node.properties; for (var _i = 0, properties_3 = properties; _i < properties_3.length; _i++) { var p = properties_3[_i]; - if (p.kind === 247 || p.kind === 248) { + if (p.kind === 248 || p.kind === 249) { var name_13 = p.name; - if (name_13.kind === 136) { + if (name_13.kind === 137) { checkComputedPropertyName(name_13); } if (isComputedNonLiteralName(name_13)) { @@ -19789,7 +20031,7 @@ var ts; isNumericLiteralName(text) && getIndexTypeOfType(sourceType, 1) || getIndexTypeOfType(sourceType, 0); if (type) { - if (p.kind === 248) { + if (p.kind === 249) { checkDestructuringAssignment(p, type); } else { @@ -19811,8 +20053,8 @@ var ts; var elements = node.elements; for (var i = 0; i < elements.length; i++) { var e = elements[i]; - if (e.kind !== 189) { - if (e.kind !== 187) { + if (e.kind !== 190) { + if (e.kind !== 188) { var propName = "" + i; var type = isTypeAny(sourceType) ? sourceType @@ -19837,7 +20079,7 @@ var ts; } else { var restExpression = e.expression; - if (restExpression.kind === 183 && restExpression.operatorToken.kind === 56) { + if (restExpression.kind === 184 && restExpression.operatorToken.kind === 56) { error(restExpression.operatorToken, ts.Diagnostics.A_rest_element_cannot_have_an_initializer); } else { @@ -19851,7 +20093,7 @@ var ts; } function checkDestructuringAssignment(exprOrAssignment, sourceType, contextualMapper) { var target; - if (exprOrAssignment.kind === 248) { + if (exprOrAssignment.kind === 249) { var prop = exprOrAssignment; if (prop.objectAssignmentInitializer) { checkBinaryLikeExpression(prop.name, prop.equalsToken, prop.objectAssignmentInitializer, contextualMapper); @@ -19861,14 +20103,14 @@ var ts; else { target = exprOrAssignment; } - if (target.kind === 183 && target.operatorToken.kind === 56) { + if (target.kind === 184 && target.operatorToken.kind === 56) { checkBinaryExpression(target, contextualMapper); target = target.left; } - if (target.kind === 167) { + if (target.kind === 168) { return checkObjectLiteralAssignment(target, sourceType, contextualMapper); } - if (target.kind === 166) { + if (target.kind === 167) { return checkArrayLiteralAssignment(target, sourceType, contextualMapper); } return checkReferenceAssignment(target, sourceType, contextualMapper); @@ -19885,7 +20127,7 @@ var ts; } function checkBinaryLikeExpression(left, operatorToken, right, contextualMapper, errorNode) { var operator = operatorToken.kind; - if (operator === 56 && (left.kind === 167 || left.kind === 166)) { + if (operator === 56 && (left.kind === 168 || left.kind === 167)) { return checkDestructuringAssignment(left, checkExpression(right, contextualMapper), contextualMapper); } var leftType = checkExpression(left, contextualMapper); @@ -20109,14 +20351,14 @@ var ts; return links.resolvedType; } function checkPropertyAssignment(node, contextualMapper) { - if (node.name.kind === 136) { + if (node.name.kind === 137) { checkComputedPropertyName(node.name); } return checkExpression(node.initializer, contextualMapper); } function checkObjectLiteralMethod(node, contextualMapper) { checkGrammarMethod(node); - if (node.name.kind === 136) { + if (node.name.kind === 137) { checkComputedPropertyName(node.name); } var uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper); @@ -20139,7 +20381,7 @@ var ts; } function checkExpression(node, contextualMapper) { var type; - if (node.kind === 135) { + if (node.kind === 136) { type = checkQualifiedName(node); } else { @@ -20147,9 +20389,9 @@ var ts; type = instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, contextualMapper); } if (isConstEnumObjectType(type)) { - var ok = (node.parent.kind === 168 && node.parent.expression === node) || - (node.parent.kind === 169 && node.parent.expression === node) || - ((node.kind === 69 || node.kind === 135) && isInRightSideOfImportOrExportAssignment(node)); + var ok = (node.parent.kind === 169 && node.parent.expression === node) || + (node.parent.kind === 170 && node.parent.expression === node) || + ((node.kind === 69 || node.kind === 136) && isInRightSideOfImportOrExportAssignment(node)); if (!ok) { error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment); } @@ -20175,7 +20417,7 @@ var ts; return booleanType; case 8: return checkNumericLiteral(node); - case 185: + case 186: return checkTemplateExpression(node); case 9: return checkStringLiteralExpression(node); @@ -20183,58 +20425,58 @@ var ts; return stringType; case 10: return globalRegExpType; - case 166: - return checkArrayLiteral(node, contextualMapper); case 167: - return checkObjectLiteral(node, contextualMapper); + return checkArrayLiteral(node, contextualMapper); case 168: - return checkPropertyAccessExpression(node); + return checkObjectLiteral(node, contextualMapper); case 169: - return checkIndexedAccess(node); + return checkPropertyAccessExpression(node); case 170: + return checkIndexedAccess(node); case 171: - return checkCallExpression(node); case 172: - return checkTaggedTemplateExpression(node); - case 174: - return checkExpression(node.expression, contextualMapper); - case 188: - return checkClassExpression(node); - case 175: - case 176: - return checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper); - case 178: - return checkTypeOfExpression(node); + return checkCallExpression(node); case 173: - case 191: - return checkAssertion(node); - case 177: - return checkDeleteExpression(node); - case 179: - return checkVoidExpression(node); - case 180: - return checkAwaitExpression(node); - case 181: - return checkPrefixUnaryExpression(node); - case 182: - return checkPostfixUnaryExpression(node); - case 183: - return checkBinaryExpression(node, contextualMapper); - case 184: - return checkConditionalExpression(node, contextualMapper); - case 187: - return checkSpreadElementExpression(node, contextualMapper); + return checkTaggedTemplateExpression(node); + case 175: + return checkExpression(node.expression, contextualMapper); case 189: + return checkClassExpression(node); + case 176: + case 177: + return checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper); + case 179: + return checkTypeOfExpression(node); + case 174: + case 192: + return checkAssertion(node); + case 178: + return checkDeleteExpression(node); + case 180: + return checkVoidExpression(node); + case 181: + return checkAwaitExpression(node); + case 182: + return checkPrefixUnaryExpression(node); + case 183: + return checkPostfixUnaryExpression(node); + case 184: + return checkBinaryExpression(node, contextualMapper); + case 185: + return checkConditionalExpression(node, contextualMapper); + case 188: + return checkSpreadElementExpression(node, contextualMapper); + case 190: return undefinedType; - case 186: + case 187: return checkYieldExpression(node); - case 242: + case 243: return checkJsxExpression(node); - case 235: - return checkJsxElement(node); case 236: - return checkJsxSelfClosingElement(node); + return checkJsxElement(node); case 237: + return checkJsxSelfClosingElement(node); + case 238: ts.Debug.fail("Shouldn't ever directly check a JsxOpeningElement"); } return unknownType; @@ -20255,7 +20497,7 @@ var ts; var func = ts.getContainingFunction(node); if (node.flags & 56) { func = ts.getContainingFunction(node); - if (!(func.kind === 144 && ts.nodeIsPresent(func.body))) { + if (!(func.kind === 145 && ts.nodeIsPresent(func.body))) { error(node, ts.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } } @@ -20270,9 +20512,9 @@ var ts; if (!node.asteriskToken || !node.body) { return false; } - return node.kind === 143 || - node.kind === 215 || - node.kind === 175; + return node.kind === 144 || + node.kind === 216 || + node.kind === 176; } function getTypePredicateParameterIndex(parameterList, parameter) { if (parameterList) { @@ -20286,104 +20528,97 @@ var ts; } return -1; } - function isInLegalParameterTypePredicatePosition(node) { - switch (node.parent.kind) { - case 176: - case 147: - case 215: - case 175: - case 152: - case 143: - case 142: - return node === node.parent.type; + function checkTypePredicate(node) { + var parent = getTypePredicateParent(node); + if (!parent) { + return; + } + var returnType = getReturnTypeOfSignature(getSignatureFromDeclaration(parent)); + if (!returnType || !(returnType.flags & 134217728)) { + return; + } + var parameterName = node.parameterName; + if (parameterName.kind === 162) { + getTypeFromThisTypeNode(parameterName); + } + else { + var typePredicate = returnType.predicate; + if (typePredicate.parameterIndex >= 0) { + if (parent.parameters[typePredicate.parameterIndex].dotDotDotToken) { + error(parameterName, ts.Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); + } + else { + checkTypeAssignableTo(typePredicate.type, getTypeOfNode(parent.parameters[typePredicate.parameterIndex]), node.type); + } + } + else if (parameterName) { + var hasReportedError = false; + for (var _i = 0, _a = parent.parameters; _i < _a.length; _i++) { + var name_14 = _a[_i].name; + if ((name_14.kind === 164 || + name_14.kind === 165) && + checkIfTypePredicateVariableIsDeclaredInBindingPattern(name_14, parameterName, typePredicate.parameterName)) { + hasReportedError = true; + break; + } + } + if (!hasReportedError) { + error(node.parameterName, ts.Diagnostics.Cannot_find_parameter_0, typePredicate.parameterName); + } + } } - return false; } - function isInLegalThisTypePredicatePosition(node) { - if (isInLegalParameterTypePredicatePosition(node)) { - return true; - } + function getTypePredicateParent(node) { switch (node.parent.kind) { - case 141: - case 140: - case 145: - return node === node.parent.type; + case 177: + case 148: + case 216: + case 176: + case 153: + case 144: + case 143: + var parent_6 = node.parent; + if (node === parent_6.type) { + return parent_6; + } + } + } + function checkIfTypePredicateVariableIsDeclaredInBindingPattern(pattern, predicateVariableNode, predicateVariableName) { + for (var _i = 0, _a = pattern.elements; _i < _a.length; _i++) { + var name_15 = _a[_i].name; + if (name_15.kind === 69 && + name_15.text === predicateVariableName) { + error(predicateVariableNode, ts.Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, predicateVariableName); + return true; + } + else if (name_15.kind === 165 || + name_15.kind === 164) { + if (checkIfTypePredicateVariableIsDeclaredInBindingPattern(name_15, predicateVariableNode, predicateVariableName)) { + return true; + } + } } - return false; } function checkSignatureDeclaration(node) { - if (node.kind === 149) { + if (node.kind === 150) { checkGrammarIndexSignature(node); } - else if (node.kind === 152 || node.kind === 215 || node.kind === 153 || - node.kind === 147 || node.kind === 144 || - node.kind === 148) { + else if (node.kind === 153 || node.kind === 216 || node.kind === 154 || + node.kind === 148 || node.kind === 145 || + node.kind === 149) { checkGrammarFunctionLikeDeclaration(node); } checkTypeParameters(node.typeParameters); ts.forEach(node.parameters, checkParameter); - if (node.type) { - if (node.type.kind === 150) { - var returnType = getReturnTypeOfSignature(getSignatureFromDeclaration(node)); - if (!returnType || !(returnType.flags & 134217728)) { - return; - } - var typePredicate = returnType.predicate; - var typePredicateNode = node.type; - checkSourceElement(typePredicateNode); - if (ts.isIdentifierTypePredicate(typePredicate)) { - if (typePredicate.parameterIndex >= 0) { - if (node.parameters[typePredicate.parameterIndex].dotDotDotToken) { - error(typePredicateNode.parameterName, ts.Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); - } - else { - checkTypeAssignableTo(typePredicate.type, getTypeOfNode(node.parameters[typePredicate.parameterIndex]), typePredicateNode.type); - } - } - else if (typePredicateNode.parameterName) { - var hasReportedError = false; - for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) { - var param = _a[_i]; - if (hasReportedError) { - break; - } - if (param.name.kind === 163 || - param.name.kind === 164) { - (function checkBindingPattern(pattern) { - for (var _i = 0, _a = pattern.elements; _i < _a.length; _i++) { - var element = _a[_i]; - if (element.name.kind === 69 && - element.name.text === typePredicate.parameterName) { - error(typePredicateNode.parameterName, ts.Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, typePredicate.parameterName); - hasReportedError = true; - break; - } - else if (element.name.kind === 164 || - element.name.kind === 163) { - checkBindingPattern(element.name); - } - } - })(param.name); - } - } - if (!hasReportedError) { - error(typePredicateNode.parameterName, ts.Diagnostics.Cannot_find_parameter_0, typePredicate.parameterName); - } - } - } - } - else { - checkSourceElement(node.type); - } - } + checkSourceElement(node.type); if (produceDiagnostics) { checkCollisionWithArgumentsInGeneratedCode(node); if (compilerOptions.noImplicitAny && !node.type) { switch (node.kind) { - case 148: + case 149: error(node, ts.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; - case 147: + case 148: error(node, ts.Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; } @@ -20405,7 +20640,7 @@ var ts; checkSpecializedSignatureDeclaration(node); } function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 217) { + if (node.kind === 218) { var nodeSymbol = getSymbolOfNode(node); if (nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) { return; @@ -20468,7 +20703,7 @@ var ts; return; } function isSuperCallExpression(n) { - return n.kind === 170 && n.expression.kind === 95; + return n.kind === 171 && n.expression.kind === 95; } function containsSuperCallAsComputedPropertyName(n) { return n.name && containsSuperCall(n.name); @@ -20489,12 +20724,12 @@ var ts; if (n.kind === 97) { error(n, ts.Diagnostics.this_cannot_be_referenced_in_current_location); } - else if (n.kind !== 175 && n.kind !== 215) { + else if (n.kind !== 176 && n.kind !== 216) { ts.forEachChild(n, markThisReferencesAsErrors); } } function isInstancePropertyWithInitializer(n) { - return n.kind === 141 && + return n.kind === 142 && !(n.flags & 64) && !!n.initializer; } @@ -20514,7 +20749,7 @@ var ts; var superCallStatement; for (var _i = 0, statements_2 = statements; _i < statements_2.length; _i++) { var statement = statements_2[_i]; - if (statement.kind === 197 && isSuperCallExpression(statement.expression)) { + if (statement.kind === 198 && isSuperCallExpression(statement.expression)) { superCallStatement = statement; break; } @@ -20540,7 +20775,7 @@ var ts; checkGrammarFunctionLikeDeclaration(node) || checkGrammarAccessor(node) || checkGrammarComputedPropertyName(node.name); checkDecorators(node); checkSignatureDeclaration(node); - if (node.kind === 145) { + if (node.kind === 146) { if (!ts.isInAmbientContext(node) && ts.nodeIsPresent(node.body) && (node.flags & 524288)) { if (node.flags & 1048576) { if (compilerOptions.noImplicitReturns) { @@ -20552,11 +20787,11 @@ var ts; } } } - if (node.name.kind === 136) { + if (node.name.kind === 137) { checkComputedPropertyName(node.name); } if (!ts.hasDynamicName(node)) { - var otherKind = node.kind === 145 ? 146 : 145; + var otherKind = node.kind === 146 ? 147 : 146; var otherAccessor = ts.getDeclarationOfKind(node.symbol, otherKind); if (otherAccessor) { if (((node.flags & 56) !== (otherAccessor.flags & 56))) { @@ -20573,7 +20808,7 @@ var ts; } getTypeOfAccessors(getSymbolOfNode(node)); } - if (node.parent.kind !== 167) { + if (node.parent.kind !== 168) { checkSourceElement(node.body); } else { @@ -20655,9 +20890,9 @@ var ts; return; } var signaturesToCheck; - if (!signatureDeclarationNode.name && signatureDeclarationNode.parent && signatureDeclarationNode.parent.kind === 217) { - ts.Debug.assert(signatureDeclarationNode.kind === 147 || signatureDeclarationNode.kind === 148); - var signatureKind = signatureDeclarationNode.kind === 147 ? 0 : 1; + if (!signatureDeclarationNode.name && signatureDeclarationNode.parent && signatureDeclarationNode.parent.kind === 218) { + ts.Debug.assert(signatureDeclarationNode.kind === 148 || signatureDeclarationNode.kind === 149); + var signatureKind = signatureDeclarationNode.kind === 148 ? 0 : 1; var containingSymbol = getSymbolOfNode(signatureDeclarationNode.parent); var containingType = getDeclaredTypeOfSymbol(containingSymbol); signaturesToCheck = getSignaturesOfType(containingType, signatureKind); @@ -20675,9 +20910,9 @@ var ts; } function getEffectiveDeclarationFlags(n, flagsToCheck) { var flags = ts.getCombinedNodeFlags(n); - if (n.parent.kind !== 217 && - n.parent.kind !== 216 && - n.parent.kind !== 188 && + if (n.parent.kind !== 218 && + n.parent.kind !== 217 && + n.parent.kind !== 189 && ts.isInAmbientContext(n)) { if (!(flags & 4)) { flags |= 2; @@ -20754,7 +20989,7 @@ var ts; if (subsequentNode.kind === node.kind) { var errorNode_1 = subsequentNode.name || subsequentNode; if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) { - var reportError = (node.kind === 143 || node.kind === 142) && + var reportError = (node.kind === 144 || node.kind === 143) && (node.flags & 64) !== (subsequentNode.flags & 64); if (reportError) { var diagnostic = node.flags & 64 ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static; @@ -20788,11 +21023,11 @@ var ts; var current = declarations_4[_i]; var node = current; var inAmbientContext = ts.isInAmbientContext(node); - var inAmbientContextOrInterface = node.parent.kind === 217 || node.parent.kind === 155 || inAmbientContext; + var inAmbientContextOrInterface = node.parent.kind === 218 || node.parent.kind === 156 || inAmbientContext; if (inAmbientContextOrInterface) { previousDeclaration = undefined; } - if (node.kind === 215 || node.kind === 143 || node.kind === 142 || node.kind === 144) { + if (node.kind === 216 || node.kind === 144 || node.kind === 143 || node.kind === 145) { var currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; allNodeFlags &= currentNodeFlags; @@ -20905,16 +21140,16 @@ var ts; } function getDeclarationSpaces(d) { switch (d.kind) { - case 217: + case 218: return 2097152; - case 220: - return d.name.kind === 9 || ts.getModuleInstanceState(d) !== 0 + case 221: + return ts.isAmbientModule(d) || ts.getModuleInstanceState(d) !== 0 ? 4194304 | 1048576 : 4194304; - case 216: - case 219: + case 217: + case 220: return 2097152 | 1048576; - case 223: + case 224: var result = 0; var target = resolveAlias(getSymbolOfNode(d)); ts.forEach(target.declarations, function (d) { result |= getDeclarationSpaces(d); }); @@ -21045,22 +21280,22 @@ var ts; var headMessage = getDiagnosticHeadMessageForDecoratorResolution(node); var errorInfo; switch (node.parent.kind) { - case 216: + case 217: var classSymbol = getSymbolOfNode(node.parent); var classConstructorType = getTypeOfSymbol(classSymbol); expectedReturnType = getUnionType([classConstructorType, voidType]); break; - case 138: + case 139: expectedReturnType = voidType; errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any); break; - case 141: + case 142: expectedReturnType = voidType; errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_property_decorator_function_must_be_either_void_or_any); break; - case 143: - case 145: + case 144: case 146: + case 147: var methodType = getTypeOfNode(node.parent); var descriptorType = createTypedPropertyDescriptorType(methodType); expectedReturnType = getUnionType([descriptorType, voidType]); @@ -21069,9 +21304,9 @@ var ts; checkTypeAssignableTo(returnType, expectedReturnType, node, headMessage, errorInfo); } function checkTypeNodeAsExpression(node) { - if (node && node.kind === 151) { + if (node && node.kind === 152) { var root = getFirstIdentifier(node.typeName); - var meaning = root.parent.kind === 151 ? 793056 : 1536; + var meaning = root.parent.kind === 152 ? 793056 : 1536; var rootSymbol = resolveName(root, root.text, meaning | 8388608, undefined, undefined); if (rootSymbol && rootSymbol.flags & 8388608) { var aliasTarget = resolveAlias(rootSymbol); @@ -21105,28 +21340,24 @@ var ts; } if (compilerOptions.emitDecoratorMetadata) { switch (node.kind) { - case 216: + case 217: var constructor = ts.getFirstConstructorWithBody(node); if (constructor) { checkParameterTypeAnnotationsAsExpressions(constructor); } break; - case 143: - case 145: + case 144: case 146: + case 147: checkParameterTypeAnnotationsAsExpressions(node); checkReturnTypeAnnotationAsExpression(node); break; - case 141: - case 138: + case 142: + case 139: checkTypeAnnotationAsExpression(node); break; } } - emitDecorate = true; - if (node.kind === 138) { - emitParam = true; - } ts.forEach(node.decorators, checkDecorator); } function checkFunctionDeclaration(node) { @@ -21141,16 +21372,13 @@ var ts; checkDecorators(node); checkSignatureDeclaration(node); var isAsync = ts.isAsyncFunctionLike(node); - if (isAsync) { - emitAwaiter = true; - } - if (node.name && node.name.kind === 136) { + if (node.name && node.name.kind === 137) { checkComputedPropertyName(node.name); } if (!ts.hasDynamicName(node)) { var symbol = getSymbolOfNode(node); var localSymbol = node.localSymbol || symbol; - var firstDeclaration = ts.forEach(localSymbol.declarations, function (declaration) { return declaration.kind === node.kind && !ts.isSourceFileJavaScript(getSourceFile(declaration)) ? + var firstDeclaration = ts.forEach(localSymbol.declarations, function (declaration) { return declaration.kind === node.kind && !ts.isSourceFileJavaScript(ts.getSourceFileOfNode(declaration)) ? declaration : undefined; }); if (node === firstDeclaration) { checkFunctionOrConstructorSymbol(localSymbol); @@ -21176,7 +21404,7 @@ var ts; } } function checkBlock(node) { - if (node.kind === 194) { + if (node.kind === 195) { checkGrammarStatementInAmbientContext(node); } ts.forEach(node.statements, checkSourceElement); @@ -21195,19 +21423,19 @@ var ts; if (!(identifier && identifier.text === name)) { return false; } - if (node.kind === 141 || - node.kind === 140 || + if (node.kind === 142 || + node.kind === 141 || + node.kind === 144 || node.kind === 143 || - node.kind === 142 || - node.kind === 145 || - node.kind === 146) { + node.kind === 146 || + node.kind === 147) { return false; } if (ts.isInAmbientContext(node)) { return false; } var root = ts.getRootDeclaration(node); - if (root.kind === 138 && ts.nodeIsMissing(root.parent.body)) { + if (root.kind === 139 && ts.nodeIsMissing(root.parent.body)) { return false; } return true; @@ -21255,11 +21483,11 @@ var ts; if (!needCollisionCheckForIdentifier(node, name, "require") && !needCollisionCheckForIdentifier(node, name, "exports")) { return; } - if (node.kind === 220 && ts.getModuleInstanceState(node) !== 1) { + if (node.kind === 221 && ts.getModuleInstanceState(node) !== 1) { return; } var parent = getDeclarationContainer(node); - if (parent.kind === 250 && ts.isExternalOrCommonJsModule(parent)) { + if (parent.kind === 251 && ts.isExternalOrCommonJsModule(parent)) { error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, ts.declarationNameToString(name), ts.declarationNameToString(name)); } } @@ -21267,7 +21495,7 @@ var ts; if ((ts.getCombinedNodeFlags(node) & 24576) !== 0 || ts.isParameterDeclaration(node)) { return; } - if (node.kind === 213 && !node.initializer) { + if (node.kind === 214 && !node.initializer) { return; } var symbol = getSymbolOfNode(node); @@ -21277,25 +21505,25 @@ var ts; localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2) { if (getDeclarationFlagsFromSymbol(localDeclarationSymbol) & 24576) { - var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 214); - var container = varDeclList.parent.kind === 195 && varDeclList.parent.parent + var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 215); + var container = varDeclList.parent.kind === 196 && varDeclList.parent.parent ? varDeclList.parent.parent : undefined; var namesShareScope = container && - (container.kind === 194 && ts.isFunctionLike(container.parent) || + (container.kind === 195 && ts.isFunctionLike(container.parent) || + container.kind === 222 || container.kind === 221 || - container.kind === 220 || - container.kind === 250); + container.kind === 251); if (!namesShareScope) { - var name_14 = symbolToString(localDeclarationSymbol); - error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name_14, name_14); + var name_16 = symbolToString(localDeclarationSymbol); + error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name_16, name_16); } } } } } function checkParameterInitializer(node) { - if (ts.getRootDeclaration(node).kind !== 138) { + if (ts.getRootDeclaration(node).kind !== 139) { return; } var func = ts.getContainingFunction(node); @@ -21304,7 +21532,7 @@ var ts; if (n.kind === 69) { var referencedSymbol = getNodeLinks(n).resolvedSymbol; if (referencedSymbol && referencedSymbol !== unknownSymbol && getSymbol(func.locals, referencedSymbol.name, 107455) === referencedSymbol) { - if (referencedSymbol.valueDeclaration.kind === 138) { + if (referencedSymbol.valueDeclaration.kind === 139) { if (referencedSymbol.valueDeclaration === node) { error(n, ts.Diagnostics.Parameter_0_cannot_be_referenced_in_its_initializer, ts.declarationNameToString(node.name)); return; @@ -21324,26 +21552,26 @@ var ts; function checkVariableLikeDeclaration(node) { checkDecorators(node); checkSourceElement(node.type); - if (node.name.kind === 136) { + if (node.name.kind === 137) { checkComputedPropertyName(node.name); if (node.initializer) { checkExpressionCached(node.initializer); } } - if (node.kind === 165) { - if (node.propertyName && node.propertyName.kind === 136) { + if (node.kind === 166) { + if (node.propertyName && node.propertyName.kind === 137) { checkComputedPropertyName(node.propertyName); } } if (ts.isBindingPattern(node.name)) { ts.forEach(node.name.elements, checkSourceElement); } - if (node.initializer && ts.getRootDeclaration(node).kind === 138 && ts.nodeIsMissing(ts.getContainingFunction(node).body)) { + if (node.initializer && ts.getRootDeclaration(node).kind === 139 && ts.nodeIsMissing(ts.getContainingFunction(node).body)) { error(node, ts.Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation); return; } if (ts.isBindingPattern(node.name)) { - if (node.initializer) { + if (node.initializer && node.parent.parent.kind !== 203) { checkTypeAssignableTo(checkExpressionCached(node.initializer), getWidenedTypeForVariableLikeDeclaration(node), node, undefined); checkParameterInitializer(node); } @@ -21352,7 +21580,7 @@ var ts; var symbol = getSymbolOfNode(node); var type = getTypeOfVariableOrParameterOrProperty(symbol); if (node === symbol.valueDeclaration) { - if (node.initializer) { + if (node.initializer && node.parent.parent.kind !== 203) { checkTypeAssignableTo(checkExpressionCached(node.initializer), type, node, undefined); checkParameterInitializer(node); } @@ -21366,9 +21594,9 @@ var ts; checkTypeAssignableTo(checkExpressionCached(node.initializer), declarationType, node, undefined); } } - if (node.kind !== 141 && node.kind !== 140) { + if (node.kind !== 142 && node.kind !== 141) { checkExportsOnMergedDeclarations(node); - if (node.kind === 213 || node.kind === 165) { + if (node.kind === 214 || node.kind === 166) { checkVarDeclaredNamesNotShadowed(node); } checkCollisionWithCapturedSuperVariable(node, node.name); @@ -21389,7 +21617,7 @@ var ts; ts.forEach(node.declarationList.declarations, checkSourceElement); } function checkGrammarDisallowedModifiersOnObjectLiteralExpressionMethod(node) { - if (node.modifiers && node.parent.kind === 167) { + if (node.modifiers && node.parent.kind === 168) { if (ts.isAsyncFunctionLike(node)) { if (node.modifiers.length > 1) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); @@ -21408,7 +21636,7 @@ var ts; checkGrammarStatementInAmbientContext(node); checkExpression(node.expression); checkSourceElement(node.thenStatement); - if (node.thenStatement.kind === 196) { + if (node.thenStatement.kind === 197) { error(node.thenStatement, ts.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); @@ -21425,12 +21653,12 @@ var ts; } function checkForStatement(node) { if (!checkGrammarStatementInAmbientContext(node)) { - if (node.initializer && node.initializer.kind === 214) { + if (node.initializer && node.initializer.kind === 215) { checkGrammarVariableDeclarationList(node.initializer); } } if (node.initializer) { - if (node.initializer.kind === 214) { + if (node.initializer.kind === 215) { ts.forEach(node.initializer.declarations, checkVariableDeclaration); } else { @@ -21445,13 +21673,13 @@ var ts; } function checkForOfStatement(node) { checkGrammarForInOrForOfStatement(node); - if (node.initializer.kind === 214) { + if (node.initializer.kind === 215) { checkForInOrForOfVariableDeclaration(node); } else { var varExpr = node.initializer; var iteratedType = checkRightHandSideOfForOf(node.expression); - if (varExpr.kind === 166 || varExpr.kind === 167) { + if (varExpr.kind === 167 || varExpr.kind === 168) { checkDestructuringAssignment(varExpr, iteratedType || unknownType); } else { @@ -21466,7 +21694,7 @@ var ts; } function checkForInStatement(node) { checkGrammarForInOrForOfStatement(node); - if (node.initializer.kind === 214) { + if (node.initializer.kind === 215) { var variable = node.initializer.declarations[0]; if (variable && ts.isBindingPattern(variable.name)) { error(variable.name, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); @@ -21476,7 +21704,7 @@ var ts; else { var varExpr = node.initializer; var leftType = checkExpression(varExpr); - if (varExpr.kind === 166 || varExpr.kind === 167) { + if (varExpr.kind === 167 || varExpr.kind === 168) { error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } else if (!isTypeAnyOrAllConstituentTypesHaveKind(leftType, 258)) { @@ -21644,7 +21872,7 @@ var ts; checkGrammarStatementInAmbientContext(node) || checkGrammarBreakOrContinueStatement(node); } function isGetAccessorWithAnnotatatedSetAccessor(node) { - return !!(node.kind === 145 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 146))); + return !!(node.kind === 146 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 147))); } function checkReturnStatement(node) { if (!checkGrammarStatementInAmbientContext(node)) { @@ -21662,10 +21890,10 @@ var ts; if (func.asteriskToken) { return; } - if (func.kind === 146) { + if (func.kind === 147) { error(node.expression, ts.Diagnostics.Setters_cannot_return_a_value); } - else if (func.kind === 144) { + else if (func.kind === 145) { if (!checkTypeAssignableTo(exprType, returnType, node.expression)) { error(node.expression, ts.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); } @@ -21701,7 +21929,7 @@ var ts; var expressionType = checkExpression(node.expression); var expressionTypeIsStringLike = someConstituentTypeHasKind(expressionType, 258); ts.forEach(node.caseBlock.clauses, function (clause) { - if (clause.kind === 244 && !hasDuplicateDefaultClause) { + if (clause.kind === 245 && !hasDuplicateDefaultClause) { if (firstDefaultClause === undefined) { firstDefaultClause = clause; } @@ -21713,7 +21941,7 @@ var ts; hasDuplicateDefaultClause = true; } } - if (produceDiagnostics && clause.kind === 243) { + if (produceDiagnostics && clause.kind === 244) { var caseClause = clause; var caseType = checkExpression(caseClause.expression); var expressionTypeIsAssignableToCaseType = (expressionTypeIsStringLike && someConstituentTypeHasKind(caseType, 258)) || @@ -21732,7 +21960,7 @@ var ts; if (ts.isFunctionLike(current)) { break; } - if (current.kind === 209 && current.label.text === node.label.text) { + if (current.kind === 210 && current.label.text === node.label.text) { var sourceFile = ts.getSourceFileOfNode(node); grammarErrorOnNode(node.label, ts.Diagnostics.Duplicate_label_0, ts.getTextOfNodeFromSourceText(sourceFile.text, node.label)); break; @@ -21826,7 +22054,7 @@ var ts; return; } var errorNode; - if (prop.valueDeclaration.name.kind === 136 || prop.parent === containingType.symbol) { + if (prop.valueDeclaration.name.kind === 137 || prop.parent === containingType.symbol) { errorNode = prop.valueDeclaration; } else if (indexDeclaration) { @@ -21901,7 +22129,6 @@ var ts; var staticType = getTypeOfSymbol(symbol); var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node); if (baseTypeNode) { - emitExtends = emitExtends || !ts.isInAmbientContext(node); var baseTypes = getBaseTypes(type); if (baseTypes.length && produceDiagnostics) { var baseType = baseTypes[0]; @@ -21975,7 +22202,7 @@ var ts; if (derived === base) { var derivedClassDecl = getClassLikeDeclarationOfSymbol(type.symbol); if (baseDeclarationFlags & 128 && (!derivedClassDecl || !(derivedClassDecl.flags & 128))) { - if (derivedClassDecl.kind === 188) { + if (derivedClassDecl.kind === 189) { error(derivedClassDecl, ts.Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, symbolToString(baseProperty), typeToString(baseType)); } else { @@ -22019,7 +22246,7 @@ var ts; } } function isAccessor(kind) { - return kind === 145 || kind === 146; + return kind === 146 || kind === 147; } function areTypeParametersIdentical(list1, list2) { if (!list1 && !list2) { @@ -22085,7 +22312,7 @@ var ts; checkTypeNameIsReserved(node.name, ts.Diagnostics.Interface_name_cannot_be_0); checkExportsOnMergedDeclarations(node); var symbol = getSymbolOfNode(node); - var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 217); + var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 218); if (symbol.declarations.length > 1) { if (node !== firstInterfaceDecl && !areTypeParametersIdentical(firstInterfaceDecl.typeParameters, node.typeParameters)) { error(node.name, ts.Diagnostics.All_declarations_of_an_interface_must_have_identical_type_parameters); @@ -22183,7 +22410,7 @@ var ts; return value; function evalConstant(e) { switch (e.kind) { - case 181: + case 182: var value_1 = evalConstant(e.operand); if (value_1 === undefined) { return undefined; @@ -22194,7 +22421,7 @@ var ts; case 50: return ~value_1; } return undefined; - case 183: + case 184: var left = evalConstant(e.left); if (left === undefined) { return undefined; @@ -22219,11 +22446,11 @@ var ts; return undefined; case 8: return +e.text; - case 174: + case 175: return evalConstant(e.expression); case 69: + case 170: case 169: - case 168: var member = initializer.parent; var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent)); var enumType_1; @@ -22234,7 +22461,7 @@ var ts; } else { var expression; - if (e.kind === 169) { + if (e.kind === 170) { if (e.argumentExpression === undefined || e.argumentExpression.kind !== 9) { return undefined; @@ -22251,7 +22478,7 @@ var ts; if (current.kind === 69) { break; } - else if (current.kind === 168) { + else if (current.kind === 169) { current = current.expression; } else { @@ -22310,7 +22537,7 @@ var ts; } var seenEnumMissingInitialInitializer = false; ts.forEach(enumSymbol.declarations, function (declaration) { - if (declaration.kind !== 219) { + if (declaration.kind !== 220) { return false; } var enumDeclaration = declaration; @@ -22333,8 +22560,8 @@ var ts; var declarations = symbol.declarations; for (var _i = 0, declarations_5 = declarations; _i < declarations_5.length; _i++) { var declaration = declarations_5[_i]; - if ((declaration.kind === 216 || - (declaration.kind === 215 && ts.nodeIsPresent(declaration.body))) && + if ((declaration.kind === 217 || + (declaration.kind === 216 && ts.nodeIsPresent(declaration.body))) && !ts.isInAmbientContext(declaration)) { return declaration; } @@ -22356,7 +22583,12 @@ var ts; } function checkModuleDeclaration(node) { if (produceDiagnostics) { - var isAmbientExternalModule = node.name.kind === 9; + var isGlobalAugmentation = ts.isGlobalScopeAugmentation(node); + var inAmbientContext = ts.isInAmbientContext(node); + if (isGlobalAugmentation && !inAmbientContext) { + error(node.name, ts.Diagnostics.Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context); + } + var isAmbientExternalModule = ts.isAmbientModule(node); var contextErrorMessage = isAmbientExternalModule ? ts.Diagnostics.An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file : ts.Diagnostics.A_namespace_declaration_is_only_allowed_in_a_namespace_or_module; @@ -22364,7 +22596,7 @@ var ts; return; } if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node)) { - if (!ts.isInAmbientContext(node) && node.name.kind === 9) { + if (!inAmbientContext && node.name.kind === 9) { grammarErrorOnNode(node.name, ts.Diagnostics.Only_ambient_modules_can_use_quoted_names); } } @@ -22374,7 +22606,7 @@ var ts; var symbol = getSymbolOfNode(node); if (symbol.flags & 512 && symbol.declarations.length > 1 - && !ts.isInAmbientContext(node) + && !inAmbientContext && ts.isInstantiatedModule(node, compilerOptions.preserveConstEnums || compilerOptions.isolatedModules)) { var firstNonAmbientClassOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol); if (firstNonAmbientClassOrFunc) { @@ -22385,29 +22617,102 @@ var ts; error(node.name, ts.Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged); } } - var mergedClass = ts.getDeclarationOfKind(symbol, 216); + var mergedClass = ts.getDeclarationOfKind(symbol, 217); if (mergedClass && inSameLexicalScope(node, mergedClass)) { getNodeLinks(node).flags |= 32768; } } if (isAmbientExternalModule) { - if (!isGlobalSourceFile(node.parent)) { - error(node.name, ts.Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces); + if (ts.isExternalModuleAugmentation(node)) { + var checkBody = isGlobalAugmentation || (getSymbolOfNode(node).flags & 33554432); + if (checkBody) { + for (var _i = 0, _a = node.body.statements; _i < _a.length; _i++) { + var statement = _a[_i]; + checkModuleAugmentationElement(statement, isGlobalAugmentation); + } + } } - if (ts.isExternalModuleNameRelative(node.name.text)) { - error(node.name, ts.Diagnostics.Ambient_module_declaration_cannot_specify_relative_module_name); + else if (isGlobalSourceFile(node.parent)) { + if (isGlobalAugmentation) { + error(node.name, ts.Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations); + } + else if (ts.isExternalModuleNameRelative(node.name.text)) { + error(node.name, ts.Diagnostics.Ambient_module_declaration_cannot_specify_relative_module_name); + } + } + else { + if (isGlobalAugmentation) { + error(node.name, ts.Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations); + } + else { + error(node.name, ts.Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces); + } } } } checkSourceElement(node.body); } + function checkModuleAugmentationElement(node, isGlobalAugmentation) { + switch (node.kind) { + case 196: + for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) { + var decl = _a[_i]; + checkModuleAugmentationElement(decl, isGlobalAugmentation); + } + break; + case 230: + case 231: + grammarErrorOnFirstToken(node, ts.Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); + break; + case 224: + if (node.moduleReference.kind !== 9) { + error(node.name, ts.Diagnostics.Module_augmentation_cannot_introduce_new_names_in_the_top_level_scope); + break; + } + case 225: + grammarErrorOnFirstToken(node, ts.Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); + break; + case 166: + case 214: + var name_17 = node.name; + if (ts.isBindingPattern(name_17)) { + for (var _b = 0, _c = name_17.elements; _b < _c.length; _b++) { + var el = _c[_b]; + checkModuleAugmentationElement(el, isGlobalAugmentation); + } + break; + } + case 217: + case 220: + case 216: + case 218: + case 221: + case 219: + var symbol = getSymbolOfNode(node); + if (symbol) { + var reportError = !(symbol.flags & 33554432); + if (!reportError) { + if (isGlobalAugmentation) { + reportError = symbol.parent !== undefined; + } + else { + reportError = ts.isExternalModuleAugmentation(symbol.parent.valueDeclaration); + } + } + if (reportError) { + error(node, ts.Diagnostics.Module_augmentation_cannot_introduce_new_names_in_the_top_level_scope); + } + } + break; + } + } function getFirstIdentifier(node) { while (true) { - if (node.kind === 135) { + if (node.kind === 136) { node = node.left; } - else if (node.kind === 168) { + else if (node.kind === 169) { node = node.expression; } else { @@ -22423,16 +22728,18 @@ var ts; error(moduleName, ts.Diagnostics.String_literal_expected); return false; } - var inAmbientExternalModule = node.parent.kind === 221 && node.parent.parent.name.kind === 9; - if (node.parent.kind !== 250 && !inAmbientExternalModule) { - error(moduleName, node.kind === 230 ? + var inAmbientExternalModule = node.parent.kind === 222 && ts.isAmbientModule(node.parent.parent); + if (node.parent.kind !== 251 && !inAmbientExternalModule) { + error(moduleName, node.kind === 231 ? ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : ts.Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); return false; } if (inAmbientExternalModule && ts.isExternalModuleNameRelative(moduleName.text)) { - error(node, ts.Diagnostics.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name); - return false; + if (!isTopLevelInExternalModuleAugmentation(node)) { + error(node, ts.Diagnostics.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name); + return false; + } } return true; } @@ -22444,7 +22751,7 @@ var ts; (symbol.flags & 793056 ? 793056 : 0) | (symbol.flags & 1536 ? 1536 : 0); if (target.flags & excludedMeanings) { - var message = node.kind === 232 ? + var message = node.kind === 233 ? ts.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; error(node, message, symbolToString(symbol)); @@ -22470,7 +22777,7 @@ var ts; checkImportBinding(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 226) { + if (importClause.namedBindings.kind === 227) { checkImportBinding(importClause.namedBindings); } else { @@ -22521,8 +22828,8 @@ var ts; if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause) { ts.forEach(node.exportClause.elements, checkExportSpecifier); - var inAmbientExternalModule = node.parent.kind === 221 && node.parent.parent.name.kind === 9; - if (node.parent.kind !== 250 && !inAmbientExternalModule) { + var inAmbientExternalModule = node.parent.kind === 222 && ts.isAmbientModule(node.parent.parent); + if (node.parent.kind !== 251 && !inAmbientExternalModule) { error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); } } @@ -22535,22 +22842,29 @@ var ts; } } function checkGrammarModuleElementContext(node, errorMessage) { - if (node.parent.kind !== 250 && node.parent.kind !== 221 && node.parent.kind !== 220) { + if (node.parent.kind !== 251 && node.parent.kind !== 222 && node.parent.kind !== 221) { return grammarErrorOnFirstToken(node, errorMessage); } } function checkExportSpecifier(node) { checkAliasSymbol(node); if (!node.parent.parent.moduleSpecifier) { - markExportAsReferenced(node); + var exportedName = node.propertyName || node.name; + var symbol = resolveName(exportedName, exportedName.text, 107455 | 793056 | 1536 | 8388608, undefined, undefined); + if (symbol && isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0]))) { + error(exportedName, ts.Diagnostics.Cannot_re_export_name_that_is_not_defined_in_the_module); + } + else { + markExportAsReferenced(node); + } } } function checkExportAssignment(node) { if (checkGrammarModuleElementContext(node, ts.Diagnostics.An_export_assignment_can_only_be_used_in_a_module)) { return; } - var container = node.parent.kind === 250 ? node.parent : node.parent.parent; - if (container.kind === 220 && container.name.kind === 69) { + var container = node.parent.kind === 251 ? node.parent : node.parent.parent; + if (container.kind === 221 && !ts.isAmbientModule(container)) { error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); return; } @@ -22588,7 +22902,9 @@ var ts; var exportEqualsSymbol = moduleSymbol.exports["export="]; if (exportEqualsSymbol && hasExportedMembers(moduleSymbol)) { var declaration = getDeclarationOfAliasSymbol(exportEqualsSymbol) || exportEqualsSymbol.valueDeclaration; - error(declaration, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); + if (!isTopLevelInExternalModuleAugmentation(declaration)) { + error(declaration, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); + } } var exports_2 = getExportsOfModule(moduleSymbol); for (var id in exports_2) { @@ -22609,21 +22925,7 @@ var ts; links.exportsChecked = true; } function isNotOverload(declaration) { - return declaration.kind !== 215 || !!declaration.body; - } - } - function checkTypePredicate(node) { - var parameterName = node.parameterName; - if (parameterName.kind === 69 && !isInLegalParameterTypePredicatePosition(node)) { - error(node, ts.Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); - } - else if (parameterName.kind === 161) { - if (!isInLegalThisTypePredicatePosition(node)) { - error(node, ts.Diagnostics.A_this_based_type_predicate_is_only_allowed_within_a_class_or_interface_s_members_get_accessors_or_return_type_positions_for_functions_and_methods); - } - else { - getTypeFromThisTypeNode(parameterName); - } + return declaration.kind !== 216 || !!declaration.body; } } function checkSourceElement(node) { @@ -22633,118 +22935,118 @@ var ts; var kind = node.kind; if (cancellationToken) { switch (kind) { - case 220: - case 216: + case 221: case 217: - case 215: + case 218: + case 216: cancellationToken.throwIfCancellationRequested(); } } switch (kind) { - case 137: - return checkTypeParameter(node); case 138: + return checkTypeParameter(node); + case 139: return checkParameter(node); + case 142: case 141: - case 140: return checkPropertyDeclaration(node); - case 152: case 153: - case 147: + case 154: case 148: - return checkSignatureDeclaration(node); case 149: return checkSignatureDeclaration(node); - case 143: - case 142: - return checkMethodDeclaration(node); - case 144: - return checkConstructorDeclaration(node); - case 145: - case 146: - return checkAccessorDeclaration(node); - case 151: - return checkTypeReferenceNode(node); case 150: + return checkSignatureDeclaration(node); + case 144: + case 143: + return checkMethodDeclaration(node); + case 145: + return checkConstructorDeclaration(node); + case 146: + case 147: + return checkAccessorDeclaration(node); + case 152: + return checkTypeReferenceNode(node); + case 151: return checkTypePredicate(node); - case 154: - return checkTypeQuery(node); case 155: - return checkTypeLiteral(node); + return checkTypeQuery(node); case 156: - return checkArrayType(node); + return checkTypeLiteral(node); case 157: - return checkTupleType(node); + return checkArrayType(node); case 158: + return checkTupleType(node); case 159: - return checkUnionOrIntersectionType(node); case 160: + return checkUnionOrIntersectionType(node); + case 161: return checkSourceElement(node.type); - case 215: - return checkFunctionDeclaration(node); - case 194: - case 221: - return checkBlock(node); - case 195: - return checkVariableStatement(node); - case 197: - return checkExpressionStatement(node); - case 198: - return checkIfStatement(node); - case 199: - return checkDoStatement(node); - case 200: - return checkWhileStatement(node); - case 201: - return checkForStatement(node); - case 202: - return checkForInStatement(node); - case 203: - return checkForOfStatement(node); - case 204: - case 205: - return checkBreakOrContinueStatement(node); - case 206: - return checkReturnStatement(node); - case 207: - return checkWithStatement(node); - case 208: - return checkSwitchStatement(node); - case 209: - return checkLabeledStatement(node); - case 210: - return checkThrowStatement(node); - case 211: - return checkTryStatement(node); - case 213: - return checkVariableDeclaration(node); - case 165: - return checkBindingElement(node); case 216: - return checkClassDeclaration(node); - case 217: - return checkInterfaceDeclaration(node); - case 218: - return checkTypeAliasDeclaration(node); - case 219: - return checkEnumDeclaration(node); - case 220: - return checkModuleDeclaration(node); - case 224: - return checkImportDeclaration(node); - case 223: - return checkImportEqualsDeclaration(node); - case 230: - return checkExportDeclaration(node); - case 229: - return checkExportAssignment(node); + return checkFunctionDeclaration(node); + case 195: + case 222: + return checkBlock(node); case 196: - checkGrammarStatementInAmbientContext(node); - return; + return checkVariableStatement(node); + case 198: + return checkExpressionStatement(node); + case 199: + return checkIfStatement(node); + case 200: + return checkDoStatement(node); + case 201: + return checkWhileStatement(node); + case 202: + return checkForStatement(node); + case 203: + return checkForInStatement(node); + case 204: + return checkForOfStatement(node); + case 205: + case 206: + return checkBreakOrContinueStatement(node); + case 207: + return checkReturnStatement(node); + case 208: + return checkWithStatement(node); + case 209: + return checkSwitchStatement(node); + case 210: + return checkLabeledStatement(node); + case 211: + return checkThrowStatement(node); case 212: + return checkTryStatement(node); + case 214: + return checkVariableDeclaration(node); + case 166: + return checkBindingElement(node); + case 217: + return checkClassDeclaration(node); + case 218: + return checkInterfaceDeclaration(node); + case 219: + return checkTypeAliasDeclaration(node); + case 220: + return checkEnumDeclaration(node); + case 221: + return checkModuleDeclaration(node); + case 225: + return checkImportDeclaration(node); + case 224: + return checkImportEqualsDeclaration(node); + case 231: + return checkExportDeclaration(node); + case 230: + return checkExportAssignment(node); + case 197: checkGrammarStatementInAmbientContext(node); return; - case 233: + case 213: + checkGrammarStatementInAmbientContext(node); + return; + case 234: return checkMissingDeclaration(node); } } @@ -22757,17 +23059,17 @@ var ts; for (var _i = 0, deferredNodes_1 = deferredNodes; _i < deferredNodes_1.length; _i++) { var node = deferredNodes_1[_i]; switch (node.kind) { - case 175: case 176: + case 177: + case 144: case 143: - case 142: checkFunctionExpressionOrObjectLiteralMethodDeferred(node); break; - case 145: case 146: + case 147: checkAccessorDeferred(node); break; - case 188: + case 189: checkClassExpressionDeferred(node); break; } @@ -22787,10 +23089,6 @@ var ts; } } checkGrammarSourceFile(node); - emitExtends = false; - emitDecorate = false; - emitParam = false; - emitAwaiter = false; potentialThisCollisions.length = 0; deferredNodes = []; ts.forEach(node.statements, checkSourceElement); @@ -22803,21 +23101,6 @@ var ts; ts.forEach(potentialThisCollisions, checkIfThisIsCapturedInEnclosingScope); potentialThisCollisions.length = 0; } - if (emitExtends) { - links.flags |= 8; - } - if (emitDecorate) { - links.flags |= 16; - } - if (emitParam) { - links.flags |= 32; - } - if (emitAwaiter) { - links.flags |= 64; - } - if (emitGenerator || (emitAwaiter && languageVersion < 2)) { - links.flags |= 128; - } links.flags |= 1; } } @@ -22851,7 +23134,7 @@ var ts; function isInsideWithStatementBody(node) { if (node) { while (node.parent) { - if (node.parent.kind === 207 && node.parent.statement === node) { + if (node.parent.kind === 208 && node.parent.statement === node) { return true; } node = node.parent; @@ -22873,28 +23156,28 @@ var ts; copySymbols(location.locals, meaning); } switch (location.kind) { - case 250: + case 251: if (!ts.isExternalOrCommonJsModule(location)) { break; } - case 220: + case 221: copySymbols(getSymbolOfNode(location).exports, meaning & 8914931); break; - case 219: + case 220: copySymbols(getSymbolOfNode(location).exports, meaning & 8); break; - case 188: + case 189: var className = location.name; if (className) { copySymbol(location.symbol, meaning); } - case 216: case 217: + case 218: if (!(memberFlags & 64)) { copySymbols(getSymbolOfNode(location).members, meaning & 793056); } break; - case 175: + case 176: var funcName = location.name; if (funcName) { copySymbol(location.symbol, meaning); @@ -22933,36 +23216,36 @@ var ts; } function isTypeDeclaration(node) { switch (node.kind) { - case 137: - case 216: + case 138: case 217: case 218: case 219: + case 220: return true; } } function isTypeReferenceIdentifier(entityName) { var node = entityName; - while (node.parent && node.parent.kind === 135) { + while (node.parent && node.parent.kind === 136) { node = node.parent; } - return node.parent && node.parent.kind === 151; + return node.parent && node.parent.kind === 152; } function isHeritageClauseElementIdentifier(entityName) { var node = entityName; - while (node.parent && node.parent.kind === 168) { + while (node.parent && node.parent.kind === 169) { node = node.parent; } - return node.parent && node.parent.kind === 190; + return node.parent && node.parent.kind === 191; } function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) { - while (nodeOnRightSide.parent.kind === 135) { + while (nodeOnRightSide.parent.kind === 136) { nodeOnRightSide = nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 223) { + if (nodeOnRightSide.parent.kind === 224) { return nodeOnRightSide.parent.moduleReference === nodeOnRightSide && nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 229) { + if (nodeOnRightSide.parent.kind === 230) { return nodeOnRightSide.parent.expression === nodeOnRightSide && nodeOnRightSide.parent; } return undefined; @@ -22974,10 +23257,10 @@ var ts; if (ts.isDeclarationName(entityName)) { return getSymbolOfNode(entityName.parent); } - if (entityName.parent.kind === 229) { + if (entityName.parent.kind === 230) { return resolveEntityName(entityName, 107455 | 793056 | 1536 | 8388608); } - if (entityName.kind !== 168) { + if (entityName.kind !== 169) { if (isInRightSideOfImportOrExportAssignment(entityName)) { return getSymbolOfPartOfRightHandSideOfImportEquals(entityName); } @@ -22987,7 +23270,7 @@ var ts; } if (isHeritageClauseElementIdentifier(entityName)) { var meaning = 0; - if (entityName.parent.kind === 190) { + if (entityName.parent.kind === 191) { meaning = 793056; if (ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) { meaning |= 107455; @@ -22999,9 +23282,9 @@ var ts; meaning |= 8388608; return resolveEntityName(entityName, meaning); } - else if ((entityName.parent.kind === 237) || - (entityName.parent.kind === 236) || - (entityName.parent.kind === 239)) { + else if ((entityName.parent.kind === 238) || + (entityName.parent.kind === 237) || + (entityName.parent.kind === 240)) { return getJsxElementTagSymbol(entityName.parent); } else if (ts.isExpression(entityName)) { @@ -23012,14 +23295,14 @@ var ts; var meaning = 107455 | 8388608; return resolveEntityName(entityName, meaning); } - else if (entityName.kind === 168) { + else if (entityName.kind === 169) { var symbol = getNodeLinks(entityName).resolvedSymbol; if (!symbol) { checkPropertyAccessExpression(entityName); } return getNodeLinks(entityName).resolvedSymbol; } - else if (entityName.kind === 135) { + else if (entityName.kind === 136) { var symbol = getNodeLinks(entityName).resolvedSymbol; if (!symbol) { checkQualifiedName(entityName); @@ -23028,14 +23311,14 @@ var ts; } } else if (isTypeReferenceIdentifier(entityName)) { - var meaning = entityName.parent.kind === 151 ? 793056 : 1536; + var meaning = entityName.parent.kind === 152 ? 793056 : 1536; meaning |= 8388608; return resolveEntityName(entityName, meaning); } - else if (entityName.parent.kind === 240) { + else if (entityName.parent.kind === 241) { return getJsxAttributePropertySymbol(entityName.parent); } - if (entityName.parent.kind === 150) { + if (entityName.parent.kind === 151) { return resolveEntityName(entityName, 1); } return undefined; @@ -23049,12 +23332,12 @@ var ts; } if (node.kind === 69) { if (isInRightSideOfImportOrExportAssignment(node)) { - return node.parent.kind === 229 + return node.parent.kind === 230 ? getSymbolOfEntityNameOrPropertyAccessExpression(node) : getSymbolOfPartOfRightHandSideOfImportEquals(node); } - else if (node.parent.kind === 165 && - node.parent.parent.kind === 163 && + else if (node.parent.kind === 166 && + node.parent.parent.kind === 164 && node === node.parent.propertyName) { var typeOfPattern = getTypeOfNode(node.parent.parent); var propertyDeclaration = typeOfPattern && getPropertyOfType(typeOfPattern, node.text); @@ -23065,30 +23348,30 @@ var ts; } switch (node.kind) { case 69: - case 168: - case 135: + case 169: + case 136: return getSymbolOfEntityNameOrPropertyAccessExpression(node); case 97: case 95: var type = ts.isExpression(node) ? checkExpression(node) : getTypeFromTypeNode(node); return type.symbol; - case 161: + case 162: return getTypeFromTypeNode(node).symbol; case 121: var constructorDeclaration = node.parent; - if (constructorDeclaration && constructorDeclaration.kind === 144) { + if (constructorDeclaration && constructorDeclaration.kind === 145) { return constructorDeclaration.parent.symbol; } return undefined; case 9: if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) || - ((node.parent.kind === 224 || node.parent.kind === 230) && + ((node.parent.kind === 225 || node.parent.kind === 231) && node.parent.moduleSpecifier === node)) { return resolveExternalModuleName(node, node); } case 8: - if (node.parent.kind === 169 && node.parent.argumentExpression === node) { + if (node.parent.kind === 170 && node.parent.argumentExpression === node) { var objectType = checkExpression(node.parent.expression); if (objectType === unknownType) return undefined; @@ -23102,11 +23385,16 @@ var ts; return undefined; } function getShorthandAssignmentValueSymbol(location) { - if (location && location.kind === 248) { - return resolveEntityName(location.name, 107455); + if (location && location.kind === 249) { + return resolveEntityName(location.name, 107455 | 8388608); } return undefined; } + function getExportSpecifierLocalTargetSymbol(node) { + return node.parent.parent.moduleSpecifier ? + getExternalModuleMember(node.parent.parent, node) : + resolveEntityName(node.propertyName || node.name, 107455 | 793056 | 1536 | 8388608); + } function getTypeOfNode(node) { if (isInsideWithStatementBody(node)) { return unknownType; @@ -23173,9 +23461,9 @@ var ts; function getRootSymbols(symbol) { if (symbol.flags & 268435456) { var symbols = []; - var name_15 = symbol.name; + var name_18 = symbol.name; ts.forEach(getSymbolLinks(symbol).containingType.types, function (t) { - var symbol = getPropertyOfType(t, name_15); + var symbol = getPropertyOfType(t, name_18); if (symbol) { symbols.push(symbol); } @@ -23224,11 +23512,11 @@ var ts; } var parentSymbol = getParentOfSymbol(symbol); if (parentSymbol) { - if (parentSymbol.flags & 512 && parentSymbol.valueDeclaration.kind === 250) { + if (parentSymbol.flags & 512 && parentSymbol.valueDeclaration.kind === 251) { return parentSymbol.valueDeclaration; } for (var n = node.parent; n; n = n.parent) { - if ((n.kind === 220 || n.kind === 219) && getSymbolOfNode(n) === parentSymbol) { + if ((n.kind === 221 || n.kind === 220) && getSymbolOfNode(n) === parentSymbol) { return n; } } @@ -23241,11 +23529,11 @@ var ts; } function isStatementWithLocals(node) { switch (node.kind) { - case 194: - case 222: - case 201: + case 195: + case 223: case 202: case 203: + case 204: return true; } return false; @@ -23271,22 +23559,22 @@ var ts; } function isValueAliasDeclaration(node) { switch (node.kind) { - case 223: - case 225: + case 224: case 226: - case 228: - case 232: + case 227: + case 229: + case 233: return isAliasResolvedToValue(getSymbolOfNode(node)); - case 230: + case 231: var exportClause = node.exportClause; return exportClause && ts.forEach(exportClause.elements, isValueAliasDeclaration); - case 229: + case 230: return node.expression && node.expression.kind === 69 ? isAliasResolvedToValue(getSymbolOfNode(node)) : true; } return false; } function isTopLevelValueImportEqualsWithEntityName(node) { - if (node.parent.kind !== 250 || !ts.isInternalModuleImportEqualsDeclaration(node)) { + if (node.parent.kind !== 251 || !ts.isInternalModuleImportEqualsDeclaration(node)) { return false; } var isValue = isAliasResolvedToValue(getSymbolOfNode(node)); @@ -23334,7 +23622,7 @@ var ts; return getNodeLinks(node).enumMemberValue; } function getConstantValue(node) { - if (node.kind === 249) { + if (node.kind === 250) { return getEnumMemberValue(node); } var symbol = getNodeLinks(node).resolvedSymbol; @@ -23450,21 +23738,34 @@ var ts; } function getExternalModuleFileFromDeclaration(declaration) { var specifier = ts.getExternalModuleName(declaration); - var moduleSymbol = getSymbolAtLocation(specifier); + var moduleSymbol = resolveExternalModuleNameWorker(specifier, specifier, undefined); if (!moduleSymbol) { return undefined; } - return ts.getDeclarationOfKind(moduleSymbol, 250); + return ts.getDeclarationOfKind(moduleSymbol, 251); } function initializeTypeChecker() { ts.forEach(host.getSourceFiles(), function (file) { ts.bindSourceFile(file, compilerOptions); }); + var augmentations; ts.forEach(host.getSourceFiles(), function (file) { if (!ts.isExternalOrCommonJsModule(file)) { mergeSymbolTable(globals, file.locals); } + if (file.moduleAugmentations) { + (augmentations || (augmentations = [])).push(file.moduleAugmentations); + } }); + if (augmentations) { + for (var _i = 0, augmentations_1 = augmentations; _i < augmentations_1.length; _i++) { + var list = augmentations_1[_i]; + for (var _a = 0, list_2 = list; _a < list_2.length; _a++) { + var augmentation = list_2[_a]; + mergeModuleAugmentation(augmentation); + } + } + } addToSymbolTable(globals, builtinGlobals, ts.Diagnostics.Declaration_name_conflicts_with_built_in_global_identifier_0); getSymbolLinks(undefinedSymbol).type = undefinedType; getSymbolLinks(argumentsSymbol).type = getGlobalType("IArguments"); @@ -23529,14 +23830,14 @@ var ts; return false; } if (!ts.nodeCanBeDecorated(node)) { - if (node.kind === 143 && !ts.nodeIsPresent(node.body)) { + if (node.kind === 144 && !ts.nodeIsPresent(node.body)) { return grammarErrorOnFirstToken(node, ts.Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload); } else { return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_are_not_valid_here); } } - else if (node.kind === 145 || node.kind === 146) { + else if (node.kind === 146 || node.kind === 147) { var accessors = ts.getAllAccessorDeclarations(node.parent.members, node); if (accessors.firstAccessor.decorators && node === accessors.secondAccessor) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); @@ -23546,38 +23847,38 @@ var ts; } function checkGrammarModifiers(node) { switch (node.kind) { - case 145: case 146: - case 144: - case 141: - case 140: - case 143: + case 147: + case 145: case 142: - case 149: - case 220: + case 141: + case 144: + case 143: + case 150: + case 221: + case 225: case 224: - case 223: + case 231: case 230: - case 229: - case 138: - break; - case 215: - if (node.modifiers && (node.modifiers.length > 1 || node.modifiers[0].kind !== 118) && - node.parent.kind !== 221 && node.parent.kind !== 250) { - return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); - } + case 139: break; case 216: - case 217: - case 195: - case 218: - if (node.modifiers && node.parent.kind !== 221 && node.parent.kind !== 250) { + if (node.modifiers && (node.modifiers.length > 1 || node.modifiers[0].kind !== 118) && + node.parent.kind !== 222 && node.parent.kind !== 251) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); } break; + case 217: + case 218: + case 196: case 219: + if (node.modifiers && node.parent.kind !== 222 && node.parent.kind !== 251) { + return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); + } + break; + case 220: if (node.modifiers && (node.modifiers.length > 1 || node.modifiers[0].kind !== 74) && - node.parent.kind !== 221 && node.parent.kind !== 250) { + node.parent.kind !== 222 && node.parent.kind !== 251) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); } break; @@ -23593,7 +23894,7 @@ var ts; var modifier = _a[_i]; switch (modifier.kind) { case 74: - if (node.kind !== 219 && node.parent.kind === 216) { + if (node.kind !== 220 && node.parent.kind === 217) { return grammarErrorOnNode(node, ts.Diagnostics.A_class_member_cannot_have_the_0_keyword, ts.tokenToString(74)); } break; @@ -23621,7 +23922,7 @@ var ts; else if (flags & 256) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "async"); } - else if (node.parent.kind === 221 || node.parent.kind === 250) { + else if (node.parent.kind === 222 || node.parent.kind === 251) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_element, text); } else if (flags & 128) { @@ -23641,10 +23942,10 @@ var ts; else if (flags & 256) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "static", "async"); } - else if (node.parent.kind === 221 || node.parent.kind === 250) { + else if (node.parent.kind === 222 || node.parent.kind === 251) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_element, "static"); } - else if (node.kind === 138) { + else if (node.kind === 139) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static"); } else if (flags & 128) { @@ -23666,10 +23967,10 @@ var ts; else if (flags & 256) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "export", "async"); } - else if (node.parent.kind === 216) { + else if (node.parent.kind === 217) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "export"); } - else if (node.kind === 138) { + else if (node.kind === 139) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export"); } flags |= 2; @@ -23681,13 +23982,13 @@ var ts; else if (flags & 256) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); } - else if (node.parent.kind === 216) { + else if (node.parent.kind === 217) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "declare"); } - else if (node.kind === 138) { + else if (node.kind === 139) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare"); } - else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 221) { + else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 222) { return grammarErrorOnNode(modifier, ts.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } flags |= 4; @@ -23697,11 +23998,11 @@ var ts; if (flags & 128) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "abstract"); } - if (node.kind !== 216) { - if (node.kind !== 143) { + if (node.kind !== 217) { + if (node.kind !== 144) { return grammarErrorOnNode(modifier, ts.Diagnostics.abstract_modifier_can_only_appear_on_a_class_or_method_declaration); } - if (!(node.parent.kind === 216 && node.parent.flags & 128)) { + if (!(node.parent.kind === 217 && node.parent.flags & 128)) { return grammarErrorOnNode(modifier, ts.Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class); } if (flags & 64) { @@ -23720,7 +24021,7 @@ var ts; else if (flags & 4 || ts.isInAmbientContext(node.parent)) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); } - else if (node.kind === 138) { + else if (node.kind === 139) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); } flags |= 256; @@ -23728,7 +24029,7 @@ var ts; break; } } - if (node.kind === 144) { + if (node.kind === 145) { if (flags & 64) { return grammarErrorOnNode(lastStatic, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); } @@ -23746,10 +24047,10 @@ var ts; } return; } - else if ((node.kind === 224 || node.kind === 223) && flags & 4) { + else if ((node.kind === 225 || node.kind === 224) && flags & 4) { return grammarErrorOnNode(lastDeclare, ts.Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); } - else if (node.kind === 138 && (flags & 56) && ts.isBindingPattern(node.name)) { + else if (node.kind === 139 && (flags & 56) && ts.isBindingPattern(node.name)) { return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_may_not_be_a_binding_pattern); } if (flags & 256) { @@ -23761,10 +24062,10 @@ var ts; return grammarErrorOnNode(asyncModifier, ts.Diagnostics.Async_functions_are_only_available_when_targeting_ECMAScript_6_and_higher); } switch (node.kind) { - case 143: - case 215: - case 175: + case 144: + case 216: case 176: + case 177: if (!node.asteriskToken) { return false; } @@ -23829,7 +24130,7 @@ var ts; checkGrammarParameterList(node.parameters) || checkGrammarArrowFunction(node, file); } function checkGrammarArrowFunction(node, file) { - if (node.kind === 176) { + if (node.kind === 177) { var arrowFunction = node; var startLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.pos).line; var endLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.end).line; @@ -23896,7 +24197,7 @@ var ts; var sourceFile = ts.getSourceFileOfNode(node); for (var _i = 0, args_1 = args; _i < args_1.length; _i++) { var arg = args_1[_i]; - if (arg.kind === 189) { + if (arg.kind === 190) { return grammarErrorAtPos(sourceFile, arg.pos, 0, ts.Diagnostics.Argument_expression_expected); } } @@ -23967,19 +24268,19 @@ var ts; return false; } function checkGrammarComputedPropertyName(node) { - if (node.kind !== 136) { + if (node.kind !== 137) { return false; } var computedPropertyName = node; - if (computedPropertyName.expression.kind === 183 && computedPropertyName.expression.operatorToken.kind === 24) { + if (computedPropertyName.expression.kind === 184 && computedPropertyName.expression.operatorToken.kind === 24) { return grammarErrorOnNode(computedPropertyName.expression, ts.Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name); } } function checkGrammarForGenerator(node) { if (node.asteriskToken) { - ts.Debug.assert(node.kind === 215 || - node.kind === 175 || - node.kind === 143); + ts.Debug.assert(node.kind === 216 || + node.kind === 176 || + node.kind === 144); if (ts.isInAmbientContext(node)) { return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_not_allowed_in_an_ambient_context); } @@ -24003,58 +24304,58 @@ var ts; var SetAccesor = 4; var GetOrSetAccessor = GetAccessor | SetAccesor; var _loop_1 = function(prop) { - var name_16 = prop.name; - if (prop.kind === 189 || - name_16.kind === 136) { - checkGrammarComputedPropertyName(name_16); + var name_19 = prop.name; + if (prop.kind === 190 || + name_19.kind === 137) { + checkGrammarComputedPropertyName(name_19); return "continue"; } - if (prop.kind === 248 && !inDestructuring && prop.objectAssignmentInitializer) { + if (prop.kind === 249 && !inDestructuring && prop.objectAssignmentInitializer) { return { value: grammarErrorOnNode(prop.equalsToken, ts.Diagnostics.can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment) }; } ts.forEach(prop.modifiers, function (mod) { - if (mod.kind !== 118 || prop.kind !== 143) { + if (mod.kind !== 118 || prop.kind !== 144) { grammarErrorOnNode(mod, ts.Diagnostics._0_modifier_cannot_be_used_here, ts.getTextOfNode(mod)); } }); var currentKind = void 0; - if (prop.kind === 247 || prop.kind === 248) { + if (prop.kind === 248 || prop.kind === 249) { checkGrammarForInvalidQuestionMark(prop, prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional); - if (name_16.kind === 8) { - checkGrammarNumericLiteral(name_16); + if (name_19.kind === 8) { + checkGrammarNumericLiteral(name_19); } currentKind = Property; } - else if (prop.kind === 143) { + else if (prop.kind === 144) { currentKind = Property; } - else if (prop.kind === 145) { + else if (prop.kind === 146) { currentKind = GetAccessor; } - else if (prop.kind === 146) { + else if (prop.kind === 147) { currentKind = SetAccesor; } else { ts.Debug.fail("Unexpected syntax kind:" + prop.kind); } - if (!ts.hasProperty(seen, name_16.text)) { - seen[name_16.text] = currentKind; + if (!ts.hasProperty(seen, name_19.text)) { + seen[name_19.text] = currentKind; } else { - var existingKind = seen[name_16.text]; + var existingKind = seen[name_19.text]; if (currentKind === Property && existingKind === Property) { return "continue"; } else if ((currentKind & GetOrSetAccessor) && (existingKind & GetOrSetAccessor)) { if (existingKind !== GetOrSetAccessor && currentKind !== existingKind) { - seen[name_16.text] = currentKind | existingKind; + seen[name_19.text] = currentKind | existingKind; } else { - return { value: grammarErrorOnNode(name_16, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name) }; + return { value: grammarErrorOnNode(name_19, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name) }; } } else { - return { value: grammarErrorOnNode(name_16, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name) }; + return { value: grammarErrorOnNode(name_19, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name) }; } } }; @@ -24069,19 +24370,19 @@ var ts; var seen = {}; for (var _i = 0, _a = node.attributes; _i < _a.length; _i++) { var attr = _a[_i]; - if (attr.kind === 241) { + if (attr.kind === 242) { continue; } var jsxAttr = attr; - var name_17 = jsxAttr.name; - if (!ts.hasProperty(seen, name_17.text)) { - seen[name_17.text] = true; + var name_20 = jsxAttr.name; + if (!ts.hasProperty(seen, name_20.text)) { + seen[name_20.text] = true; } else { - return grammarErrorOnNode(name_17, ts.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); + return grammarErrorOnNode(name_20, ts.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); } var initializer = jsxAttr.initializer; - if (initializer && initializer.kind === 242 && !initializer.expression) { + if (initializer && initializer.kind === 243 && !initializer.expression) { return grammarErrorOnNode(jsxAttr.initializer, ts.Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression); } } @@ -24090,7 +24391,7 @@ var ts; if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) { return true; } - if (forInOrOfStatement.initializer.kind === 214) { + if (forInOrOfStatement.initializer.kind === 215) { var variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { var declarations = variableList.declarations; @@ -24098,20 +24399,20 @@ var ts; return false; } if (declarations.length > 1) { - var diagnostic = forInOrOfStatement.kind === 202 + var diagnostic = forInOrOfStatement.kind === 203 ? ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic); } var firstDeclaration = declarations[0]; if (firstDeclaration.initializer) { - var diagnostic = forInOrOfStatement.kind === 202 + var diagnostic = forInOrOfStatement.kind === 203 ? ts.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : ts.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; return grammarErrorOnNode(firstDeclaration.name, diagnostic); } if (firstDeclaration.type) { - var diagnostic = forInOrOfStatement.kind === 202 + var diagnostic = forInOrOfStatement.kind === 203 ? ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; return grammarErrorOnNode(firstDeclaration, diagnostic); @@ -24134,10 +24435,10 @@ var ts; else if (accessor.typeParameters) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.An_accessor_cannot_have_type_parameters); } - else if (kind === 145 && accessor.parameters.length) { + else if (kind === 146 && accessor.parameters.length) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_get_accessor_cannot_have_parameters); } - else if (kind === 146) { + else if (kind === 147) { if (accessor.type) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } @@ -24172,12 +24473,12 @@ var ts; checkGrammarForGenerator(node)) { return true; } - if (node.parent.kind === 167) { + if (node.parent.kind === 168) { if (checkGrammarForInvalidQuestionMark(node, node.questionToken, ts.Diagnostics.A_class_member_cannot_be_declared_optional)) { return true; } else if (node.body === undefined) { - return grammarErrorAtPos(getSourceFile(node), node.end - 1, ";".length, ts.Diagnostics._0_expected, "{"); + return grammarErrorAtPos(ts.getSourceFileOfNode(node), node.end - 1, ";".length, ts.Diagnostics._0_expected, "{"); } } if (ts.isClassLike(node.parent)) { @@ -24191,10 +24492,10 @@ var ts; return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol); } } - else if (node.parent.kind === 217) { + else if (node.parent.kind === 218) { return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol); } - else if (node.parent.kind === 155) { + else if (node.parent.kind === 156) { return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol); } } @@ -24205,9 +24506,9 @@ var ts; return grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary); } switch (current.kind) { - case 209: + case 210: if (node.label && current.label.text === node.label.text) { - var isMisplacedContinueLabel = node.kind === 204 + var isMisplacedContinueLabel = node.kind === 205 && !ts.isIterationStatement(current.statement, true); if (isMisplacedContinueLabel) { return grammarErrorOnNode(node, ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement); @@ -24215,8 +24516,8 @@ var ts; return false; } break; - case 208: - if (node.kind === 205 && !node.label) { + case 209: + if (node.kind === 206 && !node.label) { return false; } break; @@ -24229,13 +24530,13 @@ var ts; current = current.parent; } if (node.label) { - var message = node.kind === 205 + var message = node.kind === 206 ? ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } else { - var message = node.kind === 205 + var message = node.kind === 206 ? ts.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : ts.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); @@ -24247,7 +24548,7 @@ var ts; if (node !== ts.lastOrUndefined(elements)) { return grammarErrorOnNode(node, ts.Diagnostics.A_rest_element_must_be_last_in_an_array_destructuring_pattern); } - if (node.name.kind === 164 || node.name.kind === 163) { + if (node.name.kind === 165 || node.name.kind === 164) { return grammarErrorOnNode(node.name, ts.Diagnostics.A_rest_element_cannot_contain_a_binding_pattern); } if (node.initializer) { @@ -24256,7 +24557,7 @@ var ts; } } function checkGrammarVariableDeclaration(node) { - if (node.parent.parent.kind !== 202 && node.parent.parent.kind !== 203) { + if (node.parent.parent.kind !== 203 && node.parent.parent.kind !== 204) { if (ts.isInAmbientContext(node)) { if (node.initializer) { var equalsTokenLength = "=".length; @@ -24285,7 +24586,7 @@ var ts; var elements = name.elements; for (var _i = 0, elements_2 = elements; _i < elements_2.length; _i++) { var element = elements_2[_i]; - if (element.kind !== 189) { + if (element.kind !== 190) { checkGrammarNameInLetOrConstDeclarations(element.name); } } @@ -24302,15 +24603,15 @@ var ts; } function allowLetAndConstDeclarations(parent) { switch (parent.kind) { - case 198: case 199: case 200: - case 207: case 201: + case 208: case 202: case 203: + case 204: return false; - case 209: + case 210: return allowLetAndConstDeclarations(parent.parent); } return true; @@ -24366,7 +24667,7 @@ var ts; return true; } } - else if (node.parent.kind === 217) { + else if (node.parent.kind === 218) { if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol)) { return true; } @@ -24374,7 +24675,7 @@ var ts; return grammarErrorOnNode(node.initializer, ts.Diagnostics.An_interface_property_cannot_have_an_initializer); } } - else if (node.parent.kind === 155) { + else if (node.parent.kind === 156) { if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol)) { return true; } @@ -24387,12 +24688,12 @@ var ts; } } function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { - if (node.kind === 217 || - node.kind === 218 || + if (node.kind === 218 || + node.kind === 219 || + node.kind === 225 || node.kind === 224 || - node.kind === 223 || + node.kind === 231 || node.kind === 230 || - node.kind === 229 || (node.flags & 4) || (node.flags & (2 | 512))) { return false; @@ -24402,7 +24703,7 @@ var ts; function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) { for (var _i = 0, _a = file.statements; _i < _a.length; _i++) { var decl = _a[_i]; - if (ts.isDeclaration(decl) || decl.kind === 195) { + if (ts.isDeclaration(decl) || decl.kind === 196) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; } @@ -24421,7 +24722,7 @@ var ts; if (!links.hasReportedStatementInAmbientContext && ts.isFunctionLike(node.parent)) { return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } - if (node.parent.kind === 194 || node.parent.kind === 221 || node.parent.kind === 250) { + if (node.parent.kind === 195 || node.parent.kind === 222 || node.parent.kind === 251) { var links_1 = getNodeLinks(node.parent); if (!links_1.hasReportedStatementInAmbientContext) { return links_1.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); @@ -24457,8 +24758,9 @@ var ts; getSourceMapData: function () { return undefined; }, setSourceFile: function (sourceFile) { }, emitStart: function (range) { }, - emitEnd: function (range) { }, + emitEnd: function (range, stopOverridingSpan) { }, emitPos: function (pos) { }, + changeEmitSourcePos: function () { }, getText: function () { return undefined; }, getSourceMappingURL: function () { return undefined; }, initialize: function (filePath, sourceMapFilePath, sourceFiles, isBundledEmit) { }, @@ -24472,6 +24774,8 @@ var ts; var compilerOptions = host.getCompilerOptions(); var currentSourceFile; var sourceMapDir; + var stopOverridingSpan = false; + var modifyLastSourcePos = false; var sourceMapSourceIndex; var lastRecordedSourceMapSpan; var lastEncodedSourceMapSpan; @@ -24483,6 +24787,7 @@ var ts; emitPos: emitPos, emitStart: emitStart, emitEnd: emitEnd, + changeEmitSourcePos: changeEmitSourcePos, getText: getText, getSourceMappingURL: getSourceMappingURL, initialize: initialize, @@ -24546,6 +24851,29 @@ var ts; lastEncodedNameIndex = undefined; sourceMapData = undefined; } + function updateLastEncodedAndRecordedSpans() { + if (modifyLastSourcePos) { + modifyLastSourcePos = false; + lastRecordedSourceMapSpan.emittedLine = lastEncodedSourceMapSpan.emittedLine; + lastRecordedSourceMapSpan.emittedColumn = lastEncodedSourceMapSpan.emittedColumn; + sourceMapData.sourceMapDecodedMappings.pop(); + lastEncodedSourceMapSpan = sourceMapData.sourceMapDecodedMappings.length ? + sourceMapData.sourceMapDecodedMappings[sourceMapData.sourceMapDecodedMappings.length - 1] : + undefined; + var sourceMapMappings = sourceMapData.sourceMapMappings; + var lenthToSet = sourceMapMappings.length - 1; + for (; lenthToSet >= 0; lenthToSet--) { + var currentChar = sourceMapMappings.charAt(lenthToSet); + if (currentChar === ",") { + break; + } + if (currentChar === ";" && lenthToSet !== 0 && sourceMapMappings.charAt(lenthToSet - 1) !== ";") { + break; + } + } + sourceMapData.sourceMapMappings = sourceMapMappings.substr(0, Math.max(0, lenthToSet)); + } + } function encodeLastRecordedSourceMapSpan() { if (!lastRecordedSourceMapSpan || lastRecordedSourceMapSpan === lastEncodedSourceMapSpan) { return; @@ -24567,6 +24895,7 @@ var ts; sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.sourceLine - lastEncodedSourceMapSpan.sourceLine); sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.sourceColumn - lastEncodedSourceMapSpan.sourceColumn); if (lastRecordedSourceMapSpan.nameIndex >= 0) { + ts.Debug.assert(false, "We do not support name index right now, Make sure to update updateLastEncodedAndRecordedSpans when we start using this"); sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.nameIndex - lastEncodedNameIndex); lastEncodedNameIndex = lastRecordedSourceMapSpan.nameIndex; } @@ -24596,19 +24925,29 @@ var ts; sourceColumn: sourceLinePos.character, sourceIndex: sourceMapSourceIndex }; + stopOverridingSpan = false; } - else { + else if (!stopOverridingSpan) { lastRecordedSourceMapSpan.sourceLine = sourceLinePos.line; lastRecordedSourceMapSpan.sourceColumn = sourceLinePos.character; lastRecordedSourceMapSpan.sourceIndex = sourceMapSourceIndex; } + updateLastEncodedAndRecordedSpans(); + } + function getStartPos(range) { + var rangeHasDecorators = !!range.decorators; + return range.pos !== -1 ? ts.skipTrivia(currentSourceFile.text, rangeHasDecorators ? range.decorators.end : range.pos) : -1; } function emitStart(range) { - var rangeHasDecorators = !!range.decorators; - emitPos(range.pos !== -1 ? ts.skipTrivia(currentSourceFile.text, rangeHasDecorators ? range.decorators.end : range.pos) : -1); + emitPos(getStartPos(range)); } - function emitEnd(range) { + function emitEnd(range, stopOverridingEnd) { emitPos(range.end); + stopOverridingSpan = stopOverridingEnd; + } + function changeEmitSourcePos() { + ts.Debug.assert(!modifyLastSourcePos); + modifyLastSourcePos = true; } function setSourceFile(sourceFile) { currentSourceFile = sourceFile; @@ -24695,6 +25034,7 @@ var ts; var writeTextOfNode; var writer = createAndSetNewTextWriterWithSymbolWriter(); var enclosingDeclaration; + var resultHasExternalModuleIndicator; var currentText; var currentLineMap; var currentIdentifiers; @@ -24725,6 +25065,7 @@ var ts; } }); } + resultHasExternalModuleIndicator = false; if (!isBundledEmit || !ts.isExternalModule(sourceFile)) { noDeclare = false; emitSourceFile(sourceFile); @@ -24743,7 +25084,7 @@ var ts; var oldWriter = writer; ts.forEach(moduleElementDeclarationEmitInfo, function (aliasEmitInfo) { if (aliasEmitInfo.isVisible && !aliasEmitInfo.asynchronousOutput) { - ts.Debug.assert(aliasEmitInfo.node.kind === 224); + ts.Debug.assert(aliasEmitInfo.node.kind === 225); createAndSetNewTextWriterWithSymbolWriter(); ts.Debug.assert(aliasEmitInfo.indent === 0 || (aliasEmitInfo.indent === 1 && isBundledEmit)); for (var i = 0; i < aliasEmitInfo.indent; i++) { @@ -24760,6 +25101,10 @@ var ts; allSourcesModuleElementDeclarationEmitInfo = allSourcesModuleElementDeclarationEmitInfo.concat(moduleElementDeclarationEmitInfo); moduleElementDeclarationEmitInfo = []; } + if (!isBundledEmit && ts.isExternalModule(sourceFile) && sourceFile.moduleAugmentations.length && !resultHasExternalModuleIndicator) { + write("export {};"); + writeLine(); + } }); return { reportedDeclarationError: reportedDeclarationError, @@ -24806,10 +25151,10 @@ var ts; var oldWriter = writer; ts.forEach(nodes, function (declaration) { var nodeToCheck; - if (declaration.kind === 213) { + if (declaration.kind === 214) { nodeToCheck = declaration.parent.parent; } - else if (declaration.kind === 227 || declaration.kind === 228 || declaration.kind === 225) { + else if (declaration.kind === 228 || declaration.kind === 229 || declaration.kind === 226) { ts.Debug.fail("We should be getting ImportDeclaration instead to write"); } else { @@ -24820,7 +25165,7 @@ var ts; moduleElementEmitInfo = ts.forEach(asynchronousSubModuleDeclarationEmitInfo, function (declEmitInfo) { return declEmitInfo.node === nodeToCheck ? declEmitInfo : undefined; }); } if (moduleElementEmitInfo) { - if (moduleElementEmitInfo.node.kind === 224) { + if (moduleElementEmitInfo.node.kind === 225) { moduleElementEmitInfo.isVisible = true; } else { @@ -24828,12 +25173,12 @@ var ts; for (var declarationIndent = moduleElementEmitInfo.indent; declarationIndent; declarationIndent--) { increaseIndent(); } - if (nodeToCheck.kind === 220) { + if (nodeToCheck.kind === 221) { ts.Debug.assert(asynchronousSubModuleDeclarationEmitInfo === undefined); asynchronousSubModuleDeclarationEmitInfo = []; } writeModuleElement(nodeToCheck); - if (nodeToCheck.kind === 220) { + if (nodeToCheck.kind === 221) { moduleElementEmitInfo.subModuleElementDeclarationEmitInfo = asynchronousSubModuleDeclarationEmitInfo; asynchronousSubModuleDeclarationEmitInfo = undefined; } @@ -24936,35 +25281,35 @@ var ts; case 120: case 131: case 103: - case 161: case 162: + case 163: return writeTextOfNode(currentText, type); - case 190: + case 191: return emitExpressionWithTypeArguments(type); - case 151: - return emitTypeReference(type); - case 154: - return emitTypeQuery(type); - case 156: - return emitArrayType(type); - case 157: - return emitTupleType(type); - case 158: - return emitUnionType(type); - case 159: - return emitIntersectionType(type); - case 160: - return emitParenType(type); case 152: - case 153: - return emitSignatureDeclarationWithJsDocComments(type); + return emitTypeReference(type); case 155: + return emitTypeQuery(type); + case 157: + return emitArrayType(type); + case 158: + return emitTupleType(type); + case 159: + return emitUnionType(type); + case 160: + return emitIntersectionType(type); + case 161: + return emitParenType(type); + case 153: + case 154: + return emitSignatureDeclarationWithJsDocComments(type); + case 156: return emitTypeLiteral(type); case 69: return emitEntityName(type); - case 135: + case 136: return emitEntityName(type); - case 150: + case 151: return emitTypePredicate(type); } function writeEntityName(entityName) { @@ -24972,21 +25317,21 @@ var ts; writeTextOfNode(currentText, entityName); } else { - var left = entityName.kind === 135 ? entityName.left : entityName.expression; - var right = entityName.kind === 135 ? entityName.right : entityName.name; + var left = entityName.kind === 136 ? entityName.left : entityName.expression; + var right = entityName.kind === 136 ? entityName.right : entityName.name; writeEntityName(left); write("."); writeTextOfNode(currentText, right); } } function emitEntityName(entityName) { - var visibilityResult = resolver.isEntityNameVisible(entityName, entityName.parent.kind === 223 ? entityName.parent : enclosingDeclaration); + var visibilityResult = resolver.isEntityNameVisible(entityName, entityName.parent.kind === 224 ? entityName.parent : enclosingDeclaration); handleSymbolAccessibilityError(visibilityResult); writeEntityName(entityName); } function emitExpressionWithTypeArguments(node) { if (ts.isSupportedExpressionWithTypeArguments(node)) { - ts.Debug.assert(node.expression.kind === 69 || node.expression.kind === 168); + ts.Debug.assert(node.expression.kind === 69 || node.expression.kind === 169); emitEntityName(node.expression); if (node.typeArguments) { write("<"); @@ -25060,9 +25405,9 @@ var ts; var count = 0; while (true) { count++; - var name_18 = baseName + "_" + count; - if (!ts.hasProperty(currentIdentifiers, name_18)) { - return name_18; + var name_21 = baseName + "_" + count; + if (!ts.hasProperty(currentIdentifiers, name_21)) { + return name_21; } } } @@ -25103,10 +25448,10 @@ var ts; if (isModuleElementVisible) { writeModuleElement(node); } - else if (node.kind === 223 || - (node.parent.kind === 250 && isCurrentFileExternalModule)) { + else if (node.kind === 224 || + (node.parent.kind === 251 && isCurrentFileExternalModule)) { var isVisible; - if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 250) { + if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 251) { asynchronousSubModuleDeclarationEmitInfo.push({ node: node, outputPos: writer.getTextPos(), @@ -25115,7 +25460,7 @@ var ts; }); } else { - if (node.kind === 224) { + if (node.kind === 225) { var importDeclaration = node; if (importDeclaration.importClause) { isVisible = (importDeclaration.importClause.name && resolver.isDeclarationVisible(importDeclaration.importClause)) || @@ -25133,37 +25478,37 @@ var ts; } function writeModuleElement(node) { switch (node.kind) { - case 215: - return writeFunctionDeclaration(node); - case 195: - return writeVariableStatement(node); - case 217: - return writeInterfaceDeclaration(node); case 216: - return writeClassDeclaration(node); + return writeFunctionDeclaration(node); + case 196: + return writeVariableStatement(node); case 218: - return writeTypeAliasDeclaration(node); + return writeInterfaceDeclaration(node); + case 217: + return writeClassDeclaration(node); case 219: - return writeEnumDeclaration(node); + return writeTypeAliasDeclaration(node); case 220: + return writeEnumDeclaration(node); + case 221: return writeModuleDeclaration(node); - case 223: - return writeImportEqualsDeclaration(node); case 224: + return writeImportEqualsDeclaration(node); + case 225: return writeImportDeclaration(node); default: ts.Debug.fail("Unknown symbol kind"); } } function emitModuleElementDeclarationFlags(node) { - if (node.parent.kind === 250) { + if (node.parent.kind === 251) { if (node.flags & 2) { write("export "); } if (node.flags & 512) { write("default "); } - else if (node.kind !== 217 && !noDeclare) { + else if (node.kind !== 218 && !noDeclare) { write("declare "); } } @@ -25210,7 +25555,7 @@ var ts; } function isVisibleNamedBinding(namedBindings) { if (namedBindings) { - if (namedBindings.kind === 226) { + if (namedBindings.kind === 227) { return resolver.isDeclarationVisible(namedBindings); } else { @@ -25236,7 +25581,7 @@ var ts; if (currentWriterPos !== writer.getTextPos()) { write(", "); } - if (node.importClause.namedBindings.kind === 226) { + if (node.importClause.namedBindings.kind === 227) { write("* as "); writeTextOfNode(currentText, node.importClause.namedBindings.name); } @@ -25253,11 +25598,15 @@ var ts; writer.writeLine(); } function emitExternalModuleSpecifier(parent) { + resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 221; var moduleSpecifier; - if (parent.kind === 223) { + if (parent.kind === 224) { var node = parent; moduleSpecifier = ts.getExternalModuleImportEqualsDeclarationExpression(node); } + else if (parent.kind === 221) { + moduleSpecifier = parent.name; + } else { var node = parent; moduleSpecifier = node.moduleSpecifier; @@ -25306,14 +25655,24 @@ var ts; function writeModuleDeclaration(node) { emitJsDocComments(node); emitModuleElementDeclarationFlags(node); - if (node.flags & 65536) { - write("namespace "); + if (ts.isGlobalScopeAugmentation(node)) { + write("global "); } else { - write("module "); + if (node.flags & 65536) { + write("namespace "); + } + else { + write("module "); + } + if (ts.isExternalModuleAugmentation(node)) { + emitExternalModuleSpecifier(node); + } + else { + writeTextOfNode(currentText, node.name); + } } - writeTextOfNode(currentText, node.name); - while (node.body.kind !== 221) { + while (node.body.kind !== 222) { node = node.body; write("."); writeTextOfNode(currentText, node.name); @@ -25378,7 +25737,7 @@ var ts; writeLine(); } function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 143 && (node.parent.flags & 16); + return node.parent.kind === 144 && (node.parent.flags & 16); } function emitTypeParameters(typeParameters) { function emitTypeParameter(node) { @@ -25388,15 +25747,15 @@ var ts; writeTextOfNode(currentText, node.name); if (node.constraint && !isPrivateMethodTypeParameter(node)) { write(" extends "); - if (node.parent.kind === 152 || - node.parent.kind === 153 || - (node.parent.parent && node.parent.parent.kind === 155)) { - ts.Debug.assert(node.parent.kind === 143 || - node.parent.kind === 142 || - node.parent.kind === 152 || + if (node.parent.kind === 153 || + node.parent.kind === 154 || + (node.parent.parent && node.parent.parent.kind === 156)) { + ts.Debug.assert(node.parent.kind === 144 || + node.parent.kind === 143 || node.parent.kind === 153 || - node.parent.kind === 147 || - node.parent.kind === 148); + node.parent.kind === 154 || + node.parent.kind === 148 || + node.parent.kind === 149); emitType(node.constraint); } else { @@ -25406,31 +25765,31 @@ var ts; function getTypeParameterConstraintVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; switch (node.parent.kind) { - case 216: + case 217: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; break; - case 217: + case 218: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; break; - case 148: + case 149: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 147: + case 148: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; break; + case 144: case 143: - case 142: if (node.parent.flags & 64) { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.parent.kind === 216) { + else if (node.parent.parent.kind === 217) { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } break; - case 215: + case 216: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; break; default: @@ -25463,7 +25822,7 @@ var ts; } function getHeritageClauseVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; - if (node.parent.parent.kind === 216) { + if (node.parent.parent.kind === 217) { diagnosticMessage = isImplementsList ? ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : ts.Diagnostics.Extends_clause_of_exported_class_0_has_or_is_using_private_name_1; @@ -25543,16 +25902,16 @@ var ts; writeLine(); } function emitVariableDeclaration(node) { - if (node.kind !== 213 || resolver.isDeclarationVisible(node)) { + if (node.kind !== 214 || resolver.isDeclarationVisible(node)) { if (ts.isBindingPattern(node.name)) { emitBindingPattern(node.name); } else { writeTextOfNode(currentText, node.name); - if ((node.kind === 141 || node.kind === 140) && ts.hasQuestionToken(node)) { + if ((node.kind === 142 || node.kind === 141) && ts.hasQuestionToken(node)) { write("?"); } - if ((node.kind === 141 || node.kind === 140) && node.parent.kind === 155) { + if ((node.kind === 142 || node.kind === 141) && node.parent.kind === 156) { emitTypeOfVariableDeclarationFromTypeLiteral(node); } else if (!(node.flags & 16)) { @@ -25561,14 +25920,14 @@ var ts; } } function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult) { - if (node.kind === 213) { + if (node.kind === 214) { return symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; } - else if (node.kind === 141 || node.kind === 140) { + else if (node.kind === 142 || node.kind === 141) { if (node.flags & 64) { return symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? @@ -25576,7 +25935,7 @@ var ts; ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.kind === 216) { + else if (node.parent.kind === 217) { return symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : @@ -25602,7 +25961,7 @@ var ts; var elements = []; for (var _i = 0, _a = bindingPattern.elements; _i < _a.length; _i++) { var element = _a[_i]; - if (element.kind !== 189) { + if (element.kind !== 190) { elements.push(element); } } @@ -25668,7 +26027,7 @@ var ts; accessorWithTypeAnnotation = node; var type = getTypeAnnotationFromAccessor(node); if (!type) { - var anotherAccessor = node.kind === 145 ? accessors.setAccessor : accessors.getAccessor; + var anotherAccessor = node.kind === 146 ? accessors.setAccessor : accessors.getAccessor; type = getTypeAnnotationFromAccessor(anotherAccessor); if (type) { accessorWithTypeAnnotation = anotherAccessor; @@ -25681,7 +26040,7 @@ var ts; } function getTypeAnnotationFromAccessor(accessor) { if (accessor) { - return accessor.kind === 145 + return accessor.kind === 146 ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type @@ -25690,7 +26049,7 @@ var ts; } function getAccessorDeclarationTypeVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; - if (accessorWithTypeAnnotation.kind === 146) { + if (accessorWithTypeAnnotation.kind === 147) { if (accessorWithTypeAnnotation.parent.flags & 64) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 : @@ -25736,17 +26095,17 @@ var ts; } if (!resolver.isImplementationOfOverload(node)) { emitJsDocComments(node); - if (node.kind === 215) { + if (node.kind === 216) { emitModuleElementDeclarationFlags(node); } - else if (node.kind === 143) { + else if (node.kind === 144) { emitClassMemberDeclarationFlags(node); } - if (node.kind === 215) { + if (node.kind === 216) { write("function "); writeTextOfNode(currentText, node.name); } - else if (node.kind === 144) { + else if (node.kind === 145) { write("constructor"); } else { @@ -25765,31 +26124,31 @@ var ts; function emitSignatureDeclaration(node) { var prevEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = node; - if (node.kind === 148 || node.kind === 153) { + if (node.kind === 149 || node.kind === 154) { write("new "); } emitTypeParameters(node.typeParameters); - if (node.kind === 149) { + if (node.kind === 150) { write("["); } else { write("("); } emitCommaList(node.parameters, emitParameterDeclaration); - if (node.kind === 149) { + if (node.kind === 150) { write("]"); } else { write(")"); } - var isFunctionTypeOrConstructorType = node.kind === 152 || node.kind === 153; - if (isFunctionTypeOrConstructorType || node.parent.kind === 155) { + var isFunctionTypeOrConstructorType = node.kind === 153 || node.kind === 154; + if (isFunctionTypeOrConstructorType || node.parent.kind === 156) { if (node.type) { write(isFunctionTypeOrConstructorType ? " => " : ": "); emitType(node.type); } } - else if (node.kind !== 144 && !(node.flags & 16)) { + else if (node.kind !== 145 && !(node.flags & 16)) { writeReturnTypeAtSignature(node, getReturnTypeVisibilityError); } enclosingDeclaration = prevEnclosingDeclaration; @@ -25800,23 +26159,23 @@ var ts; function getReturnTypeVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; switch (node.kind) { - case 148: + case 149: diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 147: + case 148: diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 149: + case 150: diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; break; + case 144: case 143: - case 142: if (node.flags & 64) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? @@ -25824,7 +26183,7 @@ var ts; ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; } - else if (node.parent.kind === 216) { + else if (node.parent.kind === 217) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : @@ -25837,7 +26196,7 @@ var ts; ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; } break; - case 215: + case 216: diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : @@ -25869,9 +26228,9 @@ var ts; write("?"); } decreaseIndent(); - if (node.parent.kind === 152 || - node.parent.kind === 153 || - node.parent.parent.kind === 155) { + if (node.parent.kind === 153 || + node.parent.kind === 154 || + node.parent.parent.kind === 156) { emitTypeOfVariableDeclarationFromTypeLiteral(node); } else if (!(node.parent.flags & 16)) { @@ -25887,22 +26246,22 @@ var ts; } function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult) { switch (node.parent.kind) { - case 144: + case 145: return symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; - case 148: + case 149: return symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; - case 147: + case 148: return symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; + case 144: case 143: - case 142: if (node.parent.flags & 64) { return symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? @@ -25910,7 +26269,7 @@ var ts; ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.parent.kind === 216) { + else if (node.parent.parent.kind === 217) { return symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : @@ -25922,7 +26281,7 @@ var ts; ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } - case 215: + case 216: return symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 ? ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : @@ -25933,12 +26292,12 @@ var ts; } } function emitBindingPattern(bindingPattern) { - if (bindingPattern.kind === 163) { + if (bindingPattern.kind === 164) { write("{"); emitCommaList(bindingPattern.elements, emitBindingElement); write("}"); } - else if (bindingPattern.kind === 164) { + else if (bindingPattern.kind === 165) { write("["); var elements = bindingPattern.elements; emitCommaList(elements, emitBindingElement); @@ -25949,10 +26308,10 @@ var ts; } } function emitBindingElement(bindingElement) { - if (bindingElement.kind === 189) { + if (bindingElement.kind === 190) { write(" "); } - else if (bindingElement.kind === 165) { + else if (bindingElement.kind === 166) { if (bindingElement.propertyName) { writeTextOfNode(currentText, bindingElement.propertyName); write(": "); @@ -25974,39 +26333,39 @@ var ts; } function emitNode(node) { switch (node.kind) { - case 215: - case 220: - case 223: - case 217: case 216: - case 218: - case 219: - return emitModuleElement(node, isModuleElementVisible(node)); - case 195: - return emitModuleElement(node, isVariableStatementVisible(node)); + case 221: case 224: + case 218: + case 217: + case 219: + case 220: + return emitModuleElement(node, isModuleElementVisible(node)); + case 196: + return emitModuleElement(node, isVariableStatementVisible(node)); + case 225: return emitModuleElement(node, !node.importClause); - case 230: + case 231: return emitExportDeclaration(node); + case 145: case 144: case 143: - case 142: return writeFunctionDeclaration(node); - case 148: - case 147: case 149: + case 148: + case 150: return emitSignatureDeclarationWithJsDocComments(node); - case 145: case 146: + case 147: return emitAccessorDeclaration(node); + case 142: case 141: - case 140: return emitPropertyDeclaration(node); - case 249: - return emitEnumMemberDeclaration(node); - case 229: - return emitExportAssignment(node); case 250: + return emitEnumMemberDeclaration(node); + case 230: + return emitExportAssignment(node); + case 251: return emitSourceFile(node); } } @@ -26333,7 +26692,7 @@ var ts; var decorateHelper = "\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};"; var metadataHelper = "\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};"; var paramHelper = "\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};"; - var awaiterHelper = "\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) {\n return new Promise(function (resolve, reject) {\n generator = generator.call(thisArg, _arguments);\n function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); }\n function onfulfill(value) { try { step(\"next\", value); } catch (e) { reject(e); } }\n function onreject(value) { try { step(\"throw\", value); } catch (e) { reject(e); } }\n function step(verb, value) {\n var result = generator[verb](value);\n result.done ? resolve(result.value) : cast(result.value).then(onfulfill, onreject);\n }\n step(\"next\", void 0);\n });\n};"; + var awaiterHelper = "\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new P(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.call(thisArg, _arguments)).next());\n });\n};"; var compilerOptions = host.getCompilerOptions(); var languageVersion = ts.getEmitScriptTarget(compilerOptions); var modulekind = ts.getEmitModuleKind(compilerOptions); @@ -26421,6 +26780,7 @@ var ts; var sourceMapData; var isOwnFileEmit; var emitLeadingCommentsOfPosition = compilerOptions.removeComments ? function (pos) { } : emitLeadingCommentsOfPositionWorker; + var setSourceMapWriterEmit = compilerOptions.sourceMap || compilerOptions.inlineSourceMap ? changeSourceMapEmit : function (writer) { }; var moduleEmitDelegates = (_a = {}, _a[5] = emitES6Module, _a[2] = emitAMDModule, @@ -26499,19 +26859,19 @@ var ts; } function makeTempVariableName(flags) { if (flags && !(tempFlags & flags)) { - var name_19 = flags === 268435456 ? "_i" : "_n"; - if (isUniqueName(name_19)) { + var name_22 = flags === 268435456 ? "_i" : "_n"; + if (isUniqueName(name_22)) { tempFlags |= flags; - return name_19; + return name_22; } } while (true) { var count = tempFlags & 268435455; tempFlags++; if (count !== 8 && count !== 13) { - var name_20 = count < 26 ? "_" + String.fromCharCode(97 + count) : "_" + (count - 26); - if (isUniqueName(name_20)) { - return name_20; + var name_23 = count < 26 ? "_" + String.fromCharCode(97 + count) : "_" + (count - 26); + if (isUniqueName(name_23)) { + return name_23; } } } @@ -26549,17 +26909,17 @@ var ts; switch (node.kind) { case 69: return makeUniqueName(node.text); + case 221: case 220: - case 219: return generateNameForModuleOrEnum(node); - case 224: - case 230: + case 225: + case 231: return generateNameForImportOrExportDeclaration(node); - case 215: case 216: - case 229: + case 217: + case 230: return generateNameForExportDefault(); - case 188: + case 189: return generateNameForClassExpression(); } } @@ -26799,10 +27159,10 @@ var ts; emitParenthesizedIf(node.tag, needsParenthesisForPropertyAccessOrInvocation(node.tag)); write("("); emit(tempVariable); - if (node.template.kind === 185) { + if (node.template.kind === 186) { ts.forEach(node.template.templateSpans, function (templateSpan) { write(", "); - var needsParens = templateSpan.expression.kind === 183 + var needsParens = templateSpan.expression.kind === 184 && templateSpan.expression.operatorToken.kind === 24; emitParenthesizedIf(templateSpan.expression, needsParens); }); @@ -26826,7 +27186,7 @@ var ts; } for (var i = 0, n = node.templateSpans.length; i < n; i++) { var templateSpan = node.templateSpans[i]; - var needsParens = templateSpan.expression.kind !== 174 + var needsParens = templateSpan.expression.kind !== 175 && comparePrecedenceToBinaryPlus(templateSpan.expression) !== 1; if (i > 0 || headEmitted) { write(" + "); @@ -26846,11 +27206,11 @@ var ts; } function templateNeedsParens(template, parent) { switch (parent.kind) { - case 170: case 171: - return parent.expression === template; case 172: - case 174: + return parent.expression === template; + case 173: + case 175: return false; default: return comparePrecedenceToBinaryPlus(parent) !== -1; @@ -26858,7 +27218,7 @@ var ts; } function comparePrecedenceToBinaryPlus(expression) { switch (expression.kind) { - case 183: + case 184: switch (expression.operatorToken.kind) { case 37: case 39: @@ -26870,8 +27230,8 @@ var ts; default: return -1; } - case 186: - case 184: + case 187: + case 185: return -1; default: return 1; @@ -26927,37 +27287,37 @@ var ts; } else { var attrs = openingNode.attributes; - if (ts.forEach(attrs, function (attr) { return attr.kind === 241; })) { + if (ts.forEach(attrs, function (attr) { return attr.kind === 242; })) { emitExpressionIdentifier(syntheticReactRef); write(".__spread("); var haveOpenedObjectLiteral = false; - for (var i_1 = 0; i_1 < attrs.length; i_1++) { - if (attrs[i_1].kind === 241) { - if (i_1 === 0) { + for (var i = 0; i < attrs.length; i++) { + if (attrs[i].kind === 242) { + if (i === 0) { write("{}, "); } if (haveOpenedObjectLiteral) { write("}"); haveOpenedObjectLiteral = false; } - if (i_1 > 0) { + if (i > 0) { write(", "); } - emit(attrs[i_1].expression); + emit(attrs[i].expression); } else { - ts.Debug.assert(attrs[i_1].kind === 240); + ts.Debug.assert(attrs[i].kind === 241); if (haveOpenedObjectLiteral) { write(", "); } else { haveOpenedObjectLiteral = true; - if (i_1 > 0) { + if (i > 0) { write(", "); } write("{"); } - emitJsxAttribute(attrs[i_1]); + emitJsxAttribute(attrs[i]); } } if (haveOpenedObjectLiteral) @@ -26966,7 +27326,7 @@ var ts; } else { write("{"); - for (var i = 0; i < attrs.length; i++) { + for (var i = 0, n = attrs.length; i < n; i++) { if (i > 0) { write(", "); } @@ -26977,10 +27337,10 @@ var ts; } if (children) { for (var i = 0; i < children.length; i++) { - if (children[i].kind === 242 && !(children[i].expression)) { + if (children[i].kind === 243 && !(children[i].expression)) { continue; } - if (children[i].kind === 238) { + if (children[i].kind === 239) { var text = getTextToEmit(children[i]); if (text !== undefined) { write(", \""); @@ -26997,11 +27357,11 @@ var ts; write(")"); emitTrailingComments(openingNode); } - if (node.kind === 235) { + if (node.kind === 236) { emitJsxElement(node.openingElement, node.children); } else { - ts.Debug.assert(node.kind === 236); + ts.Debug.assert(node.kind === 237); emitJsxElement(node); } } @@ -27023,11 +27383,11 @@ var ts; if (i > 0) { write(" "); } - if (attribs[i].kind === 241) { + if (attribs[i].kind === 242) { emitJsxSpreadAttribute(attribs[i]); } else { - ts.Debug.assert(attribs[i].kind === 240); + ts.Debug.assert(attribs[i].kind === 241); emitJsxAttribute(attribs[i]); } } @@ -27035,11 +27395,11 @@ var ts; function emitJsxOpeningOrSelfClosingElement(node) { write("<"); emit(node.tagName); - if (node.attributes.length > 0 || (node.kind === 236)) { + if (node.attributes.length > 0 || (node.kind === 237)) { write(" "); } emitAttributes(node.attributes); - if (node.kind === 236) { + if (node.kind === 237) { write("/>"); } else { @@ -27058,20 +27418,20 @@ var ts; } emitJsxClosingElement(node.closingElement); } - if (node.kind === 235) { + if (node.kind === 236) { emitJsxElement(node); } else { - ts.Debug.assert(node.kind === 236); + ts.Debug.assert(node.kind === 237); emitJsxOpeningOrSelfClosingElement(node); } } function emitExpressionForPropertyName(node) { - ts.Debug.assert(node.kind !== 165); + ts.Debug.assert(node.kind !== 166); if (node.kind === 9) { emitLiteral(node); } - else if (node.kind === 136) { + else if (node.kind === 137) { if (ts.nodeIsDecorated(node.parent)) { if (!computedPropertyNamesToGeneratedNames) { computedPropertyNamesToGeneratedNames = []; @@ -27102,62 +27462,62 @@ var ts; function isExpressionIdentifier(node) { var parent = node.parent; switch (parent.kind) { - case 166: - case 191: - case 183: - case 170: - case 243: - case 136: + case 167: + case 192: case 184: - case 139: - case 177: - case 199: - case 169: - case 229: - case 197: - case 190: - case 201: + case 171: + case 244: + case 137: + case 185: + case 140: + case 178: + case 200: + case 170: + case 230: + case 198: + case 191: case 202: case 203: - case 198: - case 239: - case 236: + case 204: + case 199: + case 240: case 237: - case 241: + case 238: case 242: - case 171: - case 174: - case 182: - case 181: - case 206: - case 248: - case 187: - case 208: + case 243: case 172: - case 192: - case 210: - case 173: - case 178: - case 179: - case 200: - case 207: - case 186: - return true; - case 165: - case 249: - case 138: - case 247: - case 141: - case 213: - return parent.initializer === node; - case 168: - return parent.expression === node; - case 176: case 175: + case 183: + case 182: + case 207: + case 249: + case 188: + case 209: + case 173: + case 193: + case 211: + case 174: + case 179: + case 180: + case 201: + case 208: + case 187: + return true; + case 166: + case 250: + case 139: + case 248: + case 142: + case 214: + return parent.initializer === node; + case 169: + return parent.expression === node; + case 177: + case 176: return parent.body === node; - case 223: + case 224: return parent.moduleReference === node; - case 135: + case 136: return parent.left === node; } return false; @@ -27169,7 +27529,7 @@ var ts; } var container = resolver.getReferencedExportContainer(node); if (container) { - if (container.kind === 250) { + if (container.kind === 251) { if (modulekind !== 5 && modulekind !== 4) { write("exports."); } @@ -27183,15 +27543,15 @@ var ts; if (modulekind !== 5) { var declaration = resolver.getReferencedImportDeclaration(node); if (declaration) { - if (declaration.kind === 225) { + if (declaration.kind === 226) { write(getGeneratedNameForNode(declaration.parent)); write(languageVersion === 0 ? "[\"default\"]" : ".default"); return; } - else if (declaration.kind === 228) { + else if (declaration.kind === 229) { write(getGeneratedNameForNode(declaration.parent.parent.parent)); - var name_21 = declaration.propertyName || declaration.name; - var identifier = ts.getTextOfNodeFromSourceText(currentText, name_21); + var name_24 = declaration.propertyName || declaration.name; + var identifier = ts.getTextOfNodeFromSourceText(currentText, name_24); if (languageVersion === 0 && identifier === "default") { write("[\"default\"]"); } @@ -27220,13 +27580,13 @@ var ts; } function isNameOfNestedRedeclaration(node) { if (languageVersion < 2) { - var parent_6 = node.parent; - switch (parent_6.kind) { - case 165: - case 216: - case 219: - case 213: - return parent_6.name === node && resolver.isNestedRedeclaration(parent_6); + var parent_7 = node.parent; + switch (parent_7.kind) { + case 166: + case 217: + case 220: + case 214: + return parent_7.name === node && resolver.isNestedRedeclaration(parent_7); } } return false; @@ -27234,8 +27594,8 @@ var ts; function emitIdentifier(node) { if (convertedLoopState) { if (node.text == "arguments" && resolver.isArgumentsLocalBinding(node)) { - var name_22 = convertedLoopState.argumentsName || (convertedLoopState.argumentsName = makeUniqueName("arguments")); - write(name_22); + var name_25 = convertedLoopState.argumentsName || (convertedLoopState.argumentsName = makeUniqueName("arguments")); + write(name_25); return; } } @@ -27335,10 +27695,10 @@ var ts; } } function needsParenthesisForAwaitExpressionAsYield(node) { - if (node.parent.kind === 183 && !ts.isAssignmentOperator(node.parent.operatorToken.kind)) { + if (node.parent.kind === 184 && !ts.isAssignmentOperator(node.parent.operatorToken.kind)) { return true; } - else if (node.parent.kind === 184 && node.parent.condition === node) { + else if (node.parent.kind === 185 && node.parent.condition === node) { return true; } return false; @@ -27346,11 +27706,11 @@ var ts; function needsParenthesisForPropertyAccessOrInvocation(node) { switch (node.kind) { case 69: - case 166: - case 168: + case 167: case 169: case 170: - case 174: + case 171: + case 175: return false; } return true; @@ -27367,17 +27727,17 @@ var ts; write(", "); } var e = elements[pos]; - if (e.kind === 187) { + if (e.kind === 188) { e = e.expression; emitParenthesizedIf(e, group === 0 && needsParenthesisForPropertyAccessOrInvocation(e)); pos++; - if (pos === length && group === 0 && needsUniqueCopy && e.kind !== 166) { + if (pos === length && group === 0 && needsUniqueCopy && e.kind !== 167) { write(".slice()"); } } else { var i = pos; - while (i < length && elements[i].kind !== 187) { + while (i < length && elements[i].kind !== 188) { i++; } write("["); @@ -27400,7 +27760,7 @@ var ts; } } function isSpreadElementExpression(node) { - return node.kind === 187; + return node.kind === 188; } function emitArrayLiteral(node) { var elements = node.elements; @@ -27461,7 +27821,7 @@ var ts; writeComma(); var property = properties[i]; emitStart(property); - if (property.kind === 145 || property.kind === 146) { + if (property.kind === 146 || property.kind === 147) { var accessors = ts.getAllAccessorDeclarations(node.properties, property); if (property !== accessors.firstAccessor) { continue; @@ -27512,13 +27872,13 @@ var ts; emitMemberAccessForPropertyName(property.name); emitEnd(property.name); write(" = "); - if (property.kind === 247) { + if (property.kind === 248) { emit(property.initializer); } - else if (property.kind === 248) { + else if (property.kind === 249) { emitExpressionIdentifier(property.name); } - else if (property.kind === 143) { + else if (property.kind === 144) { emitFunctionDeclaration(property); } else { @@ -27550,7 +27910,7 @@ var ts; var numProperties = properties.length; var numInitialNonComputedProperties = numProperties; for (var i = 0, n = properties.length; i < n; i++) { - if (properties[i].name.kind === 136) { + if (properties[i].name.kind === 137) { numInitialNonComputedProperties = i; break; } @@ -27564,35 +27924,35 @@ var ts; emitObjectLiteralBody(node, properties.length); } function createBinaryExpression(left, operator, right, startsOnNewLine) { - var result = ts.createSynthesizedNode(183, startsOnNewLine); + var result = ts.createSynthesizedNode(184, startsOnNewLine); result.operatorToken = ts.createSynthesizedNode(operator); result.left = left; result.right = right; return result; } function createPropertyAccessExpression(expression, name) { - var result = ts.createSynthesizedNode(168); + var result = ts.createSynthesizedNode(169); result.expression = parenthesizeForAccess(expression); result.dotToken = ts.createSynthesizedNode(21); result.name = name; return result; } function createElementAccessExpression(expression, argumentExpression) { - var result = ts.createSynthesizedNode(169); + var result = ts.createSynthesizedNode(170); result.expression = parenthesizeForAccess(expression); result.argumentExpression = argumentExpression; return result; } function parenthesizeForAccess(expr) { - while (expr.kind === 173 || expr.kind === 191) { + while (expr.kind === 174 || expr.kind === 192) { expr = expr.expression; } if (ts.isLeftHandSideExpression(expr) && - expr.kind !== 171 && + expr.kind !== 172 && expr.kind !== 8) { return expr; } - var node = ts.createSynthesizedNode(174); + var node = ts.createSynthesizedNode(175); node.expression = expr; return node; } @@ -27619,7 +27979,7 @@ var ts; } function isNamespaceExportReference(node) { var container = resolver.getReferencedExportContainer(node); - return container && container.kind !== 250; + return container && container.kind !== 251; } function emitShorthandPropertyAssignment(node) { writeTextOfNode(currentText, node.name); @@ -27637,7 +27997,7 @@ var ts; if (constantValue !== undefined) { write(constantValue.toString()); if (!compilerOptions.removeComments) { - var propertyName = node.kind === 168 ? ts.declarationNameToString(node.name) : ts.getTextOfNode(node.argumentExpression); + var propertyName = node.kind === 169 ? ts.declarationNameToString(node.name) : ts.getTextOfNode(node.argumentExpression); write(" /* " + propertyName + " */"); } return true; @@ -27648,7 +28008,7 @@ var ts; if (compilerOptions.isolatedModules) { return undefined; } - return node.kind === 168 || node.kind === 169 + return node.kind === 169 || node.kind === 170 ? resolver.getConstantValue(node) : undefined; } @@ -27728,7 +28088,7 @@ var ts; } emitExpressionIdentifier(node); break; - case 135: + case 136: emitQualifiedNameAsExpression(node, useFallback); break; default: @@ -27746,10 +28106,10 @@ var ts; write("]"); } function hasSpreadElement(elements) { - return ts.forEach(elements, function (e) { return e.kind === 187; }); + return ts.forEach(elements, function (e) { return e.kind === 188; }); } function skipParentheses(node) { - while (node.kind === 174 || node.kind === 173 || node.kind === 191) { + while (node.kind === 175 || node.kind === 174 || node.kind === 192) { node = node.expression; } return node; @@ -27770,12 +28130,12 @@ var ts; function emitCallWithSpread(node) { var target; var expr = skipParentheses(node.expression); - if (expr.kind === 168) { + if (expr.kind === 169) { target = emitCallTarget(expr.expression); write("."); emit(expr.name); } - else if (expr.kind === 169) { + else if (expr.kind === 170) { target = emitCallTarget(expr.expression); write("["); emit(expr.argumentExpression); @@ -27816,7 +28176,7 @@ var ts; } else { emit(node.expression); - superCall = node.expression.kind === 168 && node.expression.expression.kind === 95; + superCall = node.expression.kind === 169 && node.expression.expression.kind === 95; } if (superCall && languageVersion < 2) { write(".call("); @@ -27867,21 +28227,21 @@ var ts; } } function emitParenExpression(node) { - if (!ts.nodeIsSynthesized(node) && node.parent.kind !== 176) { - if (node.expression.kind === 173 || node.expression.kind === 191) { + if (!ts.nodeIsSynthesized(node) && node.parent.kind !== 177) { + if (node.expression.kind === 174 || node.expression.kind === 192) { var operand = node.expression.expression; - while (operand.kind === 173 || operand.kind === 191) { + while (operand.kind === 174 || operand.kind === 192) { operand = operand.expression; } - if (operand.kind !== 181 && + if (operand.kind !== 182 && + operand.kind !== 180 && operand.kind !== 179 && operand.kind !== 178 && - operand.kind !== 177 && - operand.kind !== 182 && - operand.kind !== 171 && - !(operand.kind === 170 && node.parent.kind === 171) && - !(operand.kind === 175 && node.parent.kind === 170) && - !(operand.kind === 8 && node.parent.kind === 168)) { + operand.kind !== 183 && + operand.kind !== 172 && + !(operand.kind === 171 && node.parent.kind === 172) && + !(operand.kind === 176 && node.parent.kind === 171) && + !(operand.kind === 8 && node.parent.kind === 169)) { emit(operand); return; } @@ -27910,7 +28270,7 @@ var ts; if (!isCurrentFileSystemExternalModule() || node.kind !== 69 || ts.nodeIsSynthesized(node)) { return false; } - var isVariableDeclarationOrBindingElement = node.parent && (node.parent.kind === 213 || node.parent.kind === 165); + var isVariableDeclarationOrBindingElement = node.parent && (node.parent.kind === 214 || node.parent.kind === 166); var targetDeclaration = isVariableDeclarationOrBindingElement ? node.parent : resolver.getReferencedValueDeclaration(node); @@ -27925,7 +28285,7 @@ var ts; write("\", "); } write(ts.tokenToString(node.operator)); - if (node.operand.kind === 181) { + if (node.operand.kind === 182) { var operand = node.operand; if (node.operator === 35 && (operand.operator === 35 || operand.operator === 41)) { write(" "); @@ -27968,10 +28328,10 @@ var ts; } var current = node; while (current) { - if (current.kind === 250) { + if (current.kind === 251) { return !isExported || ((ts.getCombinedNodeFlags(node) & 2) !== 0); } - else if (ts.isFunctionLike(current) || current.kind === 221) { + else if (ts.isFunctionLike(current) || current.kind === 222) { return false; } else { @@ -27987,14 +28347,14 @@ var ts; if (ts.isElementAccessExpression(leftHandSideExpression)) { shouldEmitParentheses = true; write("("); - synthesizedLHS = ts.createSynthesizedNode(169, false); + synthesizedLHS = ts.createSynthesizedNode(170, false); var identifier = emitTempVariableAssignment(leftHandSideExpression.expression, false, false); synthesizedLHS.expression = identifier; if (leftHandSideExpression.argumentExpression.kind !== 8 && leftHandSideExpression.argumentExpression.kind !== 9) { var tempArgumentExpression = createAndRecordTempVariable(268435456); synthesizedLHS.argumentExpression = tempArgumentExpression; - emitAssignment(tempArgumentExpression, leftHandSideExpression.argumentExpression, true); + emitAssignment(tempArgumentExpression, leftHandSideExpression.argumentExpression, true, leftHandSideExpression.expression); } else { synthesizedLHS.argumentExpression = leftHandSideExpression.argumentExpression; @@ -28004,7 +28364,7 @@ var ts; else if (ts.isPropertyAccessExpression(leftHandSideExpression)) { shouldEmitParentheses = true; write("("); - synthesizedLHS = ts.createSynthesizedNode(168, false); + synthesizedLHS = ts.createSynthesizedNode(169, false); var identifier = emitTempVariableAssignment(leftHandSideExpression.expression, false, false); synthesizedLHS.expression = identifier; synthesizedLHS.dotToken = leftHandSideExpression.dotToken; @@ -28032,8 +28392,8 @@ var ts; } function emitBinaryExpression(node) { if (languageVersion < 2 && node.operatorToken.kind === 56 && - (node.left.kind === 167 || node.left.kind === 166)) { - emitDestructuring(node, node.parent.kind === 197); + (node.left.kind === 168 || node.left.kind === 167)) { + emitDestructuring(node, node.parent.kind === 198); } else { var exportChanged = node.operatorToken.kind >= 56 && @@ -28085,7 +28445,7 @@ var ts; } } function isSingleLineEmptyBlock(node) { - if (node && node.kind === 194) { + if (node && node.kind === 195) { var block = node; return block.statements.length === 0 && nodeEndIsOnSameLineAsNodeStart(block, block); } @@ -28099,12 +28459,12 @@ var ts; } emitToken(15, node.pos); increaseIndent(); - if (node.kind === 221) { - ts.Debug.assert(node.parent.kind === 220); + if (node.kind === 222) { + ts.Debug.assert(node.parent.kind === 221); emitCaptureThisForNodeIfNecessary(node.parent); } emitLines(node.statements); - if (node.kind === 221) { + if (node.kind === 222) { emitTempDeclarations(true); } decreaseIndent(); @@ -28112,7 +28472,7 @@ var ts; emitToken(16, node.statements.end); } function emitEmbeddedStatement(node) { - if (node.kind === 194) { + if (node.kind === 195) { write(" "); emit(node); } @@ -28124,7 +28484,7 @@ var ts; } } function emitExpressionStatement(node) { - emitParenthesizedIf(node.expression, node.expression.kind === 176); + emitParenthesizedIf(node.expression, node.expression.kind === 177); write(";"); } function emitIfStatement(node) { @@ -28137,7 +28497,7 @@ var ts; if (node.elseStatement) { writeLine(); emitToken(80, node.thenStatement.end); - if (node.elseStatement.kind === 198) { + if (node.elseStatement.kind === 199) { write(" "); emit(node.elseStatement); } @@ -28157,7 +28517,7 @@ var ts; else { emitNormalLoopBody(node, true); } - if (node.statement.kind === 194) { + if (node.statement.kind === 195) { write(" "); } else { @@ -28181,7 +28541,7 @@ var ts; emitNormalLoopBody(node, true); } } - function tryEmitStartOfVariableDeclarationList(decl, startPos) { + function tryEmitStartOfVariableDeclarationList(decl) { if (shouldHoistVariable(decl, true)) { return false; } @@ -28192,31 +28552,20 @@ var ts; } return false; } - var tokenKind = 102; + emitStart(decl); if (decl && languageVersion >= 2) { if (ts.isLet(decl)) { - tokenKind = 108; + write("let "); } else if (ts.isConst(decl)) { - tokenKind = 74; + write("const "); + } + else { + write("var "); } - } - if (startPos !== undefined) { - emitToken(tokenKind, startPos); - write(" "); } else { - switch (tokenKind) { - case 102: - write("var "); - break; - case 108: - write("let "); - break; - case 74: - write("const "); - break; - } + write("var "); } return true; } @@ -28248,7 +28597,7 @@ var ts; } else { var loop = convertLoopBody(node); - if (node.parent.kind === 209) { + if (node.parent.kind === 210) { emitLabelAndColon(node.parent); } loopEmitter(node, loop); @@ -28258,10 +28607,11 @@ var ts; var functionName = makeUniqueName("_loop"); var loopInitializer; switch (node.kind) { - case 201: case 202: case 203: - if (node.initializer.kind === 214) { + case 204: + var initializer = node.initializer; + if (initializer && initializer.kind === 215) { loopInitializer = node.initializer; } break; @@ -28274,7 +28624,7 @@ var ts; collectNames(varDeclaration.name); } } - var bodyIsBlock = node.statement.kind === 194; + var bodyIsBlock = node.statement.kind === 195; var paramList = loopParameters ? loopParameters.join(", ") : ""; writeLine(); write("var " + functionName + " = function(" + paramList + ")"); @@ -28371,7 +28721,7 @@ var ts; if (emitAsEmbeddedStatement) { emitEmbeddedStatement(node.statement); } - else if (node.statement.kind === 194) { + else if (node.statement.kind === 195) { emitLines(node.statement.statements); } else { @@ -28467,9 +28817,9 @@ var ts; var endPos = emitToken(86, node.pos); write(" "); endPos = emitToken(17, endPos); - if (node.initializer && node.initializer.kind === 214) { + if (node.initializer && node.initializer.kind === 215) { var variableDeclarationList = node.initializer; - var startIsEmitted = tryEmitStartOfVariableDeclarationList(variableDeclarationList, endPos); + var startIsEmitted = tryEmitStartOfVariableDeclarationList(variableDeclarationList); if (startIsEmitted) { emitCommaList(variableDeclarationList.declarations); } @@ -28493,7 +28843,7 @@ var ts; } } function emitForInOrForOfStatement(node) { - if (languageVersion < 2 && node.kind === 203) { + if (languageVersion < 2 && node.kind === 204) { emitLoop(node, emitDownLevelForOfStatementWorker); } else { @@ -28504,17 +28854,17 @@ var ts; var endPos = emitToken(86, node.pos); write(" "); endPos = emitToken(17, endPos); - if (node.initializer.kind === 214) { + if (node.initializer.kind === 215) { var variableDeclarationList = node.initializer; if (variableDeclarationList.declarations.length >= 1) { - tryEmitStartOfVariableDeclarationList(variableDeclarationList, endPos); + tryEmitStartOfVariableDeclarationList(variableDeclarationList); emit(variableDeclarationList.declarations[0]); } } else { emit(node.initializer); } - if (node.kind === 202) { + if (node.kind === 203) { write(" in "); } else { @@ -28550,24 +28900,24 @@ var ts; emitNodeWithoutSourceMap(node.expression); emitEnd(node.expression); write("; "); - emitStart(node.initializer); + emitStart(node.expression); emitNodeWithoutSourceMap(counter); write(" < "); emitNodeWithCommentsAndWithoutSourcemap(rhsReference); write(".length"); - emitEnd(node.initializer); + emitEnd(node.expression); write("; "); - emitStart(node.initializer); + emitStart(node.expression); emitNodeWithoutSourceMap(counter); write("++"); - emitEnd(node.initializer); + emitEnd(node.expression); emitToken(18, node.expression.end); write(" {"); writeLine(); increaseIndent(); var rhsIterationValue = createElementAccessExpression(rhsReference, counter); emitStart(node.initializer); - if (node.initializer.kind === 214) { + if (node.initializer.kind === 215) { write("var "); var variableDeclarationList = node.initializer; if (variableDeclarationList.declarations.length > 0) { @@ -28589,7 +28939,7 @@ var ts; } else { var assignmentExpression = createBinaryExpression(node.initializer, 56, rhsIterationValue, false); - if (node.initializer.kind === 166 || node.initializer.kind === 167) { + if (node.initializer.kind === 167 || node.initializer.kind === 168) { emitDestructuring(assignmentExpression, true, undefined); } else { @@ -28611,12 +28961,12 @@ var ts; } function emitBreakOrContinueStatement(node) { if (convertedLoopState) { - var jump = node.kind === 205 ? 2 : 4; + var jump = node.kind === 206 ? 2 : 4; var canUseBreakOrContinue = (node.label && convertedLoopState.labels && convertedLoopState.labels[node.label.text]) || (!node.label && (convertedLoopState.allowedNonLabeledJumps & jump)); if (!canUseBreakOrContinue) { if (!node.label) { - if (node.kind === 205) { + if (node.kind === 206) { convertedLoopState.nonLocalJumps |= 2; write("return \"break\";"); } @@ -28627,7 +28977,7 @@ var ts; } else { var labelMarker; - if (node.kind === 205) { + if (node.kind === 206) { labelMarker = "break-" + node.label.text; setLabeledJump(convertedLoopState, true, node.label.text, labelMarker); } @@ -28640,7 +28990,7 @@ var ts; return; } } - emitToken(node.kind === 205 ? 70 : 75, node.pos); + emitToken(node.kind === 206 ? 70 : 75, node.pos); emitOptional(" ", node.label); write(";"); } @@ -28705,7 +29055,7 @@ var ts; ts.getLineOfLocalPositionFromLineMap(currentLineMap, ts.skipTrivia(currentText, node2.pos)); } function emitCaseOrDefaultClause(node) { - if (node.kind === 243) { + if (node.kind === 244) { write("case "); emit(node.expression); write(":"); @@ -28774,7 +29124,7 @@ var ts; function getContainingModule(node) { do { node = node.parent; - } while (node && node.kind !== 220); + } while (node && node.kind !== 221); return node; } function emitContainingModuleName(node) { @@ -28799,13 +29149,13 @@ var ts; function createVoidZero() { var zero = ts.createSynthesizedNode(8); zero.text = "0"; - var result = ts.createSynthesizedNode(179); + var result = ts.createSynthesizedNode(180); result.expression = zero; return result; } function emitEs6ExportDefaultCompat(node) { - if (node.parent.kind === 250) { - ts.Debug.assert(!!(node.flags & 512) || node.kind === 229); + if (node.parent.kind === 251) { + ts.Debug.assert(!!(node.flags & 512) || node.kind === 230); if (modulekind === 1 || modulekind === 2 || modulekind === 3) { if (!isEs6Module) { if (languageVersion !== 0) { @@ -28890,7 +29240,7 @@ var ts; emitEnd(specifier.name); write(";"); } - function emitAssignment(name, value, shouldEmitCommaBeforeAssignment) { + function emitAssignment(name, value, shouldEmitCommaBeforeAssignment, nodeForSourceMap) { if (shouldEmitCommaBeforeAssignment) { write(", "); } @@ -28900,63 +29250,75 @@ var ts; emitNodeWithCommentsAndWithoutSourcemap(name); write("\", "); } - var isVariableDeclarationOrBindingElement = name.parent && (name.parent.kind === 213 || name.parent.kind === 165); - if (isVariableDeclarationOrBindingElement) { - emitModuleMemberName(name.parent); - } - else { - emit(name); - } - write(" = "); - emit(value); + var isVariableDeclarationOrBindingElement = name.parent && (name.parent.kind === 214 || name.parent.kind === 166); + emitStart(isFirstVariableDeclaration(nodeForSourceMap) ? nodeForSourceMap.parent : nodeForSourceMap); + withTemporaryNoSourceMap(function () { + if (isVariableDeclarationOrBindingElement) { + emitModuleMemberName(name.parent); + } + else { + emit(name); + } + write(" = "); + emit(value); + }); + emitEnd(nodeForSourceMap, true); if (exportChanged) { write(")"); } } - function emitTempVariableAssignment(expression, canDefineTempVariablesInPlace, shouldEmitCommaBeforeAssignment) { + function emitTempVariableAssignment(expression, canDefineTempVariablesInPlace, shouldEmitCommaBeforeAssignment, sourceMapNode) { var identifier = createTempVariable(0); if (!canDefineTempVariablesInPlace) { recordTempDeclaration(identifier); } - emitAssignment(identifier, expression, shouldEmitCommaBeforeAssignment); + emitAssignment(identifier, expression, shouldEmitCommaBeforeAssignment, sourceMapNode || expression.parent); return identifier; } + function isFirstVariableDeclaration(root) { + return root.kind === 214 && + root.parent.kind === 215 && + root.parent.declarations[0] === root; + } function emitDestructuring(root, isAssignmentExpressionStatement, value) { var emitCount = 0; var canDefineTempVariablesInPlace = false; - if (root.kind === 213) { + if (root.kind === 214) { var isExported = ts.getCombinedNodeFlags(root) & 2; var isSourceLevelForSystemModuleKind = shouldHoistDeclarationInSystemJsModule(root); canDefineTempVariablesInPlace = !isExported && !isSourceLevelForSystemModuleKind; } - else if (root.kind === 138) { + else if (root.kind === 139) { canDefineTempVariablesInPlace = true; } - if (root.kind === 183) { + if (root.kind === 184) { emitAssignmentExpression(root); } else { ts.Debug.assert(!isAssignmentExpressionStatement); + if (isFirstVariableDeclaration(root)) { + sourceMap.changeEmitSourcePos(); + } emitBindingElement(root, value); } - function ensureIdentifier(expr, reuseIdentifierExpressions) { + function ensureIdentifier(expr, reuseIdentifierExpressions, sourceMapNode) { if (expr.kind === 69 && reuseIdentifierExpressions) { return expr; } - var identifier = emitTempVariableAssignment(expr, canDefineTempVariablesInPlace, emitCount > 0); + var identifier = emitTempVariableAssignment(expr, canDefineTempVariablesInPlace, emitCount > 0, sourceMapNode); emitCount++; return identifier; } - function createDefaultValueCheck(value, defaultValue) { - value = ensureIdentifier(value, true); - var equals = ts.createSynthesizedNode(183); + function createDefaultValueCheck(value, defaultValue, sourceMapNode) { + value = ensureIdentifier(value, true, sourceMapNode); + var equals = ts.createSynthesizedNode(184); equals.left = value; equals.operatorToken = ts.createSynthesizedNode(32); equals.right = createVoidZero(); return createConditionalExpression(equals, defaultValue, value); } function createConditionalExpression(condition, whenTrue, whenFalse) { - var cond = ts.createSynthesizedNode(184); + var cond = ts.createSynthesizedNode(185); cond.condition = condition; cond.questionToken = ts.createSynthesizedNode(53); cond.whenTrue = whenTrue; @@ -28971,9 +29333,9 @@ var ts; } function createPropertyAccessForDestructuringProperty(object, propName) { var index; - var nameIsComputed = propName.kind === 136; + var nameIsComputed = propName.kind === 137; if (nameIsComputed) { - index = ensureIdentifier(propName.expression, false); + index = ensureIdentifier(propName.expression, false, propName); } else { index = ts.createSynthesizedNode(propName.kind); @@ -28984,7 +29346,7 @@ var ts; : createElementAccessExpression(object, index); } function createSliceCall(value, sliceIndex) { - var call = ts.createSynthesizedNode(170); + var call = ts.createSynthesizedNode(171); var sliceIdentifier = ts.createSynthesizedNode(69); sliceIdentifier.text = "slice"; call.expression = createPropertyAccessExpression(value, sliceIdentifier); @@ -28992,56 +29354,56 @@ var ts; call.arguments[0] = createNumericLiteral(sliceIndex); return call; } - function emitObjectLiteralAssignment(target, value) { + function emitObjectLiteralAssignment(target, value, sourceMapNode) { var properties = target.properties; if (properties.length !== 1) { - value = ensureIdentifier(value, true); + value = ensureIdentifier(value, true, sourceMapNode); } for (var _a = 0, properties_5 = properties; _a < properties_5.length; _a++) { var p = properties_5[_a]; - if (p.kind === 247 || p.kind === 248) { + if (p.kind === 248 || p.kind === 249) { var propName = p.name; - var target_1 = p.kind === 248 ? p : p.initializer || propName; - emitDestructuringAssignment(target_1, createPropertyAccessForDestructuringProperty(value, propName)); + var target_1 = p.kind === 249 ? p : p.initializer || propName; + emitDestructuringAssignment(target_1, createPropertyAccessForDestructuringProperty(value, propName), p); } } } - function emitArrayLiteralAssignment(target, value) { + function emitArrayLiteralAssignment(target, value, sourceMapNode) { var elements = target.elements; if (elements.length !== 1) { - value = ensureIdentifier(value, true); + value = ensureIdentifier(value, true, sourceMapNode); } for (var i = 0; i < elements.length; i++) { var e = elements[i]; - if (e.kind !== 189) { - if (e.kind !== 187) { - emitDestructuringAssignment(e, createElementAccessExpression(value, createNumericLiteral(i))); + if (e.kind !== 190) { + if (e.kind !== 188) { + emitDestructuringAssignment(e, createElementAccessExpression(value, createNumericLiteral(i)), e); } else if (i === elements.length - 1) { - emitDestructuringAssignment(e.expression, createSliceCall(value, i)); + emitDestructuringAssignment(e.expression, createSliceCall(value, i), e); } } } } - function emitDestructuringAssignment(target, value) { - if (target.kind === 248) { + function emitDestructuringAssignment(target, value, sourceMapNode) { + if (target.kind === 249) { if (target.objectAssignmentInitializer) { - value = createDefaultValueCheck(value, target.objectAssignmentInitializer); + value = createDefaultValueCheck(value, target.objectAssignmentInitializer, sourceMapNode); } target = target.name; } - else if (target.kind === 183 && target.operatorToken.kind === 56) { - value = createDefaultValueCheck(value, target.right); + else if (target.kind === 184 && target.operatorToken.kind === 56) { + value = createDefaultValueCheck(value, target.right, sourceMapNode); target = target.left; } - if (target.kind === 167) { - emitObjectLiteralAssignment(target, value); + if (target.kind === 168) { + emitObjectLiteralAssignment(target, value, sourceMapNode); } - else if (target.kind === 166) { - emitArrayLiteralAssignment(target, value); + else if (target.kind === 167) { + emitArrayLiteralAssignment(target, value, sourceMapNode); } else { - emitAssignment(target, value, emitCount > 0); + emitAssignment(target, value, emitCount > 0, sourceMapNode); emitCount++; } } @@ -29052,24 +29414,24 @@ var ts; emit(value); } else if (isAssignmentExpressionStatement) { - emitDestructuringAssignment(target, value); + emitDestructuringAssignment(target, value, ts.nodeIsSynthesized(root) ? target : root); } else { - if (root.parent.kind !== 174) { + if (root.parent.kind !== 175) { write("("); } - value = ensureIdentifier(value, true); - emitDestructuringAssignment(target, value); + value = ensureIdentifier(value, true, root); + emitDestructuringAssignment(target, value, root); write(", "); emit(value); - if (root.parent.kind !== 174) { + if (root.parent.kind !== 175) { write(")"); } } } function emitBindingElement(target, value) { if (target.initializer) { - value = value ? createDefaultValueCheck(value, target.initializer) : target.initializer; + value = value ? createDefaultValueCheck(value, target.initializer, target) : target.initializer; } else if (!value) { value = createVoidZero(); @@ -29079,15 +29441,15 @@ var ts; var elements = pattern.elements; var numElements = elements.length; if (numElements !== 1) { - value = ensureIdentifier(value, numElements !== 0); + value = ensureIdentifier(value, numElements !== 0, target); } for (var i = 0; i < numElements; i++) { var element = elements[i]; - if (pattern.kind === 163) { + if (pattern.kind === 164) { var propName = element.propertyName || element.name; emitBindingElement(element, createPropertyAccessForDestructuringProperty(value, propName)); } - else if (element.kind !== 189) { + else if (element.kind !== 190) { if (!element.dotDotDotToken) { emitBindingElement(element, createElementAccessExpression(value, createNumericLiteral(i))); } @@ -29098,7 +29460,7 @@ var ts; } } else { - emitAssignment(target.name, value, emitCount > 0); + emitAssignment(target.name, value, emitCount > 0, target); emitCount++; } } @@ -29119,8 +29481,8 @@ var ts; var isLetDefinedInLoop = (resolver.getNodeCheckFlags(node) & 16384) && (getCombinedFlagsForIdentifier(node.name) & 8192); if (isLetDefinedInLoop && - node.parent.parent.kind !== 202 && - node.parent.parent.kind !== 203) { + node.parent.parent.kind !== 203 && + node.parent.parent.kind !== 204) { initializer = createVoidZero(); } } @@ -29138,7 +29500,7 @@ var ts; } } function emitExportVariableAssignments(node) { - if (node.kind === 189) { + if (node.kind === 190) { return; } var name = node.name; @@ -29150,7 +29512,7 @@ var ts; } } function getCombinedFlagsForIdentifier(node) { - if (!node.parent || (node.parent.kind !== 213 && node.parent.kind !== 165)) { + if (!node.parent || (node.parent.kind !== 214 && node.parent.kind !== 166)) { return 0; } return ts.getCombinedNodeFlags(node.parent); @@ -29158,7 +29520,7 @@ var ts; function isES6ExportedDeclaration(node) { return !!(node.flags & 2) && modulekind === 5 && - node.parent.kind === 250; + node.parent.kind === 251; } function emitVariableStatement(node) { var startIsEmitted = false; @@ -29203,12 +29565,12 @@ var ts; function emitParameter(node) { if (languageVersion < 2) { if (ts.isBindingPattern(node.name)) { - var name_23 = createTempVariable(0); + var name_26 = createTempVariable(0); if (!tempParameters) { tempParameters = []; } - tempParameters.push(name_23); - emit(name_23); + tempParameters.push(name_26); + emit(name_26); } else { emit(node.name); @@ -29307,12 +29669,12 @@ var ts; } } function emitAccessor(node) { - write(node.kind === 145 ? "get " : "set "); + write(node.kind === 146 ? "get " : "set "); emit(node.name); emitSignatureAndBody(node); } function shouldEmitAsArrowFunction(node) { - return node.kind === 176 && languageVersion >= 2; + return node.kind === 177 && languageVersion >= 2; } function emitDeclarationName(node) { if (node.name) { @@ -29323,10 +29685,10 @@ var ts; } } function shouldEmitFunctionName(node) { - if (node.kind === 175) { + if (node.kind === 176) { return !!node.name; } - if (node.kind === 215) { + if (node.kind === 216) { return !!node.name || modulekind !== 5; } } @@ -29335,12 +29697,12 @@ var ts; return emitCommentsOnNotEmittedNode(node); } var kind = node.kind, parent = node.parent; - if (kind !== 143 && - kind !== 142 && + if (kind !== 144 && + kind !== 143 && parent && - parent.kind !== 247 && - parent.kind !== 170 && - parent.kind !== 166) { + parent.kind !== 248 && + parent.kind !== 171 && + parent.kind !== 167) { emitLeadingComments(node); } emitStart(node); @@ -29361,11 +29723,11 @@ var ts; emitDeclarationName(node); } emitSignatureAndBody(node); - if (modulekind !== 5 && kind === 215 && parent === currentSourceFile && node.name) { + if (modulekind !== 5 && kind === 216 && parent === currentSourceFile && node.name) { emitExportMemberAssignments(node.name); } emitEnd(node); - if (kind !== 143 && kind !== 142) { + if (kind !== 144 && kind !== 143) { emitTrailingComments(node); } } @@ -29397,7 +29759,7 @@ var ts; } function emitAsyncFunctionBodyForES6(node) { var promiseConstructor = ts.getEntityNameFromTypeNode(node.type); - var isArrowFunction = node.kind === 176; + var isArrowFunction = node.kind === 177; var hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 4096) !== 0; if (!isArrowFunction) { write(" {"); @@ -29438,7 +29800,7 @@ var ts; write(" { }"); } else { - if (node.body.kind === 194) { + if (node.body.kind === 195) { emitBlockFunctionBody(node, node.body); } else { @@ -29490,10 +29852,10 @@ var ts; } write(" "); var current = body; - while (current.kind === 173) { + while (current.kind === 174) { current = current.expression; } - emitParenthesizedIf(body, current.kind === 167); + emitParenthesizedIf(body, current.kind === 168); } function emitDownLevelExpressionFunctionBody(node, body) { write(" {"); @@ -29563,9 +29925,9 @@ var ts; function findInitialSuperCall(ctor) { if (ctor.body) { var statement = ctor.body.statements[0]; - if (statement && statement.kind === 197) { + if (statement && statement.kind === 198) { var expr = statement.expression; - if (expr && expr.kind === 170) { + if (expr && expr.kind === 171) { var func = expr.expression; if (func && func.kind === 95) { return statement; @@ -29596,7 +29958,7 @@ var ts; emitNodeWithCommentsAndWithoutSourcemap(memberName); write("]"); } - else if (memberName.kind === 136) { + else if (memberName.kind === 137) { emitComputedPropertyName(memberName); } else { @@ -29608,7 +29970,7 @@ var ts; var properties = []; for (var _a = 0, _b = node.members; _a < _b.length; _a++) { var member = _b[_a]; - if (member.kind === 141 && isStatic === ((member.flags & 64) !== 0) && member.initializer) { + if (member.kind === 142 && isStatic === ((member.flags & 64) !== 0) && member.initializer) { properties.push(member); } } @@ -29648,11 +30010,11 @@ var ts; } function emitMemberFunctionsForES5AndLower(node) { ts.forEach(node.members, function (member) { - if (member.kind === 193) { + if (member.kind === 194) { writeLine(); write(";"); } - else if (member.kind === 143 || node.kind === 142) { + else if (member.kind === 144 || node.kind === 143) { if (!member.body) { return emitCommentsOnNotEmittedNode(member); } @@ -29669,7 +30031,7 @@ var ts; write(";"); emitTrailingComments(member); } - else if (member.kind === 145 || member.kind === 146) { + else if (member.kind === 146 || member.kind === 147) { var accessors = ts.getAllAccessorDeclarations(node.members, member); if (member === accessors.firstAccessor) { writeLine(); @@ -29719,22 +30081,22 @@ var ts; function emitMemberFunctionsForES6AndHigher(node) { for (var _a = 0, _b = node.members; _a < _b.length; _a++) { var member = _b[_a]; - if ((member.kind === 143 || node.kind === 142) && !member.body) { + if ((member.kind === 144 || node.kind === 143) && !member.body) { emitCommentsOnNotEmittedNode(member); } - else if (member.kind === 143 || - member.kind === 145 || - member.kind === 146) { + else if (member.kind === 144 || + member.kind === 146 || + member.kind === 147) { writeLine(); emitLeadingComments(member); emitStart(member); if (member.flags & 64) { write("static "); } - if (member.kind === 145) { + if (member.kind === 146) { write("get "); } - else if (member.kind === 146) { + else if (member.kind === 147) { write("set "); } if (member.asteriskToken) { @@ -29745,7 +30107,7 @@ var ts; emitEnd(member); emitTrailingComments(member); } - else if (member.kind === 193) { + else if (member.kind === 194) { writeLine(); write(";"); } @@ -29770,10 +30132,10 @@ var ts; function emitConstructorWorker(node, baseTypeElement) { var hasInstancePropertyWithInitializer = false; ts.forEach(node.members, function (member) { - if (member.kind === 144 && !member.body) { + if (member.kind === 145 && !member.body) { emitCommentsOnNotEmittedNode(member); } - if (member.kind === 141 && member.initializer && (member.flags & 64) === 0) { + if (member.kind === 142 && member.initializer && (member.flags & 64) === 0) { hasInstancePropertyWithInitializer = true; } }); @@ -29877,7 +30239,7 @@ var ts; } function emitClassLikeDeclarationForES6AndHigher(node) { var thisNodeIsDecorated = ts.nodeIsDecorated(node); - if (node.kind === 216) { + if (node.kind === 217) { if (thisNodeIsDecorated) { if (isES6ExportedDeclaration(node) && !(node.flags & 512)) { write("export "); @@ -29894,7 +30256,7 @@ var ts; } } var staticProperties = getInitializedProperties(node, true); - var isClassExpressionWithStaticProperties = staticProperties.length > 0 && node.kind === 188; + var isClassExpressionWithStaticProperties = staticProperties.length > 0 && node.kind === 189; var tempVariable; if (isClassExpressionWithStaticProperties) { tempVariable = createAndRecordTempVariable(0); @@ -29957,7 +30319,7 @@ var ts; write(";"); } } - else if (node.parent.kind !== 250) { + else if (node.parent.kind !== 251) { writeLine(); emitStart(node); emitModuleMemberName(node); @@ -29969,7 +30331,7 @@ var ts; } } function emitClassLikeDeclarationBelowES6(node) { - if (node.kind === 216) { + if (node.kind === 217) { if (!shouldHoistDeclarationInSystemJsModule(node)) { write("var "); } @@ -30029,11 +30391,11 @@ var ts; emit(baseTypeNode.expression); } write("))"); - if (node.kind === 216) { + if (node.kind === 217) { write(";"); } emitEnd(node); - if (node.kind === 216) { + if (node.kind === 217) { emitExportMemberAssignment(node); } } @@ -30100,7 +30462,7 @@ var ts; } else { decorators = member.decorators; - if (member.kind === 143) { + if (member.kind === 144) { functionLikeMember = member; } } @@ -30126,7 +30488,7 @@ var ts; write(", "); emitExpressionForPropertyName(member.name); if (languageVersion > 0) { - if (member.kind !== 141) { + if (member.kind !== 142) { write(", null"); } else { @@ -30161,45 +30523,45 @@ var ts; } function shouldEmitTypeMetadata(node) { switch (node.kind) { - case 143: - case 145: + case 144: case 146: - case 141: + case 147: + case 142: return true; } return false; } function shouldEmitReturnTypeMetadata(node) { switch (node.kind) { - case 143: + case 144: return true; } return false; } function shouldEmitParamTypesMetadata(node) { switch (node.kind) { - case 216: - case 143: - case 146: + case 217: + case 144: + case 147: return true; } return false; } function emitSerializedTypeOfNode(node) { switch (node.kind) { - case 216: + case 217: write("Function"); return; - case 141: + case 142: emitSerializedTypeNode(node.type); return; - case 138: - emitSerializedTypeNode(node.type); - return; - case 145: + case 139: emitSerializedTypeNode(node.type); return; case 146: + emitSerializedTypeNode(node.type); + return; + case 147: emitSerializedTypeNode(ts.getSetAccessorTypeAnnotationNode(node)); return; } @@ -30215,23 +30577,23 @@ var ts; case 103: write("void 0"); return; - case 160: + case 161: emitSerializedTypeNode(node.type); return; - case 152: case 153: + case 154: write("Function"); return; - case 156: case 157: + case 158: write("Array"); return; - case 150: + case 151: case 120: write("Boolean"); return; case 130: - case 162: + case 163: write("String"); return; case 128: @@ -30240,15 +30602,15 @@ var ts; case 131: write("Symbol"); return; - case 151: + case 152: emitSerializedTypeReferenceNode(node); return; - case 154: case 155: - case 158: + case 156: case 159: + case 160: case 117: - case 161: + case 162: break; default: ts.Debug.fail("Cannot serialize unexpected type node."); @@ -30312,7 +30674,7 @@ var ts; function emitSerializedParameterTypesOfNode(node) { if (node) { var valueDeclaration; - if (node.kind === 216) { + if (node.kind === 217) { valueDeclaration = ts.getFirstConstructorWithBody(node); } else if (ts.isFunctionLike(node) && ts.nodeIsPresent(node.body)) { @@ -30328,10 +30690,10 @@ var ts; } if (parameters[i].dotDotDotToken) { var parameterType = parameters[i].type; - if (parameterType.kind === 156) { + if (parameterType.kind === 157) { parameterType = parameterType.elementType; } - else if (parameterType.kind === 151 && parameterType.typeArguments && parameterType.typeArguments.length === 1) { + else if (parameterType.kind === 152 && parameterType.typeArguments && parameterType.typeArguments.length === 1) { parameterType = parameterType.typeArguments[0]; } else { @@ -30403,7 +30765,7 @@ var ts; } if (!shouldHoistDeclarationInSystemJsModule(node)) { var isES6ExportedEnum = isES6ExportedDeclaration(node); - if (!(node.flags & 2) || (isES6ExportedEnum && isFirstDeclarationOfKind(node, node.symbol && node.symbol.declarations, 219))) { + if (!(node.flags & 2) || (isES6ExportedEnum && isFirstDeclarationOfKind(node, node.symbol && node.symbol.declarations, 220))) { emitStart(node); if (isES6ExportedEnum) { write("export "); @@ -30483,7 +30845,7 @@ var ts; } } function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 220) { + if (moduleDeclaration.body.kind === 221) { var recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); return recursiveInnerModule || moduleDeclaration.body; } @@ -30506,7 +30868,7 @@ var ts; var emitVarForModule = !hoistedInDeclarationScope && !isModuleMergedWithES6Class(node); if (emitVarForModule) { var isES6ExportedNamespace = isES6ExportedDeclaration(node); - if (!isES6ExportedNamespace || isFirstDeclarationOfKind(node, node.symbol && node.symbol.declarations, 220)) { + if (!isES6ExportedNamespace || isFirstDeclarationOfKind(node, node.symbol && node.symbol.declarations, 221)) { emitStart(node); if (isES6ExportedNamespace) { write("export "); @@ -30524,7 +30886,7 @@ var ts; write(getGeneratedNameForNode(node)); emitEnd(node.name); write(") "); - if (node.body.kind === 221) { + if (node.body.kind === 222) { var saveConvertedLoopState = convertedLoopState; var saveTempFlags = tempFlags; var saveTempVariables = tempVariables; @@ -30595,16 +30957,16 @@ var ts; } } function getNamespaceDeclarationNode(node) { - if (node.kind === 223) { + if (node.kind === 224) { return node; } var importClause = node.importClause; - if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 226) { + if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 227) { return importClause.namedBindings; } } function isDefaultImport(node) { - return node.kind === 224 && node.importClause && !!node.importClause.name; + return node.kind === 225 && node.importClause && !!node.importClause.name; } function emitExportImportAssignments(node) { if (ts.isAliasSymbolDeclaration(node) && resolver.isValueAliasDeclaration(node)) { @@ -30631,7 +30993,7 @@ var ts; if (shouldEmitNamedBindings) { emitLeadingComments(node.importClause.namedBindings); emitStart(node.importClause.namedBindings); - if (node.importClause.namedBindings.kind === 226) { + if (node.importClause.namedBindings.kind === 227) { write("* as "); emit(node.importClause.namedBindings.name); } @@ -30657,7 +31019,7 @@ var ts; } function emitExternalImportDeclaration(node) { if (ts.contains(externalImports, node)) { - var isExportedImport = node.kind === 223 && (node.flags & 2) !== 0; + var isExportedImport = node.kind === 224 && (node.flags & 2) !== 0; var namespaceDeclaration = getNamespaceDeclarationNode(node); if (modulekind !== 2) { emitLeadingComments(node); @@ -30669,7 +31031,7 @@ var ts; write(" = "); } else { - var isNakedImport = 224 && !node.importClause; + var isNakedImport = 225 && !node.importClause; if (!isNakedImport) { write("var "); write(getGeneratedNameForNode(node)); @@ -30836,8 +31198,8 @@ var ts; write("export default "); var expression = node.expression; emit(expression); - if (expression.kind !== 215 && - expression.kind !== 216) { + if (expression.kind !== 216 && + expression.kind !== 217) { write(";"); } emitEnd(node); @@ -30874,18 +31236,18 @@ var ts; for (var _a = 0, _b = sourceFile.statements; _a < _b.length; _a++) { var node = _b[_a]; switch (node.kind) { - case 224: + case 225: if (!node.importClause || resolver.isReferencedAliasDeclaration(node.importClause, true)) { externalImports.push(node); } break; - case 223: - if (node.moduleReference.kind === 234 && resolver.isReferencedAliasDeclaration(node)) { + case 224: + if (node.moduleReference.kind === 235 && resolver.isReferencedAliasDeclaration(node)) { externalImports.push(node); } break; - case 230: + case 231: if (node.moduleSpecifier) { if (!node.exportClause) { if (resolver.moduleExportsSomeValue(node.moduleSpecifier)) { @@ -30900,12 +31262,12 @@ var ts; else { for (var _c = 0, _d = node.exportClause.elements; _c < _d.length; _c++) { var specifier = _d[_c]; - var name_24 = (specifier.propertyName || specifier.name).text; - (exportSpecifiers[name_24] || (exportSpecifiers[name_24] = [])).push(specifier); + var name_27 = (specifier.propertyName || specifier.name).text; + (exportSpecifiers[name_27] || (exportSpecifiers[name_27] = [])).push(specifier); } } break; - case 229: + case 230: if (node.isExportEquals && !exportEquals) { exportEquals = node; } @@ -30930,18 +31292,18 @@ var ts; if (namespaceDeclaration && !isDefaultImport(node)) { return ts.getTextOfNodeFromSourceText(currentText, namespaceDeclaration.name); } - if (node.kind === 224 && node.importClause) { + if (node.kind === 225 && node.importClause) { return getGeneratedNameForNode(node); } - if (node.kind === 230 && node.moduleSpecifier) { + if (node.kind === 231 && node.moduleSpecifier) { return getGeneratedNameForNode(node); } } function getExternalModuleNameText(importNode, emitRelativePathAsModuleName) { if (emitRelativePathAsModuleName) { - var name_25 = getExternalModuleNameFromDeclaration(host, resolver, importNode); - if (name_25) { - return "\"" + name_25 + "\""; + var name_28 = getExternalModuleNameFromDeclaration(host, resolver, importNode); + if (name_28) { + return "\"" + name_28 + "\""; } } var moduleName = ts.getExternalModuleName(importNode); @@ -30958,8 +31320,8 @@ var ts; var started = false; for (var _a = 0, externalImports_1 = externalImports; _a < externalImports_1.length; _a++) { var importNode = externalImports_1[_a]; - var skipNode = importNode.kind === 230 || - (importNode.kind === 224 && !importNode.importClause); + var skipNode = importNode.kind === 231 || + (importNode.kind === 225 && !importNode.importClause); if (skipNode) { continue; } @@ -30984,7 +31346,7 @@ var ts; var hasExportDeclarationWithExportClause = false; for (var _a = 0, externalImports_2 = externalImports; _a < externalImports_2.length; _a++) { var externalImport = externalImports_2[_a]; - if (externalImport.kind === 230 && externalImport.exportClause) { + if (externalImport.kind === 231 && externalImport.exportClause) { hasExportDeclarationWithExportClause = true; break; } @@ -31013,7 +31375,7 @@ var ts; } for (var _d = 0, externalImports_3 = externalImports; _d < externalImports_3.length; _d++) { var externalImport = externalImports_3[_d]; - if (externalImport.kind !== 230) { + if (externalImport.kind !== 231) { continue; } var exportDecl = externalImport; @@ -31087,11 +31449,11 @@ var ts; var seen = {}; for (var i = 0; i < hoistedVars.length; i++) { var local = hoistedVars[i]; - var name_26 = local.kind === 69 + var name_29 = local.kind === 69 ? local : local.name; - if (name_26) { - var text = ts.unescapeIdentifier(name_26.text); + if (name_29) { + var text = ts.unescapeIdentifier(name_29.text); if (ts.hasProperty(seen, text)) { continue; } @@ -31102,7 +31464,7 @@ var ts; if (i !== 0) { write(", "); } - if (local.kind === 216 || local.kind === 220 || local.kind === 219) { + if (local.kind === 217 || local.kind === 221 || local.kind === 220) { emitDeclarationName(local); } else { @@ -31136,21 +31498,21 @@ var ts; if (node.flags & 4) { return; } - if (node.kind === 215) { + if (node.kind === 216) { if (!hoistedFunctionDeclarations) { hoistedFunctionDeclarations = []; } hoistedFunctionDeclarations.push(node); return; } - if (node.kind === 216) { + if (node.kind === 217) { if (!hoistedVars) { hoistedVars = []; } hoistedVars.push(node); return; } - if (node.kind === 219) { + if (node.kind === 220) { if (shouldEmitEnumDeclaration(node)) { if (!hoistedVars) { hoistedVars = []; @@ -31159,7 +31521,7 @@ var ts; } return; } - if (node.kind === 220) { + if (node.kind === 221) { if (shouldEmitModuleDeclaration(node)) { if (!hoistedVars) { hoistedVars = []; @@ -31168,17 +31530,17 @@ var ts; } return; } - if (node.kind === 213 || node.kind === 165) { + if (node.kind === 214 || node.kind === 166) { if (shouldHoistVariable(node, false)) { - var name_27 = node.name; - if (name_27.kind === 69) { + var name_30 = node.name; + if (name_30.kind === 69) { if (!hoistedVars) { hoistedVars = []; } - hoistedVars.push(name_27); + hoistedVars.push(name_30); } else { - ts.forEachChild(name_27, visit); + ts.forEachChild(name_30, visit); } } return; @@ -31204,7 +31566,7 @@ var ts; return false; } return (ts.getCombinedNodeFlags(node) & 24576) === 0 || - ts.getEnclosingBlockScopeContainer(node).kind === 250; + ts.getEnclosingBlockScopeContainer(node).kind === 251; } function isCurrentFileSystemExternalModule() { return modulekind === 4 && isCurrentFileExternalModule; @@ -31242,29 +31604,29 @@ var ts; var entry = group_1[_a]; var importVariableName = getLocalNameForExternalImport(entry) || ""; switch (entry.kind) { - case 224: + case 225: if (!entry.importClause) { break; } - case 223: + case 224: ts.Debug.assert(importVariableName !== ""); writeLine(); write(importVariableName + " = " + parameterName + ";"); writeLine(); break; - case 230: + case 231: ts.Debug.assert(importVariableName !== ""); if (entry.exportClause) { writeLine(); write(exportFunctionForFile + "({"); writeLine(); increaseIndent(); - for (var i_2 = 0, len = entry.exportClause.elements.length; i_2 < len; i_2++) { - if (i_2 !== 0) { + for (var i_1 = 0, len = entry.exportClause.elements.length; i_1 < len; i_1++) { + if (i_1 !== 0) { write(","); writeLine(); } - var e = entry.exportClause.elements[i_2]; + var e = entry.exportClause.elements[i_1]; write("\""); emitNodeWithCommentsAndWithoutSourcemap(e.name); write("\": " + parameterName + "[\""); @@ -31296,10 +31658,10 @@ var ts; for (var i = startIndex; i < node.statements.length; i++) { var statement = node.statements[i]; switch (statement.kind) { - case 215: - case 224: + case 216: + case 225: continue; - case 230: + case 231: if (!statement.moduleSpecifier) { for (var _a = 0, _b = statement.exportClause.elements; _a < _b.length; _a++) { var element = _b[_a]; @@ -31307,7 +31669,7 @@ var ts; } } continue; - case 223: + case 224: if (!ts.isInternalModuleImportEqualsDeclaration(statement)) { continue; } @@ -31623,22 +31985,22 @@ var ts; } function emitEmitHelpers(node) { if (!compilerOptions.noEmitHelpers) { - if ((languageVersion < 2) && (!extendsEmitted && resolver.getNodeCheckFlags(node) & 8)) { + if ((languageVersion < 2) && (!extendsEmitted && node.flags & 4194304)) { writeLines(extendsHelper); extendsEmitted = true; } - if (!decorateEmitted && resolver.getNodeCheckFlags(node) & 16) { + if (!decorateEmitted && node.flags & 8388608) { writeLines(decorateHelper); if (compilerOptions.emitDecoratorMetadata) { writeLines(metadataHelper); } decorateEmitted = true; } - if (!paramEmitted && resolver.getNodeCheckFlags(node) & 32) { + if (!paramEmitted && node.flags & 16777216) { writeLines(paramHelper); paramEmitted = true; } - if (!awaiterEmitted && resolver.getNodeCheckFlags(node) & 64) { + if (!awaiterEmitted && node.flags & 33554432) { writeLines(awaiterHelper); awaiterEmitted = true; } @@ -31706,30 +32068,43 @@ var ts; emitJavaScriptWorker(node); } } + function changeSourceMapEmit(writer) { + sourceMap = writer; + emitStart = writer.emitStart; + emitEnd = writer.emitEnd; + emitPos = writer.emitPos; + setSourceFile = writer.setSourceFile; + } + function withTemporaryNoSourceMap(callback) { + var prevSourceMap = sourceMap; + setSourceMapWriterEmit(ts.getNullSourceMapWriter()); + callback(); + setSourceMapWriterEmit(prevSourceMap); + } function isSpecializedCommentHandling(node) { switch (node.kind) { - case 217: - case 215: - case 224: - case 223: case 218: - case 229: + case 216: + case 225: + case 224: + case 219: + case 230: return true; } } function shouldEmitLeadingAndTrailingComments(node) { switch (node.kind) { - case 195: + case 196: return shouldEmitLeadingAndTrailingCommentsForVariableStatement(node); - case 220: + case 221: return shouldEmitModuleDeclaration(node); - case 219: + case 220: return shouldEmitEnumDeclaration(node); } ts.Debug.assert(!isSpecializedCommentHandling(node)); - if (node.kind !== 194 && + if (node.kind !== 195 && node.parent && - node.parent.kind === 176 && + node.parent.kind === 177 && node.parent.body === node && compilerOptions.target <= 1) { return false; @@ -31740,13 +32115,13 @@ var ts; switch (node.kind) { case 69: return emitIdentifier(node); - case 138: + case 139: return emitParameter(node); + case 144: case 143: - case 142: return emitMethod(node); - case 145: case 146: + case 147: return emitAccessor(node); case 97: return emitThis(node); @@ -31766,142 +32141,142 @@ var ts; case 13: case 14: return emitLiteral(node); - case 185: - return emitTemplateExpression(node); - case 192: - return emitTemplateSpan(node); - case 235: - case 236: - return emitJsxElement(node); - case 238: - return emitJsxText(node); - case 242: - return emitJsxExpression(node); - case 135: - return emitQualifiedName(node); - case 163: - return emitObjectBindingPattern(node); - case 164: - return emitArrayBindingPattern(node); - case 165: - return emitBindingElement(node); - case 166: - return emitArrayLiteral(node); - case 167: - return emitObjectLiteral(node); - case 247: - return emitPropertyAssignment(node); - case 248: - return emitShorthandPropertyAssignment(node); - case 136: - return emitComputedPropertyName(node); - case 168: - return emitPropertyAccess(node); - case 169: - return emitIndexedAccess(node); - case 170: - return emitCallExpression(node); - case 171: - return emitNewExpression(node); - case 172: - return emitTaggedTemplateExpression(node); - case 173: - return emit(node.expression); - case 191: - return emit(node.expression); - case 174: - return emitParenExpression(node); - case 215: - case 175: - case 176: - return emitFunctionDeclaration(node); - case 177: - return emitDeleteExpression(node); - case 178: - return emitTypeOfExpression(node); - case 179: - return emitVoidExpression(node); - case 180: - return emitAwaitExpression(node); - case 181: - return emitPrefixUnaryExpression(node); - case 182: - return emitPostfixUnaryExpression(node); - case 183: - return emitBinaryExpression(node); - case 184: - return emitConditionalExpression(node); - case 187: - return emitSpreadElementExpression(node); case 186: - return emitYieldExpression(node); - case 189: - return; - case 194: - case 221: - return emitBlock(node); - case 195: - return emitVariableStatement(node); - case 196: - return write(";"); - case 197: - return emitExpressionStatement(node); - case 198: - return emitIfStatement(node); - case 199: - return emitDoStatement(node); - case 200: - return emitWhileStatement(node); - case 201: - return emitForStatement(node); - case 203: - case 202: - return emitForInOrForOfStatement(node); - case 204: - case 205: - return emitBreakOrContinueStatement(node); - case 206: - return emitReturnStatement(node); - case 207: - return emitWithStatement(node); - case 208: - return emitSwitchStatement(node); + return emitTemplateExpression(node); + case 193: + return emitTemplateSpan(node); + case 236: + case 237: + return emitJsxElement(node); + case 239: + return emitJsxText(node); case 243: - case 244: - return emitCaseOrDefaultClause(node); - case 209: - return emitLabeledStatement(node); - case 210: - return emitThrowStatement(node); - case 211: - return emitTryStatement(node); - case 246: - return emitCatchClause(node); - case 212: - return emitDebuggerStatement(node); - case 213: - return emitVariableDeclaration(node); - case 188: - return emitClassExpression(node); - case 216: - return emitClassDeclaration(node); - case 217: - return emitInterfaceDeclaration(node); - case 219: - return emitEnumDeclaration(node); + return emitJsxExpression(node); + case 136: + return emitQualifiedName(node); + case 164: + return emitObjectBindingPattern(node); + case 165: + return emitArrayBindingPattern(node); + case 166: + return emitBindingElement(node); + case 167: + return emitArrayLiteral(node); + case 168: + return emitObjectLiteral(node); + case 248: + return emitPropertyAssignment(node); case 249: - return emitEnumMember(node); + return emitShorthandPropertyAssignment(node); + case 137: + return emitComputedPropertyName(node); + case 169: + return emitPropertyAccess(node); + case 170: + return emitIndexedAccess(node); + case 171: + return emitCallExpression(node); + case 172: + return emitNewExpression(node); + case 173: + return emitTaggedTemplateExpression(node); + case 174: + return emit(node.expression); + case 192: + return emit(node.expression); + case 175: + return emitParenExpression(node); + case 216: + case 176: + case 177: + return emitFunctionDeclaration(node); + case 178: + return emitDeleteExpression(node); + case 179: + return emitTypeOfExpression(node); + case 180: + return emitVoidExpression(node); + case 181: + return emitAwaitExpression(node); + case 182: + return emitPrefixUnaryExpression(node); + case 183: + return emitPostfixUnaryExpression(node); + case 184: + return emitBinaryExpression(node); + case 185: + return emitConditionalExpression(node); + case 188: + return emitSpreadElementExpression(node); + case 187: + return emitYieldExpression(node); + case 190: + return; + case 195: + case 222: + return emitBlock(node); + case 196: + return emitVariableStatement(node); + case 197: + return write(";"); + case 198: + return emitExpressionStatement(node); + case 199: + return emitIfStatement(node); + case 200: + return emitDoStatement(node); + case 201: + return emitWhileStatement(node); + case 202: + return emitForStatement(node); + case 204: + case 203: + return emitForInOrForOfStatement(node); + case 205: + case 206: + return emitBreakOrContinueStatement(node); + case 207: + return emitReturnStatement(node); + case 208: + return emitWithStatement(node); + case 209: + return emitSwitchStatement(node); + case 244: + case 245: + return emitCaseOrDefaultClause(node); + case 210: + return emitLabeledStatement(node); + case 211: + return emitThrowStatement(node); + case 212: + return emitTryStatement(node); + case 247: + return emitCatchClause(node); + case 213: + return emitDebuggerStatement(node); + case 214: + return emitVariableDeclaration(node); + case 189: + return emitClassExpression(node); + case 217: + return emitClassDeclaration(node); + case 218: + return emitInterfaceDeclaration(node); case 220: - return emitModuleDeclaration(node); - case 224: - return emitImportDeclaration(node); - case 223: - return emitImportEqualsDeclaration(node); - case 230: - return emitExportDeclaration(node); - case 229: - return emitExportAssignment(node); + return emitEnumDeclaration(node); case 250: + return emitEnumMember(node); + case 221: + return emitModuleDeclaration(node); + case 225: + return emitImportDeclaration(node); + case 224: + return emitImportEqualsDeclaration(node); + case 231: + return emitExportDeclaration(node); + case 230: + return emitExportAssignment(node); + case 251: return emitSourceFileNode(node); } } @@ -31931,7 +32306,7 @@ var ts; } function getLeadingCommentsToEmit(node) { if (node.parent) { - if (node.parent.kind === 250 || node.pos !== node.parent.pos) { + if (node.parent.kind === 251 || node.pos !== node.parent.pos) { if (hasDetachedComments(node.pos)) { return getLeadingCommentsWithoutDetachedComments(); } @@ -31943,7 +32318,7 @@ var ts; } function getTrailingCommentsToEmit(node) { if (node.parent) { - if (node.parent.kind === 250 || node.end !== node.parent.end) { + if (node.parent.kind === 251 || node.end !== node.parent.end) { return ts.getTrailingCommentRanges(currentText, node.end); } } @@ -32329,7 +32704,23 @@ var ts; var currentDirectory = host.getCurrentDirectory(); var resolveModuleNamesWorker = host.resolveModuleNames ? (function (moduleNames, containingFile) { return host.resolveModuleNames(moduleNames, containingFile); }) - : (function (moduleNames, containingFile) { return ts.map(moduleNames, function (moduleName) { return resolveModuleName(moduleName, containingFile, options, host).resolvedModule; }); }); + : (function (moduleNames, containingFile) { + var resolvedModuleNames = []; + var lookup = {}; + for (var _i = 0, moduleNames_1 = moduleNames; _i < moduleNames_1.length; _i++) { + var moduleName = moduleNames_1[_i]; + var resolvedName = void 0; + if (ts.hasProperty(lookup, moduleName)) { + resolvedName = lookup[moduleName]; + } + else { + resolvedName = resolveModuleName(moduleName, containingFile, options, host).resolvedModule; + lookup[moduleName] = resolvedName; + } + resolvedModuleNames.push(resolvedName); + } + return resolvedModuleNames; + }); var filesByName = ts.createFileMap(); var filesByNameIgnoreCase = host.useCaseSensitiveFileNames() ? ts.createFileMap(function (fileName) { return fileName.toLowerCase(); }) : undefined; if (oldProgram) { @@ -32431,8 +32822,11 @@ var ts; if (!ts.arrayIsEqualTo(oldSourceFile.imports, newSourceFile.imports, moduleNameIsEqualTo)) { return false; } + if (!ts.arrayIsEqualTo(oldSourceFile.moduleAugmentations, newSourceFile.moduleAugmentations, moduleNameIsEqualTo)) { + return false; + } if (resolveModuleNamesWorker) { - var moduleNames = ts.map(newSourceFile.imports, function (name) { return name.text; }); + var moduleNames = ts.map(ts.concatenate(newSourceFile.imports, newSourceFile.moduleAugmentations), getTextOfLiteral); var resolutions = resolveModuleNamesWorker(moduleNames, ts.getNormalizedAbsolutePath(newSourceFile.fileName, currentDirectory)); for (var i = 0; i < moduleNames.length; i++) { var newResolution = resolutions[i]; @@ -32569,44 +32963,44 @@ var ts; return false; } switch (node.kind) { - case 223: + case 224: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.import_can_only_be_used_in_a_ts_file)); return true; - case 229: + case 230: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.export_can_only_be_used_in_a_ts_file)); return true; - case 216: + case 217: var classDeclaration = node; if (checkModifiers(classDeclaration.modifiers) || checkTypeParameters(classDeclaration.typeParameters)) { return true; } break; - case 245: + case 246: var heritageClause = node; if (heritageClause.token === 106) { diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.implements_clauses_can_only_be_used_in_a_ts_file)); return true; } break; - case 217: + case 218: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.interface_declarations_can_only_be_used_in_a_ts_file)); return true; - case 220: + case 221: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.module_declarations_can_only_be_used_in_a_ts_file)); return true; - case 218: + case 219: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.type_aliases_can_only_be_used_in_a_ts_file)); return true; - case 143: - case 142: case 144: + case 143: case 145: case 146: - case 175: - case 215: + case 147: case 176: - case 215: + case 216: + case 177: + case 216: var functionDeclaration = node; if (checkModifiers(functionDeclaration.modifiers) || checkTypeParameters(functionDeclaration.typeParameters) || @@ -32614,20 +33008,20 @@ var ts; return true; } break; - case 195: + case 196: var variableStatement = node; if (checkModifiers(variableStatement.modifiers)) { return true; } break; - case 213: + case 214: var variableDeclaration = node; if (checkTypeAnnotation(variableDeclaration.type)) { return true; } break; - case 170: case 171: + case 172: var expression = node; if (expression.typeArguments && expression.typeArguments.length > 0) { var start_2 = expression.typeArguments.pos; @@ -32635,7 +33029,7 @@ var ts; return true; } break; - case 138: + case 139: var parameter = node; if (parameter.modifiers) { var start_3 = parameter.modifiers.pos; @@ -32651,17 +33045,17 @@ var ts; return true; } break; - case 141: + case 142: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.property_declarations_can_only_be_used_in_a_ts_file)); return true; - case 219: + case 220: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.enum_declarations_can_only_be_used_in_a_ts_file)); return true; - case 173: + case 174: var typeAssertionExpression = node; diagnostics.push(ts.createDiagnosticForNode(typeAssertionExpression.type, ts.Diagnostics.type_assertion_expressions_can_only_be_used_in_a_ts_file)); return true; - case 139: + case 140: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.decorators_can_only_be_used_in_a_ts_file)); return true; } @@ -32737,51 +33131,64 @@ var ts; function moduleNameIsEqualTo(a, b) { return a.text === b.text; } + function getTextOfLiteral(literal) { + return literal.text; + } function collectExternalModuleReferences(file) { if (file.imports) { return; } var isJavaScriptFile = ts.isSourceFileJavaScript(file); + var isExternalModuleFile = ts.isExternalModule(file); var imports; + var moduleAugmentations; for (var _i = 0, _a = file.statements; _i < _a.length; _i++) { var node = _a[_i]; - collect(node, true, false); + collectModuleReferences(node, false); + if (isJavaScriptFile) { + collectRequireCalls(node); + } } file.imports = imports || emptyArray; + file.moduleAugmentations = moduleAugmentations || emptyArray; return; - function collect(node, allowRelativeModuleNames, collectOnlyRequireCalls) { - if (!collectOnlyRequireCalls) { - switch (node.kind) { - case 224: - case 223: - case 230: - var moduleNameExpr = ts.getExternalModuleName(node); - if (!moduleNameExpr || moduleNameExpr.kind !== 9) { - break; - } - if (!moduleNameExpr.text) { - break; - } - if (allowRelativeModuleNames || !ts.isExternalModuleNameRelative(moduleNameExpr.text)) { - (imports || (imports = [])).push(moduleNameExpr); - } + function collectModuleReferences(node, inAmbientModule) { + switch (node.kind) { + case 225: + case 224: + case 231: + var moduleNameExpr = ts.getExternalModuleName(node); + if (!moduleNameExpr || moduleNameExpr.kind !== 9) { break; - case 220: - if (node.name.kind === 9 && (node.flags & 4 || ts.isDeclarationFile(file))) { - ts.forEachChild(node.body, function (node) { - collect(node, false, collectOnlyRequireCalls); - }); - } + } + if (!moduleNameExpr.text) { break; - } + } + if (!inAmbientModule || !ts.isExternalModuleNameRelative(moduleNameExpr.text)) { + (imports || (imports = [])).push(moduleNameExpr); + } + break; + case 221: + if (ts.isAmbientModule(node) && (inAmbientModule || node.flags & 4 || ts.isDeclarationFile(file))) { + var moduleName = node.name; + if (isExternalModuleFile || (inAmbientModule && !ts.isExternalModuleNameRelative(moduleName.text))) { + (moduleAugmentations || (moduleAugmentations = [])).push(moduleName); + } + else if (!inAmbientModule) { + for (var _i = 0, _a = node.body.statements; _i < _a.length; _i++) { + var statement = _a[_i]; + collectModuleReferences(statement, true); + } + } + } } - if (isJavaScriptFile) { - if (ts.isRequireCall(node)) { - (imports || (imports = [])).push(node.arguments[0]); - } - else { - ts.forEachChild(node, function (node) { return collect(node, allowRelativeModuleNames, true); }); - } + } + function collectRequireCalls(node) { + if (ts.isRequireCall(node)) { + (imports || (imports = [])).push(node.arguments[0]); + } + else { + ts.forEachChild(node, collectRequireCalls); } } } @@ -32887,14 +33294,17 @@ var ts; } function processImportedModules(file, basePath) { collectExternalModuleReferences(file); - if (file.imports.length) { + if (file.imports.length || file.moduleAugmentations.length) { file.resolvedModules = {}; - var moduleNames = ts.map(file.imports, function (name) { return name.text; }); + var moduleNames = ts.map(ts.concatenate(file.imports, file.moduleAugmentations), getTextOfLiteral); var resolutions = resolveModuleNamesWorker(moduleNames, ts.getNormalizedAbsolutePath(file.fileName, currentDirectory)); - for (var i = 0; i < file.imports.length; i++) { + for (var i = 0; i < moduleNames.length; i++) { var resolution = resolutions[i]; ts.setResolvedModule(file, moduleNames[i], resolution); - if (resolution && !options.noResolve) { + var shouldAddFile = resolution && + !options.noResolve && + i < file.imports.length; + if (shouldAddFile) { var importedFile = findSourceFile(resolution.resolvedFileName, ts.toPath(resolution.resolvedFileName, currentDirectory, getCanonicalFileName), false, file, ts.skipTrivia(file.text, file.imports[i].pos), file.imports[i].end); if (importedFile && resolution.isExternalLibraryImport) { if (!ts.isExternalModule(importedFile)) { @@ -33117,6 +33527,9 @@ var ts; startNode.getStart(sourceFile); return ts.createTextSpanFromBounds(start, (endNode || startNode).getEnd()); } + function textSpanEndingAtNextToken(startNode, previousTokenToFindNextEndToken) { + return textSpan(startNode, ts.findNextToken(previousTokenToFindNextEndToken, previousTokenToFindNextEndToken.parent)); + } function spanInNodeIfStartsOnSameLine(node, otherwiseOnNode) { if (node && lineOfPosition === sourceFile.getLineAndCharacterOfPosition(node.getStart(sourceFile)).line) { return spanInNode(node); @@ -33134,104 +33547,90 @@ var ts; } function spanInNode(node) { if (node) { - if (ts.isExpression(node)) { - if (node.parent.kind === 199) { - return spanInPreviousNode(node); - } - if (node.parent.kind === 139) { - return spanInNode(node.parent); - } - if (node.parent.kind === 201) { - return textSpan(node); - } - if (node.parent.kind === 183 && node.parent.operatorToken.kind === 24) { - return textSpan(node); - } - if (node.parent.kind === 176 && node.parent.body === node) { - return textSpan(node); - } - } switch (node.kind) { - case 195: + case 196: return spanInVariableDeclaration(node.declarationList.declarations[0]); - case 213: - case 141: - case 140: - return spanInVariableDeclaration(node); - case 138: - return spanInParameterDeclaration(node); - case 215: - case 143: + case 214: case 142: - case 145: - case 146: + case 141: + return spanInVariableDeclaration(node); + case 139: + return spanInParameterDeclaration(node); + case 216: case 144: - case 175: + case 143: + case 146: + case 147: + case 145: case 176: + case 177: return spanInFunctionDeclaration(node); - case 194: + case 195: if (ts.isFunctionBlock(node)) { return spanInFunctionBlock(node); } - case 221: + case 222: return spanInBlock(node); - case 246: + case 247: return spanInBlock(node.block); - case 197: - return textSpan(node.expression); - case 206: - return textSpan(node.getChildAt(0), node.expression); - case 200: - return textSpan(node, ts.findNextToken(node.expression, node)); - case 199: - return spanInNode(node.statement); - case 212: - return textSpan(node.getChildAt(0)); case 198: - return textSpan(node, ts.findNextToken(node.expression, node)); - case 209: - return spanInNode(node.statement); - case 205: - case 204: - return textSpan(node.getChildAt(0), node.label); + return textSpan(node.expression); + case 207: + return textSpan(node.getChildAt(0), node.expression); case 201: - return spanInForStatement(node); - case 202: - case 203: - return textSpan(node, ts.findNextToken(node.expression, node)); - case 208: - return textSpan(node, ts.findNextToken(node.expression, node)); - case 243: - case 244: - return spanInNode(node.statements[0]); - case 211: - return spanInBlock(node.tryBlock); + return textSpanEndingAtNextToken(node, node.expression); + case 200: + return spanInNode(node.statement); + case 213: + return textSpan(node.getChildAt(0)); + case 199: + return textSpanEndingAtNextToken(node, node.expression); case 210: + return spanInNode(node.statement); + case 206: + case 205: + return textSpan(node.getChildAt(0), node.label); + case 202: + return spanInForStatement(node); + case 203: + return textSpanEndingAtNextToken(node, node.expression); + case 204: + return spanInInitializerOfForLike(node); + case 209: + return textSpanEndingAtNextToken(node, node.expression); + case 244: + case 245: + return spanInNode(node.statements[0]); + case 212: + return spanInBlock(node.tryBlock); + case 211: return textSpan(node, node.expression); - case 229: - return textSpan(node, node.expression); - case 223: - return textSpan(node, node.moduleReference); - case 224: - return textSpan(node, node.moduleSpecifier); case 230: + return textSpan(node, node.expression); + case 224: + return textSpan(node, node.moduleReference); + case 225: return textSpan(node, node.moduleSpecifier); - case 220: + case 231: + return textSpan(node, node.moduleSpecifier); + case 221: if (ts.getModuleInstanceState(node) !== 1) { return undefined; } - case 216: - case 219: - case 249: - case 170: - case 171: - return textSpan(node); - case 207: - return spanInNode(node.statement); - case 139: - return spanInNodeArray(node.parent.decorators); case 217: + case 220: + case 250: + case 166: + return textSpan(node); + case 208: + return spanInNode(node.statement); + case 140: + return spanInNodeArray(node.parent.decorators); + case 164: + case 165: + return spanInBindingPattern(node); case 218: + case 219: return undefined; case 23: case 1: @@ -33242,6 +33641,8 @@ var ts; return spanInOpenBraceToken(node); case 16: return spanInCloseBraceToken(node); + case 20: + return spanInCloseBracketToken(node); case 17: return spanInOpenParenToken(node); case 18: @@ -33257,48 +33658,108 @@ var ts; case 72: case 85: return spanInNextNode(node); + case 135: + return spanInOfKeyword(node); default: - if (node.parent.kind === 247 && node.parent.name === node) { + if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node)) { + return spanInArrayLiteralOrObjectLiteralDestructuringPattern(node); + } + if ((node.kind === 69 || + node.kind == 188 || + node.kind === 248 || + node.kind === 249) && + ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) { + return textSpan(node); + } + if (node.kind === 184) { + var binaryExpression = node; + if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left)) { + return spanInArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left); + } + if (binaryExpression.operatorToken.kind === 56 && + ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.parent)) { + return textSpan(node); + } + if (binaryExpression.operatorToken.kind === 24) { + return spanInNode(binaryExpression.left); + } + } + if (ts.isExpression(node)) { + switch (node.parent.kind) { + case 200: + return spanInPreviousNode(node); + case 140: + return spanInNode(node.parent); + case 202: + case 204: + return textSpan(node); + case 184: + if (node.parent.operatorToken.kind === 24) { + return textSpan(node); + } + break; + case 177: + if (node.parent.body === node) { + return textSpan(node); + } + break; + } + } + if (node.parent.kind === 248 && + node.parent.name === node && + !ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.parent)) { return spanInNode(node.parent.initializer); } - if (node.parent.kind === 173 && node.parent.type === node) { - return spanInNode(node.parent.expression); + if (node.parent.kind === 174 && node.parent.type === node) { + return spanInNextNode(node.parent.type); } if (ts.isFunctionLike(node.parent) && node.parent.type === node) { return spanInPreviousNode(node); } + if ((node.parent.kind === 214 || + node.parent.kind === 139)) { + var paramOrVarDecl = node.parent; + if (paramOrVarDecl.initializer === node || + paramOrVarDecl.type === node || + ts.isAssignmentOperator(node.kind)) { + return spanInPreviousNode(node); + } + } + if (node.parent.kind === 184) { + var binaryExpression = node.parent; + if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left) && + (binaryExpression.right === node || + binaryExpression.operatorToken === node)) { + return spanInPreviousNode(node); + } + } return spanInNode(node.parent); } } + function textSpanFromVariableDeclaration(variableDeclaration) { + var declarations = variableDeclaration.parent.declarations; + if (declarations && declarations[0] === variableDeclaration) { + return textSpan(ts.findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent), variableDeclaration); + } + else { + return textSpan(variableDeclaration); + } + } function spanInVariableDeclaration(variableDeclaration) { - if (variableDeclaration.parent.parent.kind === 202 || - variableDeclaration.parent.parent.kind === 203) { + if (variableDeclaration.parent.parent.kind === 203) { return spanInNode(variableDeclaration.parent.parent); } - var isParentVariableStatement = variableDeclaration.parent.parent.kind === 195; - var isDeclarationOfForStatement = variableDeclaration.parent.parent.kind === 201 && ts.contains(variableDeclaration.parent.parent.initializer.declarations, variableDeclaration); - var declarations = isParentVariableStatement - ? variableDeclaration.parent.parent.declarationList.declarations - : isDeclarationOfForStatement - ? variableDeclaration.parent.parent.initializer.declarations - : undefined; - if (variableDeclaration.initializer || (variableDeclaration.flags & 2)) { - if (declarations && declarations[0] === variableDeclaration) { - if (isParentVariableStatement) { - return textSpan(variableDeclaration.parent, variableDeclaration); - } - else { - ts.Debug.assert(isDeclarationOfForStatement); - return textSpan(ts.findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent), variableDeclaration); - } - } - else { - return textSpan(variableDeclaration); - } + if (ts.isBindingPattern(variableDeclaration.name)) { + return spanInBindingPattern(variableDeclaration.name); } - else if (declarations && declarations[0] !== variableDeclaration) { - var indexOfCurrentDeclaration = ts.indexOf(declarations, variableDeclaration); - return spanInVariableDeclaration(declarations[indexOfCurrentDeclaration - 1]); + if (variableDeclaration.initializer || + (variableDeclaration.flags & 2) || + variableDeclaration.parent.parent.kind === 204) { + return textSpanFromVariableDeclaration(variableDeclaration); + } + var declarations = variableDeclaration.parent.declarations; + if (declarations && declarations[0] !== variableDeclaration) { + return spanInNode(ts.findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent)); } } function canHaveSpanInParameterDeclaration(parameter) { @@ -33306,7 +33767,10 @@ var ts; !!(parameter.flags & 8) || !!(parameter.flags & 16); } function spanInParameterDeclaration(parameter) { - if (canHaveSpanInParameterDeclaration(parameter)) { + if (ts.isBindingPattern(parameter.name)) { + return spanInBindingPattern(parameter.name); + } + else if (canHaveSpanInParameterDeclaration(parameter)) { return textSpan(parameter); } else { @@ -33322,7 +33786,7 @@ var ts; } function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) { return !!(functionDeclaration.flags & 2) || - (functionDeclaration.parent.kind === 216 && functionDeclaration.kind !== 144); + (functionDeclaration.parent.kind === 217 && functionDeclaration.kind !== 145); } function spanInFunctionDeclaration(functionDeclaration) { if (!functionDeclaration.body) { @@ -33342,31 +33806,34 @@ var ts; } function spanInBlock(block) { switch (block.parent.kind) { - case 220: + case 221: if (ts.getModuleInstanceState(block.parent) !== 1) { return undefined; } - case 200: - case 198: - case 202: + case 201: + case 199: case 203: return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]); - case 201: + case 202: + case 204: return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]); } return spanInNode(block.statements[0]); } + function spanInInitializerOfForLike(forLikeStaement) { + if (forLikeStaement.initializer.kind === 215) { + var variableDeclarationList = forLikeStaement.initializer; + if (variableDeclarationList.declarations.length > 0) { + return spanInNode(variableDeclarationList.declarations[0]); + } + } + else { + return spanInNode(forLikeStaement.initializer); + } + } function spanInForStatement(forStatement) { if (forStatement.initializer) { - if (forStatement.initializer.kind === 214) { - var variableDeclarationList = forStatement.initializer; - if (variableDeclarationList.declarations.length > 0) { - return spanInNode(variableDeclarationList.declarations[0]); - } - } - else { - return spanInNode(forStatement.initializer); - } + return spanInInitializerOfForLike(forStatement); } if (forStatement.condition) { return textSpan(forStatement.condition); @@ -33375,84 +33842,142 @@ var ts; return textSpan(forStatement.incrementor); } } + function spanInBindingPattern(bindingPattern) { + var firstBindingElement = ts.forEach(bindingPattern.elements, function (element) { return element.kind !== 190 ? element : undefined; }); + if (firstBindingElement) { + return spanInNode(firstBindingElement); + } + if (bindingPattern.parent.kind === 166) { + return textSpan(bindingPattern.parent); + } + return textSpanFromVariableDeclaration(bindingPattern.parent); + } + function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node) { + ts.Debug.assert(node.kind !== 165 && node.kind !== 164); + var elements = node.kind === 167 ? + node.elements : + node.properties; + var firstBindingElement = ts.forEach(elements, function (element) { return element.kind !== 190 ? element : undefined; }); + if (firstBindingElement) { + return spanInNode(firstBindingElement); + } + return textSpan(node.parent.kind === 184 ? node.parent : node); + } function spanInOpenBraceToken(node) { switch (node.parent.kind) { - case 219: + case 220: var enumDeclaration = node.parent; return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile)); - case 216: + case 217: var classDeclaration = node.parent; return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile)); - case 222: + case 223: return spanInNodeIfStartsOnSameLine(node.parent.parent, node.parent.clauses[0]); } return spanInNode(node.parent); } function spanInCloseBraceToken(node) { switch (node.parent.kind) { - case 221: + case 222: if (ts.getModuleInstanceState(node.parent.parent) !== 1) { return undefined; } - case 219: - case 216: + case 220: + case 217: return textSpan(node); - case 194: + case 195: if (ts.isFunctionBlock(node.parent)) { return textSpan(node); } - case 246: + case 247: return spanInNode(ts.lastOrUndefined(node.parent.statements)); - case 222: + case 223: var caseBlock = node.parent; var lastClause = ts.lastOrUndefined(caseBlock.clauses); if (lastClause) { return spanInNode(ts.lastOrUndefined(lastClause.statements)); } return undefined; + case 164: + var bindingPattern = node.parent; + return spanInNode(ts.lastOrUndefined(bindingPattern.elements) || bindingPattern); default: + if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) { + var objectLiteral = node.parent; + return textSpan(ts.lastOrUndefined(objectLiteral.properties) || objectLiteral); + } + return spanInNode(node.parent); + } + } + function spanInCloseBracketToken(node) { + switch (node.parent.kind) { + case 165: + var bindingPattern = node.parent; + return textSpan(ts.lastOrUndefined(bindingPattern.elements) || bindingPattern); + default: + if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) { + var arrayLiteral = node.parent; + return textSpan(ts.lastOrUndefined(arrayLiteral.elements) || arrayLiteral); + } return spanInNode(node.parent); } } function spanInOpenParenToken(node) { - if (node.parent.kind === 199) { + if (node.parent.kind === 200 || + node.parent.kind === 171 || + node.parent.kind === 172) { return spanInPreviousNode(node); } + if (node.parent.kind === 175) { + return spanInNextNode(node); + } return spanInNode(node.parent); } function spanInCloseParenToken(node) { switch (node.parent.kind) { - case 175: - case 215: case 176: - case 143: - case 142: - case 145: - case 146: + case 216: + case 177: case 144: - case 200: - case 199: + case 143: + case 146: + case 147: + case 145: case 201: + case 200: + case 202: + case 204: + case 171: + case 172: + case 175: return spanInPreviousNode(node); default: return spanInNode(node.parent); } } function spanInColonToken(node) { - if (ts.isFunctionLike(node.parent) || node.parent.kind === 247) { + if (ts.isFunctionLike(node.parent) || + node.parent.kind === 248 || + node.parent.kind === 139) { return spanInPreviousNode(node); } return spanInNode(node.parent); } function spanInGreaterThanOrLessThanToken(node) { - if (node.parent.kind === 173) { - return spanInNode(node.parent.expression); + if (node.parent.kind === 174) { + return spanInNextNode(node); } return spanInNode(node.parent); } function spanInWhileKeyword(node) { - if (node.parent.kind === 199) { - return textSpan(node, ts.findNextToken(node.parent.expression, node.parent)); + if (node.parent.kind === 200) { + return textSpanEndingAtNextToken(node, node.parent.expression); + } + return spanInNode(node.parent); + } + function spanInOfKeyword(node) { + if (node.parent.kind === 204) { + return spanInNextNode(node); } return spanInNode(node.parent); } @@ -33529,7 +34054,7 @@ var ts; } } function autoCollapse(node) { - return ts.isFunctionBlock(node) && node.parent.kind !== 176; + return ts.isFunctionBlock(node) && node.parent.kind !== 177; } var depth = 0; var maxDepth = 20; @@ -33541,26 +34066,26 @@ var ts; addOutliningForLeadingCommentsForNode(n); } switch (n.kind) { - case 194: + case 195: if (!ts.isFunctionBlock(n)) { - var parent_7 = n.parent; + var parent_8 = n.parent; var openBrace = ts.findChildOfKind(n, 15, sourceFile); var closeBrace = ts.findChildOfKind(n, 16, sourceFile); - if (parent_7.kind === 199 || - parent_7.kind === 202 || - parent_7.kind === 203 || - parent_7.kind === 201 || - parent_7.kind === 198 || - parent_7.kind === 200 || - parent_7.kind === 207 || - parent_7.kind === 246) { - addOutliningSpan(parent_7, openBrace, closeBrace, autoCollapse(n)); + if (parent_8.kind === 200 || + parent_8.kind === 203 || + parent_8.kind === 204 || + parent_8.kind === 202 || + parent_8.kind === 199 || + parent_8.kind === 201 || + parent_8.kind === 208 || + parent_8.kind === 247) { + addOutliningSpan(parent_8, openBrace, closeBrace, autoCollapse(n)); break; } - if (parent_7.kind === 211) { - var tryStatement = parent_7; + if (parent_8.kind === 212) { + var tryStatement = parent_8; if (tryStatement.tryBlock === n) { - addOutliningSpan(parent_7, openBrace, closeBrace, autoCollapse(n)); + addOutliningSpan(parent_8, openBrace, closeBrace, autoCollapse(n)); break; } else if (tryStatement.finallyBlock === n) { @@ -33580,23 +34105,23 @@ var ts; }); break; } - case 221: { + case 222: { var openBrace = ts.findChildOfKind(n, 15, sourceFile); var closeBrace = ts.findChildOfKind(n, 16, sourceFile); addOutliningSpan(n.parent, openBrace, closeBrace, autoCollapse(n)); break; } - case 216: case 217: - case 219: - case 167: - case 222: { + case 218: + case 220: + case 168: + case 223: { var openBrace = ts.findChildOfKind(n, 15, sourceFile); var closeBrace = ts.findChildOfKind(n, 16, sourceFile); addOutliningSpan(n, openBrace, closeBrace, autoCollapse(n)); break; } - case 166: + case 167: var openBracket = ts.findChildOfKind(n, 19, sourceFile); var closeBracket = ts.findChildOfKind(n, 20, sourceFile); addOutliningSpan(n, openBracket, closeBracket, autoCollapse(n)); @@ -33623,10 +34148,10 @@ var ts; ts.forEach(program.getSourceFiles(), function (sourceFile) { cancellationToken.throwIfCancellationRequested(); var nameToDeclarations = sourceFile.getNamedDeclarations(); - for (var name_28 in nameToDeclarations) { - var declarations = ts.getProperty(nameToDeclarations, name_28); + for (var name_31 in nameToDeclarations) { + var declarations = ts.getProperty(nameToDeclarations, name_31); if (declarations) { - var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name_28); + var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name_31); if (!matches) { continue; } @@ -33637,14 +34162,14 @@ var ts; if (!containers) { return undefined; } - matches = patternMatcher.getMatches(containers, name_28); + matches = patternMatcher.getMatches(containers, name_31); if (!matches) { continue; } } var fileName = sourceFile.fileName; var matchKind = bestMatchKind(matches); - rawItems.push({ name: name_28, fileName: fileName, matchKind: matchKind, isCaseSensitive: allMatchesAreCaseSensitive(matches), declaration: declaration }); + rawItems.push({ name: name_31, fileName: fileName, matchKind: matchKind, isCaseSensitive: allMatchesAreCaseSensitive(matches), declaration: declaration }); } } } @@ -33681,7 +34206,7 @@ var ts; if (text !== undefined) { containers.unshift(text); } - else if (declaration.name.kind === 136) { + else if (declaration.name.kind === 137) { return tryAddComputedPropertyName(declaration.name.expression, containers, true); } else { @@ -33698,7 +34223,7 @@ var ts; } return true; } - if (expression.kind === 168) { + if (expression.kind === 169) { var propertyAccess = expression; if (includeLastPortion) { containers.unshift(propertyAccess.name.text); @@ -33709,7 +34234,7 @@ var ts; } function getContainers(declaration) { var containers = []; - if (declaration.name.kind === 136) { + if (declaration.name.kind === 137) { if (!tryAddComputedPropertyName(declaration.name.expression, containers, false)) { return undefined; } @@ -33771,14 +34296,14 @@ var ts; var current = node.parent; while (current) { switch (current.kind) { - case 220: + case 221: do { current = current.parent; - } while (current.kind === 220); - case 216: - case 219: + } while (current.kind === 221); case 217: - case 215: + case 220: + case 218: + case 216: indent++; } current = current.parent; @@ -33789,26 +34314,26 @@ var ts; var childNodes = []; function visit(node) { switch (node.kind) { - case 195: + case 196: ts.forEach(node.declarationList.declarations, visit); break; - case 163: case 164: + case 165: ts.forEach(node.elements, visit); break; - case 230: + case 231: if (node.exportClause) { ts.forEach(node.exportClause.elements, visit); } break; - case 224: + case 225: var importClause = node.importClause; if (importClause) { if (importClause.name) { childNodes.push(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 226) { + if (importClause.namedBindings.kind === 227) { childNodes.push(importClause.namedBindings); } else { @@ -33817,20 +34342,20 @@ var ts; } } break; - case 165: - case 213: + case 166: + case 214: if (ts.isBindingPattern(node.name)) { visit(node.name); break; } - case 216: - case 219: case 217: case 220: - case 215: - case 223: - case 228: - case 232: + case 218: + case 221: + case 216: + case 224: + case 229: + case 233: childNodes.push(node); break; } @@ -33865,17 +34390,17 @@ var ts; for (var _i = 0, nodes_4 = nodes; _i < nodes_4.length; _i++) { var node = nodes_4[_i]; switch (node.kind) { - case 216: - case 219: case 217: + case 220: + case 218: topLevelNodes.push(node); break; - case 220: + case 221: var moduleDeclaration = node; topLevelNodes.push(node); addTopLevelNodes(getInnermostModule(moduleDeclaration).body.statements, topLevelNodes); break; - case 215: + case 216: var functionDeclaration = node; if (isTopLevelFunctionDeclaration(functionDeclaration)) { topLevelNodes.push(node); @@ -33886,9 +34411,9 @@ var ts; } } function isTopLevelFunctionDeclaration(functionDeclaration) { - if (functionDeclaration.kind === 215) { - if (functionDeclaration.body && functionDeclaration.body.kind === 194) { - if (ts.forEach(functionDeclaration.body.statements, function (s) { return s.kind === 215 && !isEmpty(s.name.text); })) { + if (functionDeclaration.kind === 216) { + if (functionDeclaration.body && functionDeclaration.body.kind === 195) { + if (ts.forEach(functionDeclaration.body.statements, function (s) { return s.kind === 216 && !isEmpty(s.name.text); })) { return true; } if (!ts.isFunctionBlock(functionDeclaration.parent)) { @@ -33941,7 +34466,7 @@ var ts; } function createChildItem(node) { switch (node.kind) { - case 138: + case 139: if (ts.isBindingPattern(node.name)) { break; } @@ -33949,34 +34474,34 @@ var ts; return undefined; } return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberVariableElement); + case 144: case 143: - case 142: return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberFunctionElement); - case 145: - return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberGetAccessorElement); case 146: - return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberSetAccessorElement); - case 149: - return createItem(node, "[]", ts.ScriptElementKind.indexSignatureElement); - case 249: - return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberVariableElement); + return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberGetAccessorElement); case 147: - return createItem(node, "()", ts.ScriptElementKind.callSignatureElement); - case 148: - return createItem(node, "new()", ts.ScriptElementKind.constructSignatureElement); - case 141: - case 140: + return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberSetAccessorElement); + case 150: + return createItem(node, "[]", ts.ScriptElementKind.indexSignatureElement); + case 250: return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberVariableElement); - case 215: + case 148: + return createItem(node, "()", ts.ScriptElementKind.callSignatureElement); + case 149: + return createItem(node, "new()", ts.ScriptElementKind.constructSignatureElement); + case 142: + case 141: + return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberVariableElement); + case 216: return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.functionElement); - case 213: - case 165: + case 214: + case 166: var variableDeclarationNode; - var name_29; - if (node.kind === 165) { - name_29 = node.name; + var name_32; + if (node.kind === 166) { + name_32 = node.name; variableDeclarationNode = node; - while (variableDeclarationNode && variableDeclarationNode.kind !== 213) { + while (variableDeclarationNode && variableDeclarationNode.kind !== 214) { variableDeclarationNode = variableDeclarationNode.parent; } ts.Debug.assert(variableDeclarationNode !== undefined); @@ -33984,24 +34509,24 @@ var ts; else { ts.Debug.assert(!ts.isBindingPattern(node.name)); variableDeclarationNode = node; - name_29 = node.name; + name_32 = node.name; } if (ts.isConst(variableDeclarationNode)) { - return createItem(node, getTextOfNode(name_29), ts.ScriptElementKind.constElement); + return createItem(node, getTextOfNode(name_32), ts.ScriptElementKind.constElement); } else if (ts.isLet(variableDeclarationNode)) { - return createItem(node, getTextOfNode(name_29), ts.ScriptElementKind.letElement); + return createItem(node, getTextOfNode(name_32), ts.ScriptElementKind.letElement); } else { - return createItem(node, getTextOfNode(name_29), ts.ScriptElementKind.variableElement); + return createItem(node, getTextOfNode(name_32), ts.ScriptElementKind.variableElement); } - case 144: + case 145: return createItem(node, "constructor", ts.ScriptElementKind.constructorImplementationElement); - case 232: - case 228: - case 223: - case 225: + case 233: + case 229: + case 224: case 226: + case 227: return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.alias); } return undefined; @@ -34031,27 +34556,27 @@ var ts; } function createTopLevelItem(node) { switch (node.kind) { - case 250: + case 251: return createSourceFileItem(node); - case 216: - return createClassItem(node); - case 219: - return createEnumItem(node); case 217: - return createIterfaceItem(node); + return createClassItem(node); case 220: + return createEnumItem(node); + case 218: + return createIterfaceItem(node); + case 221: return createModuleItem(node); - case 215: + case 216: return createFunctionItem(node); } return undefined; function getModuleName(moduleDeclaration) { - if (moduleDeclaration.name.kind === 9) { + if (ts.isAmbientModule(moduleDeclaration)) { return getTextOfNode(moduleDeclaration.name); } var result = []; result.push(moduleDeclaration.name.text); - while (moduleDeclaration.body && moduleDeclaration.body.kind === 220) { + while (moduleDeclaration.body && moduleDeclaration.body.kind === 221) { moduleDeclaration = moduleDeclaration.body; result.push(moduleDeclaration.name.text); } @@ -34063,7 +34588,7 @@ var ts; return getNavigationBarItem(moduleName, ts.ScriptElementKind.moduleElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node)); } function createFunctionItem(node) { - if (node.body && node.body.kind === 194) { + if (node.body && node.body.kind === 195) { var childItems = getItemsWorker(sortNodes(node.body.statements), createChildItem); return getNavigationBarItem(!node.name ? "default" : node.name.text, ts.ScriptElementKind.functionElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node)); } @@ -34084,7 +34609,7 @@ var ts; var childItems; if (node.members) { var constructor = ts.forEach(node.members, function (member) { - return member.kind === 144 && member; + return member.kind === 145 && member; }); var nodes = removeDynamicallyNamedProperties(node); if (constructor) { @@ -34105,19 +34630,19 @@ var ts; } } function removeComputedProperties(node) { - return ts.filter(node.members, function (member) { return member.name === undefined || member.name.kind !== 136; }); + return ts.filter(node.members, function (member) { return member.name === undefined || member.name.kind !== 137; }); } function removeDynamicallyNamedProperties(node) { return ts.filter(node.members, function (member) { return !ts.hasDynamicName(member); }); } function getInnermostModule(node) { - while (node.body.kind === 220) { + while (node.body.kind === 221) { node = node.body; } return node; } function getNodeSpan(node) { - return node.kind === 250 + return node.kind === 251 ? ts.createTextSpanFromBounds(node.getFullStart(), node.getEnd()) : ts.createTextSpanFromBounds(node.getStart(), node.getEnd()); } @@ -34572,14 +35097,14 @@ var ts; } return createSignatureHelpItems(candidates, resolvedSignature, argumentInfo); function createJavaScriptSignatureHelpItems(argumentInfo) { - if (argumentInfo.invocation.kind !== 170) { + if (argumentInfo.invocation.kind !== 171) { return undefined; } var callExpression = argumentInfo.invocation; var expression = callExpression.expression; var name = expression.kind === 69 ? expression - : expression.kind === 168 + : expression.kind === 169 ? expression.name : undefined; if (!name || !name.text) { @@ -34608,7 +35133,7 @@ var ts; } } function getImmediatelyContainingArgumentInfo(node) { - if (node.parent.kind === 170 || node.parent.kind === 171) { + if (node.parent.kind === 171 || node.parent.kind === 172) { var callExpression = node.parent; if (node.kind === 25 || node.kind === 17) { @@ -34639,23 +35164,23 @@ var ts; }; } } - else if (node.kind === 11 && node.parent.kind === 172) { + else if (node.kind === 11 && node.parent.kind === 173) { if (ts.isInsideTemplateLiteral(node, position)) { return getArgumentListInfoForTemplate(node.parent, 0); } } - else if (node.kind === 12 && node.parent.parent.kind === 172) { + else if (node.kind === 12 && node.parent.parent.kind === 173) { var templateExpression = node.parent; var tagExpression = templateExpression.parent; - ts.Debug.assert(templateExpression.kind === 185); + ts.Debug.assert(templateExpression.kind === 186); var argumentIndex = ts.isInsideTemplateLiteral(node, position) ? 0 : 1; return getArgumentListInfoForTemplate(tagExpression, argumentIndex); } - else if (node.parent.kind === 192 && node.parent.parent.parent.kind === 172) { + else if (node.parent.kind === 193 && node.parent.parent.parent.kind === 173) { var templateSpan = node.parent; var templateExpression = templateSpan.parent; var tagExpression = templateExpression.parent; - ts.Debug.assert(templateExpression.kind === 185); + ts.Debug.assert(templateExpression.kind === 186); if (node.kind === 14 && !ts.isInsideTemplateLiteral(node, position)) { return undefined; } @@ -34719,7 +35244,7 @@ var ts; var template = taggedTemplate.template; var applicableSpanStart = template.getStart(); var applicableSpanEnd = template.getEnd(); - if (template.kind === 185) { + if (template.kind === 186) { var lastSpan = ts.lastOrUndefined(template.templateSpans); if (lastSpan.literal.getFullWidth() === 0) { applicableSpanEnd = ts.skipTrivia(sourceFile.text, applicableSpanEnd, false); @@ -34728,7 +35253,7 @@ var ts; return ts.createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart); } function getContainingArgumentInfo(node) { - for (var n = node; n.kind !== 250; n = n.parent) { + for (var n = node; n.kind !== 251; n = n.parent) { if (ts.isFunctionBlock(n)) { return undefined; } @@ -34908,39 +35433,39 @@ var ts; return false; } switch (n.kind) { - case 216: case 217: - case 219: - case 167: - case 163: - case 155: - case 194: - case 221: + case 218: + case 220: + case 168: + case 164: + case 156: + case 195: case 222: + case 223: return nodeEndsWith(n, 16, sourceFile); - case 246: + case 247: return isCompletedNode(n.block, sourceFile); - case 171: + case 172: if (!n.arguments) { return true; } - case 170: - case 174: - case 160: + case 171: + case 175: + case 161: return nodeEndsWith(n, 18, sourceFile); - case 152: case 153: + case 154: return isCompletedNode(n.type, sourceFile); - case 144: case 145: case 146: - case 215: - case 175: - case 143: - case 142: - case 148: case 147: + case 216: case 176: + case 144: + case 143: + case 149: + case 148: + case 177: if (n.body) { return isCompletedNode(n.body, sourceFile); } @@ -34948,62 +35473,62 @@ var ts; return isCompletedNode(n.type, sourceFile); } return hasChildOfKind(n, 18, sourceFile); - case 220: + case 221: return n.body && isCompletedNode(n.body, sourceFile); - case 198: + case 199: if (n.elseStatement) { return isCompletedNode(n.elseStatement, sourceFile); } return isCompletedNode(n.thenStatement, sourceFile); - case 197: + case 198: return isCompletedNode(n.expression, sourceFile) || hasChildOfKind(n, 23); - case 166: - case 164: - case 169: - case 136: - case 157: + case 167: + case 165: + case 170: + case 137: + case 158: return nodeEndsWith(n, 20, sourceFile); - case 149: + case 150: if (n.type) { return isCompletedNode(n.type, sourceFile); } return hasChildOfKind(n, 20, sourceFile); - case 243: case 244: + case 245: return false; - case 201: case 202: case 203: - case 200: + case 204: + case 201: return isCompletedNode(n.statement, sourceFile); - case 199: + case 200: var hasWhileKeyword = findChildOfKind(n, 104, sourceFile); if (hasWhileKeyword) { return nodeEndsWith(n, 18, sourceFile); } return isCompletedNode(n.statement, sourceFile); - case 154: + case 155: return isCompletedNode(n.exprName, sourceFile); - case 178: - case 177: case 179: - case 186: + case 178: + case 180: case 187: + case 188: var unaryWordExpression = n; return isCompletedNode(unaryWordExpression.expression, sourceFile); - case 172: + case 173: return isCompletedNode(n.template, sourceFile); - case 185: + case 186: var lastSpan = ts.lastOrUndefined(n.templateSpans); return isCompletedNode(lastSpan, sourceFile); - case 192: + case 193: return ts.nodeIsPresent(n.literal); - case 181: + case 182: return isCompletedNode(n.operand, sourceFile); - case 183: - return isCompletedNode(n.right, sourceFile); case 184: + return isCompletedNode(n.right, sourceFile); + case 185: return isCompletedNode(n.whenFalse, sourceFile); default: return true; @@ -35046,7 +35571,7 @@ var ts; ts.findChildOfKind = findChildOfKind; function findContainingList(node) { var syntaxList = ts.forEach(node.parent.getChildren(), function (c) { - if (c.kind === 273 && c.pos <= node.pos && c.end >= node.end) { + if (c.kind === 274 && c.pos <= node.pos && c.end >= node.end) { return c; } }); @@ -35126,7 +35651,7 @@ var ts; function findPrecedingToken(position, sourceFile, startNode) { return find(startNode || sourceFile); function findRightmostToken(n) { - if (isToken(n) || n.kind === 238) { + if (isToken(n) || n.kind === 239) { return n; } var children = n.getChildren(); @@ -35134,16 +35659,16 @@ var ts; return candidate && findRightmostToken(candidate); } function find(n) { - if (isToken(n) || n.kind === 238) { + if (isToken(n) || n.kind === 239) { return n; } var children = n.getChildren(); for (var i = 0, len = children.length; i < len; i++) { var child = children[i]; - if (position < child.end && (nodeHasTokens(child) || child.kind === 238)) { + if (position < child.end && (nodeHasTokens(child) || child.kind === 239)) { var start = child.getStart(sourceFile); var lookInPreviousChild = (start >= position) || - (child.kind === 238 && start === child.end); + (child.kind === 239 && start === child.end); if (lookInPreviousChild) { var candidate = findRightmostChildNodeWithTokens(children, i); return candidate && findRightmostToken(candidate); @@ -35153,7 +35678,7 @@ var ts; } } } - ts.Debug.assert(startNode !== undefined || n.kind === 250); + ts.Debug.assert(startNode !== undefined || n.kind === 251); if (children.length) { var candidate = findRightmostChildNodeWithTokens(children, children.length); return candidate && findRightmostToken(candidate); @@ -35170,7 +35695,7 @@ var ts; ts.findPrecedingToken = findPrecedingToken; function isInString(sourceFile, position) { var token = getTokenAtPosition(sourceFile, position); - return token && (token.kind === 9 || token.kind === 162) && position > token.getStart(); + return token && (token.kind === 9 || token.kind === 163) && position > token.getStart(); } ts.isInString = isInString; function isInComment(sourceFile, position) { @@ -35253,17 +35778,17 @@ var ts; } ts.getNodeModifiers = getNodeModifiers; function getTypeArgumentOrTypeParameterList(node) { - if (node.kind === 151 || node.kind === 170) { + if (node.kind === 152 || node.kind === 171) { return node.typeArguments; } - if (ts.isFunctionLike(node) || node.kind === 216 || node.kind === 217) { + if (ts.isFunctionLike(node) || node.kind === 217 || node.kind === 218) { return node.typeParameters; } return undefined; } ts.getTypeArgumentOrTypeParameterList = getTypeArgumentOrTypeParameterList; function isToken(n) { - return n.kind >= 0 && n.kind <= 134; + return n.kind >= 0 && n.kind <= 135; } ts.isToken = isToken; function isWord(kind) { @@ -35279,7 +35804,7 @@ var ts; ts.isComment = isComment; function isStringOrRegularExpressionOrTemplateLiteral(kind) { if (kind === 9 - || kind === 162 + || kind === 163 || kind === 10 || ts.isTemplateLiteralKind(kind)) { return true; @@ -35322,11 +35847,30 @@ var ts; return true; } ts.compareDataObjects = compareDataObjects; + function isArrayLiteralOrObjectLiteralDestructuringPattern(node) { + if (node.kind === 167 || + node.kind === 168) { + if (node.parent.kind === 184 && + node.parent.left === node && + node.parent.operatorToken.kind === 56) { + return true; + } + if (node.parent.kind === 204 && + node.parent.initializer === node) { + return true; + } + if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 248 ? node.parent.parent : node.parent)) { + return true; + } + } + return false; + } + ts.isArrayLiteralOrObjectLiteralDestructuringPattern = isArrayLiteralOrObjectLiteralDestructuringPattern; })(ts || (ts = {})); var ts; (function (ts) { function isFirstDeclarationOfSymbolParameter(symbol) { - return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === 138; + return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === 139; } ts.isFirstDeclarationOfSymbolParameter = isFirstDeclarationOfSymbolParameter; var displayPartWriter = getDisplayPartWriter(); @@ -35507,7 +36051,7 @@ var ts; ts.getDeclaredName = getDeclaredName; function isImportOrExportSpecifierName(location) { return location.parent && - (location.parent.kind === 228 || location.parent.kind === 232) && + (location.parent.kind === 229 || location.parent.kind === 233) && location.parent.propertyName === location; } ts.isImportOrExportSpecifierName = isImportOrExportSpecifierName; @@ -35609,10 +36153,10 @@ var ts; function shouldRescanJsxIdentifier(node) { if (node.parent) { switch (node.parent.kind) { + case 241: + case 238: case 240: case 237: - case 239: - case 236: return node.kind === 69; } } @@ -36084,41 +36628,41 @@ var ts; } Rules.prototype.getRuleName = function (rule) { var o = this; - for (var name_30 in o) { - if (o[name_30] === rule) { - return name_30; + for (var name_33 in o) { + if (o[name_33] === rule) { + return name_33; } } throw new Error("Unknown rule"); }; Rules.IsForContext = function (context) { - return context.contextNode.kind === 201; + return context.contextNode.kind === 202; }; Rules.IsNotForContext = function (context) { return !Rules.IsForContext(context); }; Rules.IsBinaryOpContext = function (context) { switch (context.contextNode.kind) { - case 183: case 184: - case 191: - case 150: - case 158: + case 185: + case 192: + case 151: case 159: + case 160: return true; - case 165: - case 218: - case 223: - case 213: - case 138: - case 249: + case 166: + case 219: + case 224: + case 214: + case 139: + case 250: + case 142: case 141: - case 140: return context.currentTokenSpan.kind === 56 || context.nextTokenSpan.kind === 56; - case 202: - return context.currentTokenSpan.kind === 90 || context.nextTokenSpan.kind === 90; case 203: - return context.currentTokenSpan.kind === 134 || context.nextTokenSpan.kind === 134; + return context.currentTokenSpan.kind === 90 || context.nextTokenSpan.kind === 90; + case 204: + return context.currentTokenSpan.kind === 135 || context.nextTokenSpan.kind === 135; } return false; }; @@ -36126,7 +36670,7 @@ var ts; return !Rules.IsBinaryOpContext(context); }; Rules.IsConditionalOperatorContext = function (context) { - return context.contextNode.kind === 184; + return context.contextNode.kind === 185; }; Rules.IsSameLineTokenOrBeforeMultilineBlockContext = function (context) { return context.TokensAreOnSameLine() || Rules.IsBeforeMultilineBlockContext(context); @@ -36151,86 +36695,86 @@ var ts; return true; } switch (node.kind) { - case 194: + case 195: + case 223: + case 168: case 222: - case 167: - case 221: return true; } return false; }; Rules.IsFunctionDeclContext = function (context) { switch (context.contextNode.kind) { - case 215: + case 216: + case 144: case 143: - case 142: - case 145: case 146: case 147: - case 175: - case 144: + case 148: case 176: - case 217: + case 145: + case 177: + case 218: return true; } return false; }; Rules.IsFunctionDeclarationOrFunctionExpressionContext = function (context) { - return context.contextNode.kind === 215 || context.contextNode.kind === 175; + return context.contextNode.kind === 216 || context.contextNode.kind === 176; }; Rules.IsTypeScriptDeclWithBlockContext = function (context) { return Rules.NodeIsTypeScriptDeclWithBlockContext(context.contextNode); }; Rules.NodeIsTypeScriptDeclWithBlockContext = function (node) { switch (node.kind) { - case 216: - case 188: case 217: - case 219: - case 155: + case 189: + case 218: case 220: + case 156: + case 221: return true; } return false; }; Rules.IsAfterCodeBlockContext = function (context) { switch (context.currentTokenParent.kind) { - case 216: - case 220: - case 219: - case 194: - case 246: + case 217: case 221: - case 208: + case 220: + case 195: + case 247: + case 222: + case 209: return true; } return false; }; Rules.IsControlDeclContext = function (context) { switch (context.contextNode.kind) { - case 198: - case 208: - case 201: + case 199: + case 209: case 202: case 203: + case 204: + case 201: + case 212: case 200: - case 211: - case 199: - case 207: - case 246: + case 208: + case 247: return true; default: return false; } }; Rules.IsObjectContext = function (context) { - return context.contextNode.kind === 167; + return context.contextNode.kind === 168; }; Rules.IsFunctionCallContext = function (context) { - return context.contextNode.kind === 170; + return context.contextNode.kind === 171; }; Rules.IsNewContext = function (context) { - return context.contextNode.kind === 171; + return context.contextNode.kind === 172; }; Rules.IsFunctionCallOrNewContext = function (context) { return Rules.IsFunctionCallContext(context) || Rules.IsNewContext(context); @@ -36242,7 +36786,7 @@ var ts; return context.nextTokenSpan.kind !== 20; }; Rules.IsArrowFunctionContext = function (context) { - return context.contextNode.kind === 176; + return context.contextNode.kind === 177; }; Rules.IsSameLineTokenContext = function (context) { return context.TokensAreOnSameLine(); @@ -36260,41 +36804,41 @@ var ts; while (ts.isExpression(node)) { node = node.parent; } - return node.kind === 139; + return node.kind === 140; }; Rules.IsStartOfVariableDeclarationList = function (context) { - return context.currentTokenParent.kind === 214 && + return context.currentTokenParent.kind === 215 && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; }; Rules.IsNotFormatOnEnter = function (context) { return context.formattingRequestKind !== 2; }; Rules.IsModuleDeclContext = function (context) { - return context.contextNode.kind === 220; + return context.contextNode.kind === 221; }; Rules.IsObjectTypeContext = function (context) { - return context.contextNode.kind === 155; + return context.contextNode.kind === 156; }; Rules.IsTypeArgumentOrParameterOrAssertion = function (token, parent) { if (token.kind !== 25 && token.kind !== 27) { return false; } switch (parent.kind) { - case 151: - case 173: - case 216: - case 188: + case 152: + case 174: case 217: - case 215: - case 175: + case 189: + case 218: + case 216: case 176: + case 177: + case 144: case 143: - case 142: - case 147: case 148: - case 170: + case 149: case 171: - case 190: + case 172: + case 191: return true; default: return false; @@ -36305,13 +36849,13 @@ var ts; Rules.IsTypeArgumentOrParameterOrAssertion(context.nextTokenSpan, context.nextTokenParent); }; Rules.IsTypeAssertionContext = function (context) { - return context.contextNode.kind === 173; + return context.contextNode.kind === 174; }; Rules.IsVoidOpContext = function (context) { - return context.currentTokenSpan.kind === 103 && context.currentTokenParent.kind === 179; + return context.currentTokenSpan.kind === 103 && context.currentTokenParent.kind === 180; }; Rules.IsYieldOrYieldStarWithOperand = function (context) { - return context.contextNode.kind === 186 && context.contextNode.expression !== undefined; + return context.contextNode.kind === 187 && context.contextNode.expression !== undefined; }; return Rules; }()); @@ -36333,7 +36877,7 @@ var ts; return result; }; RulesMap.prototype.Initialize = function (rules) { - this.mapRowLength = 134 + 1; + this.mapRowLength = 135 + 1; this.map = new Array(this.mapRowLength * this.mapRowLength); var rulesBucketConstructionStateList = new Array(this.map.length); this.FillRules(rules, rulesBucketConstructionStateList); @@ -36509,7 +37053,7 @@ var ts; } TokenAllAccess.prototype.GetTokens = function () { var result = []; - for (var token = 0; token <= 134; token++) { + for (var token = 0; token <= 135; token++) { result.push(token); } return result; @@ -36551,9 +37095,9 @@ var ts; }; TokenRange.Any = TokenRange.AllTokens(); TokenRange.AnyIncludingMultilineComments = TokenRange.FromTokens(TokenRange.Any.GetTokens().concat([3])); - TokenRange.Keywords = TokenRange.FromRange(70, 134); + TokenRange.Keywords = TokenRange.FromRange(70, 135); TokenRange.BinaryOperators = TokenRange.FromRange(25, 68); - TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([90, 91, 134, 116, 124]); + TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([90, 91, 135, 116, 124]); TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([41, 42, 50, 49]); TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([8, 69, 17, 19, 15, 97, 92]); TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([69, 17, 97, 92]); @@ -36740,17 +37284,17 @@ var ts; } function isListElement(parent, node) { switch (parent.kind) { - case 216: case 217: + case 218: return ts.rangeContainsRange(parent.members, node); - case 220: - var body = parent.body; - return body && body.kind === 194 && ts.rangeContainsRange(body.statements, node); - case 250: - case 194: case 221: + var body = parent.body; + return body && body.kind === 195 && ts.rangeContainsRange(body.statements, node); + case 251: + case 195: + case 222: return ts.rangeContainsRange(parent.statements, node); - case 246: + case 247: return ts.rangeContainsRange(parent.block.statements, node); } return false; @@ -36905,18 +37449,18 @@ var ts; return node.modifiers[0].kind; } switch (node.kind) { - case 216: return 73; - case 217: return 107; - case 215: return 87; - case 219: return 219; - case 145: return 123; - case 146: return 129; - case 143: + case 217: return 73; + case 218: return 107; + case 216: return 87; + case 220: return 220; + case 146: return 123; + case 147: return 129; + case 144: if (node.asteriskToken) { return 37; } - case 141: - case 138: + case 142: + case 139: return node.name.kind; } } @@ -37029,7 +37573,7 @@ var ts; consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, child); return inheritedIndentation; } - var effectiveParentStartLine = child.kind === 139 ? childStartLine : undecoratedParentStartLine; + var effectiveParentStartLine = child.kind === 140 ? childStartLine : undecoratedParentStartLine; var childIndentation = computeIndentation(child, childStartLine, childIndentationAmount, node, parentDynamicIndentation, effectiveParentStartLine); processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta); childContextNode = node; @@ -37332,20 +37876,20 @@ var ts; } function isSomeBlock(kind) { switch (kind) { - case 194: - case 221: + case 195: + case 222: return true; } return false; } function getOpenTokenForList(node, list) { switch (node.kind) { - case 144: - case 215: - case 175: - case 143: - case 142: + case 145: + case 216: case 176: + case 144: + case 143: + case 177: if (node.typeParameters === list) { return 25; } @@ -37353,8 +37897,8 @@ var ts; return 17; } break; - case 170: case 171: + case 172: if (node.typeArguments === list) { return 25; } @@ -37362,7 +37906,7 @@ var ts; return 17; } break; - case 151: + case 152: if (node.typeArguments === list) { return 25; } @@ -37463,7 +38007,7 @@ var ts; var lineStart = ts.getLineStartPositionForPosition(current_1, sourceFile); return SmartIndenter.findFirstNonWhitespaceColumn(lineStart, current_1, sourceFile, options); } - if (precedingToken.kind === 24 && precedingToken.parent.kind !== 183) { + if (precedingToken.kind === 24 && precedingToken.parent.kind !== 184) { var actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options); if (actualIndentation !== -1) { return actualIndentation; @@ -37561,7 +38105,7 @@ var ts; } function getActualIndentationForNode(current, parent, currentLineAndChar, parentAndChildShareLine, sourceFile, options) { var useActualIndentation = (ts.isDeclaration(current) || ts.isStatement(current)) && - (parent.kind === 250 || !parentAndChildShareLine); + (parent.kind === 251 || !parentAndChildShareLine); if (!useActualIndentation) { return -1; } @@ -37585,7 +38129,7 @@ var ts; return sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)); } function childStartsOnTheSameLineWithElseInIfStatement(parent, child, childStartLine, sourceFile) { - if (parent.kind === 198 && parent.elseStatement === child) { + if (parent.kind === 199 && parent.elseStatement === child) { var elseKeyword = ts.findChildOfKind(parent, 80, sourceFile); ts.Debug.assert(elseKeyword !== undefined); var elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; @@ -37597,23 +38141,23 @@ var ts; function getContainingList(node, sourceFile) { if (node.parent) { switch (node.parent.kind) { - case 151: + case 152: if (node.parent.typeArguments && ts.rangeContainsStartEnd(node.parent.typeArguments, node.getStart(sourceFile), node.getEnd())) { return node.parent.typeArguments; } break; - case 167: + case 168: return node.parent.properties; - case 166: + case 167: return node.parent.elements; - case 215: - case 175: + case 216: case 176: + case 177: + case 144: case 143: - case 142: - case 147: - case 148: { + case 148: + case 149: { var start = node.getStart(sourceFile); if (node.parent.typeParameters && ts.rangeContainsStartEnd(node.parent.typeParameters, start, node.getEnd())) { @@ -37624,8 +38168,8 @@ var ts; } break; } - case 171: - case 170: { + case 172: + case 171: { var start = node.getStart(sourceFile); if (node.parent.typeArguments && ts.rangeContainsStartEnd(node.parent.typeArguments, start, node.getEnd())) { @@ -37653,8 +38197,8 @@ var ts; if (node.kind === 18) { return -1; } - if (node.parent && (node.parent.kind === 170 || - node.parent.kind === 171) && + if (node.parent && (node.parent.kind === 171 || + node.parent.kind === 172) && node.parent.expression !== node) { var fullCallOrNewExpression = node.parent.expression; var startingExpression = getStartingExpression(fullCallOrNewExpression); @@ -37672,10 +38216,10 @@ var ts; function getStartingExpression(node) { while (true) { switch (node.kind) { - case 170: case 171: - case 168: + case 172: case 169: + case 170: node = node.expression; break; default: @@ -37729,45 +38273,45 @@ var ts; SmartIndenter.findFirstNonWhitespaceColumn = findFirstNonWhitespaceColumn; function nodeContentIsAlwaysIndented(kind) { switch (kind) { - case 197: - case 216: - case 188: + case 198: case 217: - case 219: + case 189: case 218: - case 166: - case 194: - case 221: + case 220: + case 219: case 167: - case 155: - case 157: - case 222: - case 244: - case 243: - case 174: - case 168: - case 170: - case 171: case 195: - case 213: - case 229: - case 206: - case 184: - case 164: - case 163: - case 237: - case 236: - case 242: - case 142: - case 147: - case 148: - case 138: - case 152: - case 153: - case 160: + case 222: + case 168: + case 156: + case 158: + case 223: + case 245: + case 244: + case 175: + case 169: + case 171: case 172: - case 180: - case 227: + case 196: + case 214: + case 230: + case 207: + case 185: + case 165: + case 164: + case 238: + case 237: + case 243: + case 143: + case 148: + case 149: + case 139: + case 153: + case 154: + case 161: + case 173: + case 181: + case 228: return true; } return false; @@ -37775,22 +38319,22 @@ var ts; function nodeWillIndentChild(parent, child, indentByDefault) { var childKind = child ? child.kind : 0; switch (parent.kind) { - case 199: case 200: - case 202: - case 203: case 201: - case 198: - case 215: - case 175: - case 143: + case 203: + case 204: + case 202: + case 199: + case 216: case 176: case 144: + case 177: case 145: case 146: - return childKind !== 194; - case 235: - return childKind !== 239; + case 147: + return childKind !== 195; + case 236: + return childKind !== 240; } return indentByDefault; } @@ -37925,7 +38469,7 @@ var ts; return pos; }; NodeObject.prototype.createSyntaxList = function (nodes) { - var list = createNode(273, nodes.pos, nodes.end, 2048, this); + var list = createNode(274, nodes.pos, nodes.end, 2048, this); list._children = []; var pos = nodes.pos; for (var _i = 0, nodes_7 = nodes; _i < nodes_7.length; _i++) { @@ -37944,7 +38488,7 @@ var ts; NodeObject.prototype.createChildren = function (sourceFile) { var _this = this; var children; - if (this.kind >= 135) { + if (this.kind >= 136) { scanner.setText((sourceFile || this.getSourceFile()).text); children = []; var pos = this.pos; @@ -37991,7 +38535,7 @@ var ts; return undefined; } var child = children[0]; - return child.kind < 135 ? child : child.getFirstToken(sourceFile); + return child.kind < 136 ? child : child.getFirstToken(sourceFile); }; NodeObject.prototype.getLastToken = function (sourceFile) { var children = this.getChildren(sourceFile); @@ -37999,7 +38543,7 @@ var ts; if (!child) { return undefined; } - return child.kind < 135 ? child : child.getLastToken(sourceFile); + return child.kind < 136 ? child : child.getLastToken(sourceFile); }; return NodeObject; }()); @@ -38041,7 +38585,7 @@ var ts; ts.forEach(declarations, function (declaration, indexOfDeclaration) { if (ts.indexOf(declarations, declaration) === indexOfDeclaration) { var sourceFileOfDeclaration = ts.getSourceFileOfNode(declaration); - if (canUseParsedParamTagComments && declaration.kind === 138) { + if (canUseParsedParamTagComments && declaration.kind === 139) { ts.forEach(getJsDocCommentTextRange(declaration.parent, sourceFileOfDeclaration), function (jsDocCommentTextRange) { var cleanedParamJsDocComment = getCleanedParamJsDocComment(jsDocCommentTextRange.pos, jsDocCommentTextRange.end, sourceFileOfDeclaration); if (cleanedParamJsDocComment) { @@ -38049,13 +38593,13 @@ var ts; } }); } - if (declaration.kind === 220 && declaration.body.kind === 220) { + if (declaration.kind === 221 && declaration.body.kind === 221) { return; } - while (declaration.kind === 220 && declaration.parent.kind === 220) { + while (declaration.kind === 221 && declaration.parent.kind === 221) { declaration = declaration.parent; } - ts.forEach(getJsDocCommentTextRange(declaration.kind === 213 ? declaration.parent.parent : declaration, sourceFileOfDeclaration), function (jsDocCommentTextRange) { + ts.forEach(getJsDocCommentTextRange(declaration.kind === 214 ? declaration.parent.parent : declaration, sourceFileOfDeclaration), function (jsDocCommentTextRange) { var cleanedJsDocComment = getCleanedJsDocComment(jsDocCommentTextRange.pos, jsDocCommentTextRange.end, sourceFileOfDeclaration); if (cleanedJsDocComment) { ts.addRange(jsDocCommentParts, cleanedJsDocComment); @@ -38366,9 +38910,9 @@ var ts; if (result_2 !== undefined) { return result_2; } - if (declaration.name.kind === 136) { + if (declaration.name.kind === 137) { var expr = declaration.name.expression; - if (expr.kind === 168) { + if (expr.kind === 169) { return expr.name.text; } return getTextOfIdentifierOrLiteral(expr); @@ -38388,9 +38932,9 @@ var ts; } function visit(node) { switch (node.kind) { - case 215: + case 216: + case 144: case 143: - case 142: var functionDeclaration = node; var declarationName = getDeclarationName(functionDeclaration); if (declarationName) { @@ -38407,62 +38951,62 @@ var ts; ts.forEachChild(node, visit); } break; - case 216: case 217: case 218: case 219: case 220: - case 223: - case 232: - case 228: - case 223: - case 225: - case 226: - case 145: - case 146: - case 155: - addDeclaration(node); - case 144: - case 195: - case 214: - case 163: - case 164: case 221: + case 224: + case 233: + case 229: + case 224: + case 226: + case 227: + case 146: + case 147: + case 156: + addDeclaration(node); + case 145: + case 196: + case 215: + case 164: + case 165: + case 222: ts.forEachChild(node, visit); break; - case 194: + case 195: if (ts.isFunctionBlock(node)) { ts.forEachChild(node, visit); } break; - case 138: + case 139: if (!(node.flags & 56)) { break; } - case 213: - case 165: + case 214: + case 166: if (ts.isBindingPattern(node.name)) { ts.forEachChild(node.name, visit); break; } - case 249: + case 250: + case 142: case 141: - case 140: addDeclaration(node); break; - case 230: + case 231: if (node.exportClause) { ts.forEach(node.exportClause.elements, visit); } break; - case 224: + case 225: var importClause = node.importClause; if (importClause) { if (importClause.name) { addDeclaration(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 226) { + if (importClause.namedBindings.kind === 227) { addDeclaration(importClause.namedBindings); } else { @@ -38598,6 +39142,9 @@ var ts; ClassificationTypeNames.jsxOpenTagName = "jsx open tag name"; ClassificationTypeNames.jsxCloseTagName = "jsx close tag name"; ClassificationTypeNames.jsxSelfClosingTagName = "jsx self closing tag name"; + ClassificationTypeNames.jsxAttribute = "jsx attribute"; + ClassificationTypeNames.jsxText = "jsx text"; + ClassificationTypeNames.jsxAttributeStringLiteralValue = "jsx attribute string literal value"; return ClassificationTypeNames; }()); ts.ClassificationTypeNames = ClassificationTypeNames; @@ -38613,14 +39160,14 @@ var ts; return false; } return ts.forEach(symbol.declarations, function (declaration) { - if (declaration.kind === 175) { + if (declaration.kind === 176) { return true; } - if (declaration.kind !== 213 && declaration.kind !== 215) { + if (declaration.kind !== 214 && declaration.kind !== 216) { return false; } - for (var parent_8 = declaration.parent; !ts.isFunctionBlock(parent_8); parent_8 = parent_8.parent) { - if (parent_8.kind === 250 || parent_8.kind === 221) { + for (var parent_9 = declaration.parent; !ts.isFunctionBlock(parent_9); parent_9 = parent_9.parent) { + if (parent_9.kind === 251 || parent_9.kind === 222) { return false; } } @@ -38829,16 +39376,10 @@ var ts; return createLanguageServiceSourceFile(sourceFile.fileName, scriptSnapshot, sourceFile.languageVersion, version, true); } ts.updateLanguageServiceSourceFile = updateLanguageServiceSourceFile; - function createGetCanonicalFileName(useCaseSensitivefileNames) { - return useCaseSensitivefileNames - ? (function (fileName) { return fileName; }) - : (function (fileName) { return fileName.toLowerCase(); }); - } - ts.createGetCanonicalFileName = createGetCanonicalFileName; function createDocumentRegistry(useCaseSensitiveFileNames, currentDirectory) { if (currentDirectory === void 0) { currentDirectory = ""; } var buckets = {}; - var getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames); + var getCanonicalFileName = ts.createGetCanonicalFileName(!!useCaseSensitiveFileNames); function getKeyFromCompilationSettings(settings) { return "_" + settings.target + "|" + settings.module + "|" + settings.noResolve + "|" + settings.jsx + +"|" + settings.allowJs; } @@ -39151,7 +39692,7 @@ var ts; ts.preProcessFile = preProcessFile; function getTargetLabel(referenceNode, labelName) { while (referenceNode) { - if (referenceNode.kind === 209 && referenceNode.label.text === labelName) { + if (referenceNode.kind === 210 && referenceNode.label.text === labelName) { return referenceNode.label; } referenceNode = referenceNode.parent; @@ -39160,16 +39701,16 @@ var ts; } function isJumpStatementTarget(node) { return node.kind === 69 && - (node.parent.kind === 205 || node.parent.kind === 204) && + (node.parent.kind === 206 || node.parent.kind === 205) && node.parent.label === node; } function isLabelOfLabeledStatement(node) { return node.kind === 69 && - node.parent.kind === 209 && + node.parent.kind === 210 && node.parent.label === node; } function isLabeledBy(node, labelName) { - for (var owner = node.parent; owner.kind === 209; owner = owner.parent) { + for (var owner = node.parent; owner.kind === 210; owner = owner.parent) { if (owner.label.text === labelName) { return true; } @@ -39180,25 +39721,25 @@ var ts; return isLabelOfLabeledStatement(node) || isJumpStatementTarget(node); } function isRightSideOfQualifiedName(node) { - return node.parent.kind === 135 && node.parent.right === node; + return node.parent.kind === 136 && node.parent.right === node; } function isRightSideOfPropertyAccess(node) { - return node && node.parent && node.parent.kind === 168 && node.parent.name === node; + return node && node.parent && node.parent.kind === 169 && node.parent.name === node; } function isCallExpressionTarget(node) { if (isRightSideOfPropertyAccess(node)) { node = node.parent; } - return node && node.parent && node.parent.kind === 170 && node.parent.expression === node; + return node && node.parent && node.parent.kind === 171 && node.parent.expression === node; } function isNewExpressionTarget(node) { if (isRightSideOfPropertyAccess(node)) { node = node.parent; } - return node && node.parent && node.parent.kind === 171 && node.parent.expression === node; + return node && node.parent && node.parent.kind === 172 && node.parent.expression === node; } function isNameOfModuleDeclaration(node) { - return node.parent.kind === 220 && node.parent.name === node; + return node.parent.kind === 221 && node.parent.name === node; } function isNameOfFunctionDeclaration(node) { return node.kind === 69 && @@ -39206,22 +39747,22 @@ var ts; } function isNameOfPropertyAssignment(node) { return (node.kind === 69 || node.kind === 9 || node.kind === 8) && - (node.parent.kind === 247 || node.parent.kind === 248) && node.parent.name === node; + (node.parent.kind === 248 || node.parent.kind === 249) && node.parent.name === node; } function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { if (node.kind === 9 || node.kind === 8) { switch (node.parent.kind) { - case 141: - case 140: - case 247: - case 249: - case 143: case 142: - case 145: + case 141: + case 248: + case 250: + case 144: + case 143: case 146: - case 220: + case 147: + case 221: return node.parent.name === node; - case 169: + case 170: return node.parent.argumentExpression === node; } } @@ -39259,7 +39800,7 @@ var ts; } } var keywordCompletions = []; - for (var i = 70; i <= 134; i++) { + for (var i = 70; i <= 135; i++) { keywordCompletions.push({ name: ts.tokenToString(i), kind: ScriptElementKind.keyword, @@ -39274,17 +39815,17 @@ var ts; return undefined; } switch (node.kind) { - case 250: + case 251: + case 144: case 143: - case 142: - case 215: - case 175: - case 145: - case 146: case 216: + case 176: + case 146: + case 147: case 217: - case 219: + case 218: case 220: + case 221: return node; } } @@ -39292,38 +39833,38 @@ var ts; ts.getContainerNode = getContainerNode; function getNodeKind(node) { switch (node.kind) { - case 220: return ScriptElementKind.moduleElement; - case 216: return ScriptElementKind.classElement; - case 217: return ScriptElementKind.interfaceElement; - case 218: return ScriptElementKind.typeElement; - case 219: return ScriptElementKind.enumElement; - case 213: + case 221: return ScriptElementKind.moduleElement; + case 217: return ScriptElementKind.classElement; + case 218: return ScriptElementKind.interfaceElement; + case 219: return ScriptElementKind.typeElement; + case 220: return ScriptElementKind.enumElement; + case 214: return ts.isConst(node) ? ScriptElementKind.constElement : ts.isLet(node) ? ScriptElementKind.letElement : ScriptElementKind.variableElement; - case 215: return ScriptElementKind.functionElement; - case 145: return ScriptElementKind.memberGetAccessorElement; - case 146: return ScriptElementKind.memberSetAccessorElement; + case 216: return ScriptElementKind.functionElement; + case 146: return ScriptElementKind.memberGetAccessorElement; + case 147: return ScriptElementKind.memberSetAccessorElement; + case 144: case 143: - case 142: return ScriptElementKind.memberFunctionElement; + case 142: case 141: - case 140: return ScriptElementKind.memberVariableElement; - case 149: return ScriptElementKind.indexSignatureElement; - case 148: return ScriptElementKind.constructSignatureElement; - case 147: return ScriptElementKind.callSignatureElement; - case 144: return ScriptElementKind.constructorImplementationElement; - case 137: return ScriptElementKind.typeParameterElement; - case 249: return ScriptElementKind.variableElement; - case 138: return (node.flags & 56) ? ScriptElementKind.memberVariableElement : ScriptElementKind.parameterElement; - case 223: - case 228: - case 225: - case 232: + case 150: return ScriptElementKind.indexSignatureElement; + case 149: return ScriptElementKind.constructSignatureElement; + case 148: return ScriptElementKind.callSignatureElement; + case 145: return ScriptElementKind.constructorImplementationElement; + case 138: return ScriptElementKind.typeParameterElement; + case 250: return ScriptElementKind.variableElement; + case 139: return (node.flags & 56) ? ScriptElementKind.memberVariableElement : ScriptElementKind.parameterElement; + case 224: + case 229: case 226: + case 233: + case 227: return ScriptElementKind.alias; } return ScriptElementKind.unknown; @@ -39360,7 +39901,7 @@ var ts; host.log(message); } } - var getCanonicalFileName = createGetCanonicalFileName(useCaseSensitivefileNames); + var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitivefileNames); function getValidSourceFile(fileName) { var sourceFile = program.getSourceFile(fileName); if (!sourceFile) { @@ -39552,9 +40093,9 @@ var ts; isJsDocTagName = true; } switch (tag.kind) { - case 271: - case 269: + case 272: case 270: + case 271: var tagWithExpression = tag; if (tagWithExpression.typeExpression) { insideJsDocTagExpression = tagWithExpression.typeExpression.pos < position && position < tagWithExpression.typeExpression.end; @@ -39589,13 +40130,13 @@ var ts; log("Returning an empty list because completion was requested in an invalid position."); return undefined; } - var parent_9 = contextToken.parent, kind = contextToken.kind; + var parent_10 = contextToken.parent, kind = contextToken.kind; if (kind === 21) { - if (parent_9.kind === 168) { + if (parent_10.kind === 169) { node = contextToken.parent.expression; isRightOfDot = true; } - else if (parent_9.kind === 135) { + else if (parent_10.kind === 136) { node = contextToken.parent.left; isRightOfDot = true; } @@ -39608,8 +40149,9 @@ var ts; isRightOfOpenTag = true; location = contextToken; } - else if (kind === 39 && contextToken.parent.kind === 239) { + else if (kind === 39 && contextToken.parent.kind === 240) { isStartingCloseTag = true; + location = contextToken; } } } @@ -39633,7 +40175,10 @@ var ts; } else if (isStartingCloseTag) { var tagName = contextToken.parent.parent.openingElement.tagName; - symbols = [typeChecker.getSymbolAtLocation(tagName)]; + var tagSymbol = typeChecker.getSymbolAtLocation(tagName); + if (!typeChecker.isUnknownSymbol(tagSymbol)) { + symbols = [tagSymbol]; + } isMemberCompletion = true; isNewIdentifierLocation = false; } @@ -39647,7 +40192,7 @@ var ts; function getTypeScriptMemberSymbols() { isMemberCompletion = true; isNewIdentifierLocation = false; - if (node.kind === 69 || node.kind === 135 || node.kind === 168) { + if (node.kind === 69 || node.kind === 136 || node.kind === 169) { var symbol = typeChecker.getSymbolAtLocation(node); if (symbol && symbol.flags & 8388608) { symbol = typeChecker.getAliasedSymbol(symbol); @@ -39693,7 +40238,7 @@ var ts; } if (jsxContainer = tryGetContainingJsxElement(contextToken)) { var attrsType; - if ((jsxContainer.kind === 236) || (jsxContainer.kind === 237)) { + if ((jsxContainer.kind === 237) || (jsxContainer.kind === 238)) { attrsType = typeChecker.getJsxElementAttributesType(jsxContainer); if (attrsType) { symbols = filterJsxAttributes(typeChecker.getPropertiesOfType(attrsType), jsxContainer.attributes); @@ -39733,15 +40278,15 @@ var ts; return result; } function isInJsxText(contextToken) { - if (contextToken.kind === 238) { + if (contextToken.kind === 239) { return true; } if (contextToken.kind === 27 && contextToken.parent) { - if (contextToken.parent.kind === 237) { + if (contextToken.parent.kind === 238) { return true; } - if (contextToken.parent.kind === 239 || contextToken.parent.kind === 236) { - return contextToken.parent.parent && contextToken.parent.parent.kind === 235; + if (contextToken.parent.kind === 240 || contextToken.parent.kind === 237) { + return contextToken.parent.parent && contextToken.parent.parent.kind === 236; } } return false; @@ -39751,40 +40296,40 @@ var ts; var containingNodeKind = previousToken.parent.kind; switch (previousToken.kind) { case 24: - return containingNodeKind === 170 - || containingNodeKind === 144 - || containingNodeKind === 171 - || containingNodeKind === 166 - || containingNodeKind === 183 - || containingNodeKind === 152; + return containingNodeKind === 171 + || containingNodeKind === 145 + || containingNodeKind === 172 + || containingNodeKind === 167 + || containingNodeKind === 184 + || containingNodeKind === 153; case 17: - return containingNodeKind === 170 - || containingNodeKind === 144 - || containingNodeKind === 171 - || containingNodeKind === 174 - || containingNodeKind === 160; + return containingNodeKind === 171 + || containingNodeKind === 145 + || containingNodeKind === 172 + || containingNodeKind === 175 + || containingNodeKind === 161; case 19: - return containingNodeKind === 166 - || containingNodeKind === 149 - || containingNodeKind === 136; + return containingNodeKind === 167 + || containingNodeKind === 150 + || containingNodeKind === 137; case 125: case 126: return true; case 21: - return containingNodeKind === 220; + return containingNodeKind === 221; case 15: - return containingNodeKind === 216; + return containingNodeKind === 217; case 56: - return containingNodeKind === 213 - || containingNodeKind === 183; + return containingNodeKind === 214 + || containingNodeKind === 184; case 12: - return containingNodeKind === 185; + return containingNodeKind === 186; case 13: - return containingNodeKind === 192; + return containingNodeKind === 193; case 112: case 110: case 111: - return containingNodeKind === 141; + return containingNodeKind === 142; } switch (previousToken.getText()) { case "public": @@ -39797,7 +40342,7 @@ var ts; } function isInStringOrRegularExpressionOrTemplateLiteral(contextToken) { if (contextToken.kind === 9 - || contextToken.kind === 162 + || contextToken.kind === 163 || contextToken.kind === 10 || ts.isTemplateLiteralKind(contextToken.kind)) { var start_7 = contextToken.getStart(); @@ -39816,12 +40361,12 @@ var ts; isMemberCompletion = true; var typeForObject; var existingMembers; - if (objectLikeContainer.kind === 167) { + if (objectLikeContainer.kind === 168) { isNewIdentifierLocation = true; typeForObject = typeChecker.getContextualType(objectLikeContainer); existingMembers = objectLikeContainer.properties; } - else if (objectLikeContainer.kind === 163) { + else if (objectLikeContainer.kind === 164) { isNewIdentifierLocation = false; var rootDeclaration = ts.getRootDeclaration(objectLikeContainer.parent); if (ts.isVariableLike(rootDeclaration)) { @@ -39847,9 +40392,9 @@ var ts; return true; } function tryGetImportOrExportClauseCompletionSymbols(namedImportsOrExports) { - var declarationKind = namedImportsOrExports.kind === 227 ? - 224 : - 230; + var declarationKind = namedImportsOrExports.kind === 228 ? + 225 : + 231; var importOrExportDeclaration = ts.getAncestor(namedImportsOrExports, declarationKind); var moduleSpecifier = importOrExportDeclaration.moduleSpecifier; if (!moduleSpecifier) { @@ -39870,9 +40415,9 @@ var ts; switch (contextToken.kind) { case 15: case 24: - var parent_10 = contextToken.parent; - if (parent_10 && (parent_10.kind === 167 || parent_10.kind === 163)) { - return parent_10; + var parent_11 = contextToken.parent; + if (parent_11 && (parent_11.kind === 168 || parent_11.kind === 164)) { + return parent_11; } break; } @@ -39885,8 +40430,8 @@ var ts; case 15: case 24: switch (contextToken.parent.kind) { - case 227: - case 231: + case 228: + case 232: return contextToken.parent; } } @@ -39895,34 +40440,34 @@ var ts; } function tryGetContainingJsxElement(contextToken) { if (contextToken) { - var parent_11 = contextToken.parent; + var parent_12 = contextToken.parent; switch (contextToken.kind) { case 26: case 39: case 69: - case 240: case 241: - if (parent_11 && (parent_11.kind === 236 || parent_11.kind === 237)) { - return parent_11; + case 242: + if (parent_12 && (parent_12.kind === 237 || parent_12.kind === 238)) { + return parent_12; } - else if (parent_11.kind === 240) { - return parent_11.parent; + else if (parent_12.kind === 241) { + return parent_12.parent; } break; case 9: - if (parent_11 && ((parent_11.kind === 240) || (parent_11.kind === 241))) { - return parent_11.parent; + if (parent_12 && ((parent_12.kind === 241) || (parent_12.kind === 242))) { + return parent_12.parent; } break; case 16: - if (parent_11 && - parent_11.kind === 242 && - parent_11.parent && - (parent_11.parent.kind === 240)) { - return parent_11.parent.parent; + if (parent_12 && + parent_12.kind === 243 && + parent_12.parent && + (parent_12.parent.kind === 241)) { + return parent_12.parent.parent; } - if (parent_11 && parent_11.kind === 241) { - return parent_11.parent; + if (parent_12 && parent_12.kind === 242) { + return parent_12.parent; } break; } @@ -39931,16 +40476,16 @@ var ts; } function isFunction(kind) { switch (kind) { - case 175: case 176: - case 215: + case 177: + case 216: + case 144: case 143: - case 142: - case 145: case 146: case 147: case 148: case 149: + case 150: return true; } return false; @@ -39949,54 +40494,54 @@ var ts; var containingNodeKind = contextToken.parent.kind; switch (contextToken.kind) { case 24: - return containingNodeKind === 213 || - containingNodeKind === 214 || - containingNodeKind === 195 || - containingNodeKind === 219 || + return containingNodeKind === 214 || + containingNodeKind === 215 || + containingNodeKind === 196 || + containingNodeKind === 220 || isFunction(containingNodeKind) || - containingNodeKind === 216 || - containingNodeKind === 188 || containingNodeKind === 217 || - containingNodeKind === 164 || - containingNodeKind === 218; + containingNodeKind === 189 || + containingNodeKind === 218 || + containingNodeKind === 165 || + containingNodeKind === 219; case 21: - return containingNodeKind === 164; - case 54: return containingNodeKind === 165; + case 54: + return containingNodeKind === 166; case 19: - return containingNodeKind === 164; + return containingNodeKind === 165; case 17: - return containingNodeKind === 246 || + return containingNodeKind === 247 || isFunction(containingNodeKind); case 15: - return containingNodeKind === 219 || - containingNodeKind === 217 || - containingNodeKind === 155; - case 23: - return containingNodeKind === 140 && - contextToken.parent && contextToken.parent.parent && - (contextToken.parent.parent.kind === 217 || - contextToken.parent.parent.kind === 155); - case 25: - return containingNodeKind === 216 || - containingNodeKind === 188 || - containingNodeKind === 217 || + return containingNodeKind === 220 || containingNodeKind === 218 || + containingNodeKind === 156; + case 23: + return containingNodeKind === 141 && + contextToken.parent && contextToken.parent.parent && + (contextToken.parent.parent.kind === 218 || + contextToken.parent.parent.kind === 156); + case 25: + return containingNodeKind === 217 || + containingNodeKind === 189 || + containingNodeKind === 218 || + containingNodeKind === 219 || isFunction(containingNodeKind); case 113: - return containingNodeKind === 141; + return containingNodeKind === 142; case 22: - return containingNodeKind === 138 || + return containingNodeKind === 139 || (contextToken.parent && contextToken.parent.parent && - contextToken.parent.parent.kind === 164); + contextToken.parent.parent.kind === 165); case 112: case 110: case 111: - return containingNodeKind === 138; + return containingNodeKind === 139; case 116: - return containingNodeKind === 228 || - containingNodeKind === 232 || - containingNodeKind === 226; + return containingNodeKind === 229 || + containingNodeKind === 233 || + containingNodeKind === 227; case 73: case 81: case 107: @@ -40045,8 +40590,8 @@ var ts; if (element.getStart() <= position && position <= element.getEnd()) { continue; } - var name_31 = element.propertyName || element.name; - exisingImportsOrExports[name_31.text] = true; + var name_34 = element.propertyName || element.name; + exisingImportsOrExports[name_34.text] = true; } if (ts.isEmpty(exisingImportsOrExports)) { return exportsOfModule; @@ -40060,17 +40605,17 @@ var ts; var existingMemberNames = {}; for (var _i = 0, existingMembers_1 = existingMembers; _i < existingMembers_1.length; _i++) { var m = existingMembers_1[_i]; - if (m.kind !== 247 && - m.kind !== 248 && - m.kind !== 165 && - m.kind !== 143) { + if (m.kind !== 248 && + m.kind !== 249 && + m.kind !== 166 && + m.kind !== 144) { continue; } if (m.getStart() <= position && position <= m.getEnd()) { continue; } var existingName = void 0; - if (m.kind === 165 && m.propertyName) { + if (m.kind === 166 && m.propertyName) { if (m.propertyName.kind === 69) { existingName = m.propertyName.text; } @@ -40089,7 +40634,7 @@ var ts; if (attr.getStart() <= position && position <= attr.getEnd()) { continue; } - if (attr.kind === 240) { + if (attr.kind === 241) { seenNames[attr.name.text] = true; } } @@ -40114,7 +40659,19 @@ var ts; } else { if (!symbols || symbols.length === 0) { - return undefined; + if (sourceFile.languageVariant === 1 && + location.parent && location.parent.kind === 240) { + var tagName = location.parent.parent.openingElement.tagName; + entries.push({ + name: tagName.text, + kind: undefined, + kindModifiers: undefined, + sortText: "0" + }); + } + else { + return undefined; + } } getCompletionEntriesFromSymbols(symbols, entries); } @@ -40126,10 +40683,10 @@ var ts; var entries = []; var target = program.getCompilerOptions().target; var nameTable = getNameTable(sourceFile); - for (var name_32 in nameTable) { - if (!uniqueNames[name_32]) { - uniqueNames[name_32] = name_32; - var displayName = getCompletionEntryDisplayName(name_32, target, true); + for (var name_35 in nameTable) { + if (!uniqueNames[name_35]) { + uniqueNames[name_35] = name_35; + var displayName = getCompletionEntryDisplayName(name_35, target, true); if (displayName) { var entry = { name: displayName, @@ -40218,7 +40775,7 @@ var ts; function getSymbolKind(symbol, location) { var flags = symbol.getFlags(); if (flags & 32) - return ts.getDeclarationOfKind(symbol, 188) ? + return ts.getDeclarationOfKind(symbol, 189) ? ScriptElementKind.localClassElement : ScriptElementKind.classElement; if (flags & 384) return ScriptElementKind.enumElement; @@ -40314,14 +40871,14 @@ var ts; var signature; type = typeChecker.getTypeOfSymbolAtLocation(symbol, location); if (type) { - if (location.parent && location.parent.kind === 168) { + if (location.parent && location.parent.kind === 169) { var right = location.parent.name; if (right === location || (right && right.getFullWidth() === 0)) { location = location.parent; } } var callExpression; - if (location.kind === 170 || location.kind === 171) { + if (location.kind === 171 || location.kind === 172) { callExpression = location; } else if (isCallExpressionTarget(location) || isNewExpressionTarget(location)) { @@ -40333,7 +40890,7 @@ var ts; if (!signature && candidateSignatures.length) { signature = candidateSignatures[0]; } - var useConstructSignatures = callExpression.kind === 171 || callExpression.expression.kind === 95; + var useConstructSignatures = callExpression.kind === 172 || callExpression.expression.kind === 95; var allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures(); if (!ts.contains(allSignatures, signature.target) && !ts.contains(allSignatures, signature)) { signature = allSignatures.length ? allSignatures[0] : undefined; @@ -40381,21 +40938,21 @@ var ts; } } else if ((isNameOfFunctionDeclaration(location) && !(symbol.flags & 98304)) || - (location.kind === 121 && location.parent.kind === 144)) { + (location.kind === 121 && location.parent.kind === 145)) { var functionDeclaration = location.parent; - var allSignatures = functionDeclaration.kind === 144 ? type.getConstructSignatures() : type.getCallSignatures(); + var allSignatures = functionDeclaration.kind === 145 ? type.getConstructSignatures() : type.getCallSignatures(); if (!typeChecker.isImplementationOfOverload(functionDeclaration)) { signature = typeChecker.getSignatureFromDeclaration(functionDeclaration); } else { signature = allSignatures[0]; } - if (functionDeclaration.kind === 144) { + if (functionDeclaration.kind === 145) { symbolKind = ScriptElementKind.constructorImplementationElement; addPrefixForAnyFunctionOrVar(type.symbol, symbolKind); } else { - addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 147 && + addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 148 && !(type.symbol.flags & 2048 || type.symbol.flags & 4096) ? type.symbol : symbol, symbolKind); } addSignatureDisplayParts(signature, allSignatures); @@ -40404,7 +40961,7 @@ var ts; } } if (symbolFlags & 32 && !hasAddedSymbolInfo) { - if (ts.getDeclarationOfKind(symbol, 188)) { + if (ts.getDeclarationOfKind(symbol, 189)) { pushTypePart(ScriptElementKind.localClassElement); } else { @@ -40444,7 +41001,7 @@ var ts; } if (symbolFlags & 1536) { addNewLineIfDisplayPartsExist(); - var declaration = ts.getDeclarationOfKind(symbol, 220); + var declaration = ts.getDeclarationOfKind(symbol, 221); var isNamespace = declaration && declaration.name && declaration.name.kind === 69; displayParts.push(ts.keywordPart(isNamespace ? 126 : 125)); displayParts.push(ts.spacePart()); @@ -40465,17 +41022,17 @@ var ts; writeTypeParametersOfSymbol(symbol.parent, enclosingDeclaration); } else { - var declaration = ts.getDeclarationOfKind(symbol, 137); + var declaration = ts.getDeclarationOfKind(symbol, 138); ts.Debug.assert(declaration !== undefined); declaration = declaration.parent; if (declaration) { if (ts.isFunctionLikeKind(declaration.kind)) { var signature = typeChecker.getSignatureFromDeclaration(declaration); - if (declaration.kind === 148) { + if (declaration.kind === 149) { displayParts.push(ts.keywordPart(92)); displayParts.push(ts.spacePart()); } - else if (declaration.kind !== 147 && declaration.name) { + else if (declaration.kind !== 148 && declaration.name) { addFullSymbolName(declaration.symbol); } ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, sourceFile, 32)); @@ -40492,7 +41049,7 @@ var ts; if (symbolFlags & 8) { addPrefixForAnyFunctionOrVar(symbol, "enum member"); var declaration = symbol.declarations[0]; - if (declaration.kind === 249) { + if (declaration.kind === 250) { var constantValue = typeChecker.getConstantValue(declaration); if (constantValue !== undefined) { displayParts.push(ts.spacePart()); @@ -40508,7 +41065,7 @@ var ts; displayParts.push(ts.spacePart()); addFullSymbolName(symbol); ts.forEach(symbol.declarations, function (declaration) { - if (declaration.kind === 223) { + if (declaration.kind === 224) { var importEqualsDeclaration = declaration; if (ts.isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) { displayParts.push(ts.spacePart()); @@ -40635,13 +41192,13 @@ var ts; } var typeChecker = program.getTypeChecker(); var symbol = typeChecker.getSymbolAtLocation(node); - if (!symbol) { + if (!symbol || typeChecker.isUnknownSymbol(symbol)) { switch (node.kind) { case 69: - case 168: - case 135: + case 169: + case 136: case 97: - case 161: + case 162: case 95: var type = typeChecker.getTypeAtLocation(node); if (type) { @@ -40714,8 +41271,8 @@ var ts; var declarations = []; var definition; ts.forEach(signatureDeclarations, function (d) { - if ((selectConstructors && d.kind === 144) || - (!selectConstructors && (d.kind === 215 || d.kind === 143 || d.kind === 142))) { + if ((selectConstructors && d.kind === 145) || + (!selectConstructors && (d.kind === 216 || d.kind === 144 || d.kind === 143))) { declarations.push(d); if (d.body) definition = d; @@ -40770,7 +41327,7 @@ var ts; symbol = typeChecker.getAliasedSymbol(symbol); } } - if (node.parent.kind === 248) { + if (node.parent.kind === 249) { var shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); if (!shorthandSymbol) { return []; @@ -40843,7 +41400,7 @@ var ts; function getSemanticDocumentHighlights(node) { if (node.kind === 69 || node.kind === 97 || - node.kind === 161 || + node.kind === 162 || node.kind === 95 || isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || isNameOfExternalModuleImportOrDeclaration(node)) { @@ -40895,75 +41452,75 @@ var ts; switch (node.kind) { case 88: case 80: - if (hasKind(node.parent, 198)) { + if (hasKind(node.parent, 199)) { return getIfElseOccurrences(node.parent); } break; case 94: - if (hasKind(node.parent, 206)) { + if (hasKind(node.parent, 207)) { return getReturnOccurrences(node.parent); } break; case 98: - if (hasKind(node.parent, 210)) { + if (hasKind(node.parent, 211)) { return getThrowOccurrences(node.parent); } break; case 72: - if (hasKind(parent(parent(node)), 211)) { + if (hasKind(parent(parent(node)), 212)) { return getTryCatchFinallyOccurrences(node.parent.parent); } break; case 100: case 85: - if (hasKind(parent(node), 211)) { + if (hasKind(parent(node), 212)) { return getTryCatchFinallyOccurrences(node.parent); } break; case 96: - if (hasKind(node.parent, 208)) { + if (hasKind(node.parent, 209)) { return getSwitchCaseDefaultOccurrences(node.parent); } break; case 71: case 77: - if (hasKind(parent(parent(parent(node))), 208)) { + if (hasKind(parent(parent(parent(node))), 209)) { return getSwitchCaseDefaultOccurrences(node.parent.parent.parent); } break; case 70: case 75: - if (hasKind(node.parent, 205) || hasKind(node.parent, 204)) { + if (hasKind(node.parent, 206) || hasKind(node.parent, 205)) { return getBreakOrContinueStatementOccurrences(node.parent); } break; case 86: - if (hasKind(node.parent, 201) || - hasKind(node.parent, 202) || - hasKind(node.parent, 203)) { + if (hasKind(node.parent, 202) || + hasKind(node.parent, 203) || + hasKind(node.parent, 204)) { return getLoopBreakContinueOccurrences(node.parent); } break; case 104: case 79: - if (hasKind(node.parent, 200) || hasKind(node.parent, 199)) { + if (hasKind(node.parent, 201) || hasKind(node.parent, 200)) { return getLoopBreakContinueOccurrences(node.parent); } break; case 121: - if (hasKind(node.parent, 144)) { + if (hasKind(node.parent, 145)) { return getConstructorOccurrences(node.parent); } break; case 123: case 129: - if (hasKind(node.parent, 145) || hasKind(node.parent, 146)) { + if (hasKind(node.parent, 146) || hasKind(node.parent, 147)) { return getGetAndSetOccurrences(node.parent); } break; default: if (ts.isModifierKind(node.kind) && node.parent && - (ts.isDeclaration(node.parent) || node.parent.kind === 195)) { + (ts.isDeclaration(node.parent) || node.parent.kind === 196)) { return getModifierOccurrences(node.kind, node.parent); } } @@ -40975,10 +41532,10 @@ var ts; aggregate(node); return statementAccumulator; function aggregate(node) { - if (node.kind === 210) { + if (node.kind === 211) { statementAccumulator.push(node); } - else if (node.kind === 211) { + else if (node.kind === 212) { var tryStatement = node; if (tryStatement.catchClause) { aggregate(tryStatement.catchClause); @@ -40998,17 +41555,17 @@ var ts; function getThrowStatementOwner(throwStatement) { var child = throwStatement; while (child.parent) { - var parent_12 = child.parent; - if (ts.isFunctionBlock(parent_12) || parent_12.kind === 250) { - return parent_12; + var parent_13 = child.parent; + if (ts.isFunctionBlock(parent_13) || parent_13.kind === 251) { + return parent_13; } - if (parent_12.kind === 211) { - var tryStatement = parent_12; + if (parent_13.kind === 212) { + var tryStatement = parent_13; if (tryStatement.tryBlock === child && tryStatement.catchClause) { return child; } } - child = parent_12; + child = parent_13; } return undefined; } @@ -41017,7 +41574,7 @@ var ts; aggregate(node); return statementAccumulator; function aggregate(node) { - if (node.kind === 205 || node.kind === 204) { + if (node.kind === 206 || node.kind === 205) { statementAccumulator.push(node); } else if (!ts.isFunctionLike(node)) { @@ -41032,15 +41589,15 @@ var ts; function getBreakOrContinueOwner(statement) { for (var node_2 = statement.parent; node_2; node_2 = node_2.parent) { switch (node_2.kind) { - case 208: - if (statement.kind === 204) { + case 209: + if (statement.kind === 205) { continue; } - case 201: case 202: case 203: + case 204: + case 201: case 200: - case 199: if (!statement.label || isLabeledBy(node_2, statement.label.text)) { return node_2; } @@ -41057,24 +41614,24 @@ var ts; function getModifierOccurrences(modifier, declaration) { var container = declaration.parent; if (ts.isAccessibilityModifier(modifier)) { - if (!(container.kind === 216 || - container.kind === 188 || - (declaration.kind === 138 && hasKind(container, 144)))) { + if (!(container.kind === 217 || + container.kind === 189 || + (declaration.kind === 139 && hasKind(container, 145)))) { return undefined; } } else if (modifier === 113) { - if (!(container.kind === 216 || container.kind === 188)) { + if (!(container.kind === 217 || container.kind === 189)) { return undefined; } } else if (modifier === 82 || modifier === 122) { - if (!(container.kind === 221 || container.kind === 250)) { + if (!(container.kind === 222 || container.kind === 251)) { return undefined; } } else if (modifier === 115) { - if (!(container.kind === 216 || declaration.kind === 216)) { + if (!(container.kind === 217 || declaration.kind === 217)) { return undefined; } } @@ -41085,8 +41642,8 @@ var ts; var modifierFlag = getFlagFromModifier(modifier); var nodes; switch (container.kind) { - case 221: - case 250: + case 222: + case 251: if (modifierFlag & 128) { nodes = declaration.members.concat(declaration); } @@ -41094,15 +41651,15 @@ var ts; nodes = container.statements; } break; - case 144: + case 145: nodes = container.parameters.concat(container.parent.members); break; - case 216: - case 188: + case 217: + case 189: nodes = container.members; if (modifierFlag & 56) { var constructor = ts.forEach(container.members, function (member) { - return member.kind === 144 && member; + return member.kind === 145 && member; }); if (constructor) { nodes = nodes.concat(constructor.parameters); @@ -41155,8 +41712,8 @@ var ts; } function getGetAndSetOccurrences(accessorDeclaration) { var keywords = []; - tryPushAccessorKeyword(accessorDeclaration.symbol, 145); tryPushAccessorKeyword(accessorDeclaration.symbol, 146); + tryPushAccessorKeyword(accessorDeclaration.symbol, 147); return ts.map(keywords, getHighlightSpanForNode); function tryPushAccessorKeyword(accessorSymbol, accessorKind) { var accessor = ts.getDeclarationOfKind(accessorSymbol, accessorKind); @@ -41178,7 +41735,7 @@ var ts; function getLoopBreakContinueOccurrences(loopNode) { var keywords = []; if (pushKeywordIf(keywords, loopNode.getFirstToken(), 86, 104, 79)) { - if (loopNode.kind === 199) { + if (loopNode.kind === 200) { var loopTokens = loopNode.getChildren(); for (var i = loopTokens.length - 1; i >= 0; i--) { if (pushKeywordIf(keywords, loopTokens[i], 104)) { @@ -41199,13 +41756,13 @@ var ts; var owner = getBreakOrContinueOwner(breakOrContinueStatement); if (owner) { switch (owner.kind) { - case 201: case 202: case 203: - case 199: + case 204: case 200: + case 201: return getLoopBreakContinueOccurrences(owner); - case 208: + case 209: return getSwitchCaseDefaultOccurrences(owner); } } @@ -41255,7 +41812,7 @@ var ts; } function getReturnOccurrences(returnStatement) { var func = ts.getContainingFunction(returnStatement); - if (!(func && hasKind(func.body, 194))) { + if (!(func && hasKind(func.body, 195))) { return undefined; } var keywords = []; @@ -41269,7 +41826,7 @@ var ts; } function getIfElseOccurrences(ifStatement) { var keywords = []; - while (hasKind(ifStatement.parent, 198) && ifStatement.parent.elseStatement === ifStatement) { + while (hasKind(ifStatement.parent, 199) && ifStatement.parent.elseStatement === ifStatement) { ifStatement = ifStatement.parent; } while (ifStatement) { @@ -41280,7 +41837,7 @@ var ts; break; } } - if (!hasKind(ifStatement.elseStatement, 198)) { + if (!hasKind(ifStatement.elseStatement, 199)) { break; } ifStatement = ifStatement.elseStatement; @@ -41384,7 +41941,7 @@ var ts; return getLabelReferencesInNode(node.parent, node); } } - if (node.kind === 97 || node.kind === 161) { + if (node.kind === 97 || node.kind === 162) { return getReferencesForThisKeyword(node, sourceFiles); } if (node.kind === 95) { @@ -41436,10 +41993,8 @@ var ts; textSpan: ts.createTextSpan(declarations[0].getStart(), 0) }; } - function isImportOrExportSpecifierImportSymbol(symbol) { - return (symbol.flags & 8388608) && ts.forEach(symbol.declarations, function (declaration) { - return declaration.kind === 228 || declaration.kind === 232; - }); + function isImportSpecifierSymbol(symbol) { + return (symbol.flags & 8388608) && !!ts.getDeclarationOfKind(symbol, 229); } function getInternedName(symbol, location, declarations) { if (ts.isImportOrExportSpecifierName(location)) { @@ -41451,13 +42006,13 @@ var ts; } function getSymbolScope(symbol) { var valueDeclaration = symbol.valueDeclaration; - if (valueDeclaration && (valueDeclaration.kind === 175 || valueDeclaration.kind === 188)) { + if (valueDeclaration && (valueDeclaration.kind === 176 || valueDeclaration.kind === 189)) { return valueDeclaration; } if (symbol.flags & (4 | 8192)) { var privateDeclaration = ts.forEach(symbol.getDeclarations(), function (d) { return (d.flags & 16) ? d : undefined; }); if (privateDeclaration) { - return ts.getAncestor(privateDeclaration, 216); + return ts.getAncestor(privateDeclaration, 217); } } if (symbol.flags & 8388608) { @@ -41478,7 +42033,7 @@ var ts; if (scope && scope !== container) { return undefined; } - if (container.kind === 250 && !ts.isExternalModule(container)) { + if (container.kind === 251 && !ts.isExternalModule(container)) { return undefined; } scope = container; @@ -41625,13 +42180,13 @@ var ts; } var staticFlag = 64; switch (searchSpaceNode.kind) { - case 141: - case 140: - case 143: case 142: + case 141: case 144: + case 143: case 145: case 146: + case 147: staticFlag &= searchSpaceNode.flags; searchSpaceNode = searchSpaceNode.parent; break; @@ -41659,32 +42214,32 @@ var ts; var searchSpaceNode = ts.getThisContainer(thisOrSuperKeyword, false); var staticFlag = 64; switch (searchSpaceNode.kind) { + case 144: case 143: - case 142: if (ts.isObjectLiteralMethod(searchSpaceNode)) { break; } + case 142: case 141: - case 140: - case 144: case 145: case 146: + case 147: staticFlag &= searchSpaceNode.flags; searchSpaceNode = searchSpaceNode.parent; break; - case 250: + case 251: if (ts.isExternalModule(searchSpaceNode)) { return undefined; } - case 215: - case 175: + case 216: + case 176: break; default: return undefined; } var references = []; var possiblePositions; - if (searchSpaceNode.kind === 250) { + if (searchSpaceNode.kind === 251) { ts.forEach(sourceFiles, function (sourceFile) { possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", sourceFile.getStart(), sourceFile.getEnd()); getThisReferencesInFile(sourceFile, sourceFile, possiblePositions, references); @@ -41710,31 +42265,31 @@ var ts; ts.forEach(possiblePositions, function (position) { cancellationToken.throwIfCancellationRequested(); var node = ts.getTouchingWord(sourceFile, position); - if (!node || (node.kind !== 97 && node.kind !== 161)) { + if (!node || (node.kind !== 97 && node.kind !== 162)) { return; } var container = ts.getThisContainer(node, false); switch (searchSpaceNode.kind) { - case 175: - case 215: + case 176: + case 216: if (searchSpaceNode.symbol === container.symbol) { result.push(getReferenceEntryFromNode(node)); } break; + case 144: case 143: - case 142: if (ts.isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol) { result.push(getReferenceEntryFromNode(node)); } break; - case 188: - case 216: + case 189: + case 217: if (container.parent && searchSpaceNode.symbol === container.parent.symbol && (container.flags & 64) === staticFlag) { result.push(getReferenceEntryFromNode(node)); } break; - case 250: - if (container.kind === 250 && !ts.isExternalModule(container)) { + case 251: + if (container.kind === 251 && !ts.isExternalModule(container)) { result.push(getReferenceEntryFromNode(node)); } break; @@ -41744,9 +42299,12 @@ var ts; } function populateSearchSymbolSet(symbol, location) { var result = [symbol]; - if (isImportOrExportSpecifierImportSymbol(symbol)) { + if (isImportSpecifierSymbol(symbol)) { result.push(typeChecker.getAliasedSymbol(symbol)); } + if (location.parent.kind === 233) { + result.push(typeChecker.getExportSpecifierLocalTargetSymbol(location.parent)); + } if (isNameOfPropertyAssignment(location)) { ts.forEach(getPropertySymbolsFromContextualType(location), function (contextualSymbol) { ts.addRange(result, typeChecker.getRootSymbols(contextualSymbol)); @@ -41756,7 +42314,7 @@ var ts; result.push(shorthandValueSymbol); } } - if (symbol.valueDeclaration && symbol.valueDeclaration.kind === 138 && + if (symbol.valueDeclaration && symbol.valueDeclaration.kind === 139 && ts.isParameterPropertyDeclaration(symbol.valueDeclaration)) { result = result.concat(typeChecker.getSymbolsOfParameterPropertyDeclaration(symbol.valueDeclaration, symbol.name)); } @@ -41765,19 +42323,25 @@ var ts; result.push(rootSymbol); } if (rootSymbol.parent && rootSymbol.parent.flags & (32 | 64)) { - getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result); + getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result, {}); } }); return result; } - function getPropertySymbolsFromBaseTypes(symbol, propertyName, result) { - if (symbol && symbol.flags & (32 | 64)) { + function getPropertySymbolsFromBaseTypes(symbol, propertyName, result, previousIterationSymbolsCache) { + if (!symbol) { + return; + } + if (ts.hasProperty(previousIterationSymbolsCache, symbol.name)) { + return; + } + if (symbol.flags & (32 | 64)) { ts.forEach(symbol.getDeclarations(), function (declaration) { - if (declaration.kind === 216) { + if (declaration.kind === 217) { getPropertySymbolFromTypeReference(ts.getClassExtendsHeritageClauseElement(declaration)); ts.forEach(ts.getClassImplementsHeritageClauseElements(declaration), getPropertySymbolFromTypeReference); } - else if (declaration.kind === 217) { + else if (declaration.kind === 218) { ts.forEach(ts.getInterfaceBaseTypeNodes(declaration), getPropertySymbolFromTypeReference); } }); @@ -41791,7 +42355,8 @@ var ts; if (propertySymbol) { result.push(propertySymbol); } - getPropertySymbolsFromBaseTypes(type.symbol, propertyName, result); + previousIterationSymbolsCache[symbol.name] = symbol; + getPropertySymbolsFromBaseTypes(type.symbol, propertyName, result, previousIterationSymbolsCache); } } } @@ -41800,12 +42365,18 @@ var ts; if (searchSymbols.indexOf(referenceSymbol) >= 0) { return referenceSymbol; } - if (isImportOrExportSpecifierImportSymbol(referenceSymbol)) { + if (isImportSpecifierSymbol(referenceSymbol)) { var aliasedSymbol = typeChecker.getAliasedSymbol(referenceSymbol); if (searchSymbols.indexOf(aliasedSymbol) >= 0) { return aliasedSymbol; } } + if (referenceLocation.parent.kind === 233) { + var aliasedSymbol = typeChecker.getExportSpecifierLocalTargetSymbol(referenceLocation.parent); + if (searchSymbols.indexOf(aliasedSymbol) >= 0) { + return aliasedSymbol; + } + } if (isNameOfPropertyAssignment(referenceLocation)) { return ts.forEach(getPropertySymbolsFromContextualType(referenceLocation), function (contextualSymbol) { return ts.forEach(typeChecker.getRootSymbols(contextualSymbol), function (s) { return searchSymbols.indexOf(s) >= 0 ? s : undefined; }); @@ -41817,7 +42388,7 @@ var ts; } if (rootSymbol.parent && rootSymbol.parent.flags & (32 | 64)) { var result_3 = []; - getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result_3); + getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result_3, {}); return ts.forEach(result_3, function (s) { return searchSymbols.indexOf(s) >= 0 ? s : undefined; }); } return undefined; @@ -41827,17 +42398,17 @@ var ts; if (isNameOfPropertyAssignment(node)) { var objectLiteral = node.parent.parent; var contextualType = typeChecker.getContextualType(objectLiteral); - var name_33 = node.text; + var name_36 = node.text; if (contextualType) { if (contextualType.flags & 16384) { - var unionProperty = contextualType.getProperty(name_33); + var unionProperty = contextualType.getProperty(name_36); if (unionProperty) { return [unionProperty]; } else { var result_4 = []; ts.forEach(contextualType.types, function (t) { - var symbol = t.getProperty(name_33); + var symbol = t.getProperty(name_36); if (symbol) { result_4.push(symbol); } @@ -41846,7 +42417,7 @@ var ts; } } else { - var symbol_1 = contextualType.getProperty(name_33); + var symbol_1 = contextualType.getProperty(name_36); if (symbol_1) { return [symbol_1]; } @@ -41891,10 +42462,10 @@ var ts; } var parent = node.parent; if (parent) { - if (parent.kind === 182 || parent.kind === 181) { + if (parent.kind === 183 || parent.kind === 182) { return true; } - else if (parent.kind === 183 && parent.left === node) { + else if (parent.kind === 184 && parent.left === node) { var operator = parent.operatorToken.kind; return 56 <= operator && operator <= 68; } @@ -41924,34 +42495,34 @@ var ts; } function getMeaningFromDeclaration(node) { switch (node.kind) { - case 138: - case 213: - case 165: + case 139: + case 214: + case 166: + case 142: case 141: - case 140: - case 247: case 248: case 249: - case 143: - case 142: + case 250: case 144: + case 143: case 145: case 146: - case 215: - case 175: - case 176: - case 246: - return 1; - case 137: - case 217: - case 218: - case 155: - return 2; + case 147: case 216: + case 176: + case 177: + case 247: + return 1; + case 138: + case 218: case 219: - return 1 | 2; + case 156: + return 2; + case 217: case 220: - if (node.name.kind === 9) { + return 1 | 2; + case 221: + if (ts.isAmbientModule(node)) { return 4 | 1; } else if (ts.getModuleInstanceState(node) === 1) { @@ -41960,14 +42531,14 @@ var ts; else { return 4; } - case 227: case 228: - case 223: - case 224: case 229: + case 224: + case 225: case 230: + case 231: return 1 | 2 | 4; - case 250: + case 251: return 4 | 1; } return 1 | 2 | 4; @@ -41976,10 +42547,10 @@ var ts; if (ts.isRightSideOfQualifiedNameOrPropertyAccess(node)) { node = node.parent; } - return node.parent.kind === 151 || - (node.parent.kind === 190 && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) || + return node.parent.kind === 152 || + (node.parent.kind === 191 && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) || (node.kind === 97 && !ts.isExpression(node)) || - node.kind === 161; + node.kind === 162; } function isNamespaceReference(node) { return isQualifiedNameNamespaceReference(node) || isPropertyAccessNamespaceReference(node); @@ -41987,47 +42558,47 @@ var ts; function isPropertyAccessNamespaceReference(node) { var root = node; var isLastClause = true; - if (root.parent.kind === 168) { - while (root.parent && root.parent.kind === 168) { + if (root.parent.kind === 169) { + while (root.parent && root.parent.kind === 169) { root = root.parent; } isLastClause = root.name === node; } - if (!isLastClause && root.parent.kind === 190 && root.parent.parent.kind === 245) { + if (!isLastClause && root.parent.kind === 191 && root.parent.parent.kind === 246) { var decl = root.parent.parent.parent; - return (decl.kind === 216 && root.parent.parent.token === 106) || - (decl.kind === 217 && root.parent.parent.token === 83); + return (decl.kind === 217 && root.parent.parent.token === 106) || + (decl.kind === 218 && root.parent.parent.token === 83); } return false; } function isQualifiedNameNamespaceReference(node) { var root = node; var isLastClause = true; - if (root.parent.kind === 135) { - while (root.parent && root.parent.kind === 135) { + if (root.parent.kind === 136) { + while (root.parent && root.parent.kind === 136) { root = root.parent; } isLastClause = root.right === node; } - return root.parent.kind === 151 && !isLastClause; + return root.parent.kind === 152 && !isLastClause; } function isInRightSideOfImport(node) { - while (node.parent.kind === 135) { + while (node.parent.kind === 136) { node = node.parent; } return ts.isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node; } function getMeaningFromRightHandSideOfImportEquals(node) { ts.Debug.assert(node.kind === 69); - if (node.parent.kind === 135 && + if (node.parent.kind === 136 && node.parent.right === node && - node.parent.parent.kind === 223) { + node.parent.parent.kind === 224) { return 1 | 2 | 4; } return 4; } function getMeaningFromLocation(node) { - if (node.parent.kind === 229) { + if (node.parent.kind === 230) { return 1 | 2 | 4; } else if (isInRightSideOfImport(node)) { @@ -42061,16 +42632,16 @@ var ts; return; } switch (node.kind) { - case 168: - case 135: + case 169: + case 136: case 9: - case 162: + case 163: case 84: case 99: case 93: case 95: case 97: - case 161: + case 162: case 69: break; default: @@ -42082,7 +42653,7 @@ var ts; nodeForStartPos = nodeForStartPos.parent; } else if (isNameOfModuleDeclaration(nodeForStartPos)) { - if (nodeForStartPos.parent.parent.kind === 220 && + if (nodeForStartPos.parent.parent.kind === 221 && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { nodeForStartPos = nodeForStartPos.parent.parent.name; } @@ -42109,10 +42680,10 @@ var ts; } function checkForClassificationCancellation(kind) { switch (kind) { - case 220: - case 216: + case 221: case 217: - case 215: + case 218: + case 216: cancellationToken.throwIfCancellationRequested(); } } @@ -42160,7 +42731,7 @@ var ts; return undefined; function hasValueSideModule(symbol) { return ts.forEach(symbol.declarations, function (declaration) { - return declaration.kind === 220 && + return declaration.kind === 221 && ts.getModuleInstanceState(declaration) === 1; }); } @@ -42207,6 +42778,9 @@ var ts; case 19: return ClassificationTypeNames.jsxOpenTagName; case 20: return ClassificationTypeNames.jsxCloseTagName; case 21: return ClassificationTypeNames.jsxSelfClosingTagName; + case 22: return ClassificationTypeNames.jsxAttribute; + case 23: return ClassificationTypeNames.jsxText; + case 24: return ClassificationTypeNames.jsxAttributeStringLiteralValue; } } function convertClassifications(classifications) { @@ -42296,16 +42870,16 @@ var ts; pushClassification(tag.tagName.pos, tag.tagName.end - tag.tagName.pos, 18); pos = tag.tagName.end; switch (tag.kind) { - case 269: + case 270: processJSDocParameterTag(tag); break; - case 272: + case 273: processJSDocTemplateTag(tag); break; - case 271: + case 272: processElement(tag.typeExpression); break; - case 270: + case 271: processElement(tag.typeExpression); break; } @@ -42340,7 +42914,8 @@ var ts; } } function classifyDisabledMergeCode(text, start, end) { - for (var i = start; i < end; i++) { + var i; + for (i = start; i < end; i++) { if (ts.isLineBreak(text.charCodeAt(i))) { break; } @@ -42360,11 +42935,11 @@ var ts; pushClassification(start, end - start, type); } } - function classifyToken(token) { + function classifyTokenOrJsxText(token) { if (ts.nodeIsMissing(token)) { return; } - var tokenStart = classifyLeadingTriviaAndGetTokenStart(token); + var tokenStart = token.kind === 239 ? token.pos : classifyLeadingTriviaAndGetTokenStart(token); var tokenWidth = token.end - tokenStart; ts.Debug.assert(tokenWidth >= 0); if (tokenWidth > 0) { @@ -42386,16 +42961,17 @@ var ts; if (ts.isPunctuation(tokenKind)) { if (token) { if (tokenKind === 56) { - if (token.parent.kind === 213 || - token.parent.kind === 141 || - token.parent.kind === 138) { + if (token.parent.kind === 214 || + token.parent.kind === 142 || + token.parent.kind === 139 || + token.parent.kind === 241) { return 5; } } - if (token.parent.kind === 183 || - token.parent.kind === 181 || + if (token.parent.kind === 184 || token.parent.kind === 182 || - token.parent.kind === 184) { + token.parent.kind === 183 || + token.parent.kind === 185) { return 5; } } @@ -42404,8 +42980,8 @@ var ts; else if (tokenKind === 8) { return 4; } - else if (tokenKind === 9 || tokenKind === 162) { - return 6; + else if (tokenKind === 9 || tokenKind === 163) { + return token.parent.kind === 241 ? 24 : 6; } else if (tokenKind === 10) { return 6; @@ -42413,54 +42989,61 @@ var ts; else if (ts.isTemplateLiteralKind(tokenKind)) { return 6; } + else if (tokenKind === 239) { + return 23; + } else if (tokenKind === 69) { if (token) { switch (token.parent.kind) { - case 216: + case 217: if (token.parent.name === token) { return 11; } return; - case 137: + case 138: if (token.parent.name === token) { return 15; } return; - case 217: + case 218: if (token.parent.name === token) { return 13; } return; - case 219: + case 220: if (token.parent.name === token) { return 12; } return; - case 220: + case 221: if (token.parent.name === token) { return 14; } return; - case 138: + case 139: if (token.parent.name === token) { return 17; } return; - case 237: + case 238: if (token.parent.tagName === token) { return 19; } return; - case 239: + case 240: if (token.parent.tagName === token) { return 20; } return; - case 236: + case 237: if (token.parent.tagName === token) { return 21; } return; + case 241: + if (token.parent.name === token) { + return 22; + } } } return 2; @@ -42475,8 +43058,8 @@ var ts; var children = element.getChildren(sourceFile); for (var i = 0, n = children.length; i < n; i++) { var child = children[i]; - if (ts.isToken(child)) { - classifyToken(child); + if (ts.isToken(child) || child.kind === 239) { + classifyTokenOrJsxText(child); } else { processElement(child); @@ -42572,16 +43155,16 @@ var ts; var commentOwner; findOwner: for (commentOwner = tokenAtPos; commentOwner; commentOwner = commentOwner.parent) { switch (commentOwner.kind) { - case 215: - case 143: - case 144: case 216: - case 195: + case 144: + case 145: + case 217: + case 196: break findOwner; - case 250: + case 251: return undefined; - case 220: - if (commentOwner.parent.kind === 220) { + case 221: + if (commentOwner.parent.kind === 221) { return undefined; } break findOwner; @@ -42615,7 +43198,7 @@ var ts; if (ts.isFunctionLike(commentOwner)) { return commentOwner.parameters; } - if (commentOwner.kind === 195) { + if (commentOwner.kind === 196) { var varStatement = commentOwner; var varDeclarations = varStatement.declarationList.declarations; if (varDeclarations.length === 1 && varDeclarations[0].initializer) { @@ -42625,17 +43208,17 @@ var ts; return emptyArray; } function getParametersFromRightHandSideOfAssignment(rightHandSide) { - while (rightHandSide.kind === 174) { + while (rightHandSide.kind === 175) { rightHandSide = rightHandSide.expression; } switch (rightHandSide.kind) { - case 175: case 176: + case 177: return rightHandSide.parameters; - case 188: + case 189: for (var _i = 0, _a = rightHandSide.members; _i < _a.length; _i++) { var member = _a[_i]; - if (member.kind === 144) { + if (member.kind === 145) { return member.parameters; } } @@ -42815,7 +43398,7 @@ var ts; case 9: case 8: if (ts.isDeclarationName(node) || - node.parent.kind === 234 || + node.parent.kind === 235 || isArgumentOfElementAccessExpression(node)) { nameTable[node.text] = node.text; } @@ -42828,7 +43411,7 @@ var ts; function isArgumentOfElementAccessExpression(node) { return node && node.parent && - node.parent.kind === 169 && + node.parent.kind === 170 && node.parent.argumentExpression === node; } function createClassifier() { @@ -43010,7 +43593,7 @@ var ts; var end = scanner.getTextPos(); addResult(start, end, classFromKind(token)); if (end >= text.length) { - if (token === 9 || token === 162) { + if (token === 9 || token === 163) { var tokenText = scanner.getTokenText(); if (scanner.isUnterminated()) { var lastCharIndex = tokenText.length - 1; @@ -43124,7 +43707,7 @@ var ts; } } function isKeyword(token) { - return token >= 70 && token <= 134; + return token >= 70 && token <= 135; } function classFromKind(token) { if (isKeyword(token)) { @@ -43140,7 +43723,7 @@ var ts; case 8: return 4; case 9: - case 162: + case 163: return 6; case 10: return 7; @@ -44241,8 +44824,8 @@ var ts; var newResolutions = {}; var resolvedModules = []; var compilerOptions = this.getCompilationSettings(); - for (var _i = 0, moduleNames_1 = moduleNames; _i < moduleNames_1.length; _i++) { - var moduleName = moduleNames_1[_i]; + for (var _i = 0, moduleNames_2 = moduleNames; _i < moduleNames_2.length; _i++) { + var moduleName = moduleNames_2[_i]; var resolution = ts.lookUp(newResolutions, moduleName); if (!resolution) { var existingResolution = currentResolutionsInFile && ts.lookUp(currentResolutionsInFile, moduleName); @@ -44913,7 +45496,7 @@ var ts; info.setFormatOptions(this.getFormatCodeOptions()); this.filenameToScriptInfo[fileName] = info; if (!info.isOpen) { - info.fileWatcher = this.host.watchFile(fileName, function (_) { _this.watchedFileChanged(fileName); }); + info.fileWatcher = this.host.watchFile(ts.toPath(fileName, fileName, ts.createGetCanonicalFileName(ts.sys.useCaseSensitiveFileNames)), function (_) { _this.watchedFileChanged(fileName); }); } } } @@ -45095,7 +45678,7 @@ var ts; } } project.finishGraph(); - project.projectFileWatcher = this.host.watchFile(configFilename, function (_) { return _this.watchedProjectConfigFileChanged(project); }); + project.projectFileWatcher = this.host.watchFile(ts.toPath(configFilename, configFilename, ts.createGetCanonicalFileName(ts.sys.useCaseSensitiveFileNames)), function (_) { return _this.watchedProjectConfigFileChanged(project); }); this.log("Add recursive watcher for: " + ts.getDirectoryPath(configFilename)); project.directoryWatcher = this.host.watchDirectory(ts.getDirectoryPath(configFilename), function (path) { return _this.directoryWatchedForSourceFilesChanged(project, path); }, true); return { success: true, project: project }; diff --git a/lib/typescript.d.ts b/lib/typescript.d.ts index 3196ae2199f..412f4e793b0 100644 --- a/lib/typescript.d.ts +++ b/lib/typescript.d.ts @@ -167,161 +167,162 @@ declare namespace ts { SymbolKeyword = 131, TypeKeyword = 132, FromKeyword = 133, - OfKeyword = 134, - QualifiedName = 135, - ComputedPropertyName = 136, - TypeParameter = 137, - Parameter = 138, - Decorator = 139, - PropertySignature = 140, - PropertyDeclaration = 141, - MethodSignature = 142, - MethodDeclaration = 143, - Constructor = 144, - GetAccessor = 145, - SetAccessor = 146, - CallSignature = 147, - ConstructSignature = 148, - IndexSignature = 149, - TypePredicate = 150, - TypeReference = 151, - FunctionType = 152, - ConstructorType = 153, - TypeQuery = 154, - TypeLiteral = 155, - ArrayType = 156, - TupleType = 157, - UnionType = 158, - IntersectionType = 159, - ParenthesizedType = 160, - ThisType = 161, - StringLiteralType = 162, - ObjectBindingPattern = 163, - ArrayBindingPattern = 164, - BindingElement = 165, - ArrayLiteralExpression = 166, - ObjectLiteralExpression = 167, - PropertyAccessExpression = 168, - ElementAccessExpression = 169, - CallExpression = 170, - NewExpression = 171, - TaggedTemplateExpression = 172, - TypeAssertionExpression = 173, - ParenthesizedExpression = 174, - FunctionExpression = 175, - ArrowFunction = 176, - DeleteExpression = 177, - TypeOfExpression = 178, - VoidExpression = 179, - AwaitExpression = 180, - PrefixUnaryExpression = 181, - PostfixUnaryExpression = 182, - BinaryExpression = 183, - ConditionalExpression = 184, - TemplateExpression = 185, - YieldExpression = 186, - SpreadElementExpression = 187, - ClassExpression = 188, - OmittedExpression = 189, - ExpressionWithTypeArguments = 190, - AsExpression = 191, - TemplateSpan = 192, - SemicolonClassElement = 193, - Block = 194, - VariableStatement = 195, - EmptyStatement = 196, - ExpressionStatement = 197, - IfStatement = 198, - DoStatement = 199, - WhileStatement = 200, - ForStatement = 201, - ForInStatement = 202, - ForOfStatement = 203, - ContinueStatement = 204, - BreakStatement = 205, - ReturnStatement = 206, - WithStatement = 207, - SwitchStatement = 208, - LabeledStatement = 209, - ThrowStatement = 210, - TryStatement = 211, - DebuggerStatement = 212, - VariableDeclaration = 213, - VariableDeclarationList = 214, - FunctionDeclaration = 215, - ClassDeclaration = 216, - InterfaceDeclaration = 217, - TypeAliasDeclaration = 218, - EnumDeclaration = 219, - ModuleDeclaration = 220, - ModuleBlock = 221, - CaseBlock = 222, - ImportEqualsDeclaration = 223, - ImportDeclaration = 224, - ImportClause = 225, - NamespaceImport = 226, - NamedImports = 227, - ImportSpecifier = 228, - ExportAssignment = 229, - ExportDeclaration = 230, - NamedExports = 231, - ExportSpecifier = 232, - MissingDeclaration = 233, - ExternalModuleReference = 234, - JsxElement = 235, - JsxSelfClosingElement = 236, - JsxOpeningElement = 237, - JsxText = 238, - JsxClosingElement = 239, - JsxAttribute = 240, - JsxSpreadAttribute = 241, - JsxExpression = 242, - CaseClause = 243, - DefaultClause = 244, - HeritageClause = 245, - CatchClause = 246, - PropertyAssignment = 247, - ShorthandPropertyAssignment = 248, - EnumMember = 249, - SourceFile = 250, - JSDocTypeExpression = 251, - JSDocAllType = 252, - JSDocUnknownType = 253, - JSDocArrayType = 254, - JSDocUnionType = 255, - JSDocTupleType = 256, - JSDocNullableType = 257, - JSDocNonNullableType = 258, - JSDocRecordType = 259, - JSDocRecordMember = 260, - JSDocTypeReference = 261, - JSDocOptionalType = 262, - JSDocFunctionType = 263, - JSDocVariadicType = 264, - JSDocConstructorType = 265, - JSDocThisType = 266, - JSDocComment = 267, - JSDocTag = 268, - JSDocParameterTag = 269, - JSDocReturnTag = 270, - JSDocTypeTag = 271, - JSDocTemplateTag = 272, - SyntaxList = 273, - Count = 274, + GlobalKeyword = 134, + OfKeyword = 135, + QualifiedName = 136, + ComputedPropertyName = 137, + TypeParameter = 138, + Parameter = 139, + Decorator = 140, + PropertySignature = 141, + PropertyDeclaration = 142, + MethodSignature = 143, + MethodDeclaration = 144, + Constructor = 145, + GetAccessor = 146, + SetAccessor = 147, + CallSignature = 148, + ConstructSignature = 149, + IndexSignature = 150, + TypePredicate = 151, + TypeReference = 152, + FunctionType = 153, + ConstructorType = 154, + TypeQuery = 155, + TypeLiteral = 156, + ArrayType = 157, + TupleType = 158, + UnionType = 159, + IntersectionType = 160, + ParenthesizedType = 161, + ThisType = 162, + StringLiteralType = 163, + ObjectBindingPattern = 164, + ArrayBindingPattern = 165, + BindingElement = 166, + ArrayLiteralExpression = 167, + ObjectLiteralExpression = 168, + PropertyAccessExpression = 169, + ElementAccessExpression = 170, + CallExpression = 171, + NewExpression = 172, + TaggedTemplateExpression = 173, + TypeAssertionExpression = 174, + ParenthesizedExpression = 175, + FunctionExpression = 176, + ArrowFunction = 177, + DeleteExpression = 178, + TypeOfExpression = 179, + VoidExpression = 180, + AwaitExpression = 181, + PrefixUnaryExpression = 182, + PostfixUnaryExpression = 183, + BinaryExpression = 184, + ConditionalExpression = 185, + TemplateExpression = 186, + YieldExpression = 187, + SpreadElementExpression = 188, + ClassExpression = 189, + OmittedExpression = 190, + ExpressionWithTypeArguments = 191, + AsExpression = 192, + TemplateSpan = 193, + SemicolonClassElement = 194, + Block = 195, + VariableStatement = 196, + EmptyStatement = 197, + ExpressionStatement = 198, + IfStatement = 199, + DoStatement = 200, + WhileStatement = 201, + ForStatement = 202, + ForInStatement = 203, + ForOfStatement = 204, + ContinueStatement = 205, + BreakStatement = 206, + ReturnStatement = 207, + WithStatement = 208, + SwitchStatement = 209, + LabeledStatement = 210, + ThrowStatement = 211, + TryStatement = 212, + DebuggerStatement = 213, + VariableDeclaration = 214, + VariableDeclarationList = 215, + FunctionDeclaration = 216, + ClassDeclaration = 217, + InterfaceDeclaration = 218, + TypeAliasDeclaration = 219, + EnumDeclaration = 220, + ModuleDeclaration = 221, + ModuleBlock = 222, + CaseBlock = 223, + ImportEqualsDeclaration = 224, + ImportDeclaration = 225, + ImportClause = 226, + NamespaceImport = 227, + NamedImports = 228, + ImportSpecifier = 229, + ExportAssignment = 230, + ExportDeclaration = 231, + NamedExports = 232, + ExportSpecifier = 233, + MissingDeclaration = 234, + ExternalModuleReference = 235, + JsxElement = 236, + JsxSelfClosingElement = 237, + JsxOpeningElement = 238, + JsxText = 239, + JsxClosingElement = 240, + JsxAttribute = 241, + JsxSpreadAttribute = 242, + JsxExpression = 243, + CaseClause = 244, + DefaultClause = 245, + HeritageClause = 246, + CatchClause = 247, + PropertyAssignment = 248, + ShorthandPropertyAssignment = 249, + EnumMember = 250, + SourceFile = 251, + JSDocTypeExpression = 252, + JSDocAllType = 253, + JSDocUnknownType = 254, + JSDocArrayType = 255, + JSDocUnionType = 256, + JSDocTupleType = 257, + JSDocNullableType = 258, + JSDocNonNullableType = 259, + JSDocRecordType = 260, + JSDocRecordMember = 261, + JSDocTypeReference = 262, + JSDocOptionalType = 263, + JSDocFunctionType = 264, + JSDocVariadicType = 265, + JSDocConstructorType = 266, + JSDocThisType = 267, + JSDocComment = 268, + JSDocTag = 269, + JSDocParameterTag = 270, + JSDocReturnTag = 271, + JSDocTypeTag = 272, + JSDocTemplateTag = 273, + SyntaxList = 274, + Count = 275, FirstAssignment = 56, LastAssignment = 68, FirstReservedWord = 70, LastReservedWord = 105, FirstKeyword = 70, - LastKeyword = 134, + LastKeyword = 135, FirstFutureReservedWord = 106, LastFutureReservedWord = 114, - FirstTypeNode = 150, - LastTypeNode = 162, + FirstTypeNode = 151, + LastTypeNode = 163, FirstPunctuation = 15, LastPunctuation = 68, FirstToken = 0, - LastToken = 134, + LastToken = 135, FirstTriviaToken = 2, LastTriviaToken = 7, FirstLiteralToken = 8, @@ -330,7 +331,7 @@ declare namespace ts { LastTemplateToken = 14, FirstBinaryOperator = 25, LastBinaryOperator = 68, - FirstNode = 135, + FirstNode = 136, } enum NodeFlags { None = 0, @@ -354,10 +355,16 @@ declare namespace ts { ContainsThis = 262144, HasImplicitReturn = 524288, HasExplicitReturn = 1048576, + GlobalAugmentation = 2097152, + HasClassExtends = 4194304, + HasDecorators = 8388608, + HasParamDecorators = 16777216, + HasAsyncFunctions = 33554432, Modifier = 1022, AccessibilityModifier = 56, BlockScoped = 24576, ReachabilityCheckFlags = 1572864, + EmitHelperFlags = 62914560, } enum JsxFlags { None = 0, @@ -1141,6 +1148,7 @@ declare namespace ts { getSymbolAtLocation(node: Node): Symbol; getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: string): Symbol[]; getShorthandAssignmentValueSymbol(location: Node): Symbol; + getExportSpecifierLocalTargetSymbol(location: ExportSpecifier): Symbol; getTypeAtLocation(node: Node): Type; typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; @@ -1154,6 +1162,7 @@ declare namespace ts { isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; isUndefinedSymbol(symbol: Symbol): boolean; isArgumentsSymbol(symbol: Symbol): boolean; + isUnknownSymbol(symbol: Symbol): boolean; getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; getAliasedSymbol(symbol: Symbol): Symbol; @@ -1543,6 +1552,8 @@ declare namespace ts { } } declare namespace ts { + type FileWatcherCallback = (path: string, removed?: boolean) => void; + type DirectoryWatcherCallback = (path: string) => void; interface System { args: string[]; newLine: string; @@ -1550,8 +1561,8 @@ declare namespace ts { write(s: string): void; readFile(path: string, encoding?: string): string; writeFile(path: string, data: string, writeByteOrderMark?: boolean): void; - watchFile?(path: string, callback: (path: string, removed?: boolean) => void): FileWatcher; - watchDirectory?(path: string, callback: (path: string) => void, recursive?: boolean): FileWatcher; + watchFile?(path: Path, callback: FileWatcherCallback): FileWatcher; + watchDirectory?(path: string, callback: DirectoryWatcherCallback, recursive?: boolean): FileWatcher; resolvePath(path: string): string; fileExists(path: string): boolean; directoryExists(path: string): boolean; @@ -1565,6 +1576,10 @@ declare namespace ts { interface FileWatcher { close(): void; } + interface DirectoryWatcher extends FileWatcher { + directoryPath: Path; + referenceCount: number; + } var sys: System; } declare namespace ts { @@ -2237,6 +2252,9 @@ declare namespace ts { static jsxOpenTagName: string; static jsxCloseTagName: string; static jsxSelfClosingTagName: string; + static jsxAttribute: string; + static jsxText: string; + static jsxAttributeStringLiteralValue: string; } enum ClassificationType { comment = 1, @@ -2260,6 +2278,9 @@ declare namespace ts { jsxOpenTagName = 19, jsxCloseTagName = 20, jsxSelfClosingTagName = 21, + jsxAttribute = 22, + jsxText = 23, + jsxAttributeStringLiteralValue = 24, } interface DisplayPartsSymbolWriter extends SymbolWriter { displayParts(): SymbolDisplayPart[]; @@ -2283,7 +2304,6 @@ declare namespace ts { function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean): SourceFile; let disableIncrementalParsing: boolean; function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; - function createGetCanonicalFileName(useCaseSensitivefileNames: boolean): (fileName: string) => string; function createDocumentRegistry(useCaseSensitiveFileNames?: boolean, currentDirectory?: string): DocumentRegistry; function preProcessFile(sourceText: string, readImportFiles?: boolean, detectJavaScriptImports?: boolean): PreProcessedFileInfo; function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry): LanguageService; diff --git a/lib/typescript.js b/lib/typescript.js index 6608f585b61..bbe9a4b07e3 100644 --- a/lib/typescript.js +++ b/lib/typescript.js @@ -163,182 +163,183 @@ var ts; SyntaxKind[SyntaxKind["SymbolKeyword"] = 131] = "SymbolKeyword"; SyntaxKind[SyntaxKind["TypeKeyword"] = 132] = "TypeKeyword"; SyntaxKind[SyntaxKind["FromKeyword"] = 133] = "FromKeyword"; - SyntaxKind[SyntaxKind["OfKeyword"] = 134] = "OfKeyword"; + SyntaxKind[SyntaxKind["GlobalKeyword"] = 134] = "GlobalKeyword"; + SyntaxKind[SyntaxKind["OfKeyword"] = 135] = "OfKeyword"; // Parse tree nodes // Names - SyntaxKind[SyntaxKind["QualifiedName"] = 135] = "QualifiedName"; - SyntaxKind[SyntaxKind["ComputedPropertyName"] = 136] = "ComputedPropertyName"; + SyntaxKind[SyntaxKind["QualifiedName"] = 136] = "QualifiedName"; + SyntaxKind[SyntaxKind["ComputedPropertyName"] = 137] = "ComputedPropertyName"; // Signature elements - SyntaxKind[SyntaxKind["TypeParameter"] = 137] = "TypeParameter"; - SyntaxKind[SyntaxKind["Parameter"] = 138] = "Parameter"; - SyntaxKind[SyntaxKind["Decorator"] = 139] = "Decorator"; + SyntaxKind[SyntaxKind["TypeParameter"] = 138] = "TypeParameter"; + SyntaxKind[SyntaxKind["Parameter"] = 139] = "Parameter"; + SyntaxKind[SyntaxKind["Decorator"] = 140] = "Decorator"; // TypeMember - SyntaxKind[SyntaxKind["PropertySignature"] = 140] = "PropertySignature"; - SyntaxKind[SyntaxKind["PropertyDeclaration"] = 141] = "PropertyDeclaration"; - SyntaxKind[SyntaxKind["MethodSignature"] = 142] = "MethodSignature"; - SyntaxKind[SyntaxKind["MethodDeclaration"] = 143] = "MethodDeclaration"; - SyntaxKind[SyntaxKind["Constructor"] = 144] = "Constructor"; - SyntaxKind[SyntaxKind["GetAccessor"] = 145] = "GetAccessor"; - SyntaxKind[SyntaxKind["SetAccessor"] = 146] = "SetAccessor"; - SyntaxKind[SyntaxKind["CallSignature"] = 147] = "CallSignature"; - SyntaxKind[SyntaxKind["ConstructSignature"] = 148] = "ConstructSignature"; - SyntaxKind[SyntaxKind["IndexSignature"] = 149] = "IndexSignature"; + SyntaxKind[SyntaxKind["PropertySignature"] = 141] = "PropertySignature"; + SyntaxKind[SyntaxKind["PropertyDeclaration"] = 142] = "PropertyDeclaration"; + SyntaxKind[SyntaxKind["MethodSignature"] = 143] = "MethodSignature"; + SyntaxKind[SyntaxKind["MethodDeclaration"] = 144] = "MethodDeclaration"; + SyntaxKind[SyntaxKind["Constructor"] = 145] = "Constructor"; + SyntaxKind[SyntaxKind["GetAccessor"] = 146] = "GetAccessor"; + SyntaxKind[SyntaxKind["SetAccessor"] = 147] = "SetAccessor"; + SyntaxKind[SyntaxKind["CallSignature"] = 148] = "CallSignature"; + SyntaxKind[SyntaxKind["ConstructSignature"] = 149] = "ConstructSignature"; + SyntaxKind[SyntaxKind["IndexSignature"] = 150] = "IndexSignature"; // Type - SyntaxKind[SyntaxKind["TypePredicate"] = 150] = "TypePredicate"; - SyntaxKind[SyntaxKind["TypeReference"] = 151] = "TypeReference"; - SyntaxKind[SyntaxKind["FunctionType"] = 152] = "FunctionType"; - SyntaxKind[SyntaxKind["ConstructorType"] = 153] = "ConstructorType"; - SyntaxKind[SyntaxKind["TypeQuery"] = 154] = "TypeQuery"; - SyntaxKind[SyntaxKind["TypeLiteral"] = 155] = "TypeLiteral"; - SyntaxKind[SyntaxKind["ArrayType"] = 156] = "ArrayType"; - SyntaxKind[SyntaxKind["TupleType"] = 157] = "TupleType"; - SyntaxKind[SyntaxKind["UnionType"] = 158] = "UnionType"; - SyntaxKind[SyntaxKind["IntersectionType"] = 159] = "IntersectionType"; - SyntaxKind[SyntaxKind["ParenthesizedType"] = 160] = "ParenthesizedType"; - SyntaxKind[SyntaxKind["ThisType"] = 161] = "ThisType"; - SyntaxKind[SyntaxKind["StringLiteralType"] = 162] = "StringLiteralType"; + SyntaxKind[SyntaxKind["TypePredicate"] = 151] = "TypePredicate"; + SyntaxKind[SyntaxKind["TypeReference"] = 152] = "TypeReference"; + SyntaxKind[SyntaxKind["FunctionType"] = 153] = "FunctionType"; + SyntaxKind[SyntaxKind["ConstructorType"] = 154] = "ConstructorType"; + SyntaxKind[SyntaxKind["TypeQuery"] = 155] = "TypeQuery"; + SyntaxKind[SyntaxKind["TypeLiteral"] = 156] = "TypeLiteral"; + SyntaxKind[SyntaxKind["ArrayType"] = 157] = "ArrayType"; + SyntaxKind[SyntaxKind["TupleType"] = 158] = "TupleType"; + SyntaxKind[SyntaxKind["UnionType"] = 159] = "UnionType"; + SyntaxKind[SyntaxKind["IntersectionType"] = 160] = "IntersectionType"; + SyntaxKind[SyntaxKind["ParenthesizedType"] = 161] = "ParenthesizedType"; + SyntaxKind[SyntaxKind["ThisType"] = 162] = "ThisType"; + SyntaxKind[SyntaxKind["StringLiteralType"] = 163] = "StringLiteralType"; // Binding patterns - SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 163] = "ObjectBindingPattern"; - SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 164] = "ArrayBindingPattern"; - SyntaxKind[SyntaxKind["BindingElement"] = 165] = "BindingElement"; + SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 164] = "ObjectBindingPattern"; + SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 165] = "ArrayBindingPattern"; + SyntaxKind[SyntaxKind["BindingElement"] = 166] = "BindingElement"; // Expression - SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 166] = "ArrayLiteralExpression"; - SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 167] = "ObjectLiteralExpression"; - SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 168] = "PropertyAccessExpression"; - SyntaxKind[SyntaxKind["ElementAccessExpression"] = 169] = "ElementAccessExpression"; - SyntaxKind[SyntaxKind["CallExpression"] = 170] = "CallExpression"; - SyntaxKind[SyntaxKind["NewExpression"] = 171] = "NewExpression"; - SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 172] = "TaggedTemplateExpression"; - SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 173] = "TypeAssertionExpression"; - SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 174] = "ParenthesizedExpression"; - SyntaxKind[SyntaxKind["FunctionExpression"] = 175] = "FunctionExpression"; - SyntaxKind[SyntaxKind["ArrowFunction"] = 176] = "ArrowFunction"; - SyntaxKind[SyntaxKind["DeleteExpression"] = 177] = "DeleteExpression"; - SyntaxKind[SyntaxKind["TypeOfExpression"] = 178] = "TypeOfExpression"; - SyntaxKind[SyntaxKind["VoidExpression"] = 179] = "VoidExpression"; - SyntaxKind[SyntaxKind["AwaitExpression"] = 180] = "AwaitExpression"; - SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 181] = "PrefixUnaryExpression"; - SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 182] = "PostfixUnaryExpression"; - SyntaxKind[SyntaxKind["BinaryExpression"] = 183] = "BinaryExpression"; - SyntaxKind[SyntaxKind["ConditionalExpression"] = 184] = "ConditionalExpression"; - SyntaxKind[SyntaxKind["TemplateExpression"] = 185] = "TemplateExpression"; - SyntaxKind[SyntaxKind["YieldExpression"] = 186] = "YieldExpression"; - SyntaxKind[SyntaxKind["SpreadElementExpression"] = 187] = "SpreadElementExpression"; - SyntaxKind[SyntaxKind["ClassExpression"] = 188] = "ClassExpression"; - SyntaxKind[SyntaxKind["OmittedExpression"] = 189] = "OmittedExpression"; - SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 190] = "ExpressionWithTypeArguments"; - SyntaxKind[SyntaxKind["AsExpression"] = 191] = "AsExpression"; + SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 167] = "ArrayLiteralExpression"; + SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 168] = "ObjectLiteralExpression"; + SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 169] = "PropertyAccessExpression"; + SyntaxKind[SyntaxKind["ElementAccessExpression"] = 170] = "ElementAccessExpression"; + SyntaxKind[SyntaxKind["CallExpression"] = 171] = "CallExpression"; + SyntaxKind[SyntaxKind["NewExpression"] = 172] = "NewExpression"; + SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 173] = "TaggedTemplateExpression"; + SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 174] = "TypeAssertionExpression"; + SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 175] = "ParenthesizedExpression"; + SyntaxKind[SyntaxKind["FunctionExpression"] = 176] = "FunctionExpression"; + SyntaxKind[SyntaxKind["ArrowFunction"] = 177] = "ArrowFunction"; + SyntaxKind[SyntaxKind["DeleteExpression"] = 178] = "DeleteExpression"; + SyntaxKind[SyntaxKind["TypeOfExpression"] = 179] = "TypeOfExpression"; + SyntaxKind[SyntaxKind["VoidExpression"] = 180] = "VoidExpression"; + SyntaxKind[SyntaxKind["AwaitExpression"] = 181] = "AwaitExpression"; + SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 182] = "PrefixUnaryExpression"; + SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 183] = "PostfixUnaryExpression"; + SyntaxKind[SyntaxKind["BinaryExpression"] = 184] = "BinaryExpression"; + SyntaxKind[SyntaxKind["ConditionalExpression"] = 185] = "ConditionalExpression"; + SyntaxKind[SyntaxKind["TemplateExpression"] = 186] = "TemplateExpression"; + SyntaxKind[SyntaxKind["YieldExpression"] = 187] = "YieldExpression"; + SyntaxKind[SyntaxKind["SpreadElementExpression"] = 188] = "SpreadElementExpression"; + SyntaxKind[SyntaxKind["ClassExpression"] = 189] = "ClassExpression"; + SyntaxKind[SyntaxKind["OmittedExpression"] = 190] = "OmittedExpression"; + SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 191] = "ExpressionWithTypeArguments"; + SyntaxKind[SyntaxKind["AsExpression"] = 192] = "AsExpression"; // Misc - SyntaxKind[SyntaxKind["TemplateSpan"] = 192] = "TemplateSpan"; - SyntaxKind[SyntaxKind["SemicolonClassElement"] = 193] = "SemicolonClassElement"; + SyntaxKind[SyntaxKind["TemplateSpan"] = 193] = "TemplateSpan"; + SyntaxKind[SyntaxKind["SemicolonClassElement"] = 194] = "SemicolonClassElement"; // Element - SyntaxKind[SyntaxKind["Block"] = 194] = "Block"; - SyntaxKind[SyntaxKind["VariableStatement"] = 195] = "VariableStatement"; - SyntaxKind[SyntaxKind["EmptyStatement"] = 196] = "EmptyStatement"; - SyntaxKind[SyntaxKind["ExpressionStatement"] = 197] = "ExpressionStatement"; - SyntaxKind[SyntaxKind["IfStatement"] = 198] = "IfStatement"; - SyntaxKind[SyntaxKind["DoStatement"] = 199] = "DoStatement"; - SyntaxKind[SyntaxKind["WhileStatement"] = 200] = "WhileStatement"; - SyntaxKind[SyntaxKind["ForStatement"] = 201] = "ForStatement"; - SyntaxKind[SyntaxKind["ForInStatement"] = 202] = "ForInStatement"; - SyntaxKind[SyntaxKind["ForOfStatement"] = 203] = "ForOfStatement"; - SyntaxKind[SyntaxKind["ContinueStatement"] = 204] = "ContinueStatement"; - SyntaxKind[SyntaxKind["BreakStatement"] = 205] = "BreakStatement"; - SyntaxKind[SyntaxKind["ReturnStatement"] = 206] = "ReturnStatement"; - SyntaxKind[SyntaxKind["WithStatement"] = 207] = "WithStatement"; - SyntaxKind[SyntaxKind["SwitchStatement"] = 208] = "SwitchStatement"; - SyntaxKind[SyntaxKind["LabeledStatement"] = 209] = "LabeledStatement"; - SyntaxKind[SyntaxKind["ThrowStatement"] = 210] = "ThrowStatement"; - SyntaxKind[SyntaxKind["TryStatement"] = 211] = "TryStatement"; - SyntaxKind[SyntaxKind["DebuggerStatement"] = 212] = "DebuggerStatement"; - SyntaxKind[SyntaxKind["VariableDeclaration"] = 213] = "VariableDeclaration"; - SyntaxKind[SyntaxKind["VariableDeclarationList"] = 214] = "VariableDeclarationList"; - SyntaxKind[SyntaxKind["FunctionDeclaration"] = 215] = "FunctionDeclaration"; - SyntaxKind[SyntaxKind["ClassDeclaration"] = 216] = "ClassDeclaration"; - SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 217] = "InterfaceDeclaration"; - SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 218] = "TypeAliasDeclaration"; - SyntaxKind[SyntaxKind["EnumDeclaration"] = 219] = "EnumDeclaration"; - SyntaxKind[SyntaxKind["ModuleDeclaration"] = 220] = "ModuleDeclaration"; - SyntaxKind[SyntaxKind["ModuleBlock"] = 221] = "ModuleBlock"; - SyntaxKind[SyntaxKind["CaseBlock"] = 222] = "CaseBlock"; - SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 223] = "ImportEqualsDeclaration"; - SyntaxKind[SyntaxKind["ImportDeclaration"] = 224] = "ImportDeclaration"; - SyntaxKind[SyntaxKind["ImportClause"] = 225] = "ImportClause"; - SyntaxKind[SyntaxKind["NamespaceImport"] = 226] = "NamespaceImport"; - SyntaxKind[SyntaxKind["NamedImports"] = 227] = "NamedImports"; - SyntaxKind[SyntaxKind["ImportSpecifier"] = 228] = "ImportSpecifier"; - SyntaxKind[SyntaxKind["ExportAssignment"] = 229] = "ExportAssignment"; - SyntaxKind[SyntaxKind["ExportDeclaration"] = 230] = "ExportDeclaration"; - SyntaxKind[SyntaxKind["NamedExports"] = 231] = "NamedExports"; - SyntaxKind[SyntaxKind["ExportSpecifier"] = 232] = "ExportSpecifier"; - SyntaxKind[SyntaxKind["MissingDeclaration"] = 233] = "MissingDeclaration"; + SyntaxKind[SyntaxKind["Block"] = 195] = "Block"; + SyntaxKind[SyntaxKind["VariableStatement"] = 196] = "VariableStatement"; + SyntaxKind[SyntaxKind["EmptyStatement"] = 197] = "EmptyStatement"; + SyntaxKind[SyntaxKind["ExpressionStatement"] = 198] = "ExpressionStatement"; + SyntaxKind[SyntaxKind["IfStatement"] = 199] = "IfStatement"; + SyntaxKind[SyntaxKind["DoStatement"] = 200] = "DoStatement"; + SyntaxKind[SyntaxKind["WhileStatement"] = 201] = "WhileStatement"; + SyntaxKind[SyntaxKind["ForStatement"] = 202] = "ForStatement"; + SyntaxKind[SyntaxKind["ForInStatement"] = 203] = "ForInStatement"; + SyntaxKind[SyntaxKind["ForOfStatement"] = 204] = "ForOfStatement"; + SyntaxKind[SyntaxKind["ContinueStatement"] = 205] = "ContinueStatement"; + SyntaxKind[SyntaxKind["BreakStatement"] = 206] = "BreakStatement"; + SyntaxKind[SyntaxKind["ReturnStatement"] = 207] = "ReturnStatement"; + SyntaxKind[SyntaxKind["WithStatement"] = 208] = "WithStatement"; + SyntaxKind[SyntaxKind["SwitchStatement"] = 209] = "SwitchStatement"; + SyntaxKind[SyntaxKind["LabeledStatement"] = 210] = "LabeledStatement"; + SyntaxKind[SyntaxKind["ThrowStatement"] = 211] = "ThrowStatement"; + SyntaxKind[SyntaxKind["TryStatement"] = 212] = "TryStatement"; + SyntaxKind[SyntaxKind["DebuggerStatement"] = 213] = "DebuggerStatement"; + SyntaxKind[SyntaxKind["VariableDeclaration"] = 214] = "VariableDeclaration"; + SyntaxKind[SyntaxKind["VariableDeclarationList"] = 215] = "VariableDeclarationList"; + SyntaxKind[SyntaxKind["FunctionDeclaration"] = 216] = "FunctionDeclaration"; + SyntaxKind[SyntaxKind["ClassDeclaration"] = 217] = "ClassDeclaration"; + SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 218] = "InterfaceDeclaration"; + SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 219] = "TypeAliasDeclaration"; + SyntaxKind[SyntaxKind["EnumDeclaration"] = 220] = "EnumDeclaration"; + SyntaxKind[SyntaxKind["ModuleDeclaration"] = 221] = "ModuleDeclaration"; + SyntaxKind[SyntaxKind["ModuleBlock"] = 222] = "ModuleBlock"; + SyntaxKind[SyntaxKind["CaseBlock"] = 223] = "CaseBlock"; + SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 224] = "ImportEqualsDeclaration"; + SyntaxKind[SyntaxKind["ImportDeclaration"] = 225] = "ImportDeclaration"; + SyntaxKind[SyntaxKind["ImportClause"] = 226] = "ImportClause"; + SyntaxKind[SyntaxKind["NamespaceImport"] = 227] = "NamespaceImport"; + SyntaxKind[SyntaxKind["NamedImports"] = 228] = "NamedImports"; + SyntaxKind[SyntaxKind["ImportSpecifier"] = 229] = "ImportSpecifier"; + SyntaxKind[SyntaxKind["ExportAssignment"] = 230] = "ExportAssignment"; + SyntaxKind[SyntaxKind["ExportDeclaration"] = 231] = "ExportDeclaration"; + SyntaxKind[SyntaxKind["NamedExports"] = 232] = "NamedExports"; + SyntaxKind[SyntaxKind["ExportSpecifier"] = 233] = "ExportSpecifier"; + SyntaxKind[SyntaxKind["MissingDeclaration"] = 234] = "MissingDeclaration"; // Module references - SyntaxKind[SyntaxKind["ExternalModuleReference"] = 234] = "ExternalModuleReference"; + SyntaxKind[SyntaxKind["ExternalModuleReference"] = 235] = "ExternalModuleReference"; // JSX - SyntaxKind[SyntaxKind["JsxElement"] = 235] = "JsxElement"; - SyntaxKind[SyntaxKind["JsxSelfClosingElement"] = 236] = "JsxSelfClosingElement"; - SyntaxKind[SyntaxKind["JsxOpeningElement"] = 237] = "JsxOpeningElement"; - SyntaxKind[SyntaxKind["JsxText"] = 238] = "JsxText"; - SyntaxKind[SyntaxKind["JsxClosingElement"] = 239] = "JsxClosingElement"; - SyntaxKind[SyntaxKind["JsxAttribute"] = 240] = "JsxAttribute"; - SyntaxKind[SyntaxKind["JsxSpreadAttribute"] = 241] = "JsxSpreadAttribute"; - SyntaxKind[SyntaxKind["JsxExpression"] = 242] = "JsxExpression"; + SyntaxKind[SyntaxKind["JsxElement"] = 236] = "JsxElement"; + SyntaxKind[SyntaxKind["JsxSelfClosingElement"] = 237] = "JsxSelfClosingElement"; + SyntaxKind[SyntaxKind["JsxOpeningElement"] = 238] = "JsxOpeningElement"; + SyntaxKind[SyntaxKind["JsxText"] = 239] = "JsxText"; + SyntaxKind[SyntaxKind["JsxClosingElement"] = 240] = "JsxClosingElement"; + SyntaxKind[SyntaxKind["JsxAttribute"] = 241] = "JsxAttribute"; + SyntaxKind[SyntaxKind["JsxSpreadAttribute"] = 242] = "JsxSpreadAttribute"; + SyntaxKind[SyntaxKind["JsxExpression"] = 243] = "JsxExpression"; // Clauses - SyntaxKind[SyntaxKind["CaseClause"] = 243] = "CaseClause"; - SyntaxKind[SyntaxKind["DefaultClause"] = 244] = "DefaultClause"; - SyntaxKind[SyntaxKind["HeritageClause"] = 245] = "HeritageClause"; - SyntaxKind[SyntaxKind["CatchClause"] = 246] = "CatchClause"; + SyntaxKind[SyntaxKind["CaseClause"] = 244] = "CaseClause"; + SyntaxKind[SyntaxKind["DefaultClause"] = 245] = "DefaultClause"; + SyntaxKind[SyntaxKind["HeritageClause"] = 246] = "HeritageClause"; + SyntaxKind[SyntaxKind["CatchClause"] = 247] = "CatchClause"; // Property assignments - SyntaxKind[SyntaxKind["PropertyAssignment"] = 247] = "PropertyAssignment"; - SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 248] = "ShorthandPropertyAssignment"; + SyntaxKind[SyntaxKind["PropertyAssignment"] = 248] = "PropertyAssignment"; + SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 249] = "ShorthandPropertyAssignment"; // Enum - SyntaxKind[SyntaxKind["EnumMember"] = 249] = "EnumMember"; + SyntaxKind[SyntaxKind["EnumMember"] = 250] = "EnumMember"; // Top-level nodes - SyntaxKind[SyntaxKind["SourceFile"] = 250] = "SourceFile"; + SyntaxKind[SyntaxKind["SourceFile"] = 251] = "SourceFile"; // JSDoc nodes. - SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 251] = "JSDocTypeExpression"; + SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 252] = "JSDocTypeExpression"; // The * type. - SyntaxKind[SyntaxKind["JSDocAllType"] = 252] = "JSDocAllType"; + SyntaxKind[SyntaxKind["JSDocAllType"] = 253] = "JSDocAllType"; // The ? type. - SyntaxKind[SyntaxKind["JSDocUnknownType"] = 253] = "JSDocUnknownType"; - SyntaxKind[SyntaxKind["JSDocArrayType"] = 254] = "JSDocArrayType"; - SyntaxKind[SyntaxKind["JSDocUnionType"] = 255] = "JSDocUnionType"; - SyntaxKind[SyntaxKind["JSDocTupleType"] = 256] = "JSDocTupleType"; - SyntaxKind[SyntaxKind["JSDocNullableType"] = 257] = "JSDocNullableType"; - SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 258] = "JSDocNonNullableType"; - SyntaxKind[SyntaxKind["JSDocRecordType"] = 259] = "JSDocRecordType"; - SyntaxKind[SyntaxKind["JSDocRecordMember"] = 260] = "JSDocRecordMember"; - SyntaxKind[SyntaxKind["JSDocTypeReference"] = 261] = "JSDocTypeReference"; - SyntaxKind[SyntaxKind["JSDocOptionalType"] = 262] = "JSDocOptionalType"; - SyntaxKind[SyntaxKind["JSDocFunctionType"] = 263] = "JSDocFunctionType"; - SyntaxKind[SyntaxKind["JSDocVariadicType"] = 264] = "JSDocVariadicType"; - SyntaxKind[SyntaxKind["JSDocConstructorType"] = 265] = "JSDocConstructorType"; - SyntaxKind[SyntaxKind["JSDocThisType"] = 266] = "JSDocThisType"; - SyntaxKind[SyntaxKind["JSDocComment"] = 267] = "JSDocComment"; - SyntaxKind[SyntaxKind["JSDocTag"] = 268] = "JSDocTag"; - SyntaxKind[SyntaxKind["JSDocParameterTag"] = 269] = "JSDocParameterTag"; - SyntaxKind[SyntaxKind["JSDocReturnTag"] = 270] = "JSDocReturnTag"; - SyntaxKind[SyntaxKind["JSDocTypeTag"] = 271] = "JSDocTypeTag"; - SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 272] = "JSDocTemplateTag"; + SyntaxKind[SyntaxKind["JSDocUnknownType"] = 254] = "JSDocUnknownType"; + SyntaxKind[SyntaxKind["JSDocArrayType"] = 255] = "JSDocArrayType"; + SyntaxKind[SyntaxKind["JSDocUnionType"] = 256] = "JSDocUnionType"; + SyntaxKind[SyntaxKind["JSDocTupleType"] = 257] = "JSDocTupleType"; + SyntaxKind[SyntaxKind["JSDocNullableType"] = 258] = "JSDocNullableType"; + SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 259] = "JSDocNonNullableType"; + SyntaxKind[SyntaxKind["JSDocRecordType"] = 260] = "JSDocRecordType"; + SyntaxKind[SyntaxKind["JSDocRecordMember"] = 261] = "JSDocRecordMember"; + SyntaxKind[SyntaxKind["JSDocTypeReference"] = 262] = "JSDocTypeReference"; + SyntaxKind[SyntaxKind["JSDocOptionalType"] = 263] = "JSDocOptionalType"; + SyntaxKind[SyntaxKind["JSDocFunctionType"] = 264] = "JSDocFunctionType"; + SyntaxKind[SyntaxKind["JSDocVariadicType"] = 265] = "JSDocVariadicType"; + SyntaxKind[SyntaxKind["JSDocConstructorType"] = 266] = "JSDocConstructorType"; + SyntaxKind[SyntaxKind["JSDocThisType"] = 267] = "JSDocThisType"; + SyntaxKind[SyntaxKind["JSDocComment"] = 268] = "JSDocComment"; + SyntaxKind[SyntaxKind["JSDocTag"] = 269] = "JSDocTag"; + SyntaxKind[SyntaxKind["JSDocParameterTag"] = 270] = "JSDocParameterTag"; + SyntaxKind[SyntaxKind["JSDocReturnTag"] = 271] = "JSDocReturnTag"; + SyntaxKind[SyntaxKind["JSDocTypeTag"] = 272] = "JSDocTypeTag"; + SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 273] = "JSDocTemplateTag"; // Synthesized list - SyntaxKind[SyntaxKind["SyntaxList"] = 273] = "SyntaxList"; + SyntaxKind[SyntaxKind["SyntaxList"] = 274] = "SyntaxList"; // Enum value count - SyntaxKind[SyntaxKind["Count"] = 274] = "Count"; + SyntaxKind[SyntaxKind["Count"] = 275] = "Count"; // Markers SyntaxKind[SyntaxKind["FirstAssignment"] = 56] = "FirstAssignment"; SyntaxKind[SyntaxKind["LastAssignment"] = 68] = "LastAssignment"; SyntaxKind[SyntaxKind["FirstReservedWord"] = 70] = "FirstReservedWord"; SyntaxKind[SyntaxKind["LastReservedWord"] = 105] = "LastReservedWord"; SyntaxKind[SyntaxKind["FirstKeyword"] = 70] = "FirstKeyword"; - SyntaxKind[SyntaxKind["LastKeyword"] = 134] = "LastKeyword"; + SyntaxKind[SyntaxKind["LastKeyword"] = 135] = "LastKeyword"; SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 106] = "FirstFutureReservedWord"; SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 114] = "LastFutureReservedWord"; - SyntaxKind[SyntaxKind["FirstTypeNode"] = 150] = "FirstTypeNode"; - SyntaxKind[SyntaxKind["LastTypeNode"] = 162] = "LastTypeNode"; + SyntaxKind[SyntaxKind["FirstTypeNode"] = 151] = "FirstTypeNode"; + SyntaxKind[SyntaxKind["LastTypeNode"] = 163] = "LastTypeNode"; SyntaxKind[SyntaxKind["FirstPunctuation"] = 15] = "FirstPunctuation"; SyntaxKind[SyntaxKind["LastPunctuation"] = 68] = "LastPunctuation"; SyntaxKind[SyntaxKind["FirstToken"] = 0] = "FirstToken"; - SyntaxKind[SyntaxKind["LastToken"] = 134] = "LastToken"; + SyntaxKind[SyntaxKind["LastToken"] = 135] = "LastToken"; SyntaxKind[SyntaxKind["FirstTriviaToken"] = 2] = "FirstTriviaToken"; SyntaxKind[SyntaxKind["LastTriviaToken"] = 7] = "LastTriviaToken"; SyntaxKind[SyntaxKind["FirstLiteralToken"] = 8] = "FirstLiteralToken"; @@ -347,7 +348,7 @@ var ts; SyntaxKind[SyntaxKind["LastTemplateToken"] = 14] = "LastTemplateToken"; SyntaxKind[SyntaxKind["FirstBinaryOperator"] = 25] = "FirstBinaryOperator"; SyntaxKind[SyntaxKind["LastBinaryOperator"] = 68] = "LastBinaryOperator"; - SyntaxKind[SyntaxKind["FirstNode"] = 135] = "FirstNode"; + SyntaxKind[SyntaxKind["FirstNode"] = 136] = "FirstNode"; })(ts.SyntaxKind || (ts.SyntaxKind = {})); var SyntaxKind = ts.SyntaxKind; (function (NodeFlags) { @@ -372,10 +373,16 @@ var ts; NodeFlags[NodeFlags["ContainsThis"] = 262144] = "ContainsThis"; NodeFlags[NodeFlags["HasImplicitReturn"] = 524288] = "HasImplicitReturn"; NodeFlags[NodeFlags["HasExplicitReturn"] = 1048576] = "HasExplicitReturn"; + NodeFlags[NodeFlags["GlobalAugmentation"] = 2097152] = "GlobalAugmentation"; + NodeFlags[NodeFlags["HasClassExtends"] = 4194304] = "HasClassExtends"; + NodeFlags[NodeFlags["HasDecorators"] = 8388608] = "HasDecorators"; + NodeFlags[NodeFlags["HasParamDecorators"] = 16777216] = "HasParamDecorators"; + NodeFlags[NodeFlags["HasAsyncFunctions"] = 33554432] = "HasAsyncFunctions"; NodeFlags[NodeFlags["Modifier"] = 1022] = "Modifier"; NodeFlags[NodeFlags["AccessibilityModifier"] = 56] = "AccessibilityModifier"; NodeFlags[NodeFlags["BlockScoped"] = 24576] = "BlockScoped"; NodeFlags[NodeFlags["ReachabilityCheckFlags"] = 1572864] = "ReachabilityCheckFlags"; + NodeFlags[NodeFlags["EmitHelperFlags"] = 62914560] = "EmitHelperFlags"; })(ts.NodeFlags || (ts.NodeFlags = {})); var NodeFlags = ts.NodeFlags; /* @internal */ @@ -584,11 +591,6 @@ var ts; NodeCheckFlags[NodeCheckFlags["TypeChecked"] = 1] = "TypeChecked"; NodeCheckFlags[NodeCheckFlags["LexicalThis"] = 2] = "LexicalThis"; NodeCheckFlags[NodeCheckFlags["CaptureThis"] = 4] = "CaptureThis"; - NodeCheckFlags[NodeCheckFlags["EmitExtends"] = 8] = "EmitExtends"; - NodeCheckFlags[NodeCheckFlags["EmitDecorate"] = 16] = "EmitDecorate"; - NodeCheckFlags[NodeCheckFlags["EmitParam"] = 32] = "EmitParam"; - NodeCheckFlags[NodeCheckFlags["EmitAwaiter"] = 64] = "EmitAwaiter"; - NodeCheckFlags[NodeCheckFlags["EmitGenerator"] = 128] = "EmitGenerator"; NodeCheckFlags[NodeCheckFlags["SuperInstance"] = 256] = "SuperInstance"; NodeCheckFlags[NodeCheckFlags["SuperStatic"] = 512] = "SuperStatic"; NodeCheckFlags[NodeCheckFlags["ContextChecked"] = 1024] = "ContextChecked"; @@ -1532,7 +1534,8 @@ var ts; directoryComponents.length--; } // Find the component that differs - for (var joinStartIndex = 0; joinStartIndex < pathComponents.length && joinStartIndex < directoryComponents.length; joinStartIndex++) { + var joinStartIndex; + for (joinStartIndex = 0; joinStartIndex < pathComponents.length && joinStartIndex < directoryComponents.length; joinStartIndex++) { if (getCanonicalFileName(directoryComponents[joinStartIndex]) !== getCanonicalFileName(pathComponents[joinStartIndex])) { break; } @@ -1681,6 +1684,12 @@ var ts; return copiedList; } ts.copyListRemovingItem = copyListRemovingItem; + function createGetCanonicalFileName(useCaseSensitivefileNames) { + return useCaseSensitivefileNames + ? (function (fileName) { return fileName; }) + : (function (fileName) { return fileName.toLowerCase(); }); + } + ts.createGetCanonicalFileName = createGetCanonicalFileName; })(ts || (ts = {})); /// var ts; @@ -1829,7 +1838,7 @@ var ts; var _os = require("os"); // average async stat takes about 30 microseconds // set chunk size to do 30 files in < 1 millisecond - function createWatchedFileSet(interval, chunkSize) { + function createPollingWatchedFileSet(interval, chunkSize) { if (interval === void 0) { interval = 2500; } if (chunkSize === void 0) { chunkSize = 30; } var watchedFiles = []; @@ -1843,13 +1852,13 @@ var ts; if (!watchedFile) { return; } - _fs.stat(watchedFile.fileName, function (err, stats) { + _fs.stat(watchedFile.filePath, function (err, stats) { if (err) { - watchedFile.callback(watchedFile.fileName); + watchedFile.callback(watchedFile.filePath); } else if (watchedFile.mtime.getTime() !== stats.mtime.getTime()) { - watchedFile.mtime = getModifiedTime(watchedFile.fileName); - watchedFile.callback(watchedFile.fileName, watchedFile.mtime.getTime() === 0); + watchedFile.mtime = getModifiedTime(watchedFile.filePath); + watchedFile.callback(watchedFile.filePath, watchedFile.mtime.getTime() === 0); } }); } @@ -1875,11 +1884,11 @@ var ts; nextFileToCheck = nextToCheck; }, interval); } - function addFile(fileName, callback) { + function addFile(filePath, callback) { var file = { - fileName: fileName, + filePath: filePath, callback: callback, - mtime: getModifiedTime(fileName) + mtime: getModifiedTime(filePath) }; watchedFiles.push(file); if (watchedFiles.length === 1) { @@ -1898,6 +1907,77 @@ var ts; removeFile: removeFile }; } + function createWatchedFileSet() { + var dirWatchers = ts.createFileMap(); + // One file can have multiple watchers + var fileWatcherCallbacks = ts.createFileMap(); + return { addFile: addFile, removeFile: removeFile }; + function reduceDirWatcherRefCountForFile(filePath) { + var dirPath = ts.getDirectoryPath(filePath); + if (dirWatchers.contains(dirPath)) { + var watcher = dirWatchers.get(dirPath); + watcher.referenceCount -= 1; + if (watcher.referenceCount <= 0) { + watcher.close(); + dirWatchers.remove(dirPath); + } + } + } + function addDirWatcher(dirPath) { + if (dirWatchers.contains(dirPath)) { + var watcher_1 = dirWatchers.get(dirPath); + watcher_1.referenceCount += 1; + return; + } + var watcher = _fs.watch(dirPath, { persistent: true }, function (eventName, relativeFileName) { return fileEventHandler(eventName, relativeFileName, dirPath); }); + watcher.referenceCount = 1; + dirWatchers.set(dirPath, watcher); + return; + } + function addFileWatcherCallback(filePath, callback) { + if (fileWatcherCallbacks.contains(filePath)) { + fileWatcherCallbacks.get(filePath).push(callback); + } + else { + fileWatcherCallbacks.set(filePath, [callback]); + } + } + function addFile(filePath, callback) { + addFileWatcherCallback(filePath, callback); + addDirWatcher(ts.getDirectoryPath(filePath)); + return { filePath: filePath, callback: callback }; + } + function removeFile(watchedFile) { + removeFileWatcherCallback(watchedFile.filePath, watchedFile.callback); + reduceDirWatcherRefCountForFile(watchedFile.filePath); + } + function removeFileWatcherCallback(filePath, callback) { + if (fileWatcherCallbacks.contains(filePath)) { + var newCallbacks = ts.copyListRemovingItem(callback, fileWatcherCallbacks.get(filePath)); + if (newCallbacks.length === 0) { + fileWatcherCallbacks.remove(filePath); + } + else { + fileWatcherCallbacks.set(filePath, newCallbacks); + } + } + } + /** + * @param watcherPath is the path from which the watcher is triggered. + */ + function fileEventHandler(eventName, relativeFileName, baseDirPath) { + // When files are deleted from disk, the triggered "rename" event would have a relativefileName of "undefined" + var filePath = typeof relativeFileName !== "string" + ? undefined + : ts.toPath(relativeFileName, baseDirPath, ts.createGetCanonicalFileName(ts.sys.useCaseSensitiveFileNames)); + if (eventName === "change" && fileWatcherCallbacks.contains(filePath)) { + for (var _i = 0, _a = fileWatcherCallbacks.get(filePath); _i < _a.length; _i++) { + var fileCallback = _a[_i]; + fileCallback(filePath); + } + } + } + } // REVIEW: for now this implementation uses polling. // The advantage of polling is that it works reliably // on all os and with network mounted files. @@ -1911,7 +1991,11 @@ var ts; // changes for large reference sets? If so, do we want // to increase the chunk size or decrease the interval // time dynamically to match the large reference set? + var pollingWatchedFileSet = createPollingWatchedFileSet(); var watchedFileSet = createWatchedFileSet(); + function isNode4OrLater() { + return parseInt(process.version.charAt(1)) >= 4; + } var platform = _os.platform(); // win32\win64 are case insensitive platforms, MacOS (darwin) by default is also case insensitive var useCaseSensitiveFileNames = platform !== "win32" && platform !== "win64" && platform !== "darwin"; @@ -1960,7 +2044,7 @@ var ts; } } function getCanonicalPath(path) { - return useCaseSensitiveFileNames ? path.toLowerCase() : path; + return useCaseSensitiveFileNames ? path : path.toLowerCase(); } function readDirectory(path, extension, exclude) { var result = []; @@ -2000,20 +2084,28 @@ var ts; }, readFile: readFile, writeFile: writeFile, - watchFile: function (fileName, callback) { + watchFile: function (filePath, callback) { // Node 4.0 stablized the `fs.watch` function on Windows which avoids polling // and is more efficient than `fs.watchFile` (ref: https://github.com/nodejs/node/pull/2649 // and https://github.com/Microsoft/TypeScript/issues/4643), therefore // if the current node.js version is newer than 4, use `fs.watch` instead. - var watchedFile = watchedFileSet.addFile(fileName, callback); + var watchSet = isNode4OrLater() ? watchedFileSet : pollingWatchedFileSet; + var watchedFile = watchSet.addFile(filePath, callback); return { - close: function () { return watchedFileSet.removeFile(watchedFile); } + close: function () { return watchSet.removeFile(watchedFile); } }; }, watchDirectory: function (path, callback, recursive) { // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows // (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643) - return _fs.watch(path, { persistent: true, recursive: !!recursive }, function (eventName, relativeFileName) { + var options; + if (isNode4OrLater() && (process.platform === "win32" || process.platform === "darwin")) { + options = { persistent: true, recursive: !!recursive }; + } + else { + options = { persistent: true }; + } + return _fs.watch(path, options, function (eventName, relativeFileName) { // In watchDirectory we only care about adding and removing files (when event name is // "rename"); changes made within files are handled by corresponding fileWatchers (when // event name is "change") @@ -2283,7 +2375,6 @@ var ts; Cannot_find_parameter_0: { code: 1225, category: ts.DiagnosticCategory.Error, key: "Cannot_find_parameter_0_1225", message: "Cannot find parameter '{0}'." }, Type_predicate_0_is_not_assignable_to_1: { code: 1226, category: ts.DiagnosticCategory.Error, key: "Type_predicate_0_is_not_assignable_to_1_1226", message: "Type predicate '{0}' is not assignable to '{1}'." }, Parameter_0_is_not_in_the_same_position_as_parameter_1: { code: 1227, category: ts.DiagnosticCategory.Error, key: "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227", message: "Parameter '{0}' is not in the same position as parameter '{1}'." }, - A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods: { code: 1228, category: ts.DiagnosticCategory.Error, key: "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228", message: "A type predicate is only allowed in return type position for functions and methods." }, A_type_predicate_cannot_reference_a_rest_parameter: { code: 1229, category: ts.DiagnosticCategory.Error, key: "A_type_predicate_cannot_reference_a_rest_parameter_1229", message: "A type predicate cannot reference a rest parameter." }, A_type_predicate_cannot_reference_element_0_in_a_binding_pattern: { code: 1230, category: ts.DiagnosticCategory.Error, key: "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230", message: "A type predicate cannot reference element '{0}' in a binding pattern." }, An_export_assignment_can_only_be_used_in_a_module: { code: 1231, category: ts.DiagnosticCategory.Error, key: "An_export_assignment_can_only_be_used_in_a_module_1231", message: "An export assignment can only be used in a module." }, @@ -2519,7 +2610,6 @@ var ts; All_declarations_of_an_abstract_method_must_be_consecutive: { code: 2516, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_an_abstract_method_must_be_consecutive_2516", message: "All declarations of an abstract method must be consecutive." }, Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type: { code: 2517, category: ts.DiagnosticCategory.Error, key: "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517", message: "Cannot assign an abstract constructor type to a non-abstract constructor type." }, A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard: { code: 2518, category: ts.DiagnosticCategory.Error, key: "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518", message: "A 'this'-based type guard is not compatible with a parameter-based type guard." }, - A_this_based_type_predicate_is_only_allowed_within_a_class_or_interface_s_members_get_accessors_or_return_type_positions_for_functions_and_methods: { code: 2519, category: ts.DiagnosticCategory.Error, key: "A_this_based_type_predicate_is_only_allowed_within_a_class_or_interface_s_members_get_accessors_or_r_2519", message: "A 'this'-based type predicate is only allowed within a class or interface's members, get accessors, or return type positions for functions and methods." }, Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: { code: 2520, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520", message: "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions." }, Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions: { code: 2521, category: ts.DiagnosticCategory.Error, key: "Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521", message: "Expression resolves to variable declaration '{0}' that compiler uses to support async functions." }, The_arguments_object_cannot_be_referenced_in_an_async_arrow_function_Consider_using_a_standard_async_function_expression: { code: 2522, category: ts.DiagnosticCategory.Error, key: "The_arguments_object_cannot_be_referenced_in_an_async_arrow_function_Consider_using_a_standard_async_2522", message: "The 'arguments' object cannot be referenced in an async arrow function. Consider using a standard async function expression." }, @@ -2548,6 +2638,16 @@ var ts; Type_0_provides_no_match_for_the_signature_1: { code: 2658, category: ts.DiagnosticCategory.Error, key: "Type_0_provides_no_match_for_the_signature_1_2658", message: "Type '{0}' provides no match for the signature '{1}'" }, super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher: { code: 2659, category: ts.DiagnosticCategory.Error, key: "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", message: "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher." }, super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions: { code: 2660, category: ts.DiagnosticCategory.Error, key: "super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660", message: "'super' can only be referenced in members of derived classes or object literal expressions." }, + Cannot_re_export_name_that_is_not_defined_in_the_module: { code: 2661, category: ts.DiagnosticCategory.Error, key: "Cannot_re_export_name_that_is_not_defined_in_the_module_2661", message: "Cannot re-export name that is not defined in the module." }, + Cannot_find_name_0_Did_you_mean_the_static_member_1_0: { code: 2662, category: ts.DiagnosticCategory.Error, key: "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662", message: "Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?" }, + Cannot_find_name_0_Did_you_mean_the_instance_member_this_0: { code: 2663, category: ts.DiagnosticCategory.Error, key: "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663", message: "Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?" }, + Invalid_module_name_in_augmentation_module_0_cannot_be_found: { code: 2664, category: ts.DiagnosticCategory.Error, key: "Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664", message: "Invalid module name in augmentation, module '{0}' cannot be found." }, + Module_augmentation_cannot_introduce_new_names_in_the_top_level_scope: { code: 2665, category: ts.DiagnosticCategory.Error, key: "Module_augmentation_cannot_introduce_new_names_in_the_top_level_scope_2665", message: "Module augmentation cannot introduce new names in the top level scope." }, + Exports_and_export_assignments_are_not_permitted_in_module_augmentations: { code: 2666, category: ts.DiagnosticCategory.Error, key: "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666", message: "Exports and export assignments are not permitted in module augmentations." }, + Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module: { code: 2667, category: ts.DiagnosticCategory.Error, key: "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667", message: "Imports are not permitted in module augmentations. Consider moving them to the enclosing external module." }, + export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible: { code: 2668, category: ts.DiagnosticCategory.Error, key: "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668", message: "'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible." }, + Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations: { code: 2669, category: ts.DiagnosticCategory.Error, key: "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669", message: "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations." }, + Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context: { code: 2670, category: ts.DiagnosticCategory.Error, key: "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670", message: "Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context." }, Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import_declaration_0_is_using_private_name_1_4000", message: "Import declaration '{0}' is using private name '{1}'." }, Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", message: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", message: "Type parameter '{0}' of exported interface has or is using private name '{1}'." }, @@ -2712,6 +2812,7 @@ var ts; _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: { code: 7010, category: ts.DiagnosticCategory.Error, key: "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010", message: "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type." }, Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: { code: 7011, category: ts.DiagnosticCategory.Error, key: "Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011", message: "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type." }, Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: { code: 7013, category: ts.DiagnosticCategory.Error, key: "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013", message: "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type." }, + Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number: { code: 7015, category: ts.DiagnosticCategory.Error, key: "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015", message: "Element implicitly has an 'any' type because index expression is not of type 'number'." }, Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation: { code: 7016, category: ts.DiagnosticCategory.Error, key: "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation_7016", message: "Property '{0}' implicitly has type 'any', because its 'set' accessor lacks a type annotation." }, Index_signature_of_object_type_implicitly_has_an_any_type: { code: 7017, category: ts.DiagnosticCategory.Error, key: "Index_signature_of_object_type_implicitly_has_an_any_type_7017", message: "Index signature of object type implicitly has an 'any' type." }, Object_literal_s_property_0_implicitly_has_an_1_type: { code: 7018, category: ts.DiagnosticCategory.Error, key: "Object_literal_s_property_0_implicitly_has_an_1_type_7018", message: "Object literal's property '{0}' implicitly has an '{1}' type." }, @@ -2810,6 +2911,7 @@ var ts; "protected": 111 /* ProtectedKeyword */, "public": 112 /* PublicKeyword */, "require": 127 /* RequireKeyword */, + "global": 134 /* GlobalKeyword */, "return": 94 /* ReturnKeyword */, "set": 129 /* SetKeyword */, "static": 113 /* StaticKeyword */, @@ -2830,7 +2932,7 @@ var ts; "yield": 114 /* YieldKeyword */, "async": 118 /* AsyncKeyword */, "await": 119 /* AwaitKeyword */, - "of": 134 /* OfKeyword */, + "of": 135 /* OfKeyword */, "{": 15 /* OpenBraceToken */, "}": 16 /* CloseBraceToken */, "(": 17 /* OpenParenToken */, @@ -4246,7 +4348,7 @@ var ts; break; } } - return token = 238 /* JsxText */; + return token = 239 /* JsxText */; } // Scans a JSX identifier; these differ from normal identifiers in that // they allow dashes @@ -4429,7 +4531,7 @@ var ts; } } function getSourceFileOfNode(node) { - while (node && node.kind !== 250 /* SourceFile */) { + while (node && node.kind !== 251 /* SourceFile */) { node = node.parent; } return node; @@ -4532,6 +4634,31 @@ var ts; isCatchClauseVariableDeclaration(declaration); } ts.isBlockOrCatchScoped = isBlockOrCatchScoped; + function isAmbientModule(node) { + return node && node.kind === 221 /* ModuleDeclaration */ && + (node.name.kind === 9 /* StringLiteral */ || isGlobalScopeAugmentation(node)); + } + ts.isAmbientModule = isAmbientModule; + function isGlobalScopeAugmentation(module) { + return !!(module.flags & 2097152 /* GlobalAugmentation */); + } + ts.isGlobalScopeAugmentation = isGlobalScopeAugmentation; + function isExternalModuleAugmentation(node) { + // external module augmentation is a ambient module declaration that is either: + // - defined in the top level scope and source file is an external module + // - defined inside ambient module declaration located in the top level scope and source file not an external module + if (!node || !isAmbientModule(node)) { + return false; + } + switch (node.parent.kind) { + case 251 /* SourceFile */: + return isExternalModule(node.parent); + case 222 /* ModuleBlock */: + return isAmbientModule(node.parent.parent) && !isExternalModule(node.parent.parent.parent); + } + return false; + } + ts.isExternalModuleAugmentation = isExternalModuleAugmentation; // Gets the nearest enclosing block scope container that has the provided node // as a descendant, that is not the provided node. function getEnclosingBlockScopeContainer(node) { @@ -4541,15 +4668,15 @@ var ts; return current; } switch (current.kind) { - case 250 /* SourceFile */: - case 222 /* CaseBlock */: - case 246 /* CatchClause */: - case 220 /* ModuleDeclaration */: - case 201 /* ForStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: + case 251 /* SourceFile */: + case 223 /* CaseBlock */: + case 247 /* CatchClause */: + case 221 /* ModuleDeclaration */: + case 202 /* ForStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: return current; - case 194 /* Block */: + case 195 /* Block */: // function block is not considered block-scope container // see comment in binder.ts: bind(...), case for SyntaxKind.Block if (!isFunctionLike(current.parent)) { @@ -4562,9 +4689,9 @@ var ts; ts.getEnclosingBlockScopeContainer = getEnclosingBlockScopeContainer; function isCatchClauseVariableDeclaration(declaration) { return declaration && - declaration.kind === 213 /* VariableDeclaration */ && + declaration.kind === 214 /* VariableDeclaration */ && declaration.parent && - declaration.parent.kind === 246 /* CatchClause */; + declaration.parent.kind === 247 /* CatchClause */; } ts.isCatchClauseVariableDeclaration = isCatchClauseVariableDeclaration; // Return display name of an identifier @@ -4603,7 +4730,7 @@ var ts; function getErrorSpanForNode(sourceFile, node) { var errorNode = node; switch (node.kind) { - case 250 /* SourceFile */: + case 251 /* SourceFile */: var pos_1 = ts.skipTrivia(sourceFile.text, 0, /*stopAfterLineBreak*/ false); if (pos_1 === sourceFile.text.length) { // file is empty - return span for the beginning of the file @@ -4612,17 +4739,18 @@ var ts; return getSpanOfTokenAtPosition(sourceFile, pos_1); // This list is a work in progress. Add missing node kinds to improve their error // spans. - case 213 /* VariableDeclaration */: - case 165 /* BindingElement */: - case 216 /* ClassDeclaration */: - case 188 /* ClassExpression */: - case 217 /* InterfaceDeclaration */: - case 220 /* ModuleDeclaration */: - case 219 /* EnumDeclaration */: - case 249 /* EnumMember */: - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 143 /* MethodDeclaration */: + case 214 /* VariableDeclaration */: + case 166 /* BindingElement */: + case 217 /* ClassDeclaration */: + case 189 /* ClassExpression */: + case 218 /* InterfaceDeclaration */: + case 221 /* ModuleDeclaration */: + case 220 /* EnumDeclaration */: + case 250 /* EnumMember */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 144 /* MethodDeclaration */: + case 219 /* TypeAliasDeclaration */: errorNode = node.name; break; } @@ -4650,11 +4778,11 @@ var ts; } ts.isDeclarationFile = isDeclarationFile; function isConstEnumDeclaration(node) { - return node.kind === 219 /* EnumDeclaration */ && isConst(node); + return node.kind === 220 /* EnumDeclaration */ && isConst(node); } ts.isConstEnumDeclaration = isConstEnumDeclaration; function walkUpBindingElementsAndPatterns(node) { - while (node && (node.kind === 165 /* BindingElement */ || isBindingPattern(node))) { + while (node && (node.kind === 166 /* BindingElement */ || isBindingPattern(node))) { node = node.parent; } return node; @@ -4669,14 +4797,14 @@ var ts; function getCombinedNodeFlags(node) { node = walkUpBindingElementsAndPatterns(node); var flags = node.flags; - if (node.kind === 213 /* VariableDeclaration */) { + if (node.kind === 214 /* VariableDeclaration */) { node = node.parent; } - if (node && node.kind === 214 /* VariableDeclarationList */) { + if (node && node.kind === 215 /* VariableDeclarationList */) { flags |= node.flags; node = node.parent; } - if (node && node.kind === 195 /* VariableStatement */) { + if (node && node.kind === 196 /* VariableStatement */) { flags |= node.flags; } return flags; @@ -4691,7 +4819,7 @@ var ts; } ts.isLet = isLet; function isPrologueDirective(node) { - return node.kind === 197 /* ExpressionStatement */ && node.expression.kind === 9 /* StringLiteral */; + return node.kind === 198 /* ExpressionStatement */ && node.expression.kind === 9 /* StringLiteral */; } ts.isPrologueDirective = isPrologueDirective; function getLeadingCommentRangesOfNode(node, sourceFileOfNode) { @@ -4707,7 +4835,7 @@ var ts; } ts.getJsDocComments = getJsDocComments; function getJsDocCommentsFromText(node, text) { - var commentRanges = (node.kind === 138 /* Parameter */ || node.kind === 137 /* TypeParameter */) ? + var commentRanges = (node.kind === 139 /* Parameter */ || node.kind === 138 /* TypeParameter */) ? ts.concatenate(ts.getTrailingCommentRanges(text, node.pos), ts.getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRangesOfNodeFromText(node, text); return ts.filter(commentRanges, isJsDocComment); @@ -4722,7 +4850,7 @@ var ts; ts.fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*/; ts.fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*/; function isTypeNode(node) { - if (150 /* FirstTypeNode */ <= node.kind && node.kind <= 162 /* LastTypeNode */) { + if (151 /* FirstTypeNode */ <= node.kind && node.kind <= 163 /* LastTypeNode */) { return true; } switch (node.kind) { @@ -4733,26 +4861,26 @@ var ts; case 131 /* SymbolKeyword */: return true; case 103 /* VoidKeyword */: - return node.parent.kind !== 179 /* VoidExpression */; - case 190 /* ExpressionWithTypeArguments */: + return node.parent.kind !== 180 /* VoidExpression */; + case 191 /* ExpressionWithTypeArguments */: return !isExpressionWithTypeArgumentsInClassExtendsClause(node); // Identifiers and qualified names may be type nodes, depending on their context. Climb // above them to find the lowest container case 69 /* Identifier */: // If the identifier is the RHS of a qualified name, then it's a type iff its parent is. - if (node.parent.kind === 135 /* QualifiedName */ && node.parent.right === node) { + if (node.parent.kind === 136 /* QualifiedName */ && node.parent.right === node) { node = node.parent; } - else if (node.parent.kind === 168 /* PropertyAccessExpression */ && node.parent.name === node) { + else if (node.parent.kind === 169 /* PropertyAccessExpression */ && node.parent.name === node) { node = node.parent; } // At this point, node is either a qualified name or an identifier - ts.Debug.assert(node.kind === 69 /* Identifier */ || node.kind === 135 /* QualifiedName */ || node.kind === 168 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isTypeNode'."); - case 135 /* QualifiedName */: - case 168 /* PropertyAccessExpression */: + ts.Debug.assert(node.kind === 69 /* Identifier */ || node.kind === 136 /* QualifiedName */ || node.kind === 169 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isTypeNode'."); + case 136 /* QualifiedName */: + case 169 /* PropertyAccessExpression */: case 97 /* ThisKeyword */: var parent_1 = node.parent; - if (parent_1.kind === 154 /* TypeQuery */) { + if (parent_1.kind === 155 /* TypeQuery */) { return false; } // Do not recursively call isTypeNode on the parent. In the example: @@ -4761,38 +4889,38 @@ var ts; // // Calling isTypeNode would consider the qualified name A.B a type node. Only C or // A.B.C is a type node. - if (150 /* FirstTypeNode */ <= parent_1.kind && parent_1.kind <= 162 /* LastTypeNode */) { + if (151 /* FirstTypeNode */ <= parent_1.kind && parent_1.kind <= 163 /* LastTypeNode */) { return true; } switch (parent_1.kind) { - case 190 /* ExpressionWithTypeArguments */: + case 191 /* ExpressionWithTypeArguments */: return !isExpressionWithTypeArgumentsInClassExtendsClause(parent_1); - case 137 /* TypeParameter */: + case 138 /* TypeParameter */: return node === parent_1.constraint; - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 138 /* Parameter */: - case 213 /* VariableDeclaration */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 139 /* Parameter */: + case 214 /* VariableDeclaration */: return node === parent_1.type; - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: - case 144 /* Constructor */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: + case 145 /* Constructor */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: return node === parent_1.type; - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 149 /* IndexSignature */: + case 148 /* CallSignature */: + case 149 /* ConstructSignature */: + case 150 /* IndexSignature */: return node === parent_1.type; - case 173 /* TypeAssertionExpression */: + case 174 /* TypeAssertionExpression */: return node === parent_1.type; - case 170 /* CallExpression */: - case 171 /* NewExpression */: + case 171 /* CallExpression */: + case 172 /* NewExpression */: return parent_1.typeArguments && ts.indexOf(parent_1.typeArguments, node) >= 0; - case 172 /* TaggedTemplateExpression */: + case 173 /* TaggedTemplateExpression */: // TODO (drosen): TaggedTemplateExpressions may eventually support type arguments. return false; } @@ -4806,23 +4934,23 @@ var ts; return traverse(body); function traverse(node) { switch (node.kind) { - case 206 /* ReturnStatement */: + case 207 /* ReturnStatement */: return visitor(node); - case 222 /* CaseBlock */: - case 194 /* Block */: - case 198 /* IfStatement */: - case 199 /* DoStatement */: - case 200 /* WhileStatement */: - case 201 /* ForStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - case 207 /* WithStatement */: - case 208 /* SwitchStatement */: - case 243 /* CaseClause */: - case 244 /* DefaultClause */: - case 209 /* LabeledStatement */: - case 211 /* TryStatement */: - case 246 /* CatchClause */: + case 223 /* CaseBlock */: + case 195 /* Block */: + case 199 /* IfStatement */: + case 200 /* DoStatement */: + case 201 /* WhileStatement */: + case 202 /* ForStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: + case 208 /* WithStatement */: + case 209 /* SwitchStatement */: + case 244 /* CaseClause */: + case 245 /* DefaultClause */: + case 210 /* LabeledStatement */: + case 212 /* TryStatement */: + case 247 /* CatchClause */: return ts.forEachChild(node, traverse); } } @@ -4832,18 +4960,18 @@ var ts; return traverse(body); function traverse(node) { switch (node.kind) { - case 186 /* YieldExpression */: + case 187 /* YieldExpression */: visitor(node); var operand = node.expression; if (operand) { traverse(operand); } - case 219 /* EnumDeclaration */: - case 217 /* InterfaceDeclaration */: - case 220 /* ModuleDeclaration */: - case 218 /* TypeAliasDeclaration */: - case 216 /* ClassDeclaration */: - case 188 /* ClassExpression */: + case 220 /* EnumDeclaration */: + case 218 /* InterfaceDeclaration */: + case 221 /* ModuleDeclaration */: + case 219 /* TypeAliasDeclaration */: + case 217 /* ClassDeclaration */: + case 189 /* ClassExpression */: // These are not allowed inside a generator now, but eventually they may be allowed // as local types. Regardless, any yield statements contained within them should be // skipped in this traversal. @@ -4851,7 +4979,7 @@ var ts; default: if (isFunctionLike(node)) { var name_5 = node.name; - if (name_5 && name_5.kind === 136 /* ComputedPropertyName */) { + if (name_5 && name_5.kind === 137 /* ComputedPropertyName */) { // Note that we will not include methods/accessors of a class because they would require // first descending into the class. This is by design. traverse(name_5.expression); @@ -4870,14 +4998,14 @@ var ts; function isVariableLike(node) { if (node) { switch (node.kind) { - case 165 /* BindingElement */: - case 249 /* EnumMember */: - case 138 /* Parameter */: - case 247 /* PropertyAssignment */: - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 248 /* ShorthandPropertyAssignment */: - case 213 /* VariableDeclaration */: + case 166 /* BindingElement */: + case 250 /* EnumMember */: + case 139 /* Parameter */: + case 248 /* PropertyAssignment */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 249 /* ShorthandPropertyAssignment */: + case 214 /* VariableDeclaration */: return true; } } @@ -4885,11 +5013,11 @@ var ts; } ts.isVariableLike = isVariableLike; function isAccessor(node) { - return node && (node.kind === 145 /* GetAccessor */ || node.kind === 146 /* SetAccessor */); + return node && (node.kind === 146 /* GetAccessor */ || node.kind === 147 /* SetAccessor */); } ts.isAccessor = isAccessor; function isClassLike(node) { - return node && (node.kind === 216 /* ClassDeclaration */ || node.kind === 188 /* ClassExpression */); + return node && (node.kind === 217 /* ClassDeclaration */ || node.kind === 189 /* ClassExpression */); } ts.isClassLike = isClassLike; function isFunctionLike(node) { @@ -4898,32 +5026,32 @@ var ts; ts.isFunctionLike = isFunctionLike; function isFunctionLikeKind(kind) { switch (kind) { - case 144 /* Constructor */: - case 175 /* FunctionExpression */: - case 215 /* FunctionDeclaration */: - case 176 /* ArrowFunction */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 149 /* IndexSignature */: - case 152 /* FunctionType */: - case 153 /* ConstructorType */: + case 145 /* Constructor */: + case 176 /* FunctionExpression */: + case 216 /* FunctionDeclaration */: + case 177 /* ArrowFunction */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 148 /* CallSignature */: + case 149 /* ConstructSignature */: + case 150 /* IndexSignature */: + case 153 /* FunctionType */: + case 154 /* ConstructorType */: return true; } } ts.isFunctionLikeKind = isFunctionLikeKind; function introducesArgumentsExoticObject(node) { switch (node.kind) { - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 145 /* Constructor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: return true; } return false; @@ -4931,24 +5059,24 @@ var ts; ts.introducesArgumentsExoticObject = introducesArgumentsExoticObject; function isIterationStatement(node, lookInLabeledStatements) { switch (node.kind) { - case 201 /* ForStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - case 199 /* DoStatement */: - case 200 /* WhileStatement */: + case 202 /* ForStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: + case 200 /* DoStatement */: + case 201 /* WhileStatement */: return true; - case 209 /* LabeledStatement */: + case 210 /* LabeledStatement */: return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); } return false; } ts.isIterationStatement = isIterationStatement; function isFunctionBlock(node) { - return node && node.kind === 194 /* Block */ && isFunctionLike(node.parent); + return node && node.kind === 195 /* Block */ && isFunctionLike(node.parent); } ts.isFunctionBlock = isFunctionBlock; function isObjectLiteralMethod(node) { - return node && node.kind === 143 /* MethodDeclaration */ && node.parent.kind === 167 /* ObjectLiteralExpression */; + return node && node.kind === 144 /* MethodDeclaration */ && node.parent.kind === 168 /* ObjectLiteralExpression */; } ts.isObjectLiteralMethod = isObjectLiteralMethod; function isIdentifierTypePredicate(predicate) { @@ -4980,7 +5108,7 @@ var ts; return undefined; } switch (node.kind) { - case 136 /* ComputedPropertyName */: + case 137 /* ComputedPropertyName */: // If the grandparent node is an object literal (as opposed to a class), // then the computed property is not a 'this' container. // A computed property name in a class needs to be a this container @@ -4995,9 +5123,9 @@ var ts; // the *body* of the container. node = node.parent; break; - case 139 /* Decorator */: + case 140 /* Decorator */: // Decorators are always applied outside of the body of a class or method. - if (node.parent.kind === 138 /* Parameter */ && isClassElement(node.parent.parent)) { + if (node.parent.kind === 139 /* Parameter */ && isClassElement(node.parent.parent)) { // If the decorator's parent is a Parameter, we resolve the this container from // the grandparent class declaration. node = node.parent.parent; @@ -5008,26 +5136,26 @@ var ts; node = node.parent; } break; - case 176 /* ArrowFunction */: + case 177 /* ArrowFunction */: if (!includeArrowFunctions) { continue; } // Fall through - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 220 /* ModuleDeclaration */: - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 149 /* IndexSignature */: - case 219 /* EnumDeclaration */: - case 250 /* SourceFile */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 221 /* ModuleDeclaration */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 145 /* Constructor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 148 /* CallSignature */: + case 149 /* ConstructSignature */: + case 150 /* IndexSignature */: + case 220 /* EnumDeclaration */: + case 251 /* SourceFile */: return node; } } @@ -5048,26 +5176,26 @@ var ts; return node; } switch (node.kind) { - case 136 /* ComputedPropertyName */: + case 137 /* ComputedPropertyName */: node = node.parent; break; - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: if (!stopOnFunctions) { continue; } - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 145 /* Constructor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: return node; - case 139 /* Decorator */: + case 140 /* Decorator */: // Decorators are always applied outside of the body of a class or method. - if (node.parent.kind === 138 /* Parameter */ && isClassElement(node.parent.parent)) { + if (node.parent.kind === 139 /* Parameter */ && isClassElement(node.parent.parent)) { // If the decorator's parent is a Parameter, we resolve the this container from // the grandparent class declaration. node = node.parent.parent; @@ -5085,12 +5213,12 @@ var ts; function getEntityNameFromTypeNode(node) { if (node) { switch (node.kind) { - case 151 /* TypeReference */: + case 152 /* TypeReference */: return node.typeName; - case 190 /* ExpressionWithTypeArguments */: + case 191 /* ExpressionWithTypeArguments */: return node.expression; case 69 /* Identifier */: - case 135 /* QualifiedName */: + case 136 /* QualifiedName */: return node; } } @@ -5098,7 +5226,7 @@ var ts; } ts.getEntityNameFromTypeNode = getEntityNameFromTypeNode; function getInvokedExpression(node) { - if (node.kind === 172 /* TaggedTemplateExpression */) { + if (node.kind === 173 /* TaggedTemplateExpression */) { return node.tag; } // Will either be a CallExpression, NewExpression, or Decorator. @@ -5107,58 +5235,40 @@ var ts; ts.getInvokedExpression = getInvokedExpression; function nodeCanBeDecorated(node) { switch (node.kind) { - case 216 /* ClassDeclaration */: + case 217 /* ClassDeclaration */: // classes are valid targets return true; - case 141 /* PropertyDeclaration */: + case 142 /* PropertyDeclaration */: // property declarations are valid if their parent is a class declaration. - return node.parent.kind === 216 /* ClassDeclaration */; - case 138 /* Parameter */: - // if the parameter's parent has a body and its grandparent is a class declaration, this is a valid target; - return node.parent.body && node.parent.parent.kind === 216 /* ClassDeclaration */; - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 143 /* MethodDeclaration */: + return node.parent.kind === 217 /* ClassDeclaration */; + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 144 /* MethodDeclaration */: // if this method has a body and its parent is a class declaration, this is a valid target. - return node.body && node.parent.kind === 216 /* ClassDeclaration */; + return node.body !== undefined + && node.parent.kind === 217 /* ClassDeclaration */; + case 139 /* Parameter */: + // if the parameter's parent has a body and its grandparent is a class declaration, this is a valid target; + return node.parent.body !== undefined + && (node.parent.kind === 145 /* Constructor */ + || node.parent.kind === 144 /* MethodDeclaration */ + || node.parent.kind === 147 /* SetAccessor */) + && node.parent.parent.kind === 217 /* ClassDeclaration */; } return false; } ts.nodeCanBeDecorated = nodeCanBeDecorated; function nodeIsDecorated(node) { - switch (node.kind) { - case 216 /* ClassDeclaration */: - if (node.decorators) { - return true; - } - return false; - case 141 /* PropertyDeclaration */: - case 138 /* Parameter */: - if (node.decorators) { - return true; - } - return false; - case 145 /* GetAccessor */: - if (node.body && node.decorators) { - return true; - } - return false; - case 143 /* MethodDeclaration */: - case 146 /* SetAccessor */: - if (node.body && node.decorators) { - return true; - } - return false; - } - return false; + return node.decorators !== undefined + && nodeCanBeDecorated(node); } ts.nodeIsDecorated = nodeIsDecorated; function isPropertyAccessExpression(node) { - return node.kind === 168 /* PropertyAccessExpression */; + return node.kind === 169 /* PropertyAccessExpression */; } ts.isPropertyAccessExpression = isPropertyAccessExpression; function isElementAccessExpression(node) { - return node.kind === 169 /* ElementAccessExpression */; + return node.kind === 170 /* ElementAccessExpression */; } ts.isElementAccessExpression = isElementAccessExpression; function isExpression(node) { @@ -5168,42 +5278,42 @@ var ts; case 99 /* TrueKeyword */: case 84 /* FalseKeyword */: case 10 /* RegularExpressionLiteral */: - case 166 /* ArrayLiteralExpression */: - case 167 /* ObjectLiteralExpression */: - case 168 /* PropertyAccessExpression */: - case 169 /* ElementAccessExpression */: - case 170 /* CallExpression */: - case 171 /* NewExpression */: - case 172 /* TaggedTemplateExpression */: - case 191 /* AsExpression */: - case 173 /* TypeAssertionExpression */: - case 174 /* ParenthesizedExpression */: - case 175 /* FunctionExpression */: - case 188 /* ClassExpression */: - case 176 /* ArrowFunction */: - case 179 /* VoidExpression */: - case 177 /* DeleteExpression */: - case 178 /* TypeOfExpression */: - case 181 /* PrefixUnaryExpression */: - case 182 /* PostfixUnaryExpression */: - case 183 /* BinaryExpression */: - case 184 /* ConditionalExpression */: - case 187 /* SpreadElementExpression */: - case 185 /* TemplateExpression */: + case 167 /* ArrayLiteralExpression */: + case 168 /* ObjectLiteralExpression */: + case 169 /* PropertyAccessExpression */: + case 170 /* ElementAccessExpression */: + case 171 /* CallExpression */: + case 172 /* NewExpression */: + case 173 /* TaggedTemplateExpression */: + case 192 /* AsExpression */: + case 174 /* TypeAssertionExpression */: + case 175 /* ParenthesizedExpression */: + case 176 /* FunctionExpression */: + case 189 /* ClassExpression */: + case 177 /* ArrowFunction */: + case 180 /* VoidExpression */: + case 178 /* DeleteExpression */: + case 179 /* TypeOfExpression */: + case 182 /* PrefixUnaryExpression */: + case 183 /* PostfixUnaryExpression */: + case 184 /* BinaryExpression */: + case 185 /* ConditionalExpression */: + case 188 /* SpreadElementExpression */: + case 186 /* TemplateExpression */: case 11 /* NoSubstitutionTemplateLiteral */: - case 189 /* OmittedExpression */: - case 235 /* JsxElement */: - case 236 /* JsxSelfClosingElement */: - case 186 /* YieldExpression */: - case 180 /* AwaitExpression */: + case 190 /* OmittedExpression */: + case 236 /* JsxElement */: + case 237 /* JsxSelfClosingElement */: + case 187 /* YieldExpression */: + case 181 /* AwaitExpression */: return true; - case 135 /* QualifiedName */: - while (node.parent.kind === 135 /* QualifiedName */) { + case 136 /* QualifiedName */: + while (node.parent.kind === 136 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 154 /* TypeQuery */; + return node.parent.kind === 155 /* TypeQuery */; case 69 /* Identifier */: - if (node.parent.kind === 154 /* TypeQuery */) { + if (node.parent.kind === 155 /* TypeQuery */) { return true; } // fall through @@ -5212,47 +5322,47 @@ var ts; case 97 /* ThisKeyword */: var parent_2 = node.parent; switch (parent_2.kind) { - case 213 /* VariableDeclaration */: - case 138 /* Parameter */: - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 249 /* EnumMember */: - case 247 /* PropertyAssignment */: - case 165 /* BindingElement */: + case 214 /* VariableDeclaration */: + case 139 /* Parameter */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 250 /* EnumMember */: + case 248 /* PropertyAssignment */: + case 166 /* BindingElement */: return parent_2.initializer === node; - case 197 /* ExpressionStatement */: - case 198 /* IfStatement */: - case 199 /* DoStatement */: - case 200 /* WhileStatement */: - case 206 /* ReturnStatement */: - case 207 /* WithStatement */: - case 208 /* SwitchStatement */: - case 243 /* CaseClause */: - case 210 /* ThrowStatement */: - case 208 /* SwitchStatement */: + case 198 /* ExpressionStatement */: + case 199 /* IfStatement */: + case 200 /* DoStatement */: + case 201 /* WhileStatement */: + case 207 /* ReturnStatement */: + case 208 /* WithStatement */: + case 209 /* SwitchStatement */: + case 244 /* CaseClause */: + case 211 /* ThrowStatement */: + case 209 /* SwitchStatement */: return parent_2.expression === node; - case 201 /* ForStatement */: + case 202 /* ForStatement */: var forStatement = parent_2; - return (forStatement.initializer === node && forStatement.initializer.kind !== 214 /* VariableDeclarationList */) || + return (forStatement.initializer === node && forStatement.initializer.kind !== 215 /* VariableDeclarationList */) || forStatement.condition === node || forStatement.incrementor === node; - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: var forInStatement = parent_2; - return (forInStatement.initializer === node && forInStatement.initializer.kind !== 214 /* VariableDeclarationList */) || + return (forInStatement.initializer === node && forInStatement.initializer.kind !== 215 /* VariableDeclarationList */) || forInStatement.expression === node; - case 173 /* TypeAssertionExpression */: - case 191 /* AsExpression */: + case 174 /* TypeAssertionExpression */: + case 192 /* AsExpression */: return node === parent_2.expression; - case 192 /* TemplateSpan */: + case 193 /* TemplateSpan */: return node === parent_2.expression; - case 136 /* ComputedPropertyName */: + case 137 /* ComputedPropertyName */: return node === parent_2.expression; - case 139 /* Decorator */: - case 242 /* JsxExpression */: - case 241 /* JsxSpreadAttribute */: + case 140 /* Decorator */: + case 243 /* JsxExpression */: + case 242 /* JsxSpreadAttribute */: return true; - case 190 /* ExpressionWithTypeArguments */: + case 191 /* ExpressionWithTypeArguments */: return parent_2.expression === node && isExpressionWithTypeArgumentsInClassExtendsClause(parent_2); default: if (isExpression(parent_2)) { @@ -5276,7 +5386,7 @@ var ts; } ts.isInstantiatedModule = isInstantiatedModule; function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 223 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 234 /* ExternalModuleReference */; + return node.kind === 224 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 235 /* ExternalModuleReference */; } ts.isExternalModuleImportEqualsDeclaration = isExternalModuleImportEqualsDeclaration; function getExternalModuleImportEqualsDeclarationExpression(node) { @@ -5285,7 +5395,7 @@ var ts; } ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression; function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 223 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 234 /* ExternalModuleReference */; + return node.kind === 224 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 235 /* ExternalModuleReference */; } ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration; function isSourceFileJavaScript(file) { @@ -5303,7 +5413,7 @@ var ts; */ function isRequireCall(expression) { // of the form 'require("name")' - return expression.kind === 170 /* CallExpression */ && + return expression.kind === 171 /* CallExpression */ && expression.expression.kind === 69 /* Identifier */ && expression.expression.text === "require" && expression.arguments.length === 1 && @@ -5313,11 +5423,11 @@ var ts; /// Given a BinaryExpression, returns SpecialPropertyAssignmentKind for the various kinds of property /// assignments we treat as special in the binder function getSpecialPropertyAssignmentKind(expression) { - if (expression.kind !== 183 /* BinaryExpression */) { + if (expression.kind !== 184 /* BinaryExpression */) { return 0 /* None */; } var expr = expression; - if (expr.operatorToken.kind !== 56 /* EqualsToken */ || expr.left.kind !== 168 /* PropertyAccessExpression */) { + if (expr.operatorToken.kind !== 56 /* EqualsToken */ || expr.left.kind !== 169 /* PropertyAccessExpression */) { return 0 /* None */; } var lhs = expr.left; @@ -5335,7 +5445,7 @@ var ts; else if (lhs.expression.kind === 97 /* ThisKeyword */) { return 4 /* ThisProperty */; } - else if (lhs.expression.kind === 168 /* PropertyAccessExpression */) { + else if (lhs.expression.kind === 169 /* PropertyAccessExpression */) { // chained dot, e.g. x.y.z = expr; this var is the 'x.y' part var innerPropertyAccess = lhs.expression; if (innerPropertyAccess.expression.kind === 69 /* Identifier */ && innerPropertyAccess.name.text === "prototype") { @@ -5346,30 +5456,33 @@ var ts; } ts.getSpecialPropertyAssignmentKind = getSpecialPropertyAssignmentKind; function getExternalModuleName(node) { - if (node.kind === 224 /* ImportDeclaration */) { + if (node.kind === 225 /* ImportDeclaration */) { return node.moduleSpecifier; } - if (node.kind === 223 /* ImportEqualsDeclaration */) { + if (node.kind === 224 /* ImportEqualsDeclaration */) { var reference = node.moduleReference; - if (reference.kind === 234 /* ExternalModuleReference */) { + if (reference.kind === 235 /* ExternalModuleReference */) { return reference.expression; } } - if (node.kind === 230 /* ExportDeclaration */) { + if (node.kind === 231 /* ExportDeclaration */) { return node.moduleSpecifier; } + if (node.kind === 221 /* ModuleDeclaration */ && node.name.kind === 9 /* StringLiteral */) { + return node.name; + } } ts.getExternalModuleName = getExternalModuleName; function hasQuestionToken(node) { if (node) { switch (node.kind) { - case 138 /* Parameter */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 248 /* ShorthandPropertyAssignment */: - case 247 /* PropertyAssignment */: - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: + case 139 /* Parameter */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 249 /* ShorthandPropertyAssignment */: + case 248 /* PropertyAssignment */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: return node.questionToken !== undefined; } } @@ -5377,9 +5490,9 @@ var ts; } ts.hasQuestionToken = hasQuestionToken; function isJSDocConstructSignature(node) { - return node.kind === 263 /* JSDocFunctionType */ && + return node.kind === 264 /* JSDocFunctionType */ && node.parameters.length > 0 && - node.parameters[0].type.kind === 265 /* JSDocConstructorType */; + node.parameters[0].type.kind === 266 /* JSDocConstructorType */; } ts.isJSDocConstructSignature = isJSDocConstructSignature; function getJSDocTag(node, kind) { @@ -5393,15 +5506,15 @@ var ts; } } function getJSDocTypeTag(node) { - return getJSDocTag(node, 271 /* JSDocTypeTag */); + return getJSDocTag(node, 272 /* JSDocTypeTag */); } ts.getJSDocTypeTag = getJSDocTypeTag; function getJSDocReturnTag(node) { - return getJSDocTag(node, 270 /* JSDocReturnTag */); + return getJSDocTag(node, 271 /* JSDocReturnTag */); } ts.getJSDocReturnTag = getJSDocReturnTag; function getJSDocTemplateTag(node) { - return getJSDocTag(node, 272 /* JSDocTemplateTag */); + return getJSDocTag(node, 273 /* JSDocTemplateTag */); } ts.getJSDocTemplateTag = getJSDocTemplateTag; function getCorrespondingJSDocParameterTag(parameter) { @@ -5412,7 +5525,7 @@ var ts; var docComment = parameter.parent.jsDocComment; if (docComment) { return ts.forEach(docComment.tags, function (t) { - if (t.kind === 269 /* JSDocParameterTag */) { + if (t.kind === 270 /* JSDocParameterTag */) { var parameterTag = t; var name_6 = parameterTag.preParameterName || parameterTag.postParameterName; if (name_6.text === parameterName) { @@ -5431,12 +5544,12 @@ var ts; function isRestParameter(node) { if (node) { if (node.parserContextFlags & 32 /* JavaScriptFile */) { - if (node.type && node.type.kind === 264 /* JSDocVariadicType */) { + if (node.type && node.type.kind === 265 /* JSDocVariadicType */) { return true; } var paramTag = getCorrespondingJSDocParameterTag(node); if (paramTag && paramTag.typeExpression) { - return paramTag.typeExpression.type.kind === 264 /* JSDocVariadicType */; + return paramTag.typeExpression.type.kind === 265 /* JSDocVariadicType */; } } return node.dotDotDotToken !== undefined; @@ -5457,7 +5570,7 @@ var ts; } ts.isTemplateLiteralKind = isTemplateLiteralKind; function isBindingPattern(node) { - return !!node && (node.kind === 164 /* ArrayBindingPattern */ || node.kind === 163 /* ObjectBindingPattern */); + return !!node && (node.kind === 165 /* ArrayBindingPattern */ || node.kind === 164 /* ObjectBindingPattern */); } ts.isBindingPattern = isBindingPattern; function isNodeDescendentOf(node, ancestor) { @@ -5481,34 +5594,34 @@ var ts; ts.isInAmbientContext = isInAmbientContext; function isDeclaration(node) { switch (node.kind) { - case 176 /* ArrowFunction */: - case 165 /* BindingElement */: - case 216 /* ClassDeclaration */: - case 188 /* ClassExpression */: - case 144 /* Constructor */: - case 219 /* EnumDeclaration */: - case 249 /* EnumMember */: - case 232 /* ExportSpecifier */: - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 145 /* GetAccessor */: - case 225 /* ImportClause */: - case 223 /* ImportEqualsDeclaration */: - case 228 /* ImportSpecifier */: - case 217 /* InterfaceDeclaration */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 220 /* ModuleDeclaration */: - case 226 /* NamespaceImport */: - case 138 /* Parameter */: - case 247 /* PropertyAssignment */: - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 146 /* SetAccessor */: - case 248 /* ShorthandPropertyAssignment */: - case 218 /* TypeAliasDeclaration */: - case 137 /* TypeParameter */: - case 213 /* VariableDeclaration */: + case 177 /* ArrowFunction */: + case 166 /* BindingElement */: + case 217 /* ClassDeclaration */: + case 189 /* ClassExpression */: + case 145 /* Constructor */: + case 220 /* EnumDeclaration */: + case 250 /* EnumMember */: + case 233 /* ExportSpecifier */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 146 /* GetAccessor */: + case 226 /* ImportClause */: + case 224 /* ImportEqualsDeclaration */: + case 229 /* ImportSpecifier */: + case 218 /* InterfaceDeclaration */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 221 /* ModuleDeclaration */: + case 227 /* NamespaceImport */: + case 139 /* Parameter */: + case 248 /* PropertyAssignment */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 147 /* SetAccessor */: + case 249 /* ShorthandPropertyAssignment */: + case 219 /* TypeAliasDeclaration */: + case 138 /* TypeParameter */: + case 214 /* VariableDeclaration */: return true; } return false; @@ -5516,25 +5629,25 @@ var ts; ts.isDeclaration = isDeclaration; function isStatement(n) { switch (n.kind) { - case 205 /* BreakStatement */: - case 204 /* ContinueStatement */: - case 212 /* DebuggerStatement */: - case 199 /* DoStatement */: - case 197 /* ExpressionStatement */: - case 196 /* EmptyStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - case 201 /* ForStatement */: - case 198 /* IfStatement */: - case 209 /* LabeledStatement */: - case 206 /* ReturnStatement */: - case 208 /* SwitchStatement */: - case 210 /* ThrowStatement */: - case 211 /* TryStatement */: - case 195 /* VariableStatement */: - case 200 /* WhileStatement */: - case 207 /* WithStatement */: - case 229 /* ExportAssignment */: + case 206 /* BreakStatement */: + case 205 /* ContinueStatement */: + case 213 /* DebuggerStatement */: + case 200 /* DoStatement */: + case 198 /* ExpressionStatement */: + case 197 /* EmptyStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: + case 202 /* ForStatement */: + case 199 /* IfStatement */: + case 210 /* LabeledStatement */: + case 207 /* ReturnStatement */: + case 209 /* SwitchStatement */: + case 211 /* ThrowStatement */: + case 212 /* TryStatement */: + case 196 /* VariableStatement */: + case 201 /* WhileStatement */: + case 208 /* WithStatement */: + case 230 /* ExportAssignment */: return true; default: return false; @@ -5543,13 +5656,13 @@ var ts; ts.isStatement = isStatement; function isClassElement(n) { switch (n.kind) { - case 144 /* Constructor */: - case 141 /* PropertyDeclaration */: - case 143 /* MethodDeclaration */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 142 /* MethodSignature */: - case 149 /* IndexSignature */: + case 145 /* Constructor */: + case 142 /* PropertyDeclaration */: + case 144 /* MethodDeclaration */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 143 /* MethodSignature */: + case 150 /* IndexSignature */: return true; default: return false; @@ -5562,7 +5675,7 @@ var ts; return false; } var parent = name.parent; - if (parent.kind === 228 /* ImportSpecifier */ || parent.kind === 232 /* ExportSpecifier */) { + if (parent.kind === 229 /* ImportSpecifier */ || parent.kind === 233 /* ExportSpecifier */) { if (parent.propertyName) { return true; } @@ -5577,31 +5690,31 @@ var ts; function isIdentifierName(node) { var parent = node.parent; switch (parent.kind) { - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 249 /* EnumMember */: - case 247 /* PropertyAssignment */: - case 168 /* PropertyAccessExpression */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 250 /* EnumMember */: + case 248 /* PropertyAssignment */: + case 169 /* PropertyAccessExpression */: // Name in member declaration or property name in property access return parent.name === node; - case 135 /* QualifiedName */: + case 136 /* QualifiedName */: // Name on right hand side of dot in a type query if (parent.right === node) { - while (parent.kind === 135 /* QualifiedName */) { + while (parent.kind === 136 /* QualifiedName */) { parent = parent.parent; } - return parent.kind === 154 /* TypeQuery */; + return parent.kind === 155 /* TypeQuery */; } return false; - case 165 /* BindingElement */: - case 228 /* ImportSpecifier */: + case 166 /* BindingElement */: + case 229 /* ImportSpecifier */: // Property name in binding element or import specifier return parent.propertyName === node; - case 232 /* ExportSpecifier */: + case 233 /* ExportSpecifier */: // Any name in an export specifier return true; } @@ -5617,12 +5730,12 @@ var ts; // export = ... // export default ... function isAliasSymbolDeclaration(node) { - return node.kind === 223 /* ImportEqualsDeclaration */ || - node.kind === 225 /* ImportClause */ && !!node.name || - node.kind === 226 /* NamespaceImport */ || - node.kind === 228 /* ImportSpecifier */ || - node.kind === 232 /* ExportSpecifier */ || - node.kind === 229 /* ExportAssignment */ && node.expression.kind === 69 /* Identifier */; + return node.kind === 224 /* ImportEqualsDeclaration */ || + node.kind === 226 /* ImportClause */ && !!node.name || + node.kind === 227 /* NamespaceImport */ || + node.kind === 229 /* ImportSpecifier */ || + node.kind === 233 /* ExportSpecifier */ || + node.kind === 230 /* ExportAssignment */ && node.expression.kind === 69 /* Identifier */; } ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration; function getClassExtendsHeritageClauseElement(node) { @@ -5704,7 +5817,7 @@ var ts; } ts.getFileReferenceFromReferencePath = getFileReferenceFromReferencePath; function isKeyword(token) { - return 70 /* FirstKeyword */ <= token && token <= 134 /* LastKeyword */; + return 70 /* FirstKeyword */ <= token && token <= 135 /* LastKeyword */; } ts.isKeyword = isKeyword; function isTrivia(token) { @@ -5731,7 +5844,7 @@ var ts; } ts.hasDynamicName = hasDynamicName; function isDynamicName(name) { - return name.kind === 136 /* ComputedPropertyName */ && + return name.kind === 137 /* ComputedPropertyName */ && !isStringOrNumericLiteral(name.expression.kind) && !isWellKnownSymbolSyntactically(name.expression); } @@ -5749,7 +5862,7 @@ var ts; if (name.kind === 69 /* Identifier */ || name.kind === 9 /* StringLiteral */ || name.kind === 8 /* NumericLiteral */) { return name.text; } - if (name.kind === 136 /* ComputedPropertyName */) { + if (name.kind === 137 /* ComputedPropertyName */) { var nameExpression = name.expression; if (isWellKnownSymbolSyntactically(nameExpression)) { var rightHandSideName = nameExpression.name.text; @@ -5789,18 +5902,18 @@ var ts; ts.isModifierKind = isModifierKind; function isParameterDeclaration(node) { var root = getRootDeclaration(node); - return root.kind === 138 /* Parameter */; + return root.kind === 139 /* Parameter */; } ts.isParameterDeclaration = isParameterDeclaration; function getRootDeclaration(node) { - while (node.kind === 165 /* BindingElement */) { + while (node.kind === 166 /* BindingElement */) { node = node.parent.parent; } return node; } ts.getRootDeclaration = getRootDeclaration; function nodeStartsNewLexicalEnvironment(n) { - return isFunctionLike(n) || n.kind === 220 /* ModuleDeclaration */ || n.kind === 250 /* SourceFile */; + return isFunctionLike(n) || n.kind === 221 /* ModuleDeclaration */ || n.kind === 251 /* SourceFile */; } ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment; /** @@ -5850,7 +5963,7 @@ var ts; } ts.cloneEntityName = cloneEntityName; function isQualifiedName(node) { - return node.kind === 135 /* QualifiedName */; + return node.kind === 136 /* QualifiedName */; } ts.isQualifiedName = isQualifiedName; function nodeIsSynthesized(node) { @@ -6180,7 +6293,7 @@ var ts; ts.getLineOfLocalPositionFromLineMap = getLineOfLocalPositionFromLineMap; function getFirstConstructorWithBody(node) { return ts.forEach(node.members, function (member) { - if (member.kind === 144 /* Constructor */ && nodeIsPresent(member.body)) { + if (member.kind === 145 /* Constructor */ && nodeIsPresent(member.body)) { return member; } }); @@ -6197,10 +6310,10 @@ var ts; var setAccessor; if (hasDynamicName(accessor)) { firstAccessor = accessor; - if (accessor.kind === 145 /* GetAccessor */) { + if (accessor.kind === 146 /* GetAccessor */) { getAccessor = accessor; } - else if (accessor.kind === 146 /* SetAccessor */) { + else if (accessor.kind === 147 /* SetAccessor */) { setAccessor = accessor; } else { @@ -6209,7 +6322,7 @@ var ts; } else { ts.forEach(declarations, function (member) { - if ((member.kind === 145 /* GetAccessor */ || member.kind === 146 /* SetAccessor */) + if ((member.kind === 146 /* GetAccessor */ || member.kind === 147 /* SetAccessor */) && (member.flags & 64 /* Static */) === (accessor.flags & 64 /* Static */)) { var memberName = getPropertyNameForPropertyNameNode(member.name); var accessorName = getPropertyNameForPropertyNameNode(accessor.name); @@ -6220,10 +6333,10 @@ var ts; else if (!secondAccessor) { secondAccessor = member; } - if (member.kind === 145 /* GetAccessor */ && !getAccessor) { + if (member.kind === 146 /* GetAccessor */ && !getAccessor) { getAccessor = member; } - if (member.kind === 146 /* SetAccessor */ && !setAccessor) { + if (member.kind === 147 /* SetAccessor */ && !setAccessor) { setAccessor = member; } } @@ -6433,24 +6546,24 @@ var ts; function isLeftHandSideExpression(expr) { if (expr) { switch (expr.kind) { - case 168 /* PropertyAccessExpression */: - case 169 /* ElementAccessExpression */: - case 171 /* NewExpression */: - case 170 /* CallExpression */: - case 235 /* JsxElement */: - case 236 /* JsxSelfClosingElement */: - case 172 /* TaggedTemplateExpression */: - case 166 /* ArrayLiteralExpression */: - case 174 /* ParenthesizedExpression */: - case 167 /* ObjectLiteralExpression */: - case 188 /* ClassExpression */: - case 175 /* FunctionExpression */: + case 169 /* PropertyAccessExpression */: + case 170 /* ElementAccessExpression */: + case 172 /* NewExpression */: + case 171 /* CallExpression */: + case 236 /* JsxElement */: + case 237 /* JsxSelfClosingElement */: + case 173 /* TaggedTemplateExpression */: + case 167 /* ArrayLiteralExpression */: + case 175 /* ParenthesizedExpression */: + case 168 /* ObjectLiteralExpression */: + case 189 /* ClassExpression */: + case 176 /* FunctionExpression */: case 69 /* Identifier */: case 10 /* RegularExpressionLiteral */: case 8 /* NumericLiteral */: case 9 /* StringLiteral */: case 11 /* NoSubstitutionTemplateLiteral */: - case 185 /* TemplateExpression */: + case 186 /* TemplateExpression */: case 84 /* FalseKeyword */: case 93 /* NullKeyword */: case 97 /* ThisKeyword */: @@ -6467,7 +6580,7 @@ var ts; } ts.isAssignmentOperator = isAssignmentOperator; function isExpressionWithTypeArgumentsInClassExtendsClause(node) { - return node.kind === 190 /* ExpressionWithTypeArguments */ && + return node.kind === 191 /* ExpressionWithTypeArguments */ && node.parent.token === 83 /* ExtendsKeyword */ && isClassLike(node.parent.parent); } @@ -6490,16 +6603,16 @@ var ts; } } function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return (node.parent.kind === 135 /* QualifiedName */ && node.parent.right === node) || - (node.parent.kind === 168 /* PropertyAccessExpression */ && node.parent.name === node); + return (node.parent.kind === 136 /* QualifiedName */ && node.parent.right === node) || + (node.parent.kind === 169 /* PropertyAccessExpression */ && node.parent.name === node); } ts.isRightSideOfQualifiedNameOrPropertyAccess = isRightSideOfQualifiedNameOrPropertyAccess; function isEmptyObjectLiteralOrArrayLiteral(expression) { var kind = expression.kind; - if (kind === 167 /* ObjectLiteralExpression */) { + if (kind === 168 /* ObjectLiteralExpression */) { return expression.properties.length === 0; } - if (kind === 166 /* ArrayLiteralExpression */) { + if (kind === 167 /* ArrayLiteralExpression */) { return expression.elements.length === 0; } return false; @@ -6854,9 +6967,9 @@ var ts; } ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions; function getTypeParameterOwner(d) { - if (d && d.kind === 137 /* TypeParameter */) { + if (d && d.kind === 138 /* TypeParameter */) { for (var current = d; current; current = current.parent) { - if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 217 /* InterfaceDeclaration */) { + if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 218 /* InterfaceDeclaration */) { return current; } } @@ -6864,7 +6977,7 @@ var ts; } ts.getTypeParameterOwner = getTypeParameterOwner; function isParameterPropertyDeclaration(node) { - return node.flags & 56 /* AccessibilityModifier */ && node.parent.kind === 144 /* Constructor */ && ts.isClassLike(node.parent.parent); + return node.flags & 56 /* AccessibilityModifier */ && node.parent.kind === 145 /* Constructor */ && ts.isClassLike(node.parent.parent); } ts.isParameterPropertyDeclaration = isParameterPropertyDeclaration; })(ts || (ts = {})); @@ -6876,7 +6989,7 @@ var ts; var NodeConstructor; var SourceFileConstructor; function createNode(kind, pos, end) { - if (kind === 250 /* SourceFile */) { + if (kind === 251 /* SourceFile */) { return new (SourceFileConstructor || (SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor()))(kind, pos, end); } else { @@ -6919,26 +7032,26 @@ var ts; var visitNodes = cbNodeArray ? visitNodeArray : visitEachNode; var cbNodes = cbNodeArray || cbNode; switch (node.kind) { - case 135 /* QualifiedName */: + case 136 /* QualifiedName */: return visitNode(cbNode, node.left) || visitNode(cbNode, node.right); - case 137 /* TypeParameter */: + case 138 /* TypeParameter */: return visitNode(cbNode, node.name) || visitNode(cbNode, node.constraint) || visitNode(cbNode, node.expression); - case 248 /* ShorthandPropertyAssignment */: + case 249 /* ShorthandPropertyAssignment */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.equalsToken) || visitNode(cbNode, node.objectAssignmentInitializer); - case 138 /* Parameter */: - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 247 /* PropertyAssignment */: - case 213 /* VariableDeclaration */: - case 165 /* BindingElement */: + case 139 /* Parameter */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 248 /* PropertyAssignment */: + case 214 /* VariableDeclaration */: + case 166 /* BindingElement */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.propertyName) || @@ -6947,24 +7060,24 @@ var ts; visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.type) || visitNode(cbNode, node.initializer); - case 152 /* FunctionType */: - case 153 /* ConstructorType */: - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 149 /* IndexSignature */: + case 153 /* FunctionType */: + case 154 /* ConstructorType */: + case 148 /* CallSignature */: + case 149 /* ConstructSignature */: + case 150 /* IndexSignature */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNodes(cbNodes, node.typeParameters) || visitNodes(cbNodes, node.parameters) || visitNode(cbNode, node.type); - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 175 /* FunctionExpression */: - case 215 /* FunctionDeclaration */: - case 176 /* ArrowFunction */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 145 /* Constructor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 176 /* FunctionExpression */: + case 216 /* FunctionDeclaration */: + case 177 /* ArrowFunction */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.asteriskToken) || @@ -6975,290 +7088,290 @@ var ts; visitNode(cbNode, node.type) || visitNode(cbNode, node.equalsGreaterThanToken) || visitNode(cbNode, node.body); - case 151 /* TypeReference */: + case 152 /* TypeReference */: return visitNode(cbNode, node.typeName) || visitNodes(cbNodes, node.typeArguments); - case 150 /* TypePredicate */: + case 151 /* TypePredicate */: return visitNode(cbNode, node.parameterName) || visitNode(cbNode, node.type); - case 154 /* TypeQuery */: + case 155 /* TypeQuery */: return visitNode(cbNode, node.exprName); - case 155 /* TypeLiteral */: + case 156 /* TypeLiteral */: return visitNodes(cbNodes, node.members); - case 156 /* ArrayType */: + case 157 /* ArrayType */: return visitNode(cbNode, node.elementType); - case 157 /* TupleType */: + case 158 /* TupleType */: return visitNodes(cbNodes, node.elementTypes); - case 158 /* UnionType */: - case 159 /* IntersectionType */: + case 159 /* UnionType */: + case 160 /* IntersectionType */: return visitNodes(cbNodes, node.types); - case 160 /* ParenthesizedType */: + case 161 /* ParenthesizedType */: return visitNode(cbNode, node.type); - case 163 /* ObjectBindingPattern */: - case 164 /* ArrayBindingPattern */: + case 164 /* ObjectBindingPattern */: + case 165 /* ArrayBindingPattern */: return visitNodes(cbNodes, node.elements); - case 166 /* ArrayLiteralExpression */: + case 167 /* ArrayLiteralExpression */: return visitNodes(cbNodes, node.elements); - case 167 /* ObjectLiteralExpression */: + case 168 /* ObjectLiteralExpression */: return visitNodes(cbNodes, node.properties); - case 168 /* PropertyAccessExpression */: + case 169 /* PropertyAccessExpression */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.dotToken) || visitNode(cbNode, node.name); - case 169 /* ElementAccessExpression */: + case 170 /* ElementAccessExpression */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.argumentExpression); - case 170 /* CallExpression */: - case 171 /* NewExpression */: + case 171 /* CallExpression */: + case 172 /* NewExpression */: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.typeArguments) || visitNodes(cbNodes, node.arguments); - case 172 /* TaggedTemplateExpression */: + case 173 /* TaggedTemplateExpression */: return visitNode(cbNode, node.tag) || visitNode(cbNode, node.template); - case 173 /* TypeAssertionExpression */: + case 174 /* TypeAssertionExpression */: return visitNode(cbNode, node.type) || visitNode(cbNode, node.expression); - case 174 /* ParenthesizedExpression */: + case 175 /* ParenthesizedExpression */: return visitNode(cbNode, node.expression); - case 177 /* DeleteExpression */: + case 178 /* DeleteExpression */: return visitNode(cbNode, node.expression); - case 178 /* TypeOfExpression */: + case 179 /* TypeOfExpression */: return visitNode(cbNode, node.expression); - case 179 /* VoidExpression */: + case 180 /* VoidExpression */: return visitNode(cbNode, node.expression); - case 181 /* PrefixUnaryExpression */: + case 182 /* PrefixUnaryExpression */: return visitNode(cbNode, node.operand); - case 186 /* YieldExpression */: + case 187 /* YieldExpression */: return visitNode(cbNode, node.asteriskToken) || visitNode(cbNode, node.expression); - case 180 /* AwaitExpression */: + case 181 /* AwaitExpression */: return visitNode(cbNode, node.expression); - case 182 /* PostfixUnaryExpression */: + case 183 /* PostfixUnaryExpression */: return visitNode(cbNode, node.operand); - case 183 /* BinaryExpression */: + case 184 /* BinaryExpression */: return visitNode(cbNode, node.left) || visitNode(cbNode, node.operatorToken) || visitNode(cbNode, node.right); - case 191 /* AsExpression */: + case 192 /* AsExpression */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.type); - case 184 /* ConditionalExpression */: + case 185 /* ConditionalExpression */: return visitNode(cbNode, node.condition) || visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.whenTrue) || visitNode(cbNode, node.colonToken) || visitNode(cbNode, node.whenFalse); - case 187 /* SpreadElementExpression */: + case 188 /* SpreadElementExpression */: return visitNode(cbNode, node.expression); - case 194 /* Block */: - case 221 /* ModuleBlock */: + case 195 /* Block */: + case 222 /* ModuleBlock */: return visitNodes(cbNodes, node.statements); - case 250 /* SourceFile */: + case 251 /* SourceFile */: return visitNodes(cbNodes, node.statements) || visitNode(cbNode, node.endOfFileToken); - case 195 /* VariableStatement */: + case 196 /* VariableStatement */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.declarationList); - case 214 /* VariableDeclarationList */: + case 215 /* VariableDeclarationList */: return visitNodes(cbNodes, node.declarations); - case 197 /* ExpressionStatement */: + case 198 /* ExpressionStatement */: return visitNode(cbNode, node.expression); - case 198 /* IfStatement */: + case 199 /* IfStatement */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.thenStatement) || visitNode(cbNode, node.elseStatement); - case 199 /* DoStatement */: + case 200 /* DoStatement */: return visitNode(cbNode, node.statement) || visitNode(cbNode, node.expression); - case 200 /* WhileStatement */: + case 201 /* WhileStatement */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 201 /* ForStatement */: + case 202 /* ForStatement */: return visitNode(cbNode, node.initializer) || visitNode(cbNode, node.condition) || visitNode(cbNode, node.incrementor) || visitNode(cbNode, node.statement); - case 202 /* ForInStatement */: + case 203 /* ForInStatement */: return visitNode(cbNode, node.initializer) || visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 203 /* ForOfStatement */: + case 204 /* ForOfStatement */: return visitNode(cbNode, node.initializer) || visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 204 /* ContinueStatement */: - case 205 /* BreakStatement */: + case 205 /* ContinueStatement */: + case 206 /* BreakStatement */: return visitNode(cbNode, node.label); - case 206 /* ReturnStatement */: + case 207 /* ReturnStatement */: return visitNode(cbNode, node.expression); - case 207 /* WithStatement */: + case 208 /* WithStatement */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 208 /* SwitchStatement */: + case 209 /* SwitchStatement */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.caseBlock); - case 222 /* CaseBlock */: + case 223 /* CaseBlock */: return visitNodes(cbNodes, node.clauses); - case 243 /* CaseClause */: + case 244 /* CaseClause */: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.statements); - case 244 /* DefaultClause */: + case 245 /* DefaultClause */: return visitNodes(cbNodes, node.statements); - case 209 /* LabeledStatement */: + case 210 /* LabeledStatement */: return visitNode(cbNode, node.label) || visitNode(cbNode, node.statement); - case 210 /* ThrowStatement */: + case 211 /* ThrowStatement */: return visitNode(cbNode, node.expression); - case 211 /* TryStatement */: + case 212 /* TryStatement */: return visitNode(cbNode, node.tryBlock) || visitNode(cbNode, node.catchClause) || visitNode(cbNode, node.finallyBlock); - case 246 /* CatchClause */: + case 247 /* CatchClause */: return visitNode(cbNode, node.variableDeclaration) || visitNode(cbNode, node.block); - case 139 /* Decorator */: + case 140 /* Decorator */: return visitNode(cbNode, node.expression); - case 216 /* ClassDeclaration */: - case 188 /* ClassExpression */: + case 217 /* ClassDeclaration */: + case 189 /* ClassExpression */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeParameters) || visitNodes(cbNodes, node.heritageClauses) || visitNodes(cbNodes, node.members); - case 217 /* InterfaceDeclaration */: + case 218 /* InterfaceDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeParameters) || visitNodes(cbNodes, node.heritageClauses) || visitNodes(cbNodes, node.members); - case 218 /* TypeAliasDeclaration */: + case 219 /* TypeAliasDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeParameters) || visitNode(cbNode, node.type); - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.members); - case 249 /* EnumMember */: + case 250 /* EnumMember */: return visitNode(cbNode, node.name) || visitNode(cbNode, node.initializer); - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.body); - case 223 /* ImportEqualsDeclaration */: + case 224 /* ImportEqualsDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.moduleReference); - case 224 /* ImportDeclaration */: + case 225 /* ImportDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.importClause) || visitNode(cbNode, node.moduleSpecifier); - case 225 /* ImportClause */: + case 226 /* ImportClause */: return visitNode(cbNode, node.name) || visitNode(cbNode, node.namedBindings); - case 226 /* NamespaceImport */: + case 227 /* NamespaceImport */: return visitNode(cbNode, node.name); - case 227 /* NamedImports */: - case 231 /* NamedExports */: + case 228 /* NamedImports */: + case 232 /* NamedExports */: return visitNodes(cbNodes, node.elements); - case 230 /* ExportDeclaration */: + case 231 /* ExportDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.exportClause) || visitNode(cbNode, node.moduleSpecifier); - case 228 /* ImportSpecifier */: - case 232 /* ExportSpecifier */: + case 229 /* ImportSpecifier */: + case 233 /* ExportSpecifier */: return visitNode(cbNode, node.propertyName) || visitNode(cbNode, node.name); - case 229 /* ExportAssignment */: + case 230 /* ExportAssignment */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.expression); - case 185 /* TemplateExpression */: + case 186 /* TemplateExpression */: return visitNode(cbNode, node.head) || visitNodes(cbNodes, node.templateSpans); - case 192 /* TemplateSpan */: + case 193 /* TemplateSpan */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.literal); - case 136 /* ComputedPropertyName */: + case 137 /* ComputedPropertyName */: return visitNode(cbNode, node.expression); - case 245 /* HeritageClause */: + case 246 /* HeritageClause */: return visitNodes(cbNodes, node.types); - case 190 /* ExpressionWithTypeArguments */: + case 191 /* ExpressionWithTypeArguments */: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.typeArguments); - case 234 /* ExternalModuleReference */: + case 235 /* ExternalModuleReference */: return visitNode(cbNode, node.expression); - case 233 /* MissingDeclaration */: + case 234 /* MissingDeclaration */: return visitNodes(cbNodes, node.decorators); - case 235 /* JsxElement */: + case 236 /* JsxElement */: return visitNode(cbNode, node.openingElement) || visitNodes(cbNodes, node.children) || visitNode(cbNode, node.closingElement); - case 236 /* JsxSelfClosingElement */: - case 237 /* JsxOpeningElement */: + case 237 /* JsxSelfClosingElement */: + case 238 /* JsxOpeningElement */: return visitNode(cbNode, node.tagName) || visitNodes(cbNodes, node.attributes); - case 240 /* JsxAttribute */: + case 241 /* JsxAttribute */: return visitNode(cbNode, node.name) || visitNode(cbNode, node.initializer); - case 241 /* JsxSpreadAttribute */: + case 242 /* JsxSpreadAttribute */: return visitNode(cbNode, node.expression); - case 242 /* JsxExpression */: + case 243 /* JsxExpression */: return visitNode(cbNode, node.expression); - case 239 /* JsxClosingElement */: + case 240 /* JsxClosingElement */: return visitNode(cbNode, node.tagName); - case 251 /* JSDocTypeExpression */: + case 252 /* JSDocTypeExpression */: return visitNode(cbNode, node.type); - case 255 /* JSDocUnionType */: + case 256 /* JSDocUnionType */: return visitNodes(cbNodes, node.types); - case 256 /* JSDocTupleType */: + case 257 /* JSDocTupleType */: return visitNodes(cbNodes, node.types); - case 254 /* JSDocArrayType */: + case 255 /* JSDocArrayType */: return visitNode(cbNode, node.elementType); - case 258 /* JSDocNonNullableType */: + case 259 /* JSDocNonNullableType */: return visitNode(cbNode, node.type); - case 257 /* JSDocNullableType */: + case 258 /* JSDocNullableType */: return visitNode(cbNode, node.type); - case 259 /* JSDocRecordType */: + case 260 /* JSDocRecordType */: return visitNodes(cbNodes, node.members); - case 261 /* JSDocTypeReference */: + case 262 /* JSDocTypeReference */: return visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeArguments); - case 262 /* JSDocOptionalType */: + case 263 /* JSDocOptionalType */: return visitNode(cbNode, node.type); - case 263 /* JSDocFunctionType */: + case 264 /* JSDocFunctionType */: return visitNodes(cbNodes, node.parameters) || visitNode(cbNode, node.type); - case 264 /* JSDocVariadicType */: + case 265 /* JSDocVariadicType */: return visitNode(cbNode, node.type); - case 265 /* JSDocConstructorType */: + case 266 /* JSDocConstructorType */: return visitNode(cbNode, node.type); - case 266 /* JSDocThisType */: + case 267 /* JSDocThisType */: return visitNode(cbNode, node.type); - case 260 /* JSDocRecordMember */: + case 261 /* JSDocRecordMember */: return visitNode(cbNode, node.name) || visitNode(cbNode, node.type); - case 267 /* JSDocComment */: + case 268 /* JSDocComment */: return visitNodes(cbNodes, node.tags); - case 269 /* JSDocParameterTag */: + case 270 /* JSDocParameterTag */: return visitNode(cbNode, node.preParameterName) || visitNode(cbNode, node.typeExpression) || visitNode(cbNode, node.postParameterName); - case 270 /* JSDocReturnTag */: + case 271 /* JSDocReturnTag */: return visitNode(cbNode, node.typeExpression); - case 271 /* JSDocTypeTag */: + case 272 /* JSDocTypeTag */: return visitNode(cbNode, node.typeExpression); - case 272 /* JSDocTemplateTag */: + case 273 /* JSDocTemplateTag */: return visitNodes(cbNodes, node.typeParameters); } } @@ -7466,9 +7579,9 @@ var ts; // Add additional cases as necessary depending on how we see JSDoc comments used // in the wild. switch (node.kind) { - case 195 /* VariableStatement */: - case 215 /* FunctionDeclaration */: - case 138 /* Parameter */: + case 196 /* VariableStatement */: + case 216 /* FunctionDeclaration */: + case 139 /* Parameter */: addJSDocComment(node); } forEachChild(node, visit); @@ -7511,7 +7624,7 @@ var ts; function createSourceFile(fileName, languageVersion) { // code from createNode is inlined here so createNode won't have to deal with special case of creating source files // this is quite rare comparing to other nodes and createNode should be as fast as possible - var sourceFile = new SourceFileConstructor(250 /* SourceFile */, /*pos*/ 0, /* end */ sourceText.length); + var sourceFile = new SourceFileConstructor(251 /* SourceFile */, /*pos*/ 0, /* end */ sourceText.length); nodeCount++; sourceFile.text = sourceText; sourceFile.bindDiagnostics = []; @@ -7685,16 +7798,18 @@ var ts; } return result; } - // Invokes the provided callback then unconditionally restores the parser to the state it - // was in immediately prior to invoking the callback. The result of invoking the callback - // is returned from this function. + /** Invokes the provided callback then unconditionally restores the parser to the state it + * was in immediately prior to invoking the callback. The result of invoking the callback + * is returned from this function. + */ function lookAhead(callback) { return speculationHelper(callback, /*isLookAhead*/ true); } - // Invokes the provided callback. If the callback returns something falsy, then it restores - // the parser to the state it was in immediately prior to invoking the callback. If the - // callback returns something truthy, then the parser state is not rolled back. The result - // of invoking the callback is returned from this function. + /** Invokes the provided callback. If the callback returns something falsy, then it restores + * the parser to the state it was in immediately prior to invoking the callback. If the + * callback returns something truthy, then the parser state is not rolled back. The result + * of invoking the callback is returned from this function. + */ function tryParse(callback) { return speculationHelper(callback, /*isLookAhead*/ false); } @@ -7861,7 +7976,7 @@ var ts; // PropertyName [Yield]: // LiteralPropertyName // ComputedPropertyName[?Yield] - var node = createNode(136 /* ComputedPropertyName */); + var node = createNode(137 /* ComputedPropertyName */); parseExpected(19 /* OpenBracketToken */); // We parse any expression (including a comma expression). But the grammar // says that only an assignment expression is allowed, so the grammar checker @@ -8262,14 +8377,14 @@ var ts; function isReusableClassMember(node) { if (node) { switch (node.kind) { - case 144 /* Constructor */: - case 149 /* IndexSignature */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 141 /* PropertyDeclaration */: - case 193 /* SemicolonClassElement */: + case 145 /* Constructor */: + case 150 /* IndexSignature */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 142 /* PropertyDeclaration */: + case 194 /* SemicolonClassElement */: return true; - case 143 /* MethodDeclaration */: + case 144 /* MethodDeclaration */: // Method declarations are not necessarily reusable. An object-literal // may have a method calls "constructor(...)" and we must reparse that // into an actual .ConstructorDeclaration. @@ -8284,8 +8399,8 @@ var ts; function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 243 /* CaseClause */: - case 244 /* DefaultClause */: + case 244 /* CaseClause */: + case 245 /* DefaultClause */: return true; } } @@ -8294,58 +8409,58 @@ var ts; function isReusableStatement(node) { if (node) { switch (node.kind) { - case 215 /* FunctionDeclaration */: - case 195 /* VariableStatement */: - case 194 /* Block */: - case 198 /* IfStatement */: - case 197 /* ExpressionStatement */: - case 210 /* ThrowStatement */: - case 206 /* ReturnStatement */: - case 208 /* SwitchStatement */: - case 205 /* BreakStatement */: - case 204 /* ContinueStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - case 201 /* ForStatement */: - case 200 /* WhileStatement */: - case 207 /* WithStatement */: - case 196 /* EmptyStatement */: - case 211 /* TryStatement */: - case 209 /* LabeledStatement */: - case 199 /* DoStatement */: - case 212 /* DebuggerStatement */: - case 224 /* ImportDeclaration */: - case 223 /* ImportEqualsDeclaration */: - case 230 /* ExportDeclaration */: - case 229 /* ExportAssignment */: - case 220 /* ModuleDeclaration */: - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: - case 219 /* EnumDeclaration */: - case 218 /* TypeAliasDeclaration */: + case 216 /* FunctionDeclaration */: + case 196 /* VariableStatement */: + case 195 /* Block */: + case 199 /* IfStatement */: + case 198 /* ExpressionStatement */: + case 211 /* ThrowStatement */: + case 207 /* ReturnStatement */: + case 209 /* SwitchStatement */: + case 206 /* BreakStatement */: + case 205 /* ContinueStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: + case 202 /* ForStatement */: + case 201 /* WhileStatement */: + case 208 /* WithStatement */: + case 197 /* EmptyStatement */: + case 212 /* TryStatement */: + case 210 /* LabeledStatement */: + case 200 /* DoStatement */: + case 213 /* DebuggerStatement */: + case 225 /* ImportDeclaration */: + case 224 /* ImportEqualsDeclaration */: + case 231 /* ExportDeclaration */: + case 230 /* ExportAssignment */: + case 221 /* ModuleDeclaration */: + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: + case 220 /* EnumDeclaration */: + case 219 /* TypeAliasDeclaration */: return true; } } return false; } function isReusableEnumMember(node) { - return node.kind === 249 /* EnumMember */; + return node.kind === 250 /* EnumMember */; } function isReusableTypeMember(node) { if (node) { switch (node.kind) { - case 148 /* ConstructSignature */: - case 142 /* MethodSignature */: - case 149 /* IndexSignature */: - case 140 /* PropertySignature */: - case 147 /* CallSignature */: + case 149 /* ConstructSignature */: + case 143 /* MethodSignature */: + case 150 /* IndexSignature */: + case 141 /* PropertySignature */: + case 148 /* CallSignature */: return true; } } return false; } function isReusableVariableDeclaration(node) { - if (node.kind !== 213 /* VariableDeclaration */) { + if (node.kind !== 214 /* VariableDeclaration */) { return false; } // Very subtle incremental parsing bug. Consider the following code: @@ -8366,7 +8481,7 @@ var ts; return variableDeclarator.initializer === undefined; } function isReusableParameter(node) { - if (node.kind !== 138 /* Parameter */) { + if (node.kind !== 139 /* Parameter */) { return false; } // See the comment in isReusableVariableDeclaration for why we do this. @@ -8483,7 +8598,7 @@ var ts; function parseEntityName(allowReservedWords, diagnosticMessage) { var entity = parseIdentifier(diagnosticMessage); while (parseOptional(21 /* DotToken */)) { - var node = createNode(135 /* QualifiedName */, entity.pos); + var node = createNode(136 /* QualifiedName */, entity.pos); node.left = entity; node.right = parseRightSideOfDot(allowReservedWords); entity = finishNode(node); @@ -8522,7 +8637,7 @@ var ts; return allowIdentifierNames ? parseIdentifierName() : parseIdentifier(); } function parseTemplateExpression() { - var template = createNode(185 /* TemplateExpression */); + var template = createNode(186 /* TemplateExpression */); template.head = parseTemplateLiteralFragment(); ts.Debug.assert(template.head.kind === 12 /* TemplateHead */, "Template head has wrong token kind"); var templateSpans = []; @@ -8535,7 +8650,7 @@ var ts; return finishNode(template); } function parseTemplateSpan() { - var span = createNode(192 /* TemplateSpan */); + var span = createNode(193 /* TemplateSpan */); span.expression = allowInAnd(parseExpression); var literal; if (token === 16 /* CloseBraceToken */) { @@ -8549,7 +8664,7 @@ var ts; return finishNode(span); } function parseStringLiteralTypeNode() { - return parseLiteralLikeNode(162 /* StringLiteralType */, /*internName*/ true); + return parseLiteralLikeNode(163 /* StringLiteralType */, /*internName*/ true); } function parseLiteralNode(internName) { return parseLiteralLikeNode(token, internName); @@ -8584,12 +8699,9 @@ var ts; return node; } // TYPES - function parseTypeReferenceOrTypePredicate() { + function parseTypeReference() { var typeName = parseEntityName(/*allowReservedWords*/ false, ts.Diagnostics.Type_expected); - if (typeName.kind === 69 /* Identifier */ && token === 124 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) { - return parseTypePredicate(typeName); - } - var node = createNode(151 /* TypeReference */, typeName.pos); + var node = createNode(152 /* TypeReference */, typeName.pos); node.typeName = typeName; if (!scanner.hasPrecedingLineBreak() && token === 25 /* LessThanToken */) { node.typeArguments = parseBracketedList(18 /* TypeArguments */, parseType, 25 /* LessThanToken */, 27 /* GreaterThanToken */); @@ -8598,24 +8710,24 @@ var ts; } function parseTypePredicate(lhs) { nextToken(); - var node = createNode(150 /* TypePredicate */, lhs.pos); + var node = createNode(151 /* TypePredicate */, lhs.pos); node.parameterName = lhs; node.type = parseType(); return finishNode(node); } function parseThisTypeNode() { - var node = createNode(161 /* ThisType */); + var node = createNode(162 /* ThisType */); nextToken(); return finishNode(node); } function parseTypeQuery() { - var node = createNode(154 /* TypeQuery */); + var node = createNode(155 /* TypeQuery */); parseExpected(101 /* TypeOfKeyword */); node.exprName = parseEntityName(/*allowReservedWords*/ true); return finishNode(node); } function parseTypeParameter() { - var node = createNode(137 /* TypeParameter */); + var node = createNode(138 /* TypeParameter */); node.name = parseIdentifier(); if (parseOptional(83 /* ExtendsKeyword */)) { // It's not uncommon for people to write improper constraints to a generic. If the @@ -8659,7 +8771,7 @@ var ts; } } function parseParameter() { - var node = createNode(138 /* Parameter */); + var node = createNode(139 /* Parameter */); node.decorators = parseDecorators(); setModifiers(node, parseModifiers()); node.dotDotDotToken = parseOptionalToken(22 /* DotDotDotToken */); @@ -8702,10 +8814,10 @@ var ts; signature.parameters = parseParameterList(yieldContext, awaitContext, requireCompleteParameterList); if (returnTokenRequired) { parseExpected(returnToken); - signature.type = parseType(); + signature.type = parseTypeOrTypePredicate(); } else if (parseOptional(returnToken)) { - signature.type = parseType(); + signature.type = parseTypeOrTypePredicate(); } } function parseParameterList(yieldContext, awaitContext, requireCompleteParameterList) { @@ -8753,7 +8865,7 @@ var ts; } function parseSignatureMember(kind) { var node = createNode(kind); - if (kind === 148 /* ConstructSignature */) { + if (kind === 149 /* ConstructSignature */) { parseExpected(92 /* NewKeyword */); } fillSignature(54 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); @@ -8817,7 +8929,7 @@ var ts; return token === 54 /* ColonToken */ || token === 24 /* CommaToken */ || token === 20 /* CloseBracketToken */; } function parseIndexSignatureDeclaration(fullStart, decorators, modifiers) { - var node = createNode(149 /* IndexSignature */, fullStart); + var node = createNode(150 /* IndexSignature */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); node.parameters = parseBracketedList(16 /* Parameters */, parseParameter, 19 /* OpenBracketToken */, 20 /* CloseBracketToken */); @@ -8830,7 +8942,7 @@ var ts; var name = parsePropertyName(); var questionToken = parseOptionalToken(53 /* QuestionToken */); if (token === 17 /* OpenParenToken */ || token === 25 /* LessThanToken */) { - var method = createNode(142 /* MethodSignature */, fullStart); + var method = createNode(143 /* MethodSignature */, fullStart); method.name = name; method.questionToken = questionToken; // Method signatues don't exist in expression contexts. So they have neither @@ -8840,7 +8952,7 @@ var ts; return finishNode(method); } else { - var property = createNode(140 /* PropertySignature */, fullStart); + var property = createNode(141 /* PropertySignature */, fullStart); property.name = name; property.questionToken = questionToken; property.type = parseTypeAnnotation(); @@ -8888,7 +9000,7 @@ var ts; switch (token) { case 17 /* OpenParenToken */: case 25 /* LessThanToken */: - return parseSignatureMember(147 /* CallSignature */); + return parseSignatureMember(148 /* CallSignature */); case 19 /* OpenBracketToken */: // Indexer or computed property return isIndexSignature() @@ -8896,7 +9008,7 @@ var ts; : parsePropertyOrMethodSignature(); case 92 /* NewKeyword */: if (lookAhead(isStartOfConstructSignature)) { - return parseSignatureMember(148 /* ConstructSignature */); + return parseSignatureMember(149 /* ConstructSignature */); } // fall through. case 9 /* StringLiteral */: @@ -8933,7 +9045,7 @@ var ts; return token === 17 /* OpenParenToken */ || token === 25 /* LessThanToken */; } function parseTypeLiteral() { - var node = createNode(155 /* TypeLiteral */); + var node = createNode(156 /* TypeLiteral */); node.members = parseObjectTypeMembers(); return finishNode(node); } @@ -8949,12 +9061,12 @@ var ts; return members; } function parseTupleType() { - var node = createNode(157 /* TupleType */); + var node = createNode(158 /* TupleType */); node.elementTypes = parseBracketedList(19 /* TupleElementTypes */, parseType, 19 /* OpenBracketToken */, 20 /* CloseBracketToken */); return finishNode(node); } function parseParenthesizedType() { - var node = createNode(160 /* ParenthesizedType */); + var node = createNode(161 /* ParenthesizedType */); parseExpected(17 /* OpenParenToken */); node.type = parseType(); parseExpected(18 /* CloseParenToken */); @@ -8962,7 +9074,7 @@ var ts; } function parseFunctionOrConstructorType(kind) { var node = createNode(kind); - if (kind === 153 /* ConstructorType */) { + if (kind === 154 /* ConstructorType */) { parseExpected(92 /* NewKeyword */); } fillSignature(34 /* EqualsGreaterThanToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); @@ -8981,7 +9093,7 @@ var ts; case 131 /* SymbolKeyword */: // If these are followed by a dot, then parse these out as a dotted type reference instead. var node = tryParse(parseKeywordAndNoDot); - return node || parseTypeReferenceOrTypePredicate(); + return node || parseTypeReference(); case 9 /* StringLiteral */: return parseStringLiteralTypeNode(); case 103 /* VoidKeyword */: @@ -9004,7 +9116,7 @@ var ts; case 17 /* OpenParenToken */: return parseParenthesizedType(); default: - return parseTypeReferenceOrTypePredicate(); + return parseTypeReference(); } } function isStartOfType() { @@ -9039,7 +9151,7 @@ var ts; var type = parseNonArrayType(); while (!scanner.hasPrecedingLineBreak() && parseOptional(19 /* OpenBracketToken */)) { parseExpected(20 /* CloseBracketToken */); - var node = createNode(156 /* ArrayType */, type.pos); + var node = createNode(157 /* ArrayType */, type.pos); node.elementType = type; type = finishNode(node); } @@ -9061,10 +9173,10 @@ var ts; return type; } function parseIntersectionTypeOrHigher() { - return parseUnionOrIntersectionType(159 /* IntersectionType */, parseArrayTypeOrHigher, 46 /* AmpersandToken */); + return parseUnionOrIntersectionType(160 /* IntersectionType */, parseArrayTypeOrHigher, 46 /* AmpersandToken */); } function parseUnionTypeOrHigher() { - return parseUnionOrIntersectionType(158 /* UnionType */, parseIntersectionTypeOrHigher, 47 /* BarToken */); + return parseUnionOrIntersectionType(159 /* UnionType */, parseIntersectionTypeOrHigher, 47 /* BarToken */); } function isStartOfFunctionType() { if (token === 25 /* LessThanToken */) { @@ -9101,6 +9213,26 @@ var ts; } return false; } + function parseTypeOrTypePredicate() { + var typePredicateVariable = isIdentifier() && tryParse(parseTypePredicatePrefix); + var type = parseType(); + if (typePredicateVariable) { + var node = createNode(151 /* TypePredicate */, typePredicateVariable.pos); + node.parameterName = typePredicateVariable; + node.type = type; + return finishNode(node); + } + else { + return type; + } + } + function parseTypePredicatePrefix() { + var id = parseIdentifier(); + if (token === 124 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) { + nextToken(); + return id; + } + } function parseType() { // The rules about 'yield' only apply to actual code/expression contexts. They don't // apply to 'type' contexts. So we disable these parameters here before moving on. @@ -9108,10 +9240,10 @@ var ts; } function parseTypeWorker() { if (isStartOfFunctionType()) { - return parseFunctionOrConstructorType(152 /* FunctionType */); + return parseFunctionOrConstructorType(153 /* FunctionType */); } if (token === 92 /* NewKeyword */) { - return parseFunctionOrConstructorType(153 /* ConstructorType */); + return parseFunctionOrConstructorType(154 /* ConstructorType */); } return parseUnionTypeOrHigher(); } @@ -9304,7 +9436,7 @@ var ts; return !scanner.hasPrecedingLineBreak() && isIdentifier(); } function parseYieldExpression() { - var node = createNode(186 /* YieldExpression */); + var node = createNode(187 /* YieldExpression */); // YieldExpression[In] : // yield // yield [no LineTerminator here] [Lexical goal InputElementRegExp]AssignmentExpression[?In, Yield] @@ -9324,8 +9456,8 @@ var ts; } function parseSimpleArrowFunctionExpression(identifier) { ts.Debug.assert(token === 34 /* EqualsGreaterThanToken */, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); - var node = createNode(176 /* ArrowFunction */, identifier.pos); - var parameter = createNode(138 /* Parameter */, identifier.pos); + var node = createNode(177 /* ArrowFunction */, identifier.pos); + var parameter = createNode(139 /* Parameter */, identifier.pos); parameter.name = identifier; finishNode(parameter); node.parameters = [parameter]; @@ -9477,7 +9609,7 @@ var ts; return parseParenthesizedArrowFunctionExpressionHead(/*allowAmbiguity*/ false); } function parseParenthesizedArrowFunctionExpressionHead(allowAmbiguity) { - var node = createNode(176 /* ArrowFunction */); + var node = createNode(177 /* ArrowFunction */); setModifiers(node, parseModifiersForArrowFunction()); var isAsync = !!(node.flags & 256 /* Async */); // Arrow functions are never generators. @@ -9543,7 +9675,7 @@ var ts; } // Note: we explicitly 'allowIn' in the whenTrue part of the condition expression, and // we do not that for the 'whenFalse' part. - var node = createNode(184 /* ConditionalExpression */, leftOperand.pos); + var node = createNode(185 /* ConditionalExpression */, leftOperand.pos); node.condition = leftOperand; node.questionToken = questionToken; node.whenTrue = doOutsideOfContext(disallowInAndDecoratorContext, parseAssignmentExpressionOrHigher); @@ -9556,7 +9688,7 @@ var ts; return parseBinaryExpressionRest(precedence, leftOperand); } function isInOrOfKeyword(t) { - return t === 90 /* InKeyword */ || t === 134 /* OfKeyword */; + return t === 90 /* InKeyword */ || t === 135 /* OfKeyword */; } function parseBinaryExpressionRest(precedence, leftOperand) { while (true) { @@ -9664,39 +9796,39 @@ var ts; return -1; } function makeBinaryExpression(left, operatorToken, right) { - var node = createNode(183 /* BinaryExpression */, left.pos); + var node = createNode(184 /* BinaryExpression */, left.pos); node.left = left; node.operatorToken = operatorToken; node.right = right; return finishNode(node); } function makeAsExpression(left, right) { - var node = createNode(191 /* AsExpression */, left.pos); + var node = createNode(192 /* AsExpression */, left.pos); node.expression = left; node.type = right; return finishNode(node); } function parsePrefixUnaryExpression() { - var node = createNode(181 /* PrefixUnaryExpression */); + var node = createNode(182 /* PrefixUnaryExpression */); node.operator = token; nextToken(); node.operand = parseSimpleUnaryExpression(); return finishNode(node); } function parseDeleteExpression() { - var node = createNode(177 /* DeleteExpression */); + var node = createNode(178 /* DeleteExpression */); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function parseTypeOfExpression() { - var node = createNode(178 /* TypeOfExpression */); + var node = createNode(179 /* TypeOfExpression */); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function parseVoidExpression() { - var node = createNode(179 /* VoidExpression */); + var node = createNode(180 /* VoidExpression */); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); @@ -9712,7 +9844,7 @@ var ts; return false; } function parseAwaitExpression() { - var node = createNode(180 /* AwaitExpression */); + var node = createNode(181 /* AwaitExpression */); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); @@ -9738,7 +9870,7 @@ var ts; var simpleUnaryExpression = parseSimpleUnaryExpression(); if (token === 38 /* AsteriskAsteriskToken */) { var start = ts.skipTrivia(sourceText, simpleUnaryExpression.pos); - if (simpleUnaryExpression.kind === 173 /* TypeAssertionExpression */) { + if (simpleUnaryExpression.kind === 174 /* TypeAssertionExpression */) { parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); } else { @@ -9828,7 +9960,7 @@ var ts; */ function parseIncrementExpression() { if (token === 41 /* PlusPlusToken */ || token === 42 /* MinusMinusToken */) { - var node = createNode(181 /* PrefixUnaryExpression */); + var node = createNode(182 /* PrefixUnaryExpression */); node.operator = token; nextToken(); node.operand = parseLeftHandSideExpressionOrHigher(); @@ -9841,7 +9973,7 @@ var ts; var expression = parseLeftHandSideExpressionOrHigher(); ts.Debug.assert(ts.isLeftHandSideExpression(expression)); if ((token === 41 /* PlusPlusToken */ || token === 42 /* MinusMinusToken */) && !scanner.hasPrecedingLineBreak()) { - var node = createNode(182 /* PostfixUnaryExpression */, expression.pos); + var node = createNode(183 /* PostfixUnaryExpression */, expression.pos); node.operand = expression; node.operator = token; nextToken(); @@ -9945,7 +10077,7 @@ var ts; } // If we have seen "super" it must be followed by '(' or '.'. // If it wasn't then just try to parse out a '.' and report an error. - var node = createNode(168 /* PropertyAccessExpression */, expression.pos); + var node = createNode(169 /* PropertyAccessExpression */, expression.pos); node.expression = expression; node.dotToken = parseExpectedToken(21 /* DotToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); node.name = parseRightSideOfDot(/*allowIdentifierNames*/ true); @@ -9964,8 +10096,8 @@ var ts; function parseJsxElementOrSelfClosingElement(inExpressionContext) { var opening = parseJsxOpeningOrSelfClosingElement(inExpressionContext); var result; - if (opening.kind === 237 /* JsxOpeningElement */) { - var node = createNode(235 /* JsxElement */, opening.pos); + if (opening.kind === 238 /* JsxOpeningElement */) { + var node = createNode(236 /* JsxElement */, opening.pos); node.openingElement = opening; node.children = parseJsxChildren(node.openingElement.tagName); node.closingElement = parseJsxClosingElement(inExpressionContext); @@ -9975,7 +10107,7 @@ var ts; result = finishNode(node); } else { - ts.Debug.assert(opening.kind === 236 /* JsxSelfClosingElement */); + ts.Debug.assert(opening.kind === 237 /* JsxSelfClosingElement */); // Nothing else to do for self-closing elements result = opening; } @@ -9990,7 +10122,7 @@ var ts; var invalidElement = tryParse(function () { return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ true); }); if (invalidElement) { parseErrorAtCurrentToken(ts.Diagnostics.JSX_expressions_must_have_one_parent_element); - var badNode = createNode(183 /* BinaryExpression */, result.pos); + var badNode = createNode(184 /* BinaryExpression */, result.pos); badNode.end = invalidElement.end; badNode.left = result; badNode.right = invalidElement; @@ -10002,13 +10134,13 @@ var ts; return result; } function parseJsxText() { - var node = createNode(238 /* JsxText */, scanner.getStartPos()); + var node = createNode(239 /* JsxText */, scanner.getStartPos()); token = scanner.scanJsxToken(); return finishNode(node); } function parseJsxChild() { switch (token) { - case 238 /* JsxText */: + case 239 /* JsxText */: return parseJsxText(); case 15 /* OpenBraceToken */: return parseJsxExpression(/*inExpressionContext*/ false); @@ -10050,7 +10182,7 @@ var ts; // Closing tag, so scan the immediately-following text with the JSX scanning instead // of regular scanning to avoid treating illegal characters (e.g. '#') as immediate // scanning errors - node = createNode(237 /* JsxOpeningElement */, fullStart); + node = createNode(238 /* JsxOpeningElement */, fullStart); scanJsxText(); } else { @@ -10062,7 +10194,7 @@ var ts; parseExpected(27 /* GreaterThanToken */, /*diagnostic*/ undefined, /*shouldAdvance*/ false); scanJsxText(); } - node = createNode(236 /* JsxSelfClosingElement */, fullStart); + node = createNode(237 /* JsxSelfClosingElement */, fullStart); } node.tagName = tagName; node.attributes = attributes; @@ -10073,7 +10205,7 @@ var ts; var elementName = parseIdentifierName(); while (parseOptional(21 /* DotToken */)) { scanJsxIdentifier(); - var node = createNode(135 /* QualifiedName */, elementName.pos); + var node = createNode(136 /* QualifiedName */, elementName.pos); node.left = elementName; node.right = parseIdentifierName(); elementName = finishNode(node); @@ -10081,7 +10213,7 @@ var ts; return elementName; } function parseJsxExpression(inExpressionContext) { - var node = createNode(242 /* JsxExpression */); + var node = createNode(243 /* JsxExpression */); parseExpected(15 /* OpenBraceToken */); if (token !== 16 /* CloseBraceToken */) { node.expression = parseAssignmentExpressionOrHigher(); @@ -10100,7 +10232,7 @@ var ts; return parseJsxSpreadAttribute(); } scanJsxIdentifier(); - var node = createNode(240 /* JsxAttribute */); + var node = createNode(241 /* JsxAttribute */); node.name = parseIdentifierName(); if (parseOptional(56 /* EqualsToken */)) { switch (token) { @@ -10115,7 +10247,7 @@ var ts; return finishNode(node); } function parseJsxSpreadAttribute() { - var node = createNode(241 /* JsxSpreadAttribute */); + var node = createNode(242 /* JsxSpreadAttribute */); parseExpected(15 /* OpenBraceToken */); parseExpected(22 /* DotDotDotToken */); node.expression = parseExpression(); @@ -10123,7 +10255,7 @@ var ts; return finishNode(node); } function parseJsxClosingElement(inExpressionContext) { - var node = createNode(239 /* JsxClosingElement */); + var node = createNode(240 /* JsxClosingElement */); parseExpected(26 /* LessThanSlashToken */); node.tagName = parseJsxElementName(); if (inExpressionContext) { @@ -10136,7 +10268,7 @@ var ts; return finishNode(node); } function parseTypeAssertion() { - var node = createNode(173 /* TypeAssertionExpression */); + var node = createNode(174 /* TypeAssertionExpression */); parseExpected(25 /* LessThanToken */); node.type = parseType(); parseExpected(27 /* GreaterThanToken */); @@ -10147,7 +10279,7 @@ var ts; while (true) { var dotToken = parseOptionalToken(21 /* DotToken */); if (dotToken) { - var propertyAccess = createNode(168 /* PropertyAccessExpression */, expression.pos); + var propertyAccess = createNode(169 /* PropertyAccessExpression */, expression.pos); propertyAccess.expression = expression; propertyAccess.dotToken = dotToken; propertyAccess.name = parseRightSideOfDot(/*allowIdentifierNames*/ true); @@ -10156,7 +10288,7 @@ var ts; } // when in the [Decorator] context, we do not parse ElementAccess as it could be part of a ComputedPropertyName if (!inDecoratorContext() && parseOptional(19 /* OpenBracketToken */)) { - var indexedAccess = createNode(169 /* ElementAccessExpression */, expression.pos); + var indexedAccess = createNode(170 /* ElementAccessExpression */, expression.pos); indexedAccess.expression = expression; // It's not uncommon for a user to write: "new Type[]". // Check for that common pattern and report a better error message. @@ -10172,7 +10304,7 @@ var ts; continue; } if (token === 11 /* NoSubstitutionTemplateLiteral */ || token === 12 /* TemplateHead */) { - var tagExpression = createNode(172 /* TaggedTemplateExpression */, expression.pos); + var tagExpression = createNode(173 /* TaggedTemplateExpression */, expression.pos); tagExpression.tag = expression; tagExpression.template = token === 11 /* NoSubstitutionTemplateLiteral */ ? parseLiteralNode() @@ -10195,7 +10327,7 @@ var ts; if (!typeArguments) { return expression; } - var callExpr = createNode(170 /* CallExpression */, expression.pos); + var callExpr = createNode(171 /* CallExpression */, expression.pos); callExpr.expression = expression; callExpr.typeArguments = typeArguments; callExpr.arguments = parseArgumentList(); @@ -10203,7 +10335,7 @@ var ts; continue; } else if (token === 17 /* OpenParenToken */) { - var callExpr = createNode(170 /* CallExpression */, expression.pos); + var callExpr = createNode(171 /* CallExpression */, expression.pos); callExpr.expression = expression; callExpr.arguments = parseArgumentList(); expression = finishNode(callExpr); @@ -10313,28 +10445,28 @@ var ts; return parseIdentifier(ts.Diagnostics.Expression_expected); } function parseParenthesizedExpression() { - var node = createNode(174 /* ParenthesizedExpression */); + var node = createNode(175 /* ParenthesizedExpression */); parseExpected(17 /* OpenParenToken */); node.expression = allowInAnd(parseExpression); parseExpected(18 /* CloseParenToken */); return finishNode(node); } function parseSpreadElement() { - var node = createNode(187 /* SpreadElementExpression */); + var node = createNode(188 /* SpreadElementExpression */); parseExpected(22 /* DotDotDotToken */); node.expression = parseAssignmentExpressionOrHigher(); return finishNode(node); } function parseArgumentOrArrayLiteralElement() { return token === 22 /* DotDotDotToken */ ? parseSpreadElement() : - token === 24 /* CommaToken */ ? createNode(189 /* OmittedExpression */) : + token === 24 /* CommaToken */ ? createNode(190 /* OmittedExpression */) : parseAssignmentExpressionOrHigher(); } function parseArgumentExpression() { return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement); } function parseArrayLiteralExpression() { - var node = createNode(166 /* ArrayLiteralExpression */); + var node = createNode(167 /* ArrayLiteralExpression */); parseExpected(19 /* OpenBracketToken */); if (scanner.hasPrecedingLineBreak()) node.flags |= 1024 /* MultiLine */; @@ -10344,10 +10476,10 @@ var ts; } function tryParseAccessorDeclaration(fullStart, decorators, modifiers) { if (parseContextualModifier(123 /* GetKeyword */)) { - return parseAccessorDeclaration(145 /* GetAccessor */, fullStart, decorators, modifiers); + return parseAccessorDeclaration(146 /* GetAccessor */, fullStart, decorators, modifiers); } else if (parseContextualModifier(129 /* SetKeyword */)) { - return parseAccessorDeclaration(146 /* SetAccessor */, fullStart, decorators, modifiers); + return parseAccessorDeclaration(147 /* SetAccessor */, fullStart, decorators, modifiers); } return undefined; } @@ -10374,7 +10506,7 @@ var ts; // this is necessary because ObjectLiteral productions are also used to cover grammar for ObjectAssignmentPattern var isShorthandPropertyAssignment = tokenIsIdentifier && (token === 24 /* CommaToken */ || token === 16 /* CloseBraceToken */ || token === 56 /* EqualsToken */); if (isShorthandPropertyAssignment) { - var shorthandDeclaration = createNode(248 /* ShorthandPropertyAssignment */, fullStart); + var shorthandDeclaration = createNode(249 /* ShorthandPropertyAssignment */, fullStart); shorthandDeclaration.name = propertyName; shorthandDeclaration.questionToken = questionToken; var equalsToken = parseOptionalToken(56 /* EqualsToken */); @@ -10385,7 +10517,7 @@ var ts; return finishNode(shorthandDeclaration); } else { - var propertyAssignment = createNode(247 /* PropertyAssignment */, fullStart); + var propertyAssignment = createNode(248 /* PropertyAssignment */, fullStart); propertyAssignment.modifiers = modifiers; propertyAssignment.name = propertyName; propertyAssignment.questionToken = questionToken; @@ -10395,7 +10527,7 @@ var ts; } } function parseObjectLiteralExpression() { - var node = createNode(167 /* ObjectLiteralExpression */); + var node = createNode(168 /* ObjectLiteralExpression */); parseExpected(15 /* OpenBraceToken */); if (scanner.hasPrecedingLineBreak()) { node.flags |= 1024 /* MultiLine */; @@ -10414,7 +10546,7 @@ var ts; if (saveDecoratorContext) { setDecoratorContext(/*val*/ false); } - var node = createNode(175 /* FunctionExpression */); + var node = createNode(176 /* FunctionExpression */); setModifiers(node, parseModifiers()); parseExpected(87 /* FunctionKeyword */); node.asteriskToken = parseOptionalToken(37 /* AsteriskToken */); @@ -10436,7 +10568,7 @@ var ts; return isIdentifier() ? parseIdentifier() : undefined; } function parseNewExpression() { - var node = createNode(171 /* NewExpression */); + var node = createNode(172 /* NewExpression */); parseExpected(92 /* NewKeyword */); node.expression = parseMemberExpressionOrHigher(); node.typeArguments = tryParse(parseTypeArgumentsInExpression); @@ -10447,7 +10579,7 @@ var ts; } // STATEMENTS function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) { - var node = createNode(194 /* Block */); + var node = createNode(195 /* Block */); if (parseExpected(15 /* OpenBraceToken */, diagnosticMessage) || ignoreMissingOpenBrace) { node.statements = parseList(1 /* BlockStatements */, parseStatement); parseExpected(16 /* CloseBraceToken */); @@ -10477,12 +10609,12 @@ var ts; return block; } function parseEmptyStatement() { - var node = createNode(196 /* EmptyStatement */); + var node = createNode(197 /* EmptyStatement */); parseExpected(23 /* SemicolonToken */); return finishNode(node); } function parseIfStatement() { - var node = createNode(198 /* IfStatement */); + var node = createNode(199 /* IfStatement */); parseExpected(88 /* IfKeyword */); parseExpected(17 /* OpenParenToken */); node.expression = allowInAnd(parseExpression); @@ -10492,7 +10624,7 @@ var ts; return finishNode(node); } function parseDoStatement() { - var node = createNode(199 /* DoStatement */); + var node = createNode(200 /* DoStatement */); parseExpected(79 /* DoKeyword */); node.statement = parseStatement(); parseExpected(104 /* WhileKeyword */); @@ -10507,7 +10639,7 @@ var ts; return finishNode(node); } function parseWhileStatement() { - var node = createNode(200 /* WhileStatement */); + var node = createNode(201 /* WhileStatement */); parseExpected(104 /* WhileKeyword */); parseExpected(17 /* OpenParenToken */); node.expression = allowInAnd(parseExpression); @@ -10530,21 +10662,21 @@ var ts; } var forOrForInOrForOfStatement; if (parseOptional(90 /* InKeyword */)) { - var forInStatement = createNode(202 /* ForInStatement */, pos); + var forInStatement = createNode(203 /* ForInStatement */, pos); forInStatement.initializer = initializer; forInStatement.expression = allowInAnd(parseExpression); parseExpected(18 /* CloseParenToken */); forOrForInOrForOfStatement = forInStatement; } - else if (parseOptional(134 /* OfKeyword */)) { - var forOfStatement = createNode(203 /* ForOfStatement */, pos); + else if (parseOptional(135 /* OfKeyword */)) { + var forOfStatement = createNode(204 /* ForOfStatement */, pos); forOfStatement.initializer = initializer; forOfStatement.expression = allowInAnd(parseAssignmentExpressionOrHigher); parseExpected(18 /* CloseParenToken */); forOrForInOrForOfStatement = forOfStatement; } else { - var forStatement = createNode(201 /* ForStatement */, pos); + var forStatement = createNode(202 /* ForStatement */, pos); forStatement.initializer = initializer; parseExpected(23 /* SemicolonToken */); if (token !== 23 /* SemicolonToken */ && token !== 18 /* CloseParenToken */) { @@ -10562,7 +10694,7 @@ var ts; } function parseBreakOrContinueStatement(kind) { var node = createNode(kind); - parseExpected(kind === 205 /* BreakStatement */ ? 70 /* BreakKeyword */ : 75 /* ContinueKeyword */); + parseExpected(kind === 206 /* BreakStatement */ ? 70 /* BreakKeyword */ : 75 /* ContinueKeyword */); if (!canParseSemicolon()) { node.label = parseIdentifier(); } @@ -10570,7 +10702,7 @@ var ts; return finishNode(node); } function parseReturnStatement() { - var node = createNode(206 /* ReturnStatement */); + var node = createNode(207 /* ReturnStatement */); parseExpected(94 /* ReturnKeyword */); if (!canParseSemicolon()) { node.expression = allowInAnd(parseExpression); @@ -10579,7 +10711,7 @@ var ts; return finishNode(node); } function parseWithStatement() { - var node = createNode(207 /* WithStatement */); + var node = createNode(208 /* WithStatement */); parseExpected(105 /* WithKeyword */); parseExpected(17 /* OpenParenToken */); node.expression = allowInAnd(parseExpression); @@ -10588,7 +10720,7 @@ var ts; return finishNode(node); } function parseCaseClause() { - var node = createNode(243 /* CaseClause */); + var node = createNode(244 /* CaseClause */); parseExpected(71 /* CaseKeyword */); node.expression = allowInAnd(parseExpression); parseExpected(54 /* ColonToken */); @@ -10596,7 +10728,7 @@ var ts; return finishNode(node); } function parseDefaultClause() { - var node = createNode(244 /* DefaultClause */); + var node = createNode(245 /* DefaultClause */); parseExpected(77 /* DefaultKeyword */); parseExpected(54 /* ColonToken */); node.statements = parseList(3 /* SwitchClauseStatements */, parseStatement); @@ -10606,12 +10738,12 @@ var ts; return token === 71 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause(); } function parseSwitchStatement() { - var node = createNode(208 /* SwitchStatement */); + var node = createNode(209 /* SwitchStatement */); parseExpected(96 /* SwitchKeyword */); parseExpected(17 /* OpenParenToken */); node.expression = allowInAnd(parseExpression); parseExpected(18 /* CloseParenToken */); - var caseBlock = createNode(222 /* CaseBlock */, scanner.getStartPos()); + var caseBlock = createNode(223 /* CaseBlock */, scanner.getStartPos()); parseExpected(15 /* OpenBraceToken */); caseBlock.clauses = parseList(2 /* SwitchClauses */, parseCaseOrDefaultClause); parseExpected(16 /* CloseBraceToken */); @@ -10626,7 +10758,7 @@ var ts; // directly as that might consume an expression on the following line. // We just return 'undefined' in that case. The actual error will be reported in the // grammar walker. - var node = createNode(210 /* ThrowStatement */); + var node = createNode(211 /* ThrowStatement */); parseExpected(98 /* ThrowKeyword */); node.expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression); parseSemicolon(); @@ -10634,7 +10766,7 @@ var ts; } // TODO: Review for error recovery function parseTryStatement() { - var node = createNode(211 /* TryStatement */); + var node = createNode(212 /* TryStatement */); parseExpected(100 /* TryKeyword */); node.tryBlock = parseBlock(/*ignoreMissingOpenBrace*/ false); node.catchClause = token === 72 /* CatchKeyword */ ? parseCatchClause() : undefined; @@ -10647,7 +10779,7 @@ var ts; return finishNode(node); } function parseCatchClause() { - var result = createNode(246 /* CatchClause */); + var result = createNode(247 /* CatchClause */); parseExpected(72 /* CatchKeyword */); if (parseExpected(17 /* OpenParenToken */)) { result.variableDeclaration = parseVariableDeclaration(); @@ -10657,7 +10789,7 @@ var ts; return finishNode(result); } function parseDebuggerStatement() { - var node = createNode(212 /* DebuggerStatement */); + var node = createNode(213 /* DebuggerStatement */); parseExpected(76 /* DebuggerKeyword */); parseSemicolon(); return finishNode(node); @@ -10669,13 +10801,13 @@ var ts; var fullStart = scanner.getStartPos(); var expression = allowInAnd(parseExpression); if (expression.kind === 69 /* Identifier */ && parseOptional(54 /* ColonToken */)) { - var labeledStatement = createNode(209 /* LabeledStatement */, fullStart); + var labeledStatement = createNode(210 /* LabeledStatement */, fullStart); labeledStatement.label = expression; labeledStatement.statement = parseStatement(); return finishNode(labeledStatement); } else { - var expressionStatement = createNode(197 /* ExpressionStatement */, fullStart); + var expressionStatement = createNode(198 /* ExpressionStatement */, fullStart); expressionStatement.expression = expression; parseSemicolon(); return finishNode(expressionStatement); @@ -10742,6 +10874,8 @@ var ts; return false; } continue; + case 134 /* GlobalKeyword */: + return nextToken() === 15 /* OpenBraceToken */; case 89 /* ImportKeyword */: nextToken(); return token === 9 /* StringLiteral */ || token === 37 /* AsteriskToken */ || @@ -10801,6 +10935,7 @@ var ts; case 125 /* ModuleKeyword */: case 126 /* NamespaceKeyword */: case 132 /* TypeKeyword */: + case 134 /* GlobalKeyword */: // When these don't start a declaration, they're an identifier in an expression statement return true; case 112 /* PublicKeyword */: @@ -10849,9 +10984,9 @@ var ts; case 86 /* ForKeyword */: return parseForOrForInOrForOfStatement(); case 75 /* ContinueKeyword */: - return parseBreakOrContinueStatement(204 /* ContinueStatement */); + return parseBreakOrContinueStatement(205 /* ContinueStatement */); case 70 /* BreakKeyword */: - return parseBreakOrContinueStatement(205 /* BreakStatement */); + return parseBreakOrContinueStatement(206 /* BreakStatement */); case 94 /* ReturnKeyword */: return parseReturnStatement(); case 105 /* WithKeyword */: @@ -10884,6 +11019,7 @@ var ts; case 112 /* PublicKeyword */: case 115 /* AbstractKeyword */: case 113 /* StaticKeyword */: + case 134 /* GlobalKeyword */: if (isStartOfDeclaration()) { return parseDeclaration(); } @@ -10910,6 +11046,7 @@ var ts; return parseTypeAliasDeclaration(fullStart, decorators, modifiers); case 81 /* EnumKeyword */: return parseEnumDeclaration(fullStart, decorators, modifiers); + case 134 /* GlobalKeyword */: case 125 /* ModuleKeyword */: case 126 /* NamespaceKeyword */: return parseModuleDeclaration(fullStart, decorators, modifiers); @@ -10924,7 +11061,7 @@ var ts; if (decorators || modifiers) { // We reached this point because we encountered decorators and/or modifiers and assumed a declaration // would follow. For recovery and error reporting purposes, return an incomplete declaration. - var node = createMissingNode(233 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected); + var node = createMissingNode(234 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected); node.pos = fullStart; node.decorators = decorators; setModifiers(node, modifiers); @@ -10946,16 +11083,16 @@ var ts; // DECLARATIONS function parseArrayBindingElement() { if (token === 24 /* CommaToken */) { - return createNode(189 /* OmittedExpression */); + return createNode(190 /* OmittedExpression */); } - var node = createNode(165 /* BindingElement */); + var node = createNode(166 /* BindingElement */); node.dotDotDotToken = parseOptionalToken(22 /* DotDotDotToken */); node.name = parseIdentifierOrPattern(); node.initializer = parseBindingElementInitializer(/*inParameter*/ false); return finishNode(node); } function parseObjectBindingElement() { - var node = createNode(165 /* BindingElement */); + var node = createNode(166 /* BindingElement */); var tokenIsIdentifier = isIdentifier(); var propertyName = parsePropertyName(); if (tokenIsIdentifier && token !== 54 /* ColonToken */) { @@ -10970,14 +11107,14 @@ var ts; return finishNode(node); } function parseObjectBindingPattern() { - var node = createNode(163 /* ObjectBindingPattern */); + var node = createNode(164 /* ObjectBindingPattern */); parseExpected(15 /* OpenBraceToken */); node.elements = parseDelimitedList(9 /* ObjectBindingElements */, parseObjectBindingElement); parseExpected(16 /* CloseBraceToken */); return finishNode(node); } function parseArrayBindingPattern() { - var node = createNode(164 /* ArrayBindingPattern */); + var node = createNode(165 /* ArrayBindingPattern */); parseExpected(19 /* OpenBracketToken */); node.elements = parseDelimitedList(10 /* ArrayBindingElements */, parseArrayBindingElement); parseExpected(20 /* CloseBracketToken */); @@ -10996,7 +11133,7 @@ var ts; return parseIdentifier(); } function parseVariableDeclaration() { - var node = createNode(213 /* VariableDeclaration */); + var node = createNode(214 /* VariableDeclaration */); node.name = parseIdentifierOrPattern(); node.type = parseTypeAnnotation(); if (!isInOrOfKeyword(token)) { @@ -11005,7 +11142,7 @@ var ts; return finishNode(node); } function parseVariableDeclarationList(inForStatementInitializer) { - var node = createNode(214 /* VariableDeclarationList */); + var node = createNode(215 /* VariableDeclarationList */); switch (token) { case 102 /* VarKeyword */: break; @@ -11028,7 +11165,7 @@ var ts; // So we need to look ahead to determine if 'of' should be treated as a keyword in // this context. // The checker will then give an error that there is an empty declaration list. - if (token === 134 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { + if (token === 135 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { node.declarations = createMissingList(); } else { @@ -11043,7 +11180,7 @@ var ts; return nextTokenIsIdentifier() && nextToken() === 18 /* CloseParenToken */; } function parseVariableStatement(fullStart, decorators, modifiers) { - var node = createNode(195 /* VariableStatement */, fullStart); + var node = createNode(196 /* VariableStatement */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); node.declarationList = parseVariableDeclarationList(/*inForStatementInitializer*/ false); @@ -11051,7 +11188,7 @@ var ts; return finishNode(node); } function parseFunctionDeclaration(fullStart, decorators, modifiers) { - var node = createNode(215 /* FunctionDeclaration */, fullStart); + var node = createNode(216 /* FunctionDeclaration */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); parseExpected(87 /* FunctionKeyword */); @@ -11064,7 +11201,7 @@ var ts; return finishNode(node); } function parseConstructorDeclaration(pos, decorators, modifiers) { - var node = createNode(144 /* Constructor */, pos); + var node = createNode(145 /* Constructor */, pos); node.decorators = decorators; setModifiers(node, modifiers); parseExpected(121 /* ConstructorKeyword */); @@ -11073,7 +11210,7 @@ var ts; return finishNode(node); } function parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, diagnosticMessage) { - var method = createNode(143 /* MethodDeclaration */, fullStart); + var method = createNode(144 /* MethodDeclaration */, fullStart); method.decorators = decorators; setModifiers(method, modifiers); method.asteriskToken = asteriskToken; @@ -11086,7 +11223,7 @@ var ts; return finishNode(method); } function parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken) { - var property = createNode(141 /* PropertyDeclaration */, fullStart); + var property = createNode(142 /* PropertyDeclaration */, fullStart); property.decorators = decorators; setModifiers(property, modifiers); property.name = name; @@ -11212,7 +11349,7 @@ var ts; decorators = []; decorators.pos = decoratorStart; } - var decorator = createNode(139 /* Decorator */, decoratorStart); + var decorator = createNode(140 /* Decorator */, decoratorStart); decorator.expression = doInDecoratorContext(parseLeftHandSideExpressionOrHigher); decorators.push(finishNode(decorator)); } @@ -11277,7 +11414,7 @@ var ts; } function parseClassElement() { if (token === 23 /* SemicolonToken */) { - var result = createNode(193 /* SemicolonClassElement */); + var result = createNode(194 /* SemicolonClassElement */); nextToken(); return finishNode(result); } @@ -11315,10 +11452,10 @@ var ts; return parseClassDeclarationOrExpression( /*fullStart*/ scanner.getStartPos(), /*decorators*/ undefined, - /*modifiers*/ undefined, 188 /* ClassExpression */); + /*modifiers*/ undefined, 189 /* ClassExpression */); } function parseClassDeclaration(fullStart, decorators, modifiers) { - return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 216 /* ClassDeclaration */); + return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 217 /* ClassDeclaration */); } function parseClassDeclarationOrExpression(fullStart, decorators, modifiers, kind) { var node = createNode(kind, fullStart); @@ -11362,7 +11499,7 @@ var ts; } function parseHeritageClause() { if (token === 83 /* ExtendsKeyword */ || token === 106 /* ImplementsKeyword */) { - var node = createNode(245 /* HeritageClause */); + var node = createNode(246 /* HeritageClause */); node.token = token; nextToken(); node.types = parseDelimitedList(7 /* HeritageClauseElement */, parseExpressionWithTypeArguments); @@ -11371,7 +11508,7 @@ var ts; return undefined; } function parseExpressionWithTypeArguments() { - var node = createNode(190 /* ExpressionWithTypeArguments */); + var node = createNode(191 /* ExpressionWithTypeArguments */); node.expression = parseLeftHandSideExpressionOrHigher(); if (token === 25 /* LessThanToken */) { node.typeArguments = parseBracketedList(18 /* TypeArguments */, parseType, 25 /* LessThanToken */, 27 /* GreaterThanToken */); @@ -11385,7 +11522,7 @@ var ts; return parseList(5 /* ClassMembers */, parseClassElement); } function parseInterfaceDeclaration(fullStart, decorators, modifiers) { - var node = createNode(217 /* InterfaceDeclaration */, fullStart); + var node = createNode(218 /* InterfaceDeclaration */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); parseExpected(107 /* InterfaceKeyword */); @@ -11396,7 +11533,7 @@ var ts; return finishNode(node); } function parseTypeAliasDeclaration(fullStart, decorators, modifiers) { - var node = createNode(218 /* TypeAliasDeclaration */, fullStart); + var node = createNode(219 /* TypeAliasDeclaration */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); parseExpected(132 /* TypeKeyword */); @@ -11412,13 +11549,13 @@ var ts; // ConstantEnumMemberSection, which starts at the beginning of an enum declaration // or any time an integer literal initializer is encountered. function parseEnumMember() { - var node = createNode(249 /* EnumMember */, scanner.getStartPos()); + var node = createNode(250 /* EnumMember */, scanner.getStartPos()); node.name = parsePropertyName(); node.initializer = allowInAnd(parseNonParameterInitializer); return finishNode(node); } function parseEnumDeclaration(fullStart, decorators, modifiers) { - var node = createNode(219 /* EnumDeclaration */, fullStart); + var node = createNode(220 /* EnumDeclaration */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); parseExpected(81 /* EnumKeyword */); @@ -11433,7 +11570,7 @@ var ts; return finishNode(node); } function parseModuleBlock() { - var node = createNode(221 /* ModuleBlock */, scanner.getStartPos()); + var node = createNode(222 /* ModuleBlock */, scanner.getStartPos()); if (parseExpected(15 /* OpenBraceToken */)) { node.statements = parseList(1 /* BlockStatements */, parseStatement); parseExpected(16 /* CloseBraceToken */); @@ -11444,7 +11581,7 @@ var ts; return finishNode(node); } function parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags) { - var node = createNode(220 /* ModuleDeclaration */, fullStart); + var node = createNode(221 /* ModuleDeclaration */, fullStart); // If we are parsing a dotted namespace name, we want to // propagate the 'Namespace' flag across the names if set. var namespaceFlag = flags & 65536 /* Namespace */; @@ -11458,16 +11595,27 @@ var ts; return finishNode(node); } function parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers) { - var node = createNode(220 /* ModuleDeclaration */, fullStart); + var node = createNode(221 /* ModuleDeclaration */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); - node.name = parseLiteralNode(/*internName*/ true); + if (token === 134 /* GlobalKeyword */) { + // parse 'global' as name of global scope augmentation + node.name = parseIdentifier(); + node.flags |= 2097152 /* GlobalAugmentation */; + } + else { + node.name = parseLiteralNode(/*internName*/ true); + } node.body = parseModuleBlock(); return finishNode(node); } function parseModuleDeclaration(fullStart, decorators, modifiers) { var flags = modifiers ? modifiers.flags : 0; - if (parseOptional(126 /* NamespaceKeyword */)) { + if (token === 134 /* GlobalKeyword */) { + // global augmentation + return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers); + } + else if (parseOptional(126 /* NamespaceKeyword */)) { flags |= 65536 /* Namespace */; } else { @@ -11498,7 +11646,7 @@ var ts; // ImportEquals declaration of type: // import x = require("mod"); or // import x = M.x; - var importEqualsDeclaration = createNode(223 /* ImportEqualsDeclaration */, fullStart); + var importEqualsDeclaration = createNode(224 /* ImportEqualsDeclaration */, fullStart); importEqualsDeclaration.decorators = decorators; setModifiers(importEqualsDeclaration, modifiers); importEqualsDeclaration.name = identifier; @@ -11509,7 +11657,7 @@ var ts; } } // Import statement - var importDeclaration = createNode(224 /* ImportDeclaration */, fullStart); + var importDeclaration = createNode(225 /* ImportDeclaration */, fullStart); importDeclaration.decorators = decorators; setModifiers(importDeclaration, modifiers); // ImportDeclaration: @@ -11532,7 +11680,7 @@ var ts; // NamedImports // ImportedDefaultBinding, NameSpaceImport // ImportedDefaultBinding, NamedImports - var importClause = createNode(225 /* ImportClause */, fullStart); + var importClause = createNode(226 /* ImportClause */, fullStart); if (identifier) { // ImportedDefaultBinding: // ImportedBinding @@ -11542,7 +11690,7 @@ var ts; // parse namespace or named imports if (!importClause.name || parseOptional(24 /* CommaToken */)) { - importClause.namedBindings = token === 37 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(227 /* NamedImports */); + importClause.namedBindings = token === 37 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(228 /* NamedImports */); } return finishNode(importClause); } @@ -11552,7 +11700,7 @@ var ts; : parseEntityName(/*allowReservedWords*/ false); } function parseExternalModuleReference() { - var node = createNode(234 /* ExternalModuleReference */); + var node = createNode(235 /* ExternalModuleReference */); parseExpected(127 /* RequireKeyword */); parseExpected(17 /* OpenParenToken */); node.expression = parseModuleSpecifier(); @@ -11575,7 +11723,7 @@ var ts; function parseNamespaceImport() { // NameSpaceImport: // * as ImportedBinding - var namespaceImport = createNode(226 /* NamespaceImport */); + var namespaceImport = createNode(227 /* NamespaceImport */); parseExpected(37 /* AsteriskToken */); parseExpected(116 /* AsKeyword */); namespaceImport.name = parseIdentifier(); @@ -11590,14 +11738,14 @@ var ts; // ImportsList: // ImportSpecifier // ImportsList, ImportSpecifier - node.elements = parseBracketedList(21 /* ImportOrExportSpecifiers */, kind === 227 /* NamedImports */ ? parseImportSpecifier : parseExportSpecifier, 15 /* OpenBraceToken */, 16 /* CloseBraceToken */); + node.elements = parseBracketedList(21 /* ImportOrExportSpecifiers */, kind === 228 /* NamedImports */ ? parseImportSpecifier : parseExportSpecifier, 15 /* OpenBraceToken */, 16 /* CloseBraceToken */); return finishNode(node); } function parseExportSpecifier() { - return parseImportOrExportSpecifier(232 /* ExportSpecifier */); + return parseImportOrExportSpecifier(233 /* ExportSpecifier */); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(228 /* ImportSpecifier */); + return parseImportOrExportSpecifier(229 /* ImportSpecifier */); } function parseImportOrExportSpecifier(kind) { var node = createNode(kind); @@ -11622,14 +11770,14 @@ var ts; else { node.name = identifierName; } - if (kind === 228 /* ImportSpecifier */ && checkIdentifierIsKeyword) { + if (kind === 229 /* ImportSpecifier */ && checkIdentifierIsKeyword) { // Report error identifier expected parseErrorAtPosition(checkIdentifierStart, checkIdentifierEnd - checkIdentifierStart, ts.Diagnostics.Identifier_expected); } return finishNode(node); } function parseExportDeclaration(fullStart, decorators, modifiers) { - var node = createNode(230 /* ExportDeclaration */, fullStart); + var node = createNode(231 /* ExportDeclaration */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); if (parseOptional(37 /* AsteriskToken */)) { @@ -11637,7 +11785,7 @@ var ts; node.moduleSpecifier = parseModuleSpecifier(); } else { - node.exportClause = parseNamedImportsOrExports(231 /* NamedExports */); + node.exportClause = parseNamedImportsOrExports(232 /* NamedExports */); // It is not uncommon to accidentally omit the 'from' keyword. Additionally, in editing scenarios, // the 'from' keyword can be parsed as a named export when the export clause is unterminated (i.e. `export { from "moduleName";`) // If we don't have a 'from' keyword, see if we have a string literal such that ASI won't take effect. @@ -11650,7 +11798,7 @@ var ts; return finishNode(node); } function parseExportAssignment(fullStart, decorators, modifiers) { - var node = createNode(229 /* ExportAssignment */, fullStart); + var node = createNode(230 /* ExportAssignment */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); if (parseOptional(56 /* EqualsToken */)) { @@ -11725,10 +11873,10 @@ var ts; function setExternalModuleIndicator(sourceFile) { sourceFile.externalModuleIndicator = ts.forEach(sourceFile.statements, function (node) { return node.flags & 2 /* Export */ - || node.kind === 223 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 234 /* ExternalModuleReference */ - || node.kind === 224 /* ImportDeclaration */ - || node.kind === 229 /* ExportAssignment */ - || node.kind === 230 /* ExportDeclaration */ + || node.kind === 224 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 235 /* ExternalModuleReference */ + || node.kind === 225 /* ImportDeclaration */ + || node.kind === 230 /* ExportAssignment */ + || node.kind === 231 /* ExportDeclaration */ ? node : undefined; }); @@ -11803,7 +11951,7 @@ var ts; scanner.setText(sourceText, start, length); // Prime the first token for us to start processing. token = nextToken(); - var result = createNode(251 /* JSDocTypeExpression */); + var result = createNode(252 /* JSDocTypeExpression */); parseExpected(15 /* OpenBraceToken */); result.type = parseJSDocTopLevelType(); parseExpected(16 /* CloseBraceToken */); @@ -11814,12 +11962,12 @@ var ts; function parseJSDocTopLevelType() { var type = parseJSDocType(); if (token === 47 /* BarToken */) { - var unionType = createNode(255 /* JSDocUnionType */, type.pos); + var unionType = createNode(256 /* JSDocUnionType */, type.pos); unionType.types = parseJSDocTypeList(type); type = finishNode(unionType); } if (token === 56 /* EqualsToken */) { - var optionalType = createNode(262 /* JSDocOptionalType */, type.pos); + var optionalType = createNode(263 /* JSDocOptionalType */, type.pos); nextToken(); optionalType.type = type; type = finishNode(optionalType); @@ -11830,20 +11978,20 @@ var ts; var type = parseBasicTypeExpression(); while (true) { if (token === 19 /* OpenBracketToken */) { - var arrayType = createNode(254 /* JSDocArrayType */, type.pos); + var arrayType = createNode(255 /* JSDocArrayType */, type.pos); arrayType.elementType = type; nextToken(); parseExpected(20 /* CloseBracketToken */); type = finishNode(arrayType); } else if (token === 53 /* QuestionToken */) { - var nullableType = createNode(257 /* JSDocNullableType */, type.pos); + var nullableType = createNode(258 /* JSDocNullableType */, type.pos); nullableType.type = type; nextToken(); type = finishNode(nullableType); } else if (token === 49 /* ExclamationToken */) { - var nonNullableType = createNode(258 /* JSDocNonNullableType */, type.pos); + var nonNullableType = createNode(259 /* JSDocNonNullableType */, type.pos); nonNullableType.type = type; nextToken(); type = finishNode(nonNullableType); @@ -11888,27 +12036,27 @@ var ts; return parseJSDocTypeReference(); } function parseJSDocThisType() { - var result = createNode(266 /* JSDocThisType */); + var result = createNode(267 /* JSDocThisType */); nextToken(); parseExpected(54 /* ColonToken */); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocConstructorType() { - var result = createNode(265 /* JSDocConstructorType */); + var result = createNode(266 /* JSDocConstructorType */); nextToken(); parseExpected(54 /* ColonToken */); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocVariadicType() { - var result = createNode(264 /* JSDocVariadicType */); + var result = createNode(265 /* JSDocVariadicType */); nextToken(); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocFunctionType() { - var result = createNode(263 /* JSDocFunctionType */); + var result = createNode(264 /* JSDocFunctionType */); nextToken(); parseExpected(17 /* OpenParenToken */); result.parameters = parseDelimitedList(22 /* JSDocFunctionParameters */, parseJSDocParameter); @@ -11921,12 +12069,12 @@ var ts; return finishNode(result); } function parseJSDocParameter() { - var parameter = createNode(138 /* Parameter */); + var parameter = createNode(139 /* Parameter */); parameter.type = parseJSDocType(); return finishNode(parameter); } function parseJSDocTypeReference() { - var result = createNode(261 /* JSDocTypeReference */); + var result = createNode(262 /* JSDocTypeReference */); result.name = parseSimplePropertyName(); while (parseOptional(21 /* DotToken */)) { if (token === 25 /* LessThanToken */) { @@ -11956,13 +12104,13 @@ var ts; } } function parseQualifiedName(left) { - var result = createNode(135 /* QualifiedName */, left.pos); + var result = createNode(136 /* QualifiedName */, left.pos); result.left = left; result.right = parseIdentifierName(); return finishNode(result); } function parseJSDocRecordType() { - var result = createNode(259 /* JSDocRecordType */); + var result = createNode(260 /* JSDocRecordType */); nextToken(); result.members = parseDelimitedList(24 /* JSDocRecordMembers */, parseJSDocRecordMember); checkForTrailingComma(result.members); @@ -11970,7 +12118,7 @@ var ts; return finishNode(result); } function parseJSDocRecordMember() { - var result = createNode(260 /* JSDocRecordMember */); + var result = createNode(261 /* JSDocRecordMember */); result.name = parseSimplePropertyName(); if (token === 54 /* ColonToken */) { nextToken(); @@ -11979,13 +12127,13 @@ var ts; return finishNode(result); } function parseJSDocNonNullableType() { - var result = createNode(258 /* JSDocNonNullableType */); + var result = createNode(259 /* JSDocNonNullableType */); nextToken(); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocTupleType() { - var result = createNode(256 /* JSDocTupleType */); + var result = createNode(257 /* JSDocTupleType */); nextToken(); result.types = parseDelimitedList(25 /* JSDocTupleTypes */, parseJSDocType); checkForTrailingComma(result.types); @@ -11999,7 +12147,7 @@ var ts; } } function parseJSDocUnionType() { - var result = createNode(255 /* JSDocUnionType */); + var result = createNode(256 /* JSDocUnionType */); nextToken(); result.types = parseJSDocTypeList(parseJSDocType()); parseExpected(18 /* CloseParenToken */); @@ -12017,7 +12165,7 @@ var ts; return types; } function parseJSDocAllType() { - var result = createNode(252 /* JSDocAllType */); + var result = createNode(253 /* JSDocAllType */); nextToken(); return finishNode(result); } @@ -12040,11 +12188,11 @@ var ts; token === 27 /* GreaterThanToken */ || token === 56 /* EqualsToken */ || token === 47 /* BarToken */) { - var result = createNode(253 /* JSDocUnknownType */, pos); + var result = createNode(254 /* JSDocUnknownType */, pos); return finishNode(result); } else { - var result = createNode(257 /* JSDocNullableType */, pos); + var result = createNode(258 /* JSDocNullableType */, pos); result.type = parseJSDocType(); return finishNode(result); } @@ -12132,7 +12280,7 @@ var ts; if (!tags) { return undefined; } - var result = createNode(267 /* JSDocComment */, start); + var result = createNode(268 /* JSDocComment */, start); result.tags = tags; return finishNode(result, end); } @@ -12169,7 +12317,7 @@ var ts; return undefined; } function handleUnknownTag(atToken, tagName) { - var result = createNode(268 /* JSDocTag */, atToken.pos); + var result = createNode(269 /* JSDocTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; return finishNode(result, pos); @@ -12220,7 +12368,7 @@ var ts; if (!typeExpression) { typeExpression = tryParseTypeExpression(); } - var result = createNode(269 /* JSDocParameterTag */, atToken.pos); + var result = createNode(270 /* JSDocParameterTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.preParameterName = preName; @@ -12230,27 +12378,27 @@ var ts; return finishNode(result, pos); } function handleReturnTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 270 /* JSDocReturnTag */; })) { + if (ts.forEach(tags, function (t) { return t.kind === 271 /* JSDocReturnTag */; })) { parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } - var result = createNode(270 /* JSDocReturnTag */, atToken.pos); + var result = createNode(271 /* JSDocReturnTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeExpression = tryParseTypeExpression(); return finishNode(result, pos); } function handleTypeTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 271 /* JSDocTypeTag */; })) { + if (ts.forEach(tags, function (t) { return t.kind === 272 /* JSDocTypeTag */; })) { parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } - var result = createNode(271 /* JSDocTypeTag */, atToken.pos); + var result = createNode(272 /* JSDocTypeTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeExpression = tryParseTypeExpression(); return finishNode(result, pos); } function handleTemplateTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 272 /* JSDocTemplateTag */; })) { + if (ts.forEach(tags, function (t) { return t.kind === 273 /* JSDocTemplateTag */; })) { parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } var typeParameters = []; @@ -12263,7 +12411,7 @@ var ts; parseErrorAtPosition(startPos, 0, ts.Diagnostics.Identifier_expected); return undefined; } - var typeParameter = createNode(137 /* TypeParameter */, name_8.pos); + var typeParameter = createNode(138 /* TypeParameter */, name_8.pos); typeParameter.name = name_8; finishNode(typeParameter, pos); typeParameters.push(typeParameter); @@ -12274,7 +12422,7 @@ var ts; pos++; } typeParameters.end = pos; - var result = createNode(272 /* JSDocTemplateTag */, atToken.pos); + var result = createNode(273 /* JSDocTemplateTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeParameters = typeParameters; @@ -12804,16 +12952,16 @@ var ts; function getModuleInstanceState(node) { // A module is uninstantiated if it contains only // 1. interface declarations, type alias declarations - if (node.kind === 217 /* InterfaceDeclaration */ || node.kind === 218 /* TypeAliasDeclaration */) { + if (node.kind === 218 /* InterfaceDeclaration */ || node.kind === 219 /* TypeAliasDeclaration */) { return 0 /* NonInstantiated */; } else if (ts.isConstEnumDeclaration(node)) { return 2 /* ConstEnumOnly */; } - else if ((node.kind === 224 /* ImportDeclaration */ || node.kind === 223 /* ImportEqualsDeclaration */) && !(node.flags & 2 /* Export */)) { + else if ((node.kind === 225 /* ImportDeclaration */ || node.kind === 224 /* ImportEqualsDeclaration */) && !(node.flags & 2 /* Export */)) { return 0 /* NonInstantiated */; } - else if (node.kind === 221 /* ModuleBlock */) { + else if (node.kind === 222 /* ModuleBlock */) { var state = 0 /* NonInstantiated */; ts.forEachChild(node, function (n) { switch (getModuleInstanceState(n)) { @@ -12832,7 +12980,7 @@ var ts; }); return state; } - else if (node.kind === 220 /* ModuleDeclaration */) { + else if (node.kind === 221 /* ModuleDeclaration */) { return getModuleInstanceState(node.body); } else { @@ -12882,6 +13030,11 @@ var ts; var labelStack; var labelIndexMap; var implicitLabels; + // state used for emit helpers + var hasClassExtends; + var hasAsyncFunctions; + var hasDecorators; + var hasParameterDecorators; // If this file is an external module, then it is automatically in strict-mode according to // ES6. If it is not an external module, then we'll determine if it is in strict mode or // not depending on if we see "use strict" in certain places (or if we hit a class/namespace). @@ -12911,6 +13064,10 @@ var ts; labelStack = undefined; labelIndexMap = undefined; implicitLabels = undefined; + hasClassExtends = false; + hasAsyncFunctions = false; + hasDecorators = false; + hasParameterDecorators = false; } return bindSourceFile; function createSymbol(flags, name) { @@ -12933,7 +13090,7 @@ var ts; if (symbolFlags & 107455 /* Value */) { var valueDeclaration = symbol.valueDeclaration; if (!valueDeclaration || - (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 220 /* ModuleDeclaration */)) { + (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 221 /* ModuleDeclaration */)) { // other kinds of value declarations take precedence over modules symbol.valueDeclaration = node; } @@ -12943,10 +13100,10 @@ var ts; // unless it is a well known Symbol. function getDeclarationName(node) { if (node.name) { - if (node.kind === 220 /* ModuleDeclaration */ && node.name.kind === 9 /* StringLiteral */) { - return "\"" + node.name.text + "\""; + if (ts.isAmbientModule(node)) { + return ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + node.name.text + "\""; } - if (node.name.kind === 136 /* ComputedPropertyName */) { + if (node.name.kind === 137 /* ComputedPropertyName */) { var nameExpression = node.name.expression; // treat computed property names where expression is string/numeric literal as just string/numeric literal if (ts.isStringOrNumericLiteral(nameExpression.kind)) { @@ -12958,21 +13115,21 @@ var ts; return node.name.text; } switch (node.kind) { - case 144 /* Constructor */: + case 145 /* Constructor */: return "__constructor"; - case 152 /* FunctionType */: - case 147 /* CallSignature */: + case 153 /* FunctionType */: + case 148 /* CallSignature */: return "__call"; - case 153 /* ConstructorType */: - case 148 /* ConstructSignature */: + case 154 /* ConstructorType */: + case 149 /* ConstructSignature */: return "__new"; - case 149 /* IndexSignature */: + case 150 /* IndexSignature */: return "__index"; - case 230 /* ExportDeclaration */: + case 231 /* ExportDeclaration */: return "__export"; - case 229 /* ExportAssignment */: + case 230 /* ExportAssignment */: return node.isExportEquals ? "export=" : "default"; - case 183 /* BinaryExpression */: + case 184 /* BinaryExpression */: switch (ts.getSpecialPropertyAssignmentKind(node)) { case 2 /* ModuleExports */: // module.exports = ... @@ -12987,8 +13144,8 @@ var ts; } ts.Debug.fail("Unknown binary declaration kind"); break; - case 215 /* FunctionDeclaration */: - case 216 /* ClassDeclaration */: + case 216 /* FunctionDeclaration */: + case 217 /* ClassDeclaration */: return node.flags & 512 /* Default */ ? "default" : undefined; } } @@ -13065,7 +13222,7 @@ var ts; function declareModuleMember(node, symbolFlags, symbolExcludes) { var hasExportModifier = ts.getCombinedNodeFlags(node) & 2 /* Export */; if (symbolFlags & 8388608 /* Alias */) { - if (node.kind === 232 /* ExportSpecifier */ || (node.kind === 223 /* ImportEqualsDeclaration */ && hasExportModifier)) { + if (node.kind === 233 /* ExportSpecifier */ || (node.kind === 224 /* ImportEqualsDeclaration */ && hasExportModifier)) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } else { @@ -13084,7 +13241,11 @@ var ts; // 2. When we checkIdentifier in the checker, we set its resolved symbol to the local symbol, // but return the export symbol (by calling getExportSymbolOfValueSymbolIfExported). That way // when the emitter comes back to it, it knows not to qualify the name if it was found in a containing scope. - if (hasExportModifier || container.flags & 131072 /* ExportContext */) { + // NOTE: Nested ambient modules always should go to to 'locals' table to prevent their automatic merge + // during global merging in the checker. Why? The only case when ambient module is permitted inside another module is module augmentation + // and this case is specially handled. Module augmentations should only be merged with original module definition + // and should never be merged directly with other augmentation, and the latter case would be possible if automatic merge is allowed. + if (!ts.isAmbientModule(node) && (hasExportModifier || container.flags & 131072 /* ExportContext */)) { var exportKind = (symbolFlags & 107455 /* Value */ ? 1048576 /* ExportValue */ : 0) | (symbolFlags & 793056 /* Type */ ? 2097152 /* ExportType */ : 0) | (symbolFlags & 1536 /* Namespace */ ? 4194304 /* ExportNamespace */ : 0); @@ -13148,10 +13309,12 @@ var ts; var flags = node.flags; // reset all reachability check related flags on node (for incremental scenarios) flags &= ~1572864 /* ReachabilityCheckFlags */; - if (kind === 217 /* InterfaceDeclaration */) { + // reset all emit helper flags on node (for incremental scenarios) + flags &= ~62914560 /* EmitHelperFlags */; + if (kind === 218 /* InterfaceDeclaration */) { seenThisKeyword = false; } - var saveState = kind === 250 /* SourceFile */ || kind === 221 /* ModuleBlock */ || ts.isFunctionLikeKind(kind); + var saveState = kind === 251 /* SourceFile */ || kind === 222 /* ModuleBlock */ || ts.isFunctionLikeKind(kind); if (saveState) { savedReachabilityState = currentReachabilityState; savedLabelStack = labelStack; @@ -13169,9 +13332,23 @@ var ts; flags |= 1048576 /* HasExplicitReturn */; } } - if (kind === 217 /* InterfaceDeclaration */) { + if (kind === 218 /* InterfaceDeclaration */) { flags = seenThisKeyword ? flags | 262144 /* ContainsThis */ : flags & ~262144 /* ContainsThis */; } + if (kind === 251 /* SourceFile */) { + if (hasClassExtends) { + flags |= 4194304 /* HasClassExtends */; + } + if (hasDecorators) { + flags |= 8388608 /* HasDecorators */; + } + if (hasParameterDecorators) { + flags |= 16777216 /* HasParamDecorators */; + } + if (hasAsyncFunctions) { + flags |= 33554432 /* HasAsyncFunctions */; + } + } node.flags = flags; if (saveState) { hasExplicitReturn = savedHasExplicitReturn; @@ -13194,40 +13371,40 @@ var ts; return; } switch (node.kind) { - case 200 /* WhileStatement */: + case 201 /* WhileStatement */: bindWhileStatement(node); break; - case 199 /* DoStatement */: + case 200 /* DoStatement */: bindDoStatement(node); break; - case 201 /* ForStatement */: + case 202 /* ForStatement */: bindForStatement(node); break; - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: bindForInOrForOfStatement(node); break; - case 198 /* IfStatement */: + case 199 /* IfStatement */: bindIfStatement(node); break; - case 206 /* ReturnStatement */: - case 210 /* ThrowStatement */: + case 207 /* ReturnStatement */: + case 211 /* ThrowStatement */: bindReturnOrThrow(node); break; - case 205 /* BreakStatement */: - case 204 /* ContinueStatement */: + case 206 /* BreakStatement */: + case 205 /* ContinueStatement */: bindBreakOrContinueStatement(node); break; - case 211 /* TryStatement */: + case 212 /* TryStatement */: bindTryStatement(node); break; - case 208 /* SwitchStatement */: + case 209 /* SwitchStatement */: bindSwitchStatement(node); break; - case 222 /* CaseBlock */: + case 223 /* CaseBlock */: bindCaseBlock(node); break; - case 209 /* LabeledStatement */: + case 210 /* LabeledStatement */: bindLabeledStatement(node); break; default: @@ -13302,7 +13479,7 @@ var ts; function bindReturnOrThrow(n) { // bind expression (don't affect reachability) bind(n.expression); - if (n.kind === 206 /* ReturnStatement */) { + if (n.kind === 207 /* ReturnStatement */) { hasExplicitReturn = true; } currentReachabilityState = 4 /* Unreachable */; @@ -13311,7 +13488,7 @@ var ts; // call bind on label (don't affect reachability) bind(n.label); // for continue case touch label so it will be marked a used - var isValidJump = jumpToLabel(n.label, n.kind === 205 /* BreakStatement */ ? currentReachabilityState : 4 /* Unreachable */); + var isValidJump = jumpToLabel(n.label, n.kind === 206 /* BreakStatement */ ? currentReachabilityState : 4 /* Unreachable */); if (isValidJump) { currentReachabilityState = 4 /* Unreachable */; } @@ -13337,7 +13514,7 @@ var ts; // bind expression (don't affect reachability) bind(n.expression); bind(n.caseBlock); - var hasDefault = ts.forEach(n.caseBlock.clauses, function (c) { return c.kind === 244 /* DefaultClause */; }); + var hasDefault = ts.forEach(n.caseBlock.clauses, function (c) { return c.kind === 245 /* DefaultClause */; }); // post switch state is unreachable if switch is exaustive (has a default case ) and does not have fallthrough from the last case var postSwitchState = hasDefault && currentReachabilityState !== 2 /* Reachable */ ? 4 /* Unreachable */ : preSwitchState; popImplicitLabel(postSwitchLabel, postSwitchState); @@ -13364,37 +13541,37 @@ var ts; } function getContainerFlags(node) { switch (node.kind) { - case 188 /* ClassExpression */: - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: - case 219 /* EnumDeclaration */: - case 155 /* TypeLiteral */: - case 167 /* ObjectLiteralExpression */: + case 189 /* ClassExpression */: + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: + case 220 /* EnumDeclaration */: + case 156 /* TypeLiteral */: + case 168 /* ObjectLiteralExpression */: return 1 /* IsContainer */; - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 149 /* IndexSignature */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 215 /* FunctionDeclaration */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 152 /* FunctionType */: - case 153 /* ConstructorType */: - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: - case 220 /* ModuleDeclaration */: - case 250 /* SourceFile */: - case 218 /* TypeAliasDeclaration */: + case 148 /* CallSignature */: + case 149 /* ConstructSignature */: + case 150 /* IndexSignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 216 /* FunctionDeclaration */: + case 145 /* Constructor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 153 /* FunctionType */: + case 154 /* ConstructorType */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: + case 221 /* ModuleDeclaration */: + case 251 /* SourceFile */: + case 219 /* TypeAliasDeclaration */: return 5 /* IsContainerWithLocals */; - case 246 /* CatchClause */: - case 201 /* ForStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - case 222 /* CaseBlock */: + case 247 /* CatchClause */: + case 202 /* ForStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: + case 223 /* CaseBlock */: return 2 /* IsBlockScopedContainer */; - case 194 /* Block */: + case 195 /* Block */: // do not treat blocks directly inside a function as a block-scoped-container. // Locals that reside in this block should go to the function locals. Othewise 'x' // would not appear to be a redeclaration of a block scoped local in the following @@ -13431,38 +13608,38 @@ var ts; // members are declared (for example, a member of a class will go into a specific // symbol table depending on if it is static or not). We defer to specialized // handlers to take care of declaring these child members. - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: return declareModuleMember(node, symbolFlags, symbolExcludes); - case 250 /* SourceFile */: + case 251 /* SourceFile */: return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 188 /* ClassExpression */: - case 216 /* ClassDeclaration */: + case 189 /* ClassExpression */: + case 217 /* ClassDeclaration */: return declareClassMember(node, symbolFlags, symbolExcludes); - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 155 /* TypeLiteral */: - case 167 /* ObjectLiteralExpression */: - case 217 /* InterfaceDeclaration */: + case 156 /* TypeLiteral */: + case 168 /* ObjectLiteralExpression */: + case 218 /* InterfaceDeclaration */: // Interface/Object-types always have their children added to the 'members' of // their container. They are only accessible through an instance of their // container, and are never in scope otherwise (even inside the body of the // object / type / interface declaring them). An exception is type parameters, // which are in scope without qualification (similar to 'locals'). return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 152 /* FunctionType */: - case 153 /* ConstructorType */: - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 149 /* IndexSignature */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: - case 218 /* TypeAliasDeclaration */: + case 153 /* FunctionType */: + case 154 /* ConstructorType */: + case 148 /* CallSignature */: + case 149 /* ConstructSignature */: + case 150 /* IndexSignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 145 /* Constructor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: + case 219 /* TypeAliasDeclaration */: // All the children of these container types are never visible through another // symbol (i.e. through another symbol's 'exports' or 'members'). Instead, // they're only accessed 'lexically' (i.e. from code that exists underneath @@ -13483,11 +13660,11 @@ var ts; : declareSymbol(file.locals, undefined, node, symbolFlags, symbolExcludes); } function hasExportDeclarations(node) { - var body = node.kind === 250 /* SourceFile */ ? node : node.body; - if (body.kind === 250 /* SourceFile */ || body.kind === 221 /* ModuleBlock */) { + var body = node.kind === 251 /* SourceFile */ ? node : node.body; + if (body.kind === 251 /* SourceFile */ || body.kind === 222 /* ModuleBlock */) { for (var _i = 0, _a = body.statements; _i < _a.length; _i++) { var stat = _a[_i]; - if (stat.kind === 230 /* ExportDeclaration */ || stat.kind === 229 /* ExportAssignment */) { + if (stat.kind === 231 /* ExportDeclaration */ || stat.kind === 230 /* ExportAssignment */) { return true; } } @@ -13506,7 +13683,10 @@ var ts; } function bindModuleDeclaration(node) { setExportContextFlag(node); - if (node.name.kind === 9 /* StringLiteral */) { + if (ts.isAmbientModule(node)) { + if (node.flags & 2 /* Export */) { + errorOnFirstToken(node, ts.Diagnostics.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible); + } declareSymbolAndAddToSymbolTable(node, 512 /* ValueModule */, 106639 /* ValueModuleExcludes */); } else { @@ -13571,7 +13751,7 @@ var ts; // c.IsAccessorDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true. // d.IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true // and either both previous and propId.descriptor have[[Get]] fields or both previous and propId.descriptor have[[Set]] fields - var currentKind = prop.kind === 247 /* PropertyAssignment */ || prop.kind === 248 /* ShorthandPropertyAssignment */ || prop.kind === 143 /* MethodDeclaration */ + var currentKind = prop.kind === 248 /* PropertyAssignment */ || prop.kind === 249 /* ShorthandPropertyAssignment */ || prop.kind === 144 /* MethodDeclaration */ ? 1 /* Property */ : 2 /* Accessor */; var existingKind = seen[identifier.text]; @@ -13593,10 +13773,10 @@ var ts; } function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { switch (blockScopeContainer.kind) { - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: declareModuleMember(node, symbolFlags, symbolExcludes); break; - case 250 /* SourceFile */: + case 251 /* SourceFile */: if (ts.isExternalModule(container)) { declareModuleMember(node, symbolFlags, symbolExcludes); break; @@ -13756,17 +13936,17 @@ var ts; } function updateStrictMode(node) { switch (node.kind) { - case 250 /* SourceFile */: - case 221 /* ModuleBlock */: + case 251 /* SourceFile */: + case 222 /* ModuleBlock */: updateStrictModeStatementList(node.statements); return; - case 194 /* Block */: + case 195 /* Block */: if (ts.isFunctionLike(node.parent)) { updateStrictModeStatementList(node.statements); } return; - case 216 /* ClassDeclaration */: - case 188 /* ClassExpression */: + case 217 /* ClassDeclaration */: + case 189 /* ClassExpression */: // All classes are automatically in strict mode in ES6. inStrictMode = true; return; @@ -13796,7 +13976,7 @@ var ts; /* Strict mode checks */ case 69 /* Identifier */: return checkStrictModeIdentifier(node); - case 183 /* BinaryExpression */: + case 184 /* BinaryExpression */: if (ts.isInJavaScriptFile(node)) { var specialKind = ts.getSpecialPropertyAssignmentKind(node); switch (specialKind) { @@ -13820,100 +14000,97 @@ var ts; } } return checkStrictModeBinaryExpression(node); - case 246 /* CatchClause */: + case 247 /* CatchClause */: return checkStrictModeCatchClause(node); - case 177 /* DeleteExpression */: + case 178 /* DeleteExpression */: return checkStrictModeDeleteExpression(node); case 8 /* NumericLiteral */: return checkStrictModeNumericLiteral(node); - case 182 /* PostfixUnaryExpression */: + case 183 /* PostfixUnaryExpression */: return checkStrictModePostfixUnaryExpression(node); - case 181 /* PrefixUnaryExpression */: + case 182 /* PrefixUnaryExpression */: return checkStrictModePrefixUnaryExpression(node); - case 207 /* WithStatement */: + case 208 /* WithStatement */: return checkStrictModeWithStatement(node); - case 161 /* ThisType */: + case 162 /* ThisType */: seenThisKeyword = true; return; - case 150 /* TypePredicate */: + case 151 /* TypePredicate */: return checkTypePredicate(node); - case 137 /* TypeParameter */: + case 138 /* TypeParameter */: return declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 530912 /* TypeParameterExcludes */); - case 138 /* Parameter */: + case 139 /* Parameter */: return bindParameter(node); - case 213 /* VariableDeclaration */: - case 165 /* BindingElement */: + case 214 /* VariableDeclaration */: + case 166 /* BindingElement */: return bindVariableDeclarationOrBindingElement(node); - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: return bindPropertyOrMethodOrAccessor(node, 4 /* Property */ | (node.questionToken ? 536870912 /* Optional */ : 0 /* None */), 107455 /* PropertyExcludes */); - case 247 /* PropertyAssignment */: - case 248 /* ShorthandPropertyAssignment */: + case 248 /* PropertyAssignment */: + case 249 /* ShorthandPropertyAssignment */: return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 107455 /* PropertyExcludes */); - case 249 /* EnumMember */: + case 250 /* EnumMember */: return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 107455 /* EnumMemberExcludes */); - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 149 /* IndexSignature */: + case 148 /* CallSignature */: + case 149 /* ConstructSignature */: + case 150 /* IndexSignature */: return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: // If this is an ObjectLiteralExpression method, then it sits in the same space // as other properties in the object literal. So we use SymbolFlags.PropertyExcludes // so that it will conflict with any other object literal members with the same // name. return bindPropertyOrMethodOrAccessor(node, 8192 /* Method */ | (node.questionToken ? 536870912 /* Optional */ : 0 /* None */), ts.isObjectLiteralMethod(node) ? 107455 /* PropertyExcludes */ : 99263 /* MethodExcludes */); - case 215 /* FunctionDeclaration */: - checkStrictModeFunctionName(node); - return declareSymbolAndAddToSymbolTable(node, 16 /* Function */, 106927 /* FunctionExcludes */); - case 144 /* Constructor */: + case 216 /* FunctionDeclaration */: + return bindFunctionDeclaration(node); + case 145 /* Constructor */: return declareSymbolAndAddToSymbolTable(node, 16384 /* Constructor */, /*symbolExcludes:*/ 0 /* None */); - case 145 /* GetAccessor */: + case 146 /* GetAccessor */: return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 41919 /* GetAccessorExcludes */); - case 146 /* SetAccessor */: + case 147 /* SetAccessor */: return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 74687 /* SetAccessorExcludes */); - case 152 /* FunctionType */: - case 153 /* ConstructorType */: + case 153 /* FunctionType */: + case 154 /* ConstructorType */: return bindFunctionOrConstructorType(node); - case 155 /* TypeLiteral */: + case 156 /* TypeLiteral */: return bindAnonymousDeclaration(node, 2048 /* TypeLiteral */, "__type"); - case 167 /* ObjectLiteralExpression */: + case 168 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: - checkStrictModeFunctionName(node); - var bindingName = node.name ? node.name.text : "__function"; - return bindAnonymousDeclaration(node, 16 /* Function */, bindingName); - case 170 /* CallExpression */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: + return bindFunctionExpression(node); + case 171 /* CallExpression */: if (ts.isInJavaScriptFile(node)) { bindCallExpression(node); } break; // Members of classes, interfaces, and modules - case 188 /* ClassExpression */: - case 216 /* ClassDeclaration */: + case 189 /* ClassExpression */: + case 217 /* ClassDeclaration */: return bindClassLikeDeclaration(node); - case 217 /* InterfaceDeclaration */: + case 218 /* InterfaceDeclaration */: return bindBlockScopedDeclaration(node, 64 /* Interface */, 792960 /* InterfaceExcludes */); - case 218 /* TypeAliasDeclaration */: + case 219 /* TypeAliasDeclaration */: return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 793056 /* TypeAliasExcludes */); - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: return bindEnumDeclaration(node); - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: return bindModuleDeclaration(node); // Imports and exports - case 223 /* ImportEqualsDeclaration */: - case 226 /* NamespaceImport */: - case 228 /* ImportSpecifier */: - case 232 /* ExportSpecifier */: + case 224 /* ImportEqualsDeclaration */: + case 227 /* NamespaceImport */: + case 229 /* ImportSpecifier */: + case 233 /* ExportSpecifier */: return declareSymbolAndAddToSymbolTable(node, 8388608 /* Alias */, 8388608 /* AliasExcludes */); - case 225 /* ImportClause */: + case 226 /* ImportClause */: return bindImportClause(node); - case 230 /* ExportDeclaration */: + case 231 /* ExportDeclaration */: return bindExportDeclaration(node); - case 229 /* ExportAssignment */: + case 230 /* ExportAssignment */: return bindExportAssignment(node); - case 250 /* SourceFile */: + case 251 /* SourceFile */: return bindSourceFileIfExternalModule(); } } @@ -13922,7 +14099,7 @@ var ts; if (parameterName && parameterName.kind === 69 /* Identifier */) { checkStrictModeIdentifier(parameterName); } - if (parameterName && parameterName.kind === 161 /* ThisType */) { + if (parameterName && parameterName.kind === 162 /* ThisType */) { seenThisKeyword = true; } bind(type); @@ -13937,7 +14114,7 @@ var ts; bindAnonymousDeclaration(file, 512 /* ValueModule */, "\"" + ts.removeFileExtension(file.fileName) + "\""); } function bindExportAssignment(node) { - var boundExpression = node.kind === 229 /* ExportAssignment */ ? node.expression : node.right; + var boundExpression = node.kind === 230 /* ExportAssignment */ ? node.expression : node.right; if (!container.symbol || !container.symbol.exports) { // Export assignment in some sort of block construct bindAnonymousDeclaration(node, 8388608 /* Alias */, getDeclarationName(node)); @@ -13985,7 +14162,7 @@ var ts; } function bindThisPropertyAssignment(node) { // Declare a 'member' in case it turns out the container was an ES5 class - if (container.kind === 175 /* FunctionExpression */ || container.kind === 215 /* FunctionDeclaration */) { + if (container.kind === 176 /* FunctionExpression */ || container.kind === 216 /* FunctionDeclaration */) { container.symbol.members = container.symbol.members || {}; declareSymbol(container.symbol.members, container.symbol, node, 4 /* Property */, 107455 /* PropertyExcludes */); } @@ -14014,7 +14191,15 @@ var ts; } } function bindClassLikeDeclaration(node) { - if (node.kind === 216 /* ClassDeclaration */) { + if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) { + if (ts.getClassExtendsHeritageClauseElement(node) !== undefined) { + hasClassExtends = true; + } + if (ts.nodeIsDecorated(node)) { + hasDecorators = true; + } + } + if (node.kind === 217 /* ClassDeclaration */) { bindBlockScopedDeclaration(node, 32 /* Class */, 899519 /* ClassExcludes */); } else { @@ -14076,6 +14261,12 @@ var ts; } } function bindParameter(node) { + if (!ts.isDeclarationFile(file) && + !ts.isInAmbientContext(node) && + ts.nodeIsDecorated(node)) { + hasDecorators = true; + hasParameterDecorators = true; + } if (inStrictMode) { // It is a SyntaxError if the identifier eval or arguments appears within a FormalParameterList of a // strict mode FunctionLikeDeclaration or FunctionExpression(13.1) @@ -14094,7 +14285,34 @@ var ts; declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 /* Property */, 107455 /* PropertyExcludes */); } } + function bindFunctionDeclaration(node) { + if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) { + if (ts.isAsyncFunctionLike(node)) { + hasAsyncFunctions = true; + } + } + checkStrictModeFunctionName(node); + return declareSymbolAndAddToSymbolTable(node, 16 /* Function */, 106927 /* FunctionExcludes */); + } + function bindFunctionExpression(node) { + if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) { + if (ts.isAsyncFunctionLike(node)) { + hasAsyncFunctions = true; + } + } + checkStrictModeFunctionName(node); + var bindingName = node.name ? node.name.text : "__function"; + return bindAnonymousDeclaration(node, 16 /* Function */, bindingName); + } function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) { + if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) { + if (ts.isAsyncFunctionLike(node)) { + hasAsyncFunctions = true; + } + if (ts.nodeIsDecorated(node)) { + hasDecorators = true; + } + } return ts.hasDynamicName(node) ? bindAnonymousDeclaration(node, symbolFlags, "__computed") : declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes); @@ -14159,13 +14377,13 @@ var ts; case 4 /* Unreachable */: var reportError = // report error on all statements except empty ones - (ts.isStatement(node) && node.kind !== 196 /* EmptyStatement */) || + (ts.isStatement(node) && node.kind !== 197 /* EmptyStatement */) || // report error on class declarations - node.kind === 216 /* ClassDeclaration */ || + node.kind === 217 /* ClassDeclaration */ || // report error on instantiated modules or const-enums only modules if preserveConstEnums is set - (node.kind === 220 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node)) || + (node.kind === 221 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node)) || // report error on regular enums and const enums if preserveConstEnums is set - (node.kind === 219 /* EnumDeclaration */ && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums)); + (node.kind === 220 /* EnumDeclaration */ && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums)); if (reportError) { currentReachabilityState = 8 /* ReportedUnreachable */; // unreachable code is reported if @@ -14179,7 +14397,7 @@ var ts; // On the other side we do want to report errors on non-initialized 'lets' because of TDZ var reportUnreachableCode = !options.allowUnreachableCode && !ts.isInAmbientContext(node) && - (node.kind !== 195 /* VariableStatement */ || + (node.kind !== 196 /* VariableStatement */ || ts.getCombinedNodeFlags(node.declarationList) & 24576 /* BlockScoped */ || ts.forEach(node.declarationList.declarations, function (d) { return d.initializer; })); if (reportUnreachableCode) { @@ -14264,6 +14482,7 @@ var ts; getTypeCount: function () { return typeCount; }, isUndefinedSymbol: function (symbol) { return symbol === undefinedSymbol; }, isArgumentsSymbol: function (symbol) { return symbol === argumentsSymbol; }, + isUnknownSymbol: function (symbol) { return symbol === unknownSymbol; }, getDiagnostics: getDiagnostics, getGlobalDiagnostics: getGlobalDiagnostics, // The language service will always care about the narrowed type of a symbol, because that is @@ -14280,6 +14499,7 @@ var ts; getSymbolsInScope: getSymbolsInScope, getSymbolAtLocation: getSymbolAtLocation, getShorthandAssignmentValueSymbol: getShorthandAssignmentValueSymbol, + getExportSpecifierLocalTargetSymbol: getExportSpecifierLocalTargetSymbol, getTypeAtLocation: getTypeOfNode, typeToString: typeToString, getSymbolDisplayBuilder: getSymbolDisplayBuilder, @@ -14355,11 +14575,6 @@ var ts; var unionTypes = {}; var intersectionTypes = {}; var stringLiteralTypes = {}; - var emitExtends = false; - var emitDecorate = false; - var emitParam = false; - var emitAwaiter = false; - var emitGenerator = false; var resolutionTargets = []; var resolutionResults = []; var resolutionPropertyNames = []; @@ -14504,7 +14719,7 @@ var ts; target.flags |= source.flags; if (source.valueDeclaration && (!target.valueDeclaration || - (target.valueDeclaration.kind === 220 /* ModuleDeclaration */ && source.valueDeclaration.kind !== 220 /* ModuleDeclaration */))) { + (target.valueDeclaration.kind === 221 /* ModuleDeclaration */ && source.valueDeclaration.kind !== 221 /* ModuleDeclaration */))) { // other kinds of value declarations take precedence over modules target.valueDeclaration = source.valueDeclaration; } @@ -14559,6 +14774,30 @@ var ts; } } } + function mergeModuleAugmentation(moduleName) { + var moduleAugmentation = moduleName.parent; + if (moduleAugmentation.symbol.valueDeclaration !== moduleAugmentation) { + // this is a combined symbol for multiple augmentations within the same file. + // its symbol already has accumulated information for all declarations + // so we need to add it just once - do the work only for first declaration + ts.Debug.assert(moduleAugmentation.symbol.declarations.length > 1); + return; + } + if (ts.isGlobalScopeAugmentation(moduleAugmentation)) { + mergeSymbolTable(globals, moduleAugmentation.symbol.exports); + } + else { + // find a module that about to be augmented + var mainModule = resolveExternalModuleNameWorker(moduleName, moduleName, ts.Diagnostics.Invalid_module_name_in_augmentation_module_0_cannot_be_found); + if (!mainModule) { + return; + } + // if module symbol has already been merged - it is safe to use it. + // otherwise clone it + mainModule = mainModule.flags & 33554432 /* Merged */ ? mainModule : cloneSymbol(mainModule); + mergeSymbol(mainModule, moduleAugmentation.symbol); + } + } function addToSymbolTable(target, source, message) { for (var id in source) { if (ts.hasProperty(source, id)) { @@ -14585,18 +14824,8 @@ var ts; var nodeId = getNodeId(node); return nodeLinks[nodeId] || (nodeLinks[nodeId] = {}); } - function getSourceFile(node) { - return ts.getAncestor(node, 250 /* SourceFile */); - } function isGlobalSourceFile(node) { - return node.kind === 250 /* SourceFile */ && !ts.isExternalOrCommonJsModule(node); - } - /** Is this type one of the apparent types created from the primitive types. */ - function isPrimitiveApparentType(type) { - return type === globalStringType || - type === globalNumberType || - type === globalBooleanType || - type === globalESSymbolType; + return node.kind === 251 /* SourceFile */ && !ts.isExternalOrCommonJsModule(node); } function getSymbol(symbols, name, meaning) { if (meaning && ts.hasProperty(symbols, name)) { @@ -14645,7 +14874,7 @@ var ts; if (declaration.pos <= usage.pos) { // declaration is before usage // still might be illegal if usage is in the initializer of the variable declaration - return declaration.kind !== 213 /* VariableDeclaration */ || + return declaration.kind !== 214 /* VariableDeclaration */ || !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage); } // declaration is after usage @@ -14653,14 +14882,14 @@ var ts; return isUsedInFunctionOrNonStaticProperty(declaration, usage); function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage) { var container = ts.getEnclosingBlockScopeContainer(declaration); - if (declaration.parent.parent.kind === 195 /* VariableStatement */ || - declaration.parent.parent.kind === 201 /* ForStatement */) { + if (declaration.parent.parent.kind === 196 /* VariableStatement */ || + declaration.parent.parent.kind === 202 /* ForStatement */) { // variable statement/for statement case, // use site should not be inside variable declaration (initializer of declaration or binding element) return isSameScopeDescendentOf(usage, declaration, container); } - else if (declaration.parent.parent.kind === 203 /* ForOfStatement */ || - declaration.parent.parent.kind === 202 /* ForInStatement */) { + else if (declaration.parent.parent.kind === 204 /* ForOfStatement */ || + declaration.parent.parent.kind === 203 /* ForInStatement */) { // ForIn/ForOf case - use site should not be used in expression part var expression = declaration.parent.parent.expression; return isSameScopeDescendentOf(usage, expression, container); @@ -14677,7 +14906,7 @@ var ts; return true; } var initializerOfNonStaticProperty = current.parent && - current.parent.kind === 141 /* PropertyDeclaration */ && + current.parent.kind === 142 /* PropertyDeclaration */ && (current.parent.flags & 64 /* Static */) === 0 && current.parent.initializer === current; if (initializerOfNonStaticProperty) { @@ -14710,8 +14939,8 @@ var ts; if (meaning & result.flags & 793056 /* Type */) { useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || - lastLocation.kind === 138 /* Parameter */ || - lastLocation.kind === 137 /* TypeParameter */ + lastLocation.kind === 139 /* Parameter */ || + lastLocation.kind === 138 /* TypeParameter */ : false; } if (meaning & 107455 /* Value */ && result.flags & 1 /* FunctionScopedVariable */) { @@ -14720,9 +14949,9 @@ var ts; // however it is detected separately when checking initializers of parameters // to make sure that they reference no variables declared after them. useResult = - lastLocation.kind === 138 /* Parameter */ || + lastLocation.kind === 139 /* Parameter */ || (lastLocation === location.type && - result.valueDeclaration.kind === 138 /* Parameter */); + result.valueDeclaration.kind === 139 /* Parameter */); } } if (useResult) { @@ -14734,13 +14963,12 @@ var ts; } } switch (location.kind) { - case 250 /* SourceFile */: + case 251 /* SourceFile */: if (!ts.isExternalOrCommonJsModule(location)) break; - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: var moduleExports = getSymbolOfNode(location).exports; - if (location.kind === 250 /* SourceFile */ || - (location.kind === 220 /* ModuleDeclaration */ && location.name.kind === 9 /* StringLiteral */)) { + if (location.kind === 251 /* SourceFile */ || ts.isAmbientModule(location)) { // It's an external module. First see if the module has an export default and if the local // name of that export default matches. if (result = moduleExports["default"]) { @@ -14763,7 +14991,7 @@ var ts; // which is not the desired behavior. if (ts.hasProperty(moduleExports, name) && moduleExports[name].flags === 8388608 /* Alias */ && - ts.getDeclarationOfKind(moduleExports[name], 232 /* ExportSpecifier */)) { + ts.getDeclarationOfKind(moduleExports[name], 233 /* ExportSpecifier */)) { break; } } @@ -14771,13 +14999,13 @@ var ts; break loop; } break; - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8 /* EnumMember */)) { break loop; } break; - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: // TypeScript 1.0 spec (April 2014): 8.4.1 // Initializer expressions for instance member variables are evaluated in the scope // of the class constructor body but are not permitted to reference parameters or @@ -14794,9 +15022,9 @@ var ts; } } break; - case 216 /* ClassDeclaration */: - case 188 /* ClassExpression */: - case 217 /* InterfaceDeclaration */: + case 217 /* ClassDeclaration */: + case 189 /* ClassExpression */: + case 218 /* InterfaceDeclaration */: if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & 793056 /* Type */)) { if (lastLocation && lastLocation.flags & 64 /* Static */) { // TypeScript 1.0 spec (April 2014): 3.4.1 @@ -14807,7 +15035,7 @@ var ts; } break loop; } - if (location.kind === 188 /* ClassExpression */ && meaning & 32 /* Class */) { + if (location.kind === 189 /* ClassExpression */ && meaning & 32 /* Class */) { var className = location.name; if (className && name === className.text) { result = location.symbol; @@ -14823,9 +15051,9 @@ var ts; // [foo()]() { } // <-- Reference to T from class's own computed property // } // - case 136 /* ComputedPropertyName */: + case 137 /* ComputedPropertyName */: grandparent = location.parent.parent; - if (ts.isClassLike(grandparent) || grandparent.kind === 217 /* InterfaceDeclaration */) { + if (ts.isClassLike(grandparent) || grandparent.kind === 218 /* InterfaceDeclaration */) { // A reference to this grandparent's type parameters would be an error if (result = getSymbol(getSymbolOfNode(grandparent).members, name, meaning & 793056 /* Type */)) { error(errorLocation, ts.Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); @@ -14833,19 +15061,19 @@ var ts; } } break; - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 215 /* FunctionDeclaration */: - case 176 /* ArrowFunction */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 145 /* Constructor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 216 /* FunctionDeclaration */: + case 177 /* ArrowFunction */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; } break; - case 175 /* FunctionExpression */: + case 176 /* FunctionExpression */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; @@ -14858,7 +15086,7 @@ var ts; } } break; - case 139 /* Decorator */: + case 140 /* Decorator */: // Decorators are resolved at the class declaration. Resolving at the parameter // or member would result in looking up locals in the method. // @@ -14867,7 +15095,7 @@ var ts; // method(@y x, y) {} // <-- decorator y should be resolved at the class declaration, not the parameter. // } // - if (location.parent && location.parent.kind === 138 /* Parameter */) { + if (location.parent && location.parent.kind === 139 /* Parameter */) { location = location.parent; } // @@ -14889,7 +15117,9 @@ var ts; } if (!result) { if (nameNotFoundMessage) { - error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg)); + if (!checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg)) { + error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg)); + } } return undefined; } @@ -14922,12 +15152,44 @@ var ts; } return result; } + function checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) { + if (!errorLocation || (errorLocation.kind === 69 /* Identifier */ && (isTypeReferenceIdentifier(errorLocation)) || isInTypeQuery(errorLocation))) { + return false; + } + var container = ts.getThisContainer(errorLocation, /* includeArrowFunctions */ true); + var location = container; + while (location) { + if (ts.isClassLike(location.parent)) { + var classSymbol = getSymbolOfNode(location.parent); + if (!classSymbol) { + break; + } + // Check to see if a static member exists. + var constructorType = getTypeOfSymbol(classSymbol); + if (getPropertyOfType(constructorType, name)) { + error(errorLocation, ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg), symbolToString(classSymbol)); + return true; + } + // No static member is present. + // Check if we're in an instance method and look for a relevant instance member. + if (location === container && !(location.flags & 64 /* Static */)) { + var instanceType = getDeclaredTypeOfSymbol(classSymbol).thisType; + if (getPropertyOfType(instanceType, name)) { + error(errorLocation, ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg)); + return true; + } + } + } + location = location.parent; + } + return false; + } function checkResolvedBlockScopedVariable(result, errorLocation) { ts.Debug.assert((result.flags & 2 /* BlockScopedVariable */) !== 0); // Block-scoped variables cannot be used before their definition var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) ? d : undefined; }); ts.Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined"); - if (!isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 213 /* VariableDeclaration */), errorLocation)) { + if (!isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 214 /* VariableDeclaration */), errorLocation)) { error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name)); } } @@ -14948,10 +15210,10 @@ var ts; } function getAnyImportSyntax(node) { if (ts.isAliasSymbolDeclaration(node)) { - if (node.kind === 223 /* ImportEqualsDeclaration */) { + if (node.kind === 224 /* ImportEqualsDeclaration */) { return node; } - while (node && node.kind !== 224 /* ImportDeclaration */) { + while (node && node.kind !== 225 /* ImportDeclaration */) { node = node.parent; } return node; @@ -14961,7 +15223,7 @@ var ts; return ts.forEach(symbol.declarations, function (d) { return ts.isAliasSymbolDeclaration(d) ? d : undefined; }); } function getTargetOfImportEqualsDeclaration(node) { - if (node.moduleReference.kind === 234 /* ExternalModuleReference */) { + if (node.moduleReference.kind === 235 /* ExternalModuleReference */) { return resolveExternalModuleSymbol(resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node))); } return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, node); @@ -15063,17 +15325,17 @@ var ts; } function getTargetOfAliasDeclaration(node) { switch (node.kind) { - case 223 /* ImportEqualsDeclaration */: + case 224 /* ImportEqualsDeclaration */: return getTargetOfImportEqualsDeclaration(node); - case 225 /* ImportClause */: + case 226 /* ImportClause */: return getTargetOfImportClause(node); - case 226 /* NamespaceImport */: + case 227 /* NamespaceImport */: return getTargetOfNamespaceImport(node); - case 228 /* ImportSpecifier */: + case 229 /* ImportSpecifier */: return getTargetOfImportSpecifier(node); - case 232 /* ExportSpecifier */: + case 233 /* ExportSpecifier */: return getTargetOfExportSpecifier(node); - case 229 /* ExportAssignment */: + case 230 /* ExportAssignment */: return getTargetOfExportAssignment(node); } } @@ -15118,11 +15380,11 @@ var ts; if (!links.referenced) { links.referenced = true; var node = getDeclarationOfAliasSymbol(symbol); - if (node.kind === 229 /* ExportAssignment */) { + if (node.kind === 230 /* ExportAssignment */) { // export default checkExpressionCached(node.expression); } - else if (node.kind === 232 /* ExportSpecifier */) { + else if (node.kind === 233 /* ExportSpecifier */) { // export { } or export { as foo } checkExpressionCached(node.propertyName || node.name); } @@ -15135,7 +15397,7 @@ var ts; // This function is only for imports with entity names function getSymbolOfPartOfRightHandSideOfImportEquals(entityName, importDeclaration) { if (!importDeclaration) { - importDeclaration = ts.getAncestor(entityName, 223 /* ImportEqualsDeclaration */); + importDeclaration = ts.getAncestor(entityName, 224 /* ImportEqualsDeclaration */); ts.Debug.assert(importDeclaration !== undefined); } // There are three things we might try to look for. In the following examples, @@ -15148,13 +15410,13 @@ var ts; entityName = entityName.parent; } // Check for case 1 and 3 in the above example - if (entityName.kind === 69 /* Identifier */ || entityName.parent.kind === 135 /* QualifiedName */) { + if (entityName.kind === 69 /* Identifier */ || entityName.parent.kind === 136 /* QualifiedName */) { return resolveEntityName(entityName, 1536 /* Namespace */); } else { // Case 2 in above example // entityName.kind could be a QualifiedName or a Missing identifier - ts.Debug.assert(entityName.parent.kind === 223 /* ImportEqualsDeclaration */); + ts.Debug.assert(entityName.parent.kind === 224 /* ImportEqualsDeclaration */); return resolveEntityName(entityName, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */); } } @@ -15174,9 +15436,9 @@ var ts; return undefined; } } - else if (name.kind === 135 /* QualifiedName */ || name.kind === 168 /* PropertyAccessExpression */) { - var left = name.kind === 135 /* QualifiedName */ ? name.left : name.expression; - var right = name.kind === 135 /* QualifiedName */ ? name.right : name.name; + else if (name.kind === 136 /* QualifiedName */ || name.kind === 169 /* PropertyAccessExpression */) { + var left = name.kind === 136 /* QualifiedName */ ? name.left : name.expression; + var right = name.kind === 136 /* QualifiedName */ ? name.right : name.name; var namespace = resolveEntityName(left, 1536 /* Namespace */, ignoreErrors); if (!namespace || namespace === unknownSymbol || ts.nodeIsMissing(right)) { return undefined; @@ -15196,6 +15458,9 @@ var ts; return symbol.flags & meaning ? symbol : resolveAlias(symbol); } function resolveExternalModuleName(location, moduleReferenceExpression) { + return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ts.Diagnostics.Cannot_find_module_0); + } + function resolveExternalModuleNameWorker(location, moduleReferenceExpression, moduleNotFoundError) { if (moduleReferenceExpression.kind !== 9 /* StringLiteral */) { return; } @@ -15210,19 +15475,28 @@ var ts; if (!isRelative) { var symbol = getSymbol(globals, "\"" + moduleName + "\"", 512 /* ValueModule */); if (symbol) { - return symbol; + // merged symbol is module declaration symbol combined with all augmentations + return getMergedSymbol(symbol); } } - var resolvedModule = ts.getResolvedModule(getSourceFile(location), moduleReferenceLiteral.text); + var resolvedModule = ts.getResolvedModule(ts.getSourceFileOfNode(location), moduleReferenceLiteral.text); var sourceFile = resolvedModule && host.getSourceFile(resolvedModule.resolvedFileName); if (sourceFile) { if (sourceFile.symbol) { - return sourceFile.symbol; + // merged symbol is module declaration symbol combined with all augmentations + return getMergedSymbol(sourceFile.symbol); } - error(moduleReferenceLiteral, ts.Diagnostics.File_0_is_not_a_module, sourceFile.fileName); - return; + if (moduleNotFoundError) { + // report errors only if it was requested + error(moduleReferenceLiteral, ts.Diagnostics.File_0_is_not_a_module, sourceFile.fileName); + } + return undefined; } - error(moduleReferenceLiteral, ts.Diagnostics.Cannot_find_module_0, moduleName); + if (moduleNotFoundError) { + // report errors only if it was requested + error(moduleReferenceLiteral, moduleNotFoundError, moduleName); + } + return undefined; } // An external module with an 'export =' declaration resolves to the target of the 'export =' declaration, // and an external module with no 'export =' declaration resolves to the module itself. @@ -15350,7 +15624,7 @@ var ts; var members = node.members; for (var _i = 0, members_1 = members; _i < members_1.length; _i++) { var member = members_1[_i]; - if (member.kind === 144 /* Constructor */ && ts.nodeIsPresent(member.body)) { + if (member.kind === 145 /* Constructor */ && ts.nodeIsPresent(member.body)) { return member; } } @@ -15421,17 +15695,17 @@ var ts; } } switch (location_1.kind) { - case 250 /* SourceFile */: + case 251 /* SourceFile */: if (!ts.isExternalOrCommonJsModule(location_1)) { break; } - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: if (result = callback(getSymbolOfNode(location_1).exports)) { return result; } break; - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: if (result = callback(getSymbolOfNode(location_1).members)) { return result; } @@ -15472,7 +15746,7 @@ var ts; return ts.forEachValue(symbols, function (symbolFromSymbolTable) { if (symbolFromSymbolTable.flags & 8388608 /* Alias */ && symbolFromSymbolTable.name !== "export=" - && !ts.getDeclarationOfKind(symbolFromSymbolTable, 232 /* ExportSpecifier */)) { + && !ts.getDeclarationOfKind(symbolFromSymbolTable, 233 /* ExportSpecifier */)) { if (!useOnlyExternalAliasing || // Is this external alias, then use it to name ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) { @@ -15509,7 +15783,7 @@ var ts; return true; } // Qualify if the symbol from symbol table has same meaning as expected - symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 /* Alias */ && !ts.getDeclarationOfKind(symbolFromSymbolTable, 232 /* ExportSpecifier */)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; + symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 /* Alias */ && !ts.getDeclarationOfKind(symbolFromSymbolTable, 233 /* ExportSpecifier */)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; if (symbolFromSymbolTable.flags & meaning) { qualify = true; return true; @@ -15582,8 +15856,7 @@ var ts; } } function hasExternalModuleSymbol(declaration) { - return (declaration.kind === 220 /* ModuleDeclaration */ && declaration.name.kind === 9 /* StringLiteral */) || - (declaration.kind === 250 /* SourceFile */ && ts.isExternalOrCommonJsModule(declaration)); + return ts.isAmbientModule(declaration) || (declaration.kind === 251 /* SourceFile */ && ts.isExternalOrCommonJsModule(declaration)); } function hasVisibleDeclarations(symbol) { var aliasesToMakeVisible; @@ -15619,12 +15892,12 @@ var ts; function isEntityNameVisible(entityName, enclosingDeclaration) { // get symbol of the first identifier of the entityName var meaning; - if (entityName.parent.kind === 154 /* TypeQuery */) { + if (entityName.parent.kind === 155 /* TypeQuery */) { // Typeof value meaning = 107455 /* Value */ | 1048576 /* ExportValue */; } - else if (entityName.kind === 135 /* QualifiedName */ || entityName.kind === 168 /* PropertyAccessExpression */ || - entityName.parent.kind === 223 /* ImportEqualsDeclaration */) { + else if (entityName.kind === 136 /* QualifiedName */ || entityName.kind === 169 /* PropertyAccessExpression */ || + entityName.parent.kind === 224 /* ImportEqualsDeclaration */) { // Left identifier from type reference or TypeAlias // Entity name of the import declaration meaning = 1536 /* Namespace */; @@ -15679,15 +15952,20 @@ var ts; function getTypeAliasForTypeLiteral(type) { if (type.symbol && type.symbol.flags & 2048 /* TypeLiteral */) { var node = type.symbol.declarations[0].parent; - while (node.kind === 160 /* ParenthesizedType */) { + while (node.kind === 161 /* ParenthesizedType */) { node = node.parent; } - if (node.kind === 218 /* TypeAliasDeclaration */) { + if (node.kind === 219 /* TypeAliasDeclaration */) { return getSymbolOfNode(node); } } return undefined; } + function isTopLevelInExternalModuleAugmentation(node) { + return node && node.parent && + node.parent.kind === 222 /* ModuleBlock */ && + ts.isExternalModuleAugmentation(node.parent.parent); + } function getSymbolDisplayBuilder() { function getNameOfSymbol(symbol) { if (symbol.declarations && symbol.declarations.length) { @@ -15696,10 +15974,10 @@ var ts; return ts.declarationNameToString(declaration.name); } switch (declaration.kind) { - case 188 /* ClassExpression */: + case 189 /* ClassExpression */: return "(Anonymous class)"; - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: return "(Anonymous function)"; } } @@ -15954,7 +16232,7 @@ var ts; var isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || ts.forEach(symbol.declarations, function (declaration) { - return declaration.parent.kind === 250 /* SourceFile */ || declaration.parent.kind === 221 /* ModuleBlock */; + return declaration.parent.kind === 251 /* SourceFile */ || declaration.parent.kind === 222 /* ModuleBlock */; })); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { // typeof is allowed only for static/non local functions @@ -16215,70 +16493,74 @@ var ts; return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 165 /* BindingElement */: + case 166 /* BindingElement */: return isDeclarationVisible(node.parent.parent); - case 213 /* VariableDeclaration */: + case 214 /* VariableDeclaration */: if (ts.isBindingPattern(node.name) && !node.name.elements.length) { // If the binding pattern is empty, this variable declaration is not visible return false; } // Otherwise fall through - case 220 /* ModuleDeclaration */: - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: - case 218 /* TypeAliasDeclaration */: - case 215 /* FunctionDeclaration */: - case 219 /* EnumDeclaration */: - case 223 /* ImportEqualsDeclaration */: + case 221 /* ModuleDeclaration */: + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: + case 219 /* TypeAliasDeclaration */: + case 216 /* FunctionDeclaration */: + case 220 /* EnumDeclaration */: + case 224 /* ImportEqualsDeclaration */: + // external module augmentation is always visible + if (ts.isExternalModuleAugmentation(node)) { + return true; + } var parent_4 = getDeclarationContainer(node); // If the node is not exported or it is not ambient module element (except import declaration) if (!(ts.getCombinedNodeFlags(node) & 2 /* Export */) && - !(node.kind !== 223 /* ImportEqualsDeclaration */ && parent_4.kind !== 250 /* SourceFile */ && ts.isInAmbientContext(parent_4))) { + !(node.kind !== 224 /* ImportEqualsDeclaration */ && parent_4.kind !== 251 /* SourceFile */ && ts.isInAmbientContext(parent_4))) { return isGlobalSourceFile(parent_4); } // Exported members/ambient module elements (exception import declaration) are visible if parent is visible return isDeclarationVisible(parent_4); - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: if (node.flags & (16 /* Private */ | 32 /* Protected */)) { // Private/protected properties/methods are not visible return false; } // Public properties/methods are visible if its parents are visible, so const it fall into next case statement - case 144 /* Constructor */: - case 148 /* ConstructSignature */: - case 147 /* CallSignature */: - case 149 /* IndexSignature */: - case 138 /* Parameter */: - case 221 /* ModuleBlock */: - case 152 /* FunctionType */: - case 153 /* ConstructorType */: - case 155 /* TypeLiteral */: - case 151 /* TypeReference */: - case 156 /* ArrayType */: - case 157 /* TupleType */: - case 158 /* UnionType */: - case 159 /* IntersectionType */: - case 160 /* ParenthesizedType */: + case 145 /* Constructor */: + case 149 /* ConstructSignature */: + case 148 /* CallSignature */: + case 150 /* IndexSignature */: + case 139 /* Parameter */: + case 222 /* ModuleBlock */: + case 153 /* FunctionType */: + case 154 /* ConstructorType */: + case 156 /* TypeLiteral */: + case 152 /* TypeReference */: + case 157 /* ArrayType */: + case 158 /* TupleType */: + case 159 /* UnionType */: + case 160 /* IntersectionType */: + case 161 /* ParenthesizedType */: return isDeclarationVisible(node.parent); // Default binding, import specifier and namespace import is visible // only on demand so by default it is not visible - case 225 /* ImportClause */: - case 226 /* NamespaceImport */: - case 228 /* ImportSpecifier */: + case 226 /* ImportClause */: + case 227 /* NamespaceImport */: + case 229 /* ImportSpecifier */: return false; // Type parameters are always visible - case 137 /* TypeParameter */: + case 138 /* TypeParameter */: // Source file is always visible - case 250 /* SourceFile */: + case 251 /* SourceFile */: return true; // Export assignments do not create name bindings outside the module - case 229 /* ExportAssignment */: + case 230 /* ExportAssignment */: return false; default: ts.Debug.fail("isDeclarationVisible unknown: SyntaxKind: " + node.kind); @@ -16287,10 +16569,10 @@ var ts; } function collectLinkedAliases(node) { var exportSymbol; - if (node.parent && node.parent.kind === 229 /* ExportAssignment */) { + if (node.parent && node.parent.kind === 230 /* ExportAssignment */) { exportSymbol = resolveName(node.parent, node.text, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */ | 8388608 /* Alias */, ts.Diagnostics.Cannot_find_name_0, node); } - else if (node.parent.kind === 232 /* ExportSpecifier */) { + else if (node.parent.kind === 233 /* ExportSpecifier */) { var exportSpecifier = node.parent; exportSymbol = exportSpecifier.parent.parent.moduleSpecifier ? getExternalModuleMember(exportSpecifier.parent.parent, exportSpecifier) : @@ -16313,7 +16595,9 @@ var ts; var internalModuleReference = declaration.moduleReference; var firstIdentifier = getFirstIdentifier(internalModuleReference); var importSymbol = resolveName(declaration, firstIdentifier.text, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */, ts.Diagnostics.Cannot_find_name_0, firstIdentifier); - buildVisibleNodeList(importSymbol.declarations); + if (importSymbol) { + buildVisibleNodeList(importSymbol.declarations); + } } }); } @@ -16382,14 +16666,14 @@ var ts; node = ts.getRootDeclaration(node); // Parent chain: // VaribleDeclaration -> VariableDeclarationList -> VariableStatement -> 'Declaration Container' - return node.kind === 213 /* VariableDeclaration */ ? node.parent.parent.parent : node.parent; + return node.kind === 214 /* VariableDeclaration */ ? node.parent.parent.parent : node.parent; } function getTypeOfPrototypeProperty(prototype) { // TypeScript 1.0 spec (April 2014): 8.4 // Every class automatically contains a static property member named 'prototype', // the type of which is an instantiation of the class type with type Any supplied as a type argument for each type parameter. // It is an error to explicitly declare a static property member with the name 'prototype'. - var classType = getDeclaredTypeOfSymbol(prototype.parent); + var classType = getDeclaredTypeOfSymbol(getMergedSymbol(prototype.parent)); return classType.typeParameters ? createTypeReference(classType, ts.map(classType.typeParameters, function (_) { return anyType; })) : classType; } // Return the type of the given property in the given type, or undefined if no such property exists @@ -16413,7 +16697,7 @@ var ts; case 9 /* StringLiteral */: case 8 /* NumericLiteral */: return name.text; - case 136 /* ComputedPropertyName */: + case 137 /* ComputedPropertyName */: if (ts.isStringOrNumericLiteral(name.expression.kind)) { return name.expression.text; } @@ -16421,7 +16705,7 @@ var ts; return undefined; } function isComputedNonLiteralName(name) { - return name.kind === 136 /* ComputedPropertyName */ && !ts.isStringOrNumericLiteral(name.expression.kind); + return name.kind === 137 /* ComputedPropertyName */ && !ts.isStringOrNumericLiteral(name.expression.kind); } // Return the inferred type for a binding element function getTypeForBindingElement(declaration) { @@ -16441,7 +16725,7 @@ var ts; return parentType; } var type; - if (pattern.kind === 163 /* ObjectBindingPattern */) { + if (pattern.kind === 164 /* ObjectBindingPattern */) { // Use explicitly specified property name ({ p: xxx } form), or otherwise the implied name ({ p } form) var name_10 = declaration.propertyName || declaration.name; if (isComputedNonLiteralName(name_10)) { @@ -16489,11 +16773,11 @@ var ts; } // Return the inferred type for a variable, parameter, or property declaration function getTypeForVariableLikeDeclaration(declaration) { - // A variable declared in a for..in statement is always of type any - if (declaration.parent.parent.kind === 202 /* ForInStatement */) { - return anyType; + // A variable declared in a for..in statement is always of type string + if (declaration.parent.parent.kind === 203 /* ForInStatement */) { + return stringType; } - if (declaration.parent.parent.kind === 203 /* ForOfStatement */) { + if (declaration.parent.parent.kind === 204 /* ForOfStatement */) { // checkRightHandSideOfForOf will return undefined if the for-of expression type was // missing properties/signatures required to get its iteratedType (like // [Symbol.iterator] or next). This may be because we accessed properties from anyType, @@ -16507,11 +16791,11 @@ var ts; if (declaration.type) { return getTypeFromTypeNode(declaration.type); } - if (declaration.kind === 138 /* Parameter */) { + if (declaration.kind === 139 /* Parameter */) { var func = declaration.parent; // For a parameter of a set accessor, use the type of the get accessor if one is present - if (func.kind === 146 /* SetAccessor */ && !ts.hasDynamicName(func)) { - var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 145 /* GetAccessor */); + if (func.kind === 147 /* SetAccessor */ && !ts.hasDynamicName(func)) { + var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 146 /* GetAccessor */); if (getter) { return getReturnTypeOfSignature(getSignatureFromDeclaration(getter)); } @@ -16527,7 +16811,7 @@ var ts; return checkExpressionCached(declaration.initializer); } // If it is a short-hand property assignment, use the type of the identifier - if (declaration.kind === 248 /* ShorthandPropertyAssignment */) { + if (declaration.kind === 249 /* ShorthandPropertyAssignment */) { return checkIdentifier(declaration.name); } // If the declaration specifies a binding pattern, use the type implied by the binding pattern @@ -16583,7 +16867,7 @@ var ts; return languageVersion >= 2 /* ES6 */ ? createIterableType(anyType) : anyArrayType; } // If the pattern has at least one element, and no rest element, then it should imply a tuple type. - var elementTypes = ts.map(elements, function (e) { return e.kind === 189 /* OmittedExpression */ ? anyType : getTypeFromBindingElement(e, includePatternInType); }); + var elementTypes = ts.map(elements, function (e) { return e.kind === 190 /* OmittedExpression */ ? anyType : getTypeFromBindingElement(e, includePatternInType); }); if (includePatternInType) { var result = createNewTupleType(elementTypes); result.pattern = pattern; @@ -16599,7 +16883,7 @@ var ts; // parameter with no type annotation or initializer, the type implied by the binding pattern becomes the type of // the parameter. function getTypeFromBindingPattern(pattern, includePatternInType) { - return pattern.kind === 163 /* ObjectBindingPattern */ + return pattern.kind === 164 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType) : getTypeFromArrayBindingPattern(pattern, includePatternInType); } @@ -16621,10 +16905,10 @@ var ts; // During a normal type check we'll never get to here with a property assignment (the check of the containing // object literal uses a different path). We exclude widening only so that language services and type verification // tools see the actual type. - if (declaration.kind === 247 /* PropertyAssignment */) { + if (declaration.kind === 248 /* PropertyAssignment */) { return type; } - if (type.flags & 134217728 /* PredicateType */ && (declaration.kind === 141 /* PropertyDeclaration */ || declaration.kind === 140 /* PropertySignature */)) { + if (type.flags & 134217728 /* PredicateType */ && (declaration.kind === 142 /* PropertyDeclaration */ || declaration.kind === 141 /* PropertySignature */)) { return type; } return getWidenedType(type); @@ -16634,7 +16918,7 @@ var ts; // Report implicit any errors unless this is a private property within an ambient declaration if (reportErrors && compilerOptions.noImplicitAny) { var root = ts.getRootDeclaration(declaration); - if (!isPrivateWithinAmbient(root) && !(root.kind === 138 /* Parameter */ && isPrivateWithinAmbient(root.parent))) { + if (!isPrivateWithinAmbient(root) && !(root.kind === 139 /* Parameter */ && isPrivateWithinAmbient(root.parent))) { reportImplicitAnyError(declaration, type); } } @@ -16649,21 +16933,21 @@ var ts; } // Handle catch clause variables var declaration = symbol.valueDeclaration; - if (declaration.parent.kind === 246 /* CatchClause */) { + if (declaration.parent.kind === 247 /* CatchClause */) { return links.type = anyType; } // Handle export default expressions - if (declaration.kind === 229 /* ExportAssignment */) { + if (declaration.kind === 230 /* ExportAssignment */) { return links.type = checkExpression(declaration.expression); } // Handle module.exports = expr - if (declaration.kind === 183 /* BinaryExpression */) { + if (declaration.kind === 184 /* BinaryExpression */) { return links.type = checkExpression(declaration.right); } - if (declaration.kind === 168 /* PropertyAccessExpression */) { + if (declaration.kind === 169 /* PropertyAccessExpression */) { // Declarations only exist for property access expressions for certain // special assignment kinds - if (declaration.parent.kind === 183 /* BinaryExpression */) { + if (declaration.parent.kind === 184 /* BinaryExpression */) { // Handle exports.p = expr or this.p = expr or className.prototype.method = expr return links.type = checkExpressionCached(declaration.parent.right); } @@ -16693,7 +16977,7 @@ var ts; } function getAnnotatedAccessorType(accessor) { if (accessor) { - if (accessor.kind === 145 /* GetAccessor */) { + if (accessor.kind === 146 /* GetAccessor */) { return accessor.type && getTypeFromTypeNode(accessor.type); } else { @@ -16709,8 +16993,8 @@ var ts; if (!pushTypeResolution(symbol, 0 /* Type */)) { return unknownType; } - var getter = ts.getDeclarationOfKind(symbol, 145 /* GetAccessor */); - var setter = ts.getDeclarationOfKind(symbol, 146 /* SetAccessor */); + var getter = ts.getDeclarationOfKind(symbol, 146 /* GetAccessor */); + var setter = ts.getDeclarationOfKind(symbol, 147 /* SetAccessor */); var type; // First try to see if the user specified a return type on the get-accessor. var getterReturnType = getAnnotatedAccessorType(getter); @@ -16739,7 +17023,7 @@ var ts; if (!popTypeResolution()) { type = anyType; if (compilerOptions.noImplicitAny) { - var getter_1 = ts.getDeclarationOfKind(symbol, 145 /* GetAccessor */); + var getter_1 = ts.getDeclarationOfKind(symbol, 146 /* GetAccessor */); error(getter_1, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol)); } } @@ -16839,9 +17123,9 @@ var ts; if (!node) { return typeParameters; } - if (node.kind === 216 /* ClassDeclaration */ || node.kind === 188 /* ClassExpression */ || - node.kind === 215 /* FunctionDeclaration */ || node.kind === 175 /* FunctionExpression */ || - node.kind === 143 /* MethodDeclaration */ || node.kind === 176 /* ArrowFunction */) { + if (node.kind === 217 /* ClassDeclaration */ || node.kind === 189 /* ClassExpression */ || + node.kind === 216 /* FunctionDeclaration */ || node.kind === 176 /* FunctionExpression */ || + node.kind === 144 /* MethodDeclaration */ || node.kind === 177 /* ArrowFunction */) { var declarations = node.typeParameters; if (declarations) { return appendTypeParameters(appendOuterTypeParameters(typeParameters, node), declarations); @@ -16851,7 +17135,7 @@ var ts; } // The outer type parameters are those defined by enclosing generic classes, methods, or functions. function getOuterTypeParametersOfClassOrInterface(symbol) { - var declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 217 /* InterfaceDeclaration */); + var declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 218 /* InterfaceDeclaration */); return appendOuterTypeParameters(undefined, declaration); } // The local type parameters are the combined set of type parameters from all declarations of the class, @@ -16860,8 +17144,8 @@ var ts; var result; for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var node = _a[_i]; - if (node.kind === 217 /* InterfaceDeclaration */ || node.kind === 216 /* ClassDeclaration */ || - node.kind === 188 /* ClassExpression */ || node.kind === 218 /* TypeAliasDeclaration */) { + if (node.kind === 218 /* InterfaceDeclaration */ || node.kind === 217 /* ClassDeclaration */ || + node.kind === 189 /* ClassExpression */ || node.kind === 219 /* TypeAliasDeclaration */) { var declaration = node; if (declaration.typeParameters) { result = appendTypeParameters(result, declaration.typeParameters); @@ -17001,7 +17285,7 @@ var ts; type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 217 /* InterfaceDeclaration */ && ts.getInterfaceBaseTypeNodes(declaration)) { + if (declaration.kind === 218 /* InterfaceDeclaration */ && ts.getInterfaceBaseTypeNodes(declaration)) { for (var _b = 0, _c = ts.getInterfaceBaseTypeNodes(declaration); _b < _c.length; _b++) { var node = _c[_b]; var baseType = getTypeFromTypeNode(node); @@ -17033,7 +17317,7 @@ var ts; function isIndependentInterface(symbol) { for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 217 /* InterfaceDeclaration */) { + if (declaration.kind === 218 /* InterfaceDeclaration */) { if (declaration.flags & 262144 /* ContainsThis */) { return false; } @@ -17089,7 +17373,7 @@ var ts; if (!pushTypeResolution(symbol, 2 /* DeclaredType */)) { return unknownType; } - var declaration = ts.getDeclarationOfKind(symbol, 218 /* TypeAliasDeclaration */); + var declaration = ts.getDeclarationOfKind(symbol, 219 /* TypeAliasDeclaration */); var type = getTypeFromTypeNode(declaration.type); if (popTypeResolution()) { links.typeParameters = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); @@ -17122,7 +17406,7 @@ var ts; if (!links.declaredType) { var type = createType(512 /* TypeParameter */); type.symbol = symbol; - if (!ts.getDeclarationOfKind(symbol, 137 /* TypeParameter */).constraint) { + if (!ts.getDeclarationOfKind(symbol, 138 /* TypeParameter */).constraint) { type.constraint = noConstraintType; } links.declaredType = type; @@ -17178,11 +17462,11 @@ var ts; case 120 /* BooleanKeyword */: case 131 /* SymbolKeyword */: case 103 /* VoidKeyword */: - case 162 /* StringLiteralType */: + case 163 /* StringLiteralType */: return true; - case 156 /* ArrayType */: + case 157 /* ArrayType */: return isIndependentType(node.elementType); - case 151 /* TypeReference */: + case 152 /* TypeReference */: return isIndependentTypeReference(node); } return false; @@ -17195,7 +17479,7 @@ var ts; // A function-like declaration is considered independent (free of this references) if it has a return type // annotation that is considered independent and if each parameter is considered independent. function isIndependentFunctionLikeDeclaration(node) { - if (node.kind !== 144 /* Constructor */ && (!node.type || !isIndependentType(node.type))) { + if (node.kind !== 145 /* Constructor */ && (!node.type || !isIndependentType(node.type))) { return false; } for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) { @@ -17216,12 +17500,12 @@ var ts; var declaration = symbol.declarations[0]; if (declaration) { switch (declaration.kind) { - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: return isIndependentVariableLikeDeclaration(declaration); - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 144 /* Constructor */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 145 /* Constructor */: return isIndependentFunctionLikeDeclaration(declaration); } } @@ -17783,7 +18067,7 @@ var ts; function getSignatureFromDeclaration(declaration) { var links = getNodeLinks(declaration); if (!links.resolvedSignature) { - var classType = declaration.kind === 144 /* Constructor */ ? + var classType = declaration.kind === 145 /* Constructor */ ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : undefined; var typeParameters = classType ? classType.localTypeParameters : @@ -17800,7 +18084,7 @@ var ts; paramSymbol = resolvedSymbol; } parameters.push(paramSymbol); - if (param.type && param.type.kind === 162 /* StringLiteralType */) { + if (param.type && param.type.kind === 163 /* StringLiteralType */) { hasStringLiterals = true; } if (param.initializer || param.questionToken || param.dotDotDotToken) { @@ -17826,8 +18110,8 @@ var ts; else { // TypeScript 1.0 spec (April 2014): // If only one accessor includes a type annotation, the other behaves as if it had the same type annotation. - if (declaration.kind === 145 /* GetAccessor */ && !ts.hasDynamicName(declaration)) { - var setter = ts.getDeclarationOfKind(declaration.symbol, 146 /* SetAccessor */); + if (declaration.kind === 146 /* GetAccessor */ && !ts.hasDynamicName(declaration)) { + var setter = ts.getDeclarationOfKind(declaration.symbol, 147 /* SetAccessor */); returnType = getAnnotatedAccessorType(setter); } if (!returnType && ts.nodeIsMissing(declaration.body)) { @@ -17845,19 +18129,19 @@ var ts; for (var i = 0, len = symbol.declarations.length; i < len; i++) { var node = symbol.declarations[i]; switch (node.kind) { - case 152 /* FunctionType */: - case 153 /* ConstructorType */: - case 215 /* FunctionDeclaration */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 144 /* Constructor */: - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 149 /* IndexSignature */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: + case 153 /* FunctionType */: + case 154 /* ConstructorType */: + case 216 /* FunctionDeclaration */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 145 /* Constructor */: + case 148 /* CallSignature */: + case 149 /* ConstructSignature */: + case 150 /* IndexSignature */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: // Don't include signature if node is the implementation of an overloaded function. A node is considered // an implementation node if it has a body and the previous node is of the same kind and immediately // precedes the implementation node (i.e. has the same parent and ends where the implementation starts). @@ -17944,7 +18228,7 @@ var ts; // object type literal or interface (using the new keyword). Each way of declaring a constructor // will result in a different declaration kind. if (!signature.isolatedSignatureType) { - var isConstructor = signature.declaration.kind === 144 /* Constructor */ || signature.declaration.kind === 148 /* ConstructSignature */; + var isConstructor = signature.declaration.kind === 145 /* Constructor */ || signature.declaration.kind === 149 /* ConstructSignature */; var type = createObjectType(65536 /* Anonymous */ | 262144 /* FromSignature */); type.members = emptySymbols; type.properties = emptyArray; @@ -17981,7 +18265,7 @@ var ts; : undefined; } function getConstraintDeclaration(type) { - return ts.getDeclarationOfKind(type.symbol, 137 /* TypeParameter */).constraint; + return ts.getDeclarationOfKind(type.symbol, 138 /* TypeParameter */).constraint; } function hasConstraintReferenceTo(type, target) { var checked; @@ -18014,7 +18298,7 @@ var ts; return typeParameter.constraint === noConstraintType ? undefined : typeParameter.constraint; } function getParentSymbolOfTypeParameter(typeParameter) { - return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 137 /* TypeParameter */).parent); + return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 138 /* TypeParameter */).parent); } function getTypeListId(types) { if (types) { @@ -18113,7 +18397,7 @@ var ts; var links = getNodeLinks(node); if (!links.resolvedType) { // We only support expressions that are simple qualified names. For other expressions this produces undefined. - var typeNameOrExpression = node.kind === 151 /* TypeReference */ ? node.typeName : + var typeNameOrExpression = node.kind === 152 /* TypeReference */ ? node.typeName : ts.isSupportedExpressionWithTypeArguments(node) ? node.expression : undefined; var symbol = typeNameOrExpression && resolveEntityName(typeNameOrExpression, 793056 /* Type */) || unknownSymbol; @@ -18145,9 +18429,9 @@ var ts; for (var _i = 0, declarations_3 = declarations; _i < declarations_3.length; _i++) { var declaration = declarations_3[_i]; switch (declaration.kind) { - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: - case 219 /* EnumDeclaration */: + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: + case 220 /* EnumDeclaration */: return declaration; } } @@ -18388,9 +18672,9 @@ var ts; function getThisType(node) { var container = ts.getThisContainer(node, /*includeArrowFunctions*/ false); var parent = container && container.parent; - if (parent && (ts.isClassLike(parent) || parent.kind === 217 /* InterfaceDeclaration */)) { + if (parent && (ts.isClassLike(parent) || parent.kind === 218 /* InterfaceDeclaration */)) { if (!(container.flags & 64 /* Static */) && - (container.kind !== 144 /* Constructor */ || ts.isNodeDescendentOf(node, container.body))) { + (container.kind !== 145 /* Constructor */ || ts.isNodeDescendentOf(node, container.body))) { return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent)).thisType; } } @@ -18434,36 +18718,36 @@ var ts; return esSymbolType; case 103 /* VoidKeyword */: return voidType; - case 161 /* ThisType */: + case 162 /* ThisType */: return getTypeFromThisTypeNode(node); - case 162 /* StringLiteralType */: + case 163 /* StringLiteralType */: return getTypeFromStringLiteralTypeNode(node); - case 151 /* TypeReference */: + case 152 /* TypeReference */: return getTypeFromTypeReference(node); - case 150 /* TypePredicate */: + case 151 /* TypePredicate */: return getTypeFromPredicateTypeNode(node); - case 190 /* ExpressionWithTypeArguments */: + case 191 /* ExpressionWithTypeArguments */: return getTypeFromTypeReference(node); - case 154 /* TypeQuery */: + case 155 /* TypeQuery */: return getTypeFromTypeQueryNode(node); - case 156 /* ArrayType */: + case 157 /* ArrayType */: return getTypeFromArrayTypeNode(node); - case 157 /* TupleType */: + case 158 /* TupleType */: return getTypeFromTupleTypeNode(node); - case 158 /* UnionType */: + case 159 /* UnionType */: return getTypeFromUnionTypeNode(node); - case 159 /* IntersectionType */: + case 160 /* IntersectionType */: return getTypeFromIntersectionTypeNode(node); - case 160 /* ParenthesizedType */: + case 161 /* ParenthesizedType */: return getTypeFromTypeNode(node.type); - case 152 /* FunctionType */: - case 153 /* ConstructorType */: - case 155 /* TypeLiteral */: + case 153 /* FunctionType */: + case 154 /* ConstructorType */: + case 156 /* TypeLiteral */: return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); // This function assumes that an identifier or qualified name is a type expression // Callers should first ensure this by calling isTypeNode case 69 /* Identifier */: - case 135 /* QualifiedName */: + case 136 /* QualifiedName */: var symbol = getSymbolAtLocation(node); return symbol && getDeclaredTypeOfSymbol(symbol); default: @@ -18654,27 +18938,27 @@ var ts; // Returns true if the given expression contains (at any level of nesting) a function or arrow expression // that is subject to contextual typing. function isContextSensitive(node) { - ts.Debug.assert(node.kind !== 143 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 144 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); switch (node.kind) { - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: return isContextSensitiveFunctionLikeDeclaration(node); - case 167 /* ObjectLiteralExpression */: + case 168 /* ObjectLiteralExpression */: return ts.forEach(node.properties, isContextSensitive); - case 166 /* ArrayLiteralExpression */: + case 167 /* ArrayLiteralExpression */: return ts.forEach(node.elements, isContextSensitive); - case 184 /* ConditionalExpression */: + case 185 /* ConditionalExpression */: return isContextSensitive(node.whenTrue) || isContextSensitive(node.whenFalse); - case 183 /* BinaryExpression */: + case 184 /* BinaryExpression */: return node.operatorToken.kind === 52 /* BarBarToken */ && (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 247 /* PropertyAssignment */: + case 248 /* PropertyAssignment */: return isContextSensitive(node.initializer); - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: return isContextSensitiveFunctionLikeDeclaration(node); - case 174 /* ParenthesizedExpression */: + case 175 /* ParenthesizedExpression */: return isContextSensitive(node.expression); } return false; @@ -18703,6 +18987,9 @@ var ts; function compareTypesIdentical(source, target) { return checkTypeRelatedTo(source, target, identityRelation, /*errorNode*/ undefined) ? -1 /* True */ : 0 /* False */; } + function compareTypesAssignable(source, target) { + return checkTypeRelatedTo(source, target, assignableRelation, /*errorNode*/ undefined) ? -1 /* True */ : 0 /* False */; + } function isTypeSubtypeOf(source, target) { return checkTypeSubtypeOf(source, target, /*errorNode*/ undefined); } @@ -18715,47 +19002,60 @@ var ts; function checkTypeAssignableTo(source, target, errorNode, headMessage, containingMessageChain) { return checkTypeRelatedTo(source, target, assignableRelation, errorNode, headMessage, containingMessageChain); } + function isSignatureAssignableTo(source, target, ignoreReturnTypes) { + return compareSignaturesRelated(source, target, ignoreReturnTypes, /*reportErrors*/ false, /*errorReporter*/ undefined, compareTypesAssignable) !== 0 /* False */; + } /** * See signatureRelatedTo, compareSignaturesIdentical */ - function isSignatureAssignableTo(source, target, ignoreReturnTypes) { + function compareSignaturesRelated(source, target, ignoreReturnTypes, reportErrors, errorReporter, compareTypes) { // TODO (drosen): De-duplicate code between related functions. if (source === target) { - return true; + return -1 /* True */; } if (!target.hasRestParameter && source.minArgumentCount > target.parameters.length) { - return false; + return 0 /* False */; } // Spec 1.0 Section 3.8.3 & 3.8.4: // M and N (the signatures) are instantiated using type Any as the type argument for all type parameters declared by M and N source = getErasedSignature(source); target = getErasedSignature(target); + var result = -1 /* True */; var sourceMax = getNumNonRestParameters(source); var targetMax = getNumNonRestParameters(target); var checkCount = getNumParametersToCheckForSignatureRelatability(source, sourceMax, target, targetMax); + var sourceParams = source.parameters; + var targetParams = target.parameters; for (var i = 0; i < checkCount; i++) { - var s = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source); - var t = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target); - var related = isTypeAssignableTo(t, s) || isTypeAssignableTo(s, t); + var s = i < sourceMax ? getTypeOfSymbol(sourceParams[i]) : getRestTypeOfSignature(source); + var t = i < targetMax ? getTypeOfSymbol(targetParams[i]) : getRestTypeOfSignature(target); + var related = compareTypes(t, s, /*reportErrors*/ false) || compareTypes(s, t, reportErrors); if (!related) { - return false; + if (reportErrors) { + errorReporter(ts.Diagnostics.Types_of_parameters_0_and_1_are_incompatible, sourceParams[i < sourceMax ? i : sourceMax].name, targetParams[i < targetMax ? i : targetMax].name); + } + return 0 /* False */; } + result &= related; } if (!ignoreReturnTypes) { var targetReturnType = getReturnTypeOfSignature(target); if (targetReturnType === voidType) { - return true; + return result; } var sourceReturnType = getReturnTypeOfSignature(source); // The following block preserves behavior forbidding boolean returning functions from being assignable to type guard returning functions if (targetReturnType.flags & 134217728 /* PredicateType */ && targetReturnType.predicate.kind === 1 /* Identifier */) { if (!(sourceReturnType.flags & 134217728 /* PredicateType */)) { - return false; + if (reportErrors) { + errorReporter(ts.Diagnostics.Signature_0_must_have_a_type_predicate, signatureToString(source)); + } + return 0 /* False */; } } - return isTypeAssignableTo(sourceReturnType, targetReturnType); + result &= compareTypes(sourceReturnType, targetReturnType, reportErrors); } - return true; + return result; } function isImplementationCompatibleWithOverload(implementation, overload) { var erasedSource = getErasedSignature(implementation); @@ -18812,22 +19112,12 @@ var ts; var expandingFlags; var depth = 0; var overflow = false; - var elaborateErrors = false; ts.Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking"); - var result = isRelatedTo(source, target, errorNode !== undefined, headMessage); + var result = isRelatedTo(source, target, /*reportErrors*/ !!errorNode, headMessage); if (overflow) { error(errorNode, ts.Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target)); } else if (errorInfo) { - // If we already computed this relation, but in a context where we didn't want to report errors (e.g. overload resolution), - // then we'll only have a top-level error (e.g. 'Class X does not implement interface Y') without any details. If this happened, - // request a recompuation to get a complete error message. This will be skipped if we've already done this computation in a context - // where errors were being reported. - if (errorInfo.next === undefined) { - errorInfo = undefined; - elaborateErrors = true; - isRelatedTo(source, target, errorNode !== undefined, headMessage); - } if (containingMessageChain) { errorInfo = ts.concatenateDiagnosticMessageChains(containingMessageChain, errorInfo); } @@ -18835,6 +19125,7 @@ var ts; } return result !== 0 /* False */; function reportError(message, arg0, arg1, arg2) { + ts.Debug.assert(!!errorNode); errorInfo = ts.chainDiagnosticMessages(errorInfo, message, arg0, arg1, arg2); } function reportRelationError(message, source, target) { @@ -18973,14 +19264,14 @@ var ts; } // Even if relationship doesn't hold for unions, intersections, or generic type references, // it may hold in a structural comparison. - var apparentType = getApparentType(source); + var apparentSource = getApparentType(source); // In a check of the form X = A & B, we will have previously checked if A relates to X or B relates // to X. Failing both of those we want to check if the aggregation of A and B's members structurally // relates to X. Thus, we include intersection types on the source side here. - if (apparentType.flags & (80896 /* ObjectType */ | 32768 /* Intersection */) && target.flags & 80896 /* ObjectType */) { + if (apparentSource.flags & (80896 /* ObjectType */ | 32768 /* Intersection */) && target.flags & 80896 /* ObjectType */) { // Report structural errors only if we haven't reported any errors yet - var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo; - if (result = objectTypeRelatedTo(apparentType, source, target, reportStructuralErrors)) { + var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo && !(source.flags & 16777726 /* Primitive */); + if (result = objectTypeRelatedTo(apparentSource, source, target, reportStructuralErrors)) { errorInfo = saveErrorInfo; return result; } @@ -19043,6 +19334,7 @@ var ts; // We know *exactly* where things went wrong when comparing the types. // Use this property as the error node as this will be more helpful in // reasoning about what went wrong. + ts.Debug.assert(!!errorNode); errorNode = prop.valueDeclaration; reportError(ts.Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(prop), typeToString(target)); } @@ -19140,7 +19432,7 @@ var ts; var id = relation !== identityRelation || source.id < target.id ? source.id + "," + target.id : target.id + "," + source.id; var related = relation[id]; if (related !== undefined) { - if (elaborateErrors && related === 2 /* Failed */) { + if (reportErrors && related === 2 /* Failed */) { // We are elaborating errors and the cached result is an unreported failure. Record the result as a reported // failure and continue computing the relation such that errors get reported. relation[id] = 3 /* FailedAndReported */; @@ -19354,7 +19646,7 @@ var ts; } // don't elaborate the primitive apparent types (like Number) // because the actual primitives will have already been reported. - if (shouldElaborateErrors && !isPrimitiveApparentType(source)) { + if (shouldElaborateErrors) { reportError(ts.Diagnostics.Type_0_provides_no_match_for_the_signature_1, typeToString(source), signatureToString(t, /*enclosingDeclaration*/ undefined, /*flags*/ undefined, kind)); } return 0 /* False */; @@ -19363,72 +19655,10 @@ var ts; return result; } /** - * See signatureAssignableTo, signatureAssignableTo + * See signatureAssignableTo, compareSignaturesIdentical */ function signatureRelatedTo(source, target, reportErrors) { - // TODO (drosen): De-duplicate code between related functions. - if (source === target) { - return -1 /* True */; - } - if (!target.hasRestParameter && source.minArgumentCount > target.parameters.length) { - return 0 /* False */; - } - var sourceMax = source.parameters.length; - var targetMax = target.parameters.length; - var checkCount; - if (source.hasRestParameter && target.hasRestParameter) { - checkCount = sourceMax > targetMax ? sourceMax : targetMax; - sourceMax--; - targetMax--; - } - else if (source.hasRestParameter) { - sourceMax--; - checkCount = targetMax; - } - else if (target.hasRestParameter) { - targetMax--; - checkCount = sourceMax; - } - else { - checkCount = sourceMax < targetMax ? sourceMax : targetMax; - } - // Spec 1.0 Section 3.8.3 & 3.8.4: - // M and N (the signatures) are instantiated using type Any as the type argument for all type parameters declared by M and N - source = getErasedSignature(source); - target = getErasedSignature(target); - var result = -1 /* True */; - for (var i = 0; i < checkCount; i++) { - var s = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source); - var t = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target); - var saveErrorInfo = errorInfo; - var related = isRelatedTo(s, t, reportErrors); - if (!related) { - related = isRelatedTo(t, s, /*reportErrors*/ false); - if (!related) { - if (reportErrors) { - reportError(ts.Diagnostics.Types_of_parameters_0_and_1_are_incompatible, source.parameters[i < sourceMax ? i : sourceMax].name, target.parameters[i < targetMax ? i : targetMax].name); - } - return 0 /* False */; - } - errorInfo = saveErrorInfo; - } - result &= related; - } - var targetReturnType = getReturnTypeOfSignature(target); - if (targetReturnType === voidType) { - return result; - } - var sourceReturnType = getReturnTypeOfSignature(source); - // The following block preserves behavior forbidding boolean returning functions from being assignable to type guard returning functions - if (targetReturnType.flags & 134217728 /* PredicateType */ && targetReturnType.predicate.kind === 1 /* Identifier */) { - if (!(sourceReturnType.flags & 134217728 /* PredicateType */)) { - if (reportErrors) { - reportError(ts.Diagnostics.Signature_0_must_have_a_type_predicate, signatureToString(source)); - } - return 0 /* False */; - } - } - return result & isRelatedTo(sourceReturnType, targetReturnType, reportErrors); + return compareSignaturesRelated(source, target, /*ignoreReturnTypes*/ false, reportErrors, reportError, isRelatedTo); } function signaturesIdenticalTo(source, target, kind) { var sourceSignatures = getSignaturesOfType(source, kind); @@ -19844,22 +20074,22 @@ var ts; var typeAsString = typeToString(getWidenedType(type)); var diagnostic; switch (declaration.kind) { - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: diagnostic = ts.Diagnostics.Member_0_implicitly_has_an_1_type; break; - case 138 /* Parameter */: + case 139 /* Parameter */: diagnostic = declaration.dotDotDotToken ? ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : ts.Diagnostics.Parameter_0_implicitly_has_an_1_type; break; - case 215 /* FunctionDeclaration */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: + case 216 /* FunctionDeclaration */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: if (!declaration.name) { error(declaration, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; @@ -20196,10 +20426,10 @@ var ts; // The expression is restricted to a single identifier or a sequence of identifiers separated by periods while (node) { switch (node.kind) { - case 154 /* TypeQuery */: + case 155 /* TypeQuery */: return true; case 69 /* Identifier */: - case 135 /* QualifiedName */: + case 136 /* QualifiedName */: node = node.parent; continue; default: @@ -20241,55 +20471,55 @@ var ts; } function isAssignedIn(node) { switch (node.kind) { - case 183 /* BinaryExpression */: + case 184 /* BinaryExpression */: return isAssignedInBinaryExpression(node); - case 213 /* VariableDeclaration */: - case 165 /* BindingElement */: + case 214 /* VariableDeclaration */: + case 166 /* BindingElement */: return isAssignedInVariableDeclaration(node); - case 163 /* ObjectBindingPattern */: - case 164 /* ArrayBindingPattern */: - case 166 /* ArrayLiteralExpression */: - case 167 /* ObjectLiteralExpression */: - case 168 /* PropertyAccessExpression */: - case 169 /* ElementAccessExpression */: - case 170 /* CallExpression */: - case 171 /* NewExpression */: - case 173 /* TypeAssertionExpression */: - case 191 /* AsExpression */: - case 174 /* ParenthesizedExpression */: - case 181 /* PrefixUnaryExpression */: - case 177 /* DeleteExpression */: - case 180 /* AwaitExpression */: - case 178 /* TypeOfExpression */: - case 179 /* VoidExpression */: - case 182 /* PostfixUnaryExpression */: - case 186 /* YieldExpression */: - case 184 /* ConditionalExpression */: - case 187 /* SpreadElementExpression */: - case 194 /* Block */: - case 195 /* VariableStatement */: - case 197 /* ExpressionStatement */: - case 198 /* IfStatement */: - case 199 /* DoStatement */: - case 200 /* WhileStatement */: - case 201 /* ForStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - case 206 /* ReturnStatement */: - case 207 /* WithStatement */: - case 208 /* SwitchStatement */: - case 243 /* CaseClause */: - case 244 /* DefaultClause */: - case 209 /* LabeledStatement */: - case 210 /* ThrowStatement */: - case 211 /* TryStatement */: - case 246 /* CatchClause */: - case 235 /* JsxElement */: - case 236 /* JsxSelfClosingElement */: - case 240 /* JsxAttribute */: - case 241 /* JsxSpreadAttribute */: - case 237 /* JsxOpeningElement */: - case 242 /* JsxExpression */: + case 164 /* ObjectBindingPattern */: + case 165 /* ArrayBindingPattern */: + case 167 /* ArrayLiteralExpression */: + case 168 /* ObjectLiteralExpression */: + case 169 /* PropertyAccessExpression */: + case 170 /* ElementAccessExpression */: + case 171 /* CallExpression */: + case 172 /* NewExpression */: + case 174 /* TypeAssertionExpression */: + case 192 /* AsExpression */: + case 175 /* ParenthesizedExpression */: + case 182 /* PrefixUnaryExpression */: + case 178 /* DeleteExpression */: + case 181 /* AwaitExpression */: + case 179 /* TypeOfExpression */: + case 180 /* VoidExpression */: + case 183 /* PostfixUnaryExpression */: + case 187 /* YieldExpression */: + case 185 /* ConditionalExpression */: + case 188 /* SpreadElementExpression */: + case 195 /* Block */: + case 196 /* VariableStatement */: + case 198 /* ExpressionStatement */: + case 199 /* IfStatement */: + case 200 /* DoStatement */: + case 201 /* WhileStatement */: + case 202 /* ForStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: + case 207 /* ReturnStatement */: + case 208 /* WithStatement */: + case 209 /* SwitchStatement */: + case 244 /* CaseClause */: + case 245 /* DefaultClause */: + case 210 /* LabeledStatement */: + case 211 /* ThrowStatement */: + case 212 /* TryStatement */: + case 247 /* CatchClause */: + case 236 /* JsxElement */: + case 237 /* JsxSelfClosingElement */: + case 241 /* JsxAttribute */: + case 242 /* JsxSpreadAttribute */: + case 238 /* JsxOpeningElement */: + case 243 /* JsxExpression */: return ts.forEachChild(node, isAssignedIn); } return false; @@ -20301,7 +20531,7 @@ var ts; // Only narrow when symbol is variable of type any or an object, union, or type parameter type if (node && symbol.flags & 3 /* Variable */) { if (isTypeAny(type) || type.flags & (80896 /* ObjectType */ | 16384 /* Union */ | 512 /* TypeParameter */)) { - var declaration = ts.getDeclarationOfKind(symbol, 213 /* VariableDeclaration */); + var declaration = ts.getDeclarationOfKind(symbol, 214 /* VariableDeclaration */); var top_1 = declaration && getDeclarationContainer(declaration); var originalType = type; var nodeStack = []; @@ -20309,13 +20539,13 @@ var ts; var child = node; node = node.parent; switch (node.kind) { - case 198 /* IfStatement */: - case 184 /* ConditionalExpression */: - case 183 /* BinaryExpression */: + case 199 /* IfStatement */: + case 185 /* ConditionalExpression */: + case 184 /* BinaryExpression */: nodeStack.push({ node: node, child: child }); break; - case 250 /* SourceFile */: - case 220 /* ModuleDeclaration */: + case 251 /* SourceFile */: + case 221 /* ModuleDeclaration */: // Stop at the first containing file or module declaration break loop; } @@ -20327,19 +20557,19 @@ var ts; while (nodes = nodeStack.pop()) { var node_1 = nodes.node, child = nodes.child; switch (node_1.kind) { - case 198 /* IfStatement */: + case 199 /* IfStatement */: // In a branch of an if statement, narrow based on controlling expression if (child !== node_1.expression) { type = narrowType(type, node_1.expression, /*assumeTrue*/ child === node_1.thenStatement); } break; - case 184 /* ConditionalExpression */: + case 185 /* ConditionalExpression */: // In a branch of a conditional expression, narrow based on controlling condition if (child !== node_1.condition) { type = narrowType(type, node_1.condition, /*assumeTrue*/ child === node_1.whenTrue); } break; - case 183 /* BinaryExpression */: + case 184 /* BinaryExpression */: // In the right operand of an && or ||, narrow based on left operand if (child === node_1.right) { if (node_1.operatorToken.kind === 51 /* AmpersandAmpersandToken */) { @@ -20367,7 +20597,7 @@ var ts; return type; function narrowTypeByEquality(type, expr, assumeTrue) { // Check that we have 'typeof ' on the left and string literal on the right - if (expr.left.kind !== 178 /* TypeOfExpression */ || expr.right.kind !== 9 /* StringLiteral */) { + if (expr.left.kind !== 179 /* TypeOfExpression */ || expr.right.kind !== 9 /* StringLiteral */) { return type; } var left = expr.left; @@ -20383,10 +20613,6 @@ var ts; if (typeInfo && typeInfo.type === undefinedType) { return type; } - // If the type to be narrowed is any and we're checking a primitive with assumeTrue=true, return the primitive - if (!!(type.flags & 1 /* Any */) && typeInfo && assumeTrue) { - return typeInfo.type; - } var flags; if (typeInfo) { flags = typeInfo.flags; @@ -20397,6 +20623,10 @@ var ts; } // At this point we can bail if it's not a union if (!(type.flags & 16384 /* Union */)) { + // If we're on the true branch and the type is a subtype, we should return the primitive type + if (assumeTrue && typeInfo && isTypeSubtypeOf(typeInfo.type, type)) { + return typeInfo.type; + } // If the active non-union type would be removed from a union by this type guard, return an empty union return filterUnion(type) ? type : emptyUnionType; } @@ -20525,7 +20755,7 @@ var ts; return narrowTypeByThisTypePredicate(type, memberType.predicate, expr, assumeTrue); } function narrowTypeByThisTypePredicate(type, predicate, expression, assumeTrue) { - if (expression.kind === 169 /* ElementAccessExpression */ || expression.kind === 168 /* PropertyAccessExpression */) { + if (expression.kind === 170 /* ElementAccessExpression */ || expression.kind === 169 /* PropertyAccessExpression */) { var accessExpression = expression; var possibleIdentifier = skipParenthesizedNodes(accessExpression.expression); if (possibleIdentifier.kind === 69 /* Identifier */ && getSymbolAtTypePredicatePosition(possibleIdentifier) === symbol) { @@ -20538,8 +20768,8 @@ var ts; expr = skipParenthesizedNodes(expr); switch (expr.kind) { case 69 /* Identifier */: - case 168 /* PropertyAccessExpression */: - case 135 /* QualifiedName */: + case 169 /* PropertyAccessExpression */: + case 136 /* QualifiedName */: return getSymbolOfEntityNameOrPropertyAccessExpression(expr); } } @@ -20547,11 +20777,11 @@ var ts; // will be a subtype or the same type as the argument. function narrowType(type, expr, assumeTrue) { switch (expr.kind) { - case 170 /* CallExpression */: + case 171 /* CallExpression */: return narrowTypeByTypePredicate(type, expr, assumeTrue); - case 174 /* ParenthesizedExpression */: + case 175 /* ParenthesizedExpression */: return narrowType(type, expr.expression, assumeTrue); - case 183 /* BinaryExpression */: + case 184 /* BinaryExpression */: var operator = expr.operatorToken.kind; if (operator === 32 /* EqualsEqualsEqualsToken */ || operator === 33 /* ExclamationEqualsEqualsToken */) { return narrowTypeByEquality(type, expr, assumeTrue); @@ -20566,20 +20796,20 @@ var ts; return narrowTypeByInstanceof(type, expr, assumeTrue); } break; - case 181 /* PrefixUnaryExpression */: + case 182 /* PrefixUnaryExpression */: if (expr.operator === 49 /* ExclamationToken */) { return narrowType(type, expr.operand, !assumeTrue); } break; - case 169 /* ElementAccessExpression */: - case 168 /* PropertyAccessExpression */: + case 170 /* ElementAccessExpression */: + case 169 /* PropertyAccessExpression */: return narrowTypeByTypePredicateMember(type, expr, assumeTrue); } return type; } } function skipParenthesizedNodes(expression) { - while (expression.kind === 174 /* ParenthesizedExpression */) { + while (expression.kind === 175 /* ParenthesizedExpression */) { expression = expression.expression; } return expression; @@ -20594,7 +20824,7 @@ var ts; // can explicitly bound arguments objects if (symbol === argumentsSymbol) { var container = ts.getContainingFunction(node); - if (container.kind === 176 /* ArrowFunction */) { + if (container.kind === 177 /* ArrowFunction */) { if (languageVersion < 2 /* ES6 */) { error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); } @@ -20625,7 +20855,7 @@ var ts; function checkBlockScopedBindingCapturedInLoop(node, symbol) { if (languageVersion >= 2 /* ES6 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || - symbol.valueDeclaration.parent.kind === 246 /* CatchClause */) { + symbol.valueDeclaration.parent.kind === 247 /* CatchClause */) { return; } // 1. walk from the use site up to the declaration and check @@ -20641,12 +20871,12 @@ var ts; // nesting structure: // (variable declaration or binding element) -> variable declaration list -> container container = symbol.valueDeclaration; - while (container.kind !== 214 /* VariableDeclarationList */) { + while (container.kind !== 215 /* VariableDeclarationList */) { container = container.parent; } // get the parent of variable declaration list container = container.parent; - if (container.kind === 195 /* VariableStatement */) { + if (container.kind === 196 /* VariableStatement */) { // if parent is variable statement - get its parent container = container.parent; } @@ -20667,7 +20897,7 @@ var ts; } function captureLexicalThis(node, container) { getNodeLinks(node).flags |= 2 /* LexicalThis */; - if (container.kind === 141 /* PropertyDeclaration */ || container.kind === 144 /* Constructor */) { + if (container.kind === 142 /* PropertyDeclaration */ || container.kind === 145 /* Constructor */) { var classNode = container.parent; getNodeLinks(classNode).flags |= 4 /* CaptureThis */; } @@ -20681,32 +20911,32 @@ var ts; var container = ts.getThisContainer(node, /* includeArrowFunctions */ true); var needToCaptureLexicalThis = false; // Now skip arrow functions to get the "real" owner of 'this'. - if (container.kind === 176 /* ArrowFunction */) { + if (container.kind === 177 /* ArrowFunction */) { container = ts.getThisContainer(container, /* includeArrowFunctions */ false); // When targeting es6, arrow function lexically bind "this" so we do not need to do the work of binding "this" in emitted code needToCaptureLexicalThis = (languageVersion < 2 /* ES6 */); } switch (container.kind) { - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks break; - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: error(node, ts.Diagnostics.this_cannot_be_referenced_in_current_location); // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks break; - case 144 /* Constructor */: + case 145 /* Constructor */: if (isInConstructorArgumentInitializer(node, container)) { error(node, ts.Diagnostics.this_cannot_be_referenced_in_constructor_arguments); } break; - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: if (container.flags & 64 /* Static */) { error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer); } break; - case 136 /* ComputedPropertyName */: + case 137 /* ComputedPropertyName */: error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); break; } @@ -20719,7 +20949,7 @@ var ts; } // If this is a function in a JS file, it might be a class method. Check if it's the RHS // of a x.prototype.y = function [name]() { .... } - if (ts.isInJavaScriptFile(node) && container.kind === 175 /* FunctionExpression */) { + if (ts.isInJavaScriptFile(node) && container.kind === 176 /* FunctionExpression */) { if (ts.getSpecialPropertyAssignmentKind(container.parent) === 3 /* PrototypeProperty */) { // Get the 'x' of 'x.prototype.y = f' (here, 'f' is 'container') var className = container.parent // x.protoype.y = f @@ -20736,19 +20966,19 @@ var ts; } function isInConstructorArgumentInitializer(node, constructorDecl) { for (var n = node; n && n !== constructorDecl; n = n.parent) { - if (n.kind === 138 /* Parameter */) { + if (n.kind === 139 /* Parameter */) { return true; } } return false; } function checkSuperExpression(node) { - var isCallExpression = node.parent.kind === 170 /* CallExpression */ && node.parent.expression === node; + var isCallExpression = node.parent.kind === 171 /* CallExpression */ && node.parent.expression === node; var container = ts.getSuperContainer(node, /*stopOnFunctions*/ true); var needToCaptureLexicalThis = false; if (!isCallExpression) { // adjust the container reference in case if super is used inside arrow functions with arbitrary deep nesting - while (container && container.kind === 176 /* ArrowFunction */) { + while (container && container.kind === 177 /* ArrowFunction */) { container = ts.getSuperContainer(container, /*stopOnFunctions*/ true); needToCaptureLexicalThis = languageVersion < 2 /* ES6 */; } @@ -20762,16 +20992,16 @@ var ts; // [super.foo()]() {} // } var current = node; - while (current && current !== container && current.kind !== 136 /* ComputedPropertyName */) { + while (current && current !== container && current.kind !== 137 /* ComputedPropertyName */) { current = current.parent; } - if (current && current.kind === 136 /* ComputedPropertyName */) { + if (current && current.kind === 137 /* ComputedPropertyName */) { error(node, ts.Diagnostics.super_cannot_be_referenced_in_a_computed_property_name); } else if (isCallExpression) { error(node, ts.Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors); } - else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 167 /* ObjectLiteralExpression */)) { + else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 168 /* ObjectLiteralExpression */)) { error(node, ts.Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions); } else { @@ -20792,7 +21022,7 @@ var ts; // in this case they should also use correct lexical this captureLexicalThis(node.parent, container); } - if (container.parent.kind === 167 /* ObjectLiteralExpression */) { + if (container.parent.kind === 168 /* ObjectLiteralExpression */) { if (languageVersion < 2 /* ES6 */) { error(node, ts.Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher); return unknownType; @@ -20812,7 +21042,7 @@ var ts; } return unknownType; } - if (container.kind === 144 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { + if (container.kind === 145 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { // issue custom error message for super property access in constructor arguments (to be aligned with old compiler) error(node, ts.Diagnostics.super_cannot_be_referenced_in_constructor_arguments); return unknownType; @@ -20827,7 +21057,7 @@ var ts; if (isCallExpression) { // TS 1.0 SPEC (April 2014): 4.8.1 // Super calls are only permitted in constructors of derived classes - return container.kind === 144 /* Constructor */; + return container.kind === 145 /* Constructor */; } else { // TS 1.0 SPEC (April 2014) @@ -20835,21 +21065,21 @@ var ts; // - In a constructor, instance member function, instance member accessor, or instance member variable initializer where this references a derived class instance // - In a static member function or static member accessor // topmost container must be something that is directly nested in the class declaration\object literal expression - if (ts.isClassLike(container.parent) || container.parent.kind === 167 /* ObjectLiteralExpression */) { + if (ts.isClassLike(container.parent) || container.parent.kind === 168 /* ObjectLiteralExpression */) { if (container.flags & 64 /* Static */) { - return container.kind === 143 /* MethodDeclaration */ || - container.kind === 142 /* MethodSignature */ || - container.kind === 145 /* GetAccessor */ || - container.kind === 146 /* SetAccessor */; + return container.kind === 144 /* MethodDeclaration */ || + container.kind === 143 /* MethodSignature */ || + container.kind === 146 /* GetAccessor */ || + container.kind === 147 /* SetAccessor */; } else { - return container.kind === 143 /* MethodDeclaration */ || - container.kind === 142 /* MethodSignature */ || - container.kind === 145 /* GetAccessor */ || - container.kind === 146 /* SetAccessor */ || - container.kind === 141 /* PropertyDeclaration */ || - container.kind === 140 /* PropertySignature */ || - container.kind === 144 /* Constructor */; + return container.kind === 144 /* MethodDeclaration */ || + container.kind === 143 /* MethodSignature */ || + container.kind === 146 /* GetAccessor */ || + container.kind === 147 /* SetAccessor */ || + container.kind === 142 /* PropertyDeclaration */ || + container.kind === 141 /* PropertySignature */ || + container.kind === 145 /* Constructor */; } } } @@ -20891,7 +21121,7 @@ var ts; if (declaration.type) { return getTypeFromTypeNode(declaration.type); } - if (declaration.kind === 138 /* Parameter */) { + if (declaration.kind === 139 /* Parameter */) { var type = getContextuallyTypedParameterType(declaration); if (type) { return type; @@ -20924,7 +21154,7 @@ var ts; } function isInParameterInitializerBeforeContainingFunction(node) { while (node.parent && !ts.isFunctionLike(node.parent)) { - if (node.parent.kind === 138 /* Parameter */ && node.parent.initializer === node) { + if (node.parent.kind === 139 /* Parameter */ && node.parent.initializer === node) { return true; } node = node.parent; @@ -20935,8 +21165,8 @@ var ts; // If the containing function has a return type annotation, is a constructor, or is a get accessor whose // corresponding set accessor has a type annotation, return statements in the function are contextually typed if (functionDecl.type || - functionDecl.kind === 144 /* Constructor */ || - functionDecl.kind === 145 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 146 /* SetAccessor */))) { + functionDecl.kind === 145 /* Constructor */ || + functionDecl.kind === 146 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 147 /* SetAccessor */))) { return getReturnTypeOfSignature(getSignatureFromDeclaration(functionDecl)); } // Otherwise, if the containing function is contextually typed by a function type with exactly one call signature @@ -20958,7 +21188,7 @@ var ts; return undefined; } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { - if (template.parent.kind === 172 /* TaggedTemplateExpression */) { + if (template.parent.kind === 173 /* TaggedTemplateExpression */) { return getContextualTypeForArgument(template.parent, substitutionExpression); } return undefined; @@ -21089,13 +21319,13 @@ var ts; var kind = attribute.kind; var jsxElement = attribute.parent; var attrsType = getJsxElementAttributesType(jsxElement); - if (attribute.kind === 240 /* JsxAttribute */) { + if (attribute.kind === 241 /* JsxAttribute */) { if (!attrsType || isTypeAny(attrsType)) { return undefined; } return getTypeOfPropertyOfType(attrsType, attribute.name.text); } - else if (attribute.kind === 241 /* JsxSpreadAttribute */) { + else if (attribute.kind === 242 /* JsxSpreadAttribute */) { return attrsType; } ts.Debug.fail("Expected JsxAttribute or JsxSpreadAttribute, got ts.SyntaxKind[" + kind + "]"); @@ -21133,40 +21363,40 @@ var ts; } var parent = node.parent; switch (parent.kind) { - case 213 /* VariableDeclaration */: - case 138 /* Parameter */: - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 165 /* BindingElement */: + case 214 /* VariableDeclaration */: + case 139 /* Parameter */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 166 /* BindingElement */: return getContextualTypeForInitializerExpression(node); - case 176 /* ArrowFunction */: - case 206 /* ReturnStatement */: + case 177 /* ArrowFunction */: + case 207 /* ReturnStatement */: return getContextualTypeForReturnExpression(node); - case 186 /* YieldExpression */: + case 187 /* YieldExpression */: return getContextualTypeForYieldOperand(parent); - case 170 /* CallExpression */: - case 171 /* NewExpression */: + case 171 /* CallExpression */: + case 172 /* NewExpression */: return getContextualTypeForArgument(parent, node); - case 173 /* TypeAssertionExpression */: - case 191 /* AsExpression */: + case 174 /* TypeAssertionExpression */: + case 192 /* AsExpression */: return getTypeFromTypeNode(parent.type); - case 183 /* BinaryExpression */: + case 184 /* BinaryExpression */: return getContextualTypeForBinaryOperand(node); - case 247 /* PropertyAssignment */: + case 248 /* PropertyAssignment */: return getContextualTypeForObjectLiteralElement(parent); - case 166 /* ArrayLiteralExpression */: + case 167 /* ArrayLiteralExpression */: return getContextualTypeForElementExpression(node); - case 184 /* ConditionalExpression */: + case 185 /* ConditionalExpression */: return getContextualTypeForConditionalOperand(node); - case 192 /* TemplateSpan */: - ts.Debug.assert(parent.parent.kind === 185 /* TemplateExpression */); + case 193 /* TemplateSpan */: + ts.Debug.assert(parent.parent.kind === 186 /* TemplateExpression */); return getContextualTypeForSubstitutionExpression(parent.parent, node); - case 174 /* ParenthesizedExpression */: + case 175 /* ParenthesizedExpression */: return getContextualType(parent); - case 242 /* JsxExpression */: + case 243 /* JsxExpression */: return getContextualType(parent); - case 240 /* JsxAttribute */: - case 241 /* JsxSpreadAttribute */: + case 241 /* JsxAttribute */: + case 242 /* JsxSpreadAttribute */: return getContextualTypeForJsxAttribute(parent); } return undefined; @@ -21183,7 +21413,7 @@ var ts; } } function isFunctionExpressionOrArrowFunction(node) { - return node.kind === 175 /* FunctionExpression */ || node.kind === 176 /* ArrowFunction */; + return node.kind === 176 /* FunctionExpression */ || node.kind === 177 /* ArrowFunction */; } function getContextualSignatureForFunctionLikeDeclaration(node) { // Only function expressions, arrow functions, and object literal methods are contextually typed. @@ -21197,7 +21427,7 @@ var ts; // all identical ignoring their return type, the result is same signature but with return type as // union type of return types from these signatures function getContextualSignature(node) { - ts.Debug.assert(node.kind !== 143 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 144 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); var type = ts.isObjectLiteralMethod(node) ? getContextualTypeForObjectLiteralMethod(node) : getApparentTypeOfContextualType(node); @@ -21260,13 +21490,13 @@ var ts; // an assignment target. Examples include 'a = xxx', '{ p: a } = xxx', '[{ p: a}] = xxx'. function isAssignmentTarget(node) { var parent = node.parent; - if (parent.kind === 183 /* BinaryExpression */ && parent.operatorToken.kind === 56 /* EqualsToken */ && parent.left === node) { + if (parent.kind === 184 /* BinaryExpression */ && parent.operatorToken.kind === 56 /* EqualsToken */ && parent.left === node) { return true; } - if (parent.kind === 247 /* PropertyAssignment */) { + if (parent.kind === 248 /* PropertyAssignment */) { return isAssignmentTarget(parent.parent); } - if (parent.kind === 166 /* ArrayLiteralExpression */) { + if (parent.kind === 167 /* ArrayLiteralExpression */) { return isAssignmentTarget(parent); } return false; @@ -21282,8 +21512,8 @@ var ts; return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, /*allowStringInput*/ false); } function hasDefaultValue(node) { - return (node.kind === 165 /* BindingElement */ && !!node.initializer) || - (node.kind === 183 /* BinaryExpression */ && node.operatorToken.kind === 56 /* EqualsToken */); + return (node.kind === 166 /* BindingElement */ && !!node.initializer) || + (node.kind === 184 /* BinaryExpression */ && node.operatorToken.kind === 56 /* EqualsToken */); } function checkArrayLiteral(node, contextualMapper) { var elements = node.elements; @@ -21292,7 +21522,7 @@ var ts; var inDestructuringPattern = isAssignmentTarget(node); for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) { var e = elements_1[_i]; - if (inDestructuringPattern && e.kind === 187 /* SpreadElementExpression */) { + if (inDestructuringPattern && e.kind === 188 /* SpreadElementExpression */) { // Given the following situation: // var c: {}; // [...c] = ["", 0]; @@ -21316,7 +21546,7 @@ var ts; var type = checkExpression(e, contextualMapper); elementTypes.push(type); } - hasSpreadElement = hasSpreadElement || e.kind === 187 /* SpreadElementExpression */; + hasSpreadElement = hasSpreadElement || e.kind === 188 /* SpreadElementExpression */; } if (!hasSpreadElement) { // If array literal is actually a destructuring pattern, mark it as an implied type. We do this such @@ -21331,7 +21561,7 @@ var ts; var pattern = contextualType.pattern; // If array literal is contextually typed by a binding pattern or an assignment pattern, pad the resulting // tuple type with the corresponding binding or assignment element types to make the lengths equal. - if (pattern && (pattern.kind === 164 /* ArrayBindingPattern */ || pattern.kind === 166 /* ArrayLiteralExpression */)) { + if (pattern && (pattern.kind === 165 /* ArrayBindingPattern */ || pattern.kind === 167 /* ArrayLiteralExpression */)) { var patternElements = pattern.elements; for (var i = elementTypes.length; i < patternElements.length; i++) { var patternElement = patternElements[i]; @@ -21339,7 +21569,7 @@ var ts; elementTypes.push(contextualType.elementTypes[i]); } else { - if (patternElement.kind !== 189 /* OmittedExpression */) { + if (patternElement.kind !== 190 /* OmittedExpression */) { error(patternElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value); } elementTypes.push(unknownType); @@ -21354,7 +21584,7 @@ var ts; return createArrayType(elementTypes.length ? getUnionType(elementTypes) : undefinedType); } function isNumericName(name) { - return name.kind === 136 /* ComputedPropertyName */ ? isNumericComputedName(name) : isNumericLiteralName(name.text); + return name.kind === 137 /* ComputedPropertyName */ ? isNumericComputedName(name) : isNumericLiteralName(name.text); } function isNumericComputedName(name) { // It seems odd to consider an expression of type Any to result in a numeric name, @@ -21411,24 +21641,24 @@ var ts; var propertiesArray = []; var contextualType = getApparentTypeOfContextualType(node); var contextualTypeHasPattern = contextualType && contextualType.pattern && - (contextualType.pattern.kind === 163 /* ObjectBindingPattern */ || contextualType.pattern.kind === 167 /* ObjectLiteralExpression */); + (contextualType.pattern.kind === 164 /* ObjectBindingPattern */ || contextualType.pattern.kind === 168 /* ObjectLiteralExpression */); var typeFlags = 0; var patternWithComputedProperties = false; for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var memberDecl = _a[_i]; var member = memberDecl.symbol; - if (memberDecl.kind === 247 /* PropertyAssignment */ || - memberDecl.kind === 248 /* ShorthandPropertyAssignment */ || + if (memberDecl.kind === 248 /* PropertyAssignment */ || + memberDecl.kind === 249 /* ShorthandPropertyAssignment */ || ts.isObjectLiteralMethod(memberDecl)) { var type = void 0; - if (memberDecl.kind === 247 /* PropertyAssignment */) { + if (memberDecl.kind === 248 /* PropertyAssignment */) { type = checkPropertyAssignment(memberDecl, contextualMapper); } - else if (memberDecl.kind === 143 /* MethodDeclaration */) { + else if (memberDecl.kind === 144 /* MethodDeclaration */) { type = checkObjectLiteralMethod(memberDecl, contextualMapper); } else { - ts.Debug.assert(memberDecl.kind === 248 /* ShorthandPropertyAssignment */); + ts.Debug.assert(memberDecl.kind === 249 /* ShorthandPropertyAssignment */); type = checkExpression(memberDecl.name, contextualMapper); } typeFlags |= type.flags; @@ -21436,8 +21666,8 @@ var ts; if (inDestructuringPattern) { // If object literal is an assignment pattern and if the assignment pattern specifies a default value // for the property, make the property optional. - var isOptional = (memberDecl.kind === 247 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer)) || - (memberDecl.kind === 248 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer); + var isOptional = (memberDecl.kind === 248 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer)) || + (memberDecl.kind === 249 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer); if (isOptional) { prop.flags |= 536870912 /* Optional */; } @@ -21471,7 +21701,7 @@ var ts; // an ordinary function declaration(section 6.1) with no parameters. // A set accessor declaration is processed in the same manner // as an ordinary function declaration with a single parameter and a Void return type. - ts.Debug.assert(memberDecl.kind === 145 /* GetAccessor */ || memberDecl.kind === 146 /* SetAccessor */); + ts.Debug.assert(memberDecl.kind === 146 /* GetAccessor */ || memberDecl.kind === 147 /* SetAccessor */); checkAccessorDeclaration(memberDecl); } if (!ts.hasDynamicName(memberDecl)) { @@ -21538,13 +21768,13 @@ var ts; for (var _i = 0, _a = node.children; _i < _a.length; _i++) { var child = _a[_i]; switch (child.kind) { - case 242 /* JsxExpression */: + case 243 /* JsxExpression */: checkJsxExpression(child); break; - case 235 /* JsxElement */: + case 236 /* JsxElement */: checkJsxElement(child); break; - case 236 /* JsxSelfClosingElement */: + case 237 /* JsxSelfClosingElement */: checkJsxSelfClosingElement(child); break; } @@ -21562,7 +21792,7 @@ var ts; * Returns true iff React would emit this tag name as a string rather than an identifier or qualified name */ function isJsxIntrinsicIdentifier(tagName) { - if (tagName.kind === 135 /* QualifiedName */) { + if (tagName.kind === 136 /* QualifiedName */) { return false; } else { @@ -21672,6 +21902,7 @@ var ts; if (compilerOptions.noImplicitAny) { error(node, ts.Diagnostics.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists, JsxNames.IntrinsicElements); } + return unknownSymbol; } } function lookupClassTag(node) { @@ -21771,21 +22002,25 @@ var ts; if (links.jsxFlags & 4 /* ValueElement */) { // Get the element instance type (the result of newing or invoking this tag) var elemInstanceType = getJsxElementInstanceType(node); - // Is this is a stateless function component? See if its single signature is - // assignable to the JSX Element Type - var callSignature = getSingleCallSignature(getTypeOfSymbol(sym)); - var callReturnType = callSignature && getReturnTypeOfSignature(callSignature); - var paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0])); - if (callReturnType && isTypeAssignableTo(callReturnType, jsxElementType) && (paramType.flags & 80896 /* ObjectType */)) { - // Intersect in JSX.IntrinsicAttributes if it exists - var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes); - if (intrinsicAttributes !== unknownType) { - paramType = intersectTypes(intrinsicAttributes, paramType); + var elemClassType = getJsxGlobalElementClassType(); + if (!elemClassType || !isTypeAssignableTo(elemInstanceType, elemClassType)) { + // Is this is a stateless function component? See if its single signature's return type is + // assignable to the JSX Element Type + var elemType = getTypeOfSymbol(sym); + var callSignatures = elemType && getSignaturesOfType(elemType, 0 /* Call */); + var callSignature = callSignatures && callSignatures.length > 0 && callSignatures[0]; + var callReturnType = callSignature && getReturnTypeOfSignature(callSignature); + var paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0])); + if (callReturnType && isTypeAssignableTo(callReturnType, jsxElementType)) { + // Intersect in JSX.IntrinsicAttributes if it exists + var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes); + if (intrinsicAttributes !== unknownType) { + paramType = intersectTypes(intrinsicAttributes, paramType); + } + return links.resolvedJsxType = paramType; } - return paramType; } // Issue an error if this return type isn't assignable to JSX.ElementClass - var elemClassType = getJsxGlobalElementClassType(); if (elemClassType) { checkTypeRelatedTo(elemInstanceType, elemClassType, assignableRelation, node, ts.Diagnostics.JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements); } @@ -21902,11 +22137,11 @@ var ts; // thus should have their types ignored var sawSpreadedAny = false; for (var i = node.attributes.length - 1; i >= 0; i--) { - if (node.attributes[i].kind === 240 /* JsxAttribute */) { + if (node.attributes[i].kind === 241 /* JsxAttribute */) { checkJsxAttribute((node.attributes[i]), targetAttributesType, nameTable); } else { - ts.Debug.assert(node.attributes[i].kind === 241 /* JsxSpreadAttribute */); + ts.Debug.assert(node.attributes[i].kind === 242 /* JsxSpreadAttribute */); var spreadType = checkJsxSpreadAttribute((node.attributes[i]), targetAttributesType, nameTable); if (isTypeAny(spreadType)) { sawSpreadedAny = true; @@ -21936,7 +22171,7 @@ var ts; // If a symbol is a synthesized symbol with no value declaration, we assume it is a property. Example of this are the synthesized // '.prototype' property as well as synthesized tuple index properties. function getDeclarationKindFromSymbol(s) { - return s.valueDeclaration ? s.valueDeclaration.kind : 141 /* PropertyDeclaration */; + return s.valueDeclaration ? s.valueDeclaration.kind : 142 /* PropertyDeclaration */; } function getDeclarationFlagsFromSymbol(s) { return s.valueDeclaration ? ts.getCombinedNodeFlags(s.valueDeclaration) : s.flags & 134217728 /* Prototype */ ? 8 /* Public */ | 64 /* Static */ : 0; @@ -21953,7 +22188,7 @@ var ts; var flags = getDeclarationFlagsFromSymbol(prop); var declaringClass = getDeclaredTypeOfSymbol(prop.parent); if (left.kind === 95 /* SuperKeyword */) { - var errorNode = node.kind === 168 /* PropertyAccessExpression */ ? + var errorNode = node.kind === 169 /* PropertyAccessExpression */ ? node.name : node.right; // TS 1.0 spec (April 2014): 4.8.2 @@ -21963,7 +22198,7 @@ var ts; // - In a static member function or static member accessor // where this references the constructor function object of a derived class, // a super property access is permitted and must specify a public static member function of the base class. - if (languageVersion < 2 /* ES6 */ && getDeclarationKindFromSymbol(prop) !== 143 /* MethodDeclaration */) { + if (languageVersion < 2 /* ES6 */ && getDeclarationKindFromSymbol(prop) !== 144 /* MethodDeclaration */) { // `prop` refers to a *property* declared in the super class // rather than a *method*, so it does not satisfy the above criteria. error(errorNode, ts.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword); @@ -22050,7 +22285,7 @@ var ts; return getTypeOfSymbol(prop); } function isValidPropertyAccess(node, propertyName) { - var left = node.kind === 168 /* PropertyAccessExpression */ + var left = node.kind === 169 /* PropertyAccessExpression */ ? node.expression : node.left; var type = checkExpression(left); @@ -22062,11 +22297,58 @@ var ts; } return true; } + /** + * Return the symbol of the for-in variable declared or referenced by the given for-in statement. + */ + function getForInVariableSymbol(node) { + var initializer = node.initializer; + if (initializer.kind === 215 /* VariableDeclarationList */) { + var variable = initializer.declarations[0]; + if (variable && !ts.isBindingPattern(variable.name)) { + return getSymbolOfNode(variable); + } + } + else if (initializer.kind === 69 /* Identifier */) { + return getResolvedSymbol(initializer); + } + return undefined; + } + /** + * Return true if the given type is considered to have numeric property names. + */ + function hasNumericPropertyNames(type) { + return getIndexTypeOfType(type, 1 /* Number */) && !getIndexTypeOfType(type, 0 /* String */); + } + /** + * Return true if given node is an expression consisting of an identifier (possibly parenthesized) + * that references a for-in variable for an object with numeric property names. + */ + function isForInVariableForNumericPropertyNames(expr) { + var e = skipParenthesizedNodes(expr); + if (e.kind === 69 /* Identifier */) { + var symbol = getResolvedSymbol(e); + if (symbol.flags & 3 /* Variable */) { + var child = expr; + var node = expr.parent; + while (node) { + if (node.kind === 203 /* ForInStatement */ && + child === node.statement && + getForInVariableSymbol(node) === symbol && + hasNumericPropertyNames(checkExpression(node.expression))) { + return true; + } + child = node; + node = node.parent; + } + } + } + return false; + } function checkIndexedAccess(node) { // Grammar checking if (!node.argumentExpression) { - var sourceFile = getSourceFile(node); - if (node.parent.kind === 171 /* NewExpression */ && node.parent.expression === node) { + var sourceFile = ts.getSourceFileOfNode(node); + if (node.parent.kind === 172 /* NewExpression */ && node.parent.expression === node) { var start = ts.skipTrivia(sourceFile.text, node.expression.end); var end = node.end; grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead); @@ -22115,7 +22397,7 @@ var ts; // Check for compatible indexer types. if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 258 /* StringLike */ | 132 /* NumberLike */ | 16777216 /* ESSymbol */)) { // Try to use a number indexer. - if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 132 /* NumberLike */)) { + if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 132 /* NumberLike */) || isForInVariableForNumericPropertyNames(node.argumentExpression)) { var numberIndexType = getIndexTypeOfType(objectType, 1 /* Number */); if (numberIndexType) { return numberIndexType; @@ -22128,7 +22410,9 @@ var ts; } // Fall back to any. if (compilerOptions.noImplicitAny && !compilerOptions.suppressImplicitAnyIndexErrors && !isTypeAny(objectType)) { - error(node, ts.Diagnostics.Index_signature_of_object_type_implicitly_has_an_any_type); + error(node, getIndexTypeOfType(objectType, 1 /* Number */) ? + ts.Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number : + ts.Diagnostics.Index_signature_of_object_type_implicitly_has_an_any_type); } return anyType; } @@ -22147,7 +22431,7 @@ var ts; if (indexArgumentExpression.kind === 9 /* StringLiteral */ || indexArgumentExpression.kind === 8 /* NumericLiteral */) { return indexArgumentExpression.text; } - if (indexArgumentExpression.kind === 169 /* ElementAccessExpression */ || indexArgumentExpression.kind === 168 /* PropertyAccessExpression */) { + if (indexArgumentExpression.kind === 170 /* ElementAccessExpression */ || indexArgumentExpression.kind === 169 /* PropertyAccessExpression */) { var value = getConstantValue(indexArgumentExpression); if (value !== undefined) { return value.toString(); @@ -22202,10 +22486,10 @@ var ts; return true; } function resolveUntypedCall(node) { - if (node.kind === 172 /* TaggedTemplateExpression */) { + if (node.kind === 173 /* TaggedTemplateExpression */) { checkExpression(node.template); } - else if (node.kind !== 139 /* Decorator */) { + else if (node.kind !== 140 /* Decorator */) { ts.forEach(node.arguments, function (argument) { checkExpression(argument); }); @@ -22271,7 +22555,7 @@ var ts; function getSpreadArgumentIndex(args) { for (var i = 0; i < args.length; i++) { var arg = args[i]; - if (arg && arg.kind === 187 /* SpreadElementExpression */) { + if (arg && arg.kind === 188 /* SpreadElementExpression */) { return i; } } @@ -22283,13 +22567,13 @@ var ts; var callIsIncomplete; // In incomplete call we want to be lenient when we have too few arguments var isDecorator; var spreadArgIndex = -1; - if (node.kind === 172 /* TaggedTemplateExpression */) { + if (node.kind === 173 /* TaggedTemplateExpression */) { var tagExpression = node; // Even if the call is incomplete, we'll have a missing expression as our last argument, // so we can say the count is just the arg list length adjustedArgCount = args.length; typeArguments = undefined; - if (tagExpression.template.kind === 185 /* TemplateExpression */) { + if (tagExpression.template.kind === 186 /* TemplateExpression */) { // If a tagged template expression lacks a tail literal, the call is incomplete. // Specifically, a template only can end in a TemplateTail or a Missing literal. var templateExpression = tagExpression.template; @@ -22306,7 +22590,7 @@ var ts; callIsIncomplete = !!templateLiteral.isUnterminated; } } - else if (node.kind === 139 /* Decorator */) { + else if (node.kind === 140 /* Decorator */) { isDecorator = true; typeArguments = undefined; adjustedArgCount = getEffectiveArgumentCount(node, /*args*/ undefined, signature); @@ -22315,7 +22599,7 @@ var ts; var callExpression = node; if (!callExpression.arguments) { // This only happens when we have something of the form: 'new C' - ts.Debug.assert(callExpression.kind === 171 /* NewExpression */); + ts.Debug.assert(callExpression.kind === 172 /* NewExpression */); return signature.minArgumentCount === 0; } // For IDE scenarios we may have an incomplete call, so a trailing comma is tantamount to adding another argument. @@ -22394,7 +22678,7 @@ var ts; for (var i = 0; i < argCount; i++) { var arg = getEffectiveArgument(node, args, i); // If the effective argument is 'undefined', then it is an argument that is present but is synthetic. - if (arg === undefined || arg.kind !== 189 /* OmittedExpression */) { + if (arg === undefined || arg.kind !== 190 /* OmittedExpression */) { var paramType = getTypeAtPosition(signature, i); var argType = getEffectiveArgumentType(node, i, arg); // If the effective argument type is 'undefined', there is no synthetic type @@ -22454,7 +22738,7 @@ var ts; for (var i = 0; i < argCount; i++) { var arg = getEffectiveArgument(node, args, i); // If the effective argument is 'undefined', then it is an argument that is present but is synthetic. - if (arg === undefined || arg.kind !== 189 /* OmittedExpression */) { + if (arg === undefined || arg.kind !== 190 /* OmittedExpression */) { // Check spread elements against rest type (from arity check we know spread argument corresponds to a rest parameter) var paramType = getTypeAtPosition(signature, i); var argType = getEffectiveArgumentType(node, i, arg); @@ -22486,16 +22770,16 @@ var ts; */ function getEffectiveCallArguments(node) { var args; - if (node.kind === 172 /* TaggedTemplateExpression */) { + if (node.kind === 173 /* TaggedTemplateExpression */) { var template = node.template; args = [undefined]; - if (template.kind === 185 /* TemplateExpression */) { + if (template.kind === 186 /* TemplateExpression */) { ts.forEach(template.templateSpans, function (span) { args.push(span.expression); }); } } - else if (node.kind === 139 /* Decorator */) { + else if (node.kind === 140 /* Decorator */) { // For a decorator, we return undefined as we will determine // the number and types of arguments for a decorator using // `getEffectiveArgumentCount` and `getEffectiveArgumentType` below. @@ -22520,19 +22804,19 @@ var ts; * Otherwise, the argument count is the length of the 'args' array. */ function getEffectiveArgumentCount(node, args, signature) { - if (node.kind === 139 /* Decorator */) { + if (node.kind === 140 /* Decorator */) { switch (node.parent.kind) { - case 216 /* ClassDeclaration */: - case 188 /* ClassExpression */: + case 217 /* ClassDeclaration */: + case 189 /* ClassExpression */: // A class decorator will have one argument (see `ClassDecorator` in core.d.ts) return 1; - case 141 /* PropertyDeclaration */: + case 142 /* PropertyDeclaration */: // A property declaration decorator will have two arguments (see // `PropertyDecorator` in core.d.ts) return 2; - case 143 /* MethodDeclaration */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: + case 144 /* MethodDeclaration */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: // A method or accessor declaration decorator will have two or three arguments (see // `PropertyDecorator` and `MethodDecorator` in core.d.ts) // If we are emitting decorators for ES3, we will only pass two arguments. @@ -22542,7 +22826,7 @@ var ts; // If the method decorator signature only accepts a target and a key, we will only // type check those arguments. return signature.parameters.length >= 3 ? 3 : 2; - case 138 /* Parameter */: + case 139 /* Parameter */: // A parameter declaration decorator will have three arguments (see // `ParameterDecorator` in core.d.ts) return 3; @@ -22566,25 +22850,25 @@ var ts; */ function getEffectiveDecoratorFirstArgumentType(node) { // The first argument to a decorator is its `target`. - if (node.kind === 216 /* ClassDeclaration */) { + if (node.kind === 217 /* ClassDeclaration */) { // For a class decorator, the `target` is the type of the class (e.g. the // "static" or "constructor" side of the class) var classSymbol = getSymbolOfNode(node); return getTypeOfSymbol(classSymbol); } - if (node.kind === 138 /* Parameter */) { + if (node.kind === 139 /* Parameter */) { // For a parameter decorator, the `target` is the parent type of the // parameter's containing method. node = node.parent; - if (node.kind === 144 /* Constructor */) { + if (node.kind === 145 /* Constructor */) { var classSymbol = getSymbolOfNode(node); return getTypeOfSymbol(classSymbol); } } - if (node.kind === 141 /* PropertyDeclaration */ || - node.kind === 143 /* MethodDeclaration */ || - node.kind === 145 /* GetAccessor */ || - node.kind === 146 /* SetAccessor */) { + if (node.kind === 142 /* PropertyDeclaration */ || + node.kind === 144 /* MethodDeclaration */ || + node.kind === 146 /* GetAccessor */ || + node.kind === 147 /* SetAccessor */) { // For a property or method decorator, the `target` is the // "static"-side type of the parent of the member if the member is // declared "static"; otherwise, it is the "instance"-side type of the @@ -22611,21 +22895,21 @@ var ts; */ function getEffectiveDecoratorSecondArgumentType(node) { // The second argument to a decorator is its `propertyKey` - if (node.kind === 216 /* ClassDeclaration */) { + if (node.kind === 217 /* ClassDeclaration */) { ts.Debug.fail("Class decorators should not have a second synthetic argument."); return unknownType; } - if (node.kind === 138 /* Parameter */) { + if (node.kind === 139 /* Parameter */) { node = node.parent; - if (node.kind === 144 /* Constructor */) { + if (node.kind === 145 /* Constructor */) { // For a constructor parameter decorator, the `propertyKey` will be `undefined`. return anyType; } } - if (node.kind === 141 /* PropertyDeclaration */ || - node.kind === 143 /* MethodDeclaration */ || - node.kind === 145 /* GetAccessor */ || - node.kind === 146 /* SetAccessor */) { + if (node.kind === 142 /* PropertyDeclaration */ || + node.kind === 144 /* MethodDeclaration */ || + node.kind === 146 /* GetAccessor */ || + node.kind === 147 /* SetAccessor */) { // The `propertyKey` for a property or method decorator will be a // string literal type if the member name is an identifier, number, or string; // otherwise, if the member name is a computed property name it will @@ -22636,7 +22920,7 @@ var ts; case 8 /* NumericLiteral */: case 9 /* StringLiteral */: return getStringLiteralTypeForText(element.name.text); - case 136 /* ComputedPropertyName */: + case 137 /* ComputedPropertyName */: var nameType = checkComputedPropertyName(element.name); if (allConstituentTypesHaveKind(nameType, 16777216 /* ESSymbol */)) { return nameType; @@ -22662,21 +22946,21 @@ var ts; function getEffectiveDecoratorThirdArgumentType(node) { // The third argument to a decorator is either its `descriptor` for a method decorator // or its `parameterIndex` for a paramter decorator - if (node.kind === 216 /* ClassDeclaration */) { + if (node.kind === 217 /* ClassDeclaration */) { ts.Debug.fail("Class decorators should not have a third synthetic argument."); return unknownType; } - if (node.kind === 138 /* Parameter */) { + if (node.kind === 139 /* Parameter */) { // The `parameterIndex` for a parameter decorator is always a number return numberType; } - if (node.kind === 141 /* PropertyDeclaration */) { + if (node.kind === 142 /* PropertyDeclaration */) { ts.Debug.fail("Property decorators should not have a third synthetic argument."); return unknownType; } - if (node.kind === 143 /* MethodDeclaration */ || - node.kind === 145 /* GetAccessor */ || - node.kind === 146 /* SetAccessor */) { + if (node.kind === 144 /* MethodDeclaration */ || + node.kind === 146 /* GetAccessor */ || + node.kind === 147 /* SetAccessor */) { // The `descriptor` for a method decorator will be a `TypedPropertyDescriptor` // for the type of the member. var propertyType = getTypeOfNode(node); @@ -22708,10 +22992,10 @@ var ts; // Decorators provide special arguments, a tagged template expression provides // a special first argument, and string literals get string literal types // unless we're reporting errors - if (node.kind === 139 /* Decorator */) { + if (node.kind === 140 /* Decorator */) { return getEffectiveDecoratorArgumentType(node, argIndex); } - else if (argIndex === 0 && node.kind === 172 /* TaggedTemplateExpression */) { + else if (argIndex === 0 && node.kind === 173 /* TaggedTemplateExpression */) { return globalTemplateStringsArrayType; } // This is not a synthetic argument, so we return 'undefined' @@ -22723,8 +23007,8 @@ var ts; */ function getEffectiveArgument(node, args, argIndex) { // For a decorator or the first argument of a tagged template expression we return undefined. - if (node.kind === 139 /* Decorator */ || - (argIndex === 0 && node.kind === 172 /* TaggedTemplateExpression */)) { + if (node.kind === 140 /* Decorator */ || + (argIndex === 0 && node.kind === 173 /* TaggedTemplateExpression */)) { return undefined; } return args[argIndex]; @@ -22733,11 +23017,11 @@ var ts; * Gets the error node to use when reporting errors for an effective argument. */ function getEffectiveArgumentErrorNode(node, argIndex, arg) { - if (node.kind === 139 /* Decorator */) { + if (node.kind === 140 /* Decorator */) { // For a decorator, we use the expression of the decorator for error reporting. return node.expression; } - else if (argIndex === 0 && node.kind === 172 /* TaggedTemplateExpression */) { + else if (argIndex === 0 && node.kind === 173 /* TaggedTemplateExpression */) { // For a the first argument of a tagged template expression, we use the template of the tag for error reporting. return node.template; } @@ -22746,8 +23030,8 @@ var ts; } } function resolveCall(node, signatures, candidatesOutArray, headMessage) { - var isTaggedTemplate = node.kind === 172 /* TaggedTemplateExpression */; - var isDecorator = node.kind === 139 /* Decorator */; + var isTaggedTemplate = node.kind === 173 /* TaggedTemplateExpression */; + var isDecorator = node.kind === 140 /* Decorator */; var typeArguments; if (!isTaggedTemplate && !isDecorator) { typeArguments = node.typeArguments; @@ -23093,16 +23377,16 @@ var ts; */ function getDiagnosticHeadMessageForDecoratorResolution(node) { switch (node.parent.kind) { - case 216 /* ClassDeclaration */: - case 188 /* ClassExpression */: + case 217 /* ClassDeclaration */: + case 189 /* ClassExpression */: return ts.Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression; - case 138 /* Parameter */: + case 139 /* Parameter */: return ts.Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression; - case 141 /* PropertyDeclaration */: + case 142 /* PropertyDeclaration */: return ts.Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression; - case 143 /* MethodDeclaration */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: + case 144 /* MethodDeclaration */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: return ts.Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression; } } @@ -23139,16 +23423,16 @@ var ts; // to correctly fill the candidatesOutArray. if (!links.resolvedSignature || candidatesOutArray) { links.resolvedSignature = anySignature; - if (node.kind === 170 /* CallExpression */) { + if (node.kind === 171 /* CallExpression */) { links.resolvedSignature = resolveCallExpression(node, candidatesOutArray); } - else if (node.kind === 171 /* NewExpression */) { + else if (node.kind === 172 /* NewExpression */) { links.resolvedSignature = resolveNewExpression(node, candidatesOutArray); } - else if (node.kind === 172 /* TaggedTemplateExpression */) { + else if (node.kind === 173 /* TaggedTemplateExpression */) { links.resolvedSignature = resolveTaggedTemplateExpression(node, candidatesOutArray); } - else if (node.kind === 139 /* Decorator */) { + else if (node.kind === 140 /* Decorator */) { links.resolvedSignature = resolveDecorator(node, candidatesOutArray); } else { @@ -23176,12 +23460,12 @@ var ts; if (node.expression.kind === 95 /* SuperKeyword */) { return voidType; } - if (node.kind === 171 /* NewExpression */) { + if (node.kind === 172 /* NewExpression */) { var declaration = signature.declaration; if (declaration && - declaration.kind !== 144 /* Constructor */ && - declaration.kind !== 148 /* ConstructSignature */ && - declaration.kind !== 153 /* ConstructorType */) { + declaration.kind !== 145 /* Constructor */ && + declaration.kind !== 149 /* ConstructSignature */ && + declaration.kind !== 154 /* ConstructorType */) { // When resolved signature is a call signature (and not a construct signature) the result type is any, unless // the declaring function had members created through 'x.prototype.y = expr' or 'this.y = expr' psuedodeclarations // in a JS file @@ -23242,7 +23526,7 @@ var ts; if (ts.isBindingPattern(node.name)) { for (var _i = 0, _a = node.name.elements; _i < _a.length; _i++) { var element = _a[_i]; - if (element.kind !== 189 /* OmittedExpression */) { + if (element.kind !== 190 /* OmittedExpression */) { if (element.name.kind === 69 /* Identifier */) { getSymbolLinks(getSymbolOfNode(element)).type = getTypeForBindingElement(element); } @@ -23307,7 +23591,7 @@ var ts; } var isAsync = ts.isAsyncFunctionLike(func); var type; - if (func.body.kind !== 194 /* Block */) { + if (func.body.kind !== 195 /* Block */) { type = checkExpressionCached(func.body, contextualMapper); if (isAsync) { // From within an async function you can return either a non-promise value or a promise. Any @@ -23437,7 +23721,7 @@ var ts; } // If all we have is a function signature, or an arrow function with an expression body, then there is nothing to check. // also if HasImplicitReturn flag is not set this means that all codepaths in function body end with return or throw - if (ts.nodeIsMissing(func.body) || func.body.kind !== 194 /* Block */ || !(func.flags & 524288 /* HasImplicitReturn */)) { + if (ts.nodeIsMissing(func.body) || func.body.kind !== 195 /* Block */ || !(func.flags & 524288 /* HasImplicitReturn */)) { return; } var hasExplicitReturn = func.flags & 1048576 /* HasExplicitReturn */; @@ -23463,20 +23747,16 @@ var ts; } } function checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper) { - ts.Debug.assert(node.kind !== 143 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 144 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); // Grammar checking var hasGrammarError = checkGrammarFunctionLikeDeclaration(node); - if (!hasGrammarError && node.kind === 175 /* FunctionExpression */) { + if (!hasGrammarError && node.kind === 176 /* FunctionExpression */) { checkGrammarForGenerator(node); } // The identityMapper object is used to indicate that function expressions are wildcards if (contextualMapper === identityMapper && isContextSensitive(node)) { return anyFunctionType; } - var isAsync = ts.isAsyncFunctionLike(node); - if (isAsync) { - emitAwaiter = true; - } var links = getNodeLinks(node); var type = getTypeOfSymbol(node.symbol); var contextSensitive = isContextSensitive(node); @@ -23510,18 +23790,15 @@ var ts; } } } - if (produceDiagnostics && node.kind !== 143 /* MethodDeclaration */ && node.kind !== 142 /* MethodSignature */) { + if (produceDiagnostics && node.kind !== 144 /* MethodDeclaration */ && node.kind !== 143 /* MethodSignature */) { checkCollisionWithCapturedSuperVariable(node, node.name); checkCollisionWithCapturedThisVariable(node, node.name); } return type; } function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) { - ts.Debug.assert(node.kind !== 143 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 144 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); var isAsync = ts.isAsyncFunctionLike(node); - if (isAsync) { - emitAwaiter = true; - } var returnOrPromisedType = node.type && (isAsync ? checkAsyncFunctionReturnType(node) : getTypeFromTypeNode(node.type)); if (!node.asteriskToken) { // return is not necessary in the body of generators @@ -23536,7 +23813,7 @@ var ts; // checkFunctionExpressionBodies). So it must be done now. getReturnTypeOfSignature(getSignatureFromDeclaration(node)); } - if (node.body.kind === 194 /* Block */) { + if (node.body.kind === 195 /* Block */) { checkSourceElement(node.body); } else { @@ -23588,17 +23865,17 @@ var ts; // An identifier expression that references any other kind of entity is classified as a value(and therefore cannot be the target of an assignment). return !symbol || symbol === unknownSymbol || symbol === argumentsSymbol || (symbol.flags & 3 /* Variable */) !== 0; } - case 168 /* PropertyAccessExpression */: { + case 169 /* PropertyAccessExpression */: { var symbol = findSymbol(n); // TypeScript 1.0 spec (April 2014): 4.10 // A property access expression is always classified as a reference. // NOTE (not in spec): assignment to enum members should not be allowed return !symbol || symbol === unknownSymbol || (symbol.flags & ~8 /* EnumMember */) !== 0; } - case 169 /* ElementAccessExpression */: + case 170 /* ElementAccessExpression */: // old compiler doesn't check indexed access return true; - case 174 /* ParenthesizedExpression */: + case 175 /* ParenthesizedExpression */: return isReferenceOrErrorExpression(n.expression); default: return false; @@ -23607,11 +23884,11 @@ var ts; function isConstVariableReference(n) { switch (n.kind) { case 69 /* Identifier */: - case 168 /* PropertyAccessExpression */: { + case 169 /* PropertyAccessExpression */: { var symbol = findSymbol(n); return symbol && (symbol.flags & 3 /* Variable */) !== 0 && (getDeclarationFlagsFromSymbol(symbol) & 16384 /* Const */) !== 0; } - case 169 /* ElementAccessExpression */: { + case 170 /* ElementAccessExpression */: { var index = n.argumentExpression; var symbol = findSymbol(n.expression); if (symbol && index && index.kind === 9 /* StringLiteral */) { @@ -23621,7 +23898,7 @@ var ts; } return false; } - case 174 /* ParenthesizedExpression */: + case 175 /* ParenthesizedExpression */: return isConstVariableReference(n.expression); default: return false; @@ -23767,9 +24044,9 @@ var ts; var properties = node.properties; for (var _i = 0, properties_3 = properties; _i < properties_3.length; _i++) { var p = properties_3[_i]; - if (p.kind === 247 /* PropertyAssignment */ || p.kind === 248 /* ShorthandPropertyAssignment */) { + if (p.kind === 248 /* PropertyAssignment */ || p.kind === 249 /* ShorthandPropertyAssignment */) { var name_13 = p.name; - if (name_13.kind === 136 /* ComputedPropertyName */) { + if (name_13.kind === 137 /* ComputedPropertyName */) { checkComputedPropertyName(name_13); } if (isComputedNonLiteralName(name_13)) { @@ -23782,7 +24059,7 @@ var ts; isNumericLiteralName(text) && getIndexTypeOfType(sourceType, 1 /* Number */) || getIndexTypeOfType(sourceType, 0 /* String */); if (type) { - if (p.kind === 248 /* ShorthandPropertyAssignment */) { + if (p.kind === 249 /* ShorthandPropertyAssignment */) { checkDestructuringAssignment(p, type); } else { @@ -23808,8 +24085,8 @@ var ts; var elements = node.elements; for (var i = 0; i < elements.length; i++) { var e = elements[i]; - if (e.kind !== 189 /* OmittedExpression */) { - if (e.kind !== 187 /* SpreadElementExpression */) { + if (e.kind !== 190 /* OmittedExpression */) { + if (e.kind !== 188 /* SpreadElementExpression */) { var propName = "" + i; var type = isTypeAny(sourceType) ? sourceType @@ -23834,7 +24111,7 @@ var ts; } else { var restExpression = e.expression; - if (restExpression.kind === 183 /* BinaryExpression */ && restExpression.operatorToken.kind === 56 /* EqualsToken */) { + if (restExpression.kind === 184 /* BinaryExpression */ && restExpression.operatorToken.kind === 56 /* EqualsToken */) { error(restExpression.operatorToken, ts.Diagnostics.A_rest_element_cannot_have_an_initializer); } else { @@ -23848,7 +24125,7 @@ var ts; } function checkDestructuringAssignment(exprOrAssignment, sourceType, contextualMapper) { var target; - if (exprOrAssignment.kind === 248 /* ShorthandPropertyAssignment */) { + if (exprOrAssignment.kind === 249 /* ShorthandPropertyAssignment */) { var prop = exprOrAssignment; if (prop.objectAssignmentInitializer) { checkBinaryLikeExpression(prop.name, prop.equalsToken, prop.objectAssignmentInitializer, contextualMapper); @@ -23858,14 +24135,14 @@ var ts; else { target = exprOrAssignment; } - if (target.kind === 183 /* BinaryExpression */ && target.operatorToken.kind === 56 /* EqualsToken */) { + if (target.kind === 184 /* BinaryExpression */ && target.operatorToken.kind === 56 /* EqualsToken */) { checkBinaryExpression(target, contextualMapper); target = target.left; } - if (target.kind === 167 /* ObjectLiteralExpression */) { + if (target.kind === 168 /* ObjectLiteralExpression */) { return checkObjectLiteralAssignment(target, sourceType, contextualMapper); } - if (target.kind === 166 /* ArrayLiteralExpression */) { + if (target.kind === 167 /* ArrayLiteralExpression */) { return checkArrayLiteralAssignment(target, sourceType, contextualMapper); } return checkReferenceAssignment(target, sourceType, contextualMapper); @@ -23882,7 +24159,7 @@ var ts; } function checkBinaryLikeExpression(left, operatorToken, right, contextualMapper, errorNode) { var operator = operatorToken.kind; - if (operator === 56 /* EqualsToken */ && (left.kind === 167 /* ObjectLiteralExpression */ || left.kind === 166 /* ArrayLiteralExpression */)) { + if (operator === 56 /* EqualsToken */ && (left.kind === 168 /* ObjectLiteralExpression */ || left.kind === 167 /* ArrayLiteralExpression */)) { return checkDestructuringAssignment(left, checkExpression(right, contextualMapper), contextualMapper); } var leftType = checkExpression(left, contextualMapper); @@ -24151,7 +24428,7 @@ var ts; // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including // well known symbols. - if (node.name.kind === 136 /* ComputedPropertyName */) { + if (node.name.kind === 137 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } return checkExpression(node.initializer, contextualMapper); @@ -24162,7 +24439,7 @@ var ts; // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including // well known symbols. - if (node.name.kind === 136 /* ComputedPropertyName */) { + if (node.name.kind === 137 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } var uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper); @@ -24192,7 +24469,7 @@ var ts; // contextually typed function and arrow expressions in the initial phase. function checkExpression(node, contextualMapper) { var type; - if (node.kind === 135 /* QualifiedName */) { + if (node.kind === 136 /* QualifiedName */) { type = checkQualifiedName(node); } else { @@ -24204,9 +24481,9 @@ var ts; // - 'left' in property access // - 'object' in indexed access // - target in rhs of import statement - var ok = (node.parent.kind === 168 /* PropertyAccessExpression */ && node.parent.expression === node) || - (node.parent.kind === 169 /* ElementAccessExpression */ && node.parent.expression === node) || - ((node.kind === 69 /* Identifier */ || node.kind === 135 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node)); + var ok = (node.parent.kind === 169 /* PropertyAccessExpression */ && node.parent.expression === node) || + (node.parent.kind === 170 /* ElementAccessExpression */ && node.parent.expression === node) || + ((node.kind === 69 /* Identifier */ || node.kind === 136 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node)); if (!ok) { error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment); } @@ -24233,7 +24510,7 @@ var ts; return booleanType; case 8 /* NumericLiteral */: return checkNumericLiteral(node); - case 185 /* TemplateExpression */: + case 186 /* TemplateExpression */: return checkTemplateExpression(node); case 9 /* StringLiteral */: return checkStringLiteralExpression(node); @@ -24241,58 +24518,58 @@ var ts; return stringType; case 10 /* RegularExpressionLiteral */: return globalRegExpType; - case 166 /* ArrayLiteralExpression */: + case 167 /* ArrayLiteralExpression */: return checkArrayLiteral(node, contextualMapper); - case 167 /* ObjectLiteralExpression */: + case 168 /* ObjectLiteralExpression */: return checkObjectLiteral(node, contextualMapper); - case 168 /* PropertyAccessExpression */: + case 169 /* PropertyAccessExpression */: return checkPropertyAccessExpression(node); - case 169 /* ElementAccessExpression */: + case 170 /* ElementAccessExpression */: return checkIndexedAccess(node); - case 170 /* CallExpression */: - case 171 /* NewExpression */: + case 171 /* CallExpression */: + case 172 /* NewExpression */: return checkCallExpression(node); - case 172 /* TaggedTemplateExpression */: + case 173 /* TaggedTemplateExpression */: return checkTaggedTemplateExpression(node); - case 174 /* ParenthesizedExpression */: + case 175 /* ParenthesizedExpression */: return checkExpression(node.expression, contextualMapper); - case 188 /* ClassExpression */: + case 189 /* ClassExpression */: return checkClassExpression(node); - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: return checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper); - case 178 /* TypeOfExpression */: + case 179 /* TypeOfExpression */: return checkTypeOfExpression(node); - case 173 /* TypeAssertionExpression */: - case 191 /* AsExpression */: + case 174 /* TypeAssertionExpression */: + case 192 /* AsExpression */: return checkAssertion(node); - case 177 /* DeleteExpression */: + case 178 /* DeleteExpression */: return checkDeleteExpression(node); - case 179 /* VoidExpression */: + case 180 /* VoidExpression */: return checkVoidExpression(node); - case 180 /* AwaitExpression */: + case 181 /* AwaitExpression */: return checkAwaitExpression(node); - case 181 /* PrefixUnaryExpression */: + case 182 /* PrefixUnaryExpression */: return checkPrefixUnaryExpression(node); - case 182 /* PostfixUnaryExpression */: + case 183 /* PostfixUnaryExpression */: return checkPostfixUnaryExpression(node); - case 183 /* BinaryExpression */: + case 184 /* BinaryExpression */: return checkBinaryExpression(node, contextualMapper); - case 184 /* ConditionalExpression */: + case 185 /* ConditionalExpression */: return checkConditionalExpression(node, contextualMapper); - case 187 /* SpreadElementExpression */: + case 188 /* SpreadElementExpression */: return checkSpreadElementExpression(node, contextualMapper); - case 189 /* OmittedExpression */: + case 190 /* OmittedExpression */: return undefinedType; - case 186 /* YieldExpression */: + case 187 /* YieldExpression */: return checkYieldExpression(node); - case 242 /* JsxExpression */: + case 243 /* JsxExpression */: return checkJsxExpression(node); - case 235 /* JsxElement */: + case 236 /* JsxElement */: return checkJsxElement(node); - case 236 /* JsxSelfClosingElement */: + case 237 /* JsxSelfClosingElement */: return checkJsxSelfClosingElement(node); - case 237 /* JsxOpeningElement */: + case 238 /* JsxOpeningElement */: ts.Debug.fail("Shouldn't ever directly check a JsxOpeningElement"); } return unknownType; @@ -24320,7 +24597,7 @@ var ts; var func = ts.getContainingFunction(node); if (node.flags & 56 /* AccessibilityModifier */) { func = ts.getContainingFunction(node); - if (!(func.kind === 144 /* Constructor */ && ts.nodeIsPresent(func.body))) { + if (!(func.kind === 145 /* Constructor */ && ts.nodeIsPresent(func.body))) { error(node, ts.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } } @@ -24337,9 +24614,9 @@ var ts; if (!node.asteriskToken || !node.body) { return false; } - return node.kind === 143 /* MethodDeclaration */ || - node.kind === 215 /* FunctionDeclaration */ || - node.kind === 175 /* FunctionExpression */; + return node.kind === 144 /* MethodDeclaration */ || + node.kind === 216 /* FunctionDeclaration */ || + node.kind === 176 /* FunctionExpression */; } function getTypePredicateParameterIndex(parameterList, parameter) { if (parameterList) { @@ -24353,105 +24630,98 @@ var ts; } return -1; } - function isInLegalParameterTypePredicatePosition(node) { - switch (node.parent.kind) { - case 176 /* ArrowFunction */: - case 147 /* CallSignature */: - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 152 /* FunctionType */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - return node === node.parent.type; + function checkTypePredicate(node) { + var parent = getTypePredicateParent(node); + if (!parent) { + return; + } + var returnType = getReturnTypeOfSignature(getSignatureFromDeclaration(parent)); + if (!returnType || !(returnType.flags & 134217728 /* PredicateType */)) { + return; + } + var parameterName = node.parameterName; + if (parameterName.kind === 162 /* ThisType */) { + getTypeFromThisTypeNode(parameterName); + } + else { + var typePredicate = returnType.predicate; + if (typePredicate.parameterIndex >= 0) { + if (parent.parameters[typePredicate.parameterIndex].dotDotDotToken) { + error(parameterName, ts.Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); + } + else { + checkTypeAssignableTo(typePredicate.type, getTypeOfNode(parent.parameters[typePredicate.parameterIndex]), node.type); + } + } + else if (parameterName) { + var hasReportedError = false; + for (var _i = 0, _a = parent.parameters; _i < _a.length; _i++) { + var name_14 = _a[_i].name; + if ((name_14.kind === 164 /* ObjectBindingPattern */ || + name_14.kind === 165 /* ArrayBindingPattern */) && + checkIfTypePredicateVariableIsDeclaredInBindingPattern(name_14, parameterName, typePredicate.parameterName)) { + hasReportedError = true; + break; + } + } + if (!hasReportedError) { + error(node.parameterName, ts.Diagnostics.Cannot_find_parameter_0, typePredicate.parameterName); + } + } } - return false; } - function isInLegalThisTypePredicatePosition(node) { - if (isInLegalParameterTypePredicatePosition(node)) { - return true; - } + function getTypePredicateParent(node) { switch (node.parent.kind) { - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 145 /* GetAccessor */: - return node === node.parent.type; + case 177 /* ArrowFunction */: + case 148 /* CallSignature */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 153 /* FunctionType */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + var parent_6 = node.parent; + if (node === parent_6.type) { + return parent_6; + } + } + } + function checkIfTypePredicateVariableIsDeclaredInBindingPattern(pattern, predicateVariableNode, predicateVariableName) { + for (var _i = 0, _a = pattern.elements; _i < _a.length; _i++) { + var name_15 = _a[_i].name; + if (name_15.kind === 69 /* Identifier */ && + name_15.text === predicateVariableName) { + error(predicateVariableNode, ts.Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, predicateVariableName); + return true; + } + else if (name_15.kind === 165 /* ArrayBindingPattern */ || + name_15.kind === 164 /* ObjectBindingPattern */) { + if (checkIfTypePredicateVariableIsDeclaredInBindingPattern(name_15, predicateVariableNode, predicateVariableName)) { + return true; + } + } } - return false; } function checkSignatureDeclaration(node) { // Grammar checking - if (node.kind === 149 /* IndexSignature */) { + if (node.kind === 150 /* IndexSignature */) { checkGrammarIndexSignature(node); } - else if (node.kind === 152 /* FunctionType */ || node.kind === 215 /* FunctionDeclaration */ || node.kind === 153 /* ConstructorType */ || - node.kind === 147 /* CallSignature */ || node.kind === 144 /* Constructor */ || - node.kind === 148 /* ConstructSignature */) { + else if (node.kind === 153 /* FunctionType */ || node.kind === 216 /* FunctionDeclaration */ || node.kind === 154 /* ConstructorType */ || + node.kind === 148 /* CallSignature */ || node.kind === 145 /* Constructor */ || + node.kind === 149 /* ConstructSignature */) { checkGrammarFunctionLikeDeclaration(node); } checkTypeParameters(node.typeParameters); ts.forEach(node.parameters, checkParameter); - if (node.type) { - if (node.type.kind === 150 /* TypePredicate */) { - var returnType = getReturnTypeOfSignature(getSignatureFromDeclaration(node)); - if (!returnType || !(returnType.flags & 134217728 /* PredicateType */)) { - return; - } - var typePredicate = returnType.predicate; - var typePredicateNode = node.type; - checkSourceElement(typePredicateNode); - if (ts.isIdentifierTypePredicate(typePredicate)) { - if (typePredicate.parameterIndex >= 0) { - if (node.parameters[typePredicate.parameterIndex].dotDotDotToken) { - error(typePredicateNode.parameterName, ts.Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); - } - else { - checkTypeAssignableTo(typePredicate.type, getTypeOfNode(node.parameters[typePredicate.parameterIndex]), typePredicateNode.type); - } - } - else if (typePredicateNode.parameterName) { - var hasReportedError = false; - for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) { - var param = _a[_i]; - if (hasReportedError) { - break; - } - if (param.name.kind === 163 /* ObjectBindingPattern */ || - param.name.kind === 164 /* ArrayBindingPattern */) { - (function checkBindingPattern(pattern) { - for (var _i = 0, _a = pattern.elements; _i < _a.length; _i++) { - var element = _a[_i]; - if (element.name.kind === 69 /* Identifier */ && - element.name.text === typePredicate.parameterName) { - error(typePredicateNode.parameterName, ts.Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, typePredicate.parameterName); - hasReportedError = true; - break; - } - else if (element.name.kind === 164 /* ArrayBindingPattern */ || - element.name.kind === 163 /* ObjectBindingPattern */) { - checkBindingPattern(element.name); - } - } - })(param.name); - } - } - if (!hasReportedError) { - error(typePredicateNode.parameterName, ts.Diagnostics.Cannot_find_parameter_0, typePredicate.parameterName); - } - } - } - } - else { - checkSourceElement(node.type); - } - } + checkSourceElement(node.type); if (produceDiagnostics) { checkCollisionWithArgumentsInGeneratedCode(node); if (compilerOptions.noImplicitAny && !node.type) { switch (node.kind) { - case 148 /* ConstructSignature */: + case 149 /* ConstructSignature */: error(node, ts.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; - case 147 /* CallSignature */: + case 148 /* CallSignature */: error(node, ts.Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; } @@ -24479,7 +24749,7 @@ var ts; checkSpecializedSignatureDeclaration(node); } function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 217 /* InterfaceDeclaration */) { + if (node.kind === 218 /* InterfaceDeclaration */) { var nodeSymbol = getSymbolOfNode(node); // in case of merging interface declaration it is possible that we'll enter this check procedure several times for every declaration // to prevent this run check only for the first declaration of a given kind @@ -24556,7 +24826,7 @@ var ts; return; } function isSuperCallExpression(n) { - return n.kind === 170 /* CallExpression */ && n.expression.kind === 95 /* SuperKeyword */; + return n.kind === 171 /* CallExpression */ && n.expression.kind === 95 /* SuperKeyword */; } function containsSuperCallAsComputedPropertyName(n) { return n.name && containsSuperCall(n.name); @@ -24577,12 +24847,12 @@ var ts; if (n.kind === 97 /* ThisKeyword */) { error(n, ts.Diagnostics.this_cannot_be_referenced_in_current_location); } - else if (n.kind !== 175 /* FunctionExpression */ && n.kind !== 215 /* FunctionDeclaration */) { + else if (n.kind !== 176 /* FunctionExpression */ && n.kind !== 216 /* FunctionDeclaration */) { ts.forEachChild(n, markThisReferencesAsErrors); } } function isInstancePropertyWithInitializer(n) { - return n.kind === 141 /* PropertyDeclaration */ && + return n.kind === 142 /* PropertyDeclaration */ && !(n.flags & 64 /* Static */) && !!n.initializer; } @@ -24612,7 +24882,7 @@ var ts; var superCallStatement; for (var _i = 0, statements_2 = statements; _i < statements_2.length; _i++) { var statement = statements_2[_i]; - if (statement.kind === 197 /* ExpressionStatement */ && isSuperCallExpression(statement.expression)) { + if (statement.kind === 198 /* ExpressionStatement */ && isSuperCallExpression(statement.expression)) { superCallStatement = statement; break; } @@ -24640,7 +24910,7 @@ var ts; checkGrammarFunctionLikeDeclaration(node) || checkGrammarAccessor(node) || checkGrammarComputedPropertyName(node.name); checkDecorators(node); checkSignatureDeclaration(node); - if (node.kind === 145 /* GetAccessor */) { + if (node.kind === 146 /* GetAccessor */) { if (!ts.isInAmbientContext(node) && ts.nodeIsPresent(node.body) && (node.flags & 524288 /* HasImplicitReturn */)) { if (node.flags & 1048576 /* HasExplicitReturn */) { if (compilerOptions.noImplicitReturns) { @@ -24655,13 +24925,13 @@ var ts; // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including // well known symbols. - if (node.name.kind === 136 /* ComputedPropertyName */) { + if (node.name.kind === 137 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (!ts.hasDynamicName(node)) { // TypeScript 1.0 spec (April 2014): 8.4.3 // Accessors for the same member name must specify the same accessibility. - var otherKind = node.kind === 145 /* GetAccessor */ ? 146 /* SetAccessor */ : 145 /* GetAccessor */; + var otherKind = node.kind === 146 /* GetAccessor */ ? 147 /* SetAccessor */ : 146 /* GetAccessor */; var otherAccessor = ts.getDeclarationOfKind(node.symbol, otherKind); if (otherAccessor) { if (((node.flags & 56 /* AccessibilityModifier */) !== (otherAccessor.flags & 56 /* AccessibilityModifier */))) { @@ -24680,7 +24950,7 @@ var ts; } getTypeOfAccessors(getSymbolOfNode(node)); } - if (node.parent.kind !== 167 /* ObjectLiteralExpression */) { + if (node.parent.kind !== 168 /* ObjectLiteralExpression */) { checkSourceElement(node.body); } else { @@ -24771,9 +25041,9 @@ var ts; var signaturesToCheck; // Unnamed (call\construct) signatures in interfaces are inherited and not shadowed so examining just node symbol won't give complete answer. // Use declaring type to obtain full list of signatures. - if (!signatureDeclarationNode.name && signatureDeclarationNode.parent && signatureDeclarationNode.parent.kind === 217 /* InterfaceDeclaration */) { - ts.Debug.assert(signatureDeclarationNode.kind === 147 /* CallSignature */ || signatureDeclarationNode.kind === 148 /* ConstructSignature */); - var signatureKind = signatureDeclarationNode.kind === 147 /* CallSignature */ ? 0 /* Call */ : 1 /* Construct */; + if (!signatureDeclarationNode.name && signatureDeclarationNode.parent && signatureDeclarationNode.parent.kind === 218 /* InterfaceDeclaration */) { + ts.Debug.assert(signatureDeclarationNode.kind === 148 /* CallSignature */ || signatureDeclarationNode.kind === 149 /* ConstructSignature */); + var signatureKind = signatureDeclarationNode.kind === 148 /* CallSignature */ ? 0 /* Call */ : 1 /* Construct */; var containingSymbol = getSymbolOfNode(signatureDeclarationNode.parent); var containingType = getDeclaredTypeOfSymbol(containingSymbol); signaturesToCheck = getSignaturesOfType(containingType, signatureKind); @@ -24793,9 +25063,9 @@ var ts; var flags = ts.getCombinedNodeFlags(n); // children of classes (even ambient classes) should not be marked as ambient or export // because those flags have no useful semantics there. - if (n.parent.kind !== 217 /* InterfaceDeclaration */ && - n.parent.kind !== 216 /* ClassDeclaration */ && - n.parent.kind !== 188 /* ClassExpression */ && + if (n.parent.kind !== 218 /* InterfaceDeclaration */ && + n.parent.kind !== 217 /* ClassDeclaration */ && + n.parent.kind !== 189 /* ClassExpression */ && ts.isInAmbientContext(n)) { if (!(flags & 4 /* Ambient */)) { // It is nested in an ambient context, which means it is automatically exported @@ -24883,7 +25153,7 @@ var ts; var errorNode_1 = subsequentNode.name || subsequentNode; // TODO(jfreeman): These are methods, so handle computed name case if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) { - var reportError = (node.kind === 143 /* MethodDeclaration */ || node.kind === 142 /* MethodSignature */) && + var reportError = (node.kind === 144 /* MethodDeclaration */ || node.kind === 143 /* MethodSignature */) && (node.flags & 64 /* Static */) !== (subsequentNode.flags & 64 /* Static */); // we can get here in two cases // 1. mixed static and instance class members @@ -24925,7 +25195,7 @@ var ts; var current = declarations_4[_i]; var node = current; var inAmbientContext = ts.isInAmbientContext(node); - var inAmbientContextOrInterface = node.parent.kind === 217 /* InterfaceDeclaration */ || node.parent.kind === 155 /* TypeLiteral */ || inAmbientContext; + var inAmbientContextOrInterface = node.parent.kind === 218 /* InterfaceDeclaration */ || node.parent.kind === 156 /* TypeLiteral */ || inAmbientContext; if (inAmbientContextOrInterface) { // check if declarations are consecutive only if they are non-ambient // 1. ambient declarations can be interleaved @@ -24936,7 +25206,7 @@ var ts; // 2. mixing ambient and non-ambient declarations is a separate error that will be reported - do not want to report an extra one previousDeclaration = undefined; } - if (node.kind === 215 /* FunctionDeclaration */ || node.kind === 143 /* MethodDeclaration */ || node.kind === 142 /* MethodSignature */ || node.kind === 144 /* Constructor */) { + if (node.kind === 216 /* FunctionDeclaration */ || node.kind === 144 /* MethodDeclaration */ || node.kind === 143 /* MethodSignature */ || node.kind === 145 /* Constructor */) { var currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; allNodeFlags &= currentNodeFlags; @@ -25076,16 +25346,16 @@ var ts; } function getDeclarationSpaces(d) { switch (d.kind) { - case 217 /* InterfaceDeclaration */: + case 218 /* InterfaceDeclaration */: return 2097152 /* ExportType */; - case 220 /* ModuleDeclaration */: - return d.name.kind === 9 /* StringLiteral */ || ts.getModuleInstanceState(d) !== 0 /* NonInstantiated */ + case 221 /* ModuleDeclaration */: + return ts.isAmbientModule(d) || ts.getModuleInstanceState(d) !== 0 /* NonInstantiated */ ? 4194304 /* ExportNamespace */ | 1048576 /* ExportValue */ : 4194304 /* ExportNamespace */; - case 216 /* ClassDeclaration */: - case 219 /* EnumDeclaration */: + case 217 /* ClassDeclaration */: + case 220 /* EnumDeclaration */: return 2097152 /* ExportType */ | 1048576 /* ExportValue */; - case 223 /* ImportEqualsDeclaration */: + case 224 /* ImportEqualsDeclaration */: var result = 0; var target = resolveAlias(getSymbolOfNode(d)); ts.forEach(target.declarations, function (d) { result |= getDeclarationSpaces(d); }); @@ -25335,22 +25605,22 @@ var ts; var headMessage = getDiagnosticHeadMessageForDecoratorResolution(node); var errorInfo; switch (node.parent.kind) { - case 216 /* ClassDeclaration */: + case 217 /* ClassDeclaration */: var classSymbol = getSymbolOfNode(node.parent); var classConstructorType = getTypeOfSymbol(classSymbol); expectedReturnType = getUnionType([classConstructorType, voidType]); break; - case 138 /* Parameter */: + case 139 /* Parameter */: expectedReturnType = voidType; errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any); break; - case 141 /* PropertyDeclaration */: + case 142 /* PropertyDeclaration */: expectedReturnType = voidType; errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_property_decorator_function_must_be_either_void_or_any); break; - case 143 /* MethodDeclaration */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: + case 144 /* MethodDeclaration */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: var methodType = getTypeOfNode(node.parent); var descriptorType = createTypedPropertyDescriptorType(methodType); expectedReturnType = getUnionType([descriptorType, voidType]); @@ -25363,9 +25633,9 @@ var ts; // When we are emitting type metadata for decorators, we need to try to check the type // as if it were an expression so that we can emit the type in a value position when we // serialize the type metadata. - if (node && node.kind === 151 /* TypeReference */) { + if (node && node.kind === 152 /* TypeReference */) { var root = getFirstIdentifier(node.typeName); - var meaning = root.parent.kind === 151 /* TypeReference */ ? 793056 /* Type */ : 1536 /* Namespace */; + var meaning = root.parent.kind === 152 /* TypeReference */ ? 793056 /* Type */ : 1536 /* Namespace */; // Resolve type so we know which symbol is referenced var rootSymbol = resolveName(root, root.text, meaning | 8388608 /* Alias */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); // Resolved symbol is alias @@ -25412,28 +25682,24 @@ var ts; if (compilerOptions.emitDecoratorMetadata) { // we only need to perform these checks if we are emitting serialized type metadata for the target of a decorator. switch (node.kind) { - case 216 /* ClassDeclaration */: + case 217 /* ClassDeclaration */: var constructor = ts.getFirstConstructorWithBody(node); if (constructor) { checkParameterTypeAnnotationsAsExpressions(constructor); } break; - case 143 /* MethodDeclaration */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: + case 144 /* MethodDeclaration */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: checkParameterTypeAnnotationsAsExpressions(node); checkReturnTypeAnnotationAsExpression(node); break; - case 141 /* PropertyDeclaration */: - case 138 /* Parameter */: + case 142 /* PropertyDeclaration */: + case 139 /* Parameter */: checkTypeAnnotationAsExpression(node); break; } } - emitDecorate = true; - if (node.kind === 138 /* Parameter */) { - emitParam = true; - } ts.forEach(node.decorators, checkDecorator); } function checkFunctionDeclaration(node) { @@ -25448,13 +25714,10 @@ var ts; checkDecorators(node); checkSignatureDeclaration(node); var isAsync = ts.isAsyncFunctionLike(node); - if (isAsync) { - emitAwaiter = true; - } // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including // well known symbols. - if (node.name && node.name.kind === 136 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 137 /* ComputedPropertyName */) { // This check will account for methods in class/interface declarations, // as well as accessors in classes/object literals checkComputedPropertyName(node.name); @@ -25470,7 +25733,7 @@ var ts; // checkFunctionOrConstructorSymbol wouldn't be called if we didnt ignore javascript function. var firstDeclaration = ts.forEach(localSymbol.declarations, // Get first non javascript function declaration - function (declaration) { return declaration.kind === node.kind && !ts.isSourceFileJavaScript(getSourceFile(declaration)) ? + function (declaration) { return declaration.kind === node.kind && !ts.isSourceFileJavaScript(ts.getSourceFileOfNode(declaration)) ? declaration : undefined; }); // Only type check the symbol once if (node === firstDeclaration) { @@ -25505,7 +25768,7 @@ var ts; } function checkBlock(node) { // Grammar checking for SyntaxKind.Block - if (node.kind === 194 /* Block */) { + if (node.kind === 195 /* Block */) { checkGrammarStatementInAmbientContext(node); } ts.forEach(node.statements, checkSourceElement); @@ -25525,12 +25788,12 @@ var ts; if (!(identifier && identifier.text === name)) { return false; } - if (node.kind === 141 /* PropertyDeclaration */ || - node.kind === 140 /* PropertySignature */ || - node.kind === 143 /* MethodDeclaration */ || - node.kind === 142 /* MethodSignature */ || - node.kind === 145 /* GetAccessor */ || - node.kind === 146 /* SetAccessor */) { + if (node.kind === 142 /* PropertyDeclaration */ || + node.kind === 141 /* PropertySignature */ || + node.kind === 144 /* MethodDeclaration */ || + node.kind === 143 /* MethodSignature */ || + node.kind === 146 /* GetAccessor */ || + node.kind === 147 /* SetAccessor */) { // it is ok to have member named '_super' or '_this' - member access is always qualified return false; } @@ -25539,7 +25802,7 @@ var ts; return false; } var root = ts.getRootDeclaration(node); - if (root.kind === 138 /* Parameter */ && ts.nodeIsMissing(root.parent.body)) { + if (root.kind === 139 /* Parameter */ && ts.nodeIsMissing(root.parent.body)) { // just an overload - no codegen impact return false; } @@ -25592,12 +25855,12 @@ var ts; return; } // Uninstantiated modules shouldnt do this check - if (node.kind === 220 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { + if (node.kind === 221 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { return; } // In case of variable declaration, node.parent is variable statement so look at the variable statement's parent var parent = getDeclarationContainer(node); - if (parent.kind === 250 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent)) { + if (parent.kind === 251 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent)) { // If the declaration happens to be in external module, report error that require and exports are reserved keywords error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, ts.declarationNameToString(name), ts.declarationNameToString(name)); } @@ -25632,7 +25895,7 @@ var ts; // skip variable declarations that don't have initializers // NOTE: in ES6 spec initializer is required in variable declarations where name is binding pattern // so we'll always treat binding elements as initialized - if (node.kind === 213 /* VariableDeclaration */ && !node.initializer) { + if (node.kind === 214 /* VariableDeclaration */ && !node.initializer) { return; } var symbol = getSymbolOfNode(node); @@ -25642,24 +25905,24 @@ var ts; localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2 /* BlockScopedVariable */) { if (getDeclarationFlagsFromSymbol(localDeclarationSymbol) & 24576 /* BlockScoped */) { - var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 214 /* VariableDeclarationList */); - var container = varDeclList.parent.kind === 195 /* VariableStatement */ && varDeclList.parent.parent + var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 215 /* VariableDeclarationList */); + var container = varDeclList.parent.kind === 196 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : undefined; // names of block-scoped and function scoped variables can collide only // if block scoped variable is defined in the function\module\source file scope (because of variable hoisting) var namesShareScope = container && - (container.kind === 194 /* Block */ && ts.isFunctionLike(container.parent) || - container.kind === 221 /* ModuleBlock */ || - container.kind === 220 /* ModuleDeclaration */ || - container.kind === 250 /* SourceFile */); + (container.kind === 195 /* Block */ && ts.isFunctionLike(container.parent) || + container.kind === 222 /* ModuleBlock */ || + container.kind === 221 /* ModuleDeclaration */ || + container.kind === 251 /* SourceFile */); // here we know that function scoped variable is shadowed by block scoped one // if they are defined in the same scope - binder has already reported redeclaration error // otherwise if variable has an initializer - show error that initialization will fail // since LHS will be block scoped name instead of function scoped if (!namesShareScope) { - var name_14 = symbolToString(localDeclarationSymbol); - error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name_14, name_14); + var name_16 = symbolToString(localDeclarationSymbol); + error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name_16, name_16); } } } @@ -25667,7 +25930,7 @@ var ts; } // Check that a parameter initializer contains no references to parameters declared to the right of itself function checkParameterInitializer(node) { - if (ts.getRootDeclaration(node).kind !== 138 /* Parameter */) { + if (ts.getRootDeclaration(node).kind !== 139 /* Parameter */) { return; } var func = ts.getContainingFunction(node); @@ -25678,7 +25941,7 @@ var ts; // check FunctionLikeDeclaration.locals (stores parameters\function local variable) // if it contains entry with a specified name and if this entry matches the resolved symbol if (referencedSymbol && referencedSymbol !== unknownSymbol && getSymbol(func.locals, referencedSymbol.name, 107455 /* Value */) === referencedSymbol) { - if (referencedSymbol.valueDeclaration.kind === 138 /* Parameter */) { + if (referencedSymbol.valueDeclaration.kind === 139 /* Parameter */) { if (referencedSymbol.valueDeclaration === node) { error(n, ts.Diagnostics.Parameter_0_cannot_be_referenced_in_its_initializer, ts.declarationNameToString(node.name)); return; @@ -25704,15 +25967,15 @@ var ts; // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including // well known symbols. - if (node.name.kind === 136 /* ComputedPropertyName */) { + if (node.name.kind === 137 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); if (node.initializer) { checkExpressionCached(node.initializer); } } - if (node.kind === 165 /* BindingElement */) { + if (node.kind === 166 /* BindingElement */) { // check computed properties inside property names of binding elements - if (node.propertyName && node.propertyName.kind === 136 /* ComputedPropertyName */) { + if (node.propertyName && node.propertyName.kind === 137 /* ComputedPropertyName */) { checkComputedPropertyName(node.propertyName); } } @@ -25721,13 +25984,14 @@ var ts; ts.forEach(node.name.elements, checkSourceElement); } // For a parameter declaration with an initializer, error and exit if the containing function doesn't have a body - if (node.initializer && ts.getRootDeclaration(node).kind === 138 /* Parameter */ && ts.nodeIsMissing(ts.getContainingFunction(node).body)) { + if (node.initializer && ts.getRootDeclaration(node).kind === 139 /* Parameter */ && ts.nodeIsMissing(ts.getContainingFunction(node).body)) { error(node, ts.Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation); return; } // For a binding pattern, validate the initializer and exit if (ts.isBindingPattern(node.name)) { - if (node.initializer) { + // Don't validate for-in initializer as it is already an error + if (node.initializer && node.parent.parent.kind !== 203 /* ForInStatement */) { checkTypeAssignableTo(checkExpressionCached(node.initializer), getWidenedTypeForVariableLikeDeclaration(node), node, /*headMessage*/ undefined); checkParameterInitializer(node); } @@ -25737,7 +26001,8 @@ var ts; var type = getTypeOfVariableOrParameterOrProperty(symbol); if (node === symbol.valueDeclaration) { // Node is the primary declaration of the symbol, just validate the initializer - if (node.initializer) { + // Don't validate for-in initializer as it is already an error + if (node.initializer && node.parent.parent.kind !== 203 /* ForInStatement */) { checkTypeAssignableTo(checkExpressionCached(node.initializer), type, node, /*headMessage*/ undefined); checkParameterInitializer(node); } @@ -25753,10 +26018,10 @@ var ts; checkTypeAssignableTo(checkExpressionCached(node.initializer), declarationType, node, /*headMessage*/ undefined); } } - if (node.kind !== 141 /* PropertyDeclaration */ && node.kind !== 140 /* PropertySignature */) { + if (node.kind !== 142 /* PropertyDeclaration */ && node.kind !== 141 /* PropertySignature */) { // We know we don't have a binding pattern or computed name here checkExportsOnMergedDeclarations(node); - if (node.kind === 213 /* VariableDeclaration */ || node.kind === 165 /* BindingElement */) { + if (node.kind === 214 /* VariableDeclaration */ || node.kind === 166 /* BindingElement */) { checkVarDeclaredNamesNotShadowed(node); } checkCollisionWithCapturedSuperVariable(node, node.name); @@ -25779,7 +26044,7 @@ var ts; } function checkGrammarDisallowedModifiersOnObjectLiteralExpressionMethod(node) { // We only disallow modifier on a method declaration if it is a property of object-literal-expression - if (node.modifiers && node.parent.kind === 167 /* ObjectLiteralExpression */) { + if (node.modifiers && node.parent.kind === 168 /* ObjectLiteralExpression */) { if (ts.isAsyncFunctionLike(node)) { if (node.modifiers.length > 1) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); @@ -25800,7 +26065,7 @@ var ts; checkGrammarStatementInAmbientContext(node); checkExpression(node.expression); checkSourceElement(node.thenStatement); - if (node.thenStatement.kind === 196 /* EmptyStatement */) { + if (node.thenStatement.kind === 197 /* EmptyStatement */) { error(node.thenStatement, ts.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); @@ -25820,12 +26085,12 @@ var ts; function checkForStatement(node) { // Grammar checking if (!checkGrammarStatementInAmbientContext(node)) { - if (node.initializer && node.initializer.kind === 214 /* VariableDeclarationList */) { + if (node.initializer && node.initializer.kind === 215 /* VariableDeclarationList */) { checkGrammarVariableDeclarationList(node.initializer); } } if (node.initializer) { - if (node.initializer.kind === 214 /* VariableDeclarationList */) { + if (node.initializer.kind === 215 /* VariableDeclarationList */) { ts.forEach(node.initializer.declarations, checkVariableDeclaration); } else { @@ -25845,14 +26110,14 @@ var ts; // via checkRightHandSideOfForOf. // If the LHS is an expression, check the LHS, as a destructuring assignment or as a reference. // Then check that the RHS is assignable to it. - if (node.initializer.kind === 214 /* VariableDeclarationList */) { + if (node.initializer.kind === 215 /* VariableDeclarationList */) { checkForInOrForOfVariableDeclaration(node); } else { var varExpr = node.initializer; var iteratedType = checkRightHandSideOfForOf(node.expression); // There may be a destructuring assignment on the left side - if (varExpr.kind === 166 /* ArrayLiteralExpression */ || varExpr.kind === 167 /* ObjectLiteralExpression */) { + if (varExpr.kind === 167 /* ArrayLiteralExpression */ || varExpr.kind === 168 /* ObjectLiteralExpression */) { // iteratedType may be undefined. In this case, we still want to check the structure of // varExpr, in particular making sure it's a valid LeftHandSideExpression. But we'd like // to short circuit the type relation checking as much as possible, so we pass the unknownType. @@ -25881,7 +26146,7 @@ var ts; // for (let VarDecl in Expr) Statement // VarDecl must be a variable declaration without a type annotation that declares a variable of type Any, // and Expr must be an expression of type Any, an object type, or a type parameter type. - if (node.initializer.kind === 214 /* VariableDeclarationList */) { + if (node.initializer.kind === 215 /* VariableDeclarationList */) { var variable = node.initializer.declarations[0]; if (variable && ts.isBindingPattern(variable.name)) { error(variable.name, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); @@ -25895,7 +26160,7 @@ var ts; // and Expr must be an expression of type Any, an object type, or a type parameter type. var varExpr = node.initializer; var leftType = checkExpression(varExpr); - if (varExpr.kind === 166 /* ArrayLiteralExpression */ || varExpr.kind === 167 /* ObjectLiteralExpression */) { + if (varExpr.kind === 167 /* ArrayLiteralExpression */ || varExpr.kind === 168 /* ObjectLiteralExpression */) { error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } else if (!isTypeAnyOrAllConstituentTypesHaveKind(leftType, 258 /* StringLike */)) { @@ -26140,7 +26405,7 @@ var ts; // TODO: Check that target label is valid } function isGetAccessorWithAnnotatatedSetAccessor(node) { - return !!(node.kind === 145 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 146 /* SetAccessor */))); + return !!(node.kind === 146 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 147 /* SetAccessor */))); } function checkReturnStatement(node) { // Grammar checking @@ -26163,10 +26428,10 @@ var ts; // for generators. return; } - if (func.kind === 146 /* SetAccessor */) { + if (func.kind === 147 /* SetAccessor */) { error(node.expression, ts.Diagnostics.Setters_cannot_return_a_value); } - else if (func.kind === 144 /* Constructor */) { + else if (func.kind === 145 /* Constructor */) { if (!checkTypeAssignableTo(exprType, returnType, node.expression)) { error(node.expression, ts.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); } @@ -26208,7 +26473,7 @@ var ts; var expressionTypeIsStringLike = someConstituentTypeHasKind(expressionType, 258 /* StringLike */); ts.forEach(node.caseBlock.clauses, function (clause) { // Grammar check for duplicate default clauses, skip if we already report duplicate default clause - if (clause.kind === 244 /* DefaultClause */ && !hasDuplicateDefaultClause) { + if (clause.kind === 245 /* DefaultClause */ && !hasDuplicateDefaultClause) { if (firstDefaultClause === undefined) { firstDefaultClause = clause; } @@ -26220,7 +26485,7 @@ var ts; hasDuplicateDefaultClause = true; } } - if (produceDiagnostics && clause.kind === 243 /* CaseClause */) { + if (produceDiagnostics && clause.kind === 244 /* CaseClause */) { var caseClause = clause; // TypeScript 1.0 spec (April 2014):5.9 // In a 'switch' statement, each 'case' expression must be of a type that is assignable to or from the type of the 'switch' expression. @@ -26245,7 +26510,7 @@ var ts; if (ts.isFunctionLike(current)) { break; } - if (current.kind === 209 /* LabeledStatement */ && current.label.text === node.label.text) { + if (current.kind === 210 /* LabeledStatement */ && current.label.text === node.label.text) { var sourceFile = ts.getSourceFileOfNode(node); grammarErrorOnNode(node.label, ts.Diagnostics.Duplicate_label_0, ts.getTextOfNodeFromSourceText(sourceFile.text, node.label)); break; @@ -26350,7 +26615,7 @@ var ts; // perform property check if property or indexer is declared in 'type' // this allows to rule out cases when both property and indexer are inherited from the base class var errorNode; - if (prop.valueDeclaration.name.kind === 136 /* ComputedPropertyName */ || prop.parent === containingType.symbol) { + if (prop.valueDeclaration.name.kind === 137 /* ComputedPropertyName */ || prop.parent === containingType.symbol) { errorNode = prop.valueDeclaration; } else if (indexDeclaration) { @@ -26431,7 +26696,6 @@ var ts; var staticType = getTypeOfSymbol(symbol); var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node); if (baseTypeNode) { - emitExtends = emitExtends || !ts.isInAmbientContext(node); var baseTypes = getBaseTypes(type); if (baseTypes.length && produceDiagnostics) { var baseType = baseTypes[0]; @@ -26532,7 +26796,7 @@ var ts; // If there is no declaration for the derived class (as in the case of class expressions), // then the class cannot be declared abstract. if (baseDeclarationFlags & 128 /* Abstract */ && (!derivedClassDecl || !(derivedClassDecl.flags & 128 /* Abstract */))) { - if (derivedClassDecl.kind === 188 /* ClassExpression */) { + if (derivedClassDecl.kind === 189 /* ClassExpression */) { error(derivedClassDecl, ts.Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, symbolToString(baseProperty), typeToString(baseType)); } else { @@ -26580,7 +26844,7 @@ var ts; } } function isAccessor(kind) { - return kind === 145 /* GetAccessor */ || kind === 146 /* SetAccessor */; + return kind === 146 /* GetAccessor */ || kind === 147 /* SetAccessor */; } function areTypeParametersIdentical(list1, list2) { if (!list1 && !list2) { @@ -26650,7 +26914,7 @@ var ts; checkTypeNameIsReserved(node.name, ts.Diagnostics.Interface_name_cannot_be_0); checkExportsOnMergedDeclarations(node); var symbol = getSymbolOfNode(node); - var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 217 /* InterfaceDeclaration */); + var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 218 /* InterfaceDeclaration */); if (symbol.declarations.length > 1) { if (node !== firstInterfaceDecl && !areTypeParametersIdentical(firstInterfaceDecl.typeParameters, node.typeParameters)) { error(node.name, ts.Diagnostics.All_declarations_of_an_interface_must_have_identical_type_parameters); @@ -26760,7 +27024,7 @@ var ts; return value; function evalConstant(e) { switch (e.kind) { - case 181 /* PrefixUnaryExpression */: + case 182 /* PrefixUnaryExpression */: var value_1 = evalConstant(e.operand); if (value_1 === undefined) { return undefined; @@ -26771,7 +27035,7 @@ var ts; case 50 /* TildeToken */: return ~value_1; } return undefined; - case 183 /* BinaryExpression */: + case 184 /* BinaryExpression */: var left = evalConstant(e.left); if (left === undefined) { return undefined; @@ -26796,11 +27060,11 @@ var ts; return undefined; case 8 /* NumericLiteral */: return +e.text; - case 174 /* ParenthesizedExpression */: + case 175 /* ParenthesizedExpression */: return evalConstant(e.expression); case 69 /* Identifier */: - case 169 /* ElementAccessExpression */: - case 168 /* PropertyAccessExpression */: + case 170 /* ElementAccessExpression */: + case 169 /* PropertyAccessExpression */: var member = initializer.parent; var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent)); var enumType_1; @@ -26813,7 +27077,7 @@ var ts; } else { var expression; - if (e.kind === 169 /* ElementAccessExpression */) { + if (e.kind === 170 /* ElementAccessExpression */) { if (e.argumentExpression === undefined || e.argumentExpression.kind !== 9 /* StringLiteral */) { return undefined; @@ -26831,7 +27095,7 @@ var ts; if (current.kind === 69 /* Identifier */) { break; } - else if (current.kind === 168 /* PropertyAccessExpression */) { + else if (current.kind === 169 /* PropertyAccessExpression */) { current = current.expression; } else { @@ -26902,7 +27166,7 @@ var ts; var seenEnumMissingInitialInitializer = false; ts.forEach(enumSymbol.declarations, function (declaration) { // return true if we hit a violation of the rule, false otherwise - if (declaration.kind !== 219 /* EnumDeclaration */) { + if (declaration.kind !== 220 /* EnumDeclaration */) { return false; } var enumDeclaration = declaration; @@ -26925,8 +27189,8 @@ var ts; var declarations = symbol.declarations; for (var _i = 0, declarations_5 = declarations; _i < declarations_5.length; _i++) { var declaration = declarations_5[_i]; - if ((declaration.kind === 216 /* ClassDeclaration */ || - (declaration.kind === 215 /* FunctionDeclaration */ && ts.nodeIsPresent(declaration.body))) && + if ((declaration.kind === 217 /* ClassDeclaration */ || + (declaration.kind === 216 /* FunctionDeclaration */ && ts.nodeIsPresent(declaration.body))) && !ts.isInAmbientContext(declaration)) { return declaration; } @@ -26949,7 +27213,12 @@ var ts; function checkModuleDeclaration(node) { if (produceDiagnostics) { // Grammar checking - var isAmbientExternalModule = node.name.kind === 9 /* StringLiteral */; + var isGlobalAugmentation = ts.isGlobalScopeAugmentation(node); + var inAmbientContext = ts.isInAmbientContext(node); + if (isGlobalAugmentation && !inAmbientContext) { + error(node.name, ts.Diagnostics.Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context); + } + var isAmbientExternalModule = ts.isAmbientModule(node); var contextErrorMessage = isAmbientExternalModule ? ts.Diagnostics.An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file : ts.Diagnostics.A_namespace_declaration_is_only_allowed_in_a_namespace_or_module; @@ -26958,7 +27227,7 @@ var ts; return; } if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node)) { - if (!ts.isInAmbientContext(node) && node.name.kind === 9 /* StringLiteral */) { + if (!inAmbientContext && node.name.kind === 9 /* StringLiteral */) { grammarErrorOnNode(node.name, ts.Diagnostics.Only_ambient_modules_can_use_quoted_names); } } @@ -26969,7 +27238,7 @@ var ts; // The following checks only apply on a non-ambient instantiated module declaration. if (symbol.flags & 512 /* ValueModule */ && symbol.declarations.length > 1 - && !ts.isInAmbientContext(node) + && !inAmbientContext && ts.isInstantiatedModule(node, compilerOptions.preserveConstEnums || compilerOptions.isolatedModules)) { var firstNonAmbientClassOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol); if (firstNonAmbientClassOrFunc) { @@ -26982,30 +27251,120 @@ var ts; } // if the module merges with a class declaration in the same lexical scope, // we need to track this to ensure the correct emit. - var mergedClass = ts.getDeclarationOfKind(symbol, 216 /* ClassDeclaration */); + var mergedClass = ts.getDeclarationOfKind(symbol, 217 /* ClassDeclaration */); if (mergedClass && inSameLexicalScope(node, mergedClass)) { getNodeLinks(node).flags |= 32768 /* LexicalModuleMergesWithClass */; } } - // Checks for ambient external modules. if (isAmbientExternalModule) { - if (!isGlobalSourceFile(node.parent)) { - error(node.name, ts.Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces); + if (ts.isExternalModuleAugmentation(node)) { + // body of the augmentation should be checked for consistency only if augmentation was applied to its target (either global scope or module) + // otherwise we'll be swamped in cascading errors. + // We can detect if augmentation was applied using following rules: + // - augmentation for a global scope is always applied + // - augmentation for some external module is applied if symbol for augmentation is merged (it was combined with target module). + var checkBody = isGlobalAugmentation || (getSymbolOfNode(node).flags & 33554432 /* Merged */); + if (checkBody) { + // body of ambient external module is always a module block + for (var _i = 0, _a = node.body.statements; _i < _a.length; _i++) { + var statement = _a[_i]; + checkModuleAugmentationElement(statement, isGlobalAugmentation); + } + } } - if (ts.isExternalModuleNameRelative(node.name.text)) { - error(node.name, ts.Diagnostics.Ambient_module_declaration_cannot_specify_relative_module_name); + else if (isGlobalSourceFile(node.parent)) { + if (isGlobalAugmentation) { + error(node.name, ts.Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations); + } + else if (ts.isExternalModuleNameRelative(node.name.text)) { + error(node.name, ts.Diagnostics.Ambient_module_declaration_cannot_specify_relative_module_name); + } + } + else { + if (isGlobalAugmentation) { + error(node.name, ts.Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations); + } + else { + // Node is not an augmentation and is not located on the script level. + // This means that this is declaration of ambient module that is located in other module or namespace which is prohibited. + error(node.name, ts.Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces); + } } } } checkSourceElement(node.body); } + function checkModuleAugmentationElement(node, isGlobalAugmentation) { + switch (node.kind) { + case 196 /* VariableStatement */: + // error each individual name in variable statement instead of marking the entire variable statement + for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) { + var decl = _a[_i]; + checkModuleAugmentationElement(decl, isGlobalAugmentation); + } + break; + case 230 /* ExportAssignment */: + case 231 /* ExportDeclaration */: + grammarErrorOnFirstToken(node, ts.Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); + break; + case 224 /* ImportEqualsDeclaration */: + if (node.moduleReference.kind !== 9 /* StringLiteral */) { + error(node.name, ts.Diagnostics.Module_augmentation_cannot_introduce_new_names_in_the_top_level_scope); + break; + } + // fallthrough + case 225 /* ImportDeclaration */: + grammarErrorOnFirstToken(node, ts.Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); + break; + case 166 /* BindingElement */: + case 214 /* VariableDeclaration */: + var name_17 = node.name; + if (ts.isBindingPattern(name_17)) { + for (var _b = 0, _c = name_17.elements; _b < _c.length; _b++) { + var el = _c[_b]; + // mark individual names in binding pattern + checkModuleAugmentationElement(el, isGlobalAugmentation); + } + break; + } + // fallthrough + case 217 /* ClassDeclaration */: + case 220 /* EnumDeclaration */: + case 216 /* FunctionDeclaration */: + case 218 /* InterfaceDeclaration */: + case 221 /* ModuleDeclaration */: + case 219 /* TypeAliasDeclaration */: + var symbol = getSymbolOfNode(node); + if (symbol) { + // module augmentations cannot introduce new names on the top level scope of the module + // this is done it two steps + // 1. quick check - if symbol for node is not merged - this is local symbol to this augmentation - report error + // 2. main check - report error if value declaration of the parent symbol is module augmentation) + var reportError = !(symbol.flags & 33554432 /* Merged */); + if (!reportError) { + if (isGlobalAugmentation) { + // global symbol should not have parent since it is not explicitly exported + reportError = symbol.parent !== undefined; + } + else { + // symbol should not originate in augmentation + reportError = ts.isExternalModuleAugmentation(symbol.parent.valueDeclaration); + } + } + if (reportError) { + error(node, ts.Diagnostics.Module_augmentation_cannot_introduce_new_names_in_the_top_level_scope); + } + } + break; + } + } function getFirstIdentifier(node) { while (true) { - if (node.kind === 135 /* QualifiedName */) { + if (node.kind === 136 /* QualifiedName */) { node = node.left; } - else if (node.kind === 168 /* PropertyAccessExpression */) { + else if (node.kind === 169 /* PropertyAccessExpression */) { node = node.expression; } else { @@ -27021,20 +27380,24 @@ var ts; error(moduleName, ts.Diagnostics.String_literal_expected); return false; } - var inAmbientExternalModule = node.parent.kind === 221 /* ModuleBlock */ && node.parent.parent.name.kind === 9 /* StringLiteral */; - if (node.parent.kind !== 250 /* SourceFile */ && !inAmbientExternalModule) { - error(moduleName, node.kind === 230 /* ExportDeclaration */ ? + var inAmbientExternalModule = node.parent.kind === 222 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent); + if (node.parent.kind !== 251 /* SourceFile */ && !inAmbientExternalModule) { + error(moduleName, node.kind === 231 /* ExportDeclaration */ ? ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : ts.Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); return false; } if (inAmbientExternalModule && ts.isExternalModuleNameRelative(moduleName.text)) { - // TypeScript 1.0 spec (April 2013): 12.1.6 - // An ExternalImportDeclaration in an AmbientExternalModuleDeclaration may reference - // other external modules only through top - level external module names. - // Relative external module names are not permitted. - error(node, ts.Diagnostics.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name); - return false; + // we have already reported errors on top level imports\exports in external module augmentations in checkModuleDeclaration + // no need to do this again. + if (!isTopLevelInExternalModuleAugmentation(node)) { + // TypeScript 1.0 spec (April 2013): 12.1.6 + // An ExternalImportDeclaration in an AmbientExternalModuleDeclaration may reference + // other external modules only through top - level external module names. + // Relative external module names are not permitted. + error(node, ts.Diagnostics.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name); + return false; + } } return true; } @@ -27046,7 +27409,7 @@ var ts; (symbol.flags & 793056 /* Type */ ? 793056 /* Type */ : 0) | (symbol.flags & 1536 /* Namespace */ ? 1536 /* Namespace */ : 0); if (target.flags & excludedMeanings) { - var message = node.kind === 232 /* ExportSpecifier */ ? + var message = node.kind === 233 /* ExportSpecifier */ ? ts.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; error(node, message, symbolToString(symbol)); @@ -27073,7 +27436,7 @@ var ts; checkImportBinding(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 226 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 227 /* NamespaceImport */) { checkImportBinding(importClause.namedBindings); } else { @@ -27130,8 +27493,8 @@ var ts; // export { x, y } // export { x, y } from "foo" ts.forEach(node.exportClause.elements, checkExportSpecifier); - var inAmbientExternalModule = node.parent.kind === 221 /* ModuleBlock */ && node.parent.parent.name.kind === 9 /* StringLiteral */; - if (node.parent.kind !== 250 /* SourceFile */ && !inAmbientExternalModule) { + var inAmbientExternalModule = node.parent.kind === 222 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent); + if (node.parent.kind !== 251 /* SourceFile */ && !inAmbientExternalModule) { error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); } } @@ -27145,14 +27508,23 @@ var ts; } } function checkGrammarModuleElementContext(node, errorMessage) { - if (node.parent.kind !== 250 /* SourceFile */ && node.parent.kind !== 221 /* ModuleBlock */ && node.parent.kind !== 220 /* ModuleDeclaration */) { + if (node.parent.kind !== 251 /* SourceFile */ && node.parent.kind !== 222 /* ModuleBlock */ && node.parent.kind !== 221 /* ModuleDeclaration */) { return grammarErrorOnFirstToken(node, errorMessage); } } function checkExportSpecifier(node) { checkAliasSymbol(node); if (!node.parent.parent.moduleSpecifier) { - markExportAsReferenced(node); + var exportedName = node.propertyName || node.name; + // find immediate value referenced by exported name (SymbolFlags.Alias is set so we don't chase down aliases) + var symbol = resolveName(exportedName, exportedName.text, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */ | 8388608 /* Alias */, + /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); + if (symbol && isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0]))) { + error(exportedName, ts.Diagnostics.Cannot_re_export_name_that_is_not_defined_in_the_module); + } + else { + markExportAsReferenced(node); + } } } function checkExportAssignment(node) { @@ -27160,8 +27532,8 @@ var ts; // If we hit an export assignment in an illegal context, just bail out to avoid cascading errors. return; } - var container = node.parent.kind === 250 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 220 /* ModuleDeclaration */ && container.name.kind === 69 /* Identifier */) { + var container = node.parent.kind === 251 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 221 /* ModuleDeclaration */ && !ts.isAmbientModule(container)) { error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); return; } @@ -27202,7 +27574,9 @@ var ts; var exportEqualsSymbol = moduleSymbol.exports["export="]; if (exportEqualsSymbol && hasExportedMembers(moduleSymbol)) { var declaration = getDeclarationOfAliasSymbol(exportEqualsSymbol) || exportEqualsSymbol.valueDeclaration; - error(declaration, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); + if (!isTopLevelInExternalModuleAugmentation(declaration)) { + error(declaration, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); + } } // Checks for export * conflicts var exports = getExportsOfModule(moduleSymbol); @@ -27225,21 +27599,7 @@ var ts; links.exportsChecked = true; } function isNotOverload(declaration) { - return declaration.kind !== 215 /* FunctionDeclaration */ || !!declaration.body; - } - } - function checkTypePredicate(node) { - var parameterName = node.parameterName; - if (parameterName.kind === 69 /* Identifier */ && !isInLegalParameterTypePredicatePosition(node)) { - error(node, ts.Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); - } - else if (parameterName.kind === 161 /* ThisType */) { - if (!isInLegalThisTypePredicatePosition(node)) { - error(node, ts.Diagnostics.A_this_based_type_predicate_is_only_allowed_within_a_class_or_interface_s_members_get_accessors_or_return_type_positions_for_functions_and_methods); - } - else { - getTypeFromThisTypeNode(parameterName); - } + return declaration.kind !== 216 /* FunctionDeclaration */ || !!declaration.body; } } function checkSourceElement(node) { @@ -27251,118 +27611,118 @@ var ts; // Only bother checking on a few construct kinds. We don't want to be excessivly // hitting the cancellation token on every node we check. switch (kind) { - case 220 /* ModuleDeclaration */: - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: - case 215 /* FunctionDeclaration */: + case 221 /* ModuleDeclaration */: + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: + case 216 /* FunctionDeclaration */: cancellationToken.throwIfCancellationRequested(); } } switch (kind) { - case 137 /* TypeParameter */: + case 138 /* TypeParameter */: return checkTypeParameter(node); - case 138 /* Parameter */: + case 139 /* Parameter */: return checkParameter(node); - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: return checkPropertyDeclaration(node); - case 152 /* FunctionType */: - case 153 /* ConstructorType */: - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: + case 153 /* FunctionType */: + case 154 /* ConstructorType */: + case 148 /* CallSignature */: + case 149 /* ConstructSignature */: return checkSignatureDeclaration(node); - case 149 /* IndexSignature */: + case 150 /* IndexSignature */: return checkSignatureDeclaration(node); - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: return checkMethodDeclaration(node); - case 144 /* Constructor */: + case 145 /* Constructor */: return checkConstructorDeclaration(node); - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: return checkAccessorDeclaration(node); - case 151 /* TypeReference */: + case 152 /* TypeReference */: return checkTypeReferenceNode(node); - case 150 /* TypePredicate */: + case 151 /* TypePredicate */: return checkTypePredicate(node); - case 154 /* TypeQuery */: + case 155 /* TypeQuery */: return checkTypeQuery(node); - case 155 /* TypeLiteral */: + case 156 /* TypeLiteral */: return checkTypeLiteral(node); - case 156 /* ArrayType */: + case 157 /* ArrayType */: return checkArrayType(node); - case 157 /* TupleType */: + case 158 /* TupleType */: return checkTupleType(node); - case 158 /* UnionType */: - case 159 /* IntersectionType */: + case 159 /* UnionType */: + case 160 /* IntersectionType */: return checkUnionOrIntersectionType(node); - case 160 /* ParenthesizedType */: + case 161 /* ParenthesizedType */: return checkSourceElement(node.type); - case 215 /* FunctionDeclaration */: + case 216 /* FunctionDeclaration */: return checkFunctionDeclaration(node); - case 194 /* Block */: - case 221 /* ModuleBlock */: + case 195 /* Block */: + case 222 /* ModuleBlock */: return checkBlock(node); - case 195 /* VariableStatement */: + case 196 /* VariableStatement */: return checkVariableStatement(node); - case 197 /* ExpressionStatement */: + case 198 /* ExpressionStatement */: return checkExpressionStatement(node); - case 198 /* IfStatement */: + case 199 /* IfStatement */: return checkIfStatement(node); - case 199 /* DoStatement */: + case 200 /* DoStatement */: return checkDoStatement(node); - case 200 /* WhileStatement */: + case 201 /* WhileStatement */: return checkWhileStatement(node); - case 201 /* ForStatement */: + case 202 /* ForStatement */: return checkForStatement(node); - case 202 /* ForInStatement */: + case 203 /* ForInStatement */: return checkForInStatement(node); - case 203 /* ForOfStatement */: + case 204 /* ForOfStatement */: return checkForOfStatement(node); - case 204 /* ContinueStatement */: - case 205 /* BreakStatement */: + case 205 /* ContinueStatement */: + case 206 /* BreakStatement */: return checkBreakOrContinueStatement(node); - case 206 /* ReturnStatement */: + case 207 /* ReturnStatement */: return checkReturnStatement(node); - case 207 /* WithStatement */: + case 208 /* WithStatement */: return checkWithStatement(node); - case 208 /* SwitchStatement */: + case 209 /* SwitchStatement */: return checkSwitchStatement(node); - case 209 /* LabeledStatement */: + case 210 /* LabeledStatement */: return checkLabeledStatement(node); - case 210 /* ThrowStatement */: + case 211 /* ThrowStatement */: return checkThrowStatement(node); - case 211 /* TryStatement */: + case 212 /* TryStatement */: return checkTryStatement(node); - case 213 /* VariableDeclaration */: + case 214 /* VariableDeclaration */: return checkVariableDeclaration(node); - case 165 /* BindingElement */: + case 166 /* BindingElement */: return checkBindingElement(node); - case 216 /* ClassDeclaration */: + case 217 /* ClassDeclaration */: return checkClassDeclaration(node); - case 217 /* InterfaceDeclaration */: + case 218 /* InterfaceDeclaration */: return checkInterfaceDeclaration(node); - case 218 /* TypeAliasDeclaration */: + case 219 /* TypeAliasDeclaration */: return checkTypeAliasDeclaration(node); - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: return checkEnumDeclaration(node); - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: return checkModuleDeclaration(node); - case 224 /* ImportDeclaration */: + case 225 /* ImportDeclaration */: return checkImportDeclaration(node); - case 223 /* ImportEqualsDeclaration */: + case 224 /* ImportEqualsDeclaration */: return checkImportEqualsDeclaration(node); - case 230 /* ExportDeclaration */: + case 231 /* ExportDeclaration */: return checkExportDeclaration(node); - case 229 /* ExportAssignment */: + case 230 /* ExportAssignment */: return checkExportAssignment(node); - case 196 /* EmptyStatement */: + case 197 /* EmptyStatement */: checkGrammarStatementInAmbientContext(node); return; - case 212 /* DebuggerStatement */: + case 213 /* DebuggerStatement */: checkGrammarStatementInAmbientContext(node); return; - case 233 /* MissingDeclaration */: + case 234 /* MissingDeclaration */: return checkMissingDeclaration(node); } } @@ -27384,17 +27744,17 @@ var ts; for (var _i = 0, deferredNodes_1 = deferredNodes; _i < deferredNodes_1.length; _i++) { var node = deferredNodes_1[_i]; switch (node.kind) { - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: checkFunctionExpressionOrObjectLiteralMethodDeferred(node); break; - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: checkAccessorDeferred(node); break; - case 188 /* ClassExpression */: + case 189 /* ClassExpression */: checkClassExpressionDeferred(node); break; } @@ -27420,10 +27780,6 @@ var ts; } // Grammar checking checkGrammarSourceFile(node); - emitExtends = false; - emitDecorate = false; - emitParam = false; - emitAwaiter = false; potentialThisCollisions.length = 0; deferredNodes = []; ts.forEach(node.statements, checkSourceElement); @@ -27436,21 +27792,6 @@ var ts; ts.forEach(potentialThisCollisions, checkIfThisIsCapturedInEnclosingScope); potentialThisCollisions.length = 0; } - if (emitExtends) { - links.flags |= 8 /* EmitExtends */; - } - if (emitDecorate) { - links.flags |= 16 /* EmitDecorate */; - } - if (emitParam) { - links.flags |= 32 /* EmitParam */; - } - if (emitAwaiter) { - links.flags |= 64 /* EmitAwaiter */; - } - if (emitGenerator || (emitAwaiter && languageVersion < 2 /* ES6 */)) { - links.flags |= 128 /* EmitGenerator */; - } links.flags |= 1 /* TypeChecked */; } } @@ -27488,7 +27829,7 @@ var ts; function isInsideWithStatementBody(node) { if (node) { while (node.parent) { - if (node.parent.kind === 207 /* WithStatement */ && node.parent.statement === node) { + if (node.parent.kind === 208 /* WithStatement */ && node.parent.statement === node) { return true; } node = node.parent; @@ -27511,25 +27852,25 @@ var ts; copySymbols(location.locals, meaning); } switch (location.kind) { - case 250 /* SourceFile */: + case 251 /* SourceFile */: if (!ts.isExternalOrCommonJsModule(location)) { break; } - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: copySymbols(getSymbolOfNode(location).exports, meaning & 8914931 /* ModuleMember */); break; - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: copySymbols(getSymbolOfNode(location).exports, meaning & 8 /* EnumMember */); break; - case 188 /* ClassExpression */: + case 189 /* ClassExpression */: var className = location.name; if (className) { copySymbol(location.symbol, meaning); } // fall through; this fall-through is necessary because we would like to handle // type parameter inside class expression similar to how we handle it in classDeclaration and interface Declaration - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: // If we didn't come from static member of class or interface, // add the type parameters into the symbol table // (type parameters of classDeclaration/classExpression and interface are in member property of the symbol. @@ -27538,7 +27879,7 @@ var ts; copySymbols(getSymbolOfNode(location).members, meaning & 793056 /* Type */); } break; - case 175 /* FunctionExpression */: + case 176 /* FunctionExpression */: var funcName = location.name; if (funcName) { copySymbol(location.symbol, meaning); @@ -27587,37 +27928,37 @@ var ts; } function isTypeDeclaration(node) { switch (node.kind) { - case 137 /* TypeParameter */: - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: - case 218 /* TypeAliasDeclaration */: - case 219 /* EnumDeclaration */: + case 138 /* TypeParameter */: + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: + case 219 /* TypeAliasDeclaration */: + case 220 /* EnumDeclaration */: return true; } } // True if the given identifier is part of a type reference function isTypeReferenceIdentifier(entityName) { var node = entityName; - while (node.parent && node.parent.kind === 135 /* QualifiedName */) { + while (node.parent && node.parent.kind === 136 /* QualifiedName */) { node = node.parent; } - return node.parent && node.parent.kind === 151 /* TypeReference */; + return node.parent && node.parent.kind === 152 /* TypeReference */; } function isHeritageClauseElementIdentifier(entityName) { var node = entityName; - while (node.parent && node.parent.kind === 168 /* PropertyAccessExpression */) { + while (node.parent && node.parent.kind === 169 /* PropertyAccessExpression */) { node = node.parent; } - return node.parent && node.parent.kind === 190 /* ExpressionWithTypeArguments */; + return node.parent && node.parent.kind === 191 /* ExpressionWithTypeArguments */; } function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) { - while (nodeOnRightSide.parent.kind === 135 /* QualifiedName */) { + while (nodeOnRightSide.parent.kind === 136 /* QualifiedName */) { nodeOnRightSide = nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 223 /* ImportEqualsDeclaration */) { + if (nodeOnRightSide.parent.kind === 224 /* ImportEqualsDeclaration */) { return nodeOnRightSide.parent.moduleReference === nodeOnRightSide && nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 229 /* ExportAssignment */) { + if (nodeOnRightSide.parent.kind === 230 /* ExportAssignment */) { return nodeOnRightSide.parent.expression === nodeOnRightSide && nodeOnRightSide.parent; } return undefined; @@ -27629,11 +27970,11 @@ var ts; if (ts.isDeclarationName(entityName)) { return getSymbolOfNode(entityName.parent); } - if (entityName.parent.kind === 229 /* ExportAssignment */) { + if (entityName.parent.kind === 230 /* ExportAssignment */) { return resolveEntityName(entityName, /*all meanings*/ 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */ | 8388608 /* Alias */); } - if (entityName.kind !== 168 /* PropertyAccessExpression */) { + if (entityName.kind !== 169 /* PropertyAccessExpression */) { if (isInRightSideOfImportOrExportAssignment(entityName)) { // Since we already checked for ExportAssignment, this really could only be an Import return getSymbolOfPartOfRightHandSideOfImportEquals(entityName); @@ -27645,7 +27986,7 @@ var ts; if (isHeritageClauseElementIdentifier(entityName)) { var meaning = 0 /* None */; // In an interface or class, we're definitely interested in a type. - if (entityName.parent.kind === 190 /* ExpressionWithTypeArguments */) { + if (entityName.parent.kind === 191 /* ExpressionWithTypeArguments */) { meaning = 793056 /* Type */; // In a class 'extends' clause we are also looking for a value. if (ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) { @@ -27658,9 +27999,9 @@ var ts; meaning |= 8388608 /* Alias */; return resolveEntityName(entityName, meaning); } - else if ((entityName.parent.kind === 237 /* JsxOpeningElement */) || - (entityName.parent.kind === 236 /* JsxSelfClosingElement */) || - (entityName.parent.kind === 239 /* JsxClosingElement */)) { + else if ((entityName.parent.kind === 238 /* JsxOpeningElement */) || + (entityName.parent.kind === 237 /* JsxSelfClosingElement */) || + (entityName.parent.kind === 240 /* JsxClosingElement */)) { return getJsxElementTagSymbol(entityName.parent); } else if (ts.isExpression(entityName)) { @@ -27674,14 +28015,14 @@ var ts; var meaning = 107455 /* Value */ | 8388608 /* Alias */; return resolveEntityName(entityName, meaning); } - else if (entityName.kind === 168 /* PropertyAccessExpression */) { + else if (entityName.kind === 169 /* PropertyAccessExpression */) { var symbol = getNodeLinks(entityName).resolvedSymbol; if (!symbol) { checkPropertyAccessExpression(entityName); } return getNodeLinks(entityName).resolvedSymbol; } - else if (entityName.kind === 135 /* QualifiedName */) { + else if (entityName.kind === 136 /* QualifiedName */) { var symbol = getNodeLinks(entityName).resolvedSymbol; if (!symbol) { checkQualifiedName(entityName); @@ -27690,16 +28031,16 @@ var ts; } } else if (isTypeReferenceIdentifier(entityName)) { - var meaning = entityName.parent.kind === 151 /* TypeReference */ ? 793056 /* Type */ : 1536 /* Namespace */; + var meaning = entityName.parent.kind === 152 /* TypeReference */ ? 793056 /* Type */ : 1536 /* Namespace */; // Include aliases in the meaning, this ensures that we do not follow aliases to where they point and instead // return the alias symbol. meaning |= 8388608 /* Alias */; return resolveEntityName(entityName, meaning); } - else if (entityName.parent.kind === 240 /* JsxAttribute */) { + else if (entityName.parent.kind === 241 /* JsxAttribute */) { return getJsxAttributePropertySymbol(entityName.parent); } - if (entityName.parent.kind === 150 /* TypePredicate */) { + if (entityName.parent.kind === 151 /* TypePredicate */) { return resolveEntityName(entityName, /*meaning*/ 1 /* FunctionScopedVariable */); } // Do we want to return undefined here? @@ -27716,12 +28057,12 @@ var ts; } if (node.kind === 69 /* Identifier */) { if (isInRightSideOfImportOrExportAssignment(node)) { - return node.parent.kind === 229 /* ExportAssignment */ + return node.parent.kind === 230 /* ExportAssignment */ ? getSymbolOfEntityNameOrPropertyAccessExpression(node) : getSymbolOfPartOfRightHandSideOfImportEquals(node); } - else if (node.parent.kind === 165 /* BindingElement */ && - node.parent.parent.kind === 163 /* ObjectBindingPattern */ && + else if (node.parent.kind === 166 /* BindingElement */ && + node.parent.parent.kind === 164 /* ObjectBindingPattern */ && node === node.parent.propertyName) { var typeOfPattern = getTypeOfNode(node.parent.parent); var propertyDeclaration = typeOfPattern && getPropertyOfType(typeOfPattern, node.text); @@ -27732,19 +28073,19 @@ var ts; } switch (node.kind) { case 69 /* Identifier */: - case 168 /* PropertyAccessExpression */: - case 135 /* QualifiedName */: + case 169 /* PropertyAccessExpression */: + case 136 /* QualifiedName */: return getSymbolOfEntityNameOrPropertyAccessExpression(node); case 97 /* ThisKeyword */: case 95 /* SuperKeyword */: var type = ts.isExpression(node) ? checkExpression(node) : getTypeFromTypeNode(node); return type.symbol; - case 161 /* ThisType */: + case 162 /* ThisType */: return getTypeFromTypeNode(node).symbol; case 121 /* ConstructorKeyword */: // constructor keyword for an overload, should take us to the definition if it exist var constructorDeclaration = node.parent; - if (constructorDeclaration && constructorDeclaration.kind === 144 /* Constructor */) { + if (constructorDeclaration && constructorDeclaration.kind === 145 /* Constructor */) { return constructorDeclaration.parent.symbol; } return undefined; @@ -27752,14 +28093,14 @@ var ts; // External module name in an import declaration if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) || - ((node.parent.kind === 224 /* ImportDeclaration */ || node.parent.kind === 230 /* ExportDeclaration */) && + ((node.parent.kind === 225 /* ImportDeclaration */ || node.parent.kind === 231 /* ExportDeclaration */) && node.parent.moduleSpecifier === node)) { return resolveExternalModuleName(node, node); } // Fall through case 8 /* NumericLiteral */: // index access - if (node.parent.kind === 169 /* ElementAccessExpression */ && node.parent.argumentExpression === node) { + if (node.parent.kind === 170 /* ElementAccessExpression */ && node.parent.argumentExpression === node) { var objectType = checkExpression(node.parent.expression); if (objectType === unknownType) return undefined; @@ -27776,11 +28117,17 @@ var ts; // The function returns a value symbol of an identifier in the short-hand property assignment. // This is necessary as an identifier in short-hand property assignment can contains two meaning: // property name and property value. - if (location && location.kind === 248 /* ShorthandPropertyAssignment */) { - return resolveEntityName(location.name, 107455 /* Value */); + if (location && location.kind === 249 /* ShorthandPropertyAssignment */) { + return resolveEntityName(location.name, 107455 /* Value */ | 8388608 /* Alias */); } return undefined; } + /** Returns the target of an export specifier without following aliases */ + function getExportSpecifierLocalTargetSymbol(node) { + return node.parent.parent.moduleSpecifier ? + getExternalModuleMember(node.parent.parent, node) : + resolveEntityName(node.propertyName || node.name, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */ | 8388608 /* Alias */); + } function getTypeOfNode(node) { if (isInsideWithStatementBody(node)) { // We cannot answer semantic questions within a with block, do not proceed any further @@ -27858,9 +28205,9 @@ var ts; function getRootSymbols(symbol) { if (symbol.flags & 268435456 /* SyntheticProperty */) { var symbols = []; - var name_15 = symbol.name; + var name_18 = symbol.name; ts.forEach(getSymbolLinks(symbol).containingType.types, function (t) { - var symbol = getPropertyOfType(t, name_15); + var symbol = getPropertyOfType(t, name_18); if (symbol) { symbols.push(symbol); } @@ -27920,11 +28267,11 @@ var ts; } var parentSymbol = getParentOfSymbol(symbol); if (parentSymbol) { - if (parentSymbol.flags & 512 /* ValueModule */ && parentSymbol.valueDeclaration.kind === 250 /* SourceFile */) { + if (parentSymbol.flags & 512 /* ValueModule */ && parentSymbol.valueDeclaration.kind === 251 /* SourceFile */) { return parentSymbol.valueDeclaration; } for (var n = node.parent; n; n = n.parent) { - if ((n.kind === 220 /* ModuleDeclaration */ || n.kind === 219 /* EnumDeclaration */) && getSymbolOfNode(n) === parentSymbol) { + if ((n.kind === 221 /* ModuleDeclaration */ || n.kind === 220 /* EnumDeclaration */) && getSymbolOfNode(n) === parentSymbol) { return n; } } @@ -27939,11 +28286,11 @@ var ts; } function isStatementWithLocals(node) { switch (node.kind) { - case 194 /* Block */: - case 222 /* CaseBlock */: - case 201 /* ForStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: + case 195 /* Block */: + case 223 /* CaseBlock */: + case 202 /* ForStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: return true; } return false; @@ -27973,22 +28320,22 @@ var ts; } function isValueAliasDeclaration(node) { switch (node.kind) { - case 223 /* ImportEqualsDeclaration */: - case 225 /* ImportClause */: - case 226 /* NamespaceImport */: - case 228 /* ImportSpecifier */: - case 232 /* ExportSpecifier */: + case 224 /* ImportEqualsDeclaration */: + case 226 /* ImportClause */: + case 227 /* NamespaceImport */: + case 229 /* ImportSpecifier */: + case 233 /* ExportSpecifier */: return isAliasResolvedToValue(getSymbolOfNode(node)); - case 230 /* ExportDeclaration */: + case 231 /* ExportDeclaration */: var exportClause = node.exportClause; return exportClause && ts.forEach(exportClause.elements, isValueAliasDeclaration); - case 229 /* ExportAssignment */: + case 230 /* ExportAssignment */: return node.expression && node.expression.kind === 69 /* Identifier */ ? isAliasResolvedToValue(getSymbolOfNode(node)) : true; } return false; } function isTopLevelValueImportEqualsWithEntityName(node) { - if (node.parent.kind !== 250 /* SourceFile */ || !ts.isInternalModuleImportEqualsDeclaration(node)) { + if (node.parent.kind !== 251 /* SourceFile */ || !ts.isInternalModuleImportEqualsDeclaration(node)) { // parent is not source file or it is not reference to internal module return false; } @@ -28050,7 +28397,7 @@ var ts; return getNodeLinks(node).enumMemberValue; } function getConstantValue(node) { - if (node.kind === 249 /* EnumMember */) { + if (node.kind === 250 /* EnumMember */) { return getEnumMemberValue(node); } var symbol = getNodeLinks(node).resolvedSymbol; @@ -28172,23 +28519,38 @@ var ts; } function getExternalModuleFileFromDeclaration(declaration) { var specifier = ts.getExternalModuleName(declaration); - var moduleSymbol = getSymbolAtLocation(specifier); + var moduleSymbol = resolveExternalModuleNameWorker(specifier, specifier, /*moduleNotFoundError*/ undefined); if (!moduleSymbol) { return undefined; } - return ts.getDeclarationOfKind(moduleSymbol, 250 /* SourceFile */); + return ts.getDeclarationOfKind(moduleSymbol, 251 /* SourceFile */); } function initializeTypeChecker() { // Bind all source files and propagate errors ts.forEach(host.getSourceFiles(), function (file) { ts.bindSourceFile(file, compilerOptions); }); + var augmentations; // Initialize global symbol table ts.forEach(host.getSourceFiles(), function (file) { if (!ts.isExternalOrCommonJsModule(file)) { mergeSymbolTable(globals, file.locals); } + if (file.moduleAugmentations) { + (augmentations || (augmentations = [])).push(file.moduleAugmentations); + } }); + if (augmentations) { + // merge module augmentations. + // this needs to be done after global symbol table is initialized to make sure that all ambient modules are indexed + for (var _i = 0, augmentations_1 = augmentations; _i < augmentations_1.length; _i++) { + var list = augmentations_1[_i]; + for (var _a = 0, list_2 = list; _a < list_2.length; _a++) { + var augmentation = list_2[_a]; + mergeModuleAugmentation(augmentation); + } + } + } // Setup global builtins addToSymbolTable(globals, builtinGlobals, ts.Diagnostics.Declaration_name_conflicts_with_built_in_global_identifier_0); getSymbolLinks(undefinedSymbol).type = undefinedType; @@ -28262,14 +28624,14 @@ var ts; return false; } if (!ts.nodeCanBeDecorated(node)) { - if (node.kind === 143 /* MethodDeclaration */ && !ts.nodeIsPresent(node.body)) { + if (node.kind === 144 /* MethodDeclaration */ && !ts.nodeIsPresent(node.body)) { return grammarErrorOnFirstToken(node, ts.Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload); } else { return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_are_not_valid_here); } } - else if (node.kind === 145 /* GetAccessor */ || node.kind === 146 /* SetAccessor */) { + else if (node.kind === 146 /* GetAccessor */ || node.kind === 147 /* SetAccessor */) { var accessors = ts.getAllAccessorDeclarations(node.parent.members, node); if (accessors.firstAccessor.decorators && node === accessors.secondAccessor) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); @@ -28279,38 +28641,38 @@ var ts; } function checkGrammarModifiers(node) { switch (node.kind) { - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 144 /* Constructor */: - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 149 /* IndexSignature */: - case 220 /* ModuleDeclaration */: - case 224 /* ImportDeclaration */: - case 223 /* ImportEqualsDeclaration */: - case 230 /* ExportDeclaration */: - case 229 /* ExportAssignment */: - case 138 /* Parameter */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 145 /* Constructor */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 150 /* IndexSignature */: + case 221 /* ModuleDeclaration */: + case 225 /* ImportDeclaration */: + case 224 /* ImportEqualsDeclaration */: + case 231 /* ExportDeclaration */: + case 230 /* ExportAssignment */: + case 139 /* Parameter */: break; - case 215 /* FunctionDeclaration */: + case 216 /* FunctionDeclaration */: if (node.modifiers && (node.modifiers.length > 1 || node.modifiers[0].kind !== 118 /* AsyncKeyword */) && - node.parent.kind !== 221 /* ModuleBlock */ && node.parent.kind !== 250 /* SourceFile */) { + node.parent.kind !== 222 /* ModuleBlock */ && node.parent.kind !== 251 /* SourceFile */) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); } break; - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: - case 195 /* VariableStatement */: - case 218 /* TypeAliasDeclaration */: - if (node.modifiers && node.parent.kind !== 221 /* ModuleBlock */ && node.parent.kind !== 250 /* SourceFile */) { + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: + case 196 /* VariableStatement */: + case 219 /* TypeAliasDeclaration */: + if (node.modifiers && node.parent.kind !== 222 /* ModuleBlock */ && node.parent.kind !== 251 /* SourceFile */) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); } break; - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: if (node.modifiers && (node.modifiers.length > 1 || node.modifiers[0].kind !== 74 /* ConstKeyword */) && - node.parent.kind !== 221 /* ModuleBlock */ && node.parent.kind !== 250 /* SourceFile */) { + node.parent.kind !== 222 /* ModuleBlock */ && node.parent.kind !== 251 /* SourceFile */) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); } break; @@ -28326,7 +28688,7 @@ var ts; var modifier = _a[_i]; switch (modifier.kind) { case 74 /* ConstKeyword */: - if (node.kind !== 219 /* EnumDeclaration */ && node.parent.kind === 216 /* ClassDeclaration */) { + if (node.kind !== 220 /* EnumDeclaration */ && node.parent.kind === 217 /* ClassDeclaration */) { return grammarErrorOnNode(node, ts.Diagnostics.A_class_member_cannot_have_the_0_keyword, ts.tokenToString(74 /* ConstKeyword */)); } break; @@ -28354,7 +28716,7 @@ var ts; else if (flags & 256 /* Async */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "async"); } - else if (node.parent.kind === 221 /* ModuleBlock */ || node.parent.kind === 250 /* SourceFile */) { + else if (node.parent.kind === 222 /* ModuleBlock */ || node.parent.kind === 251 /* SourceFile */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_element, text); } else if (flags & 128 /* Abstract */) { @@ -28374,10 +28736,10 @@ var ts; else if (flags & 256 /* Async */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "static", "async"); } - else if (node.parent.kind === 221 /* ModuleBlock */ || node.parent.kind === 250 /* SourceFile */) { + else if (node.parent.kind === 222 /* ModuleBlock */ || node.parent.kind === 251 /* SourceFile */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_element, "static"); } - else if (node.kind === 138 /* Parameter */) { + else if (node.kind === 139 /* Parameter */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static"); } else if (flags & 128 /* Abstract */) { @@ -28399,10 +28761,10 @@ var ts; else if (flags & 256 /* Async */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "export", "async"); } - else if (node.parent.kind === 216 /* ClassDeclaration */) { + else if (node.parent.kind === 217 /* ClassDeclaration */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "export"); } - else if (node.kind === 138 /* Parameter */) { + else if (node.kind === 139 /* Parameter */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export"); } flags |= 2 /* Export */; @@ -28414,13 +28776,13 @@ var ts; else if (flags & 256 /* Async */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); } - else if (node.parent.kind === 216 /* ClassDeclaration */) { + else if (node.parent.kind === 217 /* ClassDeclaration */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "declare"); } - else if (node.kind === 138 /* Parameter */) { + else if (node.kind === 139 /* Parameter */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare"); } - else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 221 /* ModuleBlock */) { + else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 222 /* ModuleBlock */) { return grammarErrorOnNode(modifier, ts.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } flags |= 4 /* Ambient */; @@ -28430,11 +28792,11 @@ var ts; if (flags & 128 /* Abstract */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "abstract"); } - if (node.kind !== 216 /* ClassDeclaration */) { - if (node.kind !== 143 /* MethodDeclaration */) { + if (node.kind !== 217 /* ClassDeclaration */) { + if (node.kind !== 144 /* MethodDeclaration */) { return grammarErrorOnNode(modifier, ts.Diagnostics.abstract_modifier_can_only_appear_on_a_class_or_method_declaration); } - if (!(node.parent.kind === 216 /* ClassDeclaration */ && node.parent.flags & 128 /* Abstract */)) { + if (!(node.parent.kind === 217 /* ClassDeclaration */ && node.parent.flags & 128 /* Abstract */)) { return grammarErrorOnNode(modifier, ts.Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class); } if (flags & 64 /* Static */) { @@ -28453,7 +28815,7 @@ var ts; else if (flags & 4 /* Ambient */ || ts.isInAmbientContext(node.parent)) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); } - else if (node.kind === 138 /* Parameter */) { + else if (node.kind === 139 /* Parameter */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); } flags |= 256 /* Async */; @@ -28461,7 +28823,7 @@ var ts; break; } } - if (node.kind === 144 /* Constructor */) { + if (node.kind === 145 /* Constructor */) { if (flags & 64 /* Static */) { return grammarErrorOnNode(lastStatic, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); } @@ -28479,10 +28841,10 @@ var ts; } return; } - else if ((node.kind === 224 /* ImportDeclaration */ || node.kind === 223 /* ImportEqualsDeclaration */) && flags & 4 /* Ambient */) { + else if ((node.kind === 225 /* ImportDeclaration */ || node.kind === 224 /* ImportEqualsDeclaration */) && flags & 4 /* Ambient */) { return grammarErrorOnNode(lastDeclare, ts.Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); } - else if (node.kind === 138 /* Parameter */ && (flags & 56 /* AccessibilityModifier */) && ts.isBindingPattern(node.name)) { + else if (node.kind === 139 /* Parameter */ && (flags & 56 /* AccessibilityModifier */) && ts.isBindingPattern(node.name)) { return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_may_not_be_a_binding_pattern); } if (flags & 256 /* Async */) { @@ -28494,10 +28856,10 @@ var ts; return grammarErrorOnNode(asyncModifier, ts.Diagnostics.Async_functions_are_only_available_when_targeting_ECMAScript_6_and_higher); } switch (node.kind) { - case 143 /* MethodDeclaration */: - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: + case 144 /* MethodDeclaration */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: if (!node.asteriskToken) { return false; } @@ -28563,7 +28925,7 @@ var ts; checkGrammarParameterList(node.parameters) || checkGrammarArrowFunction(node, file); } function checkGrammarArrowFunction(node, file) { - if (node.kind === 176 /* ArrowFunction */) { + if (node.kind === 177 /* ArrowFunction */) { var arrowFunction = node; var startLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.pos).line; var endLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.end).line; @@ -28631,7 +28993,7 @@ var ts; var sourceFile = ts.getSourceFileOfNode(node); for (var _i = 0, args_1 = args; _i < args_1.length; _i++) { var arg = args_1[_i]; - if (arg.kind === 189 /* OmittedExpression */) { + if (arg.kind === 190 /* OmittedExpression */) { return grammarErrorAtPos(sourceFile, arg.pos, 0, ts.Diagnostics.Argument_expression_expected); } } @@ -28705,19 +29067,19 @@ var ts; } function checkGrammarComputedPropertyName(node) { // If node is not a computedPropertyName, just skip the grammar checking - if (node.kind !== 136 /* ComputedPropertyName */) { + if (node.kind !== 137 /* ComputedPropertyName */) { return false; } var computedPropertyName = node; - if (computedPropertyName.expression.kind === 183 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 24 /* CommaToken */) { + if (computedPropertyName.expression.kind === 184 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 24 /* CommaToken */) { return grammarErrorOnNode(computedPropertyName.expression, ts.Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name); } } function checkGrammarForGenerator(node) { if (node.asteriskToken) { - ts.Debug.assert(node.kind === 215 /* FunctionDeclaration */ || - node.kind === 175 /* FunctionExpression */ || - node.kind === 143 /* MethodDeclaration */); + ts.Debug.assert(node.kind === 216 /* FunctionDeclaration */ || + node.kind === 176 /* FunctionExpression */ || + node.kind === 144 /* MethodDeclaration */); if (ts.isInAmbientContext(node)) { return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_not_allowed_in_an_ambient_context); } @@ -28741,21 +29103,21 @@ var ts; var SetAccesor = 4; var GetOrSetAccessor = GetAccessor | SetAccesor; var _loop_1 = function(prop) { - var name_16 = prop.name; - if (prop.kind === 189 /* OmittedExpression */ || - name_16.kind === 136 /* ComputedPropertyName */) { + var name_19 = prop.name; + if (prop.kind === 190 /* OmittedExpression */ || + name_19.kind === 137 /* ComputedPropertyName */) { // If the name is not a ComputedPropertyName, the grammar checking will skip it - checkGrammarComputedPropertyName(name_16); + checkGrammarComputedPropertyName(name_19); return "continue"; } - if (prop.kind === 248 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { + if (prop.kind === 249 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { // having objectAssignmentInitializer is only valid in ObjectAssignmentPattern // outside of destructuring it is a syntax error return { value: grammarErrorOnNode(prop.equalsToken, ts.Diagnostics.can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment) }; } // Modifiers are never allowed on properties except for 'async' on a method declaration ts.forEach(prop.modifiers, function (mod) { - if (mod.kind !== 118 /* AsyncKeyword */ || prop.kind !== 143 /* MethodDeclaration */) { + if (mod.kind !== 118 /* AsyncKeyword */ || prop.kind !== 144 /* MethodDeclaration */) { grammarErrorOnNode(mod, ts.Diagnostics._0_modifier_cannot_be_used_here, ts.getTextOfNode(mod)); } }); @@ -28768,44 +29130,44 @@ var ts; // d.IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true // and either both previous and propId.descriptor have[[Get]] fields or both previous and propId.descriptor have[[Set]] fields var currentKind = void 0; - if (prop.kind === 247 /* PropertyAssignment */ || prop.kind === 248 /* ShorthandPropertyAssignment */) { + if (prop.kind === 248 /* PropertyAssignment */ || prop.kind === 249 /* ShorthandPropertyAssignment */) { // Grammar checking for computedPropertName and shorthandPropertyAssignment checkGrammarForInvalidQuestionMark(prop, prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional); - if (name_16.kind === 8 /* NumericLiteral */) { - checkGrammarNumericLiteral(name_16); + if (name_19.kind === 8 /* NumericLiteral */) { + checkGrammarNumericLiteral(name_19); } currentKind = Property; } - else if (prop.kind === 143 /* MethodDeclaration */) { + else if (prop.kind === 144 /* MethodDeclaration */) { currentKind = Property; } - else if (prop.kind === 145 /* GetAccessor */) { + else if (prop.kind === 146 /* GetAccessor */) { currentKind = GetAccessor; } - else if (prop.kind === 146 /* SetAccessor */) { + else if (prop.kind === 147 /* SetAccessor */) { currentKind = SetAccesor; } else { ts.Debug.fail("Unexpected syntax kind:" + prop.kind); } - if (!ts.hasProperty(seen, name_16.text)) { - seen[name_16.text] = currentKind; + if (!ts.hasProperty(seen, name_19.text)) { + seen[name_19.text] = currentKind; } else { - var existingKind = seen[name_16.text]; + var existingKind = seen[name_19.text]; if (currentKind === Property && existingKind === Property) { return "continue"; } else if ((currentKind & GetOrSetAccessor) && (existingKind & GetOrSetAccessor)) { if (existingKind !== GetOrSetAccessor && currentKind !== existingKind) { - seen[name_16.text] = currentKind | existingKind; + seen[name_19.text] = currentKind | existingKind; } else { - return { value: grammarErrorOnNode(name_16, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name) }; + return { value: grammarErrorOnNode(name_19, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name) }; } } else { - return { value: grammarErrorOnNode(name_16, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name) }; + return { value: grammarErrorOnNode(name_19, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name) }; } } }; @@ -28820,19 +29182,19 @@ var ts; var seen = {}; for (var _i = 0, _a = node.attributes; _i < _a.length; _i++) { var attr = _a[_i]; - if (attr.kind === 241 /* JsxSpreadAttribute */) { + if (attr.kind === 242 /* JsxSpreadAttribute */) { continue; } var jsxAttr = attr; - var name_17 = jsxAttr.name; - if (!ts.hasProperty(seen, name_17.text)) { - seen[name_17.text] = true; + var name_20 = jsxAttr.name; + if (!ts.hasProperty(seen, name_20.text)) { + seen[name_20.text] = true; } else { - return grammarErrorOnNode(name_17, ts.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); + return grammarErrorOnNode(name_20, ts.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); } var initializer = jsxAttr.initializer; - if (initializer && initializer.kind === 242 /* JsxExpression */ && !initializer.expression) { + if (initializer && initializer.kind === 243 /* JsxExpression */ && !initializer.expression) { return grammarErrorOnNode(jsxAttr.initializer, ts.Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression); } } @@ -28841,7 +29203,7 @@ var ts; if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) { return true; } - if (forInOrOfStatement.initializer.kind === 214 /* VariableDeclarationList */) { + if (forInOrOfStatement.initializer.kind === 215 /* VariableDeclarationList */) { var variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { var declarations = variableList.declarations; @@ -28856,20 +29218,20 @@ var ts; return false; } if (declarations.length > 1) { - var diagnostic = forInOrOfStatement.kind === 202 /* ForInStatement */ + var diagnostic = forInOrOfStatement.kind === 203 /* ForInStatement */ ? ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic); } var firstDeclaration = declarations[0]; if (firstDeclaration.initializer) { - var diagnostic = forInOrOfStatement.kind === 202 /* ForInStatement */ + var diagnostic = forInOrOfStatement.kind === 203 /* ForInStatement */ ? ts.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : ts.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; return grammarErrorOnNode(firstDeclaration.name, diagnostic); } if (firstDeclaration.type) { - var diagnostic = forInOrOfStatement.kind === 202 /* ForInStatement */ + var diagnostic = forInOrOfStatement.kind === 203 /* ForInStatement */ ? ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; return grammarErrorOnNode(firstDeclaration, diagnostic); @@ -28892,10 +29254,10 @@ var ts; else if (accessor.typeParameters) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.An_accessor_cannot_have_type_parameters); } - else if (kind === 145 /* GetAccessor */ && accessor.parameters.length) { + else if (kind === 146 /* GetAccessor */ && accessor.parameters.length) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_get_accessor_cannot_have_parameters); } - else if (kind === 146 /* SetAccessor */) { + else if (kind === 147 /* SetAccessor */) { if (accessor.type) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } @@ -28930,12 +29292,12 @@ var ts; checkGrammarForGenerator(node)) { return true; } - if (node.parent.kind === 167 /* ObjectLiteralExpression */) { + if (node.parent.kind === 168 /* ObjectLiteralExpression */) { if (checkGrammarForInvalidQuestionMark(node, node.questionToken, ts.Diagnostics.A_class_member_cannot_be_declared_optional)) { return true; } else if (node.body === undefined) { - return grammarErrorAtPos(getSourceFile(node), node.end - 1, ";".length, ts.Diagnostics._0_expected, "{"); + return grammarErrorAtPos(ts.getSourceFileOfNode(node), node.end - 1, ";".length, ts.Diagnostics._0_expected, "{"); } } if (ts.isClassLike(node.parent)) { @@ -28954,10 +29316,10 @@ var ts; return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol); } } - else if (node.parent.kind === 217 /* InterfaceDeclaration */) { + else if (node.parent.kind === 218 /* InterfaceDeclaration */) { return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol); } - else if (node.parent.kind === 155 /* TypeLiteral */) { + else if (node.parent.kind === 156 /* TypeLiteral */) { return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol); } } @@ -28968,11 +29330,11 @@ var ts; return grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary); } switch (current.kind) { - case 209 /* LabeledStatement */: + case 210 /* LabeledStatement */: if (node.label && current.label.text === node.label.text) { // found matching label - verify that label usage is correct // continue can only target labels that are on iteration statements - var isMisplacedContinueLabel = node.kind === 204 /* ContinueStatement */ + var isMisplacedContinueLabel = node.kind === 205 /* ContinueStatement */ && !ts.isIterationStatement(current.statement, /*lookInLabeledStatement*/ true); if (isMisplacedContinueLabel) { return grammarErrorOnNode(node, ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement); @@ -28980,8 +29342,8 @@ var ts; return false; } break; - case 208 /* SwitchStatement */: - if (node.kind === 205 /* BreakStatement */ && !node.label) { + case 209 /* SwitchStatement */: + if (node.kind === 206 /* BreakStatement */ && !node.label) { // unlabeled break within switch statement - ok return false; } @@ -28996,13 +29358,13 @@ var ts; current = current.parent; } if (node.label) { - var message = node.kind === 205 /* BreakStatement */ + var message = node.kind === 206 /* BreakStatement */ ? ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } else { - var message = node.kind === 205 /* BreakStatement */ + var message = node.kind === 206 /* BreakStatement */ ? ts.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : ts.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); @@ -29014,7 +29376,7 @@ var ts; if (node !== ts.lastOrUndefined(elements)) { return grammarErrorOnNode(node, ts.Diagnostics.A_rest_element_must_be_last_in_an_array_destructuring_pattern); } - if (node.name.kind === 164 /* ArrayBindingPattern */ || node.name.kind === 163 /* ObjectBindingPattern */) { + if (node.name.kind === 165 /* ArrayBindingPattern */ || node.name.kind === 164 /* ObjectBindingPattern */) { return grammarErrorOnNode(node.name, ts.Diagnostics.A_rest_element_cannot_contain_a_binding_pattern); } if (node.initializer) { @@ -29024,7 +29386,7 @@ var ts; } } function checkGrammarVariableDeclaration(node) { - if (node.parent.parent.kind !== 202 /* ForInStatement */ && node.parent.parent.kind !== 203 /* ForOfStatement */) { + if (node.parent.parent.kind !== 203 /* ForInStatement */ && node.parent.parent.kind !== 204 /* ForOfStatement */) { if (ts.isInAmbientContext(node)) { if (node.initializer) { // Error on equals token which immediate precedes the initializer @@ -29060,7 +29422,7 @@ var ts; var elements = name.elements; for (var _i = 0, elements_2 = elements; _i < elements_2.length; _i++) { var element = elements_2[_i]; - if (element.kind !== 189 /* OmittedExpression */) { + if (element.kind !== 190 /* OmittedExpression */) { checkGrammarNameInLetOrConstDeclarations(element.name); } } @@ -29077,15 +29439,15 @@ var ts; } function allowLetAndConstDeclarations(parent) { switch (parent.kind) { - case 198 /* IfStatement */: - case 199 /* DoStatement */: - case 200 /* WhileStatement */: - case 207 /* WithStatement */: - case 201 /* ForStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: + case 199 /* IfStatement */: + case 200 /* DoStatement */: + case 201 /* WhileStatement */: + case 208 /* WithStatement */: + case 202 /* ForStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: return false; - case 209 /* LabeledStatement */: + case 210 /* LabeledStatement */: return allowLetAndConstDeclarations(parent.parent); } return true; @@ -29141,7 +29503,7 @@ var ts; return true; } } - else if (node.parent.kind === 217 /* InterfaceDeclaration */) { + else if (node.parent.kind === 218 /* InterfaceDeclaration */) { if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol)) { return true; } @@ -29149,7 +29511,7 @@ var ts; return grammarErrorOnNode(node.initializer, ts.Diagnostics.An_interface_property_cannot_have_an_initializer); } } - else if (node.parent.kind === 155 /* TypeLiteral */) { + else if (node.parent.kind === 156 /* TypeLiteral */) { if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol)) { return true; } @@ -29174,12 +29536,12 @@ var ts; // export_opt AmbientDeclaration // // TODO: The spec needs to be amended to reflect this grammar. - if (node.kind === 217 /* InterfaceDeclaration */ || - node.kind === 218 /* TypeAliasDeclaration */ || - node.kind === 224 /* ImportDeclaration */ || - node.kind === 223 /* ImportEqualsDeclaration */ || - node.kind === 230 /* ExportDeclaration */ || - node.kind === 229 /* ExportAssignment */ || + if (node.kind === 218 /* InterfaceDeclaration */ || + node.kind === 219 /* TypeAliasDeclaration */ || + node.kind === 225 /* ImportDeclaration */ || + node.kind === 224 /* ImportEqualsDeclaration */ || + node.kind === 231 /* ExportDeclaration */ || + node.kind === 230 /* ExportAssignment */ || (node.flags & 4 /* Ambient */) || (node.flags & (2 /* Export */ | 512 /* Default */))) { return false; @@ -29189,7 +29551,7 @@ var ts; function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) { for (var _i = 0, _a = file.statements; _i < _a.length; _i++) { var decl = _a[_i]; - if (ts.isDeclaration(decl) || decl.kind === 195 /* VariableStatement */) { + if (ts.isDeclaration(decl) || decl.kind === 196 /* VariableStatement */) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; } @@ -29215,7 +29577,7 @@ var ts; // to prevent noisyness. So use a bit on the block to indicate if // this has already been reported, and don't report if it has. // - if (node.parent.kind === 194 /* Block */ || node.parent.kind === 221 /* ModuleBlock */ || node.parent.kind === 250 /* SourceFile */) { + if (node.parent.kind === 195 /* Block */ || node.parent.kind === 222 /* ModuleBlock */ || node.parent.kind === 251 /* SourceFile */) { var links_1 = getNodeLinks(node.parent); // Check if the containing block ever report this error if (!links_1.hasReportedStatementInAmbientContext) { @@ -29255,8 +29617,9 @@ var ts; getSourceMapData: function () { return undefined; }, setSourceFile: function (sourceFile) { }, emitStart: function (range) { }, - emitEnd: function (range) { }, + emitEnd: function (range, stopOverridingSpan) { }, emitPos: function (pos) { }, + changeEmitSourcePos: function () { }, getText: function () { return undefined; }, getSourceMappingURL: function () { return undefined; }, initialize: function (filePath, sourceMapFilePath, sourceFiles, isBundledEmit) { }, @@ -29270,6 +29633,8 @@ var ts; var compilerOptions = host.getCompilerOptions(); var currentSourceFile; var sourceMapDir; // The directory in which sourcemap will be + var stopOverridingSpan = false; + var modifyLastSourcePos = false; // Current source map file and its index in the sources list var sourceMapSourceIndex; // Last recorded and encoded spans @@ -29284,6 +29649,7 @@ var ts; emitPos: emitPos, emitStart: emitStart, emitEnd: emitEnd, + changeEmitSourcePos: changeEmitSourcePos, getText: getText, getSourceMappingURL: getSourceMappingURL, initialize: initialize, @@ -29358,6 +29724,39 @@ var ts; lastEncodedNameIndex = undefined; sourceMapData = undefined; } + function updateLastEncodedAndRecordedSpans() { + if (modifyLastSourcePos) { + // Reset the source pos + modifyLastSourcePos = false; + // Change Last recorded Map with last encoded emit line and character + lastRecordedSourceMapSpan.emittedLine = lastEncodedSourceMapSpan.emittedLine; + lastRecordedSourceMapSpan.emittedColumn = lastEncodedSourceMapSpan.emittedColumn; + // Pop sourceMapDecodedMappings to remove last entry + sourceMapData.sourceMapDecodedMappings.pop(); + // Change the last encoded source map + lastEncodedSourceMapSpan = sourceMapData.sourceMapDecodedMappings.length ? + sourceMapData.sourceMapDecodedMappings[sourceMapData.sourceMapDecodedMappings.length - 1] : + undefined; + // TODO: Update lastEncodedNameIndex + // Since we dont support this any more, lets not worry about it right now. + // When we start supporting nameIndex, we will get back to this + // Change the encoded source map + var sourceMapMappings = sourceMapData.sourceMapMappings; + var lenthToSet = sourceMapMappings.length - 1; + for (; lenthToSet >= 0; lenthToSet--) { + var currentChar = sourceMapMappings.charAt(lenthToSet); + if (currentChar === ",") { + // Separator for the entry found + break; + } + if (currentChar === ";" && lenthToSet !== 0 && sourceMapMappings.charAt(lenthToSet - 1) !== ";") { + // Last line separator found + break; + } + } + sourceMapData.sourceMapMappings = sourceMapMappings.substr(0, Math.max(0, lenthToSet)); + } + } // Encoding for sourcemap span function encodeLastRecordedSourceMapSpan() { if (!lastRecordedSourceMapSpan || lastRecordedSourceMapSpan === lastEncodedSourceMapSpan) { @@ -29388,6 +29787,7 @@ var ts; sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.sourceColumn - lastEncodedSourceMapSpan.sourceColumn); // 5. Relative namePosition 0 based if (lastRecordedSourceMapSpan.nameIndex >= 0) { + ts.Debug.assert(false, "We do not support name index right now, Make sure to update updateLastEncodedAndRecordedSpans when we start using this"); sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.nameIndex - lastEncodedNameIndex); lastEncodedNameIndex = lastRecordedSourceMapSpan.nameIndex; } @@ -29421,20 +29821,30 @@ var ts; sourceColumn: sourceLinePos.character, sourceIndex: sourceMapSourceIndex }; + stopOverridingSpan = false; } - else { + else if (!stopOverridingSpan) { // Take the new pos instead since there is no change in emittedLine and column since last location lastRecordedSourceMapSpan.sourceLine = sourceLinePos.line; lastRecordedSourceMapSpan.sourceColumn = sourceLinePos.character; lastRecordedSourceMapSpan.sourceIndex = sourceMapSourceIndex; } + updateLastEncodedAndRecordedSpans(); + } + function getStartPos(range) { + var rangeHasDecorators = !!range.decorators; + return range.pos !== -1 ? ts.skipTrivia(currentSourceFile.text, rangeHasDecorators ? range.decorators.end : range.pos) : -1; } function emitStart(range) { - var rangeHasDecorators = !!range.decorators; - emitPos(range.pos !== -1 ? ts.skipTrivia(currentSourceFile.text, rangeHasDecorators ? range.decorators.end : range.pos) : -1); + emitPos(getStartPos(range)); } - function emitEnd(range) { + function emitEnd(range, stopOverridingEnd) { emitPos(range.end); + stopOverridingSpan = stopOverridingEnd; + } + function changeEmitSourcePos() { + ts.Debug.assert(!modifyLastSourcePos); + modifyLastSourcePos = true; } function setSourceFile(sourceFile) { currentSourceFile = sourceFile; @@ -29536,6 +29946,7 @@ var ts; var writeTextOfNode; var writer = createAndSetNewTextWriterWithSymbolWriter(); var enclosingDeclaration; + var resultHasExternalModuleIndicator; var currentText; var currentLineMap; var currentIdentifiers; @@ -29577,6 +29988,7 @@ var ts; } }); } + resultHasExternalModuleIndicator = false; if (!isBundledEmit || !ts.isExternalModule(sourceFile)) { noDeclare = false; emitSourceFile(sourceFile); @@ -29596,7 +30008,7 @@ var ts; var oldWriter = writer; ts.forEach(moduleElementDeclarationEmitInfo, function (aliasEmitInfo) { if (aliasEmitInfo.isVisible && !aliasEmitInfo.asynchronousOutput) { - ts.Debug.assert(aliasEmitInfo.node.kind === 224 /* ImportDeclaration */); + ts.Debug.assert(aliasEmitInfo.node.kind === 225 /* ImportDeclaration */); createAndSetNewTextWriterWithSymbolWriter(); ts.Debug.assert(aliasEmitInfo.indent === 0 || (aliasEmitInfo.indent === 1 && isBundledEmit)); for (var i = 0; i < aliasEmitInfo.indent; i++) { @@ -29613,6 +30025,13 @@ var ts; allSourcesModuleElementDeclarationEmitInfo = allSourcesModuleElementDeclarationEmitInfo.concat(moduleElementDeclarationEmitInfo); moduleElementDeclarationEmitInfo = []; } + if (!isBundledEmit && ts.isExternalModule(sourceFile) && sourceFile.moduleAugmentations.length && !resultHasExternalModuleIndicator) { + // if file was external module with augmentations - this fact should be preserved in .d.ts as well. + // in case if we didn't write any external module specifiers in .d.ts we need to emit something + // that will force compiler to think that this file is an external module - 'export {}' is a reasonable choice here. + write("export {};"); + writeLine(); + } }); return { reportedDeclarationError: reportedDeclarationError, @@ -29659,10 +30078,10 @@ var ts; var oldWriter = writer; ts.forEach(nodes, function (declaration) { var nodeToCheck; - if (declaration.kind === 213 /* VariableDeclaration */) { + if (declaration.kind === 214 /* VariableDeclaration */) { nodeToCheck = declaration.parent.parent; } - else if (declaration.kind === 227 /* NamedImports */ || declaration.kind === 228 /* ImportSpecifier */ || declaration.kind === 225 /* ImportClause */) { + else if (declaration.kind === 228 /* NamedImports */ || declaration.kind === 229 /* ImportSpecifier */ || declaration.kind === 226 /* ImportClause */) { ts.Debug.fail("We should be getting ImportDeclaration instead to write"); } else { @@ -29680,7 +30099,7 @@ var ts; // Writing of function bar would mark alias declaration foo as visible but we haven't yet visited that declaration so do nothing, // we would write alias foo declaration when we visit it since it would now be marked as visible if (moduleElementEmitInfo) { - if (moduleElementEmitInfo.node.kind === 224 /* ImportDeclaration */) { + if (moduleElementEmitInfo.node.kind === 225 /* ImportDeclaration */) { // we have to create asynchronous output only after we have collected complete information // because it is possible to enable multiple bindings as asynchronously visible moduleElementEmitInfo.isVisible = true; @@ -29690,12 +30109,12 @@ var ts; for (var declarationIndent = moduleElementEmitInfo.indent; declarationIndent; declarationIndent--) { increaseIndent(); } - if (nodeToCheck.kind === 220 /* ModuleDeclaration */) { + if (nodeToCheck.kind === 221 /* ModuleDeclaration */) { ts.Debug.assert(asynchronousSubModuleDeclarationEmitInfo === undefined); asynchronousSubModuleDeclarationEmitInfo = []; } writeModuleElement(nodeToCheck); - if (nodeToCheck.kind === 220 /* ModuleDeclaration */) { + if (nodeToCheck.kind === 221 /* ModuleDeclaration */) { moduleElementEmitInfo.subModuleElementDeclarationEmitInfo = asynchronousSubModuleDeclarationEmitInfo; asynchronousSubModuleDeclarationEmitInfo = undefined; } @@ -29803,35 +30222,35 @@ var ts; case 120 /* BooleanKeyword */: case 131 /* SymbolKeyword */: case 103 /* VoidKeyword */: - case 161 /* ThisType */: - case 162 /* StringLiteralType */: + case 162 /* ThisType */: + case 163 /* StringLiteralType */: return writeTextOfNode(currentText, type); - case 190 /* ExpressionWithTypeArguments */: + case 191 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(type); - case 151 /* TypeReference */: + case 152 /* TypeReference */: return emitTypeReference(type); - case 154 /* TypeQuery */: + case 155 /* TypeQuery */: return emitTypeQuery(type); - case 156 /* ArrayType */: + case 157 /* ArrayType */: return emitArrayType(type); - case 157 /* TupleType */: + case 158 /* TupleType */: return emitTupleType(type); - case 158 /* UnionType */: + case 159 /* UnionType */: return emitUnionType(type); - case 159 /* IntersectionType */: + case 160 /* IntersectionType */: return emitIntersectionType(type); - case 160 /* ParenthesizedType */: + case 161 /* ParenthesizedType */: return emitParenType(type); - case 152 /* FunctionType */: - case 153 /* ConstructorType */: + case 153 /* FunctionType */: + case 154 /* ConstructorType */: return emitSignatureDeclarationWithJsDocComments(type); - case 155 /* TypeLiteral */: + case 156 /* TypeLiteral */: return emitTypeLiteral(type); case 69 /* Identifier */: return emitEntityName(type); - case 135 /* QualifiedName */: + case 136 /* QualifiedName */: return emitEntityName(type); - case 150 /* TypePredicate */: + case 151 /* TypePredicate */: return emitTypePredicate(type); } function writeEntityName(entityName) { @@ -29839,8 +30258,8 @@ var ts; writeTextOfNode(currentText, entityName); } else { - var left = entityName.kind === 135 /* QualifiedName */ ? entityName.left : entityName.expression; - var right = entityName.kind === 135 /* QualifiedName */ ? entityName.right : entityName.name; + var left = entityName.kind === 136 /* QualifiedName */ ? entityName.left : entityName.expression; + var right = entityName.kind === 136 /* QualifiedName */ ? entityName.right : entityName.name; writeEntityName(left); write("."); writeTextOfNode(currentText, right); @@ -29849,13 +30268,13 @@ var ts; function emitEntityName(entityName) { var visibilityResult = resolver.isEntityNameVisible(entityName, // Aliases can be written asynchronously so use correct enclosing declaration - entityName.parent.kind === 223 /* ImportEqualsDeclaration */ ? entityName.parent : enclosingDeclaration); + entityName.parent.kind === 224 /* ImportEqualsDeclaration */ ? entityName.parent : enclosingDeclaration); handleSymbolAccessibilityError(visibilityResult); writeEntityName(entityName); } function emitExpressionWithTypeArguments(node) { if (ts.isSupportedExpressionWithTypeArguments(node)) { - ts.Debug.assert(node.expression.kind === 69 /* Identifier */ || node.expression.kind === 168 /* PropertyAccessExpression */); + ts.Debug.assert(node.expression.kind === 69 /* Identifier */ || node.expression.kind === 169 /* PropertyAccessExpression */); emitEntityName(node.expression); if (node.typeArguments) { write("<"); @@ -29934,9 +30353,9 @@ var ts; var count = 0; while (true) { count++; - var name_18 = baseName + "_" + count; - if (!ts.hasProperty(currentIdentifiers, name_18)) { - return name_18; + var name_21 = baseName + "_" + count; + if (!ts.hasProperty(currentIdentifiers, name_21)) { + return name_21; } } } @@ -29980,10 +30399,10 @@ var ts; if (isModuleElementVisible) { writeModuleElement(node); } - else if (node.kind === 223 /* ImportEqualsDeclaration */ || - (node.parent.kind === 250 /* SourceFile */ && isCurrentFileExternalModule)) { + else if (node.kind === 224 /* ImportEqualsDeclaration */ || + (node.parent.kind === 251 /* SourceFile */ && isCurrentFileExternalModule)) { var isVisible; - if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 250 /* SourceFile */) { + if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 251 /* SourceFile */) { // Import declaration of another module that is visited async so lets put it in right spot asynchronousSubModuleDeclarationEmitInfo.push({ node: node, @@ -29993,7 +30412,7 @@ var ts; }); } else { - if (node.kind === 224 /* ImportDeclaration */) { + if (node.kind === 225 /* ImportDeclaration */) { var importDeclaration = node; if (importDeclaration.importClause) { isVisible = (importDeclaration.importClause.name && resolver.isDeclarationVisible(importDeclaration.importClause)) || @@ -30011,23 +30430,23 @@ var ts; } function writeModuleElement(node) { switch (node.kind) { - case 215 /* FunctionDeclaration */: + case 216 /* FunctionDeclaration */: return writeFunctionDeclaration(node); - case 195 /* VariableStatement */: + case 196 /* VariableStatement */: return writeVariableStatement(node); - case 217 /* InterfaceDeclaration */: + case 218 /* InterfaceDeclaration */: return writeInterfaceDeclaration(node); - case 216 /* ClassDeclaration */: + case 217 /* ClassDeclaration */: return writeClassDeclaration(node); - case 218 /* TypeAliasDeclaration */: + case 219 /* TypeAliasDeclaration */: return writeTypeAliasDeclaration(node); - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: return writeEnumDeclaration(node); - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: return writeModuleDeclaration(node); - case 223 /* ImportEqualsDeclaration */: + case 224 /* ImportEqualsDeclaration */: return writeImportEqualsDeclaration(node); - case 224 /* ImportDeclaration */: + case 225 /* ImportDeclaration */: return writeImportDeclaration(node); default: ts.Debug.fail("Unknown symbol kind"); @@ -30035,7 +30454,7 @@ var ts; } function emitModuleElementDeclarationFlags(node) { // If the node is parented in the current source file we need to emit export declare or just export - if (node.parent.kind === 250 /* SourceFile */) { + if (node.parent.kind === 251 /* SourceFile */) { // If the node is exported if (node.flags & 2 /* Export */) { write("export "); @@ -30043,7 +30462,7 @@ var ts; if (node.flags & 512 /* Default */) { write("default "); } - else if (node.kind !== 217 /* InterfaceDeclaration */ && !noDeclare) { + else if (node.kind !== 218 /* InterfaceDeclaration */ && !noDeclare) { write("declare "); } } @@ -30092,7 +30511,7 @@ var ts; } function isVisibleNamedBinding(namedBindings) { if (namedBindings) { - if (namedBindings.kind === 226 /* NamespaceImport */) { + if (namedBindings.kind === 227 /* NamespaceImport */) { return resolver.isDeclarationVisible(namedBindings); } else { @@ -30120,7 +30539,7 @@ var ts; // If the default binding was emitted, write the separated write(", "); } - if (node.importClause.namedBindings.kind === 226 /* NamespaceImport */) { + if (node.importClause.namedBindings.kind === 227 /* NamespaceImport */) { write("* as "); writeTextOfNode(currentText, node.importClause.namedBindings.name); } @@ -30137,11 +30556,19 @@ var ts; writer.writeLine(); } function emitExternalModuleSpecifier(parent) { + // emitExternalModuleSpecifier is usually called when we emit something in the.d.ts file that will make it an external module (i.e. import/export declarations). + // the only case when it is not true is when we call it to emit correct name for module augmentation - d.ts files with just module augmentations are not considered + // external modules since they are indistingushable from script files with ambient modules. To fix this in such d.ts files we'll emit top level 'export {}' + // so compiler will treat them as external modules. + resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 221 /* ModuleDeclaration */; var moduleSpecifier; - if (parent.kind === 223 /* ImportEqualsDeclaration */) { + if (parent.kind === 224 /* ImportEqualsDeclaration */) { var node = parent; moduleSpecifier = ts.getExternalModuleImportEqualsDeclarationExpression(node); } + else if (parent.kind === 221 /* ModuleDeclaration */) { + moduleSpecifier = parent.name; + } else { var node = parent; moduleSpecifier = node.moduleSpecifier; @@ -30192,14 +30619,24 @@ var ts; function writeModuleDeclaration(node) { emitJsDocComments(node); emitModuleElementDeclarationFlags(node); - if (node.flags & 65536 /* Namespace */) { - write("namespace "); + if (ts.isGlobalScopeAugmentation(node)) { + write("global "); } else { - write("module "); + if (node.flags & 65536 /* Namespace */) { + write("namespace "); + } + else { + write("module "); + } + if (ts.isExternalModuleAugmentation(node)) { + emitExternalModuleSpecifier(node); + } + else { + writeTextOfNode(currentText, node.name); + } } - writeTextOfNode(currentText, node.name); - while (node.body.kind !== 221 /* ModuleBlock */) { + while (node.body.kind !== 222 /* ModuleBlock */) { node = node.body; write("."); writeTextOfNode(currentText, node.name); @@ -30264,7 +30701,7 @@ var ts; writeLine(); } function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 143 /* MethodDeclaration */ && (node.parent.flags & 16 /* Private */); + return node.parent.kind === 144 /* MethodDeclaration */ && (node.parent.flags & 16 /* Private */); } function emitTypeParameters(typeParameters) { function emitTypeParameter(node) { @@ -30275,15 +30712,15 @@ var ts; // If there is constraint present and this is not a type parameter of the private method emit the constraint if (node.constraint && !isPrivateMethodTypeParameter(node)) { write(" extends "); - if (node.parent.kind === 152 /* FunctionType */ || - node.parent.kind === 153 /* ConstructorType */ || - (node.parent.parent && node.parent.parent.kind === 155 /* TypeLiteral */)) { - ts.Debug.assert(node.parent.kind === 143 /* MethodDeclaration */ || - node.parent.kind === 142 /* MethodSignature */ || - node.parent.kind === 152 /* FunctionType */ || - node.parent.kind === 153 /* ConstructorType */ || - node.parent.kind === 147 /* CallSignature */ || - node.parent.kind === 148 /* ConstructSignature */); + if (node.parent.kind === 153 /* FunctionType */ || + node.parent.kind === 154 /* ConstructorType */ || + (node.parent.parent && node.parent.parent.kind === 156 /* TypeLiteral */)) { + ts.Debug.assert(node.parent.kind === 144 /* MethodDeclaration */ || + node.parent.kind === 143 /* MethodSignature */ || + node.parent.kind === 153 /* FunctionType */ || + node.parent.kind === 154 /* ConstructorType */ || + node.parent.kind === 148 /* CallSignature */ || + node.parent.kind === 149 /* ConstructSignature */); emitType(node.constraint); } else { @@ -30294,31 +30731,31 @@ var ts; // Type parameter constraints are named by user so we should always be able to name it var diagnosticMessage; switch (node.parent.kind) { - case 216 /* ClassDeclaration */: + case 217 /* ClassDeclaration */: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; break; - case 217 /* InterfaceDeclaration */: + case 218 /* InterfaceDeclaration */: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; break; - case 148 /* ConstructSignature */: + case 149 /* ConstructSignature */: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 147 /* CallSignature */: + case 148 /* CallSignature */: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: if (node.parent.flags & 64 /* Static */) { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.parent.kind === 216 /* ClassDeclaration */) { + else if (node.parent.parent.kind === 217 /* ClassDeclaration */) { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } break; - case 215 /* FunctionDeclaration */: + case 216 /* FunctionDeclaration */: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; break; default: @@ -30352,7 +30789,7 @@ var ts; function getHeritageClauseVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; // Heritage clause is written by user so it can always be named - if (node.parent.parent.kind === 216 /* ClassDeclaration */) { + if (node.parent.parent.kind === 217 /* ClassDeclaration */) { // Class or Interface implemented/extended is inaccessible diagnosticMessage = isImplementsList ? ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : @@ -30436,7 +30873,7 @@ var ts; function emitVariableDeclaration(node) { // If we are emitting property it isn't moduleElement and hence we already know it needs to be emitted // so there is no check needed to see if declaration is visible - if (node.kind !== 213 /* VariableDeclaration */ || resolver.isDeclarationVisible(node)) { + if (node.kind !== 214 /* VariableDeclaration */ || resolver.isDeclarationVisible(node)) { if (ts.isBindingPattern(node.name)) { emitBindingPattern(node.name); } @@ -30446,10 +30883,10 @@ var ts; // what we want, namely the name expression enclosed in brackets. writeTextOfNode(currentText, node.name); // If optional property emit ? - if ((node.kind === 141 /* PropertyDeclaration */ || node.kind === 140 /* PropertySignature */) && ts.hasQuestionToken(node)) { + if ((node.kind === 142 /* PropertyDeclaration */ || node.kind === 141 /* PropertySignature */) && ts.hasQuestionToken(node)) { write("?"); } - if ((node.kind === 141 /* PropertyDeclaration */ || node.kind === 140 /* PropertySignature */) && node.parent.kind === 155 /* TypeLiteral */) { + if ((node.kind === 142 /* PropertyDeclaration */ || node.kind === 141 /* PropertySignature */) && node.parent.kind === 156 /* TypeLiteral */) { emitTypeOfVariableDeclarationFromTypeLiteral(node); } else if (!(node.flags & 16 /* Private */)) { @@ -30458,14 +30895,14 @@ var ts; } } function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult) { - if (node.kind === 213 /* VariableDeclaration */) { + if (node.kind === 214 /* VariableDeclaration */) { return symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; } - else if (node.kind === 141 /* PropertyDeclaration */ || node.kind === 140 /* PropertySignature */) { + else if (node.kind === 142 /* PropertyDeclaration */ || node.kind === 141 /* PropertySignature */) { // TODO(jfreeman): Deal with computed properties in error reporting. if (node.flags & 64 /* Static */) { return symbolAccesibilityResult.errorModuleName ? @@ -30474,7 +30911,7 @@ var ts; ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.kind === 216 /* ClassDeclaration */) { + else if (node.parent.kind === 217 /* ClassDeclaration */) { return symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : @@ -30506,7 +30943,7 @@ var ts; var elements = []; for (var _i = 0, _a = bindingPattern.elements; _i < _a.length; _i++) { var element = _a[_i]; - if (element.kind !== 189 /* OmittedExpression */) { + if (element.kind !== 190 /* OmittedExpression */) { elements.push(element); } } @@ -30576,7 +31013,7 @@ var ts; var type = getTypeAnnotationFromAccessor(node); if (!type) { // couldn't get type for the first accessor, try the another one - var anotherAccessor = node.kind === 145 /* GetAccessor */ ? accessors.setAccessor : accessors.getAccessor; + var anotherAccessor = node.kind === 146 /* GetAccessor */ ? accessors.setAccessor : accessors.getAccessor; type = getTypeAnnotationFromAccessor(anotherAccessor); if (type) { accessorWithTypeAnnotation = anotherAccessor; @@ -30589,7 +31026,7 @@ var ts; } function getTypeAnnotationFromAccessor(accessor) { if (accessor) { - return accessor.kind === 145 /* GetAccessor */ + return accessor.kind === 146 /* GetAccessor */ ? accessor.type // Getter - return type : accessor.parameters.length > 0 ? accessor.parameters[0].type // Setter parameter type @@ -30598,7 +31035,7 @@ var ts; } function getAccessorDeclarationTypeVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; - if (accessorWithTypeAnnotation.kind === 146 /* SetAccessor */) { + if (accessorWithTypeAnnotation.kind === 147 /* SetAccessor */) { // Setters have to have type named and cannot infer it so, the type should always be named if (accessorWithTypeAnnotation.parent.flags & 64 /* Static */) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? @@ -30648,17 +31085,17 @@ var ts; // so no need to verify if the declaration is visible if (!resolver.isImplementationOfOverload(node)) { emitJsDocComments(node); - if (node.kind === 215 /* FunctionDeclaration */) { + if (node.kind === 216 /* FunctionDeclaration */) { emitModuleElementDeclarationFlags(node); } - else if (node.kind === 143 /* MethodDeclaration */) { + else if (node.kind === 144 /* MethodDeclaration */) { emitClassMemberDeclarationFlags(node); } - if (node.kind === 215 /* FunctionDeclaration */) { + if (node.kind === 216 /* FunctionDeclaration */) { write("function "); writeTextOfNode(currentText, node.name); } - else if (node.kind === 144 /* Constructor */) { + else if (node.kind === 145 /* Constructor */) { write("constructor"); } else { @@ -30678,11 +31115,11 @@ var ts; var prevEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = node; // Construct signature or constructor type write new Signature - if (node.kind === 148 /* ConstructSignature */ || node.kind === 153 /* ConstructorType */) { + if (node.kind === 149 /* ConstructSignature */ || node.kind === 154 /* ConstructorType */) { write("new "); } emitTypeParameters(node.typeParameters); - if (node.kind === 149 /* IndexSignature */) { + if (node.kind === 150 /* IndexSignature */) { write("["); } else { @@ -30690,22 +31127,22 @@ var ts; } // Parameters emitCommaList(node.parameters, emitParameterDeclaration); - if (node.kind === 149 /* IndexSignature */) { + if (node.kind === 150 /* IndexSignature */) { write("]"); } else { write(")"); } // If this is not a constructor and is not private, emit the return type - var isFunctionTypeOrConstructorType = node.kind === 152 /* FunctionType */ || node.kind === 153 /* ConstructorType */; - if (isFunctionTypeOrConstructorType || node.parent.kind === 155 /* TypeLiteral */) { + var isFunctionTypeOrConstructorType = node.kind === 153 /* FunctionType */ || node.kind === 154 /* ConstructorType */; + if (isFunctionTypeOrConstructorType || node.parent.kind === 156 /* TypeLiteral */) { // Emit type literal signature return type only if specified if (node.type) { write(isFunctionTypeOrConstructorType ? " => " : ": "); emitType(node.type); } } - else if (node.kind !== 144 /* Constructor */ && !(node.flags & 16 /* Private */)) { + else if (node.kind !== 145 /* Constructor */ && !(node.flags & 16 /* Private */)) { writeReturnTypeAtSignature(node, getReturnTypeVisibilityError); } enclosingDeclaration = prevEnclosingDeclaration; @@ -30716,26 +31153,26 @@ var ts; function getReturnTypeVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; switch (node.kind) { - case 148 /* ConstructSignature */: + case 149 /* ConstructSignature */: // Interfaces cannot have return types that cannot be named diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 147 /* CallSignature */: + case 148 /* CallSignature */: // Interfaces cannot have return types that cannot be named diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 149 /* IndexSignature */: + case 150 /* IndexSignature */: // Interfaces cannot have return types that cannot be named diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: if (node.flags & 64 /* Static */) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? @@ -30743,7 +31180,7 @@ var ts; ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; } - else if (node.parent.kind === 216 /* ClassDeclaration */) { + else if (node.parent.kind === 217 /* ClassDeclaration */) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : @@ -30757,7 +31194,7 @@ var ts; ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; } break; - case 215 /* FunctionDeclaration */: + case 216 /* FunctionDeclaration */: diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : @@ -30792,9 +31229,9 @@ var ts; write("?"); } decreaseIndent(); - if (node.parent.kind === 152 /* FunctionType */ || - node.parent.kind === 153 /* ConstructorType */ || - node.parent.parent.kind === 155 /* TypeLiteral */) { + if (node.parent.kind === 153 /* FunctionType */ || + node.parent.kind === 154 /* ConstructorType */ || + node.parent.parent.kind === 156 /* TypeLiteral */) { emitTypeOfVariableDeclarationFromTypeLiteral(node); } else if (!(node.parent.flags & 16 /* Private */)) { @@ -30810,24 +31247,24 @@ var ts; } function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult) { switch (node.parent.kind) { - case 144 /* Constructor */: + case 145 /* Constructor */: return symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; - case 148 /* ConstructSignature */: + case 149 /* ConstructSignature */: // Interfaces cannot have parameter types that cannot be named return symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; - case 147 /* CallSignature */: + case 148 /* CallSignature */: // Interfaces cannot have parameter types that cannot be named return symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: if (node.parent.flags & 64 /* Static */) { return symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? @@ -30835,7 +31272,7 @@ var ts; ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.parent.kind === 216 /* ClassDeclaration */) { + else if (node.parent.parent.kind === 217 /* ClassDeclaration */) { return symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : @@ -30848,7 +31285,7 @@ var ts; ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } - case 215 /* FunctionDeclaration */: + case 216 /* FunctionDeclaration */: return symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : @@ -30860,12 +31297,12 @@ var ts; } function emitBindingPattern(bindingPattern) { // We have to explicitly emit square bracket and bracket because these tokens are not store inside the node. - if (bindingPattern.kind === 163 /* ObjectBindingPattern */) { + if (bindingPattern.kind === 164 /* ObjectBindingPattern */) { write("{"); emitCommaList(bindingPattern.elements, emitBindingElement); write("}"); } - else if (bindingPattern.kind === 164 /* ArrayBindingPattern */) { + else if (bindingPattern.kind === 165 /* ArrayBindingPattern */) { write("["); var elements = bindingPattern.elements; emitCommaList(elements, emitBindingElement); @@ -30876,7 +31313,7 @@ var ts; } } function emitBindingElement(bindingElement) { - if (bindingElement.kind === 189 /* OmittedExpression */) { + if (bindingElement.kind === 190 /* OmittedExpression */) { // If bindingElement is an omittedExpression (i.e. containing elision), // we will emit blank space (although this may differ from users' original code, // it allows emitSeparatedList to write separator appropriately) @@ -30885,7 +31322,7 @@ var ts; // emit : function foo([ , x, , ]) {} write(" "); } - else if (bindingElement.kind === 165 /* BindingElement */) { + else if (bindingElement.kind === 166 /* BindingElement */) { if (bindingElement.propertyName) { // bindingElement has propertyName property in the following case: // { y: [a,b,c] ...} -> bindingPattern will have a property called propertyName for "y" @@ -30924,40 +31361,40 @@ var ts; } function emitNode(node) { switch (node.kind) { - case 215 /* FunctionDeclaration */: - case 220 /* ModuleDeclaration */: - case 223 /* ImportEqualsDeclaration */: - case 217 /* InterfaceDeclaration */: - case 216 /* ClassDeclaration */: - case 218 /* TypeAliasDeclaration */: - case 219 /* EnumDeclaration */: + case 216 /* FunctionDeclaration */: + case 221 /* ModuleDeclaration */: + case 224 /* ImportEqualsDeclaration */: + case 218 /* InterfaceDeclaration */: + case 217 /* ClassDeclaration */: + case 219 /* TypeAliasDeclaration */: + case 220 /* EnumDeclaration */: return emitModuleElement(node, isModuleElementVisible(node)); - case 195 /* VariableStatement */: + case 196 /* VariableStatement */: return emitModuleElement(node, isVariableStatementVisible(node)); - case 224 /* ImportDeclaration */: + case 225 /* ImportDeclaration */: // Import declaration without import clause is visible, otherwise it is not visible return emitModuleElement(node, /*isModuleElementVisible*/ !node.importClause); - case 230 /* ExportDeclaration */: + case 231 /* ExportDeclaration */: return emitExportDeclaration(node); - case 144 /* Constructor */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 145 /* Constructor */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: return writeFunctionDeclaration(node); - case 148 /* ConstructSignature */: - case 147 /* CallSignature */: - case 149 /* IndexSignature */: + case 149 /* ConstructSignature */: + case 148 /* CallSignature */: + case 150 /* IndexSignature */: return emitSignatureDeclarationWithJsDocComments(node); - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: return emitAccessorDeclaration(node); - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: return emitPropertyDeclaration(node); - case 249 /* EnumMember */: + case 250 /* EnumMember */: return emitEnumMemberDeclaration(node); - case 229 /* ExportAssignment */: + case 230 /* ExportAssignment */: return emitExportAssignment(node); - case 250 /* SourceFile */: + case 251 /* SourceFile */: return emitSourceFile(node); } } @@ -31317,7 +31754,7 @@ var ts; var metadataHelper = "\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};"; // emit output for the __param helper function var paramHelper = "\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};"; - var awaiterHelper = "\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) {\n return new Promise(function (resolve, reject) {\n generator = generator.call(thisArg, _arguments);\n function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); }\n function onfulfill(value) { try { step(\"next\", value); } catch (e) { reject(e); } }\n function onreject(value) { try { step(\"throw\", value); } catch (e) { reject(e); } }\n function step(verb, value) {\n var result = generator[verb](value);\n result.done ? resolve(result.value) : cast(result.value).then(onfulfill, onreject);\n }\n step(\"next\", void 0);\n });\n};"; + var awaiterHelper = "\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new P(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.call(thisArg, _arguments)).next());\n });\n};"; var compilerOptions = host.getCompilerOptions(); var languageVersion = ts.getEmitScriptTarget(compilerOptions); var modulekind = ts.getEmitModuleKind(compilerOptions); @@ -31415,6 +31852,7 @@ var ts; var isOwnFileEmit; /** If removeComments is true, no leading-comments needed to be emitted **/ var emitLeadingCommentsOfPosition = compilerOptions.removeComments ? function (pos) { } : emitLeadingCommentsOfPositionWorker; + var setSourceMapWriterEmit = compilerOptions.sourceMap || compilerOptions.inlineSourceMap ? changeSourceMapEmit : function (writer) { }; var moduleEmitDelegates = (_a = {}, _a[5 /* ES6 */] = emitES6Module, _a[2 /* AMD */] = emitAMDModule, @@ -31499,10 +31937,10 @@ var ts; // Note that names generated by makeTempVariableName and makeUniqueName will never conflict. function makeTempVariableName(flags) { if (flags && !(tempFlags & flags)) { - var name_19 = flags === 268435456 /* _i */ ? "_i" : "_n"; - if (isUniqueName(name_19)) { + var name_22 = flags === 268435456 /* _i */ ? "_i" : "_n"; + if (isUniqueName(name_22)) { tempFlags |= flags; - return name_19; + return name_22; } } while (true) { @@ -31510,9 +31948,9 @@ var ts; tempFlags++; // Skip over 'i' and 'n' if (count !== 8 && count !== 13) { - var name_20 = count < 26 ? "_" + String.fromCharCode(97 /* a */ + count) : "_" + (count - 26); - if (isUniqueName(name_20)) { - return name_20; + var name_23 = count < 26 ? "_" + String.fromCharCode(97 /* a */ + count) : "_" + (count - 26); + if (isUniqueName(name_23)) { + return name_23; } } } @@ -31556,17 +31994,17 @@ var ts; switch (node.kind) { case 69 /* Identifier */: return makeUniqueName(node.text); - case 220 /* ModuleDeclaration */: - case 219 /* EnumDeclaration */: + case 221 /* ModuleDeclaration */: + case 220 /* EnumDeclaration */: return generateNameForModuleOrEnum(node); - case 224 /* ImportDeclaration */: - case 230 /* ExportDeclaration */: + case 225 /* ImportDeclaration */: + case 231 /* ExportDeclaration */: return generateNameForImportOrExportDeclaration(node); - case 215 /* FunctionDeclaration */: - case 216 /* ClassDeclaration */: - case 229 /* ExportAssignment */: + case 216 /* FunctionDeclaration */: + case 217 /* ClassDeclaration */: + case 230 /* ExportAssignment */: return generateNameForExportDefault(); - case 188 /* ClassExpression */: + case 189 /* ClassExpression */: return generateNameForClassExpression(); } } @@ -31836,10 +32274,10 @@ var ts; write("("); emit(tempVariable); // Now we emit the expressions - if (node.template.kind === 185 /* TemplateExpression */) { + if (node.template.kind === 186 /* TemplateExpression */) { ts.forEach(node.template.templateSpans, function (templateSpan) { write(", "); - var needsParens = templateSpan.expression.kind === 183 /* BinaryExpression */ + var needsParens = templateSpan.expression.kind === 184 /* BinaryExpression */ && templateSpan.expression.operatorToken.kind === 24 /* CommaToken */; emitParenthesizedIf(templateSpan.expression, needsParens); }); @@ -31874,7 +32312,7 @@ var ts; // ("abc" + 1) << (2 + "") // rather than // "abc" + (1 << 2) + "" - var needsParens = templateSpan.expression.kind !== 174 /* ParenthesizedExpression */ + var needsParens = templateSpan.expression.kind !== 175 /* ParenthesizedExpression */ && comparePrecedenceToBinaryPlus(templateSpan.expression) !== 1 /* GreaterThan */; if (i > 0 || headEmitted) { // If this is the first span and the head was not emitted, then this templateSpan's @@ -31916,11 +32354,11 @@ var ts; } function templateNeedsParens(template, parent) { switch (parent.kind) { - case 170 /* CallExpression */: - case 171 /* NewExpression */: + case 171 /* CallExpression */: + case 172 /* NewExpression */: return parent.expression === template; - case 172 /* TaggedTemplateExpression */: - case 174 /* ParenthesizedExpression */: + case 173 /* TaggedTemplateExpression */: + case 175 /* ParenthesizedExpression */: return false; default: return comparePrecedenceToBinaryPlus(parent) !== -1 /* LessThan */; @@ -31941,7 +32379,7 @@ var ts; // TODO (drosen): Note that we need to account for the upcoming 'yield' and // spread ('...') unary operators that are anticipated for ES6. switch (expression.kind) { - case 183 /* BinaryExpression */: + case 184 /* BinaryExpression */: switch (expression.operatorToken.kind) { case 37 /* AsteriskToken */: case 39 /* SlashToken */: @@ -31953,8 +32391,8 @@ var ts; default: return -1 /* LessThan */; } - case 186 /* YieldExpression */: - case 184 /* ConditionalExpression */: + case 187 /* YieldExpression */: + case 185 /* ConditionalExpression */: return -1 /* LessThan */; default: return 1 /* GreaterThan */; @@ -32021,38 +32459,38 @@ var ts; // Either emit one big object literal (no spread attribs), or // a call to React.__spread var attrs = openingNode.attributes; - if (ts.forEach(attrs, function (attr) { return attr.kind === 241 /* JsxSpreadAttribute */; })) { + if (ts.forEach(attrs, function (attr) { return attr.kind === 242 /* JsxSpreadAttribute */; })) { emitExpressionIdentifier(syntheticReactRef); write(".__spread("); var haveOpenedObjectLiteral = false; - for (var i_1 = 0; i_1 < attrs.length; i_1++) { - if (attrs[i_1].kind === 241 /* JsxSpreadAttribute */) { + for (var i = 0; i < attrs.length; i++) { + if (attrs[i].kind === 242 /* JsxSpreadAttribute */) { // If this is the first argument, we need to emit a {} as the first argument - if (i_1 === 0) { + if (i === 0) { write("{}, "); } if (haveOpenedObjectLiteral) { write("}"); haveOpenedObjectLiteral = false; } - if (i_1 > 0) { + if (i > 0) { write(", "); } - emit(attrs[i_1].expression); + emit(attrs[i].expression); } else { - ts.Debug.assert(attrs[i_1].kind === 240 /* JsxAttribute */); + ts.Debug.assert(attrs[i].kind === 241 /* JsxAttribute */); if (haveOpenedObjectLiteral) { write(", "); } else { haveOpenedObjectLiteral = true; - if (i_1 > 0) { + if (i > 0) { write(", "); } write("{"); } - emitJsxAttribute(attrs[i_1]); + emitJsxAttribute(attrs[i]); } } if (haveOpenedObjectLiteral) @@ -32062,7 +32500,7 @@ var ts; else { // One object literal with all the attributes in them write("{"); - for (var i = 0; i < attrs.length; i++) { + for (var i = 0, n = attrs.length; i < n; i++) { if (i > 0) { write(", "); } @@ -32075,11 +32513,11 @@ var ts; if (children) { for (var i = 0; i < children.length; i++) { // Don't emit empty expressions - if (children[i].kind === 242 /* JsxExpression */ && !(children[i].expression)) { + if (children[i].kind === 243 /* JsxExpression */ && !(children[i].expression)) { continue; } // Don't emit empty strings - if (children[i].kind === 238 /* JsxText */) { + if (children[i].kind === 239 /* JsxText */) { var text = getTextToEmit(children[i]); if (text !== undefined) { write(", \""); @@ -32097,11 +32535,11 @@ var ts; write(")"); // closes "React.createElement(" emitTrailingComments(openingNode); } - if (node.kind === 235 /* JsxElement */) { + if (node.kind === 236 /* JsxElement */) { emitJsxElement(node.openingElement, node.children); } else { - ts.Debug.assert(node.kind === 236 /* JsxSelfClosingElement */); + ts.Debug.assert(node.kind === 237 /* JsxSelfClosingElement */); emitJsxElement(node); } } @@ -32123,11 +32561,11 @@ var ts; if (i > 0) { write(" "); } - if (attribs[i].kind === 241 /* JsxSpreadAttribute */) { + if (attribs[i].kind === 242 /* JsxSpreadAttribute */) { emitJsxSpreadAttribute(attribs[i]); } else { - ts.Debug.assert(attribs[i].kind === 240 /* JsxAttribute */); + ts.Debug.assert(attribs[i].kind === 241 /* JsxAttribute */); emitJsxAttribute(attribs[i]); } } @@ -32135,11 +32573,11 @@ var ts; function emitJsxOpeningOrSelfClosingElement(node) { write("<"); emit(node.tagName); - if (node.attributes.length > 0 || (node.kind === 236 /* JsxSelfClosingElement */)) { + if (node.attributes.length > 0 || (node.kind === 237 /* JsxSelfClosingElement */)) { write(" "); } emitAttributes(node.attributes); - if (node.kind === 236 /* JsxSelfClosingElement */) { + if (node.kind === 237 /* JsxSelfClosingElement */) { write("/>"); } else { @@ -32158,11 +32596,11 @@ var ts; } emitJsxClosingElement(node.closingElement); } - if (node.kind === 235 /* JsxElement */) { + if (node.kind === 236 /* JsxElement */) { emitJsxElement(node); } else { - ts.Debug.assert(node.kind === 236 /* JsxSelfClosingElement */); + ts.Debug.assert(node.kind === 237 /* JsxSelfClosingElement */); emitJsxOpeningOrSelfClosingElement(node); } } @@ -32170,11 +32608,11 @@ var ts; // In a sense, it does not actually emit identifiers as much as it declares a name for a specific property. // For example, this is utilized when feeding in a result to Object.defineProperty. function emitExpressionForPropertyName(node) { - ts.Debug.assert(node.kind !== 165 /* BindingElement */); + ts.Debug.assert(node.kind !== 166 /* BindingElement */); if (node.kind === 9 /* StringLiteral */) { emitLiteral(node); } - else if (node.kind === 136 /* ComputedPropertyName */) { + else if (node.kind === 137 /* ComputedPropertyName */) { // if this is a decorated computed property, we will need to capture the result // of the property expression so that we can apply decorators later. This is to ensure // we don't introduce unintended side effects: @@ -32218,62 +32656,62 @@ var ts; function isExpressionIdentifier(node) { var parent = node.parent; switch (parent.kind) { - case 166 /* ArrayLiteralExpression */: - case 191 /* AsExpression */: - case 183 /* BinaryExpression */: - case 170 /* CallExpression */: - case 243 /* CaseClause */: - case 136 /* ComputedPropertyName */: - case 184 /* ConditionalExpression */: - case 139 /* Decorator */: - case 177 /* DeleteExpression */: - case 199 /* DoStatement */: - case 169 /* ElementAccessExpression */: - case 229 /* ExportAssignment */: - case 197 /* ExpressionStatement */: - case 190 /* ExpressionWithTypeArguments */: - case 201 /* ForStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - case 198 /* IfStatement */: - case 239 /* JsxClosingElement */: - case 236 /* JsxSelfClosingElement */: - case 237 /* JsxOpeningElement */: - case 241 /* JsxSpreadAttribute */: - case 242 /* JsxExpression */: - case 171 /* NewExpression */: - case 174 /* ParenthesizedExpression */: - case 182 /* PostfixUnaryExpression */: - case 181 /* PrefixUnaryExpression */: - case 206 /* ReturnStatement */: - case 248 /* ShorthandPropertyAssignment */: - case 187 /* SpreadElementExpression */: - case 208 /* SwitchStatement */: - case 172 /* TaggedTemplateExpression */: - case 192 /* TemplateSpan */: - case 210 /* ThrowStatement */: - case 173 /* TypeAssertionExpression */: - case 178 /* TypeOfExpression */: - case 179 /* VoidExpression */: - case 200 /* WhileStatement */: - case 207 /* WithStatement */: - case 186 /* YieldExpression */: + case 167 /* ArrayLiteralExpression */: + case 192 /* AsExpression */: + case 184 /* BinaryExpression */: + case 171 /* CallExpression */: + case 244 /* CaseClause */: + case 137 /* ComputedPropertyName */: + case 185 /* ConditionalExpression */: + case 140 /* Decorator */: + case 178 /* DeleteExpression */: + case 200 /* DoStatement */: + case 170 /* ElementAccessExpression */: + case 230 /* ExportAssignment */: + case 198 /* ExpressionStatement */: + case 191 /* ExpressionWithTypeArguments */: + case 202 /* ForStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: + case 199 /* IfStatement */: + case 240 /* JsxClosingElement */: + case 237 /* JsxSelfClosingElement */: + case 238 /* JsxOpeningElement */: + case 242 /* JsxSpreadAttribute */: + case 243 /* JsxExpression */: + case 172 /* NewExpression */: + case 175 /* ParenthesizedExpression */: + case 183 /* PostfixUnaryExpression */: + case 182 /* PrefixUnaryExpression */: + case 207 /* ReturnStatement */: + case 249 /* ShorthandPropertyAssignment */: + case 188 /* SpreadElementExpression */: + case 209 /* SwitchStatement */: + case 173 /* TaggedTemplateExpression */: + case 193 /* TemplateSpan */: + case 211 /* ThrowStatement */: + case 174 /* TypeAssertionExpression */: + case 179 /* TypeOfExpression */: + case 180 /* VoidExpression */: + case 201 /* WhileStatement */: + case 208 /* WithStatement */: + case 187 /* YieldExpression */: return true; - case 165 /* BindingElement */: - case 249 /* EnumMember */: - case 138 /* Parameter */: - case 247 /* PropertyAssignment */: - case 141 /* PropertyDeclaration */: - case 213 /* VariableDeclaration */: + case 166 /* BindingElement */: + case 250 /* EnumMember */: + case 139 /* Parameter */: + case 248 /* PropertyAssignment */: + case 142 /* PropertyDeclaration */: + case 214 /* VariableDeclaration */: return parent.initializer === node; - case 168 /* PropertyAccessExpression */: + case 169 /* PropertyAccessExpression */: return parent.expression === node; - case 176 /* ArrowFunction */: - case 175 /* FunctionExpression */: + case 177 /* ArrowFunction */: + case 176 /* FunctionExpression */: return parent.body === node; - case 223 /* ImportEqualsDeclaration */: + case 224 /* ImportEqualsDeclaration */: return parent.moduleReference === node; - case 135 /* QualifiedName */: + case 136 /* QualifiedName */: return parent.left === node; } return false; @@ -32285,7 +32723,7 @@ var ts; } var container = resolver.getReferencedExportContainer(node); if (container) { - if (container.kind === 250 /* SourceFile */) { + if (container.kind === 251 /* SourceFile */) { // Identifier references module export if (modulekind !== 5 /* ES6 */ && modulekind !== 4 /* System */) { write("exports."); @@ -32301,17 +32739,17 @@ var ts; if (modulekind !== 5 /* ES6 */) { var declaration = resolver.getReferencedImportDeclaration(node); if (declaration) { - if (declaration.kind === 225 /* ImportClause */) { + if (declaration.kind === 226 /* ImportClause */) { // Identifier references default import write(getGeneratedNameForNode(declaration.parent)); write(languageVersion === 0 /* ES3 */ ? "[\"default\"]" : ".default"); return; } - else if (declaration.kind === 228 /* ImportSpecifier */) { + else if (declaration.kind === 229 /* ImportSpecifier */) { // Identifier references named import write(getGeneratedNameForNode(declaration.parent.parent.parent)); - var name_21 = declaration.propertyName || declaration.name; - var identifier = ts.getTextOfNodeFromSourceText(currentText, name_21); + var name_24 = declaration.propertyName || declaration.name; + var identifier = ts.getTextOfNodeFromSourceText(currentText, name_24); if (languageVersion === 0 /* ES3 */ && identifier === "default") { write("[\"default\"]"); } @@ -32340,13 +32778,13 @@ var ts; } function isNameOfNestedRedeclaration(node) { if (languageVersion < 2 /* ES6 */) { - var parent_6 = node.parent; - switch (parent_6.kind) { - case 165 /* BindingElement */: - case 216 /* ClassDeclaration */: - case 219 /* EnumDeclaration */: - case 213 /* VariableDeclaration */: - return parent_6.name === node && resolver.isNestedRedeclaration(parent_6); + var parent_7 = node.parent; + switch (parent_7.kind) { + case 166 /* BindingElement */: + case 217 /* ClassDeclaration */: + case 220 /* EnumDeclaration */: + case 214 /* VariableDeclaration */: + return parent_7.name === node && resolver.isNestedRedeclaration(parent_7); } } return false; @@ -32355,8 +32793,8 @@ var ts; if (convertedLoopState) { if (node.text == "arguments" && resolver.isArgumentsLocalBinding(node)) { // in converted loop body arguments cannot be used directly. - var name_22 = convertedLoopState.argumentsName || (convertedLoopState.argumentsName = makeUniqueName("arguments")); - write(name_22); + var name_25 = convertedLoopState.argumentsName || (convertedLoopState.argumentsName = makeUniqueName("arguments")); + write(name_25); return; } } @@ -32456,10 +32894,10 @@ var ts; } } function needsParenthesisForAwaitExpressionAsYield(node) { - if (node.parent.kind === 183 /* BinaryExpression */ && !ts.isAssignmentOperator(node.parent.operatorToken.kind)) { + if (node.parent.kind === 184 /* BinaryExpression */ && !ts.isAssignmentOperator(node.parent.operatorToken.kind)) { return true; } - else if (node.parent.kind === 184 /* ConditionalExpression */ && node.parent.condition === node) { + else if (node.parent.kind === 185 /* ConditionalExpression */ && node.parent.condition === node) { return true; } return false; @@ -32467,11 +32905,11 @@ var ts; function needsParenthesisForPropertyAccessOrInvocation(node) { switch (node.kind) { case 69 /* Identifier */: - case 166 /* ArrayLiteralExpression */: - case 168 /* PropertyAccessExpression */: - case 169 /* ElementAccessExpression */: - case 170 /* CallExpression */: - case 174 /* ParenthesizedExpression */: + case 167 /* ArrayLiteralExpression */: + case 169 /* PropertyAccessExpression */: + case 170 /* ElementAccessExpression */: + case 171 /* CallExpression */: + case 175 /* ParenthesizedExpression */: // This list is not exhaustive and only includes those cases that are relevant // to the check in emitArrayLiteral. More cases can be added as needed. return false; @@ -32491,17 +32929,17 @@ var ts; write(", "); } var e = elements[pos]; - if (e.kind === 187 /* SpreadElementExpression */) { + if (e.kind === 188 /* SpreadElementExpression */) { e = e.expression; emitParenthesizedIf(e, /*parenthesized*/ group === 0 && needsParenthesisForPropertyAccessOrInvocation(e)); pos++; - if (pos === length && group === 0 && needsUniqueCopy && e.kind !== 166 /* ArrayLiteralExpression */) { + if (pos === length && group === 0 && needsUniqueCopy && e.kind !== 167 /* ArrayLiteralExpression */) { write(".slice()"); } } else { var i = pos; - while (i < length && elements[i].kind !== 187 /* SpreadElementExpression */) { + while (i < length && elements[i].kind !== 188 /* SpreadElementExpression */) { i++; } write("["); @@ -32524,7 +32962,7 @@ var ts; } } function isSpreadElementExpression(node) { - return node.kind === 187 /* SpreadElementExpression */; + return node.kind === 188 /* SpreadElementExpression */; } function emitArrayLiteral(node) { var elements = node.elements; @@ -32594,7 +33032,7 @@ var ts; writeComma(); var property = properties[i]; emitStart(property); - if (property.kind === 145 /* GetAccessor */ || property.kind === 146 /* SetAccessor */) { + if (property.kind === 146 /* GetAccessor */ || property.kind === 147 /* SetAccessor */) { // TODO (drosen): Reconcile with 'emitMemberFunctions'. var accessors = ts.getAllAccessorDeclarations(node.properties, property); if (property !== accessors.firstAccessor) { @@ -32646,13 +33084,13 @@ var ts; emitMemberAccessForPropertyName(property.name); emitEnd(property.name); write(" = "); - if (property.kind === 247 /* PropertyAssignment */) { + if (property.kind === 248 /* PropertyAssignment */) { emit(property.initializer); } - else if (property.kind === 248 /* ShorthandPropertyAssignment */) { + else if (property.kind === 249 /* ShorthandPropertyAssignment */) { emitExpressionIdentifier(property.name); } - else if (property.kind === 143 /* MethodDeclaration */) { + else if (property.kind === 144 /* MethodDeclaration */) { emitFunctionDeclaration(property); } else { @@ -32686,7 +33124,7 @@ var ts; // Everything until that point can be emitted as part of the initial object literal. var numInitialNonComputedProperties = numProperties; for (var i = 0, n = properties.length; i < n; i++) { - if (properties[i].name.kind === 136 /* ComputedPropertyName */) { + if (properties[i].name.kind === 137 /* ComputedPropertyName */) { numInitialNonComputedProperties = i; break; } @@ -32702,21 +33140,21 @@ var ts; emitObjectLiteralBody(node, properties.length); } function createBinaryExpression(left, operator, right, startsOnNewLine) { - var result = ts.createSynthesizedNode(183 /* BinaryExpression */, startsOnNewLine); + var result = ts.createSynthesizedNode(184 /* BinaryExpression */, startsOnNewLine); result.operatorToken = ts.createSynthesizedNode(operator); result.left = left; result.right = right; return result; } function createPropertyAccessExpression(expression, name) { - var result = ts.createSynthesizedNode(168 /* PropertyAccessExpression */); + var result = ts.createSynthesizedNode(169 /* PropertyAccessExpression */); result.expression = parenthesizeForAccess(expression); result.dotToken = ts.createSynthesizedNode(21 /* DotToken */); result.name = name; return result; } function createElementAccessExpression(expression, argumentExpression) { - var result = ts.createSynthesizedNode(169 /* ElementAccessExpression */); + var result = ts.createSynthesizedNode(170 /* ElementAccessExpression */); result.expression = parenthesizeForAccess(expression); result.argumentExpression = argumentExpression; return result; @@ -32724,7 +33162,7 @@ var ts; function parenthesizeForAccess(expr) { // When diagnosing whether the expression needs parentheses, the decision should be based // on the innermost expression in a chain of nested type assertions. - while (expr.kind === 173 /* TypeAssertionExpression */ || expr.kind === 191 /* AsExpression */) { + while (expr.kind === 174 /* TypeAssertionExpression */ || expr.kind === 192 /* AsExpression */) { expr = expr.expression; } // isLeftHandSideExpression is almost the correct criterion for when it is not necessary @@ -32736,11 +33174,11 @@ var ts; // 1.x -> not the same as (1).x // if (ts.isLeftHandSideExpression(expr) && - expr.kind !== 171 /* NewExpression */ && + expr.kind !== 172 /* NewExpression */ && expr.kind !== 8 /* NumericLiteral */) { return expr; } - var node = ts.createSynthesizedNode(174 /* ParenthesizedExpression */); + var node = ts.createSynthesizedNode(175 /* ParenthesizedExpression */); node.expression = expr; return node; } @@ -32775,7 +33213,7 @@ var ts; // Return true if identifier resolves to an exported member of a namespace function isNamespaceExportReference(node) { var container = resolver.getReferencedExportContainer(node); - return container && container.kind !== 250 /* SourceFile */; + return container && container.kind !== 251 /* SourceFile */; } function emitShorthandPropertyAssignment(node) { // The name property of a short-hand property assignment is considered an expression position, so here @@ -32805,7 +33243,7 @@ var ts; if (constantValue !== undefined) { write(constantValue.toString()); if (!compilerOptions.removeComments) { - var propertyName = node.kind === 168 /* PropertyAccessExpression */ ? ts.declarationNameToString(node.name) : ts.getTextOfNode(node.argumentExpression); + var propertyName = node.kind === 169 /* PropertyAccessExpression */ ? ts.declarationNameToString(node.name) : ts.getTextOfNode(node.argumentExpression); write(" /* " + propertyName + " */"); } return true; @@ -32816,7 +33254,7 @@ var ts; if (compilerOptions.isolatedModules) { return undefined; } - return node.kind === 168 /* PropertyAccessExpression */ || node.kind === 169 /* ElementAccessExpression */ + return node.kind === 169 /* PropertyAccessExpression */ || node.kind === 170 /* ElementAccessExpression */ ? resolver.getConstantValue(node) : undefined; } @@ -32905,7 +33343,7 @@ var ts; } emitExpressionIdentifier(node); break; - case 135 /* QualifiedName */: + case 136 /* QualifiedName */: emitQualifiedNameAsExpression(node, useFallback); break; default: @@ -32923,10 +33361,10 @@ var ts; write("]"); } function hasSpreadElement(elements) { - return ts.forEach(elements, function (e) { return e.kind === 187 /* SpreadElementExpression */; }); + return ts.forEach(elements, function (e) { return e.kind === 188 /* SpreadElementExpression */; }); } function skipParentheses(node) { - while (node.kind === 174 /* ParenthesizedExpression */ || node.kind === 173 /* TypeAssertionExpression */ || node.kind === 191 /* AsExpression */) { + while (node.kind === 175 /* ParenthesizedExpression */ || node.kind === 174 /* TypeAssertionExpression */ || node.kind === 192 /* AsExpression */) { node = node.expression; } return node; @@ -32947,13 +33385,13 @@ var ts; function emitCallWithSpread(node) { var target; var expr = skipParentheses(node.expression); - if (expr.kind === 168 /* PropertyAccessExpression */) { + if (expr.kind === 169 /* PropertyAccessExpression */) { // Target will be emitted as "this" argument target = emitCallTarget(expr.expression); write("."); emit(expr.name); } - else if (expr.kind === 169 /* ElementAccessExpression */) { + else if (expr.kind === 170 /* ElementAccessExpression */) { // Target will be emitted as "this" argument target = emitCallTarget(expr.expression); write("["); @@ -32998,7 +33436,7 @@ var ts; } else { emit(node.expression); - superCall = node.expression.kind === 168 /* PropertyAccessExpression */ && node.expression.expression.kind === 95 /* SuperKeyword */; + superCall = node.expression.kind === 169 /* PropertyAccessExpression */ && node.expression.expression.kind === 95 /* SuperKeyword */; } if (superCall && languageVersion < 2 /* ES6 */) { write(".call("); @@ -33067,12 +33505,12 @@ var ts; // If the node is synthesized, it means the emitter put the parentheses there, // not the user. If we didn't want them, the emitter would not have put them // there. - if (!ts.nodeIsSynthesized(node) && node.parent.kind !== 176 /* ArrowFunction */) { - if (node.expression.kind === 173 /* TypeAssertionExpression */ || node.expression.kind === 191 /* AsExpression */) { + if (!ts.nodeIsSynthesized(node) && node.parent.kind !== 177 /* ArrowFunction */) { + if (node.expression.kind === 174 /* TypeAssertionExpression */ || node.expression.kind === 192 /* AsExpression */) { var operand = node.expression.expression; // Make sure we consider all nested cast expressions, e.g.: // (-A).x; - while (operand.kind === 173 /* TypeAssertionExpression */ || operand.kind === 191 /* AsExpression */) { + while (operand.kind === 174 /* TypeAssertionExpression */ || operand.kind === 192 /* AsExpression */) { operand = operand.expression; } // We have an expression of the form: (SubExpr) @@ -33083,15 +33521,15 @@ var ts; // (typeof A).toString() should be emitted as (typeof A).toString() and not typeof A.toString() // new (A()) should be emitted as new (A()) and not new A() // (function foo() { })() should be emitted as an IIF (function foo(){})() and not declaration function foo(){} () - if (operand.kind !== 181 /* PrefixUnaryExpression */ && - operand.kind !== 179 /* VoidExpression */ && - operand.kind !== 178 /* TypeOfExpression */ && - operand.kind !== 177 /* DeleteExpression */ && - operand.kind !== 182 /* PostfixUnaryExpression */ && - operand.kind !== 171 /* NewExpression */ && - !(operand.kind === 170 /* CallExpression */ && node.parent.kind === 171 /* NewExpression */) && - !(operand.kind === 175 /* FunctionExpression */ && node.parent.kind === 170 /* CallExpression */) && - !(operand.kind === 8 /* NumericLiteral */ && node.parent.kind === 168 /* PropertyAccessExpression */)) { + if (operand.kind !== 182 /* PrefixUnaryExpression */ && + operand.kind !== 180 /* VoidExpression */ && + operand.kind !== 179 /* TypeOfExpression */ && + operand.kind !== 178 /* DeleteExpression */ && + operand.kind !== 183 /* PostfixUnaryExpression */ && + operand.kind !== 172 /* NewExpression */ && + !(operand.kind === 171 /* CallExpression */ && node.parent.kind === 172 /* NewExpression */) && + !(operand.kind === 176 /* FunctionExpression */ && node.parent.kind === 171 /* CallExpression */) && + !(operand.kind === 8 /* NumericLiteral */ && node.parent.kind === 169 /* PropertyAccessExpression */)) { emit(operand); return; } @@ -33120,7 +33558,7 @@ var ts; if (!isCurrentFileSystemExternalModule() || node.kind !== 69 /* Identifier */ || ts.nodeIsSynthesized(node)) { return false; } - var isVariableDeclarationOrBindingElement = node.parent && (node.parent.kind === 213 /* VariableDeclaration */ || node.parent.kind === 165 /* BindingElement */); + var isVariableDeclarationOrBindingElement = node.parent && (node.parent.kind === 214 /* VariableDeclaration */ || node.parent.kind === 166 /* BindingElement */); var targetDeclaration = isVariableDeclarationOrBindingElement ? node.parent : resolver.getReferencedValueDeclaration(node); @@ -33151,7 +33589,7 @@ var ts; // the resulting expression a prefix increment operation. And in the second, it will make the resulting // expression a prefix increment whose operand is a plus expression - (++(+x)) // The same is true of minus of course. - if (node.operand.kind === 181 /* PrefixUnaryExpression */) { + if (node.operand.kind === 182 /* PrefixUnaryExpression */) { var operand = node.operand; if (node.operator === 35 /* PlusToken */ && (operand.operator === 35 /* PlusToken */ || operand.operator === 41 /* PlusPlusToken */)) { write(" "); @@ -33207,10 +33645,10 @@ var ts; } var current = node; while (current) { - if (current.kind === 250 /* SourceFile */) { + if (current.kind === 251 /* SourceFile */) { return !isExported || ((ts.getCombinedNodeFlags(node) & 2 /* Export */) !== 0); } - else if (ts.isFunctionLike(current) || current.kind === 221 /* ModuleBlock */) { + else if (ts.isFunctionLike(current) || current.kind === 222 /* ModuleBlock */) { return false; } else { @@ -33230,14 +33668,14 @@ var ts; if (ts.isElementAccessExpression(leftHandSideExpression)) { shouldEmitParentheses = true; write("("); - synthesizedLHS = ts.createSynthesizedNode(169 /* ElementAccessExpression */, /*startsOnNewLine*/ false); + synthesizedLHS = ts.createSynthesizedNode(170 /* ElementAccessExpression */, /*startsOnNewLine*/ false); var identifier = emitTempVariableAssignment(leftHandSideExpression.expression, /*canDefineTempVariablesInPlace*/ false, /*shouldEmitCommaBeforeAssignment*/ false); synthesizedLHS.expression = identifier; if (leftHandSideExpression.argumentExpression.kind !== 8 /* NumericLiteral */ && leftHandSideExpression.argumentExpression.kind !== 9 /* StringLiteral */) { var tempArgumentExpression = createAndRecordTempVariable(268435456 /* _i */); synthesizedLHS.argumentExpression = tempArgumentExpression; - emitAssignment(tempArgumentExpression, leftHandSideExpression.argumentExpression, /*shouldEmitCommaBeforeAssignment*/ true); + emitAssignment(tempArgumentExpression, leftHandSideExpression.argumentExpression, /*shouldEmitCommaBeforeAssignment*/ true, leftHandSideExpression.expression); } else { synthesizedLHS.argumentExpression = leftHandSideExpression.argumentExpression; @@ -33247,7 +33685,7 @@ var ts; else if (ts.isPropertyAccessExpression(leftHandSideExpression)) { shouldEmitParentheses = true; write("("); - synthesizedLHS = ts.createSynthesizedNode(168 /* PropertyAccessExpression */, /*startsOnNewLine*/ false); + synthesizedLHS = ts.createSynthesizedNode(169 /* PropertyAccessExpression */, /*startsOnNewLine*/ false); var identifier = emitTempVariableAssignment(leftHandSideExpression.expression, /*canDefineTempVariablesInPlace*/ false, /*shouldEmitCommaBeforeAssignment*/ false); synthesizedLHS.expression = identifier; synthesizedLHS.dotToken = leftHandSideExpression.dotToken; @@ -33275,8 +33713,8 @@ var ts; } function emitBinaryExpression(node) { if (languageVersion < 2 /* ES6 */ && node.operatorToken.kind === 56 /* EqualsToken */ && - (node.left.kind === 167 /* ObjectLiteralExpression */ || node.left.kind === 166 /* ArrayLiteralExpression */)) { - emitDestructuring(node, node.parent.kind === 197 /* ExpressionStatement */); + (node.left.kind === 168 /* ObjectLiteralExpression */ || node.left.kind === 167 /* ArrayLiteralExpression */)) { + emitDestructuring(node, node.parent.kind === 198 /* ExpressionStatement */); } else { var exportChanged = node.operatorToken.kind >= 56 /* FirstAssignment */ && @@ -33341,7 +33779,7 @@ var ts; } } function isSingleLineEmptyBlock(node) { - if (node && node.kind === 194 /* Block */) { + if (node && node.kind === 195 /* Block */) { var block = node; return block.statements.length === 0 && nodeEndIsOnSameLineAsNodeStart(block, block); } @@ -33355,12 +33793,12 @@ var ts; } emitToken(15 /* OpenBraceToken */, node.pos); increaseIndent(); - if (node.kind === 221 /* ModuleBlock */) { - ts.Debug.assert(node.parent.kind === 220 /* ModuleDeclaration */); + if (node.kind === 222 /* ModuleBlock */) { + ts.Debug.assert(node.parent.kind === 221 /* ModuleDeclaration */); emitCaptureThisForNodeIfNecessary(node.parent); } emitLines(node.statements); - if (node.kind === 221 /* ModuleBlock */) { + if (node.kind === 222 /* ModuleBlock */) { emitTempDeclarations(/*newLine*/ true); } decreaseIndent(); @@ -33368,7 +33806,7 @@ var ts; emitToken(16 /* CloseBraceToken */, node.statements.end); } function emitEmbeddedStatement(node) { - if (node.kind === 194 /* Block */) { + if (node.kind === 195 /* Block */) { write(" "); emit(node); } @@ -33380,7 +33818,7 @@ var ts; } } function emitExpressionStatement(node) { - emitParenthesizedIf(node.expression, /*parenthesized*/ node.expression.kind === 176 /* ArrowFunction */); + emitParenthesizedIf(node.expression, /*parenthesized*/ node.expression.kind === 177 /* ArrowFunction */); write(";"); } function emitIfStatement(node) { @@ -33393,7 +33831,7 @@ var ts; if (node.elseStatement) { writeLine(); emitToken(80 /* ElseKeyword */, node.thenStatement.end); - if (node.elseStatement.kind === 198 /* IfStatement */) { + if (node.elseStatement.kind === 199 /* IfStatement */) { write(" "); emit(node.elseStatement); } @@ -33413,7 +33851,7 @@ var ts; else { emitNormalLoopBody(node, /*emitAsEmbeddedStatement*/ true); } - if (node.statement.kind === 194 /* Block */) { + if (node.statement.kind === 195 /* Block */) { write(" "); } else { @@ -33442,7 +33880,7 @@ var ts; * Returns false if nothing was written - this can happen for source file level variable declarations * in system modules where such variable declarations are hoisted. */ - function tryEmitStartOfVariableDeclarationList(decl, startPos) { + function tryEmitStartOfVariableDeclarationList(decl) { if (shouldHoistVariable(decl, /*checkIfSourceFileLevelDecl*/ true)) { // variables in variable declaration list were already hoisted return false; @@ -33456,32 +33894,23 @@ var ts; } return false; } - var tokenKind = 102 /* VarKeyword */; + emitStart(decl); if (decl && languageVersion >= 2 /* ES6 */) { if (ts.isLet(decl)) { - tokenKind = 108 /* LetKeyword */; + write("let "); } else if (ts.isConst(decl)) { - tokenKind = 74 /* ConstKeyword */; + write("const "); + } + else { + write("var "); } - } - if (startPos !== undefined) { - emitToken(tokenKind, startPos); - write(" "); } else { - switch (tokenKind) { - case 102 /* VarKeyword */: - write("var "); - break; - case 108 /* LetKeyword */: - write("let "); - break; - case 74 /* ConstKeyword */: - write("const "); - break; - } + write("var "); } + // Note here we specifically dont emit end so that if we are going to emit binding pattern + // we can alter the source map correctly return true; } function emitVariableDeclarationListSkippingUninitializedEntries(list) { @@ -33512,7 +33941,7 @@ var ts; } else { var loop = convertLoopBody(node); - if (node.parent.kind === 209 /* LabeledStatement */) { + if (node.parent.kind === 210 /* LabeledStatement */) { // if parent of the loop was labeled statement - attach the label to loop skipping converted loop body emitLabelAndColon(node.parent); } @@ -33523,10 +33952,11 @@ var ts; var functionName = makeUniqueName("_loop"); var loopInitializer; switch (node.kind) { - case 201 /* ForStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - if (node.initializer.kind === 214 /* VariableDeclarationList */) { + case 202 /* ForStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: + var initializer = node.initializer; + if (initializer && initializer.kind === 215 /* VariableDeclarationList */) { loopInitializer = node.initializer; } break; @@ -33540,7 +33970,7 @@ var ts; collectNames(varDeclaration.name); } } - var bodyIsBlock = node.statement.kind === 194 /* Block */; + var bodyIsBlock = node.statement.kind === 195 /* Block */; var paramList = loopParameters ? loopParameters.join(", ") : ""; writeLine(); write("var " + functionName + " = function(" + paramList + ")"); @@ -33661,7 +34091,7 @@ var ts; if (emitAsEmbeddedStatement) { emitEmbeddedStatement(node.statement); } - else if (node.statement.kind === 194 /* Block */) { + else if (node.statement.kind === 195 /* Block */) { emitLines(node.statement.statements); } else { @@ -33771,9 +34201,9 @@ var ts; var endPos = emitToken(86 /* ForKeyword */, node.pos); write(" "); endPos = emitToken(17 /* OpenParenToken */, endPos); - if (node.initializer && node.initializer.kind === 214 /* VariableDeclarationList */) { + if (node.initializer && node.initializer.kind === 215 /* VariableDeclarationList */) { var variableDeclarationList = node.initializer; - var startIsEmitted = tryEmitStartOfVariableDeclarationList(variableDeclarationList, endPos); + var startIsEmitted = tryEmitStartOfVariableDeclarationList(variableDeclarationList); if (startIsEmitted) { emitCommaList(variableDeclarationList.declarations); } @@ -33797,7 +34227,7 @@ var ts; } } function emitForInOrForOfStatement(node) { - if (languageVersion < 2 /* ES6 */ && node.kind === 203 /* ForOfStatement */) { + if (languageVersion < 2 /* ES6 */ && node.kind === 204 /* ForOfStatement */) { emitLoop(node, emitDownLevelForOfStatementWorker); } else { @@ -33808,17 +34238,17 @@ var ts; var endPos = emitToken(86 /* ForKeyword */, node.pos); write(" "); endPos = emitToken(17 /* OpenParenToken */, endPos); - if (node.initializer.kind === 214 /* VariableDeclarationList */) { + if (node.initializer.kind === 215 /* VariableDeclarationList */) { var variableDeclarationList = node.initializer; if (variableDeclarationList.declarations.length >= 1) { - tryEmitStartOfVariableDeclarationList(variableDeclarationList, endPos); + tryEmitStartOfVariableDeclarationList(variableDeclarationList); emit(variableDeclarationList.declarations[0]); } } else { emit(node.initializer); } - if (node.kind === 202 /* ForInStatement */) { + if (node.kind === 203 /* ForInStatement */) { write(" in "); } else { @@ -33887,18 +34317,18 @@ var ts; emitEnd(node.expression); write("; "); // _i < _a.length; - emitStart(node.initializer); + emitStart(node.expression); emitNodeWithoutSourceMap(counter); write(" < "); emitNodeWithCommentsAndWithoutSourcemap(rhsReference); write(".length"); - emitEnd(node.initializer); + emitEnd(node.expression); write("; "); // _i++) - emitStart(node.initializer); + emitStart(node.expression); emitNodeWithoutSourceMap(counter); write("++"); - emitEnd(node.initializer); + emitEnd(node.expression); emitToken(18 /* CloseParenToken */, node.expression.end); // Body write(" {"); @@ -33908,7 +34338,7 @@ var ts; // let v = _a[_i]; var rhsIterationValue = createElementAccessExpression(rhsReference, counter); emitStart(node.initializer); - if (node.initializer.kind === 214 /* VariableDeclarationList */) { + if (node.initializer.kind === 215 /* VariableDeclarationList */) { write("var "); var variableDeclarationList = node.initializer; if (variableDeclarationList.declarations.length > 0) { @@ -33938,7 +34368,7 @@ var ts; // Initializer is an expression. Emit the expression in the body, so that it's // evaluated on every iteration. var assignmentExpression = createBinaryExpression(node.initializer, 56 /* EqualsToken */, rhsIterationValue, /*startsOnNewLine*/ false); - if (node.initializer.kind === 166 /* ArrayLiteralExpression */ || node.initializer.kind === 167 /* ObjectLiteralExpression */) { + if (node.initializer.kind === 167 /* ArrayLiteralExpression */ || node.initializer.kind === 168 /* ObjectLiteralExpression */) { // This is a destructuring pattern, so call emitDestructuring instead of emit. Calling emit will not work, because it will cause // the BinaryExpression to be passed in instead of the expression statement, which will cause emitDestructuring to crash. emitDestructuring(assignmentExpression, /*isAssignmentExpressionStatement*/ true, /*value*/ undefined); @@ -33966,12 +34396,12 @@ var ts; // it is possible if either // - break\continue is statement labeled and label is located inside the converted loop // - break\continue is non-labeled and located in non-converted loop\switch statement - var jump = node.kind === 205 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; + var jump = node.kind === 206 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; var canUseBreakOrContinue = (node.label && convertedLoopState.labels && convertedLoopState.labels[node.label.text]) || (!node.label && (convertedLoopState.allowedNonLabeledJumps & jump)); if (!canUseBreakOrContinue) { if (!node.label) { - if (node.kind === 205 /* BreakStatement */) { + if (node.kind === 206 /* BreakStatement */) { convertedLoopState.nonLocalJumps |= 2 /* Break */; write("return \"break\";"); } @@ -33982,7 +34412,7 @@ var ts; } else { var labelMarker; - if (node.kind === 205 /* BreakStatement */) { + if (node.kind === 206 /* BreakStatement */) { labelMarker = "break-" + node.label.text; setLabeledJump(convertedLoopState, /*isBreak*/ true, node.label.text, labelMarker); } @@ -33995,7 +34425,7 @@ var ts; return; } } - emitToken(node.kind === 205 /* BreakStatement */ ? 70 /* BreakKeyword */ : 75 /* ContinueKeyword */, node.pos); + emitToken(node.kind === 206 /* BreakStatement */ ? 70 /* BreakKeyword */ : 75 /* ContinueKeyword */, node.pos); emitOptional(" ", node.label); write(";"); } @@ -34061,7 +34491,7 @@ var ts; ts.getLineOfLocalPositionFromLineMap(currentLineMap, ts.skipTrivia(currentText, node2.pos)); } function emitCaseOrDefaultClause(node) { - if (node.kind === 243 /* CaseClause */) { + if (node.kind === 244 /* CaseClause */) { write("case "); emit(node.expression); write(":"); @@ -34130,7 +34560,7 @@ var ts; function getContainingModule(node) { do { node = node.parent; - } while (node && node.kind !== 220 /* ModuleDeclaration */); + } while (node && node.kind !== 221 /* ModuleDeclaration */); return node; } function emitContainingModuleName(node) { @@ -34155,13 +34585,13 @@ var ts; function createVoidZero() { var zero = ts.createSynthesizedNode(8 /* NumericLiteral */); zero.text = "0"; - var result = ts.createSynthesizedNode(179 /* VoidExpression */); + var result = ts.createSynthesizedNode(180 /* VoidExpression */); result.expression = zero; return result; } function emitEs6ExportDefaultCompat(node) { - if (node.parent.kind === 250 /* SourceFile */) { - ts.Debug.assert(!!(node.flags & 512 /* Default */) || node.kind === 229 /* ExportAssignment */); + if (node.parent.kind === 251 /* SourceFile */) { + ts.Debug.assert(!!(node.flags & 512 /* Default */) || node.kind === 230 /* ExportAssignment */); // only allow export default at a source file level if (modulekind === 1 /* CommonJS */ || modulekind === 2 /* AMD */ || modulekind === 3 /* UMD */) { if (!isEs6Module) { @@ -34257,7 +34687,7 @@ var ts; * @param value an expression as a right-hand-side operand of the assignment * @param shouldEmitCommaBeforeAssignment a boolean indicating whether to prefix an assignment with comma */ - function emitAssignment(name, value, shouldEmitCommaBeforeAssignment) { + function emitAssignment(name, value, shouldEmitCommaBeforeAssignment, nodeForSourceMap) { if (shouldEmitCommaBeforeAssignment) { write(", "); } @@ -34267,15 +34697,21 @@ var ts; emitNodeWithCommentsAndWithoutSourcemap(name); write("\", "); } - var isVariableDeclarationOrBindingElement = name.parent && (name.parent.kind === 213 /* VariableDeclaration */ || name.parent.kind === 165 /* BindingElement */); - if (isVariableDeclarationOrBindingElement) { - emitModuleMemberName(name.parent); - } - else { - emit(name); - } - write(" = "); - emit(value); + var isVariableDeclarationOrBindingElement = name.parent && (name.parent.kind === 214 /* VariableDeclaration */ || name.parent.kind === 166 /* BindingElement */); + // If this is first var declaration, we need to start at var/let/const keyword instead + // otherwise use nodeForSourceMap as the start position + emitStart(isFirstVariableDeclaration(nodeForSourceMap) ? nodeForSourceMap.parent : nodeForSourceMap); + withTemporaryNoSourceMap(function () { + if (isVariableDeclarationOrBindingElement) { + emitModuleMemberName(name.parent); + } + else { + emit(name); + } + write(" = "); + emit(value); + }); + emitEnd(nodeForSourceMap, /*stopOverridingSpan*/ true); if (exportChanged) { write(")"); } @@ -34286,14 +34722,19 @@ var ts; * @param canDefineTempVariablesInPlace a boolean indicating whether you can define the temporary variable at an assignment location * @param shouldEmitCommaBeforeAssignment a boolean indicating whether an assignment should prefix with comma */ - function emitTempVariableAssignment(expression, canDefineTempVariablesInPlace, shouldEmitCommaBeforeAssignment) { + function emitTempVariableAssignment(expression, canDefineTempVariablesInPlace, shouldEmitCommaBeforeAssignment, sourceMapNode) { var identifier = createTempVariable(0 /* Auto */); if (!canDefineTempVariablesInPlace) { recordTempDeclaration(identifier); } - emitAssignment(identifier, expression, shouldEmitCommaBeforeAssignment); + emitAssignment(identifier, expression, shouldEmitCommaBeforeAssignment, sourceMapNode || expression.parent); return identifier; } + function isFirstVariableDeclaration(root) { + return root.kind === 214 /* VariableDeclaration */ && + root.parent.kind === 215 /* VariableDeclarationList */ && + root.parent.declarations[0] === root; + } function emitDestructuring(root, isAssignmentExpressionStatement, value) { var emitCount = 0; // An exported declaration is actually emitted as an assignment (to a property on the module object), so @@ -34301,19 +34742,24 @@ var ts; // Also temporary variables should be explicitly allocated for source level declarations when module target is system // because actual variable declarations are hoisted var canDefineTempVariablesInPlace = false; - if (root.kind === 213 /* VariableDeclaration */) { + if (root.kind === 214 /* VariableDeclaration */) { var isExported = ts.getCombinedNodeFlags(root) & 2 /* Export */; var isSourceLevelForSystemModuleKind = shouldHoistDeclarationInSystemJsModule(root); canDefineTempVariablesInPlace = !isExported && !isSourceLevelForSystemModuleKind; } - else if (root.kind === 138 /* Parameter */) { + else if (root.kind === 139 /* Parameter */) { canDefineTempVariablesInPlace = true; } - if (root.kind === 183 /* BinaryExpression */) { + if (root.kind === 184 /* BinaryExpression */) { emitAssignmentExpression(root); } else { ts.Debug.assert(!isAssignmentExpressionStatement); + // If first variable declaration of variable statement correct the start location + if (isFirstVariableDeclaration(root)) { + // Use emit location of "var " as next emit start entry + sourceMap.changeEmitSourcePos(); + } emitBindingElement(root, value); } /** @@ -34325,27 +34771,28 @@ var ts; * @param reuseIdentifierExpressions true if identifier expressions can simply be returned; * false if it is necessary to always emit an identifier. */ - function ensureIdentifier(expr, reuseIdentifierExpressions) { + function ensureIdentifier(expr, reuseIdentifierExpressions, sourceMapNode) { if (expr.kind === 69 /* Identifier */ && reuseIdentifierExpressions) { return expr; } - var identifier = emitTempVariableAssignment(expr, canDefineTempVariablesInPlace, emitCount > 0); + var identifier = emitTempVariableAssignment(expr, canDefineTempVariablesInPlace, emitCount > 0, sourceMapNode); emitCount++; return identifier; } - function createDefaultValueCheck(value, defaultValue) { + function createDefaultValueCheck(value, defaultValue, sourceMapNode) { // The value expression will be evaluated twice, so for anything but a simple identifier // we need to generate a temporary variable - value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true); + // If the temporary variable needs to be emitted use the source Map node for assignment of that statement + value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true, sourceMapNode); // Return the expression 'value === void 0 ? defaultValue : value' - var equals = ts.createSynthesizedNode(183 /* BinaryExpression */); + var equals = ts.createSynthesizedNode(184 /* BinaryExpression */); equals.left = value; equals.operatorToken = ts.createSynthesizedNode(32 /* EqualsEqualsEqualsToken */); equals.right = createVoidZero(); return createConditionalExpression(equals, defaultValue, value); } function createConditionalExpression(condition, whenTrue, whenFalse) { - var cond = ts.createSynthesizedNode(184 /* ConditionalExpression */); + var cond = ts.createSynthesizedNode(185 /* ConditionalExpression */); cond.condition = condition; cond.questionToken = ts.createSynthesizedNode(53 /* QuestionToken */); cond.whenTrue = whenTrue; @@ -34360,9 +34807,10 @@ var ts; } function createPropertyAccessForDestructuringProperty(object, propName) { var index; - var nameIsComputed = propName.kind === 136 /* ComputedPropertyName */; + var nameIsComputed = propName.kind === 137 /* ComputedPropertyName */; if (nameIsComputed) { - index = ensureIdentifier(propName.expression, /*reuseIdentifierExpressions*/ false); + // TODO to handle when we look into sourcemaps for computed properties, for now use propName + index = ensureIdentifier(propName.expression, /*reuseIdentifierExpressions*/ false, propName); } else { // We create a synthetic copy of the identifier in order to avoid the rewriting that might @@ -34375,7 +34823,7 @@ var ts; : createElementAccessExpression(object, index); } function createSliceCall(value, sliceIndex) { - var call = ts.createSynthesizedNode(170 /* CallExpression */); + var call = ts.createSynthesizedNode(171 /* CallExpression */); var sliceIdentifier = ts.createSynthesizedNode(69 /* Identifier */); sliceIdentifier.text = "slice"; call.expression = createPropertyAccessExpression(value, sliceIdentifier); @@ -34383,60 +34831,65 @@ var ts; call.arguments[0] = createNumericLiteral(sliceIndex); return call; } - function emitObjectLiteralAssignment(target, value) { + function emitObjectLiteralAssignment(target, value, sourceMapNode) { var properties = target.properties; if (properties.length !== 1) { // For anything but a single element destructuring we need to generate a temporary // to ensure value is evaluated exactly once. - value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true); + // When doing so we want to hightlight the passed in source map node since thats the one needing this temp assignment + value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true, sourceMapNode); } for (var _a = 0, properties_5 = properties; _a < properties_5.length; _a++) { var p = properties_5[_a]; - if (p.kind === 247 /* PropertyAssignment */ || p.kind === 248 /* ShorthandPropertyAssignment */) { + if (p.kind === 248 /* PropertyAssignment */ || p.kind === 249 /* ShorthandPropertyAssignment */) { var propName = p.name; - var target_1 = p.kind === 248 /* ShorthandPropertyAssignment */ ? p : p.initializer || propName; - emitDestructuringAssignment(target_1, createPropertyAccessForDestructuringProperty(value, propName)); + var target_1 = p.kind === 249 /* ShorthandPropertyAssignment */ ? p : p.initializer || propName; + // Assignment for target = value.propName should highligh whole property, hence use p as source map node + emitDestructuringAssignment(target_1, createPropertyAccessForDestructuringProperty(value, propName), p); } } } - function emitArrayLiteralAssignment(target, value) { + function emitArrayLiteralAssignment(target, value, sourceMapNode) { var elements = target.elements; if (elements.length !== 1) { // For anything but a single element destructuring we need to generate a temporary // to ensure value is evaluated exactly once. - value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true); + // When doing so we want to hightlight the passed in source map node since thats the one needing this temp assignment + value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true, sourceMapNode); } for (var i = 0; i < elements.length; i++) { var e = elements[i]; - if (e.kind !== 189 /* OmittedExpression */) { - if (e.kind !== 187 /* SpreadElementExpression */) { - emitDestructuringAssignment(e, createElementAccessExpression(value, createNumericLiteral(i))); + if (e.kind !== 190 /* OmittedExpression */) { + // Assignment for target = value.propName should highligh whole property, hence use e as source map node + if (e.kind !== 188 /* SpreadElementExpression */) { + emitDestructuringAssignment(e, createElementAccessExpression(value, createNumericLiteral(i)), e); } else if (i === elements.length - 1) { - emitDestructuringAssignment(e.expression, createSliceCall(value, i)); + emitDestructuringAssignment(e.expression, createSliceCall(value, i), e); } } } } - function emitDestructuringAssignment(target, value) { - if (target.kind === 248 /* ShorthandPropertyAssignment */) { + function emitDestructuringAssignment(target, value, sourceMapNode) { + // When emitting target = value use source map node to highlight, including any temporary assignments needed for this + if (target.kind === 249 /* ShorthandPropertyAssignment */) { if (target.objectAssignmentInitializer) { - value = createDefaultValueCheck(value, target.objectAssignmentInitializer); + value = createDefaultValueCheck(value, target.objectAssignmentInitializer, sourceMapNode); } target = target.name; } - else if (target.kind === 183 /* BinaryExpression */ && target.operatorToken.kind === 56 /* EqualsToken */) { - value = createDefaultValueCheck(value, target.right); + else if (target.kind === 184 /* BinaryExpression */ && target.operatorToken.kind === 56 /* EqualsToken */) { + value = createDefaultValueCheck(value, target.right, sourceMapNode); target = target.left; } - if (target.kind === 167 /* ObjectLiteralExpression */) { - emitObjectLiteralAssignment(target, value); + if (target.kind === 168 /* ObjectLiteralExpression */) { + emitObjectLiteralAssignment(target, value, sourceMapNode); } - else if (target.kind === 166 /* ArrayLiteralExpression */) { - emitArrayLiteralAssignment(target, value); + else if (target.kind === 167 /* ArrayLiteralExpression */) { + emitArrayLiteralAssignment(target, value, sourceMapNode); } else { - emitAssignment(target, value, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0); + emitAssignment(target, value, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0, sourceMapNode); emitCount++; } } @@ -34447,25 +34900,32 @@ var ts; emit(value); } else if (isAssignmentExpressionStatement) { - emitDestructuringAssignment(target, value); + // Source map node for root.left = root.right is root + // but if root is synthetic, which could be in below case, use the target which is { a } + // for ({a} of {a: string}) { + // } + emitDestructuringAssignment(target, value, ts.nodeIsSynthesized(root) ? target : root); } else { - if (root.parent.kind !== 174 /* ParenthesizedExpression */) { + if (root.parent.kind !== 175 /* ParenthesizedExpression */) { write("("); } - value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true); - emitDestructuringAssignment(target, value); + // Temporary assignment needed to emit root should highlight whole binary expression + value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true, root); + // Source map node for root.left = root.right is root + emitDestructuringAssignment(target, value, root); write(", "); emit(value); - if (root.parent.kind !== 174 /* ParenthesizedExpression */) { + if (root.parent.kind !== 175 /* ParenthesizedExpression */) { write(")"); } } } function emitBindingElement(target, value) { + // Any temporary assignments needed to emit target = value should point to target if (target.initializer) { // Combine value and initializer - value = value ? createDefaultValueCheck(value, target.initializer) : target.initializer; + value = value ? createDefaultValueCheck(value, target.initializer, target) : target.initializer; } else if (!value) { // Use 'void 0' in absence of value and initializer @@ -34480,16 +34940,16 @@ var ts; // to ensure value is evaluated exactly once. Additionally, if we have zero elements // we need to emit *something* to ensure that in case a 'var' keyword was already emitted, // so in that case, we'll intentionally create that temporary. - value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ numElements !== 0); + value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ numElements !== 0, target); } for (var i = 0; i < numElements; i++) { var element = elements[i]; - if (pattern.kind === 163 /* ObjectBindingPattern */) { + if (pattern.kind === 164 /* ObjectBindingPattern */) { // Rewrite element to a declaration with an initializer that fetches property var propName = element.propertyName || element.name; emitBindingElement(element, createPropertyAccessForDestructuringProperty(value, propName)); } - else if (element.kind !== 189 /* OmittedExpression */) { + else if (element.kind !== 190 /* OmittedExpression */) { if (!element.dotDotDotToken) { // Rewrite element to a declaration that accesses array element at index i emitBindingElement(element, createElementAccessExpression(value, createNumericLiteral(i))); @@ -34501,7 +34961,7 @@ var ts; } } else { - emitAssignment(target.name, value, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0); + emitAssignment(target.name, value, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0, target); emitCount++; } } @@ -34529,8 +34989,8 @@ var ts; (getCombinedFlagsForIdentifier(node.name) & 8192 /* Let */); // NOTE: default initialization should not be added to let bindings in for-in\for-of statements if (isLetDefinedInLoop && - node.parent.parent.kind !== 202 /* ForInStatement */ && - node.parent.parent.kind !== 203 /* ForOfStatement */) { + node.parent.parent.kind !== 203 /* ForInStatement */ && + node.parent.parent.kind !== 204 /* ForOfStatement */) { initializer = createVoidZero(); } } @@ -34548,7 +35008,7 @@ var ts; } } function emitExportVariableAssignments(node) { - if (node.kind === 189 /* OmittedExpression */) { + if (node.kind === 190 /* OmittedExpression */) { return; } var name = node.name; @@ -34560,7 +35020,7 @@ var ts; } } function getCombinedFlagsForIdentifier(node) { - if (!node.parent || (node.parent.kind !== 213 /* VariableDeclaration */ && node.parent.kind !== 165 /* BindingElement */)) { + if (!node.parent || (node.parent.kind !== 214 /* VariableDeclaration */ && node.parent.kind !== 166 /* BindingElement */)) { return 0; } return ts.getCombinedNodeFlags(node.parent); @@ -34568,7 +35028,7 @@ var ts; function isES6ExportedDeclaration(node) { return !!(node.flags & 2 /* Export */) && modulekind === 5 /* ES6 */ && - node.parent.kind === 250 /* SourceFile */; + node.parent.kind === 251 /* SourceFile */; } function emitVariableStatement(node) { var startIsEmitted = false; @@ -34619,12 +35079,12 @@ var ts; function emitParameter(node) { if (languageVersion < 2 /* ES6 */) { if (ts.isBindingPattern(node.name)) { - var name_23 = createTempVariable(0 /* Auto */); + var name_26 = createTempVariable(0 /* Auto */); if (!tempParameters) { tempParameters = []; } - tempParameters.push(name_23); - emit(name_23); + tempParameters.push(name_26); + emit(name_26); } else { emit(node.name); @@ -34729,12 +35189,12 @@ var ts; } } function emitAccessor(node) { - write(node.kind === 145 /* GetAccessor */ ? "get " : "set "); + write(node.kind === 146 /* GetAccessor */ ? "get " : "set "); emit(node.name); emitSignatureAndBody(node); } function shouldEmitAsArrowFunction(node) { - return node.kind === 176 /* ArrowFunction */ && languageVersion >= 2 /* ES6 */; + return node.kind === 177 /* ArrowFunction */ && languageVersion >= 2 /* ES6 */; } function emitDeclarationName(node) { if (node.name) { @@ -34745,11 +35205,11 @@ var ts; } } function shouldEmitFunctionName(node) { - if (node.kind === 175 /* FunctionExpression */) { + if (node.kind === 176 /* FunctionExpression */) { // Emit name if one is present return !!node.name; } - if (node.kind === 215 /* FunctionDeclaration */) { + if (node.kind === 216 /* FunctionDeclaration */) { // Emit name if one is present, or emit generated name in down-level case (for export default case) return !!node.name || modulekind !== 5 /* ES6 */; } @@ -34761,12 +35221,12 @@ var ts; // TODO (yuisu) : we should not have special cases to condition emitting comments // but have one place to fix check for these conditions. var kind = node.kind, parent = node.parent; - if (kind !== 143 /* MethodDeclaration */ && - kind !== 142 /* MethodSignature */ && + if (kind !== 144 /* MethodDeclaration */ && + kind !== 143 /* MethodSignature */ && parent && - parent.kind !== 247 /* PropertyAssignment */ && - parent.kind !== 170 /* CallExpression */ && - parent.kind !== 166 /* ArrayLiteralExpression */) { + parent.kind !== 248 /* PropertyAssignment */ && + parent.kind !== 171 /* CallExpression */ && + parent.kind !== 167 /* ArrayLiteralExpression */) { // 1. Methods will emit comments at their assignment declaration sites. // // 2. If the function is a property of object literal, emitting leading-comments @@ -34805,11 +35265,11 @@ var ts; emitDeclarationName(node); } emitSignatureAndBody(node); - if (modulekind !== 5 /* ES6 */ && kind === 215 /* FunctionDeclaration */ && parent === currentSourceFile && node.name) { + if (modulekind !== 5 /* ES6 */ && kind === 216 /* FunctionDeclaration */ && parent === currentSourceFile && node.name) { emitExportMemberAssignments(node.name); } emitEnd(node); - if (kind !== 143 /* MethodDeclaration */ && kind !== 142 /* MethodSignature */) { + if (kind !== 144 /* MethodDeclaration */ && kind !== 143 /* MethodSignature */) { emitTrailingComments(node); } } @@ -34842,7 +35302,7 @@ var ts; } function emitAsyncFunctionBodyForES6(node) { var promiseConstructor = ts.getEntityNameFromTypeNode(node.type); - var isArrowFunction = node.kind === 176 /* ArrowFunction */; + var isArrowFunction = node.kind === 177 /* ArrowFunction */; var hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 4096 /* CaptureArguments */) !== 0; // An async function is emit as an outer function that calls an inner // generator function. To preserve lexical bindings, we pass the current @@ -34961,7 +35421,7 @@ var ts; write(" { }"); } else { - if (node.body.kind === 194 /* Block */) { + if (node.body.kind === 195 /* Block */) { emitBlockFunctionBody(node, node.body); } else { @@ -35020,10 +35480,10 @@ var ts; write(" "); // Unwrap all type assertions. var current = body; - while (current.kind === 173 /* TypeAssertionExpression */) { + while (current.kind === 174 /* TypeAssertionExpression */) { current = current.expression; } - emitParenthesizedIf(body, current.kind === 167 /* ObjectLiteralExpression */); + emitParenthesizedIf(body, current.kind === 168 /* ObjectLiteralExpression */); } function emitDownLevelExpressionFunctionBody(node, body) { write(" {"); @@ -35097,9 +35557,9 @@ var ts; function findInitialSuperCall(ctor) { if (ctor.body) { var statement = ctor.body.statements[0]; - if (statement && statement.kind === 197 /* ExpressionStatement */) { + if (statement && statement.kind === 198 /* ExpressionStatement */) { var expr = statement.expression; - if (expr && expr.kind === 170 /* CallExpression */) { + if (expr && expr.kind === 171 /* CallExpression */) { var func = expr.expression; if (func && func.kind === 95 /* SuperKeyword */) { return statement; @@ -35133,7 +35593,7 @@ var ts; emitNodeWithCommentsAndWithoutSourcemap(memberName); write("]"); } - else if (memberName.kind === 136 /* ComputedPropertyName */) { + else if (memberName.kind === 137 /* ComputedPropertyName */) { emitComputedPropertyName(memberName); } else { @@ -35145,7 +35605,7 @@ var ts; var properties = []; for (var _a = 0, _b = node.members; _a < _b.length; _a++) { var member = _b[_a]; - if (member.kind === 141 /* PropertyDeclaration */ && isStatic === ((member.flags & 64 /* Static */) !== 0) && member.initializer) { + if (member.kind === 142 /* PropertyDeclaration */ && isStatic === ((member.flags & 64 /* Static */) !== 0) && member.initializer) { properties.push(member); } } @@ -35185,11 +35645,11 @@ var ts; } function emitMemberFunctionsForES5AndLower(node) { ts.forEach(node.members, function (member) { - if (member.kind === 193 /* SemicolonClassElement */) { + if (member.kind === 194 /* SemicolonClassElement */) { writeLine(); write(";"); } - else if (member.kind === 143 /* MethodDeclaration */ || node.kind === 142 /* MethodSignature */) { + else if (member.kind === 144 /* MethodDeclaration */ || node.kind === 143 /* MethodSignature */) { if (!member.body) { return emitCommentsOnNotEmittedNode(member); } @@ -35206,7 +35666,7 @@ var ts; write(";"); emitTrailingComments(member); } - else if (member.kind === 145 /* GetAccessor */ || member.kind === 146 /* SetAccessor */) { + else if (member.kind === 146 /* GetAccessor */ || member.kind === 147 /* SetAccessor */) { var accessors = ts.getAllAccessorDeclarations(node.members, member); if (member === accessors.firstAccessor) { writeLine(); @@ -35256,22 +35716,22 @@ var ts; function emitMemberFunctionsForES6AndHigher(node) { for (var _a = 0, _b = node.members; _a < _b.length; _a++) { var member = _b[_a]; - if ((member.kind === 143 /* MethodDeclaration */ || node.kind === 142 /* MethodSignature */) && !member.body) { + if ((member.kind === 144 /* MethodDeclaration */ || node.kind === 143 /* MethodSignature */) && !member.body) { emitCommentsOnNotEmittedNode(member); } - else if (member.kind === 143 /* MethodDeclaration */ || - member.kind === 145 /* GetAccessor */ || - member.kind === 146 /* SetAccessor */) { + else if (member.kind === 144 /* MethodDeclaration */ || + member.kind === 146 /* GetAccessor */ || + member.kind === 147 /* SetAccessor */) { writeLine(); emitLeadingComments(member); emitStart(member); if (member.flags & 64 /* Static */) { write("static "); } - if (member.kind === 145 /* GetAccessor */) { + if (member.kind === 146 /* GetAccessor */) { write("get "); } - else if (member.kind === 146 /* SetAccessor */) { + else if (member.kind === 147 /* SetAccessor */) { write("set "); } if (member.asteriskToken) { @@ -35282,7 +35742,7 @@ var ts; emitEnd(member); emitTrailingComments(member); } - else if (member.kind === 193 /* SemicolonClassElement */) { + else if (member.kind === 194 /* SemicolonClassElement */) { writeLine(); write(";"); } @@ -35311,11 +35771,11 @@ var ts; var hasInstancePropertyWithInitializer = false; // Emit the constructor overload pinned comments ts.forEach(node.members, function (member) { - if (member.kind === 144 /* Constructor */ && !member.body) { + if (member.kind === 145 /* Constructor */ && !member.body) { emitCommentsOnNotEmittedNode(member); } // Check if there is any non-static property assignment - if (member.kind === 141 /* PropertyDeclaration */ && member.initializer && (member.flags & 64 /* Static */) === 0) { + if (member.kind === 142 /* PropertyDeclaration */ && member.initializer && (member.flags & 64 /* Static */) === 0) { hasInstancePropertyWithInitializer = true; } }); @@ -35429,7 +35889,7 @@ var ts; } function emitClassLikeDeclarationForES6AndHigher(node) { var thisNodeIsDecorated = ts.nodeIsDecorated(node); - if (node.kind === 216 /* ClassDeclaration */) { + if (node.kind === 217 /* ClassDeclaration */) { if (thisNodeIsDecorated) { // To preserve the correct runtime semantics when decorators are applied to the class, // the emit needs to follow one of the following rules: @@ -35506,7 +35966,7 @@ var ts; // This keeps the expression as an expression, while ensuring that the static parts // of it have been initialized by the time it is used. var staticProperties = getInitializedProperties(node, /*isStatic*/ true); - var isClassExpressionWithStaticProperties = staticProperties.length > 0 && node.kind === 188 /* ClassExpression */; + var isClassExpressionWithStaticProperties = staticProperties.length > 0 && node.kind === 189 /* ClassExpression */; var tempVariable; if (isClassExpressionWithStaticProperties) { tempVariable = createAndRecordTempVariable(0 /* Auto */); @@ -35588,7 +36048,7 @@ var ts; write(";"); } } - else if (node.parent.kind !== 250 /* SourceFile */) { + else if (node.parent.kind !== 251 /* SourceFile */) { writeLine(); emitStart(node); emitModuleMemberName(node); @@ -35600,7 +36060,7 @@ var ts; } } function emitClassLikeDeclarationBelowES6(node) { - if (node.kind === 216 /* ClassDeclaration */) { + if (node.kind === 217 /* ClassDeclaration */) { // source file level classes in system modules are hoisted so 'var's for them are already defined if (!shouldHoistDeclarationInSystemJsModule(node)) { write("var "); @@ -35661,11 +36121,11 @@ var ts; emit(baseTypeNode.expression); } write("))"); - if (node.kind === 216 /* ClassDeclaration */) { + if (node.kind === 217 /* ClassDeclaration */) { write(";"); } emitEnd(node); - if (node.kind === 216 /* ClassDeclaration */) { + if (node.kind === 217 /* ClassDeclaration */) { emitExportMemberAssignment(node); } } @@ -35749,7 +36209,7 @@ var ts; else { decorators = member.decorators; // we only decorate the parameters here if this is a method - if (member.kind === 143 /* MethodDeclaration */) { + if (member.kind === 144 /* MethodDeclaration */) { functionLikeMember = member; } } @@ -35806,7 +36266,7 @@ var ts; write(", "); emitExpressionForPropertyName(member.name); if (languageVersion > 0 /* ES3 */) { - if (member.kind !== 141 /* PropertyDeclaration */) { + if (member.kind !== 142 /* PropertyDeclaration */) { // We emit `null` here to indicate to `__decorate` that it can invoke `Object.getOwnPropertyDescriptor` directly. // We have this extra argument here so that we can inject an explicit property descriptor at a later date. write(", null"); @@ -35848,10 +36308,10 @@ var ts; // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata // compiler option is set. switch (node.kind) { - case 143 /* MethodDeclaration */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 141 /* PropertyDeclaration */: + case 144 /* MethodDeclaration */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 142 /* PropertyDeclaration */: return true; } return false; @@ -35861,7 +36321,7 @@ var ts; // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata // compiler option is set. switch (node.kind) { - case 143 /* MethodDeclaration */: + case 144 /* MethodDeclaration */: return true; } return false; @@ -35871,9 +36331,9 @@ var ts; // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata // compiler option is set. switch (node.kind) { - case 216 /* ClassDeclaration */: - case 143 /* MethodDeclaration */: - case 146 /* SetAccessor */: + case 217 /* ClassDeclaration */: + case 144 /* MethodDeclaration */: + case 147 /* SetAccessor */: return true; } return false; @@ -35891,19 +36351,19 @@ var ts; // // For rules on serializing type annotations, see `serializeTypeNode`. switch (node.kind) { - case 216 /* ClassDeclaration */: + case 217 /* ClassDeclaration */: write("Function"); return; - case 141 /* PropertyDeclaration */: + case 142 /* PropertyDeclaration */: emitSerializedTypeNode(node.type); return; - case 138 /* Parameter */: + case 139 /* Parameter */: emitSerializedTypeNode(node.type); return; - case 145 /* GetAccessor */: + case 146 /* GetAccessor */: emitSerializedTypeNode(node.type); return; - case 146 /* SetAccessor */: + case 147 /* SetAccessor */: emitSerializedTypeNode(ts.getSetAccessorTypeAnnotationNode(node)); return; } @@ -35919,23 +36379,23 @@ var ts; case 103 /* VoidKeyword */: write("void 0"); return; - case 160 /* ParenthesizedType */: + case 161 /* ParenthesizedType */: emitSerializedTypeNode(node.type); return; - case 152 /* FunctionType */: - case 153 /* ConstructorType */: + case 153 /* FunctionType */: + case 154 /* ConstructorType */: write("Function"); return; - case 156 /* ArrayType */: - case 157 /* TupleType */: + case 157 /* ArrayType */: + case 158 /* TupleType */: write("Array"); return; - case 150 /* TypePredicate */: + case 151 /* TypePredicate */: case 120 /* BooleanKeyword */: write("Boolean"); return; case 130 /* StringKeyword */: - case 162 /* StringLiteralType */: + case 163 /* StringLiteralType */: write("String"); return; case 128 /* NumberKeyword */: @@ -35944,15 +36404,15 @@ var ts; case 131 /* SymbolKeyword */: write("Symbol"); return; - case 151 /* TypeReference */: + case 152 /* TypeReference */: emitSerializedTypeReferenceNode(node); return; - case 154 /* TypeQuery */: - case 155 /* TypeLiteral */: - case 158 /* UnionType */: - case 159 /* IntersectionType */: + case 155 /* TypeQuery */: + case 156 /* TypeLiteral */: + case 159 /* UnionType */: + case 160 /* IntersectionType */: case 117 /* AnyKeyword */: - case 161 /* ThisType */: + case 162 /* ThisType */: break; default: ts.Debug.fail("Cannot serialize unexpected type node."); @@ -36025,7 +36485,7 @@ var ts; // For the rules on serializing the type of each parameter declaration, see `serializeTypeOfDeclaration`. if (node) { var valueDeclaration; - if (node.kind === 216 /* ClassDeclaration */) { + if (node.kind === 217 /* ClassDeclaration */) { valueDeclaration = ts.getFirstConstructorWithBody(node); } else if (ts.isFunctionLike(node) && ts.nodeIsPresent(node.body)) { @@ -36041,10 +36501,10 @@ var ts; } if (parameters[i].dotDotDotToken) { var parameterType = parameters[i].type; - if (parameterType.kind === 156 /* ArrayType */) { + if (parameterType.kind === 157 /* ArrayType */) { parameterType = parameterType.elementType; } - else if (parameterType.kind === 151 /* TypeReference */ && parameterType.typeArguments && parameterType.typeArguments.length === 1) { + else if (parameterType.kind === 152 /* TypeReference */ && parameterType.typeArguments && parameterType.typeArguments.length === 1) { parameterType = parameterType.typeArguments[0]; } else { @@ -36121,7 +36581,7 @@ var ts; if (!shouldHoistDeclarationInSystemJsModule(node)) { // do not emit var if variable was already hoisted var isES6ExportedEnum = isES6ExportedDeclaration(node); - if (!(node.flags & 2 /* Export */) || (isES6ExportedEnum && isFirstDeclarationOfKind(node, node.symbol && node.symbol.declarations, 219 /* EnumDeclaration */))) { + if (!(node.flags & 2 /* Export */) || (isES6ExportedEnum && isFirstDeclarationOfKind(node, node.symbol && node.symbol.declarations, 220 /* EnumDeclaration */))) { emitStart(node); if (isES6ExportedEnum) { write("export "); @@ -36203,7 +36663,7 @@ var ts; } } function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 220 /* ModuleDeclaration */) { + if (moduleDeclaration.body.kind === 221 /* ModuleDeclaration */) { var recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); return recursiveInnerModule || moduleDeclaration.body; } @@ -36227,7 +36687,7 @@ var ts; var emitVarForModule = !hoistedInDeclarationScope && !isModuleMergedWithES6Class(node); if (emitVarForModule) { var isES6ExportedNamespace = isES6ExportedDeclaration(node); - if (!isES6ExportedNamespace || isFirstDeclarationOfKind(node, node.symbol && node.symbol.declarations, 220 /* ModuleDeclaration */)) { + if (!isES6ExportedNamespace || isFirstDeclarationOfKind(node, node.symbol && node.symbol.declarations, 221 /* ModuleDeclaration */)) { emitStart(node); if (isES6ExportedNamespace) { write("export "); @@ -36245,7 +36705,7 @@ var ts; write(getGeneratedNameForNode(node)); emitEnd(node.name); write(") "); - if (node.body.kind === 221 /* ModuleBlock */) { + if (node.body.kind === 222 /* ModuleBlock */) { var saveConvertedLoopState = convertedLoopState; var saveTempFlags = tempFlags; var saveTempVariables = tempVariables; @@ -36321,16 +36781,16 @@ var ts; } } function getNamespaceDeclarationNode(node) { - if (node.kind === 223 /* ImportEqualsDeclaration */) { + if (node.kind === 224 /* ImportEqualsDeclaration */) { return node; } var importClause = node.importClause; - if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 226 /* NamespaceImport */) { + if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 227 /* NamespaceImport */) { return importClause.namedBindings; } } function isDefaultImport(node) { - return node.kind === 224 /* ImportDeclaration */ && node.importClause && !!node.importClause.name; + return node.kind === 225 /* ImportDeclaration */ && node.importClause && !!node.importClause.name; } function emitExportImportAssignments(node) { if (ts.isAliasSymbolDeclaration(node) && resolver.isValueAliasDeclaration(node)) { @@ -36358,7 +36818,7 @@ var ts; if (shouldEmitNamedBindings) { emitLeadingComments(node.importClause.namedBindings); emitStart(node.importClause.namedBindings); - if (node.importClause.namedBindings.kind === 226 /* NamespaceImport */) { + if (node.importClause.namedBindings.kind === 227 /* NamespaceImport */) { write("* as "); emit(node.importClause.namedBindings.name); } @@ -36384,7 +36844,7 @@ var ts; } function emitExternalImportDeclaration(node) { if (ts.contains(externalImports, node)) { - var isExportedImport = node.kind === 223 /* ImportEqualsDeclaration */ && (node.flags & 2 /* Export */) !== 0; + var isExportedImport = node.kind === 224 /* ImportEqualsDeclaration */ && (node.flags & 2 /* Export */) !== 0; var namespaceDeclaration = getNamespaceDeclarationNode(node); if (modulekind !== 2 /* AMD */) { emitLeadingComments(node); @@ -36403,7 +36863,7 @@ var ts; // import { x, y } from "foo" // import d, * as x from "foo" // import d, { x, y } from "foo" - var isNakedImport = 224 /* ImportDeclaration */ && !node.importClause; + var isNakedImport = 225 /* ImportDeclaration */ && !node.importClause; if (!isNakedImport) { write("var "); write(getGeneratedNameForNode(node)); @@ -36582,8 +37042,8 @@ var ts; write("export default "); var expression = node.expression; emit(expression); - if (expression.kind !== 215 /* FunctionDeclaration */ && - expression.kind !== 216 /* ClassDeclaration */) { + if (expression.kind !== 216 /* FunctionDeclaration */ && + expression.kind !== 217 /* ClassDeclaration */) { write(";"); } emitEnd(node); @@ -36620,7 +37080,7 @@ var ts; for (var _a = 0, _b = sourceFile.statements; _a < _b.length; _a++) { var node = _b[_a]; switch (node.kind) { - case 224 /* ImportDeclaration */: + case 225 /* ImportDeclaration */: if (!node.importClause || resolver.isReferencedAliasDeclaration(node.importClause, /*checkChildren*/ true)) { // import "mod" @@ -36630,13 +37090,13 @@ var ts; externalImports.push(node); } break; - case 223 /* ImportEqualsDeclaration */: - if (node.moduleReference.kind === 234 /* ExternalModuleReference */ && resolver.isReferencedAliasDeclaration(node)) { + case 224 /* ImportEqualsDeclaration */: + if (node.moduleReference.kind === 235 /* ExternalModuleReference */ && resolver.isReferencedAliasDeclaration(node)) { // import x = require("mod") where x is referenced externalImports.push(node); } break; - case 230 /* ExportDeclaration */: + case 231 /* ExportDeclaration */: if (node.moduleSpecifier) { if (!node.exportClause) { // export * from "mod" @@ -36654,12 +37114,12 @@ var ts; // export { x, y } for (var _c = 0, _d = node.exportClause.elements; _c < _d.length; _c++) { var specifier = _d[_c]; - var name_24 = (specifier.propertyName || specifier.name).text; - (exportSpecifiers[name_24] || (exportSpecifiers[name_24] = [])).push(specifier); + var name_27 = (specifier.propertyName || specifier.name).text; + (exportSpecifiers[name_27] || (exportSpecifiers[name_27] = [])).push(specifier); } } break; - case 229 /* ExportAssignment */: + case 230 /* ExportAssignment */: if (node.isExportEquals && !exportEquals) { // export = x exportEquals = node; @@ -36685,18 +37145,18 @@ var ts; if (namespaceDeclaration && !isDefaultImport(node)) { return ts.getTextOfNodeFromSourceText(currentText, namespaceDeclaration.name); } - if (node.kind === 224 /* ImportDeclaration */ && node.importClause) { + if (node.kind === 225 /* ImportDeclaration */ && node.importClause) { return getGeneratedNameForNode(node); } - if (node.kind === 230 /* ExportDeclaration */ && node.moduleSpecifier) { + if (node.kind === 231 /* ExportDeclaration */ && node.moduleSpecifier) { return getGeneratedNameForNode(node); } } function getExternalModuleNameText(importNode, emitRelativePathAsModuleName) { if (emitRelativePathAsModuleName) { - var name_25 = getExternalModuleNameFromDeclaration(host, resolver, importNode); - if (name_25) { - return "\"" + name_25 + "\""; + var name_28 = getExternalModuleNameFromDeclaration(host, resolver, importNode); + if (name_28) { + return "\"" + name_28 + "\""; } } var moduleName = ts.getExternalModuleName(importNode); @@ -36714,8 +37174,8 @@ var ts; for (var _a = 0, externalImports_1 = externalImports; _a < externalImports_1.length; _a++) { var importNode = externalImports_1[_a]; // do not create variable declaration for exports and imports that lack import clause - var skipNode = importNode.kind === 230 /* ExportDeclaration */ || - (importNode.kind === 224 /* ImportDeclaration */ && !importNode.importClause); + var skipNode = importNode.kind === 231 /* ExportDeclaration */ || + (importNode.kind === 225 /* ImportDeclaration */ && !importNode.importClause); if (skipNode) { continue; } @@ -36748,7 +37208,7 @@ var ts; var hasExportDeclarationWithExportClause = false; for (var _a = 0, externalImports_2 = externalImports; _a < externalImports_2.length; _a++) { var externalImport = externalImports_2[_a]; - if (externalImport.kind === 230 /* ExportDeclaration */ && externalImport.exportClause) { + if (externalImport.kind === 231 /* ExportDeclaration */ && externalImport.exportClause) { hasExportDeclarationWithExportClause = true; break; } @@ -36780,7 +37240,7 @@ var ts; } for (var _d = 0, externalImports_3 = externalImports; _d < externalImports_3.length; _d++) { var externalImport = externalImports_3[_d]; - if (externalImport.kind !== 230 /* ExportDeclaration */) { + if (externalImport.kind !== 231 /* ExportDeclaration */) { continue; } var exportDecl = externalImport; @@ -36868,12 +37328,12 @@ var ts; var seen = {}; for (var i = 0; i < hoistedVars.length; i++) { var local = hoistedVars[i]; - var name_26 = local.kind === 69 /* Identifier */ + var name_29 = local.kind === 69 /* Identifier */ ? local : local.name; - if (name_26) { + if (name_29) { // do not emit duplicate entries (in case of declaration merging) in the list of hoisted variables - var text = ts.unescapeIdentifier(name_26.text); + var text = ts.unescapeIdentifier(name_29.text); if (ts.hasProperty(seen, text)) { continue; } @@ -36884,7 +37344,7 @@ var ts; if (i !== 0) { write(", "); } - if (local.kind === 216 /* ClassDeclaration */ || local.kind === 220 /* ModuleDeclaration */ || local.kind === 219 /* EnumDeclaration */) { + if (local.kind === 217 /* ClassDeclaration */ || local.kind === 221 /* ModuleDeclaration */ || local.kind === 220 /* EnumDeclaration */) { emitDeclarationName(local); } else { @@ -36918,21 +37378,21 @@ var ts; if (node.flags & 4 /* Ambient */) { return; } - if (node.kind === 215 /* FunctionDeclaration */) { + if (node.kind === 216 /* FunctionDeclaration */) { if (!hoistedFunctionDeclarations) { hoistedFunctionDeclarations = []; } hoistedFunctionDeclarations.push(node); return; } - if (node.kind === 216 /* ClassDeclaration */) { + if (node.kind === 217 /* ClassDeclaration */) { if (!hoistedVars) { hoistedVars = []; } hoistedVars.push(node); return; } - if (node.kind === 219 /* EnumDeclaration */) { + if (node.kind === 220 /* EnumDeclaration */) { if (shouldEmitEnumDeclaration(node)) { if (!hoistedVars) { hoistedVars = []; @@ -36941,7 +37401,7 @@ var ts; } return; } - if (node.kind === 220 /* ModuleDeclaration */) { + if (node.kind === 221 /* ModuleDeclaration */) { if (shouldEmitModuleDeclaration(node)) { if (!hoistedVars) { hoistedVars = []; @@ -36950,17 +37410,17 @@ var ts; } return; } - if (node.kind === 213 /* VariableDeclaration */ || node.kind === 165 /* BindingElement */) { + if (node.kind === 214 /* VariableDeclaration */ || node.kind === 166 /* BindingElement */) { if (shouldHoistVariable(node, /*checkIfSourceFileLevelDecl*/ false)) { - var name_27 = node.name; - if (name_27.kind === 69 /* Identifier */) { + var name_30 = node.name; + if (name_30.kind === 69 /* Identifier */) { if (!hoistedVars) { hoistedVars = []; } - hoistedVars.push(name_27); + hoistedVars.push(name_30); } else { - ts.forEachChild(name_27, visit); + ts.forEachChild(name_30, visit); } } return; @@ -36991,7 +37451,7 @@ var ts; // if block scoped variables are nested in some another block then // no other functions can use them except ones that are defined at least in the same block return (ts.getCombinedNodeFlags(node) & 24576 /* BlockScoped */) === 0 || - ts.getEnclosingBlockScopeContainer(node).kind === 250 /* SourceFile */; + ts.getEnclosingBlockScopeContainer(node).kind === 251 /* SourceFile */; } function isCurrentFileSystemExternalModule() { return modulekind === 4 /* System */ && isCurrentFileExternalModule; @@ -37066,21 +37526,21 @@ var ts; var entry = group_1[_a]; var importVariableName = getLocalNameForExternalImport(entry) || ""; switch (entry.kind) { - case 224 /* ImportDeclaration */: + case 225 /* ImportDeclaration */: if (!entry.importClause) { // 'import "..."' case // module is imported only for side-effects, no emit required break; } // fall-through - case 223 /* ImportEqualsDeclaration */: + case 224 /* ImportEqualsDeclaration */: ts.Debug.assert(importVariableName !== ""); writeLine(); // save import into the local write(importVariableName + " = " + parameterName + ";"); writeLine(); break; - case 230 /* ExportDeclaration */: + case 231 /* ExportDeclaration */: ts.Debug.assert(importVariableName !== ""); if (entry.exportClause) { // export {a, b as c} from 'foo' @@ -37093,12 +37553,12 @@ var ts; write(exportFunctionForFile + "({"); writeLine(); increaseIndent(); - for (var i_2 = 0, len = entry.exportClause.elements.length; i_2 < len; i_2++) { - if (i_2 !== 0) { + for (var i_1 = 0, len = entry.exportClause.elements.length; i_1 < len; i_1++) { + if (i_1 !== 0) { write(","); writeLine(); } - var e = entry.exportClause.elements[i_2]; + var e = entry.exportClause.elements[i_1]; write("\""); emitNodeWithCommentsAndWithoutSourcemap(e.name); write("\": " + parameterName + "[\""); @@ -37139,10 +37599,10 @@ var ts; // - import declarations are not emitted since they are already handled in setters // - export declarations with module specifiers are not emitted since they were already written in setters // - export declarations without module specifiers are emitted preserving the order - case 215 /* FunctionDeclaration */: - case 224 /* ImportDeclaration */: + case 216 /* FunctionDeclaration */: + case 225 /* ImportDeclaration */: continue; - case 230 /* ExportDeclaration */: + case 231 /* ExportDeclaration */: if (!statement.moduleSpecifier) { for (var _a = 0, _b = statement.exportClause.elements; _a < _b.length; _a++) { var element = _b[_a]; @@ -37151,7 +37611,7 @@ var ts; } } continue; - case 223 /* ImportEqualsDeclaration */: + case 224 /* ImportEqualsDeclaration */: if (!ts.isInternalModuleImportEqualsDeclaration(statement)) { // - import equals declarations that import external modules are not emitted continue; @@ -37510,22 +37970,22 @@ var ts; if (!compilerOptions.noEmitHelpers) { // Only Emit __extends function when target ES5. // For target ES6 and above, we can emit classDeclaration as is. - if ((languageVersion < 2 /* ES6 */) && (!extendsEmitted && resolver.getNodeCheckFlags(node) & 8 /* EmitExtends */)) { + if ((languageVersion < 2 /* ES6 */) && (!extendsEmitted && node.flags & 4194304 /* HasClassExtends */)) { writeLines(extendsHelper); extendsEmitted = true; } - if (!decorateEmitted && resolver.getNodeCheckFlags(node) & 16 /* EmitDecorate */) { + if (!decorateEmitted && node.flags & 8388608 /* HasDecorators */) { writeLines(decorateHelper); if (compilerOptions.emitDecoratorMetadata) { writeLines(metadataHelper); } decorateEmitted = true; } - if (!paramEmitted && resolver.getNodeCheckFlags(node) & 32 /* EmitParam */) { + if (!paramEmitted && node.flags & 16777216 /* HasParamDecorators */) { writeLines(paramHelper); paramEmitted = true; } - if (!awaiterEmitted && resolver.getNodeCheckFlags(node) & 64 /* EmitAwaiter */) { + if (!awaiterEmitted && node.flags & 33554432 /* HasAsyncFunctions */) { writeLines(awaiterHelper); awaiterEmitted = true; } @@ -37596,28 +38056,41 @@ var ts; emitJavaScriptWorker(node); } } + function changeSourceMapEmit(writer) { + sourceMap = writer; + emitStart = writer.emitStart; + emitEnd = writer.emitEnd; + emitPos = writer.emitPos; + setSourceFile = writer.setSourceFile; + } + function withTemporaryNoSourceMap(callback) { + var prevSourceMap = sourceMap; + setSourceMapWriterEmit(ts.getNullSourceMapWriter()); + callback(); + setSourceMapWriterEmit(prevSourceMap); + } function isSpecializedCommentHandling(node) { switch (node.kind) { // All of these entities are emitted in a specialized fashion. As such, we allow // the specialized methods for each to handle the comments on the nodes. - case 217 /* InterfaceDeclaration */: - case 215 /* FunctionDeclaration */: - case 224 /* ImportDeclaration */: - case 223 /* ImportEqualsDeclaration */: - case 218 /* TypeAliasDeclaration */: - case 229 /* ExportAssignment */: + case 218 /* InterfaceDeclaration */: + case 216 /* FunctionDeclaration */: + case 225 /* ImportDeclaration */: + case 224 /* ImportEqualsDeclaration */: + case 219 /* TypeAliasDeclaration */: + case 230 /* ExportAssignment */: return true; } } function shouldEmitLeadingAndTrailingComments(node) { switch (node.kind) { - case 195 /* VariableStatement */: + case 196 /* VariableStatement */: return shouldEmitLeadingAndTrailingCommentsForVariableStatement(node); - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: // Only emit the leading/trailing comments for a module if we're actually // emitting the module as well. return shouldEmitModuleDeclaration(node); - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: // Only emit the leading/trailing comments for an enum if we're actually // emitting the module as well. return shouldEmitEnumDeclaration(node); @@ -37629,9 +38102,9 @@ var ts; // then we don't want to emit comments when we emit the body. It will have already // been taken care of when we emitted the 'return' statement for the function // expression body. - if (node.kind !== 194 /* Block */ && + if (node.kind !== 195 /* Block */ && node.parent && - node.parent.kind === 176 /* ArrowFunction */ && + node.parent.kind === 177 /* ArrowFunction */ && node.parent.body === node && compilerOptions.target <= 1 /* ES5 */) { return false; @@ -37644,13 +38117,13 @@ var ts; switch (node.kind) { case 69 /* Identifier */: return emitIdentifier(node); - case 138 /* Parameter */: + case 139 /* Parameter */: return emitParameter(node); - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: return emitMethod(node); - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: return emitAccessor(node); case 97 /* ThisKeyword */: return emitThis(node); @@ -37670,142 +38143,142 @@ var ts; case 13 /* TemplateMiddle */: case 14 /* TemplateTail */: return emitLiteral(node); - case 185 /* TemplateExpression */: + case 186 /* TemplateExpression */: return emitTemplateExpression(node); - case 192 /* TemplateSpan */: + case 193 /* TemplateSpan */: return emitTemplateSpan(node); - case 235 /* JsxElement */: - case 236 /* JsxSelfClosingElement */: + case 236 /* JsxElement */: + case 237 /* JsxSelfClosingElement */: return emitJsxElement(node); - case 238 /* JsxText */: + case 239 /* JsxText */: return emitJsxText(node); - case 242 /* JsxExpression */: + case 243 /* JsxExpression */: return emitJsxExpression(node); - case 135 /* QualifiedName */: + case 136 /* QualifiedName */: return emitQualifiedName(node); - case 163 /* ObjectBindingPattern */: + case 164 /* ObjectBindingPattern */: return emitObjectBindingPattern(node); - case 164 /* ArrayBindingPattern */: + case 165 /* ArrayBindingPattern */: return emitArrayBindingPattern(node); - case 165 /* BindingElement */: + case 166 /* BindingElement */: return emitBindingElement(node); - case 166 /* ArrayLiteralExpression */: + case 167 /* ArrayLiteralExpression */: return emitArrayLiteral(node); - case 167 /* ObjectLiteralExpression */: + case 168 /* ObjectLiteralExpression */: return emitObjectLiteral(node); - case 247 /* PropertyAssignment */: + case 248 /* PropertyAssignment */: return emitPropertyAssignment(node); - case 248 /* ShorthandPropertyAssignment */: + case 249 /* ShorthandPropertyAssignment */: return emitShorthandPropertyAssignment(node); - case 136 /* ComputedPropertyName */: + case 137 /* ComputedPropertyName */: return emitComputedPropertyName(node); - case 168 /* PropertyAccessExpression */: + case 169 /* PropertyAccessExpression */: return emitPropertyAccess(node); - case 169 /* ElementAccessExpression */: + case 170 /* ElementAccessExpression */: return emitIndexedAccess(node); - case 170 /* CallExpression */: + case 171 /* CallExpression */: return emitCallExpression(node); - case 171 /* NewExpression */: + case 172 /* NewExpression */: return emitNewExpression(node); - case 172 /* TaggedTemplateExpression */: + case 173 /* TaggedTemplateExpression */: return emitTaggedTemplateExpression(node); - case 173 /* TypeAssertionExpression */: + case 174 /* TypeAssertionExpression */: return emit(node.expression); - case 191 /* AsExpression */: + case 192 /* AsExpression */: return emit(node.expression); - case 174 /* ParenthesizedExpression */: + case 175 /* ParenthesizedExpression */: return emitParenExpression(node); - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: return emitFunctionDeclaration(node); - case 177 /* DeleteExpression */: + case 178 /* DeleteExpression */: return emitDeleteExpression(node); - case 178 /* TypeOfExpression */: + case 179 /* TypeOfExpression */: return emitTypeOfExpression(node); - case 179 /* VoidExpression */: + case 180 /* VoidExpression */: return emitVoidExpression(node); - case 180 /* AwaitExpression */: + case 181 /* AwaitExpression */: return emitAwaitExpression(node); - case 181 /* PrefixUnaryExpression */: + case 182 /* PrefixUnaryExpression */: return emitPrefixUnaryExpression(node); - case 182 /* PostfixUnaryExpression */: + case 183 /* PostfixUnaryExpression */: return emitPostfixUnaryExpression(node); - case 183 /* BinaryExpression */: + case 184 /* BinaryExpression */: return emitBinaryExpression(node); - case 184 /* ConditionalExpression */: + case 185 /* ConditionalExpression */: return emitConditionalExpression(node); - case 187 /* SpreadElementExpression */: + case 188 /* SpreadElementExpression */: return emitSpreadElementExpression(node); - case 186 /* YieldExpression */: + case 187 /* YieldExpression */: return emitYieldExpression(node); - case 189 /* OmittedExpression */: + case 190 /* OmittedExpression */: return; - case 194 /* Block */: - case 221 /* ModuleBlock */: + case 195 /* Block */: + case 222 /* ModuleBlock */: return emitBlock(node); - case 195 /* VariableStatement */: + case 196 /* VariableStatement */: return emitVariableStatement(node); - case 196 /* EmptyStatement */: + case 197 /* EmptyStatement */: return write(";"); - case 197 /* ExpressionStatement */: + case 198 /* ExpressionStatement */: return emitExpressionStatement(node); - case 198 /* IfStatement */: + case 199 /* IfStatement */: return emitIfStatement(node); - case 199 /* DoStatement */: + case 200 /* DoStatement */: return emitDoStatement(node); - case 200 /* WhileStatement */: + case 201 /* WhileStatement */: return emitWhileStatement(node); - case 201 /* ForStatement */: + case 202 /* ForStatement */: return emitForStatement(node); - case 203 /* ForOfStatement */: - case 202 /* ForInStatement */: + case 204 /* ForOfStatement */: + case 203 /* ForInStatement */: return emitForInOrForOfStatement(node); - case 204 /* ContinueStatement */: - case 205 /* BreakStatement */: + case 205 /* ContinueStatement */: + case 206 /* BreakStatement */: return emitBreakOrContinueStatement(node); - case 206 /* ReturnStatement */: + case 207 /* ReturnStatement */: return emitReturnStatement(node); - case 207 /* WithStatement */: + case 208 /* WithStatement */: return emitWithStatement(node); - case 208 /* SwitchStatement */: + case 209 /* SwitchStatement */: return emitSwitchStatement(node); - case 243 /* CaseClause */: - case 244 /* DefaultClause */: + case 244 /* CaseClause */: + case 245 /* DefaultClause */: return emitCaseOrDefaultClause(node); - case 209 /* LabeledStatement */: + case 210 /* LabeledStatement */: return emitLabeledStatement(node); - case 210 /* ThrowStatement */: + case 211 /* ThrowStatement */: return emitThrowStatement(node); - case 211 /* TryStatement */: + case 212 /* TryStatement */: return emitTryStatement(node); - case 246 /* CatchClause */: + case 247 /* CatchClause */: return emitCatchClause(node); - case 212 /* DebuggerStatement */: + case 213 /* DebuggerStatement */: return emitDebuggerStatement(node); - case 213 /* VariableDeclaration */: + case 214 /* VariableDeclaration */: return emitVariableDeclaration(node); - case 188 /* ClassExpression */: + case 189 /* ClassExpression */: return emitClassExpression(node); - case 216 /* ClassDeclaration */: + case 217 /* ClassDeclaration */: return emitClassDeclaration(node); - case 217 /* InterfaceDeclaration */: + case 218 /* InterfaceDeclaration */: return emitInterfaceDeclaration(node); - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: return emitEnumDeclaration(node); - case 249 /* EnumMember */: + case 250 /* EnumMember */: return emitEnumMember(node); - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: return emitModuleDeclaration(node); - case 224 /* ImportDeclaration */: + case 225 /* ImportDeclaration */: return emitImportDeclaration(node); - case 223 /* ImportEqualsDeclaration */: + case 224 /* ImportEqualsDeclaration */: return emitImportEqualsDeclaration(node); - case 230 /* ExportDeclaration */: + case 231 /* ExportDeclaration */: return emitExportDeclaration(node); - case 229 /* ExportAssignment */: + case 230 /* ExportAssignment */: return emitExportAssignment(node); - case 250 /* SourceFile */: + case 251 /* SourceFile */: return emitSourceFileNode(node); } } @@ -37844,7 +38317,7 @@ var ts; function getLeadingCommentsToEmit(node) { // Emit the leading comments only if the parent's pos doesn't match because parent should take care of emitting these comments if (node.parent) { - if (node.parent.kind === 250 /* SourceFile */ || node.pos !== node.parent.pos) { + if (node.parent.kind === 251 /* SourceFile */ || node.pos !== node.parent.pos) { if (hasDetachedComments(node.pos)) { // get comments without detached comments return getLeadingCommentsWithoutDetachedComments(); @@ -37859,7 +38332,7 @@ var ts; function getTrailingCommentsToEmit(node) { // Emit the trailing comments only if the parent's pos doesn't match because parent should take care of emitting these comments if (node.parent) { - if (node.parent.kind === 250 /* SourceFile */ || node.end !== node.parent.end) { + if (node.parent.kind === 251 /* SourceFile */ || node.end !== node.parent.end) { return ts.getTrailingCommentRanges(currentText, node.end); } } @@ -38290,7 +38763,25 @@ var ts; var currentDirectory = host.getCurrentDirectory(); var resolveModuleNamesWorker = host.resolveModuleNames ? (function (moduleNames, containingFile) { return host.resolveModuleNames(moduleNames, containingFile); }) - : (function (moduleNames, containingFile) { return ts.map(moduleNames, function (moduleName) { return resolveModuleName(moduleName, containingFile, options, host).resolvedModule; }); }); + : (function (moduleNames, containingFile) { + var resolvedModuleNames = []; + // resolveModuleName does not store any results between calls. + // lookup is a local cache to avoid resolving the same module name several times + var lookup = {}; + for (var _i = 0, moduleNames_1 = moduleNames; _i < moduleNames_1.length; _i++) { + var moduleName = moduleNames_1[_i]; + var resolvedName = void 0; + if (ts.hasProperty(lookup, moduleName)) { + resolvedName = lookup[moduleName]; + } + else { + resolvedName = resolveModuleName(moduleName, containingFile, options, host).resolvedModule; + lookup[moduleName] = resolvedName; + } + resolvedModuleNames.push(resolvedName); + } + return resolvedModuleNames; + }); var filesByName = ts.createFileMap(); // stores 'filename -> file association' ignoring case // used to track cases when two file names differ only in casing @@ -38408,14 +38899,18 @@ var ts; // tripleslash references has changed return false; } - // check imports + // check imports and module augmentations collectExternalModuleReferences(newSourceFile); if (!ts.arrayIsEqualTo(oldSourceFile.imports, newSourceFile.imports, moduleNameIsEqualTo)) { // imports has changed return false; } + if (!ts.arrayIsEqualTo(oldSourceFile.moduleAugmentations, newSourceFile.moduleAugmentations, moduleNameIsEqualTo)) { + // moduleAugmentations has changed + return false; + } if (resolveModuleNamesWorker) { - var moduleNames = ts.map(newSourceFile.imports, function (name) { return name.text; }); + var moduleNames = ts.map(ts.concatenate(newSourceFile.imports, newSourceFile.moduleAugmentations), getTextOfLiteral); var resolutions = resolveModuleNamesWorker(moduleNames, ts.getNormalizedAbsolutePath(newSourceFile.fileName, currentDirectory)); // ensure that module resolution results are still correct for (var i = 0; i < moduleNames.length; i++) { @@ -38580,44 +39075,44 @@ var ts; return false; } switch (node.kind) { - case 223 /* ImportEqualsDeclaration */: + case 224 /* ImportEqualsDeclaration */: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.import_can_only_be_used_in_a_ts_file)); return true; - case 229 /* ExportAssignment */: + case 230 /* ExportAssignment */: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.export_can_only_be_used_in_a_ts_file)); return true; - case 216 /* ClassDeclaration */: + case 217 /* ClassDeclaration */: var classDeclaration = node; if (checkModifiers(classDeclaration.modifiers) || checkTypeParameters(classDeclaration.typeParameters)) { return true; } break; - case 245 /* HeritageClause */: + case 246 /* HeritageClause */: var heritageClause = node; if (heritageClause.token === 106 /* ImplementsKeyword */) { diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.implements_clauses_can_only_be_used_in_a_ts_file)); return true; } break; - case 217 /* InterfaceDeclaration */: + case 218 /* InterfaceDeclaration */: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.interface_declarations_can_only_be_used_in_a_ts_file)); return true; - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.module_declarations_can_only_be_used_in_a_ts_file)); return true; - case 218 /* TypeAliasDeclaration */: + case 219 /* TypeAliasDeclaration */: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.type_aliases_can_only_be_used_in_a_ts_file)); return true; - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 175 /* FunctionExpression */: - case 215 /* FunctionDeclaration */: - case 176 /* ArrowFunction */: - case 215 /* FunctionDeclaration */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 145 /* Constructor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 176 /* FunctionExpression */: + case 216 /* FunctionDeclaration */: + case 177 /* ArrowFunction */: + case 216 /* FunctionDeclaration */: var functionDeclaration = node; if (checkModifiers(functionDeclaration.modifiers) || checkTypeParameters(functionDeclaration.typeParameters) || @@ -38625,20 +39120,20 @@ var ts; return true; } break; - case 195 /* VariableStatement */: + case 196 /* VariableStatement */: var variableStatement = node; if (checkModifiers(variableStatement.modifiers)) { return true; } break; - case 213 /* VariableDeclaration */: + case 214 /* VariableDeclaration */: var variableDeclaration = node; if (checkTypeAnnotation(variableDeclaration.type)) { return true; } break; - case 170 /* CallExpression */: - case 171 /* NewExpression */: + case 171 /* CallExpression */: + case 172 /* NewExpression */: var expression = node; if (expression.typeArguments && expression.typeArguments.length > 0) { var start_2 = expression.typeArguments.pos; @@ -38646,7 +39141,7 @@ var ts; return true; } break; - case 138 /* Parameter */: + case 139 /* Parameter */: var parameter = node; if (parameter.modifiers) { var start_3 = parameter.modifiers.pos; @@ -38662,17 +39157,17 @@ var ts; return true; } break; - case 141 /* PropertyDeclaration */: + case 142 /* PropertyDeclaration */: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.property_declarations_can_only_be_used_in_a_ts_file)); return true; - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.enum_declarations_can_only_be_used_in_a_ts_file)); return true; - case 173 /* TypeAssertionExpression */: + case 174 /* TypeAssertionExpression */: var typeAssertionExpression = node; diagnostics.push(ts.createDiagnosticForNode(typeAssertionExpression.type, ts.Diagnostics.type_assertion_expressions_can_only_be_used_in_a_ts_file)); return true; - case 139 /* Decorator */: + case 140 /* Decorator */: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.decorators_can_only_be_used_in_a_ts_file)); return true; } @@ -38750,59 +39245,77 @@ var ts; function moduleNameIsEqualTo(a, b) { return a.text === b.text; } + function getTextOfLiteral(literal) { + return literal.text; + } function collectExternalModuleReferences(file) { if (file.imports) { return; } var isJavaScriptFile = ts.isSourceFileJavaScript(file); + var isExternalModuleFile = ts.isExternalModule(file); var imports; + var moduleAugmentations; for (var _i = 0, _a = file.statements; _i < _a.length; _i++) { var node = _a[_i]; - collect(node, /*allowRelativeModuleNames*/ true, /*collectOnlyRequireCalls*/ false); + collectModuleReferences(node, /*inAmbientModule*/ false); + if (isJavaScriptFile) { + collectRequireCalls(node); + } } file.imports = imports || emptyArray; + file.moduleAugmentations = moduleAugmentations || emptyArray; return; - function collect(node, allowRelativeModuleNames, collectOnlyRequireCalls) { - if (!collectOnlyRequireCalls) { - switch (node.kind) { - case 224 /* ImportDeclaration */: - case 223 /* ImportEqualsDeclaration */: - case 230 /* ExportDeclaration */: - var moduleNameExpr = ts.getExternalModuleName(node); - if (!moduleNameExpr || moduleNameExpr.kind !== 9 /* StringLiteral */) { - break; - } - if (!moduleNameExpr.text) { - break; - } - if (allowRelativeModuleNames || !ts.isExternalModuleNameRelative(moduleNameExpr.text)) { - (imports || (imports = [])).push(moduleNameExpr); - } + function collectModuleReferences(node, inAmbientModule) { + switch (node.kind) { + case 225 /* ImportDeclaration */: + case 224 /* ImportEqualsDeclaration */: + case 231 /* ExportDeclaration */: + var moduleNameExpr = ts.getExternalModuleName(node); + if (!moduleNameExpr || moduleNameExpr.kind !== 9 /* StringLiteral */) { break; - case 220 /* ModuleDeclaration */: - if (node.name.kind === 9 /* StringLiteral */ && (node.flags & 4 /* Ambient */ || ts.isDeclarationFile(file))) { - // TypeScript 1.0 spec (April 2014): 12.1.6 + } + if (!moduleNameExpr.text) { + break; + } + // TypeScript 1.0 spec (April 2014): 12.1.6 + // An ExternalImportDeclaration in an AmbientExternalModuleDeclaration may reference other external modules + // only through top - level external module names. Relative external module names are not permitted. + if (!inAmbientModule || !ts.isExternalModuleNameRelative(moduleNameExpr.text)) { + (imports || (imports = [])).push(moduleNameExpr); + } + break; + case 221 /* ModuleDeclaration */: + if (ts.isAmbientModule(node) && (inAmbientModule || node.flags & 4 /* Ambient */ || ts.isDeclarationFile(file))) { + var moduleName = node.name; + // Ambient module declarations can be interpreted as augmentations for some existing external modules. + // This will happen in two cases: + // - if current file is external module then module augmentation is a ambient module declaration defined in the top level scope + // - if current file is not external module then module augmentation is an ambient module declaration with non-relative module name + // immediately nested in top level ambient module declaration . + if (isExternalModuleFile || (inAmbientModule && !ts.isExternalModuleNameRelative(moduleName.text))) { + (moduleAugmentations || (moduleAugmentations = [])).push(moduleName); + } + else if (!inAmbientModule) { // An AmbientExternalModuleDeclaration declares an external module. // This type of declaration is permitted only in the global module. // The StringLiteral must specify a top - level external module name. // Relative external module names are not permitted - ts.forEachChild(node.body, function (node) { - // TypeScript 1.0 spec (April 2014): 12.1.6 - // An ExternalImportDeclaration in anAmbientExternalModuleDeclaration may reference other external modules - // only through top - level external module names. Relative external module names are not permitted. - collect(node, /*allowRelativeModuleNames*/ false, collectOnlyRequireCalls); - }); + // NOTE: body of ambient module is always a module block + for (var _i = 0, _a = node.body.statements; _i < _a.length; _i++) { + var statement = _a[_i]; + collectModuleReferences(statement, /*inAmbientModule*/ true); + } } - break; - } + } } - if (isJavaScriptFile) { - if (ts.isRequireCall(node)) { - (imports || (imports = [])).push(node.arguments[0]); - } - else { - ts.forEachChild(node, function (node) { return collect(node, allowRelativeModuleNames, /*collectOnlyRequireCalls*/ true); }); - } + } + function collectRequireCalls(node) { + if (ts.isRequireCall(node)) { + (imports || (imports = [])).push(node.arguments[0]); + } + else { + ts.forEachChild(node, collectRequireCalls); } } } @@ -38914,14 +39427,21 @@ var ts; } function processImportedModules(file, basePath) { collectExternalModuleReferences(file); - if (file.imports.length) { + if (file.imports.length || file.moduleAugmentations.length) { file.resolvedModules = {}; - var moduleNames = ts.map(file.imports, function (name) { return name.text; }); + var moduleNames = ts.map(ts.concatenate(file.imports, file.moduleAugmentations), getTextOfLiteral); var resolutions = resolveModuleNamesWorker(moduleNames, ts.getNormalizedAbsolutePath(file.fileName, currentDirectory)); - for (var i = 0; i < file.imports.length; i++) { + for (var i = 0; i < moduleNames.length; i++) { var resolution = resolutions[i]; ts.setResolvedModule(file, moduleNames[i], resolution); - if (resolution && !options.noResolve) { + // add file to program only if: + // - resolution was successfull + // - noResolve is falsy + // - module name come from the list fo imports + var shouldAddFile = resolution && + !options.noResolve && + i < file.imports.length; + if (shouldAddFile) { var importedFile = findSourceFile(resolution.resolvedFileName, ts.toPath(resolution.resolvedFileName, currentDirectory, getCanonicalFileName), /*isDefaultLib*/ false, file, ts.skipTrivia(file.text, file.imports[i].pos), file.imports[i].end); if (importedFile && resolution.isExternalLibraryImport) { // Since currently irrespective of allowJs, we only look for supportedTypeScript extension external module files, @@ -39786,7 +40306,7 @@ var ts; } } function autoCollapse(node) { - return ts.isFunctionBlock(node) && node.parent.kind !== 176 /* ArrowFunction */; + return ts.isFunctionBlock(node) && node.parent.kind !== 177 /* ArrowFunction */; } var depth = 0; var maxDepth = 20; @@ -39798,30 +40318,30 @@ var ts; addOutliningForLeadingCommentsForNode(n); } switch (n.kind) { - case 194 /* Block */: + case 195 /* Block */: if (!ts.isFunctionBlock(n)) { - var parent_7 = n.parent; + var parent_8 = n.parent; var openBrace = ts.findChildOfKind(n, 15 /* OpenBraceToken */, sourceFile); var closeBrace = ts.findChildOfKind(n, 16 /* CloseBraceToken */, sourceFile); // Check if the block is standalone, or 'attached' to some parent statement. // If the latter, we want to collaps the block, but consider its hint span // to be the entire span of the parent. - if (parent_7.kind === 199 /* DoStatement */ || - parent_7.kind === 202 /* ForInStatement */ || - parent_7.kind === 203 /* ForOfStatement */ || - parent_7.kind === 201 /* ForStatement */ || - parent_7.kind === 198 /* IfStatement */ || - parent_7.kind === 200 /* WhileStatement */ || - parent_7.kind === 207 /* WithStatement */ || - parent_7.kind === 246 /* CatchClause */) { - addOutliningSpan(parent_7, openBrace, closeBrace, autoCollapse(n)); + if (parent_8.kind === 200 /* DoStatement */ || + parent_8.kind === 203 /* ForInStatement */ || + parent_8.kind === 204 /* ForOfStatement */ || + parent_8.kind === 202 /* ForStatement */ || + parent_8.kind === 199 /* IfStatement */ || + parent_8.kind === 201 /* WhileStatement */ || + parent_8.kind === 208 /* WithStatement */ || + parent_8.kind === 247 /* CatchClause */) { + addOutliningSpan(parent_8, openBrace, closeBrace, autoCollapse(n)); break; } - if (parent_7.kind === 211 /* TryStatement */) { + if (parent_8.kind === 212 /* TryStatement */) { // Could be the try-block, or the finally-block. - var tryStatement = parent_7; + var tryStatement = parent_8; if (tryStatement.tryBlock === n) { - addOutliningSpan(parent_7, openBrace, closeBrace, autoCollapse(n)); + addOutliningSpan(parent_8, openBrace, closeBrace, autoCollapse(n)); break; } else if (tryStatement.finallyBlock === n) { @@ -39844,23 +40364,23 @@ var ts; break; } // Fallthrough. - case 221 /* ModuleBlock */: { + case 222 /* ModuleBlock */: { var openBrace = ts.findChildOfKind(n, 15 /* OpenBraceToken */, sourceFile); var closeBrace = ts.findChildOfKind(n, 16 /* CloseBraceToken */, sourceFile); addOutliningSpan(n.parent, openBrace, closeBrace, autoCollapse(n)); break; } - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: - case 219 /* EnumDeclaration */: - case 167 /* ObjectLiteralExpression */: - case 222 /* CaseBlock */: { + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: + case 220 /* EnumDeclaration */: + case 168 /* ObjectLiteralExpression */: + case 223 /* CaseBlock */: { var openBrace = ts.findChildOfKind(n, 15 /* OpenBraceToken */, sourceFile); var closeBrace = ts.findChildOfKind(n, 16 /* CloseBraceToken */, sourceFile); addOutliningSpan(n, openBrace, closeBrace, autoCollapse(n)); break; } - case 166 /* ArrayLiteralExpression */: + case 167 /* ArrayLiteralExpression */: var openBracket = ts.findChildOfKind(n, 19 /* OpenBracketToken */, sourceFile); var closeBracket = ts.findChildOfKind(n, 20 /* CloseBracketToken */, sourceFile); addOutliningSpan(n, openBracket, closeBracket, autoCollapse(n)); @@ -39890,12 +40410,12 @@ var ts; ts.forEach(program.getSourceFiles(), function (sourceFile) { cancellationToken.throwIfCancellationRequested(); var nameToDeclarations = sourceFile.getNamedDeclarations(); - for (var name_28 in nameToDeclarations) { - var declarations = ts.getProperty(nameToDeclarations, name_28); + for (var name_31 in nameToDeclarations) { + var declarations = ts.getProperty(nameToDeclarations, name_31); if (declarations) { // First do a quick check to see if the name of the declaration matches the // last portion of the (possibly) dotted name they're searching for. - var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name_28); + var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name_31); if (!matches) { continue; } @@ -39908,14 +40428,14 @@ var ts; if (!containers) { return undefined; } - matches = patternMatcher.getMatches(containers, name_28); + matches = patternMatcher.getMatches(containers, name_31); if (!matches) { continue; } } var fileName = sourceFile.fileName; var matchKind = bestMatchKind(matches); - rawItems.push({ name: name_28, fileName: fileName, matchKind: matchKind, isCaseSensitive: allMatchesAreCaseSensitive(matches), declaration: declaration }); + rawItems.push({ name: name_31, fileName: fileName, matchKind: matchKind, isCaseSensitive: allMatchesAreCaseSensitive(matches), declaration: declaration }); } } } @@ -39953,7 +40473,7 @@ var ts; if (text !== undefined) { containers.unshift(text); } - else if (declaration.name.kind === 136 /* ComputedPropertyName */) { + else if (declaration.name.kind === 137 /* ComputedPropertyName */) { return tryAddComputedPropertyName(declaration.name.expression, containers, /*includeLastPortion*/ true); } else { @@ -39974,7 +40494,7 @@ var ts; } return true; } - if (expression.kind === 168 /* PropertyAccessExpression */) { + if (expression.kind === 169 /* PropertyAccessExpression */) { var propertyAccess = expression; if (includeLastPortion) { containers.unshift(propertyAccess.name.text); @@ -39987,7 +40507,7 @@ var ts; var containers = []; // First, if we started with a computed property name, then add all but the last // portion into the container array. - if (declaration.name.kind === 136 /* ComputedPropertyName */) { + if (declaration.name.kind === 137 /* ComputedPropertyName */) { if (!tryAddComputedPropertyName(declaration.name.expression, containers, /*includeLastPortion*/ false)) { return undefined; } @@ -40061,17 +40581,17 @@ var ts; var current = node.parent; while (current) { switch (current.kind) { - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: // If we have a module declared as A.B.C, it is more "intuitive" // to say it only has a single layer of depth do { current = current.parent; - } while (current.kind === 220 /* ModuleDeclaration */); + } while (current.kind === 221 /* ModuleDeclaration */); // fall through - case 216 /* ClassDeclaration */: - case 219 /* EnumDeclaration */: - case 217 /* InterfaceDeclaration */: - case 215 /* FunctionDeclaration */: + case 217 /* ClassDeclaration */: + case 220 /* EnumDeclaration */: + case 218 /* InterfaceDeclaration */: + case 216 /* FunctionDeclaration */: indent++; } current = current.parent; @@ -40082,21 +40602,21 @@ var ts; var childNodes = []; function visit(node) { switch (node.kind) { - case 195 /* VariableStatement */: + case 196 /* VariableStatement */: ts.forEach(node.declarationList.declarations, visit); break; - case 163 /* ObjectBindingPattern */: - case 164 /* ArrayBindingPattern */: + case 164 /* ObjectBindingPattern */: + case 165 /* ArrayBindingPattern */: ts.forEach(node.elements, visit); break; - case 230 /* ExportDeclaration */: + case 231 /* ExportDeclaration */: // Handle named exports case e.g.: // export {a, b as B} from "mod"; if (node.exportClause) { ts.forEach(node.exportClause.elements, visit); } break; - case 224 /* ImportDeclaration */: + case 225 /* ImportDeclaration */: var importClause = node.importClause; if (importClause) { // Handle default import case e.g.: @@ -40108,7 +40628,7 @@ var ts; // import * as NS from "mod"; // import {a, b as B} from "mod"; if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 226 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 227 /* NamespaceImport */) { childNodes.push(importClause.namedBindings); } else { @@ -40117,21 +40637,21 @@ var ts; } } break; - case 165 /* BindingElement */: - case 213 /* VariableDeclaration */: + case 166 /* BindingElement */: + case 214 /* VariableDeclaration */: if (ts.isBindingPattern(node.name)) { visit(node.name); break; } // Fall through - case 216 /* ClassDeclaration */: - case 219 /* EnumDeclaration */: - case 217 /* InterfaceDeclaration */: - case 220 /* ModuleDeclaration */: - case 215 /* FunctionDeclaration */: - case 223 /* ImportEqualsDeclaration */: - case 228 /* ImportSpecifier */: - case 232 /* ExportSpecifier */: + case 217 /* ClassDeclaration */: + case 220 /* EnumDeclaration */: + case 218 /* InterfaceDeclaration */: + case 221 /* ModuleDeclaration */: + case 216 /* FunctionDeclaration */: + case 224 /* ImportEqualsDeclaration */: + case 229 /* ImportSpecifier */: + case 233 /* ExportSpecifier */: childNodes.push(node); break; } @@ -40179,17 +40699,17 @@ var ts; for (var _i = 0, nodes_4 = nodes; _i < nodes_4.length; _i++) { var node = nodes_4[_i]; switch (node.kind) { - case 216 /* ClassDeclaration */: - case 219 /* EnumDeclaration */: - case 217 /* InterfaceDeclaration */: + case 217 /* ClassDeclaration */: + case 220 /* EnumDeclaration */: + case 218 /* InterfaceDeclaration */: topLevelNodes.push(node); break; - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: var moduleDeclaration = node; topLevelNodes.push(node); addTopLevelNodes(getInnermostModule(moduleDeclaration).body.statements, topLevelNodes); break; - case 215 /* FunctionDeclaration */: + case 216 /* FunctionDeclaration */: var functionDeclaration = node; if (isTopLevelFunctionDeclaration(functionDeclaration)) { topLevelNodes.push(node); @@ -40200,12 +40720,12 @@ var ts; } } function isTopLevelFunctionDeclaration(functionDeclaration) { - if (functionDeclaration.kind === 215 /* FunctionDeclaration */) { + if (functionDeclaration.kind === 216 /* FunctionDeclaration */) { // A function declaration is 'top level' if it contains any function declarations // within it. - if (functionDeclaration.body && functionDeclaration.body.kind === 194 /* Block */) { + if (functionDeclaration.body && functionDeclaration.body.kind === 195 /* Block */) { // Proper function declarations can only have identifier names - if (ts.forEach(functionDeclaration.body.statements, function (s) { return s.kind === 215 /* FunctionDeclaration */ && !isEmpty(s.name.text); })) { + if (ts.forEach(functionDeclaration.body.statements, function (s) { return s.kind === 216 /* FunctionDeclaration */ && !isEmpty(s.name.text); })) { return true; } // Or if it is not parented by another function. i.e all functions @@ -40265,7 +40785,7 @@ var ts; } function createChildItem(node) { switch (node.kind) { - case 138 /* Parameter */: + case 139 /* Parameter */: if (ts.isBindingPattern(node.name)) { break; } @@ -40273,36 +40793,36 @@ var ts; return undefined; } return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberVariableElement); - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberFunctionElement); - case 145 /* GetAccessor */: + case 146 /* GetAccessor */: return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberGetAccessorElement); - case 146 /* SetAccessor */: + case 147 /* SetAccessor */: return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberSetAccessorElement); - case 149 /* IndexSignature */: + case 150 /* IndexSignature */: return createItem(node, "[]", ts.ScriptElementKind.indexSignatureElement); - case 249 /* EnumMember */: + case 250 /* EnumMember */: return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberVariableElement); - case 147 /* CallSignature */: + case 148 /* CallSignature */: return createItem(node, "()", ts.ScriptElementKind.callSignatureElement); - case 148 /* ConstructSignature */: + case 149 /* ConstructSignature */: return createItem(node, "new()", ts.ScriptElementKind.constructSignatureElement); - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberVariableElement); - case 215 /* FunctionDeclaration */: + case 216 /* FunctionDeclaration */: return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.functionElement); - case 213 /* VariableDeclaration */: - case 165 /* BindingElement */: + case 214 /* VariableDeclaration */: + case 166 /* BindingElement */: var variableDeclarationNode; - var name_29; - if (node.kind === 165 /* BindingElement */) { - name_29 = node.name; + var name_32; + if (node.kind === 166 /* BindingElement */) { + name_32 = node.name; variableDeclarationNode = node; // binding elements are added only for variable declarations // bubble up to the containing variable declaration - while (variableDeclarationNode && variableDeclarationNode.kind !== 213 /* VariableDeclaration */) { + while (variableDeclarationNode && variableDeclarationNode.kind !== 214 /* VariableDeclaration */) { variableDeclarationNode = variableDeclarationNode.parent; } ts.Debug.assert(variableDeclarationNode !== undefined); @@ -40310,24 +40830,24 @@ var ts; else { ts.Debug.assert(!ts.isBindingPattern(node.name)); variableDeclarationNode = node; - name_29 = node.name; + name_32 = node.name; } if (ts.isConst(variableDeclarationNode)) { - return createItem(node, getTextOfNode(name_29), ts.ScriptElementKind.constElement); + return createItem(node, getTextOfNode(name_32), ts.ScriptElementKind.constElement); } else if (ts.isLet(variableDeclarationNode)) { - return createItem(node, getTextOfNode(name_29), ts.ScriptElementKind.letElement); + return createItem(node, getTextOfNode(name_32), ts.ScriptElementKind.letElement); } else { - return createItem(node, getTextOfNode(name_29), ts.ScriptElementKind.variableElement); + return createItem(node, getTextOfNode(name_32), ts.ScriptElementKind.variableElement); } - case 144 /* Constructor */: + case 145 /* Constructor */: return createItem(node, "constructor", ts.ScriptElementKind.constructorImplementationElement); - case 232 /* ExportSpecifier */: - case 228 /* ImportSpecifier */: - case 223 /* ImportEqualsDeclaration */: - case 225 /* ImportClause */: - case 226 /* NamespaceImport */: + case 233 /* ExportSpecifier */: + case 229 /* ImportSpecifier */: + case 224 /* ImportEqualsDeclaration */: + case 226 /* ImportClause */: + case 227 /* NamespaceImport */: return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.alias); } return undefined; @@ -40357,29 +40877,29 @@ var ts; } function createTopLevelItem(node) { switch (node.kind) { - case 250 /* SourceFile */: + case 251 /* SourceFile */: return createSourceFileItem(node); - case 216 /* ClassDeclaration */: + case 217 /* ClassDeclaration */: return createClassItem(node); - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: return createEnumItem(node); - case 217 /* InterfaceDeclaration */: + case 218 /* InterfaceDeclaration */: return createIterfaceItem(node); - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: return createModuleItem(node); - case 215 /* FunctionDeclaration */: + case 216 /* FunctionDeclaration */: return createFunctionItem(node); } return undefined; function getModuleName(moduleDeclaration) { // We want to maintain quotation marks. - if (moduleDeclaration.name.kind === 9 /* StringLiteral */) { + if (ts.isAmbientModule(moduleDeclaration)) { return getTextOfNode(moduleDeclaration.name); } // Otherwise, we need to aggregate each identifier to build up the qualified name. var result = []; result.push(moduleDeclaration.name.text); - while (moduleDeclaration.body && moduleDeclaration.body.kind === 220 /* ModuleDeclaration */) { + while (moduleDeclaration.body && moduleDeclaration.body.kind === 221 /* ModuleDeclaration */) { moduleDeclaration = moduleDeclaration.body; result.push(moduleDeclaration.name.text); } @@ -40391,7 +40911,7 @@ var ts; return getNavigationBarItem(moduleName, ts.ScriptElementKind.moduleElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node)); } function createFunctionItem(node) { - if (node.body && node.body.kind === 194 /* Block */) { + if (node.body && node.body.kind === 195 /* Block */) { var childItems = getItemsWorker(sortNodes(node.body.statements), createChildItem); return getNavigationBarItem(!node.name ? "default" : node.name.text, ts.ScriptElementKind.functionElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node)); } @@ -40412,7 +40932,7 @@ var ts; var childItems; if (node.members) { var constructor = ts.forEach(node.members, function (member) { - return member.kind === 144 /* Constructor */ && member; + return member.kind === 145 /* Constructor */ && member; }); // Add the constructor parameters in as children of the class (for property parameters). // Note that *all non-binding pattern named* parameters will be added to the nodes array, but parameters that @@ -40436,7 +40956,7 @@ var ts; } } function removeComputedProperties(node) { - return ts.filter(node.members, function (member) { return member.name === undefined || member.name.kind !== 136 /* ComputedPropertyName */; }); + return ts.filter(node.members, function (member) { return member.name === undefined || member.name.kind !== 137 /* ComputedPropertyName */; }); } /** * Like removeComputedProperties, but retains the properties with well known symbol names @@ -40445,13 +40965,13 @@ var ts; return ts.filter(node.members, function (member) { return !ts.hasDynamicName(member); }); } function getInnermostModule(node) { - while (node.body.kind === 220 /* ModuleDeclaration */) { + while (node.body.kind === 221 /* ModuleDeclaration */) { node = node.body; } return node; } function getNodeSpan(node) { - return node.kind === 250 /* SourceFile */ + return node.kind === 251 /* SourceFile */ ? ts.createTextSpanFromBounds(node.getFullStart(), node.getEnd()) : ts.createTextSpanFromBounds(node.getStart(), node.getEnd()); } @@ -41202,7 +41722,7 @@ var ts; } return createSignatureHelpItems(candidates, resolvedSignature, argumentInfo); function createJavaScriptSignatureHelpItems(argumentInfo) { - if (argumentInfo.invocation.kind !== 170 /* CallExpression */) { + if (argumentInfo.invocation.kind !== 171 /* CallExpression */) { return undefined; } // See if we can find some symbol with the call expression name that has call signatures. @@ -41210,7 +41730,7 @@ var ts; var expression = callExpression.expression; var name = expression.kind === 69 /* Identifier */ ? expression - : expression.kind === 168 /* PropertyAccessExpression */ + : expression.kind === 169 /* PropertyAccessExpression */ ? expression.name : undefined; if (!name || !name.text) { @@ -41243,7 +41763,7 @@ var ts; * in the argument of an invocation; returns undefined otherwise. */ function getImmediatelyContainingArgumentInfo(node) { - if (node.parent.kind === 170 /* CallExpression */ || node.parent.kind === 171 /* NewExpression */) { + if (node.parent.kind === 171 /* CallExpression */ || node.parent.kind === 172 /* NewExpression */) { var callExpression = node.parent; // There are 3 cases to handle: // 1. The token introduces a list, and should begin a sig help session @@ -41296,25 +41816,25 @@ var ts; }; } } - else if (node.kind === 11 /* NoSubstitutionTemplateLiteral */ && node.parent.kind === 172 /* TaggedTemplateExpression */) { + else if (node.kind === 11 /* NoSubstitutionTemplateLiteral */ && node.parent.kind === 173 /* TaggedTemplateExpression */) { // Check if we're actually inside the template; // otherwise we'll fall out and return undefined. if (ts.isInsideTemplateLiteral(node, position)) { return getArgumentListInfoForTemplate(node.parent, /*argumentIndex*/ 0); } } - else if (node.kind === 12 /* TemplateHead */ && node.parent.parent.kind === 172 /* TaggedTemplateExpression */) { + else if (node.kind === 12 /* TemplateHead */ && node.parent.parent.kind === 173 /* TaggedTemplateExpression */) { var templateExpression = node.parent; var tagExpression = templateExpression.parent; - ts.Debug.assert(templateExpression.kind === 185 /* TemplateExpression */); + ts.Debug.assert(templateExpression.kind === 186 /* TemplateExpression */); var argumentIndex = ts.isInsideTemplateLiteral(node, position) ? 0 : 1; return getArgumentListInfoForTemplate(tagExpression, argumentIndex); } - else if (node.parent.kind === 192 /* TemplateSpan */ && node.parent.parent.parent.kind === 172 /* TaggedTemplateExpression */) { + else if (node.parent.kind === 193 /* TemplateSpan */ && node.parent.parent.parent.kind === 173 /* TaggedTemplateExpression */) { var templateSpan = node.parent; var templateExpression = templateSpan.parent; var tagExpression = templateExpression.parent; - ts.Debug.assert(templateExpression.kind === 185 /* TemplateExpression */); + ts.Debug.assert(templateExpression.kind === 186 /* TemplateExpression */); // If we're just after a template tail, don't show signature help. if (node.kind === 14 /* TemplateTail */ && !ts.isInsideTemplateLiteral(node, position)) { return undefined; @@ -41432,7 +41952,7 @@ var ts; // // This is because a Missing node has no width. However, what we actually want is to include trivia // leading up to the next token in case the user is about to type in a TemplateMiddle or TemplateTail. - if (template.kind === 185 /* TemplateExpression */) { + if (template.kind === 186 /* TemplateExpression */) { var lastSpan = ts.lastOrUndefined(template.templateSpans); if (lastSpan.literal.getFullWidth() === 0) { applicableSpanEnd = ts.skipTrivia(sourceFile.text, applicableSpanEnd, /*stopAfterLineBreak*/ false); @@ -41441,7 +41961,7 @@ var ts; return ts.createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart); } function getContainingArgumentInfo(node) { - for (var n = node; n.kind !== 250 /* SourceFile */; n = n.parent) { + for (var n = node; n.kind !== 251 /* SourceFile */; n = n.parent) { if (ts.isFunctionBlock(n)) { return undefined; } @@ -41641,40 +42161,40 @@ var ts; return false; } switch (n.kind) { - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: - case 219 /* EnumDeclaration */: - case 167 /* ObjectLiteralExpression */: - case 163 /* ObjectBindingPattern */: - case 155 /* TypeLiteral */: - case 194 /* Block */: - case 221 /* ModuleBlock */: - case 222 /* CaseBlock */: + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: + case 220 /* EnumDeclaration */: + case 168 /* ObjectLiteralExpression */: + case 164 /* ObjectBindingPattern */: + case 156 /* TypeLiteral */: + case 195 /* Block */: + case 222 /* ModuleBlock */: + case 223 /* CaseBlock */: return nodeEndsWith(n, 16 /* CloseBraceToken */, sourceFile); - case 246 /* CatchClause */: + case 247 /* CatchClause */: return isCompletedNode(n.block, sourceFile); - case 171 /* NewExpression */: + case 172 /* NewExpression */: if (!n.arguments) { return true; } // fall through - case 170 /* CallExpression */: - case 174 /* ParenthesizedExpression */: - case 160 /* ParenthesizedType */: + case 171 /* CallExpression */: + case 175 /* ParenthesizedExpression */: + case 161 /* ParenthesizedType */: return nodeEndsWith(n, 18 /* CloseParenToken */, sourceFile); - case 152 /* FunctionType */: - case 153 /* ConstructorType */: + case 153 /* FunctionType */: + case 154 /* ConstructorType */: return isCompletedNode(n.type, sourceFile); - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 148 /* ConstructSignature */: - case 147 /* CallSignature */: - case 176 /* ArrowFunction */: + case 145 /* Constructor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 149 /* ConstructSignature */: + case 148 /* CallSignature */: + case 177 /* ArrowFunction */: if (n.body) { return isCompletedNode(n.body, sourceFile); } @@ -41684,64 +42204,64 @@ var ts; // Even though type parameters can be unclosed, we can get away with // having at least a closing paren. return hasChildOfKind(n, 18 /* CloseParenToken */, sourceFile); - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: return n.body && isCompletedNode(n.body, sourceFile); - case 198 /* IfStatement */: + case 199 /* IfStatement */: if (n.elseStatement) { return isCompletedNode(n.elseStatement, sourceFile); } return isCompletedNode(n.thenStatement, sourceFile); - case 197 /* ExpressionStatement */: + case 198 /* ExpressionStatement */: return isCompletedNode(n.expression, sourceFile) || hasChildOfKind(n, 23 /* SemicolonToken */); - case 166 /* ArrayLiteralExpression */: - case 164 /* ArrayBindingPattern */: - case 169 /* ElementAccessExpression */: - case 136 /* ComputedPropertyName */: - case 157 /* TupleType */: + case 167 /* ArrayLiteralExpression */: + case 165 /* ArrayBindingPattern */: + case 170 /* ElementAccessExpression */: + case 137 /* ComputedPropertyName */: + case 158 /* TupleType */: return nodeEndsWith(n, 20 /* CloseBracketToken */, sourceFile); - case 149 /* IndexSignature */: + case 150 /* IndexSignature */: if (n.type) { return isCompletedNode(n.type, sourceFile); } return hasChildOfKind(n, 20 /* CloseBracketToken */, sourceFile); - case 243 /* CaseClause */: - case 244 /* DefaultClause */: + case 244 /* CaseClause */: + case 245 /* DefaultClause */: // there is no such thing as terminator token for CaseClause/DefaultClause so for simplicitly always consider them non-completed return false; - case 201 /* ForStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - case 200 /* WhileStatement */: + case 202 /* ForStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: + case 201 /* WhileStatement */: return isCompletedNode(n.statement, sourceFile); - case 199 /* DoStatement */: + case 200 /* DoStatement */: // rough approximation: if DoStatement has While keyword - then if node is completed is checking the presence of ')'; var hasWhileKeyword = findChildOfKind(n, 104 /* WhileKeyword */, sourceFile); if (hasWhileKeyword) { return nodeEndsWith(n, 18 /* CloseParenToken */, sourceFile); } return isCompletedNode(n.statement, sourceFile); - case 154 /* TypeQuery */: + case 155 /* TypeQuery */: return isCompletedNode(n.exprName, sourceFile); - case 178 /* TypeOfExpression */: - case 177 /* DeleteExpression */: - case 179 /* VoidExpression */: - case 186 /* YieldExpression */: - case 187 /* SpreadElementExpression */: + case 179 /* TypeOfExpression */: + case 178 /* DeleteExpression */: + case 180 /* VoidExpression */: + case 187 /* YieldExpression */: + case 188 /* SpreadElementExpression */: var unaryWordExpression = n; return isCompletedNode(unaryWordExpression.expression, sourceFile); - case 172 /* TaggedTemplateExpression */: + case 173 /* TaggedTemplateExpression */: return isCompletedNode(n.template, sourceFile); - case 185 /* TemplateExpression */: + case 186 /* TemplateExpression */: var lastSpan = ts.lastOrUndefined(n.templateSpans); return isCompletedNode(lastSpan, sourceFile); - case 192 /* TemplateSpan */: + case 193 /* TemplateSpan */: return ts.nodeIsPresent(n.literal); - case 181 /* PrefixUnaryExpression */: + case 182 /* PrefixUnaryExpression */: return isCompletedNode(n.operand, sourceFile); - case 183 /* BinaryExpression */: + case 184 /* BinaryExpression */: return isCompletedNode(n.right, sourceFile); - case 184 /* ConditionalExpression */: + case 185 /* ConditionalExpression */: return isCompletedNode(n.whenFalse, sourceFile); default: return true; @@ -41797,7 +42317,7 @@ var ts; // for the position of the relevant node (or comma). var syntaxList = ts.forEach(node.parent.getChildren(), function (c) { // find syntax list that covers the span of the node - if (c.kind === 273 /* SyntaxList */ && c.pos <= node.pos && c.end >= node.end) { + if (c.kind === 274 /* SyntaxList */ && c.pos <= node.pos && c.end >= node.end) { return c; } }); @@ -41903,7 +42423,7 @@ var ts; function findPrecedingToken(position, sourceFile, startNode) { return find(startNode || sourceFile); function findRightmostToken(n) { - if (isToken(n) || n.kind === 238 /* JsxText */) { + if (isToken(n) || n.kind === 239 /* JsxText */) { return n; } var children = n.getChildren(); @@ -41911,7 +42431,7 @@ var ts; return candidate && findRightmostToken(candidate); } function find(n) { - if (isToken(n) || n.kind === 238 /* JsxText */) { + if (isToken(n) || n.kind === 239 /* JsxText */) { return n; } var children = n.getChildren(); @@ -41925,10 +42445,10 @@ var ts; // if no - position is in the node itself so we should recurse in it. // NOTE: JsxText is a weird kind of node that can contain only whitespaces (since they are not counted as trivia). // if this is the case - then we should assume that token in question is located in previous child. - if (position < child.end && (nodeHasTokens(child) || child.kind === 238 /* JsxText */)) { + if (position < child.end && (nodeHasTokens(child) || child.kind === 239 /* JsxText */)) { var start = child.getStart(sourceFile); var lookInPreviousChild = (start >= position) || - (child.kind === 238 /* JsxText */ && start === child.end); // whitespace only JsxText + (child.kind === 239 /* JsxText */ && start === child.end); // whitespace only JsxText if (lookInPreviousChild) { // actual start of the node is past the position - previous token should be at the end of previous child var candidate = findRightmostChildNodeWithTokens(children, /*exclusiveStartPosition*/ i); @@ -41940,7 +42460,7 @@ var ts; } } } - ts.Debug.assert(startNode !== undefined || n.kind === 250 /* SourceFile */); + ts.Debug.assert(startNode !== undefined || n.kind === 251 /* SourceFile */); // Here we know that none of child token nodes embrace the position, // the only known case is when position is at the end of the file. // Try to find the rightmost token in the file without filtering. @@ -41962,7 +42482,7 @@ var ts; ts.findPrecedingToken = findPrecedingToken; function isInString(sourceFile, position) { var token = getTokenAtPosition(sourceFile, position); - return token && (token.kind === 9 /* StringLiteral */ || token.kind === 162 /* StringLiteralType */) && position > token.getStart(); + return token && (token.kind === 9 /* StringLiteral */ || token.kind === 163 /* StringLiteralType */) && position > token.getStart(); } ts.isInString = isInString; function isInComment(sourceFile, position) { @@ -42066,17 +42586,17 @@ var ts; } ts.getNodeModifiers = getNodeModifiers; function getTypeArgumentOrTypeParameterList(node) { - if (node.kind === 151 /* TypeReference */ || node.kind === 170 /* CallExpression */) { + if (node.kind === 152 /* TypeReference */ || node.kind === 171 /* CallExpression */) { return node.typeArguments; } - if (ts.isFunctionLike(node) || node.kind === 216 /* ClassDeclaration */ || node.kind === 217 /* InterfaceDeclaration */) { + if (ts.isFunctionLike(node) || node.kind === 217 /* ClassDeclaration */ || node.kind === 218 /* InterfaceDeclaration */) { return node.typeParameters; } return undefined; } ts.getTypeArgumentOrTypeParameterList = getTypeArgumentOrTypeParameterList; function isToken(n) { - return n.kind >= 0 /* FirstToken */ && n.kind <= 134 /* LastToken */; + return n.kind >= 0 /* FirstToken */ && n.kind <= 135 /* LastToken */; } ts.isToken = isToken; function isWord(kind) { @@ -42092,7 +42612,7 @@ var ts; ts.isComment = isComment; function isStringOrRegularExpressionOrTemplateLiteral(kind) { if (kind === 9 /* StringLiteral */ - || kind === 162 /* StringLiteralType */ + || kind === 163 /* StringLiteralType */ || kind === 10 /* RegularExpressionLiteral */ || ts.isTemplateLiteralKind(kind)) { return true; @@ -42135,13 +42655,40 @@ var ts; return true; } ts.compareDataObjects = compareDataObjects; + function isArrayLiteralOrObjectLiteralDestructuringPattern(node) { + if (node.kind === 167 /* ArrayLiteralExpression */ || + node.kind === 168 /* ObjectLiteralExpression */) { + // [a,b,c] from: + // [a, b, c] = someExpression; + if (node.parent.kind === 184 /* BinaryExpression */ && + node.parent.left === node && + node.parent.operatorToken.kind === 56 /* EqualsToken */) { + return true; + } + // [a, b, c] from: + // for([a, b, c] of expression) + if (node.parent.kind === 204 /* ForOfStatement */ && + node.parent.initializer === node) { + return true; + } + // [a, b, c] of + // [x, [a, b, c] ] = someExpression + // or + // {x, a: {a, b, c} } = someExpression + if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 248 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { + return true; + } + } + return false; + } + ts.isArrayLiteralOrObjectLiteralDestructuringPattern = isArrayLiteralOrObjectLiteralDestructuringPattern; })(ts || (ts = {})); // Display-part writer helpers /* @internal */ var ts; (function (ts) { function isFirstDeclarationOfSymbolParameter(symbol) { - return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === 138 /* Parameter */; + return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === 139 /* Parameter */; } ts.isFirstDeclarationOfSymbolParameter = isFirstDeclarationOfSymbolParameter; var displayPartWriter = getDisplayPartWriter(); @@ -42329,7 +42876,7 @@ var ts; ts.getDeclaredName = getDeclaredName; function isImportOrExportSpecifierName(location) { return location.parent && - (location.parent.kind === 228 /* ImportSpecifier */ || location.parent.kind === 232 /* ExportSpecifier */) && + (location.parent.kind === 229 /* ImportSpecifier */ || location.parent.kind === 233 /* ExportSpecifier */) && location.parent.propertyName === location; } ts.isImportOrExportSpecifierName = isImportOrExportSpecifierName; @@ -42452,10 +42999,10 @@ var ts; function shouldRescanJsxIdentifier(node) { if (node.parent) { switch (node.parent.kind) { - case 240 /* JsxAttribute */: - case 237 /* JsxOpeningElement */: - case 239 /* JsxClosingElement */: - case 236 /* JsxSelfClosingElement */: + case 241 /* JsxAttribute */: + case 238 /* JsxOpeningElement */: + case 240 /* JsxClosingElement */: + case 237 /* JsxSelfClosingElement */: return node.kind === 69 /* Identifier */; } } @@ -43059,9 +43606,9 @@ var ts; } Rules.prototype.getRuleName = function (rule) { var o = this; - for (var name_30 in o) { - if (o[name_30] === rule) { - return name_30; + for (var name_33 in o) { + if (o[name_33] === rule) { + return name_33; } } throw new Error("Unknown rule"); @@ -43070,40 +43617,40 @@ var ts; /// Contexts /// Rules.IsForContext = function (context) { - return context.contextNode.kind === 201 /* ForStatement */; + return context.contextNode.kind === 202 /* ForStatement */; }; Rules.IsNotForContext = function (context) { return !Rules.IsForContext(context); }; Rules.IsBinaryOpContext = function (context) { switch (context.contextNode.kind) { - case 183 /* BinaryExpression */: - case 184 /* ConditionalExpression */: - case 191 /* AsExpression */: - case 150 /* TypePredicate */: - case 158 /* UnionType */: - case 159 /* IntersectionType */: + case 184 /* BinaryExpression */: + case 185 /* ConditionalExpression */: + case 192 /* AsExpression */: + case 151 /* TypePredicate */: + case 159 /* UnionType */: + case 160 /* IntersectionType */: return true; // equals in binding elements: function foo([[x, y] = [1, 2]]) - case 165 /* BindingElement */: + case 166 /* BindingElement */: // equals in type X = ... - case 218 /* TypeAliasDeclaration */: + case 219 /* TypeAliasDeclaration */: // equal in import a = module('a'); - case 223 /* ImportEqualsDeclaration */: + case 224 /* ImportEqualsDeclaration */: // equal in let a = 0; - case 213 /* VariableDeclaration */: + case 214 /* VariableDeclaration */: // equal in p = 0; - case 138 /* Parameter */: - case 249 /* EnumMember */: - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: + case 139 /* Parameter */: + case 250 /* EnumMember */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: return context.currentTokenSpan.kind === 56 /* EqualsToken */ || context.nextTokenSpan.kind === 56 /* EqualsToken */; // "in" keyword in for (let x in []) { } - case 202 /* ForInStatement */: + case 203 /* ForInStatement */: return context.currentTokenSpan.kind === 90 /* InKeyword */ || context.nextTokenSpan.kind === 90 /* InKeyword */; // Technically, "of" is not a binary operator, but format it the same way as "in" - case 203 /* ForOfStatement */: - return context.currentTokenSpan.kind === 134 /* OfKeyword */ || context.nextTokenSpan.kind === 134 /* OfKeyword */; + case 204 /* ForOfStatement */: + return context.currentTokenSpan.kind === 135 /* OfKeyword */ || context.nextTokenSpan.kind === 135 /* OfKeyword */; } return false; }; @@ -43111,7 +43658,7 @@ var ts; return !Rules.IsBinaryOpContext(context); }; Rules.IsConditionalOperatorContext = function (context) { - return context.contextNode.kind === 184 /* ConditionalExpression */; + return context.contextNode.kind === 185 /* ConditionalExpression */; }; Rules.IsSameLineTokenOrBeforeMultilineBlockContext = function (context) { //// This check is mainly used inside SpaceBeforeOpenBraceInControl and SpaceBeforeOpenBraceInFunction. @@ -43155,93 +43702,93 @@ var ts; return true; } switch (node.kind) { - case 194 /* Block */: - case 222 /* CaseBlock */: - case 167 /* ObjectLiteralExpression */: - case 221 /* ModuleBlock */: + case 195 /* Block */: + case 223 /* CaseBlock */: + case 168 /* ObjectLiteralExpression */: + case 222 /* ModuleBlock */: return true; } return false; }; Rules.IsFunctionDeclContext = function (context) { switch (context.contextNode.kind) { - case 215 /* FunctionDeclaration */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 216 /* FunctionDeclaration */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: //case SyntaxKind.MemberFunctionDeclaration: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: ///case SyntaxKind.MethodSignature: - case 147 /* CallSignature */: - case 175 /* FunctionExpression */: - case 144 /* Constructor */: - case 176 /* ArrowFunction */: + case 148 /* CallSignature */: + case 176 /* FunctionExpression */: + case 145 /* Constructor */: + case 177 /* ArrowFunction */: //case SyntaxKind.ConstructorDeclaration: //case SyntaxKind.SimpleArrowFunctionExpression: //case SyntaxKind.ParenthesizedArrowFunctionExpression: - case 217 /* InterfaceDeclaration */: + case 218 /* InterfaceDeclaration */: return true; } return false; }; Rules.IsFunctionDeclarationOrFunctionExpressionContext = function (context) { - return context.contextNode.kind === 215 /* FunctionDeclaration */ || context.contextNode.kind === 175 /* FunctionExpression */; + return context.contextNode.kind === 216 /* FunctionDeclaration */ || context.contextNode.kind === 176 /* FunctionExpression */; }; Rules.IsTypeScriptDeclWithBlockContext = function (context) { return Rules.NodeIsTypeScriptDeclWithBlockContext(context.contextNode); }; Rules.NodeIsTypeScriptDeclWithBlockContext = function (node) { switch (node.kind) { - case 216 /* ClassDeclaration */: - case 188 /* ClassExpression */: - case 217 /* InterfaceDeclaration */: - case 219 /* EnumDeclaration */: - case 155 /* TypeLiteral */: - case 220 /* ModuleDeclaration */: + case 217 /* ClassDeclaration */: + case 189 /* ClassExpression */: + case 218 /* InterfaceDeclaration */: + case 220 /* EnumDeclaration */: + case 156 /* TypeLiteral */: + case 221 /* ModuleDeclaration */: return true; } return false; }; Rules.IsAfterCodeBlockContext = function (context) { switch (context.currentTokenParent.kind) { - case 216 /* ClassDeclaration */: - case 220 /* ModuleDeclaration */: - case 219 /* EnumDeclaration */: - case 194 /* Block */: - case 246 /* CatchClause */: - case 221 /* ModuleBlock */: - case 208 /* SwitchStatement */: + case 217 /* ClassDeclaration */: + case 221 /* ModuleDeclaration */: + case 220 /* EnumDeclaration */: + case 195 /* Block */: + case 247 /* CatchClause */: + case 222 /* ModuleBlock */: + case 209 /* SwitchStatement */: return true; } return false; }; Rules.IsControlDeclContext = function (context) { switch (context.contextNode.kind) { - case 198 /* IfStatement */: - case 208 /* SwitchStatement */: - case 201 /* ForStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - case 200 /* WhileStatement */: - case 211 /* TryStatement */: - case 199 /* DoStatement */: - case 207 /* WithStatement */: + case 199 /* IfStatement */: + case 209 /* SwitchStatement */: + case 202 /* ForStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: + case 201 /* WhileStatement */: + case 212 /* TryStatement */: + case 200 /* DoStatement */: + case 208 /* WithStatement */: // TODO // case SyntaxKind.ElseClause: - case 246 /* CatchClause */: + case 247 /* CatchClause */: return true; default: return false; } }; Rules.IsObjectContext = function (context) { - return context.contextNode.kind === 167 /* ObjectLiteralExpression */; + return context.contextNode.kind === 168 /* ObjectLiteralExpression */; }; Rules.IsFunctionCallContext = function (context) { - return context.contextNode.kind === 170 /* CallExpression */; + return context.contextNode.kind === 171 /* CallExpression */; }; Rules.IsNewContext = function (context) { - return context.contextNode.kind === 171 /* NewExpression */; + return context.contextNode.kind === 172 /* NewExpression */; }; Rules.IsFunctionCallOrNewContext = function (context) { return Rules.IsFunctionCallContext(context) || Rules.IsNewContext(context); @@ -43253,7 +43800,7 @@ var ts; return context.nextTokenSpan.kind !== 20 /* CloseBracketToken */; }; Rules.IsArrowFunctionContext = function (context) { - return context.contextNode.kind === 176 /* ArrowFunction */; + return context.contextNode.kind === 177 /* ArrowFunction */; }; Rules.IsSameLineTokenContext = function (context) { return context.TokensAreOnSameLine(); @@ -43271,41 +43818,41 @@ var ts; while (ts.isExpression(node)) { node = node.parent; } - return node.kind === 139 /* Decorator */; + return node.kind === 140 /* Decorator */; }; Rules.IsStartOfVariableDeclarationList = function (context) { - return context.currentTokenParent.kind === 214 /* VariableDeclarationList */ && + return context.currentTokenParent.kind === 215 /* VariableDeclarationList */ && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; }; Rules.IsNotFormatOnEnter = function (context) { return context.formattingRequestKind !== 2 /* FormatOnEnter */; }; Rules.IsModuleDeclContext = function (context) { - return context.contextNode.kind === 220 /* ModuleDeclaration */; + return context.contextNode.kind === 221 /* ModuleDeclaration */; }; Rules.IsObjectTypeContext = function (context) { - return context.contextNode.kind === 155 /* TypeLiteral */; // && context.contextNode.parent.kind !== SyntaxKind.InterfaceDeclaration; + return context.contextNode.kind === 156 /* TypeLiteral */; // && context.contextNode.parent.kind !== SyntaxKind.InterfaceDeclaration; }; Rules.IsTypeArgumentOrParameterOrAssertion = function (token, parent) { if (token.kind !== 25 /* LessThanToken */ && token.kind !== 27 /* GreaterThanToken */) { return false; } switch (parent.kind) { - case 151 /* TypeReference */: - case 173 /* TypeAssertionExpression */: - case 216 /* ClassDeclaration */: - case 188 /* ClassExpression */: - case 217 /* InterfaceDeclaration */: - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 170 /* CallExpression */: - case 171 /* NewExpression */: - case 190 /* ExpressionWithTypeArguments */: + case 152 /* TypeReference */: + case 174 /* TypeAssertionExpression */: + case 217 /* ClassDeclaration */: + case 189 /* ClassExpression */: + case 218 /* InterfaceDeclaration */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 148 /* CallSignature */: + case 149 /* ConstructSignature */: + case 171 /* CallExpression */: + case 172 /* NewExpression */: + case 191 /* ExpressionWithTypeArguments */: return true; default: return false; @@ -43316,13 +43863,13 @@ var ts; Rules.IsTypeArgumentOrParameterOrAssertion(context.nextTokenSpan, context.nextTokenParent); }; Rules.IsTypeAssertionContext = function (context) { - return context.contextNode.kind === 173 /* TypeAssertionExpression */; + return context.contextNode.kind === 174 /* TypeAssertionExpression */; }; Rules.IsVoidOpContext = function (context) { - return context.currentTokenSpan.kind === 103 /* VoidKeyword */ && context.currentTokenParent.kind === 179 /* VoidExpression */; + return context.currentTokenSpan.kind === 103 /* VoidKeyword */ && context.currentTokenParent.kind === 180 /* VoidExpression */; }; Rules.IsYieldOrYieldStarWithOperand = function (context) { - return context.contextNode.kind === 186 /* YieldExpression */ && context.contextNode.expression !== undefined; + return context.contextNode.kind === 187 /* YieldExpression */ && context.contextNode.expression !== undefined; }; return Rules; }()); @@ -43346,7 +43893,7 @@ var ts; return result; }; RulesMap.prototype.Initialize = function (rules) { - this.mapRowLength = 134 /* LastToken */ + 1; + this.mapRowLength = 135 /* LastToken */ + 1; this.map = new Array(this.mapRowLength * this.mapRowLength); //new Array(this.mapRowLength * this.mapRowLength); // This array is used only during construction of the rulesbucket in the map var rulesBucketConstructionStateList = new Array(this.map.length); //new Array(this.map.length); @@ -43541,7 +44088,7 @@ var ts; } TokenAllAccess.prototype.GetTokens = function () { var result = []; - for (var token = 0 /* FirstToken */; token <= 134 /* LastToken */; token++) { + for (var token = 0 /* FirstToken */; token <= 135 /* LastToken */; token++) { result.push(token); } return result; @@ -43583,9 +44130,9 @@ var ts; }; TokenRange.Any = TokenRange.AllTokens(); TokenRange.AnyIncludingMultilineComments = TokenRange.FromTokens(TokenRange.Any.GetTokens().concat([3 /* MultiLineCommentTrivia */])); - TokenRange.Keywords = TokenRange.FromRange(70 /* FirstKeyword */, 134 /* LastKeyword */); + TokenRange.Keywords = TokenRange.FromRange(70 /* FirstKeyword */, 135 /* LastKeyword */); TokenRange.BinaryOperators = TokenRange.FromRange(25 /* FirstBinaryOperator */, 68 /* LastBinaryOperator */); - TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([90 /* InKeyword */, 91 /* InstanceOfKeyword */, 134 /* OfKeyword */, 116 /* AsKeyword */, 124 /* IsKeyword */]); + TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([90 /* InKeyword */, 91 /* InstanceOfKeyword */, 135 /* OfKeyword */, 116 /* AsKeyword */, 124 /* IsKeyword */]); TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([41 /* PlusPlusToken */, 42 /* MinusMinusToken */, 50 /* TildeToken */, 49 /* ExclamationToken */]); TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([8 /* NumericLiteral */, 69 /* Identifier */, 17 /* OpenParenToken */, 19 /* OpenBracketToken */, 15 /* OpenBraceToken */, 97 /* ThisKeyword */, 92 /* NewKeyword */]); TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([69 /* Identifier */, 17 /* OpenParenToken */, 97 /* ThisKeyword */, 92 /* NewKeyword */]); @@ -43815,17 +44362,17 @@ var ts; // i.e. parent is class declaration with the list of members and node is one of members. function isListElement(parent, node) { switch (parent.kind) { - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: return ts.rangeContainsRange(parent.members, node); - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: var body = parent.body; - return body && body.kind === 194 /* Block */ && ts.rangeContainsRange(body.statements, node); - case 250 /* SourceFile */: - case 194 /* Block */: - case 221 /* ModuleBlock */: + return body && body.kind === 195 /* Block */ && ts.rangeContainsRange(body.statements, node); + case 251 /* SourceFile */: + case 195 /* Block */: + case 222 /* ModuleBlock */: return ts.rangeContainsRange(parent.statements, node); - case 246 /* CatchClause */: + case 247 /* CatchClause */: return ts.rangeContainsRange(parent.block.statements, node); } return false; @@ -44027,19 +44574,19 @@ var ts; return node.modifiers[0].kind; } switch (node.kind) { - case 216 /* ClassDeclaration */: return 73 /* ClassKeyword */; - case 217 /* InterfaceDeclaration */: return 107 /* InterfaceKeyword */; - case 215 /* FunctionDeclaration */: return 87 /* FunctionKeyword */; - case 219 /* EnumDeclaration */: return 219 /* EnumDeclaration */; - case 145 /* GetAccessor */: return 123 /* GetKeyword */; - case 146 /* SetAccessor */: return 129 /* SetKeyword */; - case 143 /* MethodDeclaration */: + case 217 /* ClassDeclaration */: return 73 /* ClassKeyword */; + case 218 /* InterfaceDeclaration */: return 107 /* InterfaceKeyword */; + case 216 /* FunctionDeclaration */: return 87 /* FunctionKeyword */; + case 220 /* EnumDeclaration */: return 220 /* EnumDeclaration */; + case 146 /* GetAccessor */: return 123 /* GetKeyword */; + case 147 /* SetAccessor */: return 129 /* SetKeyword */; + case 144 /* MethodDeclaration */: if (node.asteriskToken) { return 37 /* AsteriskToken */; } // fall-through - case 141 /* PropertyDeclaration */: - case 138 /* Parameter */: + case 142 /* PropertyDeclaration */: + case 139 /* Parameter */: return node.name.kind; } } @@ -44179,7 +44726,7 @@ var ts; consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, child); return inheritedIndentation; } - var effectiveParentStartLine = child.kind === 139 /* Decorator */ ? childStartLine : undecoratedParentStartLine; + var effectiveParentStartLine = child.kind === 140 /* Decorator */ ? childStartLine : undecoratedParentStartLine; var childIndentation = computeIndentation(child, childStartLine, childIndentationAmount, node, parentDynamicIndentation, effectiveParentStartLine); processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta); childContextNode = node; @@ -44523,20 +45070,20 @@ var ts; } function isSomeBlock(kind) { switch (kind) { - case 194 /* Block */: - case 221 /* ModuleBlock */: + case 195 /* Block */: + case 222 /* ModuleBlock */: return true; } return false; } function getOpenTokenForList(node, list) { switch (node.kind) { - case 144 /* Constructor */: - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 176 /* ArrowFunction */: + case 145 /* Constructor */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 177 /* ArrowFunction */: if (node.typeParameters === list) { return 25 /* LessThanToken */; } @@ -44544,8 +45091,8 @@ var ts; return 17 /* OpenParenToken */; } break; - case 170 /* CallExpression */: - case 171 /* NewExpression */: + case 171 /* CallExpression */: + case 172 /* NewExpression */: if (node.typeArguments === list) { return 25 /* LessThanToken */; } @@ -44553,7 +45100,7 @@ var ts; return 17 /* OpenParenToken */; } break; - case 151 /* TypeReference */: + case 152 /* TypeReference */: if (node.typeArguments === list) { return 25 /* LessThanToken */; } @@ -44669,7 +45216,7 @@ var ts; var lineStart = ts.getLineStartPositionForPosition(current_1, sourceFile); return SmartIndenter.findFirstNonWhitespaceColumn(lineStart, current_1, sourceFile, options); } - if (precedingToken.kind === 24 /* CommaToken */ && precedingToken.parent.kind !== 183 /* BinaryExpression */) { + if (precedingToken.kind === 24 /* CommaToken */ && precedingToken.parent.kind !== 184 /* BinaryExpression */) { // previous token is comma that separates items in list - find the previous item and try to derive indentation from it var actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options); if (actualIndentation !== -1 /* Unknown */) { @@ -44788,7 +45335,7 @@ var ts; // - parent is SourceFile - by default immediate children of SourceFile are not indented except when user indents them manually // - parent and child are not on the same line var useActualIndentation = (ts.isDeclaration(current) || ts.isStatement(current)) && - (parent.kind === 250 /* SourceFile */ || !parentAndChildShareLine); + (parent.kind === 251 /* SourceFile */ || !parentAndChildShareLine); if (!useActualIndentation) { return -1 /* Unknown */; } @@ -44821,7 +45368,7 @@ var ts; return sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)); } function childStartsOnTheSameLineWithElseInIfStatement(parent, child, childStartLine, sourceFile) { - if (parent.kind === 198 /* IfStatement */ && parent.elseStatement === child) { + if (parent.kind === 199 /* IfStatement */ && parent.elseStatement === child) { var elseKeyword = ts.findChildOfKind(parent, 80 /* ElseKeyword */, sourceFile); ts.Debug.assert(elseKeyword !== undefined); var elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; @@ -44833,23 +45380,23 @@ var ts; function getContainingList(node, sourceFile) { if (node.parent) { switch (node.parent.kind) { - case 151 /* TypeReference */: + case 152 /* TypeReference */: if (node.parent.typeArguments && ts.rangeContainsStartEnd(node.parent.typeArguments, node.getStart(sourceFile), node.getEnd())) { return node.parent.typeArguments; } break; - case 167 /* ObjectLiteralExpression */: + case 168 /* ObjectLiteralExpression */: return node.parent.properties; - case 166 /* ArrayLiteralExpression */: + case 167 /* ArrayLiteralExpression */: return node.parent.elements; - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: { + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 148 /* CallSignature */: + case 149 /* ConstructSignature */: { var start = node.getStart(sourceFile); if (node.parent.typeParameters && ts.rangeContainsStartEnd(node.parent.typeParameters, start, node.getEnd())) { @@ -44860,8 +45407,8 @@ var ts; } break; } - case 171 /* NewExpression */: - case 170 /* CallExpression */: { + case 172 /* NewExpression */: + case 171 /* CallExpression */: { var start = node.getStart(sourceFile); if (node.parent.typeArguments && ts.rangeContainsStartEnd(node.parent.typeArguments, start, node.getEnd())) { @@ -44891,8 +45438,8 @@ var ts; if (node.kind === 18 /* CloseParenToken */) { return -1 /* Unknown */; } - if (node.parent && (node.parent.kind === 170 /* CallExpression */ || - node.parent.kind === 171 /* NewExpression */) && + if (node.parent && (node.parent.kind === 171 /* CallExpression */ || + node.parent.kind === 172 /* NewExpression */) && node.parent.expression !== node) { var fullCallOrNewExpression = node.parent.expression; var startingExpression = getStartingExpression(fullCallOrNewExpression); @@ -44910,10 +45457,10 @@ var ts; function getStartingExpression(node) { while (true) { switch (node.kind) { - case 170 /* CallExpression */: - case 171 /* NewExpression */: - case 168 /* PropertyAccessExpression */: - case 169 /* ElementAccessExpression */: + case 171 /* CallExpression */: + case 172 /* NewExpression */: + case 169 /* PropertyAccessExpression */: + case 170 /* ElementAccessExpression */: node = node.expression; break; default: @@ -44977,45 +45524,45 @@ var ts; SmartIndenter.findFirstNonWhitespaceColumn = findFirstNonWhitespaceColumn; function nodeContentIsAlwaysIndented(kind) { switch (kind) { - case 197 /* ExpressionStatement */: - case 216 /* ClassDeclaration */: - case 188 /* ClassExpression */: - case 217 /* InterfaceDeclaration */: - case 219 /* EnumDeclaration */: - case 218 /* TypeAliasDeclaration */: - case 166 /* ArrayLiteralExpression */: - case 194 /* Block */: - case 221 /* ModuleBlock */: - case 167 /* ObjectLiteralExpression */: - case 155 /* TypeLiteral */: - case 157 /* TupleType */: - case 222 /* CaseBlock */: - case 244 /* DefaultClause */: - case 243 /* CaseClause */: - case 174 /* ParenthesizedExpression */: - case 168 /* PropertyAccessExpression */: - case 170 /* CallExpression */: - case 171 /* NewExpression */: - case 195 /* VariableStatement */: - case 213 /* VariableDeclaration */: - case 229 /* ExportAssignment */: - case 206 /* ReturnStatement */: - case 184 /* ConditionalExpression */: - case 164 /* ArrayBindingPattern */: - case 163 /* ObjectBindingPattern */: - case 237 /* JsxOpeningElement */: - case 236 /* JsxSelfClosingElement */: - case 242 /* JsxExpression */: - case 142 /* MethodSignature */: - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 138 /* Parameter */: - case 152 /* FunctionType */: - case 153 /* ConstructorType */: - case 160 /* ParenthesizedType */: - case 172 /* TaggedTemplateExpression */: - case 180 /* AwaitExpression */: - case 227 /* NamedImports */: + case 198 /* ExpressionStatement */: + case 217 /* ClassDeclaration */: + case 189 /* ClassExpression */: + case 218 /* InterfaceDeclaration */: + case 220 /* EnumDeclaration */: + case 219 /* TypeAliasDeclaration */: + case 167 /* ArrayLiteralExpression */: + case 195 /* Block */: + case 222 /* ModuleBlock */: + case 168 /* ObjectLiteralExpression */: + case 156 /* TypeLiteral */: + case 158 /* TupleType */: + case 223 /* CaseBlock */: + case 245 /* DefaultClause */: + case 244 /* CaseClause */: + case 175 /* ParenthesizedExpression */: + case 169 /* PropertyAccessExpression */: + case 171 /* CallExpression */: + case 172 /* NewExpression */: + case 196 /* VariableStatement */: + case 214 /* VariableDeclaration */: + case 230 /* ExportAssignment */: + case 207 /* ReturnStatement */: + case 185 /* ConditionalExpression */: + case 165 /* ArrayBindingPattern */: + case 164 /* ObjectBindingPattern */: + case 238 /* JsxOpeningElement */: + case 237 /* JsxSelfClosingElement */: + case 243 /* JsxExpression */: + case 143 /* MethodSignature */: + case 148 /* CallSignature */: + case 149 /* ConstructSignature */: + case 139 /* Parameter */: + case 153 /* FunctionType */: + case 154 /* ConstructorType */: + case 161 /* ParenthesizedType */: + case 173 /* TaggedTemplateExpression */: + case 181 /* AwaitExpression */: + case 228 /* NamedImports */: return true; } return false; @@ -45024,22 +45571,22 @@ var ts; function nodeWillIndentChild(parent, child, indentByDefault) { var childKind = child ? child.kind : 0 /* Unknown */; switch (parent.kind) { - case 199 /* DoStatement */: - case 200 /* WhileStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - case 201 /* ForStatement */: - case 198 /* IfStatement */: - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 143 /* MethodDeclaration */: - case 176 /* ArrowFunction */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - return childKind !== 194 /* Block */; - case 235 /* JsxElement */: - return childKind !== 239 /* JsxClosingElement */; + case 200 /* DoStatement */: + case 201 /* WhileStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: + case 202 /* ForStatement */: + case 199 /* IfStatement */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 144 /* MethodDeclaration */: + case 177 /* ArrowFunction */: + case 145 /* Constructor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + return childKind !== 195 /* Block */; + case 236 /* JsxElement */: + return childKind !== 240 /* JsxClosingElement */; } // No explicit rule for given nodes so the result will follow the default value argument return indentByDefault; @@ -45191,7 +45738,7 @@ var ts; return pos; }; NodeObject.prototype.createSyntaxList = function (nodes) { - var list = createNode(273 /* SyntaxList */, nodes.pos, nodes.end, 2048 /* Synthetic */, this); + var list = createNode(274 /* SyntaxList */, nodes.pos, nodes.end, 2048 /* Synthetic */, this); list._children = []; var pos = nodes.pos; for (var _i = 0, nodes_7 = nodes; _i < nodes_7.length; _i++) { @@ -45210,7 +45757,7 @@ var ts; NodeObject.prototype.createChildren = function (sourceFile) { var _this = this; var children; - if (this.kind >= 135 /* FirstNode */) { + if (this.kind >= 136 /* FirstNode */) { scanner.setText((sourceFile || this.getSourceFile()).text); children = []; var pos = this.pos; @@ -45257,7 +45804,7 @@ var ts; return undefined; } var child = children[0]; - return child.kind < 135 /* FirstNode */ ? child : child.getFirstToken(sourceFile); + return child.kind < 136 /* FirstNode */ ? child : child.getFirstToken(sourceFile); }; NodeObject.prototype.getLastToken = function (sourceFile) { var children = this.getChildren(sourceFile); @@ -45265,7 +45812,7 @@ var ts; if (!child) { return undefined; } - return child.kind < 135 /* FirstNode */ ? child : child.getLastToken(sourceFile); + return child.kind < 136 /* FirstNode */ ? child : child.getLastToken(sourceFile); }; return NodeObject; }()); @@ -45314,7 +45861,7 @@ var ts; if (ts.indexOf(declarations, declaration) === indexOfDeclaration) { var sourceFileOfDeclaration = ts.getSourceFileOfNode(declaration); // If it is parameter - try and get the jsDoc comment with @param tag from function declaration's jsDoc comments - if (canUseParsedParamTagComments && declaration.kind === 138 /* Parameter */) { + if (canUseParsedParamTagComments && declaration.kind === 139 /* Parameter */) { ts.forEach(getJsDocCommentTextRange(declaration.parent, sourceFileOfDeclaration), function (jsDocCommentTextRange) { var cleanedParamJsDocComment = getCleanedParamJsDocComment(jsDocCommentTextRange.pos, jsDocCommentTextRange.end, sourceFileOfDeclaration); if (cleanedParamJsDocComment) { @@ -45323,15 +45870,15 @@ var ts; }); } // If this is left side of dotted module declaration, there is no doc comments associated with this node - if (declaration.kind === 220 /* ModuleDeclaration */ && declaration.body.kind === 220 /* ModuleDeclaration */) { + if (declaration.kind === 221 /* ModuleDeclaration */ && declaration.body.kind === 221 /* ModuleDeclaration */) { return; } // If this is dotted module name, get the doc comments from the parent - while (declaration.kind === 220 /* ModuleDeclaration */ && declaration.parent.kind === 220 /* ModuleDeclaration */) { + while (declaration.kind === 221 /* ModuleDeclaration */ && declaration.parent.kind === 221 /* ModuleDeclaration */) { declaration = declaration.parent; } // Get the cleaned js doc comment text from the declaration - ts.forEach(getJsDocCommentTextRange(declaration.kind === 213 /* VariableDeclaration */ ? declaration.parent.parent : declaration, sourceFileOfDeclaration), function (jsDocCommentTextRange) { + ts.forEach(getJsDocCommentTextRange(declaration.kind === 214 /* VariableDeclaration */ ? declaration.parent.parent : declaration, sourceFileOfDeclaration), function (jsDocCommentTextRange) { var cleanedJsDocComment = getCleanedJsDocComment(jsDocCommentTextRange.pos, jsDocCommentTextRange.end, sourceFileOfDeclaration); if (cleanedJsDocComment) { ts.addRange(jsDocCommentParts, cleanedJsDocComment); @@ -45676,9 +46223,9 @@ var ts; if (result_2 !== undefined) { return result_2; } - if (declaration.name.kind === 136 /* ComputedPropertyName */) { + if (declaration.name.kind === 137 /* ComputedPropertyName */) { var expr = declaration.name.expression; - if (expr.kind === 168 /* PropertyAccessExpression */) { + if (expr.kind === 169 /* PropertyAccessExpression */) { return expr.name.text; } return getTextOfIdentifierOrLiteral(expr); @@ -45698,9 +46245,9 @@ var ts; } function visit(node) { switch (node.kind) { - case 215 /* FunctionDeclaration */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 216 /* FunctionDeclaration */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: var functionDeclaration = node; var declarationName = getDeclarationName(functionDeclaration); if (declarationName) { @@ -45720,60 +46267,60 @@ var ts; ts.forEachChild(node, visit); } break; - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: - case 218 /* TypeAliasDeclaration */: - case 219 /* EnumDeclaration */: - case 220 /* ModuleDeclaration */: - case 223 /* ImportEqualsDeclaration */: - case 232 /* ExportSpecifier */: - case 228 /* ImportSpecifier */: - case 223 /* ImportEqualsDeclaration */: - case 225 /* ImportClause */: - case 226 /* NamespaceImport */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 155 /* TypeLiteral */: + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: + case 219 /* TypeAliasDeclaration */: + case 220 /* EnumDeclaration */: + case 221 /* ModuleDeclaration */: + case 224 /* ImportEqualsDeclaration */: + case 233 /* ExportSpecifier */: + case 229 /* ImportSpecifier */: + case 224 /* ImportEqualsDeclaration */: + case 226 /* ImportClause */: + case 227 /* NamespaceImport */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 156 /* TypeLiteral */: addDeclaration(node); // fall through - case 144 /* Constructor */: - case 195 /* VariableStatement */: - case 214 /* VariableDeclarationList */: - case 163 /* ObjectBindingPattern */: - case 164 /* ArrayBindingPattern */: - case 221 /* ModuleBlock */: + case 145 /* Constructor */: + case 196 /* VariableStatement */: + case 215 /* VariableDeclarationList */: + case 164 /* ObjectBindingPattern */: + case 165 /* ArrayBindingPattern */: + case 222 /* ModuleBlock */: ts.forEachChild(node, visit); break; - case 194 /* Block */: + case 195 /* Block */: if (ts.isFunctionBlock(node)) { ts.forEachChild(node, visit); } break; - case 138 /* Parameter */: + case 139 /* Parameter */: // Only consider properties defined as constructor parameters if (!(node.flags & 56 /* AccessibilityModifier */)) { break; } // fall through - case 213 /* VariableDeclaration */: - case 165 /* BindingElement */: + case 214 /* VariableDeclaration */: + case 166 /* BindingElement */: if (ts.isBindingPattern(node.name)) { ts.forEachChild(node.name, visit); break; } - case 249 /* EnumMember */: - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: + case 250 /* EnumMember */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: addDeclaration(node); break; - case 230 /* ExportDeclaration */: + case 231 /* ExportDeclaration */: // Handle named exports case e.g.: // export {a, b as B} from "mod"; if (node.exportClause) { ts.forEach(node.exportClause.elements, visit); } break; - case 224 /* ImportDeclaration */: + case 225 /* ImportDeclaration */: var importClause = node.importClause; if (importClause) { // Handle default import case e.g.: @@ -45785,7 +46332,7 @@ var ts; // import * as NS from "mod"; // import {a, b as B} from "mod"; if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 226 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 227 /* NamespaceImport */) { addDeclaration(importClause.namedBindings); } else { @@ -45961,6 +46508,9 @@ var ts; ClassificationTypeNames.jsxOpenTagName = "jsx open tag name"; ClassificationTypeNames.jsxCloseTagName = "jsx close tag name"; ClassificationTypeNames.jsxSelfClosingTagName = "jsx self closing tag name"; + ClassificationTypeNames.jsxAttribute = "jsx attribute"; + ClassificationTypeNames.jsxText = "jsx text"; + ClassificationTypeNames.jsxAttributeStringLiteralValue = "jsx attribute string literal value"; return ClassificationTypeNames; }()); ts.ClassificationTypeNames = ClassificationTypeNames; @@ -45986,6 +46536,9 @@ var ts; ClassificationType[ClassificationType["jsxOpenTagName"] = 19] = "jsxOpenTagName"; ClassificationType[ClassificationType["jsxCloseTagName"] = 20] = "jsxCloseTagName"; ClassificationType[ClassificationType["jsxSelfClosingTagName"] = 21] = "jsxSelfClosingTagName"; + ClassificationType[ClassificationType["jsxAttribute"] = 22] = "jsxAttribute"; + ClassificationType[ClassificationType["jsxText"] = 23] = "jsxText"; + ClassificationType[ClassificationType["jsxAttributeStringLiteralValue"] = 24] = "jsxAttributeStringLiteralValue"; })(ts.ClassificationType || (ts.ClassificationType = {})); var ClassificationType = ts.ClassificationType; function displayPartsToString(displayParts) { @@ -46001,16 +46554,16 @@ var ts; } return ts.forEach(symbol.declarations, function (declaration) { // Function expressions are local - if (declaration.kind === 175 /* FunctionExpression */) { + if (declaration.kind === 176 /* FunctionExpression */) { return true; } - if (declaration.kind !== 213 /* VariableDeclaration */ && declaration.kind !== 215 /* FunctionDeclaration */) { + if (declaration.kind !== 214 /* VariableDeclaration */ && declaration.kind !== 216 /* FunctionDeclaration */) { return false; } // If the parent is not sourceFile or module block it is local variable - for (var parent_8 = declaration.parent; !ts.isFunctionBlock(parent_8); parent_8 = parent_8.parent) { + for (var parent_9 = declaration.parent; !ts.isFunctionBlock(parent_9); parent_9 = parent_9.parent) { // Reached source file or module block - if (parent_8.kind === 250 /* SourceFile */ || parent_8.kind === 221 /* ModuleBlock */) { + if (parent_9.kind === 251 /* SourceFile */ || parent_9.kind === 222 /* ModuleBlock */) { return false; } } @@ -46266,18 +46819,12 @@ var ts; return createLanguageServiceSourceFile(sourceFile.fileName, scriptSnapshot, sourceFile.languageVersion, version, /*setNodeParents*/ true); } ts.updateLanguageServiceSourceFile = updateLanguageServiceSourceFile; - function createGetCanonicalFileName(useCaseSensitivefileNames) { - return useCaseSensitivefileNames - ? (function (fileName) { return fileName; }) - : (function (fileName) { return fileName.toLowerCase(); }); - } - ts.createGetCanonicalFileName = createGetCanonicalFileName; function createDocumentRegistry(useCaseSensitiveFileNames, currentDirectory) { if (currentDirectory === void 0) { currentDirectory = ""; } // Maps from compiler setting target (ES3, ES5, etc.) to all the cached documents we have // for those settings. var buckets = {}; - var getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames); + var getCanonicalFileName = ts.createGetCanonicalFileName(!!useCaseSensitiveFileNames); function getKeyFromCompilationSettings(settings) { return "_" + settings.target + "|" + settings.module + "|" + settings.noResolve + "|" + settings.jsx + +"|" + settings.allowJs; } @@ -46642,7 +47189,7 @@ var ts; /// Helpers function getTargetLabel(referenceNode, labelName) { while (referenceNode) { - if (referenceNode.kind === 209 /* LabeledStatement */ && referenceNode.label.text === labelName) { + if (referenceNode.kind === 210 /* LabeledStatement */ && referenceNode.label.text === labelName) { return referenceNode.label; } referenceNode = referenceNode.parent; @@ -46651,12 +47198,12 @@ var ts; } function isJumpStatementTarget(node) { return node.kind === 69 /* Identifier */ && - (node.parent.kind === 205 /* BreakStatement */ || node.parent.kind === 204 /* ContinueStatement */) && + (node.parent.kind === 206 /* BreakStatement */ || node.parent.kind === 205 /* ContinueStatement */) && node.parent.label === node; } function isLabelOfLabeledStatement(node) { return node.kind === 69 /* Identifier */ && - node.parent.kind === 209 /* LabeledStatement */ && + node.parent.kind === 210 /* LabeledStatement */ && node.parent.label === node; } /** @@ -46664,7 +47211,7 @@ var ts; * Note: 'node' cannot be a SourceFile. */ function isLabeledBy(node, labelName) { - for (var owner = node.parent; owner.kind === 209 /* LabeledStatement */; owner = owner.parent) { + for (var owner = node.parent; owner.kind === 210 /* LabeledStatement */; owner = owner.parent) { if (owner.label.text === labelName) { return true; } @@ -46675,25 +47222,25 @@ var ts; return isLabelOfLabeledStatement(node) || isJumpStatementTarget(node); } function isRightSideOfQualifiedName(node) { - return node.parent.kind === 135 /* QualifiedName */ && node.parent.right === node; + return node.parent.kind === 136 /* QualifiedName */ && node.parent.right === node; } function isRightSideOfPropertyAccess(node) { - return node && node.parent && node.parent.kind === 168 /* PropertyAccessExpression */ && node.parent.name === node; + return node && node.parent && node.parent.kind === 169 /* PropertyAccessExpression */ && node.parent.name === node; } function isCallExpressionTarget(node) { if (isRightSideOfPropertyAccess(node)) { node = node.parent; } - return node && node.parent && node.parent.kind === 170 /* CallExpression */ && node.parent.expression === node; + return node && node.parent && node.parent.kind === 171 /* CallExpression */ && node.parent.expression === node; } function isNewExpressionTarget(node) { if (isRightSideOfPropertyAccess(node)) { node = node.parent; } - return node && node.parent && node.parent.kind === 171 /* NewExpression */ && node.parent.expression === node; + return node && node.parent && node.parent.kind === 172 /* NewExpression */ && node.parent.expression === node; } function isNameOfModuleDeclaration(node) { - return node.parent.kind === 220 /* ModuleDeclaration */ && node.parent.name === node; + return node.parent.kind === 221 /* ModuleDeclaration */ && node.parent.name === node; } function isNameOfFunctionDeclaration(node) { return node.kind === 69 /* Identifier */ && @@ -46702,22 +47249,22 @@ var ts; /** Returns true if node is a name of an object literal property, e.g. "a" in x = { "a": 1 } */ function isNameOfPropertyAssignment(node) { return (node.kind === 69 /* Identifier */ || node.kind === 9 /* StringLiteral */ || node.kind === 8 /* NumericLiteral */) && - (node.parent.kind === 247 /* PropertyAssignment */ || node.parent.kind === 248 /* ShorthandPropertyAssignment */) && node.parent.name === node; + (node.parent.kind === 248 /* PropertyAssignment */ || node.parent.kind === 249 /* ShorthandPropertyAssignment */) && node.parent.name === node; } function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { if (node.kind === 9 /* StringLiteral */ || node.kind === 8 /* NumericLiteral */) { switch (node.parent.kind) { - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 247 /* PropertyAssignment */: - case 249 /* EnumMember */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 220 /* ModuleDeclaration */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 248 /* PropertyAssignment */: + case 250 /* EnumMember */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 221 /* ModuleDeclaration */: return node.parent.name === node; - case 169 /* ElementAccessExpression */: + case 170 /* ElementAccessExpression */: return node.parent.argumentExpression === node; } } @@ -46776,7 +47323,7 @@ var ts; })(BreakContinueSearchType || (BreakContinueSearchType = {})); // A cache of completion entries for keywords, these do not change between sessions var keywordCompletions = []; - for (var i = 70 /* FirstKeyword */; i <= 134 /* LastKeyword */; i++) { + for (var i = 70 /* FirstKeyword */; i <= 135 /* LastKeyword */; i++) { keywordCompletions.push({ name: ts.tokenToString(i), kind: ScriptElementKind.keyword, @@ -46791,17 +47338,17 @@ var ts; return undefined; } switch (node.kind) { - case 250 /* SourceFile */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: - case 219 /* EnumDeclaration */: - case 220 /* ModuleDeclaration */: + case 251 /* SourceFile */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: + case 220 /* EnumDeclaration */: + case 221 /* ModuleDeclaration */: return node; } } @@ -46809,38 +47356,38 @@ var ts; ts.getContainerNode = getContainerNode; /* @internal */ function getNodeKind(node) { switch (node.kind) { - case 220 /* ModuleDeclaration */: return ScriptElementKind.moduleElement; - case 216 /* ClassDeclaration */: return ScriptElementKind.classElement; - case 217 /* InterfaceDeclaration */: return ScriptElementKind.interfaceElement; - case 218 /* TypeAliasDeclaration */: return ScriptElementKind.typeElement; - case 219 /* EnumDeclaration */: return ScriptElementKind.enumElement; - case 213 /* VariableDeclaration */: + case 221 /* ModuleDeclaration */: return ScriptElementKind.moduleElement; + case 217 /* ClassDeclaration */: return ScriptElementKind.classElement; + case 218 /* InterfaceDeclaration */: return ScriptElementKind.interfaceElement; + case 219 /* TypeAliasDeclaration */: return ScriptElementKind.typeElement; + case 220 /* EnumDeclaration */: return ScriptElementKind.enumElement; + case 214 /* VariableDeclaration */: return ts.isConst(node) ? ScriptElementKind.constElement : ts.isLet(node) ? ScriptElementKind.letElement : ScriptElementKind.variableElement; - case 215 /* FunctionDeclaration */: return ScriptElementKind.functionElement; - case 145 /* GetAccessor */: return ScriptElementKind.memberGetAccessorElement; - case 146 /* SetAccessor */: return ScriptElementKind.memberSetAccessorElement; - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 216 /* FunctionDeclaration */: return ScriptElementKind.functionElement; + case 146 /* GetAccessor */: return ScriptElementKind.memberGetAccessorElement; + case 147 /* SetAccessor */: return ScriptElementKind.memberSetAccessorElement; + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: return ScriptElementKind.memberFunctionElement; - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: return ScriptElementKind.memberVariableElement; - case 149 /* IndexSignature */: return ScriptElementKind.indexSignatureElement; - case 148 /* ConstructSignature */: return ScriptElementKind.constructSignatureElement; - case 147 /* CallSignature */: return ScriptElementKind.callSignatureElement; - case 144 /* Constructor */: return ScriptElementKind.constructorImplementationElement; - case 137 /* TypeParameter */: return ScriptElementKind.typeParameterElement; - case 249 /* EnumMember */: return ScriptElementKind.variableElement; - case 138 /* Parameter */: return (node.flags & 56 /* AccessibilityModifier */) ? ScriptElementKind.memberVariableElement : ScriptElementKind.parameterElement; - case 223 /* ImportEqualsDeclaration */: - case 228 /* ImportSpecifier */: - case 225 /* ImportClause */: - case 232 /* ExportSpecifier */: - case 226 /* NamespaceImport */: + case 150 /* IndexSignature */: return ScriptElementKind.indexSignatureElement; + case 149 /* ConstructSignature */: return ScriptElementKind.constructSignatureElement; + case 148 /* CallSignature */: return ScriptElementKind.callSignatureElement; + case 145 /* Constructor */: return ScriptElementKind.constructorImplementationElement; + case 138 /* TypeParameter */: return ScriptElementKind.typeParameterElement; + case 250 /* EnumMember */: return ScriptElementKind.variableElement; + case 139 /* Parameter */: return (node.flags & 56 /* AccessibilityModifier */) ? ScriptElementKind.memberVariableElement : ScriptElementKind.parameterElement; + case 224 /* ImportEqualsDeclaration */: + case 229 /* ImportSpecifier */: + case 226 /* ImportClause */: + case 233 /* ExportSpecifier */: + case 227 /* NamespaceImport */: return ScriptElementKind.alias; } return ScriptElementKind.unknown; @@ -46878,7 +47425,7 @@ var ts; host.log(message); } } - var getCanonicalFileName = createGetCanonicalFileName(useCaseSensitivefileNames); + var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitivefileNames); function getValidSourceFile(fileName) { var sourceFile = program.getSourceFile(fileName); if (!sourceFile) { @@ -47152,9 +47699,9 @@ var ts; isJsDocTagName = true; } switch (tag.kind) { - case 271 /* JSDocTypeTag */: - case 269 /* JSDocParameterTag */: - case 270 /* JSDocReturnTag */: + case 272 /* JSDocTypeTag */: + case 270 /* JSDocParameterTag */: + case 271 /* JSDocReturnTag */: var tagWithExpression = tag; if (tagWithExpression.typeExpression) { insideJsDocTagExpression = tagWithExpression.typeExpression.pos < position && position < tagWithExpression.typeExpression.end; @@ -47199,13 +47746,13 @@ var ts; log("Returning an empty list because completion was requested in an invalid position."); return undefined; } - var parent_9 = contextToken.parent, kind = contextToken.kind; + var parent_10 = contextToken.parent, kind = contextToken.kind; if (kind === 21 /* DotToken */) { - if (parent_9.kind === 168 /* PropertyAccessExpression */) { + if (parent_10.kind === 169 /* PropertyAccessExpression */) { node = contextToken.parent.expression; isRightOfDot = true; } - else if (parent_9.kind === 135 /* QualifiedName */) { + else if (parent_10.kind === 136 /* QualifiedName */) { node = contextToken.parent.left; isRightOfDot = true; } @@ -47220,8 +47767,9 @@ var ts; isRightOfOpenTag = true; location = contextToken; } - else if (kind === 39 /* SlashToken */ && contextToken.parent.kind === 239 /* JsxClosingElement */) { + else if (kind === 39 /* SlashToken */ && contextToken.parent.kind === 240 /* JsxClosingElement */) { isStartingCloseTag = true; + location = contextToken; } } } @@ -47245,7 +47793,10 @@ var ts; } else if (isStartingCloseTag) { var tagName = contextToken.parent.parent.openingElement.tagName; - symbols = [typeChecker.getSymbolAtLocation(tagName)]; + var tagSymbol = typeChecker.getSymbolAtLocation(tagName); + if (!typeChecker.isUnknownSymbol(tagSymbol)) { + symbols = [tagSymbol]; + } isMemberCompletion = true; isNewIdentifierLocation = false; } @@ -47263,7 +47814,7 @@ var ts; // Right of dot member completion list isMemberCompletion = true; isNewIdentifierLocation = false; - if (node.kind === 69 /* Identifier */ || node.kind === 135 /* QualifiedName */ || node.kind === 168 /* PropertyAccessExpression */) { + if (node.kind === 69 /* Identifier */ || node.kind === 136 /* QualifiedName */ || node.kind === 169 /* PropertyAccessExpression */) { var symbol = typeChecker.getSymbolAtLocation(node); // This is an alias, follow what it aliases if (symbol && symbol.flags & 8388608 /* Alias */) { @@ -47319,7 +47870,7 @@ var ts; } if (jsxContainer = tryGetContainingJsxElement(contextToken)) { var attrsType; - if ((jsxContainer.kind === 236 /* JsxSelfClosingElement */) || (jsxContainer.kind === 237 /* JsxOpeningElement */)) { + if ((jsxContainer.kind === 237 /* JsxSelfClosingElement */) || (jsxContainer.kind === 238 /* JsxOpeningElement */)) { // Cursor is inside a JSX self-closing element or opening element attrsType = typeChecker.getJsxElementAttributesType(jsxContainer); if (attrsType) { @@ -47391,15 +47942,15 @@ var ts; return result; } function isInJsxText(contextToken) { - if (contextToken.kind === 238 /* JsxText */) { + if (contextToken.kind === 239 /* JsxText */) { return true; } if (contextToken.kind === 27 /* GreaterThanToken */ && contextToken.parent) { - if (contextToken.parent.kind === 237 /* JsxOpeningElement */) { + if (contextToken.parent.kind === 238 /* JsxOpeningElement */) { return true; } - if (contextToken.parent.kind === 239 /* JsxClosingElement */ || contextToken.parent.kind === 236 /* JsxSelfClosingElement */) { - return contextToken.parent.parent && contextToken.parent.parent.kind === 235 /* JsxElement */; + if (contextToken.parent.kind === 240 /* JsxClosingElement */ || contextToken.parent.kind === 237 /* JsxSelfClosingElement */) { + return contextToken.parent.parent && contextToken.parent.parent.kind === 236 /* JsxElement */; } } return false; @@ -47409,40 +47960,40 @@ var ts; var containingNodeKind = previousToken.parent.kind; switch (previousToken.kind) { case 24 /* CommaToken */: - return containingNodeKind === 170 /* CallExpression */ // func( a, | - || containingNodeKind === 144 /* Constructor */ // constructor( a, | /* public, protected, private keywords are allowed here, so show completion */ - || containingNodeKind === 171 /* NewExpression */ // new C(a, | - || containingNodeKind === 166 /* ArrayLiteralExpression */ // [a, | - || containingNodeKind === 183 /* BinaryExpression */ // const x = (a, | - || containingNodeKind === 152 /* FunctionType */; // var x: (s: string, list| + return containingNodeKind === 171 /* CallExpression */ // func( a, | + || containingNodeKind === 145 /* Constructor */ // constructor( a, | /* public, protected, private keywords are allowed here, so show completion */ + || containingNodeKind === 172 /* NewExpression */ // new C(a, | + || containingNodeKind === 167 /* ArrayLiteralExpression */ // [a, | + || containingNodeKind === 184 /* BinaryExpression */ // const x = (a, | + || containingNodeKind === 153 /* FunctionType */; // var x: (s: string, list| case 17 /* OpenParenToken */: - return containingNodeKind === 170 /* CallExpression */ // func( | - || containingNodeKind === 144 /* Constructor */ // constructor( | - || containingNodeKind === 171 /* NewExpression */ // new C(a| - || containingNodeKind === 174 /* ParenthesizedExpression */ // const x = (a| - || containingNodeKind === 160 /* ParenthesizedType */; // function F(pred: (a| /* this can become an arrow function, where 'a' is the argument */ + return containingNodeKind === 171 /* CallExpression */ // func( | + || containingNodeKind === 145 /* Constructor */ // constructor( | + || containingNodeKind === 172 /* NewExpression */ // new C(a| + || containingNodeKind === 175 /* ParenthesizedExpression */ // const x = (a| + || containingNodeKind === 161 /* ParenthesizedType */; // function F(pred: (a| /* this can become an arrow function, where 'a' is the argument */ case 19 /* OpenBracketToken */: - return containingNodeKind === 166 /* ArrayLiteralExpression */ // [ | - || containingNodeKind === 149 /* IndexSignature */ // [ | : string ] - || containingNodeKind === 136 /* ComputedPropertyName */; // [ | /* this can become an index signature */ + return containingNodeKind === 167 /* ArrayLiteralExpression */ // [ | + || containingNodeKind === 150 /* IndexSignature */ // [ | : string ] + || containingNodeKind === 137 /* ComputedPropertyName */; // [ | /* this can become an index signature */ case 125 /* ModuleKeyword */: // module | case 126 /* NamespaceKeyword */: return true; case 21 /* DotToken */: - return containingNodeKind === 220 /* ModuleDeclaration */; // module A.| + return containingNodeKind === 221 /* ModuleDeclaration */; // module A.| case 15 /* OpenBraceToken */: - return containingNodeKind === 216 /* ClassDeclaration */; // class A{ | + return containingNodeKind === 217 /* ClassDeclaration */; // class A{ | case 56 /* EqualsToken */: - return containingNodeKind === 213 /* VariableDeclaration */ // const x = a| - || containingNodeKind === 183 /* BinaryExpression */; // x = a| + return containingNodeKind === 214 /* VariableDeclaration */ // const x = a| + || containingNodeKind === 184 /* BinaryExpression */; // x = a| case 12 /* TemplateHead */: - return containingNodeKind === 185 /* TemplateExpression */; // `aa ${| + return containingNodeKind === 186 /* TemplateExpression */; // `aa ${| case 13 /* TemplateMiddle */: - return containingNodeKind === 192 /* TemplateSpan */; // `aa ${10} dd ${| + return containingNodeKind === 193 /* TemplateSpan */; // `aa ${10} dd ${| case 112 /* PublicKeyword */: case 110 /* PrivateKeyword */: case 111 /* ProtectedKeyword */: - return containingNodeKind === 141 /* PropertyDeclaration */; // class A{ public | + return containingNodeKind === 142 /* PropertyDeclaration */; // class A{ public | } // Previous token may have been a keyword that was converted to an identifier. switch (previousToken.getText()) { @@ -47456,7 +48007,7 @@ var ts; } function isInStringOrRegularExpressionOrTemplateLiteral(contextToken) { if (contextToken.kind === 9 /* StringLiteral */ - || contextToken.kind === 162 /* StringLiteralType */ + || contextToken.kind === 163 /* StringLiteralType */ || contextToken.kind === 10 /* RegularExpressionLiteral */ || ts.isTemplateLiteralKind(contextToken.kind)) { var start_7 = contextToken.getStart(); @@ -47486,14 +48037,14 @@ var ts; isMemberCompletion = true; var typeForObject; var existingMembers; - if (objectLikeContainer.kind === 167 /* ObjectLiteralExpression */) { + if (objectLikeContainer.kind === 168 /* ObjectLiteralExpression */) { // We are completing on contextual types, but may also include properties // other than those within the declared type. isNewIdentifierLocation = true; typeForObject = typeChecker.getContextualType(objectLikeContainer); existingMembers = objectLikeContainer.properties; } - else if (objectLikeContainer.kind === 163 /* ObjectBindingPattern */) { + else if (objectLikeContainer.kind === 164 /* ObjectBindingPattern */) { // We are *only* completing on properties from the type being destructured. isNewIdentifierLocation = false; var rootDeclaration = ts.getRootDeclaration(objectLikeContainer.parent); @@ -47539,9 +48090,9 @@ var ts; * @returns true if 'symbols' was successfully populated; false otherwise. */ function tryGetImportOrExportClauseCompletionSymbols(namedImportsOrExports) { - var declarationKind = namedImportsOrExports.kind === 227 /* NamedImports */ ? - 224 /* ImportDeclaration */ : - 230 /* ExportDeclaration */; + var declarationKind = namedImportsOrExports.kind === 228 /* NamedImports */ ? + 225 /* ImportDeclaration */ : + 231 /* ExportDeclaration */; var importOrExportDeclaration = ts.getAncestor(namedImportsOrExports, declarationKind); var moduleSpecifier = importOrExportDeclaration.moduleSpecifier; if (!moduleSpecifier) { @@ -47566,9 +48117,9 @@ var ts; switch (contextToken.kind) { case 15 /* OpenBraceToken */: // const x = { | case 24 /* CommaToken */: - var parent_10 = contextToken.parent; - if (parent_10 && (parent_10.kind === 167 /* ObjectLiteralExpression */ || parent_10.kind === 163 /* ObjectBindingPattern */)) { - return parent_10; + var parent_11 = contextToken.parent; + if (parent_11 && (parent_11.kind === 168 /* ObjectLiteralExpression */ || parent_11.kind === 164 /* ObjectBindingPattern */)) { + return parent_11; } break; } @@ -47585,8 +48136,8 @@ var ts; case 15 /* OpenBraceToken */: // import { | case 24 /* CommaToken */: switch (contextToken.parent.kind) { - case 227 /* NamedImports */: - case 231 /* NamedExports */: + case 228 /* NamedImports */: + case 232 /* NamedExports */: return contextToken.parent; } } @@ -47595,37 +48146,37 @@ var ts; } function tryGetContainingJsxElement(contextToken) { if (contextToken) { - var parent_11 = contextToken.parent; + var parent_12 = contextToken.parent; switch (contextToken.kind) { case 26 /* LessThanSlashToken */: case 39 /* SlashToken */: case 69 /* Identifier */: - case 240 /* JsxAttribute */: - case 241 /* JsxSpreadAttribute */: - if (parent_11 && (parent_11.kind === 236 /* JsxSelfClosingElement */ || parent_11.kind === 237 /* JsxOpeningElement */)) { - return parent_11; + case 241 /* JsxAttribute */: + case 242 /* JsxSpreadAttribute */: + if (parent_12 && (parent_12.kind === 237 /* JsxSelfClosingElement */ || parent_12.kind === 238 /* JsxOpeningElement */)) { + return parent_12; } - else if (parent_11.kind === 240 /* JsxAttribute */) { - return parent_11.parent; + else if (parent_12.kind === 241 /* JsxAttribute */) { + return parent_12.parent; } break; // The context token is the closing } or " of an attribute, which means // its parent is a JsxExpression, whose parent is a JsxAttribute, // whose parent is a JsxOpeningLikeElement case 9 /* StringLiteral */: - if (parent_11 && ((parent_11.kind === 240 /* JsxAttribute */) || (parent_11.kind === 241 /* JsxSpreadAttribute */))) { - return parent_11.parent; + if (parent_12 && ((parent_12.kind === 241 /* JsxAttribute */) || (parent_12.kind === 242 /* JsxSpreadAttribute */))) { + return parent_12.parent; } break; case 16 /* CloseBraceToken */: - if (parent_11 && - parent_11.kind === 242 /* JsxExpression */ && - parent_11.parent && - (parent_11.parent.kind === 240 /* JsxAttribute */)) { - return parent_11.parent.parent; + if (parent_12 && + parent_12.kind === 243 /* JsxExpression */ && + parent_12.parent && + (parent_12.parent.kind === 241 /* JsxAttribute */)) { + return parent_12.parent.parent; } - if (parent_11 && parent_11.kind === 241 /* JsxSpreadAttribute */) { - return parent_11.parent; + if (parent_12 && parent_12.kind === 242 /* JsxSpreadAttribute */) { + return parent_12.parent; } break; } @@ -47634,16 +48185,16 @@ var ts; } function isFunction(kind) { switch (kind) { - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: - case 215 /* FunctionDeclaration */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 149 /* IndexSignature */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: + case 216 /* FunctionDeclaration */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 148 /* CallSignature */: + case 149 /* ConstructSignature */: + case 150 /* IndexSignature */: return true; } return false; @@ -47655,54 +48206,54 @@ var ts; var containingNodeKind = contextToken.parent.kind; switch (contextToken.kind) { case 24 /* CommaToken */: - return containingNodeKind === 213 /* VariableDeclaration */ || - containingNodeKind === 214 /* VariableDeclarationList */ || - containingNodeKind === 195 /* VariableStatement */ || - containingNodeKind === 219 /* EnumDeclaration */ || + return containingNodeKind === 214 /* VariableDeclaration */ || + containingNodeKind === 215 /* VariableDeclarationList */ || + containingNodeKind === 196 /* VariableStatement */ || + containingNodeKind === 220 /* EnumDeclaration */ || isFunction(containingNodeKind) || - containingNodeKind === 216 /* ClassDeclaration */ || - containingNodeKind === 188 /* ClassExpression */ || - containingNodeKind === 217 /* InterfaceDeclaration */ || - containingNodeKind === 164 /* ArrayBindingPattern */ || - containingNodeKind === 218 /* TypeAliasDeclaration */; // type Map, K, | + containingNodeKind === 217 /* ClassDeclaration */ || + containingNodeKind === 189 /* ClassExpression */ || + containingNodeKind === 218 /* InterfaceDeclaration */ || + containingNodeKind === 165 /* ArrayBindingPattern */ || + containingNodeKind === 219 /* TypeAliasDeclaration */; // type Map, K, | case 21 /* DotToken */: - return containingNodeKind === 164 /* ArrayBindingPattern */; // var [.| + return containingNodeKind === 165 /* ArrayBindingPattern */; // var [.| case 54 /* ColonToken */: - return containingNodeKind === 165 /* BindingElement */; // var {x :html| + return containingNodeKind === 166 /* BindingElement */; // var {x :html| case 19 /* OpenBracketToken */: - return containingNodeKind === 164 /* ArrayBindingPattern */; // var [x| + return containingNodeKind === 165 /* ArrayBindingPattern */; // var [x| case 17 /* OpenParenToken */: - return containingNodeKind === 246 /* CatchClause */ || + return containingNodeKind === 247 /* CatchClause */ || isFunction(containingNodeKind); case 15 /* OpenBraceToken */: - return containingNodeKind === 219 /* EnumDeclaration */ || - containingNodeKind === 217 /* InterfaceDeclaration */ || - containingNodeKind === 155 /* TypeLiteral */; // const x : { | + return containingNodeKind === 220 /* EnumDeclaration */ || + containingNodeKind === 218 /* InterfaceDeclaration */ || + containingNodeKind === 156 /* TypeLiteral */; // const x : { | case 23 /* SemicolonToken */: - return containingNodeKind === 140 /* PropertySignature */ && + return containingNodeKind === 141 /* PropertySignature */ && contextToken.parent && contextToken.parent.parent && - (contextToken.parent.parent.kind === 217 /* InterfaceDeclaration */ || - contextToken.parent.parent.kind === 155 /* TypeLiteral */); // const x : { a; | + (contextToken.parent.parent.kind === 218 /* InterfaceDeclaration */ || + contextToken.parent.parent.kind === 156 /* TypeLiteral */); // const x : { a; | case 25 /* LessThanToken */: - return containingNodeKind === 216 /* ClassDeclaration */ || - containingNodeKind === 188 /* ClassExpression */ || - containingNodeKind === 217 /* InterfaceDeclaration */ || - containingNodeKind === 218 /* TypeAliasDeclaration */ || + return containingNodeKind === 217 /* ClassDeclaration */ || + containingNodeKind === 189 /* ClassExpression */ || + containingNodeKind === 218 /* InterfaceDeclaration */ || + containingNodeKind === 219 /* TypeAliasDeclaration */ || isFunction(containingNodeKind); case 113 /* StaticKeyword */: - return containingNodeKind === 141 /* PropertyDeclaration */; + return containingNodeKind === 142 /* PropertyDeclaration */; case 22 /* DotDotDotToken */: - return containingNodeKind === 138 /* Parameter */ || + return containingNodeKind === 139 /* Parameter */ || (contextToken.parent && contextToken.parent.parent && - contextToken.parent.parent.kind === 164 /* ArrayBindingPattern */); // var [...z| + contextToken.parent.parent.kind === 165 /* ArrayBindingPattern */); // var [...z| case 112 /* PublicKeyword */: case 110 /* PrivateKeyword */: case 111 /* ProtectedKeyword */: - return containingNodeKind === 138 /* Parameter */; + return containingNodeKind === 139 /* Parameter */; case 116 /* AsKeyword */: - return containingNodeKind === 228 /* ImportSpecifier */ || - containingNodeKind === 232 /* ExportSpecifier */ || - containingNodeKind === 226 /* NamespaceImport */; + return containingNodeKind === 229 /* ImportSpecifier */ || + containingNodeKind === 233 /* ExportSpecifier */ || + containingNodeKind === 227 /* NamespaceImport */; case 73 /* ClassKeyword */: case 81 /* EnumKeyword */: case 107 /* InterfaceKeyword */: @@ -47762,8 +48313,8 @@ var ts; if (element.getStart() <= position && position <= element.getEnd()) { continue; } - var name_31 = element.propertyName || element.name; - exisingImportsOrExports[name_31.text] = true; + var name_34 = element.propertyName || element.name; + exisingImportsOrExports[name_34.text] = true; } if (ts.isEmpty(exisingImportsOrExports)) { return exportsOfModule; @@ -47784,10 +48335,10 @@ var ts; for (var _i = 0, existingMembers_1 = existingMembers; _i < existingMembers_1.length; _i++) { var m = existingMembers_1[_i]; // Ignore omitted expressions for missing members - if (m.kind !== 247 /* PropertyAssignment */ && - m.kind !== 248 /* ShorthandPropertyAssignment */ && - m.kind !== 165 /* BindingElement */ && - m.kind !== 143 /* MethodDeclaration */) { + if (m.kind !== 248 /* PropertyAssignment */ && + m.kind !== 249 /* ShorthandPropertyAssignment */ && + m.kind !== 166 /* BindingElement */ && + m.kind !== 144 /* MethodDeclaration */) { continue; } // If this is the current item we are editing right now, do not filter it out @@ -47795,7 +48346,7 @@ var ts; continue; } var existingName = void 0; - if (m.kind === 165 /* BindingElement */ && m.propertyName) { + if (m.kind === 166 /* BindingElement */ && m.propertyName) { // include only identifiers in completion list if (m.propertyName.kind === 69 /* Identifier */) { existingName = m.propertyName.text; @@ -47825,7 +48376,7 @@ var ts; if (attr.getStart() <= position && position <= attr.getEnd()) { continue; } - if (attr.kind === 240 /* JsxAttribute */) { + if (attr.kind === 241 /* JsxAttribute */) { seenNames[attr.name.text] = true; } } @@ -47851,7 +48402,23 @@ var ts; } else { if (!symbols || symbols.length === 0) { - return undefined; + if (sourceFile.languageVariant === 1 /* JSX */ && + location.parent && location.parent.kind === 240 /* JsxClosingElement */) { + // In the TypeScript JSX element, if such element is not defined. When users query for completion at closing tag, + // instead of simply giving unknown value, the completion will return the tag-name of an associated opening-element. + // For example: + // var x =

completion list at "1" will contain "div" with type any + var tagName = location.parent.parent.openingElement.tagName; + entries.push({ + name: tagName.text, + kind: undefined, + kindModifiers: undefined, + sortText: "0" + }); + } + else { + return undefined; + } } getCompletionEntriesFromSymbols(symbols, entries); } @@ -47864,10 +48431,10 @@ var ts; var entries = []; var target = program.getCompilerOptions().target; var nameTable = getNameTable(sourceFile); - for (var name_32 in nameTable) { - if (!uniqueNames[name_32]) { - uniqueNames[name_32] = name_32; - var displayName = getCompletionEntryDisplayName(name_32, target, /*performCharacterChecks*/ true); + for (var name_35 in nameTable) { + if (!uniqueNames[name_35]) { + uniqueNames[name_35] = name_35; + var displayName = getCompletionEntryDisplayName(name_35, target, /*performCharacterChecks*/ true); if (displayName) { var entry = { name: displayName, @@ -47973,7 +48540,7 @@ var ts; function getSymbolKind(symbol, location) { var flags = symbol.getFlags(); if (flags & 32 /* Class */) - return ts.getDeclarationOfKind(symbol, 188 /* ClassExpression */) ? + return ts.getDeclarationOfKind(symbol, 189 /* ClassExpression */) ? ScriptElementKind.localClassElement : ScriptElementKind.classElement; if (flags & 384 /* Enum */) return ScriptElementKind.enumElement; @@ -48075,7 +48642,7 @@ var ts; var signature; type = typeChecker.getTypeOfSymbolAtLocation(symbol, location); if (type) { - if (location.parent && location.parent.kind === 168 /* PropertyAccessExpression */) { + if (location.parent && location.parent.kind === 169 /* PropertyAccessExpression */) { var right = location.parent.name; // Either the location is on the right of a property access, or on the left and the right is missing if (right === location || (right && right.getFullWidth() === 0)) { @@ -48084,7 +48651,7 @@ var ts; } // try get the call/construct signature from the type if it matches var callExpression; - if (location.kind === 170 /* CallExpression */ || location.kind === 171 /* NewExpression */) { + if (location.kind === 171 /* CallExpression */ || location.kind === 172 /* NewExpression */) { callExpression = location; } else if (isCallExpressionTarget(location) || isNewExpressionTarget(location)) { @@ -48097,7 +48664,7 @@ var ts; // Use the first candidate: signature = candidateSignatures[0]; } - var useConstructSignatures = callExpression.kind === 171 /* NewExpression */ || callExpression.expression.kind === 95 /* SuperKeyword */; + var useConstructSignatures = callExpression.kind === 172 /* NewExpression */ || callExpression.expression.kind === 95 /* SuperKeyword */; var allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures(); if (!ts.contains(allSignatures, signature.target) && !ts.contains(allSignatures, signature)) { // Get the first signature if there is one -- allSignatures may contain @@ -48150,24 +48717,24 @@ var ts; } } else if ((isNameOfFunctionDeclaration(location) && !(symbol.flags & 98304 /* Accessor */)) || - (location.kind === 121 /* ConstructorKeyword */ && location.parent.kind === 144 /* Constructor */)) { + (location.kind === 121 /* ConstructorKeyword */ && location.parent.kind === 145 /* Constructor */)) { // get the signature from the declaration and write it var functionDeclaration = location.parent; - var allSignatures = functionDeclaration.kind === 144 /* Constructor */ ? type.getConstructSignatures() : type.getCallSignatures(); + var allSignatures = functionDeclaration.kind === 145 /* Constructor */ ? type.getConstructSignatures() : type.getCallSignatures(); if (!typeChecker.isImplementationOfOverload(functionDeclaration)) { signature = typeChecker.getSignatureFromDeclaration(functionDeclaration); } else { signature = allSignatures[0]; } - if (functionDeclaration.kind === 144 /* Constructor */) { + if (functionDeclaration.kind === 145 /* Constructor */) { // show (constructor) Type(...) signature symbolKind = ScriptElementKind.constructorImplementationElement; addPrefixForAnyFunctionOrVar(type.symbol, symbolKind); } else { // (function/method) symbol(..signature) - addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 147 /* CallSignature */ && + addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 148 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); } addSignatureDisplayParts(signature, allSignatures); @@ -48176,7 +48743,7 @@ var ts; } } if (symbolFlags & 32 /* Class */ && !hasAddedSymbolInfo) { - if (ts.getDeclarationOfKind(symbol, 188 /* ClassExpression */)) { + if (ts.getDeclarationOfKind(symbol, 189 /* ClassExpression */)) { // Special case for class expressions because we would like to indicate that // the class name is local to the class body (similar to function expression) // (local class) class @@ -48220,7 +48787,7 @@ var ts; } if (symbolFlags & 1536 /* Module */) { addNewLineIfDisplayPartsExist(); - var declaration = ts.getDeclarationOfKind(symbol, 220 /* ModuleDeclaration */); + var declaration = ts.getDeclarationOfKind(symbol, 221 /* ModuleDeclaration */); var isNamespace = declaration && declaration.name && declaration.name.kind === 69 /* Identifier */; displayParts.push(ts.keywordPart(isNamespace ? 126 /* NamespaceKeyword */ : 125 /* ModuleKeyword */)); displayParts.push(ts.spacePart()); @@ -48243,17 +48810,17 @@ var ts; } else { // Method/function type parameter - var declaration = ts.getDeclarationOfKind(symbol, 137 /* TypeParameter */); + var declaration = ts.getDeclarationOfKind(symbol, 138 /* TypeParameter */); ts.Debug.assert(declaration !== undefined); declaration = declaration.parent; if (declaration) { if (ts.isFunctionLikeKind(declaration.kind)) { var signature = typeChecker.getSignatureFromDeclaration(declaration); - if (declaration.kind === 148 /* ConstructSignature */) { + if (declaration.kind === 149 /* ConstructSignature */) { displayParts.push(ts.keywordPart(92 /* NewKeyword */)); displayParts.push(ts.spacePart()); } - else if (declaration.kind !== 147 /* CallSignature */ && declaration.name) { + else if (declaration.kind !== 148 /* CallSignature */ && declaration.name) { addFullSymbolName(declaration.symbol); } ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, sourceFile, 32 /* WriteTypeArgumentsOfSignature */)); @@ -48273,7 +48840,7 @@ var ts; if (symbolFlags & 8 /* EnumMember */) { addPrefixForAnyFunctionOrVar(symbol, "enum member"); var declaration = symbol.declarations[0]; - if (declaration.kind === 249 /* EnumMember */) { + if (declaration.kind === 250 /* EnumMember */) { var constantValue = typeChecker.getConstantValue(declaration); if (constantValue !== undefined) { displayParts.push(ts.spacePart()); @@ -48289,7 +48856,7 @@ var ts; displayParts.push(ts.spacePart()); addFullSymbolName(symbol); ts.forEach(symbol.declarations, function (declaration) { - if (declaration.kind === 223 /* ImportEqualsDeclaration */) { + if (declaration.kind === 224 /* ImportEqualsDeclaration */) { var importEqualsDeclaration = declaration; if (ts.isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) { displayParts.push(ts.spacePart()); @@ -48418,14 +48985,14 @@ var ts; } var typeChecker = program.getTypeChecker(); var symbol = typeChecker.getSymbolAtLocation(node); - if (!symbol) { + if (!symbol || typeChecker.isUnknownSymbol(symbol)) { // Try getting just type at this position and show switch (node.kind) { case 69 /* Identifier */: - case 168 /* PropertyAccessExpression */: - case 135 /* QualifiedName */: + case 169 /* PropertyAccessExpression */: + case 136 /* QualifiedName */: case 97 /* ThisKeyword */: - case 161 /* ThisType */: + case 162 /* ThisType */: case 95 /* SuperKeyword */: // For the identifiers/this/super etc get the type at position var type = typeChecker.getTypeAtLocation(node); @@ -48504,8 +49071,8 @@ var ts; var declarations = []; var definition; ts.forEach(signatureDeclarations, function (d) { - if ((selectConstructors && d.kind === 144 /* Constructor */) || - (!selectConstructors && (d.kind === 215 /* FunctionDeclaration */ || d.kind === 143 /* MethodDeclaration */ || d.kind === 142 /* MethodSignature */))) { + if ((selectConstructors && d.kind === 145 /* Constructor */) || + (!selectConstructors && (d.kind === 216 /* FunctionDeclaration */ || d.kind === 144 /* MethodDeclaration */ || d.kind === 143 /* MethodSignature */))) { declarations.push(d); if (d.body) definition = d; @@ -48574,7 +49141,7 @@ var ts; // go to the declaration of the property name (in this case stay at the same position). However, if go-to-definition // is performed at the location of property access, we would like to go to definition of the property in the short-hand // assignment. This case and others are handled by the following code. - if (node.parent.kind === 248 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 249 /* ShorthandPropertyAssignment */) { var shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); if (!shorthandSymbol) { return []; @@ -48650,7 +49217,7 @@ var ts; function getSemanticDocumentHighlights(node) { if (node.kind === 69 /* Identifier */ || node.kind === 97 /* ThisKeyword */ || - node.kind === 161 /* ThisType */ || + node.kind === 162 /* ThisType */ || node.kind === 95 /* SuperKeyword */ || isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || isNameOfExternalModuleImportOrDeclaration(node)) { @@ -48704,75 +49271,75 @@ var ts; switch (node.kind) { case 88 /* IfKeyword */: case 80 /* ElseKeyword */: - if (hasKind(node.parent, 198 /* IfStatement */)) { + if (hasKind(node.parent, 199 /* IfStatement */)) { return getIfElseOccurrences(node.parent); } break; case 94 /* ReturnKeyword */: - if (hasKind(node.parent, 206 /* ReturnStatement */)) { + if (hasKind(node.parent, 207 /* ReturnStatement */)) { return getReturnOccurrences(node.parent); } break; case 98 /* ThrowKeyword */: - if (hasKind(node.parent, 210 /* ThrowStatement */)) { + if (hasKind(node.parent, 211 /* ThrowStatement */)) { return getThrowOccurrences(node.parent); } break; case 72 /* CatchKeyword */: - if (hasKind(parent(parent(node)), 211 /* TryStatement */)) { + if (hasKind(parent(parent(node)), 212 /* TryStatement */)) { return getTryCatchFinallyOccurrences(node.parent.parent); } break; case 100 /* TryKeyword */: case 85 /* FinallyKeyword */: - if (hasKind(parent(node), 211 /* TryStatement */)) { + if (hasKind(parent(node), 212 /* TryStatement */)) { return getTryCatchFinallyOccurrences(node.parent); } break; case 96 /* SwitchKeyword */: - if (hasKind(node.parent, 208 /* SwitchStatement */)) { + if (hasKind(node.parent, 209 /* SwitchStatement */)) { return getSwitchCaseDefaultOccurrences(node.parent); } break; case 71 /* CaseKeyword */: case 77 /* DefaultKeyword */: - if (hasKind(parent(parent(parent(node))), 208 /* SwitchStatement */)) { + if (hasKind(parent(parent(parent(node))), 209 /* SwitchStatement */)) { return getSwitchCaseDefaultOccurrences(node.parent.parent.parent); } break; case 70 /* BreakKeyword */: case 75 /* ContinueKeyword */: - if (hasKind(node.parent, 205 /* BreakStatement */) || hasKind(node.parent, 204 /* ContinueStatement */)) { + if (hasKind(node.parent, 206 /* BreakStatement */) || hasKind(node.parent, 205 /* ContinueStatement */)) { return getBreakOrContinueStatementOccurrences(node.parent); } break; case 86 /* ForKeyword */: - if (hasKind(node.parent, 201 /* ForStatement */) || - hasKind(node.parent, 202 /* ForInStatement */) || - hasKind(node.parent, 203 /* ForOfStatement */)) { + if (hasKind(node.parent, 202 /* ForStatement */) || + hasKind(node.parent, 203 /* ForInStatement */) || + hasKind(node.parent, 204 /* ForOfStatement */)) { return getLoopBreakContinueOccurrences(node.parent); } break; case 104 /* WhileKeyword */: case 79 /* DoKeyword */: - if (hasKind(node.parent, 200 /* WhileStatement */) || hasKind(node.parent, 199 /* DoStatement */)) { + if (hasKind(node.parent, 201 /* WhileStatement */) || hasKind(node.parent, 200 /* DoStatement */)) { return getLoopBreakContinueOccurrences(node.parent); } break; case 121 /* ConstructorKeyword */: - if (hasKind(node.parent, 144 /* Constructor */)) { + if (hasKind(node.parent, 145 /* Constructor */)) { return getConstructorOccurrences(node.parent); } break; case 123 /* GetKeyword */: case 129 /* SetKeyword */: - if (hasKind(node.parent, 145 /* GetAccessor */) || hasKind(node.parent, 146 /* SetAccessor */)) { + if (hasKind(node.parent, 146 /* GetAccessor */) || hasKind(node.parent, 147 /* SetAccessor */)) { return getGetAndSetOccurrences(node.parent); } break; default: if (ts.isModifierKind(node.kind) && node.parent && - (ts.isDeclaration(node.parent) || node.parent.kind === 195 /* VariableStatement */)) { + (ts.isDeclaration(node.parent) || node.parent.kind === 196 /* VariableStatement */)) { return getModifierOccurrences(node.kind, node.parent); } } @@ -48788,10 +49355,10 @@ var ts; aggregate(node); return statementAccumulator; function aggregate(node) { - if (node.kind === 210 /* ThrowStatement */) { + if (node.kind === 211 /* ThrowStatement */) { statementAccumulator.push(node); } - else if (node.kind === 211 /* TryStatement */) { + else if (node.kind === 212 /* TryStatement */) { var tryStatement = node; if (tryStatement.catchClause) { aggregate(tryStatement.catchClause); @@ -48818,19 +49385,19 @@ var ts; function getThrowStatementOwner(throwStatement) { var child = throwStatement; while (child.parent) { - var parent_12 = child.parent; - if (ts.isFunctionBlock(parent_12) || parent_12.kind === 250 /* SourceFile */) { - return parent_12; + var parent_13 = child.parent; + if (ts.isFunctionBlock(parent_13) || parent_13.kind === 251 /* SourceFile */) { + return parent_13; } // A throw-statement is only owned by a try-statement if the try-statement has // a catch clause, and if the throw-statement occurs within the try block. - if (parent_12.kind === 211 /* TryStatement */) { - var tryStatement = parent_12; + if (parent_13.kind === 212 /* TryStatement */) { + var tryStatement = parent_13; if (tryStatement.tryBlock === child && tryStatement.catchClause) { return child; } } - child = parent_12; + child = parent_13; } return undefined; } @@ -48839,7 +49406,7 @@ var ts; aggregate(node); return statementAccumulator; function aggregate(node) { - if (node.kind === 205 /* BreakStatement */ || node.kind === 204 /* ContinueStatement */) { + if (node.kind === 206 /* BreakStatement */ || node.kind === 205 /* ContinueStatement */) { statementAccumulator.push(node); } else if (!ts.isFunctionLike(node)) { @@ -48854,16 +49421,16 @@ var ts; function getBreakOrContinueOwner(statement) { for (var node_2 = statement.parent; node_2; node_2 = node_2.parent) { switch (node_2.kind) { - case 208 /* SwitchStatement */: - if (statement.kind === 204 /* ContinueStatement */) { + case 209 /* SwitchStatement */: + if (statement.kind === 205 /* ContinueStatement */) { continue; } // Fall through. - case 201 /* ForStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - case 200 /* WhileStatement */: - case 199 /* DoStatement */: + case 202 /* ForStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: + case 201 /* WhileStatement */: + case 200 /* DoStatement */: if (!statement.label || isLabeledBy(node_2, statement.label.text)) { return node_2; } @@ -48882,24 +49449,24 @@ var ts; var container = declaration.parent; // Make sure we only highlight the keyword when it makes sense to do so. if (ts.isAccessibilityModifier(modifier)) { - if (!(container.kind === 216 /* ClassDeclaration */ || - container.kind === 188 /* ClassExpression */ || - (declaration.kind === 138 /* Parameter */ && hasKind(container, 144 /* Constructor */)))) { + if (!(container.kind === 217 /* ClassDeclaration */ || + container.kind === 189 /* ClassExpression */ || + (declaration.kind === 139 /* Parameter */ && hasKind(container, 145 /* Constructor */)))) { return undefined; } } else if (modifier === 113 /* StaticKeyword */) { - if (!(container.kind === 216 /* ClassDeclaration */ || container.kind === 188 /* ClassExpression */)) { + if (!(container.kind === 217 /* ClassDeclaration */ || container.kind === 189 /* ClassExpression */)) { return undefined; } } else if (modifier === 82 /* ExportKeyword */ || modifier === 122 /* DeclareKeyword */) { - if (!(container.kind === 221 /* ModuleBlock */ || container.kind === 250 /* SourceFile */)) { + if (!(container.kind === 222 /* ModuleBlock */ || container.kind === 251 /* SourceFile */)) { return undefined; } } else if (modifier === 115 /* AbstractKeyword */) { - if (!(container.kind === 216 /* ClassDeclaration */ || declaration.kind === 216 /* ClassDeclaration */)) { + if (!(container.kind === 217 /* ClassDeclaration */ || declaration.kind === 217 /* ClassDeclaration */)) { return undefined; } } @@ -48911,8 +49478,8 @@ var ts; var modifierFlag = getFlagFromModifier(modifier); var nodes; switch (container.kind) { - case 221 /* ModuleBlock */: - case 250 /* SourceFile */: + case 222 /* ModuleBlock */: + case 251 /* SourceFile */: // Container is either a class declaration or the declaration is a classDeclaration if (modifierFlag & 128 /* Abstract */) { nodes = declaration.members.concat(declaration); @@ -48921,17 +49488,17 @@ var ts; nodes = container.statements; } break; - case 144 /* Constructor */: + case 145 /* Constructor */: nodes = container.parameters.concat(container.parent.members); break; - case 216 /* ClassDeclaration */: - case 188 /* ClassExpression */: + case 217 /* ClassDeclaration */: + case 189 /* ClassExpression */: nodes = container.members; // If we're an accessibility modifier, we're in an instance member and should search // the constructor's parameter list for instance members as well. if (modifierFlag & 56 /* AccessibilityModifier */) { var constructor = ts.forEach(container.members, function (member) { - return member.kind === 144 /* Constructor */ && member; + return member.kind === 145 /* Constructor */ && member; }); if (constructor) { nodes = nodes.concat(constructor.parameters); @@ -48984,8 +49551,8 @@ var ts; } function getGetAndSetOccurrences(accessorDeclaration) { var keywords = []; - tryPushAccessorKeyword(accessorDeclaration.symbol, 145 /* GetAccessor */); - tryPushAccessorKeyword(accessorDeclaration.symbol, 146 /* SetAccessor */); + tryPushAccessorKeyword(accessorDeclaration.symbol, 146 /* GetAccessor */); + tryPushAccessorKeyword(accessorDeclaration.symbol, 147 /* SetAccessor */); return ts.map(keywords, getHighlightSpanForNode); function tryPushAccessorKeyword(accessorSymbol, accessorKind) { var accessor = ts.getDeclarationOfKind(accessorSymbol, accessorKind); @@ -49008,7 +49575,7 @@ var ts; var keywords = []; if (pushKeywordIf(keywords, loopNode.getFirstToken(), 86 /* ForKeyword */, 104 /* WhileKeyword */, 79 /* DoKeyword */)) { // If we succeeded and got a do-while loop, then start looking for a 'while' keyword. - if (loopNode.kind === 199 /* DoStatement */) { + if (loopNode.kind === 200 /* DoStatement */) { var loopTokens = loopNode.getChildren(); for (var i = loopTokens.length - 1; i >= 0; i--) { if (pushKeywordIf(keywords, loopTokens[i], 104 /* WhileKeyword */)) { @@ -49029,13 +49596,13 @@ var ts; var owner = getBreakOrContinueOwner(breakOrContinueStatement); if (owner) { switch (owner.kind) { - case 201 /* ForStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - case 199 /* DoStatement */: - case 200 /* WhileStatement */: + case 202 /* ForStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: + case 200 /* DoStatement */: + case 201 /* WhileStatement */: return getLoopBreakContinueOccurrences(owner); - case 208 /* SwitchStatement */: + case 209 /* SwitchStatement */: return getSwitchCaseDefaultOccurrences(owner); } } @@ -49089,7 +49656,7 @@ var ts; function getReturnOccurrences(returnStatement) { var func = ts.getContainingFunction(returnStatement); // If we didn't find a containing function with a block body, bail out. - if (!(func && hasKind(func.body, 194 /* Block */))) { + if (!(func && hasKind(func.body, 195 /* Block */))) { return undefined; } var keywords = []; @@ -49105,7 +49672,7 @@ var ts; function getIfElseOccurrences(ifStatement) { var keywords = []; // Traverse upwards through all parent if-statements linked by their else-branches. - while (hasKind(ifStatement.parent, 198 /* IfStatement */) && ifStatement.parent.elseStatement === ifStatement) { + while (hasKind(ifStatement.parent, 199 /* IfStatement */) && ifStatement.parent.elseStatement === ifStatement) { ifStatement = ifStatement.parent; } // Now traverse back down through the else branches, aggregating if/else keywords of if-statements. @@ -49118,7 +49685,7 @@ var ts; break; } } - if (!hasKind(ifStatement.elseStatement, 198 /* IfStatement */)) { + if (!hasKind(ifStatement.elseStatement, 199 /* IfStatement */)) { break; } ifStatement = ifStatement.elseStatement; @@ -49235,7 +49802,7 @@ var ts; return getLabelReferencesInNode(node.parent, node); } } - if (node.kind === 97 /* ThisKeyword */ || node.kind === 161 /* ThisType */) { + if (node.kind === 97 /* ThisKeyword */ || node.kind === 162 /* ThisType */) { return getReferencesForThisKeyword(node, sourceFiles); } if (node.kind === 95 /* SuperKeyword */) { @@ -49296,10 +49863,8 @@ var ts; textSpan: ts.createTextSpan(declarations[0].getStart(), 0) }; } - function isImportOrExportSpecifierImportSymbol(symbol) { - return (symbol.flags & 8388608 /* Alias */) && ts.forEach(symbol.declarations, function (declaration) { - return declaration.kind === 228 /* ImportSpecifier */ || declaration.kind === 232 /* ExportSpecifier */; - }); + function isImportSpecifierSymbol(symbol) { + return (symbol.flags & 8388608 /* Alias */) && !!ts.getDeclarationOfKind(symbol, 229 /* ImportSpecifier */); } function getInternedName(symbol, location, declarations) { // If this is an export or import specifier it could have been renamed using the 'as' syntax. @@ -49325,14 +49890,14 @@ var ts; // If this is the symbol of a named function expression or named class expression, // then named references are limited to its own scope. var valueDeclaration = symbol.valueDeclaration; - if (valueDeclaration && (valueDeclaration.kind === 175 /* FunctionExpression */ || valueDeclaration.kind === 188 /* ClassExpression */)) { + if (valueDeclaration && (valueDeclaration.kind === 176 /* FunctionExpression */ || valueDeclaration.kind === 189 /* ClassExpression */)) { return valueDeclaration; } // If this is private property or method, the scope is the containing class if (symbol.flags & (4 /* Property */ | 8192 /* Method */)) { var privateDeclaration = ts.forEach(symbol.getDeclarations(), function (d) { return (d.flags & 16 /* Private */) ? d : undefined; }); if (privateDeclaration) { - return ts.getAncestor(privateDeclaration, 216 /* ClassDeclaration */); + return ts.getAncestor(privateDeclaration, 217 /* ClassDeclaration */); } } // If the symbol is an import we would like to find it if we are looking for what it imports. @@ -49358,7 +49923,7 @@ var ts; // Different declarations have different containers, bail out return undefined; } - if (container.kind === 250 /* SourceFile */ && !ts.isExternalModule(container)) { + if (container.kind === 251 /* SourceFile */ && !ts.isExternalModule(container)) { // This is a global variable and not an external module, any declaration defined // within this scope is visible outside the file return undefined; @@ -49531,13 +50096,13 @@ var ts; // Whether 'super' occurs in a static context within a class. var staticFlag = 64 /* Static */; switch (searchSpaceNode.kind) { - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 145 /* Constructor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: staticFlag &= searchSpaceNode.flags; searchSpaceNode = searchSpaceNode.parent; // re-assign to be the owning class break; @@ -49569,27 +50134,27 @@ var ts; // Whether 'this' occurs in a static context within a class. var staticFlag = 64 /* Static */; switch (searchSpaceNode.kind) { - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: if (ts.isObjectLiteralMethod(searchSpaceNode)) { break; } // fall through - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 145 /* Constructor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: staticFlag &= searchSpaceNode.flags; searchSpaceNode = searchSpaceNode.parent; // re-assign to be the owning class break; - case 250 /* SourceFile */: + case 251 /* SourceFile */: if (ts.isExternalModule(searchSpaceNode)) { return undefined; } // Fall through - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: break; // Computed properties in classes are not handled here because references to this are illegal, // so there is no point finding references to them. @@ -49598,7 +50163,7 @@ var ts; } var references = []; var possiblePositions; - if (searchSpaceNode.kind === 250 /* SourceFile */) { + if (searchSpaceNode.kind === 251 /* SourceFile */) { ts.forEach(sourceFiles, function (sourceFile) { possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", sourceFile.getStart(), sourceFile.getEnd()); getThisReferencesInFile(sourceFile, sourceFile, possiblePositions, references); @@ -49624,33 +50189,33 @@ var ts; ts.forEach(possiblePositions, function (position) { cancellationToken.throwIfCancellationRequested(); var node = ts.getTouchingWord(sourceFile, position); - if (!node || (node.kind !== 97 /* ThisKeyword */ && node.kind !== 161 /* ThisType */)) { + if (!node || (node.kind !== 97 /* ThisKeyword */ && node.kind !== 162 /* ThisType */)) { return; } var container = ts.getThisContainer(node, /* includeArrowFunctions */ false); switch (searchSpaceNode.kind) { - case 175 /* FunctionExpression */: - case 215 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 216 /* FunctionDeclaration */: if (searchSpaceNode.symbol === container.symbol) { result.push(getReferenceEntryFromNode(node)); } break; - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: if (ts.isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol) { result.push(getReferenceEntryFromNode(node)); } break; - case 188 /* ClassExpression */: - case 216 /* ClassDeclaration */: + case 189 /* ClassExpression */: + case 217 /* ClassDeclaration */: // Make sure the container belongs to the same class // and has the appropriate static modifier from the original container. if (container.parent && searchSpaceNode.symbol === container.parent.symbol && (container.flags & 64 /* Static */) === staticFlag) { result.push(getReferenceEntryFromNode(node)); } break; - case 250 /* SourceFile */: - if (container.kind === 250 /* SourceFile */ && !ts.isExternalModule(container)) { + case 251 /* SourceFile */: + if (container.kind === 251 /* SourceFile */ && !ts.isExternalModule(container)) { result.push(getReferenceEntryFromNode(node)); } break; @@ -49662,9 +50227,17 @@ var ts; // The search set contains at least the current symbol var result = [symbol]; // If the symbol is an alias, add what it alaises to the list - if (isImportOrExportSpecifierImportSymbol(symbol)) { + if (isImportSpecifierSymbol(symbol)) { result.push(typeChecker.getAliasedSymbol(symbol)); } + // For export specifiers, the exported name can be refering to a local symbol, e.g.: + // import {a} from "mod"; + // export {a as somethingElse} + // We want the *local* declaration of 'a' as declared in the import, + // *not* as declared within "mod" (or farther) + if (location.parent.kind === 233 /* ExportSpecifier */) { + result.push(typeChecker.getExportSpecifierLocalTargetSymbol(location.parent)); + } // If the location is in a context sensitive location (i.e. in an object literal) try // to get a contextual type for it, and add the property symbol from the contextual // type to the search set @@ -49692,7 +50265,7 @@ var ts; // we should include both parameter declaration symbol and property declaration symbol // Parameter Declaration symbol is only visible within function scope, so the symbol is stored in contructor.locals. // Property Declaration symbol is a member of the class, so the symbol is stored in its class Declaration.symbol.members - if (symbol.valueDeclaration && symbol.valueDeclaration.kind === 138 /* Parameter */ && + if (symbol.valueDeclaration && symbol.valueDeclaration.kind === 139 /* Parameter */ && ts.isParameterPropertyDeclaration(symbol.valueDeclaration)) { result = result.concat(typeChecker.getSymbolsOfParameterPropertyDeclaration(symbol.valueDeclaration, symbol.name)); } @@ -49704,19 +50277,44 @@ var ts; } // Add symbol of properties/methods of the same name in base classes and implemented interfaces definitions if (rootSymbol.parent && rootSymbol.parent.flags & (32 /* Class */ | 64 /* Interface */)) { - getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result); + getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result, /*previousIterationSymbolsCache*/ {}); } }); return result; } - function getPropertySymbolsFromBaseTypes(symbol, propertyName, result) { - if (symbol && symbol.flags & (32 /* Class */ | 64 /* Interface */)) { + /** + * Find symbol of the given property-name and add the symbol to the given result array + * @param symbol a symbol to start searching for the given propertyName + * @param propertyName a name of property to serach for + * @param result an array of symbol of found property symbols + * @param previousIterationSymbolsCache a cache of symbol from previous iterations of calling this function to prevent infinite revisitng of the same symbol. + * The value of previousIterationSymbol is undefined when the function is first called. + */ + function getPropertySymbolsFromBaseTypes(symbol, propertyName, result, previousIterationSymbolsCache) { + if (!symbol) { + return; + } + // If the current symbol is the same as the previous-iteration symbol, we can just return the symbol that has already been visited + // This is particularly important for the following cases, so that we do not infinitely visit the same symbol. + // For example: + // interface C extends C { + // /*findRef*/propName: string; + // } + // The first time getPropertySymbolsFromBaseTypes is called when finding-all-references at propName, + // the symbol argument will be the symbol of an interface "C" and previousIterationSymbol is undefined, + // the function will add any found symbol of the property-name, then its sub-routine will call + // getPropertySymbolsFromBaseTypes again to walk up any base types to prevent revisiting already + // visited symbol, interface "C", the sub-routine will pass the current symbol as previousIterationSymbol. + if (ts.hasProperty(previousIterationSymbolsCache, symbol.name)) { + return; + } + if (symbol.flags & (32 /* Class */ | 64 /* Interface */)) { ts.forEach(symbol.getDeclarations(), function (declaration) { - if (declaration.kind === 216 /* ClassDeclaration */) { + if (declaration.kind === 217 /* ClassDeclaration */) { getPropertySymbolFromTypeReference(ts.getClassExtendsHeritageClauseElement(declaration)); ts.forEach(ts.getClassImplementsHeritageClauseElements(declaration), getPropertySymbolFromTypeReference); } - else if (declaration.kind === 217 /* InterfaceDeclaration */) { + else if (declaration.kind === 218 /* InterfaceDeclaration */) { ts.forEach(ts.getInterfaceBaseTypeNodes(declaration), getPropertySymbolFromTypeReference); } }); @@ -49731,7 +50329,8 @@ var ts; result.push(propertySymbol); } // Visit the typeReference as well to see if it directly or indirectly use that property - getPropertySymbolsFromBaseTypes(type.symbol, propertyName, result); + previousIterationSymbolsCache[symbol.name] = symbol; + getPropertySymbolsFromBaseTypes(type.symbol, propertyName, result, previousIterationSymbolsCache); } } } @@ -49742,12 +50341,22 @@ var ts; } // If the reference symbol is an alias, check if what it is aliasing is one of the search // symbols. - if (isImportOrExportSpecifierImportSymbol(referenceSymbol)) { + if (isImportSpecifierSymbol(referenceSymbol)) { var aliasedSymbol = typeChecker.getAliasedSymbol(referenceSymbol); if (searchSymbols.indexOf(aliasedSymbol) >= 0) { return aliasedSymbol; } } + // For export specifiers, it can be a local symbol, e.g. + // import {a} from "mod"; + // export {a as somethingElse} + // We want the local target of the export (i.e. the import symbol) and not the final target (i.e. "mod".a) + if (referenceLocation.parent.kind === 233 /* ExportSpecifier */) { + var aliasedSymbol = typeChecker.getExportSpecifierLocalTargetSymbol(referenceLocation.parent); + if (searchSymbols.indexOf(aliasedSymbol) >= 0) { + return aliasedSymbol; + } + } // If the reference location is in an object literal, try to get the contextual type for the // object literal, lookup the property symbol in the contextual type, and use this symbol to // compare to our searchSymbol @@ -49767,7 +50376,7 @@ var ts; // see if any is in the list if (rootSymbol.parent && rootSymbol.parent.flags & (32 /* Class */ | 64 /* Interface */)) { var result_3 = []; - getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result_3); + getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result_3, /*previousIterationSymbolsCache*/ {}); return ts.forEach(result_3, function (s) { return searchSymbols.indexOf(s) >= 0 ? s : undefined; }); } return undefined; @@ -49777,19 +50386,19 @@ var ts; if (isNameOfPropertyAssignment(node)) { var objectLiteral = node.parent.parent; var contextualType = typeChecker.getContextualType(objectLiteral); - var name_33 = node.text; + var name_36 = node.text; if (contextualType) { if (contextualType.flags & 16384 /* Union */) { // This is a union type, first see if the property we are looking for is a union property (i.e. exists in all types) // if not, search the constituent types for the property - var unionProperty = contextualType.getProperty(name_33); + var unionProperty = contextualType.getProperty(name_36); if (unionProperty) { return [unionProperty]; } else { var result_4 = []; ts.forEach(contextualType.types, function (t) { - var symbol = t.getProperty(name_33); + var symbol = t.getProperty(name_36); if (symbol) { result_4.push(symbol); } @@ -49798,7 +50407,7 @@ var ts; } } else { - var symbol_1 = contextualType.getProperty(name_33); + var symbol_1 = contextualType.getProperty(name_36); if (symbol_1) { return [symbol_1]; } @@ -49856,10 +50465,10 @@ var ts; } var parent = node.parent; if (parent) { - if (parent.kind === 182 /* PostfixUnaryExpression */ || parent.kind === 181 /* PrefixUnaryExpression */) { + if (parent.kind === 183 /* PostfixUnaryExpression */ || parent.kind === 182 /* PrefixUnaryExpression */) { return true; } - else if (parent.kind === 183 /* BinaryExpression */ && parent.left === node) { + else if (parent.kind === 184 /* BinaryExpression */ && parent.left === node) { var operator = parent.operatorToken.kind; return 56 /* FirstAssignment */ <= operator && operator <= 68 /* LastAssignment */; } @@ -49890,34 +50499,34 @@ var ts; } function getMeaningFromDeclaration(node) { switch (node.kind) { - case 138 /* Parameter */: - case 213 /* VariableDeclaration */: - case 165 /* BindingElement */: - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 247 /* PropertyAssignment */: - case 248 /* ShorthandPropertyAssignment */: - case 249 /* EnumMember */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: - case 246 /* CatchClause */: + case 139 /* Parameter */: + case 214 /* VariableDeclaration */: + case 166 /* BindingElement */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 248 /* PropertyAssignment */: + case 249 /* ShorthandPropertyAssignment */: + case 250 /* EnumMember */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 145 /* Constructor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: + case 247 /* CatchClause */: return 1 /* Value */; - case 137 /* TypeParameter */: - case 217 /* InterfaceDeclaration */: - case 218 /* TypeAliasDeclaration */: - case 155 /* TypeLiteral */: + case 138 /* TypeParameter */: + case 218 /* InterfaceDeclaration */: + case 219 /* TypeAliasDeclaration */: + case 156 /* TypeLiteral */: return 2 /* Type */; - case 216 /* ClassDeclaration */: - case 219 /* EnumDeclaration */: + case 217 /* ClassDeclaration */: + case 220 /* EnumDeclaration */: return 1 /* Value */ | 2 /* Type */; - case 220 /* ModuleDeclaration */: - if (node.name.kind === 9 /* StringLiteral */) { + case 221 /* ModuleDeclaration */: + if (ts.isAmbientModule(node)) { return 4 /* Namespace */ | 1 /* Value */; } else if (ts.getModuleInstanceState(node) === 1 /* Instantiated */) { @@ -49926,15 +50535,15 @@ var ts; else { return 4 /* Namespace */; } - case 227 /* NamedImports */: - case 228 /* ImportSpecifier */: - case 223 /* ImportEqualsDeclaration */: - case 224 /* ImportDeclaration */: - case 229 /* ExportAssignment */: - case 230 /* ExportDeclaration */: + case 228 /* NamedImports */: + case 229 /* ImportSpecifier */: + case 224 /* ImportEqualsDeclaration */: + case 225 /* ImportDeclaration */: + case 230 /* ExportAssignment */: + case 231 /* ExportDeclaration */: return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; // An external module can be a Value - case 250 /* SourceFile */: + case 251 /* SourceFile */: return 4 /* Namespace */ | 1 /* Value */; } return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; @@ -49943,10 +50552,10 @@ var ts; if (ts.isRightSideOfQualifiedNameOrPropertyAccess(node)) { node = node.parent; } - return node.parent.kind === 151 /* TypeReference */ || - (node.parent.kind === 190 /* ExpressionWithTypeArguments */ && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) || + return node.parent.kind === 152 /* TypeReference */ || + (node.parent.kind === 191 /* ExpressionWithTypeArguments */ && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) || (node.kind === 97 /* ThisKeyword */ && !ts.isExpression(node)) || - node.kind === 161 /* ThisType */; + node.kind === 162 /* ThisType */; } function isNamespaceReference(node) { return isQualifiedNameNamespaceReference(node) || isPropertyAccessNamespaceReference(node); @@ -49954,32 +50563,32 @@ var ts; function isPropertyAccessNamespaceReference(node) { var root = node; var isLastClause = true; - if (root.parent.kind === 168 /* PropertyAccessExpression */) { - while (root.parent && root.parent.kind === 168 /* PropertyAccessExpression */) { + if (root.parent.kind === 169 /* PropertyAccessExpression */) { + while (root.parent && root.parent.kind === 169 /* PropertyAccessExpression */) { root = root.parent; } isLastClause = root.name === node; } - if (!isLastClause && root.parent.kind === 190 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 245 /* HeritageClause */) { + if (!isLastClause && root.parent.kind === 191 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 246 /* HeritageClause */) { var decl = root.parent.parent.parent; - return (decl.kind === 216 /* ClassDeclaration */ && root.parent.parent.token === 106 /* ImplementsKeyword */) || - (decl.kind === 217 /* InterfaceDeclaration */ && root.parent.parent.token === 83 /* ExtendsKeyword */); + return (decl.kind === 217 /* ClassDeclaration */ && root.parent.parent.token === 106 /* ImplementsKeyword */) || + (decl.kind === 218 /* InterfaceDeclaration */ && root.parent.parent.token === 83 /* ExtendsKeyword */); } return false; } function isQualifiedNameNamespaceReference(node) { var root = node; var isLastClause = true; - if (root.parent.kind === 135 /* QualifiedName */) { - while (root.parent && root.parent.kind === 135 /* QualifiedName */) { + if (root.parent.kind === 136 /* QualifiedName */) { + while (root.parent && root.parent.kind === 136 /* QualifiedName */) { root = root.parent; } isLastClause = root.right === node; } - return root.parent.kind === 151 /* TypeReference */ && !isLastClause; + return root.parent.kind === 152 /* TypeReference */ && !isLastClause; } function isInRightSideOfImport(node) { - while (node.parent.kind === 135 /* QualifiedName */) { + while (node.parent.kind === 136 /* QualifiedName */) { node = node.parent; } return ts.isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node; @@ -49989,15 +50598,15 @@ var ts; // import a = |b|; // Namespace // import a = |b.c|; // Value, type, namespace // import a = |b.c|.d; // Namespace - if (node.parent.kind === 135 /* QualifiedName */ && + if (node.parent.kind === 136 /* QualifiedName */ && node.parent.right === node && - node.parent.parent.kind === 223 /* ImportEqualsDeclaration */) { + node.parent.parent.kind === 224 /* ImportEqualsDeclaration */) { return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; } return 4 /* Namespace */; } function getMeaningFromLocation(node) { - if (node.parent.kind === 229 /* ExportAssignment */) { + if (node.parent.kind === 230 /* ExportAssignment */) { return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; } else if (isInRightSideOfImport(node)) { @@ -50037,16 +50646,16 @@ var ts; return; } switch (node.kind) { - case 168 /* PropertyAccessExpression */: - case 135 /* QualifiedName */: + case 169 /* PropertyAccessExpression */: + case 136 /* QualifiedName */: case 9 /* StringLiteral */: - case 162 /* StringLiteralType */: + case 163 /* StringLiteralType */: case 84 /* FalseKeyword */: case 99 /* TrueKeyword */: case 93 /* NullKeyword */: case 95 /* SuperKeyword */: case 97 /* ThisKeyword */: - case 161 /* ThisType */: + case 162 /* ThisType */: case 69 /* Identifier */: break; // Cant create the text span @@ -50063,7 +50672,7 @@ var ts; // If this is name of a module declarations, check if this is right side of dotted module name // If parent of the module declaration which is parent of this node is module declaration and its body is the module declaration that this node is name of // Then this name is name from dotted module - if (nodeForStartPos.parent.parent.kind === 220 /* ModuleDeclaration */ && + if (nodeForStartPos.parent.parent.kind === 221 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { // Use parent module declarations name for start pos nodeForStartPos = nodeForStartPos.parent.parent.name; @@ -50104,10 +50713,10 @@ var ts; // That means we're calling back into the host around every 1.2k of the file we process. // Lib.d.ts has similar numbers. switch (kind) { - case 220 /* ModuleDeclaration */: - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: - case 215 /* FunctionDeclaration */: + case 221 /* ModuleDeclaration */: + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: + case 216 /* FunctionDeclaration */: cancellationToken.throwIfCancellationRequested(); } } @@ -50161,7 +50770,7 @@ var ts; */ function hasValueSideModule(symbol) { return ts.forEach(symbol.declarations, function (declaration) { - return declaration.kind === 220 /* ModuleDeclaration */ && + return declaration.kind === 221 /* ModuleDeclaration */ && ts.getModuleInstanceState(declaration) === 1 /* Instantiated */; }); } @@ -50212,6 +50821,9 @@ var ts; case 19 /* jsxOpenTagName */: return ClassificationTypeNames.jsxOpenTagName; case 20 /* jsxCloseTagName */: return ClassificationTypeNames.jsxCloseTagName; case 21 /* jsxSelfClosingTagName */: return ClassificationTypeNames.jsxSelfClosingTagName; + case 22 /* jsxAttribute */: return ClassificationTypeNames.jsxAttribute; + case 23 /* jsxText */: return ClassificationTypeNames.jsxText; + case 24 /* jsxAttributeStringLiteralValue */: return ClassificationTypeNames.jsxAttributeStringLiteralValue; } } function convertClassifications(classifications) { @@ -50319,16 +50931,16 @@ var ts; pushClassification(tag.tagName.pos, tag.tagName.end - tag.tagName.pos, 18 /* docCommentTagName */); pos = tag.tagName.end; switch (tag.kind) { - case 269 /* JSDocParameterTag */: + case 270 /* JSDocParameterTag */: processJSDocParameterTag(tag); break; - case 272 /* JSDocTemplateTag */: + case 273 /* JSDocTemplateTag */: processJSDocTemplateTag(tag); break; - case 271 /* JSDocTypeTag */: + case 272 /* JSDocTypeTag */: processElement(tag.typeExpression); break; - case 270 /* JSDocReturnTag */: + case 271 /* JSDocReturnTag */: processElement(tag.typeExpression); break; } @@ -50365,7 +50977,8 @@ var ts; function classifyDisabledMergeCode(text, start, end) { // Classify the line that the ======= marker is on as a comment. Then just lex // all further tokens and add them to the result. - for (var i = start; i < end; i++) { + var i; + for (i = start; i < end; i++) { if (ts.isLineBreak(text.charCodeAt(i))) { break; } @@ -50385,11 +50998,11 @@ var ts; pushClassification(start, end - start, type); } } - function classifyToken(token) { + function classifyTokenOrJsxText(token) { if (ts.nodeIsMissing(token)) { return; } - var tokenStart = classifyLeadingTriviaAndGetTokenStart(token); + var tokenStart = token.kind === 239 /* JsxText */ ? token.pos : classifyLeadingTriviaAndGetTokenStart(token); var tokenWidth = token.end - tokenStart; ts.Debug.assert(tokenWidth >= 0); if (tokenWidth > 0) { @@ -50419,16 +51032,17 @@ var ts; if (token) { if (tokenKind === 56 /* EqualsToken */) { // the '=' in a variable declaration is special cased here. - if (token.parent.kind === 213 /* VariableDeclaration */ || - token.parent.kind === 141 /* PropertyDeclaration */ || - token.parent.kind === 138 /* Parameter */) { + if (token.parent.kind === 214 /* VariableDeclaration */ || + token.parent.kind === 142 /* PropertyDeclaration */ || + token.parent.kind === 139 /* Parameter */ || + token.parent.kind === 241 /* JsxAttribute */) { return 5 /* operator */; } } - if (token.parent.kind === 183 /* BinaryExpression */ || - token.parent.kind === 181 /* PrefixUnaryExpression */ || - token.parent.kind === 182 /* PostfixUnaryExpression */ || - token.parent.kind === 184 /* ConditionalExpression */) { + if (token.parent.kind === 184 /* BinaryExpression */ || + token.parent.kind === 182 /* PrefixUnaryExpression */ || + token.parent.kind === 183 /* PostfixUnaryExpression */ || + token.parent.kind === 185 /* ConditionalExpression */) { return 5 /* operator */; } } @@ -50437,8 +51051,8 @@ var ts; else if (tokenKind === 8 /* NumericLiteral */) { return 4 /* numericLiteral */; } - else if (tokenKind === 9 /* StringLiteral */ || tokenKind === 162 /* StringLiteralType */) { - return 6 /* stringLiteral */; + else if (tokenKind === 9 /* StringLiteral */ || tokenKind === 163 /* StringLiteralType */) { + return token.parent.kind === 241 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; } else if (tokenKind === 10 /* RegularExpressionLiteral */) { // TODO: we should get another classification type for these literals. @@ -50448,54 +51062,61 @@ var ts; // TODO (drosen): we should *also* get another classification type for these literals. return 6 /* stringLiteral */; } + else if (tokenKind === 239 /* JsxText */) { + return 23 /* jsxText */; + } else if (tokenKind === 69 /* Identifier */) { if (token) { switch (token.parent.kind) { - case 216 /* ClassDeclaration */: + case 217 /* ClassDeclaration */: if (token.parent.name === token) { return 11 /* className */; } return; - case 137 /* TypeParameter */: + case 138 /* TypeParameter */: if (token.parent.name === token) { return 15 /* typeParameterName */; } return; - case 217 /* InterfaceDeclaration */: + case 218 /* InterfaceDeclaration */: if (token.parent.name === token) { return 13 /* interfaceName */; } return; - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: if (token.parent.name === token) { return 12 /* enumName */; } return; - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: if (token.parent.name === token) { return 14 /* moduleName */; } return; - case 138 /* Parameter */: + case 139 /* Parameter */: if (token.parent.name === token) { return 17 /* parameterName */; } return; - case 237 /* JsxOpeningElement */: + case 238 /* JsxOpeningElement */: if (token.parent.tagName === token) { return 19 /* jsxOpenTagName */; } return; - case 239 /* JsxClosingElement */: + case 240 /* JsxClosingElement */: if (token.parent.tagName === token) { return 20 /* jsxCloseTagName */; } return; - case 236 /* JsxSelfClosingElement */: + case 237 /* JsxSelfClosingElement */: if (token.parent.tagName === token) { return 21 /* jsxSelfClosingTagName */; } return; + case 241 /* JsxAttribute */: + if (token.parent.name === token) { + return 22 /* jsxAttribute */; + } } } return 2 /* identifier */; @@ -50511,8 +51132,8 @@ var ts; var children = element.getChildren(sourceFile); for (var i = 0, n = children.length; i < n; i++) { var child = children[i]; - if (ts.isToken(child)) { - classifyToken(child); + if (ts.isToken(child) || child.kind === 239 /* JsxText */) { + classifyTokenOrJsxText(child); } else { // Recurse into our child nodes. @@ -50638,19 +51259,19 @@ var ts; var commentOwner; findOwner: for (commentOwner = tokenAtPos; commentOwner; commentOwner = commentOwner.parent) { switch (commentOwner.kind) { - case 215 /* FunctionDeclaration */: - case 143 /* MethodDeclaration */: - case 144 /* Constructor */: - case 216 /* ClassDeclaration */: - case 195 /* VariableStatement */: + case 216 /* FunctionDeclaration */: + case 144 /* MethodDeclaration */: + case 145 /* Constructor */: + case 217 /* ClassDeclaration */: + case 196 /* VariableStatement */: break findOwner; - case 250 /* SourceFile */: + case 251 /* SourceFile */: return undefined; - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: // If in walking up the tree, we hit a a nested namespace declaration, // then we must be somewhere within a dotted namespace name; however we don't // want to give back a JSDoc template for the 'b' or 'c' in 'namespace a.b.c { }'. - if (commentOwner.parent.kind === 220 /* ModuleDeclaration */) { + if (commentOwner.parent.kind === 221 /* ModuleDeclaration */) { return undefined; } break findOwner; @@ -50692,7 +51313,7 @@ var ts; if (ts.isFunctionLike(commentOwner)) { return commentOwner.parameters; } - if (commentOwner.kind === 195 /* VariableStatement */) { + if (commentOwner.kind === 196 /* VariableStatement */) { var varStatement = commentOwner; var varDeclarations = varStatement.declarationList.declarations; if (varDeclarations.length === 1 && varDeclarations[0].initializer) { @@ -50710,17 +51331,17 @@ var ts; * @returns the parameters of a signature found on the RHS if one exists; otherwise 'emptyArray'. */ function getParametersFromRightHandSideOfAssignment(rightHandSide) { - while (rightHandSide.kind === 174 /* ParenthesizedExpression */) { + while (rightHandSide.kind === 175 /* ParenthesizedExpression */) { rightHandSide = rightHandSide.expression; } switch (rightHandSide.kind) { - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: return rightHandSide.parameters; - case 188 /* ClassExpression */: + case 189 /* ClassExpression */: for (var _i = 0, _a = rightHandSide.members; _i < _a.length; _i++) { var member = _a[_i]; - if (member.kind === 144 /* Constructor */) { + if (member.kind === 145 /* Constructor */) { return member.parameters; } } @@ -50974,7 +51595,7 @@ var ts; // then we want 'something' to be in the name table. Similarly, if we have // "a['propname']" then we want to store "propname" in the name table. if (ts.isDeclarationName(node) || - node.parent.kind === 234 /* ExternalModuleReference */ || + node.parent.kind === 235 /* ExternalModuleReference */ || isArgumentOfElementAccessExpression(node)) { nameTable[node.text] = node.text; } @@ -50987,7 +51608,7 @@ var ts; function isArgumentOfElementAccessExpression(node) { return node && node.parent && - node.parent.kind === 169 /* ElementAccessExpression */ && + node.parent.kind === 170 /* ElementAccessExpression */ && node.parent.argumentExpression === node; } /// Classifier @@ -51246,7 +51867,7 @@ var ts; var end = scanner.getTextPos(); addResult(start, end, classFromKind(token)); if (end >= text.length) { - if (token === 9 /* StringLiteral */ || token === 162 /* StringLiteralType */) { + if (token === 9 /* StringLiteral */ || token === 163 /* StringLiteralType */) { // Check to see if we finished up on a multiline string literal. var tokenText = scanner.getTokenText(); if (scanner.isUnterminated()) { @@ -51369,7 +51990,7 @@ var ts; } } function isKeyword(token) { - return token >= 70 /* FirstKeyword */ && token <= 134 /* LastKeyword */; + return token >= 70 /* FirstKeyword */ && token <= 135 /* LastKeyword */; } function classFromKind(token) { if (isKeyword(token)) { @@ -51385,7 +52006,7 @@ var ts; case 8 /* NumericLiteral */: return 4 /* numericLiteral */; case 9 /* StringLiteral */: - case 162 /* StringLiteralType */: + case 163 /* StringLiteralType */: return 6 /* stringLiteral */; case 10 /* RegularExpressionLiteral */: return 7 /* regularExpressionLiteral */; @@ -51476,6 +52097,9 @@ var ts; startNode.getStart(sourceFile); return ts.createTextSpanFromBounds(start, (endNode || startNode).getEnd()); } + function textSpanEndingAtNextToken(startNode, previousTokenToFindNextEndToken) { + return textSpan(startNode, ts.findNextToken(previousTokenToFindNextEndToken, previousTokenToFindNextEndToken.parent)); + } function spanInNodeIfStartsOnSameLine(node, otherwiseOnNode) { if (node && lineOfPosition === sourceFile.getLineAndCharacterOfPosition(node.getStart(sourceFile)).line) { return spanInNode(node); @@ -51493,132 +52117,114 @@ var ts; } function spanInNode(node) { if (node) { - if (ts.isExpression(node)) { - if (node.parent.kind === 199 /* DoStatement */) { - // Set span as if on while keyword - return spanInPreviousNode(node); - } - if (node.parent.kind === 139 /* Decorator */) { - // Set breakpoint on the decorator emit - return spanInNode(node.parent); - } - if (node.parent.kind === 201 /* ForStatement */) { - // For now lets set the span on this expression, fix it later - return textSpan(node); - } - if (node.parent.kind === 183 /* BinaryExpression */ && node.parent.operatorToken.kind === 24 /* CommaToken */) { - // if this is comma expression, the breakpoint is possible in this expression - return textSpan(node); - } - if (node.parent.kind === 176 /* ArrowFunction */ && node.parent.body === node) { - // If this is body of arrow function, it is allowed to have the breakpoint - return textSpan(node); - } - } switch (node.kind) { - case 195 /* VariableStatement */: + case 196 /* VariableStatement */: // Span on first variable declaration return spanInVariableDeclaration(node.declarationList.declarations[0]); - case 213 /* VariableDeclaration */: - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: + case 214 /* VariableDeclaration */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: return spanInVariableDeclaration(node); - case 138 /* Parameter */: + case 139 /* Parameter */: return spanInParameterDeclaration(node); - case 215 /* FunctionDeclaration */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 144 /* Constructor */: - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: + case 216 /* FunctionDeclaration */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 145 /* Constructor */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: return spanInFunctionDeclaration(node); - case 194 /* Block */: + case 195 /* Block */: if (ts.isFunctionBlock(node)) { return spanInFunctionBlock(node); } // Fall through - case 221 /* ModuleBlock */: + case 222 /* ModuleBlock */: return spanInBlock(node); - case 246 /* CatchClause */: + case 247 /* CatchClause */: return spanInBlock(node.block); - case 197 /* ExpressionStatement */: + case 198 /* ExpressionStatement */: // span on the expression return textSpan(node.expression); - case 206 /* ReturnStatement */: + case 207 /* ReturnStatement */: // span on return keyword and expression if present return textSpan(node.getChildAt(0), node.expression); - case 200 /* WhileStatement */: + case 201 /* WhileStatement */: // Span on while(...) - return textSpan(node, ts.findNextToken(node.expression, node)); - case 199 /* DoStatement */: + return textSpanEndingAtNextToken(node, node.expression); + case 200 /* DoStatement */: // span in statement of the do statement return spanInNode(node.statement); - case 212 /* DebuggerStatement */: + case 213 /* DebuggerStatement */: // span on debugger keyword return textSpan(node.getChildAt(0)); - case 198 /* IfStatement */: + case 199 /* IfStatement */: // set on if(..) span - return textSpan(node, ts.findNextToken(node.expression, node)); - case 209 /* LabeledStatement */: + return textSpanEndingAtNextToken(node, node.expression); + case 210 /* LabeledStatement */: // span in statement return spanInNode(node.statement); - case 205 /* BreakStatement */: - case 204 /* ContinueStatement */: + case 206 /* BreakStatement */: + case 205 /* ContinueStatement */: // On break or continue keyword and label if present return textSpan(node.getChildAt(0), node.label); - case 201 /* ForStatement */: + case 202 /* ForStatement */: return spanInForStatement(node); - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - // span on for (a in ...) - return textSpan(node, ts.findNextToken(node.expression, node)); - case 208 /* SwitchStatement */: + case 203 /* ForInStatement */: + // span of for (a in ...) + return textSpanEndingAtNextToken(node, node.expression); + case 204 /* ForOfStatement */: + // span in initializer + return spanInInitializerOfForLike(node); + case 209 /* SwitchStatement */: // span on switch(...) - return textSpan(node, ts.findNextToken(node.expression, node)); - case 243 /* CaseClause */: - case 244 /* DefaultClause */: + return textSpanEndingAtNextToken(node, node.expression); + case 244 /* CaseClause */: + case 245 /* DefaultClause */: // span in first statement of the clause return spanInNode(node.statements[0]); - case 211 /* TryStatement */: + case 212 /* TryStatement */: // span in try block return spanInBlock(node.tryBlock); - case 210 /* ThrowStatement */: + case 211 /* ThrowStatement */: // span in throw ... return textSpan(node, node.expression); - case 229 /* ExportAssignment */: + case 230 /* ExportAssignment */: // span on export = id return textSpan(node, node.expression); - case 223 /* ImportEqualsDeclaration */: + case 224 /* ImportEqualsDeclaration */: // import statement without including semicolon return textSpan(node, node.moduleReference); - case 224 /* ImportDeclaration */: + case 225 /* ImportDeclaration */: // import statement without including semicolon return textSpan(node, node.moduleSpecifier); - case 230 /* ExportDeclaration */: + case 231 /* ExportDeclaration */: // import statement without including semicolon return textSpan(node, node.moduleSpecifier); - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: // span on complete module if it is instantiated if (ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { return undefined; } - case 216 /* ClassDeclaration */: - case 219 /* EnumDeclaration */: - case 249 /* EnumMember */: - case 170 /* CallExpression */: - case 171 /* NewExpression */: + case 217 /* ClassDeclaration */: + case 220 /* EnumDeclaration */: + case 250 /* EnumMember */: + case 166 /* BindingElement */: // span on complete node return textSpan(node); - case 207 /* WithStatement */: + case 208 /* WithStatement */: // span in statement return spanInNode(node.statement); - case 139 /* Decorator */: + case 140 /* Decorator */: return spanInNodeArray(node.parent.decorators); + case 164 /* ObjectBindingPattern */: + case 165 /* ArrayBindingPattern */: + return spanInBindingPattern(node); // No breakpoint in interface, type alias - case 217 /* InterfaceDeclaration */: - case 218 /* TypeAliasDeclaration */: + case 218 /* InterfaceDeclaration */: + case 219 /* TypeAliasDeclaration */: return undefined; // Tokens: case 23 /* SemicolonToken */: @@ -51630,6 +52236,8 @@ var ts; return spanInOpenBraceToken(node); case 16 /* CloseBraceToken */: return spanInCloseBraceToken(node); + case 20 /* CloseBracketToken */: + return spanInCloseBracketToken(node); case 17 /* OpenParenToken */: return spanInOpenParenToken(node); case 18 /* CloseParenToken */: @@ -51646,58 +52254,142 @@ var ts; case 72 /* CatchKeyword */: case 85 /* FinallyKeyword */: return spanInNextNode(node); + case 135 /* OfKeyword */: + return spanInOfKeyword(node); default: + // Destructuring pattern in destructuring assignment + // [a, b, c] of + // [a, b, c] = expression + if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node)) { + return spanInArrayLiteralOrObjectLiteralDestructuringPattern(node); + } + // Set breakpoint on identifier element of destructuring pattern + // a or ...c or d: x from + // [a, b, ...c] or { a, b } or { d: x } from destructuring pattern + if ((node.kind === 69 /* Identifier */ || + node.kind == 188 /* SpreadElementExpression */ || + node.kind === 248 /* PropertyAssignment */ || + node.kind === 249 /* ShorthandPropertyAssignment */) && + ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) { + return textSpan(node); + } + if (node.kind === 184 /* BinaryExpression */) { + var binaryExpression = node; + // Set breakpoint in destructuring pattern if its destructuring assignment + // [a, b, c] or {a, b, c} of + // [a, b, c] = expression or + // {a, b, c} = expression + if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left)) { + return spanInArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left); + } + if (binaryExpression.operatorToken.kind === 56 /* EqualsToken */ && + ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.parent)) { + // Set breakpoint on assignment expression element of destructuring pattern + // a = expression of + // [a = expression, b, c] = someExpression or + // { a = expression, b, c } = someExpression + return textSpan(node); + } + if (binaryExpression.operatorToken.kind === 24 /* CommaToken */) { + return spanInNode(binaryExpression.left); + } + } + if (ts.isExpression(node)) { + switch (node.parent.kind) { + case 200 /* DoStatement */: + // Set span as if on while keyword + return spanInPreviousNode(node); + case 140 /* Decorator */: + // Set breakpoint on the decorator emit + return spanInNode(node.parent); + case 202 /* ForStatement */: + case 204 /* ForOfStatement */: + return textSpan(node); + case 184 /* BinaryExpression */: + if (node.parent.operatorToken.kind === 24 /* CommaToken */) { + // if this is comma expression, the breakpoint is possible in this expression + return textSpan(node); + } + break; + case 177 /* ArrowFunction */: + if (node.parent.body === node) { + // If this is body of arrow function, it is allowed to have the breakpoint + return textSpan(node); + } + break; + } + } // If this is name of property assignment, set breakpoint in the initializer - if (node.parent.kind === 247 /* PropertyAssignment */ && node.parent.name === node) { + if (node.parent.kind === 248 /* PropertyAssignment */ && + node.parent.name === node && + !ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.parent)) { return spanInNode(node.parent.initializer); } // Breakpoint in type assertion goes to its operand - if (node.parent.kind === 173 /* TypeAssertionExpression */ && node.parent.type === node) { - return spanInNode(node.parent.expression); + if (node.parent.kind === 174 /* TypeAssertionExpression */ && node.parent.type === node) { + return spanInNextNode(node.parent.type); } // return type of function go to previous token if (ts.isFunctionLike(node.parent) && node.parent.type === node) { return spanInPreviousNode(node); } + // initializer of variable/parameter declaration go to previous node + if ((node.parent.kind === 214 /* VariableDeclaration */ || + node.parent.kind === 139 /* Parameter */)) { + var paramOrVarDecl = node.parent; + if (paramOrVarDecl.initializer === node || + paramOrVarDecl.type === node || + ts.isAssignmentOperator(node.kind)) { + return spanInPreviousNode(node); + } + } + if (node.parent.kind === 184 /* BinaryExpression */) { + var binaryExpression = node.parent; + if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left) && + (binaryExpression.right === node || + binaryExpression.operatorToken === node)) { + // If initializer of destructuring assignment move to previous token + return spanInPreviousNode(node); + } + } // Default go to parent to set the breakpoint return spanInNode(node.parent); } } + function textSpanFromVariableDeclaration(variableDeclaration) { + var declarations = variableDeclaration.parent.declarations; + if (declarations && declarations[0] === variableDeclaration) { + // First declaration - include let keyword + return textSpan(ts.findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent), variableDeclaration); + } + else { + // Span only on this declaration + return textSpan(variableDeclaration); + } + } function spanInVariableDeclaration(variableDeclaration) { // If declaration of for in statement, just set the span in parent - if (variableDeclaration.parent.parent.kind === 202 /* ForInStatement */ || - variableDeclaration.parent.parent.kind === 203 /* ForOfStatement */) { + if (variableDeclaration.parent.parent.kind === 203 /* ForInStatement */) { return spanInNode(variableDeclaration.parent.parent); } - var isParentVariableStatement = variableDeclaration.parent.parent.kind === 195 /* VariableStatement */; - var isDeclarationOfForStatement = variableDeclaration.parent.parent.kind === 201 /* ForStatement */ && ts.contains(variableDeclaration.parent.parent.initializer.declarations, variableDeclaration); - var declarations = isParentVariableStatement - ? variableDeclaration.parent.parent.declarationList.declarations - : isDeclarationOfForStatement - ? variableDeclaration.parent.parent.initializer.declarations - : undefined; - // Breakpoint is possible in variableDeclaration only if there is initialization - if (variableDeclaration.initializer || (variableDeclaration.flags & 2 /* Export */)) { - if (declarations && declarations[0] === variableDeclaration) { - if (isParentVariableStatement) { - // First declaration - include let keyword - return textSpan(variableDeclaration.parent, variableDeclaration); - } - else { - ts.Debug.assert(isDeclarationOfForStatement); - // Include let keyword from for statement declarations in the span - return textSpan(ts.findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent), variableDeclaration); - } - } - else { - // Span only on this declaration - return textSpan(variableDeclaration); - } + // If this is a destructuring pattern set breakpoint in binding pattern + if (ts.isBindingPattern(variableDeclaration.name)) { + return spanInBindingPattern(variableDeclaration.name); } - else if (declarations && declarations[0] !== variableDeclaration) { + // Breakpoint is possible in variableDeclaration only if there is initialization + // or its declaration from 'for of' + if (variableDeclaration.initializer || + (variableDeclaration.flags & 2 /* Export */) || + variableDeclaration.parent.parent.kind === 204 /* ForOfStatement */) { + return textSpanFromVariableDeclaration(variableDeclaration); + } + var declarations = variableDeclaration.parent.declarations; + if (declarations && declarations[0] !== variableDeclaration) { // If we cant set breakpoint on this declaration, set it on previous one - var indexOfCurrentDeclaration = ts.indexOf(declarations, variableDeclaration); - return spanInVariableDeclaration(declarations[indexOfCurrentDeclaration - 1]); + // Because the variable declaration may be binding pattern and + // we would like to set breakpoint in last binding element if thats the case, + // use preceding token instead + return spanInNode(ts.findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent)); } } function canHaveSpanInParameterDeclaration(parameter) { @@ -51706,7 +52398,11 @@ var ts; !!(parameter.flags & 8 /* Public */) || !!(parameter.flags & 16 /* Private */); } function spanInParameterDeclaration(parameter) { - if (canHaveSpanInParameterDeclaration(parameter)) { + if (ts.isBindingPattern(parameter.name)) { + // set breakpoint in binding pattern + return spanInBindingPattern(parameter.name); + } + else if (canHaveSpanInParameterDeclaration(parameter)) { return textSpan(parameter); } else { @@ -51724,7 +52420,7 @@ var ts; } function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) { return !!(functionDeclaration.flags & 2 /* Export */) || - (functionDeclaration.parent.kind === 216 /* ClassDeclaration */ && functionDeclaration.kind !== 144 /* Constructor */); + (functionDeclaration.parent.kind === 217 /* ClassDeclaration */ && functionDeclaration.kind !== 145 /* Constructor */); } function spanInFunctionDeclaration(functionDeclaration) { // No breakpoints in the function signature @@ -51747,34 +52443,39 @@ var ts; } function spanInBlock(block) { switch (block.parent.kind) { - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: if (ts.getModuleInstanceState(block.parent) !== 1 /* Instantiated */) { return undefined; } // Set on parent if on same line otherwise on first statement - case 200 /* WhileStatement */: - case 198 /* IfStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: + case 201 /* WhileStatement */: + case 199 /* IfStatement */: + case 203 /* ForInStatement */: return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]); // Set span on previous token if it starts on same line otherwise on the first statement of the block - case 201 /* ForStatement */: + case 202 /* ForStatement */: + case 204 /* ForOfStatement */: return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]); } // Default action is to set on first statement return spanInNode(block.statements[0]); } + function spanInInitializerOfForLike(forLikeStaement) { + if (forLikeStaement.initializer.kind === 215 /* VariableDeclarationList */) { + // declaration list, set breakpoint in first declaration + var variableDeclarationList = forLikeStaement.initializer; + if (variableDeclarationList.declarations.length > 0) { + return spanInNode(variableDeclarationList.declarations[0]); + } + } + else { + // Expression - set breakpoint in it + return spanInNode(forLikeStaement.initializer); + } + } function spanInForStatement(forStatement) { if (forStatement.initializer) { - if (forStatement.initializer.kind === 214 /* VariableDeclarationList */) { - var variableDeclarationList = forStatement.initializer; - if (variableDeclarationList.declarations.length > 0) { - return spanInNode(variableDeclarationList.declarations[0]); - } - } - else { - return spanInNode(forStatement.initializer); - } + return spanInInitializerOfForLike(forStatement); } if (forStatement.condition) { return textSpan(forStatement.condition); @@ -51783,16 +52484,44 @@ var ts; return textSpan(forStatement.incrementor); } } + function spanInBindingPattern(bindingPattern) { + // Set breakpoint in first binding element + var firstBindingElement = ts.forEach(bindingPattern.elements, function (element) { return element.kind !== 190 /* OmittedExpression */ ? element : undefined; }); + if (firstBindingElement) { + return spanInNode(firstBindingElement); + } + // Empty binding pattern of binding element, set breakpoint on binding element + if (bindingPattern.parent.kind === 166 /* BindingElement */) { + return textSpan(bindingPattern.parent); + } + // Variable declaration is used as the span + return textSpanFromVariableDeclaration(bindingPattern.parent); + } + function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node) { + ts.Debug.assert(node.kind !== 165 /* ArrayBindingPattern */ && node.kind !== 164 /* ObjectBindingPattern */); + var elements = node.kind === 167 /* ArrayLiteralExpression */ ? + node.elements : + node.properties; + var firstBindingElement = ts.forEach(elements, function (element) { return element.kind !== 190 /* OmittedExpression */ ? element : undefined; }); + if (firstBindingElement) { + return spanInNode(firstBindingElement); + } + // Could be ArrayLiteral from destructuring assignment or + // just nested element in another destructuring assignment + // set breakpoint on assignment when parent is destructuring assignment + // Otherwise set breakpoint for this element + return textSpan(node.parent.kind === 184 /* BinaryExpression */ ? node.parent : node); + } // Tokens: function spanInOpenBraceToken(node) { switch (node.parent.kind) { - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: var enumDeclaration = node.parent; return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile)); - case 216 /* ClassDeclaration */: + case 217 /* ClassDeclaration */: var classDeclaration = node.parent; return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile)); - case 222 /* CaseBlock */: + case 223 /* CaseBlock */: return spanInNodeIfStartsOnSameLine(node.parent.parent, node.parent.clauses[0]); } // Default to parent node @@ -51800,24 +52529,24 @@ var ts; } function spanInCloseBraceToken(node) { switch (node.parent.kind) { - case 221 /* ModuleBlock */: + case 222 /* ModuleBlock */: // If this is not instantiated module block no bp span if (ts.getModuleInstanceState(node.parent.parent) !== 1 /* Instantiated */) { return undefined; } - case 219 /* EnumDeclaration */: - case 216 /* ClassDeclaration */: + case 220 /* EnumDeclaration */: + case 217 /* ClassDeclaration */: // Span on close brace token return textSpan(node); - case 194 /* Block */: + case 195 /* Block */: if (ts.isFunctionBlock(node.parent)) { // Span on close brace token return textSpan(node); } // fall through. - case 246 /* CatchClause */: + case 247 /* CatchClause */: return spanInNode(ts.lastOrUndefined(node.parent.statements)); - case 222 /* CaseBlock */: + case 223 /* CaseBlock */: // breakpoint in last statement of the last clause var caseBlock = node.parent; var lastClause = ts.lastOrUndefined(caseBlock.clauses); @@ -51825,33 +52554,66 @@ var ts; return spanInNode(ts.lastOrUndefined(lastClause.statements)); } return undefined; + case 164 /* ObjectBindingPattern */: + // Breakpoint in last binding element or binding pattern if it contains no elements + var bindingPattern = node.parent; + return spanInNode(ts.lastOrUndefined(bindingPattern.elements) || bindingPattern); // Default to parent node default: + if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) { + // Breakpoint in last binding element or binding pattern if it contains no elements + var objectLiteral = node.parent; + return textSpan(ts.lastOrUndefined(objectLiteral.properties) || objectLiteral); + } + return spanInNode(node.parent); + } + } + function spanInCloseBracketToken(node) { + switch (node.parent.kind) { + case 165 /* ArrayBindingPattern */: + // Breakpoint in last binding element or binding pattern if it contains no elements + var bindingPattern = node.parent; + return textSpan(ts.lastOrUndefined(bindingPattern.elements) || bindingPattern); + default: + if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) { + // Breakpoint in last binding element or binding pattern if it contains no elements + var arrayLiteral = node.parent; + return textSpan(ts.lastOrUndefined(arrayLiteral.elements) || arrayLiteral); + } + // Default to parent node return spanInNode(node.parent); } } function spanInOpenParenToken(node) { - if (node.parent.kind === 199 /* DoStatement */) { - // Go to while keyword and do action instead + if (node.parent.kind === 200 /* DoStatement */ || + node.parent.kind === 171 /* CallExpression */ || + node.parent.kind === 172 /* NewExpression */) { return spanInPreviousNode(node); } + if (node.parent.kind === 175 /* ParenthesizedExpression */) { + return spanInNextNode(node); + } // Default to parent node return spanInNode(node.parent); } function spanInCloseParenToken(node) { // Is this close paren token of parameter list, set span in previous token switch (node.parent.kind) { - case 175 /* FunctionExpression */: - case 215 /* FunctionDeclaration */: - case 176 /* ArrowFunction */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 144 /* Constructor */: - case 200 /* WhileStatement */: - case 199 /* DoStatement */: - case 201 /* ForStatement */: + case 176 /* FunctionExpression */: + case 216 /* FunctionDeclaration */: + case 177 /* ArrowFunction */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 145 /* Constructor */: + case 201 /* WhileStatement */: + case 200 /* DoStatement */: + case 202 /* ForStatement */: + case 204 /* ForOfStatement */: + case 171 /* CallExpression */: + case 172 /* NewExpression */: + case 175 /* ParenthesizedExpression */: return spanInPreviousNode(node); // Default to parent node default: @@ -51860,21 +52622,31 @@ var ts; } function spanInColonToken(node) { // Is this : specifying return annotation of the function declaration - if (ts.isFunctionLike(node.parent) || node.parent.kind === 247 /* PropertyAssignment */) { + if (ts.isFunctionLike(node.parent) || + node.parent.kind === 248 /* PropertyAssignment */ || + node.parent.kind === 139 /* Parameter */) { return spanInPreviousNode(node); } return spanInNode(node.parent); } function spanInGreaterThanOrLessThanToken(node) { - if (node.parent.kind === 173 /* TypeAssertionExpression */) { - return spanInNode(node.parent.expression); + if (node.parent.kind === 174 /* TypeAssertionExpression */) { + return spanInNextNode(node); } return spanInNode(node.parent); } function spanInWhileKeyword(node) { - if (node.parent.kind === 199 /* DoStatement */) { + if (node.parent.kind === 200 /* DoStatement */) { // Set span on while expression - return textSpan(node, ts.findNextToken(node.parent.expression, node.parent)); + return textSpanEndingAtNextToken(node, node.parent.expression); + } + // Default to parent node + return spanInNode(node.parent); + } + function spanInOfKeyword(node) { + if (node.parent.kind === 204 /* ForOfStatement */) { + // set using next token + return spanInNextNode(node); } // Default to parent node return spanInNode(node.parent); diff --git a/lib/typescriptServices.d.ts b/lib/typescriptServices.d.ts index 797f9ec728c..3cd6e23dc1d 100644 --- a/lib/typescriptServices.d.ts +++ b/lib/typescriptServices.d.ts @@ -167,161 +167,162 @@ declare namespace ts { SymbolKeyword = 131, TypeKeyword = 132, FromKeyword = 133, - OfKeyword = 134, - QualifiedName = 135, - ComputedPropertyName = 136, - TypeParameter = 137, - Parameter = 138, - Decorator = 139, - PropertySignature = 140, - PropertyDeclaration = 141, - MethodSignature = 142, - MethodDeclaration = 143, - Constructor = 144, - GetAccessor = 145, - SetAccessor = 146, - CallSignature = 147, - ConstructSignature = 148, - IndexSignature = 149, - TypePredicate = 150, - TypeReference = 151, - FunctionType = 152, - ConstructorType = 153, - TypeQuery = 154, - TypeLiteral = 155, - ArrayType = 156, - TupleType = 157, - UnionType = 158, - IntersectionType = 159, - ParenthesizedType = 160, - ThisType = 161, - StringLiteralType = 162, - ObjectBindingPattern = 163, - ArrayBindingPattern = 164, - BindingElement = 165, - ArrayLiteralExpression = 166, - ObjectLiteralExpression = 167, - PropertyAccessExpression = 168, - ElementAccessExpression = 169, - CallExpression = 170, - NewExpression = 171, - TaggedTemplateExpression = 172, - TypeAssertionExpression = 173, - ParenthesizedExpression = 174, - FunctionExpression = 175, - ArrowFunction = 176, - DeleteExpression = 177, - TypeOfExpression = 178, - VoidExpression = 179, - AwaitExpression = 180, - PrefixUnaryExpression = 181, - PostfixUnaryExpression = 182, - BinaryExpression = 183, - ConditionalExpression = 184, - TemplateExpression = 185, - YieldExpression = 186, - SpreadElementExpression = 187, - ClassExpression = 188, - OmittedExpression = 189, - ExpressionWithTypeArguments = 190, - AsExpression = 191, - TemplateSpan = 192, - SemicolonClassElement = 193, - Block = 194, - VariableStatement = 195, - EmptyStatement = 196, - ExpressionStatement = 197, - IfStatement = 198, - DoStatement = 199, - WhileStatement = 200, - ForStatement = 201, - ForInStatement = 202, - ForOfStatement = 203, - ContinueStatement = 204, - BreakStatement = 205, - ReturnStatement = 206, - WithStatement = 207, - SwitchStatement = 208, - LabeledStatement = 209, - ThrowStatement = 210, - TryStatement = 211, - DebuggerStatement = 212, - VariableDeclaration = 213, - VariableDeclarationList = 214, - FunctionDeclaration = 215, - ClassDeclaration = 216, - InterfaceDeclaration = 217, - TypeAliasDeclaration = 218, - EnumDeclaration = 219, - ModuleDeclaration = 220, - ModuleBlock = 221, - CaseBlock = 222, - ImportEqualsDeclaration = 223, - ImportDeclaration = 224, - ImportClause = 225, - NamespaceImport = 226, - NamedImports = 227, - ImportSpecifier = 228, - ExportAssignment = 229, - ExportDeclaration = 230, - NamedExports = 231, - ExportSpecifier = 232, - MissingDeclaration = 233, - ExternalModuleReference = 234, - JsxElement = 235, - JsxSelfClosingElement = 236, - JsxOpeningElement = 237, - JsxText = 238, - JsxClosingElement = 239, - JsxAttribute = 240, - JsxSpreadAttribute = 241, - JsxExpression = 242, - CaseClause = 243, - DefaultClause = 244, - HeritageClause = 245, - CatchClause = 246, - PropertyAssignment = 247, - ShorthandPropertyAssignment = 248, - EnumMember = 249, - SourceFile = 250, - JSDocTypeExpression = 251, - JSDocAllType = 252, - JSDocUnknownType = 253, - JSDocArrayType = 254, - JSDocUnionType = 255, - JSDocTupleType = 256, - JSDocNullableType = 257, - JSDocNonNullableType = 258, - JSDocRecordType = 259, - JSDocRecordMember = 260, - JSDocTypeReference = 261, - JSDocOptionalType = 262, - JSDocFunctionType = 263, - JSDocVariadicType = 264, - JSDocConstructorType = 265, - JSDocThisType = 266, - JSDocComment = 267, - JSDocTag = 268, - JSDocParameterTag = 269, - JSDocReturnTag = 270, - JSDocTypeTag = 271, - JSDocTemplateTag = 272, - SyntaxList = 273, - Count = 274, + GlobalKeyword = 134, + OfKeyword = 135, + QualifiedName = 136, + ComputedPropertyName = 137, + TypeParameter = 138, + Parameter = 139, + Decorator = 140, + PropertySignature = 141, + PropertyDeclaration = 142, + MethodSignature = 143, + MethodDeclaration = 144, + Constructor = 145, + GetAccessor = 146, + SetAccessor = 147, + CallSignature = 148, + ConstructSignature = 149, + IndexSignature = 150, + TypePredicate = 151, + TypeReference = 152, + FunctionType = 153, + ConstructorType = 154, + TypeQuery = 155, + TypeLiteral = 156, + ArrayType = 157, + TupleType = 158, + UnionType = 159, + IntersectionType = 160, + ParenthesizedType = 161, + ThisType = 162, + StringLiteralType = 163, + ObjectBindingPattern = 164, + ArrayBindingPattern = 165, + BindingElement = 166, + ArrayLiteralExpression = 167, + ObjectLiteralExpression = 168, + PropertyAccessExpression = 169, + ElementAccessExpression = 170, + CallExpression = 171, + NewExpression = 172, + TaggedTemplateExpression = 173, + TypeAssertionExpression = 174, + ParenthesizedExpression = 175, + FunctionExpression = 176, + ArrowFunction = 177, + DeleteExpression = 178, + TypeOfExpression = 179, + VoidExpression = 180, + AwaitExpression = 181, + PrefixUnaryExpression = 182, + PostfixUnaryExpression = 183, + BinaryExpression = 184, + ConditionalExpression = 185, + TemplateExpression = 186, + YieldExpression = 187, + SpreadElementExpression = 188, + ClassExpression = 189, + OmittedExpression = 190, + ExpressionWithTypeArguments = 191, + AsExpression = 192, + TemplateSpan = 193, + SemicolonClassElement = 194, + Block = 195, + VariableStatement = 196, + EmptyStatement = 197, + ExpressionStatement = 198, + IfStatement = 199, + DoStatement = 200, + WhileStatement = 201, + ForStatement = 202, + ForInStatement = 203, + ForOfStatement = 204, + ContinueStatement = 205, + BreakStatement = 206, + ReturnStatement = 207, + WithStatement = 208, + SwitchStatement = 209, + LabeledStatement = 210, + ThrowStatement = 211, + TryStatement = 212, + DebuggerStatement = 213, + VariableDeclaration = 214, + VariableDeclarationList = 215, + FunctionDeclaration = 216, + ClassDeclaration = 217, + InterfaceDeclaration = 218, + TypeAliasDeclaration = 219, + EnumDeclaration = 220, + ModuleDeclaration = 221, + ModuleBlock = 222, + CaseBlock = 223, + ImportEqualsDeclaration = 224, + ImportDeclaration = 225, + ImportClause = 226, + NamespaceImport = 227, + NamedImports = 228, + ImportSpecifier = 229, + ExportAssignment = 230, + ExportDeclaration = 231, + NamedExports = 232, + ExportSpecifier = 233, + MissingDeclaration = 234, + ExternalModuleReference = 235, + JsxElement = 236, + JsxSelfClosingElement = 237, + JsxOpeningElement = 238, + JsxText = 239, + JsxClosingElement = 240, + JsxAttribute = 241, + JsxSpreadAttribute = 242, + JsxExpression = 243, + CaseClause = 244, + DefaultClause = 245, + HeritageClause = 246, + CatchClause = 247, + PropertyAssignment = 248, + ShorthandPropertyAssignment = 249, + EnumMember = 250, + SourceFile = 251, + JSDocTypeExpression = 252, + JSDocAllType = 253, + JSDocUnknownType = 254, + JSDocArrayType = 255, + JSDocUnionType = 256, + JSDocTupleType = 257, + JSDocNullableType = 258, + JSDocNonNullableType = 259, + JSDocRecordType = 260, + JSDocRecordMember = 261, + JSDocTypeReference = 262, + JSDocOptionalType = 263, + JSDocFunctionType = 264, + JSDocVariadicType = 265, + JSDocConstructorType = 266, + JSDocThisType = 267, + JSDocComment = 268, + JSDocTag = 269, + JSDocParameterTag = 270, + JSDocReturnTag = 271, + JSDocTypeTag = 272, + JSDocTemplateTag = 273, + SyntaxList = 274, + Count = 275, FirstAssignment = 56, LastAssignment = 68, FirstReservedWord = 70, LastReservedWord = 105, FirstKeyword = 70, - LastKeyword = 134, + LastKeyword = 135, FirstFutureReservedWord = 106, LastFutureReservedWord = 114, - FirstTypeNode = 150, - LastTypeNode = 162, + FirstTypeNode = 151, + LastTypeNode = 163, FirstPunctuation = 15, LastPunctuation = 68, FirstToken = 0, - LastToken = 134, + LastToken = 135, FirstTriviaToken = 2, LastTriviaToken = 7, FirstLiteralToken = 8, @@ -330,7 +331,7 @@ declare namespace ts { LastTemplateToken = 14, FirstBinaryOperator = 25, LastBinaryOperator = 68, - FirstNode = 135, + FirstNode = 136, } enum NodeFlags { None = 0, @@ -354,10 +355,16 @@ declare namespace ts { ContainsThis = 262144, HasImplicitReturn = 524288, HasExplicitReturn = 1048576, + GlobalAugmentation = 2097152, + HasClassExtends = 4194304, + HasDecorators = 8388608, + HasParamDecorators = 16777216, + HasAsyncFunctions = 33554432, Modifier = 1022, AccessibilityModifier = 56, BlockScoped = 24576, ReachabilityCheckFlags = 1572864, + EmitHelperFlags = 62914560, } enum JsxFlags { None = 0, @@ -1141,6 +1148,7 @@ declare namespace ts { getSymbolAtLocation(node: Node): Symbol; getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: string): Symbol[]; getShorthandAssignmentValueSymbol(location: Node): Symbol; + getExportSpecifierLocalTargetSymbol(location: ExportSpecifier): Symbol; getTypeAtLocation(node: Node): Type; typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; @@ -1154,6 +1162,7 @@ declare namespace ts { isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; isUndefinedSymbol(symbol: Symbol): boolean; isArgumentsSymbol(symbol: Symbol): boolean; + isUnknownSymbol(symbol: Symbol): boolean; getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; getAliasedSymbol(symbol: Symbol): Symbol; @@ -1543,6 +1552,8 @@ declare namespace ts { } } declare namespace ts { + type FileWatcherCallback = (path: string, removed?: boolean) => void; + type DirectoryWatcherCallback = (path: string) => void; interface System { args: string[]; newLine: string; @@ -1550,8 +1561,8 @@ declare namespace ts { write(s: string): void; readFile(path: string, encoding?: string): string; writeFile(path: string, data: string, writeByteOrderMark?: boolean): void; - watchFile?(path: string, callback: (path: string, removed?: boolean) => void): FileWatcher; - watchDirectory?(path: string, callback: (path: string) => void, recursive?: boolean): FileWatcher; + watchFile?(path: Path, callback: FileWatcherCallback): FileWatcher; + watchDirectory?(path: string, callback: DirectoryWatcherCallback, recursive?: boolean): FileWatcher; resolvePath(path: string): string; fileExists(path: string): boolean; directoryExists(path: string): boolean; @@ -1565,6 +1576,10 @@ declare namespace ts { interface FileWatcher { close(): void; } + interface DirectoryWatcher extends FileWatcher { + directoryPath: Path; + referenceCount: number; + } var sys: System; } declare namespace ts { @@ -2237,6 +2252,9 @@ declare namespace ts { static jsxOpenTagName: string; static jsxCloseTagName: string; static jsxSelfClosingTagName: string; + static jsxAttribute: string; + static jsxText: string; + static jsxAttributeStringLiteralValue: string; } enum ClassificationType { comment = 1, @@ -2260,6 +2278,9 @@ declare namespace ts { jsxOpenTagName = 19, jsxCloseTagName = 20, jsxSelfClosingTagName = 21, + jsxAttribute = 22, + jsxText = 23, + jsxAttributeStringLiteralValue = 24, } interface DisplayPartsSymbolWriter extends SymbolWriter { displayParts(): SymbolDisplayPart[]; @@ -2283,7 +2304,6 @@ declare namespace ts { function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean): SourceFile; let disableIncrementalParsing: boolean; function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; - function createGetCanonicalFileName(useCaseSensitivefileNames: boolean): (fileName: string) => string; function createDocumentRegistry(useCaseSensitiveFileNames?: boolean, currentDirectory?: string): DocumentRegistry; function preProcessFile(sourceText: string, readImportFiles?: boolean, detectJavaScriptImports?: boolean): PreProcessedFileInfo; function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry): LanguageService; diff --git a/lib/typescriptServices.js b/lib/typescriptServices.js index 6608f585b61..bbe9a4b07e3 100644 --- a/lib/typescriptServices.js +++ b/lib/typescriptServices.js @@ -163,182 +163,183 @@ var ts; SyntaxKind[SyntaxKind["SymbolKeyword"] = 131] = "SymbolKeyword"; SyntaxKind[SyntaxKind["TypeKeyword"] = 132] = "TypeKeyword"; SyntaxKind[SyntaxKind["FromKeyword"] = 133] = "FromKeyword"; - SyntaxKind[SyntaxKind["OfKeyword"] = 134] = "OfKeyword"; + SyntaxKind[SyntaxKind["GlobalKeyword"] = 134] = "GlobalKeyword"; + SyntaxKind[SyntaxKind["OfKeyword"] = 135] = "OfKeyword"; // Parse tree nodes // Names - SyntaxKind[SyntaxKind["QualifiedName"] = 135] = "QualifiedName"; - SyntaxKind[SyntaxKind["ComputedPropertyName"] = 136] = "ComputedPropertyName"; + SyntaxKind[SyntaxKind["QualifiedName"] = 136] = "QualifiedName"; + SyntaxKind[SyntaxKind["ComputedPropertyName"] = 137] = "ComputedPropertyName"; // Signature elements - SyntaxKind[SyntaxKind["TypeParameter"] = 137] = "TypeParameter"; - SyntaxKind[SyntaxKind["Parameter"] = 138] = "Parameter"; - SyntaxKind[SyntaxKind["Decorator"] = 139] = "Decorator"; + SyntaxKind[SyntaxKind["TypeParameter"] = 138] = "TypeParameter"; + SyntaxKind[SyntaxKind["Parameter"] = 139] = "Parameter"; + SyntaxKind[SyntaxKind["Decorator"] = 140] = "Decorator"; // TypeMember - SyntaxKind[SyntaxKind["PropertySignature"] = 140] = "PropertySignature"; - SyntaxKind[SyntaxKind["PropertyDeclaration"] = 141] = "PropertyDeclaration"; - SyntaxKind[SyntaxKind["MethodSignature"] = 142] = "MethodSignature"; - SyntaxKind[SyntaxKind["MethodDeclaration"] = 143] = "MethodDeclaration"; - SyntaxKind[SyntaxKind["Constructor"] = 144] = "Constructor"; - SyntaxKind[SyntaxKind["GetAccessor"] = 145] = "GetAccessor"; - SyntaxKind[SyntaxKind["SetAccessor"] = 146] = "SetAccessor"; - SyntaxKind[SyntaxKind["CallSignature"] = 147] = "CallSignature"; - SyntaxKind[SyntaxKind["ConstructSignature"] = 148] = "ConstructSignature"; - SyntaxKind[SyntaxKind["IndexSignature"] = 149] = "IndexSignature"; + SyntaxKind[SyntaxKind["PropertySignature"] = 141] = "PropertySignature"; + SyntaxKind[SyntaxKind["PropertyDeclaration"] = 142] = "PropertyDeclaration"; + SyntaxKind[SyntaxKind["MethodSignature"] = 143] = "MethodSignature"; + SyntaxKind[SyntaxKind["MethodDeclaration"] = 144] = "MethodDeclaration"; + SyntaxKind[SyntaxKind["Constructor"] = 145] = "Constructor"; + SyntaxKind[SyntaxKind["GetAccessor"] = 146] = "GetAccessor"; + SyntaxKind[SyntaxKind["SetAccessor"] = 147] = "SetAccessor"; + SyntaxKind[SyntaxKind["CallSignature"] = 148] = "CallSignature"; + SyntaxKind[SyntaxKind["ConstructSignature"] = 149] = "ConstructSignature"; + SyntaxKind[SyntaxKind["IndexSignature"] = 150] = "IndexSignature"; // Type - SyntaxKind[SyntaxKind["TypePredicate"] = 150] = "TypePredicate"; - SyntaxKind[SyntaxKind["TypeReference"] = 151] = "TypeReference"; - SyntaxKind[SyntaxKind["FunctionType"] = 152] = "FunctionType"; - SyntaxKind[SyntaxKind["ConstructorType"] = 153] = "ConstructorType"; - SyntaxKind[SyntaxKind["TypeQuery"] = 154] = "TypeQuery"; - SyntaxKind[SyntaxKind["TypeLiteral"] = 155] = "TypeLiteral"; - SyntaxKind[SyntaxKind["ArrayType"] = 156] = "ArrayType"; - SyntaxKind[SyntaxKind["TupleType"] = 157] = "TupleType"; - SyntaxKind[SyntaxKind["UnionType"] = 158] = "UnionType"; - SyntaxKind[SyntaxKind["IntersectionType"] = 159] = "IntersectionType"; - SyntaxKind[SyntaxKind["ParenthesizedType"] = 160] = "ParenthesizedType"; - SyntaxKind[SyntaxKind["ThisType"] = 161] = "ThisType"; - SyntaxKind[SyntaxKind["StringLiteralType"] = 162] = "StringLiteralType"; + SyntaxKind[SyntaxKind["TypePredicate"] = 151] = "TypePredicate"; + SyntaxKind[SyntaxKind["TypeReference"] = 152] = "TypeReference"; + SyntaxKind[SyntaxKind["FunctionType"] = 153] = "FunctionType"; + SyntaxKind[SyntaxKind["ConstructorType"] = 154] = "ConstructorType"; + SyntaxKind[SyntaxKind["TypeQuery"] = 155] = "TypeQuery"; + SyntaxKind[SyntaxKind["TypeLiteral"] = 156] = "TypeLiteral"; + SyntaxKind[SyntaxKind["ArrayType"] = 157] = "ArrayType"; + SyntaxKind[SyntaxKind["TupleType"] = 158] = "TupleType"; + SyntaxKind[SyntaxKind["UnionType"] = 159] = "UnionType"; + SyntaxKind[SyntaxKind["IntersectionType"] = 160] = "IntersectionType"; + SyntaxKind[SyntaxKind["ParenthesizedType"] = 161] = "ParenthesizedType"; + SyntaxKind[SyntaxKind["ThisType"] = 162] = "ThisType"; + SyntaxKind[SyntaxKind["StringLiteralType"] = 163] = "StringLiteralType"; // Binding patterns - SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 163] = "ObjectBindingPattern"; - SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 164] = "ArrayBindingPattern"; - SyntaxKind[SyntaxKind["BindingElement"] = 165] = "BindingElement"; + SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 164] = "ObjectBindingPattern"; + SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 165] = "ArrayBindingPattern"; + SyntaxKind[SyntaxKind["BindingElement"] = 166] = "BindingElement"; // Expression - SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 166] = "ArrayLiteralExpression"; - SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 167] = "ObjectLiteralExpression"; - SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 168] = "PropertyAccessExpression"; - SyntaxKind[SyntaxKind["ElementAccessExpression"] = 169] = "ElementAccessExpression"; - SyntaxKind[SyntaxKind["CallExpression"] = 170] = "CallExpression"; - SyntaxKind[SyntaxKind["NewExpression"] = 171] = "NewExpression"; - SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 172] = "TaggedTemplateExpression"; - SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 173] = "TypeAssertionExpression"; - SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 174] = "ParenthesizedExpression"; - SyntaxKind[SyntaxKind["FunctionExpression"] = 175] = "FunctionExpression"; - SyntaxKind[SyntaxKind["ArrowFunction"] = 176] = "ArrowFunction"; - SyntaxKind[SyntaxKind["DeleteExpression"] = 177] = "DeleteExpression"; - SyntaxKind[SyntaxKind["TypeOfExpression"] = 178] = "TypeOfExpression"; - SyntaxKind[SyntaxKind["VoidExpression"] = 179] = "VoidExpression"; - SyntaxKind[SyntaxKind["AwaitExpression"] = 180] = "AwaitExpression"; - SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 181] = "PrefixUnaryExpression"; - SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 182] = "PostfixUnaryExpression"; - SyntaxKind[SyntaxKind["BinaryExpression"] = 183] = "BinaryExpression"; - SyntaxKind[SyntaxKind["ConditionalExpression"] = 184] = "ConditionalExpression"; - SyntaxKind[SyntaxKind["TemplateExpression"] = 185] = "TemplateExpression"; - SyntaxKind[SyntaxKind["YieldExpression"] = 186] = "YieldExpression"; - SyntaxKind[SyntaxKind["SpreadElementExpression"] = 187] = "SpreadElementExpression"; - SyntaxKind[SyntaxKind["ClassExpression"] = 188] = "ClassExpression"; - SyntaxKind[SyntaxKind["OmittedExpression"] = 189] = "OmittedExpression"; - SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 190] = "ExpressionWithTypeArguments"; - SyntaxKind[SyntaxKind["AsExpression"] = 191] = "AsExpression"; + SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 167] = "ArrayLiteralExpression"; + SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 168] = "ObjectLiteralExpression"; + SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 169] = "PropertyAccessExpression"; + SyntaxKind[SyntaxKind["ElementAccessExpression"] = 170] = "ElementAccessExpression"; + SyntaxKind[SyntaxKind["CallExpression"] = 171] = "CallExpression"; + SyntaxKind[SyntaxKind["NewExpression"] = 172] = "NewExpression"; + SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 173] = "TaggedTemplateExpression"; + SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 174] = "TypeAssertionExpression"; + SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 175] = "ParenthesizedExpression"; + SyntaxKind[SyntaxKind["FunctionExpression"] = 176] = "FunctionExpression"; + SyntaxKind[SyntaxKind["ArrowFunction"] = 177] = "ArrowFunction"; + SyntaxKind[SyntaxKind["DeleteExpression"] = 178] = "DeleteExpression"; + SyntaxKind[SyntaxKind["TypeOfExpression"] = 179] = "TypeOfExpression"; + SyntaxKind[SyntaxKind["VoidExpression"] = 180] = "VoidExpression"; + SyntaxKind[SyntaxKind["AwaitExpression"] = 181] = "AwaitExpression"; + SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 182] = "PrefixUnaryExpression"; + SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 183] = "PostfixUnaryExpression"; + SyntaxKind[SyntaxKind["BinaryExpression"] = 184] = "BinaryExpression"; + SyntaxKind[SyntaxKind["ConditionalExpression"] = 185] = "ConditionalExpression"; + SyntaxKind[SyntaxKind["TemplateExpression"] = 186] = "TemplateExpression"; + SyntaxKind[SyntaxKind["YieldExpression"] = 187] = "YieldExpression"; + SyntaxKind[SyntaxKind["SpreadElementExpression"] = 188] = "SpreadElementExpression"; + SyntaxKind[SyntaxKind["ClassExpression"] = 189] = "ClassExpression"; + SyntaxKind[SyntaxKind["OmittedExpression"] = 190] = "OmittedExpression"; + SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 191] = "ExpressionWithTypeArguments"; + SyntaxKind[SyntaxKind["AsExpression"] = 192] = "AsExpression"; // Misc - SyntaxKind[SyntaxKind["TemplateSpan"] = 192] = "TemplateSpan"; - SyntaxKind[SyntaxKind["SemicolonClassElement"] = 193] = "SemicolonClassElement"; + SyntaxKind[SyntaxKind["TemplateSpan"] = 193] = "TemplateSpan"; + SyntaxKind[SyntaxKind["SemicolonClassElement"] = 194] = "SemicolonClassElement"; // Element - SyntaxKind[SyntaxKind["Block"] = 194] = "Block"; - SyntaxKind[SyntaxKind["VariableStatement"] = 195] = "VariableStatement"; - SyntaxKind[SyntaxKind["EmptyStatement"] = 196] = "EmptyStatement"; - SyntaxKind[SyntaxKind["ExpressionStatement"] = 197] = "ExpressionStatement"; - SyntaxKind[SyntaxKind["IfStatement"] = 198] = "IfStatement"; - SyntaxKind[SyntaxKind["DoStatement"] = 199] = "DoStatement"; - SyntaxKind[SyntaxKind["WhileStatement"] = 200] = "WhileStatement"; - SyntaxKind[SyntaxKind["ForStatement"] = 201] = "ForStatement"; - SyntaxKind[SyntaxKind["ForInStatement"] = 202] = "ForInStatement"; - SyntaxKind[SyntaxKind["ForOfStatement"] = 203] = "ForOfStatement"; - SyntaxKind[SyntaxKind["ContinueStatement"] = 204] = "ContinueStatement"; - SyntaxKind[SyntaxKind["BreakStatement"] = 205] = "BreakStatement"; - SyntaxKind[SyntaxKind["ReturnStatement"] = 206] = "ReturnStatement"; - SyntaxKind[SyntaxKind["WithStatement"] = 207] = "WithStatement"; - SyntaxKind[SyntaxKind["SwitchStatement"] = 208] = "SwitchStatement"; - SyntaxKind[SyntaxKind["LabeledStatement"] = 209] = "LabeledStatement"; - SyntaxKind[SyntaxKind["ThrowStatement"] = 210] = "ThrowStatement"; - SyntaxKind[SyntaxKind["TryStatement"] = 211] = "TryStatement"; - SyntaxKind[SyntaxKind["DebuggerStatement"] = 212] = "DebuggerStatement"; - SyntaxKind[SyntaxKind["VariableDeclaration"] = 213] = "VariableDeclaration"; - SyntaxKind[SyntaxKind["VariableDeclarationList"] = 214] = "VariableDeclarationList"; - SyntaxKind[SyntaxKind["FunctionDeclaration"] = 215] = "FunctionDeclaration"; - SyntaxKind[SyntaxKind["ClassDeclaration"] = 216] = "ClassDeclaration"; - SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 217] = "InterfaceDeclaration"; - SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 218] = "TypeAliasDeclaration"; - SyntaxKind[SyntaxKind["EnumDeclaration"] = 219] = "EnumDeclaration"; - SyntaxKind[SyntaxKind["ModuleDeclaration"] = 220] = "ModuleDeclaration"; - SyntaxKind[SyntaxKind["ModuleBlock"] = 221] = "ModuleBlock"; - SyntaxKind[SyntaxKind["CaseBlock"] = 222] = "CaseBlock"; - SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 223] = "ImportEqualsDeclaration"; - SyntaxKind[SyntaxKind["ImportDeclaration"] = 224] = "ImportDeclaration"; - SyntaxKind[SyntaxKind["ImportClause"] = 225] = "ImportClause"; - SyntaxKind[SyntaxKind["NamespaceImport"] = 226] = "NamespaceImport"; - SyntaxKind[SyntaxKind["NamedImports"] = 227] = "NamedImports"; - SyntaxKind[SyntaxKind["ImportSpecifier"] = 228] = "ImportSpecifier"; - SyntaxKind[SyntaxKind["ExportAssignment"] = 229] = "ExportAssignment"; - SyntaxKind[SyntaxKind["ExportDeclaration"] = 230] = "ExportDeclaration"; - SyntaxKind[SyntaxKind["NamedExports"] = 231] = "NamedExports"; - SyntaxKind[SyntaxKind["ExportSpecifier"] = 232] = "ExportSpecifier"; - SyntaxKind[SyntaxKind["MissingDeclaration"] = 233] = "MissingDeclaration"; + SyntaxKind[SyntaxKind["Block"] = 195] = "Block"; + SyntaxKind[SyntaxKind["VariableStatement"] = 196] = "VariableStatement"; + SyntaxKind[SyntaxKind["EmptyStatement"] = 197] = "EmptyStatement"; + SyntaxKind[SyntaxKind["ExpressionStatement"] = 198] = "ExpressionStatement"; + SyntaxKind[SyntaxKind["IfStatement"] = 199] = "IfStatement"; + SyntaxKind[SyntaxKind["DoStatement"] = 200] = "DoStatement"; + SyntaxKind[SyntaxKind["WhileStatement"] = 201] = "WhileStatement"; + SyntaxKind[SyntaxKind["ForStatement"] = 202] = "ForStatement"; + SyntaxKind[SyntaxKind["ForInStatement"] = 203] = "ForInStatement"; + SyntaxKind[SyntaxKind["ForOfStatement"] = 204] = "ForOfStatement"; + SyntaxKind[SyntaxKind["ContinueStatement"] = 205] = "ContinueStatement"; + SyntaxKind[SyntaxKind["BreakStatement"] = 206] = "BreakStatement"; + SyntaxKind[SyntaxKind["ReturnStatement"] = 207] = "ReturnStatement"; + SyntaxKind[SyntaxKind["WithStatement"] = 208] = "WithStatement"; + SyntaxKind[SyntaxKind["SwitchStatement"] = 209] = "SwitchStatement"; + SyntaxKind[SyntaxKind["LabeledStatement"] = 210] = "LabeledStatement"; + SyntaxKind[SyntaxKind["ThrowStatement"] = 211] = "ThrowStatement"; + SyntaxKind[SyntaxKind["TryStatement"] = 212] = "TryStatement"; + SyntaxKind[SyntaxKind["DebuggerStatement"] = 213] = "DebuggerStatement"; + SyntaxKind[SyntaxKind["VariableDeclaration"] = 214] = "VariableDeclaration"; + SyntaxKind[SyntaxKind["VariableDeclarationList"] = 215] = "VariableDeclarationList"; + SyntaxKind[SyntaxKind["FunctionDeclaration"] = 216] = "FunctionDeclaration"; + SyntaxKind[SyntaxKind["ClassDeclaration"] = 217] = "ClassDeclaration"; + SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 218] = "InterfaceDeclaration"; + SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 219] = "TypeAliasDeclaration"; + SyntaxKind[SyntaxKind["EnumDeclaration"] = 220] = "EnumDeclaration"; + SyntaxKind[SyntaxKind["ModuleDeclaration"] = 221] = "ModuleDeclaration"; + SyntaxKind[SyntaxKind["ModuleBlock"] = 222] = "ModuleBlock"; + SyntaxKind[SyntaxKind["CaseBlock"] = 223] = "CaseBlock"; + SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 224] = "ImportEqualsDeclaration"; + SyntaxKind[SyntaxKind["ImportDeclaration"] = 225] = "ImportDeclaration"; + SyntaxKind[SyntaxKind["ImportClause"] = 226] = "ImportClause"; + SyntaxKind[SyntaxKind["NamespaceImport"] = 227] = "NamespaceImport"; + SyntaxKind[SyntaxKind["NamedImports"] = 228] = "NamedImports"; + SyntaxKind[SyntaxKind["ImportSpecifier"] = 229] = "ImportSpecifier"; + SyntaxKind[SyntaxKind["ExportAssignment"] = 230] = "ExportAssignment"; + SyntaxKind[SyntaxKind["ExportDeclaration"] = 231] = "ExportDeclaration"; + SyntaxKind[SyntaxKind["NamedExports"] = 232] = "NamedExports"; + SyntaxKind[SyntaxKind["ExportSpecifier"] = 233] = "ExportSpecifier"; + SyntaxKind[SyntaxKind["MissingDeclaration"] = 234] = "MissingDeclaration"; // Module references - SyntaxKind[SyntaxKind["ExternalModuleReference"] = 234] = "ExternalModuleReference"; + SyntaxKind[SyntaxKind["ExternalModuleReference"] = 235] = "ExternalModuleReference"; // JSX - SyntaxKind[SyntaxKind["JsxElement"] = 235] = "JsxElement"; - SyntaxKind[SyntaxKind["JsxSelfClosingElement"] = 236] = "JsxSelfClosingElement"; - SyntaxKind[SyntaxKind["JsxOpeningElement"] = 237] = "JsxOpeningElement"; - SyntaxKind[SyntaxKind["JsxText"] = 238] = "JsxText"; - SyntaxKind[SyntaxKind["JsxClosingElement"] = 239] = "JsxClosingElement"; - SyntaxKind[SyntaxKind["JsxAttribute"] = 240] = "JsxAttribute"; - SyntaxKind[SyntaxKind["JsxSpreadAttribute"] = 241] = "JsxSpreadAttribute"; - SyntaxKind[SyntaxKind["JsxExpression"] = 242] = "JsxExpression"; + SyntaxKind[SyntaxKind["JsxElement"] = 236] = "JsxElement"; + SyntaxKind[SyntaxKind["JsxSelfClosingElement"] = 237] = "JsxSelfClosingElement"; + SyntaxKind[SyntaxKind["JsxOpeningElement"] = 238] = "JsxOpeningElement"; + SyntaxKind[SyntaxKind["JsxText"] = 239] = "JsxText"; + SyntaxKind[SyntaxKind["JsxClosingElement"] = 240] = "JsxClosingElement"; + SyntaxKind[SyntaxKind["JsxAttribute"] = 241] = "JsxAttribute"; + SyntaxKind[SyntaxKind["JsxSpreadAttribute"] = 242] = "JsxSpreadAttribute"; + SyntaxKind[SyntaxKind["JsxExpression"] = 243] = "JsxExpression"; // Clauses - SyntaxKind[SyntaxKind["CaseClause"] = 243] = "CaseClause"; - SyntaxKind[SyntaxKind["DefaultClause"] = 244] = "DefaultClause"; - SyntaxKind[SyntaxKind["HeritageClause"] = 245] = "HeritageClause"; - SyntaxKind[SyntaxKind["CatchClause"] = 246] = "CatchClause"; + SyntaxKind[SyntaxKind["CaseClause"] = 244] = "CaseClause"; + SyntaxKind[SyntaxKind["DefaultClause"] = 245] = "DefaultClause"; + SyntaxKind[SyntaxKind["HeritageClause"] = 246] = "HeritageClause"; + SyntaxKind[SyntaxKind["CatchClause"] = 247] = "CatchClause"; // Property assignments - SyntaxKind[SyntaxKind["PropertyAssignment"] = 247] = "PropertyAssignment"; - SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 248] = "ShorthandPropertyAssignment"; + SyntaxKind[SyntaxKind["PropertyAssignment"] = 248] = "PropertyAssignment"; + SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 249] = "ShorthandPropertyAssignment"; // Enum - SyntaxKind[SyntaxKind["EnumMember"] = 249] = "EnumMember"; + SyntaxKind[SyntaxKind["EnumMember"] = 250] = "EnumMember"; // Top-level nodes - SyntaxKind[SyntaxKind["SourceFile"] = 250] = "SourceFile"; + SyntaxKind[SyntaxKind["SourceFile"] = 251] = "SourceFile"; // JSDoc nodes. - SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 251] = "JSDocTypeExpression"; + SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 252] = "JSDocTypeExpression"; // The * type. - SyntaxKind[SyntaxKind["JSDocAllType"] = 252] = "JSDocAllType"; + SyntaxKind[SyntaxKind["JSDocAllType"] = 253] = "JSDocAllType"; // The ? type. - SyntaxKind[SyntaxKind["JSDocUnknownType"] = 253] = "JSDocUnknownType"; - SyntaxKind[SyntaxKind["JSDocArrayType"] = 254] = "JSDocArrayType"; - SyntaxKind[SyntaxKind["JSDocUnionType"] = 255] = "JSDocUnionType"; - SyntaxKind[SyntaxKind["JSDocTupleType"] = 256] = "JSDocTupleType"; - SyntaxKind[SyntaxKind["JSDocNullableType"] = 257] = "JSDocNullableType"; - SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 258] = "JSDocNonNullableType"; - SyntaxKind[SyntaxKind["JSDocRecordType"] = 259] = "JSDocRecordType"; - SyntaxKind[SyntaxKind["JSDocRecordMember"] = 260] = "JSDocRecordMember"; - SyntaxKind[SyntaxKind["JSDocTypeReference"] = 261] = "JSDocTypeReference"; - SyntaxKind[SyntaxKind["JSDocOptionalType"] = 262] = "JSDocOptionalType"; - SyntaxKind[SyntaxKind["JSDocFunctionType"] = 263] = "JSDocFunctionType"; - SyntaxKind[SyntaxKind["JSDocVariadicType"] = 264] = "JSDocVariadicType"; - SyntaxKind[SyntaxKind["JSDocConstructorType"] = 265] = "JSDocConstructorType"; - SyntaxKind[SyntaxKind["JSDocThisType"] = 266] = "JSDocThisType"; - SyntaxKind[SyntaxKind["JSDocComment"] = 267] = "JSDocComment"; - SyntaxKind[SyntaxKind["JSDocTag"] = 268] = "JSDocTag"; - SyntaxKind[SyntaxKind["JSDocParameterTag"] = 269] = "JSDocParameterTag"; - SyntaxKind[SyntaxKind["JSDocReturnTag"] = 270] = "JSDocReturnTag"; - SyntaxKind[SyntaxKind["JSDocTypeTag"] = 271] = "JSDocTypeTag"; - SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 272] = "JSDocTemplateTag"; + SyntaxKind[SyntaxKind["JSDocUnknownType"] = 254] = "JSDocUnknownType"; + SyntaxKind[SyntaxKind["JSDocArrayType"] = 255] = "JSDocArrayType"; + SyntaxKind[SyntaxKind["JSDocUnionType"] = 256] = "JSDocUnionType"; + SyntaxKind[SyntaxKind["JSDocTupleType"] = 257] = "JSDocTupleType"; + SyntaxKind[SyntaxKind["JSDocNullableType"] = 258] = "JSDocNullableType"; + SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 259] = "JSDocNonNullableType"; + SyntaxKind[SyntaxKind["JSDocRecordType"] = 260] = "JSDocRecordType"; + SyntaxKind[SyntaxKind["JSDocRecordMember"] = 261] = "JSDocRecordMember"; + SyntaxKind[SyntaxKind["JSDocTypeReference"] = 262] = "JSDocTypeReference"; + SyntaxKind[SyntaxKind["JSDocOptionalType"] = 263] = "JSDocOptionalType"; + SyntaxKind[SyntaxKind["JSDocFunctionType"] = 264] = "JSDocFunctionType"; + SyntaxKind[SyntaxKind["JSDocVariadicType"] = 265] = "JSDocVariadicType"; + SyntaxKind[SyntaxKind["JSDocConstructorType"] = 266] = "JSDocConstructorType"; + SyntaxKind[SyntaxKind["JSDocThisType"] = 267] = "JSDocThisType"; + SyntaxKind[SyntaxKind["JSDocComment"] = 268] = "JSDocComment"; + SyntaxKind[SyntaxKind["JSDocTag"] = 269] = "JSDocTag"; + SyntaxKind[SyntaxKind["JSDocParameterTag"] = 270] = "JSDocParameterTag"; + SyntaxKind[SyntaxKind["JSDocReturnTag"] = 271] = "JSDocReturnTag"; + SyntaxKind[SyntaxKind["JSDocTypeTag"] = 272] = "JSDocTypeTag"; + SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 273] = "JSDocTemplateTag"; // Synthesized list - SyntaxKind[SyntaxKind["SyntaxList"] = 273] = "SyntaxList"; + SyntaxKind[SyntaxKind["SyntaxList"] = 274] = "SyntaxList"; // Enum value count - SyntaxKind[SyntaxKind["Count"] = 274] = "Count"; + SyntaxKind[SyntaxKind["Count"] = 275] = "Count"; // Markers SyntaxKind[SyntaxKind["FirstAssignment"] = 56] = "FirstAssignment"; SyntaxKind[SyntaxKind["LastAssignment"] = 68] = "LastAssignment"; SyntaxKind[SyntaxKind["FirstReservedWord"] = 70] = "FirstReservedWord"; SyntaxKind[SyntaxKind["LastReservedWord"] = 105] = "LastReservedWord"; SyntaxKind[SyntaxKind["FirstKeyword"] = 70] = "FirstKeyword"; - SyntaxKind[SyntaxKind["LastKeyword"] = 134] = "LastKeyword"; + SyntaxKind[SyntaxKind["LastKeyword"] = 135] = "LastKeyword"; SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 106] = "FirstFutureReservedWord"; SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 114] = "LastFutureReservedWord"; - SyntaxKind[SyntaxKind["FirstTypeNode"] = 150] = "FirstTypeNode"; - SyntaxKind[SyntaxKind["LastTypeNode"] = 162] = "LastTypeNode"; + SyntaxKind[SyntaxKind["FirstTypeNode"] = 151] = "FirstTypeNode"; + SyntaxKind[SyntaxKind["LastTypeNode"] = 163] = "LastTypeNode"; SyntaxKind[SyntaxKind["FirstPunctuation"] = 15] = "FirstPunctuation"; SyntaxKind[SyntaxKind["LastPunctuation"] = 68] = "LastPunctuation"; SyntaxKind[SyntaxKind["FirstToken"] = 0] = "FirstToken"; - SyntaxKind[SyntaxKind["LastToken"] = 134] = "LastToken"; + SyntaxKind[SyntaxKind["LastToken"] = 135] = "LastToken"; SyntaxKind[SyntaxKind["FirstTriviaToken"] = 2] = "FirstTriviaToken"; SyntaxKind[SyntaxKind["LastTriviaToken"] = 7] = "LastTriviaToken"; SyntaxKind[SyntaxKind["FirstLiteralToken"] = 8] = "FirstLiteralToken"; @@ -347,7 +348,7 @@ var ts; SyntaxKind[SyntaxKind["LastTemplateToken"] = 14] = "LastTemplateToken"; SyntaxKind[SyntaxKind["FirstBinaryOperator"] = 25] = "FirstBinaryOperator"; SyntaxKind[SyntaxKind["LastBinaryOperator"] = 68] = "LastBinaryOperator"; - SyntaxKind[SyntaxKind["FirstNode"] = 135] = "FirstNode"; + SyntaxKind[SyntaxKind["FirstNode"] = 136] = "FirstNode"; })(ts.SyntaxKind || (ts.SyntaxKind = {})); var SyntaxKind = ts.SyntaxKind; (function (NodeFlags) { @@ -372,10 +373,16 @@ var ts; NodeFlags[NodeFlags["ContainsThis"] = 262144] = "ContainsThis"; NodeFlags[NodeFlags["HasImplicitReturn"] = 524288] = "HasImplicitReturn"; NodeFlags[NodeFlags["HasExplicitReturn"] = 1048576] = "HasExplicitReturn"; + NodeFlags[NodeFlags["GlobalAugmentation"] = 2097152] = "GlobalAugmentation"; + NodeFlags[NodeFlags["HasClassExtends"] = 4194304] = "HasClassExtends"; + NodeFlags[NodeFlags["HasDecorators"] = 8388608] = "HasDecorators"; + NodeFlags[NodeFlags["HasParamDecorators"] = 16777216] = "HasParamDecorators"; + NodeFlags[NodeFlags["HasAsyncFunctions"] = 33554432] = "HasAsyncFunctions"; NodeFlags[NodeFlags["Modifier"] = 1022] = "Modifier"; NodeFlags[NodeFlags["AccessibilityModifier"] = 56] = "AccessibilityModifier"; NodeFlags[NodeFlags["BlockScoped"] = 24576] = "BlockScoped"; NodeFlags[NodeFlags["ReachabilityCheckFlags"] = 1572864] = "ReachabilityCheckFlags"; + NodeFlags[NodeFlags["EmitHelperFlags"] = 62914560] = "EmitHelperFlags"; })(ts.NodeFlags || (ts.NodeFlags = {})); var NodeFlags = ts.NodeFlags; /* @internal */ @@ -584,11 +591,6 @@ var ts; NodeCheckFlags[NodeCheckFlags["TypeChecked"] = 1] = "TypeChecked"; NodeCheckFlags[NodeCheckFlags["LexicalThis"] = 2] = "LexicalThis"; NodeCheckFlags[NodeCheckFlags["CaptureThis"] = 4] = "CaptureThis"; - NodeCheckFlags[NodeCheckFlags["EmitExtends"] = 8] = "EmitExtends"; - NodeCheckFlags[NodeCheckFlags["EmitDecorate"] = 16] = "EmitDecorate"; - NodeCheckFlags[NodeCheckFlags["EmitParam"] = 32] = "EmitParam"; - NodeCheckFlags[NodeCheckFlags["EmitAwaiter"] = 64] = "EmitAwaiter"; - NodeCheckFlags[NodeCheckFlags["EmitGenerator"] = 128] = "EmitGenerator"; NodeCheckFlags[NodeCheckFlags["SuperInstance"] = 256] = "SuperInstance"; NodeCheckFlags[NodeCheckFlags["SuperStatic"] = 512] = "SuperStatic"; NodeCheckFlags[NodeCheckFlags["ContextChecked"] = 1024] = "ContextChecked"; @@ -1532,7 +1534,8 @@ var ts; directoryComponents.length--; } // Find the component that differs - for (var joinStartIndex = 0; joinStartIndex < pathComponents.length && joinStartIndex < directoryComponents.length; joinStartIndex++) { + var joinStartIndex; + for (joinStartIndex = 0; joinStartIndex < pathComponents.length && joinStartIndex < directoryComponents.length; joinStartIndex++) { if (getCanonicalFileName(directoryComponents[joinStartIndex]) !== getCanonicalFileName(pathComponents[joinStartIndex])) { break; } @@ -1681,6 +1684,12 @@ var ts; return copiedList; } ts.copyListRemovingItem = copyListRemovingItem; + function createGetCanonicalFileName(useCaseSensitivefileNames) { + return useCaseSensitivefileNames + ? (function (fileName) { return fileName; }) + : (function (fileName) { return fileName.toLowerCase(); }); + } + ts.createGetCanonicalFileName = createGetCanonicalFileName; })(ts || (ts = {})); /// var ts; @@ -1829,7 +1838,7 @@ var ts; var _os = require("os"); // average async stat takes about 30 microseconds // set chunk size to do 30 files in < 1 millisecond - function createWatchedFileSet(interval, chunkSize) { + function createPollingWatchedFileSet(interval, chunkSize) { if (interval === void 0) { interval = 2500; } if (chunkSize === void 0) { chunkSize = 30; } var watchedFiles = []; @@ -1843,13 +1852,13 @@ var ts; if (!watchedFile) { return; } - _fs.stat(watchedFile.fileName, function (err, stats) { + _fs.stat(watchedFile.filePath, function (err, stats) { if (err) { - watchedFile.callback(watchedFile.fileName); + watchedFile.callback(watchedFile.filePath); } else if (watchedFile.mtime.getTime() !== stats.mtime.getTime()) { - watchedFile.mtime = getModifiedTime(watchedFile.fileName); - watchedFile.callback(watchedFile.fileName, watchedFile.mtime.getTime() === 0); + watchedFile.mtime = getModifiedTime(watchedFile.filePath); + watchedFile.callback(watchedFile.filePath, watchedFile.mtime.getTime() === 0); } }); } @@ -1875,11 +1884,11 @@ var ts; nextFileToCheck = nextToCheck; }, interval); } - function addFile(fileName, callback) { + function addFile(filePath, callback) { var file = { - fileName: fileName, + filePath: filePath, callback: callback, - mtime: getModifiedTime(fileName) + mtime: getModifiedTime(filePath) }; watchedFiles.push(file); if (watchedFiles.length === 1) { @@ -1898,6 +1907,77 @@ var ts; removeFile: removeFile }; } + function createWatchedFileSet() { + var dirWatchers = ts.createFileMap(); + // One file can have multiple watchers + var fileWatcherCallbacks = ts.createFileMap(); + return { addFile: addFile, removeFile: removeFile }; + function reduceDirWatcherRefCountForFile(filePath) { + var dirPath = ts.getDirectoryPath(filePath); + if (dirWatchers.contains(dirPath)) { + var watcher = dirWatchers.get(dirPath); + watcher.referenceCount -= 1; + if (watcher.referenceCount <= 0) { + watcher.close(); + dirWatchers.remove(dirPath); + } + } + } + function addDirWatcher(dirPath) { + if (dirWatchers.contains(dirPath)) { + var watcher_1 = dirWatchers.get(dirPath); + watcher_1.referenceCount += 1; + return; + } + var watcher = _fs.watch(dirPath, { persistent: true }, function (eventName, relativeFileName) { return fileEventHandler(eventName, relativeFileName, dirPath); }); + watcher.referenceCount = 1; + dirWatchers.set(dirPath, watcher); + return; + } + function addFileWatcherCallback(filePath, callback) { + if (fileWatcherCallbacks.contains(filePath)) { + fileWatcherCallbacks.get(filePath).push(callback); + } + else { + fileWatcherCallbacks.set(filePath, [callback]); + } + } + function addFile(filePath, callback) { + addFileWatcherCallback(filePath, callback); + addDirWatcher(ts.getDirectoryPath(filePath)); + return { filePath: filePath, callback: callback }; + } + function removeFile(watchedFile) { + removeFileWatcherCallback(watchedFile.filePath, watchedFile.callback); + reduceDirWatcherRefCountForFile(watchedFile.filePath); + } + function removeFileWatcherCallback(filePath, callback) { + if (fileWatcherCallbacks.contains(filePath)) { + var newCallbacks = ts.copyListRemovingItem(callback, fileWatcherCallbacks.get(filePath)); + if (newCallbacks.length === 0) { + fileWatcherCallbacks.remove(filePath); + } + else { + fileWatcherCallbacks.set(filePath, newCallbacks); + } + } + } + /** + * @param watcherPath is the path from which the watcher is triggered. + */ + function fileEventHandler(eventName, relativeFileName, baseDirPath) { + // When files are deleted from disk, the triggered "rename" event would have a relativefileName of "undefined" + var filePath = typeof relativeFileName !== "string" + ? undefined + : ts.toPath(relativeFileName, baseDirPath, ts.createGetCanonicalFileName(ts.sys.useCaseSensitiveFileNames)); + if (eventName === "change" && fileWatcherCallbacks.contains(filePath)) { + for (var _i = 0, _a = fileWatcherCallbacks.get(filePath); _i < _a.length; _i++) { + var fileCallback = _a[_i]; + fileCallback(filePath); + } + } + } + } // REVIEW: for now this implementation uses polling. // The advantage of polling is that it works reliably // on all os and with network mounted files. @@ -1911,7 +1991,11 @@ var ts; // changes for large reference sets? If so, do we want // to increase the chunk size or decrease the interval // time dynamically to match the large reference set? + var pollingWatchedFileSet = createPollingWatchedFileSet(); var watchedFileSet = createWatchedFileSet(); + function isNode4OrLater() { + return parseInt(process.version.charAt(1)) >= 4; + } var platform = _os.platform(); // win32\win64 are case insensitive platforms, MacOS (darwin) by default is also case insensitive var useCaseSensitiveFileNames = platform !== "win32" && platform !== "win64" && platform !== "darwin"; @@ -1960,7 +2044,7 @@ var ts; } } function getCanonicalPath(path) { - return useCaseSensitiveFileNames ? path.toLowerCase() : path; + return useCaseSensitiveFileNames ? path : path.toLowerCase(); } function readDirectory(path, extension, exclude) { var result = []; @@ -2000,20 +2084,28 @@ var ts; }, readFile: readFile, writeFile: writeFile, - watchFile: function (fileName, callback) { + watchFile: function (filePath, callback) { // Node 4.0 stablized the `fs.watch` function on Windows which avoids polling // and is more efficient than `fs.watchFile` (ref: https://github.com/nodejs/node/pull/2649 // and https://github.com/Microsoft/TypeScript/issues/4643), therefore // if the current node.js version is newer than 4, use `fs.watch` instead. - var watchedFile = watchedFileSet.addFile(fileName, callback); + var watchSet = isNode4OrLater() ? watchedFileSet : pollingWatchedFileSet; + var watchedFile = watchSet.addFile(filePath, callback); return { - close: function () { return watchedFileSet.removeFile(watchedFile); } + close: function () { return watchSet.removeFile(watchedFile); } }; }, watchDirectory: function (path, callback, recursive) { // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows // (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643) - return _fs.watch(path, { persistent: true, recursive: !!recursive }, function (eventName, relativeFileName) { + var options; + if (isNode4OrLater() && (process.platform === "win32" || process.platform === "darwin")) { + options = { persistent: true, recursive: !!recursive }; + } + else { + options = { persistent: true }; + } + return _fs.watch(path, options, function (eventName, relativeFileName) { // In watchDirectory we only care about adding and removing files (when event name is // "rename"); changes made within files are handled by corresponding fileWatchers (when // event name is "change") @@ -2283,7 +2375,6 @@ var ts; Cannot_find_parameter_0: { code: 1225, category: ts.DiagnosticCategory.Error, key: "Cannot_find_parameter_0_1225", message: "Cannot find parameter '{0}'." }, Type_predicate_0_is_not_assignable_to_1: { code: 1226, category: ts.DiagnosticCategory.Error, key: "Type_predicate_0_is_not_assignable_to_1_1226", message: "Type predicate '{0}' is not assignable to '{1}'." }, Parameter_0_is_not_in_the_same_position_as_parameter_1: { code: 1227, category: ts.DiagnosticCategory.Error, key: "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227", message: "Parameter '{0}' is not in the same position as parameter '{1}'." }, - A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods: { code: 1228, category: ts.DiagnosticCategory.Error, key: "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228", message: "A type predicate is only allowed in return type position for functions and methods." }, A_type_predicate_cannot_reference_a_rest_parameter: { code: 1229, category: ts.DiagnosticCategory.Error, key: "A_type_predicate_cannot_reference_a_rest_parameter_1229", message: "A type predicate cannot reference a rest parameter." }, A_type_predicate_cannot_reference_element_0_in_a_binding_pattern: { code: 1230, category: ts.DiagnosticCategory.Error, key: "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230", message: "A type predicate cannot reference element '{0}' in a binding pattern." }, An_export_assignment_can_only_be_used_in_a_module: { code: 1231, category: ts.DiagnosticCategory.Error, key: "An_export_assignment_can_only_be_used_in_a_module_1231", message: "An export assignment can only be used in a module." }, @@ -2519,7 +2610,6 @@ var ts; All_declarations_of_an_abstract_method_must_be_consecutive: { code: 2516, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_an_abstract_method_must_be_consecutive_2516", message: "All declarations of an abstract method must be consecutive." }, Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type: { code: 2517, category: ts.DiagnosticCategory.Error, key: "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517", message: "Cannot assign an abstract constructor type to a non-abstract constructor type." }, A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard: { code: 2518, category: ts.DiagnosticCategory.Error, key: "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518", message: "A 'this'-based type guard is not compatible with a parameter-based type guard." }, - A_this_based_type_predicate_is_only_allowed_within_a_class_or_interface_s_members_get_accessors_or_return_type_positions_for_functions_and_methods: { code: 2519, category: ts.DiagnosticCategory.Error, key: "A_this_based_type_predicate_is_only_allowed_within_a_class_or_interface_s_members_get_accessors_or_r_2519", message: "A 'this'-based type predicate is only allowed within a class or interface's members, get accessors, or return type positions for functions and methods." }, Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: { code: 2520, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520", message: "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions." }, Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions: { code: 2521, category: ts.DiagnosticCategory.Error, key: "Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521", message: "Expression resolves to variable declaration '{0}' that compiler uses to support async functions." }, The_arguments_object_cannot_be_referenced_in_an_async_arrow_function_Consider_using_a_standard_async_function_expression: { code: 2522, category: ts.DiagnosticCategory.Error, key: "The_arguments_object_cannot_be_referenced_in_an_async_arrow_function_Consider_using_a_standard_async_2522", message: "The 'arguments' object cannot be referenced in an async arrow function. Consider using a standard async function expression." }, @@ -2548,6 +2638,16 @@ var ts; Type_0_provides_no_match_for_the_signature_1: { code: 2658, category: ts.DiagnosticCategory.Error, key: "Type_0_provides_no_match_for_the_signature_1_2658", message: "Type '{0}' provides no match for the signature '{1}'" }, super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher: { code: 2659, category: ts.DiagnosticCategory.Error, key: "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", message: "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher." }, super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions: { code: 2660, category: ts.DiagnosticCategory.Error, key: "super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660", message: "'super' can only be referenced in members of derived classes or object literal expressions." }, + Cannot_re_export_name_that_is_not_defined_in_the_module: { code: 2661, category: ts.DiagnosticCategory.Error, key: "Cannot_re_export_name_that_is_not_defined_in_the_module_2661", message: "Cannot re-export name that is not defined in the module." }, + Cannot_find_name_0_Did_you_mean_the_static_member_1_0: { code: 2662, category: ts.DiagnosticCategory.Error, key: "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662", message: "Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?" }, + Cannot_find_name_0_Did_you_mean_the_instance_member_this_0: { code: 2663, category: ts.DiagnosticCategory.Error, key: "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663", message: "Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?" }, + Invalid_module_name_in_augmentation_module_0_cannot_be_found: { code: 2664, category: ts.DiagnosticCategory.Error, key: "Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664", message: "Invalid module name in augmentation, module '{0}' cannot be found." }, + Module_augmentation_cannot_introduce_new_names_in_the_top_level_scope: { code: 2665, category: ts.DiagnosticCategory.Error, key: "Module_augmentation_cannot_introduce_new_names_in_the_top_level_scope_2665", message: "Module augmentation cannot introduce new names in the top level scope." }, + Exports_and_export_assignments_are_not_permitted_in_module_augmentations: { code: 2666, category: ts.DiagnosticCategory.Error, key: "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666", message: "Exports and export assignments are not permitted in module augmentations." }, + Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module: { code: 2667, category: ts.DiagnosticCategory.Error, key: "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667", message: "Imports are not permitted in module augmentations. Consider moving them to the enclosing external module." }, + export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible: { code: 2668, category: ts.DiagnosticCategory.Error, key: "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668", message: "'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible." }, + Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations: { code: 2669, category: ts.DiagnosticCategory.Error, key: "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669", message: "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations." }, + Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context: { code: 2670, category: ts.DiagnosticCategory.Error, key: "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670", message: "Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context." }, Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import_declaration_0_is_using_private_name_1_4000", message: "Import declaration '{0}' is using private name '{1}'." }, Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", message: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", message: "Type parameter '{0}' of exported interface has or is using private name '{1}'." }, @@ -2712,6 +2812,7 @@ var ts; _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: { code: 7010, category: ts.DiagnosticCategory.Error, key: "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010", message: "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type." }, Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: { code: 7011, category: ts.DiagnosticCategory.Error, key: "Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011", message: "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type." }, Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: { code: 7013, category: ts.DiagnosticCategory.Error, key: "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013", message: "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type." }, + Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number: { code: 7015, category: ts.DiagnosticCategory.Error, key: "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015", message: "Element implicitly has an 'any' type because index expression is not of type 'number'." }, Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation: { code: 7016, category: ts.DiagnosticCategory.Error, key: "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation_7016", message: "Property '{0}' implicitly has type 'any', because its 'set' accessor lacks a type annotation." }, Index_signature_of_object_type_implicitly_has_an_any_type: { code: 7017, category: ts.DiagnosticCategory.Error, key: "Index_signature_of_object_type_implicitly_has_an_any_type_7017", message: "Index signature of object type implicitly has an 'any' type." }, Object_literal_s_property_0_implicitly_has_an_1_type: { code: 7018, category: ts.DiagnosticCategory.Error, key: "Object_literal_s_property_0_implicitly_has_an_1_type_7018", message: "Object literal's property '{0}' implicitly has an '{1}' type." }, @@ -2810,6 +2911,7 @@ var ts; "protected": 111 /* ProtectedKeyword */, "public": 112 /* PublicKeyword */, "require": 127 /* RequireKeyword */, + "global": 134 /* GlobalKeyword */, "return": 94 /* ReturnKeyword */, "set": 129 /* SetKeyword */, "static": 113 /* StaticKeyword */, @@ -2830,7 +2932,7 @@ var ts; "yield": 114 /* YieldKeyword */, "async": 118 /* AsyncKeyword */, "await": 119 /* AwaitKeyword */, - "of": 134 /* OfKeyword */, + "of": 135 /* OfKeyword */, "{": 15 /* OpenBraceToken */, "}": 16 /* CloseBraceToken */, "(": 17 /* OpenParenToken */, @@ -4246,7 +4348,7 @@ var ts; break; } } - return token = 238 /* JsxText */; + return token = 239 /* JsxText */; } // Scans a JSX identifier; these differ from normal identifiers in that // they allow dashes @@ -4429,7 +4531,7 @@ var ts; } } function getSourceFileOfNode(node) { - while (node && node.kind !== 250 /* SourceFile */) { + while (node && node.kind !== 251 /* SourceFile */) { node = node.parent; } return node; @@ -4532,6 +4634,31 @@ var ts; isCatchClauseVariableDeclaration(declaration); } ts.isBlockOrCatchScoped = isBlockOrCatchScoped; + function isAmbientModule(node) { + return node && node.kind === 221 /* ModuleDeclaration */ && + (node.name.kind === 9 /* StringLiteral */ || isGlobalScopeAugmentation(node)); + } + ts.isAmbientModule = isAmbientModule; + function isGlobalScopeAugmentation(module) { + return !!(module.flags & 2097152 /* GlobalAugmentation */); + } + ts.isGlobalScopeAugmentation = isGlobalScopeAugmentation; + function isExternalModuleAugmentation(node) { + // external module augmentation is a ambient module declaration that is either: + // - defined in the top level scope and source file is an external module + // - defined inside ambient module declaration located in the top level scope and source file not an external module + if (!node || !isAmbientModule(node)) { + return false; + } + switch (node.parent.kind) { + case 251 /* SourceFile */: + return isExternalModule(node.parent); + case 222 /* ModuleBlock */: + return isAmbientModule(node.parent.parent) && !isExternalModule(node.parent.parent.parent); + } + return false; + } + ts.isExternalModuleAugmentation = isExternalModuleAugmentation; // Gets the nearest enclosing block scope container that has the provided node // as a descendant, that is not the provided node. function getEnclosingBlockScopeContainer(node) { @@ -4541,15 +4668,15 @@ var ts; return current; } switch (current.kind) { - case 250 /* SourceFile */: - case 222 /* CaseBlock */: - case 246 /* CatchClause */: - case 220 /* ModuleDeclaration */: - case 201 /* ForStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: + case 251 /* SourceFile */: + case 223 /* CaseBlock */: + case 247 /* CatchClause */: + case 221 /* ModuleDeclaration */: + case 202 /* ForStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: return current; - case 194 /* Block */: + case 195 /* Block */: // function block is not considered block-scope container // see comment in binder.ts: bind(...), case for SyntaxKind.Block if (!isFunctionLike(current.parent)) { @@ -4562,9 +4689,9 @@ var ts; ts.getEnclosingBlockScopeContainer = getEnclosingBlockScopeContainer; function isCatchClauseVariableDeclaration(declaration) { return declaration && - declaration.kind === 213 /* VariableDeclaration */ && + declaration.kind === 214 /* VariableDeclaration */ && declaration.parent && - declaration.parent.kind === 246 /* CatchClause */; + declaration.parent.kind === 247 /* CatchClause */; } ts.isCatchClauseVariableDeclaration = isCatchClauseVariableDeclaration; // Return display name of an identifier @@ -4603,7 +4730,7 @@ var ts; function getErrorSpanForNode(sourceFile, node) { var errorNode = node; switch (node.kind) { - case 250 /* SourceFile */: + case 251 /* SourceFile */: var pos_1 = ts.skipTrivia(sourceFile.text, 0, /*stopAfterLineBreak*/ false); if (pos_1 === sourceFile.text.length) { // file is empty - return span for the beginning of the file @@ -4612,17 +4739,18 @@ var ts; return getSpanOfTokenAtPosition(sourceFile, pos_1); // This list is a work in progress. Add missing node kinds to improve their error // spans. - case 213 /* VariableDeclaration */: - case 165 /* BindingElement */: - case 216 /* ClassDeclaration */: - case 188 /* ClassExpression */: - case 217 /* InterfaceDeclaration */: - case 220 /* ModuleDeclaration */: - case 219 /* EnumDeclaration */: - case 249 /* EnumMember */: - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 143 /* MethodDeclaration */: + case 214 /* VariableDeclaration */: + case 166 /* BindingElement */: + case 217 /* ClassDeclaration */: + case 189 /* ClassExpression */: + case 218 /* InterfaceDeclaration */: + case 221 /* ModuleDeclaration */: + case 220 /* EnumDeclaration */: + case 250 /* EnumMember */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 144 /* MethodDeclaration */: + case 219 /* TypeAliasDeclaration */: errorNode = node.name; break; } @@ -4650,11 +4778,11 @@ var ts; } ts.isDeclarationFile = isDeclarationFile; function isConstEnumDeclaration(node) { - return node.kind === 219 /* EnumDeclaration */ && isConst(node); + return node.kind === 220 /* EnumDeclaration */ && isConst(node); } ts.isConstEnumDeclaration = isConstEnumDeclaration; function walkUpBindingElementsAndPatterns(node) { - while (node && (node.kind === 165 /* BindingElement */ || isBindingPattern(node))) { + while (node && (node.kind === 166 /* BindingElement */ || isBindingPattern(node))) { node = node.parent; } return node; @@ -4669,14 +4797,14 @@ var ts; function getCombinedNodeFlags(node) { node = walkUpBindingElementsAndPatterns(node); var flags = node.flags; - if (node.kind === 213 /* VariableDeclaration */) { + if (node.kind === 214 /* VariableDeclaration */) { node = node.parent; } - if (node && node.kind === 214 /* VariableDeclarationList */) { + if (node && node.kind === 215 /* VariableDeclarationList */) { flags |= node.flags; node = node.parent; } - if (node && node.kind === 195 /* VariableStatement */) { + if (node && node.kind === 196 /* VariableStatement */) { flags |= node.flags; } return flags; @@ -4691,7 +4819,7 @@ var ts; } ts.isLet = isLet; function isPrologueDirective(node) { - return node.kind === 197 /* ExpressionStatement */ && node.expression.kind === 9 /* StringLiteral */; + return node.kind === 198 /* ExpressionStatement */ && node.expression.kind === 9 /* StringLiteral */; } ts.isPrologueDirective = isPrologueDirective; function getLeadingCommentRangesOfNode(node, sourceFileOfNode) { @@ -4707,7 +4835,7 @@ var ts; } ts.getJsDocComments = getJsDocComments; function getJsDocCommentsFromText(node, text) { - var commentRanges = (node.kind === 138 /* Parameter */ || node.kind === 137 /* TypeParameter */) ? + var commentRanges = (node.kind === 139 /* Parameter */ || node.kind === 138 /* TypeParameter */) ? ts.concatenate(ts.getTrailingCommentRanges(text, node.pos), ts.getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRangesOfNodeFromText(node, text); return ts.filter(commentRanges, isJsDocComment); @@ -4722,7 +4850,7 @@ var ts; ts.fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*/; ts.fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*/; function isTypeNode(node) { - if (150 /* FirstTypeNode */ <= node.kind && node.kind <= 162 /* LastTypeNode */) { + if (151 /* FirstTypeNode */ <= node.kind && node.kind <= 163 /* LastTypeNode */) { return true; } switch (node.kind) { @@ -4733,26 +4861,26 @@ var ts; case 131 /* SymbolKeyword */: return true; case 103 /* VoidKeyword */: - return node.parent.kind !== 179 /* VoidExpression */; - case 190 /* ExpressionWithTypeArguments */: + return node.parent.kind !== 180 /* VoidExpression */; + case 191 /* ExpressionWithTypeArguments */: return !isExpressionWithTypeArgumentsInClassExtendsClause(node); // Identifiers and qualified names may be type nodes, depending on their context. Climb // above them to find the lowest container case 69 /* Identifier */: // If the identifier is the RHS of a qualified name, then it's a type iff its parent is. - if (node.parent.kind === 135 /* QualifiedName */ && node.parent.right === node) { + if (node.parent.kind === 136 /* QualifiedName */ && node.parent.right === node) { node = node.parent; } - else if (node.parent.kind === 168 /* PropertyAccessExpression */ && node.parent.name === node) { + else if (node.parent.kind === 169 /* PropertyAccessExpression */ && node.parent.name === node) { node = node.parent; } // At this point, node is either a qualified name or an identifier - ts.Debug.assert(node.kind === 69 /* Identifier */ || node.kind === 135 /* QualifiedName */ || node.kind === 168 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isTypeNode'."); - case 135 /* QualifiedName */: - case 168 /* PropertyAccessExpression */: + ts.Debug.assert(node.kind === 69 /* Identifier */ || node.kind === 136 /* QualifiedName */ || node.kind === 169 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isTypeNode'."); + case 136 /* QualifiedName */: + case 169 /* PropertyAccessExpression */: case 97 /* ThisKeyword */: var parent_1 = node.parent; - if (parent_1.kind === 154 /* TypeQuery */) { + if (parent_1.kind === 155 /* TypeQuery */) { return false; } // Do not recursively call isTypeNode on the parent. In the example: @@ -4761,38 +4889,38 @@ var ts; // // Calling isTypeNode would consider the qualified name A.B a type node. Only C or // A.B.C is a type node. - if (150 /* FirstTypeNode */ <= parent_1.kind && parent_1.kind <= 162 /* LastTypeNode */) { + if (151 /* FirstTypeNode */ <= parent_1.kind && parent_1.kind <= 163 /* LastTypeNode */) { return true; } switch (parent_1.kind) { - case 190 /* ExpressionWithTypeArguments */: + case 191 /* ExpressionWithTypeArguments */: return !isExpressionWithTypeArgumentsInClassExtendsClause(parent_1); - case 137 /* TypeParameter */: + case 138 /* TypeParameter */: return node === parent_1.constraint; - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 138 /* Parameter */: - case 213 /* VariableDeclaration */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 139 /* Parameter */: + case 214 /* VariableDeclaration */: return node === parent_1.type; - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: - case 144 /* Constructor */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: + case 145 /* Constructor */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: return node === parent_1.type; - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 149 /* IndexSignature */: + case 148 /* CallSignature */: + case 149 /* ConstructSignature */: + case 150 /* IndexSignature */: return node === parent_1.type; - case 173 /* TypeAssertionExpression */: + case 174 /* TypeAssertionExpression */: return node === parent_1.type; - case 170 /* CallExpression */: - case 171 /* NewExpression */: + case 171 /* CallExpression */: + case 172 /* NewExpression */: return parent_1.typeArguments && ts.indexOf(parent_1.typeArguments, node) >= 0; - case 172 /* TaggedTemplateExpression */: + case 173 /* TaggedTemplateExpression */: // TODO (drosen): TaggedTemplateExpressions may eventually support type arguments. return false; } @@ -4806,23 +4934,23 @@ var ts; return traverse(body); function traverse(node) { switch (node.kind) { - case 206 /* ReturnStatement */: + case 207 /* ReturnStatement */: return visitor(node); - case 222 /* CaseBlock */: - case 194 /* Block */: - case 198 /* IfStatement */: - case 199 /* DoStatement */: - case 200 /* WhileStatement */: - case 201 /* ForStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - case 207 /* WithStatement */: - case 208 /* SwitchStatement */: - case 243 /* CaseClause */: - case 244 /* DefaultClause */: - case 209 /* LabeledStatement */: - case 211 /* TryStatement */: - case 246 /* CatchClause */: + case 223 /* CaseBlock */: + case 195 /* Block */: + case 199 /* IfStatement */: + case 200 /* DoStatement */: + case 201 /* WhileStatement */: + case 202 /* ForStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: + case 208 /* WithStatement */: + case 209 /* SwitchStatement */: + case 244 /* CaseClause */: + case 245 /* DefaultClause */: + case 210 /* LabeledStatement */: + case 212 /* TryStatement */: + case 247 /* CatchClause */: return ts.forEachChild(node, traverse); } } @@ -4832,18 +4960,18 @@ var ts; return traverse(body); function traverse(node) { switch (node.kind) { - case 186 /* YieldExpression */: + case 187 /* YieldExpression */: visitor(node); var operand = node.expression; if (operand) { traverse(operand); } - case 219 /* EnumDeclaration */: - case 217 /* InterfaceDeclaration */: - case 220 /* ModuleDeclaration */: - case 218 /* TypeAliasDeclaration */: - case 216 /* ClassDeclaration */: - case 188 /* ClassExpression */: + case 220 /* EnumDeclaration */: + case 218 /* InterfaceDeclaration */: + case 221 /* ModuleDeclaration */: + case 219 /* TypeAliasDeclaration */: + case 217 /* ClassDeclaration */: + case 189 /* ClassExpression */: // These are not allowed inside a generator now, but eventually they may be allowed // as local types. Regardless, any yield statements contained within them should be // skipped in this traversal. @@ -4851,7 +4979,7 @@ var ts; default: if (isFunctionLike(node)) { var name_5 = node.name; - if (name_5 && name_5.kind === 136 /* ComputedPropertyName */) { + if (name_5 && name_5.kind === 137 /* ComputedPropertyName */) { // Note that we will not include methods/accessors of a class because they would require // first descending into the class. This is by design. traverse(name_5.expression); @@ -4870,14 +4998,14 @@ var ts; function isVariableLike(node) { if (node) { switch (node.kind) { - case 165 /* BindingElement */: - case 249 /* EnumMember */: - case 138 /* Parameter */: - case 247 /* PropertyAssignment */: - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 248 /* ShorthandPropertyAssignment */: - case 213 /* VariableDeclaration */: + case 166 /* BindingElement */: + case 250 /* EnumMember */: + case 139 /* Parameter */: + case 248 /* PropertyAssignment */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 249 /* ShorthandPropertyAssignment */: + case 214 /* VariableDeclaration */: return true; } } @@ -4885,11 +5013,11 @@ var ts; } ts.isVariableLike = isVariableLike; function isAccessor(node) { - return node && (node.kind === 145 /* GetAccessor */ || node.kind === 146 /* SetAccessor */); + return node && (node.kind === 146 /* GetAccessor */ || node.kind === 147 /* SetAccessor */); } ts.isAccessor = isAccessor; function isClassLike(node) { - return node && (node.kind === 216 /* ClassDeclaration */ || node.kind === 188 /* ClassExpression */); + return node && (node.kind === 217 /* ClassDeclaration */ || node.kind === 189 /* ClassExpression */); } ts.isClassLike = isClassLike; function isFunctionLike(node) { @@ -4898,32 +5026,32 @@ var ts; ts.isFunctionLike = isFunctionLike; function isFunctionLikeKind(kind) { switch (kind) { - case 144 /* Constructor */: - case 175 /* FunctionExpression */: - case 215 /* FunctionDeclaration */: - case 176 /* ArrowFunction */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 149 /* IndexSignature */: - case 152 /* FunctionType */: - case 153 /* ConstructorType */: + case 145 /* Constructor */: + case 176 /* FunctionExpression */: + case 216 /* FunctionDeclaration */: + case 177 /* ArrowFunction */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 148 /* CallSignature */: + case 149 /* ConstructSignature */: + case 150 /* IndexSignature */: + case 153 /* FunctionType */: + case 154 /* ConstructorType */: return true; } } ts.isFunctionLikeKind = isFunctionLikeKind; function introducesArgumentsExoticObject(node) { switch (node.kind) { - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 145 /* Constructor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: return true; } return false; @@ -4931,24 +5059,24 @@ var ts; ts.introducesArgumentsExoticObject = introducesArgumentsExoticObject; function isIterationStatement(node, lookInLabeledStatements) { switch (node.kind) { - case 201 /* ForStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - case 199 /* DoStatement */: - case 200 /* WhileStatement */: + case 202 /* ForStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: + case 200 /* DoStatement */: + case 201 /* WhileStatement */: return true; - case 209 /* LabeledStatement */: + case 210 /* LabeledStatement */: return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); } return false; } ts.isIterationStatement = isIterationStatement; function isFunctionBlock(node) { - return node && node.kind === 194 /* Block */ && isFunctionLike(node.parent); + return node && node.kind === 195 /* Block */ && isFunctionLike(node.parent); } ts.isFunctionBlock = isFunctionBlock; function isObjectLiteralMethod(node) { - return node && node.kind === 143 /* MethodDeclaration */ && node.parent.kind === 167 /* ObjectLiteralExpression */; + return node && node.kind === 144 /* MethodDeclaration */ && node.parent.kind === 168 /* ObjectLiteralExpression */; } ts.isObjectLiteralMethod = isObjectLiteralMethod; function isIdentifierTypePredicate(predicate) { @@ -4980,7 +5108,7 @@ var ts; return undefined; } switch (node.kind) { - case 136 /* ComputedPropertyName */: + case 137 /* ComputedPropertyName */: // If the grandparent node is an object literal (as opposed to a class), // then the computed property is not a 'this' container. // A computed property name in a class needs to be a this container @@ -4995,9 +5123,9 @@ var ts; // the *body* of the container. node = node.parent; break; - case 139 /* Decorator */: + case 140 /* Decorator */: // Decorators are always applied outside of the body of a class or method. - if (node.parent.kind === 138 /* Parameter */ && isClassElement(node.parent.parent)) { + if (node.parent.kind === 139 /* Parameter */ && isClassElement(node.parent.parent)) { // If the decorator's parent is a Parameter, we resolve the this container from // the grandparent class declaration. node = node.parent.parent; @@ -5008,26 +5136,26 @@ var ts; node = node.parent; } break; - case 176 /* ArrowFunction */: + case 177 /* ArrowFunction */: if (!includeArrowFunctions) { continue; } // Fall through - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 220 /* ModuleDeclaration */: - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 149 /* IndexSignature */: - case 219 /* EnumDeclaration */: - case 250 /* SourceFile */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 221 /* ModuleDeclaration */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 145 /* Constructor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 148 /* CallSignature */: + case 149 /* ConstructSignature */: + case 150 /* IndexSignature */: + case 220 /* EnumDeclaration */: + case 251 /* SourceFile */: return node; } } @@ -5048,26 +5176,26 @@ var ts; return node; } switch (node.kind) { - case 136 /* ComputedPropertyName */: + case 137 /* ComputedPropertyName */: node = node.parent; break; - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: if (!stopOnFunctions) { continue; } - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 145 /* Constructor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: return node; - case 139 /* Decorator */: + case 140 /* Decorator */: // Decorators are always applied outside of the body of a class or method. - if (node.parent.kind === 138 /* Parameter */ && isClassElement(node.parent.parent)) { + if (node.parent.kind === 139 /* Parameter */ && isClassElement(node.parent.parent)) { // If the decorator's parent is a Parameter, we resolve the this container from // the grandparent class declaration. node = node.parent.parent; @@ -5085,12 +5213,12 @@ var ts; function getEntityNameFromTypeNode(node) { if (node) { switch (node.kind) { - case 151 /* TypeReference */: + case 152 /* TypeReference */: return node.typeName; - case 190 /* ExpressionWithTypeArguments */: + case 191 /* ExpressionWithTypeArguments */: return node.expression; case 69 /* Identifier */: - case 135 /* QualifiedName */: + case 136 /* QualifiedName */: return node; } } @@ -5098,7 +5226,7 @@ var ts; } ts.getEntityNameFromTypeNode = getEntityNameFromTypeNode; function getInvokedExpression(node) { - if (node.kind === 172 /* TaggedTemplateExpression */) { + if (node.kind === 173 /* TaggedTemplateExpression */) { return node.tag; } // Will either be a CallExpression, NewExpression, or Decorator. @@ -5107,58 +5235,40 @@ var ts; ts.getInvokedExpression = getInvokedExpression; function nodeCanBeDecorated(node) { switch (node.kind) { - case 216 /* ClassDeclaration */: + case 217 /* ClassDeclaration */: // classes are valid targets return true; - case 141 /* PropertyDeclaration */: + case 142 /* PropertyDeclaration */: // property declarations are valid if their parent is a class declaration. - return node.parent.kind === 216 /* ClassDeclaration */; - case 138 /* Parameter */: - // if the parameter's parent has a body and its grandparent is a class declaration, this is a valid target; - return node.parent.body && node.parent.parent.kind === 216 /* ClassDeclaration */; - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 143 /* MethodDeclaration */: + return node.parent.kind === 217 /* ClassDeclaration */; + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 144 /* MethodDeclaration */: // if this method has a body and its parent is a class declaration, this is a valid target. - return node.body && node.parent.kind === 216 /* ClassDeclaration */; + return node.body !== undefined + && node.parent.kind === 217 /* ClassDeclaration */; + case 139 /* Parameter */: + // if the parameter's parent has a body and its grandparent is a class declaration, this is a valid target; + return node.parent.body !== undefined + && (node.parent.kind === 145 /* Constructor */ + || node.parent.kind === 144 /* MethodDeclaration */ + || node.parent.kind === 147 /* SetAccessor */) + && node.parent.parent.kind === 217 /* ClassDeclaration */; } return false; } ts.nodeCanBeDecorated = nodeCanBeDecorated; function nodeIsDecorated(node) { - switch (node.kind) { - case 216 /* ClassDeclaration */: - if (node.decorators) { - return true; - } - return false; - case 141 /* PropertyDeclaration */: - case 138 /* Parameter */: - if (node.decorators) { - return true; - } - return false; - case 145 /* GetAccessor */: - if (node.body && node.decorators) { - return true; - } - return false; - case 143 /* MethodDeclaration */: - case 146 /* SetAccessor */: - if (node.body && node.decorators) { - return true; - } - return false; - } - return false; + return node.decorators !== undefined + && nodeCanBeDecorated(node); } ts.nodeIsDecorated = nodeIsDecorated; function isPropertyAccessExpression(node) { - return node.kind === 168 /* PropertyAccessExpression */; + return node.kind === 169 /* PropertyAccessExpression */; } ts.isPropertyAccessExpression = isPropertyAccessExpression; function isElementAccessExpression(node) { - return node.kind === 169 /* ElementAccessExpression */; + return node.kind === 170 /* ElementAccessExpression */; } ts.isElementAccessExpression = isElementAccessExpression; function isExpression(node) { @@ -5168,42 +5278,42 @@ var ts; case 99 /* TrueKeyword */: case 84 /* FalseKeyword */: case 10 /* RegularExpressionLiteral */: - case 166 /* ArrayLiteralExpression */: - case 167 /* ObjectLiteralExpression */: - case 168 /* PropertyAccessExpression */: - case 169 /* ElementAccessExpression */: - case 170 /* CallExpression */: - case 171 /* NewExpression */: - case 172 /* TaggedTemplateExpression */: - case 191 /* AsExpression */: - case 173 /* TypeAssertionExpression */: - case 174 /* ParenthesizedExpression */: - case 175 /* FunctionExpression */: - case 188 /* ClassExpression */: - case 176 /* ArrowFunction */: - case 179 /* VoidExpression */: - case 177 /* DeleteExpression */: - case 178 /* TypeOfExpression */: - case 181 /* PrefixUnaryExpression */: - case 182 /* PostfixUnaryExpression */: - case 183 /* BinaryExpression */: - case 184 /* ConditionalExpression */: - case 187 /* SpreadElementExpression */: - case 185 /* TemplateExpression */: + case 167 /* ArrayLiteralExpression */: + case 168 /* ObjectLiteralExpression */: + case 169 /* PropertyAccessExpression */: + case 170 /* ElementAccessExpression */: + case 171 /* CallExpression */: + case 172 /* NewExpression */: + case 173 /* TaggedTemplateExpression */: + case 192 /* AsExpression */: + case 174 /* TypeAssertionExpression */: + case 175 /* ParenthesizedExpression */: + case 176 /* FunctionExpression */: + case 189 /* ClassExpression */: + case 177 /* ArrowFunction */: + case 180 /* VoidExpression */: + case 178 /* DeleteExpression */: + case 179 /* TypeOfExpression */: + case 182 /* PrefixUnaryExpression */: + case 183 /* PostfixUnaryExpression */: + case 184 /* BinaryExpression */: + case 185 /* ConditionalExpression */: + case 188 /* SpreadElementExpression */: + case 186 /* TemplateExpression */: case 11 /* NoSubstitutionTemplateLiteral */: - case 189 /* OmittedExpression */: - case 235 /* JsxElement */: - case 236 /* JsxSelfClosingElement */: - case 186 /* YieldExpression */: - case 180 /* AwaitExpression */: + case 190 /* OmittedExpression */: + case 236 /* JsxElement */: + case 237 /* JsxSelfClosingElement */: + case 187 /* YieldExpression */: + case 181 /* AwaitExpression */: return true; - case 135 /* QualifiedName */: - while (node.parent.kind === 135 /* QualifiedName */) { + case 136 /* QualifiedName */: + while (node.parent.kind === 136 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 154 /* TypeQuery */; + return node.parent.kind === 155 /* TypeQuery */; case 69 /* Identifier */: - if (node.parent.kind === 154 /* TypeQuery */) { + if (node.parent.kind === 155 /* TypeQuery */) { return true; } // fall through @@ -5212,47 +5322,47 @@ var ts; case 97 /* ThisKeyword */: var parent_2 = node.parent; switch (parent_2.kind) { - case 213 /* VariableDeclaration */: - case 138 /* Parameter */: - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 249 /* EnumMember */: - case 247 /* PropertyAssignment */: - case 165 /* BindingElement */: + case 214 /* VariableDeclaration */: + case 139 /* Parameter */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 250 /* EnumMember */: + case 248 /* PropertyAssignment */: + case 166 /* BindingElement */: return parent_2.initializer === node; - case 197 /* ExpressionStatement */: - case 198 /* IfStatement */: - case 199 /* DoStatement */: - case 200 /* WhileStatement */: - case 206 /* ReturnStatement */: - case 207 /* WithStatement */: - case 208 /* SwitchStatement */: - case 243 /* CaseClause */: - case 210 /* ThrowStatement */: - case 208 /* SwitchStatement */: + case 198 /* ExpressionStatement */: + case 199 /* IfStatement */: + case 200 /* DoStatement */: + case 201 /* WhileStatement */: + case 207 /* ReturnStatement */: + case 208 /* WithStatement */: + case 209 /* SwitchStatement */: + case 244 /* CaseClause */: + case 211 /* ThrowStatement */: + case 209 /* SwitchStatement */: return parent_2.expression === node; - case 201 /* ForStatement */: + case 202 /* ForStatement */: var forStatement = parent_2; - return (forStatement.initializer === node && forStatement.initializer.kind !== 214 /* VariableDeclarationList */) || + return (forStatement.initializer === node && forStatement.initializer.kind !== 215 /* VariableDeclarationList */) || forStatement.condition === node || forStatement.incrementor === node; - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: var forInStatement = parent_2; - return (forInStatement.initializer === node && forInStatement.initializer.kind !== 214 /* VariableDeclarationList */) || + return (forInStatement.initializer === node && forInStatement.initializer.kind !== 215 /* VariableDeclarationList */) || forInStatement.expression === node; - case 173 /* TypeAssertionExpression */: - case 191 /* AsExpression */: + case 174 /* TypeAssertionExpression */: + case 192 /* AsExpression */: return node === parent_2.expression; - case 192 /* TemplateSpan */: + case 193 /* TemplateSpan */: return node === parent_2.expression; - case 136 /* ComputedPropertyName */: + case 137 /* ComputedPropertyName */: return node === parent_2.expression; - case 139 /* Decorator */: - case 242 /* JsxExpression */: - case 241 /* JsxSpreadAttribute */: + case 140 /* Decorator */: + case 243 /* JsxExpression */: + case 242 /* JsxSpreadAttribute */: return true; - case 190 /* ExpressionWithTypeArguments */: + case 191 /* ExpressionWithTypeArguments */: return parent_2.expression === node && isExpressionWithTypeArgumentsInClassExtendsClause(parent_2); default: if (isExpression(parent_2)) { @@ -5276,7 +5386,7 @@ var ts; } ts.isInstantiatedModule = isInstantiatedModule; function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 223 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 234 /* ExternalModuleReference */; + return node.kind === 224 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 235 /* ExternalModuleReference */; } ts.isExternalModuleImportEqualsDeclaration = isExternalModuleImportEqualsDeclaration; function getExternalModuleImportEqualsDeclarationExpression(node) { @@ -5285,7 +5395,7 @@ var ts; } ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression; function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 223 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 234 /* ExternalModuleReference */; + return node.kind === 224 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 235 /* ExternalModuleReference */; } ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration; function isSourceFileJavaScript(file) { @@ -5303,7 +5413,7 @@ var ts; */ function isRequireCall(expression) { // of the form 'require("name")' - return expression.kind === 170 /* CallExpression */ && + return expression.kind === 171 /* CallExpression */ && expression.expression.kind === 69 /* Identifier */ && expression.expression.text === "require" && expression.arguments.length === 1 && @@ -5313,11 +5423,11 @@ var ts; /// Given a BinaryExpression, returns SpecialPropertyAssignmentKind for the various kinds of property /// assignments we treat as special in the binder function getSpecialPropertyAssignmentKind(expression) { - if (expression.kind !== 183 /* BinaryExpression */) { + if (expression.kind !== 184 /* BinaryExpression */) { return 0 /* None */; } var expr = expression; - if (expr.operatorToken.kind !== 56 /* EqualsToken */ || expr.left.kind !== 168 /* PropertyAccessExpression */) { + if (expr.operatorToken.kind !== 56 /* EqualsToken */ || expr.left.kind !== 169 /* PropertyAccessExpression */) { return 0 /* None */; } var lhs = expr.left; @@ -5335,7 +5445,7 @@ var ts; else if (lhs.expression.kind === 97 /* ThisKeyword */) { return 4 /* ThisProperty */; } - else if (lhs.expression.kind === 168 /* PropertyAccessExpression */) { + else if (lhs.expression.kind === 169 /* PropertyAccessExpression */) { // chained dot, e.g. x.y.z = expr; this var is the 'x.y' part var innerPropertyAccess = lhs.expression; if (innerPropertyAccess.expression.kind === 69 /* Identifier */ && innerPropertyAccess.name.text === "prototype") { @@ -5346,30 +5456,33 @@ var ts; } ts.getSpecialPropertyAssignmentKind = getSpecialPropertyAssignmentKind; function getExternalModuleName(node) { - if (node.kind === 224 /* ImportDeclaration */) { + if (node.kind === 225 /* ImportDeclaration */) { return node.moduleSpecifier; } - if (node.kind === 223 /* ImportEqualsDeclaration */) { + if (node.kind === 224 /* ImportEqualsDeclaration */) { var reference = node.moduleReference; - if (reference.kind === 234 /* ExternalModuleReference */) { + if (reference.kind === 235 /* ExternalModuleReference */) { return reference.expression; } } - if (node.kind === 230 /* ExportDeclaration */) { + if (node.kind === 231 /* ExportDeclaration */) { return node.moduleSpecifier; } + if (node.kind === 221 /* ModuleDeclaration */ && node.name.kind === 9 /* StringLiteral */) { + return node.name; + } } ts.getExternalModuleName = getExternalModuleName; function hasQuestionToken(node) { if (node) { switch (node.kind) { - case 138 /* Parameter */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 248 /* ShorthandPropertyAssignment */: - case 247 /* PropertyAssignment */: - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: + case 139 /* Parameter */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 249 /* ShorthandPropertyAssignment */: + case 248 /* PropertyAssignment */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: return node.questionToken !== undefined; } } @@ -5377,9 +5490,9 @@ var ts; } ts.hasQuestionToken = hasQuestionToken; function isJSDocConstructSignature(node) { - return node.kind === 263 /* JSDocFunctionType */ && + return node.kind === 264 /* JSDocFunctionType */ && node.parameters.length > 0 && - node.parameters[0].type.kind === 265 /* JSDocConstructorType */; + node.parameters[0].type.kind === 266 /* JSDocConstructorType */; } ts.isJSDocConstructSignature = isJSDocConstructSignature; function getJSDocTag(node, kind) { @@ -5393,15 +5506,15 @@ var ts; } } function getJSDocTypeTag(node) { - return getJSDocTag(node, 271 /* JSDocTypeTag */); + return getJSDocTag(node, 272 /* JSDocTypeTag */); } ts.getJSDocTypeTag = getJSDocTypeTag; function getJSDocReturnTag(node) { - return getJSDocTag(node, 270 /* JSDocReturnTag */); + return getJSDocTag(node, 271 /* JSDocReturnTag */); } ts.getJSDocReturnTag = getJSDocReturnTag; function getJSDocTemplateTag(node) { - return getJSDocTag(node, 272 /* JSDocTemplateTag */); + return getJSDocTag(node, 273 /* JSDocTemplateTag */); } ts.getJSDocTemplateTag = getJSDocTemplateTag; function getCorrespondingJSDocParameterTag(parameter) { @@ -5412,7 +5525,7 @@ var ts; var docComment = parameter.parent.jsDocComment; if (docComment) { return ts.forEach(docComment.tags, function (t) { - if (t.kind === 269 /* JSDocParameterTag */) { + if (t.kind === 270 /* JSDocParameterTag */) { var parameterTag = t; var name_6 = parameterTag.preParameterName || parameterTag.postParameterName; if (name_6.text === parameterName) { @@ -5431,12 +5544,12 @@ var ts; function isRestParameter(node) { if (node) { if (node.parserContextFlags & 32 /* JavaScriptFile */) { - if (node.type && node.type.kind === 264 /* JSDocVariadicType */) { + if (node.type && node.type.kind === 265 /* JSDocVariadicType */) { return true; } var paramTag = getCorrespondingJSDocParameterTag(node); if (paramTag && paramTag.typeExpression) { - return paramTag.typeExpression.type.kind === 264 /* JSDocVariadicType */; + return paramTag.typeExpression.type.kind === 265 /* JSDocVariadicType */; } } return node.dotDotDotToken !== undefined; @@ -5457,7 +5570,7 @@ var ts; } ts.isTemplateLiteralKind = isTemplateLiteralKind; function isBindingPattern(node) { - return !!node && (node.kind === 164 /* ArrayBindingPattern */ || node.kind === 163 /* ObjectBindingPattern */); + return !!node && (node.kind === 165 /* ArrayBindingPattern */ || node.kind === 164 /* ObjectBindingPattern */); } ts.isBindingPattern = isBindingPattern; function isNodeDescendentOf(node, ancestor) { @@ -5481,34 +5594,34 @@ var ts; ts.isInAmbientContext = isInAmbientContext; function isDeclaration(node) { switch (node.kind) { - case 176 /* ArrowFunction */: - case 165 /* BindingElement */: - case 216 /* ClassDeclaration */: - case 188 /* ClassExpression */: - case 144 /* Constructor */: - case 219 /* EnumDeclaration */: - case 249 /* EnumMember */: - case 232 /* ExportSpecifier */: - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 145 /* GetAccessor */: - case 225 /* ImportClause */: - case 223 /* ImportEqualsDeclaration */: - case 228 /* ImportSpecifier */: - case 217 /* InterfaceDeclaration */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 220 /* ModuleDeclaration */: - case 226 /* NamespaceImport */: - case 138 /* Parameter */: - case 247 /* PropertyAssignment */: - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 146 /* SetAccessor */: - case 248 /* ShorthandPropertyAssignment */: - case 218 /* TypeAliasDeclaration */: - case 137 /* TypeParameter */: - case 213 /* VariableDeclaration */: + case 177 /* ArrowFunction */: + case 166 /* BindingElement */: + case 217 /* ClassDeclaration */: + case 189 /* ClassExpression */: + case 145 /* Constructor */: + case 220 /* EnumDeclaration */: + case 250 /* EnumMember */: + case 233 /* ExportSpecifier */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 146 /* GetAccessor */: + case 226 /* ImportClause */: + case 224 /* ImportEqualsDeclaration */: + case 229 /* ImportSpecifier */: + case 218 /* InterfaceDeclaration */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 221 /* ModuleDeclaration */: + case 227 /* NamespaceImport */: + case 139 /* Parameter */: + case 248 /* PropertyAssignment */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 147 /* SetAccessor */: + case 249 /* ShorthandPropertyAssignment */: + case 219 /* TypeAliasDeclaration */: + case 138 /* TypeParameter */: + case 214 /* VariableDeclaration */: return true; } return false; @@ -5516,25 +5629,25 @@ var ts; ts.isDeclaration = isDeclaration; function isStatement(n) { switch (n.kind) { - case 205 /* BreakStatement */: - case 204 /* ContinueStatement */: - case 212 /* DebuggerStatement */: - case 199 /* DoStatement */: - case 197 /* ExpressionStatement */: - case 196 /* EmptyStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - case 201 /* ForStatement */: - case 198 /* IfStatement */: - case 209 /* LabeledStatement */: - case 206 /* ReturnStatement */: - case 208 /* SwitchStatement */: - case 210 /* ThrowStatement */: - case 211 /* TryStatement */: - case 195 /* VariableStatement */: - case 200 /* WhileStatement */: - case 207 /* WithStatement */: - case 229 /* ExportAssignment */: + case 206 /* BreakStatement */: + case 205 /* ContinueStatement */: + case 213 /* DebuggerStatement */: + case 200 /* DoStatement */: + case 198 /* ExpressionStatement */: + case 197 /* EmptyStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: + case 202 /* ForStatement */: + case 199 /* IfStatement */: + case 210 /* LabeledStatement */: + case 207 /* ReturnStatement */: + case 209 /* SwitchStatement */: + case 211 /* ThrowStatement */: + case 212 /* TryStatement */: + case 196 /* VariableStatement */: + case 201 /* WhileStatement */: + case 208 /* WithStatement */: + case 230 /* ExportAssignment */: return true; default: return false; @@ -5543,13 +5656,13 @@ var ts; ts.isStatement = isStatement; function isClassElement(n) { switch (n.kind) { - case 144 /* Constructor */: - case 141 /* PropertyDeclaration */: - case 143 /* MethodDeclaration */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 142 /* MethodSignature */: - case 149 /* IndexSignature */: + case 145 /* Constructor */: + case 142 /* PropertyDeclaration */: + case 144 /* MethodDeclaration */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 143 /* MethodSignature */: + case 150 /* IndexSignature */: return true; default: return false; @@ -5562,7 +5675,7 @@ var ts; return false; } var parent = name.parent; - if (parent.kind === 228 /* ImportSpecifier */ || parent.kind === 232 /* ExportSpecifier */) { + if (parent.kind === 229 /* ImportSpecifier */ || parent.kind === 233 /* ExportSpecifier */) { if (parent.propertyName) { return true; } @@ -5577,31 +5690,31 @@ var ts; function isIdentifierName(node) { var parent = node.parent; switch (parent.kind) { - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 249 /* EnumMember */: - case 247 /* PropertyAssignment */: - case 168 /* PropertyAccessExpression */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 250 /* EnumMember */: + case 248 /* PropertyAssignment */: + case 169 /* PropertyAccessExpression */: // Name in member declaration or property name in property access return parent.name === node; - case 135 /* QualifiedName */: + case 136 /* QualifiedName */: // Name on right hand side of dot in a type query if (parent.right === node) { - while (parent.kind === 135 /* QualifiedName */) { + while (parent.kind === 136 /* QualifiedName */) { parent = parent.parent; } - return parent.kind === 154 /* TypeQuery */; + return parent.kind === 155 /* TypeQuery */; } return false; - case 165 /* BindingElement */: - case 228 /* ImportSpecifier */: + case 166 /* BindingElement */: + case 229 /* ImportSpecifier */: // Property name in binding element or import specifier return parent.propertyName === node; - case 232 /* ExportSpecifier */: + case 233 /* ExportSpecifier */: // Any name in an export specifier return true; } @@ -5617,12 +5730,12 @@ var ts; // export = ... // export default ... function isAliasSymbolDeclaration(node) { - return node.kind === 223 /* ImportEqualsDeclaration */ || - node.kind === 225 /* ImportClause */ && !!node.name || - node.kind === 226 /* NamespaceImport */ || - node.kind === 228 /* ImportSpecifier */ || - node.kind === 232 /* ExportSpecifier */ || - node.kind === 229 /* ExportAssignment */ && node.expression.kind === 69 /* Identifier */; + return node.kind === 224 /* ImportEqualsDeclaration */ || + node.kind === 226 /* ImportClause */ && !!node.name || + node.kind === 227 /* NamespaceImport */ || + node.kind === 229 /* ImportSpecifier */ || + node.kind === 233 /* ExportSpecifier */ || + node.kind === 230 /* ExportAssignment */ && node.expression.kind === 69 /* Identifier */; } ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration; function getClassExtendsHeritageClauseElement(node) { @@ -5704,7 +5817,7 @@ var ts; } ts.getFileReferenceFromReferencePath = getFileReferenceFromReferencePath; function isKeyword(token) { - return 70 /* FirstKeyword */ <= token && token <= 134 /* LastKeyword */; + return 70 /* FirstKeyword */ <= token && token <= 135 /* LastKeyword */; } ts.isKeyword = isKeyword; function isTrivia(token) { @@ -5731,7 +5844,7 @@ var ts; } ts.hasDynamicName = hasDynamicName; function isDynamicName(name) { - return name.kind === 136 /* ComputedPropertyName */ && + return name.kind === 137 /* ComputedPropertyName */ && !isStringOrNumericLiteral(name.expression.kind) && !isWellKnownSymbolSyntactically(name.expression); } @@ -5749,7 +5862,7 @@ var ts; if (name.kind === 69 /* Identifier */ || name.kind === 9 /* StringLiteral */ || name.kind === 8 /* NumericLiteral */) { return name.text; } - if (name.kind === 136 /* ComputedPropertyName */) { + if (name.kind === 137 /* ComputedPropertyName */) { var nameExpression = name.expression; if (isWellKnownSymbolSyntactically(nameExpression)) { var rightHandSideName = nameExpression.name.text; @@ -5789,18 +5902,18 @@ var ts; ts.isModifierKind = isModifierKind; function isParameterDeclaration(node) { var root = getRootDeclaration(node); - return root.kind === 138 /* Parameter */; + return root.kind === 139 /* Parameter */; } ts.isParameterDeclaration = isParameterDeclaration; function getRootDeclaration(node) { - while (node.kind === 165 /* BindingElement */) { + while (node.kind === 166 /* BindingElement */) { node = node.parent.parent; } return node; } ts.getRootDeclaration = getRootDeclaration; function nodeStartsNewLexicalEnvironment(n) { - return isFunctionLike(n) || n.kind === 220 /* ModuleDeclaration */ || n.kind === 250 /* SourceFile */; + return isFunctionLike(n) || n.kind === 221 /* ModuleDeclaration */ || n.kind === 251 /* SourceFile */; } ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment; /** @@ -5850,7 +5963,7 @@ var ts; } ts.cloneEntityName = cloneEntityName; function isQualifiedName(node) { - return node.kind === 135 /* QualifiedName */; + return node.kind === 136 /* QualifiedName */; } ts.isQualifiedName = isQualifiedName; function nodeIsSynthesized(node) { @@ -6180,7 +6293,7 @@ var ts; ts.getLineOfLocalPositionFromLineMap = getLineOfLocalPositionFromLineMap; function getFirstConstructorWithBody(node) { return ts.forEach(node.members, function (member) { - if (member.kind === 144 /* Constructor */ && nodeIsPresent(member.body)) { + if (member.kind === 145 /* Constructor */ && nodeIsPresent(member.body)) { return member; } }); @@ -6197,10 +6310,10 @@ var ts; var setAccessor; if (hasDynamicName(accessor)) { firstAccessor = accessor; - if (accessor.kind === 145 /* GetAccessor */) { + if (accessor.kind === 146 /* GetAccessor */) { getAccessor = accessor; } - else if (accessor.kind === 146 /* SetAccessor */) { + else if (accessor.kind === 147 /* SetAccessor */) { setAccessor = accessor; } else { @@ -6209,7 +6322,7 @@ var ts; } else { ts.forEach(declarations, function (member) { - if ((member.kind === 145 /* GetAccessor */ || member.kind === 146 /* SetAccessor */) + if ((member.kind === 146 /* GetAccessor */ || member.kind === 147 /* SetAccessor */) && (member.flags & 64 /* Static */) === (accessor.flags & 64 /* Static */)) { var memberName = getPropertyNameForPropertyNameNode(member.name); var accessorName = getPropertyNameForPropertyNameNode(accessor.name); @@ -6220,10 +6333,10 @@ var ts; else if (!secondAccessor) { secondAccessor = member; } - if (member.kind === 145 /* GetAccessor */ && !getAccessor) { + if (member.kind === 146 /* GetAccessor */ && !getAccessor) { getAccessor = member; } - if (member.kind === 146 /* SetAccessor */ && !setAccessor) { + if (member.kind === 147 /* SetAccessor */ && !setAccessor) { setAccessor = member; } } @@ -6433,24 +6546,24 @@ var ts; function isLeftHandSideExpression(expr) { if (expr) { switch (expr.kind) { - case 168 /* PropertyAccessExpression */: - case 169 /* ElementAccessExpression */: - case 171 /* NewExpression */: - case 170 /* CallExpression */: - case 235 /* JsxElement */: - case 236 /* JsxSelfClosingElement */: - case 172 /* TaggedTemplateExpression */: - case 166 /* ArrayLiteralExpression */: - case 174 /* ParenthesizedExpression */: - case 167 /* ObjectLiteralExpression */: - case 188 /* ClassExpression */: - case 175 /* FunctionExpression */: + case 169 /* PropertyAccessExpression */: + case 170 /* ElementAccessExpression */: + case 172 /* NewExpression */: + case 171 /* CallExpression */: + case 236 /* JsxElement */: + case 237 /* JsxSelfClosingElement */: + case 173 /* TaggedTemplateExpression */: + case 167 /* ArrayLiteralExpression */: + case 175 /* ParenthesizedExpression */: + case 168 /* ObjectLiteralExpression */: + case 189 /* ClassExpression */: + case 176 /* FunctionExpression */: case 69 /* Identifier */: case 10 /* RegularExpressionLiteral */: case 8 /* NumericLiteral */: case 9 /* StringLiteral */: case 11 /* NoSubstitutionTemplateLiteral */: - case 185 /* TemplateExpression */: + case 186 /* TemplateExpression */: case 84 /* FalseKeyword */: case 93 /* NullKeyword */: case 97 /* ThisKeyword */: @@ -6467,7 +6580,7 @@ var ts; } ts.isAssignmentOperator = isAssignmentOperator; function isExpressionWithTypeArgumentsInClassExtendsClause(node) { - return node.kind === 190 /* ExpressionWithTypeArguments */ && + return node.kind === 191 /* ExpressionWithTypeArguments */ && node.parent.token === 83 /* ExtendsKeyword */ && isClassLike(node.parent.parent); } @@ -6490,16 +6603,16 @@ var ts; } } function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return (node.parent.kind === 135 /* QualifiedName */ && node.parent.right === node) || - (node.parent.kind === 168 /* PropertyAccessExpression */ && node.parent.name === node); + return (node.parent.kind === 136 /* QualifiedName */ && node.parent.right === node) || + (node.parent.kind === 169 /* PropertyAccessExpression */ && node.parent.name === node); } ts.isRightSideOfQualifiedNameOrPropertyAccess = isRightSideOfQualifiedNameOrPropertyAccess; function isEmptyObjectLiteralOrArrayLiteral(expression) { var kind = expression.kind; - if (kind === 167 /* ObjectLiteralExpression */) { + if (kind === 168 /* ObjectLiteralExpression */) { return expression.properties.length === 0; } - if (kind === 166 /* ArrayLiteralExpression */) { + if (kind === 167 /* ArrayLiteralExpression */) { return expression.elements.length === 0; } return false; @@ -6854,9 +6967,9 @@ var ts; } ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions; function getTypeParameterOwner(d) { - if (d && d.kind === 137 /* TypeParameter */) { + if (d && d.kind === 138 /* TypeParameter */) { for (var current = d; current; current = current.parent) { - if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 217 /* InterfaceDeclaration */) { + if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 218 /* InterfaceDeclaration */) { return current; } } @@ -6864,7 +6977,7 @@ var ts; } ts.getTypeParameterOwner = getTypeParameterOwner; function isParameterPropertyDeclaration(node) { - return node.flags & 56 /* AccessibilityModifier */ && node.parent.kind === 144 /* Constructor */ && ts.isClassLike(node.parent.parent); + return node.flags & 56 /* AccessibilityModifier */ && node.parent.kind === 145 /* Constructor */ && ts.isClassLike(node.parent.parent); } ts.isParameterPropertyDeclaration = isParameterPropertyDeclaration; })(ts || (ts = {})); @@ -6876,7 +6989,7 @@ var ts; var NodeConstructor; var SourceFileConstructor; function createNode(kind, pos, end) { - if (kind === 250 /* SourceFile */) { + if (kind === 251 /* SourceFile */) { return new (SourceFileConstructor || (SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor()))(kind, pos, end); } else { @@ -6919,26 +7032,26 @@ var ts; var visitNodes = cbNodeArray ? visitNodeArray : visitEachNode; var cbNodes = cbNodeArray || cbNode; switch (node.kind) { - case 135 /* QualifiedName */: + case 136 /* QualifiedName */: return visitNode(cbNode, node.left) || visitNode(cbNode, node.right); - case 137 /* TypeParameter */: + case 138 /* TypeParameter */: return visitNode(cbNode, node.name) || visitNode(cbNode, node.constraint) || visitNode(cbNode, node.expression); - case 248 /* ShorthandPropertyAssignment */: + case 249 /* ShorthandPropertyAssignment */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.equalsToken) || visitNode(cbNode, node.objectAssignmentInitializer); - case 138 /* Parameter */: - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 247 /* PropertyAssignment */: - case 213 /* VariableDeclaration */: - case 165 /* BindingElement */: + case 139 /* Parameter */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 248 /* PropertyAssignment */: + case 214 /* VariableDeclaration */: + case 166 /* BindingElement */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.propertyName) || @@ -6947,24 +7060,24 @@ var ts; visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.type) || visitNode(cbNode, node.initializer); - case 152 /* FunctionType */: - case 153 /* ConstructorType */: - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 149 /* IndexSignature */: + case 153 /* FunctionType */: + case 154 /* ConstructorType */: + case 148 /* CallSignature */: + case 149 /* ConstructSignature */: + case 150 /* IndexSignature */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNodes(cbNodes, node.typeParameters) || visitNodes(cbNodes, node.parameters) || visitNode(cbNode, node.type); - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 175 /* FunctionExpression */: - case 215 /* FunctionDeclaration */: - case 176 /* ArrowFunction */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 145 /* Constructor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 176 /* FunctionExpression */: + case 216 /* FunctionDeclaration */: + case 177 /* ArrowFunction */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.asteriskToken) || @@ -6975,290 +7088,290 @@ var ts; visitNode(cbNode, node.type) || visitNode(cbNode, node.equalsGreaterThanToken) || visitNode(cbNode, node.body); - case 151 /* TypeReference */: + case 152 /* TypeReference */: return visitNode(cbNode, node.typeName) || visitNodes(cbNodes, node.typeArguments); - case 150 /* TypePredicate */: + case 151 /* TypePredicate */: return visitNode(cbNode, node.parameterName) || visitNode(cbNode, node.type); - case 154 /* TypeQuery */: + case 155 /* TypeQuery */: return visitNode(cbNode, node.exprName); - case 155 /* TypeLiteral */: + case 156 /* TypeLiteral */: return visitNodes(cbNodes, node.members); - case 156 /* ArrayType */: + case 157 /* ArrayType */: return visitNode(cbNode, node.elementType); - case 157 /* TupleType */: + case 158 /* TupleType */: return visitNodes(cbNodes, node.elementTypes); - case 158 /* UnionType */: - case 159 /* IntersectionType */: + case 159 /* UnionType */: + case 160 /* IntersectionType */: return visitNodes(cbNodes, node.types); - case 160 /* ParenthesizedType */: + case 161 /* ParenthesizedType */: return visitNode(cbNode, node.type); - case 163 /* ObjectBindingPattern */: - case 164 /* ArrayBindingPattern */: + case 164 /* ObjectBindingPattern */: + case 165 /* ArrayBindingPattern */: return visitNodes(cbNodes, node.elements); - case 166 /* ArrayLiteralExpression */: + case 167 /* ArrayLiteralExpression */: return visitNodes(cbNodes, node.elements); - case 167 /* ObjectLiteralExpression */: + case 168 /* ObjectLiteralExpression */: return visitNodes(cbNodes, node.properties); - case 168 /* PropertyAccessExpression */: + case 169 /* PropertyAccessExpression */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.dotToken) || visitNode(cbNode, node.name); - case 169 /* ElementAccessExpression */: + case 170 /* ElementAccessExpression */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.argumentExpression); - case 170 /* CallExpression */: - case 171 /* NewExpression */: + case 171 /* CallExpression */: + case 172 /* NewExpression */: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.typeArguments) || visitNodes(cbNodes, node.arguments); - case 172 /* TaggedTemplateExpression */: + case 173 /* TaggedTemplateExpression */: return visitNode(cbNode, node.tag) || visitNode(cbNode, node.template); - case 173 /* TypeAssertionExpression */: + case 174 /* TypeAssertionExpression */: return visitNode(cbNode, node.type) || visitNode(cbNode, node.expression); - case 174 /* ParenthesizedExpression */: + case 175 /* ParenthesizedExpression */: return visitNode(cbNode, node.expression); - case 177 /* DeleteExpression */: + case 178 /* DeleteExpression */: return visitNode(cbNode, node.expression); - case 178 /* TypeOfExpression */: + case 179 /* TypeOfExpression */: return visitNode(cbNode, node.expression); - case 179 /* VoidExpression */: + case 180 /* VoidExpression */: return visitNode(cbNode, node.expression); - case 181 /* PrefixUnaryExpression */: + case 182 /* PrefixUnaryExpression */: return visitNode(cbNode, node.operand); - case 186 /* YieldExpression */: + case 187 /* YieldExpression */: return visitNode(cbNode, node.asteriskToken) || visitNode(cbNode, node.expression); - case 180 /* AwaitExpression */: + case 181 /* AwaitExpression */: return visitNode(cbNode, node.expression); - case 182 /* PostfixUnaryExpression */: + case 183 /* PostfixUnaryExpression */: return visitNode(cbNode, node.operand); - case 183 /* BinaryExpression */: + case 184 /* BinaryExpression */: return visitNode(cbNode, node.left) || visitNode(cbNode, node.operatorToken) || visitNode(cbNode, node.right); - case 191 /* AsExpression */: + case 192 /* AsExpression */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.type); - case 184 /* ConditionalExpression */: + case 185 /* ConditionalExpression */: return visitNode(cbNode, node.condition) || visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.whenTrue) || visitNode(cbNode, node.colonToken) || visitNode(cbNode, node.whenFalse); - case 187 /* SpreadElementExpression */: + case 188 /* SpreadElementExpression */: return visitNode(cbNode, node.expression); - case 194 /* Block */: - case 221 /* ModuleBlock */: + case 195 /* Block */: + case 222 /* ModuleBlock */: return visitNodes(cbNodes, node.statements); - case 250 /* SourceFile */: + case 251 /* SourceFile */: return visitNodes(cbNodes, node.statements) || visitNode(cbNode, node.endOfFileToken); - case 195 /* VariableStatement */: + case 196 /* VariableStatement */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.declarationList); - case 214 /* VariableDeclarationList */: + case 215 /* VariableDeclarationList */: return visitNodes(cbNodes, node.declarations); - case 197 /* ExpressionStatement */: + case 198 /* ExpressionStatement */: return visitNode(cbNode, node.expression); - case 198 /* IfStatement */: + case 199 /* IfStatement */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.thenStatement) || visitNode(cbNode, node.elseStatement); - case 199 /* DoStatement */: + case 200 /* DoStatement */: return visitNode(cbNode, node.statement) || visitNode(cbNode, node.expression); - case 200 /* WhileStatement */: + case 201 /* WhileStatement */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 201 /* ForStatement */: + case 202 /* ForStatement */: return visitNode(cbNode, node.initializer) || visitNode(cbNode, node.condition) || visitNode(cbNode, node.incrementor) || visitNode(cbNode, node.statement); - case 202 /* ForInStatement */: + case 203 /* ForInStatement */: return visitNode(cbNode, node.initializer) || visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 203 /* ForOfStatement */: + case 204 /* ForOfStatement */: return visitNode(cbNode, node.initializer) || visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 204 /* ContinueStatement */: - case 205 /* BreakStatement */: + case 205 /* ContinueStatement */: + case 206 /* BreakStatement */: return visitNode(cbNode, node.label); - case 206 /* ReturnStatement */: + case 207 /* ReturnStatement */: return visitNode(cbNode, node.expression); - case 207 /* WithStatement */: + case 208 /* WithStatement */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 208 /* SwitchStatement */: + case 209 /* SwitchStatement */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.caseBlock); - case 222 /* CaseBlock */: + case 223 /* CaseBlock */: return visitNodes(cbNodes, node.clauses); - case 243 /* CaseClause */: + case 244 /* CaseClause */: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.statements); - case 244 /* DefaultClause */: + case 245 /* DefaultClause */: return visitNodes(cbNodes, node.statements); - case 209 /* LabeledStatement */: + case 210 /* LabeledStatement */: return visitNode(cbNode, node.label) || visitNode(cbNode, node.statement); - case 210 /* ThrowStatement */: + case 211 /* ThrowStatement */: return visitNode(cbNode, node.expression); - case 211 /* TryStatement */: + case 212 /* TryStatement */: return visitNode(cbNode, node.tryBlock) || visitNode(cbNode, node.catchClause) || visitNode(cbNode, node.finallyBlock); - case 246 /* CatchClause */: + case 247 /* CatchClause */: return visitNode(cbNode, node.variableDeclaration) || visitNode(cbNode, node.block); - case 139 /* Decorator */: + case 140 /* Decorator */: return visitNode(cbNode, node.expression); - case 216 /* ClassDeclaration */: - case 188 /* ClassExpression */: + case 217 /* ClassDeclaration */: + case 189 /* ClassExpression */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeParameters) || visitNodes(cbNodes, node.heritageClauses) || visitNodes(cbNodes, node.members); - case 217 /* InterfaceDeclaration */: + case 218 /* InterfaceDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeParameters) || visitNodes(cbNodes, node.heritageClauses) || visitNodes(cbNodes, node.members); - case 218 /* TypeAliasDeclaration */: + case 219 /* TypeAliasDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeParameters) || visitNode(cbNode, node.type); - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.members); - case 249 /* EnumMember */: + case 250 /* EnumMember */: return visitNode(cbNode, node.name) || visitNode(cbNode, node.initializer); - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.body); - case 223 /* ImportEqualsDeclaration */: + case 224 /* ImportEqualsDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.moduleReference); - case 224 /* ImportDeclaration */: + case 225 /* ImportDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.importClause) || visitNode(cbNode, node.moduleSpecifier); - case 225 /* ImportClause */: + case 226 /* ImportClause */: return visitNode(cbNode, node.name) || visitNode(cbNode, node.namedBindings); - case 226 /* NamespaceImport */: + case 227 /* NamespaceImport */: return visitNode(cbNode, node.name); - case 227 /* NamedImports */: - case 231 /* NamedExports */: + case 228 /* NamedImports */: + case 232 /* NamedExports */: return visitNodes(cbNodes, node.elements); - case 230 /* ExportDeclaration */: + case 231 /* ExportDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.exportClause) || visitNode(cbNode, node.moduleSpecifier); - case 228 /* ImportSpecifier */: - case 232 /* ExportSpecifier */: + case 229 /* ImportSpecifier */: + case 233 /* ExportSpecifier */: return visitNode(cbNode, node.propertyName) || visitNode(cbNode, node.name); - case 229 /* ExportAssignment */: + case 230 /* ExportAssignment */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.expression); - case 185 /* TemplateExpression */: + case 186 /* TemplateExpression */: return visitNode(cbNode, node.head) || visitNodes(cbNodes, node.templateSpans); - case 192 /* TemplateSpan */: + case 193 /* TemplateSpan */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.literal); - case 136 /* ComputedPropertyName */: + case 137 /* ComputedPropertyName */: return visitNode(cbNode, node.expression); - case 245 /* HeritageClause */: + case 246 /* HeritageClause */: return visitNodes(cbNodes, node.types); - case 190 /* ExpressionWithTypeArguments */: + case 191 /* ExpressionWithTypeArguments */: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.typeArguments); - case 234 /* ExternalModuleReference */: + case 235 /* ExternalModuleReference */: return visitNode(cbNode, node.expression); - case 233 /* MissingDeclaration */: + case 234 /* MissingDeclaration */: return visitNodes(cbNodes, node.decorators); - case 235 /* JsxElement */: + case 236 /* JsxElement */: return visitNode(cbNode, node.openingElement) || visitNodes(cbNodes, node.children) || visitNode(cbNode, node.closingElement); - case 236 /* JsxSelfClosingElement */: - case 237 /* JsxOpeningElement */: + case 237 /* JsxSelfClosingElement */: + case 238 /* JsxOpeningElement */: return visitNode(cbNode, node.tagName) || visitNodes(cbNodes, node.attributes); - case 240 /* JsxAttribute */: + case 241 /* JsxAttribute */: return visitNode(cbNode, node.name) || visitNode(cbNode, node.initializer); - case 241 /* JsxSpreadAttribute */: + case 242 /* JsxSpreadAttribute */: return visitNode(cbNode, node.expression); - case 242 /* JsxExpression */: + case 243 /* JsxExpression */: return visitNode(cbNode, node.expression); - case 239 /* JsxClosingElement */: + case 240 /* JsxClosingElement */: return visitNode(cbNode, node.tagName); - case 251 /* JSDocTypeExpression */: + case 252 /* JSDocTypeExpression */: return visitNode(cbNode, node.type); - case 255 /* JSDocUnionType */: + case 256 /* JSDocUnionType */: return visitNodes(cbNodes, node.types); - case 256 /* JSDocTupleType */: + case 257 /* JSDocTupleType */: return visitNodes(cbNodes, node.types); - case 254 /* JSDocArrayType */: + case 255 /* JSDocArrayType */: return visitNode(cbNode, node.elementType); - case 258 /* JSDocNonNullableType */: + case 259 /* JSDocNonNullableType */: return visitNode(cbNode, node.type); - case 257 /* JSDocNullableType */: + case 258 /* JSDocNullableType */: return visitNode(cbNode, node.type); - case 259 /* JSDocRecordType */: + case 260 /* JSDocRecordType */: return visitNodes(cbNodes, node.members); - case 261 /* JSDocTypeReference */: + case 262 /* JSDocTypeReference */: return visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeArguments); - case 262 /* JSDocOptionalType */: + case 263 /* JSDocOptionalType */: return visitNode(cbNode, node.type); - case 263 /* JSDocFunctionType */: + case 264 /* JSDocFunctionType */: return visitNodes(cbNodes, node.parameters) || visitNode(cbNode, node.type); - case 264 /* JSDocVariadicType */: + case 265 /* JSDocVariadicType */: return visitNode(cbNode, node.type); - case 265 /* JSDocConstructorType */: + case 266 /* JSDocConstructorType */: return visitNode(cbNode, node.type); - case 266 /* JSDocThisType */: + case 267 /* JSDocThisType */: return visitNode(cbNode, node.type); - case 260 /* JSDocRecordMember */: + case 261 /* JSDocRecordMember */: return visitNode(cbNode, node.name) || visitNode(cbNode, node.type); - case 267 /* JSDocComment */: + case 268 /* JSDocComment */: return visitNodes(cbNodes, node.tags); - case 269 /* JSDocParameterTag */: + case 270 /* JSDocParameterTag */: return visitNode(cbNode, node.preParameterName) || visitNode(cbNode, node.typeExpression) || visitNode(cbNode, node.postParameterName); - case 270 /* JSDocReturnTag */: + case 271 /* JSDocReturnTag */: return visitNode(cbNode, node.typeExpression); - case 271 /* JSDocTypeTag */: + case 272 /* JSDocTypeTag */: return visitNode(cbNode, node.typeExpression); - case 272 /* JSDocTemplateTag */: + case 273 /* JSDocTemplateTag */: return visitNodes(cbNodes, node.typeParameters); } } @@ -7466,9 +7579,9 @@ var ts; // Add additional cases as necessary depending on how we see JSDoc comments used // in the wild. switch (node.kind) { - case 195 /* VariableStatement */: - case 215 /* FunctionDeclaration */: - case 138 /* Parameter */: + case 196 /* VariableStatement */: + case 216 /* FunctionDeclaration */: + case 139 /* Parameter */: addJSDocComment(node); } forEachChild(node, visit); @@ -7511,7 +7624,7 @@ var ts; function createSourceFile(fileName, languageVersion) { // code from createNode is inlined here so createNode won't have to deal with special case of creating source files // this is quite rare comparing to other nodes and createNode should be as fast as possible - var sourceFile = new SourceFileConstructor(250 /* SourceFile */, /*pos*/ 0, /* end */ sourceText.length); + var sourceFile = new SourceFileConstructor(251 /* SourceFile */, /*pos*/ 0, /* end */ sourceText.length); nodeCount++; sourceFile.text = sourceText; sourceFile.bindDiagnostics = []; @@ -7685,16 +7798,18 @@ var ts; } return result; } - // Invokes the provided callback then unconditionally restores the parser to the state it - // was in immediately prior to invoking the callback. The result of invoking the callback - // is returned from this function. + /** Invokes the provided callback then unconditionally restores the parser to the state it + * was in immediately prior to invoking the callback. The result of invoking the callback + * is returned from this function. + */ function lookAhead(callback) { return speculationHelper(callback, /*isLookAhead*/ true); } - // Invokes the provided callback. If the callback returns something falsy, then it restores - // the parser to the state it was in immediately prior to invoking the callback. If the - // callback returns something truthy, then the parser state is not rolled back. The result - // of invoking the callback is returned from this function. + /** Invokes the provided callback. If the callback returns something falsy, then it restores + * the parser to the state it was in immediately prior to invoking the callback. If the + * callback returns something truthy, then the parser state is not rolled back. The result + * of invoking the callback is returned from this function. + */ function tryParse(callback) { return speculationHelper(callback, /*isLookAhead*/ false); } @@ -7861,7 +7976,7 @@ var ts; // PropertyName [Yield]: // LiteralPropertyName // ComputedPropertyName[?Yield] - var node = createNode(136 /* ComputedPropertyName */); + var node = createNode(137 /* ComputedPropertyName */); parseExpected(19 /* OpenBracketToken */); // We parse any expression (including a comma expression). But the grammar // says that only an assignment expression is allowed, so the grammar checker @@ -8262,14 +8377,14 @@ var ts; function isReusableClassMember(node) { if (node) { switch (node.kind) { - case 144 /* Constructor */: - case 149 /* IndexSignature */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 141 /* PropertyDeclaration */: - case 193 /* SemicolonClassElement */: + case 145 /* Constructor */: + case 150 /* IndexSignature */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 142 /* PropertyDeclaration */: + case 194 /* SemicolonClassElement */: return true; - case 143 /* MethodDeclaration */: + case 144 /* MethodDeclaration */: // Method declarations are not necessarily reusable. An object-literal // may have a method calls "constructor(...)" and we must reparse that // into an actual .ConstructorDeclaration. @@ -8284,8 +8399,8 @@ var ts; function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 243 /* CaseClause */: - case 244 /* DefaultClause */: + case 244 /* CaseClause */: + case 245 /* DefaultClause */: return true; } } @@ -8294,58 +8409,58 @@ var ts; function isReusableStatement(node) { if (node) { switch (node.kind) { - case 215 /* FunctionDeclaration */: - case 195 /* VariableStatement */: - case 194 /* Block */: - case 198 /* IfStatement */: - case 197 /* ExpressionStatement */: - case 210 /* ThrowStatement */: - case 206 /* ReturnStatement */: - case 208 /* SwitchStatement */: - case 205 /* BreakStatement */: - case 204 /* ContinueStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - case 201 /* ForStatement */: - case 200 /* WhileStatement */: - case 207 /* WithStatement */: - case 196 /* EmptyStatement */: - case 211 /* TryStatement */: - case 209 /* LabeledStatement */: - case 199 /* DoStatement */: - case 212 /* DebuggerStatement */: - case 224 /* ImportDeclaration */: - case 223 /* ImportEqualsDeclaration */: - case 230 /* ExportDeclaration */: - case 229 /* ExportAssignment */: - case 220 /* ModuleDeclaration */: - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: - case 219 /* EnumDeclaration */: - case 218 /* TypeAliasDeclaration */: + case 216 /* FunctionDeclaration */: + case 196 /* VariableStatement */: + case 195 /* Block */: + case 199 /* IfStatement */: + case 198 /* ExpressionStatement */: + case 211 /* ThrowStatement */: + case 207 /* ReturnStatement */: + case 209 /* SwitchStatement */: + case 206 /* BreakStatement */: + case 205 /* ContinueStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: + case 202 /* ForStatement */: + case 201 /* WhileStatement */: + case 208 /* WithStatement */: + case 197 /* EmptyStatement */: + case 212 /* TryStatement */: + case 210 /* LabeledStatement */: + case 200 /* DoStatement */: + case 213 /* DebuggerStatement */: + case 225 /* ImportDeclaration */: + case 224 /* ImportEqualsDeclaration */: + case 231 /* ExportDeclaration */: + case 230 /* ExportAssignment */: + case 221 /* ModuleDeclaration */: + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: + case 220 /* EnumDeclaration */: + case 219 /* TypeAliasDeclaration */: return true; } } return false; } function isReusableEnumMember(node) { - return node.kind === 249 /* EnumMember */; + return node.kind === 250 /* EnumMember */; } function isReusableTypeMember(node) { if (node) { switch (node.kind) { - case 148 /* ConstructSignature */: - case 142 /* MethodSignature */: - case 149 /* IndexSignature */: - case 140 /* PropertySignature */: - case 147 /* CallSignature */: + case 149 /* ConstructSignature */: + case 143 /* MethodSignature */: + case 150 /* IndexSignature */: + case 141 /* PropertySignature */: + case 148 /* CallSignature */: return true; } } return false; } function isReusableVariableDeclaration(node) { - if (node.kind !== 213 /* VariableDeclaration */) { + if (node.kind !== 214 /* VariableDeclaration */) { return false; } // Very subtle incremental parsing bug. Consider the following code: @@ -8366,7 +8481,7 @@ var ts; return variableDeclarator.initializer === undefined; } function isReusableParameter(node) { - if (node.kind !== 138 /* Parameter */) { + if (node.kind !== 139 /* Parameter */) { return false; } // See the comment in isReusableVariableDeclaration for why we do this. @@ -8483,7 +8598,7 @@ var ts; function parseEntityName(allowReservedWords, diagnosticMessage) { var entity = parseIdentifier(diagnosticMessage); while (parseOptional(21 /* DotToken */)) { - var node = createNode(135 /* QualifiedName */, entity.pos); + var node = createNode(136 /* QualifiedName */, entity.pos); node.left = entity; node.right = parseRightSideOfDot(allowReservedWords); entity = finishNode(node); @@ -8522,7 +8637,7 @@ var ts; return allowIdentifierNames ? parseIdentifierName() : parseIdentifier(); } function parseTemplateExpression() { - var template = createNode(185 /* TemplateExpression */); + var template = createNode(186 /* TemplateExpression */); template.head = parseTemplateLiteralFragment(); ts.Debug.assert(template.head.kind === 12 /* TemplateHead */, "Template head has wrong token kind"); var templateSpans = []; @@ -8535,7 +8650,7 @@ var ts; return finishNode(template); } function parseTemplateSpan() { - var span = createNode(192 /* TemplateSpan */); + var span = createNode(193 /* TemplateSpan */); span.expression = allowInAnd(parseExpression); var literal; if (token === 16 /* CloseBraceToken */) { @@ -8549,7 +8664,7 @@ var ts; return finishNode(span); } function parseStringLiteralTypeNode() { - return parseLiteralLikeNode(162 /* StringLiteralType */, /*internName*/ true); + return parseLiteralLikeNode(163 /* StringLiteralType */, /*internName*/ true); } function parseLiteralNode(internName) { return parseLiteralLikeNode(token, internName); @@ -8584,12 +8699,9 @@ var ts; return node; } // TYPES - function parseTypeReferenceOrTypePredicate() { + function parseTypeReference() { var typeName = parseEntityName(/*allowReservedWords*/ false, ts.Diagnostics.Type_expected); - if (typeName.kind === 69 /* Identifier */ && token === 124 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) { - return parseTypePredicate(typeName); - } - var node = createNode(151 /* TypeReference */, typeName.pos); + var node = createNode(152 /* TypeReference */, typeName.pos); node.typeName = typeName; if (!scanner.hasPrecedingLineBreak() && token === 25 /* LessThanToken */) { node.typeArguments = parseBracketedList(18 /* TypeArguments */, parseType, 25 /* LessThanToken */, 27 /* GreaterThanToken */); @@ -8598,24 +8710,24 @@ var ts; } function parseTypePredicate(lhs) { nextToken(); - var node = createNode(150 /* TypePredicate */, lhs.pos); + var node = createNode(151 /* TypePredicate */, lhs.pos); node.parameterName = lhs; node.type = parseType(); return finishNode(node); } function parseThisTypeNode() { - var node = createNode(161 /* ThisType */); + var node = createNode(162 /* ThisType */); nextToken(); return finishNode(node); } function parseTypeQuery() { - var node = createNode(154 /* TypeQuery */); + var node = createNode(155 /* TypeQuery */); parseExpected(101 /* TypeOfKeyword */); node.exprName = parseEntityName(/*allowReservedWords*/ true); return finishNode(node); } function parseTypeParameter() { - var node = createNode(137 /* TypeParameter */); + var node = createNode(138 /* TypeParameter */); node.name = parseIdentifier(); if (parseOptional(83 /* ExtendsKeyword */)) { // It's not uncommon for people to write improper constraints to a generic. If the @@ -8659,7 +8771,7 @@ var ts; } } function parseParameter() { - var node = createNode(138 /* Parameter */); + var node = createNode(139 /* Parameter */); node.decorators = parseDecorators(); setModifiers(node, parseModifiers()); node.dotDotDotToken = parseOptionalToken(22 /* DotDotDotToken */); @@ -8702,10 +8814,10 @@ var ts; signature.parameters = parseParameterList(yieldContext, awaitContext, requireCompleteParameterList); if (returnTokenRequired) { parseExpected(returnToken); - signature.type = parseType(); + signature.type = parseTypeOrTypePredicate(); } else if (parseOptional(returnToken)) { - signature.type = parseType(); + signature.type = parseTypeOrTypePredicate(); } } function parseParameterList(yieldContext, awaitContext, requireCompleteParameterList) { @@ -8753,7 +8865,7 @@ var ts; } function parseSignatureMember(kind) { var node = createNode(kind); - if (kind === 148 /* ConstructSignature */) { + if (kind === 149 /* ConstructSignature */) { parseExpected(92 /* NewKeyword */); } fillSignature(54 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); @@ -8817,7 +8929,7 @@ var ts; return token === 54 /* ColonToken */ || token === 24 /* CommaToken */ || token === 20 /* CloseBracketToken */; } function parseIndexSignatureDeclaration(fullStart, decorators, modifiers) { - var node = createNode(149 /* IndexSignature */, fullStart); + var node = createNode(150 /* IndexSignature */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); node.parameters = parseBracketedList(16 /* Parameters */, parseParameter, 19 /* OpenBracketToken */, 20 /* CloseBracketToken */); @@ -8830,7 +8942,7 @@ var ts; var name = parsePropertyName(); var questionToken = parseOptionalToken(53 /* QuestionToken */); if (token === 17 /* OpenParenToken */ || token === 25 /* LessThanToken */) { - var method = createNode(142 /* MethodSignature */, fullStart); + var method = createNode(143 /* MethodSignature */, fullStart); method.name = name; method.questionToken = questionToken; // Method signatues don't exist in expression contexts. So they have neither @@ -8840,7 +8952,7 @@ var ts; return finishNode(method); } else { - var property = createNode(140 /* PropertySignature */, fullStart); + var property = createNode(141 /* PropertySignature */, fullStart); property.name = name; property.questionToken = questionToken; property.type = parseTypeAnnotation(); @@ -8888,7 +9000,7 @@ var ts; switch (token) { case 17 /* OpenParenToken */: case 25 /* LessThanToken */: - return parseSignatureMember(147 /* CallSignature */); + return parseSignatureMember(148 /* CallSignature */); case 19 /* OpenBracketToken */: // Indexer or computed property return isIndexSignature() @@ -8896,7 +9008,7 @@ var ts; : parsePropertyOrMethodSignature(); case 92 /* NewKeyword */: if (lookAhead(isStartOfConstructSignature)) { - return parseSignatureMember(148 /* ConstructSignature */); + return parseSignatureMember(149 /* ConstructSignature */); } // fall through. case 9 /* StringLiteral */: @@ -8933,7 +9045,7 @@ var ts; return token === 17 /* OpenParenToken */ || token === 25 /* LessThanToken */; } function parseTypeLiteral() { - var node = createNode(155 /* TypeLiteral */); + var node = createNode(156 /* TypeLiteral */); node.members = parseObjectTypeMembers(); return finishNode(node); } @@ -8949,12 +9061,12 @@ var ts; return members; } function parseTupleType() { - var node = createNode(157 /* TupleType */); + var node = createNode(158 /* TupleType */); node.elementTypes = parseBracketedList(19 /* TupleElementTypes */, parseType, 19 /* OpenBracketToken */, 20 /* CloseBracketToken */); return finishNode(node); } function parseParenthesizedType() { - var node = createNode(160 /* ParenthesizedType */); + var node = createNode(161 /* ParenthesizedType */); parseExpected(17 /* OpenParenToken */); node.type = parseType(); parseExpected(18 /* CloseParenToken */); @@ -8962,7 +9074,7 @@ var ts; } function parseFunctionOrConstructorType(kind) { var node = createNode(kind); - if (kind === 153 /* ConstructorType */) { + if (kind === 154 /* ConstructorType */) { parseExpected(92 /* NewKeyword */); } fillSignature(34 /* EqualsGreaterThanToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); @@ -8981,7 +9093,7 @@ var ts; case 131 /* SymbolKeyword */: // If these are followed by a dot, then parse these out as a dotted type reference instead. var node = tryParse(parseKeywordAndNoDot); - return node || parseTypeReferenceOrTypePredicate(); + return node || parseTypeReference(); case 9 /* StringLiteral */: return parseStringLiteralTypeNode(); case 103 /* VoidKeyword */: @@ -9004,7 +9116,7 @@ var ts; case 17 /* OpenParenToken */: return parseParenthesizedType(); default: - return parseTypeReferenceOrTypePredicate(); + return parseTypeReference(); } } function isStartOfType() { @@ -9039,7 +9151,7 @@ var ts; var type = parseNonArrayType(); while (!scanner.hasPrecedingLineBreak() && parseOptional(19 /* OpenBracketToken */)) { parseExpected(20 /* CloseBracketToken */); - var node = createNode(156 /* ArrayType */, type.pos); + var node = createNode(157 /* ArrayType */, type.pos); node.elementType = type; type = finishNode(node); } @@ -9061,10 +9173,10 @@ var ts; return type; } function parseIntersectionTypeOrHigher() { - return parseUnionOrIntersectionType(159 /* IntersectionType */, parseArrayTypeOrHigher, 46 /* AmpersandToken */); + return parseUnionOrIntersectionType(160 /* IntersectionType */, parseArrayTypeOrHigher, 46 /* AmpersandToken */); } function parseUnionTypeOrHigher() { - return parseUnionOrIntersectionType(158 /* UnionType */, parseIntersectionTypeOrHigher, 47 /* BarToken */); + return parseUnionOrIntersectionType(159 /* UnionType */, parseIntersectionTypeOrHigher, 47 /* BarToken */); } function isStartOfFunctionType() { if (token === 25 /* LessThanToken */) { @@ -9101,6 +9213,26 @@ var ts; } return false; } + function parseTypeOrTypePredicate() { + var typePredicateVariable = isIdentifier() && tryParse(parseTypePredicatePrefix); + var type = parseType(); + if (typePredicateVariable) { + var node = createNode(151 /* TypePredicate */, typePredicateVariable.pos); + node.parameterName = typePredicateVariable; + node.type = type; + return finishNode(node); + } + else { + return type; + } + } + function parseTypePredicatePrefix() { + var id = parseIdentifier(); + if (token === 124 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) { + nextToken(); + return id; + } + } function parseType() { // The rules about 'yield' only apply to actual code/expression contexts. They don't // apply to 'type' contexts. So we disable these parameters here before moving on. @@ -9108,10 +9240,10 @@ var ts; } function parseTypeWorker() { if (isStartOfFunctionType()) { - return parseFunctionOrConstructorType(152 /* FunctionType */); + return parseFunctionOrConstructorType(153 /* FunctionType */); } if (token === 92 /* NewKeyword */) { - return parseFunctionOrConstructorType(153 /* ConstructorType */); + return parseFunctionOrConstructorType(154 /* ConstructorType */); } return parseUnionTypeOrHigher(); } @@ -9304,7 +9436,7 @@ var ts; return !scanner.hasPrecedingLineBreak() && isIdentifier(); } function parseYieldExpression() { - var node = createNode(186 /* YieldExpression */); + var node = createNode(187 /* YieldExpression */); // YieldExpression[In] : // yield // yield [no LineTerminator here] [Lexical goal InputElementRegExp]AssignmentExpression[?In, Yield] @@ -9324,8 +9456,8 @@ var ts; } function parseSimpleArrowFunctionExpression(identifier) { ts.Debug.assert(token === 34 /* EqualsGreaterThanToken */, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); - var node = createNode(176 /* ArrowFunction */, identifier.pos); - var parameter = createNode(138 /* Parameter */, identifier.pos); + var node = createNode(177 /* ArrowFunction */, identifier.pos); + var parameter = createNode(139 /* Parameter */, identifier.pos); parameter.name = identifier; finishNode(parameter); node.parameters = [parameter]; @@ -9477,7 +9609,7 @@ var ts; return parseParenthesizedArrowFunctionExpressionHead(/*allowAmbiguity*/ false); } function parseParenthesizedArrowFunctionExpressionHead(allowAmbiguity) { - var node = createNode(176 /* ArrowFunction */); + var node = createNode(177 /* ArrowFunction */); setModifiers(node, parseModifiersForArrowFunction()); var isAsync = !!(node.flags & 256 /* Async */); // Arrow functions are never generators. @@ -9543,7 +9675,7 @@ var ts; } // Note: we explicitly 'allowIn' in the whenTrue part of the condition expression, and // we do not that for the 'whenFalse' part. - var node = createNode(184 /* ConditionalExpression */, leftOperand.pos); + var node = createNode(185 /* ConditionalExpression */, leftOperand.pos); node.condition = leftOperand; node.questionToken = questionToken; node.whenTrue = doOutsideOfContext(disallowInAndDecoratorContext, parseAssignmentExpressionOrHigher); @@ -9556,7 +9688,7 @@ var ts; return parseBinaryExpressionRest(precedence, leftOperand); } function isInOrOfKeyword(t) { - return t === 90 /* InKeyword */ || t === 134 /* OfKeyword */; + return t === 90 /* InKeyword */ || t === 135 /* OfKeyword */; } function parseBinaryExpressionRest(precedence, leftOperand) { while (true) { @@ -9664,39 +9796,39 @@ var ts; return -1; } function makeBinaryExpression(left, operatorToken, right) { - var node = createNode(183 /* BinaryExpression */, left.pos); + var node = createNode(184 /* BinaryExpression */, left.pos); node.left = left; node.operatorToken = operatorToken; node.right = right; return finishNode(node); } function makeAsExpression(left, right) { - var node = createNode(191 /* AsExpression */, left.pos); + var node = createNode(192 /* AsExpression */, left.pos); node.expression = left; node.type = right; return finishNode(node); } function parsePrefixUnaryExpression() { - var node = createNode(181 /* PrefixUnaryExpression */); + var node = createNode(182 /* PrefixUnaryExpression */); node.operator = token; nextToken(); node.operand = parseSimpleUnaryExpression(); return finishNode(node); } function parseDeleteExpression() { - var node = createNode(177 /* DeleteExpression */); + var node = createNode(178 /* DeleteExpression */); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function parseTypeOfExpression() { - var node = createNode(178 /* TypeOfExpression */); + var node = createNode(179 /* TypeOfExpression */); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function parseVoidExpression() { - var node = createNode(179 /* VoidExpression */); + var node = createNode(180 /* VoidExpression */); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); @@ -9712,7 +9844,7 @@ var ts; return false; } function parseAwaitExpression() { - var node = createNode(180 /* AwaitExpression */); + var node = createNode(181 /* AwaitExpression */); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); @@ -9738,7 +9870,7 @@ var ts; var simpleUnaryExpression = parseSimpleUnaryExpression(); if (token === 38 /* AsteriskAsteriskToken */) { var start = ts.skipTrivia(sourceText, simpleUnaryExpression.pos); - if (simpleUnaryExpression.kind === 173 /* TypeAssertionExpression */) { + if (simpleUnaryExpression.kind === 174 /* TypeAssertionExpression */) { parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); } else { @@ -9828,7 +9960,7 @@ var ts; */ function parseIncrementExpression() { if (token === 41 /* PlusPlusToken */ || token === 42 /* MinusMinusToken */) { - var node = createNode(181 /* PrefixUnaryExpression */); + var node = createNode(182 /* PrefixUnaryExpression */); node.operator = token; nextToken(); node.operand = parseLeftHandSideExpressionOrHigher(); @@ -9841,7 +9973,7 @@ var ts; var expression = parseLeftHandSideExpressionOrHigher(); ts.Debug.assert(ts.isLeftHandSideExpression(expression)); if ((token === 41 /* PlusPlusToken */ || token === 42 /* MinusMinusToken */) && !scanner.hasPrecedingLineBreak()) { - var node = createNode(182 /* PostfixUnaryExpression */, expression.pos); + var node = createNode(183 /* PostfixUnaryExpression */, expression.pos); node.operand = expression; node.operator = token; nextToken(); @@ -9945,7 +10077,7 @@ var ts; } // If we have seen "super" it must be followed by '(' or '.'. // If it wasn't then just try to parse out a '.' and report an error. - var node = createNode(168 /* PropertyAccessExpression */, expression.pos); + var node = createNode(169 /* PropertyAccessExpression */, expression.pos); node.expression = expression; node.dotToken = parseExpectedToken(21 /* DotToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); node.name = parseRightSideOfDot(/*allowIdentifierNames*/ true); @@ -9964,8 +10096,8 @@ var ts; function parseJsxElementOrSelfClosingElement(inExpressionContext) { var opening = parseJsxOpeningOrSelfClosingElement(inExpressionContext); var result; - if (opening.kind === 237 /* JsxOpeningElement */) { - var node = createNode(235 /* JsxElement */, opening.pos); + if (opening.kind === 238 /* JsxOpeningElement */) { + var node = createNode(236 /* JsxElement */, opening.pos); node.openingElement = opening; node.children = parseJsxChildren(node.openingElement.tagName); node.closingElement = parseJsxClosingElement(inExpressionContext); @@ -9975,7 +10107,7 @@ var ts; result = finishNode(node); } else { - ts.Debug.assert(opening.kind === 236 /* JsxSelfClosingElement */); + ts.Debug.assert(opening.kind === 237 /* JsxSelfClosingElement */); // Nothing else to do for self-closing elements result = opening; } @@ -9990,7 +10122,7 @@ var ts; var invalidElement = tryParse(function () { return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ true); }); if (invalidElement) { parseErrorAtCurrentToken(ts.Diagnostics.JSX_expressions_must_have_one_parent_element); - var badNode = createNode(183 /* BinaryExpression */, result.pos); + var badNode = createNode(184 /* BinaryExpression */, result.pos); badNode.end = invalidElement.end; badNode.left = result; badNode.right = invalidElement; @@ -10002,13 +10134,13 @@ var ts; return result; } function parseJsxText() { - var node = createNode(238 /* JsxText */, scanner.getStartPos()); + var node = createNode(239 /* JsxText */, scanner.getStartPos()); token = scanner.scanJsxToken(); return finishNode(node); } function parseJsxChild() { switch (token) { - case 238 /* JsxText */: + case 239 /* JsxText */: return parseJsxText(); case 15 /* OpenBraceToken */: return parseJsxExpression(/*inExpressionContext*/ false); @@ -10050,7 +10182,7 @@ var ts; // Closing tag, so scan the immediately-following text with the JSX scanning instead // of regular scanning to avoid treating illegal characters (e.g. '#') as immediate // scanning errors - node = createNode(237 /* JsxOpeningElement */, fullStart); + node = createNode(238 /* JsxOpeningElement */, fullStart); scanJsxText(); } else { @@ -10062,7 +10194,7 @@ var ts; parseExpected(27 /* GreaterThanToken */, /*diagnostic*/ undefined, /*shouldAdvance*/ false); scanJsxText(); } - node = createNode(236 /* JsxSelfClosingElement */, fullStart); + node = createNode(237 /* JsxSelfClosingElement */, fullStart); } node.tagName = tagName; node.attributes = attributes; @@ -10073,7 +10205,7 @@ var ts; var elementName = parseIdentifierName(); while (parseOptional(21 /* DotToken */)) { scanJsxIdentifier(); - var node = createNode(135 /* QualifiedName */, elementName.pos); + var node = createNode(136 /* QualifiedName */, elementName.pos); node.left = elementName; node.right = parseIdentifierName(); elementName = finishNode(node); @@ -10081,7 +10213,7 @@ var ts; return elementName; } function parseJsxExpression(inExpressionContext) { - var node = createNode(242 /* JsxExpression */); + var node = createNode(243 /* JsxExpression */); parseExpected(15 /* OpenBraceToken */); if (token !== 16 /* CloseBraceToken */) { node.expression = parseAssignmentExpressionOrHigher(); @@ -10100,7 +10232,7 @@ var ts; return parseJsxSpreadAttribute(); } scanJsxIdentifier(); - var node = createNode(240 /* JsxAttribute */); + var node = createNode(241 /* JsxAttribute */); node.name = parseIdentifierName(); if (parseOptional(56 /* EqualsToken */)) { switch (token) { @@ -10115,7 +10247,7 @@ var ts; return finishNode(node); } function parseJsxSpreadAttribute() { - var node = createNode(241 /* JsxSpreadAttribute */); + var node = createNode(242 /* JsxSpreadAttribute */); parseExpected(15 /* OpenBraceToken */); parseExpected(22 /* DotDotDotToken */); node.expression = parseExpression(); @@ -10123,7 +10255,7 @@ var ts; return finishNode(node); } function parseJsxClosingElement(inExpressionContext) { - var node = createNode(239 /* JsxClosingElement */); + var node = createNode(240 /* JsxClosingElement */); parseExpected(26 /* LessThanSlashToken */); node.tagName = parseJsxElementName(); if (inExpressionContext) { @@ -10136,7 +10268,7 @@ var ts; return finishNode(node); } function parseTypeAssertion() { - var node = createNode(173 /* TypeAssertionExpression */); + var node = createNode(174 /* TypeAssertionExpression */); parseExpected(25 /* LessThanToken */); node.type = parseType(); parseExpected(27 /* GreaterThanToken */); @@ -10147,7 +10279,7 @@ var ts; while (true) { var dotToken = parseOptionalToken(21 /* DotToken */); if (dotToken) { - var propertyAccess = createNode(168 /* PropertyAccessExpression */, expression.pos); + var propertyAccess = createNode(169 /* PropertyAccessExpression */, expression.pos); propertyAccess.expression = expression; propertyAccess.dotToken = dotToken; propertyAccess.name = parseRightSideOfDot(/*allowIdentifierNames*/ true); @@ -10156,7 +10288,7 @@ var ts; } // when in the [Decorator] context, we do not parse ElementAccess as it could be part of a ComputedPropertyName if (!inDecoratorContext() && parseOptional(19 /* OpenBracketToken */)) { - var indexedAccess = createNode(169 /* ElementAccessExpression */, expression.pos); + var indexedAccess = createNode(170 /* ElementAccessExpression */, expression.pos); indexedAccess.expression = expression; // It's not uncommon for a user to write: "new Type[]". // Check for that common pattern and report a better error message. @@ -10172,7 +10304,7 @@ var ts; continue; } if (token === 11 /* NoSubstitutionTemplateLiteral */ || token === 12 /* TemplateHead */) { - var tagExpression = createNode(172 /* TaggedTemplateExpression */, expression.pos); + var tagExpression = createNode(173 /* TaggedTemplateExpression */, expression.pos); tagExpression.tag = expression; tagExpression.template = token === 11 /* NoSubstitutionTemplateLiteral */ ? parseLiteralNode() @@ -10195,7 +10327,7 @@ var ts; if (!typeArguments) { return expression; } - var callExpr = createNode(170 /* CallExpression */, expression.pos); + var callExpr = createNode(171 /* CallExpression */, expression.pos); callExpr.expression = expression; callExpr.typeArguments = typeArguments; callExpr.arguments = parseArgumentList(); @@ -10203,7 +10335,7 @@ var ts; continue; } else if (token === 17 /* OpenParenToken */) { - var callExpr = createNode(170 /* CallExpression */, expression.pos); + var callExpr = createNode(171 /* CallExpression */, expression.pos); callExpr.expression = expression; callExpr.arguments = parseArgumentList(); expression = finishNode(callExpr); @@ -10313,28 +10445,28 @@ var ts; return parseIdentifier(ts.Diagnostics.Expression_expected); } function parseParenthesizedExpression() { - var node = createNode(174 /* ParenthesizedExpression */); + var node = createNode(175 /* ParenthesizedExpression */); parseExpected(17 /* OpenParenToken */); node.expression = allowInAnd(parseExpression); parseExpected(18 /* CloseParenToken */); return finishNode(node); } function parseSpreadElement() { - var node = createNode(187 /* SpreadElementExpression */); + var node = createNode(188 /* SpreadElementExpression */); parseExpected(22 /* DotDotDotToken */); node.expression = parseAssignmentExpressionOrHigher(); return finishNode(node); } function parseArgumentOrArrayLiteralElement() { return token === 22 /* DotDotDotToken */ ? parseSpreadElement() : - token === 24 /* CommaToken */ ? createNode(189 /* OmittedExpression */) : + token === 24 /* CommaToken */ ? createNode(190 /* OmittedExpression */) : parseAssignmentExpressionOrHigher(); } function parseArgumentExpression() { return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement); } function parseArrayLiteralExpression() { - var node = createNode(166 /* ArrayLiteralExpression */); + var node = createNode(167 /* ArrayLiteralExpression */); parseExpected(19 /* OpenBracketToken */); if (scanner.hasPrecedingLineBreak()) node.flags |= 1024 /* MultiLine */; @@ -10344,10 +10476,10 @@ var ts; } function tryParseAccessorDeclaration(fullStart, decorators, modifiers) { if (parseContextualModifier(123 /* GetKeyword */)) { - return parseAccessorDeclaration(145 /* GetAccessor */, fullStart, decorators, modifiers); + return parseAccessorDeclaration(146 /* GetAccessor */, fullStart, decorators, modifiers); } else if (parseContextualModifier(129 /* SetKeyword */)) { - return parseAccessorDeclaration(146 /* SetAccessor */, fullStart, decorators, modifiers); + return parseAccessorDeclaration(147 /* SetAccessor */, fullStart, decorators, modifiers); } return undefined; } @@ -10374,7 +10506,7 @@ var ts; // this is necessary because ObjectLiteral productions are also used to cover grammar for ObjectAssignmentPattern var isShorthandPropertyAssignment = tokenIsIdentifier && (token === 24 /* CommaToken */ || token === 16 /* CloseBraceToken */ || token === 56 /* EqualsToken */); if (isShorthandPropertyAssignment) { - var shorthandDeclaration = createNode(248 /* ShorthandPropertyAssignment */, fullStart); + var shorthandDeclaration = createNode(249 /* ShorthandPropertyAssignment */, fullStart); shorthandDeclaration.name = propertyName; shorthandDeclaration.questionToken = questionToken; var equalsToken = parseOptionalToken(56 /* EqualsToken */); @@ -10385,7 +10517,7 @@ var ts; return finishNode(shorthandDeclaration); } else { - var propertyAssignment = createNode(247 /* PropertyAssignment */, fullStart); + var propertyAssignment = createNode(248 /* PropertyAssignment */, fullStart); propertyAssignment.modifiers = modifiers; propertyAssignment.name = propertyName; propertyAssignment.questionToken = questionToken; @@ -10395,7 +10527,7 @@ var ts; } } function parseObjectLiteralExpression() { - var node = createNode(167 /* ObjectLiteralExpression */); + var node = createNode(168 /* ObjectLiteralExpression */); parseExpected(15 /* OpenBraceToken */); if (scanner.hasPrecedingLineBreak()) { node.flags |= 1024 /* MultiLine */; @@ -10414,7 +10546,7 @@ var ts; if (saveDecoratorContext) { setDecoratorContext(/*val*/ false); } - var node = createNode(175 /* FunctionExpression */); + var node = createNode(176 /* FunctionExpression */); setModifiers(node, parseModifiers()); parseExpected(87 /* FunctionKeyword */); node.asteriskToken = parseOptionalToken(37 /* AsteriskToken */); @@ -10436,7 +10568,7 @@ var ts; return isIdentifier() ? parseIdentifier() : undefined; } function parseNewExpression() { - var node = createNode(171 /* NewExpression */); + var node = createNode(172 /* NewExpression */); parseExpected(92 /* NewKeyword */); node.expression = parseMemberExpressionOrHigher(); node.typeArguments = tryParse(parseTypeArgumentsInExpression); @@ -10447,7 +10579,7 @@ var ts; } // STATEMENTS function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) { - var node = createNode(194 /* Block */); + var node = createNode(195 /* Block */); if (parseExpected(15 /* OpenBraceToken */, diagnosticMessage) || ignoreMissingOpenBrace) { node.statements = parseList(1 /* BlockStatements */, parseStatement); parseExpected(16 /* CloseBraceToken */); @@ -10477,12 +10609,12 @@ var ts; return block; } function parseEmptyStatement() { - var node = createNode(196 /* EmptyStatement */); + var node = createNode(197 /* EmptyStatement */); parseExpected(23 /* SemicolonToken */); return finishNode(node); } function parseIfStatement() { - var node = createNode(198 /* IfStatement */); + var node = createNode(199 /* IfStatement */); parseExpected(88 /* IfKeyword */); parseExpected(17 /* OpenParenToken */); node.expression = allowInAnd(parseExpression); @@ -10492,7 +10624,7 @@ var ts; return finishNode(node); } function parseDoStatement() { - var node = createNode(199 /* DoStatement */); + var node = createNode(200 /* DoStatement */); parseExpected(79 /* DoKeyword */); node.statement = parseStatement(); parseExpected(104 /* WhileKeyword */); @@ -10507,7 +10639,7 @@ var ts; return finishNode(node); } function parseWhileStatement() { - var node = createNode(200 /* WhileStatement */); + var node = createNode(201 /* WhileStatement */); parseExpected(104 /* WhileKeyword */); parseExpected(17 /* OpenParenToken */); node.expression = allowInAnd(parseExpression); @@ -10530,21 +10662,21 @@ var ts; } var forOrForInOrForOfStatement; if (parseOptional(90 /* InKeyword */)) { - var forInStatement = createNode(202 /* ForInStatement */, pos); + var forInStatement = createNode(203 /* ForInStatement */, pos); forInStatement.initializer = initializer; forInStatement.expression = allowInAnd(parseExpression); parseExpected(18 /* CloseParenToken */); forOrForInOrForOfStatement = forInStatement; } - else if (parseOptional(134 /* OfKeyword */)) { - var forOfStatement = createNode(203 /* ForOfStatement */, pos); + else if (parseOptional(135 /* OfKeyword */)) { + var forOfStatement = createNode(204 /* ForOfStatement */, pos); forOfStatement.initializer = initializer; forOfStatement.expression = allowInAnd(parseAssignmentExpressionOrHigher); parseExpected(18 /* CloseParenToken */); forOrForInOrForOfStatement = forOfStatement; } else { - var forStatement = createNode(201 /* ForStatement */, pos); + var forStatement = createNode(202 /* ForStatement */, pos); forStatement.initializer = initializer; parseExpected(23 /* SemicolonToken */); if (token !== 23 /* SemicolonToken */ && token !== 18 /* CloseParenToken */) { @@ -10562,7 +10694,7 @@ var ts; } function parseBreakOrContinueStatement(kind) { var node = createNode(kind); - parseExpected(kind === 205 /* BreakStatement */ ? 70 /* BreakKeyword */ : 75 /* ContinueKeyword */); + parseExpected(kind === 206 /* BreakStatement */ ? 70 /* BreakKeyword */ : 75 /* ContinueKeyword */); if (!canParseSemicolon()) { node.label = parseIdentifier(); } @@ -10570,7 +10702,7 @@ var ts; return finishNode(node); } function parseReturnStatement() { - var node = createNode(206 /* ReturnStatement */); + var node = createNode(207 /* ReturnStatement */); parseExpected(94 /* ReturnKeyword */); if (!canParseSemicolon()) { node.expression = allowInAnd(parseExpression); @@ -10579,7 +10711,7 @@ var ts; return finishNode(node); } function parseWithStatement() { - var node = createNode(207 /* WithStatement */); + var node = createNode(208 /* WithStatement */); parseExpected(105 /* WithKeyword */); parseExpected(17 /* OpenParenToken */); node.expression = allowInAnd(parseExpression); @@ -10588,7 +10720,7 @@ var ts; return finishNode(node); } function parseCaseClause() { - var node = createNode(243 /* CaseClause */); + var node = createNode(244 /* CaseClause */); parseExpected(71 /* CaseKeyword */); node.expression = allowInAnd(parseExpression); parseExpected(54 /* ColonToken */); @@ -10596,7 +10728,7 @@ var ts; return finishNode(node); } function parseDefaultClause() { - var node = createNode(244 /* DefaultClause */); + var node = createNode(245 /* DefaultClause */); parseExpected(77 /* DefaultKeyword */); parseExpected(54 /* ColonToken */); node.statements = parseList(3 /* SwitchClauseStatements */, parseStatement); @@ -10606,12 +10738,12 @@ var ts; return token === 71 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause(); } function parseSwitchStatement() { - var node = createNode(208 /* SwitchStatement */); + var node = createNode(209 /* SwitchStatement */); parseExpected(96 /* SwitchKeyword */); parseExpected(17 /* OpenParenToken */); node.expression = allowInAnd(parseExpression); parseExpected(18 /* CloseParenToken */); - var caseBlock = createNode(222 /* CaseBlock */, scanner.getStartPos()); + var caseBlock = createNode(223 /* CaseBlock */, scanner.getStartPos()); parseExpected(15 /* OpenBraceToken */); caseBlock.clauses = parseList(2 /* SwitchClauses */, parseCaseOrDefaultClause); parseExpected(16 /* CloseBraceToken */); @@ -10626,7 +10758,7 @@ var ts; // directly as that might consume an expression on the following line. // We just return 'undefined' in that case. The actual error will be reported in the // grammar walker. - var node = createNode(210 /* ThrowStatement */); + var node = createNode(211 /* ThrowStatement */); parseExpected(98 /* ThrowKeyword */); node.expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression); parseSemicolon(); @@ -10634,7 +10766,7 @@ var ts; } // TODO: Review for error recovery function parseTryStatement() { - var node = createNode(211 /* TryStatement */); + var node = createNode(212 /* TryStatement */); parseExpected(100 /* TryKeyword */); node.tryBlock = parseBlock(/*ignoreMissingOpenBrace*/ false); node.catchClause = token === 72 /* CatchKeyword */ ? parseCatchClause() : undefined; @@ -10647,7 +10779,7 @@ var ts; return finishNode(node); } function parseCatchClause() { - var result = createNode(246 /* CatchClause */); + var result = createNode(247 /* CatchClause */); parseExpected(72 /* CatchKeyword */); if (parseExpected(17 /* OpenParenToken */)) { result.variableDeclaration = parseVariableDeclaration(); @@ -10657,7 +10789,7 @@ var ts; return finishNode(result); } function parseDebuggerStatement() { - var node = createNode(212 /* DebuggerStatement */); + var node = createNode(213 /* DebuggerStatement */); parseExpected(76 /* DebuggerKeyword */); parseSemicolon(); return finishNode(node); @@ -10669,13 +10801,13 @@ var ts; var fullStart = scanner.getStartPos(); var expression = allowInAnd(parseExpression); if (expression.kind === 69 /* Identifier */ && parseOptional(54 /* ColonToken */)) { - var labeledStatement = createNode(209 /* LabeledStatement */, fullStart); + var labeledStatement = createNode(210 /* LabeledStatement */, fullStart); labeledStatement.label = expression; labeledStatement.statement = parseStatement(); return finishNode(labeledStatement); } else { - var expressionStatement = createNode(197 /* ExpressionStatement */, fullStart); + var expressionStatement = createNode(198 /* ExpressionStatement */, fullStart); expressionStatement.expression = expression; parseSemicolon(); return finishNode(expressionStatement); @@ -10742,6 +10874,8 @@ var ts; return false; } continue; + case 134 /* GlobalKeyword */: + return nextToken() === 15 /* OpenBraceToken */; case 89 /* ImportKeyword */: nextToken(); return token === 9 /* StringLiteral */ || token === 37 /* AsteriskToken */ || @@ -10801,6 +10935,7 @@ var ts; case 125 /* ModuleKeyword */: case 126 /* NamespaceKeyword */: case 132 /* TypeKeyword */: + case 134 /* GlobalKeyword */: // When these don't start a declaration, they're an identifier in an expression statement return true; case 112 /* PublicKeyword */: @@ -10849,9 +10984,9 @@ var ts; case 86 /* ForKeyword */: return parseForOrForInOrForOfStatement(); case 75 /* ContinueKeyword */: - return parseBreakOrContinueStatement(204 /* ContinueStatement */); + return parseBreakOrContinueStatement(205 /* ContinueStatement */); case 70 /* BreakKeyword */: - return parseBreakOrContinueStatement(205 /* BreakStatement */); + return parseBreakOrContinueStatement(206 /* BreakStatement */); case 94 /* ReturnKeyword */: return parseReturnStatement(); case 105 /* WithKeyword */: @@ -10884,6 +11019,7 @@ var ts; case 112 /* PublicKeyword */: case 115 /* AbstractKeyword */: case 113 /* StaticKeyword */: + case 134 /* GlobalKeyword */: if (isStartOfDeclaration()) { return parseDeclaration(); } @@ -10910,6 +11046,7 @@ var ts; return parseTypeAliasDeclaration(fullStart, decorators, modifiers); case 81 /* EnumKeyword */: return parseEnumDeclaration(fullStart, decorators, modifiers); + case 134 /* GlobalKeyword */: case 125 /* ModuleKeyword */: case 126 /* NamespaceKeyword */: return parseModuleDeclaration(fullStart, decorators, modifiers); @@ -10924,7 +11061,7 @@ var ts; if (decorators || modifiers) { // We reached this point because we encountered decorators and/or modifiers and assumed a declaration // would follow. For recovery and error reporting purposes, return an incomplete declaration. - var node = createMissingNode(233 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected); + var node = createMissingNode(234 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected); node.pos = fullStart; node.decorators = decorators; setModifiers(node, modifiers); @@ -10946,16 +11083,16 @@ var ts; // DECLARATIONS function parseArrayBindingElement() { if (token === 24 /* CommaToken */) { - return createNode(189 /* OmittedExpression */); + return createNode(190 /* OmittedExpression */); } - var node = createNode(165 /* BindingElement */); + var node = createNode(166 /* BindingElement */); node.dotDotDotToken = parseOptionalToken(22 /* DotDotDotToken */); node.name = parseIdentifierOrPattern(); node.initializer = parseBindingElementInitializer(/*inParameter*/ false); return finishNode(node); } function parseObjectBindingElement() { - var node = createNode(165 /* BindingElement */); + var node = createNode(166 /* BindingElement */); var tokenIsIdentifier = isIdentifier(); var propertyName = parsePropertyName(); if (tokenIsIdentifier && token !== 54 /* ColonToken */) { @@ -10970,14 +11107,14 @@ var ts; return finishNode(node); } function parseObjectBindingPattern() { - var node = createNode(163 /* ObjectBindingPattern */); + var node = createNode(164 /* ObjectBindingPattern */); parseExpected(15 /* OpenBraceToken */); node.elements = parseDelimitedList(9 /* ObjectBindingElements */, parseObjectBindingElement); parseExpected(16 /* CloseBraceToken */); return finishNode(node); } function parseArrayBindingPattern() { - var node = createNode(164 /* ArrayBindingPattern */); + var node = createNode(165 /* ArrayBindingPattern */); parseExpected(19 /* OpenBracketToken */); node.elements = parseDelimitedList(10 /* ArrayBindingElements */, parseArrayBindingElement); parseExpected(20 /* CloseBracketToken */); @@ -10996,7 +11133,7 @@ var ts; return parseIdentifier(); } function parseVariableDeclaration() { - var node = createNode(213 /* VariableDeclaration */); + var node = createNode(214 /* VariableDeclaration */); node.name = parseIdentifierOrPattern(); node.type = parseTypeAnnotation(); if (!isInOrOfKeyword(token)) { @@ -11005,7 +11142,7 @@ var ts; return finishNode(node); } function parseVariableDeclarationList(inForStatementInitializer) { - var node = createNode(214 /* VariableDeclarationList */); + var node = createNode(215 /* VariableDeclarationList */); switch (token) { case 102 /* VarKeyword */: break; @@ -11028,7 +11165,7 @@ var ts; // So we need to look ahead to determine if 'of' should be treated as a keyword in // this context. // The checker will then give an error that there is an empty declaration list. - if (token === 134 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { + if (token === 135 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { node.declarations = createMissingList(); } else { @@ -11043,7 +11180,7 @@ var ts; return nextTokenIsIdentifier() && nextToken() === 18 /* CloseParenToken */; } function parseVariableStatement(fullStart, decorators, modifiers) { - var node = createNode(195 /* VariableStatement */, fullStart); + var node = createNode(196 /* VariableStatement */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); node.declarationList = parseVariableDeclarationList(/*inForStatementInitializer*/ false); @@ -11051,7 +11188,7 @@ var ts; return finishNode(node); } function parseFunctionDeclaration(fullStart, decorators, modifiers) { - var node = createNode(215 /* FunctionDeclaration */, fullStart); + var node = createNode(216 /* FunctionDeclaration */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); parseExpected(87 /* FunctionKeyword */); @@ -11064,7 +11201,7 @@ var ts; return finishNode(node); } function parseConstructorDeclaration(pos, decorators, modifiers) { - var node = createNode(144 /* Constructor */, pos); + var node = createNode(145 /* Constructor */, pos); node.decorators = decorators; setModifiers(node, modifiers); parseExpected(121 /* ConstructorKeyword */); @@ -11073,7 +11210,7 @@ var ts; return finishNode(node); } function parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, diagnosticMessage) { - var method = createNode(143 /* MethodDeclaration */, fullStart); + var method = createNode(144 /* MethodDeclaration */, fullStart); method.decorators = decorators; setModifiers(method, modifiers); method.asteriskToken = asteriskToken; @@ -11086,7 +11223,7 @@ var ts; return finishNode(method); } function parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken) { - var property = createNode(141 /* PropertyDeclaration */, fullStart); + var property = createNode(142 /* PropertyDeclaration */, fullStart); property.decorators = decorators; setModifiers(property, modifiers); property.name = name; @@ -11212,7 +11349,7 @@ var ts; decorators = []; decorators.pos = decoratorStart; } - var decorator = createNode(139 /* Decorator */, decoratorStart); + var decorator = createNode(140 /* Decorator */, decoratorStart); decorator.expression = doInDecoratorContext(parseLeftHandSideExpressionOrHigher); decorators.push(finishNode(decorator)); } @@ -11277,7 +11414,7 @@ var ts; } function parseClassElement() { if (token === 23 /* SemicolonToken */) { - var result = createNode(193 /* SemicolonClassElement */); + var result = createNode(194 /* SemicolonClassElement */); nextToken(); return finishNode(result); } @@ -11315,10 +11452,10 @@ var ts; return parseClassDeclarationOrExpression( /*fullStart*/ scanner.getStartPos(), /*decorators*/ undefined, - /*modifiers*/ undefined, 188 /* ClassExpression */); + /*modifiers*/ undefined, 189 /* ClassExpression */); } function parseClassDeclaration(fullStart, decorators, modifiers) { - return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 216 /* ClassDeclaration */); + return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 217 /* ClassDeclaration */); } function parseClassDeclarationOrExpression(fullStart, decorators, modifiers, kind) { var node = createNode(kind, fullStart); @@ -11362,7 +11499,7 @@ var ts; } function parseHeritageClause() { if (token === 83 /* ExtendsKeyword */ || token === 106 /* ImplementsKeyword */) { - var node = createNode(245 /* HeritageClause */); + var node = createNode(246 /* HeritageClause */); node.token = token; nextToken(); node.types = parseDelimitedList(7 /* HeritageClauseElement */, parseExpressionWithTypeArguments); @@ -11371,7 +11508,7 @@ var ts; return undefined; } function parseExpressionWithTypeArguments() { - var node = createNode(190 /* ExpressionWithTypeArguments */); + var node = createNode(191 /* ExpressionWithTypeArguments */); node.expression = parseLeftHandSideExpressionOrHigher(); if (token === 25 /* LessThanToken */) { node.typeArguments = parseBracketedList(18 /* TypeArguments */, parseType, 25 /* LessThanToken */, 27 /* GreaterThanToken */); @@ -11385,7 +11522,7 @@ var ts; return parseList(5 /* ClassMembers */, parseClassElement); } function parseInterfaceDeclaration(fullStart, decorators, modifiers) { - var node = createNode(217 /* InterfaceDeclaration */, fullStart); + var node = createNode(218 /* InterfaceDeclaration */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); parseExpected(107 /* InterfaceKeyword */); @@ -11396,7 +11533,7 @@ var ts; return finishNode(node); } function parseTypeAliasDeclaration(fullStart, decorators, modifiers) { - var node = createNode(218 /* TypeAliasDeclaration */, fullStart); + var node = createNode(219 /* TypeAliasDeclaration */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); parseExpected(132 /* TypeKeyword */); @@ -11412,13 +11549,13 @@ var ts; // ConstantEnumMemberSection, which starts at the beginning of an enum declaration // or any time an integer literal initializer is encountered. function parseEnumMember() { - var node = createNode(249 /* EnumMember */, scanner.getStartPos()); + var node = createNode(250 /* EnumMember */, scanner.getStartPos()); node.name = parsePropertyName(); node.initializer = allowInAnd(parseNonParameterInitializer); return finishNode(node); } function parseEnumDeclaration(fullStart, decorators, modifiers) { - var node = createNode(219 /* EnumDeclaration */, fullStart); + var node = createNode(220 /* EnumDeclaration */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); parseExpected(81 /* EnumKeyword */); @@ -11433,7 +11570,7 @@ var ts; return finishNode(node); } function parseModuleBlock() { - var node = createNode(221 /* ModuleBlock */, scanner.getStartPos()); + var node = createNode(222 /* ModuleBlock */, scanner.getStartPos()); if (parseExpected(15 /* OpenBraceToken */)) { node.statements = parseList(1 /* BlockStatements */, parseStatement); parseExpected(16 /* CloseBraceToken */); @@ -11444,7 +11581,7 @@ var ts; return finishNode(node); } function parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags) { - var node = createNode(220 /* ModuleDeclaration */, fullStart); + var node = createNode(221 /* ModuleDeclaration */, fullStart); // If we are parsing a dotted namespace name, we want to // propagate the 'Namespace' flag across the names if set. var namespaceFlag = flags & 65536 /* Namespace */; @@ -11458,16 +11595,27 @@ var ts; return finishNode(node); } function parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers) { - var node = createNode(220 /* ModuleDeclaration */, fullStart); + var node = createNode(221 /* ModuleDeclaration */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); - node.name = parseLiteralNode(/*internName*/ true); + if (token === 134 /* GlobalKeyword */) { + // parse 'global' as name of global scope augmentation + node.name = parseIdentifier(); + node.flags |= 2097152 /* GlobalAugmentation */; + } + else { + node.name = parseLiteralNode(/*internName*/ true); + } node.body = parseModuleBlock(); return finishNode(node); } function parseModuleDeclaration(fullStart, decorators, modifiers) { var flags = modifiers ? modifiers.flags : 0; - if (parseOptional(126 /* NamespaceKeyword */)) { + if (token === 134 /* GlobalKeyword */) { + // global augmentation + return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers); + } + else if (parseOptional(126 /* NamespaceKeyword */)) { flags |= 65536 /* Namespace */; } else { @@ -11498,7 +11646,7 @@ var ts; // ImportEquals declaration of type: // import x = require("mod"); or // import x = M.x; - var importEqualsDeclaration = createNode(223 /* ImportEqualsDeclaration */, fullStart); + var importEqualsDeclaration = createNode(224 /* ImportEqualsDeclaration */, fullStart); importEqualsDeclaration.decorators = decorators; setModifiers(importEqualsDeclaration, modifiers); importEqualsDeclaration.name = identifier; @@ -11509,7 +11657,7 @@ var ts; } } // Import statement - var importDeclaration = createNode(224 /* ImportDeclaration */, fullStart); + var importDeclaration = createNode(225 /* ImportDeclaration */, fullStart); importDeclaration.decorators = decorators; setModifiers(importDeclaration, modifiers); // ImportDeclaration: @@ -11532,7 +11680,7 @@ var ts; // NamedImports // ImportedDefaultBinding, NameSpaceImport // ImportedDefaultBinding, NamedImports - var importClause = createNode(225 /* ImportClause */, fullStart); + var importClause = createNode(226 /* ImportClause */, fullStart); if (identifier) { // ImportedDefaultBinding: // ImportedBinding @@ -11542,7 +11690,7 @@ var ts; // parse namespace or named imports if (!importClause.name || parseOptional(24 /* CommaToken */)) { - importClause.namedBindings = token === 37 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(227 /* NamedImports */); + importClause.namedBindings = token === 37 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(228 /* NamedImports */); } return finishNode(importClause); } @@ -11552,7 +11700,7 @@ var ts; : parseEntityName(/*allowReservedWords*/ false); } function parseExternalModuleReference() { - var node = createNode(234 /* ExternalModuleReference */); + var node = createNode(235 /* ExternalModuleReference */); parseExpected(127 /* RequireKeyword */); parseExpected(17 /* OpenParenToken */); node.expression = parseModuleSpecifier(); @@ -11575,7 +11723,7 @@ var ts; function parseNamespaceImport() { // NameSpaceImport: // * as ImportedBinding - var namespaceImport = createNode(226 /* NamespaceImport */); + var namespaceImport = createNode(227 /* NamespaceImport */); parseExpected(37 /* AsteriskToken */); parseExpected(116 /* AsKeyword */); namespaceImport.name = parseIdentifier(); @@ -11590,14 +11738,14 @@ var ts; // ImportsList: // ImportSpecifier // ImportsList, ImportSpecifier - node.elements = parseBracketedList(21 /* ImportOrExportSpecifiers */, kind === 227 /* NamedImports */ ? parseImportSpecifier : parseExportSpecifier, 15 /* OpenBraceToken */, 16 /* CloseBraceToken */); + node.elements = parseBracketedList(21 /* ImportOrExportSpecifiers */, kind === 228 /* NamedImports */ ? parseImportSpecifier : parseExportSpecifier, 15 /* OpenBraceToken */, 16 /* CloseBraceToken */); return finishNode(node); } function parseExportSpecifier() { - return parseImportOrExportSpecifier(232 /* ExportSpecifier */); + return parseImportOrExportSpecifier(233 /* ExportSpecifier */); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(228 /* ImportSpecifier */); + return parseImportOrExportSpecifier(229 /* ImportSpecifier */); } function parseImportOrExportSpecifier(kind) { var node = createNode(kind); @@ -11622,14 +11770,14 @@ var ts; else { node.name = identifierName; } - if (kind === 228 /* ImportSpecifier */ && checkIdentifierIsKeyword) { + if (kind === 229 /* ImportSpecifier */ && checkIdentifierIsKeyword) { // Report error identifier expected parseErrorAtPosition(checkIdentifierStart, checkIdentifierEnd - checkIdentifierStart, ts.Diagnostics.Identifier_expected); } return finishNode(node); } function parseExportDeclaration(fullStart, decorators, modifiers) { - var node = createNode(230 /* ExportDeclaration */, fullStart); + var node = createNode(231 /* ExportDeclaration */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); if (parseOptional(37 /* AsteriskToken */)) { @@ -11637,7 +11785,7 @@ var ts; node.moduleSpecifier = parseModuleSpecifier(); } else { - node.exportClause = parseNamedImportsOrExports(231 /* NamedExports */); + node.exportClause = parseNamedImportsOrExports(232 /* NamedExports */); // It is not uncommon to accidentally omit the 'from' keyword. Additionally, in editing scenarios, // the 'from' keyword can be parsed as a named export when the export clause is unterminated (i.e. `export { from "moduleName";`) // If we don't have a 'from' keyword, see if we have a string literal such that ASI won't take effect. @@ -11650,7 +11798,7 @@ var ts; return finishNode(node); } function parseExportAssignment(fullStart, decorators, modifiers) { - var node = createNode(229 /* ExportAssignment */, fullStart); + var node = createNode(230 /* ExportAssignment */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); if (parseOptional(56 /* EqualsToken */)) { @@ -11725,10 +11873,10 @@ var ts; function setExternalModuleIndicator(sourceFile) { sourceFile.externalModuleIndicator = ts.forEach(sourceFile.statements, function (node) { return node.flags & 2 /* Export */ - || node.kind === 223 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 234 /* ExternalModuleReference */ - || node.kind === 224 /* ImportDeclaration */ - || node.kind === 229 /* ExportAssignment */ - || node.kind === 230 /* ExportDeclaration */ + || node.kind === 224 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 235 /* ExternalModuleReference */ + || node.kind === 225 /* ImportDeclaration */ + || node.kind === 230 /* ExportAssignment */ + || node.kind === 231 /* ExportDeclaration */ ? node : undefined; }); @@ -11803,7 +11951,7 @@ var ts; scanner.setText(sourceText, start, length); // Prime the first token for us to start processing. token = nextToken(); - var result = createNode(251 /* JSDocTypeExpression */); + var result = createNode(252 /* JSDocTypeExpression */); parseExpected(15 /* OpenBraceToken */); result.type = parseJSDocTopLevelType(); parseExpected(16 /* CloseBraceToken */); @@ -11814,12 +11962,12 @@ var ts; function parseJSDocTopLevelType() { var type = parseJSDocType(); if (token === 47 /* BarToken */) { - var unionType = createNode(255 /* JSDocUnionType */, type.pos); + var unionType = createNode(256 /* JSDocUnionType */, type.pos); unionType.types = parseJSDocTypeList(type); type = finishNode(unionType); } if (token === 56 /* EqualsToken */) { - var optionalType = createNode(262 /* JSDocOptionalType */, type.pos); + var optionalType = createNode(263 /* JSDocOptionalType */, type.pos); nextToken(); optionalType.type = type; type = finishNode(optionalType); @@ -11830,20 +11978,20 @@ var ts; var type = parseBasicTypeExpression(); while (true) { if (token === 19 /* OpenBracketToken */) { - var arrayType = createNode(254 /* JSDocArrayType */, type.pos); + var arrayType = createNode(255 /* JSDocArrayType */, type.pos); arrayType.elementType = type; nextToken(); parseExpected(20 /* CloseBracketToken */); type = finishNode(arrayType); } else if (token === 53 /* QuestionToken */) { - var nullableType = createNode(257 /* JSDocNullableType */, type.pos); + var nullableType = createNode(258 /* JSDocNullableType */, type.pos); nullableType.type = type; nextToken(); type = finishNode(nullableType); } else if (token === 49 /* ExclamationToken */) { - var nonNullableType = createNode(258 /* JSDocNonNullableType */, type.pos); + var nonNullableType = createNode(259 /* JSDocNonNullableType */, type.pos); nonNullableType.type = type; nextToken(); type = finishNode(nonNullableType); @@ -11888,27 +12036,27 @@ var ts; return parseJSDocTypeReference(); } function parseJSDocThisType() { - var result = createNode(266 /* JSDocThisType */); + var result = createNode(267 /* JSDocThisType */); nextToken(); parseExpected(54 /* ColonToken */); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocConstructorType() { - var result = createNode(265 /* JSDocConstructorType */); + var result = createNode(266 /* JSDocConstructorType */); nextToken(); parseExpected(54 /* ColonToken */); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocVariadicType() { - var result = createNode(264 /* JSDocVariadicType */); + var result = createNode(265 /* JSDocVariadicType */); nextToken(); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocFunctionType() { - var result = createNode(263 /* JSDocFunctionType */); + var result = createNode(264 /* JSDocFunctionType */); nextToken(); parseExpected(17 /* OpenParenToken */); result.parameters = parseDelimitedList(22 /* JSDocFunctionParameters */, parseJSDocParameter); @@ -11921,12 +12069,12 @@ var ts; return finishNode(result); } function parseJSDocParameter() { - var parameter = createNode(138 /* Parameter */); + var parameter = createNode(139 /* Parameter */); parameter.type = parseJSDocType(); return finishNode(parameter); } function parseJSDocTypeReference() { - var result = createNode(261 /* JSDocTypeReference */); + var result = createNode(262 /* JSDocTypeReference */); result.name = parseSimplePropertyName(); while (parseOptional(21 /* DotToken */)) { if (token === 25 /* LessThanToken */) { @@ -11956,13 +12104,13 @@ var ts; } } function parseQualifiedName(left) { - var result = createNode(135 /* QualifiedName */, left.pos); + var result = createNode(136 /* QualifiedName */, left.pos); result.left = left; result.right = parseIdentifierName(); return finishNode(result); } function parseJSDocRecordType() { - var result = createNode(259 /* JSDocRecordType */); + var result = createNode(260 /* JSDocRecordType */); nextToken(); result.members = parseDelimitedList(24 /* JSDocRecordMembers */, parseJSDocRecordMember); checkForTrailingComma(result.members); @@ -11970,7 +12118,7 @@ var ts; return finishNode(result); } function parseJSDocRecordMember() { - var result = createNode(260 /* JSDocRecordMember */); + var result = createNode(261 /* JSDocRecordMember */); result.name = parseSimplePropertyName(); if (token === 54 /* ColonToken */) { nextToken(); @@ -11979,13 +12127,13 @@ var ts; return finishNode(result); } function parseJSDocNonNullableType() { - var result = createNode(258 /* JSDocNonNullableType */); + var result = createNode(259 /* JSDocNonNullableType */); nextToken(); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocTupleType() { - var result = createNode(256 /* JSDocTupleType */); + var result = createNode(257 /* JSDocTupleType */); nextToken(); result.types = parseDelimitedList(25 /* JSDocTupleTypes */, parseJSDocType); checkForTrailingComma(result.types); @@ -11999,7 +12147,7 @@ var ts; } } function parseJSDocUnionType() { - var result = createNode(255 /* JSDocUnionType */); + var result = createNode(256 /* JSDocUnionType */); nextToken(); result.types = parseJSDocTypeList(parseJSDocType()); parseExpected(18 /* CloseParenToken */); @@ -12017,7 +12165,7 @@ var ts; return types; } function parseJSDocAllType() { - var result = createNode(252 /* JSDocAllType */); + var result = createNode(253 /* JSDocAllType */); nextToken(); return finishNode(result); } @@ -12040,11 +12188,11 @@ var ts; token === 27 /* GreaterThanToken */ || token === 56 /* EqualsToken */ || token === 47 /* BarToken */) { - var result = createNode(253 /* JSDocUnknownType */, pos); + var result = createNode(254 /* JSDocUnknownType */, pos); return finishNode(result); } else { - var result = createNode(257 /* JSDocNullableType */, pos); + var result = createNode(258 /* JSDocNullableType */, pos); result.type = parseJSDocType(); return finishNode(result); } @@ -12132,7 +12280,7 @@ var ts; if (!tags) { return undefined; } - var result = createNode(267 /* JSDocComment */, start); + var result = createNode(268 /* JSDocComment */, start); result.tags = tags; return finishNode(result, end); } @@ -12169,7 +12317,7 @@ var ts; return undefined; } function handleUnknownTag(atToken, tagName) { - var result = createNode(268 /* JSDocTag */, atToken.pos); + var result = createNode(269 /* JSDocTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; return finishNode(result, pos); @@ -12220,7 +12368,7 @@ var ts; if (!typeExpression) { typeExpression = tryParseTypeExpression(); } - var result = createNode(269 /* JSDocParameterTag */, atToken.pos); + var result = createNode(270 /* JSDocParameterTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.preParameterName = preName; @@ -12230,27 +12378,27 @@ var ts; return finishNode(result, pos); } function handleReturnTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 270 /* JSDocReturnTag */; })) { + if (ts.forEach(tags, function (t) { return t.kind === 271 /* JSDocReturnTag */; })) { parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } - var result = createNode(270 /* JSDocReturnTag */, atToken.pos); + var result = createNode(271 /* JSDocReturnTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeExpression = tryParseTypeExpression(); return finishNode(result, pos); } function handleTypeTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 271 /* JSDocTypeTag */; })) { + if (ts.forEach(tags, function (t) { return t.kind === 272 /* JSDocTypeTag */; })) { parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } - var result = createNode(271 /* JSDocTypeTag */, atToken.pos); + var result = createNode(272 /* JSDocTypeTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeExpression = tryParseTypeExpression(); return finishNode(result, pos); } function handleTemplateTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 272 /* JSDocTemplateTag */; })) { + if (ts.forEach(tags, function (t) { return t.kind === 273 /* JSDocTemplateTag */; })) { parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } var typeParameters = []; @@ -12263,7 +12411,7 @@ var ts; parseErrorAtPosition(startPos, 0, ts.Diagnostics.Identifier_expected); return undefined; } - var typeParameter = createNode(137 /* TypeParameter */, name_8.pos); + var typeParameter = createNode(138 /* TypeParameter */, name_8.pos); typeParameter.name = name_8; finishNode(typeParameter, pos); typeParameters.push(typeParameter); @@ -12274,7 +12422,7 @@ var ts; pos++; } typeParameters.end = pos; - var result = createNode(272 /* JSDocTemplateTag */, atToken.pos); + var result = createNode(273 /* JSDocTemplateTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeParameters = typeParameters; @@ -12804,16 +12952,16 @@ var ts; function getModuleInstanceState(node) { // A module is uninstantiated if it contains only // 1. interface declarations, type alias declarations - if (node.kind === 217 /* InterfaceDeclaration */ || node.kind === 218 /* TypeAliasDeclaration */) { + if (node.kind === 218 /* InterfaceDeclaration */ || node.kind === 219 /* TypeAliasDeclaration */) { return 0 /* NonInstantiated */; } else if (ts.isConstEnumDeclaration(node)) { return 2 /* ConstEnumOnly */; } - else if ((node.kind === 224 /* ImportDeclaration */ || node.kind === 223 /* ImportEqualsDeclaration */) && !(node.flags & 2 /* Export */)) { + else if ((node.kind === 225 /* ImportDeclaration */ || node.kind === 224 /* ImportEqualsDeclaration */) && !(node.flags & 2 /* Export */)) { return 0 /* NonInstantiated */; } - else if (node.kind === 221 /* ModuleBlock */) { + else if (node.kind === 222 /* ModuleBlock */) { var state = 0 /* NonInstantiated */; ts.forEachChild(node, function (n) { switch (getModuleInstanceState(n)) { @@ -12832,7 +12980,7 @@ var ts; }); return state; } - else if (node.kind === 220 /* ModuleDeclaration */) { + else if (node.kind === 221 /* ModuleDeclaration */) { return getModuleInstanceState(node.body); } else { @@ -12882,6 +13030,11 @@ var ts; var labelStack; var labelIndexMap; var implicitLabels; + // state used for emit helpers + var hasClassExtends; + var hasAsyncFunctions; + var hasDecorators; + var hasParameterDecorators; // If this file is an external module, then it is automatically in strict-mode according to // ES6. If it is not an external module, then we'll determine if it is in strict mode or // not depending on if we see "use strict" in certain places (or if we hit a class/namespace). @@ -12911,6 +13064,10 @@ var ts; labelStack = undefined; labelIndexMap = undefined; implicitLabels = undefined; + hasClassExtends = false; + hasAsyncFunctions = false; + hasDecorators = false; + hasParameterDecorators = false; } return bindSourceFile; function createSymbol(flags, name) { @@ -12933,7 +13090,7 @@ var ts; if (symbolFlags & 107455 /* Value */) { var valueDeclaration = symbol.valueDeclaration; if (!valueDeclaration || - (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 220 /* ModuleDeclaration */)) { + (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 221 /* ModuleDeclaration */)) { // other kinds of value declarations take precedence over modules symbol.valueDeclaration = node; } @@ -12943,10 +13100,10 @@ var ts; // unless it is a well known Symbol. function getDeclarationName(node) { if (node.name) { - if (node.kind === 220 /* ModuleDeclaration */ && node.name.kind === 9 /* StringLiteral */) { - return "\"" + node.name.text + "\""; + if (ts.isAmbientModule(node)) { + return ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + node.name.text + "\""; } - if (node.name.kind === 136 /* ComputedPropertyName */) { + if (node.name.kind === 137 /* ComputedPropertyName */) { var nameExpression = node.name.expression; // treat computed property names where expression is string/numeric literal as just string/numeric literal if (ts.isStringOrNumericLiteral(nameExpression.kind)) { @@ -12958,21 +13115,21 @@ var ts; return node.name.text; } switch (node.kind) { - case 144 /* Constructor */: + case 145 /* Constructor */: return "__constructor"; - case 152 /* FunctionType */: - case 147 /* CallSignature */: + case 153 /* FunctionType */: + case 148 /* CallSignature */: return "__call"; - case 153 /* ConstructorType */: - case 148 /* ConstructSignature */: + case 154 /* ConstructorType */: + case 149 /* ConstructSignature */: return "__new"; - case 149 /* IndexSignature */: + case 150 /* IndexSignature */: return "__index"; - case 230 /* ExportDeclaration */: + case 231 /* ExportDeclaration */: return "__export"; - case 229 /* ExportAssignment */: + case 230 /* ExportAssignment */: return node.isExportEquals ? "export=" : "default"; - case 183 /* BinaryExpression */: + case 184 /* BinaryExpression */: switch (ts.getSpecialPropertyAssignmentKind(node)) { case 2 /* ModuleExports */: // module.exports = ... @@ -12987,8 +13144,8 @@ var ts; } ts.Debug.fail("Unknown binary declaration kind"); break; - case 215 /* FunctionDeclaration */: - case 216 /* ClassDeclaration */: + case 216 /* FunctionDeclaration */: + case 217 /* ClassDeclaration */: return node.flags & 512 /* Default */ ? "default" : undefined; } } @@ -13065,7 +13222,7 @@ var ts; function declareModuleMember(node, symbolFlags, symbolExcludes) { var hasExportModifier = ts.getCombinedNodeFlags(node) & 2 /* Export */; if (symbolFlags & 8388608 /* Alias */) { - if (node.kind === 232 /* ExportSpecifier */ || (node.kind === 223 /* ImportEqualsDeclaration */ && hasExportModifier)) { + if (node.kind === 233 /* ExportSpecifier */ || (node.kind === 224 /* ImportEqualsDeclaration */ && hasExportModifier)) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } else { @@ -13084,7 +13241,11 @@ var ts; // 2. When we checkIdentifier in the checker, we set its resolved symbol to the local symbol, // but return the export symbol (by calling getExportSymbolOfValueSymbolIfExported). That way // when the emitter comes back to it, it knows not to qualify the name if it was found in a containing scope. - if (hasExportModifier || container.flags & 131072 /* ExportContext */) { + // NOTE: Nested ambient modules always should go to to 'locals' table to prevent their automatic merge + // during global merging in the checker. Why? The only case when ambient module is permitted inside another module is module augmentation + // and this case is specially handled. Module augmentations should only be merged with original module definition + // and should never be merged directly with other augmentation, and the latter case would be possible if automatic merge is allowed. + if (!ts.isAmbientModule(node) && (hasExportModifier || container.flags & 131072 /* ExportContext */)) { var exportKind = (symbolFlags & 107455 /* Value */ ? 1048576 /* ExportValue */ : 0) | (symbolFlags & 793056 /* Type */ ? 2097152 /* ExportType */ : 0) | (symbolFlags & 1536 /* Namespace */ ? 4194304 /* ExportNamespace */ : 0); @@ -13148,10 +13309,12 @@ var ts; var flags = node.flags; // reset all reachability check related flags on node (for incremental scenarios) flags &= ~1572864 /* ReachabilityCheckFlags */; - if (kind === 217 /* InterfaceDeclaration */) { + // reset all emit helper flags on node (for incremental scenarios) + flags &= ~62914560 /* EmitHelperFlags */; + if (kind === 218 /* InterfaceDeclaration */) { seenThisKeyword = false; } - var saveState = kind === 250 /* SourceFile */ || kind === 221 /* ModuleBlock */ || ts.isFunctionLikeKind(kind); + var saveState = kind === 251 /* SourceFile */ || kind === 222 /* ModuleBlock */ || ts.isFunctionLikeKind(kind); if (saveState) { savedReachabilityState = currentReachabilityState; savedLabelStack = labelStack; @@ -13169,9 +13332,23 @@ var ts; flags |= 1048576 /* HasExplicitReturn */; } } - if (kind === 217 /* InterfaceDeclaration */) { + if (kind === 218 /* InterfaceDeclaration */) { flags = seenThisKeyword ? flags | 262144 /* ContainsThis */ : flags & ~262144 /* ContainsThis */; } + if (kind === 251 /* SourceFile */) { + if (hasClassExtends) { + flags |= 4194304 /* HasClassExtends */; + } + if (hasDecorators) { + flags |= 8388608 /* HasDecorators */; + } + if (hasParameterDecorators) { + flags |= 16777216 /* HasParamDecorators */; + } + if (hasAsyncFunctions) { + flags |= 33554432 /* HasAsyncFunctions */; + } + } node.flags = flags; if (saveState) { hasExplicitReturn = savedHasExplicitReturn; @@ -13194,40 +13371,40 @@ var ts; return; } switch (node.kind) { - case 200 /* WhileStatement */: + case 201 /* WhileStatement */: bindWhileStatement(node); break; - case 199 /* DoStatement */: + case 200 /* DoStatement */: bindDoStatement(node); break; - case 201 /* ForStatement */: + case 202 /* ForStatement */: bindForStatement(node); break; - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: bindForInOrForOfStatement(node); break; - case 198 /* IfStatement */: + case 199 /* IfStatement */: bindIfStatement(node); break; - case 206 /* ReturnStatement */: - case 210 /* ThrowStatement */: + case 207 /* ReturnStatement */: + case 211 /* ThrowStatement */: bindReturnOrThrow(node); break; - case 205 /* BreakStatement */: - case 204 /* ContinueStatement */: + case 206 /* BreakStatement */: + case 205 /* ContinueStatement */: bindBreakOrContinueStatement(node); break; - case 211 /* TryStatement */: + case 212 /* TryStatement */: bindTryStatement(node); break; - case 208 /* SwitchStatement */: + case 209 /* SwitchStatement */: bindSwitchStatement(node); break; - case 222 /* CaseBlock */: + case 223 /* CaseBlock */: bindCaseBlock(node); break; - case 209 /* LabeledStatement */: + case 210 /* LabeledStatement */: bindLabeledStatement(node); break; default: @@ -13302,7 +13479,7 @@ var ts; function bindReturnOrThrow(n) { // bind expression (don't affect reachability) bind(n.expression); - if (n.kind === 206 /* ReturnStatement */) { + if (n.kind === 207 /* ReturnStatement */) { hasExplicitReturn = true; } currentReachabilityState = 4 /* Unreachable */; @@ -13311,7 +13488,7 @@ var ts; // call bind on label (don't affect reachability) bind(n.label); // for continue case touch label so it will be marked a used - var isValidJump = jumpToLabel(n.label, n.kind === 205 /* BreakStatement */ ? currentReachabilityState : 4 /* Unreachable */); + var isValidJump = jumpToLabel(n.label, n.kind === 206 /* BreakStatement */ ? currentReachabilityState : 4 /* Unreachable */); if (isValidJump) { currentReachabilityState = 4 /* Unreachable */; } @@ -13337,7 +13514,7 @@ var ts; // bind expression (don't affect reachability) bind(n.expression); bind(n.caseBlock); - var hasDefault = ts.forEach(n.caseBlock.clauses, function (c) { return c.kind === 244 /* DefaultClause */; }); + var hasDefault = ts.forEach(n.caseBlock.clauses, function (c) { return c.kind === 245 /* DefaultClause */; }); // post switch state is unreachable if switch is exaustive (has a default case ) and does not have fallthrough from the last case var postSwitchState = hasDefault && currentReachabilityState !== 2 /* Reachable */ ? 4 /* Unreachable */ : preSwitchState; popImplicitLabel(postSwitchLabel, postSwitchState); @@ -13364,37 +13541,37 @@ var ts; } function getContainerFlags(node) { switch (node.kind) { - case 188 /* ClassExpression */: - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: - case 219 /* EnumDeclaration */: - case 155 /* TypeLiteral */: - case 167 /* ObjectLiteralExpression */: + case 189 /* ClassExpression */: + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: + case 220 /* EnumDeclaration */: + case 156 /* TypeLiteral */: + case 168 /* ObjectLiteralExpression */: return 1 /* IsContainer */; - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 149 /* IndexSignature */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 215 /* FunctionDeclaration */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 152 /* FunctionType */: - case 153 /* ConstructorType */: - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: - case 220 /* ModuleDeclaration */: - case 250 /* SourceFile */: - case 218 /* TypeAliasDeclaration */: + case 148 /* CallSignature */: + case 149 /* ConstructSignature */: + case 150 /* IndexSignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 216 /* FunctionDeclaration */: + case 145 /* Constructor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 153 /* FunctionType */: + case 154 /* ConstructorType */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: + case 221 /* ModuleDeclaration */: + case 251 /* SourceFile */: + case 219 /* TypeAliasDeclaration */: return 5 /* IsContainerWithLocals */; - case 246 /* CatchClause */: - case 201 /* ForStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - case 222 /* CaseBlock */: + case 247 /* CatchClause */: + case 202 /* ForStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: + case 223 /* CaseBlock */: return 2 /* IsBlockScopedContainer */; - case 194 /* Block */: + case 195 /* Block */: // do not treat blocks directly inside a function as a block-scoped-container. // Locals that reside in this block should go to the function locals. Othewise 'x' // would not appear to be a redeclaration of a block scoped local in the following @@ -13431,38 +13608,38 @@ var ts; // members are declared (for example, a member of a class will go into a specific // symbol table depending on if it is static or not). We defer to specialized // handlers to take care of declaring these child members. - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: return declareModuleMember(node, symbolFlags, symbolExcludes); - case 250 /* SourceFile */: + case 251 /* SourceFile */: return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 188 /* ClassExpression */: - case 216 /* ClassDeclaration */: + case 189 /* ClassExpression */: + case 217 /* ClassDeclaration */: return declareClassMember(node, symbolFlags, symbolExcludes); - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 155 /* TypeLiteral */: - case 167 /* ObjectLiteralExpression */: - case 217 /* InterfaceDeclaration */: + case 156 /* TypeLiteral */: + case 168 /* ObjectLiteralExpression */: + case 218 /* InterfaceDeclaration */: // Interface/Object-types always have their children added to the 'members' of // their container. They are only accessible through an instance of their // container, and are never in scope otherwise (even inside the body of the // object / type / interface declaring them). An exception is type parameters, // which are in scope without qualification (similar to 'locals'). return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 152 /* FunctionType */: - case 153 /* ConstructorType */: - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 149 /* IndexSignature */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: - case 218 /* TypeAliasDeclaration */: + case 153 /* FunctionType */: + case 154 /* ConstructorType */: + case 148 /* CallSignature */: + case 149 /* ConstructSignature */: + case 150 /* IndexSignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 145 /* Constructor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: + case 219 /* TypeAliasDeclaration */: // All the children of these container types are never visible through another // symbol (i.e. through another symbol's 'exports' or 'members'). Instead, // they're only accessed 'lexically' (i.e. from code that exists underneath @@ -13483,11 +13660,11 @@ var ts; : declareSymbol(file.locals, undefined, node, symbolFlags, symbolExcludes); } function hasExportDeclarations(node) { - var body = node.kind === 250 /* SourceFile */ ? node : node.body; - if (body.kind === 250 /* SourceFile */ || body.kind === 221 /* ModuleBlock */) { + var body = node.kind === 251 /* SourceFile */ ? node : node.body; + if (body.kind === 251 /* SourceFile */ || body.kind === 222 /* ModuleBlock */) { for (var _i = 0, _a = body.statements; _i < _a.length; _i++) { var stat = _a[_i]; - if (stat.kind === 230 /* ExportDeclaration */ || stat.kind === 229 /* ExportAssignment */) { + if (stat.kind === 231 /* ExportDeclaration */ || stat.kind === 230 /* ExportAssignment */) { return true; } } @@ -13506,7 +13683,10 @@ var ts; } function bindModuleDeclaration(node) { setExportContextFlag(node); - if (node.name.kind === 9 /* StringLiteral */) { + if (ts.isAmbientModule(node)) { + if (node.flags & 2 /* Export */) { + errorOnFirstToken(node, ts.Diagnostics.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible); + } declareSymbolAndAddToSymbolTable(node, 512 /* ValueModule */, 106639 /* ValueModuleExcludes */); } else { @@ -13571,7 +13751,7 @@ var ts; // c.IsAccessorDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true. // d.IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true // and either both previous and propId.descriptor have[[Get]] fields or both previous and propId.descriptor have[[Set]] fields - var currentKind = prop.kind === 247 /* PropertyAssignment */ || prop.kind === 248 /* ShorthandPropertyAssignment */ || prop.kind === 143 /* MethodDeclaration */ + var currentKind = prop.kind === 248 /* PropertyAssignment */ || prop.kind === 249 /* ShorthandPropertyAssignment */ || prop.kind === 144 /* MethodDeclaration */ ? 1 /* Property */ : 2 /* Accessor */; var existingKind = seen[identifier.text]; @@ -13593,10 +13773,10 @@ var ts; } function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { switch (blockScopeContainer.kind) { - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: declareModuleMember(node, symbolFlags, symbolExcludes); break; - case 250 /* SourceFile */: + case 251 /* SourceFile */: if (ts.isExternalModule(container)) { declareModuleMember(node, symbolFlags, symbolExcludes); break; @@ -13756,17 +13936,17 @@ var ts; } function updateStrictMode(node) { switch (node.kind) { - case 250 /* SourceFile */: - case 221 /* ModuleBlock */: + case 251 /* SourceFile */: + case 222 /* ModuleBlock */: updateStrictModeStatementList(node.statements); return; - case 194 /* Block */: + case 195 /* Block */: if (ts.isFunctionLike(node.parent)) { updateStrictModeStatementList(node.statements); } return; - case 216 /* ClassDeclaration */: - case 188 /* ClassExpression */: + case 217 /* ClassDeclaration */: + case 189 /* ClassExpression */: // All classes are automatically in strict mode in ES6. inStrictMode = true; return; @@ -13796,7 +13976,7 @@ var ts; /* Strict mode checks */ case 69 /* Identifier */: return checkStrictModeIdentifier(node); - case 183 /* BinaryExpression */: + case 184 /* BinaryExpression */: if (ts.isInJavaScriptFile(node)) { var specialKind = ts.getSpecialPropertyAssignmentKind(node); switch (specialKind) { @@ -13820,100 +14000,97 @@ var ts; } } return checkStrictModeBinaryExpression(node); - case 246 /* CatchClause */: + case 247 /* CatchClause */: return checkStrictModeCatchClause(node); - case 177 /* DeleteExpression */: + case 178 /* DeleteExpression */: return checkStrictModeDeleteExpression(node); case 8 /* NumericLiteral */: return checkStrictModeNumericLiteral(node); - case 182 /* PostfixUnaryExpression */: + case 183 /* PostfixUnaryExpression */: return checkStrictModePostfixUnaryExpression(node); - case 181 /* PrefixUnaryExpression */: + case 182 /* PrefixUnaryExpression */: return checkStrictModePrefixUnaryExpression(node); - case 207 /* WithStatement */: + case 208 /* WithStatement */: return checkStrictModeWithStatement(node); - case 161 /* ThisType */: + case 162 /* ThisType */: seenThisKeyword = true; return; - case 150 /* TypePredicate */: + case 151 /* TypePredicate */: return checkTypePredicate(node); - case 137 /* TypeParameter */: + case 138 /* TypeParameter */: return declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 530912 /* TypeParameterExcludes */); - case 138 /* Parameter */: + case 139 /* Parameter */: return bindParameter(node); - case 213 /* VariableDeclaration */: - case 165 /* BindingElement */: + case 214 /* VariableDeclaration */: + case 166 /* BindingElement */: return bindVariableDeclarationOrBindingElement(node); - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: return bindPropertyOrMethodOrAccessor(node, 4 /* Property */ | (node.questionToken ? 536870912 /* Optional */ : 0 /* None */), 107455 /* PropertyExcludes */); - case 247 /* PropertyAssignment */: - case 248 /* ShorthandPropertyAssignment */: + case 248 /* PropertyAssignment */: + case 249 /* ShorthandPropertyAssignment */: return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 107455 /* PropertyExcludes */); - case 249 /* EnumMember */: + case 250 /* EnumMember */: return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 107455 /* EnumMemberExcludes */); - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 149 /* IndexSignature */: + case 148 /* CallSignature */: + case 149 /* ConstructSignature */: + case 150 /* IndexSignature */: return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: // If this is an ObjectLiteralExpression method, then it sits in the same space // as other properties in the object literal. So we use SymbolFlags.PropertyExcludes // so that it will conflict with any other object literal members with the same // name. return bindPropertyOrMethodOrAccessor(node, 8192 /* Method */ | (node.questionToken ? 536870912 /* Optional */ : 0 /* None */), ts.isObjectLiteralMethod(node) ? 107455 /* PropertyExcludes */ : 99263 /* MethodExcludes */); - case 215 /* FunctionDeclaration */: - checkStrictModeFunctionName(node); - return declareSymbolAndAddToSymbolTable(node, 16 /* Function */, 106927 /* FunctionExcludes */); - case 144 /* Constructor */: + case 216 /* FunctionDeclaration */: + return bindFunctionDeclaration(node); + case 145 /* Constructor */: return declareSymbolAndAddToSymbolTable(node, 16384 /* Constructor */, /*symbolExcludes:*/ 0 /* None */); - case 145 /* GetAccessor */: + case 146 /* GetAccessor */: return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 41919 /* GetAccessorExcludes */); - case 146 /* SetAccessor */: + case 147 /* SetAccessor */: return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 74687 /* SetAccessorExcludes */); - case 152 /* FunctionType */: - case 153 /* ConstructorType */: + case 153 /* FunctionType */: + case 154 /* ConstructorType */: return bindFunctionOrConstructorType(node); - case 155 /* TypeLiteral */: + case 156 /* TypeLiteral */: return bindAnonymousDeclaration(node, 2048 /* TypeLiteral */, "__type"); - case 167 /* ObjectLiteralExpression */: + case 168 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: - checkStrictModeFunctionName(node); - var bindingName = node.name ? node.name.text : "__function"; - return bindAnonymousDeclaration(node, 16 /* Function */, bindingName); - case 170 /* CallExpression */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: + return bindFunctionExpression(node); + case 171 /* CallExpression */: if (ts.isInJavaScriptFile(node)) { bindCallExpression(node); } break; // Members of classes, interfaces, and modules - case 188 /* ClassExpression */: - case 216 /* ClassDeclaration */: + case 189 /* ClassExpression */: + case 217 /* ClassDeclaration */: return bindClassLikeDeclaration(node); - case 217 /* InterfaceDeclaration */: + case 218 /* InterfaceDeclaration */: return bindBlockScopedDeclaration(node, 64 /* Interface */, 792960 /* InterfaceExcludes */); - case 218 /* TypeAliasDeclaration */: + case 219 /* TypeAliasDeclaration */: return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 793056 /* TypeAliasExcludes */); - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: return bindEnumDeclaration(node); - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: return bindModuleDeclaration(node); // Imports and exports - case 223 /* ImportEqualsDeclaration */: - case 226 /* NamespaceImport */: - case 228 /* ImportSpecifier */: - case 232 /* ExportSpecifier */: + case 224 /* ImportEqualsDeclaration */: + case 227 /* NamespaceImport */: + case 229 /* ImportSpecifier */: + case 233 /* ExportSpecifier */: return declareSymbolAndAddToSymbolTable(node, 8388608 /* Alias */, 8388608 /* AliasExcludes */); - case 225 /* ImportClause */: + case 226 /* ImportClause */: return bindImportClause(node); - case 230 /* ExportDeclaration */: + case 231 /* ExportDeclaration */: return bindExportDeclaration(node); - case 229 /* ExportAssignment */: + case 230 /* ExportAssignment */: return bindExportAssignment(node); - case 250 /* SourceFile */: + case 251 /* SourceFile */: return bindSourceFileIfExternalModule(); } } @@ -13922,7 +14099,7 @@ var ts; if (parameterName && parameterName.kind === 69 /* Identifier */) { checkStrictModeIdentifier(parameterName); } - if (parameterName && parameterName.kind === 161 /* ThisType */) { + if (parameterName && parameterName.kind === 162 /* ThisType */) { seenThisKeyword = true; } bind(type); @@ -13937,7 +14114,7 @@ var ts; bindAnonymousDeclaration(file, 512 /* ValueModule */, "\"" + ts.removeFileExtension(file.fileName) + "\""); } function bindExportAssignment(node) { - var boundExpression = node.kind === 229 /* ExportAssignment */ ? node.expression : node.right; + var boundExpression = node.kind === 230 /* ExportAssignment */ ? node.expression : node.right; if (!container.symbol || !container.symbol.exports) { // Export assignment in some sort of block construct bindAnonymousDeclaration(node, 8388608 /* Alias */, getDeclarationName(node)); @@ -13985,7 +14162,7 @@ var ts; } function bindThisPropertyAssignment(node) { // Declare a 'member' in case it turns out the container was an ES5 class - if (container.kind === 175 /* FunctionExpression */ || container.kind === 215 /* FunctionDeclaration */) { + if (container.kind === 176 /* FunctionExpression */ || container.kind === 216 /* FunctionDeclaration */) { container.symbol.members = container.symbol.members || {}; declareSymbol(container.symbol.members, container.symbol, node, 4 /* Property */, 107455 /* PropertyExcludes */); } @@ -14014,7 +14191,15 @@ var ts; } } function bindClassLikeDeclaration(node) { - if (node.kind === 216 /* ClassDeclaration */) { + if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) { + if (ts.getClassExtendsHeritageClauseElement(node) !== undefined) { + hasClassExtends = true; + } + if (ts.nodeIsDecorated(node)) { + hasDecorators = true; + } + } + if (node.kind === 217 /* ClassDeclaration */) { bindBlockScopedDeclaration(node, 32 /* Class */, 899519 /* ClassExcludes */); } else { @@ -14076,6 +14261,12 @@ var ts; } } function bindParameter(node) { + if (!ts.isDeclarationFile(file) && + !ts.isInAmbientContext(node) && + ts.nodeIsDecorated(node)) { + hasDecorators = true; + hasParameterDecorators = true; + } if (inStrictMode) { // It is a SyntaxError if the identifier eval or arguments appears within a FormalParameterList of a // strict mode FunctionLikeDeclaration or FunctionExpression(13.1) @@ -14094,7 +14285,34 @@ var ts; declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 /* Property */, 107455 /* PropertyExcludes */); } } + function bindFunctionDeclaration(node) { + if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) { + if (ts.isAsyncFunctionLike(node)) { + hasAsyncFunctions = true; + } + } + checkStrictModeFunctionName(node); + return declareSymbolAndAddToSymbolTable(node, 16 /* Function */, 106927 /* FunctionExcludes */); + } + function bindFunctionExpression(node) { + if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) { + if (ts.isAsyncFunctionLike(node)) { + hasAsyncFunctions = true; + } + } + checkStrictModeFunctionName(node); + var bindingName = node.name ? node.name.text : "__function"; + return bindAnonymousDeclaration(node, 16 /* Function */, bindingName); + } function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) { + if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) { + if (ts.isAsyncFunctionLike(node)) { + hasAsyncFunctions = true; + } + if (ts.nodeIsDecorated(node)) { + hasDecorators = true; + } + } return ts.hasDynamicName(node) ? bindAnonymousDeclaration(node, symbolFlags, "__computed") : declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes); @@ -14159,13 +14377,13 @@ var ts; case 4 /* Unreachable */: var reportError = // report error on all statements except empty ones - (ts.isStatement(node) && node.kind !== 196 /* EmptyStatement */) || + (ts.isStatement(node) && node.kind !== 197 /* EmptyStatement */) || // report error on class declarations - node.kind === 216 /* ClassDeclaration */ || + node.kind === 217 /* ClassDeclaration */ || // report error on instantiated modules or const-enums only modules if preserveConstEnums is set - (node.kind === 220 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node)) || + (node.kind === 221 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node)) || // report error on regular enums and const enums if preserveConstEnums is set - (node.kind === 219 /* EnumDeclaration */ && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums)); + (node.kind === 220 /* EnumDeclaration */ && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums)); if (reportError) { currentReachabilityState = 8 /* ReportedUnreachable */; // unreachable code is reported if @@ -14179,7 +14397,7 @@ var ts; // On the other side we do want to report errors on non-initialized 'lets' because of TDZ var reportUnreachableCode = !options.allowUnreachableCode && !ts.isInAmbientContext(node) && - (node.kind !== 195 /* VariableStatement */ || + (node.kind !== 196 /* VariableStatement */ || ts.getCombinedNodeFlags(node.declarationList) & 24576 /* BlockScoped */ || ts.forEach(node.declarationList.declarations, function (d) { return d.initializer; })); if (reportUnreachableCode) { @@ -14264,6 +14482,7 @@ var ts; getTypeCount: function () { return typeCount; }, isUndefinedSymbol: function (symbol) { return symbol === undefinedSymbol; }, isArgumentsSymbol: function (symbol) { return symbol === argumentsSymbol; }, + isUnknownSymbol: function (symbol) { return symbol === unknownSymbol; }, getDiagnostics: getDiagnostics, getGlobalDiagnostics: getGlobalDiagnostics, // The language service will always care about the narrowed type of a symbol, because that is @@ -14280,6 +14499,7 @@ var ts; getSymbolsInScope: getSymbolsInScope, getSymbolAtLocation: getSymbolAtLocation, getShorthandAssignmentValueSymbol: getShorthandAssignmentValueSymbol, + getExportSpecifierLocalTargetSymbol: getExportSpecifierLocalTargetSymbol, getTypeAtLocation: getTypeOfNode, typeToString: typeToString, getSymbolDisplayBuilder: getSymbolDisplayBuilder, @@ -14355,11 +14575,6 @@ var ts; var unionTypes = {}; var intersectionTypes = {}; var stringLiteralTypes = {}; - var emitExtends = false; - var emitDecorate = false; - var emitParam = false; - var emitAwaiter = false; - var emitGenerator = false; var resolutionTargets = []; var resolutionResults = []; var resolutionPropertyNames = []; @@ -14504,7 +14719,7 @@ var ts; target.flags |= source.flags; if (source.valueDeclaration && (!target.valueDeclaration || - (target.valueDeclaration.kind === 220 /* ModuleDeclaration */ && source.valueDeclaration.kind !== 220 /* ModuleDeclaration */))) { + (target.valueDeclaration.kind === 221 /* ModuleDeclaration */ && source.valueDeclaration.kind !== 221 /* ModuleDeclaration */))) { // other kinds of value declarations take precedence over modules target.valueDeclaration = source.valueDeclaration; } @@ -14559,6 +14774,30 @@ var ts; } } } + function mergeModuleAugmentation(moduleName) { + var moduleAugmentation = moduleName.parent; + if (moduleAugmentation.symbol.valueDeclaration !== moduleAugmentation) { + // this is a combined symbol for multiple augmentations within the same file. + // its symbol already has accumulated information for all declarations + // so we need to add it just once - do the work only for first declaration + ts.Debug.assert(moduleAugmentation.symbol.declarations.length > 1); + return; + } + if (ts.isGlobalScopeAugmentation(moduleAugmentation)) { + mergeSymbolTable(globals, moduleAugmentation.symbol.exports); + } + else { + // find a module that about to be augmented + var mainModule = resolveExternalModuleNameWorker(moduleName, moduleName, ts.Diagnostics.Invalid_module_name_in_augmentation_module_0_cannot_be_found); + if (!mainModule) { + return; + } + // if module symbol has already been merged - it is safe to use it. + // otherwise clone it + mainModule = mainModule.flags & 33554432 /* Merged */ ? mainModule : cloneSymbol(mainModule); + mergeSymbol(mainModule, moduleAugmentation.symbol); + } + } function addToSymbolTable(target, source, message) { for (var id in source) { if (ts.hasProperty(source, id)) { @@ -14585,18 +14824,8 @@ var ts; var nodeId = getNodeId(node); return nodeLinks[nodeId] || (nodeLinks[nodeId] = {}); } - function getSourceFile(node) { - return ts.getAncestor(node, 250 /* SourceFile */); - } function isGlobalSourceFile(node) { - return node.kind === 250 /* SourceFile */ && !ts.isExternalOrCommonJsModule(node); - } - /** Is this type one of the apparent types created from the primitive types. */ - function isPrimitiveApparentType(type) { - return type === globalStringType || - type === globalNumberType || - type === globalBooleanType || - type === globalESSymbolType; + return node.kind === 251 /* SourceFile */ && !ts.isExternalOrCommonJsModule(node); } function getSymbol(symbols, name, meaning) { if (meaning && ts.hasProperty(symbols, name)) { @@ -14645,7 +14874,7 @@ var ts; if (declaration.pos <= usage.pos) { // declaration is before usage // still might be illegal if usage is in the initializer of the variable declaration - return declaration.kind !== 213 /* VariableDeclaration */ || + return declaration.kind !== 214 /* VariableDeclaration */ || !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage); } // declaration is after usage @@ -14653,14 +14882,14 @@ var ts; return isUsedInFunctionOrNonStaticProperty(declaration, usage); function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage) { var container = ts.getEnclosingBlockScopeContainer(declaration); - if (declaration.parent.parent.kind === 195 /* VariableStatement */ || - declaration.parent.parent.kind === 201 /* ForStatement */) { + if (declaration.parent.parent.kind === 196 /* VariableStatement */ || + declaration.parent.parent.kind === 202 /* ForStatement */) { // variable statement/for statement case, // use site should not be inside variable declaration (initializer of declaration or binding element) return isSameScopeDescendentOf(usage, declaration, container); } - else if (declaration.parent.parent.kind === 203 /* ForOfStatement */ || - declaration.parent.parent.kind === 202 /* ForInStatement */) { + else if (declaration.parent.parent.kind === 204 /* ForOfStatement */ || + declaration.parent.parent.kind === 203 /* ForInStatement */) { // ForIn/ForOf case - use site should not be used in expression part var expression = declaration.parent.parent.expression; return isSameScopeDescendentOf(usage, expression, container); @@ -14677,7 +14906,7 @@ var ts; return true; } var initializerOfNonStaticProperty = current.parent && - current.parent.kind === 141 /* PropertyDeclaration */ && + current.parent.kind === 142 /* PropertyDeclaration */ && (current.parent.flags & 64 /* Static */) === 0 && current.parent.initializer === current; if (initializerOfNonStaticProperty) { @@ -14710,8 +14939,8 @@ var ts; if (meaning & result.flags & 793056 /* Type */) { useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || - lastLocation.kind === 138 /* Parameter */ || - lastLocation.kind === 137 /* TypeParameter */ + lastLocation.kind === 139 /* Parameter */ || + lastLocation.kind === 138 /* TypeParameter */ : false; } if (meaning & 107455 /* Value */ && result.flags & 1 /* FunctionScopedVariable */) { @@ -14720,9 +14949,9 @@ var ts; // however it is detected separately when checking initializers of parameters // to make sure that they reference no variables declared after them. useResult = - lastLocation.kind === 138 /* Parameter */ || + lastLocation.kind === 139 /* Parameter */ || (lastLocation === location.type && - result.valueDeclaration.kind === 138 /* Parameter */); + result.valueDeclaration.kind === 139 /* Parameter */); } } if (useResult) { @@ -14734,13 +14963,12 @@ var ts; } } switch (location.kind) { - case 250 /* SourceFile */: + case 251 /* SourceFile */: if (!ts.isExternalOrCommonJsModule(location)) break; - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: var moduleExports = getSymbolOfNode(location).exports; - if (location.kind === 250 /* SourceFile */ || - (location.kind === 220 /* ModuleDeclaration */ && location.name.kind === 9 /* StringLiteral */)) { + if (location.kind === 251 /* SourceFile */ || ts.isAmbientModule(location)) { // It's an external module. First see if the module has an export default and if the local // name of that export default matches. if (result = moduleExports["default"]) { @@ -14763,7 +14991,7 @@ var ts; // which is not the desired behavior. if (ts.hasProperty(moduleExports, name) && moduleExports[name].flags === 8388608 /* Alias */ && - ts.getDeclarationOfKind(moduleExports[name], 232 /* ExportSpecifier */)) { + ts.getDeclarationOfKind(moduleExports[name], 233 /* ExportSpecifier */)) { break; } } @@ -14771,13 +14999,13 @@ var ts; break loop; } break; - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8 /* EnumMember */)) { break loop; } break; - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: // TypeScript 1.0 spec (April 2014): 8.4.1 // Initializer expressions for instance member variables are evaluated in the scope // of the class constructor body but are not permitted to reference parameters or @@ -14794,9 +15022,9 @@ var ts; } } break; - case 216 /* ClassDeclaration */: - case 188 /* ClassExpression */: - case 217 /* InterfaceDeclaration */: + case 217 /* ClassDeclaration */: + case 189 /* ClassExpression */: + case 218 /* InterfaceDeclaration */: if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & 793056 /* Type */)) { if (lastLocation && lastLocation.flags & 64 /* Static */) { // TypeScript 1.0 spec (April 2014): 3.4.1 @@ -14807,7 +15035,7 @@ var ts; } break loop; } - if (location.kind === 188 /* ClassExpression */ && meaning & 32 /* Class */) { + if (location.kind === 189 /* ClassExpression */ && meaning & 32 /* Class */) { var className = location.name; if (className && name === className.text) { result = location.symbol; @@ -14823,9 +15051,9 @@ var ts; // [foo()]() { } // <-- Reference to T from class's own computed property // } // - case 136 /* ComputedPropertyName */: + case 137 /* ComputedPropertyName */: grandparent = location.parent.parent; - if (ts.isClassLike(grandparent) || grandparent.kind === 217 /* InterfaceDeclaration */) { + if (ts.isClassLike(grandparent) || grandparent.kind === 218 /* InterfaceDeclaration */) { // A reference to this grandparent's type parameters would be an error if (result = getSymbol(getSymbolOfNode(grandparent).members, name, meaning & 793056 /* Type */)) { error(errorLocation, ts.Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); @@ -14833,19 +15061,19 @@ var ts; } } break; - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 215 /* FunctionDeclaration */: - case 176 /* ArrowFunction */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 145 /* Constructor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 216 /* FunctionDeclaration */: + case 177 /* ArrowFunction */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; } break; - case 175 /* FunctionExpression */: + case 176 /* FunctionExpression */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; @@ -14858,7 +15086,7 @@ var ts; } } break; - case 139 /* Decorator */: + case 140 /* Decorator */: // Decorators are resolved at the class declaration. Resolving at the parameter // or member would result in looking up locals in the method. // @@ -14867,7 +15095,7 @@ var ts; // method(@y x, y) {} // <-- decorator y should be resolved at the class declaration, not the parameter. // } // - if (location.parent && location.parent.kind === 138 /* Parameter */) { + if (location.parent && location.parent.kind === 139 /* Parameter */) { location = location.parent; } // @@ -14889,7 +15117,9 @@ var ts; } if (!result) { if (nameNotFoundMessage) { - error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg)); + if (!checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg)) { + error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg)); + } } return undefined; } @@ -14922,12 +15152,44 @@ var ts; } return result; } + function checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) { + if (!errorLocation || (errorLocation.kind === 69 /* Identifier */ && (isTypeReferenceIdentifier(errorLocation)) || isInTypeQuery(errorLocation))) { + return false; + } + var container = ts.getThisContainer(errorLocation, /* includeArrowFunctions */ true); + var location = container; + while (location) { + if (ts.isClassLike(location.parent)) { + var classSymbol = getSymbolOfNode(location.parent); + if (!classSymbol) { + break; + } + // Check to see if a static member exists. + var constructorType = getTypeOfSymbol(classSymbol); + if (getPropertyOfType(constructorType, name)) { + error(errorLocation, ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg), symbolToString(classSymbol)); + return true; + } + // No static member is present. + // Check if we're in an instance method and look for a relevant instance member. + if (location === container && !(location.flags & 64 /* Static */)) { + var instanceType = getDeclaredTypeOfSymbol(classSymbol).thisType; + if (getPropertyOfType(instanceType, name)) { + error(errorLocation, ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg)); + return true; + } + } + } + location = location.parent; + } + return false; + } function checkResolvedBlockScopedVariable(result, errorLocation) { ts.Debug.assert((result.flags & 2 /* BlockScopedVariable */) !== 0); // Block-scoped variables cannot be used before their definition var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) ? d : undefined; }); ts.Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined"); - if (!isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 213 /* VariableDeclaration */), errorLocation)) { + if (!isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 214 /* VariableDeclaration */), errorLocation)) { error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name)); } } @@ -14948,10 +15210,10 @@ var ts; } function getAnyImportSyntax(node) { if (ts.isAliasSymbolDeclaration(node)) { - if (node.kind === 223 /* ImportEqualsDeclaration */) { + if (node.kind === 224 /* ImportEqualsDeclaration */) { return node; } - while (node && node.kind !== 224 /* ImportDeclaration */) { + while (node && node.kind !== 225 /* ImportDeclaration */) { node = node.parent; } return node; @@ -14961,7 +15223,7 @@ var ts; return ts.forEach(symbol.declarations, function (d) { return ts.isAliasSymbolDeclaration(d) ? d : undefined; }); } function getTargetOfImportEqualsDeclaration(node) { - if (node.moduleReference.kind === 234 /* ExternalModuleReference */) { + if (node.moduleReference.kind === 235 /* ExternalModuleReference */) { return resolveExternalModuleSymbol(resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node))); } return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, node); @@ -15063,17 +15325,17 @@ var ts; } function getTargetOfAliasDeclaration(node) { switch (node.kind) { - case 223 /* ImportEqualsDeclaration */: + case 224 /* ImportEqualsDeclaration */: return getTargetOfImportEqualsDeclaration(node); - case 225 /* ImportClause */: + case 226 /* ImportClause */: return getTargetOfImportClause(node); - case 226 /* NamespaceImport */: + case 227 /* NamespaceImport */: return getTargetOfNamespaceImport(node); - case 228 /* ImportSpecifier */: + case 229 /* ImportSpecifier */: return getTargetOfImportSpecifier(node); - case 232 /* ExportSpecifier */: + case 233 /* ExportSpecifier */: return getTargetOfExportSpecifier(node); - case 229 /* ExportAssignment */: + case 230 /* ExportAssignment */: return getTargetOfExportAssignment(node); } } @@ -15118,11 +15380,11 @@ var ts; if (!links.referenced) { links.referenced = true; var node = getDeclarationOfAliasSymbol(symbol); - if (node.kind === 229 /* ExportAssignment */) { + if (node.kind === 230 /* ExportAssignment */) { // export default checkExpressionCached(node.expression); } - else if (node.kind === 232 /* ExportSpecifier */) { + else if (node.kind === 233 /* ExportSpecifier */) { // export { } or export { as foo } checkExpressionCached(node.propertyName || node.name); } @@ -15135,7 +15397,7 @@ var ts; // This function is only for imports with entity names function getSymbolOfPartOfRightHandSideOfImportEquals(entityName, importDeclaration) { if (!importDeclaration) { - importDeclaration = ts.getAncestor(entityName, 223 /* ImportEqualsDeclaration */); + importDeclaration = ts.getAncestor(entityName, 224 /* ImportEqualsDeclaration */); ts.Debug.assert(importDeclaration !== undefined); } // There are three things we might try to look for. In the following examples, @@ -15148,13 +15410,13 @@ var ts; entityName = entityName.parent; } // Check for case 1 and 3 in the above example - if (entityName.kind === 69 /* Identifier */ || entityName.parent.kind === 135 /* QualifiedName */) { + if (entityName.kind === 69 /* Identifier */ || entityName.parent.kind === 136 /* QualifiedName */) { return resolveEntityName(entityName, 1536 /* Namespace */); } else { // Case 2 in above example // entityName.kind could be a QualifiedName or a Missing identifier - ts.Debug.assert(entityName.parent.kind === 223 /* ImportEqualsDeclaration */); + ts.Debug.assert(entityName.parent.kind === 224 /* ImportEqualsDeclaration */); return resolveEntityName(entityName, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */); } } @@ -15174,9 +15436,9 @@ var ts; return undefined; } } - else if (name.kind === 135 /* QualifiedName */ || name.kind === 168 /* PropertyAccessExpression */) { - var left = name.kind === 135 /* QualifiedName */ ? name.left : name.expression; - var right = name.kind === 135 /* QualifiedName */ ? name.right : name.name; + else if (name.kind === 136 /* QualifiedName */ || name.kind === 169 /* PropertyAccessExpression */) { + var left = name.kind === 136 /* QualifiedName */ ? name.left : name.expression; + var right = name.kind === 136 /* QualifiedName */ ? name.right : name.name; var namespace = resolveEntityName(left, 1536 /* Namespace */, ignoreErrors); if (!namespace || namespace === unknownSymbol || ts.nodeIsMissing(right)) { return undefined; @@ -15196,6 +15458,9 @@ var ts; return symbol.flags & meaning ? symbol : resolveAlias(symbol); } function resolveExternalModuleName(location, moduleReferenceExpression) { + return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ts.Diagnostics.Cannot_find_module_0); + } + function resolveExternalModuleNameWorker(location, moduleReferenceExpression, moduleNotFoundError) { if (moduleReferenceExpression.kind !== 9 /* StringLiteral */) { return; } @@ -15210,19 +15475,28 @@ var ts; if (!isRelative) { var symbol = getSymbol(globals, "\"" + moduleName + "\"", 512 /* ValueModule */); if (symbol) { - return symbol; + // merged symbol is module declaration symbol combined with all augmentations + return getMergedSymbol(symbol); } } - var resolvedModule = ts.getResolvedModule(getSourceFile(location), moduleReferenceLiteral.text); + var resolvedModule = ts.getResolvedModule(ts.getSourceFileOfNode(location), moduleReferenceLiteral.text); var sourceFile = resolvedModule && host.getSourceFile(resolvedModule.resolvedFileName); if (sourceFile) { if (sourceFile.symbol) { - return sourceFile.symbol; + // merged symbol is module declaration symbol combined with all augmentations + return getMergedSymbol(sourceFile.symbol); } - error(moduleReferenceLiteral, ts.Diagnostics.File_0_is_not_a_module, sourceFile.fileName); - return; + if (moduleNotFoundError) { + // report errors only if it was requested + error(moduleReferenceLiteral, ts.Diagnostics.File_0_is_not_a_module, sourceFile.fileName); + } + return undefined; } - error(moduleReferenceLiteral, ts.Diagnostics.Cannot_find_module_0, moduleName); + if (moduleNotFoundError) { + // report errors only if it was requested + error(moduleReferenceLiteral, moduleNotFoundError, moduleName); + } + return undefined; } // An external module with an 'export =' declaration resolves to the target of the 'export =' declaration, // and an external module with no 'export =' declaration resolves to the module itself. @@ -15350,7 +15624,7 @@ var ts; var members = node.members; for (var _i = 0, members_1 = members; _i < members_1.length; _i++) { var member = members_1[_i]; - if (member.kind === 144 /* Constructor */ && ts.nodeIsPresent(member.body)) { + if (member.kind === 145 /* Constructor */ && ts.nodeIsPresent(member.body)) { return member; } } @@ -15421,17 +15695,17 @@ var ts; } } switch (location_1.kind) { - case 250 /* SourceFile */: + case 251 /* SourceFile */: if (!ts.isExternalOrCommonJsModule(location_1)) { break; } - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: if (result = callback(getSymbolOfNode(location_1).exports)) { return result; } break; - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: if (result = callback(getSymbolOfNode(location_1).members)) { return result; } @@ -15472,7 +15746,7 @@ var ts; return ts.forEachValue(symbols, function (symbolFromSymbolTable) { if (symbolFromSymbolTable.flags & 8388608 /* Alias */ && symbolFromSymbolTable.name !== "export=" - && !ts.getDeclarationOfKind(symbolFromSymbolTable, 232 /* ExportSpecifier */)) { + && !ts.getDeclarationOfKind(symbolFromSymbolTable, 233 /* ExportSpecifier */)) { if (!useOnlyExternalAliasing || // Is this external alias, then use it to name ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) { @@ -15509,7 +15783,7 @@ var ts; return true; } // Qualify if the symbol from symbol table has same meaning as expected - symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 /* Alias */ && !ts.getDeclarationOfKind(symbolFromSymbolTable, 232 /* ExportSpecifier */)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; + symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 /* Alias */ && !ts.getDeclarationOfKind(symbolFromSymbolTable, 233 /* ExportSpecifier */)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; if (symbolFromSymbolTable.flags & meaning) { qualify = true; return true; @@ -15582,8 +15856,7 @@ var ts; } } function hasExternalModuleSymbol(declaration) { - return (declaration.kind === 220 /* ModuleDeclaration */ && declaration.name.kind === 9 /* StringLiteral */) || - (declaration.kind === 250 /* SourceFile */ && ts.isExternalOrCommonJsModule(declaration)); + return ts.isAmbientModule(declaration) || (declaration.kind === 251 /* SourceFile */ && ts.isExternalOrCommonJsModule(declaration)); } function hasVisibleDeclarations(symbol) { var aliasesToMakeVisible; @@ -15619,12 +15892,12 @@ var ts; function isEntityNameVisible(entityName, enclosingDeclaration) { // get symbol of the first identifier of the entityName var meaning; - if (entityName.parent.kind === 154 /* TypeQuery */) { + if (entityName.parent.kind === 155 /* TypeQuery */) { // Typeof value meaning = 107455 /* Value */ | 1048576 /* ExportValue */; } - else if (entityName.kind === 135 /* QualifiedName */ || entityName.kind === 168 /* PropertyAccessExpression */ || - entityName.parent.kind === 223 /* ImportEqualsDeclaration */) { + else if (entityName.kind === 136 /* QualifiedName */ || entityName.kind === 169 /* PropertyAccessExpression */ || + entityName.parent.kind === 224 /* ImportEqualsDeclaration */) { // Left identifier from type reference or TypeAlias // Entity name of the import declaration meaning = 1536 /* Namespace */; @@ -15679,15 +15952,20 @@ var ts; function getTypeAliasForTypeLiteral(type) { if (type.symbol && type.symbol.flags & 2048 /* TypeLiteral */) { var node = type.symbol.declarations[0].parent; - while (node.kind === 160 /* ParenthesizedType */) { + while (node.kind === 161 /* ParenthesizedType */) { node = node.parent; } - if (node.kind === 218 /* TypeAliasDeclaration */) { + if (node.kind === 219 /* TypeAliasDeclaration */) { return getSymbolOfNode(node); } } return undefined; } + function isTopLevelInExternalModuleAugmentation(node) { + return node && node.parent && + node.parent.kind === 222 /* ModuleBlock */ && + ts.isExternalModuleAugmentation(node.parent.parent); + } function getSymbolDisplayBuilder() { function getNameOfSymbol(symbol) { if (symbol.declarations && symbol.declarations.length) { @@ -15696,10 +15974,10 @@ var ts; return ts.declarationNameToString(declaration.name); } switch (declaration.kind) { - case 188 /* ClassExpression */: + case 189 /* ClassExpression */: return "(Anonymous class)"; - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: return "(Anonymous function)"; } } @@ -15954,7 +16232,7 @@ var ts; var isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || ts.forEach(symbol.declarations, function (declaration) { - return declaration.parent.kind === 250 /* SourceFile */ || declaration.parent.kind === 221 /* ModuleBlock */; + return declaration.parent.kind === 251 /* SourceFile */ || declaration.parent.kind === 222 /* ModuleBlock */; })); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { // typeof is allowed only for static/non local functions @@ -16215,70 +16493,74 @@ var ts; return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 165 /* BindingElement */: + case 166 /* BindingElement */: return isDeclarationVisible(node.parent.parent); - case 213 /* VariableDeclaration */: + case 214 /* VariableDeclaration */: if (ts.isBindingPattern(node.name) && !node.name.elements.length) { // If the binding pattern is empty, this variable declaration is not visible return false; } // Otherwise fall through - case 220 /* ModuleDeclaration */: - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: - case 218 /* TypeAliasDeclaration */: - case 215 /* FunctionDeclaration */: - case 219 /* EnumDeclaration */: - case 223 /* ImportEqualsDeclaration */: + case 221 /* ModuleDeclaration */: + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: + case 219 /* TypeAliasDeclaration */: + case 216 /* FunctionDeclaration */: + case 220 /* EnumDeclaration */: + case 224 /* ImportEqualsDeclaration */: + // external module augmentation is always visible + if (ts.isExternalModuleAugmentation(node)) { + return true; + } var parent_4 = getDeclarationContainer(node); // If the node is not exported or it is not ambient module element (except import declaration) if (!(ts.getCombinedNodeFlags(node) & 2 /* Export */) && - !(node.kind !== 223 /* ImportEqualsDeclaration */ && parent_4.kind !== 250 /* SourceFile */ && ts.isInAmbientContext(parent_4))) { + !(node.kind !== 224 /* ImportEqualsDeclaration */ && parent_4.kind !== 251 /* SourceFile */ && ts.isInAmbientContext(parent_4))) { return isGlobalSourceFile(parent_4); } // Exported members/ambient module elements (exception import declaration) are visible if parent is visible return isDeclarationVisible(parent_4); - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: if (node.flags & (16 /* Private */ | 32 /* Protected */)) { // Private/protected properties/methods are not visible return false; } // Public properties/methods are visible if its parents are visible, so const it fall into next case statement - case 144 /* Constructor */: - case 148 /* ConstructSignature */: - case 147 /* CallSignature */: - case 149 /* IndexSignature */: - case 138 /* Parameter */: - case 221 /* ModuleBlock */: - case 152 /* FunctionType */: - case 153 /* ConstructorType */: - case 155 /* TypeLiteral */: - case 151 /* TypeReference */: - case 156 /* ArrayType */: - case 157 /* TupleType */: - case 158 /* UnionType */: - case 159 /* IntersectionType */: - case 160 /* ParenthesizedType */: + case 145 /* Constructor */: + case 149 /* ConstructSignature */: + case 148 /* CallSignature */: + case 150 /* IndexSignature */: + case 139 /* Parameter */: + case 222 /* ModuleBlock */: + case 153 /* FunctionType */: + case 154 /* ConstructorType */: + case 156 /* TypeLiteral */: + case 152 /* TypeReference */: + case 157 /* ArrayType */: + case 158 /* TupleType */: + case 159 /* UnionType */: + case 160 /* IntersectionType */: + case 161 /* ParenthesizedType */: return isDeclarationVisible(node.parent); // Default binding, import specifier and namespace import is visible // only on demand so by default it is not visible - case 225 /* ImportClause */: - case 226 /* NamespaceImport */: - case 228 /* ImportSpecifier */: + case 226 /* ImportClause */: + case 227 /* NamespaceImport */: + case 229 /* ImportSpecifier */: return false; // Type parameters are always visible - case 137 /* TypeParameter */: + case 138 /* TypeParameter */: // Source file is always visible - case 250 /* SourceFile */: + case 251 /* SourceFile */: return true; // Export assignments do not create name bindings outside the module - case 229 /* ExportAssignment */: + case 230 /* ExportAssignment */: return false; default: ts.Debug.fail("isDeclarationVisible unknown: SyntaxKind: " + node.kind); @@ -16287,10 +16569,10 @@ var ts; } function collectLinkedAliases(node) { var exportSymbol; - if (node.parent && node.parent.kind === 229 /* ExportAssignment */) { + if (node.parent && node.parent.kind === 230 /* ExportAssignment */) { exportSymbol = resolveName(node.parent, node.text, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */ | 8388608 /* Alias */, ts.Diagnostics.Cannot_find_name_0, node); } - else if (node.parent.kind === 232 /* ExportSpecifier */) { + else if (node.parent.kind === 233 /* ExportSpecifier */) { var exportSpecifier = node.parent; exportSymbol = exportSpecifier.parent.parent.moduleSpecifier ? getExternalModuleMember(exportSpecifier.parent.parent, exportSpecifier) : @@ -16313,7 +16595,9 @@ var ts; var internalModuleReference = declaration.moduleReference; var firstIdentifier = getFirstIdentifier(internalModuleReference); var importSymbol = resolveName(declaration, firstIdentifier.text, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */, ts.Diagnostics.Cannot_find_name_0, firstIdentifier); - buildVisibleNodeList(importSymbol.declarations); + if (importSymbol) { + buildVisibleNodeList(importSymbol.declarations); + } } }); } @@ -16382,14 +16666,14 @@ var ts; node = ts.getRootDeclaration(node); // Parent chain: // VaribleDeclaration -> VariableDeclarationList -> VariableStatement -> 'Declaration Container' - return node.kind === 213 /* VariableDeclaration */ ? node.parent.parent.parent : node.parent; + return node.kind === 214 /* VariableDeclaration */ ? node.parent.parent.parent : node.parent; } function getTypeOfPrototypeProperty(prototype) { // TypeScript 1.0 spec (April 2014): 8.4 // Every class automatically contains a static property member named 'prototype', // the type of which is an instantiation of the class type with type Any supplied as a type argument for each type parameter. // It is an error to explicitly declare a static property member with the name 'prototype'. - var classType = getDeclaredTypeOfSymbol(prototype.parent); + var classType = getDeclaredTypeOfSymbol(getMergedSymbol(prototype.parent)); return classType.typeParameters ? createTypeReference(classType, ts.map(classType.typeParameters, function (_) { return anyType; })) : classType; } // Return the type of the given property in the given type, or undefined if no such property exists @@ -16413,7 +16697,7 @@ var ts; case 9 /* StringLiteral */: case 8 /* NumericLiteral */: return name.text; - case 136 /* ComputedPropertyName */: + case 137 /* ComputedPropertyName */: if (ts.isStringOrNumericLiteral(name.expression.kind)) { return name.expression.text; } @@ -16421,7 +16705,7 @@ var ts; return undefined; } function isComputedNonLiteralName(name) { - return name.kind === 136 /* ComputedPropertyName */ && !ts.isStringOrNumericLiteral(name.expression.kind); + return name.kind === 137 /* ComputedPropertyName */ && !ts.isStringOrNumericLiteral(name.expression.kind); } // Return the inferred type for a binding element function getTypeForBindingElement(declaration) { @@ -16441,7 +16725,7 @@ var ts; return parentType; } var type; - if (pattern.kind === 163 /* ObjectBindingPattern */) { + if (pattern.kind === 164 /* ObjectBindingPattern */) { // Use explicitly specified property name ({ p: xxx } form), or otherwise the implied name ({ p } form) var name_10 = declaration.propertyName || declaration.name; if (isComputedNonLiteralName(name_10)) { @@ -16489,11 +16773,11 @@ var ts; } // Return the inferred type for a variable, parameter, or property declaration function getTypeForVariableLikeDeclaration(declaration) { - // A variable declared in a for..in statement is always of type any - if (declaration.parent.parent.kind === 202 /* ForInStatement */) { - return anyType; + // A variable declared in a for..in statement is always of type string + if (declaration.parent.parent.kind === 203 /* ForInStatement */) { + return stringType; } - if (declaration.parent.parent.kind === 203 /* ForOfStatement */) { + if (declaration.parent.parent.kind === 204 /* ForOfStatement */) { // checkRightHandSideOfForOf will return undefined if the for-of expression type was // missing properties/signatures required to get its iteratedType (like // [Symbol.iterator] or next). This may be because we accessed properties from anyType, @@ -16507,11 +16791,11 @@ var ts; if (declaration.type) { return getTypeFromTypeNode(declaration.type); } - if (declaration.kind === 138 /* Parameter */) { + if (declaration.kind === 139 /* Parameter */) { var func = declaration.parent; // For a parameter of a set accessor, use the type of the get accessor if one is present - if (func.kind === 146 /* SetAccessor */ && !ts.hasDynamicName(func)) { - var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 145 /* GetAccessor */); + if (func.kind === 147 /* SetAccessor */ && !ts.hasDynamicName(func)) { + var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 146 /* GetAccessor */); if (getter) { return getReturnTypeOfSignature(getSignatureFromDeclaration(getter)); } @@ -16527,7 +16811,7 @@ var ts; return checkExpressionCached(declaration.initializer); } // If it is a short-hand property assignment, use the type of the identifier - if (declaration.kind === 248 /* ShorthandPropertyAssignment */) { + if (declaration.kind === 249 /* ShorthandPropertyAssignment */) { return checkIdentifier(declaration.name); } // If the declaration specifies a binding pattern, use the type implied by the binding pattern @@ -16583,7 +16867,7 @@ var ts; return languageVersion >= 2 /* ES6 */ ? createIterableType(anyType) : anyArrayType; } // If the pattern has at least one element, and no rest element, then it should imply a tuple type. - var elementTypes = ts.map(elements, function (e) { return e.kind === 189 /* OmittedExpression */ ? anyType : getTypeFromBindingElement(e, includePatternInType); }); + var elementTypes = ts.map(elements, function (e) { return e.kind === 190 /* OmittedExpression */ ? anyType : getTypeFromBindingElement(e, includePatternInType); }); if (includePatternInType) { var result = createNewTupleType(elementTypes); result.pattern = pattern; @@ -16599,7 +16883,7 @@ var ts; // parameter with no type annotation or initializer, the type implied by the binding pattern becomes the type of // the parameter. function getTypeFromBindingPattern(pattern, includePatternInType) { - return pattern.kind === 163 /* ObjectBindingPattern */ + return pattern.kind === 164 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType) : getTypeFromArrayBindingPattern(pattern, includePatternInType); } @@ -16621,10 +16905,10 @@ var ts; // During a normal type check we'll never get to here with a property assignment (the check of the containing // object literal uses a different path). We exclude widening only so that language services and type verification // tools see the actual type. - if (declaration.kind === 247 /* PropertyAssignment */) { + if (declaration.kind === 248 /* PropertyAssignment */) { return type; } - if (type.flags & 134217728 /* PredicateType */ && (declaration.kind === 141 /* PropertyDeclaration */ || declaration.kind === 140 /* PropertySignature */)) { + if (type.flags & 134217728 /* PredicateType */ && (declaration.kind === 142 /* PropertyDeclaration */ || declaration.kind === 141 /* PropertySignature */)) { return type; } return getWidenedType(type); @@ -16634,7 +16918,7 @@ var ts; // Report implicit any errors unless this is a private property within an ambient declaration if (reportErrors && compilerOptions.noImplicitAny) { var root = ts.getRootDeclaration(declaration); - if (!isPrivateWithinAmbient(root) && !(root.kind === 138 /* Parameter */ && isPrivateWithinAmbient(root.parent))) { + if (!isPrivateWithinAmbient(root) && !(root.kind === 139 /* Parameter */ && isPrivateWithinAmbient(root.parent))) { reportImplicitAnyError(declaration, type); } } @@ -16649,21 +16933,21 @@ var ts; } // Handle catch clause variables var declaration = symbol.valueDeclaration; - if (declaration.parent.kind === 246 /* CatchClause */) { + if (declaration.parent.kind === 247 /* CatchClause */) { return links.type = anyType; } // Handle export default expressions - if (declaration.kind === 229 /* ExportAssignment */) { + if (declaration.kind === 230 /* ExportAssignment */) { return links.type = checkExpression(declaration.expression); } // Handle module.exports = expr - if (declaration.kind === 183 /* BinaryExpression */) { + if (declaration.kind === 184 /* BinaryExpression */) { return links.type = checkExpression(declaration.right); } - if (declaration.kind === 168 /* PropertyAccessExpression */) { + if (declaration.kind === 169 /* PropertyAccessExpression */) { // Declarations only exist for property access expressions for certain // special assignment kinds - if (declaration.parent.kind === 183 /* BinaryExpression */) { + if (declaration.parent.kind === 184 /* BinaryExpression */) { // Handle exports.p = expr or this.p = expr or className.prototype.method = expr return links.type = checkExpressionCached(declaration.parent.right); } @@ -16693,7 +16977,7 @@ var ts; } function getAnnotatedAccessorType(accessor) { if (accessor) { - if (accessor.kind === 145 /* GetAccessor */) { + if (accessor.kind === 146 /* GetAccessor */) { return accessor.type && getTypeFromTypeNode(accessor.type); } else { @@ -16709,8 +16993,8 @@ var ts; if (!pushTypeResolution(symbol, 0 /* Type */)) { return unknownType; } - var getter = ts.getDeclarationOfKind(symbol, 145 /* GetAccessor */); - var setter = ts.getDeclarationOfKind(symbol, 146 /* SetAccessor */); + var getter = ts.getDeclarationOfKind(symbol, 146 /* GetAccessor */); + var setter = ts.getDeclarationOfKind(symbol, 147 /* SetAccessor */); var type; // First try to see if the user specified a return type on the get-accessor. var getterReturnType = getAnnotatedAccessorType(getter); @@ -16739,7 +17023,7 @@ var ts; if (!popTypeResolution()) { type = anyType; if (compilerOptions.noImplicitAny) { - var getter_1 = ts.getDeclarationOfKind(symbol, 145 /* GetAccessor */); + var getter_1 = ts.getDeclarationOfKind(symbol, 146 /* GetAccessor */); error(getter_1, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol)); } } @@ -16839,9 +17123,9 @@ var ts; if (!node) { return typeParameters; } - if (node.kind === 216 /* ClassDeclaration */ || node.kind === 188 /* ClassExpression */ || - node.kind === 215 /* FunctionDeclaration */ || node.kind === 175 /* FunctionExpression */ || - node.kind === 143 /* MethodDeclaration */ || node.kind === 176 /* ArrowFunction */) { + if (node.kind === 217 /* ClassDeclaration */ || node.kind === 189 /* ClassExpression */ || + node.kind === 216 /* FunctionDeclaration */ || node.kind === 176 /* FunctionExpression */ || + node.kind === 144 /* MethodDeclaration */ || node.kind === 177 /* ArrowFunction */) { var declarations = node.typeParameters; if (declarations) { return appendTypeParameters(appendOuterTypeParameters(typeParameters, node), declarations); @@ -16851,7 +17135,7 @@ var ts; } // The outer type parameters are those defined by enclosing generic classes, methods, or functions. function getOuterTypeParametersOfClassOrInterface(symbol) { - var declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 217 /* InterfaceDeclaration */); + var declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 218 /* InterfaceDeclaration */); return appendOuterTypeParameters(undefined, declaration); } // The local type parameters are the combined set of type parameters from all declarations of the class, @@ -16860,8 +17144,8 @@ var ts; var result; for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var node = _a[_i]; - if (node.kind === 217 /* InterfaceDeclaration */ || node.kind === 216 /* ClassDeclaration */ || - node.kind === 188 /* ClassExpression */ || node.kind === 218 /* TypeAliasDeclaration */) { + if (node.kind === 218 /* InterfaceDeclaration */ || node.kind === 217 /* ClassDeclaration */ || + node.kind === 189 /* ClassExpression */ || node.kind === 219 /* TypeAliasDeclaration */) { var declaration = node; if (declaration.typeParameters) { result = appendTypeParameters(result, declaration.typeParameters); @@ -17001,7 +17285,7 @@ var ts; type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 217 /* InterfaceDeclaration */ && ts.getInterfaceBaseTypeNodes(declaration)) { + if (declaration.kind === 218 /* InterfaceDeclaration */ && ts.getInterfaceBaseTypeNodes(declaration)) { for (var _b = 0, _c = ts.getInterfaceBaseTypeNodes(declaration); _b < _c.length; _b++) { var node = _c[_b]; var baseType = getTypeFromTypeNode(node); @@ -17033,7 +17317,7 @@ var ts; function isIndependentInterface(symbol) { for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 217 /* InterfaceDeclaration */) { + if (declaration.kind === 218 /* InterfaceDeclaration */) { if (declaration.flags & 262144 /* ContainsThis */) { return false; } @@ -17089,7 +17373,7 @@ var ts; if (!pushTypeResolution(symbol, 2 /* DeclaredType */)) { return unknownType; } - var declaration = ts.getDeclarationOfKind(symbol, 218 /* TypeAliasDeclaration */); + var declaration = ts.getDeclarationOfKind(symbol, 219 /* TypeAliasDeclaration */); var type = getTypeFromTypeNode(declaration.type); if (popTypeResolution()) { links.typeParameters = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); @@ -17122,7 +17406,7 @@ var ts; if (!links.declaredType) { var type = createType(512 /* TypeParameter */); type.symbol = symbol; - if (!ts.getDeclarationOfKind(symbol, 137 /* TypeParameter */).constraint) { + if (!ts.getDeclarationOfKind(symbol, 138 /* TypeParameter */).constraint) { type.constraint = noConstraintType; } links.declaredType = type; @@ -17178,11 +17462,11 @@ var ts; case 120 /* BooleanKeyword */: case 131 /* SymbolKeyword */: case 103 /* VoidKeyword */: - case 162 /* StringLiteralType */: + case 163 /* StringLiteralType */: return true; - case 156 /* ArrayType */: + case 157 /* ArrayType */: return isIndependentType(node.elementType); - case 151 /* TypeReference */: + case 152 /* TypeReference */: return isIndependentTypeReference(node); } return false; @@ -17195,7 +17479,7 @@ var ts; // A function-like declaration is considered independent (free of this references) if it has a return type // annotation that is considered independent and if each parameter is considered independent. function isIndependentFunctionLikeDeclaration(node) { - if (node.kind !== 144 /* Constructor */ && (!node.type || !isIndependentType(node.type))) { + if (node.kind !== 145 /* Constructor */ && (!node.type || !isIndependentType(node.type))) { return false; } for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) { @@ -17216,12 +17500,12 @@ var ts; var declaration = symbol.declarations[0]; if (declaration) { switch (declaration.kind) { - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: return isIndependentVariableLikeDeclaration(declaration); - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 144 /* Constructor */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 145 /* Constructor */: return isIndependentFunctionLikeDeclaration(declaration); } } @@ -17783,7 +18067,7 @@ var ts; function getSignatureFromDeclaration(declaration) { var links = getNodeLinks(declaration); if (!links.resolvedSignature) { - var classType = declaration.kind === 144 /* Constructor */ ? + var classType = declaration.kind === 145 /* Constructor */ ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : undefined; var typeParameters = classType ? classType.localTypeParameters : @@ -17800,7 +18084,7 @@ var ts; paramSymbol = resolvedSymbol; } parameters.push(paramSymbol); - if (param.type && param.type.kind === 162 /* StringLiteralType */) { + if (param.type && param.type.kind === 163 /* StringLiteralType */) { hasStringLiterals = true; } if (param.initializer || param.questionToken || param.dotDotDotToken) { @@ -17826,8 +18110,8 @@ var ts; else { // TypeScript 1.0 spec (April 2014): // If only one accessor includes a type annotation, the other behaves as if it had the same type annotation. - if (declaration.kind === 145 /* GetAccessor */ && !ts.hasDynamicName(declaration)) { - var setter = ts.getDeclarationOfKind(declaration.symbol, 146 /* SetAccessor */); + if (declaration.kind === 146 /* GetAccessor */ && !ts.hasDynamicName(declaration)) { + var setter = ts.getDeclarationOfKind(declaration.symbol, 147 /* SetAccessor */); returnType = getAnnotatedAccessorType(setter); } if (!returnType && ts.nodeIsMissing(declaration.body)) { @@ -17845,19 +18129,19 @@ var ts; for (var i = 0, len = symbol.declarations.length; i < len; i++) { var node = symbol.declarations[i]; switch (node.kind) { - case 152 /* FunctionType */: - case 153 /* ConstructorType */: - case 215 /* FunctionDeclaration */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 144 /* Constructor */: - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 149 /* IndexSignature */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: + case 153 /* FunctionType */: + case 154 /* ConstructorType */: + case 216 /* FunctionDeclaration */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 145 /* Constructor */: + case 148 /* CallSignature */: + case 149 /* ConstructSignature */: + case 150 /* IndexSignature */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: // Don't include signature if node is the implementation of an overloaded function. A node is considered // an implementation node if it has a body and the previous node is of the same kind and immediately // precedes the implementation node (i.e. has the same parent and ends where the implementation starts). @@ -17944,7 +18228,7 @@ var ts; // object type literal or interface (using the new keyword). Each way of declaring a constructor // will result in a different declaration kind. if (!signature.isolatedSignatureType) { - var isConstructor = signature.declaration.kind === 144 /* Constructor */ || signature.declaration.kind === 148 /* ConstructSignature */; + var isConstructor = signature.declaration.kind === 145 /* Constructor */ || signature.declaration.kind === 149 /* ConstructSignature */; var type = createObjectType(65536 /* Anonymous */ | 262144 /* FromSignature */); type.members = emptySymbols; type.properties = emptyArray; @@ -17981,7 +18265,7 @@ var ts; : undefined; } function getConstraintDeclaration(type) { - return ts.getDeclarationOfKind(type.symbol, 137 /* TypeParameter */).constraint; + return ts.getDeclarationOfKind(type.symbol, 138 /* TypeParameter */).constraint; } function hasConstraintReferenceTo(type, target) { var checked; @@ -18014,7 +18298,7 @@ var ts; return typeParameter.constraint === noConstraintType ? undefined : typeParameter.constraint; } function getParentSymbolOfTypeParameter(typeParameter) { - return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 137 /* TypeParameter */).parent); + return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 138 /* TypeParameter */).parent); } function getTypeListId(types) { if (types) { @@ -18113,7 +18397,7 @@ var ts; var links = getNodeLinks(node); if (!links.resolvedType) { // We only support expressions that are simple qualified names. For other expressions this produces undefined. - var typeNameOrExpression = node.kind === 151 /* TypeReference */ ? node.typeName : + var typeNameOrExpression = node.kind === 152 /* TypeReference */ ? node.typeName : ts.isSupportedExpressionWithTypeArguments(node) ? node.expression : undefined; var symbol = typeNameOrExpression && resolveEntityName(typeNameOrExpression, 793056 /* Type */) || unknownSymbol; @@ -18145,9 +18429,9 @@ var ts; for (var _i = 0, declarations_3 = declarations; _i < declarations_3.length; _i++) { var declaration = declarations_3[_i]; switch (declaration.kind) { - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: - case 219 /* EnumDeclaration */: + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: + case 220 /* EnumDeclaration */: return declaration; } } @@ -18388,9 +18672,9 @@ var ts; function getThisType(node) { var container = ts.getThisContainer(node, /*includeArrowFunctions*/ false); var parent = container && container.parent; - if (parent && (ts.isClassLike(parent) || parent.kind === 217 /* InterfaceDeclaration */)) { + if (parent && (ts.isClassLike(parent) || parent.kind === 218 /* InterfaceDeclaration */)) { if (!(container.flags & 64 /* Static */) && - (container.kind !== 144 /* Constructor */ || ts.isNodeDescendentOf(node, container.body))) { + (container.kind !== 145 /* Constructor */ || ts.isNodeDescendentOf(node, container.body))) { return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent)).thisType; } } @@ -18434,36 +18718,36 @@ var ts; return esSymbolType; case 103 /* VoidKeyword */: return voidType; - case 161 /* ThisType */: + case 162 /* ThisType */: return getTypeFromThisTypeNode(node); - case 162 /* StringLiteralType */: + case 163 /* StringLiteralType */: return getTypeFromStringLiteralTypeNode(node); - case 151 /* TypeReference */: + case 152 /* TypeReference */: return getTypeFromTypeReference(node); - case 150 /* TypePredicate */: + case 151 /* TypePredicate */: return getTypeFromPredicateTypeNode(node); - case 190 /* ExpressionWithTypeArguments */: + case 191 /* ExpressionWithTypeArguments */: return getTypeFromTypeReference(node); - case 154 /* TypeQuery */: + case 155 /* TypeQuery */: return getTypeFromTypeQueryNode(node); - case 156 /* ArrayType */: + case 157 /* ArrayType */: return getTypeFromArrayTypeNode(node); - case 157 /* TupleType */: + case 158 /* TupleType */: return getTypeFromTupleTypeNode(node); - case 158 /* UnionType */: + case 159 /* UnionType */: return getTypeFromUnionTypeNode(node); - case 159 /* IntersectionType */: + case 160 /* IntersectionType */: return getTypeFromIntersectionTypeNode(node); - case 160 /* ParenthesizedType */: + case 161 /* ParenthesizedType */: return getTypeFromTypeNode(node.type); - case 152 /* FunctionType */: - case 153 /* ConstructorType */: - case 155 /* TypeLiteral */: + case 153 /* FunctionType */: + case 154 /* ConstructorType */: + case 156 /* TypeLiteral */: return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); // This function assumes that an identifier or qualified name is a type expression // Callers should first ensure this by calling isTypeNode case 69 /* Identifier */: - case 135 /* QualifiedName */: + case 136 /* QualifiedName */: var symbol = getSymbolAtLocation(node); return symbol && getDeclaredTypeOfSymbol(symbol); default: @@ -18654,27 +18938,27 @@ var ts; // Returns true if the given expression contains (at any level of nesting) a function or arrow expression // that is subject to contextual typing. function isContextSensitive(node) { - ts.Debug.assert(node.kind !== 143 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 144 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); switch (node.kind) { - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: return isContextSensitiveFunctionLikeDeclaration(node); - case 167 /* ObjectLiteralExpression */: + case 168 /* ObjectLiteralExpression */: return ts.forEach(node.properties, isContextSensitive); - case 166 /* ArrayLiteralExpression */: + case 167 /* ArrayLiteralExpression */: return ts.forEach(node.elements, isContextSensitive); - case 184 /* ConditionalExpression */: + case 185 /* ConditionalExpression */: return isContextSensitive(node.whenTrue) || isContextSensitive(node.whenFalse); - case 183 /* BinaryExpression */: + case 184 /* BinaryExpression */: return node.operatorToken.kind === 52 /* BarBarToken */ && (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 247 /* PropertyAssignment */: + case 248 /* PropertyAssignment */: return isContextSensitive(node.initializer); - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: return isContextSensitiveFunctionLikeDeclaration(node); - case 174 /* ParenthesizedExpression */: + case 175 /* ParenthesizedExpression */: return isContextSensitive(node.expression); } return false; @@ -18703,6 +18987,9 @@ var ts; function compareTypesIdentical(source, target) { return checkTypeRelatedTo(source, target, identityRelation, /*errorNode*/ undefined) ? -1 /* True */ : 0 /* False */; } + function compareTypesAssignable(source, target) { + return checkTypeRelatedTo(source, target, assignableRelation, /*errorNode*/ undefined) ? -1 /* True */ : 0 /* False */; + } function isTypeSubtypeOf(source, target) { return checkTypeSubtypeOf(source, target, /*errorNode*/ undefined); } @@ -18715,47 +19002,60 @@ var ts; function checkTypeAssignableTo(source, target, errorNode, headMessage, containingMessageChain) { return checkTypeRelatedTo(source, target, assignableRelation, errorNode, headMessage, containingMessageChain); } + function isSignatureAssignableTo(source, target, ignoreReturnTypes) { + return compareSignaturesRelated(source, target, ignoreReturnTypes, /*reportErrors*/ false, /*errorReporter*/ undefined, compareTypesAssignable) !== 0 /* False */; + } /** * See signatureRelatedTo, compareSignaturesIdentical */ - function isSignatureAssignableTo(source, target, ignoreReturnTypes) { + function compareSignaturesRelated(source, target, ignoreReturnTypes, reportErrors, errorReporter, compareTypes) { // TODO (drosen): De-duplicate code between related functions. if (source === target) { - return true; + return -1 /* True */; } if (!target.hasRestParameter && source.minArgumentCount > target.parameters.length) { - return false; + return 0 /* False */; } // Spec 1.0 Section 3.8.3 & 3.8.4: // M and N (the signatures) are instantiated using type Any as the type argument for all type parameters declared by M and N source = getErasedSignature(source); target = getErasedSignature(target); + var result = -1 /* True */; var sourceMax = getNumNonRestParameters(source); var targetMax = getNumNonRestParameters(target); var checkCount = getNumParametersToCheckForSignatureRelatability(source, sourceMax, target, targetMax); + var sourceParams = source.parameters; + var targetParams = target.parameters; for (var i = 0; i < checkCount; i++) { - var s = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source); - var t = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target); - var related = isTypeAssignableTo(t, s) || isTypeAssignableTo(s, t); + var s = i < sourceMax ? getTypeOfSymbol(sourceParams[i]) : getRestTypeOfSignature(source); + var t = i < targetMax ? getTypeOfSymbol(targetParams[i]) : getRestTypeOfSignature(target); + var related = compareTypes(t, s, /*reportErrors*/ false) || compareTypes(s, t, reportErrors); if (!related) { - return false; + if (reportErrors) { + errorReporter(ts.Diagnostics.Types_of_parameters_0_and_1_are_incompatible, sourceParams[i < sourceMax ? i : sourceMax].name, targetParams[i < targetMax ? i : targetMax].name); + } + return 0 /* False */; } + result &= related; } if (!ignoreReturnTypes) { var targetReturnType = getReturnTypeOfSignature(target); if (targetReturnType === voidType) { - return true; + return result; } var sourceReturnType = getReturnTypeOfSignature(source); // The following block preserves behavior forbidding boolean returning functions from being assignable to type guard returning functions if (targetReturnType.flags & 134217728 /* PredicateType */ && targetReturnType.predicate.kind === 1 /* Identifier */) { if (!(sourceReturnType.flags & 134217728 /* PredicateType */)) { - return false; + if (reportErrors) { + errorReporter(ts.Diagnostics.Signature_0_must_have_a_type_predicate, signatureToString(source)); + } + return 0 /* False */; } } - return isTypeAssignableTo(sourceReturnType, targetReturnType); + result &= compareTypes(sourceReturnType, targetReturnType, reportErrors); } - return true; + return result; } function isImplementationCompatibleWithOverload(implementation, overload) { var erasedSource = getErasedSignature(implementation); @@ -18812,22 +19112,12 @@ var ts; var expandingFlags; var depth = 0; var overflow = false; - var elaborateErrors = false; ts.Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking"); - var result = isRelatedTo(source, target, errorNode !== undefined, headMessage); + var result = isRelatedTo(source, target, /*reportErrors*/ !!errorNode, headMessage); if (overflow) { error(errorNode, ts.Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target)); } else if (errorInfo) { - // If we already computed this relation, but in a context where we didn't want to report errors (e.g. overload resolution), - // then we'll only have a top-level error (e.g. 'Class X does not implement interface Y') without any details. If this happened, - // request a recompuation to get a complete error message. This will be skipped if we've already done this computation in a context - // where errors were being reported. - if (errorInfo.next === undefined) { - errorInfo = undefined; - elaborateErrors = true; - isRelatedTo(source, target, errorNode !== undefined, headMessage); - } if (containingMessageChain) { errorInfo = ts.concatenateDiagnosticMessageChains(containingMessageChain, errorInfo); } @@ -18835,6 +19125,7 @@ var ts; } return result !== 0 /* False */; function reportError(message, arg0, arg1, arg2) { + ts.Debug.assert(!!errorNode); errorInfo = ts.chainDiagnosticMessages(errorInfo, message, arg0, arg1, arg2); } function reportRelationError(message, source, target) { @@ -18973,14 +19264,14 @@ var ts; } // Even if relationship doesn't hold for unions, intersections, or generic type references, // it may hold in a structural comparison. - var apparentType = getApparentType(source); + var apparentSource = getApparentType(source); // In a check of the form X = A & B, we will have previously checked if A relates to X or B relates // to X. Failing both of those we want to check if the aggregation of A and B's members structurally // relates to X. Thus, we include intersection types on the source side here. - if (apparentType.flags & (80896 /* ObjectType */ | 32768 /* Intersection */) && target.flags & 80896 /* ObjectType */) { + if (apparentSource.flags & (80896 /* ObjectType */ | 32768 /* Intersection */) && target.flags & 80896 /* ObjectType */) { // Report structural errors only if we haven't reported any errors yet - var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo; - if (result = objectTypeRelatedTo(apparentType, source, target, reportStructuralErrors)) { + var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo && !(source.flags & 16777726 /* Primitive */); + if (result = objectTypeRelatedTo(apparentSource, source, target, reportStructuralErrors)) { errorInfo = saveErrorInfo; return result; } @@ -19043,6 +19334,7 @@ var ts; // We know *exactly* where things went wrong when comparing the types. // Use this property as the error node as this will be more helpful in // reasoning about what went wrong. + ts.Debug.assert(!!errorNode); errorNode = prop.valueDeclaration; reportError(ts.Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(prop), typeToString(target)); } @@ -19140,7 +19432,7 @@ var ts; var id = relation !== identityRelation || source.id < target.id ? source.id + "," + target.id : target.id + "," + source.id; var related = relation[id]; if (related !== undefined) { - if (elaborateErrors && related === 2 /* Failed */) { + if (reportErrors && related === 2 /* Failed */) { // We are elaborating errors and the cached result is an unreported failure. Record the result as a reported // failure and continue computing the relation such that errors get reported. relation[id] = 3 /* FailedAndReported */; @@ -19354,7 +19646,7 @@ var ts; } // don't elaborate the primitive apparent types (like Number) // because the actual primitives will have already been reported. - if (shouldElaborateErrors && !isPrimitiveApparentType(source)) { + if (shouldElaborateErrors) { reportError(ts.Diagnostics.Type_0_provides_no_match_for_the_signature_1, typeToString(source), signatureToString(t, /*enclosingDeclaration*/ undefined, /*flags*/ undefined, kind)); } return 0 /* False */; @@ -19363,72 +19655,10 @@ var ts; return result; } /** - * See signatureAssignableTo, signatureAssignableTo + * See signatureAssignableTo, compareSignaturesIdentical */ function signatureRelatedTo(source, target, reportErrors) { - // TODO (drosen): De-duplicate code between related functions. - if (source === target) { - return -1 /* True */; - } - if (!target.hasRestParameter && source.minArgumentCount > target.parameters.length) { - return 0 /* False */; - } - var sourceMax = source.parameters.length; - var targetMax = target.parameters.length; - var checkCount; - if (source.hasRestParameter && target.hasRestParameter) { - checkCount = sourceMax > targetMax ? sourceMax : targetMax; - sourceMax--; - targetMax--; - } - else if (source.hasRestParameter) { - sourceMax--; - checkCount = targetMax; - } - else if (target.hasRestParameter) { - targetMax--; - checkCount = sourceMax; - } - else { - checkCount = sourceMax < targetMax ? sourceMax : targetMax; - } - // Spec 1.0 Section 3.8.3 & 3.8.4: - // M and N (the signatures) are instantiated using type Any as the type argument for all type parameters declared by M and N - source = getErasedSignature(source); - target = getErasedSignature(target); - var result = -1 /* True */; - for (var i = 0; i < checkCount; i++) { - var s = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source); - var t = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target); - var saveErrorInfo = errorInfo; - var related = isRelatedTo(s, t, reportErrors); - if (!related) { - related = isRelatedTo(t, s, /*reportErrors*/ false); - if (!related) { - if (reportErrors) { - reportError(ts.Diagnostics.Types_of_parameters_0_and_1_are_incompatible, source.parameters[i < sourceMax ? i : sourceMax].name, target.parameters[i < targetMax ? i : targetMax].name); - } - return 0 /* False */; - } - errorInfo = saveErrorInfo; - } - result &= related; - } - var targetReturnType = getReturnTypeOfSignature(target); - if (targetReturnType === voidType) { - return result; - } - var sourceReturnType = getReturnTypeOfSignature(source); - // The following block preserves behavior forbidding boolean returning functions from being assignable to type guard returning functions - if (targetReturnType.flags & 134217728 /* PredicateType */ && targetReturnType.predicate.kind === 1 /* Identifier */) { - if (!(sourceReturnType.flags & 134217728 /* PredicateType */)) { - if (reportErrors) { - reportError(ts.Diagnostics.Signature_0_must_have_a_type_predicate, signatureToString(source)); - } - return 0 /* False */; - } - } - return result & isRelatedTo(sourceReturnType, targetReturnType, reportErrors); + return compareSignaturesRelated(source, target, /*ignoreReturnTypes*/ false, reportErrors, reportError, isRelatedTo); } function signaturesIdenticalTo(source, target, kind) { var sourceSignatures = getSignaturesOfType(source, kind); @@ -19844,22 +20074,22 @@ var ts; var typeAsString = typeToString(getWidenedType(type)); var diagnostic; switch (declaration.kind) { - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: diagnostic = ts.Diagnostics.Member_0_implicitly_has_an_1_type; break; - case 138 /* Parameter */: + case 139 /* Parameter */: diagnostic = declaration.dotDotDotToken ? ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : ts.Diagnostics.Parameter_0_implicitly_has_an_1_type; break; - case 215 /* FunctionDeclaration */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: + case 216 /* FunctionDeclaration */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: if (!declaration.name) { error(declaration, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; @@ -20196,10 +20426,10 @@ var ts; // The expression is restricted to a single identifier or a sequence of identifiers separated by periods while (node) { switch (node.kind) { - case 154 /* TypeQuery */: + case 155 /* TypeQuery */: return true; case 69 /* Identifier */: - case 135 /* QualifiedName */: + case 136 /* QualifiedName */: node = node.parent; continue; default: @@ -20241,55 +20471,55 @@ var ts; } function isAssignedIn(node) { switch (node.kind) { - case 183 /* BinaryExpression */: + case 184 /* BinaryExpression */: return isAssignedInBinaryExpression(node); - case 213 /* VariableDeclaration */: - case 165 /* BindingElement */: + case 214 /* VariableDeclaration */: + case 166 /* BindingElement */: return isAssignedInVariableDeclaration(node); - case 163 /* ObjectBindingPattern */: - case 164 /* ArrayBindingPattern */: - case 166 /* ArrayLiteralExpression */: - case 167 /* ObjectLiteralExpression */: - case 168 /* PropertyAccessExpression */: - case 169 /* ElementAccessExpression */: - case 170 /* CallExpression */: - case 171 /* NewExpression */: - case 173 /* TypeAssertionExpression */: - case 191 /* AsExpression */: - case 174 /* ParenthesizedExpression */: - case 181 /* PrefixUnaryExpression */: - case 177 /* DeleteExpression */: - case 180 /* AwaitExpression */: - case 178 /* TypeOfExpression */: - case 179 /* VoidExpression */: - case 182 /* PostfixUnaryExpression */: - case 186 /* YieldExpression */: - case 184 /* ConditionalExpression */: - case 187 /* SpreadElementExpression */: - case 194 /* Block */: - case 195 /* VariableStatement */: - case 197 /* ExpressionStatement */: - case 198 /* IfStatement */: - case 199 /* DoStatement */: - case 200 /* WhileStatement */: - case 201 /* ForStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - case 206 /* ReturnStatement */: - case 207 /* WithStatement */: - case 208 /* SwitchStatement */: - case 243 /* CaseClause */: - case 244 /* DefaultClause */: - case 209 /* LabeledStatement */: - case 210 /* ThrowStatement */: - case 211 /* TryStatement */: - case 246 /* CatchClause */: - case 235 /* JsxElement */: - case 236 /* JsxSelfClosingElement */: - case 240 /* JsxAttribute */: - case 241 /* JsxSpreadAttribute */: - case 237 /* JsxOpeningElement */: - case 242 /* JsxExpression */: + case 164 /* ObjectBindingPattern */: + case 165 /* ArrayBindingPattern */: + case 167 /* ArrayLiteralExpression */: + case 168 /* ObjectLiteralExpression */: + case 169 /* PropertyAccessExpression */: + case 170 /* ElementAccessExpression */: + case 171 /* CallExpression */: + case 172 /* NewExpression */: + case 174 /* TypeAssertionExpression */: + case 192 /* AsExpression */: + case 175 /* ParenthesizedExpression */: + case 182 /* PrefixUnaryExpression */: + case 178 /* DeleteExpression */: + case 181 /* AwaitExpression */: + case 179 /* TypeOfExpression */: + case 180 /* VoidExpression */: + case 183 /* PostfixUnaryExpression */: + case 187 /* YieldExpression */: + case 185 /* ConditionalExpression */: + case 188 /* SpreadElementExpression */: + case 195 /* Block */: + case 196 /* VariableStatement */: + case 198 /* ExpressionStatement */: + case 199 /* IfStatement */: + case 200 /* DoStatement */: + case 201 /* WhileStatement */: + case 202 /* ForStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: + case 207 /* ReturnStatement */: + case 208 /* WithStatement */: + case 209 /* SwitchStatement */: + case 244 /* CaseClause */: + case 245 /* DefaultClause */: + case 210 /* LabeledStatement */: + case 211 /* ThrowStatement */: + case 212 /* TryStatement */: + case 247 /* CatchClause */: + case 236 /* JsxElement */: + case 237 /* JsxSelfClosingElement */: + case 241 /* JsxAttribute */: + case 242 /* JsxSpreadAttribute */: + case 238 /* JsxOpeningElement */: + case 243 /* JsxExpression */: return ts.forEachChild(node, isAssignedIn); } return false; @@ -20301,7 +20531,7 @@ var ts; // Only narrow when symbol is variable of type any or an object, union, or type parameter type if (node && symbol.flags & 3 /* Variable */) { if (isTypeAny(type) || type.flags & (80896 /* ObjectType */ | 16384 /* Union */ | 512 /* TypeParameter */)) { - var declaration = ts.getDeclarationOfKind(symbol, 213 /* VariableDeclaration */); + var declaration = ts.getDeclarationOfKind(symbol, 214 /* VariableDeclaration */); var top_1 = declaration && getDeclarationContainer(declaration); var originalType = type; var nodeStack = []; @@ -20309,13 +20539,13 @@ var ts; var child = node; node = node.parent; switch (node.kind) { - case 198 /* IfStatement */: - case 184 /* ConditionalExpression */: - case 183 /* BinaryExpression */: + case 199 /* IfStatement */: + case 185 /* ConditionalExpression */: + case 184 /* BinaryExpression */: nodeStack.push({ node: node, child: child }); break; - case 250 /* SourceFile */: - case 220 /* ModuleDeclaration */: + case 251 /* SourceFile */: + case 221 /* ModuleDeclaration */: // Stop at the first containing file or module declaration break loop; } @@ -20327,19 +20557,19 @@ var ts; while (nodes = nodeStack.pop()) { var node_1 = nodes.node, child = nodes.child; switch (node_1.kind) { - case 198 /* IfStatement */: + case 199 /* IfStatement */: // In a branch of an if statement, narrow based on controlling expression if (child !== node_1.expression) { type = narrowType(type, node_1.expression, /*assumeTrue*/ child === node_1.thenStatement); } break; - case 184 /* ConditionalExpression */: + case 185 /* ConditionalExpression */: // In a branch of a conditional expression, narrow based on controlling condition if (child !== node_1.condition) { type = narrowType(type, node_1.condition, /*assumeTrue*/ child === node_1.whenTrue); } break; - case 183 /* BinaryExpression */: + case 184 /* BinaryExpression */: // In the right operand of an && or ||, narrow based on left operand if (child === node_1.right) { if (node_1.operatorToken.kind === 51 /* AmpersandAmpersandToken */) { @@ -20367,7 +20597,7 @@ var ts; return type; function narrowTypeByEquality(type, expr, assumeTrue) { // Check that we have 'typeof ' on the left and string literal on the right - if (expr.left.kind !== 178 /* TypeOfExpression */ || expr.right.kind !== 9 /* StringLiteral */) { + if (expr.left.kind !== 179 /* TypeOfExpression */ || expr.right.kind !== 9 /* StringLiteral */) { return type; } var left = expr.left; @@ -20383,10 +20613,6 @@ var ts; if (typeInfo && typeInfo.type === undefinedType) { return type; } - // If the type to be narrowed is any and we're checking a primitive with assumeTrue=true, return the primitive - if (!!(type.flags & 1 /* Any */) && typeInfo && assumeTrue) { - return typeInfo.type; - } var flags; if (typeInfo) { flags = typeInfo.flags; @@ -20397,6 +20623,10 @@ var ts; } // At this point we can bail if it's not a union if (!(type.flags & 16384 /* Union */)) { + // If we're on the true branch and the type is a subtype, we should return the primitive type + if (assumeTrue && typeInfo && isTypeSubtypeOf(typeInfo.type, type)) { + return typeInfo.type; + } // If the active non-union type would be removed from a union by this type guard, return an empty union return filterUnion(type) ? type : emptyUnionType; } @@ -20525,7 +20755,7 @@ var ts; return narrowTypeByThisTypePredicate(type, memberType.predicate, expr, assumeTrue); } function narrowTypeByThisTypePredicate(type, predicate, expression, assumeTrue) { - if (expression.kind === 169 /* ElementAccessExpression */ || expression.kind === 168 /* PropertyAccessExpression */) { + if (expression.kind === 170 /* ElementAccessExpression */ || expression.kind === 169 /* PropertyAccessExpression */) { var accessExpression = expression; var possibleIdentifier = skipParenthesizedNodes(accessExpression.expression); if (possibleIdentifier.kind === 69 /* Identifier */ && getSymbolAtTypePredicatePosition(possibleIdentifier) === symbol) { @@ -20538,8 +20768,8 @@ var ts; expr = skipParenthesizedNodes(expr); switch (expr.kind) { case 69 /* Identifier */: - case 168 /* PropertyAccessExpression */: - case 135 /* QualifiedName */: + case 169 /* PropertyAccessExpression */: + case 136 /* QualifiedName */: return getSymbolOfEntityNameOrPropertyAccessExpression(expr); } } @@ -20547,11 +20777,11 @@ var ts; // will be a subtype or the same type as the argument. function narrowType(type, expr, assumeTrue) { switch (expr.kind) { - case 170 /* CallExpression */: + case 171 /* CallExpression */: return narrowTypeByTypePredicate(type, expr, assumeTrue); - case 174 /* ParenthesizedExpression */: + case 175 /* ParenthesizedExpression */: return narrowType(type, expr.expression, assumeTrue); - case 183 /* BinaryExpression */: + case 184 /* BinaryExpression */: var operator = expr.operatorToken.kind; if (operator === 32 /* EqualsEqualsEqualsToken */ || operator === 33 /* ExclamationEqualsEqualsToken */) { return narrowTypeByEquality(type, expr, assumeTrue); @@ -20566,20 +20796,20 @@ var ts; return narrowTypeByInstanceof(type, expr, assumeTrue); } break; - case 181 /* PrefixUnaryExpression */: + case 182 /* PrefixUnaryExpression */: if (expr.operator === 49 /* ExclamationToken */) { return narrowType(type, expr.operand, !assumeTrue); } break; - case 169 /* ElementAccessExpression */: - case 168 /* PropertyAccessExpression */: + case 170 /* ElementAccessExpression */: + case 169 /* PropertyAccessExpression */: return narrowTypeByTypePredicateMember(type, expr, assumeTrue); } return type; } } function skipParenthesizedNodes(expression) { - while (expression.kind === 174 /* ParenthesizedExpression */) { + while (expression.kind === 175 /* ParenthesizedExpression */) { expression = expression.expression; } return expression; @@ -20594,7 +20824,7 @@ var ts; // can explicitly bound arguments objects if (symbol === argumentsSymbol) { var container = ts.getContainingFunction(node); - if (container.kind === 176 /* ArrowFunction */) { + if (container.kind === 177 /* ArrowFunction */) { if (languageVersion < 2 /* ES6 */) { error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); } @@ -20625,7 +20855,7 @@ var ts; function checkBlockScopedBindingCapturedInLoop(node, symbol) { if (languageVersion >= 2 /* ES6 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || - symbol.valueDeclaration.parent.kind === 246 /* CatchClause */) { + symbol.valueDeclaration.parent.kind === 247 /* CatchClause */) { return; } // 1. walk from the use site up to the declaration and check @@ -20641,12 +20871,12 @@ var ts; // nesting structure: // (variable declaration or binding element) -> variable declaration list -> container container = symbol.valueDeclaration; - while (container.kind !== 214 /* VariableDeclarationList */) { + while (container.kind !== 215 /* VariableDeclarationList */) { container = container.parent; } // get the parent of variable declaration list container = container.parent; - if (container.kind === 195 /* VariableStatement */) { + if (container.kind === 196 /* VariableStatement */) { // if parent is variable statement - get its parent container = container.parent; } @@ -20667,7 +20897,7 @@ var ts; } function captureLexicalThis(node, container) { getNodeLinks(node).flags |= 2 /* LexicalThis */; - if (container.kind === 141 /* PropertyDeclaration */ || container.kind === 144 /* Constructor */) { + if (container.kind === 142 /* PropertyDeclaration */ || container.kind === 145 /* Constructor */) { var classNode = container.parent; getNodeLinks(classNode).flags |= 4 /* CaptureThis */; } @@ -20681,32 +20911,32 @@ var ts; var container = ts.getThisContainer(node, /* includeArrowFunctions */ true); var needToCaptureLexicalThis = false; // Now skip arrow functions to get the "real" owner of 'this'. - if (container.kind === 176 /* ArrowFunction */) { + if (container.kind === 177 /* ArrowFunction */) { container = ts.getThisContainer(container, /* includeArrowFunctions */ false); // When targeting es6, arrow function lexically bind "this" so we do not need to do the work of binding "this" in emitted code needToCaptureLexicalThis = (languageVersion < 2 /* ES6 */); } switch (container.kind) { - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks break; - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: error(node, ts.Diagnostics.this_cannot_be_referenced_in_current_location); // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks break; - case 144 /* Constructor */: + case 145 /* Constructor */: if (isInConstructorArgumentInitializer(node, container)) { error(node, ts.Diagnostics.this_cannot_be_referenced_in_constructor_arguments); } break; - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: if (container.flags & 64 /* Static */) { error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer); } break; - case 136 /* ComputedPropertyName */: + case 137 /* ComputedPropertyName */: error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); break; } @@ -20719,7 +20949,7 @@ var ts; } // If this is a function in a JS file, it might be a class method. Check if it's the RHS // of a x.prototype.y = function [name]() { .... } - if (ts.isInJavaScriptFile(node) && container.kind === 175 /* FunctionExpression */) { + if (ts.isInJavaScriptFile(node) && container.kind === 176 /* FunctionExpression */) { if (ts.getSpecialPropertyAssignmentKind(container.parent) === 3 /* PrototypeProperty */) { // Get the 'x' of 'x.prototype.y = f' (here, 'f' is 'container') var className = container.parent // x.protoype.y = f @@ -20736,19 +20966,19 @@ var ts; } function isInConstructorArgumentInitializer(node, constructorDecl) { for (var n = node; n && n !== constructorDecl; n = n.parent) { - if (n.kind === 138 /* Parameter */) { + if (n.kind === 139 /* Parameter */) { return true; } } return false; } function checkSuperExpression(node) { - var isCallExpression = node.parent.kind === 170 /* CallExpression */ && node.parent.expression === node; + var isCallExpression = node.parent.kind === 171 /* CallExpression */ && node.parent.expression === node; var container = ts.getSuperContainer(node, /*stopOnFunctions*/ true); var needToCaptureLexicalThis = false; if (!isCallExpression) { // adjust the container reference in case if super is used inside arrow functions with arbitrary deep nesting - while (container && container.kind === 176 /* ArrowFunction */) { + while (container && container.kind === 177 /* ArrowFunction */) { container = ts.getSuperContainer(container, /*stopOnFunctions*/ true); needToCaptureLexicalThis = languageVersion < 2 /* ES6 */; } @@ -20762,16 +20992,16 @@ var ts; // [super.foo()]() {} // } var current = node; - while (current && current !== container && current.kind !== 136 /* ComputedPropertyName */) { + while (current && current !== container && current.kind !== 137 /* ComputedPropertyName */) { current = current.parent; } - if (current && current.kind === 136 /* ComputedPropertyName */) { + if (current && current.kind === 137 /* ComputedPropertyName */) { error(node, ts.Diagnostics.super_cannot_be_referenced_in_a_computed_property_name); } else if (isCallExpression) { error(node, ts.Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors); } - else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 167 /* ObjectLiteralExpression */)) { + else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 168 /* ObjectLiteralExpression */)) { error(node, ts.Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions); } else { @@ -20792,7 +21022,7 @@ var ts; // in this case they should also use correct lexical this captureLexicalThis(node.parent, container); } - if (container.parent.kind === 167 /* ObjectLiteralExpression */) { + if (container.parent.kind === 168 /* ObjectLiteralExpression */) { if (languageVersion < 2 /* ES6 */) { error(node, ts.Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher); return unknownType; @@ -20812,7 +21042,7 @@ var ts; } return unknownType; } - if (container.kind === 144 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { + if (container.kind === 145 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { // issue custom error message for super property access in constructor arguments (to be aligned with old compiler) error(node, ts.Diagnostics.super_cannot_be_referenced_in_constructor_arguments); return unknownType; @@ -20827,7 +21057,7 @@ var ts; if (isCallExpression) { // TS 1.0 SPEC (April 2014): 4.8.1 // Super calls are only permitted in constructors of derived classes - return container.kind === 144 /* Constructor */; + return container.kind === 145 /* Constructor */; } else { // TS 1.0 SPEC (April 2014) @@ -20835,21 +21065,21 @@ var ts; // - In a constructor, instance member function, instance member accessor, or instance member variable initializer where this references a derived class instance // - In a static member function or static member accessor // topmost container must be something that is directly nested in the class declaration\object literal expression - if (ts.isClassLike(container.parent) || container.parent.kind === 167 /* ObjectLiteralExpression */) { + if (ts.isClassLike(container.parent) || container.parent.kind === 168 /* ObjectLiteralExpression */) { if (container.flags & 64 /* Static */) { - return container.kind === 143 /* MethodDeclaration */ || - container.kind === 142 /* MethodSignature */ || - container.kind === 145 /* GetAccessor */ || - container.kind === 146 /* SetAccessor */; + return container.kind === 144 /* MethodDeclaration */ || + container.kind === 143 /* MethodSignature */ || + container.kind === 146 /* GetAccessor */ || + container.kind === 147 /* SetAccessor */; } else { - return container.kind === 143 /* MethodDeclaration */ || - container.kind === 142 /* MethodSignature */ || - container.kind === 145 /* GetAccessor */ || - container.kind === 146 /* SetAccessor */ || - container.kind === 141 /* PropertyDeclaration */ || - container.kind === 140 /* PropertySignature */ || - container.kind === 144 /* Constructor */; + return container.kind === 144 /* MethodDeclaration */ || + container.kind === 143 /* MethodSignature */ || + container.kind === 146 /* GetAccessor */ || + container.kind === 147 /* SetAccessor */ || + container.kind === 142 /* PropertyDeclaration */ || + container.kind === 141 /* PropertySignature */ || + container.kind === 145 /* Constructor */; } } } @@ -20891,7 +21121,7 @@ var ts; if (declaration.type) { return getTypeFromTypeNode(declaration.type); } - if (declaration.kind === 138 /* Parameter */) { + if (declaration.kind === 139 /* Parameter */) { var type = getContextuallyTypedParameterType(declaration); if (type) { return type; @@ -20924,7 +21154,7 @@ var ts; } function isInParameterInitializerBeforeContainingFunction(node) { while (node.parent && !ts.isFunctionLike(node.parent)) { - if (node.parent.kind === 138 /* Parameter */ && node.parent.initializer === node) { + if (node.parent.kind === 139 /* Parameter */ && node.parent.initializer === node) { return true; } node = node.parent; @@ -20935,8 +21165,8 @@ var ts; // If the containing function has a return type annotation, is a constructor, or is a get accessor whose // corresponding set accessor has a type annotation, return statements in the function are contextually typed if (functionDecl.type || - functionDecl.kind === 144 /* Constructor */ || - functionDecl.kind === 145 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 146 /* SetAccessor */))) { + functionDecl.kind === 145 /* Constructor */ || + functionDecl.kind === 146 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 147 /* SetAccessor */))) { return getReturnTypeOfSignature(getSignatureFromDeclaration(functionDecl)); } // Otherwise, if the containing function is contextually typed by a function type with exactly one call signature @@ -20958,7 +21188,7 @@ var ts; return undefined; } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { - if (template.parent.kind === 172 /* TaggedTemplateExpression */) { + if (template.parent.kind === 173 /* TaggedTemplateExpression */) { return getContextualTypeForArgument(template.parent, substitutionExpression); } return undefined; @@ -21089,13 +21319,13 @@ var ts; var kind = attribute.kind; var jsxElement = attribute.parent; var attrsType = getJsxElementAttributesType(jsxElement); - if (attribute.kind === 240 /* JsxAttribute */) { + if (attribute.kind === 241 /* JsxAttribute */) { if (!attrsType || isTypeAny(attrsType)) { return undefined; } return getTypeOfPropertyOfType(attrsType, attribute.name.text); } - else if (attribute.kind === 241 /* JsxSpreadAttribute */) { + else if (attribute.kind === 242 /* JsxSpreadAttribute */) { return attrsType; } ts.Debug.fail("Expected JsxAttribute or JsxSpreadAttribute, got ts.SyntaxKind[" + kind + "]"); @@ -21133,40 +21363,40 @@ var ts; } var parent = node.parent; switch (parent.kind) { - case 213 /* VariableDeclaration */: - case 138 /* Parameter */: - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 165 /* BindingElement */: + case 214 /* VariableDeclaration */: + case 139 /* Parameter */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 166 /* BindingElement */: return getContextualTypeForInitializerExpression(node); - case 176 /* ArrowFunction */: - case 206 /* ReturnStatement */: + case 177 /* ArrowFunction */: + case 207 /* ReturnStatement */: return getContextualTypeForReturnExpression(node); - case 186 /* YieldExpression */: + case 187 /* YieldExpression */: return getContextualTypeForYieldOperand(parent); - case 170 /* CallExpression */: - case 171 /* NewExpression */: + case 171 /* CallExpression */: + case 172 /* NewExpression */: return getContextualTypeForArgument(parent, node); - case 173 /* TypeAssertionExpression */: - case 191 /* AsExpression */: + case 174 /* TypeAssertionExpression */: + case 192 /* AsExpression */: return getTypeFromTypeNode(parent.type); - case 183 /* BinaryExpression */: + case 184 /* BinaryExpression */: return getContextualTypeForBinaryOperand(node); - case 247 /* PropertyAssignment */: + case 248 /* PropertyAssignment */: return getContextualTypeForObjectLiteralElement(parent); - case 166 /* ArrayLiteralExpression */: + case 167 /* ArrayLiteralExpression */: return getContextualTypeForElementExpression(node); - case 184 /* ConditionalExpression */: + case 185 /* ConditionalExpression */: return getContextualTypeForConditionalOperand(node); - case 192 /* TemplateSpan */: - ts.Debug.assert(parent.parent.kind === 185 /* TemplateExpression */); + case 193 /* TemplateSpan */: + ts.Debug.assert(parent.parent.kind === 186 /* TemplateExpression */); return getContextualTypeForSubstitutionExpression(parent.parent, node); - case 174 /* ParenthesizedExpression */: + case 175 /* ParenthesizedExpression */: return getContextualType(parent); - case 242 /* JsxExpression */: + case 243 /* JsxExpression */: return getContextualType(parent); - case 240 /* JsxAttribute */: - case 241 /* JsxSpreadAttribute */: + case 241 /* JsxAttribute */: + case 242 /* JsxSpreadAttribute */: return getContextualTypeForJsxAttribute(parent); } return undefined; @@ -21183,7 +21413,7 @@ var ts; } } function isFunctionExpressionOrArrowFunction(node) { - return node.kind === 175 /* FunctionExpression */ || node.kind === 176 /* ArrowFunction */; + return node.kind === 176 /* FunctionExpression */ || node.kind === 177 /* ArrowFunction */; } function getContextualSignatureForFunctionLikeDeclaration(node) { // Only function expressions, arrow functions, and object literal methods are contextually typed. @@ -21197,7 +21427,7 @@ var ts; // all identical ignoring their return type, the result is same signature but with return type as // union type of return types from these signatures function getContextualSignature(node) { - ts.Debug.assert(node.kind !== 143 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 144 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); var type = ts.isObjectLiteralMethod(node) ? getContextualTypeForObjectLiteralMethod(node) : getApparentTypeOfContextualType(node); @@ -21260,13 +21490,13 @@ var ts; // an assignment target. Examples include 'a = xxx', '{ p: a } = xxx', '[{ p: a}] = xxx'. function isAssignmentTarget(node) { var parent = node.parent; - if (parent.kind === 183 /* BinaryExpression */ && parent.operatorToken.kind === 56 /* EqualsToken */ && parent.left === node) { + if (parent.kind === 184 /* BinaryExpression */ && parent.operatorToken.kind === 56 /* EqualsToken */ && parent.left === node) { return true; } - if (parent.kind === 247 /* PropertyAssignment */) { + if (parent.kind === 248 /* PropertyAssignment */) { return isAssignmentTarget(parent.parent); } - if (parent.kind === 166 /* ArrayLiteralExpression */) { + if (parent.kind === 167 /* ArrayLiteralExpression */) { return isAssignmentTarget(parent); } return false; @@ -21282,8 +21512,8 @@ var ts; return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, /*allowStringInput*/ false); } function hasDefaultValue(node) { - return (node.kind === 165 /* BindingElement */ && !!node.initializer) || - (node.kind === 183 /* BinaryExpression */ && node.operatorToken.kind === 56 /* EqualsToken */); + return (node.kind === 166 /* BindingElement */ && !!node.initializer) || + (node.kind === 184 /* BinaryExpression */ && node.operatorToken.kind === 56 /* EqualsToken */); } function checkArrayLiteral(node, contextualMapper) { var elements = node.elements; @@ -21292,7 +21522,7 @@ var ts; var inDestructuringPattern = isAssignmentTarget(node); for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) { var e = elements_1[_i]; - if (inDestructuringPattern && e.kind === 187 /* SpreadElementExpression */) { + if (inDestructuringPattern && e.kind === 188 /* SpreadElementExpression */) { // Given the following situation: // var c: {}; // [...c] = ["", 0]; @@ -21316,7 +21546,7 @@ var ts; var type = checkExpression(e, contextualMapper); elementTypes.push(type); } - hasSpreadElement = hasSpreadElement || e.kind === 187 /* SpreadElementExpression */; + hasSpreadElement = hasSpreadElement || e.kind === 188 /* SpreadElementExpression */; } if (!hasSpreadElement) { // If array literal is actually a destructuring pattern, mark it as an implied type. We do this such @@ -21331,7 +21561,7 @@ var ts; var pattern = contextualType.pattern; // If array literal is contextually typed by a binding pattern or an assignment pattern, pad the resulting // tuple type with the corresponding binding or assignment element types to make the lengths equal. - if (pattern && (pattern.kind === 164 /* ArrayBindingPattern */ || pattern.kind === 166 /* ArrayLiteralExpression */)) { + if (pattern && (pattern.kind === 165 /* ArrayBindingPattern */ || pattern.kind === 167 /* ArrayLiteralExpression */)) { var patternElements = pattern.elements; for (var i = elementTypes.length; i < patternElements.length; i++) { var patternElement = patternElements[i]; @@ -21339,7 +21569,7 @@ var ts; elementTypes.push(contextualType.elementTypes[i]); } else { - if (patternElement.kind !== 189 /* OmittedExpression */) { + if (patternElement.kind !== 190 /* OmittedExpression */) { error(patternElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value); } elementTypes.push(unknownType); @@ -21354,7 +21584,7 @@ var ts; return createArrayType(elementTypes.length ? getUnionType(elementTypes) : undefinedType); } function isNumericName(name) { - return name.kind === 136 /* ComputedPropertyName */ ? isNumericComputedName(name) : isNumericLiteralName(name.text); + return name.kind === 137 /* ComputedPropertyName */ ? isNumericComputedName(name) : isNumericLiteralName(name.text); } function isNumericComputedName(name) { // It seems odd to consider an expression of type Any to result in a numeric name, @@ -21411,24 +21641,24 @@ var ts; var propertiesArray = []; var contextualType = getApparentTypeOfContextualType(node); var contextualTypeHasPattern = contextualType && contextualType.pattern && - (contextualType.pattern.kind === 163 /* ObjectBindingPattern */ || contextualType.pattern.kind === 167 /* ObjectLiteralExpression */); + (contextualType.pattern.kind === 164 /* ObjectBindingPattern */ || contextualType.pattern.kind === 168 /* ObjectLiteralExpression */); var typeFlags = 0; var patternWithComputedProperties = false; for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var memberDecl = _a[_i]; var member = memberDecl.symbol; - if (memberDecl.kind === 247 /* PropertyAssignment */ || - memberDecl.kind === 248 /* ShorthandPropertyAssignment */ || + if (memberDecl.kind === 248 /* PropertyAssignment */ || + memberDecl.kind === 249 /* ShorthandPropertyAssignment */ || ts.isObjectLiteralMethod(memberDecl)) { var type = void 0; - if (memberDecl.kind === 247 /* PropertyAssignment */) { + if (memberDecl.kind === 248 /* PropertyAssignment */) { type = checkPropertyAssignment(memberDecl, contextualMapper); } - else if (memberDecl.kind === 143 /* MethodDeclaration */) { + else if (memberDecl.kind === 144 /* MethodDeclaration */) { type = checkObjectLiteralMethod(memberDecl, contextualMapper); } else { - ts.Debug.assert(memberDecl.kind === 248 /* ShorthandPropertyAssignment */); + ts.Debug.assert(memberDecl.kind === 249 /* ShorthandPropertyAssignment */); type = checkExpression(memberDecl.name, contextualMapper); } typeFlags |= type.flags; @@ -21436,8 +21666,8 @@ var ts; if (inDestructuringPattern) { // If object literal is an assignment pattern and if the assignment pattern specifies a default value // for the property, make the property optional. - var isOptional = (memberDecl.kind === 247 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer)) || - (memberDecl.kind === 248 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer); + var isOptional = (memberDecl.kind === 248 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer)) || + (memberDecl.kind === 249 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer); if (isOptional) { prop.flags |= 536870912 /* Optional */; } @@ -21471,7 +21701,7 @@ var ts; // an ordinary function declaration(section 6.1) with no parameters. // A set accessor declaration is processed in the same manner // as an ordinary function declaration with a single parameter and a Void return type. - ts.Debug.assert(memberDecl.kind === 145 /* GetAccessor */ || memberDecl.kind === 146 /* SetAccessor */); + ts.Debug.assert(memberDecl.kind === 146 /* GetAccessor */ || memberDecl.kind === 147 /* SetAccessor */); checkAccessorDeclaration(memberDecl); } if (!ts.hasDynamicName(memberDecl)) { @@ -21538,13 +21768,13 @@ var ts; for (var _i = 0, _a = node.children; _i < _a.length; _i++) { var child = _a[_i]; switch (child.kind) { - case 242 /* JsxExpression */: + case 243 /* JsxExpression */: checkJsxExpression(child); break; - case 235 /* JsxElement */: + case 236 /* JsxElement */: checkJsxElement(child); break; - case 236 /* JsxSelfClosingElement */: + case 237 /* JsxSelfClosingElement */: checkJsxSelfClosingElement(child); break; } @@ -21562,7 +21792,7 @@ var ts; * Returns true iff React would emit this tag name as a string rather than an identifier or qualified name */ function isJsxIntrinsicIdentifier(tagName) { - if (tagName.kind === 135 /* QualifiedName */) { + if (tagName.kind === 136 /* QualifiedName */) { return false; } else { @@ -21672,6 +21902,7 @@ var ts; if (compilerOptions.noImplicitAny) { error(node, ts.Diagnostics.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists, JsxNames.IntrinsicElements); } + return unknownSymbol; } } function lookupClassTag(node) { @@ -21771,21 +22002,25 @@ var ts; if (links.jsxFlags & 4 /* ValueElement */) { // Get the element instance type (the result of newing or invoking this tag) var elemInstanceType = getJsxElementInstanceType(node); - // Is this is a stateless function component? See if its single signature is - // assignable to the JSX Element Type - var callSignature = getSingleCallSignature(getTypeOfSymbol(sym)); - var callReturnType = callSignature && getReturnTypeOfSignature(callSignature); - var paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0])); - if (callReturnType && isTypeAssignableTo(callReturnType, jsxElementType) && (paramType.flags & 80896 /* ObjectType */)) { - // Intersect in JSX.IntrinsicAttributes if it exists - var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes); - if (intrinsicAttributes !== unknownType) { - paramType = intersectTypes(intrinsicAttributes, paramType); + var elemClassType = getJsxGlobalElementClassType(); + if (!elemClassType || !isTypeAssignableTo(elemInstanceType, elemClassType)) { + // Is this is a stateless function component? See if its single signature's return type is + // assignable to the JSX Element Type + var elemType = getTypeOfSymbol(sym); + var callSignatures = elemType && getSignaturesOfType(elemType, 0 /* Call */); + var callSignature = callSignatures && callSignatures.length > 0 && callSignatures[0]; + var callReturnType = callSignature && getReturnTypeOfSignature(callSignature); + var paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0])); + if (callReturnType && isTypeAssignableTo(callReturnType, jsxElementType)) { + // Intersect in JSX.IntrinsicAttributes if it exists + var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes); + if (intrinsicAttributes !== unknownType) { + paramType = intersectTypes(intrinsicAttributes, paramType); + } + return links.resolvedJsxType = paramType; } - return paramType; } // Issue an error if this return type isn't assignable to JSX.ElementClass - var elemClassType = getJsxGlobalElementClassType(); if (elemClassType) { checkTypeRelatedTo(elemInstanceType, elemClassType, assignableRelation, node, ts.Diagnostics.JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements); } @@ -21902,11 +22137,11 @@ var ts; // thus should have their types ignored var sawSpreadedAny = false; for (var i = node.attributes.length - 1; i >= 0; i--) { - if (node.attributes[i].kind === 240 /* JsxAttribute */) { + if (node.attributes[i].kind === 241 /* JsxAttribute */) { checkJsxAttribute((node.attributes[i]), targetAttributesType, nameTable); } else { - ts.Debug.assert(node.attributes[i].kind === 241 /* JsxSpreadAttribute */); + ts.Debug.assert(node.attributes[i].kind === 242 /* JsxSpreadAttribute */); var spreadType = checkJsxSpreadAttribute((node.attributes[i]), targetAttributesType, nameTable); if (isTypeAny(spreadType)) { sawSpreadedAny = true; @@ -21936,7 +22171,7 @@ var ts; // If a symbol is a synthesized symbol with no value declaration, we assume it is a property. Example of this are the synthesized // '.prototype' property as well as synthesized tuple index properties. function getDeclarationKindFromSymbol(s) { - return s.valueDeclaration ? s.valueDeclaration.kind : 141 /* PropertyDeclaration */; + return s.valueDeclaration ? s.valueDeclaration.kind : 142 /* PropertyDeclaration */; } function getDeclarationFlagsFromSymbol(s) { return s.valueDeclaration ? ts.getCombinedNodeFlags(s.valueDeclaration) : s.flags & 134217728 /* Prototype */ ? 8 /* Public */ | 64 /* Static */ : 0; @@ -21953,7 +22188,7 @@ var ts; var flags = getDeclarationFlagsFromSymbol(prop); var declaringClass = getDeclaredTypeOfSymbol(prop.parent); if (left.kind === 95 /* SuperKeyword */) { - var errorNode = node.kind === 168 /* PropertyAccessExpression */ ? + var errorNode = node.kind === 169 /* PropertyAccessExpression */ ? node.name : node.right; // TS 1.0 spec (April 2014): 4.8.2 @@ -21963,7 +22198,7 @@ var ts; // - In a static member function or static member accessor // where this references the constructor function object of a derived class, // a super property access is permitted and must specify a public static member function of the base class. - if (languageVersion < 2 /* ES6 */ && getDeclarationKindFromSymbol(prop) !== 143 /* MethodDeclaration */) { + if (languageVersion < 2 /* ES6 */ && getDeclarationKindFromSymbol(prop) !== 144 /* MethodDeclaration */) { // `prop` refers to a *property* declared in the super class // rather than a *method*, so it does not satisfy the above criteria. error(errorNode, ts.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword); @@ -22050,7 +22285,7 @@ var ts; return getTypeOfSymbol(prop); } function isValidPropertyAccess(node, propertyName) { - var left = node.kind === 168 /* PropertyAccessExpression */ + var left = node.kind === 169 /* PropertyAccessExpression */ ? node.expression : node.left; var type = checkExpression(left); @@ -22062,11 +22297,58 @@ var ts; } return true; } + /** + * Return the symbol of the for-in variable declared or referenced by the given for-in statement. + */ + function getForInVariableSymbol(node) { + var initializer = node.initializer; + if (initializer.kind === 215 /* VariableDeclarationList */) { + var variable = initializer.declarations[0]; + if (variable && !ts.isBindingPattern(variable.name)) { + return getSymbolOfNode(variable); + } + } + else if (initializer.kind === 69 /* Identifier */) { + return getResolvedSymbol(initializer); + } + return undefined; + } + /** + * Return true if the given type is considered to have numeric property names. + */ + function hasNumericPropertyNames(type) { + return getIndexTypeOfType(type, 1 /* Number */) && !getIndexTypeOfType(type, 0 /* String */); + } + /** + * Return true if given node is an expression consisting of an identifier (possibly parenthesized) + * that references a for-in variable for an object with numeric property names. + */ + function isForInVariableForNumericPropertyNames(expr) { + var e = skipParenthesizedNodes(expr); + if (e.kind === 69 /* Identifier */) { + var symbol = getResolvedSymbol(e); + if (symbol.flags & 3 /* Variable */) { + var child = expr; + var node = expr.parent; + while (node) { + if (node.kind === 203 /* ForInStatement */ && + child === node.statement && + getForInVariableSymbol(node) === symbol && + hasNumericPropertyNames(checkExpression(node.expression))) { + return true; + } + child = node; + node = node.parent; + } + } + } + return false; + } function checkIndexedAccess(node) { // Grammar checking if (!node.argumentExpression) { - var sourceFile = getSourceFile(node); - if (node.parent.kind === 171 /* NewExpression */ && node.parent.expression === node) { + var sourceFile = ts.getSourceFileOfNode(node); + if (node.parent.kind === 172 /* NewExpression */ && node.parent.expression === node) { var start = ts.skipTrivia(sourceFile.text, node.expression.end); var end = node.end; grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead); @@ -22115,7 +22397,7 @@ var ts; // Check for compatible indexer types. if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 258 /* StringLike */ | 132 /* NumberLike */ | 16777216 /* ESSymbol */)) { // Try to use a number indexer. - if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 132 /* NumberLike */)) { + if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 132 /* NumberLike */) || isForInVariableForNumericPropertyNames(node.argumentExpression)) { var numberIndexType = getIndexTypeOfType(objectType, 1 /* Number */); if (numberIndexType) { return numberIndexType; @@ -22128,7 +22410,9 @@ var ts; } // Fall back to any. if (compilerOptions.noImplicitAny && !compilerOptions.suppressImplicitAnyIndexErrors && !isTypeAny(objectType)) { - error(node, ts.Diagnostics.Index_signature_of_object_type_implicitly_has_an_any_type); + error(node, getIndexTypeOfType(objectType, 1 /* Number */) ? + ts.Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number : + ts.Diagnostics.Index_signature_of_object_type_implicitly_has_an_any_type); } return anyType; } @@ -22147,7 +22431,7 @@ var ts; if (indexArgumentExpression.kind === 9 /* StringLiteral */ || indexArgumentExpression.kind === 8 /* NumericLiteral */) { return indexArgumentExpression.text; } - if (indexArgumentExpression.kind === 169 /* ElementAccessExpression */ || indexArgumentExpression.kind === 168 /* PropertyAccessExpression */) { + if (indexArgumentExpression.kind === 170 /* ElementAccessExpression */ || indexArgumentExpression.kind === 169 /* PropertyAccessExpression */) { var value = getConstantValue(indexArgumentExpression); if (value !== undefined) { return value.toString(); @@ -22202,10 +22486,10 @@ var ts; return true; } function resolveUntypedCall(node) { - if (node.kind === 172 /* TaggedTemplateExpression */) { + if (node.kind === 173 /* TaggedTemplateExpression */) { checkExpression(node.template); } - else if (node.kind !== 139 /* Decorator */) { + else if (node.kind !== 140 /* Decorator */) { ts.forEach(node.arguments, function (argument) { checkExpression(argument); }); @@ -22271,7 +22555,7 @@ var ts; function getSpreadArgumentIndex(args) { for (var i = 0; i < args.length; i++) { var arg = args[i]; - if (arg && arg.kind === 187 /* SpreadElementExpression */) { + if (arg && arg.kind === 188 /* SpreadElementExpression */) { return i; } } @@ -22283,13 +22567,13 @@ var ts; var callIsIncomplete; // In incomplete call we want to be lenient when we have too few arguments var isDecorator; var spreadArgIndex = -1; - if (node.kind === 172 /* TaggedTemplateExpression */) { + if (node.kind === 173 /* TaggedTemplateExpression */) { var tagExpression = node; // Even if the call is incomplete, we'll have a missing expression as our last argument, // so we can say the count is just the arg list length adjustedArgCount = args.length; typeArguments = undefined; - if (tagExpression.template.kind === 185 /* TemplateExpression */) { + if (tagExpression.template.kind === 186 /* TemplateExpression */) { // If a tagged template expression lacks a tail literal, the call is incomplete. // Specifically, a template only can end in a TemplateTail or a Missing literal. var templateExpression = tagExpression.template; @@ -22306,7 +22590,7 @@ var ts; callIsIncomplete = !!templateLiteral.isUnterminated; } } - else if (node.kind === 139 /* Decorator */) { + else if (node.kind === 140 /* Decorator */) { isDecorator = true; typeArguments = undefined; adjustedArgCount = getEffectiveArgumentCount(node, /*args*/ undefined, signature); @@ -22315,7 +22599,7 @@ var ts; var callExpression = node; if (!callExpression.arguments) { // This only happens when we have something of the form: 'new C' - ts.Debug.assert(callExpression.kind === 171 /* NewExpression */); + ts.Debug.assert(callExpression.kind === 172 /* NewExpression */); return signature.minArgumentCount === 0; } // For IDE scenarios we may have an incomplete call, so a trailing comma is tantamount to adding another argument. @@ -22394,7 +22678,7 @@ var ts; for (var i = 0; i < argCount; i++) { var arg = getEffectiveArgument(node, args, i); // If the effective argument is 'undefined', then it is an argument that is present but is synthetic. - if (arg === undefined || arg.kind !== 189 /* OmittedExpression */) { + if (arg === undefined || arg.kind !== 190 /* OmittedExpression */) { var paramType = getTypeAtPosition(signature, i); var argType = getEffectiveArgumentType(node, i, arg); // If the effective argument type is 'undefined', there is no synthetic type @@ -22454,7 +22738,7 @@ var ts; for (var i = 0; i < argCount; i++) { var arg = getEffectiveArgument(node, args, i); // If the effective argument is 'undefined', then it is an argument that is present but is synthetic. - if (arg === undefined || arg.kind !== 189 /* OmittedExpression */) { + if (arg === undefined || arg.kind !== 190 /* OmittedExpression */) { // Check spread elements against rest type (from arity check we know spread argument corresponds to a rest parameter) var paramType = getTypeAtPosition(signature, i); var argType = getEffectiveArgumentType(node, i, arg); @@ -22486,16 +22770,16 @@ var ts; */ function getEffectiveCallArguments(node) { var args; - if (node.kind === 172 /* TaggedTemplateExpression */) { + if (node.kind === 173 /* TaggedTemplateExpression */) { var template = node.template; args = [undefined]; - if (template.kind === 185 /* TemplateExpression */) { + if (template.kind === 186 /* TemplateExpression */) { ts.forEach(template.templateSpans, function (span) { args.push(span.expression); }); } } - else if (node.kind === 139 /* Decorator */) { + else if (node.kind === 140 /* Decorator */) { // For a decorator, we return undefined as we will determine // the number and types of arguments for a decorator using // `getEffectiveArgumentCount` and `getEffectiveArgumentType` below. @@ -22520,19 +22804,19 @@ var ts; * Otherwise, the argument count is the length of the 'args' array. */ function getEffectiveArgumentCount(node, args, signature) { - if (node.kind === 139 /* Decorator */) { + if (node.kind === 140 /* Decorator */) { switch (node.parent.kind) { - case 216 /* ClassDeclaration */: - case 188 /* ClassExpression */: + case 217 /* ClassDeclaration */: + case 189 /* ClassExpression */: // A class decorator will have one argument (see `ClassDecorator` in core.d.ts) return 1; - case 141 /* PropertyDeclaration */: + case 142 /* PropertyDeclaration */: // A property declaration decorator will have two arguments (see // `PropertyDecorator` in core.d.ts) return 2; - case 143 /* MethodDeclaration */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: + case 144 /* MethodDeclaration */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: // A method or accessor declaration decorator will have two or three arguments (see // `PropertyDecorator` and `MethodDecorator` in core.d.ts) // If we are emitting decorators for ES3, we will only pass two arguments. @@ -22542,7 +22826,7 @@ var ts; // If the method decorator signature only accepts a target and a key, we will only // type check those arguments. return signature.parameters.length >= 3 ? 3 : 2; - case 138 /* Parameter */: + case 139 /* Parameter */: // A parameter declaration decorator will have three arguments (see // `ParameterDecorator` in core.d.ts) return 3; @@ -22566,25 +22850,25 @@ var ts; */ function getEffectiveDecoratorFirstArgumentType(node) { // The first argument to a decorator is its `target`. - if (node.kind === 216 /* ClassDeclaration */) { + if (node.kind === 217 /* ClassDeclaration */) { // For a class decorator, the `target` is the type of the class (e.g. the // "static" or "constructor" side of the class) var classSymbol = getSymbolOfNode(node); return getTypeOfSymbol(classSymbol); } - if (node.kind === 138 /* Parameter */) { + if (node.kind === 139 /* Parameter */) { // For a parameter decorator, the `target` is the parent type of the // parameter's containing method. node = node.parent; - if (node.kind === 144 /* Constructor */) { + if (node.kind === 145 /* Constructor */) { var classSymbol = getSymbolOfNode(node); return getTypeOfSymbol(classSymbol); } } - if (node.kind === 141 /* PropertyDeclaration */ || - node.kind === 143 /* MethodDeclaration */ || - node.kind === 145 /* GetAccessor */ || - node.kind === 146 /* SetAccessor */) { + if (node.kind === 142 /* PropertyDeclaration */ || + node.kind === 144 /* MethodDeclaration */ || + node.kind === 146 /* GetAccessor */ || + node.kind === 147 /* SetAccessor */) { // For a property or method decorator, the `target` is the // "static"-side type of the parent of the member if the member is // declared "static"; otherwise, it is the "instance"-side type of the @@ -22611,21 +22895,21 @@ var ts; */ function getEffectiveDecoratorSecondArgumentType(node) { // The second argument to a decorator is its `propertyKey` - if (node.kind === 216 /* ClassDeclaration */) { + if (node.kind === 217 /* ClassDeclaration */) { ts.Debug.fail("Class decorators should not have a second synthetic argument."); return unknownType; } - if (node.kind === 138 /* Parameter */) { + if (node.kind === 139 /* Parameter */) { node = node.parent; - if (node.kind === 144 /* Constructor */) { + if (node.kind === 145 /* Constructor */) { // For a constructor parameter decorator, the `propertyKey` will be `undefined`. return anyType; } } - if (node.kind === 141 /* PropertyDeclaration */ || - node.kind === 143 /* MethodDeclaration */ || - node.kind === 145 /* GetAccessor */ || - node.kind === 146 /* SetAccessor */) { + if (node.kind === 142 /* PropertyDeclaration */ || + node.kind === 144 /* MethodDeclaration */ || + node.kind === 146 /* GetAccessor */ || + node.kind === 147 /* SetAccessor */) { // The `propertyKey` for a property or method decorator will be a // string literal type if the member name is an identifier, number, or string; // otherwise, if the member name is a computed property name it will @@ -22636,7 +22920,7 @@ var ts; case 8 /* NumericLiteral */: case 9 /* StringLiteral */: return getStringLiteralTypeForText(element.name.text); - case 136 /* ComputedPropertyName */: + case 137 /* ComputedPropertyName */: var nameType = checkComputedPropertyName(element.name); if (allConstituentTypesHaveKind(nameType, 16777216 /* ESSymbol */)) { return nameType; @@ -22662,21 +22946,21 @@ var ts; function getEffectiveDecoratorThirdArgumentType(node) { // The third argument to a decorator is either its `descriptor` for a method decorator // or its `parameterIndex` for a paramter decorator - if (node.kind === 216 /* ClassDeclaration */) { + if (node.kind === 217 /* ClassDeclaration */) { ts.Debug.fail("Class decorators should not have a third synthetic argument."); return unknownType; } - if (node.kind === 138 /* Parameter */) { + if (node.kind === 139 /* Parameter */) { // The `parameterIndex` for a parameter decorator is always a number return numberType; } - if (node.kind === 141 /* PropertyDeclaration */) { + if (node.kind === 142 /* PropertyDeclaration */) { ts.Debug.fail("Property decorators should not have a third synthetic argument."); return unknownType; } - if (node.kind === 143 /* MethodDeclaration */ || - node.kind === 145 /* GetAccessor */ || - node.kind === 146 /* SetAccessor */) { + if (node.kind === 144 /* MethodDeclaration */ || + node.kind === 146 /* GetAccessor */ || + node.kind === 147 /* SetAccessor */) { // The `descriptor` for a method decorator will be a `TypedPropertyDescriptor` // for the type of the member. var propertyType = getTypeOfNode(node); @@ -22708,10 +22992,10 @@ var ts; // Decorators provide special arguments, a tagged template expression provides // a special first argument, and string literals get string literal types // unless we're reporting errors - if (node.kind === 139 /* Decorator */) { + if (node.kind === 140 /* Decorator */) { return getEffectiveDecoratorArgumentType(node, argIndex); } - else if (argIndex === 0 && node.kind === 172 /* TaggedTemplateExpression */) { + else if (argIndex === 0 && node.kind === 173 /* TaggedTemplateExpression */) { return globalTemplateStringsArrayType; } // This is not a synthetic argument, so we return 'undefined' @@ -22723,8 +23007,8 @@ var ts; */ function getEffectiveArgument(node, args, argIndex) { // For a decorator or the first argument of a tagged template expression we return undefined. - if (node.kind === 139 /* Decorator */ || - (argIndex === 0 && node.kind === 172 /* TaggedTemplateExpression */)) { + if (node.kind === 140 /* Decorator */ || + (argIndex === 0 && node.kind === 173 /* TaggedTemplateExpression */)) { return undefined; } return args[argIndex]; @@ -22733,11 +23017,11 @@ var ts; * Gets the error node to use when reporting errors for an effective argument. */ function getEffectiveArgumentErrorNode(node, argIndex, arg) { - if (node.kind === 139 /* Decorator */) { + if (node.kind === 140 /* Decorator */) { // For a decorator, we use the expression of the decorator for error reporting. return node.expression; } - else if (argIndex === 0 && node.kind === 172 /* TaggedTemplateExpression */) { + else if (argIndex === 0 && node.kind === 173 /* TaggedTemplateExpression */) { // For a the first argument of a tagged template expression, we use the template of the tag for error reporting. return node.template; } @@ -22746,8 +23030,8 @@ var ts; } } function resolveCall(node, signatures, candidatesOutArray, headMessage) { - var isTaggedTemplate = node.kind === 172 /* TaggedTemplateExpression */; - var isDecorator = node.kind === 139 /* Decorator */; + var isTaggedTemplate = node.kind === 173 /* TaggedTemplateExpression */; + var isDecorator = node.kind === 140 /* Decorator */; var typeArguments; if (!isTaggedTemplate && !isDecorator) { typeArguments = node.typeArguments; @@ -23093,16 +23377,16 @@ var ts; */ function getDiagnosticHeadMessageForDecoratorResolution(node) { switch (node.parent.kind) { - case 216 /* ClassDeclaration */: - case 188 /* ClassExpression */: + case 217 /* ClassDeclaration */: + case 189 /* ClassExpression */: return ts.Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression; - case 138 /* Parameter */: + case 139 /* Parameter */: return ts.Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression; - case 141 /* PropertyDeclaration */: + case 142 /* PropertyDeclaration */: return ts.Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression; - case 143 /* MethodDeclaration */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: + case 144 /* MethodDeclaration */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: return ts.Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression; } } @@ -23139,16 +23423,16 @@ var ts; // to correctly fill the candidatesOutArray. if (!links.resolvedSignature || candidatesOutArray) { links.resolvedSignature = anySignature; - if (node.kind === 170 /* CallExpression */) { + if (node.kind === 171 /* CallExpression */) { links.resolvedSignature = resolveCallExpression(node, candidatesOutArray); } - else if (node.kind === 171 /* NewExpression */) { + else if (node.kind === 172 /* NewExpression */) { links.resolvedSignature = resolveNewExpression(node, candidatesOutArray); } - else if (node.kind === 172 /* TaggedTemplateExpression */) { + else if (node.kind === 173 /* TaggedTemplateExpression */) { links.resolvedSignature = resolveTaggedTemplateExpression(node, candidatesOutArray); } - else if (node.kind === 139 /* Decorator */) { + else if (node.kind === 140 /* Decorator */) { links.resolvedSignature = resolveDecorator(node, candidatesOutArray); } else { @@ -23176,12 +23460,12 @@ var ts; if (node.expression.kind === 95 /* SuperKeyword */) { return voidType; } - if (node.kind === 171 /* NewExpression */) { + if (node.kind === 172 /* NewExpression */) { var declaration = signature.declaration; if (declaration && - declaration.kind !== 144 /* Constructor */ && - declaration.kind !== 148 /* ConstructSignature */ && - declaration.kind !== 153 /* ConstructorType */) { + declaration.kind !== 145 /* Constructor */ && + declaration.kind !== 149 /* ConstructSignature */ && + declaration.kind !== 154 /* ConstructorType */) { // When resolved signature is a call signature (and not a construct signature) the result type is any, unless // the declaring function had members created through 'x.prototype.y = expr' or 'this.y = expr' psuedodeclarations // in a JS file @@ -23242,7 +23526,7 @@ var ts; if (ts.isBindingPattern(node.name)) { for (var _i = 0, _a = node.name.elements; _i < _a.length; _i++) { var element = _a[_i]; - if (element.kind !== 189 /* OmittedExpression */) { + if (element.kind !== 190 /* OmittedExpression */) { if (element.name.kind === 69 /* Identifier */) { getSymbolLinks(getSymbolOfNode(element)).type = getTypeForBindingElement(element); } @@ -23307,7 +23591,7 @@ var ts; } var isAsync = ts.isAsyncFunctionLike(func); var type; - if (func.body.kind !== 194 /* Block */) { + if (func.body.kind !== 195 /* Block */) { type = checkExpressionCached(func.body, contextualMapper); if (isAsync) { // From within an async function you can return either a non-promise value or a promise. Any @@ -23437,7 +23721,7 @@ var ts; } // If all we have is a function signature, or an arrow function with an expression body, then there is nothing to check. // also if HasImplicitReturn flag is not set this means that all codepaths in function body end with return or throw - if (ts.nodeIsMissing(func.body) || func.body.kind !== 194 /* Block */ || !(func.flags & 524288 /* HasImplicitReturn */)) { + if (ts.nodeIsMissing(func.body) || func.body.kind !== 195 /* Block */ || !(func.flags & 524288 /* HasImplicitReturn */)) { return; } var hasExplicitReturn = func.flags & 1048576 /* HasExplicitReturn */; @@ -23463,20 +23747,16 @@ var ts; } } function checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper) { - ts.Debug.assert(node.kind !== 143 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 144 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); // Grammar checking var hasGrammarError = checkGrammarFunctionLikeDeclaration(node); - if (!hasGrammarError && node.kind === 175 /* FunctionExpression */) { + if (!hasGrammarError && node.kind === 176 /* FunctionExpression */) { checkGrammarForGenerator(node); } // The identityMapper object is used to indicate that function expressions are wildcards if (contextualMapper === identityMapper && isContextSensitive(node)) { return anyFunctionType; } - var isAsync = ts.isAsyncFunctionLike(node); - if (isAsync) { - emitAwaiter = true; - } var links = getNodeLinks(node); var type = getTypeOfSymbol(node.symbol); var contextSensitive = isContextSensitive(node); @@ -23510,18 +23790,15 @@ var ts; } } } - if (produceDiagnostics && node.kind !== 143 /* MethodDeclaration */ && node.kind !== 142 /* MethodSignature */) { + if (produceDiagnostics && node.kind !== 144 /* MethodDeclaration */ && node.kind !== 143 /* MethodSignature */) { checkCollisionWithCapturedSuperVariable(node, node.name); checkCollisionWithCapturedThisVariable(node, node.name); } return type; } function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) { - ts.Debug.assert(node.kind !== 143 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 144 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); var isAsync = ts.isAsyncFunctionLike(node); - if (isAsync) { - emitAwaiter = true; - } var returnOrPromisedType = node.type && (isAsync ? checkAsyncFunctionReturnType(node) : getTypeFromTypeNode(node.type)); if (!node.asteriskToken) { // return is not necessary in the body of generators @@ -23536,7 +23813,7 @@ var ts; // checkFunctionExpressionBodies). So it must be done now. getReturnTypeOfSignature(getSignatureFromDeclaration(node)); } - if (node.body.kind === 194 /* Block */) { + if (node.body.kind === 195 /* Block */) { checkSourceElement(node.body); } else { @@ -23588,17 +23865,17 @@ var ts; // An identifier expression that references any other kind of entity is classified as a value(and therefore cannot be the target of an assignment). return !symbol || symbol === unknownSymbol || symbol === argumentsSymbol || (symbol.flags & 3 /* Variable */) !== 0; } - case 168 /* PropertyAccessExpression */: { + case 169 /* PropertyAccessExpression */: { var symbol = findSymbol(n); // TypeScript 1.0 spec (April 2014): 4.10 // A property access expression is always classified as a reference. // NOTE (not in spec): assignment to enum members should not be allowed return !symbol || symbol === unknownSymbol || (symbol.flags & ~8 /* EnumMember */) !== 0; } - case 169 /* ElementAccessExpression */: + case 170 /* ElementAccessExpression */: // old compiler doesn't check indexed access return true; - case 174 /* ParenthesizedExpression */: + case 175 /* ParenthesizedExpression */: return isReferenceOrErrorExpression(n.expression); default: return false; @@ -23607,11 +23884,11 @@ var ts; function isConstVariableReference(n) { switch (n.kind) { case 69 /* Identifier */: - case 168 /* PropertyAccessExpression */: { + case 169 /* PropertyAccessExpression */: { var symbol = findSymbol(n); return symbol && (symbol.flags & 3 /* Variable */) !== 0 && (getDeclarationFlagsFromSymbol(symbol) & 16384 /* Const */) !== 0; } - case 169 /* ElementAccessExpression */: { + case 170 /* ElementAccessExpression */: { var index = n.argumentExpression; var symbol = findSymbol(n.expression); if (symbol && index && index.kind === 9 /* StringLiteral */) { @@ -23621,7 +23898,7 @@ var ts; } return false; } - case 174 /* ParenthesizedExpression */: + case 175 /* ParenthesizedExpression */: return isConstVariableReference(n.expression); default: return false; @@ -23767,9 +24044,9 @@ var ts; var properties = node.properties; for (var _i = 0, properties_3 = properties; _i < properties_3.length; _i++) { var p = properties_3[_i]; - if (p.kind === 247 /* PropertyAssignment */ || p.kind === 248 /* ShorthandPropertyAssignment */) { + if (p.kind === 248 /* PropertyAssignment */ || p.kind === 249 /* ShorthandPropertyAssignment */) { var name_13 = p.name; - if (name_13.kind === 136 /* ComputedPropertyName */) { + if (name_13.kind === 137 /* ComputedPropertyName */) { checkComputedPropertyName(name_13); } if (isComputedNonLiteralName(name_13)) { @@ -23782,7 +24059,7 @@ var ts; isNumericLiteralName(text) && getIndexTypeOfType(sourceType, 1 /* Number */) || getIndexTypeOfType(sourceType, 0 /* String */); if (type) { - if (p.kind === 248 /* ShorthandPropertyAssignment */) { + if (p.kind === 249 /* ShorthandPropertyAssignment */) { checkDestructuringAssignment(p, type); } else { @@ -23808,8 +24085,8 @@ var ts; var elements = node.elements; for (var i = 0; i < elements.length; i++) { var e = elements[i]; - if (e.kind !== 189 /* OmittedExpression */) { - if (e.kind !== 187 /* SpreadElementExpression */) { + if (e.kind !== 190 /* OmittedExpression */) { + if (e.kind !== 188 /* SpreadElementExpression */) { var propName = "" + i; var type = isTypeAny(sourceType) ? sourceType @@ -23834,7 +24111,7 @@ var ts; } else { var restExpression = e.expression; - if (restExpression.kind === 183 /* BinaryExpression */ && restExpression.operatorToken.kind === 56 /* EqualsToken */) { + if (restExpression.kind === 184 /* BinaryExpression */ && restExpression.operatorToken.kind === 56 /* EqualsToken */) { error(restExpression.operatorToken, ts.Diagnostics.A_rest_element_cannot_have_an_initializer); } else { @@ -23848,7 +24125,7 @@ var ts; } function checkDestructuringAssignment(exprOrAssignment, sourceType, contextualMapper) { var target; - if (exprOrAssignment.kind === 248 /* ShorthandPropertyAssignment */) { + if (exprOrAssignment.kind === 249 /* ShorthandPropertyAssignment */) { var prop = exprOrAssignment; if (prop.objectAssignmentInitializer) { checkBinaryLikeExpression(prop.name, prop.equalsToken, prop.objectAssignmentInitializer, contextualMapper); @@ -23858,14 +24135,14 @@ var ts; else { target = exprOrAssignment; } - if (target.kind === 183 /* BinaryExpression */ && target.operatorToken.kind === 56 /* EqualsToken */) { + if (target.kind === 184 /* BinaryExpression */ && target.operatorToken.kind === 56 /* EqualsToken */) { checkBinaryExpression(target, contextualMapper); target = target.left; } - if (target.kind === 167 /* ObjectLiteralExpression */) { + if (target.kind === 168 /* ObjectLiteralExpression */) { return checkObjectLiteralAssignment(target, sourceType, contextualMapper); } - if (target.kind === 166 /* ArrayLiteralExpression */) { + if (target.kind === 167 /* ArrayLiteralExpression */) { return checkArrayLiteralAssignment(target, sourceType, contextualMapper); } return checkReferenceAssignment(target, sourceType, contextualMapper); @@ -23882,7 +24159,7 @@ var ts; } function checkBinaryLikeExpression(left, operatorToken, right, contextualMapper, errorNode) { var operator = operatorToken.kind; - if (operator === 56 /* EqualsToken */ && (left.kind === 167 /* ObjectLiteralExpression */ || left.kind === 166 /* ArrayLiteralExpression */)) { + if (operator === 56 /* EqualsToken */ && (left.kind === 168 /* ObjectLiteralExpression */ || left.kind === 167 /* ArrayLiteralExpression */)) { return checkDestructuringAssignment(left, checkExpression(right, contextualMapper), contextualMapper); } var leftType = checkExpression(left, contextualMapper); @@ -24151,7 +24428,7 @@ var ts; // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including // well known symbols. - if (node.name.kind === 136 /* ComputedPropertyName */) { + if (node.name.kind === 137 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } return checkExpression(node.initializer, contextualMapper); @@ -24162,7 +24439,7 @@ var ts; // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including // well known symbols. - if (node.name.kind === 136 /* ComputedPropertyName */) { + if (node.name.kind === 137 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } var uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper); @@ -24192,7 +24469,7 @@ var ts; // contextually typed function and arrow expressions in the initial phase. function checkExpression(node, contextualMapper) { var type; - if (node.kind === 135 /* QualifiedName */) { + if (node.kind === 136 /* QualifiedName */) { type = checkQualifiedName(node); } else { @@ -24204,9 +24481,9 @@ var ts; // - 'left' in property access // - 'object' in indexed access // - target in rhs of import statement - var ok = (node.parent.kind === 168 /* PropertyAccessExpression */ && node.parent.expression === node) || - (node.parent.kind === 169 /* ElementAccessExpression */ && node.parent.expression === node) || - ((node.kind === 69 /* Identifier */ || node.kind === 135 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node)); + var ok = (node.parent.kind === 169 /* PropertyAccessExpression */ && node.parent.expression === node) || + (node.parent.kind === 170 /* ElementAccessExpression */ && node.parent.expression === node) || + ((node.kind === 69 /* Identifier */ || node.kind === 136 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node)); if (!ok) { error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment); } @@ -24233,7 +24510,7 @@ var ts; return booleanType; case 8 /* NumericLiteral */: return checkNumericLiteral(node); - case 185 /* TemplateExpression */: + case 186 /* TemplateExpression */: return checkTemplateExpression(node); case 9 /* StringLiteral */: return checkStringLiteralExpression(node); @@ -24241,58 +24518,58 @@ var ts; return stringType; case 10 /* RegularExpressionLiteral */: return globalRegExpType; - case 166 /* ArrayLiteralExpression */: + case 167 /* ArrayLiteralExpression */: return checkArrayLiteral(node, contextualMapper); - case 167 /* ObjectLiteralExpression */: + case 168 /* ObjectLiteralExpression */: return checkObjectLiteral(node, contextualMapper); - case 168 /* PropertyAccessExpression */: + case 169 /* PropertyAccessExpression */: return checkPropertyAccessExpression(node); - case 169 /* ElementAccessExpression */: + case 170 /* ElementAccessExpression */: return checkIndexedAccess(node); - case 170 /* CallExpression */: - case 171 /* NewExpression */: + case 171 /* CallExpression */: + case 172 /* NewExpression */: return checkCallExpression(node); - case 172 /* TaggedTemplateExpression */: + case 173 /* TaggedTemplateExpression */: return checkTaggedTemplateExpression(node); - case 174 /* ParenthesizedExpression */: + case 175 /* ParenthesizedExpression */: return checkExpression(node.expression, contextualMapper); - case 188 /* ClassExpression */: + case 189 /* ClassExpression */: return checkClassExpression(node); - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: return checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper); - case 178 /* TypeOfExpression */: + case 179 /* TypeOfExpression */: return checkTypeOfExpression(node); - case 173 /* TypeAssertionExpression */: - case 191 /* AsExpression */: + case 174 /* TypeAssertionExpression */: + case 192 /* AsExpression */: return checkAssertion(node); - case 177 /* DeleteExpression */: + case 178 /* DeleteExpression */: return checkDeleteExpression(node); - case 179 /* VoidExpression */: + case 180 /* VoidExpression */: return checkVoidExpression(node); - case 180 /* AwaitExpression */: + case 181 /* AwaitExpression */: return checkAwaitExpression(node); - case 181 /* PrefixUnaryExpression */: + case 182 /* PrefixUnaryExpression */: return checkPrefixUnaryExpression(node); - case 182 /* PostfixUnaryExpression */: + case 183 /* PostfixUnaryExpression */: return checkPostfixUnaryExpression(node); - case 183 /* BinaryExpression */: + case 184 /* BinaryExpression */: return checkBinaryExpression(node, contextualMapper); - case 184 /* ConditionalExpression */: + case 185 /* ConditionalExpression */: return checkConditionalExpression(node, contextualMapper); - case 187 /* SpreadElementExpression */: + case 188 /* SpreadElementExpression */: return checkSpreadElementExpression(node, contextualMapper); - case 189 /* OmittedExpression */: + case 190 /* OmittedExpression */: return undefinedType; - case 186 /* YieldExpression */: + case 187 /* YieldExpression */: return checkYieldExpression(node); - case 242 /* JsxExpression */: + case 243 /* JsxExpression */: return checkJsxExpression(node); - case 235 /* JsxElement */: + case 236 /* JsxElement */: return checkJsxElement(node); - case 236 /* JsxSelfClosingElement */: + case 237 /* JsxSelfClosingElement */: return checkJsxSelfClosingElement(node); - case 237 /* JsxOpeningElement */: + case 238 /* JsxOpeningElement */: ts.Debug.fail("Shouldn't ever directly check a JsxOpeningElement"); } return unknownType; @@ -24320,7 +24597,7 @@ var ts; var func = ts.getContainingFunction(node); if (node.flags & 56 /* AccessibilityModifier */) { func = ts.getContainingFunction(node); - if (!(func.kind === 144 /* Constructor */ && ts.nodeIsPresent(func.body))) { + if (!(func.kind === 145 /* Constructor */ && ts.nodeIsPresent(func.body))) { error(node, ts.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } } @@ -24337,9 +24614,9 @@ var ts; if (!node.asteriskToken || !node.body) { return false; } - return node.kind === 143 /* MethodDeclaration */ || - node.kind === 215 /* FunctionDeclaration */ || - node.kind === 175 /* FunctionExpression */; + return node.kind === 144 /* MethodDeclaration */ || + node.kind === 216 /* FunctionDeclaration */ || + node.kind === 176 /* FunctionExpression */; } function getTypePredicateParameterIndex(parameterList, parameter) { if (parameterList) { @@ -24353,105 +24630,98 @@ var ts; } return -1; } - function isInLegalParameterTypePredicatePosition(node) { - switch (node.parent.kind) { - case 176 /* ArrowFunction */: - case 147 /* CallSignature */: - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 152 /* FunctionType */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - return node === node.parent.type; + function checkTypePredicate(node) { + var parent = getTypePredicateParent(node); + if (!parent) { + return; + } + var returnType = getReturnTypeOfSignature(getSignatureFromDeclaration(parent)); + if (!returnType || !(returnType.flags & 134217728 /* PredicateType */)) { + return; + } + var parameterName = node.parameterName; + if (parameterName.kind === 162 /* ThisType */) { + getTypeFromThisTypeNode(parameterName); + } + else { + var typePredicate = returnType.predicate; + if (typePredicate.parameterIndex >= 0) { + if (parent.parameters[typePredicate.parameterIndex].dotDotDotToken) { + error(parameterName, ts.Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); + } + else { + checkTypeAssignableTo(typePredicate.type, getTypeOfNode(parent.parameters[typePredicate.parameterIndex]), node.type); + } + } + else if (parameterName) { + var hasReportedError = false; + for (var _i = 0, _a = parent.parameters; _i < _a.length; _i++) { + var name_14 = _a[_i].name; + if ((name_14.kind === 164 /* ObjectBindingPattern */ || + name_14.kind === 165 /* ArrayBindingPattern */) && + checkIfTypePredicateVariableIsDeclaredInBindingPattern(name_14, parameterName, typePredicate.parameterName)) { + hasReportedError = true; + break; + } + } + if (!hasReportedError) { + error(node.parameterName, ts.Diagnostics.Cannot_find_parameter_0, typePredicate.parameterName); + } + } } - return false; } - function isInLegalThisTypePredicatePosition(node) { - if (isInLegalParameterTypePredicatePosition(node)) { - return true; - } + function getTypePredicateParent(node) { switch (node.parent.kind) { - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 145 /* GetAccessor */: - return node === node.parent.type; + case 177 /* ArrowFunction */: + case 148 /* CallSignature */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 153 /* FunctionType */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + var parent_6 = node.parent; + if (node === parent_6.type) { + return parent_6; + } + } + } + function checkIfTypePredicateVariableIsDeclaredInBindingPattern(pattern, predicateVariableNode, predicateVariableName) { + for (var _i = 0, _a = pattern.elements; _i < _a.length; _i++) { + var name_15 = _a[_i].name; + if (name_15.kind === 69 /* Identifier */ && + name_15.text === predicateVariableName) { + error(predicateVariableNode, ts.Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, predicateVariableName); + return true; + } + else if (name_15.kind === 165 /* ArrayBindingPattern */ || + name_15.kind === 164 /* ObjectBindingPattern */) { + if (checkIfTypePredicateVariableIsDeclaredInBindingPattern(name_15, predicateVariableNode, predicateVariableName)) { + return true; + } + } } - return false; } function checkSignatureDeclaration(node) { // Grammar checking - if (node.kind === 149 /* IndexSignature */) { + if (node.kind === 150 /* IndexSignature */) { checkGrammarIndexSignature(node); } - else if (node.kind === 152 /* FunctionType */ || node.kind === 215 /* FunctionDeclaration */ || node.kind === 153 /* ConstructorType */ || - node.kind === 147 /* CallSignature */ || node.kind === 144 /* Constructor */ || - node.kind === 148 /* ConstructSignature */) { + else if (node.kind === 153 /* FunctionType */ || node.kind === 216 /* FunctionDeclaration */ || node.kind === 154 /* ConstructorType */ || + node.kind === 148 /* CallSignature */ || node.kind === 145 /* Constructor */ || + node.kind === 149 /* ConstructSignature */) { checkGrammarFunctionLikeDeclaration(node); } checkTypeParameters(node.typeParameters); ts.forEach(node.parameters, checkParameter); - if (node.type) { - if (node.type.kind === 150 /* TypePredicate */) { - var returnType = getReturnTypeOfSignature(getSignatureFromDeclaration(node)); - if (!returnType || !(returnType.flags & 134217728 /* PredicateType */)) { - return; - } - var typePredicate = returnType.predicate; - var typePredicateNode = node.type; - checkSourceElement(typePredicateNode); - if (ts.isIdentifierTypePredicate(typePredicate)) { - if (typePredicate.parameterIndex >= 0) { - if (node.parameters[typePredicate.parameterIndex].dotDotDotToken) { - error(typePredicateNode.parameterName, ts.Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); - } - else { - checkTypeAssignableTo(typePredicate.type, getTypeOfNode(node.parameters[typePredicate.parameterIndex]), typePredicateNode.type); - } - } - else if (typePredicateNode.parameterName) { - var hasReportedError = false; - for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) { - var param = _a[_i]; - if (hasReportedError) { - break; - } - if (param.name.kind === 163 /* ObjectBindingPattern */ || - param.name.kind === 164 /* ArrayBindingPattern */) { - (function checkBindingPattern(pattern) { - for (var _i = 0, _a = pattern.elements; _i < _a.length; _i++) { - var element = _a[_i]; - if (element.name.kind === 69 /* Identifier */ && - element.name.text === typePredicate.parameterName) { - error(typePredicateNode.parameterName, ts.Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, typePredicate.parameterName); - hasReportedError = true; - break; - } - else if (element.name.kind === 164 /* ArrayBindingPattern */ || - element.name.kind === 163 /* ObjectBindingPattern */) { - checkBindingPattern(element.name); - } - } - })(param.name); - } - } - if (!hasReportedError) { - error(typePredicateNode.parameterName, ts.Diagnostics.Cannot_find_parameter_0, typePredicate.parameterName); - } - } - } - } - else { - checkSourceElement(node.type); - } - } + checkSourceElement(node.type); if (produceDiagnostics) { checkCollisionWithArgumentsInGeneratedCode(node); if (compilerOptions.noImplicitAny && !node.type) { switch (node.kind) { - case 148 /* ConstructSignature */: + case 149 /* ConstructSignature */: error(node, ts.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; - case 147 /* CallSignature */: + case 148 /* CallSignature */: error(node, ts.Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; } @@ -24479,7 +24749,7 @@ var ts; checkSpecializedSignatureDeclaration(node); } function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 217 /* InterfaceDeclaration */) { + if (node.kind === 218 /* InterfaceDeclaration */) { var nodeSymbol = getSymbolOfNode(node); // in case of merging interface declaration it is possible that we'll enter this check procedure several times for every declaration // to prevent this run check only for the first declaration of a given kind @@ -24556,7 +24826,7 @@ var ts; return; } function isSuperCallExpression(n) { - return n.kind === 170 /* CallExpression */ && n.expression.kind === 95 /* SuperKeyword */; + return n.kind === 171 /* CallExpression */ && n.expression.kind === 95 /* SuperKeyword */; } function containsSuperCallAsComputedPropertyName(n) { return n.name && containsSuperCall(n.name); @@ -24577,12 +24847,12 @@ var ts; if (n.kind === 97 /* ThisKeyword */) { error(n, ts.Diagnostics.this_cannot_be_referenced_in_current_location); } - else if (n.kind !== 175 /* FunctionExpression */ && n.kind !== 215 /* FunctionDeclaration */) { + else if (n.kind !== 176 /* FunctionExpression */ && n.kind !== 216 /* FunctionDeclaration */) { ts.forEachChild(n, markThisReferencesAsErrors); } } function isInstancePropertyWithInitializer(n) { - return n.kind === 141 /* PropertyDeclaration */ && + return n.kind === 142 /* PropertyDeclaration */ && !(n.flags & 64 /* Static */) && !!n.initializer; } @@ -24612,7 +24882,7 @@ var ts; var superCallStatement; for (var _i = 0, statements_2 = statements; _i < statements_2.length; _i++) { var statement = statements_2[_i]; - if (statement.kind === 197 /* ExpressionStatement */ && isSuperCallExpression(statement.expression)) { + if (statement.kind === 198 /* ExpressionStatement */ && isSuperCallExpression(statement.expression)) { superCallStatement = statement; break; } @@ -24640,7 +24910,7 @@ var ts; checkGrammarFunctionLikeDeclaration(node) || checkGrammarAccessor(node) || checkGrammarComputedPropertyName(node.name); checkDecorators(node); checkSignatureDeclaration(node); - if (node.kind === 145 /* GetAccessor */) { + if (node.kind === 146 /* GetAccessor */) { if (!ts.isInAmbientContext(node) && ts.nodeIsPresent(node.body) && (node.flags & 524288 /* HasImplicitReturn */)) { if (node.flags & 1048576 /* HasExplicitReturn */) { if (compilerOptions.noImplicitReturns) { @@ -24655,13 +24925,13 @@ var ts; // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including // well known symbols. - if (node.name.kind === 136 /* ComputedPropertyName */) { + if (node.name.kind === 137 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (!ts.hasDynamicName(node)) { // TypeScript 1.0 spec (April 2014): 8.4.3 // Accessors for the same member name must specify the same accessibility. - var otherKind = node.kind === 145 /* GetAccessor */ ? 146 /* SetAccessor */ : 145 /* GetAccessor */; + var otherKind = node.kind === 146 /* GetAccessor */ ? 147 /* SetAccessor */ : 146 /* GetAccessor */; var otherAccessor = ts.getDeclarationOfKind(node.symbol, otherKind); if (otherAccessor) { if (((node.flags & 56 /* AccessibilityModifier */) !== (otherAccessor.flags & 56 /* AccessibilityModifier */))) { @@ -24680,7 +24950,7 @@ var ts; } getTypeOfAccessors(getSymbolOfNode(node)); } - if (node.parent.kind !== 167 /* ObjectLiteralExpression */) { + if (node.parent.kind !== 168 /* ObjectLiteralExpression */) { checkSourceElement(node.body); } else { @@ -24771,9 +25041,9 @@ var ts; var signaturesToCheck; // Unnamed (call\construct) signatures in interfaces are inherited and not shadowed so examining just node symbol won't give complete answer. // Use declaring type to obtain full list of signatures. - if (!signatureDeclarationNode.name && signatureDeclarationNode.parent && signatureDeclarationNode.parent.kind === 217 /* InterfaceDeclaration */) { - ts.Debug.assert(signatureDeclarationNode.kind === 147 /* CallSignature */ || signatureDeclarationNode.kind === 148 /* ConstructSignature */); - var signatureKind = signatureDeclarationNode.kind === 147 /* CallSignature */ ? 0 /* Call */ : 1 /* Construct */; + if (!signatureDeclarationNode.name && signatureDeclarationNode.parent && signatureDeclarationNode.parent.kind === 218 /* InterfaceDeclaration */) { + ts.Debug.assert(signatureDeclarationNode.kind === 148 /* CallSignature */ || signatureDeclarationNode.kind === 149 /* ConstructSignature */); + var signatureKind = signatureDeclarationNode.kind === 148 /* CallSignature */ ? 0 /* Call */ : 1 /* Construct */; var containingSymbol = getSymbolOfNode(signatureDeclarationNode.parent); var containingType = getDeclaredTypeOfSymbol(containingSymbol); signaturesToCheck = getSignaturesOfType(containingType, signatureKind); @@ -24793,9 +25063,9 @@ var ts; var flags = ts.getCombinedNodeFlags(n); // children of classes (even ambient classes) should not be marked as ambient or export // because those flags have no useful semantics there. - if (n.parent.kind !== 217 /* InterfaceDeclaration */ && - n.parent.kind !== 216 /* ClassDeclaration */ && - n.parent.kind !== 188 /* ClassExpression */ && + if (n.parent.kind !== 218 /* InterfaceDeclaration */ && + n.parent.kind !== 217 /* ClassDeclaration */ && + n.parent.kind !== 189 /* ClassExpression */ && ts.isInAmbientContext(n)) { if (!(flags & 4 /* Ambient */)) { // It is nested in an ambient context, which means it is automatically exported @@ -24883,7 +25153,7 @@ var ts; var errorNode_1 = subsequentNode.name || subsequentNode; // TODO(jfreeman): These are methods, so handle computed name case if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) { - var reportError = (node.kind === 143 /* MethodDeclaration */ || node.kind === 142 /* MethodSignature */) && + var reportError = (node.kind === 144 /* MethodDeclaration */ || node.kind === 143 /* MethodSignature */) && (node.flags & 64 /* Static */) !== (subsequentNode.flags & 64 /* Static */); // we can get here in two cases // 1. mixed static and instance class members @@ -24925,7 +25195,7 @@ var ts; var current = declarations_4[_i]; var node = current; var inAmbientContext = ts.isInAmbientContext(node); - var inAmbientContextOrInterface = node.parent.kind === 217 /* InterfaceDeclaration */ || node.parent.kind === 155 /* TypeLiteral */ || inAmbientContext; + var inAmbientContextOrInterface = node.parent.kind === 218 /* InterfaceDeclaration */ || node.parent.kind === 156 /* TypeLiteral */ || inAmbientContext; if (inAmbientContextOrInterface) { // check if declarations are consecutive only if they are non-ambient // 1. ambient declarations can be interleaved @@ -24936,7 +25206,7 @@ var ts; // 2. mixing ambient and non-ambient declarations is a separate error that will be reported - do not want to report an extra one previousDeclaration = undefined; } - if (node.kind === 215 /* FunctionDeclaration */ || node.kind === 143 /* MethodDeclaration */ || node.kind === 142 /* MethodSignature */ || node.kind === 144 /* Constructor */) { + if (node.kind === 216 /* FunctionDeclaration */ || node.kind === 144 /* MethodDeclaration */ || node.kind === 143 /* MethodSignature */ || node.kind === 145 /* Constructor */) { var currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; allNodeFlags &= currentNodeFlags; @@ -25076,16 +25346,16 @@ var ts; } function getDeclarationSpaces(d) { switch (d.kind) { - case 217 /* InterfaceDeclaration */: + case 218 /* InterfaceDeclaration */: return 2097152 /* ExportType */; - case 220 /* ModuleDeclaration */: - return d.name.kind === 9 /* StringLiteral */ || ts.getModuleInstanceState(d) !== 0 /* NonInstantiated */ + case 221 /* ModuleDeclaration */: + return ts.isAmbientModule(d) || ts.getModuleInstanceState(d) !== 0 /* NonInstantiated */ ? 4194304 /* ExportNamespace */ | 1048576 /* ExportValue */ : 4194304 /* ExportNamespace */; - case 216 /* ClassDeclaration */: - case 219 /* EnumDeclaration */: + case 217 /* ClassDeclaration */: + case 220 /* EnumDeclaration */: return 2097152 /* ExportType */ | 1048576 /* ExportValue */; - case 223 /* ImportEqualsDeclaration */: + case 224 /* ImportEqualsDeclaration */: var result = 0; var target = resolveAlias(getSymbolOfNode(d)); ts.forEach(target.declarations, function (d) { result |= getDeclarationSpaces(d); }); @@ -25335,22 +25605,22 @@ var ts; var headMessage = getDiagnosticHeadMessageForDecoratorResolution(node); var errorInfo; switch (node.parent.kind) { - case 216 /* ClassDeclaration */: + case 217 /* ClassDeclaration */: var classSymbol = getSymbolOfNode(node.parent); var classConstructorType = getTypeOfSymbol(classSymbol); expectedReturnType = getUnionType([classConstructorType, voidType]); break; - case 138 /* Parameter */: + case 139 /* Parameter */: expectedReturnType = voidType; errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any); break; - case 141 /* PropertyDeclaration */: + case 142 /* PropertyDeclaration */: expectedReturnType = voidType; errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_property_decorator_function_must_be_either_void_or_any); break; - case 143 /* MethodDeclaration */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: + case 144 /* MethodDeclaration */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: var methodType = getTypeOfNode(node.parent); var descriptorType = createTypedPropertyDescriptorType(methodType); expectedReturnType = getUnionType([descriptorType, voidType]); @@ -25363,9 +25633,9 @@ var ts; // When we are emitting type metadata for decorators, we need to try to check the type // as if it were an expression so that we can emit the type in a value position when we // serialize the type metadata. - if (node && node.kind === 151 /* TypeReference */) { + if (node && node.kind === 152 /* TypeReference */) { var root = getFirstIdentifier(node.typeName); - var meaning = root.parent.kind === 151 /* TypeReference */ ? 793056 /* Type */ : 1536 /* Namespace */; + var meaning = root.parent.kind === 152 /* TypeReference */ ? 793056 /* Type */ : 1536 /* Namespace */; // Resolve type so we know which symbol is referenced var rootSymbol = resolveName(root, root.text, meaning | 8388608 /* Alias */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); // Resolved symbol is alias @@ -25412,28 +25682,24 @@ var ts; if (compilerOptions.emitDecoratorMetadata) { // we only need to perform these checks if we are emitting serialized type metadata for the target of a decorator. switch (node.kind) { - case 216 /* ClassDeclaration */: + case 217 /* ClassDeclaration */: var constructor = ts.getFirstConstructorWithBody(node); if (constructor) { checkParameterTypeAnnotationsAsExpressions(constructor); } break; - case 143 /* MethodDeclaration */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: + case 144 /* MethodDeclaration */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: checkParameterTypeAnnotationsAsExpressions(node); checkReturnTypeAnnotationAsExpression(node); break; - case 141 /* PropertyDeclaration */: - case 138 /* Parameter */: + case 142 /* PropertyDeclaration */: + case 139 /* Parameter */: checkTypeAnnotationAsExpression(node); break; } } - emitDecorate = true; - if (node.kind === 138 /* Parameter */) { - emitParam = true; - } ts.forEach(node.decorators, checkDecorator); } function checkFunctionDeclaration(node) { @@ -25448,13 +25714,10 @@ var ts; checkDecorators(node); checkSignatureDeclaration(node); var isAsync = ts.isAsyncFunctionLike(node); - if (isAsync) { - emitAwaiter = true; - } // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including // well known symbols. - if (node.name && node.name.kind === 136 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 137 /* ComputedPropertyName */) { // This check will account for methods in class/interface declarations, // as well as accessors in classes/object literals checkComputedPropertyName(node.name); @@ -25470,7 +25733,7 @@ var ts; // checkFunctionOrConstructorSymbol wouldn't be called if we didnt ignore javascript function. var firstDeclaration = ts.forEach(localSymbol.declarations, // Get first non javascript function declaration - function (declaration) { return declaration.kind === node.kind && !ts.isSourceFileJavaScript(getSourceFile(declaration)) ? + function (declaration) { return declaration.kind === node.kind && !ts.isSourceFileJavaScript(ts.getSourceFileOfNode(declaration)) ? declaration : undefined; }); // Only type check the symbol once if (node === firstDeclaration) { @@ -25505,7 +25768,7 @@ var ts; } function checkBlock(node) { // Grammar checking for SyntaxKind.Block - if (node.kind === 194 /* Block */) { + if (node.kind === 195 /* Block */) { checkGrammarStatementInAmbientContext(node); } ts.forEach(node.statements, checkSourceElement); @@ -25525,12 +25788,12 @@ var ts; if (!(identifier && identifier.text === name)) { return false; } - if (node.kind === 141 /* PropertyDeclaration */ || - node.kind === 140 /* PropertySignature */ || - node.kind === 143 /* MethodDeclaration */ || - node.kind === 142 /* MethodSignature */ || - node.kind === 145 /* GetAccessor */ || - node.kind === 146 /* SetAccessor */) { + if (node.kind === 142 /* PropertyDeclaration */ || + node.kind === 141 /* PropertySignature */ || + node.kind === 144 /* MethodDeclaration */ || + node.kind === 143 /* MethodSignature */ || + node.kind === 146 /* GetAccessor */ || + node.kind === 147 /* SetAccessor */) { // it is ok to have member named '_super' or '_this' - member access is always qualified return false; } @@ -25539,7 +25802,7 @@ var ts; return false; } var root = ts.getRootDeclaration(node); - if (root.kind === 138 /* Parameter */ && ts.nodeIsMissing(root.parent.body)) { + if (root.kind === 139 /* Parameter */ && ts.nodeIsMissing(root.parent.body)) { // just an overload - no codegen impact return false; } @@ -25592,12 +25855,12 @@ var ts; return; } // Uninstantiated modules shouldnt do this check - if (node.kind === 220 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { + if (node.kind === 221 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { return; } // In case of variable declaration, node.parent is variable statement so look at the variable statement's parent var parent = getDeclarationContainer(node); - if (parent.kind === 250 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent)) { + if (parent.kind === 251 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent)) { // If the declaration happens to be in external module, report error that require and exports are reserved keywords error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, ts.declarationNameToString(name), ts.declarationNameToString(name)); } @@ -25632,7 +25895,7 @@ var ts; // skip variable declarations that don't have initializers // NOTE: in ES6 spec initializer is required in variable declarations where name is binding pattern // so we'll always treat binding elements as initialized - if (node.kind === 213 /* VariableDeclaration */ && !node.initializer) { + if (node.kind === 214 /* VariableDeclaration */ && !node.initializer) { return; } var symbol = getSymbolOfNode(node); @@ -25642,24 +25905,24 @@ var ts; localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2 /* BlockScopedVariable */) { if (getDeclarationFlagsFromSymbol(localDeclarationSymbol) & 24576 /* BlockScoped */) { - var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 214 /* VariableDeclarationList */); - var container = varDeclList.parent.kind === 195 /* VariableStatement */ && varDeclList.parent.parent + var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 215 /* VariableDeclarationList */); + var container = varDeclList.parent.kind === 196 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : undefined; // names of block-scoped and function scoped variables can collide only // if block scoped variable is defined in the function\module\source file scope (because of variable hoisting) var namesShareScope = container && - (container.kind === 194 /* Block */ && ts.isFunctionLike(container.parent) || - container.kind === 221 /* ModuleBlock */ || - container.kind === 220 /* ModuleDeclaration */ || - container.kind === 250 /* SourceFile */); + (container.kind === 195 /* Block */ && ts.isFunctionLike(container.parent) || + container.kind === 222 /* ModuleBlock */ || + container.kind === 221 /* ModuleDeclaration */ || + container.kind === 251 /* SourceFile */); // here we know that function scoped variable is shadowed by block scoped one // if they are defined in the same scope - binder has already reported redeclaration error // otherwise if variable has an initializer - show error that initialization will fail // since LHS will be block scoped name instead of function scoped if (!namesShareScope) { - var name_14 = symbolToString(localDeclarationSymbol); - error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name_14, name_14); + var name_16 = symbolToString(localDeclarationSymbol); + error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name_16, name_16); } } } @@ -25667,7 +25930,7 @@ var ts; } // Check that a parameter initializer contains no references to parameters declared to the right of itself function checkParameterInitializer(node) { - if (ts.getRootDeclaration(node).kind !== 138 /* Parameter */) { + if (ts.getRootDeclaration(node).kind !== 139 /* Parameter */) { return; } var func = ts.getContainingFunction(node); @@ -25678,7 +25941,7 @@ var ts; // check FunctionLikeDeclaration.locals (stores parameters\function local variable) // if it contains entry with a specified name and if this entry matches the resolved symbol if (referencedSymbol && referencedSymbol !== unknownSymbol && getSymbol(func.locals, referencedSymbol.name, 107455 /* Value */) === referencedSymbol) { - if (referencedSymbol.valueDeclaration.kind === 138 /* Parameter */) { + if (referencedSymbol.valueDeclaration.kind === 139 /* Parameter */) { if (referencedSymbol.valueDeclaration === node) { error(n, ts.Diagnostics.Parameter_0_cannot_be_referenced_in_its_initializer, ts.declarationNameToString(node.name)); return; @@ -25704,15 +25967,15 @@ var ts; // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including // well known symbols. - if (node.name.kind === 136 /* ComputedPropertyName */) { + if (node.name.kind === 137 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); if (node.initializer) { checkExpressionCached(node.initializer); } } - if (node.kind === 165 /* BindingElement */) { + if (node.kind === 166 /* BindingElement */) { // check computed properties inside property names of binding elements - if (node.propertyName && node.propertyName.kind === 136 /* ComputedPropertyName */) { + if (node.propertyName && node.propertyName.kind === 137 /* ComputedPropertyName */) { checkComputedPropertyName(node.propertyName); } } @@ -25721,13 +25984,14 @@ var ts; ts.forEach(node.name.elements, checkSourceElement); } // For a parameter declaration with an initializer, error and exit if the containing function doesn't have a body - if (node.initializer && ts.getRootDeclaration(node).kind === 138 /* Parameter */ && ts.nodeIsMissing(ts.getContainingFunction(node).body)) { + if (node.initializer && ts.getRootDeclaration(node).kind === 139 /* Parameter */ && ts.nodeIsMissing(ts.getContainingFunction(node).body)) { error(node, ts.Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation); return; } // For a binding pattern, validate the initializer and exit if (ts.isBindingPattern(node.name)) { - if (node.initializer) { + // Don't validate for-in initializer as it is already an error + if (node.initializer && node.parent.parent.kind !== 203 /* ForInStatement */) { checkTypeAssignableTo(checkExpressionCached(node.initializer), getWidenedTypeForVariableLikeDeclaration(node), node, /*headMessage*/ undefined); checkParameterInitializer(node); } @@ -25737,7 +26001,8 @@ var ts; var type = getTypeOfVariableOrParameterOrProperty(symbol); if (node === symbol.valueDeclaration) { // Node is the primary declaration of the symbol, just validate the initializer - if (node.initializer) { + // Don't validate for-in initializer as it is already an error + if (node.initializer && node.parent.parent.kind !== 203 /* ForInStatement */) { checkTypeAssignableTo(checkExpressionCached(node.initializer), type, node, /*headMessage*/ undefined); checkParameterInitializer(node); } @@ -25753,10 +26018,10 @@ var ts; checkTypeAssignableTo(checkExpressionCached(node.initializer), declarationType, node, /*headMessage*/ undefined); } } - if (node.kind !== 141 /* PropertyDeclaration */ && node.kind !== 140 /* PropertySignature */) { + if (node.kind !== 142 /* PropertyDeclaration */ && node.kind !== 141 /* PropertySignature */) { // We know we don't have a binding pattern or computed name here checkExportsOnMergedDeclarations(node); - if (node.kind === 213 /* VariableDeclaration */ || node.kind === 165 /* BindingElement */) { + if (node.kind === 214 /* VariableDeclaration */ || node.kind === 166 /* BindingElement */) { checkVarDeclaredNamesNotShadowed(node); } checkCollisionWithCapturedSuperVariable(node, node.name); @@ -25779,7 +26044,7 @@ var ts; } function checkGrammarDisallowedModifiersOnObjectLiteralExpressionMethod(node) { // We only disallow modifier on a method declaration if it is a property of object-literal-expression - if (node.modifiers && node.parent.kind === 167 /* ObjectLiteralExpression */) { + if (node.modifiers && node.parent.kind === 168 /* ObjectLiteralExpression */) { if (ts.isAsyncFunctionLike(node)) { if (node.modifiers.length > 1) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); @@ -25800,7 +26065,7 @@ var ts; checkGrammarStatementInAmbientContext(node); checkExpression(node.expression); checkSourceElement(node.thenStatement); - if (node.thenStatement.kind === 196 /* EmptyStatement */) { + if (node.thenStatement.kind === 197 /* EmptyStatement */) { error(node.thenStatement, ts.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); @@ -25820,12 +26085,12 @@ var ts; function checkForStatement(node) { // Grammar checking if (!checkGrammarStatementInAmbientContext(node)) { - if (node.initializer && node.initializer.kind === 214 /* VariableDeclarationList */) { + if (node.initializer && node.initializer.kind === 215 /* VariableDeclarationList */) { checkGrammarVariableDeclarationList(node.initializer); } } if (node.initializer) { - if (node.initializer.kind === 214 /* VariableDeclarationList */) { + if (node.initializer.kind === 215 /* VariableDeclarationList */) { ts.forEach(node.initializer.declarations, checkVariableDeclaration); } else { @@ -25845,14 +26110,14 @@ var ts; // via checkRightHandSideOfForOf. // If the LHS is an expression, check the LHS, as a destructuring assignment or as a reference. // Then check that the RHS is assignable to it. - if (node.initializer.kind === 214 /* VariableDeclarationList */) { + if (node.initializer.kind === 215 /* VariableDeclarationList */) { checkForInOrForOfVariableDeclaration(node); } else { var varExpr = node.initializer; var iteratedType = checkRightHandSideOfForOf(node.expression); // There may be a destructuring assignment on the left side - if (varExpr.kind === 166 /* ArrayLiteralExpression */ || varExpr.kind === 167 /* ObjectLiteralExpression */) { + if (varExpr.kind === 167 /* ArrayLiteralExpression */ || varExpr.kind === 168 /* ObjectLiteralExpression */) { // iteratedType may be undefined. In this case, we still want to check the structure of // varExpr, in particular making sure it's a valid LeftHandSideExpression. But we'd like // to short circuit the type relation checking as much as possible, so we pass the unknownType. @@ -25881,7 +26146,7 @@ var ts; // for (let VarDecl in Expr) Statement // VarDecl must be a variable declaration without a type annotation that declares a variable of type Any, // and Expr must be an expression of type Any, an object type, or a type parameter type. - if (node.initializer.kind === 214 /* VariableDeclarationList */) { + if (node.initializer.kind === 215 /* VariableDeclarationList */) { var variable = node.initializer.declarations[0]; if (variable && ts.isBindingPattern(variable.name)) { error(variable.name, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); @@ -25895,7 +26160,7 @@ var ts; // and Expr must be an expression of type Any, an object type, or a type parameter type. var varExpr = node.initializer; var leftType = checkExpression(varExpr); - if (varExpr.kind === 166 /* ArrayLiteralExpression */ || varExpr.kind === 167 /* ObjectLiteralExpression */) { + if (varExpr.kind === 167 /* ArrayLiteralExpression */ || varExpr.kind === 168 /* ObjectLiteralExpression */) { error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } else if (!isTypeAnyOrAllConstituentTypesHaveKind(leftType, 258 /* StringLike */)) { @@ -26140,7 +26405,7 @@ var ts; // TODO: Check that target label is valid } function isGetAccessorWithAnnotatatedSetAccessor(node) { - return !!(node.kind === 145 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 146 /* SetAccessor */))); + return !!(node.kind === 146 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 147 /* SetAccessor */))); } function checkReturnStatement(node) { // Grammar checking @@ -26163,10 +26428,10 @@ var ts; // for generators. return; } - if (func.kind === 146 /* SetAccessor */) { + if (func.kind === 147 /* SetAccessor */) { error(node.expression, ts.Diagnostics.Setters_cannot_return_a_value); } - else if (func.kind === 144 /* Constructor */) { + else if (func.kind === 145 /* Constructor */) { if (!checkTypeAssignableTo(exprType, returnType, node.expression)) { error(node.expression, ts.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); } @@ -26208,7 +26473,7 @@ var ts; var expressionTypeIsStringLike = someConstituentTypeHasKind(expressionType, 258 /* StringLike */); ts.forEach(node.caseBlock.clauses, function (clause) { // Grammar check for duplicate default clauses, skip if we already report duplicate default clause - if (clause.kind === 244 /* DefaultClause */ && !hasDuplicateDefaultClause) { + if (clause.kind === 245 /* DefaultClause */ && !hasDuplicateDefaultClause) { if (firstDefaultClause === undefined) { firstDefaultClause = clause; } @@ -26220,7 +26485,7 @@ var ts; hasDuplicateDefaultClause = true; } } - if (produceDiagnostics && clause.kind === 243 /* CaseClause */) { + if (produceDiagnostics && clause.kind === 244 /* CaseClause */) { var caseClause = clause; // TypeScript 1.0 spec (April 2014):5.9 // In a 'switch' statement, each 'case' expression must be of a type that is assignable to or from the type of the 'switch' expression. @@ -26245,7 +26510,7 @@ var ts; if (ts.isFunctionLike(current)) { break; } - if (current.kind === 209 /* LabeledStatement */ && current.label.text === node.label.text) { + if (current.kind === 210 /* LabeledStatement */ && current.label.text === node.label.text) { var sourceFile = ts.getSourceFileOfNode(node); grammarErrorOnNode(node.label, ts.Diagnostics.Duplicate_label_0, ts.getTextOfNodeFromSourceText(sourceFile.text, node.label)); break; @@ -26350,7 +26615,7 @@ var ts; // perform property check if property or indexer is declared in 'type' // this allows to rule out cases when both property and indexer are inherited from the base class var errorNode; - if (prop.valueDeclaration.name.kind === 136 /* ComputedPropertyName */ || prop.parent === containingType.symbol) { + if (prop.valueDeclaration.name.kind === 137 /* ComputedPropertyName */ || prop.parent === containingType.symbol) { errorNode = prop.valueDeclaration; } else if (indexDeclaration) { @@ -26431,7 +26696,6 @@ var ts; var staticType = getTypeOfSymbol(symbol); var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node); if (baseTypeNode) { - emitExtends = emitExtends || !ts.isInAmbientContext(node); var baseTypes = getBaseTypes(type); if (baseTypes.length && produceDiagnostics) { var baseType = baseTypes[0]; @@ -26532,7 +26796,7 @@ var ts; // If there is no declaration for the derived class (as in the case of class expressions), // then the class cannot be declared abstract. if (baseDeclarationFlags & 128 /* Abstract */ && (!derivedClassDecl || !(derivedClassDecl.flags & 128 /* Abstract */))) { - if (derivedClassDecl.kind === 188 /* ClassExpression */) { + if (derivedClassDecl.kind === 189 /* ClassExpression */) { error(derivedClassDecl, ts.Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, symbolToString(baseProperty), typeToString(baseType)); } else { @@ -26580,7 +26844,7 @@ var ts; } } function isAccessor(kind) { - return kind === 145 /* GetAccessor */ || kind === 146 /* SetAccessor */; + return kind === 146 /* GetAccessor */ || kind === 147 /* SetAccessor */; } function areTypeParametersIdentical(list1, list2) { if (!list1 && !list2) { @@ -26650,7 +26914,7 @@ var ts; checkTypeNameIsReserved(node.name, ts.Diagnostics.Interface_name_cannot_be_0); checkExportsOnMergedDeclarations(node); var symbol = getSymbolOfNode(node); - var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 217 /* InterfaceDeclaration */); + var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 218 /* InterfaceDeclaration */); if (symbol.declarations.length > 1) { if (node !== firstInterfaceDecl && !areTypeParametersIdentical(firstInterfaceDecl.typeParameters, node.typeParameters)) { error(node.name, ts.Diagnostics.All_declarations_of_an_interface_must_have_identical_type_parameters); @@ -26760,7 +27024,7 @@ var ts; return value; function evalConstant(e) { switch (e.kind) { - case 181 /* PrefixUnaryExpression */: + case 182 /* PrefixUnaryExpression */: var value_1 = evalConstant(e.operand); if (value_1 === undefined) { return undefined; @@ -26771,7 +27035,7 @@ var ts; case 50 /* TildeToken */: return ~value_1; } return undefined; - case 183 /* BinaryExpression */: + case 184 /* BinaryExpression */: var left = evalConstant(e.left); if (left === undefined) { return undefined; @@ -26796,11 +27060,11 @@ var ts; return undefined; case 8 /* NumericLiteral */: return +e.text; - case 174 /* ParenthesizedExpression */: + case 175 /* ParenthesizedExpression */: return evalConstant(e.expression); case 69 /* Identifier */: - case 169 /* ElementAccessExpression */: - case 168 /* PropertyAccessExpression */: + case 170 /* ElementAccessExpression */: + case 169 /* PropertyAccessExpression */: var member = initializer.parent; var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent)); var enumType_1; @@ -26813,7 +27077,7 @@ var ts; } else { var expression; - if (e.kind === 169 /* ElementAccessExpression */) { + if (e.kind === 170 /* ElementAccessExpression */) { if (e.argumentExpression === undefined || e.argumentExpression.kind !== 9 /* StringLiteral */) { return undefined; @@ -26831,7 +27095,7 @@ var ts; if (current.kind === 69 /* Identifier */) { break; } - else if (current.kind === 168 /* PropertyAccessExpression */) { + else if (current.kind === 169 /* PropertyAccessExpression */) { current = current.expression; } else { @@ -26902,7 +27166,7 @@ var ts; var seenEnumMissingInitialInitializer = false; ts.forEach(enumSymbol.declarations, function (declaration) { // return true if we hit a violation of the rule, false otherwise - if (declaration.kind !== 219 /* EnumDeclaration */) { + if (declaration.kind !== 220 /* EnumDeclaration */) { return false; } var enumDeclaration = declaration; @@ -26925,8 +27189,8 @@ var ts; var declarations = symbol.declarations; for (var _i = 0, declarations_5 = declarations; _i < declarations_5.length; _i++) { var declaration = declarations_5[_i]; - if ((declaration.kind === 216 /* ClassDeclaration */ || - (declaration.kind === 215 /* FunctionDeclaration */ && ts.nodeIsPresent(declaration.body))) && + if ((declaration.kind === 217 /* ClassDeclaration */ || + (declaration.kind === 216 /* FunctionDeclaration */ && ts.nodeIsPresent(declaration.body))) && !ts.isInAmbientContext(declaration)) { return declaration; } @@ -26949,7 +27213,12 @@ var ts; function checkModuleDeclaration(node) { if (produceDiagnostics) { // Grammar checking - var isAmbientExternalModule = node.name.kind === 9 /* StringLiteral */; + var isGlobalAugmentation = ts.isGlobalScopeAugmentation(node); + var inAmbientContext = ts.isInAmbientContext(node); + if (isGlobalAugmentation && !inAmbientContext) { + error(node.name, ts.Diagnostics.Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context); + } + var isAmbientExternalModule = ts.isAmbientModule(node); var contextErrorMessage = isAmbientExternalModule ? ts.Diagnostics.An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file : ts.Diagnostics.A_namespace_declaration_is_only_allowed_in_a_namespace_or_module; @@ -26958,7 +27227,7 @@ var ts; return; } if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node)) { - if (!ts.isInAmbientContext(node) && node.name.kind === 9 /* StringLiteral */) { + if (!inAmbientContext && node.name.kind === 9 /* StringLiteral */) { grammarErrorOnNode(node.name, ts.Diagnostics.Only_ambient_modules_can_use_quoted_names); } } @@ -26969,7 +27238,7 @@ var ts; // The following checks only apply on a non-ambient instantiated module declaration. if (symbol.flags & 512 /* ValueModule */ && symbol.declarations.length > 1 - && !ts.isInAmbientContext(node) + && !inAmbientContext && ts.isInstantiatedModule(node, compilerOptions.preserveConstEnums || compilerOptions.isolatedModules)) { var firstNonAmbientClassOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol); if (firstNonAmbientClassOrFunc) { @@ -26982,30 +27251,120 @@ var ts; } // if the module merges with a class declaration in the same lexical scope, // we need to track this to ensure the correct emit. - var mergedClass = ts.getDeclarationOfKind(symbol, 216 /* ClassDeclaration */); + var mergedClass = ts.getDeclarationOfKind(symbol, 217 /* ClassDeclaration */); if (mergedClass && inSameLexicalScope(node, mergedClass)) { getNodeLinks(node).flags |= 32768 /* LexicalModuleMergesWithClass */; } } - // Checks for ambient external modules. if (isAmbientExternalModule) { - if (!isGlobalSourceFile(node.parent)) { - error(node.name, ts.Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces); + if (ts.isExternalModuleAugmentation(node)) { + // body of the augmentation should be checked for consistency only if augmentation was applied to its target (either global scope or module) + // otherwise we'll be swamped in cascading errors. + // We can detect if augmentation was applied using following rules: + // - augmentation for a global scope is always applied + // - augmentation for some external module is applied if symbol for augmentation is merged (it was combined with target module). + var checkBody = isGlobalAugmentation || (getSymbolOfNode(node).flags & 33554432 /* Merged */); + if (checkBody) { + // body of ambient external module is always a module block + for (var _i = 0, _a = node.body.statements; _i < _a.length; _i++) { + var statement = _a[_i]; + checkModuleAugmentationElement(statement, isGlobalAugmentation); + } + } } - if (ts.isExternalModuleNameRelative(node.name.text)) { - error(node.name, ts.Diagnostics.Ambient_module_declaration_cannot_specify_relative_module_name); + else if (isGlobalSourceFile(node.parent)) { + if (isGlobalAugmentation) { + error(node.name, ts.Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations); + } + else if (ts.isExternalModuleNameRelative(node.name.text)) { + error(node.name, ts.Diagnostics.Ambient_module_declaration_cannot_specify_relative_module_name); + } + } + else { + if (isGlobalAugmentation) { + error(node.name, ts.Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations); + } + else { + // Node is not an augmentation and is not located on the script level. + // This means that this is declaration of ambient module that is located in other module or namespace which is prohibited. + error(node.name, ts.Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces); + } } } } checkSourceElement(node.body); } + function checkModuleAugmentationElement(node, isGlobalAugmentation) { + switch (node.kind) { + case 196 /* VariableStatement */: + // error each individual name in variable statement instead of marking the entire variable statement + for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) { + var decl = _a[_i]; + checkModuleAugmentationElement(decl, isGlobalAugmentation); + } + break; + case 230 /* ExportAssignment */: + case 231 /* ExportDeclaration */: + grammarErrorOnFirstToken(node, ts.Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); + break; + case 224 /* ImportEqualsDeclaration */: + if (node.moduleReference.kind !== 9 /* StringLiteral */) { + error(node.name, ts.Diagnostics.Module_augmentation_cannot_introduce_new_names_in_the_top_level_scope); + break; + } + // fallthrough + case 225 /* ImportDeclaration */: + grammarErrorOnFirstToken(node, ts.Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); + break; + case 166 /* BindingElement */: + case 214 /* VariableDeclaration */: + var name_17 = node.name; + if (ts.isBindingPattern(name_17)) { + for (var _b = 0, _c = name_17.elements; _b < _c.length; _b++) { + var el = _c[_b]; + // mark individual names in binding pattern + checkModuleAugmentationElement(el, isGlobalAugmentation); + } + break; + } + // fallthrough + case 217 /* ClassDeclaration */: + case 220 /* EnumDeclaration */: + case 216 /* FunctionDeclaration */: + case 218 /* InterfaceDeclaration */: + case 221 /* ModuleDeclaration */: + case 219 /* TypeAliasDeclaration */: + var symbol = getSymbolOfNode(node); + if (symbol) { + // module augmentations cannot introduce new names on the top level scope of the module + // this is done it two steps + // 1. quick check - if symbol for node is not merged - this is local symbol to this augmentation - report error + // 2. main check - report error if value declaration of the parent symbol is module augmentation) + var reportError = !(symbol.flags & 33554432 /* Merged */); + if (!reportError) { + if (isGlobalAugmentation) { + // global symbol should not have parent since it is not explicitly exported + reportError = symbol.parent !== undefined; + } + else { + // symbol should not originate in augmentation + reportError = ts.isExternalModuleAugmentation(symbol.parent.valueDeclaration); + } + } + if (reportError) { + error(node, ts.Diagnostics.Module_augmentation_cannot_introduce_new_names_in_the_top_level_scope); + } + } + break; + } + } function getFirstIdentifier(node) { while (true) { - if (node.kind === 135 /* QualifiedName */) { + if (node.kind === 136 /* QualifiedName */) { node = node.left; } - else if (node.kind === 168 /* PropertyAccessExpression */) { + else if (node.kind === 169 /* PropertyAccessExpression */) { node = node.expression; } else { @@ -27021,20 +27380,24 @@ var ts; error(moduleName, ts.Diagnostics.String_literal_expected); return false; } - var inAmbientExternalModule = node.parent.kind === 221 /* ModuleBlock */ && node.parent.parent.name.kind === 9 /* StringLiteral */; - if (node.parent.kind !== 250 /* SourceFile */ && !inAmbientExternalModule) { - error(moduleName, node.kind === 230 /* ExportDeclaration */ ? + var inAmbientExternalModule = node.parent.kind === 222 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent); + if (node.parent.kind !== 251 /* SourceFile */ && !inAmbientExternalModule) { + error(moduleName, node.kind === 231 /* ExportDeclaration */ ? ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : ts.Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); return false; } if (inAmbientExternalModule && ts.isExternalModuleNameRelative(moduleName.text)) { - // TypeScript 1.0 spec (April 2013): 12.1.6 - // An ExternalImportDeclaration in an AmbientExternalModuleDeclaration may reference - // other external modules only through top - level external module names. - // Relative external module names are not permitted. - error(node, ts.Diagnostics.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name); - return false; + // we have already reported errors on top level imports\exports in external module augmentations in checkModuleDeclaration + // no need to do this again. + if (!isTopLevelInExternalModuleAugmentation(node)) { + // TypeScript 1.0 spec (April 2013): 12.1.6 + // An ExternalImportDeclaration in an AmbientExternalModuleDeclaration may reference + // other external modules only through top - level external module names. + // Relative external module names are not permitted. + error(node, ts.Diagnostics.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name); + return false; + } } return true; } @@ -27046,7 +27409,7 @@ var ts; (symbol.flags & 793056 /* Type */ ? 793056 /* Type */ : 0) | (symbol.flags & 1536 /* Namespace */ ? 1536 /* Namespace */ : 0); if (target.flags & excludedMeanings) { - var message = node.kind === 232 /* ExportSpecifier */ ? + var message = node.kind === 233 /* ExportSpecifier */ ? ts.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; error(node, message, symbolToString(symbol)); @@ -27073,7 +27436,7 @@ var ts; checkImportBinding(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 226 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 227 /* NamespaceImport */) { checkImportBinding(importClause.namedBindings); } else { @@ -27130,8 +27493,8 @@ var ts; // export { x, y } // export { x, y } from "foo" ts.forEach(node.exportClause.elements, checkExportSpecifier); - var inAmbientExternalModule = node.parent.kind === 221 /* ModuleBlock */ && node.parent.parent.name.kind === 9 /* StringLiteral */; - if (node.parent.kind !== 250 /* SourceFile */ && !inAmbientExternalModule) { + var inAmbientExternalModule = node.parent.kind === 222 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent); + if (node.parent.kind !== 251 /* SourceFile */ && !inAmbientExternalModule) { error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); } } @@ -27145,14 +27508,23 @@ var ts; } } function checkGrammarModuleElementContext(node, errorMessage) { - if (node.parent.kind !== 250 /* SourceFile */ && node.parent.kind !== 221 /* ModuleBlock */ && node.parent.kind !== 220 /* ModuleDeclaration */) { + if (node.parent.kind !== 251 /* SourceFile */ && node.parent.kind !== 222 /* ModuleBlock */ && node.parent.kind !== 221 /* ModuleDeclaration */) { return grammarErrorOnFirstToken(node, errorMessage); } } function checkExportSpecifier(node) { checkAliasSymbol(node); if (!node.parent.parent.moduleSpecifier) { - markExportAsReferenced(node); + var exportedName = node.propertyName || node.name; + // find immediate value referenced by exported name (SymbolFlags.Alias is set so we don't chase down aliases) + var symbol = resolveName(exportedName, exportedName.text, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */ | 8388608 /* Alias */, + /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); + if (symbol && isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0]))) { + error(exportedName, ts.Diagnostics.Cannot_re_export_name_that_is_not_defined_in_the_module); + } + else { + markExportAsReferenced(node); + } } } function checkExportAssignment(node) { @@ -27160,8 +27532,8 @@ var ts; // If we hit an export assignment in an illegal context, just bail out to avoid cascading errors. return; } - var container = node.parent.kind === 250 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 220 /* ModuleDeclaration */ && container.name.kind === 69 /* Identifier */) { + var container = node.parent.kind === 251 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 221 /* ModuleDeclaration */ && !ts.isAmbientModule(container)) { error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); return; } @@ -27202,7 +27574,9 @@ var ts; var exportEqualsSymbol = moduleSymbol.exports["export="]; if (exportEqualsSymbol && hasExportedMembers(moduleSymbol)) { var declaration = getDeclarationOfAliasSymbol(exportEqualsSymbol) || exportEqualsSymbol.valueDeclaration; - error(declaration, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); + if (!isTopLevelInExternalModuleAugmentation(declaration)) { + error(declaration, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); + } } // Checks for export * conflicts var exports = getExportsOfModule(moduleSymbol); @@ -27225,21 +27599,7 @@ var ts; links.exportsChecked = true; } function isNotOverload(declaration) { - return declaration.kind !== 215 /* FunctionDeclaration */ || !!declaration.body; - } - } - function checkTypePredicate(node) { - var parameterName = node.parameterName; - if (parameterName.kind === 69 /* Identifier */ && !isInLegalParameterTypePredicatePosition(node)) { - error(node, ts.Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); - } - else if (parameterName.kind === 161 /* ThisType */) { - if (!isInLegalThisTypePredicatePosition(node)) { - error(node, ts.Diagnostics.A_this_based_type_predicate_is_only_allowed_within_a_class_or_interface_s_members_get_accessors_or_return_type_positions_for_functions_and_methods); - } - else { - getTypeFromThisTypeNode(parameterName); - } + return declaration.kind !== 216 /* FunctionDeclaration */ || !!declaration.body; } } function checkSourceElement(node) { @@ -27251,118 +27611,118 @@ var ts; // Only bother checking on a few construct kinds. We don't want to be excessivly // hitting the cancellation token on every node we check. switch (kind) { - case 220 /* ModuleDeclaration */: - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: - case 215 /* FunctionDeclaration */: + case 221 /* ModuleDeclaration */: + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: + case 216 /* FunctionDeclaration */: cancellationToken.throwIfCancellationRequested(); } } switch (kind) { - case 137 /* TypeParameter */: + case 138 /* TypeParameter */: return checkTypeParameter(node); - case 138 /* Parameter */: + case 139 /* Parameter */: return checkParameter(node); - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: return checkPropertyDeclaration(node); - case 152 /* FunctionType */: - case 153 /* ConstructorType */: - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: + case 153 /* FunctionType */: + case 154 /* ConstructorType */: + case 148 /* CallSignature */: + case 149 /* ConstructSignature */: return checkSignatureDeclaration(node); - case 149 /* IndexSignature */: + case 150 /* IndexSignature */: return checkSignatureDeclaration(node); - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: return checkMethodDeclaration(node); - case 144 /* Constructor */: + case 145 /* Constructor */: return checkConstructorDeclaration(node); - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: return checkAccessorDeclaration(node); - case 151 /* TypeReference */: + case 152 /* TypeReference */: return checkTypeReferenceNode(node); - case 150 /* TypePredicate */: + case 151 /* TypePredicate */: return checkTypePredicate(node); - case 154 /* TypeQuery */: + case 155 /* TypeQuery */: return checkTypeQuery(node); - case 155 /* TypeLiteral */: + case 156 /* TypeLiteral */: return checkTypeLiteral(node); - case 156 /* ArrayType */: + case 157 /* ArrayType */: return checkArrayType(node); - case 157 /* TupleType */: + case 158 /* TupleType */: return checkTupleType(node); - case 158 /* UnionType */: - case 159 /* IntersectionType */: + case 159 /* UnionType */: + case 160 /* IntersectionType */: return checkUnionOrIntersectionType(node); - case 160 /* ParenthesizedType */: + case 161 /* ParenthesizedType */: return checkSourceElement(node.type); - case 215 /* FunctionDeclaration */: + case 216 /* FunctionDeclaration */: return checkFunctionDeclaration(node); - case 194 /* Block */: - case 221 /* ModuleBlock */: + case 195 /* Block */: + case 222 /* ModuleBlock */: return checkBlock(node); - case 195 /* VariableStatement */: + case 196 /* VariableStatement */: return checkVariableStatement(node); - case 197 /* ExpressionStatement */: + case 198 /* ExpressionStatement */: return checkExpressionStatement(node); - case 198 /* IfStatement */: + case 199 /* IfStatement */: return checkIfStatement(node); - case 199 /* DoStatement */: + case 200 /* DoStatement */: return checkDoStatement(node); - case 200 /* WhileStatement */: + case 201 /* WhileStatement */: return checkWhileStatement(node); - case 201 /* ForStatement */: + case 202 /* ForStatement */: return checkForStatement(node); - case 202 /* ForInStatement */: + case 203 /* ForInStatement */: return checkForInStatement(node); - case 203 /* ForOfStatement */: + case 204 /* ForOfStatement */: return checkForOfStatement(node); - case 204 /* ContinueStatement */: - case 205 /* BreakStatement */: + case 205 /* ContinueStatement */: + case 206 /* BreakStatement */: return checkBreakOrContinueStatement(node); - case 206 /* ReturnStatement */: + case 207 /* ReturnStatement */: return checkReturnStatement(node); - case 207 /* WithStatement */: + case 208 /* WithStatement */: return checkWithStatement(node); - case 208 /* SwitchStatement */: + case 209 /* SwitchStatement */: return checkSwitchStatement(node); - case 209 /* LabeledStatement */: + case 210 /* LabeledStatement */: return checkLabeledStatement(node); - case 210 /* ThrowStatement */: + case 211 /* ThrowStatement */: return checkThrowStatement(node); - case 211 /* TryStatement */: + case 212 /* TryStatement */: return checkTryStatement(node); - case 213 /* VariableDeclaration */: + case 214 /* VariableDeclaration */: return checkVariableDeclaration(node); - case 165 /* BindingElement */: + case 166 /* BindingElement */: return checkBindingElement(node); - case 216 /* ClassDeclaration */: + case 217 /* ClassDeclaration */: return checkClassDeclaration(node); - case 217 /* InterfaceDeclaration */: + case 218 /* InterfaceDeclaration */: return checkInterfaceDeclaration(node); - case 218 /* TypeAliasDeclaration */: + case 219 /* TypeAliasDeclaration */: return checkTypeAliasDeclaration(node); - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: return checkEnumDeclaration(node); - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: return checkModuleDeclaration(node); - case 224 /* ImportDeclaration */: + case 225 /* ImportDeclaration */: return checkImportDeclaration(node); - case 223 /* ImportEqualsDeclaration */: + case 224 /* ImportEqualsDeclaration */: return checkImportEqualsDeclaration(node); - case 230 /* ExportDeclaration */: + case 231 /* ExportDeclaration */: return checkExportDeclaration(node); - case 229 /* ExportAssignment */: + case 230 /* ExportAssignment */: return checkExportAssignment(node); - case 196 /* EmptyStatement */: + case 197 /* EmptyStatement */: checkGrammarStatementInAmbientContext(node); return; - case 212 /* DebuggerStatement */: + case 213 /* DebuggerStatement */: checkGrammarStatementInAmbientContext(node); return; - case 233 /* MissingDeclaration */: + case 234 /* MissingDeclaration */: return checkMissingDeclaration(node); } } @@ -27384,17 +27744,17 @@ var ts; for (var _i = 0, deferredNodes_1 = deferredNodes; _i < deferredNodes_1.length; _i++) { var node = deferredNodes_1[_i]; switch (node.kind) { - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: checkFunctionExpressionOrObjectLiteralMethodDeferred(node); break; - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: checkAccessorDeferred(node); break; - case 188 /* ClassExpression */: + case 189 /* ClassExpression */: checkClassExpressionDeferred(node); break; } @@ -27420,10 +27780,6 @@ var ts; } // Grammar checking checkGrammarSourceFile(node); - emitExtends = false; - emitDecorate = false; - emitParam = false; - emitAwaiter = false; potentialThisCollisions.length = 0; deferredNodes = []; ts.forEach(node.statements, checkSourceElement); @@ -27436,21 +27792,6 @@ var ts; ts.forEach(potentialThisCollisions, checkIfThisIsCapturedInEnclosingScope); potentialThisCollisions.length = 0; } - if (emitExtends) { - links.flags |= 8 /* EmitExtends */; - } - if (emitDecorate) { - links.flags |= 16 /* EmitDecorate */; - } - if (emitParam) { - links.flags |= 32 /* EmitParam */; - } - if (emitAwaiter) { - links.flags |= 64 /* EmitAwaiter */; - } - if (emitGenerator || (emitAwaiter && languageVersion < 2 /* ES6 */)) { - links.flags |= 128 /* EmitGenerator */; - } links.flags |= 1 /* TypeChecked */; } } @@ -27488,7 +27829,7 @@ var ts; function isInsideWithStatementBody(node) { if (node) { while (node.parent) { - if (node.parent.kind === 207 /* WithStatement */ && node.parent.statement === node) { + if (node.parent.kind === 208 /* WithStatement */ && node.parent.statement === node) { return true; } node = node.parent; @@ -27511,25 +27852,25 @@ var ts; copySymbols(location.locals, meaning); } switch (location.kind) { - case 250 /* SourceFile */: + case 251 /* SourceFile */: if (!ts.isExternalOrCommonJsModule(location)) { break; } - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: copySymbols(getSymbolOfNode(location).exports, meaning & 8914931 /* ModuleMember */); break; - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: copySymbols(getSymbolOfNode(location).exports, meaning & 8 /* EnumMember */); break; - case 188 /* ClassExpression */: + case 189 /* ClassExpression */: var className = location.name; if (className) { copySymbol(location.symbol, meaning); } // fall through; this fall-through is necessary because we would like to handle // type parameter inside class expression similar to how we handle it in classDeclaration and interface Declaration - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: // If we didn't come from static member of class or interface, // add the type parameters into the symbol table // (type parameters of classDeclaration/classExpression and interface are in member property of the symbol. @@ -27538,7 +27879,7 @@ var ts; copySymbols(getSymbolOfNode(location).members, meaning & 793056 /* Type */); } break; - case 175 /* FunctionExpression */: + case 176 /* FunctionExpression */: var funcName = location.name; if (funcName) { copySymbol(location.symbol, meaning); @@ -27587,37 +27928,37 @@ var ts; } function isTypeDeclaration(node) { switch (node.kind) { - case 137 /* TypeParameter */: - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: - case 218 /* TypeAliasDeclaration */: - case 219 /* EnumDeclaration */: + case 138 /* TypeParameter */: + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: + case 219 /* TypeAliasDeclaration */: + case 220 /* EnumDeclaration */: return true; } } // True if the given identifier is part of a type reference function isTypeReferenceIdentifier(entityName) { var node = entityName; - while (node.parent && node.parent.kind === 135 /* QualifiedName */) { + while (node.parent && node.parent.kind === 136 /* QualifiedName */) { node = node.parent; } - return node.parent && node.parent.kind === 151 /* TypeReference */; + return node.parent && node.parent.kind === 152 /* TypeReference */; } function isHeritageClauseElementIdentifier(entityName) { var node = entityName; - while (node.parent && node.parent.kind === 168 /* PropertyAccessExpression */) { + while (node.parent && node.parent.kind === 169 /* PropertyAccessExpression */) { node = node.parent; } - return node.parent && node.parent.kind === 190 /* ExpressionWithTypeArguments */; + return node.parent && node.parent.kind === 191 /* ExpressionWithTypeArguments */; } function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) { - while (nodeOnRightSide.parent.kind === 135 /* QualifiedName */) { + while (nodeOnRightSide.parent.kind === 136 /* QualifiedName */) { nodeOnRightSide = nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 223 /* ImportEqualsDeclaration */) { + if (nodeOnRightSide.parent.kind === 224 /* ImportEqualsDeclaration */) { return nodeOnRightSide.parent.moduleReference === nodeOnRightSide && nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 229 /* ExportAssignment */) { + if (nodeOnRightSide.parent.kind === 230 /* ExportAssignment */) { return nodeOnRightSide.parent.expression === nodeOnRightSide && nodeOnRightSide.parent; } return undefined; @@ -27629,11 +27970,11 @@ var ts; if (ts.isDeclarationName(entityName)) { return getSymbolOfNode(entityName.parent); } - if (entityName.parent.kind === 229 /* ExportAssignment */) { + if (entityName.parent.kind === 230 /* ExportAssignment */) { return resolveEntityName(entityName, /*all meanings*/ 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */ | 8388608 /* Alias */); } - if (entityName.kind !== 168 /* PropertyAccessExpression */) { + if (entityName.kind !== 169 /* PropertyAccessExpression */) { if (isInRightSideOfImportOrExportAssignment(entityName)) { // Since we already checked for ExportAssignment, this really could only be an Import return getSymbolOfPartOfRightHandSideOfImportEquals(entityName); @@ -27645,7 +27986,7 @@ var ts; if (isHeritageClauseElementIdentifier(entityName)) { var meaning = 0 /* None */; // In an interface or class, we're definitely interested in a type. - if (entityName.parent.kind === 190 /* ExpressionWithTypeArguments */) { + if (entityName.parent.kind === 191 /* ExpressionWithTypeArguments */) { meaning = 793056 /* Type */; // In a class 'extends' clause we are also looking for a value. if (ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) { @@ -27658,9 +27999,9 @@ var ts; meaning |= 8388608 /* Alias */; return resolveEntityName(entityName, meaning); } - else if ((entityName.parent.kind === 237 /* JsxOpeningElement */) || - (entityName.parent.kind === 236 /* JsxSelfClosingElement */) || - (entityName.parent.kind === 239 /* JsxClosingElement */)) { + else if ((entityName.parent.kind === 238 /* JsxOpeningElement */) || + (entityName.parent.kind === 237 /* JsxSelfClosingElement */) || + (entityName.parent.kind === 240 /* JsxClosingElement */)) { return getJsxElementTagSymbol(entityName.parent); } else if (ts.isExpression(entityName)) { @@ -27674,14 +28015,14 @@ var ts; var meaning = 107455 /* Value */ | 8388608 /* Alias */; return resolveEntityName(entityName, meaning); } - else if (entityName.kind === 168 /* PropertyAccessExpression */) { + else if (entityName.kind === 169 /* PropertyAccessExpression */) { var symbol = getNodeLinks(entityName).resolvedSymbol; if (!symbol) { checkPropertyAccessExpression(entityName); } return getNodeLinks(entityName).resolvedSymbol; } - else if (entityName.kind === 135 /* QualifiedName */) { + else if (entityName.kind === 136 /* QualifiedName */) { var symbol = getNodeLinks(entityName).resolvedSymbol; if (!symbol) { checkQualifiedName(entityName); @@ -27690,16 +28031,16 @@ var ts; } } else if (isTypeReferenceIdentifier(entityName)) { - var meaning = entityName.parent.kind === 151 /* TypeReference */ ? 793056 /* Type */ : 1536 /* Namespace */; + var meaning = entityName.parent.kind === 152 /* TypeReference */ ? 793056 /* Type */ : 1536 /* Namespace */; // Include aliases in the meaning, this ensures that we do not follow aliases to where they point and instead // return the alias symbol. meaning |= 8388608 /* Alias */; return resolveEntityName(entityName, meaning); } - else if (entityName.parent.kind === 240 /* JsxAttribute */) { + else if (entityName.parent.kind === 241 /* JsxAttribute */) { return getJsxAttributePropertySymbol(entityName.parent); } - if (entityName.parent.kind === 150 /* TypePredicate */) { + if (entityName.parent.kind === 151 /* TypePredicate */) { return resolveEntityName(entityName, /*meaning*/ 1 /* FunctionScopedVariable */); } // Do we want to return undefined here? @@ -27716,12 +28057,12 @@ var ts; } if (node.kind === 69 /* Identifier */) { if (isInRightSideOfImportOrExportAssignment(node)) { - return node.parent.kind === 229 /* ExportAssignment */ + return node.parent.kind === 230 /* ExportAssignment */ ? getSymbolOfEntityNameOrPropertyAccessExpression(node) : getSymbolOfPartOfRightHandSideOfImportEquals(node); } - else if (node.parent.kind === 165 /* BindingElement */ && - node.parent.parent.kind === 163 /* ObjectBindingPattern */ && + else if (node.parent.kind === 166 /* BindingElement */ && + node.parent.parent.kind === 164 /* ObjectBindingPattern */ && node === node.parent.propertyName) { var typeOfPattern = getTypeOfNode(node.parent.parent); var propertyDeclaration = typeOfPattern && getPropertyOfType(typeOfPattern, node.text); @@ -27732,19 +28073,19 @@ var ts; } switch (node.kind) { case 69 /* Identifier */: - case 168 /* PropertyAccessExpression */: - case 135 /* QualifiedName */: + case 169 /* PropertyAccessExpression */: + case 136 /* QualifiedName */: return getSymbolOfEntityNameOrPropertyAccessExpression(node); case 97 /* ThisKeyword */: case 95 /* SuperKeyword */: var type = ts.isExpression(node) ? checkExpression(node) : getTypeFromTypeNode(node); return type.symbol; - case 161 /* ThisType */: + case 162 /* ThisType */: return getTypeFromTypeNode(node).symbol; case 121 /* ConstructorKeyword */: // constructor keyword for an overload, should take us to the definition if it exist var constructorDeclaration = node.parent; - if (constructorDeclaration && constructorDeclaration.kind === 144 /* Constructor */) { + if (constructorDeclaration && constructorDeclaration.kind === 145 /* Constructor */) { return constructorDeclaration.parent.symbol; } return undefined; @@ -27752,14 +28093,14 @@ var ts; // External module name in an import declaration if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) || - ((node.parent.kind === 224 /* ImportDeclaration */ || node.parent.kind === 230 /* ExportDeclaration */) && + ((node.parent.kind === 225 /* ImportDeclaration */ || node.parent.kind === 231 /* ExportDeclaration */) && node.parent.moduleSpecifier === node)) { return resolveExternalModuleName(node, node); } // Fall through case 8 /* NumericLiteral */: // index access - if (node.parent.kind === 169 /* ElementAccessExpression */ && node.parent.argumentExpression === node) { + if (node.parent.kind === 170 /* ElementAccessExpression */ && node.parent.argumentExpression === node) { var objectType = checkExpression(node.parent.expression); if (objectType === unknownType) return undefined; @@ -27776,11 +28117,17 @@ var ts; // The function returns a value symbol of an identifier in the short-hand property assignment. // This is necessary as an identifier in short-hand property assignment can contains two meaning: // property name and property value. - if (location && location.kind === 248 /* ShorthandPropertyAssignment */) { - return resolveEntityName(location.name, 107455 /* Value */); + if (location && location.kind === 249 /* ShorthandPropertyAssignment */) { + return resolveEntityName(location.name, 107455 /* Value */ | 8388608 /* Alias */); } return undefined; } + /** Returns the target of an export specifier without following aliases */ + function getExportSpecifierLocalTargetSymbol(node) { + return node.parent.parent.moduleSpecifier ? + getExternalModuleMember(node.parent.parent, node) : + resolveEntityName(node.propertyName || node.name, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */ | 8388608 /* Alias */); + } function getTypeOfNode(node) { if (isInsideWithStatementBody(node)) { // We cannot answer semantic questions within a with block, do not proceed any further @@ -27858,9 +28205,9 @@ var ts; function getRootSymbols(symbol) { if (symbol.flags & 268435456 /* SyntheticProperty */) { var symbols = []; - var name_15 = symbol.name; + var name_18 = symbol.name; ts.forEach(getSymbolLinks(symbol).containingType.types, function (t) { - var symbol = getPropertyOfType(t, name_15); + var symbol = getPropertyOfType(t, name_18); if (symbol) { symbols.push(symbol); } @@ -27920,11 +28267,11 @@ var ts; } var parentSymbol = getParentOfSymbol(symbol); if (parentSymbol) { - if (parentSymbol.flags & 512 /* ValueModule */ && parentSymbol.valueDeclaration.kind === 250 /* SourceFile */) { + if (parentSymbol.flags & 512 /* ValueModule */ && parentSymbol.valueDeclaration.kind === 251 /* SourceFile */) { return parentSymbol.valueDeclaration; } for (var n = node.parent; n; n = n.parent) { - if ((n.kind === 220 /* ModuleDeclaration */ || n.kind === 219 /* EnumDeclaration */) && getSymbolOfNode(n) === parentSymbol) { + if ((n.kind === 221 /* ModuleDeclaration */ || n.kind === 220 /* EnumDeclaration */) && getSymbolOfNode(n) === parentSymbol) { return n; } } @@ -27939,11 +28286,11 @@ var ts; } function isStatementWithLocals(node) { switch (node.kind) { - case 194 /* Block */: - case 222 /* CaseBlock */: - case 201 /* ForStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: + case 195 /* Block */: + case 223 /* CaseBlock */: + case 202 /* ForStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: return true; } return false; @@ -27973,22 +28320,22 @@ var ts; } function isValueAliasDeclaration(node) { switch (node.kind) { - case 223 /* ImportEqualsDeclaration */: - case 225 /* ImportClause */: - case 226 /* NamespaceImport */: - case 228 /* ImportSpecifier */: - case 232 /* ExportSpecifier */: + case 224 /* ImportEqualsDeclaration */: + case 226 /* ImportClause */: + case 227 /* NamespaceImport */: + case 229 /* ImportSpecifier */: + case 233 /* ExportSpecifier */: return isAliasResolvedToValue(getSymbolOfNode(node)); - case 230 /* ExportDeclaration */: + case 231 /* ExportDeclaration */: var exportClause = node.exportClause; return exportClause && ts.forEach(exportClause.elements, isValueAliasDeclaration); - case 229 /* ExportAssignment */: + case 230 /* ExportAssignment */: return node.expression && node.expression.kind === 69 /* Identifier */ ? isAliasResolvedToValue(getSymbolOfNode(node)) : true; } return false; } function isTopLevelValueImportEqualsWithEntityName(node) { - if (node.parent.kind !== 250 /* SourceFile */ || !ts.isInternalModuleImportEqualsDeclaration(node)) { + if (node.parent.kind !== 251 /* SourceFile */ || !ts.isInternalModuleImportEqualsDeclaration(node)) { // parent is not source file or it is not reference to internal module return false; } @@ -28050,7 +28397,7 @@ var ts; return getNodeLinks(node).enumMemberValue; } function getConstantValue(node) { - if (node.kind === 249 /* EnumMember */) { + if (node.kind === 250 /* EnumMember */) { return getEnumMemberValue(node); } var symbol = getNodeLinks(node).resolvedSymbol; @@ -28172,23 +28519,38 @@ var ts; } function getExternalModuleFileFromDeclaration(declaration) { var specifier = ts.getExternalModuleName(declaration); - var moduleSymbol = getSymbolAtLocation(specifier); + var moduleSymbol = resolveExternalModuleNameWorker(specifier, specifier, /*moduleNotFoundError*/ undefined); if (!moduleSymbol) { return undefined; } - return ts.getDeclarationOfKind(moduleSymbol, 250 /* SourceFile */); + return ts.getDeclarationOfKind(moduleSymbol, 251 /* SourceFile */); } function initializeTypeChecker() { // Bind all source files and propagate errors ts.forEach(host.getSourceFiles(), function (file) { ts.bindSourceFile(file, compilerOptions); }); + var augmentations; // Initialize global symbol table ts.forEach(host.getSourceFiles(), function (file) { if (!ts.isExternalOrCommonJsModule(file)) { mergeSymbolTable(globals, file.locals); } + if (file.moduleAugmentations) { + (augmentations || (augmentations = [])).push(file.moduleAugmentations); + } }); + if (augmentations) { + // merge module augmentations. + // this needs to be done after global symbol table is initialized to make sure that all ambient modules are indexed + for (var _i = 0, augmentations_1 = augmentations; _i < augmentations_1.length; _i++) { + var list = augmentations_1[_i]; + for (var _a = 0, list_2 = list; _a < list_2.length; _a++) { + var augmentation = list_2[_a]; + mergeModuleAugmentation(augmentation); + } + } + } // Setup global builtins addToSymbolTable(globals, builtinGlobals, ts.Diagnostics.Declaration_name_conflicts_with_built_in_global_identifier_0); getSymbolLinks(undefinedSymbol).type = undefinedType; @@ -28262,14 +28624,14 @@ var ts; return false; } if (!ts.nodeCanBeDecorated(node)) { - if (node.kind === 143 /* MethodDeclaration */ && !ts.nodeIsPresent(node.body)) { + if (node.kind === 144 /* MethodDeclaration */ && !ts.nodeIsPresent(node.body)) { return grammarErrorOnFirstToken(node, ts.Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload); } else { return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_are_not_valid_here); } } - else if (node.kind === 145 /* GetAccessor */ || node.kind === 146 /* SetAccessor */) { + else if (node.kind === 146 /* GetAccessor */ || node.kind === 147 /* SetAccessor */) { var accessors = ts.getAllAccessorDeclarations(node.parent.members, node); if (accessors.firstAccessor.decorators && node === accessors.secondAccessor) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); @@ -28279,38 +28641,38 @@ var ts; } function checkGrammarModifiers(node) { switch (node.kind) { - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 144 /* Constructor */: - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 149 /* IndexSignature */: - case 220 /* ModuleDeclaration */: - case 224 /* ImportDeclaration */: - case 223 /* ImportEqualsDeclaration */: - case 230 /* ExportDeclaration */: - case 229 /* ExportAssignment */: - case 138 /* Parameter */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 145 /* Constructor */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 150 /* IndexSignature */: + case 221 /* ModuleDeclaration */: + case 225 /* ImportDeclaration */: + case 224 /* ImportEqualsDeclaration */: + case 231 /* ExportDeclaration */: + case 230 /* ExportAssignment */: + case 139 /* Parameter */: break; - case 215 /* FunctionDeclaration */: + case 216 /* FunctionDeclaration */: if (node.modifiers && (node.modifiers.length > 1 || node.modifiers[0].kind !== 118 /* AsyncKeyword */) && - node.parent.kind !== 221 /* ModuleBlock */ && node.parent.kind !== 250 /* SourceFile */) { + node.parent.kind !== 222 /* ModuleBlock */ && node.parent.kind !== 251 /* SourceFile */) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); } break; - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: - case 195 /* VariableStatement */: - case 218 /* TypeAliasDeclaration */: - if (node.modifiers && node.parent.kind !== 221 /* ModuleBlock */ && node.parent.kind !== 250 /* SourceFile */) { + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: + case 196 /* VariableStatement */: + case 219 /* TypeAliasDeclaration */: + if (node.modifiers && node.parent.kind !== 222 /* ModuleBlock */ && node.parent.kind !== 251 /* SourceFile */) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); } break; - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: if (node.modifiers && (node.modifiers.length > 1 || node.modifiers[0].kind !== 74 /* ConstKeyword */) && - node.parent.kind !== 221 /* ModuleBlock */ && node.parent.kind !== 250 /* SourceFile */) { + node.parent.kind !== 222 /* ModuleBlock */ && node.parent.kind !== 251 /* SourceFile */) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); } break; @@ -28326,7 +28688,7 @@ var ts; var modifier = _a[_i]; switch (modifier.kind) { case 74 /* ConstKeyword */: - if (node.kind !== 219 /* EnumDeclaration */ && node.parent.kind === 216 /* ClassDeclaration */) { + if (node.kind !== 220 /* EnumDeclaration */ && node.parent.kind === 217 /* ClassDeclaration */) { return grammarErrorOnNode(node, ts.Diagnostics.A_class_member_cannot_have_the_0_keyword, ts.tokenToString(74 /* ConstKeyword */)); } break; @@ -28354,7 +28716,7 @@ var ts; else if (flags & 256 /* Async */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "async"); } - else if (node.parent.kind === 221 /* ModuleBlock */ || node.parent.kind === 250 /* SourceFile */) { + else if (node.parent.kind === 222 /* ModuleBlock */ || node.parent.kind === 251 /* SourceFile */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_element, text); } else if (flags & 128 /* Abstract */) { @@ -28374,10 +28736,10 @@ var ts; else if (flags & 256 /* Async */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "static", "async"); } - else if (node.parent.kind === 221 /* ModuleBlock */ || node.parent.kind === 250 /* SourceFile */) { + else if (node.parent.kind === 222 /* ModuleBlock */ || node.parent.kind === 251 /* SourceFile */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_element, "static"); } - else if (node.kind === 138 /* Parameter */) { + else if (node.kind === 139 /* Parameter */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static"); } else if (flags & 128 /* Abstract */) { @@ -28399,10 +28761,10 @@ var ts; else if (flags & 256 /* Async */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "export", "async"); } - else if (node.parent.kind === 216 /* ClassDeclaration */) { + else if (node.parent.kind === 217 /* ClassDeclaration */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "export"); } - else if (node.kind === 138 /* Parameter */) { + else if (node.kind === 139 /* Parameter */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export"); } flags |= 2 /* Export */; @@ -28414,13 +28776,13 @@ var ts; else if (flags & 256 /* Async */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); } - else if (node.parent.kind === 216 /* ClassDeclaration */) { + else if (node.parent.kind === 217 /* ClassDeclaration */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "declare"); } - else if (node.kind === 138 /* Parameter */) { + else if (node.kind === 139 /* Parameter */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare"); } - else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 221 /* ModuleBlock */) { + else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 222 /* ModuleBlock */) { return grammarErrorOnNode(modifier, ts.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } flags |= 4 /* Ambient */; @@ -28430,11 +28792,11 @@ var ts; if (flags & 128 /* Abstract */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "abstract"); } - if (node.kind !== 216 /* ClassDeclaration */) { - if (node.kind !== 143 /* MethodDeclaration */) { + if (node.kind !== 217 /* ClassDeclaration */) { + if (node.kind !== 144 /* MethodDeclaration */) { return grammarErrorOnNode(modifier, ts.Diagnostics.abstract_modifier_can_only_appear_on_a_class_or_method_declaration); } - if (!(node.parent.kind === 216 /* ClassDeclaration */ && node.parent.flags & 128 /* Abstract */)) { + if (!(node.parent.kind === 217 /* ClassDeclaration */ && node.parent.flags & 128 /* Abstract */)) { return grammarErrorOnNode(modifier, ts.Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class); } if (flags & 64 /* Static */) { @@ -28453,7 +28815,7 @@ var ts; else if (flags & 4 /* Ambient */ || ts.isInAmbientContext(node.parent)) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); } - else if (node.kind === 138 /* Parameter */) { + else if (node.kind === 139 /* Parameter */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); } flags |= 256 /* Async */; @@ -28461,7 +28823,7 @@ var ts; break; } } - if (node.kind === 144 /* Constructor */) { + if (node.kind === 145 /* Constructor */) { if (flags & 64 /* Static */) { return grammarErrorOnNode(lastStatic, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); } @@ -28479,10 +28841,10 @@ var ts; } return; } - else if ((node.kind === 224 /* ImportDeclaration */ || node.kind === 223 /* ImportEqualsDeclaration */) && flags & 4 /* Ambient */) { + else if ((node.kind === 225 /* ImportDeclaration */ || node.kind === 224 /* ImportEqualsDeclaration */) && flags & 4 /* Ambient */) { return grammarErrorOnNode(lastDeclare, ts.Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); } - else if (node.kind === 138 /* Parameter */ && (flags & 56 /* AccessibilityModifier */) && ts.isBindingPattern(node.name)) { + else if (node.kind === 139 /* Parameter */ && (flags & 56 /* AccessibilityModifier */) && ts.isBindingPattern(node.name)) { return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_may_not_be_a_binding_pattern); } if (flags & 256 /* Async */) { @@ -28494,10 +28856,10 @@ var ts; return grammarErrorOnNode(asyncModifier, ts.Diagnostics.Async_functions_are_only_available_when_targeting_ECMAScript_6_and_higher); } switch (node.kind) { - case 143 /* MethodDeclaration */: - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: + case 144 /* MethodDeclaration */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: if (!node.asteriskToken) { return false; } @@ -28563,7 +28925,7 @@ var ts; checkGrammarParameterList(node.parameters) || checkGrammarArrowFunction(node, file); } function checkGrammarArrowFunction(node, file) { - if (node.kind === 176 /* ArrowFunction */) { + if (node.kind === 177 /* ArrowFunction */) { var arrowFunction = node; var startLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.pos).line; var endLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.end).line; @@ -28631,7 +28993,7 @@ var ts; var sourceFile = ts.getSourceFileOfNode(node); for (var _i = 0, args_1 = args; _i < args_1.length; _i++) { var arg = args_1[_i]; - if (arg.kind === 189 /* OmittedExpression */) { + if (arg.kind === 190 /* OmittedExpression */) { return grammarErrorAtPos(sourceFile, arg.pos, 0, ts.Diagnostics.Argument_expression_expected); } } @@ -28705,19 +29067,19 @@ var ts; } function checkGrammarComputedPropertyName(node) { // If node is not a computedPropertyName, just skip the grammar checking - if (node.kind !== 136 /* ComputedPropertyName */) { + if (node.kind !== 137 /* ComputedPropertyName */) { return false; } var computedPropertyName = node; - if (computedPropertyName.expression.kind === 183 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 24 /* CommaToken */) { + if (computedPropertyName.expression.kind === 184 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 24 /* CommaToken */) { return grammarErrorOnNode(computedPropertyName.expression, ts.Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name); } } function checkGrammarForGenerator(node) { if (node.asteriskToken) { - ts.Debug.assert(node.kind === 215 /* FunctionDeclaration */ || - node.kind === 175 /* FunctionExpression */ || - node.kind === 143 /* MethodDeclaration */); + ts.Debug.assert(node.kind === 216 /* FunctionDeclaration */ || + node.kind === 176 /* FunctionExpression */ || + node.kind === 144 /* MethodDeclaration */); if (ts.isInAmbientContext(node)) { return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_not_allowed_in_an_ambient_context); } @@ -28741,21 +29103,21 @@ var ts; var SetAccesor = 4; var GetOrSetAccessor = GetAccessor | SetAccesor; var _loop_1 = function(prop) { - var name_16 = prop.name; - if (prop.kind === 189 /* OmittedExpression */ || - name_16.kind === 136 /* ComputedPropertyName */) { + var name_19 = prop.name; + if (prop.kind === 190 /* OmittedExpression */ || + name_19.kind === 137 /* ComputedPropertyName */) { // If the name is not a ComputedPropertyName, the grammar checking will skip it - checkGrammarComputedPropertyName(name_16); + checkGrammarComputedPropertyName(name_19); return "continue"; } - if (prop.kind === 248 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { + if (prop.kind === 249 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { // having objectAssignmentInitializer is only valid in ObjectAssignmentPattern // outside of destructuring it is a syntax error return { value: grammarErrorOnNode(prop.equalsToken, ts.Diagnostics.can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment) }; } // Modifiers are never allowed on properties except for 'async' on a method declaration ts.forEach(prop.modifiers, function (mod) { - if (mod.kind !== 118 /* AsyncKeyword */ || prop.kind !== 143 /* MethodDeclaration */) { + if (mod.kind !== 118 /* AsyncKeyword */ || prop.kind !== 144 /* MethodDeclaration */) { grammarErrorOnNode(mod, ts.Diagnostics._0_modifier_cannot_be_used_here, ts.getTextOfNode(mod)); } }); @@ -28768,44 +29130,44 @@ var ts; // d.IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true // and either both previous and propId.descriptor have[[Get]] fields or both previous and propId.descriptor have[[Set]] fields var currentKind = void 0; - if (prop.kind === 247 /* PropertyAssignment */ || prop.kind === 248 /* ShorthandPropertyAssignment */) { + if (prop.kind === 248 /* PropertyAssignment */ || prop.kind === 249 /* ShorthandPropertyAssignment */) { // Grammar checking for computedPropertName and shorthandPropertyAssignment checkGrammarForInvalidQuestionMark(prop, prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional); - if (name_16.kind === 8 /* NumericLiteral */) { - checkGrammarNumericLiteral(name_16); + if (name_19.kind === 8 /* NumericLiteral */) { + checkGrammarNumericLiteral(name_19); } currentKind = Property; } - else if (prop.kind === 143 /* MethodDeclaration */) { + else if (prop.kind === 144 /* MethodDeclaration */) { currentKind = Property; } - else if (prop.kind === 145 /* GetAccessor */) { + else if (prop.kind === 146 /* GetAccessor */) { currentKind = GetAccessor; } - else if (prop.kind === 146 /* SetAccessor */) { + else if (prop.kind === 147 /* SetAccessor */) { currentKind = SetAccesor; } else { ts.Debug.fail("Unexpected syntax kind:" + prop.kind); } - if (!ts.hasProperty(seen, name_16.text)) { - seen[name_16.text] = currentKind; + if (!ts.hasProperty(seen, name_19.text)) { + seen[name_19.text] = currentKind; } else { - var existingKind = seen[name_16.text]; + var existingKind = seen[name_19.text]; if (currentKind === Property && existingKind === Property) { return "continue"; } else if ((currentKind & GetOrSetAccessor) && (existingKind & GetOrSetAccessor)) { if (existingKind !== GetOrSetAccessor && currentKind !== existingKind) { - seen[name_16.text] = currentKind | existingKind; + seen[name_19.text] = currentKind | existingKind; } else { - return { value: grammarErrorOnNode(name_16, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name) }; + return { value: grammarErrorOnNode(name_19, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name) }; } } else { - return { value: grammarErrorOnNode(name_16, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name) }; + return { value: grammarErrorOnNode(name_19, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name) }; } } }; @@ -28820,19 +29182,19 @@ var ts; var seen = {}; for (var _i = 0, _a = node.attributes; _i < _a.length; _i++) { var attr = _a[_i]; - if (attr.kind === 241 /* JsxSpreadAttribute */) { + if (attr.kind === 242 /* JsxSpreadAttribute */) { continue; } var jsxAttr = attr; - var name_17 = jsxAttr.name; - if (!ts.hasProperty(seen, name_17.text)) { - seen[name_17.text] = true; + var name_20 = jsxAttr.name; + if (!ts.hasProperty(seen, name_20.text)) { + seen[name_20.text] = true; } else { - return grammarErrorOnNode(name_17, ts.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); + return grammarErrorOnNode(name_20, ts.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); } var initializer = jsxAttr.initializer; - if (initializer && initializer.kind === 242 /* JsxExpression */ && !initializer.expression) { + if (initializer && initializer.kind === 243 /* JsxExpression */ && !initializer.expression) { return grammarErrorOnNode(jsxAttr.initializer, ts.Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression); } } @@ -28841,7 +29203,7 @@ var ts; if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) { return true; } - if (forInOrOfStatement.initializer.kind === 214 /* VariableDeclarationList */) { + if (forInOrOfStatement.initializer.kind === 215 /* VariableDeclarationList */) { var variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { var declarations = variableList.declarations; @@ -28856,20 +29218,20 @@ var ts; return false; } if (declarations.length > 1) { - var diagnostic = forInOrOfStatement.kind === 202 /* ForInStatement */ + var diagnostic = forInOrOfStatement.kind === 203 /* ForInStatement */ ? ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic); } var firstDeclaration = declarations[0]; if (firstDeclaration.initializer) { - var diagnostic = forInOrOfStatement.kind === 202 /* ForInStatement */ + var diagnostic = forInOrOfStatement.kind === 203 /* ForInStatement */ ? ts.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : ts.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; return grammarErrorOnNode(firstDeclaration.name, diagnostic); } if (firstDeclaration.type) { - var diagnostic = forInOrOfStatement.kind === 202 /* ForInStatement */ + var diagnostic = forInOrOfStatement.kind === 203 /* ForInStatement */ ? ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; return grammarErrorOnNode(firstDeclaration, diagnostic); @@ -28892,10 +29254,10 @@ var ts; else if (accessor.typeParameters) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.An_accessor_cannot_have_type_parameters); } - else if (kind === 145 /* GetAccessor */ && accessor.parameters.length) { + else if (kind === 146 /* GetAccessor */ && accessor.parameters.length) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_get_accessor_cannot_have_parameters); } - else if (kind === 146 /* SetAccessor */) { + else if (kind === 147 /* SetAccessor */) { if (accessor.type) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } @@ -28930,12 +29292,12 @@ var ts; checkGrammarForGenerator(node)) { return true; } - if (node.parent.kind === 167 /* ObjectLiteralExpression */) { + if (node.parent.kind === 168 /* ObjectLiteralExpression */) { if (checkGrammarForInvalidQuestionMark(node, node.questionToken, ts.Diagnostics.A_class_member_cannot_be_declared_optional)) { return true; } else if (node.body === undefined) { - return grammarErrorAtPos(getSourceFile(node), node.end - 1, ";".length, ts.Diagnostics._0_expected, "{"); + return grammarErrorAtPos(ts.getSourceFileOfNode(node), node.end - 1, ";".length, ts.Diagnostics._0_expected, "{"); } } if (ts.isClassLike(node.parent)) { @@ -28954,10 +29316,10 @@ var ts; return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol); } } - else if (node.parent.kind === 217 /* InterfaceDeclaration */) { + else if (node.parent.kind === 218 /* InterfaceDeclaration */) { return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol); } - else if (node.parent.kind === 155 /* TypeLiteral */) { + else if (node.parent.kind === 156 /* TypeLiteral */) { return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol); } } @@ -28968,11 +29330,11 @@ var ts; return grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary); } switch (current.kind) { - case 209 /* LabeledStatement */: + case 210 /* LabeledStatement */: if (node.label && current.label.text === node.label.text) { // found matching label - verify that label usage is correct // continue can only target labels that are on iteration statements - var isMisplacedContinueLabel = node.kind === 204 /* ContinueStatement */ + var isMisplacedContinueLabel = node.kind === 205 /* ContinueStatement */ && !ts.isIterationStatement(current.statement, /*lookInLabeledStatement*/ true); if (isMisplacedContinueLabel) { return grammarErrorOnNode(node, ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement); @@ -28980,8 +29342,8 @@ var ts; return false; } break; - case 208 /* SwitchStatement */: - if (node.kind === 205 /* BreakStatement */ && !node.label) { + case 209 /* SwitchStatement */: + if (node.kind === 206 /* BreakStatement */ && !node.label) { // unlabeled break within switch statement - ok return false; } @@ -28996,13 +29358,13 @@ var ts; current = current.parent; } if (node.label) { - var message = node.kind === 205 /* BreakStatement */ + var message = node.kind === 206 /* BreakStatement */ ? ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } else { - var message = node.kind === 205 /* BreakStatement */ + var message = node.kind === 206 /* BreakStatement */ ? ts.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : ts.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); @@ -29014,7 +29376,7 @@ var ts; if (node !== ts.lastOrUndefined(elements)) { return grammarErrorOnNode(node, ts.Diagnostics.A_rest_element_must_be_last_in_an_array_destructuring_pattern); } - if (node.name.kind === 164 /* ArrayBindingPattern */ || node.name.kind === 163 /* ObjectBindingPattern */) { + if (node.name.kind === 165 /* ArrayBindingPattern */ || node.name.kind === 164 /* ObjectBindingPattern */) { return grammarErrorOnNode(node.name, ts.Diagnostics.A_rest_element_cannot_contain_a_binding_pattern); } if (node.initializer) { @@ -29024,7 +29386,7 @@ var ts; } } function checkGrammarVariableDeclaration(node) { - if (node.parent.parent.kind !== 202 /* ForInStatement */ && node.parent.parent.kind !== 203 /* ForOfStatement */) { + if (node.parent.parent.kind !== 203 /* ForInStatement */ && node.parent.parent.kind !== 204 /* ForOfStatement */) { if (ts.isInAmbientContext(node)) { if (node.initializer) { // Error on equals token which immediate precedes the initializer @@ -29060,7 +29422,7 @@ var ts; var elements = name.elements; for (var _i = 0, elements_2 = elements; _i < elements_2.length; _i++) { var element = elements_2[_i]; - if (element.kind !== 189 /* OmittedExpression */) { + if (element.kind !== 190 /* OmittedExpression */) { checkGrammarNameInLetOrConstDeclarations(element.name); } } @@ -29077,15 +29439,15 @@ var ts; } function allowLetAndConstDeclarations(parent) { switch (parent.kind) { - case 198 /* IfStatement */: - case 199 /* DoStatement */: - case 200 /* WhileStatement */: - case 207 /* WithStatement */: - case 201 /* ForStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: + case 199 /* IfStatement */: + case 200 /* DoStatement */: + case 201 /* WhileStatement */: + case 208 /* WithStatement */: + case 202 /* ForStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: return false; - case 209 /* LabeledStatement */: + case 210 /* LabeledStatement */: return allowLetAndConstDeclarations(parent.parent); } return true; @@ -29141,7 +29503,7 @@ var ts; return true; } } - else if (node.parent.kind === 217 /* InterfaceDeclaration */) { + else if (node.parent.kind === 218 /* InterfaceDeclaration */) { if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol)) { return true; } @@ -29149,7 +29511,7 @@ var ts; return grammarErrorOnNode(node.initializer, ts.Diagnostics.An_interface_property_cannot_have_an_initializer); } } - else if (node.parent.kind === 155 /* TypeLiteral */) { + else if (node.parent.kind === 156 /* TypeLiteral */) { if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol)) { return true; } @@ -29174,12 +29536,12 @@ var ts; // export_opt AmbientDeclaration // // TODO: The spec needs to be amended to reflect this grammar. - if (node.kind === 217 /* InterfaceDeclaration */ || - node.kind === 218 /* TypeAliasDeclaration */ || - node.kind === 224 /* ImportDeclaration */ || - node.kind === 223 /* ImportEqualsDeclaration */ || - node.kind === 230 /* ExportDeclaration */ || - node.kind === 229 /* ExportAssignment */ || + if (node.kind === 218 /* InterfaceDeclaration */ || + node.kind === 219 /* TypeAliasDeclaration */ || + node.kind === 225 /* ImportDeclaration */ || + node.kind === 224 /* ImportEqualsDeclaration */ || + node.kind === 231 /* ExportDeclaration */ || + node.kind === 230 /* ExportAssignment */ || (node.flags & 4 /* Ambient */) || (node.flags & (2 /* Export */ | 512 /* Default */))) { return false; @@ -29189,7 +29551,7 @@ var ts; function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) { for (var _i = 0, _a = file.statements; _i < _a.length; _i++) { var decl = _a[_i]; - if (ts.isDeclaration(decl) || decl.kind === 195 /* VariableStatement */) { + if (ts.isDeclaration(decl) || decl.kind === 196 /* VariableStatement */) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; } @@ -29215,7 +29577,7 @@ var ts; // to prevent noisyness. So use a bit on the block to indicate if // this has already been reported, and don't report if it has. // - if (node.parent.kind === 194 /* Block */ || node.parent.kind === 221 /* ModuleBlock */ || node.parent.kind === 250 /* SourceFile */) { + if (node.parent.kind === 195 /* Block */ || node.parent.kind === 222 /* ModuleBlock */ || node.parent.kind === 251 /* SourceFile */) { var links_1 = getNodeLinks(node.parent); // Check if the containing block ever report this error if (!links_1.hasReportedStatementInAmbientContext) { @@ -29255,8 +29617,9 @@ var ts; getSourceMapData: function () { return undefined; }, setSourceFile: function (sourceFile) { }, emitStart: function (range) { }, - emitEnd: function (range) { }, + emitEnd: function (range, stopOverridingSpan) { }, emitPos: function (pos) { }, + changeEmitSourcePos: function () { }, getText: function () { return undefined; }, getSourceMappingURL: function () { return undefined; }, initialize: function (filePath, sourceMapFilePath, sourceFiles, isBundledEmit) { }, @@ -29270,6 +29633,8 @@ var ts; var compilerOptions = host.getCompilerOptions(); var currentSourceFile; var sourceMapDir; // The directory in which sourcemap will be + var stopOverridingSpan = false; + var modifyLastSourcePos = false; // Current source map file and its index in the sources list var sourceMapSourceIndex; // Last recorded and encoded spans @@ -29284,6 +29649,7 @@ var ts; emitPos: emitPos, emitStart: emitStart, emitEnd: emitEnd, + changeEmitSourcePos: changeEmitSourcePos, getText: getText, getSourceMappingURL: getSourceMappingURL, initialize: initialize, @@ -29358,6 +29724,39 @@ var ts; lastEncodedNameIndex = undefined; sourceMapData = undefined; } + function updateLastEncodedAndRecordedSpans() { + if (modifyLastSourcePos) { + // Reset the source pos + modifyLastSourcePos = false; + // Change Last recorded Map with last encoded emit line and character + lastRecordedSourceMapSpan.emittedLine = lastEncodedSourceMapSpan.emittedLine; + lastRecordedSourceMapSpan.emittedColumn = lastEncodedSourceMapSpan.emittedColumn; + // Pop sourceMapDecodedMappings to remove last entry + sourceMapData.sourceMapDecodedMappings.pop(); + // Change the last encoded source map + lastEncodedSourceMapSpan = sourceMapData.sourceMapDecodedMappings.length ? + sourceMapData.sourceMapDecodedMappings[sourceMapData.sourceMapDecodedMappings.length - 1] : + undefined; + // TODO: Update lastEncodedNameIndex + // Since we dont support this any more, lets not worry about it right now. + // When we start supporting nameIndex, we will get back to this + // Change the encoded source map + var sourceMapMappings = sourceMapData.sourceMapMappings; + var lenthToSet = sourceMapMappings.length - 1; + for (; lenthToSet >= 0; lenthToSet--) { + var currentChar = sourceMapMappings.charAt(lenthToSet); + if (currentChar === ",") { + // Separator for the entry found + break; + } + if (currentChar === ";" && lenthToSet !== 0 && sourceMapMappings.charAt(lenthToSet - 1) !== ";") { + // Last line separator found + break; + } + } + sourceMapData.sourceMapMappings = sourceMapMappings.substr(0, Math.max(0, lenthToSet)); + } + } // Encoding for sourcemap span function encodeLastRecordedSourceMapSpan() { if (!lastRecordedSourceMapSpan || lastRecordedSourceMapSpan === lastEncodedSourceMapSpan) { @@ -29388,6 +29787,7 @@ var ts; sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.sourceColumn - lastEncodedSourceMapSpan.sourceColumn); // 5. Relative namePosition 0 based if (lastRecordedSourceMapSpan.nameIndex >= 0) { + ts.Debug.assert(false, "We do not support name index right now, Make sure to update updateLastEncodedAndRecordedSpans when we start using this"); sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.nameIndex - lastEncodedNameIndex); lastEncodedNameIndex = lastRecordedSourceMapSpan.nameIndex; } @@ -29421,20 +29821,30 @@ var ts; sourceColumn: sourceLinePos.character, sourceIndex: sourceMapSourceIndex }; + stopOverridingSpan = false; } - else { + else if (!stopOverridingSpan) { // Take the new pos instead since there is no change in emittedLine and column since last location lastRecordedSourceMapSpan.sourceLine = sourceLinePos.line; lastRecordedSourceMapSpan.sourceColumn = sourceLinePos.character; lastRecordedSourceMapSpan.sourceIndex = sourceMapSourceIndex; } + updateLastEncodedAndRecordedSpans(); + } + function getStartPos(range) { + var rangeHasDecorators = !!range.decorators; + return range.pos !== -1 ? ts.skipTrivia(currentSourceFile.text, rangeHasDecorators ? range.decorators.end : range.pos) : -1; } function emitStart(range) { - var rangeHasDecorators = !!range.decorators; - emitPos(range.pos !== -1 ? ts.skipTrivia(currentSourceFile.text, rangeHasDecorators ? range.decorators.end : range.pos) : -1); + emitPos(getStartPos(range)); } - function emitEnd(range) { + function emitEnd(range, stopOverridingEnd) { emitPos(range.end); + stopOverridingSpan = stopOverridingEnd; + } + function changeEmitSourcePos() { + ts.Debug.assert(!modifyLastSourcePos); + modifyLastSourcePos = true; } function setSourceFile(sourceFile) { currentSourceFile = sourceFile; @@ -29536,6 +29946,7 @@ var ts; var writeTextOfNode; var writer = createAndSetNewTextWriterWithSymbolWriter(); var enclosingDeclaration; + var resultHasExternalModuleIndicator; var currentText; var currentLineMap; var currentIdentifiers; @@ -29577,6 +29988,7 @@ var ts; } }); } + resultHasExternalModuleIndicator = false; if (!isBundledEmit || !ts.isExternalModule(sourceFile)) { noDeclare = false; emitSourceFile(sourceFile); @@ -29596,7 +30008,7 @@ var ts; var oldWriter = writer; ts.forEach(moduleElementDeclarationEmitInfo, function (aliasEmitInfo) { if (aliasEmitInfo.isVisible && !aliasEmitInfo.asynchronousOutput) { - ts.Debug.assert(aliasEmitInfo.node.kind === 224 /* ImportDeclaration */); + ts.Debug.assert(aliasEmitInfo.node.kind === 225 /* ImportDeclaration */); createAndSetNewTextWriterWithSymbolWriter(); ts.Debug.assert(aliasEmitInfo.indent === 0 || (aliasEmitInfo.indent === 1 && isBundledEmit)); for (var i = 0; i < aliasEmitInfo.indent; i++) { @@ -29613,6 +30025,13 @@ var ts; allSourcesModuleElementDeclarationEmitInfo = allSourcesModuleElementDeclarationEmitInfo.concat(moduleElementDeclarationEmitInfo); moduleElementDeclarationEmitInfo = []; } + if (!isBundledEmit && ts.isExternalModule(sourceFile) && sourceFile.moduleAugmentations.length && !resultHasExternalModuleIndicator) { + // if file was external module with augmentations - this fact should be preserved in .d.ts as well. + // in case if we didn't write any external module specifiers in .d.ts we need to emit something + // that will force compiler to think that this file is an external module - 'export {}' is a reasonable choice here. + write("export {};"); + writeLine(); + } }); return { reportedDeclarationError: reportedDeclarationError, @@ -29659,10 +30078,10 @@ var ts; var oldWriter = writer; ts.forEach(nodes, function (declaration) { var nodeToCheck; - if (declaration.kind === 213 /* VariableDeclaration */) { + if (declaration.kind === 214 /* VariableDeclaration */) { nodeToCheck = declaration.parent.parent; } - else if (declaration.kind === 227 /* NamedImports */ || declaration.kind === 228 /* ImportSpecifier */ || declaration.kind === 225 /* ImportClause */) { + else if (declaration.kind === 228 /* NamedImports */ || declaration.kind === 229 /* ImportSpecifier */ || declaration.kind === 226 /* ImportClause */) { ts.Debug.fail("We should be getting ImportDeclaration instead to write"); } else { @@ -29680,7 +30099,7 @@ var ts; // Writing of function bar would mark alias declaration foo as visible but we haven't yet visited that declaration so do nothing, // we would write alias foo declaration when we visit it since it would now be marked as visible if (moduleElementEmitInfo) { - if (moduleElementEmitInfo.node.kind === 224 /* ImportDeclaration */) { + if (moduleElementEmitInfo.node.kind === 225 /* ImportDeclaration */) { // we have to create asynchronous output only after we have collected complete information // because it is possible to enable multiple bindings as asynchronously visible moduleElementEmitInfo.isVisible = true; @@ -29690,12 +30109,12 @@ var ts; for (var declarationIndent = moduleElementEmitInfo.indent; declarationIndent; declarationIndent--) { increaseIndent(); } - if (nodeToCheck.kind === 220 /* ModuleDeclaration */) { + if (nodeToCheck.kind === 221 /* ModuleDeclaration */) { ts.Debug.assert(asynchronousSubModuleDeclarationEmitInfo === undefined); asynchronousSubModuleDeclarationEmitInfo = []; } writeModuleElement(nodeToCheck); - if (nodeToCheck.kind === 220 /* ModuleDeclaration */) { + if (nodeToCheck.kind === 221 /* ModuleDeclaration */) { moduleElementEmitInfo.subModuleElementDeclarationEmitInfo = asynchronousSubModuleDeclarationEmitInfo; asynchronousSubModuleDeclarationEmitInfo = undefined; } @@ -29803,35 +30222,35 @@ var ts; case 120 /* BooleanKeyword */: case 131 /* SymbolKeyword */: case 103 /* VoidKeyword */: - case 161 /* ThisType */: - case 162 /* StringLiteralType */: + case 162 /* ThisType */: + case 163 /* StringLiteralType */: return writeTextOfNode(currentText, type); - case 190 /* ExpressionWithTypeArguments */: + case 191 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(type); - case 151 /* TypeReference */: + case 152 /* TypeReference */: return emitTypeReference(type); - case 154 /* TypeQuery */: + case 155 /* TypeQuery */: return emitTypeQuery(type); - case 156 /* ArrayType */: + case 157 /* ArrayType */: return emitArrayType(type); - case 157 /* TupleType */: + case 158 /* TupleType */: return emitTupleType(type); - case 158 /* UnionType */: + case 159 /* UnionType */: return emitUnionType(type); - case 159 /* IntersectionType */: + case 160 /* IntersectionType */: return emitIntersectionType(type); - case 160 /* ParenthesizedType */: + case 161 /* ParenthesizedType */: return emitParenType(type); - case 152 /* FunctionType */: - case 153 /* ConstructorType */: + case 153 /* FunctionType */: + case 154 /* ConstructorType */: return emitSignatureDeclarationWithJsDocComments(type); - case 155 /* TypeLiteral */: + case 156 /* TypeLiteral */: return emitTypeLiteral(type); case 69 /* Identifier */: return emitEntityName(type); - case 135 /* QualifiedName */: + case 136 /* QualifiedName */: return emitEntityName(type); - case 150 /* TypePredicate */: + case 151 /* TypePredicate */: return emitTypePredicate(type); } function writeEntityName(entityName) { @@ -29839,8 +30258,8 @@ var ts; writeTextOfNode(currentText, entityName); } else { - var left = entityName.kind === 135 /* QualifiedName */ ? entityName.left : entityName.expression; - var right = entityName.kind === 135 /* QualifiedName */ ? entityName.right : entityName.name; + var left = entityName.kind === 136 /* QualifiedName */ ? entityName.left : entityName.expression; + var right = entityName.kind === 136 /* QualifiedName */ ? entityName.right : entityName.name; writeEntityName(left); write("."); writeTextOfNode(currentText, right); @@ -29849,13 +30268,13 @@ var ts; function emitEntityName(entityName) { var visibilityResult = resolver.isEntityNameVisible(entityName, // Aliases can be written asynchronously so use correct enclosing declaration - entityName.parent.kind === 223 /* ImportEqualsDeclaration */ ? entityName.parent : enclosingDeclaration); + entityName.parent.kind === 224 /* ImportEqualsDeclaration */ ? entityName.parent : enclosingDeclaration); handleSymbolAccessibilityError(visibilityResult); writeEntityName(entityName); } function emitExpressionWithTypeArguments(node) { if (ts.isSupportedExpressionWithTypeArguments(node)) { - ts.Debug.assert(node.expression.kind === 69 /* Identifier */ || node.expression.kind === 168 /* PropertyAccessExpression */); + ts.Debug.assert(node.expression.kind === 69 /* Identifier */ || node.expression.kind === 169 /* PropertyAccessExpression */); emitEntityName(node.expression); if (node.typeArguments) { write("<"); @@ -29934,9 +30353,9 @@ var ts; var count = 0; while (true) { count++; - var name_18 = baseName + "_" + count; - if (!ts.hasProperty(currentIdentifiers, name_18)) { - return name_18; + var name_21 = baseName + "_" + count; + if (!ts.hasProperty(currentIdentifiers, name_21)) { + return name_21; } } } @@ -29980,10 +30399,10 @@ var ts; if (isModuleElementVisible) { writeModuleElement(node); } - else if (node.kind === 223 /* ImportEqualsDeclaration */ || - (node.parent.kind === 250 /* SourceFile */ && isCurrentFileExternalModule)) { + else if (node.kind === 224 /* ImportEqualsDeclaration */ || + (node.parent.kind === 251 /* SourceFile */ && isCurrentFileExternalModule)) { var isVisible; - if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 250 /* SourceFile */) { + if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 251 /* SourceFile */) { // Import declaration of another module that is visited async so lets put it in right spot asynchronousSubModuleDeclarationEmitInfo.push({ node: node, @@ -29993,7 +30412,7 @@ var ts; }); } else { - if (node.kind === 224 /* ImportDeclaration */) { + if (node.kind === 225 /* ImportDeclaration */) { var importDeclaration = node; if (importDeclaration.importClause) { isVisible = (importDeclaration.importClause.name && resolver.isDeclarationVisible(importDeclaration.importClause)) || @@ -30011,23 +30430,23 @@ var ts; } function writeModuleElement(node) { switch (node.kind) { - case 215 /* FunctionDeclaration */: + case 216 /* FunctionDeclaration */: return writeFunctionDeclaration(node); - case 195 /* VariableStatement */: + case 196 /* VariableStatement */: return writeVariableStatement(node); - case 217 /* InterfaceDeclaration */: + case 218 /* InterfaceDeclaration */: return writeInterfaceDeclaration(node); - case 216 /* ClassDeclaration */: + case 217 /* ClassDeclaration */: return writeClassDeclaration(node); - case 218 /* TypeAliasDeclaration */: + case 219 /* TypeAliasDeclaration */: return writeTypeAliasDeclaration(node); - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: return writeEnumDeclaration(node); - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: return writeModuleDeclaration(node); - case 223 /* ImportEqualsDeclaration */: + case 224 /* ImportEqualsDeclaration */: return writeImportEqualsDeclaration(node); - case 224 /* ImportDeclaration */: + case 225 /* ImportDeclaration */: return writeImportDeclaration(node); default: ts.Debug.fail("Unknown symbol kind"); @@ -30035,7 +30454,7 @@ var ts; } function emitModuleElementDeclarationFlags(node) { // If the node is parented in the current source file we need to emit export declare or just export - if (node.parent.kind === 250 /* SourceFile */) { + if (node.parent.kind === 251 /* SourceFile */) { // If the node is exported if (node.flags & 2 /* Export */) { write("export "); @@ -30043,7 +30462,7 @@ var ts; if (node.flags & 512 /* Default */) { write("default "); } - else if (node.kind !== 217 /* InterfaceDeclaration */ && !noDeclare) { + else if (node.kind !== 218 /* InterfaceDeclaration */ && !noDeclare) { write("declare "); } } @@ -30092,7 +30511,7 @@ var ts; } function isVisibleNamedBinding(namedBindings) { if (namedBindings) { - if (namedBindings.kind === 226 /* NamespaceImport */) { + if (namedBindings.kind === 227 /* NamespaceImport */) { return resolver.isDeclarationVisible(namedBindings); } else { @@ -30120,7 +30539,7 @@ var ts; // If the default binding was emitted, write the separated write(", "); } - if (node.importClause.namedBindings.kind === 226 /* NamespaceImport */) { + if (node.importClause.namedBindings.kind === 227 /* NamespaceImport */) { write("* as "); writeTextOfNode(currentText, node.importClause.namedBindings.name); } @@ -30137,11 +30556,19 @@ var ts; writer.writeLine(); } function emitExternalModuleSpecifier(parent) { + // emitExternalModuleSpecifier is usually called when we emit something in the.d.ts file that will make it an external module (i.e. import/export declarations). + // the only case when it is not true is when we call it to emit correct name for module augmentation - d.ts files with just module augmentations are not considered + // external modules since they are indistingushable from script files with ambient modules. To fix this in such d.ts files we'll emit top level 'export {}' + // so compiler will treat them as external modules. + resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 221 /* ModuleDeclaration */; var moduleSpecifier; - if (parent.kind === 223 /* ImportEqualsDeclaration */) { + if (parent.kind === 224 /* ImportEqualsDeclaration */) { var node = parent; moduleSpecifier = ts.getExternalModuleImportEqualsDeclarationExpression(node); } + else if (parent.kind === 221 /* ModuleDeclaration */) { + moduleSpecifier = parent.name; + } else { var node = parent; moduleSpecifier = node.moduleSpecifier; @@ -30192,14 +30619,24 @@ var ts; function writeModuleDeclaration(node) { emitJsDocComments(node); emitModuleElementDeclarationFlags(node); - if (node.flags & 65536 /* Namespace */) { - write("namespace "); + if (ts.isGlobalScopeAugmentation(node)) { + write("global "); } else { - write("module "); + if (node.flags & 65536 /* Namespace */) { + write("namespace "); + } + else { + write("module "); + } + if (ts.isExternalModuleAugmentation(node)) { + emitExternalModuleSpecifier(node); + } + else { + writeTextOfNode(currentText, node.name); + } } - writeTextOfNode(currentText, node.name); - while (node.body.kind !== 221 /* ModuleBlock */) { + while (node.body.kind !== 222 /* ModuleBlock */) { node = node.body; write("."); writeTextOfNode(currentText, node.name); @@ -30264,7 +30701,7 @@ var ts; writeLine(); } function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 143 /* MethodDeclaration */ && (node.parent.flags & 16 /* Private */); + return node.parent.kind === 144 /* MethodDeclaration */ && (node.parent.flags & 16 /* Private */); } function emitTypeParameters(typeParameters) { function emitTypeParameter(node) { @@ -30275,15 +30712,15 @@ var ts; // If there is constraint present and this is not a type parameter of the private method emit the constraint if (node.constraint && !isPrivateMethodTypeParameter(node)) { write(" extends "); - if (node.parent.kind === 152 /* FunctionType */ || - node.parent.kind === 153 /* ConstructorType */ || - (node.parent.parent && node.parent.parent.kind === 155 /* TypeLiteral */)) { - ts.Debug.assert(node.parent.kind === 143 /* MethodDeclaration */ || - node.parent.kind === 142 /* MethodSignature */ || - node.parent.kind === 152 /* FunctionType */ || - node.parent.kind === 153 /* ConstructorType */ || - node.parent.kind === 147 /* CallSignature */ || - node.parent.kind === 148 /* ConstructSignature */); + if (node.parent.kind === 153 /* FunctionType */ || + node.parent.kind === 154 /* ConstructorType */ || + (node.parent.parent && node.parent.parent.kind === 156 /* TypeLiteral */)) { + ts.Debug.assert(node.parent.kind === 144 /* MethodDeclaration */ || + node.parent.kind === 143 /* MethodSignature */ || + node.parent.kind === 153 /* FunctionType */ || + node.parent.kind === 154 /* ConstructorType */ || + node.parent.kind === 148 /* CallSignature */ || + node.parent.kind === 149 /* ConstructSignature */); emitType(node.constraint); } else { @@ -30294,31 +30731,31 @@ var ts; // Type parameter constraints are named by user so we should always be able to name it var diagnosticMessage; switch (node.parent.kind) { - case 216 /* ClassDeclaration */: + case 217 /* ClassDeclaration */: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; break; - case 217 /* InterfaceDeclaration */: + case 218 /* InterfaceDeclaration */: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; break; - case 148 /* ConstructSignature */: + case 149 /* ConstructSignature */: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 147 /* CallSignature */: + case 148 /* CallSignature */: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: if (node.parent.flags & 64 /* Static */) { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.parent.kind === 216 /* ClassDeclaration */) { + else if (node.parent.parent.kind === 217 /* ClassDeclaration */) { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } break; - case 215 /* FunctionDeclaration */: + case 216 /* FunctionDeclaration */: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; break; default: @@ -30352,7 +30789,7 @@ var ts; function getHeritageClauseVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; // Heritage clause is written by user so it can always be named - if (node.parent.parent.kind === 216 /* ClassDeclaration */) { + if (node.parent.parent.kind === 217 /* ClassDeclaration */) { // Class or Interface implemented/extended is inaccessible diagnosticMessage = isImplementsList ? ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : @@ -30436,7 +30873,7 @@ var ts; function emitVariableDeclaration(node) { // If we are emitting property it isn't moduleElement and hence we already know it needs to be emitted // so there is no check needed to see if declaration is visible - if (node.kind !== 213 /* VariableDeclaration */ || resolver.isDeclarationVisible(node)) { + if (node.kind !== 214 /* VariableDeclaration */ || resolver.isDeclarationVisible(node)) { if (ts.isBindingPattern(node.name)) { emitBindingPattern(node.name); } @@ -30446,10 +30883,10 @@ var ts; // what we want, namely the name expression enclosed in brackets. writeTextOfNode(currentText, node.name); // If optional property emit ? - if ((node.kind === 141 /* PropertyDeclaration */ || node.kind === 140 /* PropertySignature */) && ts.hasQuestionToken(node)) { + if ((node.kind === 142 /* PropertyDeclaration */ || node.kind === 141 /* PropertySignature */) && ts.hasQuestionToken(node)) { write("?"); } - if ((node.kind === 141 /* PropertyDeclaration */ || node.kind === 140 /* PropertySignature */) && node.parent.kind === 155 /* TypeLiteral */) { + if ((node.kind === 142 /* PropertyDeclaration */ || node.kind === 141 /* PropertySignature */) && node.parent.kind === 156 /* TypeLiteral */) { emitTypeOfVariableDeclarationFromTypeLiteral(node); } else if (!(node.flags & 16 /* Private */)) { @@ -30458,14 +30895,14 @@ var ts; } } function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult) { - if (node.kind === 213 /* VariableDeclaration */) { + if (node.kind === 214 /* VariableDeclaration */) { return symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; } - else if (node.kind === 141 /* PropertyDeclaration */ || node.kind === 140 /* PropertySignature */) { + else if (node.kind === 142 /* PropertyDeclaration */ || node.kind === 141 /* PropertySignature */) { // TODO(jfreeman): Deal with computed properties in error reporting. if (node.flags & 64 /* Static */) { return symbolAccesibilityResult.errorModuleName ? @@ -30474,7 +30911,7 @@ var ts; ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.kind === 216 /* ClassDeclaration */) { + else if (node.parent.kind === 217 /* ClassDeclaration */) { return symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : @@ -30506,7 +30943,7 @@ var ts; var elements = []; for (var _i = 0, _a = bindingPattern.elements; _i < _a.length; _i++) { var element = _a[_i]; - if (element.kind !== 189 /* OmittedExpression */) { + if (element.kind !== 190 /* OmittedExpression */) { elements.push(element); } } @@ -30576,7 +31013,7 @@ var ts; var type = getTypeAnnotationFromAccessor(node); if (!type) { // couldn't get type for the first accessor, try the another one - var anotherAccessor = node.kind === 145 /* GetAccessor */ ? accessors.setAccessor : accessors.getAccessor; + var anotherAccessor = node.kind === 146 /* GetAccessor */ ? accessors.setAccessor : accessors.getAccessor; type = getTypeAnnotationFromAccessor(anotherAccessor); if (type) { accessorWithTypeAnnotation = anotherAccessor; @@ -30589,7 +31026,7 @@ var ts; } function getTypeAnnotationFromAccessor(accessor) { if (accessor) { - return accessor.kind === 145 /* GetAccessor */ + return accessor.kind === 146 /* GetAccessor */ ? accessor.type // Getter - return type : accessor.parameters.length > 0 ? accessor.parameters[0].type // Setter parameter type @@ -30598,7 +31035,7 @@ var ts; } function getAccessorDeclarationTypeVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; - if (accessorWithTypeAnnotation.kind === 146 /* SetAccessor */) { + if (accessorWithTypeAnnotation.kind === 147 /* SetAccessor */) { // Setters have to have type named and cannot infer it so, the type should always be named if (accessorWithTypeAnnotation.parent.flags & 64 /* Static */) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? @@ -30648,17 +31085,17 @@ var ts; // so no need to verify if the declaration is visible if (!resolver.isImplementationOfOverload(node)) { emitJsDocComments(node); - if (node.kind === 215 /* FunctionDeclaration */) { + if (node.kind === 216 /* FunctionDeclaration */) { emitModuleElementDeclarationFlags(node); } - else if (node.kind === 143 /* MethodDeclaration */) { + else if (node.kind === 144 /* MethodDeclaration */) { emitClassMemberDeclarationFlags(node); } - if (node.kind === 215 /* FunctionDeclaration */) { + if (node.kind === 216 /* FunctionDeclaration */) { write("function "); writeTextOfNode(currentText, node.name); } - else if (node.kind === 144 /* Constructor */) { + else if (node.kind === 145 /* Constructor */) { write("constructor"); } else { @@ -30678,11 +31115,11 @@ var ts; var prevEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = node; // Construct signature or constructor type write new Signature - if (node.kind === 148 /* ConstructSignature */ || node.kind === 153 /* ConstructorType */) { + if (node.kind === 149 /* ConstructSignature */ || node.kind === 154 /* ConstructorType */) { write("new "); } emitTypeParameters(node.typeParameters); - if (node.kind === 149 /* IndexSignature */) { + if (node.kind === 150 /* IndexSignature */) { write("["); } else { @@ -30690,22 +31127,22 @@ var ts; } // Parameters emitCommaList(node.parameters, emitParameterDeclaration); - if (node.kind === 149 /* IndexSignature */) { + if (node.kind === 150 /* IndexSignature */) { write("]"); } else { write(")"); } // If this is not a constructor and is not private, emit the return type - var isFunctionTypeOrConstructorType = node.kind === 152 /* FunctionType */ || node.kind === 153 /* ConstructorType */; - if (isFunctionTypeOrConstructorType || node.parent.kind === 155 /* TypeLiteral */) { + var isFunctionTypeOrConstructorType = node.kind === 153 /* FunctionType */ || node.kind === 154 /* ConstructorType */; + if (isFunctionTypeOrConstructorType || node.parent.kind === 156 /* TypeLiteral */) { // Emit type literal signature return type only if specified if (node.type) { write(isFunctionTypeOrConstructorType ? " => " : ": "); emitType(node.type); } } - else if (node.kind !== 144 /* Constructor */ && !(node.flags & 16 /* Private */)) { + else if (node.kind !== 145 /* Constructor */ && !(node.flags & 16 /* Private */)) { writeReturnTypeAtSignature(node, getReturnTypeVisibilityError); } enclosingDeclaration = prevEnclosingDeclaration; @@ -30716,26 +31153,26 @@ var ts; function getReturnTypeVisibilityError(symbolAccesibilityResult) { var diagnosticMessage; switch (node.kind) { - case 148 /* ConstructSignature */: + case 149 /* ConstructSignature */: // Interfaces cannot have return types that cannot be named diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 147 /* CallSignature */: + case 148 /* CallSignature */: // Interfaces cannot have return types that cannot be named diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 149 /* IndexSignature */: + case 150 /* IndexSignature */: // Interfaces cannot have return types that cannot be named diagnosticMessage = symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: if (node.flags & 64 /* Static */) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? @@ -30743,7 +31180,7 @@ var ts; ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; } - else if (node.parent.kind === 216 /* ClassDeclaration */) { + else if (node.parent.kind === 217 /* ClassDeclaration */) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : @@ -30757,7 +31194,7 @@ var ts; ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; } break; - case 215 /* FunctionDeclaration */: + case 216 /* FunctionDeclaration */: diagnosticMessage = symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : @@ -30792,9 +31229,9 @@ var ts; write("?"); } decreaseIndent(); - if (node.parent.kind === 152 /* FunctionType */ || - node.parent.kind === 153 /* ConstructorType */ || - node.parent.parent.kind === 155 /* TypeLiteral */) { + if (node.parent.kind === 153 /* FunctionType */ || + node.parent.kind === 154 /* ConstructorType */ || + node.parent.parent.kind === 156 /* TypeLiteral */) { emitTypeOfVariableDeclarationFromTypeLiteral(node); } else if (!(node.parent.flags & 16 /* Private */)) { @@ -30810,24 +31247,24 @@ var ts; } function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult) { switch (node.parent.kind) { - case 144 /* Constructor */: + case 145 /* Constructor */: return symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; - case 148 /* ConstructSignature */: + case 149 /* ConstructSignature */: // Interfaces cannot have parameter types that cannot be named return symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; - case 147 /* CallSignature */: + case 148 /* CallSignature */: // Interfaces cannot have parameter types that cannot be named return symbolAccesibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: if (node.parent.flags & 64 /* Static */) { return symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? @@ -30835,7 +31272,7 @@ var ts; ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.parent.kind === 216 /* ClassDeclaration */) { + else if (node.parent.parent.kind === 217 /* ClassDeclaration */) { return symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : @@ -30848,7 +31285,7 @@ var ts; ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } - case 215 /* FunctionDeclaration */: + case 216 /* FunctionDeclaration */: return symbolAccesibilityResult.errorModuleName ? symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : @@ -30860,12 +31297,12 @@ var ts; } function emitBindingPattern(bindingPattern) { // We have to explicitly emit square bracket and bracket because these tokens are not store inside the node. - if (bindingPattern.kind === 163 /* ObjectBindingPattern */) { + if (bindingPattern.kind === 164 /* ObjectBindingPattern */) { write("{"); emitCommaList(bindingPattern.elements, emitBindingElement); write("}"); } - else if (bindingPattern.kind === 164 /* ArrayBindingPattern */) { + else if (bindingPattern.kind === 165 /* ArrayBindingPattern */) { write("["); var elements = bindingPattern.elements; emitCommaList(elements, emitBindingElement); @@ -30876,7 +31313,7 @@ var ts; } } function emitBindingElement(bindingElement) { - if (bindingElement.kind === 189 /* OmittedExpression */) { + if (bindingElement.kind === 190 /* OmittedExpression */) { // If bindingElement is an omittedExpression (i.e. containing elision), // we will emit blank space (although this may differ from users' original code, // it allows emitSeparatedList to write separator appropriately) @@ -30885,7 +31322,7 @@ var ts; // emit : function foo([ , x, , ]) {} write(" "); } - else if (bindingElement.kind === 165 /* BindingElement */) { + else if (bindingElement.kind === 166 /* BindingElement */) { if (bindingElement.propertyName) { // bindingElement has propertyName property in the following case: // { y: [a,b,c] ...} -> bindingPattern will have a property called propertyName for "y" @@ -30924,40 +31361,40 @@ var ts; } function emitNode(node) { switch (node.kind) { - case 215 /* FunctionDeclaration */: - case 220 /* ModuleDeclaration */: - case 223 /* ImportEqualsDeclaration */: - case 217 /* InterfaceDeclaration */: - case 216 /* ClassDeclaration */: - case 218 /* TypeAliasDeclaration */: - case 219 /* EnumDeclaration */: + case 216 /* FunctionDeclaration */: + case 221 /* ModuleDeclaration */: + case 224 /* ImportEqualsDeclaration */: + case 218 /* InterfaceDeclaration */: + case 217 /* ClassDeclaration */: + case 219 /* TypeAliasDeclaration */: + case 220 /* EnumDeclaration */: return emitModuleElement(node, isModuleElementVisible(node)); - case 195 /* VariableStatement */: + case 196 /* VariableStatement */: return emitModuleElement(node, isVariableStatementVisible(node)); - case 224 /* ImportDeclaration */: + case 225 /* ImportDeclaration */: // Import declaration without import clause is visible, otherwise it is not visible return emitModuleElement(node, /*isModuleElementVisible*/ !node.importClause); - case 230 /* ExportDeclaration */: + case 231 /* ExportDeclaration */: return emitExportDeclaration(node); - case 144 /* Constructor */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 145 /* Constructor */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: return writeFunctionDeclaration(node); - case 148 /* ConstructSignature */: - case 147 /* CallSignature */: - case 149 /* IndexSignature */: + case 149 /* ConstructSignature */: + case 148 /* CallSignature */: + case 150 /* IndexSignature */: return emitSignatureDeclarationWithJsDocComments(node); - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: return emitAccessorDeclaration(node); - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: return emitPropertyDeclaration(node); - case 249 /* EnumMember */: + case 250 /* EnumMember */: return emitEnumMemberDeclaration(node); - case 229 /* ExportAssignment */: + case 230 /* ExportAssignment */: return emitExportAssignment(node); - case 250 /* SourceFile */: + case 251 /* SourceFile */: return emitSourceFile(node); } } @@ -31317,7 +31754,7 @@ var ts; var metadataHelper = "\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};"; // emit output for the __param helper function var paramHelper = "\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};"; - var awaiterHelper = "\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) {\n return new Promise(function (resolve, reject) {\n generator = generator.call(thisArg, _arguments);\n function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); }\n function onfulfill(value) { try { step(\"next\", value); } catch (e) { reject(e); } }\n function onreject(value) { try { step(\"throw\", value); } catch (e) { reject(e); } }\n function step(verb, value) {\n var result = generator[verb](value);\n result.done ? resolve(result.value) : cast(result.value).then(onfulfill, onreject);\n }\n step(\"next\", void 0);\n });\n};"; + var awaiterHelper = "\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new P(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.call(thisArg, _arguments)).next());\n });\n};"; var compilerOptions = host.getCompilerOptions(); var languageVersion = ts.getEmitScriptTarget(compilerOptions); var modulekind = ts.getEmitModuleKind(compilerOptions); @@ -31415,6 +31852,7 @@ var ts; var isOwnFileEmit; /** If removeComments is true, no leading-comments needed to be emitted **/ var emitLeadingCommentsOfPosition = compilerOptions.removeComments ? function (pos) { } : emitLeadingCommentsOfPositionWorker; + var setSourceMapWriterEmit = compilerOptions.sourceMap || compilerOptions.inlineSourceMap ? changeSourceMapEmit : function (writer) { }; var moduleEmitDelegates = (_a = {}, _a[5 /* ES6 */] = emitES6Module, _a[2 /* AMD */] = emitAMDModule, @@ -31499,10 +31937,10 @@ var ts; // Note that names generated by makeTempVariableName and makeUniqueName will never conflict. function makeTempVariableName(flags) { if (flags && !(tempFlags & flags)) { - var name_19 = flags === 268435456 /* _i */ ? "_i" : "_n"; - if (isUniqueName(name_19)) { + var name_22 = flags === 268435456 /* _i */ ? "_i" : "_n"; + if (isUniqueName(name_22)) { tempFlags |= flags; - return name_19; + return name_22; } } while (true) { @@ -31510,9 +31948,9 @@ var ts; tempFlags++; // Skip over 'i' and 'n' if (count !== 8 && count !== 13) { - var name_20 = count < 26 ? "_" + String.fromCharCode(97 /* a */ + count) : "_" + (count - 26); - if (isUniqueName(name_20)) { - return name_20; + var name_23 = count < 26 ? "_" + String.fromCharCode(97 /* a */ + count) : "_" + (count - 26); + if (isUniqueName(name_23)) { + return name_23; } } } @@ -31556,17 +31994,17 @@ var ts; switch (node.kind) { case 69 /* Identifier */: return makeUniqueName(node.text); - case 220 /* ModuleDeclaration */: - case 219 /* EnumDeclaration */: + case 221 /* ModuleDeclaration */: + case 220 /* EnumDeclaration */: return generateNameForModuleOrEnum(node); - case 224 /* ImportDeclaration */: - case 230 /* ExportDeclaration */: + case 225 /* ImportDeclaration */: + case 231 /* ExportDeclaration */: return generateNameForImportOrExportDeclaration(node); - case 215 /* FunctionDeclaration */: - case 216 /* ClassDeclaration */: - case 229 /* ExportAssignment */: + case 216 /* FunctionDeclaration */: + case 217 /* ClassDeclaration */: + case 230 /* ExportAssignment */: return generateNameForExportDefault(); - case 188 /* ClassExpression */: + case 189 /* ClassExpression */: return generateNameForClassExpression(); } } @@ -31836,10 +32274,10 @@ var ts; write("("); emit(tempVariable); // Now we emit the expressions - if (node.template.kind === 185 /* TemplateExpression */) { + if (node.template.kind === 186 /* TemplateExpression */) { ts.forEach(node.template.templateSpans, function (templateSpan) { write(", "); - var needsParens = templateSpan.expression.kind === 183 /* BinaryExpression */ + var needsParens = templateSpan.expression.kind === 184 /* BinaryExpression */ && templateSpan.expression.operatorToken.kind === 24 /* CommaToken */; emitParenthesizedIf(templateSpan.expression, needsParens); }); @@ -31874,7 +32312,7 @@ var ts; // ("abc" + 1) << (2 + "") // rather than // "abc" + (1 << 2) + "" - var needsParens = templateSpan.expression.kind !== 174 /* ParenthesizedExpression */ + var needsParens = templateSpan.expression.kind !== 175 /* ParenthesizedExpression */ && comparePrecedenceToBinaryPlus(templateSpan.expression) !== 1 /* GreaterThan */; if (i > 0 || headEmitted) { // If this is the first span and the head was not emitted, then this templateSpan's @@ -31916,11 +32354,11 @@ var ts; } function templateNeedsParens(template, parent) { switch (parent.kind) { - case 170 /* CallExpression */: - case 171 /* NewExpression */: + case 171 /* CallExpression */: + case 172 /* NewExpression */: return parent.expression === template; - case 172 /* TaggedTemplateExpression */: - case 174 /* ParenthesizedExpression */: + case 173 /* TaggedTemplateExpression */: + case 175 /* ParenthesizedExpression */: return false; default: return comparePrecedenceToBinaryPlus(parent) !== -1 /* LessThan */; @@ -31941,7 +32379,7 @@ var ts; // TODO (drosen): Note that we need to account for the upcoming 'yield' and // spread ('...') unary operators that are anticipated for ES6. switch (expression.kind) { - case 183 /* BinaryExpression */: + case 184 /* BinaryExpression */: switch (expression.operatorToken.kind) { case 37 /* AsteriskToken */: case 39 /* SlashToken */: @@ -31953,8 +32391,8 @@ var ts; default: return -1 /* LessThan */; } - case 186 /* YieldExpression */: - case 184 /* ConditionalExpression */: + case 187 /* YieldExpression */: + case 185 /* ConditionalExpression */: return -1 /* LessThan */; default: return 1 /* GreaterThan */; @@ -32021,38 +32459,38 @@ var ts; // Either emit one big object literal (no spread attribs), or // a call to React.__spread var attrs = openingNode.attributes; - if (ts.forEach(attrs, function (attr) { return attr.kind === 241 /* JsxSpreadAttribute */; })) { + if (ts.forEach(attrs, function (attr) { return attr.kind === 242 /* JsxSpreadAttribute */; })) { emitExpressionIdentifier(syntheticReactRef); write(".__spread("); var haveOpenedObjectLiteral = false; - for (var i_1 = 0; i_1 < attrs.length; i_1++) { - if (attrs[i_1].kind === 241 /* JsxSpreadAttribute */) { + for (var i = 0; i < attrs.length; i++) { + if (attrs[i].kind === 242 /* JsxSpreadAttribute */) { // If this is the first argument, we need to emit a {} as the first argument - if (i_1 === 0) { + if (i === 0) { write("{}, "); } if (haveOpenedObjectLiteral) { write("}"); haveOpenedObjectLiteral = false; } - if (i_1 > 0) { + if (i > 0) { write(", "); } - emit(attrs[i_1].expression); + emit(attrs[i].expression); } else { - ts.Debug.assert(attrs[i_1].kind === 240 /* JsxAttribute */); + ts.Debug.assert(attrs[i].kind === 241 /* JsxAttribute */); if (haveOpenedObjectLiteral) { write(", "); } else { haveOpenedObjectLiteral = true; - if (i_1 > 0) { + if (i > 0) { write(", "); } write("{"); } - emitJsxAttribute(attrs[i_1]); + emitJsxAttribute(attrs[i]); } } if (haveOpenedObjectLiteral) @@ -32062,7 +32500,7 @@ var ts; else { // One object literal with all the attributes in them write("{"); - for (var i = 0; i < attrs.length; i++) { + for (var i = 0, n = attrs.length; i < n; i++) { if (i > 0) { write(", "); } @@ -32075,11 +32513,11 @@ var ts; if (children) { for (var i = 0; i < children.length; i++) { // Don't emit empty expressions - if (children[i].kind === 242 /* JsxExpression */ && !(children[i].expression)) { + if (children[i].kind === 243 /* JsxExpression */ && !(children[i].expression)) { continue; } // Don't emit empty strings - if (children[i].kind === 238 /* JsxText */) { + if (children[i].kind === 239 /* JsxText */) { var text = getTextToEmit(children[i]); if (text !== undefined) { write(", \""); @@ -32097,11 +32535,11 @@ var ts; write(")"); // closes "React.createElement(" emitTrailingComments(openingNode); } - if (node.kind === 235 /* JsxElement */) { + if (node.kind === 236 /* JsxElement */) { emitJsxElement(node.openingElement, node.children); } else { - ts.Debug.assert(node.kind === 236 /* JsxSelfClosingElement */); + ts.Debug.assert(node.kind === 237 /* JsxSelfClosingElement */); emitJsxElement(node); } } @@ -32123,11 +32561,11 @@ var ts; if (i > 0) { write(" "); } - if (attribs[i].kind === 241 /* JsxSpreadAttribute */) { + if (attribs[i].kind === 242 /* JsxSpreadAttribute */) { emitJsxSpreadAttribute(attribs[i]); } else { - ts.Debug.assert(attribs[i].kind === 240 /* JsxAttribute */); + ts.Debug.assert(attribs[i].kind === 241 /* JsxAttribute */); emitJsxAttribute(attribs[i]); } } @@ -32135,11 +32573,11 @@ var ts; function emitJsxOpeningOrSelfClosingElement(node) { write("<"); emit(node.tagName); - if (node.attributes.length > 0 || (node.kind === 236 /* JsxSelfClosingElement */)) { + if (node.attributes.length > 0 || (node.kind === 237 /* JsxSelfClosingElement */)) { write(" "); } emitAttributes(node.attributes); - if (node.kind === 236 /* JsxSelfClosingElement */) { + if (node.kind === 237 /* JsxSelfClosingElement */) { write("/>"); } else { @@ -32158,11 +32596,11 @@ var ts; } emitJsxClosingElement(node.closingElement); } - if (node.kind === 235 /* JsxElement */) { + if (node.kind === 236 /* JsxElement */) { emitJsxElement(node); } else { - ts.Debug.assert(node.kind === 236 /* JsxSelfClosingElement */); + ts.Debug.assert(node.kind === 237 /* JsxSelfClosingElement */); emitJsxOpeningOrSelfClosingElement(node); } } @@ -32170,11 +32608,11 @@ var ts; // In a sense, it does not actually emit identifiers as much as it declares a name for a specific property. // For example, this is utilized when feeding in a result to Object.defineProperty. function emitExpressionForPropertyName(node) { - ts.Debug.assert(node.kind !== 165 /* BindingElement */); + ts.Debug.assert(node.kind !== 166 /* BindingElement */); if (node.kind === 9 /* StringLiteral */) { emitLiteral(node); } - else if (node.kind === 136 /* ComputedPropertyName */) { + else if (node.kind === 137 /* ComputedPropertyName */) { // if this is a decorated computed property, we will need to capture the result // of the property expression so that we can apply decorators later. This is to ensure // we don't introduce unintended side effects: @@ -32218,62 +32656,62 @@ var ts; function isExpressionIdentifier(node) { var parent = node.parent; switch (parent.kind) { - case 166 /* ArrayLiteralExpression */: - case 191 /* AsExpression */: - case 183 /* BinaryExpression */: - case 170 /* CallExpression */: - case 243 /* CaseClause */: - case 136 /* ComputedPropertyName */: - case 184 /* ConditionalExpression */: - case 139 /* Decorator */: - case 177 /* DeleteExpression */: - case 199 /* DoStatement */: - case 169 /* ElementAccessExpression */: - case 229 /* ExportAssignment */: - case 197 /* ExpressionStatement */: - case 190 /* ExpressionWithTypeArguments */: - case 201 /* ForStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - case 198 /* IfStatement */: - case 239 /* JsxClosingElement */: - case 236 /* JsxSelfClosingElement */: - case 237 /* JsxOpeningElement */: - case 241 /* JsxSpreadAttribute */: - case 242 /* JsxExpression */: - case 171 /* NewExpression */: - case 174 /* ParenthesizedExpression */: - case 182 /* PostfixUnaryExpression */: - case 181 /* PrefixUnaryExpression */: - case 206 /* ReturnStatement */: - case 248 /* ShorthandPropertyAssignment */: - case 187 /* SpreadElementExpression */: - case 208 /* SwitchStatement */: - case 172 /* TaggedTemplateExpression */: - case 192 /* TemplateSpan */: - case 210 /* ThrowStatement */: - case 173 /* TypeAssertionExpression */: - case 178 /* TypeOfExpression */: - case 179 /* VoidExpression */: - case 200 /* WhileStatement */: - case 207 /* WithStatement */: - case 186 /* YieldExpression */: + case 167 /* ArrayLiteralExpression */: + case 192 /* AsExpression */: + case 184 /* BinaryExpression */: + case 171 /* CallExpression */: + case 244 /* CaseClause */: + case 137 /* ComputedPropertyName */: + case 185 /* ConditionalExpression */: + case 140 /* Decorator */: + case 178 /* DeleteExpression */: + case 200 /* DoStatement */: + case 170 /* ElementAccessExpression */: + case 230 /* ExportAssignment */: + case 198 /* ExpressionStatement */: + case 191 /* ExpressionWithTypeArguments */: + case 202 /* ForStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: + case 199 /* IfStatement */: + case 240 /* JsxClosingElement */: + case 237 /* JsxSelfClosingElement */: + case 238 /* JsxOpeningElement */: + case 242 /* JsxSpreadAttribute */: + case 243 /* JsxExpression */: + case 172 /* NewExpression */: + case 175 /* ParenthesizedExpression */: + case 183 /* PostfixUnaryExpression */: + case 182 /* PrefixUnaryExpression */: + case 207 /* ReturnStatement */: + case 249 /* ShorthandPropertyAssignment */: + case 188 /* SpreadElementExpression */: + case 209 /* SwitchStatement */: + case 173 /* TaggedTemplateExpression */: + case 193 /* TemplateSpan */: + case 211 /* ThrowStatement */: + case 174 /* TypeAssertionExpression */: + case 179 /* TypeOfExpression */: + case 180 /* VoidExpression */: + case 201 /* WhileStatement */: + case 208 /* WithStatement */: + case 187 /* YieldExpression */: return true; - case 165 /* BindingElement */: - case 249 /* EnumMember */: - case 138 /* Parameter */: - case 247 /* PropertyAssignment */: - case 141 /* PropertyDeclaration */: - case 213 /* VariableDeclaration */: + case 166 /* BindingElement */: + case 250 /* EnumMember */: + case 139 /* Parameter */: + case 248 /* PropertyAssignment */: + case 142 /* PropertyDeclaration */: + case 214 /* VariableDeclaration */: return parent.initializer === node; - case 168 /* PropertyAccessExpression */: + case 169 /* PropertyAccessExpression */: return parent.expression === node; - case 176 /* ArrowFunction */: - case 175 /* FunctionExpression */: + case 177 /* ArrowFunction */: + case 176 /* FunctionExpression */: return parent.body === node; - case 223 /* ImportEqualsDeclaration */: + case 224 /* ImportEqualsDeclaration */: return parent.moduleReference === node; - case 135 /* QualifiedName */: + case 136 /* QualifiedName */: return parent.left === node; } return false; @@ -32285,7 +32723,7 @@ var ts; } var container = resolver.getReferencedExportContainer(node); if (container) { - if (container.kind === 250 /* SourceFile */) { + if (container.kind === 251 /* SourceFile */) { // Identifier references module export if (modulekind !== 5 /* ES6 */ && modulekind !== 4 /* System */) { write("exports."); @@ -32301,17 +32739,17 @@ var ts; if (modulekind !== 5 /* ES6 */) { var declaration = resolver.getReferencedImportDeclaration(node); if (declaration) { - if (declaration.kind === 225 /* ImportClause */) { + if (declaration.kind === 226 /* ImportClause */) { // Identifier references default import write(getGeneratedNameForNode(declaration.parent)); write(languageVersion === 0 /* ES3 */ ? "[\"default\"]" : ".default"); return; } - else if (declaration.kind === 228 /* ImportSpecifier */) { + else if (declaration.kind === 229 /* ImportSpecifier */) { // Identifier references named import write(getGeneratedNameForNode(declaration.parent.parent.parent)); - var name_21 = declaration.propertyName || declaration.name; - var identifier = ts.getTextOfNodeFromSourceText(currentText, name_21); + var name_24 = declaration.propertyName || declaration.name; + var identifier = ts.getTextOfNodeFromSourceText(currentText, name_24); if (languageVersion === 0 /* ES3 */ && identifier === "default") { write("[\"default\"]"); } @@ -32340,13 +32778,13 @@ var ts; } function isNameOfNestedRedeclaration(node) { if (languageVersion < 2 /* ES6 */) { - var parent_6 = node.parent; - switch (parent_6.kind) { - case 165 /* BindingElement */: - case 216 /* ClassDeclaration */: - case 219 /* EnumDeclaration */: - case 213 /* VariableDeclaration */: - return parent_6.name === node && resolver.isNestedRedeclaration(parent_6); + var parent_7 = node.parent; + switch (parent_7.kind) { + case 166 /* BindingElement */: + case 217 /* ClassDeclaration */: + case 220 /* EnumDeclaration */: + case 214 /* VariableDeclaration */: + return parent_7.name === node && resolver.isNestedRedeclaration(parent_7); } } return false; @@ -32355,8 +32793,8 @@ var ts; if (convertedLoopState) { if (node.text == "arguments" && resolver.isArgumentsLocalBinding(node)) { // in converted loop body arguments cannot be used directly. - var name_22 = convertedLoopState.argumentsName || (convertedLoopState.argumentsName = makeUniqueName("arguments")); - write(name_22); + var name_25 = convertedLoopState.argumentsName || (convertedLoopState.argumentsName = makeUniqueName("arguments")); + write(name_25); return; } } @@ -32456,10 +32894,10 @@ var ts; } } function needsParenthesisForAwaitExpressionAsYield(node) { - if (node.parent.kind === 183 /* BinaryExpression */ && !ts.isAssignmentOperator(node.parent.operatorToken.kind)) { + if (node.parent.kind === 184 /* BinaryExpression */ && !ts.isAssignmentOperator(node.parent.operatorToken.kind)) { return true; } - else if (node.parent.kind === 184 /* ConditionalExpression */ && node.parent.condition === node) { + else if (node.parent.kind === 185 /* ConditionalExpression */ && node.parent.condition === node) { return true; } return false; @@ -32467,11 +32905,11 @@ var ts; function needsParenthesisForPropertyAccessOrInvocation(node) { switch (node.kind) { case 69 /* Identifier */: - case 166 /* ArrayLiteralExpression */: - case 168 /* PropertyAccessExpression */: - case 169 /* ElementAccessExpression */: - case 170 /* CallExpression */: - case 174 /* ParenthesizedExpression */: + case 167 /* ArrayLiteralExpression */: + case 169 /* PropertyAccessExpression */: + case 170 /* ElementAccessExpression */: + case 171 /* CallExpression */: + case 175 /* ParenthesizedExpression */: // This list is not exhaustive and only includes those cases that are relevant // to the check in emitArrayLiteral. More cases can be added as needed. return false; @@ -32491,17 +32929,17 @@ var ts; write(", "); } var e = elements[pos]; - if (e.kind === 187 /* SpreadElementExpression */) { + if (e.kind === 188 /* SpreadElementExpression */) { e = e.expression; emitParenthesizedIf(e, /*parenthesized*/ group === 0 && needsParenthesisForPropertyAccessOrInvocation(e)); pos++; - if (pos === length && group === 0 && needsUniqueCopy && e.kind !== 166 /* ArrayLiteralExpression */) { + if (pos === length && group === 0 && needsUniqueCopy && e.kind !== 167 /* ArrayLiteralExpression */) { write(".slice()"); } } else { var i = pos; - while (i < length && elements[i].kind !== 187 /* SpreadElementExpression */) { + while (i < length && elements[i].kind !== 188 /* SpreadElementExpression */) { i++; } write("["); @@ -32524,7 +32962,7 @@ var ts; } } function isSpreadElementExpression(node) { - return node.kind === 187 /* SpreadElementExpression */; + return node.kind === 188 /* SpreadElementExpression */; } function emitArrayLiteral(node) { var elements = node.elements; @@ -32594,7 +33032,7 @@ var ts; writeComma(); var property = properties[i]; emitStart(property); - if (property.kind === 145 /* GetAccessor */ || property.kind === 146 /* SetAccessor */) { + if (property.kind === 146 /* GetAccessor */ || property.kind === 147 /* SetAccessor */) { // TODO (drosen): Reconcile with 'emitMemberFunctions'. var accessors = ts.getAllAccessorDeclarations(node.properties, property); if (property !== accessors.firstAccessor) { @@ -32646,13 +33084,13 @@ var ts; emitMemberAccessForPropertyName(property.name); emitEnd(property.name); write(" = "); - if (property.kind === 247 /* PropertyAssignment */) { + if (property.kind === 248 /* PropertyAssignment */) { emit(property.initializer); } - else if (property.kind === 248 /* ShorthandPropertyAssignment */) { + else if (property.kind === 249 /* ShorthandPropertyAssignment */) { emitExpressionIdentifier(property.name); } - else if (property.kind === 143 /* MethodDeclaration */) { + else if (property.kind === 144 /* MethodDeclaration */) { emitFunctionDeclaration(property); } else { @@ -32686,7 +33124,7 @@ var ts; // Everything until that point can be emitted as part of the initial object literal. var numInitialNonComputedProperties = numProperties; for (var i = 0, n = properties.length; i < n; i++) { - if (properties[i].name.kind === 136 /* ComputedPropertyName */) { + if (properties[i].name.kind === 137 /* ComputedPropertyName */) { numInitialNonComputedProperties = i; break; } @@ -32702,21 +33140,21 @@ var ts; emitObjectLiteralBody(node, properties.length); } function createBinaryExpression(left, operator, right, startsOnNewLine) { - var result = ts.createSynthesizedNode(183 /* BinaryExpression */, startsOnNewLine); + var result = ts.createSynthesizedNode(184 /* BinaryExpression */, startsOnNewLine); result.operatorToken = ts.createSynthesizedNode(operator); result.left = left; result.right = right; return result; } function createPropertyAccessExpression(expression, name) { - var result = ts.createSynthesizedNode(168 /* PropertyAccessExpression */); + var result = ts.createSynthesizedNode(169 /* PropertyAccessExpression */); result.expression = parenthesizeForAccess(expression); result.dotToken = ts.createSynthesizedNode(21 /* DotToken */); result.name = name; return result; } function createElementAccessExpression(expression, argumentExpression) { - var result = ts.createSynthesizedNode(169 /* ElementAccessExpression */); + var result = ts.createSynthesizedNode(170 /* ElementAccessExpression */); result.expression = parenthesizeForAccess(expression); result.argumentExpression = argumentExpression; return result; @@ -32724,7 +33162,7 @@ var ts; function parenthesizeForAccess(expr) { // When diagnosing whether the expression needs parentheses, the decision should be based // on the innermost expression in a chain of nested type assertions. - while (expr.kind === 173 /* TypeAssertionExpression */ || expr.kind === 191 /* AsExpression */) { + while (expr.kind === 174 /* TypeAssertionExpression */ || expr.kind === 192 /* AsExpression */) { expr = expr.expression; } // isLeftHandSideExpression is almost the correct criterion for when it is not necessary @@ -32736,11 +33174,11 @@ var ts; // 1.x -> not the same as (1).x // if (ts.isLeftHandSideExpression(expr) && - expr.kind !== 171 /* NewExpression */ && + expr.kind !== 172 /* NewExpression */ && expr.kind !== 8 /* NumericLiteral */) { return expr; } - var node = ts.createSynthesizedNode(174 /* ParenthesizedExpression */); + var node = ts.createSynthesizedNode(175 /* ParenthesizedExpression */); node.expression = expr; return node; } @@ -32775,7 +33213,7 @@ var ts; // Return true if identifier resolves to an exported member of a namespace function isNamespaceExportReference(node) { var container = resolver.getReferencedExportContainer(node); - return container && container.kind !== 250 /* SourceFile */; + return container && container.kind !== 251 /* SourceFile */; } function emitShorthandPropertyAssignment(node) { // The name property of a short-hand property assignment is considered an expression position, so here @@ -32805,7 +33243,7 @@ var ts; if (constantValue !== undefined) { write(constantValue.toString()); if (!compilerOptions.removeComments) { - var propertyName = node.kind === 168 /* PropertyAccessExpression */ ? ts.declarationNameToString(node.name) : ts.getTextOfNode(node.argumentExpression); + var propertyName = node.kind === 169 /* PropertyAccessExpression */ ? ts.declarationNameToString(node.name) : ts.getTextOfNode(node.argumentExpression); write(" /* " + propertyName + " */"); } return true; @@ -32816,7 +33254,7 @@ var ts; if (compilerOptions.isolatedModules) { return undefined; } - return node.kind === 168 /* PropertyAccessExpression */ || node.kind === 169 /* ElementAccessExpression */ + return node.kind === 169 /* PropertyAccessExpression */ || node.kind === 170 /* ElementAccessExpression */ ? resolver.getConstantValue(node) : undefined; } @@ -32905,7 +33343,7 @@ var ts; } emitExpressionIdentifier(node); break; - case 135 /* QualifiedName */: + case 136 /* QualifiedName */: emitQualifiedNameAsExpression(node, useFallback); break; default: @@ -32923,10 +33361,10 @@ var ts; write("]"); } function hasSpreadElement(elements) { - return ts.forEach(elements, function (e) { return e.kind === 187 /* SpreadElementExpression */; }); + return ts.forEach(elements, function (e) { return e.kind === 188 /* SpreadElementExpression */; }); } function skipParentheses(node) { - while (node.kind === 174 /* ParenthesizedExpression */ || node.kind === 173 /* TypeAssertionExpression */ || node.kind === 191 /* AsExpression */) { + while (node.kind === 175 /* ParenthesizedExpression */ || node.kind === 174 /* TypeAssertionExpression */ || node.kind === 192 /* AsExpression */) { node = node.expression; } return node; @@ -32947,13 +33385,13 @@ var ts; function emitCallWithSpread(node) { var target; var expr = skipParentheses(node.expression); - if (expr.kind === 168 /* PropertyAccessExpression */) { + if (expr.kind === 169 /* PropertyAccessExpression */) { // Target will be emitted as "this" argument target = emitCallTarget(expr.expression); write("."); emit(expr.name); } - else if (expr.kind === 169 /* ElementAccessExpression */) { + else if (expr.kind === 170 /* ElementAccessExpression */) { // Target will be emitted as "this" argument target = emitCallTarget(expr.expression); write("["); @@ -32998,7 +33436,7 @@ var ts; } else { emit(node.expression); - superCall = node.expression.kind === 168 /* PropertyAccessExpression */ && node.expression.expression.kind === 95 /* SuperKeyword */; + superCall = node.expression.kind === 169 /* PropertyAccessExpression */ && node.expression.expression.kind === 95 /* SuperKeyword */; } if (superCall && languageVersion < 2 /* ES6 */) { write(".call("); @@ -33067,12 +33505,12 @@ var ts; // If the node is synthesized, it means the emitter put the parentheses there, // not the user. If we didn't want them, the emitter would not have put them // there. - if (!ts.nodeIsSynthesized(node) && node.parent.kind !== 176 /* ArrowFunction */) { - if (node.expression.kind === 173 /* TypeAssertionExpression */ || node.expression.kind === 191 /* AsExpression */) { + if (!ts.nodeIsSynthesized(node) && node.parent.kind !== 177 /* ArrowFunction */) { + if (node.expression.kind === 174 /* TypeAssertionExpression */ || node.expression.kind === 192 /* AsExpression */) { var operand = node.expression.expression; // Make sure we consider all nested cast expressions, e.g.: // (-A).x; - while (operand.kind === 173 /* TypeAssertionExpression */ || operand.kind === 191 /* AsExpression */) { + while (operand.kind === 174 /* TypeAssertionExpression */ || operand.kind === 192 /* AsExpression */) { operand = operand.expression; } // We have an expression of the form: (SubExpr) @@ -33083,15 +33521,15 @@ var ts; // (typeof A).toString() should be emitted as (typeof A).toString() and not typeof A.toString() // new (A()) should be emitted as new (A()) and not new A() // (function foo() { })() should be emitted as an IIF (function foo(){})() and not declaration function foo(){} () - if (operand.kind !== 181 /* PrefixUnaryExpression */ && - operand.kind !== 179 /* VoidExpression */ && - operand.kind !== 178 /* TypeOfExpression */ && - operand.kind !== 177 /* DeleteExpression */ && - operand.kind !== 182 /* PostfixUnaryExpression */ && - operand.kind !== 171 /* NewExpression */ && - !(operand.kind === 170 /* CallExpression */ && node.parent.kind === 171 /* NewExpression */) && - !(operand.kind === 175 /* FunctionExpression */ && node.parent.kind === 170 /* CallExpression */) && - !(operand.kind === 8 /* NumericLiteral */ && node.parent.kind === 168 /* PropertyAccessExpression */)) { + if (operand.kind !== 182 /* PrefixUnaryExpression */ && + operand.kind !== 180 /* VoidExpression */ && + operand.kind !== 179 /* TypeOfExpression */ && + operand.kind !== 178 /* DeleteExpression */ && + operand.kind !== 183 /* PostfixUnaryExpression */ && + operand.kind !== 172 /* NewExpression */ && + !(operand.kind === 171 /* CallExpression */ && node.parent.kind === 172 /* NewExpression */) && + !(operand.kind === 176 /* FunctionExpression */ && node.parent.kind === 171 /* CallExpression */) && + !(operand.kind === 8 /* NumericLiteral */ && node.parent.kind === 169 /* PropertyAccessExpression */)) { emit(operand); return; } @@ -33120,7 +33558,7 @@ var ts; if (!isCurrentFileSystemExternalModule() || node.kind !== 69 /* Identifier */ || ts.nodeIsSynthesized(node)) { return false; } - var isVariableDeclarationOrBindingElement = node.parent && (node.parent.kind === 213 /* VariableDeclaration */ || node.parent.kind === 165 /* BindingElement */); + var isVariableDeclarationOrBindingElement = node.parent && (node.parent.kind === 214 /* VariableDeclaration */ || node.parent.kind === 166 /* BindingElement */); var targetDeclaration = isVariableDeclarationOrBindingElement ? node.parent : resolver.getReferencedValueDeclaration(node); @@ -33151,7 +33589,7 @@ var ts; // the resulting expression a prefix increment operation. And in the second, it will make the resulting // expression a prefix increment whose operand is a plus expression - (++(+x)) // The same is true of minus of course. - if (node.operand.kind === 181 /* PrefixUnaryExpression */) { + if (node.operand.kind === 182 /* PrefixUnaryExpression */) { var operand = node.operand; if (node.operator === 35 /* PlusToken */ && (operand.operator === 35 /* PlusToken */ || operand.operator === 41 /* PlusPlusToken */)) { write(" "); @@ -33207,10 +33645,10 @@ var ts; } var current = node; while (current) { - if (current.kind === 250 /* SourceFile */) { + if (current.kind === 251 /* SourceFile */) { return !isExported || ((ts.getCombinedNodeFlags(node) & 2 /* Export */) !== 0); } - else if (ts.isFunctionLike(current) || current.kind === 221 /* ModuleBlock */) { + else if (ts.isFunctionLike(current) || current.kind === 222 /* ModuleBlock */) { return false; } else { @@ -33230,14 +33668,14 @@ var ts; if (ts.isElementAccessExpression(leftHandSideExpression)) { shouldEmitParentheses = true; write("("); - synthesizedLHS = ts.createSynthesizedNode(169 /* ElementAccessExpression */, /*startsOnNewLine*/ false); + synthesizedLHS = ts.createSynthesizedNode(170 /* ElementAccessExpression */, /*startsOnNewLine*/ false); var identifier = emitTempVariableAssignment(leftHandSideExpression.expression, /*canDefineTempVariablesInPlace*/ false, /*shouldEmitCommaBeforeAssignment*/ false); synthesizedLHS.expression = identifier; if (leftHandSideExpression.argumentExpression.kind !== 8 /* NumericLiteral */ && leftHandSideExpression.argumentExpression.kind !== 9 /* StringLiteral */) { var tempArgumentExpression = createAndRecordTempVariable(268435456 /* _i */); synthesizedLHS.argumentExpression = tempArgumentExpression; - emitAssignment(tempArgumentExpression, leftHandSideExpression.argumentExpression, /*shouldEmitCommaBeforeAssignment*/ true); + emitAssignment(tempArgumentExpression, leftHandSideExpression.argumentExpression, /*shouldEmitCommaBeforeAssignment*/ true, leftHandSideExpression.expression); } else { synthesizedLHS.argumentExpression = leftHandSideExpression.argumentExpression; @@ -33247,7 +33685,7 @@ var ts; else if (ts.isPropertyAccessExpression(leftHandSideExpression)) { shouldEmitParentheses = true; write("("); - synthesizedLHS = ts.createSynthesizedNode(168 /* PropertyAccessExpression */, /*startsOnNewLine*/ false); + synthesizedLHS = ts.createSynthesizedNode(169 /* PropertyAccessExpression */, /*startsOnNewLine*/ false); var identifier = emitTempVariableAssignment(leftHandSideExpression.expression, /*canDefineTempVariablesInPlace*/ false, /*shouldEmitCommaBeforeAssignment*/ false); synthesizedLHS.expression = identifier; synthesizedLHS.dotToken = leftHandSideExpression.dotToken; @@ -33275,8 +33713,8 @@ var ts; } function emitBinaryExpression(node) { if (languageVersion < 2 /* ES6 */ && node.operatorToken.kind === 56 /* EqualsToken */ && - (node.left.kind === 167 /* ObjectLiteralExpression */ || node.left.kind === 166 /* ArrayLiteralExpression */)) { - emitDestructuring(node, node.parent.kind === 197 /* ExpressionStatement */); + (node.left.kind === 168 /* ObjectLiteralExpression */ || node.left.kind === 167 /* ArrayLiteralExpression */)) { + emitDestructuring(node, node.parent.kind === 198 /* ExpressionStatement */); } else { var exportChanged = node.operatorToken.kind >= 56 /* FirstAssignment */ && @@ -33341,7 +33779,7 @@ var ts; } } function isSingleLineEmptyBlock(node) { - if (node && node.kind === 194 /* Block */) { + if (node && node.kind === 195 /* Block */) { var block = node; return block.statements.length === 0 && nodeEndIsOnSameLineAsNodeStart(block, block); } @@ -33355,12 +33793,12 @@ var ts; } emitToken(15 /* OpenBraceToken */, node.pos); increaseIndent(); - if (node.kind === 221 /* ModuleBlock */) { - ts.Debug.assert(node.parent.kind === 220 /* ModuleDeclaration */); + if (node.kind === 222 /* ModuleBlock */) { + ts.Debug.assert(node.parent.kind === 221 /* ModuleDeclaration */); emitCaptureThisForNodeIfNecessary(node.parent); } emitLines(node.statements); - if (node.kind === 221 /* ModuleBlock */) { + if (node.kind === 222 /* ModuleBlock */) { emitTempDeclarations(/*newLine*/ true); } decreaseIndent(); @@ -33368,7 +33806,7 @@ var ts; emitToken(16 /* CloseBraceToken */, node.statements.end); } function emitEmbeddedStatement(node) { - if (node.kind === 194 /* Block */) { + if (node.kind === 195 /* Block */) { write(" "); emit(node); } @@ -33380,7 +33818,7 @@ var ts; } } function emitExpressionStatement(node) { - emitParenthesizedIf(node.expression, /*parenthesized*/ node.expression.kind === 176 /* ArrowFunction */); + emitParenthesizedIf(node.expression, /*parenthesized*/ node.expression.kind === 177 /* ArrowFunction */); write(";"); } function emitIfStatement(node) { @@ -33393,7 +33831,7 @@ var ts; if (node.elseStatement) { writeLine(); emitToken(80 /* ElseKeyword */, node.thenStatement.end); - if (node.elseStatement.kind === 198 /* IfStatement */) { + if (node.elseStatement.kind === 199 /* IfStatement */) { write(" "); emit(node.elseStatement); } @@ -33413,7 +33851,7 @@ var ts; else { emitNormalLoopBody(node, /*emitAsEmbeddedStatement*/ true); } - if (node.statement.kind === 194 /* Block */) { + if (node.statement.kind === 195 /* Block */) { write(" "); } else { @@ -33442,7 +33880,7 @@ var ts; * Returns false if nothing was written - this can happen for source file level variable declarations * in system modules where such variable declarations are hoisted. */ - function tryEmitStartOfVariableDeclarationList(decl, startPos) { + function tryEmitStartOfVariableDeclarationList(decl) { if (shouldHoistVariable(decl, /*checkIfSourceFileLevelDecl*/ true)) { // variables in variable declaration list were already hoisted return false; @@ -33456,32 +33894,23 @@ var ts; } return false; } - var tokenKind = 102 /* VarKeyword */; + emitStart(decl); if (decl && languageVersion >= 2 /* ES6 */) { if (ts.isLet(decl)) { - tokenKind = 108 /* LetKeyword */; + write("let "); } else if (ts.isConst(decl)) { - tokenKind = 74 /* ConstKeyword */; + write("const "); + } + else { + write("var "); } - } - if (startPos !== undefined) { - emitToken(tokenKind, startPos); - write(" "); } else { - switch (tokenKind) { - case 102 /* VarKeyword */: - write("var "); - break; - case 108 /* LetKeyword */: - write("let "); - break; - case 74 /* ConstKeyword */: - write("const "); - break; - } + write("var "); } + // Note here we specifically dont emit end so that if we are going to emit binding pattern + // we can alter the source map correctly return true; } function emitVariableDeclarationListSkippingUninitializedEntries(list) { @@ -33512,7 +33941,7 @@ var ts; } else { var loop = convertLoopBody(node); - if (node.parent.kind === 209 /* LabeledStatement */) { + if (node.parent.kind === 210 /* LabeledStatement */) { // if parent of the loop was labeled statement - attach the label to loop skipping converted loop body emitLabelAndColon(node.parent); } @@ -33523,10 +33952,11 @@ var ts; var functionName = makeUniqueName("_loop"); var loopInitializer; switch (node.kind) { - case 201 /* ForStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - if (node.initializer.kind === 214 /* VariableDeclarationList */) { + case 202 /* ForStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: + var initializer = node.initializer; + if (initializer && initializer.kind === 215 /* VariableDeclarationList */) { loopInitializer = node.initializer; } break; @@ -33540,7 +33970,7 @@ var ts; collectNames(varDeclaration.name); } } - var bodyIsBlock = node.statement.kind === 194 /* Block */; + var bodyIsBlock = node.statement.kind === 195 /* Block */; var paramList = loopParameters ? loopParameters.join(", ") : ""; writeLine(); write("var " + functionName + " = function(" + paramList + ")"); @@ -33661,7 +34091,7 @@ var ts; if (emitAsEmbeddedStatement) { emitEmbeddedStatement(node.statement); } - else if (node.statement.kind === 194 /* Block */) { + else if (node.statement.kind === 195 /* Block */) { emitLines(node.statement.statements); } else { @@ -33771,9 +34201,9 @@ var ts; var endPos = emitToken(86 /* ForKeyword */, node.pos); write(" "); endPos = emitToken(17 /* OpenParenToken */, endPos); - if (node.initializer && node.initializer.kind === 214 /* VariableDeclarationList */) { + if (node.initializer && node.initializer.kind === 215 /* VariableDeclarationList */) { var variableDeclarationList = node.initializer; - var startIsEmitted = tryEmitStartOfVariableDeclarationList(variableDeclarationList, endPos); + var startIsEmitted = tryEmitStartOfVariableDeclarationList(variableDeclarationList); if (startIsEmitted) { emitCommaList(variableDeclarationList.declarations); } @@ -33797,7 +34227,7 @@ var ts; } } function emitForInOrForOfStatement(node) { - if (languageVersion < 2 /* ES6 */ && node.kind === 203 /* ForOfStatement */) { + if (languageVersion < 2 /* ES6 */ && node.kind === 204 /* ForOfStatement */) { emitLoop(node, emitDownLevelForOfStatementWorker); } else { @@ -33808,17 +34238,17 @@ var ts; var endPos = emitToken(86 /* ForKeyword */, node.pos); write(" "); endPos = emitToken(17 /* OpenParenToken */, endPos); - if (node.initializer.kind === 214 /* VariableDeclarationList */) { + if (node.initializer.kind === 215 /* VariableDeclarationList */) { var variableDeclarationList = node.initializer; if (variableDeclarationList.declarations.length >= 1) { - tryEmitStartOfVariableDeclarationList(variableDeclarationList, endPos); + tryEmitStartOfVariableDeclarationList(variableDeclarationList); emit(variableDeclarationList.declarations[0]); } } else { emit(node.initializer); } - if (node.kind === 202 /* ForInStatement */) { + if (node.kind === 203 /* ForInStatement */) { write(" in "); } else { @@ -33887,18 +34317,18 @@ var ts; emitEnd(node.expression); write("; "); // _i < _a.length; - emitStart(node.initializer); + emitStart(node.expression); emitNodeWithoutSourceMap(counter); write(" < "); emitNodeWithCommentsAndWithoutSourcemap(rhsReference); write(".length"); - emitEnd(node.initializer); + emitEnd(node.expression); write("; "); // _i++) - emitStart(node.initializer); + emitStart(node.expression); emitNodeWithoutSourceMap(counter); write("++"); - emitEnd(node.initializer); + emitEnd(node.expression); emitToken(18 /* CloseParenToken */, node.expression.end); // Body write(" {"); @@ -33908,7 +34338,7 @@ var ts; // let v = _a[_i]; var rhsIterationValue = createElementAccessExpression(rhsReference, counter); emitStart(node.initializer); - if (node.initializer.kind === 214 /* VariableDeclarationList */) { + if (node.initializer.kind === 215 /* VariableDeclarationList */) { write("var "); var variableDeclarationList = node.initializer; if (variableDeclarationList.declarations.length > 0) { @@ -33938,7 +34368,7 @@ var ts; // Initializer is an expression. Emit the expression in the body, so that it's // evaluated on every iteration. var assignmentExpression = createBinaryExpression(node.initializer, 56 /* EqualsToken */, rhsIterationValue, /*startsOnNewLine*/ false); - if (node.initializer.kind === 166 /* ArrayLiteralExpression */ || node.initializer.kind === 167 /* ObjectLiteralExpression */) { + if (node.initializer.kind === 167 /* ArrayLiteralExpression */ || node.initializer.kind === 168 /* ObjectLiteralExpression */) { // This is a destructuring pattern, so call emitDestructuring instead of emit. Calling emit will not work, because it will cause // the BinaryExpression to be passed in instead of the expression statement, which will cause emitDestructuring to crash. emitDestructuring(assignmentExpression, /*isAssignmentExpressionStatement*/ true, /*value*/ undefined); @@ -33966,12 +34396,12 @@ var ts; // it is possible if either // - break\continue is statement labeled and label is located inside the converted loop // - break\continue is non-labeled and located in non-converted loop\switch statement - var jump = node.kind === 205 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; + var jump = node.kind === 206 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; var canUseBreakOrContinue = (node.label && convertedLoopState.labels && convertedLoopState.labels[node.label.text]) || (!node.label && (convertedLoopState.allowedNonLabeledJumps & jump)); if (!canUseBreakOrContinue) { if (!node.label) { - if (node.kind === 205 /* BreakStatement */) { + if (node.kind === 206 /* BreakStatement */) { convertedLoopState.nonLocalJumps |= 2 /* Break */; write("return \"break\";"); } @@ -33982,7 +34412,7 @@ var ts; } else { var labelMarker; - if (node.kind === 205 /* BreakStatement */) { + if (node.kind === 206 /* BreakStatement */) { labelMarker = "break-" + node.label.text; setLabeledJump(convertedLoopState, /*isBreak*/ true, node.label.text, labelMarker); } @@ -33995,7 +34425,7 @@ var ts; return; } } - emitToken(node.kind === 205 /* BreakStatement */ ? 70 /* BreakKeyword */ : 75 /* ContinueKeyword */, node.pos); + emitToken(node.kind === 206 /* BreakStatement */ ? 70 /* BreakKeyword */ : 75 /* ContinueKeyword */, node.pos); emitOptional(" ", node.label); write(";"); } @@ -34061,7 +34491,7 @@ var ts; ts.getLineOfLocalPositionFromLineMap(currentLineMap, ts.skipTrivia(currentText, node2.pos)); } function emitCaseOrDefaultClause(node) { - if (node.kind === 243 /* CaseClause */) { + if (node.kind === 244 /* CaseClause */) { write("case "); emit(node.expression); write(":"); @@ -34130,7 +34560,7 @@ var ts; function getContainingModule(node) { do { node = node.parent; - } while (node && node.kind !== 220 /* ModuleDeclaration */); + } while (node && node.kind !== 221 /* ModuleDeclaration */); return node; } function emitContainingModuleName(node) { @@ -34155,13 +34585,13 @@ var ts; function createVoidZero() { var zero = ts.createSynthesizedNode(8 /* NumericLiteral */); zero.text = "0"; - var result = ts.createSynthesizedNode(179 /* VoidExpression */); + var result = ts.createSynthesizedNode(180 /* VoidExpression */); result.expression = zero; return result; } function emitEs6ExportDefaultCompat(node) { - if (node.parent.kind === 250 /* SourceFile */) { - ts.Debug.assert(!!(node.flags & 512 /* Default */) || node.kind === 229 /* ExportAssignment */); + if (node.parent.kind === 251 /* SourceFile */) { + ts.Debug.assert(!!(node.flags & 512 /* Default */) || node.kind === 230 /* ExportAssignment */); // only allow export default at a source file level if (modulekind === 1 /* CommonJS */ || modulekind === 2 /* AMD */ || modulekind === 3 /* UMD */) { if (!isEs6Module) { @@ -34257,7 +34687,7 @@ var ts; * @param value an expression as a right-hand-side operand of the assignment * @param shouldEmitCommaBeforeAssignment a boolean indicating whether to prefix an assignment with comma */ - function emitAssignment(name, value, shouldEmitCommaBeforeAssignment) { + function emitAssignment(name, value, shouldEmitCommaBeforeAssignment, nodeForSourceMap) { if (shouldEmitCommaBeforeAssignment) { write(", "); } @@ -34267,15 +34697,21 @@ var ts; emitNodeWithCommentsAndWithoutSourcemap(name); write("\", "); } - var isVariableDeclarationOrBindingElement = name.parent && (name.parent.kind === 213 /* VariableDeclaration */ || name.parent.kind === 165 /* BindingElement */); - if (isVariableDeclarationOrBindingElement) { - emitModuleMemberName(name.parent); - } - else { - emit(name); - } - write(" = "); - emit(value); + var isVariableDeclarationOrBindingElement = name.parent && (name.parent.kind === 214 /* VariableDeclaration */ || name.parent.kind === 166 /* BindingElement */); + // If this is first var declaration, we need to start at var/let/const keyword instead + // otherwise use nodeForSourceMap as the start position + emitStart(isFirstVariableDeclaration(nodeForSourceMap) ? nodeForSourceMap.parent : nodeForSourceMap); + withTemporaryNoSourceMap(function () { + if (isVariableDeclarationOrBindingElement) { + emitModuleMemberName(name.parent); + } + else { + emit(name); + } + write(" = "); + emit(value); + }); + emitEnd(nodeForSourceMap, /*stopOverridingSpan*/ true); if (exportChanged) { write(")"); } @@ -34286,14 +34722,19 @@ var ts; * @param canDefineTempVariablesInPlace a boolean indicating whether you can define the temporary variable at an assignment location * @param shouldEmitCommaBeforeAssignment a boolean indicating whether an assignment should prefix with comma */ - function emitTempVariableAssignment(expression, canDefineTempVariablesInPlace, shouldEmitCommaBeforeAssignment) { + function emitTempVariableAssignment(expression, canDefineTempVariablesInPlace, shouldEmitCommaBeforeAssignment, sourceMapNode) { var identifier = createTempVariable(0 /* Auto */); if (!canDefineTempVariablesInPlace) { recordTempDeclaration(identifier); } - emitAssignment(identifier, expression, shouldEmitCommaBeforeAssignment); + emitAssignment(identifier, expression, shouldEmitCommaBeforeAssignment, sourceMapNode || expression.parent); return identifier; } + function isFirstVariableDeclaration(root) { + return root.kind === 214 /* VariableDeclaration */ && + root.parent.kind === 215 /* VariableDeclarationList */ && + root.parent.declarations[0] === root; + } function emitDestructuring(root, isAssignmentExpressionStatement, value) { var emitCount = 0; // An exported declaration is actually emitted as an assignment (to a property on the module object), so @@ -34301,19 +34742,24 @@ var ts; // Also temporary variables should be explicitly allocated for source level declarations when module target is system // because actual variable declarations are hoisted var canDefineTempVariablesInPlace = false; - if (root.kind === 213 /* VariableDeclaration */) { + if (root.kind === 214 /* VariableDeclaration */) { var isExported = ts.getCombinedNodeFlags(root) & 2 /* Export */; var isSourceLevelForSystemModuleKind = shouldHoistDeclarationInSystemJsModule(root); canDefineTempVariablesInPlace = !isExported && !isSourceLevelForSystemModuleKind; } - else if (root.kind === 138 /* Parameter */) { + else if (root.kind === 139 /* Parameter */) { canDefineTempVariablesInPlace = true; } - if (root.kind === 183 /* BinaryExpression */) { + if (root.kind === 184 /* BinaryExpression */) { emitAssignmentExpression(root); } else { ts.Debug.assert(!isAssignmentExpressionStatement); + // If first variable declaration of variable statement correct the start location + if (isFirstVariableDeclaration(root)) { + // Use emit location of "var " as next emit start entry + sourceMap.changeEmitSourcePos(); + } emitBindingElement(root, value); } /** @@ -34325,27 +34771,28 @@ var ts; * @param reuseIdentifierExpressions true if identifier expressions can simply be returned; * false if it is necessary to always emit an identifier. */ - function ensureIdentifier(expr, reuseIdentifierExpressions) { + function ensureIdentifier(expr, reuseIdentifierExpressions, sourceMapNode) { if (expr.kind === 69 /* Identifier */ && reuseIdentifierExpressions) { return expr; } - var identifier = emitTempVariableAssignment(expr, canDefineTempVariablesInPlace, emitCount > 0); + var identifier = emitTempVariableAssignment(expr, canDefineTempVariablesInPlace, emitCount > 0, sourceMapNode); emitCount++; return identifier; } - function createDefaultValueCheck(value, defaultValue) { + function createDefaultValueCheck(value, defaultValue, sourceMapNode) { // The value expression will be evaluated twice, so for anything but a simple identifier // we need to generate a temporary variable - value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true); + // If the temporary variable needs to be emitted use the source Map node for assignment of that statement + value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true, sourceMapNode); // Return the expression 'value === void 0 ? defaultValue : value' - var equals = ts.createSynthesizedNode(183 /* BinaryExpression */); + var equals = ts.createSynthesizedNode(184 /* BinaryExpression */); equals.left = value; equals.operatorToken = ts.createSynthesizedNode(32 /* EqualsEqualsEqualsToken */); equals.right = createVoidZero(); return createConditionalExpression(equals, defaultValue, value); } function createConditionalExpression(condition, whenTrue, whenFalse) { - var cond = ts.createSynthesizedNode(184 /* ConditionalExpression */); + var cond = ts.createSynthesizedNode(185 /* ConditionalExpression */); cond.condition = condition; cond.questionToken = ts.createSynthesizedNode(53 /* QuestionToken */); cond.whenTrue = whenTrue; @@ -34360,9 +34807,10 @@ var ts; } function createPropertyAccessForDestructuringProperty(object, propName) { var index; - var nameIsComputed = propName.kind === 136 /* ComputedPropertyName */; + var nameIsComputed = propName.kind === 137 /* ComputedPropertyName */; if (nameIsComputed) { - index = ensureIdentifier(propName.expression, /*reuseIdentifierExpressions*/ false); + // TODO to handle when we look into sourcemaps for computed properties, for now use propName + index = ensureIdentifier(propName.expression, /*reuseIdentifierExpressions*/ false, propName); } else { // We create a synthetic copy of the identifier in order to avoid the rewriting that might @@ -34375,7 +34823,7 @@ var ts; : createElementAccessExpression(object, index); } function createSliceCall(value, sliceIndex) { - var call = ts.createSynthesizedNode(170 /* CallExpression */); + var call = ts.createSynthesizedNode(171 /* CallExpression */); var sliceIdentifier = ts.createSynthesizedNode(69 /* Identifier */); sliceIdentifier.text = "slice"; call.expression = createPropertyAccessExpression(value, sliceIdentifier); @@ -34383,60 +34831,65 @@ var ts; call.arguments[0] = createNumericLiteral(sliceIndex); return call; } - function emitObjectLiteralAssignment(target, value) { + function emitObjectLiteralAssignment(target, value, sourceMapNode) { var properties = target.properties; if (properties.length !== 1) { // For anything but a single element destructuring we need to generate a temporary // to ensure value is evaluated exactly once. - value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true); + // When doing so we want to hightlight the passed in source map node since thats the one needing this temp assignment + value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true, sourceMapNode); } for (var _a = 0, properties_5 = properties; _a < properties_5.length; _a++) { var p = properties_5[_a]; - if (p.kind === 247 /* PropertyAssignment */ || p.kind === 248 /* ShorthandPropertyAssignment */) { + if (p.kind === 248 /* PropertyAssignment */ || p.kind === 249 /* ShorthandPropertyAssignment */) { var propName = p.name; - var target_1 = p.kind === 248 /* ShorthandPropertyAssignment */ ? p : p.initializer || propName; - emitDestructuringAssignment(target_1, createPropertyAccessForDestructuringProperty(value, propName)); + var target_1 = p.kind === 249 /* ShorthandPropertyAssignment */ ? p : p.initializer || propName; + // Assignment for target = value.propName should highligh whole property, hence use p as source map node + emitDestructuringAssignment(target_1, createPropertyAccessForDestructuringProperty(value, propName), p); } } } - function emitArrayLiteralAssignment(target, value) { + function emitArrayLiteralAssignment(target, value, sourceMapNode) { var elements = target.elements; if (elements.length !== 1) { // For anything but a single element destructuring we need to generate a temporary // to ensure value is evaluated exactly once. - value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true); + // When doing so we want to hightlight the passed in source map node since thats the one needing this temp assignment + value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true, sourceMapNode); } for (var i = 0; i < elements.length; i++) { var e = elements[i]; - if (e.kind !== 189 /* OmittedExpression */) { - if (e.kind !== 187 /* SpreadElementExpression */) { - emitDestructuringAssignment(e, createElementAccessExpression(value, createNumericLiteral(i))); + if (e.kind !== 190 /* OmittedExpression */) { + // Assignment for target = value.propName should highligh whole property, hence use e as source map node + if (e.kind !== 188 /* SpreadElementExpression */) { + emitDestructuringAssignment(e, createElementAccessExpression(value, createNumericLiteral(i)), e); } else if (i === elements.length - 1) { - emitDestructuringAssignment(e.expression, createSliceCall(value, i)); + emitDestructuringAssignment(e.expression, createSliceCall(value, i), e); } } } } - function emitDestructuringAssignment(target, value) { - if (target.kind === 248 /* ShorthandPropertyAssignment */) { + function emitDestructuringAssignment(target, value, sourceMapNode) { + // When emitting target = value use source map node to highlight, including any temporary assignments needed for this + if (target.kind === 249 /* ShorthandPropertyAssignment */) { if (target.objectAssignmentInitializer) { - value = createDefaultValueCheck(value, target.objectAssignmentInitializer); + value = createDefaultValueCheck(value, target.objectAssignmentInitializer, sourceMapNode); } target = target.name; } - else if (target.kind === 183 /* BinaryExpression */ && target.operatorToken.kind === 56 /* EqualsToken */) { - value = createDefaultValueCheck(value, target.right); + else if (target.kind === 184 /* BinaryExpression */ && target.operatorToken.kind === 56 /* EqualsToken */) { + value = createDefaultValueCheck(value, target.right, sourceMapNode); target = target.left; } - if (target.kind === 167 /* ObjectLiteralExpression */) { - emitObjectLiteralAssignment(target, value); + if (target.kind === 168 /* ObjectLiteralExpression */) { + emitObjectLiteralAssignment(target, value, sourceMapNode); } - else if (target.kind === 166 /* ArrayLiteralExpression */) { - emitArrayLiteralAssignment(target, value); + else if (target.kind === 167 /* ArrayLiteralExpression */) { + emitArrayLiteralAssignment(target, value, sourceMapNode); } else { - emitAssignment(target, value, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0); + emitAssignment(target, value, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0, sourceMapNode); emitCount++; } } @@ -34447,25 +34900,32 @@ var ts; emit(value); } else if (isAssignmentExpressionStatement) { - emitDestructuringAssignment(target, value); + // Source map node for root.left = root.right is root + // but if root is synthetic, which could be in below case, use the target which is { a } + // for ({a} of {a: string}) { + // } + emitDestructuringAssignment(target, value, ts.nodeIsSynthesized(root) ? target : root); } else { - if (root.parent.kind !== 174 /* ParenthesizedExpression */) { + if (root.parent.kind !== 175 /* ParenthesizedExpression */) { write("("); } - value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true); - emitDestructuringAssignment(target, value); + // Temporary assignment needed to emit root should highlight whole binary expression + value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true, root); + // Source map node for root.left = root.right is root + emitDestructuringAssignment(target, value, root); write(", "); emit(value); - if (root.parent.kind !== 174 /* ParenthesizedExpression */) { + if (root.parent.kind !== 175 /* ParenthesizedExpression */) { write(")"); } } } function emitBindingElement(target, value) { + // Any temporary assignments needed to emit target = value should point to target if (target.initializer) { // Combine value and initializer - value = value ? createDefaultValueCheck(value, target.initializer) : target.initializer; + value = value ? createDefaultValueCheck(value, target.initializer, target) : target.initializer; } else if (!value) { // Use 'void 0' in absence of value and initializer @@ -34480,16 +34940,16 @@ var ts; // to ensure value is evaluated exactly once. Additionally, if we have zero elements // we need to emit *something* to ensure that in case a 'var' keyword was already emitted, // so in that case, we'll intentionally create that temporary. - value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ numElements !== 0); + value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ numElements !== 0, target); } for (var i = 0; i < numElements; i++) { var element = elements[i]; - if (pattern.kind === 163 /* ObjectBindingPattern */) { + if (pattern.kind === 164 /* ObjectBindingPattern */) { // Rewrite element to a declaration with an initializer that fetches property var propName = element.propertyName || element.name; emitBindingElement(element, createPropertyAccessForDestructuringProperty(value, propName)); } - else if (element.kind !== 189 /* OmittedExpression */) { + else if (element.kind !== 190 /* OmittedExpression */) { if (!element.dotDotDotToken) { // Rewrite element to a declaration that accesses array element at index i emitBindingElement(element, createElementAccessExpression(value, createNumericLiteral(i))); @@ -34501,7 +34961,7 @@ var ts; } } else { - emitAssignment(target.name, value, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0); + emitAssignment(target.name, value, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0, target); emitCount++; } } @@ -34529,8 +34989,8 @@ var ts; (getCombinedFlagsForIdentifier(node.name) & 8192 /* Let */); // NOTE: default initialization should not be added to let bindings in for-in\for-of statements if (isLetDefinedInLoop && - node.parent.parent.kind !== 202 /* ForInStatement */ && - node.parent.parent.kind !== 203 /* ForOfStatement */) { + node.parent.parent.kind !== 203 /* ForInStatement */ && + node.parent.parent.kind !== 204 /* ForOfStatement */) { initializer = createVoidZero(); } } @@ -34548,7 +35008,7 @@ var ts; } } function emitExportVariableAssignments(node) { - if (node.kind === 189 /* OmittedExpression */) { + if (node.kind === 190 /* OmittedExpression */) { return; } var name = node.name; @@ -34560,7 +35020,7 @@ var ts; } } function getCombinedFlagsForIdentifier(node) { - if (!node.parent || (node.parent.kind !== 213 /* VariableDeclaration */ && node.parent.kind !== 165 /* BindingElement */)) { + if (!node.parent || (node.parent.kind !== 214 /* VariableDeclaration */ && node.parent.kind !== 166 /* BindingElement */)) { return 0; } return ts.getCombinedNodeFlags(node.parent); @@ -34568,7 +35028,7 @@ var ts; function isES6ExportedDeclaration(node) { return !!(node.flags & 2 /* Export */) && modulekind === 5 /* ES6 */ && - node.parent.kind === 250 /* SourceFile */; + node.parent.kind === 251 /* SourceFile */; } function emitVariableStatement(node) { var startIsEmitted = false; @@ -34619,12 +35079,12 @@ var ts; function emitParameter(node) { if (languageVersion < 2 /* ES6 */) { if (ts.isBindingPattern(node.name)) { - var name_23 = createTempVariable(0 /* Auto */); + var name_26 = createTempVariable(0 /* Auto */); if (!tempParameters) { tempParameters = []; } - tempParameters.push(name_23); - emit(name_23); + tempParameters.push(name_26); + emit(name_26); } else { emit(node.name); @@ -34729,12 +35189,12 @@ var ts; } } function emitAccessor(node) { - write(node.kind === 145 /* GetAccessor */ ? "get " : "set "); + write(node.kind === 146 /* GetAccessor */ ? "get " : "set "); emit(node.name); emitSignatureAndBody(node); } function shouldEmitAsArrowFunction(node) { - return node.kind === 176 /* ArrowFunction */ && languageVersion >= 2 /* ES6 */; + return node.kind === 177 /* ArrowFunction */ && languageVersion >= 2 /* ES6 */; } function emitDeclarationName(node) { if (node.name) { @@ -34745,11 +35205,11 @@ var ts; } } function shouldEmitFunctionName(node) { - if (node.kind === 175 /* FunctionExpression */) { + if (node.kind === 176 /* FunctionExpression */) { // Emit name if one is present return !!node.name; } - if (node.kind === 215 /* FunctionDeclaration */) { + if (node.kind === 216 /* FunctionDeclaration */) { // Emit name if one is present, or emit generated name in down-level case (for export default case) return !!node.name || modulekind !== 5 /* ES6 */; } @@ -34761,12 +35221,12 @@ var ts; // TODO (yuisu) : we should not have special cases to condition emitting comments // but have one place to fix check for these conditions. var kind = node.kind, parent = node.parent; - if (kind !== 143 /* MethodDeclaration */ && - kind !== 142 /* MethodSignature */ && + if (kind !== 144 /* MethodDeclaration */ && + kind !== 143 /* MethodSignature */ && parent && - parent.kind !== 247 /* PropertyAssignment */ && - parent.kind !== 170 /* CallExpression */ && - parent.kind !== 166 /* ArrayLiteralExpression */) { + parent.kind !== 248 /* PropertyAssignment */ && + parent.kind !== 171 /* CallExpression */ && + parent.kind !== 167 /* ArrayLiteralExpression */) { // 1. Methods will emit comments at their assignment declaration sites. // // 2. If the function is a property of object literal, emitting leading-comments @@ -34805,11 +35265,11 @@ var ts; emitDeclarationName(node); } emitSignatureAndBody(node); - if (modulekind !== 5 /* ES6 */ && kind === 215 /* FunctionDeclaration */ && parent === currentSourceFile && node.name) { + if (modulekind !== 5 /* ES6 */ && kind === 216 /* FunctionDeclaration */ && parent === currentSourceFile && node.name) { emitExportMemberAssignments(node.name); } emitEnd(node); - if (kind !== 143 /* MethodDeclaration */ && kind !== 142 /* MethodSignature */) { + if (kind !== 144 /* MethodDeclaration */ && kind !== 143 /* MethodSignature */) { emitTrailingComments(node); } } @@ -34842,7 +35302,7 @@ var ts; } function emitAsyncFunctionBodyForES6(node) { var promiseConstructor = ts.getEntityNameFromTypeNode(node.type); - var isArrowFunction = node.kind === 176 /* ArrowFunction */; + var isArrowFunction = node.kind === 177 /* ArrowFunction */; var hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 4096 /* CaptureArguments */) !== 0; // An async function is emit as an outer function that calls an inner // generator function. To preserve lexical bindings, we pass the current @@ -34961,7 +35421,7 @@ var ts; write(" { }"); } else { - if (node.body.kind === 194 /* Block */) { + if (node.body.kind === 195 /* Block */) { emitBlockFunctionBody(node, node.body); } else { @@ -35020,10 +35480,10 @@ var ts; write(" "); // Unwrap all type assertions. var current = body; - while (current.kind === 173 /* TypeAssertionExpression */) { + while (current.kind === 174 /* TypeAssertionExpression */) { current = current.expression; } - emitParenthesizedIf(body, current.kind === 167 /* ObjectLiteralExpression */); + emitParenthesizedIf(body, current.kind === 168 /* ObjectLiteralExpression */); } function emitDownLevelExpressionFunctionBody(node, body) { write(" {"); @@ -35097,9 +35557,9 @@ var ts; function findInitialSuperCall(ctor) { if (ctor.body) { var statement = ctor.body.statements[0]; - if (statement && statement.kind === 197 /* ExpressionStatement */) { + if (statement && statement.kind === 198 /* ExpressionStatement */) { var expr = statement.expression; - if (expr && expr.kind === 170 /* CallExpression */) { + if (expr && expr.kind === 171 /* CallExpression */) { var func = expr.expression; if (func && func.kind === 95 /* SuperKeyword */) { return statement; @@ -35133,7 +35593,7 @@ var ts; emitNodeWithCommentsAndWithoutSourcemap(memberName); write("]"); } - else if (memberName.kind === 136 /* ComputedPropertyName */) { + else if (memberName.kind === 137 /* ComputedPropertyName */) { emitComputedPropertyName(memberName); } else { @@ -35145,7 +35605,7 @@ var ts; var properties = []; for (var _a = 0, _b = node.members; _a < _b.length; _a++) { var member = _b[_a]; - if (member.kind === 141 /* PropertyDeclaration */ && isStatic === ((member.flags & 64 /* Static */) !== 0) && member.initializer) { + if (member.kind === 142 /* PropertyDeclaration */ && isStatic === ((member.flags & 64 /* Static */) !== 0) && member.initializer) { properties.push(member); } } @@ -35185,11 +35645,11 @@ var ts; } function emitMemberFunctionsForES5AndLower(node) { ts.forEach(node.members, function (member) { - if (member.kind === 193 /* SemicolonClassElement */) { + if (member.kind === 194 /* SemicolonClassElement */) { writeLine(); write(";"); } - else if (member.kind === 143 /* MethodDeclaration */ || node.kind === 142 /* MethodSignature */) { + else if (member.kind === 144 /* MethodDeclaration */ || node.kind === 143 /* MethodSignature */) { if (!member.body) { return emitCommentsOnNotEmittedNode(member); } @@ -35206,7 +35666,7 @@ var ts; write(";"); emitTrailingComments(member); } - else if (member.kind === 145 /* GetAccessor */ || member.kind === 146 /* SetAccessor */) { + else if (member.kind === 146 /* GetAccessor */ || member.kind === 147 /* SetAccessor */) { var accessors = ts.getAllAccessorDeclarations(node.members, member); if (member === accessors.firstAccessor) { writeLine(); @@ -35256,22 +35716,22 @@ var ts; function emitMemberFunctionsForES6AndHigher(node) { for (var _a = 0, _b = node.members; _a < _b.length; _a++) { var member = _b[_a]; - if ((member.kind === 143 /* MethodDeclaration */ || node.kind === 142 /* MethodSignature */) && !member.body) { + if ((member.kind === 144 /* MethodDeclaration */ || node.kind === 143 /* MethodSignature */) && !member.body) { emitCommentsOnNotEmittedNode(member); } - else if (member.kind === 143 /* MethodDeclaration */ || - member.kind === 145 /* GetAccessor */ || - member.kind === 146 /* SetAccessor */) { + else if (member.kind === 144 /* MethodDeclaration */ || + member.kind === 146 /* GetAccessor */ || + member.kind === 147 /* SetAccessor */) { writeLine(); emitLeadingComments(member); emitStart(member); if (member.flags & 64 /* Static */) { write("static "); } - if (member.kind === 145 /* GetAccessor */) { + if (member.kind === 146 /* GetAccessor */) { write("get "); } - else if (member.kind === 146 /* SetAccessor */) { + else if (member.kind === 147 /* SetAccessor */) { write("set "); } if (member.asteriskToken) { @@ -35282,7 +35742,7 @@ var ts; emitEnd(member); emitTrailingComments(member); } - else if (member.kind === 193 /* SemicolonClassElement */) { + else if (member.kind === 194 /* SemicolonClassElement */) { writeLine(); write(";"); } @@ -35311,11 +35771,11 @@ var ts; var hasInstancePropertyWithInitializer = false; // Emit the constructor overload pinned comments ts.forEach(node.members, function (member) { - if (member.kind === 144 /* Constructor */ && !member.body) { + if (member.kind === 145 /* Constructor */ && !member.body) { emitCommentsOnNotEmittedNode(member); } // Check if there is any non-static property assignment - if (member.kind === 141 /* PropertyDeclaration */ && member.initializer && (member.flags & 64 /* Static */) === 0) { + if (member.kind === 142 /* PropertyDeclaration */ && member.initializer && (member.flags & 64 /* Static */) === 0) { hasInstancePropertyWithInitializer = true; } }); @@ -35429,7 +35889,7 @@ var ts; } function emitClassLikeDeclarationForES6AndHigher(node) { var thisNodeIsDecorated = ts.nodeIsDecorated(node); - if (node.kind === 216 /* ClassDeclaration */) { + if (node.kind === 217 /* ClassDeclaration */) { if (thisNodeIsDecorated) { // To preserve the correct runtime semantics when decorators are applied to the class, // the emit needs to follow one of the following rules: @@ -35506,7 +35966,7 @@ var ts; // This keeps the expression as an expression, while ensuring that the static parts // of it have been initialized by the time it is used. var staticProperties = getInitializedProperties(node, /*isStatic*/ true); - var isClassExpressionWithStaticProperties = staticProperties.length > 0 && node.kind === 188 /* ClassExpression */; + var isClassExpressionWithStaticProperties = staticProperties.length > 0 && node.kind === 189 /* ClassExpression */; var tempVariable; if (isClassExpressionWithStaticProperties) { tempVariable = createAndRecordTempVariable(0 /* Auto */); @@ -35588,7 +36048,7 @@ var ts; write(";"); } } - else if (node.parent.kind !== 250 /* SourceFile */) { + else if (node.parent.kind !== 251 /* SourceFile */) { writeLine(); emitStart(node); emitModuleMemberName(node); @@ -35600,7 +36060,7 @@ var ts; } } function emitClassLikeDeclarationBelowES6(node) { - if (node.kind === 216 /* ClassDeclaration */) { + if (node.kind === 217 /* ClassDeclaration */) { // source file level classes in system modules are hoisted so 'var's for them are already defined if (!shouldHoistDeclarationInSystemJsModule(node)) { write("var "); @@ -35661,11 +36121,11 @@ var ts; emit(baseTypeNode.expression); } write("))"); - if (node.kind === 216 /* ClassDeclaration */) { + if (node.kind === 217 /* ClassDeclaration */) { write(";"); } emitEnd(node); - if (node.kind === 216 /* ClassDeclaration */) { + if (node.kind === 217 /* ClassDeclaration */) { emitExportMemberAssignment(node); } } @@ -35749,7 +36209,7 @@ var ts; else { decorators = member.decorators; // we only decorate the parameters here if this is a method - if (member.kind === 143 /* MethodDeclaration */) { + if (member.kind === 144 /* MethodDeclaration */) { functionLikeMember = member; } } @@ -35806,7 +36266,7 @@ var ts; write(", "); emitExpressionForPropertyName(member.name); if (languageVersion > 0 /* ES3 */) { - if (member.kind !== 141 /* PropertyDeclaration */) { + if (member.kind !== 142 /* PropertyDeclaration */) { // We emit `null` here to indicate to `__decorate` that it can invoke `Object.getOwnPropertyDescriptor` directly. // We have this extra argument here so that we can inject an explicit property descriptor at a later date. write(", null"); @@ -35848,10 +36308,10 @@ var ts; // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata // compiler option is set. switch (node.kind) { - case 143 /* MethodDeclaration */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 141 /* PropertyDeclaration */: + case 144 /* MethodDeclaration */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 142 /* PropertyDeclaration */: return true; } return false; @@ -35861,7 +36321,7 @@ var ts; // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata // compiler option is set. switch (node.kind) { - case 143 /* MethodDeclaration */: + case 144 /* MethodDeclaration */: return true; } return false; @@ -35871,9 +36331,9 @@ var ts; // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata // compiler option is set. switch (node.kind) { - case 216 /* ClassDeclaration */: - case 143 /* MethodDeclaration */: - case 146 /* SetAccessor */: + case 217 /* ClassDeclaration */: + case 144 /* MethodDeclaration */: + case 147 /* SetAccessor */: return true; } return false; @@ -35891,19 +36351,19 @@ var ts; // // For rules on serializing type annotations, see `serializeTypeNode`. switch (node.kind) { - case 216 /* ClassDeclaration */: + case 217 /* ClassDeclaration */: write("Function"); return; - case 141 /* PropertyDeclaration */: + case 142 /* PropertyDeclaration */: emitSerializedTypeNode(node.type); return; - case 138 /* Parameter */: + case 139 /* Parameter */: emitSerializedTypeNode(node.type); return; - case 145 /* GetAccessor */: + case 146 /* GetAccessor */: emitSerializedTypeNode(node.type); return; - case 146 /* SetAccessor */: + case 147 /* SetAccessor */: emitSerializedTypeNode(ts.getSetAccessorTypeAnnotationNode(node)); return; } @@ -35919,23 +36379,23 @@ var ts; case 103 /* VoidKeyword */: write("void 0"); return; - case 160 /* ParenthesizedType */: + case 161 /* ParenthesizedType */: emitSerializedTypeNode(node.type); return; - case 152 /* FunctionType */: - case 153 /* ConstructorType */: + case 153 /* FunctionType */: + case 154 /* ConstructorType */: write("Function"); return; - case 156 /* ArrayType */: - case 157 /* TupleType */: + case 157 /* ArrayType */: + case 158 /* TupleType */: write("Array"); return; - case 150 /* TypePredicate */: + case 151 /* TypePredicate */: case 120 /* BooleanKeyword */: write("Boolean"); return; case 130 /* StringKeyword */: - case 162 /* StringLiteralType */: + case 163 /* StringLiteralType */: write("String"); return; case 128 /* NumberKeyword */: @@ -35944,15 +36404,15 @@ var ts; case 131 /* SymbolKeyword */: write("Symbol"); return; - case 151 /* TypeReference */: + case 152 /* TypeReference */: emitSerializedTypeReferenceNode(node); return; - case 154 /* TypeQuery */: - case 155 /* TypeLiteral */: - case 158 /* UnionType */: - case 159 /* IntersectionType */: + case 155 /* TypeQuery */: + case 156 /* TypeLiteral */: + case 159 /* UnionType */: + case 160 /* IntersectionType */: case 117 /* AnyKeyword */: - case 161 /* ThisType */: + case 162 /* ThisType */: break; default: ts.Debug.fail("Cannot serialize unexpected type node."); @@ -36025,7 +36485,7 @@ var ts; // For the rules on serializing the type of each parameter declaration, see `serializeTypeOfDeclaration`. if (node) { var valueDeclaration; - if (node.kind === 216 /* ClassDeclaration */) { + if (node.kind === 217 /* ClassDeclaration */) { valueDeclaration = ts.getFirstConstructorWithBody(node); } else if (ts.isFunctionLike(node) && ts.nodeIsPresent(node.body)) { @@ -36041,10 +36501,10 @@ var ts; } if (parameters[i].dotDotDotToken) { var parameterType = parameters[i].type; - if (parameterType.kind === 156 /* ArrayType */) { + if (parameterType.kind === 157 /* ArrayType */) { parameterType = parameterType.elementType; } - else if (parameterType.kind === 151 /* TypeReference */ && parameterType.typeArguments && parameterType.typeArguments.length === 1) { + else if (parameterType.kind === 152 /* TypeReference */ && parameterType.typeArguments && parameterType.typeArguments.length === 1) { parameterType = parameterType.typeArguments[0]; } else { @@ -36121,7 +36581,7 @@ var ts; if (!shouldHoistDeclarationInSystemJsModule(node)) { // do not emit var if variable was already hoisted var isES6ExportedEnum = isES6ExportedDeclaration(node); - if (!(node.flags & 2 /* Export */) || (isES6ExportedEnum && isFirstDeclarationOfKind(node, node.symbol && node.symbol.declarations, 219 /* EnumDeclaration */))) { + if (!(node.flags & 2 /* Export */) || (isES6ExportedEnum && isFirstDeclarationOfKind(node, node.symbol && node.symbol.declarations, 220 /* EnumDeclaration */))) { emitStart(node); if (isES6ExportedEnum) { write("export "); @@ -36203,7 +36663,7 @@ var ts; } } function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 220 /* ModuleDeclaration */) { + if (moduleDeclaration.body.kind === 221 /* ModuleDeclaration */) { var recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); return recursiveInnerModule || moduleDeclaration.body; } @@ -36227,7 +36687,7 @@ var ts; var emitVarForModule = !hoistedInDeclarationScope && !isModuleMergedWithES6Class(node); if (emitVarForModule) { var isES6ExportedNamespace = isES6ExportedDeclaration(node); - if (!isES6ExportedNamespace || isFirstDeclarationOfKind(node, node.symbol && node.symbol.declarations, 220 /* ModuleDeclaration */)) { + if (!isES6ExportedNamespace || isFirstDeclarationOfKind(node, node.symbol && node.symbol.declarations, 221 /* ModuleDeclaration */)) { emitStart(node); if (isES6ExportedNamespace) { write("export "); @@ -36245,7 +36705,7 @@ var ts; write(getGeneratedNameForNode(node)); emitEnd(node.name); write(") "); - if (node.body.kind === 221 /* ModuleBlock */) { + if (node.body.kind === 222 /* ModuleBlock */) { var saveConvertedLoopState = convertedLoopState; var saveTempFlags = tempFlags; var saveTempVariables = tempVariables; @@ -36321,16 +36781,16 @@ var ts; } } function getNamespaceDeclarationNode(node) { - if (node.kind === 223 /* ImportEqualsDeclaration */) { + if (node.kind === 224 /* ImportEqualsDeclaration */) { return node; } var importClause = node.importClause; - if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 226 /* NamespaceImport */) { + if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 227 /* NamespaceImport */) { return importClause.namedBindings; } } function isDefaultImport(node) { - return node.kind === 224 /* ImportDeclaration */ && node.importClause && !!node.importClause.name; + return node.kind === 225 /* ImportDeclaration */ && node.importClause && !!node.importClause.name; } function emitExportImportAssignments(node) { if (ts.isAliasSymbolDeclaration(node) && resolver.isValueAliasDeclaration(node)) { @@ -36358,7 +36818,7 @@ var ts; if (shouldEmitNamedBindings) { emitLeadingComments(node.importClause.namedBindings); emitStart(node.importClause.namedBindings); - if (node.importClause.namedBindings.kind === 226 /* NamespaceImport */) { + if (node.importClause.namedBindings.kind === 227 /* NamespaceImport */) { write("* as "); emit(node.importClause.namedBindings.name); } @@ -36384,7 +36844,7 @@ var ts; } function emitExternalImportDeclaration(node) { if (ts.contains(externalImports, node)) { - var isExportedImport = node.kind === 223 /* ImportEqualsDeclaration */ && (node.flags & 2 /* Export */) !== 0; + var isExportedImport = node.kind === 224 /* ImportEqualsDeclaration */ && (node.flags & 2 /* Export */) !== 0; var namespaceDeclaration = getNamespaceDeclarationNode(node); if (modulekind !== 2 /* AMD */) { emitLeadingComments(node); @@ -36403,7 +36863,7 @@ var ts; // import { x, y } from "foo" // import d, * as x from "foo" // import d, { x, y } from "foo" - var isNakedImport = 224 /* ImportDeclaration */ && !node.importClause; + var isNakedImport = 225 /* ImportDeclaration */ && !node.importClause; if (!isNakedImport) { write("var "); write(getGeneratedNameForNode(node)); @@ -36582,8 +37042,8 @@ var ts; write("export default "); var expression = node.expression; emit(expression); - if (expression.kind !== 215 /* FunctionDeclaration */ && - expression.kind !== 216 /* ClassDeclaration */) { + if (expression.kind !== 216 /* FunctionDeclaration */ && + expression.kind !== 217 /* ClassDeclaration */) { write(";"); } emitEnd(node); @@ -36620,7 +37080,7 @@ var ts; for (var _a = 0, _b = sourceFile.statements; _a < _b.length; _a++) { var node = _b[_a]; switch (node.kind) { - case 224 /* ImportDeclaration */: + case 225 /* ImportDeclaration */: if (!node.importClause || resolver.isReferencedAliasDeclaration(node.importClause, /*checkChildren*/ true)) { // import "mod" @@ -36630,13 +37090,13 @@ var ts; externalImports.push(node); } break; - case 223 /* ImportEqualsDeclaration */: - if (node.moduleReference.kind === 234 /* ExternalModuleReference */ && resolver.isReferencedAliasDeclaration(node)) { + case 224 /* ImportEqualsDeclaration */: + if (node.moduleReference.kind === 235 /* ExternalModuleReference */ && resolver.isReferencedAliasDeclaration(node)) { // import x = require("mod") where x is referenced externalImports.push(node); } break; - case 230 /* ExportDeclaration */: + case 231 /* ExportDeclaration */: if (node.moduleSpecifier) { if (!node.exportClause) { // export * from "mod" @@ -36654,12 +37114,12 @@ var ts; // export { x, y } for (var _c = 0, _d = node.exportClause.elements; _c < _d.length; _c++) { var specifier = _d[_c]; - var name_24 = (specifier.propertyName || specifier.name).text; - (exportSpecifiers[name_24] || (exportSpecifiers[name_24] = [])).push(specifier); + var name_27 = (specifier.propertyName || specifier.name).text; + (exportSpecifiers[name_27] || (exportSpecifiers[name_27] = [])).push(specifier); } } break; - case 229 /* ExportAssignment */: + case 230 /* ExportAssignment */: if (node.isExportEquals && !exportEquals) { // export = x exportEquals = node; @@ -36685,18 +37145,18 @@ var ts; if (namespaceDeclaration && !isDefaultImport(node)) { return ts.getTextOfNodeFromSourceText(currentText, namespaceDeclaration.name); } - if (node.kind === 224 /* ImportDeclaration */ && node.importClause) { + if (node.kind === 225 /* ImportDeclaration */ && node.importClause) { return getGeneratedNameForNode(node); } - if (node.kind === 230 /* ExportDeclaration */ && node.moduleSpecifier) { + if (node.kind === 231 /* ExportDeclaration */ && node.moduleSpecifier) { return getGeneratedNameForNode(node); } } function getExternalModuleNameText(importNode, emitRelativePathAsModuleName) { if (emitRelativePathAsModuleName) { - var name_25 = getExternalModuleNameFromDeclaration(host, resolver, importNode); - if (name_25) { - return "\"" + name_25 + "\""; + var name_28 = getExternalModuleNameFromDeclaration(host, resolver, importNode); + if (name_28) { + return "\"" + name_28 + "\""; } } var moduleName = ts.getExternalModuleName(importNode); @@ -36714,8 +37174,8 @@ var ts; for (var _a = 0, externalImports_1 = externalImports; _a < externalImports_1.length; _a++) { var importNode = externalImports_1[_a]; // do not create variable declaration for exports and imports that lack import clause - var skipNode = importNode.kind === 230 /* ExportDeclaration */ || - (importNode.kind === 224 /* ImportDeclaration */ && !importNode.importClause); + var skipNode = importNode.kind === 231 /* ExportDeclaration */ || + (importNode.kind === 225 /* ImportDeclaration */ && !importNode.importClause); if (skipNode) { continue; } @@ -36748,7 +37208,7 @@ var ts; var hasExportDeclarationWithExportClause = false; for (var _a = 0, externalImports_2 = externalImports; _a < externalImports_2.length; _a++) { var externalImport = externalImports_2[_a]; - if (externalImport.kind === 230 /* ExportDeclaration */ && externalImport.exportClause) { + if (externalImport.kind === 231 /* ExportDeclaration */ && externalImport.exportClause) { hasExportDeclarationWithExportClause = true; break; } @@ -36780,7 +37240,7 @@ var ts; } for (var _d = 0, externalImports_3 = externalImports; _d < externalImports_3.length; _d++) { var externalImport = externalImports_3[_d]; - if (externalImport.kind !== 230 /* ExportDeclaration */) { + if (externalImport.kind !== 231 /* ExportDeclaration */) { continue; } var exportDecl = externalImport; @@ -36868,12 +37328,12 @@ var ts; var seen = {}; for (var i = 0; i < hoistedVars.length; i++) { var local = hoistedVars[i]; - var name_26 = local.kind === 69 /* Identifier */ + var name_29 = local.kind === 69 /* Identifier */ ? local : local.name; - if (name_26) { + if (name_29) { // do not emit duplicate entries (in case of declaration merging) in the list of hoisted variables - var text = ts.unescapeIdentifier(name_26.text); + var text = ts.unescapeIdentifier(name_29.text); if (ts.hasProperty(seen, text)) { continue; } @@ -36884,7 +37344,7 @@ var ts; if (i !== 0) { write(", "); } - if (local.kind === 216 /* ClassDeclaration */ || local.kind === 220 /* ModuleDeclaration */ || local.kind === 219 /* EnumDeclaration */) { + if (local.kind === 217 /* ClassDeclaration */ || local.kind === 221 /* ModuleDeclaration */ || local.kind === 220 /* EnumDeclaration */) { emitDeclarationName(local); } else { @@ -36918,21 +37378,21 @@ var ts; if (node.flags & 4 /* Ambient */) { return; } - if (node.kind === 215 /* FunctionDeclaration */) { + if (node.kind === 216 /* FunctionDeclaration */) { if (!hoistedFunctionDeclarations) { hoistedFunctionDeclarations = []; } hoistedFunctionDeclarations.push(node); return; } - if (node.kind === 216 /* ClassDeclaration */) { + if (node.kind === 217 /* ClassDeclaration */) { if (!hoistedVars) { hoistedVars = []; } hoistedVars.push(node); return; } - if (node.kind === 219 /* EnumDeclaration */) { + if (node.kind === 220 /* EnumDeclaration */) { if (shouldEmitEnumDeclaration(node)) { if (!hoistedVars) { hoistedVars = []; @@ -36941,7 +37401,7 @@ var ts; } return; } - if (node.kind === 220 /* ModuleDeclaration */) { + if (node.kind === 221 /* ModuleDeclaration */) { if (shouldEmitModuleDeclaration(node)) { if (!hoistedVars) { hoistedVars = []; @@ -36950,17 +37410,17 @@ var ts; } return; } - if (node.kind === 213 /* VariableDeclaration */ || node.kind === 165 /* BindingElement */) { + if (node.kind === 214 /* VariableDeclaration */ || node.kind === 166 /* BindingElement */) { if (shouldHoistVariable(node, /*checkIfSourceFileLevelDecl*/ false)) { - var name_27 = node.name; - if (name_27.kind === 69 /* Identifier */) { + var name_30 = node.name; + if (name_30.kind === 69 /* Identifier */) { if (!hoistedVars) { hoistedVars = []; } - hoistedVars.push(name_27); + hoistedVars.push(name_30); } else { - ts.forEachChild(name_27, visit); + ts.forEachChild(name_30, visit); } } return; @@ -36991,7 +37451,7 @@ var ts; // if block scoped variables are nested in some another block then // no other functions can use them except ones that are defined at least in the same block return (ts.getCombinedNodeFlags(node) & 24576 /* BlockScoped */) === 0 || - ts.getEnclosingBlockScopeContainer(node).kind === 250 /* SourceFile */; + ts.getEnclosingBlockScopeContainer(node).kind === 251 /* SourceFile */; } function isCurrentFileSystemExternalModule() { return modulekind === 4 /* System */ && isCurrentFileExternalModule; @@ -37066,21 +37526,21 @@ var ts; var entry = group_1[_a]; var importVariableName = getLocalNameForExternalImport(entry) || ""; switch (entry.kind) { - case 224 /* ImportDeclaration */: + case 225 /* ImportDeclaration */: if (!entry.importClause) { // 'import "..."' case // module is imported only for side-effects, no emit required break; } // fall-through - case 223 /* ImportEqualsDeclaration */: + case 224 /* ImportEqualsDeclaration */: ts.Debug.assert(importVariableName !== ""); writeLine(); // save import into the local write(importVariableName + " = " + parameterName + ";"); writeLine(); break; - case 230 /* ExportDeclaration */: + case 231 /* ExportDeclaration */: ts.Debug.assert(importVariableName !== ""); if (entry.exportClause) { // export {a, b as c} from 'foo' @@ -37093,12 +37553,12 @@ var ts; write(exportFunctionForFile + "({"); writeLine(); increaseIndent(); - for (var i_2 = 0, len = entry.exportClause.elements.length; i_2 < len; i_2++) { - if (i_2 !== 0) { + for (var i_1 = 0, len = entry.exportClause.elements.length; i_1 < len; i_1++) { + if (i_1 !== 0) { write(","); writeLine(); } - var e = entry.exportClause.elements[i_2]; + var e = entry.exportClause.elements[i_1]; write("\""); emitNodeWithCommentsAndWithoutSourcemap(e.name); write("\": " + parameterName + "[\""); @@ -37139,10 +37599,10 @@ var ts; // - import declarations are not emitted since they are already handled in setters // - export declarations with module specifiers are not emitted since they were already written in setters // - export declarations without module specifiers are emitted preserving the order - case 215 /* FunctionDeclaration */: - case 224 /* ImportDeclaration */: + case 216 /* FunctionDeclaration */: + case 225 /* ImportDeclaration */: continue; - case 230 /* ExportDeclaration */: + case 231 /* ExportDeclaration */: if (!statement.moduleSpecifier) { for (var _a = 0, _b = statement.exportClause.elements; _a < _b.length; _a++) { var element = _b[_a]; @@ -37151,7 +37611,7 @@ var ts; } } continue; - case 223 /* ImportEqualsDeclaration */: + case 224 /* ImportEqualsDeclaration */: if (!ts.isInternalModuleImportEqualsDeclaration(statement)) { // - import equals declarations that import external modules are not emitted continue; @@ -37510,22 +37970,22 @@ var ts; if (!compilerOptions.noEmitHelpers) { // Only Emit __extends function when target ES5. // For target ES6 and above, we can emit classDeclaration as is. - if ((languageVersion < 2 /* ES6 */) && (!extendsEmitted && resolver.getNodeCheckFlags(node) & 8 /* EmitExtends */)) { + if ((languageVersion < 2 /* ES6 */) && (!extendsEmitted && node.flags & 4194304 /* HasClassExtends */)) { writeLines(extendsHelper); extendsEmitted = true; } - if (!decorateEmitted && resolver.getNodeCheckFlags(node) & 16 /* EmitDecorate */) { + if (!decorateEmitted && node.flags & 8388608 /* HasDecorators */) { writeLines(decorateHelper); if (compilerOptions.emitDecoratorMetadata) { writeLines(metadataHelper); } decorateEmitted = true; } - if (!paramEmitted && resolver.getNodeCheckFlags(node) & 32 /* EmitParam */) { + if (!paramEmitted && node.flags & 16777216 /* HasParamDecorators */) { writeLines(paramHelper); paramEmitted = true; } - if (!awaiterEmitted && resolver.getNodeCheckFlags(node) & 64 /* EmitAwaiter */) { + if (!awaiterEmitted && node.flags & 33554432 /* HasAsyncFunctions */) { writeLines(awaiterHelper); awaiterEmitted = true; } @@ -37596,28 +38056,41 @@ var ts; emitJavaScriptWorker(node); } } + function changeSourceMapEmit(writer) { + sourceMap = writer; + emitStart = writer.emitStart; + emitEnd = writer.emitEnd; + emitPos = writer.emitPos; + setSourceFile = writer.setSourceFile; + } + function withTemporaryNoSourceMap(callback) { + var prevSourceMap = sourceMap; + setSourceMapWriterEmit(ts.getNullSourceMapWriter()); + callback(); + setSourceMapWriterEmit(prevSourceMap); + } function isSpecializedCommentHandling(node) { switch (node.kind) { // All of these entities are emitted in a specialized fashion. As such, we allow // the specialized methods for each to handle the comments on the nodes. - case 217 /* InterfaceDeclaration */: - case 215 /* FunctionDeclaration */: - case 224 /* ImportDeclaration */: - case 223 /* ImportEqualsDeclaration */: - case 218 /* TypeAliasDeclaration */: - case 229 /* ExportAssignment */: + case 218 /* InterfaceDeclaration */: + case 216 /* FunctionDeclaration */: + case 225 /* ImportDeclaration */: + case 224 /* ImportEqualsDeclaration */: + case 219 /* TypeAliasDeclaration */: + case 230 /* ExportAssignment */: return true; } } function shouldEmitLeadingAndTrailingComments(node) { switch (node.kind) { - case 195 /* VariableStatement */: + case 196 /* VariableStatement */: return shouldEmitLeadingAndTrailingCommentsForVariableStatement(node); - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: // Only emit the leading/trailing comments for a module if we're actually // emitting the module as well. return shouldEmitModuleDeclaration(node); - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: // Only emit the leading/trailing comments for an enum if we're actually // emitting the module as well. return shouldEmitEnumDeclaration(node); @@ -37629,9 +38102,9 @@ var ts; // then we don't want to emit comments when we emit the body. It will have already // been taken care of when we emitted the 'return' statement for the function // expression body. - if (node.kind !== 194 /* Block */ && + if (node.kind !== 195 /* Block */ && node.parent && - node.parent.kind === 176 /* ArrowFunction */ && + node.parent.kind === 177 /* ArrowFunction */ && node.parent.body === node && compilerOptions.target <= 1 /* ES5 */) { return false; @@ -37644,13 +38117,13 @@ var ts; switch (node.kind) { case 69 /* Identifier */: return emitIdentifier(node); - case 138 /* Parameter */: + case 139 /* Parameter */: return emitParameter(node); - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: return emitMethod(node); - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: return emitAccessor(node); case 97 /* ThisKeyword */: return emitThis(node); @@ -37670,142 +38143,142 @@ var ts; case 13 /* TemplateMiddle */: case 14 /* TemplateTail */: return emitLiteral(node); - case 185 /* TemplateExpression */: + case 186 /* TemplateExpression */: return emitTemplateExpression(node); - case 192 /* TemplateSpan */: + case 193 /* TemplateSpan */: return emitTemplateSpan(node); - case 235 /* JsxElement */: - case 236 /* JsxSelfClosingElement */: + case 236 /* JsxElement */: + case 237 /* JsxSelfClosingElement */: return emitJsxElement(node); - case 238 /* JsxText */: + case 239 /* JsxText */: return emitJsxText(node); - case 242 /* JsxExpression */: + case 243 /* JsxExpression */: return emitJsxExpression(node); - case 135 /* QualifiedName */: + case 136 /* QualifiedName */: return emitQualifiedName(node); - case 163 /* ObjectBindingPattern */: + case 164 /* ObjectBindingPattern */: return emitObjectBindingPattern(node); - case 164 /* ArrayBindingPattern */: + case 165 /* ArrayBindingPattern */: return emitArrayBindingPattern(node); - case 165 /* BindingElement */: + case 166 /* BindingElement */: return emitBindingElement(node); - case 166 /* ArrayLiteralExpression */: + case 167 /* ArrayLiteralExpression */: return emitArrayLiteral(node); - case 167 /* ObjectLiteralExpression */: + case 168 /* ObjectLiteralExpression */: return emitObjectLiteral(node); - case 247 /* PropertyAssignment */: + case 248 /* PropertyAssignment */: return emitPropertyAssignment(node); - case 248 /* ShorthandPropertyAssignment */: + case 249 /* ShorthandPropertyAssignment */: return emitShorthandPropertyAssignment(node); - case 136 /* ComputedPropertyName */: + case 137 /* ComputedPropertyName */: return emitComputedPropertyName(node); - case 168 /* PropertyAccessExpression */: + case 169 /* PropertyAccessExpression */: return emitPropertyAccess(node); - case 169 /* ElementAccessExpression */: + case 170 /* ElementAccessExpression */: return emitIndexedAccess(node); - case 170 /* CallExpression */: + case 171 /* CallExpression */: return emitCallExpression(node); - case 171 /* NewExpression */: + case 172 /* NewExpression */: return emitNewExpression(node); - case 172 /* TaggedTemplateExpression */: + case 173 /* TaggedTemplateExpression */: return emitTaggedTemplateExpression(node); - case 173 /* TypeAssertionExpression */: + case 174 /* TypeAssertionExpression */: return emit(node.expression); - case 191 /* AsExpression */: + case 192 /* AsExpression */: return emit(node.expression); - case 174 /* ParenthesizedExpression */: + case 175 /* ParenthesizedExpression */: return emitParenExpression(node); - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: return emitFunctionDeclaration(node); - case 177 /* DeleteExpression */: + case 178 /* DeleteExpression */: return emitDeleteExpression(node); - case 178 /* TypeOfExpression */: + case 179 /* TypeOfExpression */: return emitTypeOfExpression(node); - case 179 /* VoidExpression */: + case 180 /* VoidExpression */: return emitVoidExpression(node); - case 180 /* AwaitExpression */: + case 181 /* AwaitExpression */: return emitAwaitExpression(node); - case 181 /* PrefixUnaryExpression */: + case 182 /* PrefixUnaryExpression */: return emitPrefixUnaryExpression(node); - case 182 /* PostfixUnaryExpression */: + case 183 /* PostfixUnaryExpression */: return emitPostfixUnaryExpression(node); - case 183 /* BinaryExpression */: + case 184 /* BinaryExpression */: return emitBinaryExpression(node); - case 184 /* ConditionalExpression */: + case 185 /* ConditionalExpression */: return emitConditionalExpression(node); - case 187 /* SpreadElementExpression */: + case 188 /* SpreadElementExpression */: return emitSpreadElementExpression(node); - case 186 /* YieldExpression */: + case 187 /* YieldExpression */: return emitYieldExpression(node); - case 189 /* OmittedExpression */: + case 190 /* OmittedExpression */: return; - case 194 /* Block */: - case 221 /* ModuleBlock */: + case 195 /* Block */: + case 222 /* ModuleBlock */: return emitBlock(node); - case 195 /* VariableStatement */: + case 196 /* VariableStatement */: return emitVariableStatement(node); - case 196 /* EmptyStatement */: + case 197 /* EmptyStatement */: return write(";"); - case 197 /* ExpressionStatement */: + case 198 /* ExpressionStatement */: return emitExpressionStatement(node); - case 198 /* IfStatement */: + case 199 /* IfStatement */: return emitIfStatement(node); - case 199 /* DoStatement */: + case 200 /* DoStatement */: return emitDoStatement(node); - case 200 /* WhileStatement */: + case 201 /* WhileStatement */: return emitWhileStatement(node); - case 201 /* ForStatement */: + case 202 /* ForStatement */: return emitForStatement(node); - case 203 /* ForOfStatement */: - case 202 /* ForInStatement */: + case 204 /* ForOfStatement */: + case 203 /* ForInStatement */: return emitForInOrForOfStatement(node); - case 204 /* ContinueStatement */: - case 205 /* BreakStatement */: + case 205 /* ContinueStatement */: + case 206 /* BreakStatement */: return emitBreakOrContinueStatement(node); - case 206 /* ReturnStatement */: + case 207 /* ReturnStatement */: return emitReturnStatement(node); - case 207 /* WithStatement */: + case 208 /* WithStatement */: return emitWithStatement(node); - case 208 /* SwitchStatement */: + case 209 /* SwitchStatement */: return emitSwitchStatement(node); - case 243 /* CaseClause */: - case 244 /* DefaultClause */: + case 244 /* CaseClause */: + case 245 /* DefaultClause */: return emitCaseOrDefaultClause(node); - case 209 /* LabeledStatement */: + case 210 /* LabeledStatement */: return emitLabeledStatement(node); - case 210 /* ThrowStatement */: + case 211 /* ThrowStatement */: return emitThrowStatement(node); - case 211 /* TryStatement */: + case 212 /* TryStatement */: return emitTryStatement(node); - case 246 /* CatchClause */: + case 247 /* CatchClause */: return emitCatchClause(node); - case 212 /* DebuggerStatement */: + case 213 /* DebuggerStatement */: return emitDebuggerStatement(node); - case 213 /* VariableDeclaration */: + case 214 /* VariableDeclaration */: return emitVariableDeclaration(node); - case 188 /* ClassExpression */: + case 189 /* ClassExpression */: return emitClassExpression(node); - case 216 /* ClassDeclaration */: + case 217 /* ClassDeclaration */: return emitClassDeclaration(node); - case 217 /* InterfaceDeclaration */: + case 218 /* InterfaceDeclaration */: return emitInterfaceDeclaration(node); - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: return emitEnumDeclaration(node); - case 249 /* EnumMember */: + case 250 /* EnumMember */: return emitEnumMember(node); - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: return emitModuleDeclaration(node); - case 224 /* ImportDeclaration */: + case 225 /* ImportDeclaration */: return emitImportDeclaration(node); - case 223 /* ImportEqualsDeclaration */: + case 224 /* ImportEqualsDeclaration */: return emitImportEqualsDeclaration(node); - case 230 /* ExportDeclaration */: + case 231 /* ExportDeclaration */: return emitExportDeclaration(node); - case 229 /* ExportAssignment */: + case 230 /* ExportAssignment */: return emitExportAssignment(node); - case 250 /* SourceFile */: + case 251 /* SourceFile */: return emitSourceFileNode(node); } } @@ -37844,7 +38317,7 @@ var ts; function getLeadingCommentsToEmit(node) { // Emit the leading comments only if the parent's pos doesn't match because parent should take care of emitting these comments if (node.parent) { - if (node.parent.kind === 250 /* SourceFile */ || node.pos !== node.parent.pos) { + if (node.parent.kind === 251 /* SourceFile */ || node.pos !== node.parent.pos) { if (hasDetachedComments(node.pos)) { // get comments without detached comments return getLeadingCommentsWithoutDetachedComments(); @@ -37859,7 +38332,7 @@ var ts; function getTrailingCommentsToEmit(node) { // Emit the trailing comments only if the parent's pos doesn't match because parent should take care of emitting these comments if (node.parent) { - if (node.parent.kind === 250 /* SourceFile */ || node.end !== node.parent.end) { + if (node.parent.kind === 251 /* SourceFile */ || node.end !== node.parent.end) { return ts.getTrailingCommentRanges(currentText, node.end); } } @@ -38290,7 +38763,25 @@ var ts; var currentDirectory = host.getCurrentDirectory(); var resolveModuleNamesWorker = host.resolveModuleNames ? (function (moduleNames, containingFile) { return host.resolveModuleNames(moduleNames, containingFile); }) - : (function (moduleNames, containingFile) { return ts.map(moduleNames, function (moduleName) { return resolveModuleName(moduleName, containingFile, options, host).resolvedModule; }); }); + : (function (moduleNames, containingFile) { + var resolvedModuleNames = []; + // resolveModuleName does not store any results between calls. + // lookup is a local cache to avoid resolving the same module name several times + var lookup = {}; + for (var _i = 0, moduleNames_1 = moduleNames; _i < moduleNames_1.length; _i++) { + var moduleName = moduleNames_1[_i]; + var resolvedName = void 0; + if (ts.hasProperty(lookup, moduleName)) { + resolvedName = lookup[moduleName]; + } + else { + resolvedName = resolveModuleName(moduleName, containingFile, options, host).resolvedModule; + lookup[moduleName] = resolvedName; + } + resolvedModuleNames.push(resolvedName); + } + return resolvedModuleNames; + }); var filesByName = ts.createFileMap(); // stores 'filename -> file association' ignoring case // used to track cases when two file names differ only in casing @@ -38408,14 +38899,18 @@ var ts; // tripleslash references has changed return false; } - // check imports + // check imports and module augmentations collectExternalModuleReferences(newSourceFile); if (!ts.arrayIsEqualTo(oldSourceFile.imports, newSourceFile.imports, moduleNameIsEqualTo)) { // imports has changed return false; } + if (!ts.arrayIsEqualTo(oldSourceFile.moduleAugmentations, newSourceFile.moduleAugmentations, moduleNameIsEqualTo)) { + // moduleAugmentations has changed + return false; + } if (resolveModuleNamesWorker) { - var moduleNames = ts.map(newSourceFile.imports, function (name) { return name.text; }); + var moduleNames = ts.map(ts.concatenate(newSourceFile.imports, newSourceFile.moduleAugmentations), getTextOfLiteral); var resolutions = resolveModuleNamesWorker(moduleNames, ts.getNormalizedAbsolutePath(newSourceFile.fileName, currentDirectory)); // ensure that module resolution results are still correct for (var i = 0; i < moduleNames.length; i++) { @@ -38580,44 +39075,44 @@ var ts; return false; } switch (node.kind) { - case 223 /* ImportEqualsDeclaration */: + case 224 /* ImportEqualsDeclaration */: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.import_can_only_be_used_in_a_ts_file)); return true; - case 229 /* ExportAssignment */: + case 230 /* ExportAssignment */: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.export_can_only_be_used_in_a_ts_file)); return true; - case 216 /* ClassDeclaration */: + case 217 /* ClassDeclaration */: var classDeclaration = node; if (checkModifiers(classDeclaration.modifiers) || checkTypeParameters(classDeclaration.typeParameters)) { return true; } break; - case 245 /* HeritageClause */: + case 246 /* HeritageClause */: var heritageClause = node; if (heritageClause.token === 106 /* ImplementsKeyword */) { diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.implements_clauses_can_only_be_used_in_a_ts_file)); return true; } break; - case 217 /* InterfaceDeclaration */: + case 218 /* InterfaceDeclaration */: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.interface_declarations_can_only_be_used_in_a_ts_file)); return true; - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.module_declarations_can_only_be_used_in_a_ts_file)); return true; - case 218 /* TypeAliasDeclaration */: + case 219 /* TypeAliasDeclaration */: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.type_aliases_can_only_be_used_in_a_ts_file)); return true; - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 175 /* FunctionExpression */: - case 215 /* FunctionDeclaration */: - case 176 /* ArrowFunction */: - case 215 /* FunctionDeclaration */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 145 /* Constructor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 176 /* FunctionExpression */: + case 216 /* FunctionDeclaration */: + case 177 /* ArrowFunction */: + case 216 /* FunctionDeclaration */: var functionDeclaration = node; if (checkModifiers(functionDeclaration.modifiers) || checkTypeParameters(functionDeclaration.typeParameters) || @@ -38625,20 +39120,20 @@ var ts; return true; } break; - case 195 /* VariableStatement */: + case 196 /* VariableStatement */: var variableStatement = node; if (checkModifiers(variableStatement.modifiers)) { return true; } break; - case 213 /* VariableDeclaration */: + case 214 /* VariableDeclaration */: var variableDeclaration = node; if (checkTypeAnnotation(variableDeclaration.type)) { return true; } break; - case 170 /* CallExpression */: - case 171 /* NewExpression */: + case 171 /* CallExpression */: + case 172 /* NewExpression */: var expression = node; if (expression.typeArguments && expression.typeArguments.length > 0) { var start_2 = expression.typeArguments.pos; @@ -38646,7 +39141,7 @@ var ts; return true; } break; - case 138 /* Parameter */: + case 139 /* Parameter */: var parameter = node; if (parameter.modifiers) { var start_3 = parameter.modifiers.pos; @@ -38662,17 +39157,17 @@ var ts; return true; } break; - case 141 /* PropertyDeclaration */: + case 142 /* PropertyDeclaration */: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.property_declarations_can_only_be_used_in_a_ts_file)); return true; - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.enum_declarations_can_only_be_used_in_a_ts_file)); return true; - case 173 /* TypeAssertionExpression */: + case 174 /* TypeAssertionExpression */: var typeAssertionExpression = node; diagnostics.push(ts.createDiagnosticForNode(typeAssertionExpression.type, ts.Diagnostics.type_assertion_expressions_can_only_be_used_in_a_ts_file)); return true; - case 139 /* Decorator */: + case 140 /* Decorator */: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.decorators_can_only_be_used_in_a_ts_file)); return true; } @@ -38750,59 +39245,77 @@ var ts; function moduleNameIsEqualTo(a, b) { return a.text === b.text; } + function getTextOfLiteral(literal) { + return literal.text; + } function collectExternalModuleReferences(file) { if (file.imports) { return; } var isJavaScriptFile = ts.isSourceFileJavaScript(file); + var isExternalModuleFile = ts.isExternalModule(file); var imports; + var moduleAugmentations; for (var _i = 0, _a = file.statements; _i < _a.length; _i++) { var node = _a[_i]; - collect(node, /*allowRelativeModuleNames*/ true, /*collectOnlyRequireCalls*/ false); + collectModuleReferences(node, /*inAmbientModule*/ false); + if (isJavaScriptFile) { + collectRequireCalls(node); + } } file.imports = imports || emptyArray; + file.moduleAugmentations = moduleAugmentations || emptyArray; return; - function collect(node, allowRelativeModuleNames, collectOnlyRequireCalls) { - if (!collectOnlyRequireCalls) { - switch (node.kind) { - case 224 /* ImportDeclaration */: - case 223 /* ImportEqualsDeclaration */: - case 230 /* ExportDeclaration */: - var moduleNameExpr = ts.getExternalModuleName(node); - if (!moduleNameExpr || moduleNameExpr.kind !== 9 /* StringLiteral */) { - break; - } - if (!moduleNameExpr.text) { - break; - } - if (allowRelativeModuleNames || !ts.isExternalModuleNameRelative(moduleNameExpr.text)) { - (imports || (imports = [])).push(moduleNameExpr); - } + function collectModuleReferences(node, inAmbientModule) { + switch (node.kind) { + case 225 /* ImportDeclaration */: + case 224 /* ImportEqualsDeclaration */: + case 231 /* ExportDeclaration */: + var moduleNameExpr = ts.getExternalModuleName(node); + if (!moduleNameExpr || moduleNameExpr.kind !== 9 /* StringLiteral */) { break; - case 220 /* ModuleDeclaration */: - if (node.name.kind === 9 /* StringLiteral */ && (node.flags & 4 /* Ambient */ || ts.isDeclarationFile(file))) { - // TypeScript 1.0 spec (April 2014): 12.1.6 + } + if (!moduleNameExpr.text) { + break; + } + // TypeScript 1.0 spec (April 2014): 12.1.6 + // An ExternalImportDeclaration in an AmbientExternalModuleDeclaration may reference other external modules + // only through top - level external module names. Relative external module names are not permitted. + if (!inAmbientModule || !ts.isExternalModuleNameRelative(moduleNameExpr.text)) { + (imports || (imports = [])).push(moduleNameExpr); + } + break; + case 221 /* ModuleDeclaration */: + if (ts.isAmbientModule(node) && (inAmbientModule || node.flags & 4 /* Ambient */ || ts.isDeclarationFile(file))) { + var moduleName = node.name; + // Ambient module declarations can be interpreted as augmentations for some existing external modules. + // This will happen in two cases: + // - if current file is external module then module augmentation is a ambient module declaration defined in the top level scope + // - if current file is not external module then module augmentation is an ambient module declaration with non-relative module name + // immediately nested in top level ambient module declaration . + if (isExternalModuleFile || (inAmbientModule && !ts.isExternalModuleNameRelative(moduleName.text))) { + (moduleAugmentations || (moduleAugmentations = [])).push(moduleName); + } + else if (!inAmbientModule) { // An AmbientExternalModuleDeclaration declares an external module. // This type of declaration is permitted only in the global module. // The StringLiteral must specify a top - level external module name. // Relative external module names are not permitted - ts.forEachChild(node.body, function (node) { - // TypeScript 1.0 spec (April 2014): 12.1.6 - // An ExternalImportDeclaration in anAmbientExternalModuleDeclaration may reference other external modules - // only through top - level external module names. Relative external module names are not permitted. - collect(node, /*allowRelativeModuleNames*/ false, collectOnlyRequireCalls); - }); + // NOTE: body of ambient module is always a module block + for (var _i = 0, _a = node.body.statements; _i < _a.length; _i++) { + var statement = _a[_i]; + collectModuleReferences(statement, /*inAmbientModule*/ true); + } } - break; - } + } } - if (isJavaScriptFile) { - if (ts.isRequireCall(node)) { - (imports || (imports = [])).push(node.arguments[0]); - } - else { - ts.forEachChild(node, function (node) { return collect(node, allowRelativeModuleNames, /*collectOnlyRequireCalls*/ true); }); - } + } + function collectRequireCalls(node) { + if (ts.isRequireCall(node)) { + (imports || (imports = [])).push(node.arguments[0]); + } + else { + ts.forEachChild(node, collectRequireCalls); } } } @@ -38914,14 +39427,21 @@ var ts; } function processImportedModules(file, basePath) { collectExternalModuleReferences(file); - if (file.imports.length) { + if (file.imports.length || file.moduleAugmentations.length) { file.resolvedModules = {}; - var moduleNames = ts.map(file.imports, function (name) { return name.text; }); + var moduleNames = ts.map(ts.concatenate(file.imports, file.moduleAugmentations), getTextOfLiteral); var resolutions = resolveModuleNamesWorker(moduleNames, ts.getNormalizedAbsolutePath(file.fileName, currentDirectory)); - for (var i = 0; i < file.imports.length; i++) { + for (var i = 0; i < moduleNames.length; i++) { var resolution = resolutions[i]; ts.setResolvedModule(file, moduleNames[i], resolution); - if (resolution && !options.noResolve) { + // add file to program only if: + // - resolution was successfull + // - noResolve is falsy + // - module name come from the list fo imports + var shouldAddFile = resolution && + !options.noResolve && + i < file.imports.length; + if (shouldAddFile) { var importedFile = findSourceFile(resolution.resolvedFileName, ts.toPath(resolution.resolvedFileName, currentDirectory, getCanonicalFileName), /*isDefaultLib*/ false, file, ts.skipTrivia(file.text, file.imports[i].pos), file.imports[i].end); if (importedFile && resolution.isExternalLibraryImport) { // Since currently irrespective of allowJs, we only look for supportedTypeScript extension external module files, @@ -39786,7 +40306,7 @@ var ts; } } function autoCollapse(node) { - return ts.isFunctionBlock(node) && node.parent.kind !== 176 /* ArrowFunction */; + return ts.isFunctionBlock(node) && node.parent.kind !== 177 /* ArrowFunction */; } var depth = 0; var maxDepth = 20; @@ -39798,30 +40318,30 @@ var ts; addOutliningForLeadingCommentsForNode(n); } switch (n.kind) { - case 194 /* Block */: + case 195 /* Block */: if (!ts.isFunctionBlock(n)) { - var parent_7 = n.parent; + var parent_8 = n.parent; var openBrace = ts.findChildOfKind(n, 15 /* OpenBraceToken */, sourceFile); var closeBrace = ts.findChildOfKind(n, 16 /* CloseBraceToken */, sourceFile); // Check if the block is standalone, or 'attached' to some parent statement. // If the latter, we want to collaps the block, but consider its hint span // to be the entire span of the parent. - if (parent_7.kind === 199 /* DoStatement */ || - parent_7.kind === 202 /* ForInStatement */ || - parent_7.kind === 203 /* ForOfStatement */ || - parent_7.kind === 201 /* ForStatement */ || - parent_7.kind === 198 /* IfStatement */ || - parent_7.kind === 200 /* WhileStatement */ || - parent_7.kind === 207 /* WithStatement */ || - parent_7.kind === 246 /* CatchClause */) { - addOutliningSpan(parent_7, openBrace, closeBrace, autoCollapse(n)); + if (parent_8.kind === 200 /* DoStatement */ || + parent_8.kind === 203 /* ForInStatement */ || + parent_8.kind === 204 /* ForOfStatement */ || + parent_8.kind === 202 /* ForStatement */ || + parent_8.kind === 199 /* IfStatement */ || + parent_8.kind === 201 /* WhileStatement */ || + parent_8.kind === 208 /* WithStatement */ || + parent_8.kind === 247 /* CatchClause */) { + addOutliningSpan(parent_8, openBrace, closeBrace, autoCollapse(n)); break; } - if (parent_7.kind === 211 /* TryStatement */) { + if (parent_8.kind === 212 /* TryStatement */) { // Could be the try-block, or the finally-block. - var tryStatement = parent_7; + var tryStatement = parent_8; if (tryStatement.tryBlock === n) { - addOutliningSpan(parent_7, openBrace, closeBrace, autoCollapse(n)); + addOutliningSpan(parent_8, openBrace, closeBrace, autoCollapse(n)); break; } else if (tryStatement.finallyBlock === n) { @@ -39844,23 +40364,23 @@ var ts; break; } // Fallthrough. - case 221 /* ModuleBlock */: { + case 222 /* ModuleBlock */: { var openBrace = ts.findChildOfKind(n, 15 /* OpenBraceToken */, sourceFile); var closeBrace = ts.findChildOfKind(n, 16 /* CloseBraceToken */, sourceFile); addOutliningSpan(n.parent, openBrace, closeBrace, autoCollapse(n)); break; } - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: - case 219 /* EnumDeclaration */: - case 167 /* ObjectLiteralExpression */: - case 222 /* CaseBlock */: { + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: + case 220 /* EnumDeclaration */: + case 168 /* ObjectLiteralExpression */: + case 223 /* CaseBlock */: { var openBrace = ts.findChildOfKind(n, 15 /* OpenBraceToken */, sourceFile); var closeBrace = ts.findChildOfKind(n, 16 /* CloseBraceToken */, sourceFile); addOutliningSpan(n, openBrace, closeBrace, autoCollapse(n)); break; } - case 166 /* ArrayLiteralExpression */: + case 167 /* ArrayLiteralExpression */: var openBracket = ts.findChildOfKind(n, 19 /* OpenBracketToken */, sourceFile); var closeBracket = ts.findChildOfKind(n, 20 /* CloseBracketToken */, sourceFile); addOutliningSpan(n, openBracket, closeBracket, autoCollapse(n)); @@ -39890,12 +40410,12 @@ var ts; ts.forEach(program.getSourceFiles(), function (sourceFile) { cancellationToken.throwIfCancellationRequested(); var nameToDeclarations = sourceFile.getNamedDeclarations(); - for (var name_28 in nameToDeclarations) { - var declarations = ts.getProperty(nameToDeclarations, name_28); + for (var name_31 in nameToDeclarations) { + var declarations = ts.getProperty(nameToDeclarations, name_31); if (declarations) { // First do a quick check to see if the name of the declaration matches the // last portion of the (possibly) dotted name they're searching for. - var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name_28); + var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name_31); if (!matches) { continue; } @@ -39908,14 +40428,14 @@ var ts; if (!containers) { return undefined; } - matches = patternMatcher.getMatches(containers, name_28); + matches = patternMatcher.getMatches(containers, name_31); if (!matches) { continue; } } var fileName = sourceFile.fileName; var matchKind = bestMatchKind(matches); - rawItems.push({ name: name_28, fileName: fileName, matchKind: matchKind, isCaseSensitive: allMatchesAreCaseSensitive(matches), declaration: declaration }); + rawItems.push({ name: name_31, fileName: fileName, matchKind: matchKind, isCaseSensitive: allMatchesAreCaseSensitive(matches), declaration: declaration }); } } } @@ -39953,7 +40473,7 @@ var ts; if (text !== undefined) { containers.unshift(text); } - else if (declaration.name.kind === 136 /* ComputedPropertyName */) { + else if (declaration.name.kind === 137 /* ComputedPropertyName */) { return tryAddComputedPropertyName(declaration.name.expression, containers, /*includeLastPortion*/ true); } else { @@ -39974,7 +40494,7 @@ var ts; } return true; } - if (expression.kind === 168 /* PropertyAccessExpression */) { + if (expression.kind === 169 /* PropertyAccessExpression */) { var propertyAccess = expression; if (includeLastPortion) { containers.unshift(propertyAccess.name.text); @@ -39987,7 +40507,7 @@ var ts; var containers = []; // First, if we started with a computed property name, then add all but the last // portion into the container array. - if (declaration.name.kind === 136 /* ComputedPropertyName */) { + if (declaration.name.kind === 137 /* ComputedPropertyName */) { if (!tryAddComputedPropertyName(declaration.name.expression, containers, /*includeLastPortion*/ false)) { return undefined; } @@ -40061,17 +40581,17 @@ var ts; var current = node.parent; while (current) { switch (current.kind) { - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: // If we have a module declared as A.B.C, it is more "intuitive" // to say it only has a single layer of depth do { current = current.parent; - } while (current.kind === 220 /* ModuleDeclaration */); + } while (current.kind === 221 /* ModuleDeclaration */); // fall through - case 216 /* ClassDeclaration */: - case 219 /* EnumDeclaration */: - case 217 /* InterfaceDeclaration */: - case 215 /* FunctionDeclaration */: + case 217 /* ClassDeclaration */: + case 220 /* EnumDeclaration */: + case 218 /* InterfaceDeclaration */: + case 216 /* FunctionDeclaration */: indent++; } current = current.parent; @@ -40082,21 +40602,21 @@ var ts; var childNodes = []; function visit(node) { switch (node.kind) { - case 195 /* VariableStatement */: + case 196 /* VariableStatement */: ts.forEach(node.declarationList.declarations, visit); break; - case 163 /* ObjectBindingPattern */: - case 164 /* ArrayBindingPattern */: + case 164 /* ObjectBindingPattern */: + case 165 /* ArrayBindingPattern */: ts.forEach(node.elements, visit); break; - case 230 /* ExportDeclaration */: + case 231 /* ExportDeclaration */: // Handle named exports case e.g.: // export {a, b as B} from "mod"; if (node.exportClause) { ts.forEach(node.exportClause.elements, visit); } break; - case 224 /* ImportDeclaration */: + case 225 /* ImportDeclaration */: var importClause = node.importClause; if (importClause) { // Handle default import case e.g.: @@ -40108,7 +40628,7 @@ var ts; // import * as NS from "mod"; // import {a, b as B} from "mod"; if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 226 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 227 /* NamespaceImport */) { childNodes.push(importClause.namedBindings); } else { @@ -40117,21 +40637,21 @@ var ts; } } break; - case 165 /* BindingElement */: - case 213 /* VariableDeclaration */: + case 166 /* BindingElement */: + case 214 /* VariableDeclaration */: if (ts.isBindingPattern(node.name)) { visit(node.name); break; } // Fall through - case 216 /* ClassDeclaration */: - case 219 /* EnumDeclaration */: - case 217 /* InterfaceDeclaration */: - case 220 /* ModuleDeclaration */: - case 215 /* FunctionDeclaration */: - case 223 /* ImportEqualsDeclaration */: - case 228 /* ImportSpecifier */: - case 232 /* ExportSpecifier */: + case 217 /* ClassDeclaration */: + case 220 /* EnumDeclaration */: + case 218 /* InterfaceDeclaration */: + case 221 /* ModuleDeclaration */: + case 216 /* FunctionDeclaration */: + case 224 /* ImportEqualsDeclaration */: + case 229 /* ImportSpecifier */: + case 233 /* ExportSpecifier */: childNodes.push(node); break; } @@ -40179,17 +40699,17 @@ var ts; for (var _i = 0, nodes_4 = nodes; _i < nodes_4.length; _i++) { var node = nodes_4[_i]; switch (node.kind) { - case 216 /* ClassDeclaration */: - case 219 /* EnumDeclaration */: - case 217 /* InterfaceDeclaration */: + case 217 /* ClassDeclaration */: + case 220 /* EnumDeclaration */: + case 218 /* InterfaceDeclaration */: topLevelNodes.push(node); break; - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: var moduleDeclaration = node; topLevelNodes.push(node); addTopLevelNodes(getInnermostModule(moduleDeclaration).body.statements, topLevelNodes); break; - case 215 /* FunctionDeclaration */: + case 216 /* FunctionDeclaration */: var functionDeclaration = node; if (isTopLevelFunctionDeclaration(functionDeclaration)) { topLevelNodes.push(node); @@ -40200,12 +40720,12 @@ var ts; } } function isTopLevelFunctionDeclaration(functionDeclaration) { - if (functionDeclaration.kind === 215 /* FunctionDeclaration */) { + if (functionDeclaration.kind === 216 /* FunctionDeclaration */) { // A function declaration is 'top level' if it contains any function declarations // within it. - if (functionDeclaration.body && functionDeclaration.body.kind === 194 /* Block */) { + if (functionDeclaration.body && functionDeclaration.body.kind === 195 /* Block */) { // Proper function declarations can only have identifier names - if (ts.forEach(functionDeclaration.body.statements, function (s) { return s.kind === 215 /* FunctionDeclaration */ && !isEmpty(s.name.text); })) { + if (ts.forEach(functionDeclaration.body.statements, function (s) { return s.kind === 216 /* FunctionDeclaration */ && !isEmpty(s.name.text); })) { return true; } // Or if it is not parented by another function. i.e all functions @@ -40265,7 +40785,7 @@ var ts; } function createChildItem(node) { switch (node.kind) { - case 138 /* Parameter */: + case 139 /* Parameter */: if (ts.isBindingPattern(node.name)) { break; } @@ -40273,36 +40793,36 @@ var ts; return undefined; } return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberVariableElement); - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberFunctionElement); - case 145 /* GetAccessor */: + case 146 /* GetAccessor */: return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberGetAccessorElement); - case 146 /* SetAccessor */: + case 147 /* SetAccessor */: return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberSetAccessorElement); - case 149 /* IndexSignature */: + case 150 /* IndexSignature */: return createItem(node, "[]", ts.ScriptElementKind.indexSignatureElement); - case 249 /* EnumMember */: + case 250 /* EnumMember */: return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberVariableElement); - case 147 /* CallSignature */: + case 148 /* CallSignature */: return createItem(node, "()", ts.ScriptElementKind.callSignatureElement); - case 148 /* ConstructSignature */: + case 149 /* ConstructSignature */: return createItem(node, "new()", ts.ScriptElementKind.constructSignatureElement); - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberVariableElement); - case 215 /* FunctionDeclaration */: + case 216 /* FunctionDeclaration */: return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.functionElement); - case 213 /* VariableDeclaration */: - case 165 /* BindingElement */: + case 214 /* VariableDeclaration */: + case 166 /* BindingElement */: var variableDeclarationNode; - var name_29; - if (node.kind === 165 /* BindingElement */) { - name_29 = node.name; + var name_32; + if (node.kind === 166 /* BindingElement */) { + name_32 = node.name; variableDeclarationNode = node; // binding elements are added only for variable declarations // bubble up to the containing variable declaration - while (variableDeclarationNode && variableDeclarationNode.kind !== 213 /* VariableDeclaration */) { + while (variableDeclarationNode && variableDeclarationNode.kind !== 214 /* VariableDeclaration */) { variableDeclarationNode = variableDeclarationNode.parent; } ts.Debug.assert(variableDeclarationNode !== undefined); @@ -40310,24 +40830,24 @@ var ts; else { ts.Debug.assert(!ts.isBindingPattern(node.name)); variableDeclarationNode = node; - name_29 = node.name; + name_32 = node.name; } if (ts.isConst(variableDeclarationNode)) { - return createItem(node, getTextOfNode(name_29), ts.ScriptElementKind.constElement); + return createItem(node, getTextOfNode(name_32), ts.ScriptElementKind.constElement); } else if (ts.isLet(variableDeclarationNode)) { - return createItem(node, getTextOfNode(name_29), ts.ScriptElementKind.letElement); + return createItem(node, getTextOfNode(name_32), ts.ScriptElementKind.letElement); } else { - return createItem(node, getTextOfNode(name_29), ts.ScriptElementKind.variableElement); + return createItem(node, getTextOfNode(name_32), ts.ScriptElementKind.variableElement); } - case 144 /* Constructor */: + case 145 /* Constructor */: return createItem(node, "constructor", ts.ScriptElementKind.constructorImplementationElement); - case 232 /* ExportSpecifier */: - case 228 /* ImportSpecifier */: - case 223 /* ImportEqualsDeclaration */: - case 225 /* ImportClause */: - case 226 /* NamespaceImport */: + case 233 /* ExportSpecifier */: + case 229 /* ImportSpecifier */: + case 224 /* ImportEqualsDeclaration */: + case 226 /* ImportClause */: + case 227 /* NamespaceImport */: return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.alias); } return undefined; @@ -40357,29 +40877,29 @@ var ts; } function createTopLevelItem(node) { switch (node.kind) { - case 250 /* SourceFile */: + case 251 /* SourceFile */: return createSourceFileItem(node); - case 216 /* ClassDeclaration */: + case 217 /* ClassDeclaration */: return createClassItem(node); - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: return createEnumItem(node); - case 217 /* InterfaceDeclaration */: + case 218 /* InterfaceDeclaration */: return createIterfaceItem(node); - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: return createModuleItem(node); - case 215 /* FunctionDeclaration */: + case 216 /* FunctionDeclaration */: return createFunctionItem(node); } return undefined; function getModuleName(moduleDeclaration) { // We want to maintain quotation marks. - if (moduleDeclaration.name.kind === 9 /* StringLiteral */) { + if (ts.isAmbientModule(moduleDeclaration)) { return getTextOfNode(moduleDeclaration.name); } // Otherwise, we need to aggregate each identifier to build up the qualified name. var result = []; result.push(moduleDeclaration.name.text); - while (moduleDeclaration.body && moduleDeclaration.body.kind === 220 /* ModuleDeclaration */) { + while (moduleDeclaration.body && moduleDeclaration.body.kind === 221 /* ModuleDeclaration */) { moduleDeclaration = moduleDeclaration.body; result.push(moduleDeclaration.name.text); } @@ -40391,7 +40911,7 @@ var ts; return getNavigationBarItem(moduleName, ts.ScriptElementKind.moduleElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node)); } function createFunctionItem(node) { - if (node.body && node.body.kind === 194 /* Block */) { + if (node.body && node.body.kind === 195 /* Block */) { var childItems = getItemsWorker(sortNodes(node.body.statements), createChildItem); return getNavigationBarItem(!node.name ? "default" : node.name.text, ts.ScriptElementKind.functionElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node)); } @@ -40412,7 +40932,7 @@ var ts; var childItems; if (node.members) { var constructor = ts.forEach(node.members, function (member) { - return member.kind === 144 /* Constructor */ && member; + return member.kind === 145 /* Constructor */ && member; }); // Add the constructor parameters in as children of the class (for property parameters). // Note that *all non-binding pattern named* parameters will be added to the nodes array, but parameters that @@ -40436,7 +40956,7 @@ var ts; } } function removeComputedProperties(node) { - return ts.filter(node.members, function (member) { return member.name === undefined || member.name.kind !== 136 /* ComputedPropertyName */; }); + return ts.filter(node.members, function (member) { return member.name === undefined || member.name.kind !== 137 /* ComputedPropertyName */; }); } /** * Like removeComputedProperties, but retains the properties with well known symbol names @@ -40445,13 +40965,13 @@ var ts; return ts.filter(node.members, function (member) { return !ts.hasDynamicName(member); }); } function getInnermostModule(node) { - while (node.body.kind === 220 /* ModuleDeclaration */) { + while (node.body.kind === 221 /* ModuleDeclaration */) { node = node.body; } return node; } function getNodeSpan(node) { - return node.kind === 250 /* SourceFile */ + return node.kind === 251 /* SourceFile */ ? ts.createTextSpanFromBounds(node.getFullStart(), node.getEnd()) : ts.createTextSpanFromBounds(node.getStart(), node.getEnd()); } @@ -41202,7 +41722,7 @@ var ts; } return createSignatureHelpItems(candidates, resolvedSignature, argumentInfo); function createJavaScriptSignatureHelpItems(argumentInfo) { - if (argumentInfo.invocation.kind !== 170 /* CallExpression */) { + if (argumentInfo.invocation.kind !== 171 /* CallExpression */) { return undefined; } // See if we can find some symbol with the call expression name that has call signatures. @@ -41210,7 +41730,7 @@ var ts; var expression = callExpression.expression; var name = expression.kind === 69 /* Identifier */ ? expression - : expression.kind === 168 /* PropertyAccessExpression */ + : expression.kind === 169 /* PropertyAccessExpression */ ? expression.name : undefined; if (!name || !name.text) { @@ -41243,7 +41763,7 @@ var ts; * in the argument of an invocation; returns undefined otherwise. */ function getImmediatelyContainingArgumentInfo(node) { - if (node.parent.kind === 170 /* CallExpression */ || node.parent.kind === 171 /* NewExpression */) { + if (node.parent.kind === 171 /* CallExpression */ || node.parent.kind === 172 /* NewExpression */) { var callExpression = node.parent; // There are 3 cases to handle: // 1. The token introduces a list, and should begin a sig help session @@ -41296,25 +41816,25 @@ var ts; }; } } - else if (node.kind === 11 /* NoSubstitutionTemplateLiteral */ && node.parent.kind === 172 /* TaggedTemplateExpression */) { + else if (node.kind === 11 /* NoSubstitutionTemplateLiteral */ && node.parent.kind === 173 /* TaggedTemplateExpression */) { // Check if we're actually inside the template; // otherwise we'll fall out and return undefined. if (ts.isInsideTemplateLiteral(node, position)) { return getArgumentListInfoForTemplate(node.parent, /*argumentIndex*/ 0); } } - else if (node.kind === 12 /* TemplateHead */ && node.parent.parent.kind === 172 /* TaggedTemplateExpression */) { + else if (node.kind === 12 /* TemplateHead */ && node.parent.parent.kind === 173 /* TaggedTemplateExpression */) { var templateExpression = node.parent; var tagExpression = templateExpression.parent; - ts.Debug.assert(templateExpression.kind === 185 /* TemplateExpression */); + ts.Debug.assert(templateExpression.kind === 186 /* TemplateExpression */); var argumentIndex = ts.isInsideTemplateLiteral(node, position) ? 0 : 1; return getArgumentListInfoForTemplate(tagExpression, argumentIndex); } - else if (node.parent.kind === 192 /* TemplateSpan */ && node.parent.parent.parent.kind === 172 /* TaggedTemplateExpression */) { + else if (node.parent.kind === 193 /* TemplateSpan */ && node.parent.parent.parent.kind === 173 /* TaggedTemplateExpression */) { var templateSpan = node.parent; var templateExpression = templateSpan.parent; var tagExpression = templateExpression.parent; - ts.Debug.assert(templateExpression.kind === 185 /* TemplateExpression */); + ts.Debug.assert(templateExpression.kind === 186 /* TemplateExpression */); // If we're just after a template tail, don't show signature help. if (node.kind === 14 /* TemplateTail */ && !ts.isInsideTemplateLiteral(node, position)) { return undefined; @@ -41432,7 +41952,7 @@ var ts; // // This is because a Missing node has no width. However, what we actually want is to include trivia // leading up to the next token in case the user is about to type in a TemplateMiddle or TemplateTail. - if (template.kind === 185 /* TemplateExpression */) { + if (template.kind === 186 /* TemplateExpression */) { var lastSpan = ts.lastOrUndefined(template.templateSpans); if (lastSpan.literal.getFullWidth() === 0) { applicableSpanEnd = ts.skipTrivia(sourceFile.text, applicableSpanEnd, /*stopAfterLineBreak*/ false); @@ -41441,7 +41961,7 @@ var ts; return ts.createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart); } function getContainingArgumentInfo(node) { - for (var n = node; n.kind !== 250 /* SourceFile */; n = n.parent) { + for (var n = node; n.kind !== 251 /* SourceFile */; n = n.parent) { if (ts.isFunctionBlock(n)) { return undefined; } @@ -41641,40 +42161,40 @@ var ts; return false; } switch (n.kind) { - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: - case 219 /* EnumDeclaration */: - case 167 /* ObjectLiteralExpression */: - case 163 /* ObjectBindingPattern */: - case 155 /* TypeLiteral */: - case 194 /* Block */: - case 221 /* ModuleBlock */: - case 222 /* CaseBlock */: + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: + case 220 /* EnumDeclaration */: + case 168 /* ObjectLiteralExpression */: + case 164 /* ObjectBindingPattern */: + case 156 /* TypeLiteral */: + case 195 /* Block */: + case 222 /* ModuleBlock */: + case 223 /* CaseBlock */: return nodeEndsWith(n, 16 /* CloseBraceToken */, sourceFile); - case 246 /* CatchClause */: + case 247 /* CatchClause */: return isCompletedNode(n.block, sourceFile); - case 171 /* NewExpression */: + case 172 /* NewExpression */: if (!n.arguments) { return true; } // fall through - case 170 /* CallExpression */: - case 174 /* ParenthesizedExpression */: - case 160 /* ParenthesizedType */: + case 171 /* CallExpression */: + case 175 /* ParenthesizedExpression */: + case 161 /* ParenthesizedType */: return nodeEndsWith(n, 18 /* CloseParenToken */, sourceFile); - case 152 /* FunctionType */: - case 153 /* ConstructorType */: + case 153 /* FunctionType */: + case 154 /* ConstructorType */: return isCompletedNode(n.type, sourceFile); - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 148 /* ConstructSignature */: - case 147 /* CallSignature */: - case 176 /* ArrowFunction */: + case 145 /* Constructor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 149 /* ConstructSignature */: + case 148 /* CallSignature */: + case 177 /* ArrowFunction */: if (n.body) { return isCompletedNode(n.body, sourceFile); } @@ -41684,64 +42204,64 @@ var ts; // Even though type parameters can be unclosed, we can get away with // having at least a closing paren. return hasChildOfKind(n, 18 /* CloseParenToken */, sourceFile); - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: return n.body && isCompletedNode(n.body, sourceFile); - case 198 /* IfStatement */: + case 199 /* IfStatement */: if (n.elseStatement) { return isCompletedNode(n.elseStatement, sourceFile); } return isCompletedNode(n.thenStatement, sourceFile); - case 197 /* ExpressionStatement */: + case 198 /* ExpressionStatement */: return isCompletedNode(n.expression, sourceFile) || hasChildOfKind(n, 23 /* SemicolonToken */); - case 166 /* ArrayLiteralExpression */: - case 164 /* ArrayBindingPattern */: - case 169 /* ElementAccessExpression */: - case 136 /* ComputedPropertyName */: - case 157 /* TupleType */: + case 167 /* ArrayLiteralExpression */: + case 165 /* ArrayBindingPattern */: + case 170 /* ElementAccessExpression */: + case 137 /* ComputedPropertyName */: + case 158 /* TupleType */: return nodeEndsWith(n, 20 /* CloseBracketToken */, sourceFile); - case 149 /* IndexSignature */: + case 150 /* IndexSignature */: if (n.type) { return isCompletedNode(n.type, sourceFile); } return hasChildOfKind(n, 20 /* CloseBracketToken */, sourceFile); - case 243 /* CaseClause */: - case 244 /* DefaultClause */: + case 244 /* CaseClause */: + case 245 /* DefaultClause */: // there is no such thing as terminator token for CaseClause/DefaultClause so for simplicitly always consider them non-completed return false; - case 201 /* ForStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - case 200 /* WhileStatement */: + case 202 /* ForStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: + case 201 /* WhileStatement */: return isCompletedNode(n.statement, sourceFile); - case 199 /* DoStatement */: + case 200 /* DoStatement */: // rough approximation: if DoStatement has While keyword - then if node is completed is checking the presence of ')'; var hasWhileKeyword = findChildOfKind(n, 104 /* WhileKeyword */, sourceFile); if (hasWhileKeyword) { return nodeEndsWith(n, 18 /* CloseParenToken */, sourceFile); } return isCompletedNode(n.statement, sourceFile); - case 154 /* TypeQuery */: + case 155 /* TypeQuery */: return isCompletedNode(n.exprName, sourceFile); - case 178 /* TypeOfExpression */: - case 177 /* DeleteExpression */: - case 179 /* VoidExpression */: - case 186 /* YieldExpression */: - case 187 /* SpreadElementExpression */: + case 179 /* TypeOfExpression */: + case 178 /* DeleteExpression */: + case 180 /* VoidExpression */: + case 187 /* YieldExpression */: + case 188 /* SpreadElementExpression */: var unaryWordExpression = n; return isCompletedNode(unaryWordExpression.expression, sourceFile); - case 172 /* TaggedTemplateExpression */: + case 173 /* TaggedTemplateExpression */: return isCompletedNode(n.template, sourceFile); - case 185 /* TemplateExpression */: + case 186 /* TemplateExpression */: var lastSpan = ts.lastOrUndefined(n.templateSpans); return isCompletedNode(lastSpan, sourceFile); - case 192 /* TemplateSpan */: + case 193 /* TemplateSpan */: return ts.nodeIsPresent(n.literal); - case 181 /* PrefixUnaryExpression */: + case 182 /* PrefixUnaryExpression */: return isCompletedNode(n.operand, sourceFile); - case 183 /* BinaryExpression */: + case 184 /* BinaryExpression */: return isCompletedNode(n.right, sourceFile); - case 184 /* ConditionalExpression */: + case 185 /* ConditionalExpression */: return isCompletedNode(n.whenFalse, sourceFile); default: return true; @@ -41797,7 +42317,7 @@ var ts; // for the position of the relevant node (or comma). var syntaxList = ts.forEach(node.parent.getChildren(), function (c) { // find syntax list that covers the span of the node - if (c.kind === 273 /* SyntaxList */ && c.pos <= node.pos && c.end >= node.end) { + if (c.kind === 274 /* SyntaxList */ && c.pos <= node.pos && c.end >= node.end) { return c; } }); @@ -41903,7 +42423,7 @@ var ts; function findPrecedingToken(position, sourceFile, startNode) { return find(startNode || sourceFile); function findRightmostToken(n) { - if (isToken(n) || n.kind === 238 /* JsxText */) { + if (isToken(n) || n.kind === 239 /* JsxText */) { return n; } var children = n.getChildren(); @@ -41911,7 +42431,7 @@ var ts; return candidate && findRightmostToken(candidate); } function find(n) { - if (isToken(n) || n.kind === 238 /* JsxText */) { + if (isToken(n) || n.kind === 239 /* JsxText */) { return n; } var children = n.getChildren(); @@ -41925,10 +42445,10 @@ var ts; // if no - position is in the node itself so we should recurse in it. // NOTE: JsxText is a weird kind of node that can contain only whitespaces (since they are not counted as trivia). // if this is the case - then we should assume that token in question is located in previous child. - if (position < child.end && (nodeHasTokens(child) || child.kind === 238 /* JsxText */)) { + if (position < child.end && (nodeHasTokens(child) || child.kind === 239 /* JsxText */)) { var start = child.getStart(sourceFile); var lookInPreviousChild = (start >= position) || - (child.kind === 238 /* JsxText */ && start === child.end); // whitespace only JsxText + (child.kind === 239 /* JsxText */ && start === child.end); // whitespace only JsxText if (lookInPreviousChild) { // actual start of the node is past the position - previous token should be at the end of previous child var candidate = findRightmostChildNodeWithTokens(children, /*exclusiveStartPosition*/ i); @@ -41940,7 +42460,7 @@ var ts; } } } - ts.Debug.assert(startNode !== undefined || n.kind === 250 /* SourceFile */); + ts.Debug.assert(startNode !== undefined || n.kind === 251 /* SourceFile */); // Here we know that none of child token nodes embrace the position, // the only known case is when position is at the end of the file. // Try to find the rightmost token in the file without filtering. @@ -41962,7 +42482,7 @@ var ts; ts.findPrecedingToken = findPrecedingToken; function isInString(sourceFile, position) { var token = getTokenAtPosition(sourceFile, position); - return token && (token.kind === 9 /* StringLiteral */ || token.kind === 162 /* StringLiteralType */) && position > token.getStart(); + return token && (token.kind === 9 /* StringLiteral */ || token.kind === 163 /* StringLiteralType */) && position > token.getStart(); } ts.isInString = isInString; function isInComment(sourceFile, position) { @@ -42066,17 +42586,17 @@ var ts; } ts.getNodeModifiers = getNodeModifiers; function getTypeArgumentOrTypeParameterList(node) { - if (node.kind === 151 /* TypeReference */ || node.kind === 170 /* CallExpression */) { + if (node.kind === 152 /* TypeReference */ || node.kind === 171 /* CallExpression */) { return node.typeArguments; } - if (ts.isFunctionLike(node) || node.kind === 216 /* ClassDeclaration */ || node.kind === 217 /* InterfaceDeclaration */) { + if (ts.isFunctionLike(node) || node.kind === 217 /* ClassDeclaration */ || node.kind === 218 /* InterfaceDeclaration */) { return node.typeParameters; } return undefined; } ts.getTypeArgumentOrTypeParameterList = getTypeArgumentOrTypeParameterList; function isToken(n) { - return n.kind >= 0 /* FirstToken */ && n.kind <= 134 /* LastToken */; + return n.kind >= 0 /* FirstToken */ && n.kind <= 135 /* LastToken */; } ts.isToken = isToken; function isWord(kind) { @@ -42092,7 +42612,7 @@ var ts; ts.isComment = isComment; function isStringOrRegularExpressionOrTemplateLiteral(kind) { if (kind === 9 /* StringLiteral */ - || kind === 162 /* StringLiteralType */ + || kind === 163 /* StringLiteralType */ || kind === 10 /* RegularExpressionLiteral */ || ts.isTemplateLiteralKind(kind)) { return true; @@ -42135,13 +42655,40 @@ var ts; return true; } ts.compareDataObjects = compareDataObjects; + function isArrayLiteralOrObjectLiteralDestructuringPattern(node) { + if (node.kind === 167 /* ArrayLiteralExpression */ || + node.kind === 168 /* ObjectLiteralExpression */) { + // [a,b,c] from: + // [a, b, c] = someExpression; + if (node.parent.kind === 184 /* BinaryExpression */ && + node.parent.left === node && + node.parent.operatorToken.kind === 56 /* EqualsToken */) { + return true; + } + // [a, b, c] from: + // for([a, b, c] of expression) + if (node.parent.kind === 204 /* ForOfStatement */ && + node.parent.initializer === node) { + return true; + } + // [a, b, c] of + // [x, [a, b, c] ] = someExpression + // or + // {x, a: {a, b, c} } = someExpression + if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 248 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { + return true; + } + } + return false; + } + ts.isArrayLiteralOrObjectLiteralDestructuringPattern = isArrayLiteralOrObjectLiteralDestructuringPattern; })(ts || (ts = {})); // Display-part writer helpers /* @internal */ var ts; (function (ts) { function isFirstDeclarationOfSymbolParameter(symbol) { - return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === 138 /* Parameter */; + return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === 139 /* Parameter */; } ts.isFirstDeclarationOfSymbolParameter = isFirstDeclarationOfSymbolParameter; var displayPartWriter = getDisplayPartWriter(); @@ -42329,7 +42876,7 @@ var ts; ts.getDeclaredName = getDeclaredName; function isImportOrExportSpecifierName(location) { return location.parent && - (location.parent.kind === 228 /* ImportSpecifier */ || location.parent.kind === 232 /* ExportSpecifier */) && + (location.parent.kind === 229 /* ImportSpecifier */ || location.parent.kind === 233 /* ExportSpecifier */) && location.parent.propertyName === location; } ts.isImportOrExportSpecifierName = isImportOrExportSpecifierName; @@ -42452,10 +42999,10 @@ var ts; function shouldRescanJsxIdentifier(node) { if (node.parent) { switch (node.parent.kind) { - case 240 /* JsxAttribute */: - case 237 /* JsxOpeningElement */: - case 239 /* JsxClosingElement */: - case 236 /* JsxSelfClosingElement */: + case 241 /* JsxAttribute */: + case 238 /* JsxOpeningElement */: + case 240 /* JsxClosingElement */: + case 237 /* JsxSelfClosingElement */: return node.kind === 69 /* Identifier */; } } @@ -43059,9 +43606,9 @@ var ts; } Rules.prototype.getRuleName = function (rule) { var o = this; - for (var name_30 in o) { - if (o[name_30] === rule) { - return name_30; + for (var name_33 in o) { + if (o[name_33] === rule) { + return name_33; } } throw new Error("Unknown rule"); @@ -43070,40 +43617,40 @@ var ts; /// Contexts /// Rules.IsForContext = function (context) { - return context.contextNode.kind === 201 /* ForStatement */; + return context.contextNode.kind === 202 /* ForStatement */; }; Rules.IsNotForContext = function (context) { return !Rules.IsForContext(context); }; Rules.IsBinaryOpContext = function (context) { switch (context.contextNode.kind) { - case 183 /* BinaryExpression */: - case 184 /* ConditionalExpression */: - case 191 /* AsExpression */: - case 150 /* TypePredicate */: - case 158 /* UnionType */: - case 159 /* IntersectionType */: + case 184 /* BinaryExpression */: + case 185 /* ConditionalExpression */: + case 192 /* AsExpression */: + case 151 /* TypePredicate */: + case 159 /* UnionType */: + case 160 /* IntersectionType */: return true; // equals in binding elements: function foo([[x, y] = [1, 2]]) - case 165 /* BindingElement */: + case 166 /* BindingElement */: // equals in type X = ... - case 218 /* TypeAliasDeclaration */: + case 219 /* TypeAliasDeclaration */: // equal in import a = module('a'); - case 223 /* ImportEqualsDeclaration */: + case 224 /* ImportEqualsDeclaration */: // equal in let a = 0; - case 213 /* VariableDeclaration */: + case 214 /* VariableDeclaration */: // equal in p = 0; - case 138 /* Parameter */: - case 249 /* EnumMember */: - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: + case 139 /* Parameter */: + case 250 /* EnumMember */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: return context.currentTokenSpan.kind === 56 /* EqualsToken */ || context.nextTokenSpan.kind === 56 /* EqualsToken */; // "in" keyword in for (let x in []) { } - case 202 /* ForInStatement */: + case 203 /* ForInStatement */: return context.currentTokenSpan.kind === 90 /* InKeyword */ || context.nextTokenSpan.kind === 90 /* InKeyword */; // Technically, "of" is not a binary operator, but format it the same way as "in" - case 203 /* ForOfStatement */: - return context.currentTokenSpan.kind === 134 /* OfKeyword */ || context.nextTokenSpan.kind === 134 /* OfKeyword */; + case 204 /* ForOfStatement */: + return context.currentTokenSpan.kind === 135 /* OfKeyword */ || context.nextTokenSpan.kind === 135 /* OfKeyword */; } return false; }; @@ -43111,7 +43658,7 @@ var ts; return !Rules.IsBinaryOpContext(context); }; Rules.IsConditionalOperatorContext = function (context) { - return context.contextNode.kind === 184 /* ConditionalExpression */; + return context.contextNode.kind === 185 /* ConditionalExpression */; }; Rules.IsSameLineTokenOrBeforeMultilineBlockContext = function (context) { //// This check is mainly used inside SpaceBeforeOpenBraceInControl and SpaceBeforeOpenBraceInFunction. @@ -43155,93 +43702,93 @@ var ts; return true; } switch (node.kind) { - case 194 /* Block */: - case 222 /* CaseBlock */: - case 167 /* ObjectLiteralExpression */: - case 221 /* ModuleBlock */: + case 195 /* Block */: + case 223 /* CaseBlock */: + case 168 /* ObjectLiteralExpression */: + case 222 /* ModuleBlock */: return true; } return false; }; Rules.IsFunctionDeclContext = function (context) { switch (context.contextNode.kind) { - case 215 /* FunctionDeclaration */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 216 /* FunctionDeclaration */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: //case SyntaxKind.MemberFunctionDeclaration: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: ///case SyntaxKind.MethodSignature: - case 147 /* CallSignature */: - case 175 /* FunctionExpression */: - case 144 /* Constructor */: - case 176 /* ArrowFunction */: + case 148 /* CallSignature */: + case 176 /* FunctionExpression */: + case 145 /* Constructor */: + case 177 /* ArrowFunction */: //case SyntaxKind.ConstructorDeclaration: //case SyntaxKind.SimpleArrowFunctionExpression: //case SyntaxKind.ParenthesizedArrowFunctionExpression: - case 217 /* InterfaceDeclaration */: + case 218 /* InterfaceDeclaration */: return true; } return false; }; Rules.IsFunctionDeclarationOrFunctionExpressionContext = function (context) { - return context.contextNode.kind === 215 /* FunctionDeclaration */ || context.contextNode.kind === 175 /* FunctionExpression */; + return context.contextNode.kind === 216 /* FunctionDeclaration */ || context.contextNode.kind === 176 /* FunctionExpression */; }; Rules.IsTypeScriptDeclWithBlockContext = function (context) { return Rules.NodeIsTypeScriptDeclWithBlockContext(context.contextNode); }; Rules.NodeIsTypeScriptDeclWithBlockContext = function (node) { switch (node.kind) { - case 216 /* ClassDeclaration */: - case 188 /* ClassExpression */: - case 217 /* InterfaceDeclaration */: - case 219 /* EnumDeclaration */: - case 155 /* TypeLiteral */: - case 220 /* ModuleDeclaration */: + case 217 /* ClassDeclaration */: + case 189 /* ClassExpression */: + case 218 /* InterfaceDeclaration */: + case 220 /* EnumDeclaration */: + case 156 /* TypeLiteral */: + case 221 /* ModuleDeclaration */: return true; } return false; }; Rules.IsAfterCodeBlockContext = function (context) { switch (context.currentTokenParent.kind) { - case 216 /* ClassDeclaration */: - case 220 /* ModuleDeclaration */: - case 219 /* EnumDeclaration */: - case 194 /* Block */: - case 246 /* CatchClause */: - case 221 /* ModuleBlock */: - case 208 /* SwitchStatement */: + case 217 /* ClassDeclaration */: + case 221 /* ModuleDeclaration */: + case 220 /* EnumDeclaration */: + case 195 /* Block */: + case 247 /* CatchClause */: + case 222 /* ModuleBlock */: + case 209 /* SwitchStatement */: return true; } return false; }; Rules.IsControlDeclContext = function (context) { switch (context.contextNode.kind) { - case 198 /* IfStatement */: - case 208 /* SwitchStatement */: - case 201 /* ForStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - case 200 /* WhileStatement */: - case 211 /* TryStatement */: - case 199 /* DoStatement */: - case 207 /* WithStatement */: + case 199 /* IfStatement */: + case 209 /* SwitchStatement */: + case 202 /* ForStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: + case 201 /* WhileStatement */: + case 212 /* TryStatement */: + case 200 /* DoStatement */: + case 208 /* WithStatement */: // TODO // case SyntaxKind.ElseClause: - case 246 /* CatchClause */: + case 247 /* CatchClause */: return true; default: return false; } }; Rules.IsObjectContext = function (context) { - return context.contextNode.kind === 167 /* ObjectLiteralExpression */; + return context.contextNode.kind === 168 /* ObjectLiteralExpression */; }; Rules.IsFunctionCallContext = function (context) { - return context.contextNode.kind === 170 /* CallExpression */; + return context.contextNode.kind === 171 /* CallExpression */; }; Rules.IsNewContext = function (context) { - return context.contextNode.kind === 171 /* NewExpression */; + return context.contextNode.kind === 172 /* NewExpression */; }; Rules.IsFunctionCallOrNewContext = function (context) { return Rules.IsFunctionCallContext(context) || Rules.IsNewContext(context); @@ -43253,7 +43800,7 @@ var ts; return context.nextTokenSpan.kind !== 20 /* CloseBracketToken */; }; Rules.IsArrowFunctionContext = function (context) { - return context.contextNode.kind === 176 /* ArrowFunction */; + return context.contextNode.kind === 177 /* ArrowFunction */; }; Rules.IsSameLineTokenContext = function (context) { return context.TokensAreOnSameLine(); @@ -43271,41 +43818,41 @@ var ts; while (ts.isExpression(node)) { node = node.parent; } - return node.kind === 139 /* Decorator */; + return node.kind === 140 /* Decorator */; }; Rules.IsStartOfVariableDeclarationList = function (context) { - return context.currentTokenParent.kind === 214 /* VariableDeclarationList */ && + return context.currentTokenParent.kind === 215 /* VariableDeclarationList */ && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; }; Rules.IsNotFormatOnEnter = function (context) { return context.formattingRequestKind !== 2 /* FormatOnEnter */; }; Rules.IsModuleDeclContext = function (context) { - return context.contextNode.kind === 220 /* ModuleDeclaration */; + return context.contextNode.kind === 221 /* ModuleDeclaration */; }; Rules.IsObjectTypeContext = function (context) { - return context.contextNode.kind === 155 /* TypeLiteral */; // && context.contextNode.parent.kind !== SyntaxKind.InterfaceDeclaration; + return context.contextNode.kind === 156 /* TypeLiteral */; // && context.contextNode.parent.kind !== SyntaxKind.InterfaceDeclaration; }; Rules.IsTypeArgumentOrParameterOrAssertion = function (token, parent) { if (token.kind !== 25 /* LessThanToken */ && token.kind !== 27 /* GreaterThanToken */) { return false; } switch (parent.kind) { - case 151 /* TypeReference */: - case 173 /* TypeAssertionExpression */: - case 216 /* ClassDeclaration */: - case 188 /* ClassExpression */: - case 217 /* InterfaceDeclaration */: - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 170 /* CallExpression */: - case 171 /* NewExpression */: - case 190 /* ExpressionWithTypeArguments */: + case 152 /* TypeReference */: + case 174 /* TypeAssertionExpression */: + case 217 /* ClassDeclaration */: + case 189 /* ClassExpression */: + case 218 /* InterfaceDeclaration */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 148 /* CallSignature */: + case 149 /* ConstructSignature */: + case 171 /* CallExpression */: + case 172 /* NewExpression */: + case 191 /* ExpressionWithTypeArguments */: return true; default: return false; @@ -43316,13 +43863,13 @@ var ts; Rules.IsTypeArgumentOrParameterOrAssertion(context.nextTokenSpan, context.nextTokenParent); }; Rules.IsTypeAssertionContext = function (context) { - return context.contextNode.kind === 173 /* TypeAssertionExpression */; + return context.contextNode.kind === 174 /* TypeAssertionExpression */; }; Rules.IsVoidOpContext = function (context) { - return context.currentTokenSpan.kind === 103 /* VoidKeyword */ && context.currentTokenParent.kind === 179 /* VoidExpression */; + return context.currentTokenSpan.kind === 103 /* VoidKeyword */ && context.currentTokenParent.kind === 180 /* VoidExpression */; }; Rules.IsYieldOrYieldStarWithOperand = function (context) { - return context.contextNode.kind === 186 /* YieldExpression */ && context.contextNode.expression !== undefined; + return context.contextNode.kind === 187 /* YieldExpression */ && context.contextNode.expression !== undefined; }; return Rules; }()); @@ -43346,7 +43893,7 @@ var ts; return result; }; RulesMap.prototype.Initialize = function (rules) { - this.mapRowLength = 134 /* LastToken */ + 1; + this.mapRowLength = 135 /* LastToken */ + 1; this.map = new Array(this.mapRowLength * this.mapRowLength); //new Array(this.mapRowLength * this.mapRowLength); // This array is used only during construction of the rulesbucket in the map var rulesBucketConstructionStateList = new Array(this.map.length); //new Array(this.map.length); @@ -43541,7 +44088,7 @@ var ts; } TokenAllAccess.prototype.GetTokens = function () { var result = []; - for (var token = 0 /* FirstToken */; token <= 134 /* LastToken */; token++) { + for (var token = 0 /* FirstToken */; token <= 135 /* LastToken */; token++) { result.push(token); } return result; @@ -43583,9 +44130,9 @@ var ts; }; TokenRange.Any = TokenRange.AllTokens(); TokenRange.AnyIncludingMultilineComments = TokenRange.FromTokens(TokenRange.Any.GetTokens().concat([3 /* MultiLineCommentTrivia */])); - TokenRange.Keywords = TokenRange.FromRange(70 /* FirstKeyword */, 134 /* LastKeyword */); + TokenRange.Keywords = TokenRange.FromRange(70 /* FirstKeyword */, 135 /* LastKeyword */); TokenRange.BinaryOperators = TokenRange.FromRange(25 /* FirstBinaryOperator */, 68 /* LastBinaryOperator */); - TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([90 /* InKeyword */, 91 /* InstanceOfKeyword */, 134 /* OfKeyword */, 116 /* AsKeyword */, 124 /* IsKeyword */]); + TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([90 /* InKeyword */, 91 /* InstanceOfKeyword */, 135 /* OfKeyword */, 116 /* AsKeyword */, 124 /* IsKeyword */]); TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([41 /* PlusPlusToken */, 42 /* MinusMinusToken */, 50 /* TildeToken */, 49 /* ExclamationToken */]); TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([8 /* NumericLiteral */, 69 /* Identifier */, 17 /* OpenParenToken */, 19 /* OpenBracketToken */, 15 /* OpenBraceToken */, 97 /* ThisKeyword */, 92 /* NewKeyword */]); TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([69 /* Identifier */, 17 /* OpenParenToken */, 97 /* ThisKeyword */, 92 /* NewKeyword */]); @@ -43815,17 +44362,17 @@ var ts; // i.e. parent is class declaration with the list of members and node is one of members. function isListElement(parent, node) { switch (parent.kind) { - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: return ts.rangeContainsRange(parent.members, node); - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: var body = parent.body; - return body && body.kind === 194 /* Block */ && ts.rangeContainsRange(body.statements, node); - case 250 /* SourceFile */: - case 194 /* Block */: - case 221 /* ModuleBlock */: + return body && body.kind === 195 /* Block */ && ts.rangeContainsRange(body.statements, node); + case 251 /* SourceFile */: + case 195 /* Block */: + case 222 /* ModuleBlock */: return ts.rangeContainsRange(parent.statements, node); - case 246 /* CatchClause */: + case 247 /* CatchClause */: return ts.rangeContainsRange(parent.block.statements, node); } return false; @@ -44027,19 +44574,19 @@ var ts; return node.modifiers[0].kind; } switch (node.kind) { - case 216 /* ClassDeclaration */: return 73 /* ClassKeyword */; - case 217 /* InterfaceDeclaration */: return 107 /* InterfaceKeyword */; - case 215 /* FunctionDeclaration */: return 87 /* FunctionKeyword */; - case 219 /* EnumDeclaration */: return 219 /* EnumDeclaration */; - case 145 /* GetAccessor */: return 123 /* GetKeyword */; - case 146 /* SetAccessor */: return 129 /* SetKeyword */; - case 143 /* MethodDeclaration */: + case 217 /* ClassDeclaration */: return 73 /* ClassKeyword */; + case 218 /* InterfaceDeclaration */: return 107 /* InterfaceKeyword */; + case 216 /* FunctionDeclaration */: return 87 /* FunctionKeyword */; + case 220 /* EnumDeclaration */: return 220 /* EnumDeclaration */; + case 146 /* GetAccessor */: return 123 /* GetKeyword */; + case 147 /* SetAccessor */: return 129 /* SetKeyword */; + case 144 /* MethodDeclaration */: if (node.asteriskToken) { return 37 /* AsteriskToken */; } // fall-through - case 141 /* PropertyDeclaration */: - case 138 /* Parameter */: + case 142 /* PropertyDeclaration */: + case 139 /* Parameter */: return node.name.kind; } } @@ -44179,7 +44726,7 @@ var ts; consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, child); return inheritedIndentation; } - var effectiveParentStartLine = child.kind === 139 /* Decorator */ ? childStartLine : undecoratedParentStartLine; + var effectiveParentStartLine = child.kind === 140 /* Decorator */ ? childStartLine : undecoratedParentStartLine; var childIndentation = computeIndentation(child, childStartLine, childIndentationAmount, node, parentDynamicIndentation, effectiveParentStartLine); processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta); childContextNode = node; @@ -44523,20 +45070,20 @@ var ts; } function isSomeBlock(kind) { switch (kind) { - case 194 /* Block */: - case 221 /* ModuleBlock */: + case 195 /* Block */: + case 222 /* ModuleBlock */: return true; } return false; } function getOpenTokenForList(node, list) { switch (node.kind) { - case 144 /* Constructor */: - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 176 /* ArrowFunction */: + case 145 /* Constructor */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 177 /* ArrowFunction */: if (node.typeParameters === list) { return 25 /* LessThanToken */; } @@ -44544,8 +45091,8 @@ var ts; return 17 /* OpenParenToken */; } break; - case 170 /* CallExpression */: - case 171 /* NewExpression */: + case 171 /* CallExpression */: + case 172 /* NewExpression */: if (node.typeArguments === list) { return 25 /* LessThanToken */; } @@ -44553,7 +45100,7 @@ var ts; return 17 /* OpenParenToken */; } break; - case 151 /* TypeReference */: + case 152 /* TypeReference */: if (node.typeArguments === list) { return 25 /* LessThanToken */; } @@ -44669,7 +45216,7 @@ var ts; var lineStart = ts.getLineStartPositionForPosition(current_1, sourceFile); return SmartIndenter.findFirstNonWhitespaceColumn(lineStart, current_1, sourceFile, options); } - if (precedingToken.kind === 24 /* CommaToken */ && precedingToken.parent.kind !== 183 /* BinaryExpression */) { + if (precedingToken.kind === 24 /* CommaToken */ && precedingToken.parent.kind !== 184 /* BinaryExpression */) { // previous token is comma that separates items in list - find the previous item and try to derive indentation from it var actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options); if (actualIndentation !== -1 /* Unknown */) { @@ -44788,7 +45335,7 @@ var ts; // - parent is SourceFile - by default immediate children of SourceFile are not indented except when user indents them manually // - parent and child are not on the same line var useActualIndentation = (ts.isDeclaration(current) || ts.isStatement(current)) && - (parent.kind === 250 /* SourceFile */ || !parentAndChildShareLine); + (parent.kind === 251 /* SourceFile */ || !parentAndChildShareLine); if (!useActualIndentation) { return -1 /* Unknown */; } @@ -44821,7 +45368,7 @@ var ts; return sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)); } function childStartsOnTheSameLineWithElseInIfStatement(parent, child, childStartLine, sourceFile) { - if (parent.kind === 198 /* IfStatement */ && parent.elseStatement === child) { + if (parent.kind === 199 /* IfStatement */ && parent.elseStatement === child) { var elseKeyword = ts.findChildOfKind(parent, 80 /* ElseKeyword */, sourceFile); ts.Debug.assert(elseKeyword !== undefined); var elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; @@ -44833,23 +45380,23 @@ var ts; function getContainingList(node, sourceFile) { if (node.parent) { switch (node.parent.kind) { - case 151 /* TypeReference */: + case 152 /* TypeReference */: if (node.parent.typeArguments && ts.rangeContainsStartEnd(node.parent.typeArguments, node.getStart(sourceFile), node.getEnd())) { return node.parent.typeArguments; } break; - case 167 /* ObjectLiteralExpression */: + case 168 /* ObjectLiteralExpression */: return node.parent.properties; - case 166 /* ArrayLiteralExpression */: + case 167 /* ArrayLiteralExpression */: return node.parent.elements; - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: { + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 148 /* CallSignature */: + case 149 /* ConstructSignature */: { var start = node.getStart(sourceFile); if (node.parent.typeParameters && ts.rangeContainsStartEnd(node.parent.typeParameters, start, node.getEnd())) { @@ -44860,8 +45407,8 @@ var ts; } break; } - case 171 /* NewExpression */: - case 170 /* CallExpression */: { + case 172 /* NewExpression */: + case 171 /* CallExpression */: { var start = node.getStart(sourceFile); if (node.parent.typeArguments && ts.rangeContainsStartEnd(node.parent.typeArguments, start, node.getEnd())) { @@ -44891,8 +45438,8 @@ var ts; if (node.kind === 18 /* CloseParenToken */) { return -1 /* Unknown */; } - if (node.parent && (node.parent.kind === 170 /* CallExpression */ || - node.parent.kind === 171 /* NewExpression */) && + if (node.parent && (node.parent.kind === 171 /* CallExpression */ || + node.parent.kind === 172 /* NewExpression */) && node.parent.expression !== node) { var fullCallOrNewExpression = node.parent.expression; var startingExpression = getStartingExpression(fullCallOrNewExpression); @@ -44910,10 +45457,10 @@ var ts; function getStartingExpression(node) { while (true) { switch (node.kind) { - case 170 /* CallExpression */: - case 171 /* NewExpression */: - case 168 /* PropertyAccessExpression */: - case 169 /* ElementAccessExpression */: + case 171 /* CallExpression */: + case 172 /* NewExpression */: + case 169 /* PropertyAccessExpression */: + case 170 /* ElementAccessExpression */: node = node.expression; break; default: @@ -44977,45 +45524,45 @@ var ts; SmartIndenter.findFirstNonWhitespaceColumn = findFirstNonWhitespaceColumn; function nodeContentIsAlwaysIndented(kind) { switch (kind) { - case 197 /* ExpressionStatement */: - case 216 /* ClassDeclaration */: - case 188 /* ClassExpression */: - case 217 /* InterfaceDeclaration */: - case 219 /* EnumDeclaration */: - case 218 /* TypeAliasDeclaration */: - case 166 /* ArrayLiteralExpression */: - case 194 /* Block */: - case 221 /* ModuleBlock */: - case 167 /* ObjectLiteralExpression */: - case 155 /* TypeLiteral */: - case 157 /* TupleType */: - case 222 /* CaseBlock */: - case 244 /* DefaultClause */: - case 243 /* CaseClause */: - case 174 /* ParenthesizedExpression */: - case 168 /* PropertyAccessExpression */: - case 170 /* CallExpression */: - case 171 /* NewExpression */: - case 195 /* VariableStatement */: - case 213 /* VariableDeclaration */: - case 229 /* ExportAssignment */: - case 206 /* ReturnStatement */: - case 184 /* ConditionalExpression */: - case 164 /* ArrayBindingPattern */: - case 163 /* ObjectBindingPattern */: - case 237 /* JsxOpeningElement */: - case 236 /* JsxSelfClosingElement */: - case 242 /* JsxExpression */: - case 142 /* MethodSignature */: - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 138 /* Parameter */: - case 152 /* FunctionType */: - case 153 /* ConstructorType */: - case 160 /* ParenthesizedType */: - case 172 /* TaggedTemplateExpression */: - case 180 /* AwaitExpression */: - case 227 /* NamedImports */: + case 198 /* ExpressionStatement */: + case 217 /* ClassDeclaration */: + case 189 /* ClassExpression */: + case 218 /* InterfaceDeclaration */: + case 220 /* EnumDeclaration */: + case 219 /* TypeAliasDeclaration */: + case 167 /* ArrayLiteralExpression */: + case 195 /* Block */: + case 222 /* ModuleBlock */: + case 168 /* ObjectLiteralExpression */: + case 156 /* TypeLiteral */: + case 158 /* TupleType */: + case 223 /* CaseBlock */: + case 245 /* DefaultClause */: + case 244 /* CaseClause */: + case 175 /* ParenthesizedExpression */: + case 169 /* PropertyAccessExpression */: + case 171 /* CallExpression */: + case 172 /* NewExpression */: + case 196 /* VariableStatement */: + case 214 /* VariableDeclaration */: + case 230 /* ExportAssignment */: + case 207 /* ReturnStatement */: + case 185 /* ConditionalExpression */: + case 165 /* ArrayBindingPattern */: + case 164 /* ObjectBindingPattern */: + case 238 /* JsxOpeningElement */: + case 237 /* JsxSelfClosingElement */: + case 243 /* JsxExpression */: + case 143 /* MethodSignature */: + case 148 /* CallSignature */: + case 149 /* ConstructSignature */: + case 139 /* Parameter */: + case 153 /* FunctionType */: + case 154 /* ConstructorType */: + case 161 /* ParenthesizedType */: + case 173 /* TaggedTemplateExpression */: + case 181 /* AwaitExpression */: + case 228 /* NamedImports */: return true; } return false; @@ -45024,22 +45571,22 @@ var ts; function nodeWillIndentChild(parent, child, indentByDefault) { var childKind = child ? child.kind : 0 /* Unknown */; switch (parent.kind) { - case 199 /* DoStatement */: - case 200 /* WhileStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - case 201 /* ForStatement */: - case 198 /* IfStatement */: - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 143 /* MethodDeclaration */: - case 176 /* ArrowFunction */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - return childKind !== 194 /* Block */; - case 235 /* JsxElement */: - return childKind !== 239 /* JsxClosingElement */; + case 200 /* DoStatement */: + case 201 /* WhileStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: + case 202 /* ForStatement */: + case 199 /* IfStatement */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 144 /* MethodDeclaration */: + case 177 /* ArrowFunction */: + case 145 /* Constructor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + return childKind !== 195 /* Block */; + case 236 /* JsxElement */: + return childKind !== 240 /* JsxClosingElement */; } // No explicit rule for given nodes so the result will follow the default value argument return indentByDefault; @@ -45191,7 +45738,7 @@ var ts; return pos; }; NodeObject.prototype.createSyntaxList = function (nodes) { - var list = createNode(273 /* SyntaxList */, nodes.pos, nodes.end, 2048 /* Synthetic */, this); + var list = createNode(274 /* SyntaxList */, nodes.pos, nodes.end, 2048 /* Synthetic */, this); list._children = []; var pos = nodes.pos; for (var _i = 0, nodes_7 = nodes; _i < nodes_7.length; _i++) { @@ -45210,7 +45757,7 @@ var ts; NodeObject.prototype.createChildren = function (sourceFile) { var _this = this; var children; - if (this.kind >= 135 /* FirstNode */) { + if (this.kind >= 136 /* FirstNode */) { scanner.setText((sourceFile || this.getSourceFile()).text); children = []; var pos = this.pos; @@ -45257,7 +45804,7 @@ var ts; return undefined; } var child = children[0]; - return child.kind < 135 /* FirstNode */ ? child : child.getFirstToken(sourceFile); + return child.kind < 136 /* FirstNode */ ? child : child.getFirstToken(sourceFile); }; NodeObject.prototype.getLastToken = function (sourceFile) { var children = this.getChildren(sourceFile); @@ -45265,7 +45812,7 @@ var ts; if (!child) { return undefined; } - return child.kind < 135 /* FirstNode */ ? child : child.getLastToken(sourceFile); + return child.kind < 136 /* FirstNode */ ? child : child.getLastToken(sourceFile); }; return NodeObject; }()); @@ -45314,7 +45861,7 @@ var ts; if (ts.indexOf(declarations, declaration) === indexOfDeclaration) { var sourceFileOfDeclaration = ts.getSourceFileOfNode(declaration); // If it is parameter - try and get the jsDoc comment with @param tag from function declaration's jsDoc comments - if (canUseParsedParamTagComments && declaration.kind === 138 /* Parameter */) { + if (canUseParsedParamTagComments && declaration.kind === 139 /* Parameter */) { ts.forEach(getJsDocCommentTextRange(declaration.parent, sourceFileOfDeclaration), function (jsDocCommentTextRange) { var cleanedParamJsDocComment = getCleanedParamJsDocComment(jsDocCommentTextRange.pos, jsDocCommentTextRange.end, sourceFileOfDeclaration); if (cleanedParamJsDocComment) { @@ -45323,15 +45870,15 @@ var ts; }); } // If this is left side of dotted module declaration, there is no doc comments associated with this node - if (declaration.kind === 220 /* ModuleDeclaration */ && declaration.body.kind === 220 /* ModuleDeclaration */) { + if (declaration.kind === 221 /* ModuleDeclaration */ && declaration.body.kind === 221 /* ModuleDeclaration */) { return; } // If this is dotted module name, get the doc comments from the parent - while (declaration.kind === 220 /* ModuleDeclaration */ && declaration.parent.kind === 220 /* ModuleDeclaration */) { + while (declaration.kind === 221 /* ModuleDeclaration */ && declaration.parent.kind === 221 /* ModuleDeclaration */) { declaration = declaration.parent; } // Get the cleaned js doc comment text from the declaration - ts.forEach(getJsDocCommentTextRange(declaration.kind === 213 /* VariableDeclaration */ ? declaration.parent.parent : declaration, sourceFileOfDeclaration), function (jsDocCommentTextRange) { + ts.forEach(getJsDocCommentTextRange(declaration.kind === 214 /* VariableDeclaration */ ? declaration.parent.parent : declaration, sourceFileOfDeclaration), function (jsDocCommentTextRange) { var cleanedJsDocComment = getCleanedJsDocComment(jsDocCommentTextRange.pos, jsDocCommentTextRange.end, sourceFileOfDeclaration); if (cleanedJsDocComment) { ts.addRange(jsDocCommentParts, cleanedJsDocComment); @@ -45676,9 +46223,9 @@ var ts; if (result_2 !== undefined) { return result_2; } - if (declaration.name.kind === 136 /* ComputedPropertyName */) { + if (declaration.name.kind === 137 /* ComputedPropertyName */) { var expr = declaration.name.expression; - if (expr.kind === 168 /* PropertyAccessExpression */) { + if (expr.kind === 169 /* PropertyAccessExpression */) { return expr.name.text; } return getTextOfIdentifierOrLiteral(expr); @@ -45698,9 +46245,9 @@ var ts; } function visit(node) { switch (node.kind) { - case 215 /* FunctionDeclaration */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 216 /* FunctionDeclaration */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: var functionDeclaration = node; var declarationName = getDeclarationName(functionDeclaration); if (declarationName) { @@ -45720,60 +46267,60 @@ var ts; ts.forEachChild(node, visit); } break; - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: - case 218 /* TypeAliasDeclaration */: - case 219 /* EnumDeclaration */: - case 220 /* ModuleDeclaration */: - case 223 /* ImportEqualsDeclaration */: - case 232 /* ExportSpecifier */: - case 228 /* ImportSpecifier */: - case 223 /* ImportEqualsDeclaration */: - case 225 /* ImportClause */: - case 226 /* NamespaceImport */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 155 /* TypeLiteral */: + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: + case 219 /* TypeAliasDeclaration */: + case 220 /* EnumDeclaration */: + case 221 /* ModuleDeclaration */: + case 224 /* ImportEqualsDeclaration */: + case 233 /* ExportSpecifier */: + case 229 /* ImportSpecifier */: + case 224 /* ImportEqualsDeclaration */: + case 226 /* ImportClause */: + case 227 /* NamespaceImport */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 156 /* TypeLiteral */: addDeclaration(node); // fall through - case 144 /* Constructor */: - case 195 /* VariableStatement */: - case 214 /* VariableDeclarationList */: - case 163 /* ObjectBindingPattern */: - case 164 /* ArrayBindingPattern */: - case 221 /* ModuleBlock */: + case 145 /* Constructor */: + case 196 /* VariableStatement */: + case 215 /* VariableDeclarationList */: + case 164 /* ObjectBindingPattern */: + case 165 /* ArrayBindingPattern */: + case 222 /* ModuleBlock */: ts.forEachChild(node, visit); break; - case 194 /* Block */: + case 195 /* Block */: if (ts.isFunctionBlock(node)) { ts.forEachChild(node, visit); } break; - case 138 /* Parameter */: + case 139 /* Parameter */: // Only consider properties defined as constructor parameters if (!(node.flags & 56 /* AccessibilityModifier */)) { break; } // fall through - case 213 /* VariableDeclaration */: - case 165 /* BindingElement */: + case 214 /* VariableDeclaration */: + case 166 /* BindingElement */: if (ts.isBindingPattern(node.name)) { ts.forEachChild(node.name, visit); break; } - case 249 /* EnumMember */: - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: + case 250 /* EnumMember */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: addDeclaration(node); break; - case 230 /* ExportDeclaration */: + case 231 /* ExportDeclaration */: // Handle named exports case e.g.: // export {a, b as B} from "mod"; if (node.exportClause) { ts.forEach(node.exportClause.elements, visit); } break; - case 224 /* ImportDeclaration */: + case 225 /* ImportDeclaration */: var importClause = node.importClause; if (importClause) { // Handle default import case e.g.: @@ -45785,7 +46332,7 @@ var ts; // import * as NS from "mod"; // import {a, b as B} from "mod"; if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 226 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 227 /* NamespaceImport */) { addDeclaration(importClause.namedBindings); } else { @@ -45961,6 +46508,9 @@ var ts; ClassificationTypeNames.jsxOpenTagName = "jsx open tag name"; ClassificationTypeNames.jsxCloseTagName = "jsx close tag name"; ClassificationTypeNames.jsxSelfClosingTagName = "jsx self closing tag name"; + ClassificationTypeNames.jsxAttribute = "jsx attribute"; + ClassificationTypeNames.jsxText = "jsx text"; + ClassificationTypeNames.jsxAttributeStringLiteralValue = "jsx attribute string literal value"; return ClassificationTypeNames; }()); ts.ClassificationTypeNames = ClassificationTypeNames; @@ -45986,6 +46536,9 @@ var ts; ClassificationType[ClassificationType["jsxOpenTagName"] = 19] = "jsxOpenTagName"; ClassificationType[ClassificationType["jsxCloseTagName"] = 20] = "jsxCloseTagName"; ClassificationType[ClassificationType["jsxSelfClosingTagName"] = 21] = "jsxSelfClosingTagName"; + ClassificationType[ClassificationType["jsxAttribute"] = 22] = "jsxAttribute"; + ClassificationType[ClassificationType["jsxText"] = 23] = "jsxText"; + ClassificationType[ClassificationType["jsxAttributeStringLiteralValue"] = 24] = "jsxAttributeStringLiteralValue"; })(ts.ClassificationType || (ts.ClassificationType = {})); var ClassificationType = ts.ClassificationType; function displayPartsToString(displayParts) { @@ -46001,16 +46554,16 @@ var ts; } return ts.forEach(symbol.declarations, function (declaration) { // Function expressions are local - if (declaration.kind === 175 /* FunctionExpression */) { + if (declaration.kind === 176 /* FunctionExpression */) { return true; } - if (declaration.kind !== 213 /* VariableDeclaration */ && declaration.kind !== 215 /* FunctionDeclaration */) { + if (declaration.kind !== 214 /* VariableDeclaration */ && declaration.kind !== 216 /* FunctionDeclaration */) { return false; } // If the parent is not sourceFile or module block it is local variable - for (var parent_8 = declaration.parent; !ts.isFunctionBlock(parent_8); parent_8 = parent_8.parent) { + for (var parent_9 = declaration.parent; !ts.isFunctionBlock(parent_9); parent_9 = parent_9.parent) { // Reached source file or module block - if (parent_8.kind === 250 /* SourceFile */ || parent_8.kind === 221 /* ModuleBlock */) { + if (parent_9.kind === 251 /* SourceFile */ || parent_9.kind === 222 /* ModuleBlock */) { return false; } } @@ -46266,18 +46819,12 @@ var ts; return createLanguageServiceSourceFile(sourceFile.fileName, scriptSnapshot, sourceFile.languageVersion, version, /*setNodeParents*/ true); } ts.updateLanguageServiceSourceFile = updateLanguageServiceSourceFile; - function createGetCanonicalFileName(useCaseSensitivefileNames) { - return useCaseSensitivefileNames - ? (function (fileName) { return fileName; }) - : (function (fileName) { return fileName.toLowerCase(); }); - } - ts.createGetCanonicalFileName = createGetCanonicalFileName; function createDocumentRegistry(useCaseSensitiveFileNames, currentDirectory) { if (currentDirectory === void 0) { currentDirectory = ""; } // Maps from compiler setting target (ES3, ES5, etc.) to all the cached documents we have // for those settings. var buckets = {}; - var getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames); + var getCanonicalFileName = ts.createGetCanonicalFileName(!!useCaseSensitiveFileNames); function getKeyFromCompilationSettings(settings) { return "_" + settings.target + "|" + settings.module + "|" + settings.noResolve + "|" + settings.jsx + +"|" + settings.allowJs; } @@ -46642,7 +47189,7 @@ var ts; /// Helpers function getTargetLabel(referenceNode, labelName) { while (referenceNode) { - if (referenceNode.kind === 209 /* LabeledStatement */ && referenceNode.label.text === labelName) { + if (referenceNode.kind === 210 /* LabeledStatement */ && referenceNode.label.text === labelName) { return referenceNode.label; } referenceNode = referenceNode.parent; @@ -46651,12 +47198,12 @@ var ts; } function isJumpStatementTarget(node) { return node.kind === 69 /* Identifier */ && - (node.parent.kind === 205 /* BreakStatement */ || node.parent.kind === 204 /* ContinueStatement */) && + (node.parent.kind === 206 /* BreakStatement */ || node.parent.kind === 205 /* ContinueStatement */) && node.parent.label === node; } function isLabelOfLabeledStatement(node) { return node.kind === 69 /* Identifier */ && - node.parent.kind === 209 /* LabeledStatement */ && + node.parent.kind === 210 /* LabeledStatement */ && node.parent.label === node; } /** @@ -46664,7 +47211,7 @@ var ts; * Note: 'node' cannot be a SourceFile. */ function isLabeledBy(node, labelName) { - for (var owner = node.parent; owner.kind === 209 /* LabeledStatement */; owner = owner.parent) { + for (var owner = node.parent; owner.kind === 210 /* LabeledStatement */; owner = owner.parent) { if (owner.label.text === labelName) { return true; } @@ -46675,25 +47222,25 @@ var ts; return isLabelOfLabeledStatement(node) || isJumpStatementTarget(node); } function isRightSideOfQualifiedName(node) { - return node.parent.kind === 135 /* QualifiedName */ && node.parent.right === node; + return node.parent.kind === 136 /* QualifiedName */ && node.parent.right === node; } function isRightSideOfPropertyAccess(node) { - return node && node.parent && node.parent.kind === 168 /* PropertyAccessExpression */ && node.parent.name === node; + return node && node.parent && node.parent.kind === 169 /* PropertyAccessExpression */ && node.parent.name === node; } function isCallExpressionTarget(node) { if (isRightSideOfPropertyAccess(node)) { node = node.parent; } - return node && node.parent && node.parent.kind === 170 /* CallExpression */ && node.parent.expression === node; + return node && node.parent && node.parent.kind === 171 /* CallExpression */ && node.parent.expression === node; } function isNewExpressionTarget(node) { if (isRightSideOfPropertyAccess(node)) { node = node.parent; } - return node && node.parent && node.parent.kind === 171 /* NewExpression */ && node.parent.expression === node; + return node && node.parent && node.parent.kind === 172 /* NewExpression */ && node.parent.expression === node; } function isNameOfModuleDeclaration(node) { - return node.parent.kind === 220 /* ModuleDeclaration */ && node.parent.name === node; + return node.parent.kind === 221 /* ModuleDeclaration */ && node.parent.name === node; } function isNameOfFunctionDeclaration(node) { return node.kind === 69 /* Identifier */ && @@ -46702,22 +47249,22 @@ var ts; /** Returns true if node is a name of an object literal property, e.g. "a" in x = { "a": 1 } */ function isNameOfPropertyAssignment(node) { return (node.kind === 69 /* Identifier */ || node.kind === 9 /* StringLiteral */ || node.kind === 8 /* NumericLiteral */) && - (node.parent.kind === 247 /* PropertyAssignment */ || node.parent.kind === 248 /* ShorthandPropertyAssignment */) && node.parent.name === node; + (node.parent.kind === 248 /* PropertyAssignment */ || node.parent.kind === 249 /* ShorthandPropertyAssignment */) && node.parent.name === node; } function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { if (node.kind === 9 /* StringLiteral */ || node.kind === 8 /* NumericLiteral */) { switch (node.parent.kind) { - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 247 /* PropertyAssignment */: - case 249 /* EnumMember */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 220 /* ModuleDeclaration */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 248 /* PropertyAssignment */: + case 250 /* EnumMember */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 221 /* ModuleDeclaration */: return node.parent.name === node; - case 169 /* ElementAccessExpression */: + case 170 /* ElementAccessExpression */: return node.parent.argumentExpression === node; } } @@ -46776,7 +47323,7 @@ var ts; })(BreakContinueSearchType || (BreakContinueSearchType = {})); // A cache of completion entries for keywords, these do not change between sessions var keywordCompletions = []; - for (var i = 70 /* FirstKeyword */; i <= 134 /* LastKeyword */; i++) { + for (var i = 70 /* FirstKeyword */; i <= 135 /* LastKeyword */; i++) { keywordCompletions.push({ name: ts.tokenToString(i), kind: ScriptElementKind.keyword, @@ -46791,17 +47338,17 @@ var ts; return undefined; } switch (node.kind) { - case 250 /* SourceFile */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: - case 219 /* EnumDeclaration */: - case 220 /* ModuleDeclaration */: + case 251 /* SourceFile */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: + case 220 /* EnumDeclaration */: + case 221 /* ModuleDeclaration */: return node; } } @@ -46809,38 +47356,38 @@ var ts; ts.getContainerNode = getContainerNode; /* @internal */ function getNodeKind(node) { switch (node.kind) { - case 220 /* ModuleDeclaration */: return ScriptElementKind.moduleElement; - case 216 /* ClassDeclaration */: return ScriptElementKind.classElement; - case 217 /* InterfaceDeclaration */: return ScriptElementKind.interfaceElement; - case 218 /* TypeAliasDeclaration */: return ScriptElementKind.typeElement; - case 219 /* EnumDeclaration */: return ScriptElementKind.enumElement; - case 213 /* VariableDeclaration */: + case 221 /* ModuleDeclaration */: return ScriptElementKind.moduleElement; + case 217 /* ClassDeclaration */: return ScriptElementKind.classElement; + case 218 /* InterfaceDeclaration */: return ScriptElementKind.interfaceElement; + case 219 /* TypeAliasDeclaration */: return ScriptElementKind.typeElement; + case 220 /* EnumDeclaration */: return ScriptElementKind.enumElement; + case 214 /* VariableDeclaration */: return ts.isConst(node) ? ScriptElementKind.constElement : ts.isLet(node) ? ScriptElementKind.letElement : ScriptElementKind.variableElement; - case 215 /* FunctionDeclaration */: return ScriptElementKind.functionElement; - case 145 /* GetAccessor */: return ScriptElementKind.memberGetAccessorElement; - case 146 /* SetAccessor */: return ScriptElementKind.memberSetAccessorElement; - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 216 /* FunctionDeclaration */: return ScriptElementKind.functionElement; + case 146 /* GetAccessor */: return ScriptElementKind.memberGetAccessorElement; + case 147 /* SetAccessor */: return ScriptElementKind.memberSetAccessorElement; + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: return ScriptElementKind.memberFunctionElement; - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: return ScriptElementKind.memberVariableElement; - case 149 /* IndexSignature */: return ScriptElementKind.indexSignatureElement; - case 148 /* ConstructSignature */: return ScriptElementKind.constructSignatureElement; - case 147 /* CallSignature */: return ScriptElementKind.callSignatureElement; - case 144 /* Constructor */: return ScriptElementKind.constructorImplementationElement; - case 137 /* TypeParameter */: return ScriptElementKind.typeParameterElement; - case 249 /* EnumMember */: return ScriptElementKind.variableElement; - case 138 /* Parameter */: return (node.flags & 56 /* AccessibilityModifier */) ? ScriptElementKind.memberVariableElement : ScriptElementKind.parameterElement; - case 223 /* ImportEqualsDeclaration */: - case 228 /* ImportSpecifier */: - case 225 /* ImportClause */: - case 232 /* ExportSpecifier */: - case 226 /* NamespaceImport */: + case 150 /* IndexSignature */: return ScriptElementKind.indexSignatureElement; + case 149 /* ConstructSignature */: return ScriptElementKind.constructSignatureElement; + case 148 /* CallSignature */: return ScriptElementKind.callSignatureElement; + case 145 /* Constructor */: return ScriptElementKind.constructorImplementationElement; + case 138 /* TypeParameter */: return ScriptElementKind.typeParameterElement; + case 250 /* EnumMember */: return ScriptElementKind.variableElement; + case 139 /* Parameter */: return (node.flags & 56 /* AccessibilityModifier */) ? ScriptElementKind.memberVariableElement : ScriptElementKind.parameterElement; + case 224 /* ImportEqualsDeclaration */: + case 229 /* ImportSpecifier */: + case 226 /* ImportClause */: + case 233 /* ExportSpecifier */: + case 227 /* NamespaceImport */: return ScriptElementKind.alias; } return ScriptElementKind.unknown; @@ -46878,7 +47425,7 @@ var ts; host.log(message); } } - var getCanonicalFileName = createGetCanonicalFileName(useCaseSensitivefileNames); + var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitivefileNames); function getValidSourceFile(fileName) { var sourceFile = program.getSourceFile(fileName); if (!sourceFile) { @@ -47152,9 +47699,9 @@ var ts; isJsDocTagName = true; } switch (tag.kind) { - case 271 /* JSDocTypeTag */: - case 269 /* JSDocParameterTag */: - case 270 /* JSDocReturnTag */: + case 272 /* JSDocTypeTag */: + case 270 /* JSDocParameterTag */: + case 271 /* JSDocReturnTag */: var tagWithExpression = tag; if (tagWithExpression.typeExpression) { insideJsDocTagExpression = tagWithExpression.typeExpression.pos < position && position < tagWithExpression.typeExpression.end; @@ -47199,13 +47746,13 @@ var ts; log("Returning an empty list because completion was requested in an invalid position."); return undefined; } - var parent_9 = contextToken.parent, kind = contextToken.kind; + var parent_10 = contextToken.parent, kind = contextToken.kind; if (kind === 21 /* DotToken */) { - if (parent_9.kind === 168 /* PropertyAccessExpression */) { + if (parent_10.kind === 169 /* PropertyAccessExpression */) { node = contextToken.parent.expression; isRightOfDot = true; } - else if (parent_9.kind === 135 /* QualifiedName */) { + else if (parent_10.kind === 136 /* QualifiedName */) { node = contextToken.parent.left; isRightOfDot = true; } @@ -47220,8 +47767,9 @@ var ts; isRightOfOpenTag = true; location = contextToken; } - else if (kind === 39 /* SlashToken */ && contextToken.parent.kind === 239 /* JsxClosingElement */) { + else if (kind === 39 /* SlashToken */ && contextToken.parent.kind === 240 /* JsxClosingElement */) { isStartingCloseTag = true; + location = contextToken; } } } @@ -47245,7 +47793,10 @@ var ts; } else if (isStartingCloseTag) { var tagName = contextToken.parent.parent.openingElement.tagName; - symbols = [typeChecker.getSymbolAtLocation(tagName)]; + var tagSymbol = typeChecker.getSymbolAtLocation(tagName); + if (!typeChecker.isUnknownSymbol(tagSymbol)) { + symbols = [tagSymbol]; + } isMemberCompletion = true; isNewIdentifierLocation = false; } @@ -47263,7 +47814,7 @@ var ts; // Right of dot member completion list isMemberCompletion = true; isNewIdentifierLocation = false; - if (node.kind === 69 /* Identifier */ || node.kind === 135 /* QualifiedName */ || node.kind === 168 /* PropertyAccessExpression */) { + if (node.kind === 69 /* Identifier */ || node.kind === 136 /* QualifiedName */ || node.kind === 169 /* PropertyAccessExpression */) { var symbol = typeChecker.getSymbolAtLocation(node); // This is an alias, follow what it aliases if (symbol && symbol.flags & 8388608 /* Alias */) { @@ -47319,7 +47870,7 @@ var ts; } if (jsxContainer = tryGetContainingJsxElement(contextToken)) { var attrsType; - if ((jsxContainer.kind === 236 /* JsxSelfClosingElement */) || (jsxContainer.kind === 237 /* JsxOpeningElement */)) { + if ((jsxContainer.kind === 237 /* JsxSelfClosingElement */) || (jsxContainer.kind === 238 /* JsxOpeningElement */)) { // Cursor is inside a JSX self-closing element or opening element attrsType = typeChecker.getJsxElementAttributesType(jsxContainer); if (attrsType) { @@ -47391,15 +47942,15 @@ var ts; return result; } function isInJsxText(contextToken) { - if (contextToken.kind === 238 /* JsxText */) { + if (contextToken.kind === 239 /* JsxText */) { return true; } if (contextToken.kind === 27 /* GreaterThanToken */ && contextToken.parent) { - if (contextToken.parent.kind === 237 /* JsxOpeningElement */) { + if (contextToken.parent.kind === 238 /* JsxOpeningElement */) { return true; } - if (contextToken.parent.kind === 239 /* JsxClosingElement */ || contextToken.parent.kind === 236 /* JsxSelfClosingElement */) { - return contextToken.parent.parent && contextToken.parent.parent.kind === 235 /* JsxElement */; + if (contextToken.parent.kind === 240 /* JsxClosingElement */ || contextToken.parent.kind === 237 /* JsxSelfClosingElement */) { + return contextToken.parent.parent && contextToken.parent.parent.kind === 236 /* JsxElement */; } } return false; @@ -47409,40 +47960,40 @@ var ts; var containingNodeKind = previousToken.parent.kind; switch (previousToken.kind) { case 24 /* CommaToken */: - return containingNodeKind === 170 /* CallExpression */ // func( a, | - || containingNodeKind === 144 /* Constructor */ // constructor( a, | /* public, protected, private keywords are allowed here, so show completion */ - || containingNodeKind === 171 /* NewExpression */ // new C(a, | - || containingNodeKind === 166 /* ArrayLiteralExpression */ // [a, | - || containingNodeKind === 183 /* BinaryExpression */ // const x = (a, | - || containingNodeKind === 152 /* FunctionType */; // var x: (s: string, list| + return containingNodeKind === 171 /* CallExpression */ // func( a, | + || containingNodeKind === 145 /* Constructor */ // constructor( a, | /* public, protected, private keywords are allowed here, so show completion */ + || containingNodeKind === 172 /* NewExpression */ // new C(a, | + || containingNodeKind === 167 /* ArrayLiteralExpression */ // [a, | + || containingNodeKind === 184 /* BinaryExpression */ // const x = (a, | + || containingNodeKind === 153 /* FunctionType */; // var x: (s: string, list| case 17 /* OpenParenToken */: - return containingNodeKind === 170 /* CallExpression */ // func( | - || containingNodeKind === 144 /* Constructor */ // constructor( | - || containingNodeKind === 171 /* NewExpression */ // new C(a| - || containingNodeKind === 174 /* ParenthesizedExpression */ // const x = (a| - || containingNodeKind === 160 /* ParenthesizedType */; // function F(pred: (a| /* this can become an arrow function, where 'a' is the argument */ + return containingNodeKind === 171 /* CallExpression */ // func( | + || containingNodeKind === 145 /* Constructor */ // constructor( | + || containingNodeKind === 172 /* NewExpression */ // new C(a| + || containingNodeKind === 175 /* ParenthesizedExpression */ // const x = (a| + || containingNodeKind === 161 /* ParenthesizedType */; // function F(pred: (a| /* this can become an arrow function, where 'a' is the argument */ case 19 /* OpenBracketToken */: - return containingNodeKind === 166 /* ArrayLiteralExpression */ // [ | - || containingNodeKind === 149 /* IndexSignature */ // [ | : string ] - || containingNodeKind === 136 /* ComputedPropertyName */; // [ | /* this can become an index signature */ + return containingNodeKind === 167 /* ArrayLiteralExpression */ // [ | + || containingNodeKind === 150 /* IndexSignature */ // [ | : string ] + || containingNodeKind === 137 /* ComputedPropertyName */; // [ | /* this can become an index signature */ case 125 /* ModuleKeyword */: // module | case 126 /* NamespaceKeyword */: return true; case 21 /* DotToken */: - return containingNodeKind === 220 /* ModuleDeclaration */; // module A.| + return containingNodeKind === 221 /* ModuleDeclaration */; // module A.| case 15 /* OpenBraceToken */: - return containingNodeKind === 216 /* ClassDeclaration */; // class A{ | + return containingNodeKind === 217 /* ClassDeclaration */; // class A{ | case 56 /* EqualsToken */: - return containingNodeKind === 213 /* VariableDeclaration */ // const x = a| - || containingNodeKind === 183 /* BinaryExpression */; // x = a| + return containingNodeKind === 214 /* VariableDeclaration */ // const x = a| + || containingNodeKind === 184 /* BinaryExpression */; // x = a| case 12 /* TemplateHead */: - return containingNodeKind === 185 /* TemplateExpression */; // `aa ${| + return containingNodeKind === 186 /* TemplateExpression */; // `aa ${| case 13 /* TemplateMiddle */: - return containingNodeKind === 192 /* TemplateSpan */; // `aa ${10} dd ${| + return containingNodeKind === 193 /* TemplateSpan */; // `aa ${10} dd ${| case 112 /* PublicKeyword */: case 110 /* PrivateKeyword */: case 111 /* ProtectedKeyword */: - return containingNodeKind === 141 /* PropertyDeclaration */; // class A{ public | + return containingNodeKind === 142 /* PropertyDeclaration */; // class A{ public | } // Previous token may have been a keyword that was converted to an identifier. switch (previousToken.getText()) { @@ -47456,7 +48007,7 @@ var ts; } function isInStringOrRegularExpressionOrTemplateLiteral(contextToken) { if (contextToken.kind === 9 /* StringLiteral */ - || contextToken.kind === 162 /* StringLiteralType */ + || contextToken.kind === 163 /* StringLiteralType */ || contextToken.kind === 10 /* RegularExpressionLiteral */ || ts.isTemplateLiteralKind(contextToken.kind)) { var start_7 = contextToken.getStart(); @@ -47486,14 +48037,14 @@ var ts; isMemberCompletion = true; var typeForObject; var existingMembers; - if (objectLikeContainer.kind === 167 /* ObjectLiteralExpression */) { + if (objectLikeContainer.kind === 168 /* ObjectLiteralExpression */) { // We are completing on contextual types, but may also include properties // other than those within the declared type. isNewIdentifierLocation = true; typeForObject = typeChecker.getContextualType(objectLikeContainer); existingMembers = objectLikeContainer.properties; } - else if (objectLikeContainer.kind === 163 /* ObjectBindingPattern */) { + else if (objectLikeContainer.kind === 164 /* ObjectBindingPattern */) { // We are *only* completing on properties from the type being destructured. isNewIdentifierLocation = false; var rootDeclaration = ts.getRootDeclaration(objectLikeContainer.parent); @@ -47539,9 +48090,9 @@ var ts; * @returns true if 'symbols' was successfully populated; false otherwise. */ function tryGetImportOrExportClauseCompletionSymbols(namedImportsOrExports) { - var declarationKind = namedImportsOrExports.kind === 227 /* NamedImports */ ? - 224 /* ImportDeclaration */ : - 230 /* ExportDeclaration */; + var declarationKind = namedImportsOrExports.kind === 228 /* NamedImports */ ? + 225 /* ImportDeclaration */ : + 231 /* ExportDeclaration */; var importOrExportDeclaration = ts.getAncestor(namedImportsOrExports, declarationKind); var moduleSpecifier = importOrExportDeclaration.moduleSpecifier; if (!moduleSpecifier) { @@ -47566,9 +48117,9 @@ var ts; switch (contextToken.kind) { case 15 /* OpenBraceToken */: // const x = { | case 24 /* CommaToken */: - var parent_10 = contextToken.parent; - if (parent_10 && (parent_10.kind === 167 /* ObjectLiteralExpression */ || parent_10.kind === 163 /* ObjectBindingPattern */)) { - return parent_10; + var parent_11 = contextToken.parent; + if (parent_11 && (parent_11.kind === 168 /* ObjectLiteralExpression */ || parent_11.kind === 164 /* ObjectBindingPattern */)) { + return parent_11; } break; } @@ -47585,8 +48136,8 @@ var ts; case 15 /* OpenBraceToken */: // import { | case 24 /* CommaToken */: switch (contextToken.parent.kind) { - case 227 /* NamedImports */: - case 231 /* NamedExports */: + case 228 /* NamedImports */: + case 232 /* NamedExports */: return contextToken.parent; } } @@ -47595,37 +48146,37 @@ var ts; } function tryGetContainingJsxElement(contextToken) { if (contextToken) { - var parent_11 = contextToken.parent; + var parent_12 = contextToken.parent; switch (contextToken.kind) { case 26 /* LessThanSlashToken */: case 39 /* SlashToken */: case 69 /* Identifier */: - case 240 /* JsxAttribute */: - case 241 /* JsxSpreadAttribute */: - if (parent_11 && (parent_11.kind === 236 /* JsxSelfClosingElement */ || parent_11.kind === 237 /* JsxOpeningElement */)) { - return parent_11; + case 241 /* JsxAttribute */: + case 242 /* JsxSpreadAttribute */: + if (parent_12 && (parent_12.kind === 237 /* JsxSelfClosingElement */ || parent_12.kind === 238 /* JsxOpeningElement */)) { + return parent_12; } - else if (parent_11.kind === 240 /* JsxAttribute */) { - return parent_11.parent; + else if (parent_12.kind === 241 /* JsxAttribute */) { + return parent_12.parent; } break; // The context token is the closing } or " of an attribute, which means // its parent is a JsxExpression, whose parent is a JsxAttribute, // whose parent is a JsxOpeningLikeElement case 9 /* StringLiteral */: - if (parent_11 && ((parent_11.kind === 240 /* JsxAttribute */) || (parent_11.kind === 241 /* JsxSpreadAttribute */))) { - return parent_11.parent; + if (parent_12 && ((parent_12.kind === 241 /* JsxAttribute */) || (parent_12.kind === 242 /* JsxSpreadAttribute */))) { + return parent_12.parent; } break; case 16 /* CloseBraceToken */: - if (parent_11 && - parent_11.kind === 242 /* JsxExpression */ && - parent_11.parent && - (parent_11.parent.kind === 240 /* JsxAttribute */)) { - return parent_11.parent.parent; + if (parent_12 && + parent_12.kind === 243 /* JsxExpression */ && + parent_12.parent && + (parent_12.parent.kind === 241 /* JsxAttribute */)) { + return parent_12.parent.parent; } - if (parent_11 && parent_11.kind === 241 /* JsxSpreadAttribute */) { - return parent_11.parent; + if (parent_12 && parent_12.kind === 242 /* JsxSpreadAttribute */) { + return parent_12.parent; } break; } @@ -47634,16 +48185,16 @@ var ts; } function isFunction(kind) { switch (kind) { - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: - case 215 /* FunctionDeclaration */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 147 /* CallSignature */: - case 148 /* ConstructSignature */: - case 149 /* IndexSignature */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: + case 216 /* FunctionDeclaration */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 148 /* CallSignature */: + case 149 /* ConstructSignature */: + case 150 /* IndexSignature */: return true; } return false; @@ -47655,54 +48206,54 @@ var ts; var containingNodeKind = contextToken.parent.kind; switch (contextToken.kind) { case 24 /* CommaToken */: - return containingNodeKind === 213 /* VariableDeclaration */ || - containingNodeKind === 214 /* VariableDeclarationList */ || - containingNodeKind === 195 /* VariableStatement */ || - containingNodeKind === 219 /* EnumDeclaration */ || + return containingNodeKind === 214 /* VariableDeclaration */ || + containingNodeKind === 215 /* VariableDeclarationList */ || + containingNodeKind === 196 /* VariableStatement */ || + containingNodeKind === 220 /* EnumDeclaration */ || isFunction(containingNodeKind) || - containingNodeKind === 216 /* ClassDeclaration */ || - containingNodeKind === 188 /* ClassExpression */ || - containingNodeKind === 217 /* InterfaceDeclaration */ || - containingNodeKind === 164 /* ArrayBindingPattern */ || - containingNodeKind === 218 /* TypeAliasDeclaration */; // type Map, K, | + containingNodeKind === 217 /* ClassDeclaration */ || + containingNodeKind === 189 /* ClassExpression */ || + containingNodeKind === 218 /* InterfaceDeclaration */ || + containingNodeKind === 165 /* ArrayBindingPattern */ || + containingNodeKind === 219 /* TypeAliasDeclaration */; // type Map, K, | case 21 /* DotToken */: - return containingNodeKind === 164 /* ArrayBindingPattern */; // var [.| + return containingNodeKind === 165 /* ArrayBindingPattern */; // var [.| case 54 /* ColonToken */: - return containingNodeKind === 165 /* BindingElement */; // var {x :html| + return containingNodeKind === 166 /* BindingElement */; // var {x :html| case 19 /* OpenBracketToken */: - return containingNodeKind === 164 /* ArrayBindingPattern */; // var [x| + return containingNodeKind === 165 /* ArrayBindingPattern */; // var [x| case 17 /* OpenParenToken */: - return containingNodeKind === 246 /* CatchClause */ || + return containingNodeKind === 247 /* CatchClause */ || isFunction(containingNodeKind); case 15 /* OpenBraceToken */: - return containingNodeKind === 219 /* EnumDeclaration */ || - containingNodeKind === 217 /* InterfaceDeclaration */ || - containingNodeKind === 155 /* TypeLiteral */; // const x : { | + return containingNodeKind === 220 /* EnumDeclaration */ || + containingNodeKind === 218 /* InterfaceDeclaration */ || + containingNodeKind === 156 /* TypeLiteral */; // const x : { | case 23 /* SemicolonToken */: - return containingNodeKind === 140 /* PropertySignature */ && + return containingNodeKind === 141 /* PropertySignature */ && contextToken.parent && contextToken.parent.parent && - (contextToken.parent.parent.kind === 217 /* InterfaceDeclaration */ || - contextToken.parent.parent.kind === 155 /* TypeLiteral */); // const x : { a; | + (contextToken.parent.parent.kind === 218 /* InterfaceDeclaration */ || + contextToken.parent.parent.kind === 156 /* TypeLiteral */); // const x : { a; | case 25 /* LessThanToken */: - return containingNodeKind === 216 /* ClassDeclaration */ || - containingNodeKind === 188 /* ClassExpression */ || - containingNodeKind === 217 /* InterfaceDeclaration */ || - containingNodeKind === 218 /* TypeAliasDeclaration */ || + return containingNodeKind === 217 /* ClassDeclaration */ || + containingNodeKind === 189 /* ClassExpression */ || + containingNodeKind === 218 /* InterfaceDeclaration */ || + containingNodeKind === 219 /* TypeAliasDeclaration */ || isFunction(containingNodeKind); case 113 /* StaticKeyword */: - return containingNodeKind === 141 /* PropertyDeclaration */; + return containingNodeKind === 142 /* PropertyDeclaration */; case 22 /* DotDotDotToken */: - return containingNodeKind === 138 /* Parameter */ || + return containingNodeKind === 139 /* Parameter */ || (contextToken.parent && contextToken.parent.parent && - contextToken.parent.parent.kind === 164 /* ArrayBindingPattern */); // var [...z| + contextToken.parent.parent.kind === 165 /* ArrayBindingPattern */); // var [...z| case 112 /* PublicKeyword */: case 110 /* PrivateKeyword */: case 111 /* ProtectedKeyword */: - return containingNodeKind === 138 /* Parameter */; + return containingNodeKind === 139 /* Parameter */; case 116 /* AsKeyword */: - return containingNodeKind === 228 /* ImportSpecifier */ || - containingNodeKind === 232 /* ExportSpecifier */ || - containingNodeKind === 226 /* NamespaceImport */; + return containingNodeKind === 229 /* ImportSpecifier */ || + containingNodeKind === 233 /* ExportSpecifier */ || + containingNodeKind === 227 /* NamespaceImport */; case 73 /* ClassKeyword */: case 81 /* EnumKeyword */: case 107 /* InterfaceKeyword */: @@ -47762,8 +48313,8 @@ var ts; if (element.getStart() <= position && position <= element.getEnd()) { continue; } - var name_31 = element.propertyName || element.name; - exisingImportsOrExports[name_31.text] = true; + var name_34 = element.propertyName || element.name; + exisingImportsOrExports[name_34.text] = true; } if (ts.isEmpty(exisingImportsOrExports)) { return exportsOfModule; @@ -47784,10 +48335,10 @@ var ts; for (var _i = 0, existingMembers_1 = existingMembers; _i < existingMembers_1.length; _i++) { var m = existingMembers_1[_i]; // Ignore omitted expressions for missing members - if (m.kind !== 247 /* PropertyAssignment */ && - m.kind !== 248 /* ShorthandPropertyAssignment */ && - m.kind !== 165 /* BindingElement */ && - m.kind !== 143 /* MethodDeclaration */) { + if (m.kind !== 248 /* PropertyAssignment */ && + m.kind !== 249 /* ShorthandPropertyAssignment */ && + m.kind !== 166 /* BindingElement */ && + m.kind !== 144 /* MethodDeclaration */) { continue; } // If this is the current item we are editing right now, do not filter it out @@ -47795,7 +48346,7 @@ var ts; continue; } var existingName = void 0; - if (m.kind === 165 /* BindingElement */ && m.propertyName) { + if (m.kind === 166 /* BindingElement */ && m.propertyName) { // include only identifiers in completion list if (m.propertyName.kind === 69 /* Identifier */) { existingName = m.propertyName.text; @@ -47825,7 +48376,7 @@ var ts; if (attr.getStart() <= position && position <= attr.getEnd()) { continue; } - if (attr.kind === 240 /* JsxAttribute */) { + if (attr.kind === 241 /* JsxAttribute */) { seenNames[attr.name.text] = true; } } @@ -47851,7 +48402,23 @@ var ts; } else { if (!symbols || symbols.length === 0) { - return undefined; + if (sourceFile.languageVariant === 1 /* JSX */ && + location.parent && location.parent.kind === 240 /* JsxClosingElement */) { + // In the TypeScript JSX element, if such element is not defined. When users query for completion at closing tag, + // instead of simply giving unknown value, the completion will return the tag-name of an associated opening-element. + // For example: + // var x =
completion list at "1" will contain "div" with type any + var tagName = location.parent.parent.openingElement.tagName; + entries.push({ + name: tagName.text, + kind: undefined, + kindModifiers: undefined, + sortText: "0" + }); + } + else { + return undefined; + } } getCompletionEntriesFromSymbols(symbols, entries); } @@ -47864,10 +48431,10 @@ var ts; var entries = []; var target = program.getCompilerOptions().target; var nameTable = getNameTable(sourceFile); - for (var name_32 in nameTable) { - if (!uniqueNames[name_32]) { - uniqueNames[name_32] = name_32; - var displayName = getCompletionEntryDisplayName(name_32, target, /*performCharacterChecks*/ true); + for (var name_35 in nameTable) { + if (!uniqueNames[name_35]) { + uniqueNames[name_35] = name_35; + var displayName = getCompletionEntryDisplayName(name_35, target, /*performCharacterChecks*/ true); if (displayName) { var entry = { name: displayName, @@ -47973,7 +48540,7 @@ var ts; function getSymbolKind(symbol, location) { var flags = symbol.getFlags(); if (flags & 32 /* Class */) - return ts.getDeclarationOfKind(symbol, 188 /* ClassExpression */) ? + return ts.getDeclarationOfKind(symbol, 189 /* ClassExpression */) ? ScriptElementKind.localClassElement : ScriptElementKind.classElement; if (flags & 384 /* Enum */) return ScriptElementKind.enumElement; @@ -48075,7 +48642,7 @@ var ts; var signature; type = typeChecker.getTypeOfSymbolAtLocation(symbol, location); if (type) { - if (location.parent && location.parent.kind === 168 /* PropertyAccessExpression */) { + if (location.parent && location.parent.kind === 169 /* PropertyAccessExpression */) { var right = location.parent.name; // Either the location is on the right of a property access, or on the left and the right is missing if (right === location || (right && right.getFullWidth() === 0)) { @@ -48084,7 +48651,7 @@ var ts; } // try get the call/construct signature from the type if it matches var callExpression; - if (location.kind === 170 /* CallExpression */ || location.kind === 171 /* NewExpression */) { + if (location.kind === 171 /* CallExpression */ || location.kind === 172 /* NewExpression */) { callExpression = location; } else if (isCallExpressionTarget(location) || isNewExpressionTarget(location)) { @@ -48097,7 +48664,7 @@ var ts; // Use the first candidate: signature = candidateSignatures[0]; } - var useConstructSignatures = callExpression.kind === 171 /* NewExpression */ || callExpression.expression.kind === 95 /* SuperKeyword */; + var useConstructSignatures = callExpression.kind === 172 /* NewExpression */ || callExpression.expression.kind === 95 /* SuperKeyword */; var allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures(); if (!ts.contains(allSignatures, signature.target) && !ts.contains(allSignatures, signature)) { // Get the first signature if there is one -- allSignatures may contain @@ -48150,24 +48717,24 @@ var ts; } } else if ((isNameOfFunctionDeclaration(location) && !(symbol.flags & 98304 /* Accessor */)) || - (location.kind === 121 /* ConstructorKeyword */ && location.parent.kind === 144 /* Constructor */)) { + (location.kind === 121 /* ConstructorKeyword */ && location.parent.kind === 145 /* Constructor */)) { // get the signature from the declaration and write it var functionDeclaration = location.parent; - var allSignatures = functionDeclaration.kind === 144 /* Constructor */ ? type.getConstructSignatures() : type.getCallSignatures(); + var allSignatures = functionDeclaration.kind === 145 /* Constructor */ ? type.getConstructSignatures() : type.getCallSignatures(); if (!typeChecker.isImplementationOfOverload(functionDeclaration)) { signature = typeChecker.getSignatureFromDeclaration(functionDeclaration); } else { signature = allSignatures[0]; } - if (functionDeclaration.kind === 144 /* Constructor */) { + if (functionDeclaration.kind === 145 /* Constructor */) { // show (constructor) Type(...) signature symbolKind = ScriptElementKind.constructorImplementationElement; addPrefixForAnyFunctionOrVar(type.symbol, symbolKind); } else { // (function/method) symbol(..signature) - addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 147 /* CallSignature */ && + addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 148 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); } addSignatureDisplayParts(signature, allSignatures); @@ -48176,7 +48743,7 @@ var ts; } } if (symbolFlags & 32 /* Class */ && !hasAddedSymbolInfo) { - if (ts.getDeclarationOfKind(symbol, 188 /* ClassExpression */)) { + if (ts.getDeclarationOfKind(symbol, 189 /* ClassExpression */)) { // Special case for class expressions because we would like to indicate that // the class name is local to the class body (similar to function expression) // (local class) class @@ -48220,7 +48787,7 @@ var ts; } if (symbolFlags & 1536 /* Module */) { addNewLineIfDisplayPartsExist(); - var declaration = ts.getDeclarationOfKind(symbol, 220 /* ModuleDeclaration */); + var declaration = ts.getDeclarationOfKind(symbol, 221 /* ModuleDeclaration */); var isNamespace = declaration && declaration.name && declaration.name.kind === 69 /* Identifier */; displayParts.push(ts.keywordPart(isNamespace ? 126 /* NamespaceKeyword */ : 125 /* ModuleKeyword */)); displayParts.push(ts.spacePart()); @@ -48243,17 +48810,17 @@ var ts; } else { // Method/function type parameter - var declaration = ts.getDeclarationOfKind(symbol, 137 /* TypeParameter */); + var declaration = ts.getDeclarationOfKind(symbol, 138 /* TypeParameter */); ts.Debug.assert(declaration !== undefined); declaration = declaration.parent; if (declaration) { if (ts.isFunctionLikeKind(declaration.kind)) { var signature = typeChecker.getSignatureFromDeclaration(declaration); - if (declaration.kind === 148 /* ConstructSignature */) { + if (declaration.kind === 149 /* ConstructSignature */) { displayParts.push(ts.keywordPart(92 /* NewKeyword */)); displayParts.push(ts.spacePart()); } - else if (declaration.kind !== 147 /* CallSignature */ && declaration.name) { + else if (declaration.kind !== 148 /* CallSignature */ && declaration.name) { addFullSymbolName(declaration.symbol); } ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, sourceFile, 32 /* WriteTypeArgumentsOfSignature */)); @@ -48273,7 +48840,7 @@ var ts; if (symbolFlags & 8 /* EnumMember */) { addPrefixForAnyFunctionOrVar(symbol, "enum member"); var declaration = symbol.declarations[0]; - if (declaration.kind === 249 /* EnumMember */) { + if (declaration.kind === 250 /* EnumMember */) { var constantValue = typeChecker.getConstantValue(declaration); if (constantValue !== undefined) { displayParts.push(ts.spacePart()); @@ -48289,7 +48856,7 @@ var ts; displayParts.push(ts.spacePart()); addFullSymbolName(symbol); ts.forEach(symbol.declarations, function (declaration) { - if (declaration.kind === 223 /* ImportEqualsDeclaration */) { + if (declaration.kind === 224 /* ImportEqualsDeclaration */) { var importEqualsDeclaration = declaration; if (ts.isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) { displayParts.push(ts.spacePart()); @@ -48418,14 +48985,14 @@ var ts; } var typeChecker = program.getTypeChecker(); var symbol = typeChecker.getSymbolAtLocation(node); - if (!symbol) { + if (!symbol || typeChecker.isUnknownSymbol(symbol)) { // Try getting just type at this position and show switch (node.kind) { case 69 /* Identifier */: - case 168 /* PropertyAccessExpression */: - case 135 /* QualifiedName */: + case 169 /* PropertyAccessExpression */: + case 136 /* QualifiedName */: case 97 /* ThisKeyword */: - case 161 /* ThisType */: + case 162 /* ThisType */: case 95 /* SuperKeyword */: // For the identifiers/this/super etc get the type at position var type = typeChecker.getTypeAtLocation(node); @@ -48504,8 +49071,8 @@ var ts; var declarations = []; var definition; ts.forEach(signatureDeclarations, function (d) { - if ((selectConstructors && d.kind === 144 /* Constructor */) || - (!selectConstructors && (d.kind === 215 /* FunctionDeclaration */ || d.kind === 143 /* MethodDeclaration */ || d.kind === 142 /* MethodSignature */))) { + if ((selectConstructors && d.kind === 145 /* Constructor */) || + (!selectConstructors && (d.kind === 216 /* FunctionDeclaration */ || d.kind === 144 /* MethodDeclaration */ || d.kind === 143 /* MethodSignature */))) { declarations.push(d); if (d.body) definition = d; @@ -48574,7 +49141,7 @@ var ts; // go to the declaration of the property name (in this case stay at the same position). However, if go-to-definition // is performed at the location of property access, we would like to go to definition of the property in the short-hand // assignment. This case and others are handled by the following code. - if (node.parent.kind === 248 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 249 /* ShorthandPropertyAssignment */) { var shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); if (!shorthandSymbol) { return []; @@ -48650,7 +49217,7 @@ var ts; function getSemanticDocumentHighlights(node) { if (node.kind === 69 /* Identifier */ || node.kind === 97 /* ThisKeyword */ || - node.kind === 161 /* ThisType */ || + node.kind === 162 /* ThisType */ || node.kind === 95 /* SuperKeyword */ || isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || isNameOfExternalModuleImportOrDeclaration(node)) { @@ -48704,75 +49271,75 @@ var ts; switch (node.kind) { case 88 /* IfKeyword */: case 80 /* ElseKeyword */: - if (hasKind(node.parent, 198 /* IfStatement */)) { + if (hasKind(node.parent, 199 /* IfStatement */)) { return getIfElseOccurrences(node.parent); } break; case 94 /* ReturnKeyword */: - if (hasKind(node.parent, 206 /* ReturnStatement */)) { + if (hasKind(node.parent, 207 /* ReturnStatement */)) { return getReturnOccurrences(node.parent); } break; case 98 /* ThrowKeyword */: - if (hasKind(node.parent, 210 /* ThrowStatement */)) { + if (hasKind(node.parent, 211 /* ThrowStatement */)) { return getThrowOccurrences(node.parent); } break; case 72 /* CatchKeyword */: - if (hasKind(parent(parent(node)), 211 /* TryStatement */)) { + if (hasKind(parent(parent(node)), 212 /* TryStatement */)) { return getTryCatchFinallyOccurrences(node.parent.parent); } break; case 100 /* TryKeyword */: case 85 /* FinallyKeyword */: - if (hasKind(parent(node), 211 /* TryStatement */)) { + if (hasKind(parent(node), 212 /* TryStatement */)) { return getTryCatchFinallyOccurrences(node.parent); } break; case 96 /* SwitchKeyword */: - if (hasKind(node.parent, 208 /* SwitchStatement */)) { + if (hasKind(node.parent, 209 /* SwitchStatement */)) { return getSwitchCaseDefaultOccurrences(node.parent); } break; case 71 /* CaseKeyword */: case 77 /* DefaultKeyword */: - if (hasKind(parent(parent(parent(node))), 208 /* SwitchStatement */)) { + if (hasKind(parent(parent(parent(node))), 209 /* SwitchStatement */)) { return getSwitchCaseDefaultOccurrences(node.parent.parent.parent); } break; case 70 /* BreakKeyword */: case 75 /* ContinueKeyword */: - if (hasKind(node.parent, 205 /* BreakStatement */) || hasKind(node.parent, 204 /* ContinueStatement */)) { + if (hasKind(node.parent, 206 /* BreakStatement */) || hasKind(node.parent, 205 /* ContinueStatement */)) { return getBreakOrContinueStatementOccurrences(node.parent); } break; case 86 /* ForKeyword */: - if (hasKind(node.parent, 201 /* ForStatement */) || - hasKind(node.parent, 202 /* ForInStatement */) || - hasKind(node.parent, 203 /* ForOfStatement */)) { + if (hasKind(node.parent, 202 /* ForStatement */) || + hasKind(node.parent, 203 /* ForInStatement */) || + hasKind(node.parent, 204 /* ForOfStatement */)) { return getLoopBreakContinueOccurrences(node.parent); } break; case 104 /* WhileKeyword */: case 79 /* DoKeyword */: - if (hasKind(node.parent, 200 /* WhileStatement */) || hasKind(node.parent, 199 /* DoStatement */)) { + if (hasKind(node.parent, 201 /* WhileStatement */) || hasKind(node.parent, 200 /* DoStatement */)) { return getLoopBreakContinueOccurrences(node.parent); } break; case 121 /* ConstructorKeyword */: - if (hasKind(node.parent, 144 /* Constructor */)) { + if (hasKind(node.parent, 145 /* Constructor */)) { return getConstructorOccurrences(node.parent); } break; case 123 /* GetKeyword */: case 129 /* SetKeyword */: - if (hasKind(node.parent, 145 /* GetAccessor */) || hasKind(node.parent, 146 /* SetAccessor */)) { + if (hasKind(node.parent, 146 /* GetAccessor */) || hasKind(node.parent, 147 /* SetAccessor */)) { return getGetAndSetOccurrences(node.parent); } break; default: if (ts.isModifierKind(node.kind) && node.parent && - (ts.isDeclaration(node.parent) || node.parent.kind === 195 /* VariableStatement */)) { + (ts.isDeclaration(node.parent) || node.parent.kind === 196 /* VariableStatement */)) { return getModifierOccurrences(node.kind, node.parent); } } @@ -48788,10 +49355,10 @@ var ts; aggregate(node); return statementAccumulator; function aggregate(node) { - if (node.kind === 210 /* ThrowStatement */) { + if (node.kind === 211 /* ThrowStatement */) { statementAccumulator.push(node); } - else if (node.kind === 211 /* TryStatement */) { + else if (node.kind === 212 /* TryStatement */) { var tryStatement = node; if (tryStatement.catchClause) { aggregate(tryStatement.catchClause); @@ -48818,19 +49385,19 @@ var ts; function getThrowStatementOwner(throwStatement) { var child = throwStatement; while (child.parent) { - var parent_12 = child.parent; - if (ts.isFunctionBlock(parent_12) || parent_12.kind === 250 /* SourceFile */) { - return parent_12; + var parent_13 = child.parent; + if (ts.isFunctionBlock(parent_13) || parent_13.kind === 251 /* SourceFile */) { + return parent_13; } // A throw-statement is only owned by a try-statement if the try-statement has // a catch clause, and if the throw-statement occurs within the try block. - if (parent_12.kind === 211 /* TryStatement */) { - var tryStatement = parent_12; + if (parent_13.kind === 212 /* TryStatement */) { + var tryStatement = parent_13; if (tryStatement.tryBlock === child && tryStatement.catchClause) { return child; } } - child = parent_12; + child = parent_13; } return undefined; } @@ -48839,7 +49406,7 @@ var ts; aggregate(node); return statementAccumulator; function aggregate(node) { - if (node.kind === 205 /* BreakStatement */ || node.kind === 204 /* ContinueStatement */) { + if (node.kind === 206 /* BreakStatement */ || node.kind === 205 /* ContinueStatement */) { statementAccumulator.push(node); } else if (!ts.isFunctionLike(node)) { @@ -48854,16 +49421,16 @@ var ts; function getBreakOrContinueOwner(statement) { for (var node_2 = statement.parent; node_2; node_2 = node_2.parent) { switch (node_2.kind) { - case 208 /* SwitchStatement */: - if (statement.kind === 204 /* ContinueStatement */) { + case 209 /* SwitchStatement */: + if (statement.kind === 205 /* ContinueStatement */) { continue; } // Fall through. - case 201 /* ForStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - case 200 /* WhileStatement */: - case 199 /* DoStatement */: + case 202 /* ForStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: + case 201 /* WhileStatement */: + case 200 /* DoStatement */: if (!statement.label || isLabeledBy(node_2, statement.label.text)) { return node_2; } @@ -48882,24 +49449,24 @@ var ts; var container = declaration.parent; // Make sure we only highlight the keyword when it makes sense to do so. if (ts.isAccessibilityModifier(modifier)) { - if (!(container.kind === 216 /* ClassDeclaration */ || - container.kind === 188 /* ClassExpression */ || - (declaration.kind === 138 /* Parameter */ && hasKind(container, 144 /* Constructor */)))) { + if (!(container.kind === 217 /* ClassDeclaration */ || + container.kind === 189 /* ClassExpression */ || + (declaration.kind === 139 /* Parameter */ && hasKind(container, 145 /* Constructor */)))) { return undefined; } } else if (modifier === 113 /* StaticKeyword */) { - if (!(container.kind === 216 /* ClassDeclaration */ || container.kind === 188 /* ClassExpression */)) { + if (!(container.kind === 217 /* ClassDeclaration */ || container.kind === 189 /* ClassExpression */)) { return undefined; } } else if (modifier === 82 /* ExportKeyword */ || modifier === 122 /* DeclareKeyword */) { - if (!(container.kind === 221 /* ModuleBlock */ || container.kind === 250 /* SourceFile */)) { + if (!(container.kind === 222 /* ModuleBlock */ || container.kind === 251 /* SourceFile */)) { return undefined; } } else if (modifier === 115 /* AbstractKeyword */) { - if (!(container.kind === 216 /* ClassDeclaration */ || declaration.kind === 216 /* ClassDeclaration */)) { + if (!(container.kind === 217 /* ClassDeclaration */ || declaration.kind === 217 /* ClassDeclaration */)) { return undefined; } } @@ -48911,8 +49478,8 @@ var ts; var modifierFlag = getFlagFromModifier(modifier); var nodes; switch (container.kind) { - case 221 /* ModuleBlock */: - case 250 /* SourceFile */: + case 222 /* ModuleBlock */: + case 251 /* SourceFile */: // Container is either a class declaration or the declaration is a classDeclaration if (modifierFlag & 128 /* Abstract */) { nodes = declaration.members.concat(declaration); @@ -48921,17 +49488,17 @@ var ts; nodes = container.statements; } break; - case 144 /* Constructor */: + case 145 /* Constructor */: nodes = container.parameters.concat(container.parent.members); break; - case 216 /* ClassDeclaration */: - case 188 /* ClassExpression */: + case 217 /* ClassDeclaration */: + case 189 /* ClassExpression */: nodes = container.members; // If we're an accessibility modifier, we're in an instance member and should search // the constructor's parameter list for instance members as well. if (modifierFlag & 56 /* AccessibilityModifier */) { var constructor = ts.forEach(container.members, function (member) { - return member.kind === 144 /* Constructor */ && member; + return member.kind === 145 /* Constructor */ && member; }); if (constructor) { nodes = nodes.concat(constructor.parameters); @@ -48984,8 +49551,8 @@ var ts; } function getGetAndSetOccurrences(accessorDeclaration) { var keywords = []; - tryPushAccessorKeyword(accessorDeclaration.symbol, 145 /* GetAccessor */); - tryPushAccessorKeyword(accessorDeclaration.symbol, 146 /* SetAccessor */); + tryPushAccessorKeyword(accessorDeclaration.symbol, 146 /* GetAccessor */); + tryPushAccessorKeyword(accessorDeclaration.symbol, 147 /* SetAccessor */); return ts.map(keywords, getHighlightSpanForNode); function tryPushAccessorKeyword(accessorSymbol, accessorKind) { var accessor = ts.getDeclarationOfKind(accessorSymbol, accessorKind); @@ -49008,7 +49575,7 @@ var ts; var keywords = []; if (pushKeywordIf(keywords, loopNode.getFirstToken(), 86 /* ForKeyword */, 104 /* WhileKeyword */, 79 /* DoKeyword */)) { // If we succeeded and got a do-while loop, then start looking for a 'while' keyword. - if (loopNode.kind === 199 /* DoStatement */) { + if (loopNode.kind === 200 /* DoStatement */) { var loopTokens = loopNode.getChildren(); for (var i = loopTokens.length - 1; i >= 0; i--) { if (pushKeywordIf(keywords, loopTokens[i], 104 /* WhileKeyword */)) { @@ -49029,13 +49596,13 @@ var ts; var owner = getBreakOrContinueOwner(breakOrContinueStatement); if (owner) { switch (owner.kind) { - case 201 /* ForStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - case 199 /* DoStatement */: - case 200 /* WhileStatement */: + case 202 /* ForStatement */: + case 203 /* ForInStatement */: + case 204 /* ForOfStatement */: + case 200 /* DoStatement */: + case 201 /* WhileStatement */: return getLoopBreakContinueOccurrences(owner); - case 208 /* SwitchStatement */: + case 209 /* SwitchStatement */: return getSwitchCaseDefaultOccurrences(owner); } } @@ -49089,7 +49656,7 @@ var ts; function getReturnOccurrences(returnStatement) { var func = ts.getContainingFunction(returnStatement); // If we didn't find a containing function with a block body, bail out. - if (!(func && hasKind(func.body, 194 /* Block */))) { + if (!(func && hasKind(func.body, 195 /* Block */))) { return undefined; } var keywords = []; @@ -49105,7 +49672,7 @@ var ts; function getIfElseOccurrences(ifStatement) { var keywords = []; // Traverse upwards through all parent if-statements linked by their else-branches. - while (hasKind(ifStatement.parent, 198 /* IfStatement */) && ifStatement.parent.elseStatement === ifStatement) { + while (hasKind(ifStatement.parent, 199 /* IfStatement */) && ifStatement.parent.elseStatement === ifStatement) { ifStatement = ifStatement.parent; } // Now traverse back down through the else branches, aggregating if/else keywords of if-statements. @@ -49118,7 +49685,7 @@ var ts; break; } } - if (!hasKind(ifStatement.elseStatement, 198 /* IfStatement */)) { + if (!hasKind(ifStatement.elseStatement, 199 /* IfStatement */)) { break; } ifStatement = ifStatement.elseStatement; @@ -49235,7 +49802,7 @@ var ts; return getLabelReferencesInNode(node.parent, node); } } - if (node.kind === 97 /* ThisKeyword */ || node.kind === 161 /* ThisType */) { + if (node.kind === 97 /* ThisKeyword */ || node.kind === 162 /* ThisType */) { return getReferencesForThisKeyword(node, sourceFiles); } if (node.kind === 95 /* SuperKeyword */) { @@ -49296,10 +49863,8 @@ var ts; textSpan: ts.createTextSpan(declarations[0].getStart(), 0) }; } - function isImportOrExportSpecifierImportSymbol(symbol) { - return (symbol.flags & 8388608 /* Alias */) && ts.forEach(symbol.declarations, function (declaration) { - return declaration.kind === 228 /* ImportSpecifier */ || declaration.kind === 232 /* ExportSpecifier */; - }); + function isImportSpecifierSymbol(symbol) { + return (symbol.flags & 8388608 /* Alias */) && !!ts.getDeclarationOfKind(symbol, 229 /* ImportSpecifier */); } function getInternedName(symbol, location, declarations) { // If this is an export or import specifier it could have been renamed using the 'as' syntax. @@ -49325,14 +49890,14 @@ var ts; // If this is the symbol of a named function expression or named class expression, // then named references are limited to its own scope. var valueDeclaration = symbol.valueDeclaration; - if (valueDeclaration && (valueDeclaration.kind === 175 /* FunctionExpression */ || valueDeclaration.kind === 188 /* ClassExpression */)) { + if (valueDeclaration && (valueDeclaration.kind === 176 /* FunctionExpression */ || valueDeclaration.kind === 189 /* ClassExpression */)) { return valueDeclaration; } // If this is private property or method, the scope is the containing class if (symbol.flags & (4 /* Property */ | 8192 /* Method */)) { var privateDeclaration = ts.forEach(symbol.getDeclarations(), function (d) { return (d.flags & 16 /* Private */) ? d : undefined; }); if (privateDeclaration) { - return ts.getAncestor(privateDeclaration, 216 /* ClassDeclaration */); + return ts.getAncestor(privateDeclaration, 217 /* ClassDeclaration */); } } // If the symbol is an import we would like to find it if we are looking for what it imports. @@ -49358,7 +49923,7 @@ var ts; // Different declarations have different containers, bail out return undefined; } - if (container.kind === 250 /* SourceFile */ && !ts.isExternalModule(container)) { + if (container.kind === 251 /* SourceFile */ && !ts.isExternalModule(container)) { // This is a global variable and not an external module, any declaration defined // within this scope is visible outside the file return undefined; @@ -49531,13 +50096,13 @@ var ts; // Whether 'super' occurs in a static context within a class. var staticFlag = 64 /* Static */; switch (searchSpaceNode.kind) { - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 145 /* Constructor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: staticFlag &= searchSpaceNode.flags; searchSpaceNode = searchSpaceNode.parent; // re-assign to be the owning class break; @@ -49569,27 +50134,27 @@ var ts; // Whether 'this' occurs in a static context within a class. var staticFlag = 64 /* Static */; switch (searchSpaceNode.kind) { - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: if (ts.isObjectLiteralMethod(searchSpaceNode)) { break; } // fall through - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 145 /* Constructor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: staticFlag &= searchSpaceNode.flags; searchSpaceNode = searchSpaceNode.parent; // re-assign to be the owning class break; - case 250 /* SourceFile */: + case 251 /* SourceFile */: if (ts.isExternalModule(searchSpaceNode)) { return undefined; } // Fall through - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: break; // Computed properties in classes are not handled here because references to this are illegal, // so there is no point finding references to them. @@ -49598,7 +50163,7 @@ var ts; } var references = []; var possiblePositions; - if (searchSpaceNode.kind === 250 /* SourceFile */) { + if (searchSpaceNode.kind === 251 /* SourceFile */) { ts.forEach(sourceFiles, function (sourceFile) { possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", sourceFile.getStart(), sourceFile.getEnd()); getThisReferencesInFile(sourceFile, sourceFile, possiblePositions, references); @@ -49624,33 +50189,33 @@ var ts; ts.forEach(possiblePositions, function (position) { cancellationToken.throwIfCancellationRequested(); var node = ts.getTouchingWord(sourceFile, position); - if (!node || (node.kind !== 97 /* ThisKeyword */ && node.kind !== 161 /* ThisType */)) { + if (!node || (node.kind !== 97 /* ThisKeyword */ && node.kind !== 162 /* ThisType */)) { return; } var container = ts.getThisContainer(node, /* includeArrowFunctions */ false); switch (searchSpaceNode.kind) { - case 175 /* FunctionExpression */: - case 215 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 216 /* FunctionDeclaration */: if (searchSpaceNode.symbol === container.symbol) { result.push(getReferenceEntryFromNode(node)); } break; - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: if (ts.isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol) { result.push(getReferenceEntryFromNode(node)); } break; - case 188 /* ClassExpression */: - case 216 /* ClassDeclaration */: + case 189 /* ClassExpression */: + case 217 /* ClassDeclaration */: // Make sure the container belongs to the same class // and has the appropriate static modifier from the original container. if (container.parent && searchSpaceNode.symbol === container.parent.symbol && (container.flags & 64 /* Static */) === staticFlag) { result.push(getReferenceEntryFromNode(node)); } break; - case 250 /* SourceFile */: - if (container.kind === 250 /* SourceFile */ && !ts.isExternalModule(container)) { + case 251 /* SourceFile */: + if (container.kind === 251 /* SourceFile */ && !ts.isExternalModule(container)) { result.push(getReferenceEntryFromNode(node)); } break; @@ -49662,9 +50227,17 @@ var ts; // The search set contains at least the current symbol var result = [symbol]; // If the symbol is an alias, add what it alaises to the list - if (isImportOrExportSpecifierImportSymbol(symbol)) { + if (isImportSpecifierSymbol(symbol)) { result.push(typeChecker.getAliasedSymbol(symbol)); } + // For export specifiers, the exported name can be refering to a local symbol, e.g.: + // import {a} from "mod"; + // export {a as somethingElse} + // We want the *local* declaration of 'a' as declared in the import, + // *not* as declared within "mod" (or farther) + if (location.parent.kind === 233 /* ExportSpecifier */) { + result.push(typeChecker.getExportSpecifierLocalTargetSymbol(location.parent)); + } // If the location is in a context sensitive location (i.e. in an object literal) try // to get a contextual type for it, and add the property symbol from the contextual // type to the search set @@ -49692,7 +50265,7 @@ var ts; // we should include both parameter declaration symbol and property declaration symbol // Parameter Declaration symbol is only visible within function scope, so the symbol is stored in contructor.locals. // Property Declaration symbol is a member of the class, so the symbol is stored in its class Declaration.symbol.members - if (symbol.valueDeclaration && symbol.valueDeclaration.kind === 138 /* Parameter */ && + if (symbol.valueDeclaration && symbol.valueDeclaration.kind === 139 /* Parameter */ && ts.isParameterPropertyDeclaration(symbol.valueDeclaration)) { result = result.concat(typeChecker.getSymbolsOfParameterPropertyDeclaration(symbol.valueDeclaration, symbol.name)); } @@ -49704,19 +50277,44 @@ var ts; } // Add symbol of properties/methods of the same name in base classes and implemented interfaces definitions if (rootSymbol.parent && rootSymbol.parent.flags & (32 /* Class */ | 64 /* Interface */)) { - getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result); + getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result, /*previousIterationSymbolsCache*/ {}); } }); return result; } - function getPropertySymbolsFromBaseTypes(symbol, propertyName, result) { - if (symbol && symbol.flags & (32 /* Class */ | 64 /* Interface */)) { + /** + * Find symbol of the given property-name and add the symbol to the given result array + * @param symbol a symbol to start searching for the given propertyName + * @param propertyName a name of property to serach for + * @param result an array of symbol of found property symbols + * @param previousIterationSymbolsCache a cache of symbol from previous iterations of calling this function to prevent infinite revisitng of the same symbol. + * The value of previousIterationSymbol is undefined when the function is first called. + */ + function getPropertySymbolsFromBaseTypes(symbol, propertyName, result, previousIterationSymbolsCache) { + if (!symbol) { + return; + } + // If the current symbol is the same as the previous-iteration symbol, we can just return the symbol that has already been visited + // This is particularly important for the following cases, so that we do not infinitely visit the same symbol. + // For example: + // interface C extends C { + // /*findRef*/propName: string; + // } + // The first time getPropertySymbolsFromBaseTypes is called when finding-all-references at propName, + // the symbol argument will be the symbol of an interface "C" and previousIterationSymbol is undefined, + // the function will add any found symbol of the property-name, then its sub-routine will call + // getPropertySymbolsFromBaseTypes again to walk up any base types to prevent revisiting already + // visited symbol, interface "C", the sub-routine will pass the current symbol as previousIterationSymbol. + if (ts.hasProperty(previousIterationSymbolsCache, symbol.name)) { + return; + } + if (symbol.flags & (32 /* Class */ | 64 /* Interface */)) { ts.forEach(symbol.getDeclarations(), function (declaration) { - if (declaration.kind === 216 /* ClassDeclaration */) { + if (declaration.kind === 217 /* ClassDeclaration */) { getPropertySymbolFromTypeReference(ts.getClassExtendsHeritageClauseElement(declaration)); ts.forEach(ts.getClassImplementsHeritageClauseElements(declaration), getPropertySymbolFromTypeReference); } - else if (declaration.kind === 217 /* InterfaceDeclaration */) { + else if (declaration.kind === 218 /* InterfaceDeclaration */) { ts.forEach(ts.getInterfaceBaseTypeNodes(declaration), getPropertySymbolFromTypeReference); } }); @@ -49731,7 +50329,8 @@ var ts; result.push(propertySymbol); } // Visit the typeReference as well to see if it directly or indirectly use that property - getPropertySymbolsFromBaseTypes(type.symbol, propertyName, result); + previousIterationSymbolsCache[symbol.name] = symbol; + getPropertySymbolsFromBaseTypes(type.symbol, propertyName, result, previousIterationSymbolsCache); } } } @@ -49742,12 +50341,22 @@ var ts; } // If the reference symbol is an alias, check if what it is aliasing is one of the search // symbols. - if (isImportOrExportSpecifierImportSymbol(referenceSymbol)) { + if (isImportSpecifierSymbol(referenceSymbol)) { var aliasedSymbol = typeChecker.getAliasedSymbol(referenceSymbol); if (searchSymbols.indexOf(aliasedSymbol) >= 0) { return aliasedSymbol; } } + // For export specifiers, it can be a local symbol, e.g. + // import {a} from "mod"; + // export {a as somethingElse} + // We want the local target of the export (i.e. the import symbol) and not the final target (i.e. "mod".a) + if (referenceLocation.parent.kind === 233 /* ExportSpecifier */) { + var aliasedSymbol = typeChecker.getExportSpecifierLocalTargetSymbol(referenceLocation.parent); + if (searchSymbols.indexOf(aliasedSymbol) >= 0) { + return aliasedSymbol; + } + } // If the reference location is in an object literal, try to get the contextual type for the // object literal, lookup the property symbol in the contextual type, and use this symbol to // compare to our searchSymbol @@ -49767,7 +50376,7 @@ var ts; // see if any is in the list if (rootSymbol.parent && rootSymbol.parent.flags & (32 /* Class */ | 64 /* Interface */)) { var result_3 = []; - getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result_3); + getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result_3, /*previousIterationSymbolsCache*/ {}); return ts.forEach(result_3, function (s) { return searchSymbols.indexOf(s) >= 0 ? s : undefined; }); } return undefined; @@ -49777,19 +50386,19 @@ var ts; if (isNameOfPropertyAssignment(node)) { var objectLiteral = node.parent.parent; var contextualType = typeChecker.getContextualType(objectLiteral); - var name_33 = node.text; + var name_36 = node.text; if (contextualType) { if (contextualType.flags & 16384 /* Union */) { // This is a union type, first see if the property we are looking for is a union property (i.e. exists in all types) // if not, search the constituent types for the property - var unionProperty = contextualType.getProperty(name_33); + var unionProperty = contextualType.getProperty(name_36); if (unionProperty) { return [unionProperty]; } else { var result_4 = []; ts.forEach(contextualType.types, function (t) { - var symbol = t.getProperty(name_33); + var symbol = t.getProperty(name_36); if (symbol) { result_4.push(symbol); } @@ -49798,7 +50407,7 @@ var ts; } } else { - var symbol_1 = contextualType.getProperty(name_33); + var symbol_1 = contextualType.getProperty(name_36); if (symbol_1) { return [symbol_1]; } @@ -49856,10 +50465,10 @@ var ts; } var parent = node.parent; if (parent) { - if (parent.kind === 182 /* PostfixUnaryExpression */ || parent.kind === 181 /* PrefixUnaryExpression */) { + if (parent.kind === 183 /* PostfixUnaryExpression */ || parent.kind === 182 /* PrefixUnaryExpression */) { return true; } - else if (parent.kind === 183 /* BinaryExpression */ && parent.left === node) { + else if (parent.kind === 184 /* BinaryExpression */ && parent.left === node) { var operator = parent.operatorToken.kind; return 56 /* FirstAssignment */ <= operator && operator <= 68 /* LastAssignment */; } @@ -49890,34 +50499,34 @@ var ts; } function getMeaningFromDeclaration(node) { switch (node.kind) { - case 138 /* Parameter */: - case 213 /* VariableDeclaration */: - case 165 /* BindingElement */: - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: - case 247 /* PropertyAssignment */: - case 248 /* ShorthandPropertyAssignment */: - case 249 /* EnumMember */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 144 /* Constructor */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 215 /* FunctionDeclaration */: - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: - case 246 /* CatchClause */: + case 139 /* Parameter */: + case 214 /* VariableDeclaration */: + case 166 /* BindingElement */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: + case 248 /* PropertyAssignment */: + case 249 /* ShorthandPropertyAssignment */: + case 250 /* EnumMember */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 145 /* Constructor */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 216 /* FunctionDeclaration */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: + case 247 /* CatchClause */: return 1 /* Value */; - case 137 /* TypeParameter */: - case 217 /* InterfaceDeclaration */: - case 218 /* TypeAliasDeclaration */: - case 155 /* TypeLiteral */: + case 138 /* TypeParameter */: + case 218 /* InterfaceDeclaration */: + case 219 /* TypeAliasDeclaration */: + case 156 /* TypeLiteral */: return 2 /* Type */; - case 216 /* ClassDeclaration */: - case 219 /* EnumDeclaration */: + case 217 /* ClassDeclaration */: + case 220 /* EnumDeclaration */: return 1 /* Value */ | 2 /* Type */; - case 220 /* ModuleDeclaration */: - if (node.name.kind === 9 /* StringLiteral */) { + case 221 /* ModuleDeclaration */: + if (ts.isAmbientModule(node)) { return 4 /* Namespace */ | 1 /* Value */; } else if (ts.getModuleInstanceState(node) === 1 /* Instantiated */) { @@ -49926,15 +50535,15 @@ var ts; else { return 4 /* Namespace */; } - case 227 /* NamedImports */: - case 228 /* ImportSpecifier */: - case 223 /* ImportEqualsDeclaration */: - case 224 /* ImportDeclaration */: - case 229 /* ExportAssignment */: - case 230 /* ExportDeclaration */: + case 228 /* NamedImports */: + case 229 /* ImportSpecifier */: + case 224 /* ImportEqualsDeclaration */: + case 225 /* ImportDeclaration */: + case 230 /* ExportAssignment */: + case 231 /* ExportDeclaration */: return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; // An external module can be a Value - case 250 /* SourceFile */: + case 251 /* SourceFile */: return 4 /* Namespace */ | 1 /* Value */; } return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; @@ -49943,10 +50552,10 @@ var ts; if (ts.isRightSideOfQualifiedNameOrPropertyAccess(node)) { node = node.parent; } - return node.parent.kind === 151 /* TypeReference */ || - (node.parent.kind === 190 /* ExpressionWithTypeArguments */ && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) || + return node.parent.kind === 152 /* TypeReference */ || + (node.parent.kind === 191 /* ExpressionWithTypeArguments */ && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) || (node.kind === 97 /* ThisKeyword */ && !ts.isExpression(node)) || - node.kind === 161 /* ThisType */; + node.kind === 162 /* ThisType */; } function isNamespaceReference(node) { return isQualifiedNameNamespaceReference(node) || isPropertyAccessNamespaceReference(node); @@ -49954,32 +50563,32 @@ var ts; function isPropertyAccessNamespaceReference(node) { var root = node; var isLastClause = true; - if (root.parent.kind === 168 /* PropertyAccessExpression */) { - while (root.parent && root.parent.kind === 168 /* PropertyAccessExpression */) { + if (root.parent.kind === 169 /* PropertyAccessExpression */) { + while (root.parent && root.parent.kind === 169 /* PropertyAccessExpression */) { root = root.parent; } isLastClause = root.name === node; } - if (!isLastClause && root.parent.kind === 190 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 245 /* HeritageClause */) { + if (!isLastClause && root.parent.kind === 191 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 246 /* HeritageClause */) { var decl = root.parent.parent.parent; - return (decl.kind === 216 /* ClassDeclaration */ && root.parent.parent.token === 106 /* ImplementsKeyword */) || - (decl.kind === 217 /* InterfaceDeclaration */ && root.parent.parent.token === 83 /* ExtendsKeyword */); + return (decl.kind === 217 /* ClassDeclaration */ && root.parent.parent.token === 106 /* ImplementsKeyword */) || + (decl.kind === 218 /* InterfaceDeclaration */ && root.parent.parent.token === 83 /* ExtendsKeyword */); } return false; } function isQualifiedNameNamespaceReference(node) { var root = node; var isLastClause = true; - if (root.parent.kind === 135 /* QualifiedName */) { - while (root.parent && root.parent.kind === 135 /* QualifiedName */) { + if (root.parent.kind === 136 /* QualifiedName */) { + while (root.parent && root.parent.kind === 136 /* QualifiedName */) { root = root.parent; } isLastClause = root.right === node; } - return root.parent.kind === 151 /* TypeReference */ && !isLastClause; + return root.parent.kind === 152 /* TypeReference */ && !isLastClause; } function isInRightSideOfImport(node) { - while (node.parent.kind === 135 /* QualifiedName */) { + while (node.parent.kind === 136 /* QualifiedName */) { node = node.parent; } return ts.isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node; @@ -49989,15 +50598,15 @@ var ts; // import a = |b|; // Namespace // import a = |b.c|; // Value, type, namespace // import a = |b.c|.d; // Namespace - if (node.parent.kind === 135 /* QualifiedName */ && + if (node.parent.kind === 136 /* QualifiedName */ && node.parent.right === node && - node.parent.parent.kind === 223 /* ImportEqualsDeclaration */) { + node.parent.parent.kind === 224 /* ImportEqualsDeclaration */) { return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; } return 4 /* Namespace */; } function getMeaningFromLocation(node) { - if (node.parent.kind === 229 /* ExportAssignment */) { + if (node.parent.kind === 230 /* ExportAssignment */) { return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; } else if (isInRightSideOfImport(node)) { @@ -50037,16 +50646,16 @@ var ts; return; } switch (node.kind) { - case 168 /* PropertyAccessExpression */: - case 135 /* QualifiedName */: + case 169 /* PropertyAccessExpression */: + case 136 /* QualifiedName */: case 9 /* StringLiteral */: - case 162 /* StringLiteralType */: + case 163 /* StringLiteralType */: case 84 /* FalseKeyword */: case 99 /* TrueKeyword */: case 93 /* NullKeyword */: case 95 /* SuperKeyword */: case 97 /* ThisKeyword */: - case 161 /* ThisType */: + case 162 /* ThisType */: case 69 /* Identifier */: break; // Cant create the text span @@ -50063,7 +50672,7 @@ var ts; // If this is name of a module declarations, check if this is right side of dotted module name // If parent of the module declaration which is parent of this node is module declaration and its body is the module declaration that this node is name of // Then this name is name from dotted module - if (nodeForStartPos.parent.parent.kind === 220 /* ModuleDeclaration */ && + if (nodeForStartPos.parent.parent.kind === 221 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { // Use parent module declarations name for start pos nodeForStartPos = nodeForStartPos.parent.parent.name; @@ -50104,10 +50713,10 @@ var ts; // That means we're calling back into the host around every 1.2k of the file we process. // Lib.d.ts has similar numbers. switch (kind) { - case 220 /* ModuleDeclaration */: - case 216 /* ClassDeclaration */: - case 217 /* InterfaceDeclaration */: - case 215 /* FunctionDeclaration */: + case 221 /* ModuleDeclaration */: + case 217 /* ClassDeclaration */: + case 218 /* InterfaceDeclaration */: + case 216 /* FunctionDeclaration */: cancellationToken.throwIfCancellationRequested(); } } @@ -50161,7 +50770,7 @@ var ts; */ function hasValueSideModule(symbol) { return ts.forEach(symbol.declarations, function (declaration) { - return declaration.kind === 220 /* ModuleDeclaration */ && + return declaration.kind === 221 /* ModuleDeclaration */ && ts.getModuleInstanceState(declaration) === 1 /* Instantiated */; }); } @@ -50212,6 +50821,9 @@ var ts; case 19 /* jsxOpenTagName */: return ClassificationTypeNames.jsxOpenTagName; case 20 /* jsxCloseTagName */: return ClassificationTypeNames.jsxCloseTagName; case 21 /* jsxSelfClosingTagName */: return ClassificationTypeNames.jsxSelfClosingTagName; + case 22 /* jsxAttribute */: return ClassificationTypeNames.jsxAttribute; + case 23 /* jsxText */: return ClassificationTypeNames.jsxText; + case 24 /* jsxAttributeStringLiteralValue */: return ClassificationTypeNames.jsxAttributeStringLiteralValue; } } function convertClassifications(classifications) { @@ -50319,16 +50931,16 @@ var ts; pushClassification(tag.tagName.pos, tag.tagName.end - tag.tagName.pos, 18 /* docCommentTagName */); pos = tag.tagName.end; switch (tag.kind) { - case 269 /* JSDocParameterTag */: + case 270 /* JSDocParameterTag */: processJSDocParameterTag(tag); break; - case 272 /* JSDocTemplateTag */: + case 273 /* JSDocTemplateTag */: processJSDocTemplateTag(tag); break; - case 271 /* JSDocTypeTag */: + case 272 /* JSDocTypeTag */: processElement(tag.typeExpression); break; - case 270 /* JSDocReturnTag */: + case 271 /* JSDocReturnTag */: processElement(tag.typeExpression); break; } @@ -50365,7 +50977,8 @@ var ts; function classifyDisabledMergeCode(text, start, end) { // Classify the line that the ======= marker is on as a comment. Then just lex // all further tokens and add them to the result. - for (var i = start; i < end; i++) { + var i; + for (i = start; i < end; i++) { if (ts.isLineBreak(text.charCodeAt(i))) { break; } @@ -50385,11 +50998,11 @@ var ts; pushClassification(start, end - start, type); } } - function classifyToken(token) { + function classifyTokenOrJsxText(token) { if (ts.nodeIsMissing(token)) { return; } - var tokenStart = classifyLeadingTriviaAndGetTokenStart(token); + var tokenStart = token.kind === 239 /* JsxText */ ? token.pos : classifyLeadingTriviaAndGetTokenStart(token); var tokenWidth = token.end - tokenStart; ts.Debug.assert(tokenWidth >= 0); if (tokenWidth > 0) { @@ -50419,16 +51032,17 @@ var ts; if (token) { if (tokenKind === 56 /* EqualsToken */) { // the '=' in a variable declaration is special cased here. - if (token.parent.kind === 213 /* VariableDeclaration */ || - token.parent.kind === 141 /* PropertyDeclaration */ || - token.parent.kind === 138 /* Parameter */) { + if (token.parent.kind === 214 /* VariableDeclaration */ || + token.parent.kind === 142 /* PropertyDeclaration */ || + token.parent.kind === 139 /* Parameter */ || + token.parent.kind === 241 /* JsxAttribute */) { return 5 /* operator */; } } - if (token.parent.kind === 183 /* BinaryExpression */ || - token.parent.kind === 181 /* PrefixUnaryExpression */ || - token.parent.kind === 182 /* PostfixUnaryExpression */ || - token.parent.kind === 184 /* ConditionalExpression */) { + if (token.parent.kind === 184 /* BinaryExpression */ || + token.parent.kind === 182 /* PrefixUnaryExpression */ || + token.parent.kind === 183 /* PostfixUnaryExpression */ || + token.parent.kind === 185 /* ConditionalExpression */) { return 5 /* operator */; } } @@ -50437,8 +51051,8 @@ var ts; else if (tokenKind === 8 /* NumericLiteral */) { return 4 /* numericLiteral */; } - else if (tokenKind === 9 /* StringLiteral */ || tokenKind === 162 /* StringLiteralType */) { - return 6 /* stringLiteral */; + else if (tokenKind === 9 /* StringLiteral */ || tokenKind === 163 /* StringLiteralType */) { + return token.parent.kind === 241 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; } else if (tokenKind === 10 /* RegularExpressionLiteral */) { // TODO: we should get another classification type for these literals. @@ -50448,54 +51062,61 @@ var ts; // TODO (drosen): we should *also* get another classification type for these literals. return 6 /* stringLiteral */; } + else if (tokenKind === 239 /* JsxText */) { + return 23 /* jsxText */; + } else if (tokenKind === 69 /* Identifier */) { if (token) { switch (token.parent.kind) { - case 216 /* ClassDeclaration */: + case 217 /* ClassDeclaration */: if (token.parent.name === token) { return 11 /* className */; } return; - case 137 /* TypeParameter */: + case 138 /* TypeParameter */: if (token.parent.name === token) { return 15 /* typeParameterName */; } return; - case 217 /* InterfaceDeclaration */: + case 218 /* InterfaceDeclaration */: if (token.parent.name === token) { return 13 /* interfaceName */; } return; - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: if (token.parent.name === token) { return 12 /* enumName */; } return; - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: if (token.parent.name === token) { return 14 /* moduleName */; } return; - case 138 /* Parameter */: + case 139 /* Parameter */: if (token.parent.name === token) { return 17 /* parameterName */; } return; - case 237 /* JsxOpeningElement */: + case 238 /* JsxOpeningElement */: if (token.parent.tagName === token) { return 19 /* jsxOpenTagName */; } return; - case 239 /* JsxClosingElement */: + case 240 /* JsxClosingElement */: if (token.parent.tagName === token) { return 20 /* jsxCloseTagName */; } return; - case 236 /* JsxSelfClosingElement */: + case 237 /* JsxSelfClosingElement */: if (token.parent.tagName === token) { return 21 /* jsxSelfClosingTagName */; } return; + case 241 /* JsxAttribute */: + if (token.parent.name === token) { + return 22 /* jsxAttribute */; + } } } return 2 /* identifier */; @@ -50511,8 +51132,8 @@ var ts; var children = element.getChildren(sourceFile); for (var i = 0, n = children.length; i < n; i++) { var child = children[i]; - if (ts.isToken(child)) { - classifyToken(child); + if (ts.isToken(child) || child.kind === 239 /* JsxText */) { + classifyTokenOrJsxText(child); } else { // Recurse into our child nodes. @@ -50638,19 +51259,19 @@ var ts; var commentOwner; findOwner: for (commentOwner = tokenAtPos; commentOwner; commentOwner = commentOwner.parent) { switch (commentOwner.kind) { - case 215 /* FunctionDeclaration */: - case 143 /* MethodDeclaration */: - case 144 /* Constructor */: - case 216 /* ClassDeclaration */: - case 195 /* VariableStatement */: + case 216 /* FunctionDeclaration */: + case 144 /* MethodDeclaration */: + case 145 /* Constructor */: + case 217 /* ClassDeclaration */: + case 196 /* VariableStatement */: break findOwner; - case 250 /* SourceFile */: + case 251 /* SourceFile */: return undefined; - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: // If in walking up the tree, we hit a a nested namespace declaration, // then we must be somewhere within a dotted namespace name; however we don't // want to give back a JSDoc template for the 'b' or 'c' in 'namespace a.b.c { }'. - if (commentOwner.parent.kind === 220 /* ModuleDeclaration */) { + if (commentOwner.parent.kind === 221 /* ModuleDeclaration */) { return undefined; } break findOwner; @@ -50692,7 +51313,7 @@ var ts; if (ts.isFunctionLike(commentOwner)) { return commentOwner.parameters; } - if (commentOwner.kind === 195 /* VariableStatement */) { + if (commentOwner.kind === 196 /* VariableStatement */) { var varStatement = commentOwner; var varDeclarations = varStatement.declarationList.declarations; if (varDeclarations.length === 1 && varDeclarations[0].initializer) { @@ -50710,17 +51331,17 @@ var ts; * @returns the parameters of a signature found on the RHS if one exists; otherwise 'emptyArray'. */ function getParametersFromRightHandSideOfAssignment(rightHandSide) { - while (rightHandSide.kind === 174 /* ParenthesizedExpression */) { + while (rightHandSide.kind === 175 /* ParenthesizedExpression */) { rightHandSide = rightHandSide.expression; } switch (rightHandSide.kind) { - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: return rightHandSide.parameters; - case 188 /* ClassExpression */: + case 189 /* ClassExpression */: for (var _i = 0, _a = rightHandSide.members; _i < _a.length; _i++) { var member = _a[_i]; - if (member.kind === 144 /* Constructor */) { + if (member.kind === 145 /* Constructor */) { return member.parameters; } } @@ -50974,7 +51595,7 @@ var ts; // then we want 'something' to be in the name table. Similarly, if we have // "a['propname']" then we want to store "propname" in the name table. if (ts.isDeclarationName(node) || - node.parent.kind === 234 /* ExternalModuleReference */ || + node.parent.kind === 235 /* ExternalModuleReference */ || isArgumentOfElementAccessExpression(node)) { nameTable[node.text] = node.text; } @@ -50987,7 +51608,7 @@ var ts; function isArgumentOfElementAccessExpression(node) { return node && node.parent && - node.parent.kind === 169 /* ElementAccessExpression */ && + node.parent.kind === 170 /* ElementAccessExpression */ && node.parent.argumentExpression === node; } /// Classifier @@ -51246,7 +51867,7 @@ var ts; var end = scanner.getTextPos(); addResult(start, end, classFromKind(token)); if (end >= text.length) { - if (token === 9 /* StringLiteral */ || token === 162 /* StringLiteralType */) { + if (token === 9 /* StringLiteral */ || token === 163 /* StringLiteralType */) { // Check to see if we finished up on a multiline string literal. var tokenText = scanner.getTokenText(); if (scanner.isUnterminated()) { @@ -51369,7 +51990,7 @@ var ts; } } function isKeyword(token) { - return token >= 70 /* FirstKeyword */ && token <= 134 /* LastKeyword */; + return token >= 70 /* FirstKeyword */ && token <= 135 /* LastKeyword */; } function classFromKind(token) { if (isKeyword(token)) { @@ -51385,7 +52006,7 @@ var ts; case 8 /* NumericLiteral */: return 4 /* numericLiteral */; case 9 /* StringLiteral */: - case 162 /* StringLiteralType */: + case 163 /* StringLiteralType */: return 6 /* stringLiteral */; case 10 /* RegularExpressionLiteral */: return 7 /* regularExpressionLiteral */; @@ -51476,6 +52097,9 @@ var ts; startNode.getStart(sourceFile); return ts.createTextSpanFromBounds(start, (endNode || startNode).getEnd()); } + function textSpanEndingAtNextToken(startNode, previousTokenToFindNextEndToken) { + return textSpan(startNode, ts.findNextToken(previousTokenToFindNextEndToken, previousTokenToFindNextEndToken.parent)); + } function spanInNodeIfStartsOnSameLine(node, otherwiseOnNode) { if (node && lineOfPosition === sourceFile.getLineAndCharacterOfPosition(node.getStart(sourceFile)).line) { return spanInNode(node); @@ -51493,132 +52117,114 @@ var ts; } function spanInNode(node) { if (node) { - if (ts.isExpression(node)) { - if (node.parent.kind === 199 /* DoStatement */) { - // Set span as if on while keyword - return spanInPreviousNode(node); - } - if (node.parent.kind === 139 /* Decorator */) { - // Set breakpoint on the decorator emit - return spanInNode(node.parent); - } - if (node.parent.kind === 201 /* ForStatement */) { - // For now lets set the span on this expression, fix it later - return textSpan(node); - } - if (node.parent.kind === 183 /* BinaryExpression */ && node.parent.operatorToken.kind === 24 /* CommaToken */) { - // if this is comma expression, the breakpoint is possible in this expression - return textSpan(node); - } - if (node.parent.kind === 176 /* ArrowFunction */ && node.parent.body === node) { - // If this is body of arrow function, it is allowed to have the breakpoint - return textSpan(node); - } - } switch (node.kind) { - case 195 /* VariableStatement */: + case 196 /* VariableStatement */: // Span on first variable declaration return spanInVariableDeclaration(node.declarationList.declarations[0]); - case 213 /* VariableDeclaration */: - case 141 /* PropertyDeclaration */: - case 140 /* PropertySignature */: + case 214 /* VariableDeclaration */: + case 142 /* PropertyDeclaration */: + case 141 /* PropertySignature */: return spanInVariableDeclaration(node); - case 138 /* Parameter */: + case 139 /* Parameter */: return spanInParameterDeclaration(node); - case 215 /* FunctionDeclaration */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 144 /* Constructor */: - case 175 /* FunctionExpression */: - case 176 /* ArrowFunction */: + case 216 /* FunctionDeclaration */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 145 /* Constructor */: + case 176 /* FunctionExpression */: + case 177 /* ArrowFunction */: return spanInFunctionDeclaration(node); - case 194 /* Block */: + case 195 /* Block */: if (ts.isFunctionBlock(node)) { return spanInFunctionBlock(node); } // Fall through - case 221 /* ModuleBlock */: + case 222 /* ModuleBlock */: return spanInBlock(node); - case 246 /* CatchClause */: + case 247 /* CatchClause */: return spanInBlock(node.block); - case 197 /* ExpressionStatement */: + case 198 /* ExpressionStatement */: // span on the expression return textSpan(node.expression); - case 206 /* ReturnStatement */: + case 207 /* ReturnStatement */: // span on return keyword and expression if present return textSpan(node.getChildAt(0), node.expression); - case 200 /* WhileStatement */: + case 201 /* WhileStatement */: // Span on while(...) - return textSpan(node, ts.findNextToken(node.expression, node)); - case 199 /* DoStatement */: + return textSpanEndingAtNextToken(node, node.expression); + case 200 /* DoStatement */: // span in statement of the do statement return spanInNode(node.statement); - case 212 /* DebuggerStatement */: + case 213 /* DebuggerStatement */: // span on debugger keyword return textSpan(node.getChildAt(0)); - case 198 /* IfStatement */: + case 199 /* IfStatement */: // set on if(..) span - return textSpan(node, ts.findNextToken(node.expression, node)); - case 209 /* LabeledStatement */: + return textSpanEndingAtNextToken(node, node.expression); + case 210 /* LabeledStatement */: // span in statement return spanInNode(node.statement); - case 205 /* BreakStatement */: - case 204 /* ContinueStatement */: + case 206 /* BreakStatement */: + case 205 /* ContinueStatement */: // On break or continue keyword and label if present return textSpan(node.getChildAt(0), node.label); - case 201 /* ForStatement */: + case 202 /* ForStatement */: return spanInForStatement(node); - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: - // span on for (a in ...) - return textSpan(node, ts.findNextToken(node.expression, node)); - case 208 /* SwitchStatement */: + case 203 /* ForInStatement */: + // span of for (a in ...) + return textSpanEndingAtNextToken(node, node.expression); + case 204 /* ForOfStatement */: + // span in initializer + return spanInInitializerOfForLike(node); + case 209 /* SwitchStatement */: // span on switch(...) - return textSpan(node, ts.findNextToken(node.expression, node)); - case 243 /* CaseClause */: - case 244 /* DefaultClause */: + return textSpanEndingAtNextToken(node, node.expression); + case 244 /* CaseClause */: + case 245 /* DefaultClause */: // span in first statement of the clause return spanInNode(node.statements[0]); - case 211 /* TryStatement */: + case 212 /* TryStatement */: // span in try block return spanInBlock(node.tryBlock); - case 210 /* ThrowStatement */: + case 211 /* ThrowStatement */: // span in throw ... return textSpan(node, node.expression); - case 229 /* ExportAssignment */: + case 230 /* ExportAssignment */: // span on export = id return textSpan(node, node.expression); - case 223 /* ImportEqualsDeclaration */: + case 224 /* ImportEqualsDeclaration */: // import statement without including semicolon return textSpan(node, node.moduleReference); - case 224 /* ImportDeclaration */: + case 225 /* ImportDeclaration */: // import statement without including semicolon return textSpan(node, node.moduleSpecifier); - case 230 /* ExportDeclaration */: + case 231 /* ExportDeclaration */: // import statement without including semicolon return textSpan(node, node.moduleSpecifier); - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: // span on complete module if it is instantiated if (ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { return undefined; } - case 216 /* ClassDeclaration */: - case 219 /* EnumDeclaration */: - case 249 /* EnumMember */: - case 170 /* CallExpression */: - case 171 /* NewExpression */: + case 217 /* ClassDeclaration */: + case 220 /* EnumDeclaration */: + case 250 /* EnumMember */: + case 166 /* BindingElement */: // span on complete node return textSpan(node); - case 207 /* WithStatement */: + case 208 /* WithStatement */: // span in statement return spanInNode(node.statement); - case 139 /* Decorator */: + case 140 /* Decorator */: return spanInNodeArray(node.parent.decorators); + case 164 /* ObjectBindingPattern */: + case 165 /* ArrayBindingPattern */: + return spanInBindingPattern(node); // No breakpoint in interface, type alias - case 217 /* InterfaceDeclaration */: - case 218 /* TypeAliasDeclaration */: + case 218 /* InterfaceDeclaration */: + case 219 /* TypeAliasDeclaration */: return undefined; // Tokens: case 23 /* SemicolonToken */: @@ -51630,6 +52236,8 @@ var ts; return spanInOpenBraceToken(node); case 16 /* CloseBraceToken */: return spanInCloseBraceToken(node); + case 20 /* CloseBracketToken */: + return spanInCloseBracketToken(node); case 17 /* OpenParenToken */: return spanInOpenParenToken(node); case 18 /* CloseParenToken */: @@ -51646,58 +52254,142 @@ var ts; case 72 /* CatchKeyword */: case 85 /* FinallyKeyword */: return spanInNextNode(node); + case 135 /* OfKeyword */: + return spanInOfKeyword(node); default: + // Destructuring pattern in destructuring assignment + // [a, b, c] of + // [a, b, c] = expression + if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node)) { + return spanInArrayLiteralOrObjectLiteralDestructuringPattern(node); + } + // Set breakpoint on identifier element of destructuring pattern + // a or ...c or d: x from + // [a, b, ...c] or { a, b } or { d: x } from destructuring pattern + if ((node.kind === 69 /* Identifier */ || + node.kind == 188 /* SpreadElementExpression */ || + node.kind === 248 /* PropertyAssignment */ || + node.kind === 249 /* ShorthandPropertyAssignment */) && + ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) { + return textSpan(node); + } + if (node.kind === 184 /* BinaryExpression */) { + var binaryExpression = node; + // Set breakpoint in destructuring pattern if its destructuring assignment + // [a, b, c] or {a, b, c} of + // [a, b, c] = expression or + // {a, b, c} = expression + if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left)) { + return spanInArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left); + } + if (binaryExpression.operatorToken.kind === 56 /* EqualsToken */ && + ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.parent)) { + // Set breakpoint on assignment expression element of destructuring pattern + // a = expression of + // [a = expression, b, c] = someExpression or + // { a = expression, b, c } = someExpression + return textSpan(node); + } + if (binaryExpression.operatorToken.kind === 24 /* CommaToken */) { + return spanInNode(binaryExpression.left); + } + } + if (ts.isExpression(node)) { + switch (node.parent.kind) { + case 200 /* DoStatement */: + // Set span as if on while keyword + return spanInPreviousNode(node); + case 140 /* Decorator */: + // Set breakpoint on the decorator emit + return spanInNode(node.parent); + case 202 /* ForStatement */: + case 204 /* ForOfStatement */: + return textSpan(node); + case 184 /* BinaryExpression */: + if (node.parent.operatorToken.kind === 24 /* CommaToken */) { + // if this is comma expression, the breakpoint is possible in this expression + return textSpan(node); + } + break; + case 177 /* ArrowFunction */: + if (node.parent.body === node) { + // If this is body of arrow function, it is allowed to have the breakpoint + return textSpan(node); + } + break; + } + } // If this is name of property assignment, set breakpoint in the initializer - if (node.parent.kind === 247 /* PropertyAssignment */ && node.parent.name === node) { + if (node.parent.kind === 248 /* PropertyAssignment */ && + node.parent.name === node && + !ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.parent)) { return spanInNode(node.parent.initializer); } // Breakpoint in type assertion goes to its operand - if (node.parent.kind === 173 /* TypeAssertionExpression */ && node.parent.type === node) { - return spanInNode(node.parent.expression); + if (node.parent.kind === 174 /* TypeAssertionExpression */ && node.parent.type === node) { + return spanInNextNode(node.parent.type); } // return type of function go to previous token if (ts.isFunctionLike(node.parent) && node.parent.type === node) { return spanInPreviousNode(node); } + // initializer of variable/parameter declaration go to previous node + if ((node.parent.kind === 214 /* VariableDeclaration */ || + node.parent.kind === 139 /* Parameter */)) { + var paramOrVarDecl = node.parent; + if (paramOrVarDecl.initializer === node || + paramOrVarDecl.type === node || + ts.isAssignmentOperator(node.kind)) { + return spanInPreviousNode(node); + } + } + if (node.parent.kind === 184 /* BinaryExpression */) { + var binaryExpression = node.parent; + if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left) && + (binaryExpression.right === node || + binaryExpression.operatorToken === node)) { + // If initializer of destructuring assignment move to previous token + return spanInPreviousNode(node); + } + } // Default go to parent to set the breakpoint return spanInNode(node.parent); } } + function textSpanFromVariableDeclaration(variableDeclaration) { + var declarations = variableDeclaration.parent.declarations; + if (declarations && declarations[0] === variableDeclaration) { + // First declaration - include let keyword + return textSpan(ts.findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent), variableDeclaration); + } + else { + // Span only on this declaration + return textSpan(variableDeclaration); + } + } function spanInVariableDeclaration(variableDeclaration) { // If declaration of for in statement, just set the span in parent - if (variableDeclaration.parent.parent.kind === 202 /* ForInStatement */ || - variableDeclaration.parent.parent.kind === 203 /* ForOfStatement */) { + if (variableDeclaration.parent.parent.kind === 203 /* ForInStatement */) { return spanInNode(variableDeclaration.parent.parent); } - var isParentVariableStatement = variableDeclaration.parent.parent.kind === 195 /* VariableStatement */; - var isDeclarationOfForStatement = variableDeclaration.parent.parent.kind === 201 /* ForStatement */ && ts.contains(variableDeclaration.parent.parent.initializer.declarations, variableDeclaration); - var declarations = isParentVariableStatement - ? variableDeclaration.parent.parent.declarationList.declarations - : isDeclarationOfForStatement - ? variableDeclaration.parent.parent.initializer.declarations - : undefined; - // Breakpoint is possible in variableDeclaration only if there is initialization - if (variableDeclaration.initializer || (variableDeclaration.flags & 2 /* Export */)) { - if (declarations && declarations[0] === variableDeclaration) { - if (isParentVariableStatement) { - // First declaration - include let keyword - return textSpan(variableDeclaration.parent, variableDeclaration); - } - else { - ts.Debug.assert(isDeclarationOfForStatement); - // Include let keyword from for statement declarations in the span - return textSpan(ts.findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent), variableDeclaration); - } - } - else { - // Span only on this declaration - return textSpan(variableDeclaration); - } + // If this is a destructuring pattern set breakpoint in binding pattern + if (ts.isBindingPattern(variableDeclaration.name)) { + return spanInBindingPattern(variableDeclaration.name); } - else if (declarations && declarations[0] !== variableDeclaration) { + // Breakpoint is possible in variableDeclaration only if there is initialization + // or its declaration from 'for of' + if (variableDeclaration.initializer || + (variableDeclaration.flags & 2 /* Export */) || + variableDeclaration.parent.parent.kind === 204 /* ForOfStatement */) { + return textSpanFromVariableDeclaration(variableDeclaration); + } + var declarations = variableDeclaration.parent.declarations; + if (declarations && declarations[0] !== variableDeclaration) { // If we cant set breakpoint on this declaration, set it on previous one - var indexOfCurrentDeclaration = ts.indexOf(declarations, variableDeclaration); - return spanInVariableDeclaration(declarations[indexOfCurrentDeclaration - 1]); + // Because the variable declaration may be binding pattern and + // we would like to set breakpoint in last binding element if thats the case, + // use preceding token instead + return spanInNode(ts.findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent)); } } function canHaveSpanInParameterDeclaration(parameter) { @@ -51706,7 +52398,11 @@ var ts; !!(parameter.flags & 8 /* Public */) || !!(parameter.flags & 16 /* Private */); } function spanInParameterDeclaration(parameter) { - if (canHaveSpanInParameterDeclaration(parameter)) { + if (ts.isBindingPattern(parameter.name)) { + // set breakpoint in binding pattern + return spanInBindingPattern(parameter.name); + } + else if (canHaveSpanInParameterDeclaration(parameter)) { return textSpan(parameter); } else { @@ -51724,7 +52420,7 @@ var ts; } function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) { return !!(functionDeclaration.flags & 2 /* Export */) || - (functionDeclaration.parent.kind === 216 /* ClassDeclaration */ && functionDeclaration.kind !== 144 /* Constructor */); + (functionDeclaration.parent.kind === 217 /* ClassDeclaration */ && functionDeclaration.kind !== 145 /* Constructor */); } function spanInFunctionDeclaration(functionDeclaration) { // No breakpoints in the function signature @@ -51747,34 +52443,39 @@ var ts; } function spanInBlock(block) { switch (block.parent.kind) { - case 220 /* ModuleDeclaration */: + case 221 /* ModuleDeclaration */: if (ts.getModuleInstanceState(block.parent) !== 1 /* Instantiated */) { return undefined; } // Set on parent if on same line otherwise on first statement - case 200 /* WhileStatement */: - case 198 /* IfStatement */: - case 202 /* ForInStatement */: - case 203 /* ForOfStatement */: + case 201 /* WhileStatement */: + case 199 /* IfStatement */: + case 203 /* ForInStatement */: return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]); // Set span on previous token if it starts on same line otherwise on the first statement of the block - case 201 /* ForStatement */: + case 202 /* ForStatement */: + case 204 /* ForOfStatement */: return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]); } // Default action is to set on first statement return spanInNode(block.statements[0]); } + function spanInInitializerOfForLike(forLikeStaement) { + if (forLikeStaement.initializer.kind === 215 /* VariableDeclarationList */) { + // declaration list, set breakpoint in first declaration + var variableDeclarationList = forLikeStaement.initializer; + if (variableDeclarationList.declarations.length > 0) { + return spanInNode(variableDeclarationList.declarations[0]); + } + } + else { + // Expression - set breakpoint in it + return spanInNode(forLikeStaement.initializer); + } + } function spanInForStatement(forStatement) { if (forStatement.initializer) { - if (forStatement.initializer.kind === 214 /* VariableDeclarationList */) { - var variableDeclarationList = forStatement.initializer; - if (variableDeclarationList.declarations.length > 0) { - return spanInNode(variableDeclarationList.declarations[0]); - } - } - else { - return spanInNode(forStatement.initializer); - } + return spanInInitializerOfForLike(forStatement); } if (forStatement.condition) { return textSpan(forStatement.condition); @@ -51783,16 +52484,44 @@ var ts; return textSpan(forStatement.incrementor); } } + function spanInBindingPattern(bindingPattern) { + // Set breakpoint in first binding element + var firstBindingElement = ts.forEach(bindingPattern.elements, function (element) { return element.kind !== 190 /* OmittedExpression */ ? element : undefined; }); + if (firstBindingElement) { + return spanInNode(firstBindingElement); + } + // Empty binding pattern of binding element, set breakpoint on binding element + if (bindingPattern.parent.kind === 166 /* BindingElement */) { + return textSpan(bindingPattern.parent); + } + // Variable declaration is used as the span + return textSpanFromVariableDeclaration(bindingPattern.parent); + } + function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node) { + ts.Debug.assert(node.kind !== 165 /* ArrayBindingPattern */ && node.kind !== 164 /* ObjectBindingPattern */); + var elements = node.kind === 167 /* ArrayLiteralExpression */ ? + node.elements : + node.properties; + var firstBindingElement = ts.forEach(elements, function (element) { return element.kind !== 190 /* OmittedExpression */ ? element : undefined; }); + if (firstBindingElement) { + return spanInNode(firstBindingElement); + } + // Could be ArrayLiteral from destructuring assignment or + // just nested element in another destructuring assignment + // set breakpoint on assignment when parent is destructuring assignment + // Otherwise set breakpoint for this element + return textSpan(node.parent.kind === 184 /* BinaryExpression */ ? node.parent : node); + } // Tokens: function spanInOpenBraceToken(node) { switch (node.parent.kind) { - case 219 /* EnumDeclaration */: + case 220 /* EnumDeclaration */: var enumDeclaration = node.parent; return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile)); - case 216 /* ClassDeclaration */: + case 217 /* ClassDeclaration */: var classDeclaration = node.parent; return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile)); - case 222 /* CaseBlock */: + case 223 /* CaseBlock */: return spanInNodeIfStartsOnSameLine(node.parent.parent, node.parent.clauses[0]); } // Default to parent node @@ -51800,24 +52529,24 @@ var ts; } function spanInCloseBraceToken(node) { switch (node.parent.kind) { - case 221 /* ModuleBlock */: + case 222 /* ModuleBlock */: // If this is not instantiated module block no bp span if (ts.getModuleInstanceState(node.parent.parent) !== 1 /* Instantiated */) { return undefined; } - case 219 /* EnumDeclaration */: - case 216 /* ClassDeclaration */: + case 220 /* EnumDeclaration */: + case 217 /* ClassDeclaration */: // Span on close brace token return textSpan(node); - case 194 /* Block */: + case 195 /* Block */: if (ts.isFunctionBlock(node.parent)) { // Span on close brace token return textSpan(node); } // fall through. - case 246 /* CatchClause */: + case 247 /* CatchClause */: return spanInNode(ts.lastOrUndefined(node.parent.statements)); - case 222 /* CaseBlock */: + case 223 /* CaseBlock */: // breakpoint in last statement of the last clause var caseBlock = node.parent; var lastClause = ts.lastOrUndefined(caseBlock.clauses); @@ -51825,33 +52554,66 @@ var ts; return spanInNode(ts.lastOrUndefined(lastClause.statements)); } return undefined; + case 164 /* ObjectBindingPattern */: + // Breakpoint in last binding element or binding pattern if it contains no elements + var bindingPattern = node.parent; + return spanInNode(ts.lastOrUndefined(bindingPattern.elements) || bindingPattern); // Default to parent node default: + if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) { + // Breakpoint in last binding element or binding pattern if it contains no elements + var objectLiteral = node.parent; + return textSpan(ts.lastOrUndefined(objectLiteral.properties) || objectLiteral); + } + return spanInNode(node.parent); + } + } + function spanInCloseBracketToken(node) { + switch (node.parent.kind) { + case 165 /* ArrayBindingPattern */: + // Breakpoint in last binding element or binding pattern if it contains no elements + var bindingPattern = node.parent; + return textSpan(ts.lastOrUndefined(bindingPattern.elements) || bindingPattern); + default: + if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) { + // Breakpoint in last binding element or binding pattern if it contains no elements + var arrayLiteral = node.parent; + return textSpan(ts.lastOrUndefined(arrayLiteral.elements) || arrayLiteral); + } + // Default to parent node return spanInNode(node.parent); } } function spanInOpenParenToken(node) { - if (node.parent.kind === 199 /* DoStatement */) { - // Go to while keyword and do action instead + if (node.parent.kind === 200 /* DoStatement */ || + node.parent.kind === 171 /* CallExpression */ || + node.parent.kind === 172 /* NewExpression */) { return spanInPreviousNode(node); } + if (node.parent.kind === 175 /* ParenthesizedExpression */) { + return spanInNextNode(node); + } // Default to parent node return spanInNode(node.parent); } function spanInCloseParenToken(node) { // Is this close paren token of parameter list, set span in previous token switch (node.parent.kind) { - case 175 /* FunctionExpression */: - case 215 /* FunctionDeclaration */: - case 176 /* ArrowFunction */: - case 143 /* MethodDeclaration */: - case 142 /* MethodSignature */: - case 145 /* GetAccessor */: - case 146 /* SetAccessor */: - case 144 /* Constructor */: - case 200 /* WhileStatement */: - case 199 /* DoStatement */: - case 201 /* ForStatement */: + case 176 /* FunctionExpression */: + case 216 /* FunctionDeclaration */: + case 177 /* ArrowFunction */: + case 144 /* MethodDeclaration */: + case 143 /* MethodSignature */: + case 146 /* GetAccessor */: + case 147 /* SetAccessor */: + case 145 /* Constructor */: + case 201 /* WhileStatement */: + case 200 /* DoStatement */: + case 202 /* ForStatement */: + case 204 /* ForOfStatement */: + case 171 /* CallExpression */: + case 172 /* NewExpression */: + case 175 /* ParenthesizedExpression */: return spanInPreviousNode(node); // Default to parent node default: @@ -51860,21 +52622,31 @@ var ts; } function spanInColonToken(node) { // Is this : specifying return annotation of the function declaration - if (ts.isFunctionLike(node.parent) || node.parent.kind === 247 /* PropertyAssignment */) { + if (ts.isFunctionLike(node.parent) || + node.parent.kind === 248 /* PropertyAssignment */ || + node.parent.kind === 139 /* Parameter */) { return spanInPreviousNode(node); } return spanInNode(node.parent); } function spanInGreaterThanOrLessThanToken(node) { - if (node.parent.kind === 173 /* TypeAssertionExpression */) { - return spanInNode(node.parent.expression); + if (node.parent.kind === 174 /* TypeAssertionExpression */) { + return spanInNextNode(node); } return spanInNode(node.parent); } function spanInWhileKeyword(node) { - if (node.parent.kind === 199 /* DoStatement */) { + if (node.parent.kind === 200 /* DoStatement */) { // Set span on while expression - return textSpan(node, ts.findNextToken(node.parent.expression, node.parent)); + return textSpanEndingAtNextToken(node, node.parent.expression); + } + // Default to parent node + return spanInNode(node.parent); + } + function spanInOfKeyword(node) { + if (node.parent.kind === 204 /* ForOfStatement */) { + // set using next token + return spanInNextNode(node); } // Default to parent node return spanInNode(node.parent); From 31f5502f2b4ae4e4ad1253c0f63b5e0241c8447f Mon Sep 17 00:00:00 2001 From: Zhengbo Li Date: Thu, 21 Jan 2016 16:05:44 -0800 Subject: [PATCH 187/209] set default module to commonjs for jsconfig.json --- src/compiler/commandLineParser.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 2e6727749f1..733e3158593 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -552,6 +552,7 @@ namespace ts { const errors: Diagnostic[] = []; if (configFileName && getBaseFileName(configFileName) === "jsconfig.json") { + options.module = ModuleKind.CommonJS; options.allowJs = true; } From 1eda3efbed0c605b7c354a5d3e0002f4ec14652c Mon Sep 17 00:00:00 2001 From: YuichiNukiyama Date: Fri, 22 Jan 2016 12:08:28 +0000 Subject: [PATCH 188/209] Add Array.prototype.includes Add Array.prototype.includes method. method of comments I've quoted from [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes). And change Jakefiles.js to build lib.es7.d.ts. --- Jakefile.js | 4 ++- src/lib/es7.d.ts | 89 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 src/lib/es7.d.ts diff --git a/Jakefile.js b/Jakefile.js index 7024ad2afdf..7b85aacaa89 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -169,7 +169,9 @@ var librarySourceMap = [ { target: "lib.scriptHost.d.ts", sources: ["importcore.d.ts", "scriptHost.d.ts"], }, { target: "lib.d.ts", sources: ["header.d.ts", "core.d.ts", "intl.d.ts", "dom.generated.d.ts", "webworker.importscripts.d.ts", "scriptHost.d.ts"], }, { target: "lib.core.es6.d.ts", sources: ["header.d.ts", "core.d.ts", "es6.d.ts"]}, - { target: "lib.es6.d.ts", sources: ["header.d.ts", "es6.d.ts", "core.d.ts", "intl.d.ts", "dom.generated.d.ts", "dom.es6.d.ts", "webworker.importscripts.d.ts", "scriptHost.d.ts"] } + { target: "lib.es6.d.ts", sources: ["header.d.ts", "es6.d.ts", "core.d.ts", "intl.d.ts", "dom.generated.d.ts", "dom.es6.d.ts", "webworker.importscripts.d.ts", "scriptHost.d.ts"] }, + { target: "lib.core.es7.d.ts", sources: ["header.d.ts", "core.d.ts", "es6.d.ts", "es7.d.ts"]}, + { target: "lib.es7.d.ts", sources: ["header.d.ts", "es6.d.ts", "es7.d.ts", "core.d.ts", "intl.d.ts", "dom.generated.d.ts", "dom.es6.d.ts", "webworker.importscripts.d.ts", "scriptHost.d.ts"] } ]; var libraryTargets = librarySourceMap.map(function (f) { diff --git a/src/lib/es7.d.ts b/src/lib/es7.d.ts new file mode 100644 index 00000000000..f5dac64b43c --- /dev/null +++ b/src/lib/es7.d.ts @@ -0,0 +1,89 @@ +interface Array { + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: T, fromIndex?: number): boolean; +} + +interface Int8Array { + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: Int8Array, fromIndex?: number): boolean; +} + +interface Uint8Array { + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; +} + +interface Uint8ClampedArray { + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; +} + +interface Int16Array { + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; +} + +interface Uint16Array { + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; +} + +interface Int32Array { + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; +} + +interface Uint32Array { + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; +} + +interface Float32Array { + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; +} + +interface Float64Array { + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; +} \ No newline at end of file From d5a585fb96c7766c17af16d1eebce6406ee95032 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 22 Jan 2016 13:43:23 -0800 Subject: [PATCH 189/209] Fix 'includes' method in 'Int8Array'. --- src/lib/es7.d.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/lib/es7.d.ts b/src/lib/es7.d.ts index f5dac64b43c..17b3eaac1d3 100644 --- a/src/lib/es7.d.ts +++ b/src/lib/es7.d.ts @@ -2,7 +2,7 @@ interface Array { /** * Determines whether an array includes a certain element, returning true or false as appropriate. * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. + * @param fromIndex The position in this array at which to begin searching for searchElement. */ includes(searchElement: T, fromIndex?: number): boolean; } @@ -11,16 +11,16 @@ interface Int8Array { /** * Determines whether an array includes a certain element, returning true or false as appropriate. * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. + * @param fromIndex The position in this array at which to begin searching for searchElement. */ - includes(searchElement: Int8Array, fromIndex?: number): boolean; + includes(searchElement: number, fromIndex?: number): boolean; } interface Uint8Array { /** * Determines whether an array includes a certain element, returning true or false as appropriate. * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. + * @param fromIndex The position in this array at which to begin searching for searchElement. */ includes(searchElement: number, fromIndex?: number): boolean; } @@ -29,7 +29,7 @@ interface Uint8ClampedArray { /** * Determines whether an array includes a certain element, returning true or false as appropriate. * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. + * @param fromIndex The position in this array at which to begin searching for searchElement. */ includes(searchElement: number, fromIndex?: number): boolean; } @@ -38,7 +38,7 @@ interface Int16Array { /** * Determines whether an array includes a certain element, returning true or false as appropriate. * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. + * @param fromIndex The position in this array at which to begin searching for searchElement. */ includes(searchElement: number, fromIndex?: number): boolean; } @@ -47,7 +47,7 @@ interface Uint16Array { /** * Determines whether an array includes a certain element, returning true or false as appropriate. * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. + * @param fromIndex The position in this array at which to begin searching for searchElement. */ includes(searchElement: number, fromIndex?: number): boolean; } @@ -56,7 +56,7 @@ interface Int32Array { /** * Determines whether an array includes a certain element, returning true or false as appropriate. * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. + * @param fromIndex The position in this array at which to begin searching for searchElement. */ includes(searchElement: number, fromIndex?: number): boolean; } @@ -65,7 +65,7 @@ interface Uint32Array { /** * Determines whether an array includes a certain element, returning true or false as appropriate. * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. + * @param fromIndex The position in this array at which to begin searching for searchElement. */ includes(searchElement: number, fromIndex?: number): boolean; } @@ -74,7 +74,7 @@ interface Float32Array { /** * Determines whether an array includes a certain element, returning true or false as appropriate. * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. + * @param fromIndex The position in this array at which to begin searching for searchElement. */ includes(searchElement: number, fromIndex?: number): boolean; } @@ -83,7 +83,7 @@ interface Float64Array { /** * Determines whether an array includes a certain element, returning true or false as appropriate. * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. + * @param fromIndex The position in this array at which to begin searching for searchElement. */ includes(searchElement: number, fromIndex?: number): boolean; } \ No newline at end of file From 6303d8c723a772b6f12459c561fb88e83232a26a Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Fri, 22 Jan 2016 15:13:54 -0800 Subject: [PATCH 190/209] Remove incorrect changes from server.ts --- src/server/server.ts | 46 -------------------------------------------- 1 file changed, 46 deletions(-) diff --git a/src/server/server.ts b/src/server/server.ts index 5c2fd7d1c43..d9f078ac0eb 100644 --- a/src/server/server.ts +++ b/src/server/server.ts @@ -7,58 +7,12 @@ namespace ts.server { const readline: NodeJS.ReadLine = require("readline"); const fs: typeof NodeJS.fs = require("fs"); - // TODO: "net" module not defined in local node.d.ts - const net: any = require("net"); - const rl = readline.createInterface({ input: process.stdin, output: process.stdout, terminal: false, }); - // Need to write directly to stdout, else rl.write also causes an input "line" event - // See https://github.com/joyent/node/issues/4243 - let writeHost = (data: string) => process.stdout.write(data); - - // Stubs for I/O - const onInput = (input: string) => { return; }; - const onClose = () => { return; }; - - // Use a socket for comms if defined - const tss_debug: string = process.env["TSS_DEBUG"]; - let tcp_port = 0; - if (tss_debug) { - tss_debug.split(" ").forEach( param => { - if (param.indexOf("port=") === 0) { - tcp_port = parseInt(param.substring(5)); - } - }); - if (tcp_port) { - net.createServer( (socket: any) => { - // Called once a connection is made - socket.setEncoding("utf8"); - // Wire up the I/O handers to the socket - writeHost = (data: string) => { - socket.write(data); - return true; - }; - socket.on("data", (data: string) => { - // May get multiple requests in one network read - if (data) { - data.trim().split(/(\r\n)|\n/).forEach(line => onInput(line)); - } - }); - socket.on("end", onClose); - - }).listen(tcp_port); - } - } - if (!tcp_port) { - // If not using tcp, wire up the I/O handler to stdin/stdout - rl.on("line", (input: string) => onInput(input)); - rl.on("close", () => onClose()); - } - class Logger implements ts.server.Logger { fd = -1; seq = 0; From af4fb093f762830fdd8170959774c144b1a638b5 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Fri, 22 Jan 2016 15:14:29 -0800 Subject: [PATCH 191/209] Rename getTypeParametersFromJSDocTemplate --- src/compiler/checker.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 9c22ca33620..26b80b1aeee 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -3958,7 +3958,7 @@ namespace ts { return getIndexTypeOfStructuredType(getApparentType(type), kind); } - function getTypeParametersFromSignatureDeclaration(declaration: SignatureDeclaration): TypeParameter[] { + function getTypeParametersFromJSDocTemplate(declaration: SignatureDeclaration): TypeParameter[] { if (declaration.parserContextFlags & ParserContextFlags.JavaScriptFile) { const templateTag = getJSDocTemplateTag(declaration); if (templateTag) { @@ -4055,7 +4055,7 @@ namespace ts { : undefined; const typeParameters = classType ? classType.localTypeParameters : declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) : - getTypeParametersFromSignatureDeclaration(declaration); + getTypeParametersFromJSDocTemplate(declaration); const parameters: Symbol[] = []; let hasStringLiterals = false; let minArgumentCount = -1; From a07a7c0b3cec17c4abadc1dad24b911c5b821656 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Fri, 22 Jan 2016 15:14:58 -0800 Subject: [PATCH 192/209] Remove unreachable code --- src/compiler/checker.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 26b80b1aeee..fb083d5c5c2 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -3966,10 +3966,6 @@ namespace ts { } } - if (declaration.typeParameters) { - return getTypeParametersFromDeclaration(declaration.typeParameters); - } - return undefined; } From 0d480a6e1b8c0bf8b8799ea70f2dab39c2ad3c88 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Fri, 22 Jan 2016 15:15:58 -0800 Subject: [PATCH 193/209] Remove value-side JSDoc type lookup fallback --- src/compiler/checker.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index fb083d5c5c2..82b6acadc5a 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -4444,14 +4444,7 @@ namespace ts { return unknownSymbol; } - let symbol = resolveEntityName(typeReferenceName, SymbolFlags.Type); - if (!symbol && node.kind === SyntaxKind.JSDocTypeReference) { - // If the reference didn't resolve to a type, try seeing if results to a - // value. If it does, get the type of that value. - symbol = resolveEntityName(typeReferenceName, SymbolFlags.Value); - } - - return symbol || unknownSymbol; + return resolveEntityName(typeReferenceName, SymbolFlags.Type) || unknownSymbol; } function getTypeReferenceType(node: TypeReferenceNode | ExpressionWithTypeArguments | JSDocTypeReference, symbol: Symbol) { From d54f3cb7e7780e4fbb3dc045001a32ecff2c521f Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Fri, 22 Jan 2016 15:16:27 -0800 Subject: [PATCH 194/209] Remove obsoleted test --- tests/cases/fourslash/getJavaScriptQuickInfo7.ts | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 tests/cases/fourslash/getJavaScriptQuickInfo7.ts diff --git a/tests/cases/fourslash/getJavaScriptQuickInfo7.ts b/tests/cases/fourslash/getJavaScriptQuickInfo7.ts deleted file mode 100644 index 282f5aeabfd..00000000000 --- a/tests/cases/fourslash/getJavaScriptQuickInfo7.ts +++ /dev/null @@ -1,10 +0,0 @@ -/// - -// @allowNonTsExtensions: true -// @Filename: Foo.js -//// function f(a,b) { } -//// /** @type {f} */ -//// var v/**/ - -goTo.marker(); -verify.quickInfoIs('var v: (a: any, b: any) => void'); \ No newline at end of file From 57fb5fa67bfd7edfc3e8279f2070a474477f58e1 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Fri, 22 Jan 2016 15:17:20 -0800 Subject: [PATCH 195/209] Consolidate branches --- src/compiler/checker.ts | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 82b6acadc5a..4ea8c71e054 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7283,25 +7283,25 @@ namespace ts { return container.flags & NodeFlags.Static ? getTypeOfSymbol(symbol) : (getDeclaredTypeOfSymbol(symbol)).thisType; } - if (container.parserContextFlags & ParserContextFlags.JavaScriptFile) { + if (isInJavaScriptFile(node)) { const type = getTypeForThisExpressionFromJSDoc(container); if (type && type !== unknownType) { return type; } - } - // If this is a function in a JS file, it might be a class method. Check if it's the RHS - // of a x.prototype.y = function [name]() { .... } - if (isInJavaScriptFile(node) && container.kind === SyntaxKind.FunctionExpression) { - if (getSpecialPropertyAssignmentKind(container.parent) === SpecialPropertyAssignmentKind.PrototypeProperty) { - // Get the 'x' of 'x.prototype.y = f' (here, 'f' is 'container') - const className = (((container.parent as BinaryExpression) // x.protoype.y = f - .left as PropertyAccessExpression) // x.prototype.y - .expression as PropertyAccessExpression) // x.prototype - .expression; // x - const classSymbol = checkExpression(className).symbol; - if (classSymbol && classSymbol.members && (classSymbol.flags & SymbolFlags.Function)) { - return getInferredClassType(classSymbol); + // If this is a function in a JS file, it might be a class method. Check if it's the RHS + // of a x.prototype.y = function [name]() { .... } + if (container.kind === SyntaxKind.FunctionExpression) { + if (getSpecialPropertyAssignmentKind(container.parent) === SpecialPropertyAssignmentKind.PrototypeProperty) { + // Get the 'x' of 'x.prototype.y = f' (here, 'f' is 'container') + const className = (((container.parent as BinaryExpression) // x.protoype.y = f + .left as PropertyAccessExpression) // x.prototype.y + .expression as PropertyAccessExpression) // x.prototype + .expression; // x + const classSymbol = checkExpression(className).symbol; + if (classSymbol && classSymbol.members && (classSymbol.flags & SymbolFlags.Function)) { + return getInferredClassType(classSymbol); + } } } } From 00398d6c9e0a326fe712d083149d99d306f73b4c Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Fri, 22 Jan 2016 15:41:00 -0800 Subject: [PATCH 196/209] Remove unrelated changes --- src/compiler/sys.ts | 2 ++ src/harness/harness.ts | 2 +- src/services/services.ts | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 094bc810036..bf25d39aa43 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -605,6 +605,8 @@ namespace ts { return getWScriptSystem(); } else if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") { + // process and process.nextTick checks if current environment is node-like + // process.browser check excludes webpack and browserify return getNodeSystem(); } else if (typeof ChakraHost !== "undefined") { diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 329834cb15d..7fd81973172 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -1593,7 +1593,7 @@ namespace Harness { return { unitName: libFile, content: io.readFile(libFile) }; } - if (Error) (Error).stackTraceLimit = 25; + if (Error) (Error).stackTraceLimit = 1; } // TODO: not sure why Utils.evalFile isn't working with this, eventually will concat it like old compiler instead of eval diff --git a/src/services/services.ts b/src/services/services.ts index 1d0cc4a4597..0fae1c0aa45 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -2188,6 +2188,7 @@ namespace ts { } return true; } + return false; } @@ -2370,7 +2371,6 @@ namespace ts { // skip open bracket token = scanner.scan(); - let i = 0; // scan until ']' or EOF while (token !== SyntaxKind.CloseBracketToken && token !== SyntaxKind.EndOfFileToken) { From 5cb13f390967ea50f92894149713d14321c31984 Mon Sep 17 00:00:00 2001 From: falsandtru Date: Sat, 23 Jan 2016 19:08:32 +0900 Subject: [PATCH 197/209] Remove `clear` method in `WeakSet` and `WeakMap` --- src/lib/es6.d.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/lib/es6.d.ts b/src/lib/es6.d.ts index 44e5e49f984..f5d6b06bc47 100644 --- a/src/lib/es6.d.ts +++ b/src/lib/es6.d.ts @@ -819,7 +819,6 @@ interface MapConstructor { declare var Map: MapConstructor; interface WeakMap { - clear(): void; delete(key: K): boolean; get(key: K): V; has(key: K): boolean; @@ -859,7 +858,6 @@ declare var Set: SetConstructor; interface WeakSet { add(value: T): WeakSet; - clear(): void; delete(value: T): boolean; has(value: T): boolean; [Symbol.toStringTag]: "WeakSet"; From ac196eb2aa509c8d270fa47a2e2a8defe23dc034 Mon Sep 17 00:00:00 2001 From: york yao Date: Sun, 24 Jan 2016 17:10:44 +0800 Subject: [PATCH 198/209] use `const` rather than `var` when emitting external import declaration and the target is es6 --- src/compiler/emitter.ts | 23 ++++++++++++++++--- .../reference/asyncImportedPromise_es6.js | 2 +- ...rtDefaultBindingFollowedWithNamedImport.js | 10 ++++---- .../reference/es6ImportNameSpaceImport.js | 2 +- .../reference/es6ImportNamedImport.js | 18 +++++++-------- .../es6ImportNamedImportInExportAssignment.js | 2 +- .../reference/exportsAndImports1-es6.js | 2 +- .../reference/exportsAndImports2-es6.js | 2 +- .../reference/exportsAndImports3-es6.js | 2 +- .../reference/exportsAndImports4-es6.js | 12 +++++----- .../shorthandPropertyAssignmentInES6Module.js | 4 ++-- 11 files changed, 48 insertions(+), 31 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 44cb0ea3ccf..dbde9c14153 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -6107,7 +6107,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge if (namespaceDeclaration && !isDefaultImport(node)) { // import x = require("foo") // import * as x from "foo" - if (!isExportedImport) write("var "); + if (!isExportedImport) { + if (languageVersion !== ScriptTarget.ES6) { + write("var "); + } + else { + write("const "); + } + }; emitModuleMemberName(namespaceDeclaration); write(" = "); } @@ -6119,7 +6126,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge // import d, { x, y } from "foo" const isNakedImport = SyntaxKind.ImportDeclaration && !(node).importClause; if (!isNakedImport) { - write("var "); + if (languageVersion !== ScriptTarget.ES6) { + write("var "); + } + else { + write("const "); + } write(getGeneratedNameForNode(node)); write(" = "); } @@ -6146,7 +6158,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge } else if (namespaceDeclaration && isDefaultImport(node)) { // import d, * as x from "foo" - write("var "); + if (languageVersion !== ScriptTarget.ES6) { + write("var "); + } + else { + write("const "); + } emitModuleMemberName(namespaceDeclaration); write(" = "); write(getGeneratedNameForNode(node)); diff --git a/tests/baselines/reference/asyncImportedPromise_es6.js b/tests/baselines/reference/asyncImportedPromise_es6.js index d861012488c..a63d7844f4c 100644 --- a/tests/baselines/reference/asyncImportedPromise_es6.js +++ b/tests/baselines/reference/asyncImportedPromise_es6.js @@ -24,7 +24,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.call(thisArg, _arguments)).next()); }); }; -var task_1 = require("./task"); +const task_1 = require("./task"); class Test { example() { return __awaiter(this, void 0, task_1.Task, function* () { return; }); diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.js index d7dfe29208d..4bff2abf82d 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.js @@ -31,16 +31,16 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = {}; //// [es6ImportDefaultBindingFollowedWithNamedImport_1.js] "use strict"; -var es6ImportDefaultBindingFollowedWithNamedImport_0_1 = require("./es6ImportDefaultBindingFollowedWithNamedImport_0"); +const es6ImportDefaultBindingFollowedWithNamedImport_0_1 = require("./es6ImportDefaultBindingFollowedWithNamedImport_0"); var x1 = es6ImportDefaultBindingFollowedWithNamedImport_0_1.a; -var es6ImportDefaultBindingFollowedWithNamedImport_0_2 = require("./es6ImportDefaultBindingFollowedWithNamedImport_0"); +const es6ImportDefaultBindingFollowedWithNamedImport_0_2 = require("./es6ImportDefaultBindingFollowedWithNamedImport_0"); var x1 = es6ImportDefaultBindingFollowedWithNamedImport_0_2.a; -var es6ImportDefaultBindingFollowedWithNamedImport_0_3 = require("./es6ImportDefaultBindingFollowedWithNamedImport_0"); +const es6ImportDefaultBindingFollowedWithNamedImport_0_3 = require("./es6ImportDefaultBindingFollowedWithNamedImport_0"); var x1 = es6ImportDefaultBindingFollowedWithNamedImport_0_3.x; var x1 = es6ImportDefaultBindingFollowedWithNamedImport_0_3.a; -var es6ImportDefaultBindingFollowedWithNamedImport_0_4 = require("./es6ImportDefaultBindingFollowedWithNamedImport_0"); +const es6ImportDefaultBindingFollowedWithNamedImport_0_4 = require("./es6ImportDefaultBindingFollowedWithNamedImport_0"); var x1 = es6ImportDefaultBindingFollowedWithNamedImport_0_4.x; -var es6ImportDefaultBindingFollowedWithNamedImport_0_5 = require("./es6ImportDefaultBindingFollowedWithNamedImport_0"); +const es6ImportDefaultBindingFollowedWithNamedImport_0_5 = require("./es6ImportDefaultBindingFollowedWithNamedImport_0"); var x1 = es6ImportDefaultBindingFollowedWithNamedImport_0_5.m; diff --git a/tests/baselines/reference/es6ImportNameSpaceImport.js b/tests/baselines/reference/es6ImportNameSpaceImport.js index 685e1cf643c..8e109779f45 100644 --- a/tests/baselines/reference/es6ImportNameSpaceImport.js +++ b/tests/baselines/reference/es6ImportNameSpaceImport.js @@ -15,7 +15,7 @@ import * as nameSpaceBinding2 from "./es6ImportNameSpaceImport_0"; // elide this exports.a = 10; //// [es6ImportNameSpaceImport_1.js] "use strict"; -var nameSpaceBinding = require("./es6ImportNameSpaceImport_0"); +const nameSpaceBinding = require("./es6ImportNameSpaceImport_0"); var x = nameSpaceBinding.a; diff --git a/tests/baselines/reference/es6ImportNamedImport.js b/tests/baselines/reference/es6ImportNamedImport.js index 73fe8f4ec1b..8dbdf7ce6f1 100644 --- a/tests/baselines/reference/es6ImportNamedImport.js +++ b/tests/baselines/reference/es6ImportNamedImport.js @@ -53,26 +53,26 @@ exports.z2 = 10; exports.aaaa = 10; //// [es6ImportNamedImport_1.js] "use strict"; -var es6ImportNamedImport_0_1 = require("./es6ImportNamedImport_0"); +const es6ImportNamedImport_0_1 = require("./es6ImportNamedImport_0"); var xxxx = es6ImportNamedImport_0_1.a; -var es6ImportNamedImport_0_2 = require("./es6ImportNamedImport_0"); +const es6ImportNamedImport_0_2 = require("./es6ImportNamedImport_0"); var xxxx = es6ImportNamedImport_0_2.a; -var es6ImportNamedImport_0_3 = require("./es6ImportNamedImport_0"); +const es6ImportNamedImport_0_3 = require("./es6ImportNamedImport_0"); var xxxx = es6ImportNamedImport_0_3.x; var xxxx = es6ImportNamedImport_0_3.a; -var es6ImportNamedImport_0_4 = require("./es6ImportNamedImport_0"); +const es6ImportNamedImport_0_4 = require("./es6ImportNamedImport_0"); var xxxx = es6ImportNamedImport_0_4.x; -var es6ImportNamedImport_0_5 = require("./es6ImportNamedImport_0"); +const es6ImportNamedImport_0_5 = require("./es6ImportNamedImport_0"); var xxxx = es6ImportNamedImport_0_5.m; -var es6ImportNamedImport_0_6 = require("./es6ImportNamedImport_0"); +const es6ImportNamedImport_0_6 = require("./es6ImportNamedImport_0"); var xxxx = es6ImportNamedImport_0_6.a1; var xxxx = es6ImportNamedImport_0_6.x1; -var es6ImportNamedImport_0_7 = require("./es6ImportNamedImport_0"); +const es6ImportNamedImport_0_7 = require("./es6ImportNamedImport_0"); var xxxx = es6ImportNamedImport_0_7.a1; var xxxx = es6ImportNamedImport_0_7.x1; -var es6ImportNamedImport_0_8 = require("./es6ImportNamedImport_0"); +const es6ImportNamedImport_0_8 = require("./es6ImportNamedImport_0"); var z111 = es6ImportNamedImport_0_8.z1; -var es6ImportNamedImport_0_9 = require("./es6ImportNamedImport_0"); +const es6ImportNamedImport_0_9 = require("./es6ImportNamedImport_0"); var z2 = es6ImportNamedImport_0_9.z2; // z2 shouldn't give redeclare error diff --git a/tests/baselines/reference/es6ImportNamedImportInExportAssignment.js b/tests/baselines/reference/es6ImportNamedImportInExportAssignment.js index b67f61e88ae..38766d32cd9 100644 --- a/tests/baselines/reference/es6ImportNamedImportInExportAssignment.js +++ b/tests/baselines/reference/es6ImportNamedImportInExportAssignment.js @@ -13,7 +13,7 @@ export = a; exports.a = 10; //// [es6ImportNamedImportInExportAssignment_1.js] "use strict"; -var es6ImportNamedImportInExportAssignment_0_1 = require("./es6ImportNamedImportInExportAssignment_0"); +const es6ImportNamedImportInExportAssignment_0_1 = require("./es6ImportNamedImportInExportAssignment_0"); module.exports = es6ImportNamedImportInExportAssignment_0_1.a; diff --git a/tests/baselines/reference/exportsAndImports1-es6.js b/tests/baselines/reference/exportsAndImports1-es6.js index ece98a80318..3ac5aeb0dc5 100644 --- a/tests/baselines/reference/exportsAndImports1-es6.js +++ b/tests/baselines/reference/exportsAndImports1-es6.js @@ -67,7 +67,7 @@ exports.M = t1_1.M; exports.a = t1_1.a; //// [t3.js] "use strict"; -var t1_1 = require("./t1"); +const t1_1 = require("./t1"); exports.v = t1_1.v; exports.f = t1_1.f; exports.C = t1_1.C; diff --git a/tests/baselines/reference/exportsAndImports2-es6.js b/tests/baselines/reference/exportsAndImports2-es6.js index 865534b2851..56639bdbecf 100644 --- a/tests/baselines/reference/exportsAndImports2-es6.js +++ b/tests/baselines/reference/exportsAndImports2-es6.js @@ -24,6 +24,6 @@ exports.y = t1_1.x; exports.x = t1_1.y; //// [t3.js] "use strict"; -var t1_1 = require("./t1"); +const t1_1 = require("./t1"); exports.y = t1_1.x; exports.x = t1_1.y; diff --git a/tests/baselines/reference/exportsAndImports3-es6.js b/tests/baselines/reference/exportsAndImports3-es6.js index ed509d31437..ea16836b1f2 100644 --- a/tests/baselines/reference/exportsAndImports3-es6.js +++ b/tests/baselines/reference/exportsAndImports3-es6.js @@ -69,7 +69,7 @@ exports.M = t1_1.M1; exports.a = t1_1.a1; //// [t3.js] "use strict"; -var t1_1 = require("./t1"); +const t1_1 = require("./t1"); exports.v = t1_1.v1; exports.f = t1_1.f1; exports.C = t1_1.C1; diff --git a/tests/baselines/reference/exportsAndImports4-es6.js b/tests/baselines/reference/exportsAndImports4-es6.js index 39c6583e935..8a8d4f81225 100644 --- a/tests/baselines/reference/exportsAndImports4-es6.js +++ b/tests/baselines/reference/exportsAndImports4-es6.js @@ -45,24 +45,24 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = "hello"; //// [t3.js] "use strict"; -var a = require("./t1"); +const a = require("./t1"); exports.a = a; a.default; -var t1_1 = require("./t1"); +const t1_1 = require("./t1"); exports.b = t1_1.default; t1_1.default; -var c = require("./t1"); +const c = require("./t1"); exports.c = c; c.default; -var t1_2 = require("./t1"); +const t1_2 = require("./t1"); exports.d = t1_2.default; t1_2.default; -var t1_3 = require("./t1"), e2 = t1_3; +const t1_3 = require("./t1"), e2 = t1_3; exports.e1 = t1_3.default; exports.e2 = e2; t1_3.default; e2.default; -var t1_4 = require("./t1"); +const t1_4 = require("./t1"); exports.f1 = t1_4.default; exports.f2 = t1_4.default; t1_4.default; diff --git a/tests/baselines/reference/shorthandPropertyAssignmentInES6Module.js b/tests/baselines/reference/shorthandPropertyAssignmentInES6Module.js index cab16b96bc3..d52622dffc7 100644 --- a/tests/baselines/reference/shorthandPropertyAssignmentInES6Module.js +++ b/tests/baselines/reference/shorthandPropertyAssignmentInES6Module.js @@ -20,8 +20,8 @@ use(foo); exports.x = 1; //// [test.js] "use strict"; -var existingModule_1 = require('./existingModule'); -var missingModule_1 = require('./missingModule'); +const existingModule_1 = require('./existingModule'); +const missingModule_1 = require('./missingModule'); const test = { x: existingModule_1.x, foo: missingModule_1.foo }; use(existingModule_1.x); use(missingModule_1.foo); From 88676d680fd8a887b0877b9cb8babf49fd787640 Mon Sep 17 00:00:00 2001 From: york yao Date: Mon, 25 Jan 2016 07:50:22 +0800 Subject: [PATCH 199/209] a better way since languageVersion is a number --- src/compiler/emitter.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index dbde9c14153..f6e70738071 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -6108,7 +6108,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge // import x = require("foo") // import * as x from "foo" if (!isExportedImport) { - if (languageVersion !== ScriptTarget.ES6) { + if (languageVersion <= ScriptTarget.ES5) { write("var "); } else { @@ -6126,7 +6126,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge // import d, { x, y } from "foo" const isNakedImport = SyntaxKind.ImportDeclaration && !(node).importClause; if (!isNakedImport) { - if (languageVersion !== ScriptTarget.ES6) { + if (languageVersion <= ScriptTarget.ES5) { write("var "); } else { @@ -6158,7 +6158,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge } else if (namespaceDeclaration && isDefaultImport(node)) { // import d, * as x from "foo" - if (languageVersion !== ScriptTarget.ES6) { + if (languageVersion <= ScriptTarget.ES5) { write("var "); } else { From 700af6a2ce24f7351f6aad68870a8371e6a4d258 Mon Sep 17 00:00:00 2001 From: Paul van Brenk Date: Sun, 24 Jan 2016 16:08:45 -0800 Subject: [PATCH 200/209] Fix up todo in jsdoccomment template code. --- src/services/services.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/services/services.ts b/src/services/services.ts index 0fae1c0aa45..28f7f848835 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -7179,8 +7179,7 @@ namespace ts { const indentationStr = sourceFile.text.substr(lineStart, posLineAndChar.character); - // TODO: call a helper method instead once PR #4133 gets merged in. - const newLine = host.getNewLine ? host.getNewLine() : "\r\n"; + const newLine = getNewLineOrDefaultFromHost(host); let docParams = ""; for (let i = 0, numParams = parameters.length; i < numParams; i++) { From 72c3bb6930ca0aa7359079141ffa9976122f00f2 Mon Sep 17 00:00:00 2001 From: york yao Date: Mon, 25 Jan 2016 10:48:23 +0800 Subject: [PATCH 201/209] extract a helper method --- src/compiler/emitter.ts | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index f6e70738071..fac17cd633c 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -6096,6 +6096,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge } } + function emitVar() { + if (languageVersion <= ScriptTarget.ES5) { + write("var "); + } + else { + write("const "); + } + } + function emitExternalImportDeclaration(node: ImportDeclaration | ImportEqualsDeclaration) { if (contains(externalImports, node)) { const isExportedImport = node.kind === SyntaxKind.ImportEqualsDeclaration && (node.flags & NodeFlags.Export) !== 0; @@ -6108,12 +6117,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge // import x = require("foo") // import * as x from "foo" if (!isExportedImport) { - if (languageVersion <= ScriptTarget.ES5) { - write("var "); - } - else { - write("const "); - } + emitVar(); }; emitModuleMemberName(namespaceDeclaration); write(" = "); @@ -6126,12 +6130,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge // import d, { x, y } from "foo" const isNakedImport = SyntaxKind.ImportDeclaration && !(node).importClause; if (!isNakedImport) { - if (languageVersion <= ScriptTarget.ES5) { - write("var "); - } - else { - write("const "); - } + emitVar(); write(getGeneratedNameForNode(node)); write(" = "); } @@ -6158,12 +6157,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge } else if (namespaceDeclaration && isDefaultImport(node)) { // import d, * as x from "foo" - if (languageVersion <= ScriptTarget.ES5) { - write("var "); - } - else { - write("const "); - } + emitVar(); emitModuleMemberName(namespaceDeclaration); write(" = "); write(getGeneratedNameForNode(node)); From d06d66cf5d95785c84b99944c63f9f05fa21a8ef Mon Sep 17 00:00:00 2001 From: york yao Date: Mon, 25 Jan 2016 13:35:12 +0800 Subject: [PATCH 202/209] use a local string rather than a function --- src/compiler/emitter.ts | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index fac17cd633c..8fed6ee42f9 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -6096,19 +6096,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge } } - function emitVar() { - if (languageVersion <= ScriptTarget.ES5) { - write("var "); - } - else { - write("const "); - } - } - function emitExternalImportDeclaration(node: ImportDeclaration | ImportEqualsDeclaration) { if (contains(externalImports, node)) { const isExportedImport = node.kind === SyntaxKind.ImportEqualsDeclaration && (node.flags & NodeFlags.Export) !== 0; const namespaceDeclaration = getNamespaceDeclarationNode(node); + const varOrConst = (languageVersion <= ScriptTarget.ES5) ? "var " : "const "; if (modulekind !== ModuleKind.AMD) { emitLeadingComments(node); @@ -6117,7 +6109,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge // import x = require("foo") // import * as x from "foo" if (!isExportedImport) { - emitVar(); + write(varOrConst); }; emitModuleMemberName(namespaceDeclaration); write(" = "); @@ -6130,7 +6122,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge // import d, { x, y } from "foo" const isNakedImport = SyntaxKind.ImportDeclaration && !(node).importClause; if (!isNakedImport) { - emitVar(); + write(varOrConst); write(getGeneratedNameForNode(node)); write(" = "); } @@ -6157,7 +6149,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge } else if (namespaceDeclaration && isDefaultImport(node)) { // import d, * as x from "foo" - emitVar(); + write(varOrConst); emitModuleMemberName(namespaceDeclaration); write(" = "); write(getGeneratedNameForNode(node)); From bfd6ca04af5fb79815cf9c76a69fb1256a37183e Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 25 Jan 2016 13:25:22 -0800 Subject: [PATCH 203/209] baseline-accept --- .../jsFileCompilationTypeAssertions.errors.txt | 9 ++++++--- .../getJavaScriptSemanticDiagnostics20.ts | 16 ---------------- 2 files changed, 6 insertions(+), 19 deletions(-) delete mode 100644 tests/cases/fourslash/getJavaScriptSemanticDiagnostics20.ts diff --git a/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt b/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt index e73ee46fb89..662eea4d405 100644 --- a/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt @@ -1,9 +1,12 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. -tests/cases/compiler/a.js(1,10): error TS8016: 'type assertion expressions' can only be used in a .ts file. +tests/cases/compiler/a.js(1,10): error TS17008: JSX element 'string' has no corresponding closing tag. +tests/cases/compiler/a.js(1,27): error TS1005: 'undefined; ~~~~~~ -!!! error TS8016: 'type assertion expressions' can only be used in a .ts file. \ No newline at end of file +!!! error TS17008: JSX element 'string' has no corresponding closing tag. + +!!! error TS1005: ' - -// @allowJs: true -// @Filename: a.js -//// var v = undefined; - -verify.getSyntacticDiagnostics(`[]`); -verify.getSemanticDiagnostics(`[ - { - "message": "'type assertion expressions' can only be used in a .ts file.", - "start": 9, - "length": 6, - "category": "error", - "code": 8016 - } -]`); \ No newline at end of file From c38021ffb8db7fdd081823d603cdf5af8da606e7 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 25 Jan 2016 13:38:00 -0800 Subject: [PATCH 204/209] Lint --- src/compiler/parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 16196e277dc..09df49d748c 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -546,7 +546,7 @@ namespace ts { function getLanguageVariant(fileName: string) { // .tsx and .jsx files are treated as jsx language variant. - return fileExtensionIs(fileName, ".tsx") || fileExtensionIs(fileName, ".jsx") || fileExtensionIs(fileName, '.js') ? LanguageVariant.JSX : LanguageVariant.Standard; + return fileExtensionIs(fileName, ".tsx") || fileExtensionIs(fileName, ".jsx") || fileExtensionIs(fileName, ".js") ? LanguageVariant.JSX : LanguageVariant.Standard; } function initializeState(fileName: string, _sourceText: string, languageVersion: ScriptTarget, isJavaScriptFile: boolean, _syntaxCursor: IncrementalParser.SyntaxCursor) { From add91052bb8dbf011b7170b03dca73d211bd210b Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Mon, 25 Jan 2016 17:08:15 -0800 Subject: [PATCH 205/209] Update version --- package.json | 2 +- src/compiler/program.ts | 2 +- src/services/shims.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 261cdfa64b7..cc74bf2c27c 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "typescript", "author": "Microsoft Corp.", "homepage": "http://typescriptlang.org/", - "version": "1.8.0", + "version": "1.9.0", "license": "Apache-2.0", "description": "TypeScript is a language for application scale JavaScript development", "keywords": [ diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 398ce27ef48..3fed8dcb596 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -12,7 +12,7 @@ namespace ts { const emptyArray: any[] = []; - export const version = "1.8.0"; + export const version = "1.9.0"; export function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean): string { let fileName = "tsconfig.json"; diff --git a/src/services/shims.ts b/src/services/shims.ts index 9ca3f19244d..e836eeed3e0 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -1057,6 +1057,6 @@ namespace TypeScript.Services { // TODO: it should be moved into a namespace though. /* @internal */ -const toolsVersion = "1.8"; +const toolsVersion = "1.9"; /* tslint:enable:no-unused-variable */ \ No newline at end of file From 3e0c84e43b43bd08ce587cd08882e910a08ce9fc Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Mon, 25 Jan 2016 17:44:07 -0800 Subject: [PATCH 206/209] PR feedback --- src/compiler/checker.ts | 83 +++++++++++++++++++++++++++++++++-------- 1 file changed, 67 insertions(+), 16 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ca41e509664..c628f254aba 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -376,8 +376,8 @@ namespace ts { const moduleAugmentation = moduleName.parent; if (moduleAugmentation.symbol.valueDeclaration !== moduleAugmentation) { // this is a combined symbol for multiple augmentations within the same file. - // its symbol already has accumulated information for all declarations - // so we need to add it just once - do the work only for first declaration + // its symbol already has accumulated information for all declarations + // so we need to add it just once - do the work only for first declaration Debug.assert(moduleAugmentation.symbol.declarations.length > 1); return; } @@ -386,7 +386,7 @@ namespace ts { mergeSymbolTable(globals, moduleAugmentation.symbol.exports); } else { - // find a module that about to be augmented + // find a module that about to be augmented let mainModule = resolveExternalModuleNameWorker(moduleName, moduleName, Diagnostics.Invalid_module_name_in_augmentation_module_0_cannot_be_found); if (!mainModule) { return; @@ -810,7 +810,7 @@ namespace ts { } // No static member is present. - // Check if we're in an instance method and look for a relevant instance member. + // Check if we're in an instance method and look for a relevant instance member. if (location === container && !(location.flags & NodeFlags.Static)) { const instanceType = (getDeclaredTypeOfSymbol(classSymbol)).thisType; if (getPropertyOfType(instanceType, name)) { @@ -1161,7 +1161,7 @@ namespace ts { return getMergedSymbol(sourceFile.symbol); } if (moduleNotFoundError) { - // report errors only if it was requested + // report errors only if it was requested error(moduleReferenceLiteral, Diagnostics.File_0_is_not_a_module, sourceFile.fileName); } return undefined; @@ -7115,14 +7115,10 @@ namespace ts { return false; } - function isSuperPropertyAccess(node: Node) { - return node.kind === SyntaxKind.PropertyAccessExpression - && (node).expression.kind === SyntaxKind.SuperKeyword; - } - - function isSuperElementAccess(node: Node) { - return node.kind === SyntaxKind.ElementAccessExpression - && (node).expression.kind === SyntaxKind.SuperKeyword; + function isSuperPropertyOrElementAccess(node: Node) { + return (node.kind === SyntaxKind.PropertyAccessExpression + || node.kind === SyntaxKind.ElementAccessExpression) + && (node).expression.kind === SyntaxKind.SuperKeyword; } function checkSuperExpression(node: Node): Type { @@ -7177,8 +7173,63 @@ namespace ts { getNodeLinks(node).flags |= nodeCheckFlag; // Due to how we emit async functions, we need to specialize the emit for an async method that contains a `super` reference. + // This is due to the fact that we emit the body of an async function inside of a generator function. As generator + // functions cannot reference `super`, we emit a helper inside of the method body, but outside of the generator. This helper + // uses an arrow function, which is permitted to reference `super`. + // + // There are two primary ways we can access `super` from within an async method. The first is getting the value of a property + // or indexed access on super, either as part of a right-hand-side expression or call expression. The second is when setting the value + // of a property or indexed access, either as part of an assignment expression or destructuring assignment. + // + // The simplest case is reading a value, in which case we will emit something like the following: + // + // // ts + // ... + // async asyncMethod() { + // let x = await super.asyncMethod(); + // return x; + // } + // ... + // + // // js + // ... + // asyncMethod() { + // const _super = name => super[name]; + // return __awaiter(this, arguments, Promise, function *() { + // let x = yield _super("asyncMethod").call(this); + // return x; + // }); + // } + // ... + // + // The more complex case is when we wish to assign a value, especially as part of a destructuring assignment. As both cases + // are legal in ES6, but also likely less frequent, we emit the same more complex helper for both scenarios: + // + // // ts + // ... + // async asyncMethod(ar: Promise) { + // [super.a, super.b] = await ar; + // } + // ... + // + // // js + // ... + // asyncMethod(ar) { + // const _super = (function (geti, seti) { + // const cache = Object.create(null); + // return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } }); + // })(name => super[name], (name, value) => super[name] = value); + // return __awaiter(this, arguments, Promise, function *() { + // [_super("a").value, _super("b").value] = yield ar; + // }); + // } + // ... + // + // This helper creates an object with a "value" property that wraps the `super` property or indexed access for both get and set. + // This is required for destructuring assignments, as a call expression cannot be used as the target of a destructuring assignment + // while a property access can. if (container.kind === SyntaxKind.MethodDeclaration && container.flags & NodeFlags.Async) { - if ((isSuperPropertyAccess(node.parent) || isSuperElementAccess(node.parent)) && isAssignmentTarget(node.parent)) { + if (isSuperPropertyOrElementAccess(node.parent) && isAssignmentTarget(node.parent)) { getNodeLinks(container).flags |= NodeCheckFlags.AsyncMethodWithSuperBinding; } else { @@ -14224,10 +14275,10 @@ namespace ts { if (isAmbientExternalModule) { if (isExternalModuleAugmentation(node)) { // body of the augmentation should be checked for consistency only if augmentation was applied to its target (either global scope or module) - // otherwise we'll be swamped in cascading errors. + // otherwise we'll be swamped in cascading errors. // We can detect if augmentation was applied using following rules: // - augmentation for a global scope is always applied - // - augmentation for some external module is applied if symbol for augmentation is merged (it was combined with target module). + // - augmentation for some external module is applied if symbol for augmentation is merged (it was combined with target module). const checkBody = isGlobalAugmentation || (getSymbolOfNode(node).flags & SymbolFlags.Merged); if (checkBody) { // body of ambient external module is always a module block From 910fbba1568c745e94ce32f4a27fe19a54961474 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Tue, 26 Jan 2016 10:16:46 -0800 Subject: [PATCH 207/209] break on 'this' type in hasConstraintReferenceTo --- src/compiler/checker.ts | 2 +- tests/baselines/reference/thisTypeAsConstraint.js | 14 ++++++++++++++ .../reference/thisTypeAsConstraint.symbols | 9 +++++++++ .../baselines/reference/thisTypeAsConstraint.types | 9 +++++++++ tests/cases/compiler/thisTypeAsConstraint.ts | 4 ++++ 5 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 tests/baselines/reference/thisTypeAsConstraint.js create mode 100644 tests/baselines/reference/thisTypeAsConstraint.symbols create mode 100644 tests/baselines/reference/thisTypeAsConstraint.types create mode 100644 tests/cases/compiler/thisTypeAsConstraint.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 645b3835b93..d61cde01451 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -4285,7 +4285,7 @@ namespace ts { function hasConstraintReferenceTo(type: Type, target: TypeParameter): boolean { let checked: Type[]; - while (type && type.flags & TypeFlags.TypeParameter && !contains(checked, type)) { + while (type && !(type.flags & TypeFlags.ThisType) && type.flags & TypeFlags.TypeParameter && !contains(checked, type)) { if (type === target) { return true; } diff --git a/tests/baselines/reference/thisTypeAsConstraint.js b/tests/baselines/reference/thisTypeAsConstraint.js new file mode 100644 index 00000000000..b5a7113549d --- /dev/null +++ b/tests/baselines/reference/thisTypeAsConstraint.js @@ -0,0 +1,14 @@ +//// [thisTypeAsConstraint.ts] +class C { + public m() { + } +} + +//// [thisTypeAsConstraint.js] +var C = (function () { + function C() { + } + C.prototype.m = function () { + }; + return C; +}()); diff --git a/tests/baselines/reference/thisTypeAsConstraint.symbols b/tests/baselines/reference/thisTypeAsConstraint.symbols new file mode 100644 index 00000000000..020dd966cad --- /dev/null +++ b/tests/baselines/reference/thisTypeAsConstraint.symbols @@ -0,0 +1,9 @@ +=== tests/cases/compiler/thisTypeAsConstraint.ts === +class C { +>C : Symbol(C, Decl(thisTypeAsConstraint.ts, 0, 0)) + + public m() { +>m : Symbol(m, Decl(thisTypeAsConstraint.ts, 0, 9)) +>T : Symbol(T, Decl(thisTypeAsConstraint.ts, 1, 11)) + } +} diff --git a/tests/baselines/reference/thisTypeAsConstraint.types b/tests/baselines/reference/thisTypeAsConstraint.types new file mode 100644 index 00000000000..e55fb1f0cca --- /dev/null +++ b/tests/baselines/reference/thisTypeAsConstraint.types @@ -0,0 +1,9 @@ +=== tests/cases/compiler/thisTypeAsConstraint.ts === +class C { +>C : C + + public m() { +>m : () => void +>T : T + } +} diff --git a/tests/cases/compiler/thisTypeAsConstraint.ts b/tests/cases/compiler/thisTypeAsConstraint.ts new file mode 100644 index 00000000000..fcab82bc7cc --- /dev/null +++ b/tests/cases/compiler/thisTypeAsConstraint.ts @@ -0,0 +1,4 @@ +class C { + public m() { + } +} \ No newline at end of file From b00cae87b3f8a49cf6830ca45ea624ba90af779e Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 26 Jan 2016 11:36:20 -0800 Subject: [PATCH 208/209] Moved isSuperPropertyOrElementAccess to utilities --- src/compiler/checker.ts | 6 ------ src/compiler/emitter.ts | 12 +----------- src/compiler/utilities.ts | 10 ++++++++++ 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c628f254aba..0cd17debfce 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7115,12 +7115,6 @@ namespace ts { return false; } - function isSuperPropertyOrElementAccess(node: Node) { - return (node.kind === SyntaxKind.PropertyAccessExpression - || node.kind === SyntaxKind.ElementAccessExpression) - && (node).expression.kind === SyntaxKind.SuperKeyword; - } - function checkSuperExpression(node: Node): Type { const isCallExpression = node.parent.kind === SyntaxKind.CallExpression && (node.parent).expression === node; diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 762b491155b..696ad4a591e 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -2294,16 +2294,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge write(")"); } - function isSuperPropertyAccess(node: Expression): node is PropertyAccessExpression { - return node.kind === SyntaxKind.PropertyAccessExpression - && (node).expression.kind === SyntaxKind.SuperKeyword; - } - - function isSuperElementAccess(node: Expression): node is ElementAccessExpression { - return node.kind === SyntaxKind.ElementAccessExpression - && (node).expression.kind === SyntaxKind.SuperKeyword; - } - function isInAsyncMethodWithSuperInES6(node: Node) { if (languageVersion === ScriptTarget.ES6) { const container = getSuperContainer(node, /*includeFunctions*/ false); @@ -2337,7 +2327,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge superCall = true; } else { - superCall = isSuperPropertyAccess(expression) || isSuperElementAccess(expression); + superCall = isSuperPropertyOrElementAccess(expression); isAsyncMethodWithSuper = superCall && isInAsyncMethodWithSuperInES6(node); emit(expression); } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 4636c8d144c..102364a334b 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -850,6 +850,16 @@ namespace ts { } } + /** + * Determines whether a node is a property or element access expression for super. + */ + export function isSuperPropertyOrElementAccess(node: Node) { + return (node.kind === SyntaxKind.PropertyAccessExpression + || node.kind === SyntaxKind.ElementAccessExpression) + && (node).expression.kind === SyntaxKind.SuperKeyword; + } + + export function getEntityNameFromTypeNode(node: TypeNode): EntityName | Expression { if (node) { switch (node.kind) { From 05803f528549cd5bbf953f71170e978a538a8e8d Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 26 Jan 2016 12:55:03 -0800 Subject: [PATCH 209/209] Added comments for new flags in types.ts --- src/compiler/types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 9da409487df..3277e7e7950 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2058,8 +2058,8 @@ namespace ts { SuperInstance = 0x00000100, // Instance 'super' reference SuperStatic = 0x00000200, // Static 'super' reference ContextChecked = 0x00000400, // Contextual types have been assigned - AsyncMethodWithSuper = 0x00000800, - AsyncMethodWithSuperBinding = 0x00001000, + AsyncMethodWithSuper = 0x00000800, // An async method that reads a value from a member of 'super'. + AsyncMethodWithSuperBinding = 0x00001000, // An async method that assigns a value to a member of 'super'. CaptureArguments = 0x00002000, // Lexical 'arguments' used in body (for async functions) // Values for enum members have been computed, and any errors have been reported for them.